cf 1.0.0-beta.0 → 1.0.0-beta.2
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 +11 -0
- package/dist/_meta/commands.json +10140 -10626
- package/dist/_meta/hand-written-commands.json +546 -1
- package/dist/_meta/schemas.json +6391 -7002
- package/dist/{abuse-reports-BwsJLiPN.mjs → abuse-reports-JcwSaW-c.mjs} +11 -11
- package/dist/access-B3TvAe5h.mjs +27 -0
- package/dist/{account-DBLarar2.mjs → account-CLsfIk5j.mjs} +5 -5
- package/dist/{account-tags-BNrSShjj.mjs → account-tags-BJdDiyDi.mjs} +4 -4
- package/dist/{accounts-CCAnDjFk.mjs → accounts-6eXqIqSW.mjs} +59 -59
- package/dist/{acm-ZPYQbZQr.mjs → acm-ChNLnPqM.mjs} +3 -3
- package/dist/{addressing-BFpzLfTn.mjs → addressing-z8ei_TCh.mjs} +49 -49
- package/dist/agent-context-GRiQ4zRU.mjs +2 -0
- package/dist/{agent-memory-DEvy2dLU.mjs → agent-memory-Un0usAVF.mjs} +15 -15
- package/dist/{ai-BF0_0NtS.mjs → ai-Bj8kgDf7.mjs} +14 -14
- package/dist/{ai-audit-Dn03zntn.mjs → ai-audit-FR6QuDK_.mjs} +1 -1
- package/dist/{ai-gateway-CVABbCjv.mjs → ai-gateway-DrQhTvKf.mjs} +68 -68
- package/dist/{ai-search-g0tR8Cut.mjs → ai-search-BvMeOKK6.mjs} +37 -37
- package/dist/{ai-security-BXXA0Jnk.mjs → ai-security-BHvDKoM1.mjs} +1 -1
- package/dist/{alerting-Bst10SOG.mjs → alerting-DmRZCAjg.mjs} +26 -26
- package/dist/{analytics-DgEaxta8.mjs → analytics-DqidJ4qc.mjs} +9 -9
- package/dist/{analytics_engine-B4DvcYmB.mjs → analytics_engine-I7N0I6yP.mjs} +2 -2
- package/dist/{api-security-Dkx1Codr.mjs → api-security-BMNhdDyR.mjs} +61 -61
- package/dist/{argo-BvswWPlP.mjs → argo-U5TIBcub.mjs} +1 -1
- package/dist/args-CXgkQKK7.mjs +2 -0
- package/dist/{artifacts-D8kZKJq0.mjs → artifacts-Byw1W73U.mjs} +20 -20
- package/dist/{audit-logs-Bp_yQpXJ.mjs → audit-logs-C6zyFeKM.mjs} +2 -2
- package/dist/auth-B5p3SIhO.mjs +8 -0
- package/dist/auth-CosaKfuk.mjs +2 -0
- package/dist/autoconfig-DED3bWob.mjs +511 -0
- package/dist/banner-Xk4xBN8U.mjs +2 -0
- package/dist/{billing-Cqj64fqz.mjs → billing-BS1raRJt.mjs} +10 -10
- package/dist/{bot-management-CzZx_aml.mjs → bot-management-Cn6xfGzJ.mjs} +1 -1
- package/dist/{botnet-feed-Co0c8Xdj.mjs → botnet-feed-DtWOPNfw.mjs} +5 -5
- package/dist/{brand-protection-CDsGaPIl.mjs → brand-protection-BcEQ66bT.mjs} +13 -13
- package/dist/browser-extension-D_siSsD9.mjs +2 -0
- package/dist/{browser-run-DFrohJ1p.mjs → browser-run-RZ7ZPRop.mjs} +23 -23
- package/dist/build-DG8NfVjJ.mjs +2 -0
- package/dist/build-kgS7iKwi.mjs +2 -0
- package/dist/{builds-CamhClyb.mjs → builds-AOCMH4CE.mjs} +31 -31
- package/dist/{cache-BiTk4-Zc.mjs → cache-D_EBxDff.mjs} +1 -1
- package/dist/{certificate-authorities-Dal9DNjW.mjs → certificate-authorities-B6rtjuaT.mjs} +1 -1
- package/dist/cf--3tGe71B.mjs +18 -0
- package/dist/chunk-M77HNR46-BqG3fjQz.mjs +2 -0
- package/dist/chunk-RV27PEH3-C8_6bMgi.mjs +97 -0
- package/dist/chunk-U6NEESU5-CAnOLcsu.mjs +2 -0
- package/dist/chunk-WMOON6TZ-D3H84qpM.mjs +2 -0
- package/dist/cli-Ct980dyx.mjs +3 -0
- package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
- package/dist/client-certificates-uBOjGcgo.mjs +13 -0
- package/dist/{client-side-security-CIO_YPtN.mjs → client-side-security-Bm7JwGaG.mjs} +1 -1
- package/dist/{cloud-connector-vwdixea0.mjs → cloud-connector-69M2Dx8h.mjs} +1 -1
- package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-Ba5LySkU.mjs} +1 -1
- package/dist/{cloudforce-one-C1cFVBGK.mjs → cloudforce-one-Xn2mlAPv.mjs} +214 -214
- package/dist/command-B7SzqjQM.mjs +2 -0
- package/dist/command-BLHcNQ8m.mjs +2 -0
- package/dist/command-BxQbIQWT.mjs +2 -0
- package/dist/command-C0SMCHZp.mjs +2 -0
- package/dist/command-CE8k5TuK.mjs +2 -0
- package/dist/command-CPiCDUth.mjs +2 -0
- package/dist/command-Cb0pS8T5.mjs +2 -0
- package/dist/command-Cz_bKDWf.mjs +2 -0
- package/dist/command-DCpX9Cem.mjs +2 -0
- package/dist/command-DEC5PwJo.mjs +2 -0
- package/dist/command-DHjsstFb.mjs +2 -0
- package/dist/command-MTUsmZU5.mjs +2 -0
- package/dist/command-Sb9lOxWT.mjs +2 -0
- package/dist/command-sQ8yswii.mjs +2 -0
- package/dist/{completions-xPLd1cvL.mjs → completions-DZDltM9V.mjs} +3 -3
- package/dist/{config-B4vIa0zp.mjs → config-DcppJ5D2.mjs} +1 -1
- package/dist/{connector-interrupts-DQ5T-HMN.mjs → connector-interrupts-DTy6laab.mjs} +3 -3
- package/dist/{connector-telemetry-events-DWam38_9.mjs → connector-telemetry-events-CJqGGvFJ.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-DX6AJf9Q.mjs → connector-telemetry-snapshots-BPxhPhr6.mjs} +3 -3
- package/dist/{connectors-CBhLWVd-.mjs → connectors-CdfCcZuA.mjs} +7 -7
- package/dist/{containers-Bx_44bmJ.mjs → containers-C7z53QcY.mjs} +86 -86
- package/dist/{containers-C7blN-pe.mjs → containers-VMqcxH5a.mjs} +17 -17
- package/dist/{content-scan-CC91dAlv.mjs → content-scan-BirgZrmr.mjs} +1 -1
- package/dist/context-Dzzbc9RK.mjs +7 -0
- package/dist/{cps-D9a4N_bH.mjs → cps-DzFm3zKp.mjs} +1 -1
- package/dist/{csamScanner-T7nbCnep.mjs → csamScanner-D2_OO5-1.mjs} +1 -1
- package/dist/{ct-alerting-CkjNJlla.mjs → ct-alerting-B7wQkFVl.mjs} +1 -1
- package/dist/{custom-certificates-DnWnt9oJ.mjs → custom-certificates-BKcCfbH8.mjs} +4 -4
- package/dist/{custom-csrs-Db2pF9Ib.mjs → custom-csrs-CXoOxir4.mjs} +5 -5
- package/dist/{custom-hostnames-B_N-uSIa.mjs → custom-hostnames-CNYfnCOd.mjs} +6 -6
- package/dist/{custom-nameservers-DPA_sFY8.mjs → custom-nameservers-BlLM7a4L.mjs} +5 -5
- package/dist/{custom-pages-D6fxEBoh.mjs → custom-pages-BcWoypet.mjs} +10 -10
- package/dist/{d1-DXs1xVmH.mjs → d1-CvrHsqYY.mjs} +14 -14
- package/dist/{data-security-CVZAIzhe.mjs → data-security-BxzLSdGk.mjs} +33 -33
- package/dist/{dcv-delegation-as1ue_wx.mjs → dcv-delegation-9_Hl-5v-.mjs} +1 -1
- package/dist/{delegate-GctF_lrq.mjs → delegate-CCGgla7X.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-D2XXCkqk.mjs → deploy-BlXYtvTd.mjs} +1 -1
- package/dist/{deploy-input-BCYyKXpp.mjs → deploy-input-DTXVZ2QJ.mjs} +1 -1
- package/dist/dev-reqdKM28.mjs +4 -0
- package/dist/{diagnostics-BKH1Oh-C.mjs → diagnostics-BxHs1EJB.mjs} +7 -7
- package/dist/dialog-ClHoC_cG.mjs +2 -0
- package/dist/dist-CmyJy57B.mjs +48 -0
- package/dist/{dist-BpadEMNY.mjs → dist-Cpb7_h4N.mjs} +35 -35
- package/dist/dist-cGGV-p_F.mjs +366 -0
- package/dist/{dls-C5kAQsN6.mjs → dls-D7GXW-N3.mjs} +8 -8
- package/dist/{dns-CYwXrdJO.mjs → dns-B0mdWJO5.mjs} +63 -63
- package/dist/{dns-firewall-BEw4QcXj.mjs → dns-firewall-BG0bzuL3.mjs} +8 -8
- package/dist/dot-prop-IITUZ2XW-BO5KJUwL.mjs +2 -0
- package/dist/dry-run-BmzTxDtZ.mjs +2 -0
- package/dist/{durable-objects-3jvUgzKd.mjs → durable-objects-DW0CsJzR.mjs} +4 -4
- package/dist/{email-auth-B3MD8FrJ.mjs → email-auth-Ls-7Yijm.mjs} +1 -1
- package/dist/{email-routing-C4YhZGPw.mjs → email-routing-DVaFhg-3.mjs} +24 -24
- package/dist/{email-security-BcFyWNby.mjs → email-security-vnwkqlgp.mjs} +77 -79
- package/dist/{email-sending-BO1GOAho.mjs → email-sending-CbMUicJz.mjs} +23 -23
- package/dist/error-sanitization-TV6O0aCD.mjs +2 -0
- package/dist/error-sanitization-cyGBhW1Z.mjs +2 -0
- package/dist/{fieldExtractors-BJDnzNCN.mjs → fieldExtractors-2EkDoJg8.mjs} +4 -4
- package/dist/firewall-BK4QYqRe.mjs +36 -0
- package/dist/{flagship-BJYMb7hb.mjs → flagship--lHQ0H3n.mjs} +13 -13
- package/dist/{fraud-C7kS7kP9.mjs → fraud-CaoRrQ8W.mjs} +1 -1
- package/dist/generate-CrKNH6ms.mjs +3 -0
- package/dist/generate-Djb5Af37.mjs +2 -0
- package/dist/{google-tag-gateway-8VR-j0sa.mjs → google-tag-gateway-DDzLPmk5.mjs} +1 -1
- package/dist/{healthchecks-BJleItOD.mjs → healthchecks-Q2uXvt4m.mjs} +1 -1
- package/dist/{hostnames-CHajvoHa.mjs → hostnames-CsaYnis6.mjs} +1 -1
- package/dist/{hyperdrive-DlxQrok-.mjs → hyperdrive-DDr6sAkw.mjs} +9 -9
- package/dist/{iam-B7oTr6vW.mjs → iam-CmzocepZ.mjs} +24 -24
- package/dist/{images-xLAYe436.mjs → images-Ux0Phsbi.mjs} +38 -38
- package/dist/index.mjs +1 -1
- package/dist/init-Nx4RRgfT.mjs +39 -0
- package/dist/{intel-DwZXY1YE.mjs → intel-bgS4g7nx.mjs} +38 -38
- package/dist/interactive-B_dcVghB.mjs +2 -0
- package/dist/interactive-D80kbTap.mjs +32 -0
- package/dist/{ips-BC_9nKE7.mjs → ips-BDiolgWF.mjs} +1 -1
- package/dist/keyless-certificates-C_TwTMql.mjs +13 -0
- package/dist/{keys-K-GFzhku.mjs → keys-Cr8AqQDY.mjs} +2 -2
- package/dist/{kv-Bfwz_ULu.mjs → kv-DmAQCqXl.mjs} +10 -10
- package/dist/lazy-command-B_bwSa2F.mjs +2 -0
- package/dist/{leaked-credential-checks-D8UuxztO.mjs → leaked-credential-checks-De7ph4VA.mjs} +1 -1
- package/dist/{load-balancers-B0XeGLhT.mjs → load-balancers-DXt4ndF4.mjs} +39 -39
- package/dist/local-CFd107fr.mjs +2 -0
- package/dist/{local-B6b2OIBW.mjs → local-OKXweFsd.mjs} +1 -1
- package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-tTYpniPS.mjs} +1 -1
- package/dist/login-BurQ63Ws.mjs +5 -0
- package/dist/login-CmlHvH5k.mjs +2 -0
- package/dist/{logo-matches-DWg5ezsM.mjs → logo-matches-CQ60P96J.mjs} +3 -3
- package/dist/{logos-6A6gJC5C.mjs → logos-u7UwT8MH.mjs} +3 -3
- package/dist/{logpush-DwehajAw.mjs → logpush-IoIe8e80.mjs} +23 -23
- package/dist/{logs-BWg7YymF.mjs → logs-ih5tyXEE.mjs} +16 -16
- package/dist/{magic-cloud-networking--14hNj2F.mjs → magic-cloud-networking-CWNFnjcY.mjs} +34 -34
- package/dist/{magic-network-monitoring-Dzo4L6kd.mjs → magic-network-monitoring-ClfZleF8.mjs} +17 -17
- package/dist/{magic-transit-DDO0A5v4.mjs → magic-transit-D69pkEVW.mjs} +139 -139
- package/dist/{managed-defense-DQ0iwWdG.mjs → managed-defense-BHdmL0vx.mjs} +9 -9
- package/dist/{managed-transforms-DDIdcPG0.mjs → managed-transforms-DbCR4LUg.mjs} +1 -1
- package/dist/{matches-D6ahHNaP.mjs → matches-Cou6RVkh.mjs} +3 -3
- package/dist/{mcp-BcIrLbRv.mjs → mcp-CQYfM19s.mjs} +15 -15
- package/dist/{mesh-wLiPcWyN.mjs → mesh-CXqaAFS4.mjs} +12 -12
- package/dist/migrate-CXMbQPyC.mjs +2 -0
- package/dist/mtls-certificates-DNeId8xS.mjs +13 -0
- package/dist/{network-DZsrs_sw.mjs → network-B7V3JbU7.mjs} +24 -24
- package/dist/{network-interconnects-Cjbu4EMv.mjs → network-interconnects-BNon8iUs.mjs} +17 -17
- package/dist/oauth-CeXh-ACI.mjs +9 -0
- package/dist/{oauth-Cu1twz9z.mjs → oauth-DM8q-TYg.mjs} +1 -1
- package/dist/{oauth-clients-DR0hzakz.mjs → oauth-clients-gGmWIWHl.mjs} +7 -7
- package/dist/{oauth-scopes-BDNpJJ32.mjs → oauth-scopes-DSEu331u.mjs} +1 -1
- package/dist/{observability-BnHy2M6p.mjs → observability-_VJhfwM1.mjs} +44 -44
- package/dist/open-PCXX3ZDZ-DobJT1Mj.mjs +4 -0
- package/dist/{organization-iasRm69J.mjs → organization-DW4EpwGl.mjs} +1 -1
- package/dist/{organizations-CUzCIKXV.mjs → organizations-DE1g2wVq.mjs} +1 -1
- package/dist/{origin-ca-certificates-iQXSqBI0.mjs → origin-ca-certificates-D3ULDV__.mjs} +3 -3
- package/dist/{origin-post-quantum-encryption-DcMDK6Tz.mjs → origin-post-quantum-encryption-BLropaz7.mjs} +1 -1
- package/dist/{origin-tls-client-auth-D1X26X7y.mjs → origin-tls-client-auth-C87TG2i_.mjs} +5 -5
- package/dist/output-CZt-berV.mjs +2 -0
- package/dist/{page-rules-CXa8EYcP.mjs → page-rules-tlb9P-7V.mjs} +1 -1
- package/dist/{pages-Cu0m9GSH.mjs → pages-CjPErYik.mjs} +24 -24
- package/dist/{pay-per-crawl-DmF8xlm_.mjs → pay-per-crawl-C50wI-Iz.mjs} +32 -32
- package/dist/{pay-per-use-DIp2fwJU.mjs → pay-per-use-DHHIvynU.mjs} +3 -3
- package/dist/{pipelines-MmXlsxYO.mjs → pipelines-Y2icOwuf.mjs} +20 -20
- package/dist/precursor-DeyurJSC.mjs +4 -0
- package/dist/previews-Dj_LcGRd.mjs +4 -0
- package/dist/progress-C9dWgc3J.mjs +2 -0
- package/dist/prompt-Mh69ni1N.mjs +3 -0
- package/dist/{queries-VzdcSR5H.mjs → queries-DyUJefwL.mjs} +4 -4
- package/dist/{queues-BZYl2emH.mjs → queues-CdNe4tGY.mjs} +29 -35
- package/dist/{r2-omcKF8_A.mjs → r2-C0W2J4sT.mjs} +52 -52
- package/dist/{r2-data-catalog-DISnPFPY.mjs → r2-data-catalog-D_zDlmVD.mjs} +16 -16
- package/dist/{radar-JzBTD249.mjs → radar-CSguicKC.mjs} +1 -1
- package/dist/raw-fetch-1ygCOcT_.mjs +2 -0
- package/dist/{realtime-yIdAJ0Yf.mjs → realtime-CvWs5pi3.mjs} +78 -78
- package/dist/{registrar-D-Li9gNk.mjs → registrar-DQUxn0FK.mjs} +8 -8
- package/dist/{registrar-sandbox-CKSSHAyv.mjs → registrar-sandbox-Q7ZEmg2x.mjs} +6 -6
- package/dist/{registry-vreNkX6u.mjs → registry-4Sw95M5_.mjs} +1 -1
- package/dist/{reporting-Cf-pnw6h.mjs → reporting-DJShxeDv.mjs} +7 -7
- package/dist/request-headers-DFBBErJg.mjs +2 -0
- package/dist/{request-tracers-BegIQTzt.mjs → request-tracers-DD8HlG61.mjs} +2 -2
- package/dist/resolve-BVxXAYG7.mjs +2 -0
- package/dist/{resource-sharing-DEVgiYzM.mjs → resource-sharing-J46JMWQP.mjs} +14 -14
- package/dist/{resource-tagging-Cm2yJkU9.mjs → resource-tagging-DLZJLIqy.mjs} +2 -2
- package/dist/{rules-DDCa7cYF.mjs → rules-D068LfBR.mjs} +8 -8
- package/dist/{rulesets-BhS7Hvtu.mjs → rulesets-Cz6P7Oje.mjs} +17 -17
- package/dist/{rum-EIj9ViSn.mjs → rum-C6GQC2vI.mjs} +14 -14
- package/dist/run-C_qUgBTs.mjs +2 -0
- package/dist/run-DK1d9BJz.mjs +2 -0
- package/dist/schema-VZPw_2CY.mjs +2 -0
- package/dist/{schema-flags--GosoCMU.mjs → schema-flags-BmY0Nzp0.mjs} +2 -2
- package/dist/{scim-DA83eNe-.mjs → scim-DMTp_Zhc.mjs} +10 -10
- package/dist/{sdk-CvIO3tWS.mjs → sdk-BuF3fTHr.mjs} +2 -2
- package/dist/{secrets-store-BTd3eGIB.mjs → secrets-store-C2epk0sQ.mjs} +11 -11
- package/dist/{security-center-DbH_7h-T.mjs → security-center-DwMdQ02Y.mjs} +15 -15
- package/dist/{security-txt-DSrHhVEN.mjs → security-txt-CORQfMul.mjs} +1 -1
- package/dist/session-BEXskZi2.mjs +2 -0
- package/dist/shared--lvrXmXY.mjs +2 -0
- package/dist/{smart-shield-DnSTo-OI.mjs → smart-shield-BZ0xjy_6.mjs} +1 -1
- package/dist/{snippets-An5kQs33.mjs → snippets-LSkJGDOc.mjs} +1 -1
- package/dist/source-38bULAR8.mjs +6 -0
- package/dist/spawn-Da3HnlmB.mjs +10 -0
- package/dist/{spectrum-Ci79n7fd.mjs → spectrum-zU8_GFTV.mjs} +1 -1
- package/dist/{speed-BBL7LrLn.mjs → speed-4XbFmeYM.mjs} +1 -1
- package/dist/src-BLLpnbzC.mjs +109 -0
- package/dist/{ssl-B2psFIRm.mjs → ssl-DiCsMY_a.mjs} +4 -4
- package/dist/startup-profile-6fCkD04r.mjs +17 -0
- package/dist/startup-profile-Cw-_akjQ.mjs +2 -0
- package/dist/state-CcktNox9.mjs +2 -0
- package/dist/{state-BxCejn42.mjs → state-DiHwKWTy.mjs} +1 -1
- package/dist/{stream-Du0Q7UOh.mjs → stream-BG3NUAVE.mjs} +45 -45
- package/dist/{submit-CU8S2jBT.mjs → submit-CKSaSFS1.mjs} +2 -2
- package/dist/{tags-C3l5aZSi.mjs → tags-uT9Mi-bX.mjs} +2 -2
- package/dist/telemetry-C0k8vfbq.mjs +2 -0
- package/dist/telemetry-Dh-8kdfY.mjs +5 -0
- package/dist/{telemetry-PHe8XxA2.mjs → telemetry-IrDBqbQW.mjs} +1 -1
- package/dist/{tenant-BZ0ysR9L.mjs → tenant--UrYFHM0.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-DtKeyM5J.mjs → tenant-custom-nameservers-8Z4TVJtr.mjs} +1 -1
- package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
- package/dist/tools-DNGD0l7I.mjs +2 -0
- package/dist/{tunnels-D1tRWQQi.mjs → tunnels-5lGSXYpl.mjs} +15 -15
- package/dist/turnstile-CT3AkMPV.mjs +33 -0
- package/dist/ui-D1hhIDIs.mjs +5 -0
- package/dist/update-check-BYJnL8J8.mjs +2 -0
- package/dist/update-check-DFoSm5GT.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-BRA0XGT2.mjs → url-info-DvpNcNl8.mjs} +2 -2
- package/dist/{url-normalization-B6N2m5s6.mjs → url-normalization-C9URZnpq.mjs} +1 -1
- package/dist/{url-scanner-CeKkzkhe.mjs → url-scanner-CIwK3wB5.mjs} +8 -8
- package/dist/{user-CftksgmF.mjs → user-DGA7cqdf.mjs} +1 -1
- package/dist/{values-m7w9PX3o.mjs → values-BzS0b25w.mjs} +2 -2
- package/dist/{vectorize-BWBEtsgZ.mjs → vectorize-DtDjl2fJ.mjs} +15 -15
- package/dist/version-B47pK_PZ.mjs +2 -0
- package/dist/{waiting-rooms-BVZSYTNJ.mjs → waiting-rooms-CjTh4F3B.mjs} +25 -25
- package/dist/{web-assets-CLU5vAgP.mjs → web-assets-4l1B5V9b.mjs} +1 -1
- package/dist/{web3-Dkd4XRNH.mjs → web3-C0Z4AJjC.mjs} +1 -1
- package/dist/{workers-BQi4_SBS.mjs → workers-CNBv6GxE.mjs} +20 -20
- package/dist/{workers-builds-BgtPSDYJ.mjs → workers-builds-DYGeoxmX.mjs} +7 -7
- package/dist/{workers-for-platforms-actLCM6Q.mjs → workers-for-platforms-CSw0K8Nl.mjs} +11 -11
- package/dist/{workers-vpc-DjGfJgQn.mjs → workers-vpc-DJ7Couct.mjs} +6 -6
- package/dist/{workflows-Cm7WsAgB.mjs → workflows-Dm03QT8U.mjs} +20 -20
- package/dist/{zaraz-DurWe32F.mjs → zaraz-DJbWUUe3.mjs} +1 -1
- package/dist/zero-trust-DiMY-pN5.mjs +685 -0
- package/dist/{zone-B3AEAfcd.mjs → zone-BWjBv1yy.mjs} +1 -1
- package/dist/{zones-DiX5LoSU.mjs → zones-zGqcQvcY.mjs} +1 -1
- package/dist/zt-Bt4Q6iM1.mjs +110 -0
- package/package.json +13 -11
- package/dist/access-BVbIajYr.mjs +0 -27
- package/dist/auth-B9w55oRg.mjs +0 -2
- package/dist/auth-C80y97yu.mjs +0 -8
- package/dist/browser-extension-BRHJm3Qf.mjs +0 -15
- package/dist/build-BbjcJxKq.mjs +0 -2
- package/dist/build-DQh5-KK4.mjs +0 -2
- package/dist/cf-oadujOtC.mjs +0 -18
- package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
- package/dist/chunk-DL5FNmn1.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
- package/dist/client-certificates-DDisXoTE.mjs +0 -13
- package/dist/command-BP7ldws1.mjs +0 -2
- package/dist/command-BtNRBTP6.mjs +0 -2
- package/dist/command-CF0giIIc.mjs +0 -3
- package/dist/command-Ck9rbHA4.mjs +0 -2
- package/dist/dev-nsNxyg2D.mjs +0 -4
- package/dist/dialog-Dx4rRcKM.mjs +0 -2
- package/dist/dist-BDOzKthe.mjs +0 -48
- package/dist/dist-dc4E1u01.mjs +0 -272
- package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
- package/dist/dry-run-CLX6Pbtq.mjs +0 -2
- package/dist/error-sanitization-BkgUhGVc.mjs +0 -2
- package/dist/error-sanitization-DOlqWkNu.mjs +0 -2
- package/dist/firewall-BSMa9aH3.mjs +0 -56
- package/dist/interactive-B6woOLo-.mjs +0 -32
- package/dist/interactive-DnUvQHjc.mjs +0 -2
- package/dist/keyless-certificates-CtsCsbZ2.mjs +0 -13
- package/dist/local-BrfySqnx.mjs +0 -2
- package/dist/login-CAsRUF4c.mjs +0 -2
- package/dist/login-DaglE6WA.mjs +0 -5
- package/dist/mtls-certificates-AEuNOERQ.mjs +0 -13
- package/dist/oauth-C-QCVfWz.mjs +0 -14
- package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
- package/dist/output-Bia1u2k5.mjs +0 -2
- package/dist/precursor-jqeEG_mJ.mjs +0 -4
- package/dist/previews-Cg6lc24N.mjs +0 -4
- package/dist/progress-Bpp73hIu.mjs +0 -2
- package/dist/prompt-CpZztV8c.mjs +0 -3
- package/dist/raw-fetch-DxGs_eRm.mjs +0 -2
- package/dist/request-headers-DaXBfmVn.mjs +0 -2
- package/dist/resolve-BXemCSyA.mjs +0 -2
- package/dist/run-CSFE1qVX.mjs +0 -2
- package/dist/run-ChM_YpZ0.mjs +0 -2
- package/dist/schema-DCBb3Fcs.mjs +0 -2
- package/dist/shared-CtBkOWGN.mjs +0 -2
- package/dist/source-BR4_k2ad.mjs +0 -6
- package/dist/spawn-7IW1UyoH.mjs +0 -523
- package/dist/src-CNHNCZpy.mjs +0 -108
- package/dist/startup-profile-CYEokTVe.mjs +0 -2
- package/dist/startup-profile-CgWHy4rE.mjs +0 -17
- package/dist/state-DSzkxXML.mjs +0 -2
- package/dist/telemetry-CNt8H3aA.mjs +0 -2
- package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
- package/dist/tools-BMKpYraQ.mjs +0 -2
- package/dist/turnstile-DBa4_Vyz.mjs +0 -33
- package/dist/ui-DH95w1Qk.mjs +0 -5
- package/dist/undici-DTSBJHNS.mjs +0 -96
- package/dist/update-check-AAn7EXw8.mjs +0 -2
- package/dist/update-check-BbIXBq1o.mjs +0 -2
- package/dist/version-cPq-WKL8.mjs +0 -2
- package/dist/zero-trust-D8SVU8YZ.mjs +0 -795
- /package/dist/{Page-C-JHZnIy.mjs → Page-BchtVjAO.mjs} +0 -0
- /package/dist/{alerts-CstOk8n0.mjs → alerts-DY_7Nknx.mjs} +0 -0
- /package/dist/{autorag-PRTwXGgn.mjs → autorag-K396-M2S.mjs} +0 -0
- /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-BpPZBRMr.mjs} +0 -0
- /package/dist/{brands-BHRXlWDm.mjs → brands-Uy0Cmv1w.mjs} +0 -0
- /package/dist/{clear-UvKESVx3.mjs → clear-CpcO2ExU.mjs} +0 -0
- /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-B6tm-8uL.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-oguk5Zyj.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-B6zuxkr0.mjs} +0 -0
- /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-aiwP60Fo.mjs} +0 -0
- /package/dist/{health-CwPzzrV6.mjs → health-Bz33n-_F.mjs} +0 -0
- /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-D3e278L_.mjs} +0 -0
- /package/dist/{internal-WLHfxX64.mjs → internal-BHrJbbdA.mjs} +0 -0
- /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-Cyc3fmyN.mjs} +0 -0
- /package/dist/{live-D_k7eHdv.mjs → live-a01OfPf9.mjs} +0 -0
- /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
- /package/dist/{project-settings-DSXevRvj.mjs → project-settings-Bf6rReo1.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-Bw9qmxMx.mjs} +0 -0
- /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-CDm_xzKt.mjs} +0 -0
- /package/dist/{ready-CvwvbdTX.mjs → ready-BXGqY1Wi.mjs} +0 -0
- /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-AhGZD3a3.mjs} +0 -0
- /package/dist/{refute-CIAFMj00.mjs → refute-D_w5Gw20.mjs} +0 -0
- /package/dist/{resolve-CUDKxUrW.mjs → resolve-qPFfBMrn.mjs} +0 -0
- /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-BZzFam-Q.mjs} +0 -0
- /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-BPA8nSPM.mjs} +0 -0
- /package/dist/{search-12jA1b4l.mjs → search-De0UlXYN.mjs} +0 -0
- /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-ziDz9frX.mjs} +0 -0
- /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-83D2DCCG.mjs} +0 -0
- /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-Dhol31Kn.mjs} +0 -0
- /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-DoOPs6Vd.mjs} +0 -0
- /package/dist/{verify-CZW5Fo1q.mjs → verify-CxpGEnJb.mjs} +0 -0
|
@@ -1,138 +1,138 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{a as r,r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-BpPZBRMr.mjs";import{n as p}from"./input-validation-D3e278L_.mjs";import{a as m,i as h,n as g}from"./prompt-Mh69ni1N.mjs";import{n as _,t as ee}from"./raw-fetch-1ygCOcT_.mjs";function te(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
|
|
3
3
|
|
|
4
|
-
Create a DNS Protection rule for an account.`).option(`block-any-queries`,{type:`boolean`,description:`Whether to block DNS ANY queries. Optional. Defaults to true.`}).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`name`,{type:`string`,description:`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`profile-sensitivity`,{type:`string`,description:`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new DNS Protection rule to add.`})}const v={command:`create`,describe:`Create DNS Protection rule.`,builder:te,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
4
|
+
Create a DNS Protection rule for an account.`).option(`block-any-queries`,{type:`boolean`,description:`Whether to block DNS ANY queries. Optional. Defaults to true.`}).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`name`,{type:`string`,description:`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`profile-sensitivity`,{type:`string`,description:`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new DNS Protection rule to add.`})}const v={command:`create`,describe:`Create DNS Protection rule.`,builder:te,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({block_any_queries:r[`block-any-queries`],burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(r.name,`name`,`text`),profile_sensitivity:p(r[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...e,account_id:l})),{successLabel:`Created`});return}r[`burst-sensitivity`]===void 0&&(r[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.name===void 0&&(r.name=await m(`name`,`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),r[`profile-sensitivity`]===void 0&&(r[`profile-sensitivity`]=await m(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),r[`rate-sensitivity`]===void 0&&(r[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.scope===void 0&&(r.scope=await m(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let d=f({block_any_queries:r[`block-any-queries`],burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(r.name,`name`,`text`),profile_sensitivity:p(r[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...d,account_id:l})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete for account
|
|
5
5
|
|
|
6
|
-
Delete all DNS Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`account`,describe:`Delete all DNS Protection rules.`,builder:y,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
6
|
+
Delete all DNS Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`account`,describe:`Delete all DNS Protection rules.`,builder:y,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
7
7
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.delete.for.account({account_id:l})),{successLabel:`Deleted`})})},x={command:`for`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules.delete.for`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete protection rule <rule-id>
|
|
8
8
|
|
|
9
|
-
Delete a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to delete.`,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:`rule <rule-id>`,describe:`Delete DNS Protection rule.`,builder:S,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
9
|
+
Delete a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to delete.`,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:`rule <rule-id>`,describe:`Delete DNS Protection rule.`,builder:S,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
10
10
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.delete.protection.rule({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Deleted`})})},w={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules.delete.protection`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`delete`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules.delete`,builder:e=>e.command(x).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules get <rule-id>
|
|
11
11
|
|
|
12
|
-
Get a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <rule-id>`,describe:`Get DNS Protection rule.`,builder:E,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
12
|
+
Get a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <rule-id>`,describe:`Get DNS Protection rule.`,builder:E,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.get({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules list
|
|
13
13
|
|
|
14
|
-
List all DNS Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List all DNS Protection rules.`,builder:O,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
14
|
+
List all DNS Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List all DNS Protection rules.`,builder:O,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.magicTransit.advancedDnsProtection.configs.dns.protection.rules.list({account_id:u,...c})),{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules update <rule-id>
|
|
15
15
|
|
|
16
|
-
Update a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to update.`,demandOption:!0}).option(`block-any-queries`,{type:`boolean`,description:`The new value for whether to block DNS ANY queries. Optional.`}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`profile-sensitivity`,{type:`string`,description:`The new profile sensitivity. Optional. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the DNS Protection rule.`})}const j={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:A,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
16
|
+
Update a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to update.`,demandOption:!0}).option(`block-any-queries`,{type:`boolean`,description:`The new value for whether to block DNS ANY queries. Optional.`}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`profile-sensitivity`,{type:`string`,description:`The new profile sensitivity. Optional. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the DNS Protection rule.`})}const j={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:A,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({block_any_queries:r[`block-any-queries`],burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:p(r[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.update({...e,account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Updated`});return}let d=f({block_any_queries:r[`block-any-queries`],burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:p(r[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.update({...d,account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Updated`})})},M={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(v).command(D).command(k).command(j).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist create
|
|
17
17
|
|
|
18
|
-
Create an allowlist prefix for an account.`).option(`comment`,{type:`string`,description:`An comment describing the allowlist prefix.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable the allowlist prefix into effect.`}).option(`prefix`,{type:`string`,description:`The allowlist prefix to add in CIDR format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new allowlist prefix to create.`})}const R={command:`create`,describe:`Create allowlist prefix.`,builder:L,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist create`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
18
|
+
Create an allowlist prefix for an account.`).option(`comment`,{type:`string`,description:`An comment describing the allowlist prefix.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable the allowlist prefix into effect.`}).option(`prefix`,{type:`string`,description:`The allowlist prefix to add in CIDR format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new allowlist prefix to create.`})}const R={command:`create`,describe:`Create allowlist prefix.`,builder:L,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist create`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({comment:p(r.comment,`comment`,`text`),enabled:r.enabled,prefix:p(r.prefix,`prefix`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.create({...e,account_id:l})),{successLabel:`Created`});return}if(r.comment===void 0&&(r.comment=await m(`comment`,`An comment describing the allowlist prefix.`)),r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);r.prefix===void 0&&(r.prefix=await m(`prefix`,`The allowlist prefix to add in CIDR format.`));let d=f({comment:p(r.comment,`comment`,`text`),enabled:r.enabled,prefix:p(r.prefix,`prefix`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.create({...d,account_id:l})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist delete allowlist prefix <prefix-id>
|
|
19
19
|
|
|
20
|
-
Delete the allowlist prefix for an account given a UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`prefix <prefix-id>`,describe:`Delete allowlist prefix.`,builder:z,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist delete allowlist prefix`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist delete allowlist prefix`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
20
|
+
Delete the allowlist prefix for an account given a UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`prefix <prefix-id>`,describe:`Delete allowlist prefix.`,builder:z,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist delete allowlist prefix`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist delete allowlist prefix`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${r[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(r[`prefix-id`]))}`,pathParams:{"prefix-id":String(r[`prefix-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
21
21
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.delete.allowlist.prefix({account_id:l,prefix_id:r[`prefix-id`]})),{successLabel:`Deleted`})})},V={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist.delete.allowlist`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist delete for account
|
|
22
22
|
|
|
23
|
-
Delete all allowlist prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const U={command:`account`,describe:`Delete all allowlist prefixes.`,builder:H,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
23
|
+
Delete all allowlist prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const U={command:`account`,describe:`Delete all allowlist prefixes.`,builder:H,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
24
24
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.delete.for.account({account_id:l})),{successLabel:`Deleted`})})},W={command:`for`,describe:`Operations for advanced-tcp-protection.configs.allowlist.delete.for`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.allowlist.delete`,builder:e=>e.command(V).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist get <prefix-id>
|
|
25
25
|
|
|
26
|
-
Get an allowlist prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <prefix-id>`,describe:`Get allowlist prefix.`,builder:K,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
26
|
+
Get an allowlist prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <prefix-id>`,describe:`Get allowlist prefix.`,builder:K,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${r[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(r[`prefix-id`]))}`,pathParams:{"prefix-id":String(r[`prefix-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.get({account_id:l,prefix_id:r[`prefix-id`]})),{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist list
|
|
27
27
|
|
|
28
|
-
List all allowlist prefixes for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List all allowlist prefixes.`,builder:J,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
28
|
+
List all allowlist prefixes for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List all allowlist prefixes.`,builder:J,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.allowlist.list({account_id:u,...c})),{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist update <prefix-id>
|
|
29
29
|
|
|
30
|
-
Update an allowlist prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix to update.`,demandOption:!0}).option(`comment`,{type:`string`,description:`A comment describing the allowlist prefix. Optional.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable the allowlist prefix into effect. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the allowlist prefix.`})}const Z={command:`update <prefix-id>`,describe:`Update allowlist prefix.`,builder:X,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist update`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
30
|
+
Update an allowlist prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix to update.`,demandOption:!0}).option(`comment`,{type:`string`,description:`A comment describing the allowlist prefix. Optional.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable the allowlist prefix into effect. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the allowlist prefix.`})}const Z={command:`update <prefix-id>`,describe:`Update allowlist prefix.`,builder:X,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs allowlist update`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs allowlist update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${r[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(r[`prefix-id`]))}`,pathParams:{"prefix-id":String(r[`prefix-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({comment:p(r.comment,`comment`,`text`),enabled:r.enabled}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.update({...e,account_id:l,prefix_id:r[`prefix-id`]})),{successLabel:`Updated`});return}let d=f({comment:p(r.comment,`comment`,`text`),enabled:r.enabled});a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.update({...d,account_id:l,prefix_id:r[`prefix-id`]})),{successLabel:`Updated`})})},Q={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist`,builder:e=>e.command(R).command(q).command(Y).command(Z).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk create
|
|
31
31
|
|
|
32
|
-
Create multiple prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The list of new prefixes to create.`})}const re={command:`create`,describe:`Create multiple prefixes.`,builder:ne,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes bulk create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
32
|
+
Create multiple prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The list of new prefixes to create.`})}const re={command:`create`,describe:`Create multiple prefixes.`,builder:ne,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes bulk create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/bulk`,pathParams:{},bodyKind:`json`,body:r.body===void 0?void 0:u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.bulk.create({body:e,account_id:l})),{successLabel:`Created`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ie={command:`bulk`,describe:`Operations for advanced-tcp-protection.configs.prefixes.bulk`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes create
|
|
33
33
|
|
|
34
|
-
Create a prefix for an account.`).option(`comment`,{type:`string`,description:`A comment describing the prefix.`}).option(`excluded`,{type:`boolean`,description:`Whether to exclude the prefix from protection.`}).option(`prefix`,{type:`string`,description:`The prefix to add in CIDR format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new prefix to create.`})}const oe={command:`create`,describe:`Create prefix.`,builder:ae,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes create`,classification:{safeFlags:[`excluded`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
34
|
+
Create a prefix for an account.`).option(`comment`,{type:`string`,description:`A comment describing the prefix.`}).option(`excluded`,{type:`boolean`,description:`Whether to exclude the prefix from protection.`}).option(`prefix`,{type:`string`,description:`The prefix to add in CIDR format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new prefix to create.`})}const oe={command:`create`,describe:`Create prefix.`,builder:ae,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes create`,classification:{safeFlags:[`excluded`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({comment:p(r.comment,`comment`,`text`),excluded:r.excluded,prefix:p(r.prefix,`prefix`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.create({body:e,account_id:l})),{successLabel:`Created`});return}if(r.comment===void 0&&(r.comment=await m(`comment`,`A comment describing the prefix.`)),r.excluded===void 0)throw Error(`--excluded is required (or pass --body with this field set).`);r.prefix===void 0&&(r.prefix=await m(`prefix`,`The prefix to add in CIDR format.`));let d=f({comment:p(r.comment,`comment`,`text`),excluded:r.excluded,prefix:p(r.prefix,`prefix`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.create({body:d,account_id:l})),{successLabel:`Created`})})};function se(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes delete <prefix-id>
|
|
35
35
|
|
|
36
|
-
Delete the prefix for an account given a UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ce={command:`delete <prefix-id>`,describe:`Delete prefix.`,builder:se,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
36
|
+
Delete the prefix for an account given a UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ce={command:`delete <prefix-id>`,describe:`Delete prefix.`,builder:se,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${r[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(r[`prefix-id`]))}`,pathParams:{"prefix-id":String(r[`prefix-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
37
37
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.delete({account_id:l,prefix_id:r[`prefix-id`]})),{successLabel:`Deleted`})})};function le(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes get <prefix-id>
|
|
38
38
|
|
|
39
|
-
Get a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <prefix-id>`,describe:`Get prefix.`,builder:le,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
39
|
+
Get a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <prefix-id>`,describe:`Get prefix.`,builder:le,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${r[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(r[`prefix-id`]))}`,pathParams:{"prefix-id":String(r[`prefix-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.get({account_id:l,prefix_id:r[`prefix-id`]})),{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes list
|
|
40
40
|
|
|
41
|
-
List all prefixes for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`List all prefixes.`,builder:de,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
41
|
+
List all prefixes for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`List all prefixes.`,builder:de,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.prefixes.list({account_id:u,...c})),{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes update <prefix-id>
|
|
42
42
|
|
|
43
|
-
Update a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix to update.`,demandOption:!0}).option(`comment`,{type:`string`,description:`A new comment for the prefix. Optional.`}).option(`excluded`,{type:`boolean`,description:`Whether to exclude the prefix from protection. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the prefix.`})}const me={command:`update <prefix-id>`,describe:`Update prefix.`,builder:pe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes update`,classification:{safeFlags:[`excluded`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
43
|
+
Update a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix to update.`,demandOption:!0}).option(`comment`,{type:`string`,description:`A new comment for the prefix. Optional.`}).option(`excluded`,{type:`boolean`,description:`Whether to exclude the prefix from protection. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the prefix.`})}const me={command:`update <prefix-id>`,describe:`Update prefix.`,builder:pe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs prefixes update`,classification:{safeFlags:[`excluded`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs prefixes update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${r[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(r[`prefix-id`]))}`,pathParams:{"prefix-id":String(r[`prefix-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({comment:p(r.comment,`comment`,`text`),excluded:r.excluded}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.update({...e,account_id:l,prefix_id:r[`prefix-id`]})),{successLabel:`Updated`});return}let d=f({comment:p(r.comment,`comment`,`text`),excluded:r.excluded});a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.update({...d,account_id:l,prefix_id:r[`prefix-id`]})),{successLabel:`Updated`})})},he={command:`prefixes`,describe:`Operations for advanced-tcp-protection.configs.prefixes`,builder:e=>e.command(oe).command(ce).command(ue).command(fe).command(me).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ge(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters create
|
|
44
44
|
|
|
45
|
-
Create a SYN Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const _e={command:`create`,describe:`Create a SYN Protection filter.`,builder:ge,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
45
|
+
Create a SYN Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const _e={command:`create`,describe:`Create a SYN Protection filter.`,builder:ge,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({expression:p(r.expression,`expression`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.create({body:e,account_id:l})),{successLabel:`Created`});return}r.expression===void 0&&(r.expression=await m(`expression`,`The filter expression.`));let d=f({expression:p(r.expression,`expression`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.create({body:d,account_id:l})),{successLabel:`Created`})})};function ve(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete for account
|
|
46
46
|
|
|
47
|
-
Delete all SYN Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ye={command:`account`,describe:`Delete all SYN Protection filters.`,builder:ve,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
47
|
+
Delete all SYN Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ye={command:`account`,describe:`Delete all SYN Protection filters.`,builder:ve,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
48
48
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.delete.for.account({account_id:l})),{successLabel:`Deleted`})})},be={command:`for`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters.delete.for`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete protection filter <filter-id>
|
|
49
49
|
|
|
50
|
-
Delete a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,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:`filter <filter-id>`,describe:`Delete SYN Protection filter.`,builder:xe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters delete protection filter`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete protection filter`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
50
|
+
Delete a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,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:`filter <filter-id>`,describe:`Delete SYN Protection filter.`,builder:xe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters delete protection filter`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete protection filter`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${r[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(r[`filter-id`]))}`,pathParams:{"filter-id":String(r[`filter-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
51
51
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.delete.protection.filter({account_id:l,filter_id:r[`filter-id`]})),{successLabel:`Deleted`})})},Ce={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters.delete.protection`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},we={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters.delete`,builder:e=>e.command(be).command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Te(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters get <filter-id>
|
|
52
52
|
|
|
53
|
-
Get a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`get <filter-id>`,describe:`Get SYN Protection filter.`,builder:Te,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
53
|
+
Get a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`get <filter-id>`,describe:`Get SYN Protection filter.`,builder:Te,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${r[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(r[`filter-id`]))}`,pathParams:{"filter-id":String(r[`filter-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.get({account_id:l,filter_id:r[`filter-id`]})),{successLabel:`Loaded`})})};function De(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters list
|
|
54
54
|
|
|
55
|
-
List all SYN Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`list`,describe:`List all SYN Protection filters.`,builder:De,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={mode:r[`filter-mode`],page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
55
|
+
List all SYN Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`list`,describe:`List all SYN Protection filters.`,builder:De,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={mode:r[`filter-mode`],page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.syn.protection.filters.list({account_id:u,...c})),{successLabel:`Loaded`})})};function ke(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters update <filter-id>
|
|
56
56
|
|
|
57
|
-
Update a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const Ae={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:ke,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
57
|
+
Update a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const Ae={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:ke,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${r[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(r[`filter-id`]))}`,pathParams:{"filter-id":String(r[`filter-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({expression:p(r.expression,`expression`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.update({body:e,account_id:l,filter_id:r[`filter-id`]})),{successLabel:`Updated`});return}let d=f({expression:p(r.expression,`expression`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.update({body:d,account_id:l,filter_id:r[`filter-id`]})),{successLabel:`Updated`})})},je={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(_e).command(Ee).command(Oe).command(Ae).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Me(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules create
|
|
58
58
|
|
|
59
|
-
Create a SYN Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'.`}).option(`name`,{type:`string`,description:`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new SYN Protection rule to add.`})}const Ne={command:`create`,describe:`Create SYN Protection rule.`,builder:Me,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
59
|
+
Create a SYN Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'.`}).option(`name`,{type:`string`,description:`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new SYN Protection rule to add.`})}const Ne={command:`create`,describe:`Create SYN Protection rule.`,builder:Me,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(r[`mitigation-type`],`mitigation-type`,`text`),name:p(r.name,`name`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.create({...e,account_id:l})),{successLabel:`Created`});return}r[`burst-sensitivity`]===void 0&&(r[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.name===void 0&&(r.name=await m(`name`,`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),r[`rate-sensitivity`]===void 0&&(r[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.scope===void 0&&(r.scope=await m(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let d=f({burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(r[`mitigation-type`],`mitigation-type`,`text`),name:p(r.name,`name`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.create({...d,account_id:l})),{successLabel:`Created`})})};function Pe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete for account
|
|
60
60
|
|
|
61
|
-
Delete all SYN Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Fe={command:`account`,describe:`Delete all SYN Protection rules.`,builder:Pe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
61
|
+
Delete all SYN Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Fe={command:`account`,describe:`Delete all SYN Protection rules.`,builder:Pe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
62
62
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.delete.for.account({account_id:l})),{successLabel:`Deleted`})})},Ie={command:`for`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules.delete.for`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete protection rule <rule-id>
|
|
63
63
|
|
|
64
|
-
Delete a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to delete.`,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 Re={command:`rule <rule-id>`,describe:`Delete SYN Protection rule.`,builder:Le,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
64
|
+
Delete a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to delete.`,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 Re={command:`rule <rule-id>`,describe:`Delete SYN Protection rule.`,builder:Le,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
65
65
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.delete.protection.rule({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Deleted`})})},ze={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules.delete.protection`,builder:e=>e.command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules.delete`,builder:e=>e.command(Ie).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ve(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules get <rule-id>
|
|
66
66
|
|
|
67
|
-
Get a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const He={command:`get <rule-id>`,describe:`Get SYN Protection rule.`,builder:Ve,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
67
|
+
Get a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const He={command:`get <rule-id>`,describe:`Get SYN Protection rule.`,builder:Ve,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.get({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Loaded`})})};function Ue(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules list
|
|
68
68
|
|
|
69
|
-
List all SYN Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const We={command:`list`,describe:`List all SYN Protection rules.`,builder:Ue,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
69
|
+
List all SYN Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const We={command:`list`,describe:`List all SYN Protection rules.`,builder:Ue,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.syn.protection.rules.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Ge(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules update <rule-id>
|
|
70
70
|
|
|
71
|
-
Update a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The new mitigation type. Optional. Must be one of 'challenge' or 'retransmit'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The fields to update on the SYN Protection rule.`})}const Ke={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:Ge,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
71
|
+
Update a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The new mitigation type. Optional. Must be one of 'challenge' or 'retransmit'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The fields to update on the SYN Protection rule.`})}const Ke={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:Ge,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(r[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.update({...e,account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Updated`});return}let d=f({burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(r[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.update({...d,account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Updated`})})},qe={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(Ne).command(He).command(We).command(Ke).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Je={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(je).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ye={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters create
|
|
72
72
|
|
|
73
|
-
Create a TCP Flow Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const Ze={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:Xe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
73
|
+
Create a TCP Flow Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const Ze={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:Xe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({expression:p(r.expression,`expression`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.create({body:e,account_id:l})),{successLabel:`Created`});return}r.expression===void 0&&(r.expression=await m(`expression`,`The filter expression.`));let d=f({expression:p(r.expression,`expression`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.create({body:d,account_id:l})),{successLabel:`Created`})})};function Qe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete for account
|
|
74
74
|
|
|
75
|
-
Delete all TCP Flow Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $e={command:`account`,describe:`Delete all TCP Flow Protection filters.`,builder:Qe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
75
|
+
Delete all TCP Flow Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $e={command:`account`,describe:`Delete all TCP Flow Protection filters.`,builder:Qe,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
76
76
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.delete.for.account({account_id:l})),{successLabel:`Deleted`})})},et={command:`for`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters.delete.for`,builder:e=>e.command($e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete protection filter <filter-id>
|
|
77
77
|
|
|
78
|
-
Delete a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,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 nt={command:`filter <filter-id>`,describe:`Delete TCP Flow Protection filter.`,builder:tt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete protection filter`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete protection filter`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
78
|
+
Delete a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,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 nt={command:`filter <filter-id>`,describe:`Delete TCP Flow Protection filter.`,builder:tt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete protection filter`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete protection filter`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${r[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(r[`filter-id`]))}`,pathParams:{"filter-id":String(r[`filter-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
79
79
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.delete.protection.filter({account_id:l,filter_id:r[`filter-id`]})),{successLabel:`Deleted`})})},rt={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters.delete.protection`,builder:e=>e.command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},it={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters.delete`,builder:e=>e.command(et).command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function at(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters get <filter-id>
|
|
80
80
|
|
|
81
|
-
Get a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ot={command:`get <filter-id>`,describe:`Get TCP Flow Protection filter.`,builder:at,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
81
|
+
Get a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ot={command:`get <filter-id>`,describe:`Get TCP Flow Protection filter.`,builder:at,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${r[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(r[`filter-id`]))}`,pathParams:{"filter-id":String(r[`filter-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.get({account_id:l,filter_id:r[`filter-id`]})),{successLabel:`Loaded`})})};function st(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters list
|
|
82
82
|
|
|
83
|
-
List all TCP Flow Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ct={command:`list`,describe:`List all TCP Flow Protection filters.`,builder:st,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={mode:r[`filter-mode`],page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
83
|
+
List all TCP Flow Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ct={command:`list`,describe:`List all TCP Flow Protection filters.`,builder:st,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={mode:r[`filter-mode`],page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.list({account_id:u,...c})),{successLabel:`Loaded`})})};function lt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters update <filter-id>
|
|
84
84
|
|
|
85
|
-
Update a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const ut={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:lt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
85
|
+
Update a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const ut={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:lt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${r[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(r[`filter-id`]))}`,pathParams:{"filter-id":String(r[`filter-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({expression:p(r.expression,`expression`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.update({body:e,account_id:l,filter_id:r[`filter-id`]})),{successLabel:`Updated`});return}let d=f({expression:p(r.expression,`expression`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.update({body:d,account_id:l,filter_id:r[`filter-id`]})),{successLabel:`Updated`})})},dt={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(Ze).command(ot).command(ct).command(ut).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ft(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules create
|
|
86
86
|
|
|
87
|
-
Create a TCP Flow Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`name`,{type:`string`,description:`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the TCP Flow Protection rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new TCP Flow Protection rule.`})}const pt={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:ft,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
87
|
+
Create a TCP Flow Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`name`,{type:`string`,description:`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the TCP Flow Protection rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new TCP Flow Protection rule.`})}const pt={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:ft,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(r.name,`name`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.create({...e,account_id:l})),{successLabel:`Created`});return}r[`burst-sensitivity`]===void 0&&(r[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.name===void 0&&(r.name=await m(`name`,`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),r[`rate-sensitivity`]===void 0&&(r[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.scope===void 0&&(r.scope=await m(`scope`,`The scope for the TCP Flow Protection rule.`));let d=f({burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(r.name,`name`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.create({...d,account_id:l})),{successLabel:`Created`})})};function mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete for account
|
|
88
88
|
|
|
89
|
-
Delete all TCP Flow Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ht={command:`account`,describe:`Delete all TCP Flow Protection rules.`,builder:mt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
89
|
+
Delete all TCP Flow Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ht={command:`account`,describe:`Delete all TCP Flow Protection rules.`,builder:mt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
90
90
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.delete.for.account({account_id:l})),{successLabel:`Deleted`})})},gt={command:`for`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules.delete.for`,builder:e=>e.command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _t(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete protection rule <rule-id>
|
|
91
91
|
|
|
92
|
-
Delete a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to delete.`,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 vt={command:`rule <rule-id>`,describe:`Delete TCP Flow Protection rule.`,builder:_t,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
92
|
+
Delete a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to delete.`,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 vt={command:`rule <rule-id>`,describe:`Delete TCP Flow Protection rule.`,builder:_t,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
93
93
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.delete.protection.rule({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Deleted`})})},yt={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules.delete.protection`,builder:e=>e.command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bt={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules.delete`,builder:e=>e.command(gt).command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules get <rule-id>
|
|
94
94
|
|
|
95
|
-
Get a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const St={command:`get <rule-id>`,describe:`Get TCP Flow Protection rule.`,builder:xt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
95
|
+
Get a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const St={command:`get <rule-id>`,describe:`Get TCP Flow Protection rule.`,builder:xt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.get({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Loaded`})})};function Ct(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules list
|
|
96
96
|
|
|
97
|
-
List all TCP Flow Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wt={command:`list`,describe:`List all TCP Flow Protection rules.`,builder:Ct,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
97
|
+
List all TCP Flow Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wt={command:`list`,describe:`List all TCP Flow Protection rules.`,builder:Ct,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Tt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules update <rule-id>
|
|
98
98
|
|
|
99
|
-
Update a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the TCP Flow Protection rule.`})}const Et={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Tt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
99
|
+
Update a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the TCP Flow Protection rule.`})}const Et={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Tt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.update({...e,account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Updated`});return}let d=f({burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.update({...d,account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Updated`})})},Dt={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(pt).command(St).command(wt).command(Et).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ot={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command(dt).command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},kt={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function At(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
|
|
100
100
|
|
|
101
|
-
Get the protection status of the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jt={command:`get`,describe:`Get protection status.`,builder:At,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp protection status get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp protection status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
101
|
+
Get the protection status of the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jt={command:`get`,describe:`Get protection status.`,builder:At,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp protection status get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp protection status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.get({account_id:l})),{successLabel:`Loaded`})})};function Mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status update
|
|
102
102
|
|
|
103
|
-
Update the protection status of the account.`).option(`enabled`,{type:`boolean`,description:`Enables or disables protection.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The update to apply to the protection status.`})}const Nt={command:`update`,describe:`Update protection status.`,builder:Mt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp protection status update`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp protection status update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
103
|
+
Update the protection status of the account.`).option(`enabled`,{type:`boolean`,description:`Enables or disables protection.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The update to apply to the protection status.`})}const Nt={command:`update`,describe:`Update protection status.`,builder:Mt,handler:async r=>c({command:`magic-transit advanced-tcp-protection configs tcp protection status update`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-tcp-protection configs tcp protection status update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({enabled:r.enabled}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.update({...e,account_id:l})),{successLabel:`Updated`});return}if(r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=f({enabled:r.enabled});a(await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.update({...d,account_id:l})),{successLabel:`Updated`})})},Pt={command:`status`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection.status`,builder:e=>e.command(jt).command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ft={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection`,builder:e=>e.command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},It={command:`tcp`,describe:`Operations for advanced-tcp-protection.configs.tcp`,builder:e=>e.command(kt).command(Ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lt={command:`configs`,describe:`Operations for advanced-tcp-protection.configs`,builder:e=>e.command(Q).command(he).command(Ye).command(It).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Rt={command:`advanced-tcp-protection`,describe:`Advanced Tcp Protection operations`,builder:e=>e.command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zt(e){return e.usage(`$0 magic-transit apps create
|
|
104
104
|
|
|
105
|
-
Creates a new App for an account`).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Bt={command:`create`,describe:`Create a new App`,builder:zt,handler:async r=>c({command:`magic-transit apps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
105
|
+
Creates a new App for an account`).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Bt={command:`create`,describe:`Create a new App`,builder:zt,handler:async r=>c({command:`magic-transit apps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({hostnames:r.hostnames,name:p(r.name,`name`,`text`),type:p(r.type,`type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.apps.create({body:e,account_id:l})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await m(`name`,`Display name for the app.`)),r.type===void 0&&(r.type=await m(`type`,`Category of the app.`));let d=f({hostnames:r.hostnames,name:p(r.name,`name`,`text`),type:p(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.apps.create({body:d,account_id:l})),{successLabel:`Created`})})};function Vt(e){return e.usage(`$0 magic-transit apps delete <account-app-id>
|
|
106
106
|
|
|
107
|
-
Deletes specific Account App.`).positional(`account-app-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ht={command:`delete <account-app-id>`,describe:`Delete Account App`,builder:Vt,handler:async r=>c({command:`magic-transit apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
107
|
+
Deletes specific Account App.`).positional(`account-app-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ht={command:`delete <account-app-id>`,describe:`Delete Account App`,builder:Vt,handler:async r=>c({command:`magic-transit apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/apps/${r[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(r[`account-app-id`]))}`,pathParams:{"account-app-id":String(r[`account-app-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
108
108
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.apps.delete({account_id:l,account_app_id:r[`account-app-id`]})),{successLabel:`Deleted`})})};function Ut(e){return e.usage(`$0 magic-transit apps edit <account-app-id>
|
|
109
109
|
|
|
110
|
-
Updates an Account App`).positional(`account-app-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Wt={command:`edit <account-app-id>`,describe:`Update an App`,builder:Ut,handler:async r=>c({command:`magic-transit apps edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
110
|
+
Updates an Account App`).positional(`account-app-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Wt={command:`edit <account-app-id>`,describe:`Update an App`,builder:Ut,handler:async r=>c({command:`magic-transit apps edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/apps/${r[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(r[`account-app-id`]))}`,pathParams:{"account-app-id":String(r[`account-app-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({hostnames:r.hostnames,name:p(r.name,`name`,`text`),type:p(r.type,`type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.apps.edit({body:e,account_id:l,account_app_id:r[`account-app-id`]})),{successLabel:`Updated`});return}let d=f({hostnames:r.hostnames,name:p(r.name,`name`,`text`),type:p(r.type,`type`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.apps.edit({body:d,account_id:l,account_app_id:r[`account-app-id`]})),{successLabel:`Updated`})})};function Gt(e){return e.usage(`$0 magic-transit apps list
|
|
111
111
|
|
|
112
|
-
Lists Apps associated with an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kt={command:`list`,describe:`List Apps`,builder:Gt,handler:async r=>c({command:`magic-transit apps list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
112
|
+
Lists Apps associated with an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kt={command:`list`,describe:`List Apps`,builder:Gt,handler:async r=>c({command:`magic-transit apps list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.apps.list({account_id:l})),{successLabel:`Loaded`})})};function qt(e){return e.usage(`$0 magic-transit apps update <account-app-id>
|
|
113
113
|
|
|
114
|
-
Updates an Account App`).positional(`account-app-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Jt={command:`update <account-app-id>`,describe:`Update an App`,builder:qt,handler:async r=>c({command:`magic-transit apps update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
114
|
+
Updates an Account App`).positional(`account-app-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Jt={command:`update <account-app-id>`,describe:`Update an App`,builder:qt,handler:async r=>c({command:`magic-transit apps update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/apps/${r[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(r[`account-app-id`]))}`,pathParams:{"account-app-id":String(r[`account-app-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({hostnames:r.hostnames,name:p(r.name,`name`,`text`),type:p(r.type,`type`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.apps.update({body:e,account_id:l,account_app_id:r[`account-app-id`]})),{successLabel:`Updated`});return}let d=f({hostnames:r.hostnames,name:p(r.name,`name`,`text`),type:p(r.type,`type`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.apps.update({body:d,account_id:l,account_app_id:r[`account-app-id`]})),{successLabel:`Updated`})})},Yt={command:`apps`,describe:`Application-aware traffic policies for Magic WAN that steer traffic by app type`,builder:e=>e.command(Bt).command(Ht).command(Wt).command(Kt).command(Jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xt(e){return e.usage(`$0 magic-transit bgp-filter-profiles create
|
|
115
115
|
|
|
116
|
-
Creates a new BGP filter profile for an account.`).option(`description`,{type:`string`,description:`Description of the filter profile`,default:``}).option(`match-action`,{type:`string`,description:`Action to take when a route matches one of the targets in this profile`,choices:[`allow`,`deny`]}).option(`name`,{type:`string`,description:`Friendly name for the filter profile`}).option(`targets`,{type:`string`,array:!0,description:`List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: '{X,Y}' matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), '{X}' matches exactly length X (equivalent to {X,X}), '+' is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Zt={command:`create`,describe:`Create BGP Filter Profile`,builder:Xt,handler:async r=>c({command:`magic-transit bgp-filter-profiles create`,classification:{safeFlags:[`match-action`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
116
|
+
Creates a new BGP filter profile for an account.`).option(`description`,{type:`string`,description:`Description of the filter profile`,default:``}).option(`match-action`,{type:`string`,description:`Action to take when a route matches one of the targets in this profile`,choices:[`allow`,`deny`]}).option(`name`,{type:`string`,description:`Friendly name for the filter profile`}).option(`targets`,{type:`string`,array:!0,description:`List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: '{X,Y}' matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), '{X}' matches exactly length X (equivalent to {X,X}), '+' is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Zt={command:`create`,describe:`Create BGP Filter Profile`,builder:Xt,handler:async r=>c({command:`magic-transit bgp-filter-profiles create`,classification:{safeFlags:[`match-action`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),match_action:p(r[`match-action`],`match-action`,`text`),name:p(r.name,`name`,`text`),targets:r.targets}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.bgpFilterProfiles.create({...e,account_id:l})),{successLabel:`Created`});return}if(r[`match-action`]===void 0&&(r[`match-action`]=await h(`match-action`,`Action to take when a route matches one of the targets in this profile`,[`allow`,`deny`])),r.name===void 0&&(r.name=await m(`name`,`Friendly name for the filter profile`)),r.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=f({description:p(r.description,`description`,`text`),match_action:p(r[`match-action`],`match-action`,`text`),name:p(r.name,`name`,`text`),targets:r.targets});a(await s(`Creating`,async()=>c.magicTransit.bgpFilterProfiles.create({...d,account_id:l})),{successLabel:`Created`})})};function Qt(e){return e.usage(`$0 magic-transit bgp-filter-profiles delete <profile-id>
|
|
117
117
|
|
|
118
|
-
Deletes a BGP filter profile.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $t={command:`delete <profile-id>`,describe:`Delete BGP Filter Profile`,builder:Qt,handler:async r=>c({command:`magic-transit bgp-filter-profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
118
|
+
Deletes a BGP filter profile.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $t={command:`delete <profile-id>`,describe:`Delete BGP Filter Profile`,builder:Qt,handler:async r=>c({command:`magic-transit bgp-filter-profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/bgp/filter_profiles/${r[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(r[`profile-id`]))}`,pathParams:{"profile-id":String(r[`profile-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
119
119
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.bgpFilterProfiles.delete({account_id:l,profile_id:r[`profile-id`]})),{successLabel:`Deleted`})})};function en(e){return e.usage(`$0 magic-transit bgp-filter-profiles get <profile-id>
|
|
120
120
|
|
|
121
|
-
Gets a specific BGP filter profile for an account.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tn={command:`get <profile-id>`,describe:`Get BGP Filter Profile`,builder:en,handler:async r=>c({command:`magic-transit bgp-filter-profiles get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
121
|
+
Gets a specific BGP filter profile for an account.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tn={command:`get <profile-id>`,describe:`Get BGP Filter Profile`,builder:en,handler:async r=>c({command:`magic-transit bgp-filter-profiles get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/bgp/filter_profiles/${r[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(r[`profile-id`]))}`,pathParams:{"profile-id":String(r[`profile-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.bgpFilterProfiles.get({account_id:l,profile_id:r[`profile-id`]})),{successLabel:`Loaded`})})};function nn(e){return e.usage(`$0 magic-transit bgp-filter-profiles list
|
|
122
122
|
|
|
123
|
-
Lists all BGP filter profiles for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rn={command:`list`,describe:`List BGP Filter Profiles`,builder:nn,handler:async r=>c({command:`magic-transit bgp-filter-profiles list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
123
|
+
Lists all BGP filter profiles for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rn={command:`list`,describe:`List BGP Filter Profiles`,builder:nn,handler:async r=>c({command:`magic-transit bgp-filter-profiles list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.bgpFilterProfiles.list({account_id:l})),{successLabel:`Loaded`})})};function an(e){return e.usage(`$0 magic-transit bgp-filter-profiles update <profile-id>
|
|
124
124
|
|
|
125
|
-
Updates a BGP filter profile. Omitted properties are left unchanged. To clear an existing description send \`description: ""\`.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description of the filter profile`}).option(`match-action`,{type:`string`,description:`Action to take when a route matches one of the targets in this profile`,choices:[`allow`,`deny`]}).option(`name`,{type:`string`,description:`Friendly name for the filter profile`}).option(`targets`,{type:`string`,array:!0,description:`List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: '{X,Y}' matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), '{X}' matches exactly length X (equivalent to {X,X}), '+' is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:'Partial update for a BGP filter profile. At least one property must be provided; omitted properties are left unchanged. To clear an existing description send `description: ""`.'})}const on={command:`update <profile-id>`,describe:`Update BGP Filter Profile`,builder:an,handler:async r=>c({command:`magic-transit bgp-filter-profiles update`,classification:{safeFlags:[`match-action`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
125
|
+
Updates a BGP filter profile. Omitted properties are left unchanged. To clear an existing description send \`description: ""\`.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description of the filter profile`}).option(`match-action`,{type:`string`,description:`Action to take when a route matches one of the targets in this profile`,choices:[`allow`,`deny`]}).option(`name`,{type:`string`,description:`Friendly name for the filter profile`}).option(`targets`,{type:`string`,array:!0,description:`List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: '{X,Y}' matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), '{X}' matches exactly length X (equivalent to {X,X}), '+' is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:'Partial update for a BGP filter profile. At least one property must be provided; omitted properties are left unchanged. To clear an existing description send `description: ""`.'})}const on={command:`update <profile-id>`,describe:`Update BGP Filter Profile`,builder:an,handler:async r=>c({command:`magic-transit bgp-filter-profiles update`,classification:{safeFlags:[`match-action`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-filter-profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/bgp/filter_profiles/${r[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(r[`profile-id`]))}`,pathParams:{"profile-id":String(r[`profile-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),match_action:p(r[`match-action`],`match-action`,`text`),name:p(r.name,`name`,`text`),targets:r.targets}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.bgpFilterProfiles.update({...e,account_id:l,profile_id:r[`profile-id`]})),{successLabel:`Updated`});return}let d=f({description:p(r.description,`description`,`text`),match_action:p(r[`match-action`],`match-action`,`text`),name:p(r.name,`name`,`text`),targets:r.targets});a(await s(`Updating`,async()=>c.magicTransit.bgpFilterProfiles.update({...d,account_id:l,profile_id:r[`profile-id`]})),{successLabel:`Updated`})})},sn={command:`bgp-filter-profiles`,describe:`BGP filter profiles for controlling which routes are allowed or denied on Magic Transit tunnels`,builder:e=>e.command(Zt).command($t).command(tn).command(rn).command(on).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function cn(e){return e.usage(`$0 magic-transit bgp-settings get
|
|
126
126
|
|
|
127
|
-
Gets the BGP settings for an account, including the default ASN and redistribution configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ln={command:`get`,describe:`Get BGP Settings`,builder:cn,handler:async r=>c({command:`magic-transit bgp-settings get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
127
|
+
Gets the BGP settings for an account, including the default ASN and redistribution configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ln={command:`get`,describe:`Get BGP Settings`,builder:cn,handler:async r=>c({command:`magic-transit bgp-settings get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.bgpSettings.get({account_id:l})),{successLabel:`Loaded`})})};function un(e){return e.usage(`$0 magic-transit bgp-settings update
|
|
128
128
|
|
|
129
|
-
Modifies the BGP settings for an account, including the default ASN and redistribution configuration.`).option(`cloudflare-asn`,{type:`number`,description:`Route advertisements from Cloudflare to ramps in this account will use this ASN.`}).option(`redistribute-static:wan`,{type:`boolean`,description:`Redistribute static WAN routes into BGP`}).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 dn={command:`update`,describe:`Update BGP Settings`,builder:un,handler:async r=>c({command:`magic-transit bgp-settings update`,classification:{safeFlags:[`redistribute-static:wan`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
129
|
+
Modifies the BGP settings for an account, including the default ASN and redistribution configuration.`).option(`cloudflare-asn`,{type:`number`,description:`Route advertisements from Cloudflare to ramps in this account will use this ASN.`}).option(`redistribute-static:wan`,{type:`boolean`,description:`Redistribute static WAN routes into BGP`}).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 dn={command:`update`,describe:`Update BGP Settings`,builder:un,handler:async r=>c({command:`magic-transit bgp-settings update`,classification:{safeFlags:[`redistribute-static:wan`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit bgp-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({cloudflare_asn:r[`cloudflare-asn`],redistribute:{"static:wan":r[`redistribute-static:wan`]}}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.bgpSettings.update({...e,account_id:l})),{successLabel:`Updated`});return}let d=f({cloudflare_asn:r[`cloudflare-asn`],redistribute:{"static:wan":r[`redistribute-static:wan`]}});a(await s(`Updating`,async()=>c.magicTransit.bgpSettings.update({...d,account_id:l})),{successLabel:`Updated`})})},fn={command:`bgp-settings`,describe:`BGP settings for controlling default ASN and route redistribution on Magic Transit tunnels`,builder:e=>e.command(ln).command(dn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pn(e){return e.usage(`$0 magic-transit cf-interconnects bulk-update
|
|
130
130
|
|
|
131
|
-
Updates multiple interconnects associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).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 mn={command:`bulk-update`,describe:`Update multiple interconnects`,builder:pn,handler:async l=>c({command:`magic-transit cf-interconnects bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit cf-interconnects bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
131
|
+
Updates multiple interconnects associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).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 mn={command:`bulk-update`,describe:`Update multiple interconnects`,builder:pn,handler:async l=>c({command:`magic-transit cf-interconnects bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit cf-interconnects bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await i(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=u(l.body);a(await s(`Updating`,async()=>r(d,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(d,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})};function hn(e){return e.usage(`$0 magic-transit cf-interconnects get <cf-interconnect-id>
|
|
132
132
|
|
|
133
|
-
Lists details for a specific interconnect.`).positional(`cf-interconnect-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gn={command:`get <cf-interconnect-id>`,describe:`List interconnect Details`,builder:hn,handler:async l=>c({command:`magic-transit cf-interconnects get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit cf-interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
133
|
+
Lists details for a specific interconnect.`).positional(`cf-interconnect-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gn={command:`get <cf-interconnect-id>`,describe:`List interconnect Details`,builder:hn,handler:async l=>c({command:`magic-transit cf-interconnects get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit cf-interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf_interconnects/${l[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(l[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(l[`cf-interconnect-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/magic/cf_interconnects/${encodeURIComponent(String(l[`cf-interconnect-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function _n(e){return e.usage(`$0 magic-transit cf-interconnects list
|
|
134
134
|
|
|
135
|
-
Lists interconnects associated with an account.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vn={command:`list`,describe:`List interconnects`,builder:_n,handler:async l=>c({command:`magic-transit cf-interconnects list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit cf-interconnects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
135
|
+
Lists interconnects associated with an account.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vn={command:`list`,describe:`List interconnects`,builder:_n,handler:async l=>c({command:`magic-transit cf-interconnects list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit cf-interconnects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/magic/cf_interconnects`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function yn(e){return e.usage(`$0 magic-transit cf-interconnects update <cf-interconnect-id>
|
|
136
136
|
|
|
137
137
|
Updates a specific interconnect associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`cf-interconnect-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected."}).option(`bgp-as-no`,{type:`number`,description:`Deprecated. Use customer_asn.`}).option(`bgp-cloudflare-endpoint`,{type:`string`,description:`Read-only for v1.5; derived from interface_address.`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session.`}).option(`bgp-customer-endpoint`,{type:`string`,description:`Read-only for v1.5; derived from interface_address.`}).option(`bgp-export-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes advertised to the customer.`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table.`}).option(`bgp-import-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes received from the customer.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
138
138
|
|
|
@@ -154,29 +154,29 @@ use a /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix
|
|
|
154
154
|
may be used. Version 1.5 interconnects require a /31 prefix and may
|
|
155
155
|
also use a prefix from the account's authorized prefixes; otherwise,
|
|
156
156
|
select the subnet from RFC 1918 or the approved link-local ranges.
|
|
157
|
-
`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576.`}).option(`name`,{type:`string`,description:`The name of the interconnect. The name cannot share a name with other tunnels.`}).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 bn={command:`update <cf-interconnect-id>`,describe:`Update interconnect`,builder:yn,handler:async d=>c({command:`magic-transit cf-interconnects update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit cf-interconnects update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
157
|
+
`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576.`}).option(`name`,{type:`string`,description:`The name of the interconnect. The name cannot share a name with other tunnels.`}).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 bn={command:`update <cf-interconnect-id>`,describe:`Update interconnect`,builder:yn,handler:async d=>c({command:`magic-transit cf-interconnects update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit cf-interconnects update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf_interconnects/${d[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(d[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(d[`cf-interconnect-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{as_no:d[`bgp-as-no`],cloudflare_endpoint:p(d[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`),customer_asn:d[`bgp-customer-asn`],customer_endpoint:p(d[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`),export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},description:p(d.description,`description`,`text`),gre:{cloudflare_endpoint:p(d[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)},health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`),source:p(d[`health-check-source`],`health-check-source`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`)}):u(d.body)});return}let m=await i(d),h=d.local?e:await n();if(d.accountId=h,d.body){let e=u(d.body);a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${h}/magic/cf_interconnects/${encodeURIComponent(String(d[`cf-interconnect-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}let g={};d[`automatic-return-routing`]!==void 0&&l(g,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-as-no`]!==void 0&&l(g,[`bgp`,`as_no`],d[`bgp-as-no`]),d[`bgp-cloudflare-endpoint`]!==void 0&&l(g,[`bgp`,`cloudflare_endpoint`],p(d[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`)),d[`bgp-customer-asn`]!==void 0&&l(g,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-customer-endpoint`]!==void 0&&l(g,[`bgp`,`customer_endpoint`],p(d[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`)),d[`bgp-export-filter-id`]!==void 0&&l(g,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(g,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(g,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(g,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d.description!==void 0&&l(g,[`description`],p(d.description,`description`,`text`)),d[`gre-cloudflare-endpoint`]!==void 0&&l(g,[`gre`,`cloudflare_endpoint`],p(d[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)),d[`health-check-enabled`]!==void 0&&l(g,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(g,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(g,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(g,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(g,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`health-check-source`]!==void 0&&l(g,[`health_check`,`source`],p(d[`health-check-source`],`health-check-source`,`text`)),d[`interface-address`]!==void 0&&l(g,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(g,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(g,[`mtu`],d.mtu),d.name!==void 0&&l(g,[`name`],p(d.name,`name`,`text`)),a(await s(`Updating`,async()=>r(m,`PUT`,`/accounts/${h}/magic/cf_interconnects/${encodeURIComponent(String(d[`cf-interconnect-id`]))}`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})},xn={command:`cf-interconnects`,describe:`Cloudflare Network Interconnect (CNI) links for direct physical or virtual peering`,builder:e=>e.command(mn).command(gn).command(vn).command(bn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Sn(e){return e.usage(`$0 magic-transit cf1-sites create
|
|
158
158
|
|
|
159
|
-
Creates new CF1 Sites for an account. Each site must have a unique name within the account.`).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 Cn={command:`create`,describe:`Create CF1 Sites`,builder:Sn,handler:async r=>c({command:`magic-transit cf1-sites create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
159
|
+
Creates new CF1 Sites for an account. Each site must have a unique name within the account.`).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 Cn={command:`create`,describe:`Create CF1 Sites`,builder:Sn,handler:async r=>c({command:`magic-transit cf1-sites create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`json`,body:r.body===void 0?void 0:u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.cf1Sites.create({body:e,account_id:l})),{successLabel:`Created`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function wn(e){return e.usage(`$0 magic-transit cf1-sites delete <cf1-site-id>
|
|
160
160
|
|
|
161
|
-
Deletes a specific CF1 Site for an account.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Tn={command:`delete <cf1-site-id>`,describe:`Delete CF1 Site`,builder:wn,handler:async r=>c({command:`magic-transit cf1-sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
161
|
+
Deletes a specific CF1 Site for an account.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Tn={command:`delete <cf1-site-id>`,describe:`Delete CF1 Site`,builder:wn,handler:async r=>c({command:`magic-transit cf1-sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites/${r[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(r[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(r[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
162
162
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.cf1Sites.delete({account_id:l,cf1_site_id:r[`cf1-site-id`]})),{successLabel:`Deleted`})})};function En(e){return e.usage(`$0 magic-transit cf1-sites get <cf1-site-id>
|
|
163
163
|
|
|
164
|
-
Gets a specific CF1 Site for an account.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dn={command:`get <cf1-site-id>`,describe:`Get CF1 Site`,builder:En,handler:async r=>c({command:`magic-transit cf1-sites get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
164
|
+
Gets a specific CF1 Site for an account.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dn={command:`get <cf1-site-id>`,describe:`Get CF1 Site`,builder:En,handler:async r=>c({command:`magic-transit cf1-sites get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites/${r[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(r[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(r[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.cf1Sites.get({account_id:l,cf1_site_id:r[`cf1-site-id`]})),{successLabel:`Loaded`})})};function On(e){return e.usage(`$0 magic-transit cf1-sites list
|
|
165
165
|
|
|
166
|
-
Lists CF1 Sites associated with an account. A CF1 Site represents a physical customer network location with optional geographic coordinates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kn={command:`list`,describe:`List CF1 Sites`,builder:On,handler:async r=>c({command:`magic-transit cf1-sites list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
166
|
+
Lists CF1 Sites associated with an account. A CF1 Site represents a physical customer network location with optional geographic coordinates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kn={command:`list`,describe:`List CF1 Sites`,builder:On,handler:async r=>c({command:`magic-transit cf1-sites list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.cf1Sites.list({account_id:l})),{successLabel:`Loaded`})})};function An(e){return e.usage(`$0 magic-transit cf1-sites ramps create <cf1-site-id>
|
|
167
167
|
|
|
168
|
-
Creates ramps (network connections) for a CF1 Site.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const jn={command:`create <cf1-site-id>`,describe:`Create CF1 Site Ramps`,builder:An,handler:async r=>c({command:`magic-transit cf1-sites ramps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
168
|
+
Creates ramps (network connections) for a CF1 Site.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const jn={command:`create <cf1-site-id>`,describe:`Create CF1 Site Ramps`,builder:An,handler:async r=>c({command:`magic-transit cf1-sites ramps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites/${r[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(r[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(r[`cf1-site-id`]??``)},bodyKind:`json`,body:r.body===void 0?void 0:u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.cf1Sites.ramps.create({body:e,account_id:l,cf1_site_id:r[`cf1-site-id`]})),{successLabel:`Created`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Mn(e){return e.usage(`$0 magic-transit cf1-sites ramps delete <ramp-id>
|
|
169
169
|
|
|
170
|
-
Deletes a specific ramp from a CF1 Site.`).positional(`ramp-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Nn={command:`delete <ramp-id>`,describe:`Delete CF1 Site Ramp`,builder:Mn,handler:async r=>c({command:`magic-transit cf1-sites ramps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
170
|
+
Deletes a specific ramp from a CF1 Site.`).positional(`ramp-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Nn={command:`delete <ramp-id>`,describe:`Delete CF1 Site Ramp`,builder:Mn,handler:async r=>c({command:`magic-transit cf1-sites ramps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites/${r[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(r[`cf1-site-id`]))}/ramps/${r[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(r[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(r[`cf1-site-id`]??``),"ramp-id":String(r[`ramp-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
171
171
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.cf1Sites.ramps.delete({account_id:l,cf1_site_id:r[`cf1-site-id`],ramp_id:r[`ramp-id`]})),{successLabel:`Deleted`})})};function Pn(e){return e.usage(`$0 magic-transit cf1-sites ramps get <ramp-id>
|
|
172
172
|
|
|
173
|
-
Gets a specific ramp for a CF1 Site.`).positional(`ramp-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fn={command:`get <ramp-id>`,describe:`Get CF1 Site Ramp`,builder:Pn,handler:async r=>c({command:`magic-transit cf1-sites ramps get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
173
|
+
Gets a specific ramp for a CF1 Site.`).positional(`ramp-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fn={command:`get <ramp-id>`,describe:`Get CF1 Site Ramp`,builder:Pn,handler:async r=>c({command:`magic-transit cf1-sites ramps get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites/${r[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(r[`cf1-site-id`]))}/ramps/${r[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(r[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(r[`cf1-site-id`]??``),"ramp-id":String(r[`ramp-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.cf1Sites.ramps.get({account_id:l,cf1_site_id:r[`cf1-site-id`],ramp_id:r[`ramp-id`]})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 magic-transit cf1-sites ramps list
|
|
174
174
|
|
|
175
|
-
Lists ramps (network connections) associated with a CF1 Site. Ramps represent GRE tunnels, IPsec tunnels, interconnects, or MCONN links.`).option(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const In={command:`list`,describe:`List CF1 Site Ramps`,builder:$,handler:async r=>c({command:`magic-transit cf1-sites ramps list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
175
|
+
Lists ramps (network connections) associated with a CF1 Site. Ramps represent GRE tunnels, IPsec tunnels, interconnects, or MCONN links.`).option(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const In={command:`list`,describe:`List CF1 Site Ramps`,builder:$,handler:async r=>c({command:`magic-transit cf1-sites ramps list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites/${r[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(r[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(r[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.cf1Sites.ramps.list({account_id:l,cf1_site_id:r[`cf1-site-id`]})),{successLabel:`Loaded`})})},Ln={command:`ramps`,describe:`Operations for cf1-sites.ramps`,builder:e=>e.command(jn).command(Nn).command(Fn).command(In).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Rn(e){return e.usage(`$0 magic-transit cf1-sites update <cf1-site-id>
|
|
176
176
|
|
|
177
|
-
Partially updates a specific CF1 Site for an account. Only the fields included in the request body are modified; omitted fields retain their existing values.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`A human-provided description of the CF1 Site.`}).option(`location-lat`,{type:`number`,description:`Latitude of the CF1 Site.`}).option(`location-long`,{type:`number`,description:`Longitude of the CF1 Site.`}).option(`location-name`,{type:`string`,description:`Name of nearest town, city, or village.`}).option(`name`,{type:`string`,description:`A human-provided name describing the CF1 Site that should be unique within the account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update payload for a CF1 Site. All properties are optional; only fields supplied in the request body are modified.`})}const zn={command:`update <cf1-site-id>`,describe:`Update CF1 Site`,builder:Rn,handler:async r=>c({command:`magic-transit cf1-sites update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
177
|
+
Partially updates a specific CF1 Site for an account. Only the fields included in the request body are modified; omitted fields retain their existing values.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`A human-provided description of the CF1 Site.`}).option(`location-lat`,{type:`number`,description:`Latitude of the CF1 Site.`}).option(`location-long`,{type:`number`,description:`Longitude of the CF1 Site.`}).option(`location-name`,{type:`string`,description:`Name of nearest town, city, or village.`}).option(`name`,{type:`string`,description:`A human-provided name describing the CF1 Site that should be unique within the account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update payload for a CF1 Site. All properties are optional; only fields supplied in the request body are modified.`})}const zn={command:`update <cf1-site-id>`,describe:`Update CF1 Site`,builder:Rn,handler:async r=>c({command:`magic-transit cf1-sites update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit cf1-sites update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/cf1_sites/${r[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(r[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(r[`cf1-site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),location:{lat:r[`location-lat`],long:r[`location-long`],name:p(r[`location-name`],`location-name`,`text`)},name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.cf1Sites.update({...e,account_id:l,cf1_site_id:r[`cf1-site-id`]})),{successLabel:`Updated`});return}let d=f({description:p(r.description,`description`,`text`),location:{lat:r[`location-lat`],long:r[`location-long`],name:p(r[`location-name`],`location-name`,`text`)},name:p(r.name,`name`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.cf1Sites.update({...d,account_id:l,cf1_site_id:r[`cf1-site-id`]})),{successLabel:`Updated`})})},Bn={command:`cf1-sites`,describe:`Operations for cf1-sites`,builder:e=>e.command(Cn).command(Tn).command(Dn).command(kn).command(zn).command(Ln).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Vn(e){return e.usage(`$0 magic-transit gre-tunnels bulk-update
|
|
178
178
|
|
|
179
|
-
Updates multiple GRE tunnels. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).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 Hn={command:`bulk-update`,describe:`Update multiple GRE tunnels`,builder:Vn,handler:async l=>c({command:`magic-transit gre-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit gre-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
179
|
+
Updates multiple GRE tunnels. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).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 Hn={command:`bulk-update`,describe:`Update multiple GRE tunnels`,builder:Vn,handler:async l=>c({command:`magic-transit gre-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit gre-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await i(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=u(l.body);a(await s(`Updating`,async()=>r(d,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(d,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})};function Un(e){return e.usage(`$0 magic-transit gre-tunnels create
|
|
180
180
|
|
|
181
181
|
Creates a new GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected.",default:!1}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-export-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes advertised to the customer.`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table.`}).option(`bgp-import-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes received from the customer.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
182
182
|
|
|
@@ -193,18 +193,18 @@ character:
|
|
|
193
193
|
In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
|
|
194
194
|
quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
|
|
195
195
|
(0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
|
|
196
|
-
these disallowed characters will be rejected.`}).option(`cloudflare-gre-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel.`}).option(`customer-gre-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the GRE tunnel.`}).option(`description`,{type:`string`,description:`An optional description of the GRE tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`,default:1476}).option(`name`,{type:`string`,description:`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`}).option(`ttl`,{type:`number`,description:`Time To Live (TTL) in number of hops of the GRE tunnel.`,default:64}).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-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].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 Wn={command:`create`,describe:`Create a GRE tunnel`,builder:Un,handler:async d=>c({command:`magic-transit gre-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
196
|
+
these disallowed characters will be rejected.`}).option(`cloudflare-gre-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel.`}).option(`customer-gre-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the GRE tunnel.`}).option(`description`,{type:`string`,description:`An optional description of the GRE tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`,default:1476}).option(`name`,{type:`string`,description:`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`}).option(`ttl`,{type:`number`,description:`Time To Live (TTL) in number of hops of the GRE tunnel.`,default:64}).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-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].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 Wn={command:`create`,describe:`Create a GRE tunnel`,builder:Un,handler:async d=>c({command:`magic-transit gre-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`),ttl:d.ttl}):u(d.body)});return}let h=await i(d),g=d.local?e:await n();if(d.accountId=g,d.body){let e=u(d.body);a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/magic/gre_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}d[`cloudflare-gre-endpoint`]===void 0&&(d[`cloudflare-gre-endpoint`]=await m(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),d[`customer-gre-endpoint`]===void 0&&(d[`customer-gre-endpoint`]=await m(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),d.name===void 0&&(d.name=await m(`name`,`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`));let _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-gre-endpoint`]!==void 0&&l(_,[`cloudflare_gre_endpoint`],p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),d[`customer-gre-endpoint`]!==void 0&&l(_,[`customer_gre_endpoint`],p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(_,[`mtu`],d.mtu),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.ttl!==void 0&&l(_,[`ttl`],d.ttl),a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/magic/gre_tunnels`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function Gn(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
|
|
197
197
|
|
|
198
|
-
Disables and removes a specific static GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).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 Kn={command:`delete <gre-tunnel-id>`,describe:`Delete GRE Tunnel`,builder:Gn,handler:async l=>c({command:`magic-transit gre-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit gre-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
198
|
+
Disables and removes a specific static GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).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 Kn={command:`delete <gre-tunnel-id>`,describe:`Delete GRE Tunnel`,builder:Gn,handler:async l=>c({command:`magic-transit gre-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit gre-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/gre_tunnels/${l[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(l[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(l[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,!await g({force:!!l.force})){process.stderr.write(`Aborted.
|
|
199
199
|
`);return}a(await s(`Deleting`,async()=>r(u,`DELETE`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(l[`gre-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function qn(e){return e.usage(`$0 magic-transit gre-tunnels get <gre-tunnel-id>
|
|
200
200
|
|
|
201
|
-
Lists informtion for a specific GRE tunnel.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jn={command:`get <gre-tunnel-id>`,describe:`List GRE Tunnel Details`,builder:qn,handler:async l=>c({command:`magic-transit gre-tunnels get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit gre-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
201
|
+
Lists informtion for a specific GRE tunnel.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jn={command:`get <gre-tunnel-id>`,describe:`List GRE Tunnel Details`,builder:qn,handler:async l=>c({command:`magic-transit gre-tunnels get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit gre-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/gre_tunnels/${l[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(l[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(l[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(l[`gre-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function Yn(e){return e.usage(`$0 magic-transit gre-tunnels list
|
|
202
202
|
|
|
203
|
-
Lists GRE tunnels associated with an account.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xn={command:`list`,describe:`List GRE tunnels`,builder:Yn,handler:async l=>c({command:`magic-transit gre-tunnels list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit gre-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
203
|
+
Lists GRE tunnels associated with an account.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xn={command:`list`,describe:`List GRE tunnels`,builder:Yn,handler:async l=>c({command:`magic-transit gre-tunnels list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit gre-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/magic/gre_tunnels`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function Zn(e){return e.usage(`$0 magic-transit gre-tunnels update <gre-tunnel-id>
|
|
204
204
|
|
|
205
|
-
Updates a specific GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected."}).option(`cloudflare-gre-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel.`}).option(`customer-gre-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the GRE tunnel.`}).option(`description`,{type:`string`,description:`An optional description of the GRE tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`}).option(`name`,{type:`string`,description:`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`}).option(`ttl`,{type:`number`,description:`Time To Live (TTL) in number of hops of the GRE 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 Qn={command:`update <gre-tunnel-id>`,describe:`Update GRE Tunnel`,builder:Zn,handler:async d=>c({command:`magic-transit gre-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit gre-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
205
|
+
Updates a specific GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected."}).option(`cloudflare-gre-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel.`}).option(`customer-gre-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the GRE tunnel.`}).option(`description`,{type:`string`,description:`An optional description of the GRE tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`}).option(`name`,{type:`string`,description:`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`}).option(`ttl`,{type:`number`,description:`Time To Live (TTL) in number of hops of the GRE 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 Qn={command:`update <gre-tunnel-id>`,describe:`Update GRE Tunnel`,builder:Zn,handler:async d=>c({command:`magic-transit gre-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit gre-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/gre_tunnels/${d[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(d[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(d[`gre-tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],cloudflare_gre_endpoint:p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`),ttl:d.ttl}):u(d.body)});return}let h=await i(d),g=d.local?e:await n();if(d.accountId=g,d.body){let e=u(d.body);a(await s(`Updating`,async()=>r(h,`PUT`,`/accounts/${g}/magic/gre_tunnels/${encodeURIComponent(String(d[`gre-tunnel-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}d[`cloudflare-gre-endpoint`]===void 0&&(d[`cloudflare-gre-endpoint`]=await m(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),d[`customer-gre-endpoint`]===void 0&&(d[`customer-gre-endpoint`]=await m(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),d.name===void 0&&(d.name=await m(`name`,`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`));let _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`cloudflare-gre-endpoint`]!==void 0&&l(_,[`cloudflare_gre_endpoint`],p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),d[`customer-gre-endpoint`]!==void 0&&l(_,[`customer_gre_endpoint`],p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(_,[`mtu`],d.mtu),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.ttl!==void 0&&l(_,[`ttl`],d.ttl),a(await s(`Updating`,async()=>r(h,`PUT`,`/accounts/${g}/magic/gre_tunnels/${encodeURIComponent(String(d[`gre-tunnel-id`]))}`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})},$n={command:`gre-tunnels`,describe:`GRE tunnel endpoints that connect your network to Cloudflare for Magic Transit`,builder:e=>e.command(Hn).command(Wn).command(Kn).command(Jn).command(Xn).command(Qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function er(e){return e.usage(`$0 magic-transit ipsec-tunnels bulk-update
|
|
206
206
|
|
|
207
|
-
Update multiple IPsec tunnels associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).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 tr={command:`bulk-update`,describe:`Update multiple IPsec tunnels`,builder:er,handler:async l=>c({command:`magic-transit ipsec-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit ipsec-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
207
|
+
Update multiple IPsec tunnels associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).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 tr={command:`bulk-update`,describe:`Update multiple IPsec tunnels`,builder:er,handler:async l=>c({command:`magic-transit ipsec-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit ipsec-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await i(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=u(l.body);a(await s(`Updating`,async()=>r(d,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(d,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})};function nr(e){return e.usage(`$0 magic-transit ipsec-tunnels create
|
|
208
208
|
|
|
209
209
|
Creates a new IPsec tunnel associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected.",default:!1}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-export-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes advertised to the customer.`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table.`}).option(`bgp-import-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes received from the customer.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
210
210
|
|
|
@@ -228,18 +228,18 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
|
|
|
228
228
|
|
|
229
229
|
This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
|
|
230
230
|
fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
|
|
231
|
-
cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.",default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].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 rr={command:`create`,describe:`Create an IPsec tunnel`,builder:nr,handler:async d=>c({command:`magic-transit ipsec-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
231
|
+
cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.",default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].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 rr={command:`create`,describe:`Create an IPsec tunnel`,builder:nr,handler:async d=>c({command:`magic-transit ipsec-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:p(d[`customer-endpoint`],`customer-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),name:p(d.name,`name`,`text`),psk:p(d.psk,`psk`,`text`),replay_protection:d[`replay-protection`]}):u(d.body)});return}let h=await i(d),g=d.local?e:await n();if(d.accountId=g,d.body){let e=u(d.body);a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}d[`cloudflare-endpoint`]===void 0&&(d[`cloudflare-endpoint`]=await m(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),d.name===void 0&&(d.name=await m(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-endpoint`]!==void 0&&l(_,[`cloudflare_endpoint`],p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),d[`custom-remote-identities-fqdn-id`]!==void 0&&l(_,[`custom_remote_identities`,`fqdn_id`],p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),d[`customer-endpoint`]!==void 0&&l(_,[`customer_endpoint`],p(d[`customer-endpoint`],`customer-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.psk!==void 0&&l(_,[`psk`],p(d.psk,`psk`,`text`)),d[`replay-protection`]!==void 0&&l(_,[`replay_protection`],d[`replay-protection`]),a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/magic/ipsec_tunnels`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function ir(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
|
|
232
232
|
|
|
233
|
-
Disables and removes a specific static IPsec Tunnel associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).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 ar={command:`delete <ipsec-tunnel-id>`,describe:`Delete IPsec Tunnel`,builder:ir,handler:async l=>c({command:`magic-transit ipsec-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit ipsec-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
233
|
+
Disables and removes a specific static IPsec Tunnel associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).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 ar={command:`delete <ipsec-tunnel-id>`,describe:`Delete IPsec Tunnel`,builder:ir,handler:async l=>c({command:`magic-transit ipsec-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit ipsec-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/ipsec_tunnels/${l[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(l[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();if(l.accountId=d,!await g({force:!!l.force})){process.stderr.write(`Aborted.
|
|
234
234
|
`);return}a(await s(`Deleting`,async()=>r(u,`DELETE`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function or(e){return e.usage(`$0 magic-transit ipsec-tunnels get <ipsec-tunnel-id>
|
|
235
235
|
|
|
236
|
-
Lists details for a specific IPsec tunnel.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sr={command:`get <ipsec-tunnel-id>`,describe:`List IPsec tunnel details`,builder:or,handler:async l=>c({command:`magic-transit ipsec-tunnels get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit ipsec-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
236
|
+
Lists details for a specific IPsec tunnel.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sr={command:`get <ipsec-tunnel-id>`,describe:`List IPsec tunnel details`,builder:or,handler:async l=>c({command:`magic-transit ipsec-tunnels get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit ipsec-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/ipsec_tunnels/${l[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(l[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function cr(e){return e.usage(`$0 magic-transit ipsec-tunnels list
|
|
237
237
|
|
|
238
|
-
Lists IPsec tunnels associated with an account.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lr={command:`list`,describe:`List IPsec tunnels`,builder:cr,handler:async l=>c({command:`magic-transit ipsec-tunnels list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit ipsec-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
238
|
+
Lists IPsec tunnels associated with an account.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lr={command:`list`,describe:`List IPsec tunnels`,builder:cr,handler:async l=>c({command:`magic-transit ipsec-tunnels list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit ipsec-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function ur(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-generate <ipsec-tunnel-id>
|
|
239
239
|
|
|
240
|
-
Generates a Pre-Shared Key for a specific IPsec tunnel used in the IKE session. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes. After a PSK is generated, the PSK is immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSK in a safe place.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dr={command:`psk-generate <ipsec-tunnel-id>`,describe:`Generate Pre-Shared Key (PSK) for IPsec tunnels`,builder:ur,handler:async r=>c({command:`magic-transit ipsec-tunnels psk-generate`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit ipsec-tunnels psk-generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
240
|
+
Generates a Pre-Shared Key for a specific IPsec tunnel used in the IKE session. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes. After a PSK is generated, the PSK is immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSK in a safe place.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dr={command:`psk-generate <ipsec-tunnel-id>`,describe:`Generate Pre-Shared Key (PSK) for IPsec tunnels`,builder:ur,handler:async r=>c({command:`magic-transit ipsec-tunnels psk-generate`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit ipsec-tunnels psk-generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/ipsec_tunnels/${r[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(r[`ipsec-tunnel-id`]))}/psk_generate`,pathParams:{"ipsec-tunnel-id":String(r[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Creating`,async()=>c.magicTransit.ipsecTunnels.pskGenerate({account_id:l,ipsec_tunnel_id:r[`ipsec-tunnel-id`]})),{successLabel:`Created`})})};function fr(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-set
|
|
241
241
|
|
|
242
|
-
Sets Pre-Shared Keys for multiple IPsec tunnels associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes. After PSKs are applied, they are immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSKs in a safe place.`).option(`validate-only`,{type:`boolean`,description:"If `true`, only run validation without persisting changes."}).option(`psks`,{type:`string`,description:`List of tunnel ID and PSK pairs. 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:`Request body for setting PSKs for multiple IPsec tunnels.`})}const pr={command:`psk-set`,describe:`Set Pre-Shared Keys (PSK) for IPsec tunnels`,builder:fr,handler:async r=>c({command:`magic-transit ipsec-tunnels psk-set`,classification:{safeFlags:[`validate-only`,`dry-run`]}},r,async()=>{let c={validate_only:r[`validate-only`]};if(r.dryRun){o({command:`cf magic-transit ipsec-tunnels psk-set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
242
|
+
Sets Pre-Shared Keys for multiple IPsec tunnels associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes. After PSKs are applied, they are immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSKs in a safe place.`).option(`validate-only`,{type:`boolean`,description:"If `true`, only run validation without persisting changes."}).option(`psks`,{type:`string`,description:`List of tunnel ID and PSK pairs. 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:`Request body for setting PSKs for multiple IPsec tunnels.`})}const pr={command:`psk-set`,describe:`Set Pre-Shared Keys (PSK) for IPsec tunnels`,builder:fr,handler:async r=>c({command:`magic-transit ipsec-tunnels psk-set`,classification:{safeFlags:[`validate-only`,`dry-run`]}},r,async()=>{let c={validate_only:r[`validate-only`]};if(r.dryRun){o({command:`cf magic-transit ipsec-tunnels psk-set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/ipsec_tunnels/psk`,pathParams:{},query:c,bodyKind:`json`,body:r.body===void 0?f({psks:d(r.psks,`psks`)}):u(r.body)});return}let l=await i(r),p=r.local?e:await n();if(r.accountId=p,r.body){let e=u(r.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>l.magicTransit.ipsecTunnels.pskSet({...e,account_id:p,...c})),{successLabel:`Created`});return}if(r.psks===void 0)throw Error(`--psks is required (or pass --body with this field set).`);let m=f({psks:d(r.psks,`psks`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>l.magicTransit.ipsecTunnels.pskSet({...m,account_id:p,...c})),{successLabel:`Created`})})};function mr(e){return e.usage(`$0 magic-transit ipsec-tunnels update <ipsec-tunnel-id>
|
|
243
243
|
|
|
244
244
|
Updates a specific IPsec tunnel associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected."}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-export-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes advertised to the customer.`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table.`}).option(`bgp-import-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes received from the customer.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
245
245
|
|
|
@@ -263,125 +263,125 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
|
|
|
263
263
|
|
|
264
264
|
This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
|
|
265
265
|
fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
|
|
266
|
-
cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction."}).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-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].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 hr={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:mr,handler:async d=>c({command:`magic-transit ipsec-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
266
|
+
cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction."}).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-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].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 hr={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:mr,handler:async d=>c({command:`magic-transit ipsec-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){o({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/ipsec_tunnels/${d[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(d[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:p(d[`customer-endpoint`],`customer-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),name:p(d.name,`name`,`text`),psk:p(d.psk,`psk`,`text`),replay_protection:d[`replay-protection`]}):u(d.body)});return}let h=await i(d),g=d.local?e:await n();if(d.accountId=g,d.body){let e=u(d.body);a(await s(`Updating`,async()=>r(h,`PUT`,`/accounts/${g}/magic/ipsec_tunnels/${encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`});return}d[`cloudflare-endpoint`]===void 0&&(d[`cloudflare-endpoint`]=await m(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),d.name===void 0&&(d.name=await m(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-endpoint`]!==void 0&&l(_,[`cloudflare_endpoint`],p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),d[`custom-remote-identities-fqdn-id`]!==void 0&&l(_,[`custom_remote_identities`,`fqdn_id`],p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),d[`customer-endpoint`]!==void 0&&l(_,[`customer_endpoint`],p(d[`customer-endpoint`],`customer-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.psk!==void 0&&l(_,[`psk`],p(d.psk,`psk`,`text`)),d[`replay-protection`]!==void 0&&l(_,[`replay_protection`],d[`replay-protection`]),a(await s(`Updating`,async()=>r(h,`PUT`,`/accounts/${g}/magic/ipsec_tunnels/${encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Updated`})})},gr={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command(tr).command(rr).command(ar).command(sr).command(lr).command(dr).command(pr).command(hr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _r(e){return e.usage(`$0 magic-transit pcaps create
|
|
267
267
|
|
|
268
|
-
Create new PCAP request for account.`).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 vr={command:`create`,describe:`Create PCAP request`,builder:_r,handler:async r=>c({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
268
|
+
Create new PCAP request for account.`).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 vr={command:`create`,describe:`Create PCAP request`,builder:_r,handler:async r=>c({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`json`,body:r.body===void 0?void 0:u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.pcaps.create({body:e,account_id:l})),{successLabel:`Created`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function yr(e){return e.usage(`$0 magic-transit pcaps download get <pcap-id>
|
|
269
269
|
|
|
270
|
-
Download PCAP information into a file. Response is a binary PCAP file.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const br={command:`get <pcap-id>`,describe:`Download Simple PCAP`,builder:yr,handler:async r=>c({command:`magic-transit pcaps download get`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
270
|
+
Download PCAP information into a file. Response is a binary PCAP file.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const br={command:`get <pcap-id>`,describe:`Download Simple PCAP`,builder:yr,handler:async r=>c({command:`magic-transit pcaps download get`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps/${r[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(r[`pcap-id`]))}/download`,pathParams:{"pcap-id":String(r[`pcap-id`]??``)},bodyKind:`none`});return}await i(r);let a=r.local?e:await n();r.accountId=a;let c=await s(`Loading`,async()=>ee(`/accounts/${a}/pcaps/${encodeURIComponent(String(r[`pcap-id`]))}/download`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));_(r.text===!0?c.toString(`utf-8`):c)})},xr={command:`download`,describe:`Operations for pcaps.download`,builder:e=>e.command(br).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Sr(e){return e.usage(`$0 magic-transit pcaps get <pcap-id>
|
|
271
271
|
|
|
272
|
-
Get information for a PCAP request by id.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cr={command:`get <pcap-id>`,describe:`Get PCAP request`,builder:Sr,handler:async r=>c({command:`magic-transit pcaps get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
272
|
+
Get information for a PCAP request by id.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cr={command:`get <pcap-id>`,describe:`Get PCAP request`,builder:Sr,handler:async r=>c({command:`magic-transit pcaps get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps/${r[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(r[`pcap-id`]))}`,pathParams:{"pcap-id":String(r[`pcap-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.pcaps.get({account_id:l,pcap_id:r[`pcap-id`]})),{successLabel:`Loaded`})})};function wr(e){return e.usage(`$0 magic-transit pcaps list
|
|
273
273
|
|
|
274
|
-
Lists all packet capture requests for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tr={command:`list`,describe:`List packet capture requests`,builder:wr,handler:async r=>c({command:`magic-transit pcaps list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
274
|
+
Lists all packet capture requests for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tr={command:`list`,describe:`List packet capture requests`,builder:wr,handler:async r=>c({command:`magic-transit pcaps list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.pcaps.list({account_id:l})),{successLabel:`Loaded`})})};function Er(e){return e.usage(`$0 magic-transit pcaps ownership create
|
|
275
275
|
|
|
276
|
-
Adds an AWS or GCP bucket to use with full packet captures.`).option(`destination-conf`,{type:`string`,description:"The full URI for the bucket. This field only applies to `full` packet captures."}).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 Dr={command:`create`,describe:`Add buckets for full packet captures`,builder:Er,handler:async r=>c({command:`magic-transit pcaps ownership create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
276
|
+
Adds an AWS or GCP bucket to use with full packet captures.`).option(`destination-conf`,{type:`string`,description:"The full URI for the bucket. This field only applies to `full` packet captures."}).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 Dr={command:`create`,describe:`Add buckets for full packet captures`,builder:Er,handler:async r=>c({command:`magic-transit pcaps ownership create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({destination_conf:p(r[`destination-conf`],`destination-conf`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.create({...e,account_id:l})),{successLabel:`Created`});return}r[`destination-conf`]===void 0&&(r[`destination-conf`]=await m(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures."));let d=f({destination_conf:p(r[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.create({...d,account_id:l})),{successLabel:`Created`})})};function Or(e){return e.usage(`$0 magic-transit pcaps ownership delete <ownership-id>
|
|
277
277
|
|
|
278
|
-
Deletes buckets added to the packet captures API.`).positional(`ownership-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const kr={command:`delete <ownership-id>`,describe:`Delete buckets for full packet captures`,builder:Or,handler:async r=>c({command:`magic-transit pcaps ownership delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps ownership delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
278
|
+
Deletes buckets added to the packet captures API.`).positional(`ownership-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const kr={command:`delete <ownership-id>`,describe:`Delete buckets for full packet captures`,builder:Or,handler:async r=>c({command:`magic-transit pcaps ownership delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps ownership delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps/ownership/${r[`ownership-id`]==null?`<ownership-id>`:encodeURIComponent(String(r[`ownership-id`]))}`,pathParams:{"ownership-id":String(r[`ownership-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
279
279
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.pcaps.ownership.delete({account_id:l,ownership_id:r[`ownership-id`]})),{successLabel:`Deleted`})})};function Ar(e){return e.usage(`$0 magic-transit pcaps ownership get
|
|
280
280
|
|
|
281
|
-
List all buckets configured for use with PCAPs API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jr={command:`get`,describe:`List PCAPs Bucket Ownership`,builder:Ar,handler:async r=>c({command:`magic-transit pcaps ownership get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps ownership get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
281
|
+
List all buckets configured for use with PCAPs API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jr={command:`get`,describe:`List PCAPs Bucket Ownership`,builder:Ar,handler:async r=>c({command:`magic-transit pcaps ownership get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps ownership get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.pcaps.ownership.get({account_id:l})),{successLabel:`Loaded`})})};function Mr(e){return e.usage(`$0 magic-transit pcaps ownership validate
|
|
282
282
|
|
|
283
|
-
Validates buckets added to the packet captures API.`).option(`destination-conf`,{type:`string`,description:"The full URI for the bucket. This field only applies to `full` packet captures."}).option(`ownership-challenge`,{type:`string`,description:`The ownership challenge filename stored in the bucket.`}).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 Nr={command:`validate`,describe:`Validate buckets for full packet captures`,builder:Mr,handler:async r=>c({command:`magic-transit pcaps ownership validate`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
283
|
+
Validates buckets added to the packet captures API.`).option(`destination-conf`,{type:`string`,description:"The full URI for the bucket. This field only applies to `full` packet captures."}).option(`ownership-challenge`,{type:`string`,description:`The ownership challenge filename stored in the bucket.`}).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 Nr={command:`validate`,describe:`Validate buckets for full packet captures`,builder:Mr,handler:async r=>c({command:`magic-transit pcaps ownership validate`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps/ownership/validate`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({destination_conf:p(r[`destination-conf`],`destination-conf`,`text`),ownership_challenge:p(r[`ownership-challenge`],`ownership-challenge`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.validate({...e,account_id:l})),{successLabel:`Created`});return}r[`destination-conf`]===void 0&&(r[`destination-conf`]=await m(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures.")),r[`ownership-challenge`]===void 0&&(r[`ownership-challenge`]=await m(`ownership-challenge`,`The ownership challenge filename stored in the bucket.`));let d=f({destination_conf:p(r[`destination-conf`],`destination-conf`,`text`),ownership_challenge:p(r[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.validate({...d,account_id:l})),{successLabel:`Created`})})},Pr={command:`ownership`,describe:`Operations for pcaps.ownership`,builder:e=>e.command(Dr).command(kr).command(jr).command(Nr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fr(e){return e.usage(`$0 magic-transit pcaps stop <pcap-id>
|
|
284
284
|
|
|
285
|
-
Stop full PCAP.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ir={command:`stop <pcap-id>`,describe:`Stop full PCAP`,builder:Fr,handler:async r=>c({command:`magic-transit pcaps stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps stop`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
285
|
+
Stop full PCAP.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ir={command:`stop <pcap-id>`,describe:`Stop full PCAP`,builder:Fr,handler:async r=>c({command:`magic-transit pcaps stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit pcaps stop`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/pcaps/${r[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(r[`pcap-id`]))}/stop`,pathParams:{"pcap-id":String(r[`pcap-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force,message:`This operation halts an in-progress full packet capture. Any unsaved capture data will be lost.`})){process.stderr.write(`Aborted.
|
|
286
286
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.pcaps.stop({account_id:l,pcap_id:r[`pcap-id`]})),{successLabel:`Deleted`})})},Lr={command:`pcaps`,describe:`Packet capture requests for debugging traffic flowing through Magic Transit tunnels`,builder:e=>e.command(vr).command(Cr).command(Tr).command(Ir).command(xr).command(Pr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Rr(e){return e.usage(`$0 magic-transit redundancy-groups create
|
|
287
287
|
|
|
288
|
-
Creates a new redundancy group, optionally with tunnel members.`).option(`description`,{type:`string`,description:`Optional description`,default:``}).option(`members`,{type:`string`,description:`Tunnels to add to the group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Human-readable name for the redundancy group`}).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 zr={command:`create`,describe:`Create a Redundancy Group`,builder:Rr,handler:async r=>c({command:`magic-transit redundancy-groups create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
288
|
+
Creates a new redundancy group, optionally with tunnel members.`).option(`description`,{type:`string`,description:`Optional description`,default:``}).option(`members`,{type:`string`,description:`Tunnels to add to the group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Human-readable name for the redundancy group`}).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 zr={command:`create`,describe:`Create a Redundancy Group`,builder:Rr,handler:async r=>c({command:`magic-transit redundancy-groups create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),members:d(r.members,`members`),name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.redundancyGroups.create({body:e,account_id:l})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await m(`name`,`Human-readable name for the redundancy group`));let h=f({description:p(r.description,`description`,`text`),members:d(r.members,`members`),name:p(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.redundancyGroups.create({body:h,account_id:l})),{successLabel:`Created`})})};function Br(e){return e.usage(`$0 magic-transit redundancy-groups delete <redundancy-group-id>
|
|
289
289
|
|
|
290
|
-
Deletes a redundancy group. Member tunnels are not deleted — their redundancy_group_id is cleared.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Vr={command:`delete <redundancy-group-id>`,describe:`Delete a Redundancy Group`,builder:Br,handler:async r=>c({command:`magic-transit redundancy-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
290
|
+
Deletes a redundancy group. Member tunnels are not deleted — their redundancy_group_id is cleared.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Vr={command:`delete <redundancy-group-id>`,describe:`Delete a Redundancy Group`,builder:Br,handler:async r=>c({command:`magic-transit redundancy-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/redundancy_groups/${r[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(r[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(r[`redundancy-group-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
291
291
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.redundancyGroups.delete({account_id:l,redundancy_group_id:r[`redundancy-group-id`]})),{successLabel:`Deleted`})})};function Hr(e){return e.usage(`$0 magic-transit redundancy-groups get <redundancy-group-id>
|
|
292
292
|
|
|
293
|
-
Gets details for a specific redundancy group, including full member tunnel data.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ur={command:`get <redundancy-group-id>`,describe:`Get Redundancy Group Details`,builder:Hr,handler:async r=>c({command:`magic-transit redundancy-groups get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
293
|
+
Gets details for a specific redundancy group, including full member tunnel data.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ur={command:`get <redundancy-group-id>`,describe:`Get Redundancy Group Details`,builder:Hr,handler:async r=>c({command:`magic-transit redundancy-groups get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/redundancy_groups/${r[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(r[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(r[`redundancy-group-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.redundancyGroups.get({account_id:l,redundancy_group_id:r[`redundancy-group-id`]})),{successLabel:`Loaded`})})};function Wr(e){return e.usage(`$0 magic-transit redundancy-groups list
|
|
294
294
|
|
|
295
|
-
Lists redundancy groups associated with an account, including full member tunnel data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gr={command:`list`,describe:`List Redundancy Groups`,builder:Wr,handler:async r=>c({command:`magic-transit redundancy-groups list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
295
|
+
Lists redundancy groups associated with an account, including full member tunnel data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gr={command:`list`,describe:`List Redundancy Groups`,builder:Wr,handler:async r=>c({command:`magic-transit redundancy-groups list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.redundancyGroups.list({account_id:l})),{successLabel:`Loaded`})})};function Kr(e){return e.usage(`$0 magic-transit redundancy-groups update <redundancy-group-id>
|
|
296
296
|
|
|
297
|
-
Replaces the name, description, and full set of members for an existing redundancy group.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description`}).option(`members`,{type:`string`,description:`Tunnels to add to the group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Human-readable name for the redundancy group`}).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 qr={command:`update <redundancy-group-id>`,describe:`Update a Redundancy Group`,builder:Kr,handler:async r=>c({command:`magic-transit redundancy-groups update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
297
|
+
Replaces the name, description, and full set of members for an existing redundancy group.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description`}).option(`members`,{type:`string`,description:`Tunnels to add to the group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Human-readable name for the redundancy group`}).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 qr={command:`update <redundancy-group-id>`,describe:`Update a Redundancy Group`,builder:Kr,handler:async r=>c({command:`magic-transit redundancy-groups update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit redundancy-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/redundancy_groups/${r[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(r[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(r[`redundancy-group-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),members:d(r.members,`members`),name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.redundancyGroups.update({body:e,account_id:l,redundancy_group_id:r[`redundancy-group-id`]})),{successLabel:`Updated`});return}r.name===void 0&&(r.name=await m(`name`,`Human-readable name for the redundancy group`));let h=f({description:p(r.description,`description`,`text`),members:d(r.members,`members`),name:p(r.name,`name`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.redundancyGroups.update({body:h,account_id:l,redundancy_group_id:r[`redundancy-group-id`]})),{successLabel:`Updated`})})},Jr={command:`redundancy-groups`,describe:`Operations for redundancy-groups`,builder:e=>e.command(zr).command(Vr).command(Ur).command(Gr).command(qr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yr(e){return e.usage(`$0 magic-transit routes bulk-update
|
|
298
298
|
|
|
299
|
-
Update multiple Magic static routes. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes. Only fields for a route that need to be changed need be provided.`).option(`routes`,{type:`string`,description:`The routes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xr={command:`bulk-update`,describe:`Update Many Routes`,builder:Yr,handler:async r=>c({command:`magic-transit routes bulk-update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
299
|
+
Update multiple Magic static routes. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes. Only fields for a route that need to be changed need be provided.`).option(`routes`,{type:`string`,description:`The routes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xr={command:`bulk-update`,describe:`Update Many Routes`,builder:Yr,handler:async r=>c({command:`magic-transit routes bulk-update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({routes:d(r.routes,`routes`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.routes.bulkUpdate({...e,account_id:l})),{successLabel:`Updated`});return}if(r.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let p=f({routes:d(r.routes,`routes`)});a(await s(`Updating`,async()=>c.magicTransit.routes.bulkUpdate({...p,account_id:l})),{successLabel:`Updated`})})};function Zr(e){return e.usage(`$0 magic-transit routes create
|
|
300
300
|
|
|
301
|
-
Creates a new Magic static route. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes.`).option(`description`,{type:`string`,description:`An optional human provided description of the static route.`}).option(`nexthop`,{type:`string`,description:`The next-hop IP Address for the static route.`}).option(`prefix`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`priority`,{type:`number`,description:`Priority of the static route.`}).option(`scope-colo-names`,{type:`string`,array:!0,description:`List of colo names for the ECMP scope.`}).option(`scope-colo-regions`,{type:`string`,array:!0,description:`List of colo regions for the ECMP scope.`}).option(`weight`,{type:`number`,description:`Optional weight of the ECMP scope - if provided.`}).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 Qr={command:`create`,describe:`Create a Route`,builder:Zr,handler:async r=>c({command:`magic-transit routes create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
301
|
+
Creates a new Magic static route. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes.`).option(`description`,{type:`string`,description:`An optional human provided description of the static route.`}).option(`nexthop`,{type:`string`,description:`The next-hop IP Address for the static route.`}).option(`prefix`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`priority`,{type:`number`,description:`Priority of the static route.`}).option(`scope-colo-names`,{type:`string`,array:!0,description:`List of colo names for the ECMP scope.`}).option(`scope-colo-regions`,{type:`string`,array:!0,description:`List of colo regions for the ECMP scope.`}).option(`weight`,{type:`number`,description:`Optional weight of the ECMP scope - if provided.`}).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 Qr={command:`create`,describe:`Create a Route`,builder:Zr,handler:async r=>c({command:`magic-transit routes create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),nexthop:p(r.nexthop,`nexthop`,`text`),prefix:p(r.prefix,`prefix`,`text`),priority:r.priority,scope:{colo_names:r[`scope-colo-names`],colo_regions:r[`scope-colo-regions`]},weight:r.weight}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.routes.create({...e,account_id:l})),{successLabel:`Created`});return}if(r.nexthop===void 0&&(r.nexthop=await m(`nexthop`,`The next-hop IP Address for the static route.`)),r.prefix===void 0&&(r.prefix=await m(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),r.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let d=f({description:p(r.description,`description`,`text`),nexthop:p(r.nexthop,`nexthop`,`text`),prefix:p(r.prefix,`prefix`,`text`),priority:r.priority,scope:{colo_names:r[`scope-colo-names`],colo_regions:r[`scope-colo-regions`]},weight:r.weight});a(await s(`Creating`,async()=>c.magicTransit.routes.create({...d,account_id:l})),{successLabel:`Created`})})};function $r(e){return e.usage(`$0 magic-transit routes delete <route-id>
|
|
302
302
|
|
|
303
|
-
Disable and remove a specific Magic static route.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ei={command:`delete <route-id>`,describe:`Delete Route`,builder:$r,handler:async r=>c({command:`magic-transit routes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
303
|
+
Disable and remove a specific Magic static route.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ei={command:`delete <route-id>`,describe:`Delete Route`,builder:$r,handler:async r=>c({command:`magic-transit routes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/routes/${r[`route-id`]==null?`<route-id>`:encodeURIComponent(String(r[`route-id`]))}`,pathParams:{"route-id":String(r[`route-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
304
304
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.routes.delete({account_id:l,route_id:r[`route-id`]})),{successLabel:`Deleted`})})};function ti(e){return e.usage(`$0 magic-transit routes empty
|
|
305
305
|
|
|
306
|
-
Delete multiple Magic static routes.`).option(`routes`,{type:`string`,description:`The routes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 ni={command:`empty`,describe:`Delete Many Routes`,builder:ti,handler:async r=>c({command:`magic-transit routes empty`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes empty`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
306
|
+
Delete multiple Magic static routes.`).option(`routes`,{type:`string`,description:`The routes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 ni={command:`empty`,describe:`Delete Many Routes`,builder:ti,handler:async r=>c({command:`magic-transit routes empty`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes empty`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({routes:d(r.routes,`routes`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
307
307
|
`);return}if(r.body){let e=u(r.body);a(await s(`Deleting`,async()=>c.magicTransit.routes.empty({...e,account_id:l})),{successLabel:`Deleted`});return}if(r.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let p=f({routes:d(r.routes,`routes`)});a(await s(`Deleting`,async()=>c.magicTransit.routes.empty({...p,account_id:l})),{successLabel:`Deleted`})})};function ri(e){return e.usage(`$0 magic-transit routes get <route-id>
|
|
308
308
|
|
|
309
|
-
Get a specific Magic static route.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ii={command:`get <route-id>`,describe:`Route Details`,builder:ri,handler:async r=>c({command:`magic-transit routes get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
309
|
+
Get a specific Magic static route.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ii={command:`get <route-id>`,describe:`Route Details`,builder:ri,handler:async r=>c({command:`magic-transit routes get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/routes/${r[`route-id`]==null?`<route-id>`:encodeURIComponent(String(r[`route-id`]))}`,pathParams:{"route-id":String(r[`route-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.routes.get({account_id:l,route_id:r[`route-id`]})),{successLabel:`Loaded`})})};function ai(e){return e.usage(`$0 magic-transit routes list
|
|
310
310
|
|
|
311
|
-
List all Magic static routes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oi={command:`list`,describe:`List Routes`,builder:ai,handler:async r=>c({command:`magic-transit routes list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
311
|
+
List all Magic static routes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oi={command:`list`,describe:`List Routes`,builder:ai,handler:async r=>c({command:`magic-transit routes list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.routes.list({account_id:l})),{successLabel:`Loaded`})})};function si(e){return e.usage(`$0 magic-transit routes update <route-id>
|
|
312
312
|
|
|
313
|
-
Update a specific Magic static route. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`An optional human provided description of the static route.`}).option(`nexthop`,{type:`string`,description:`The next-hop IP Address for the static route.`}).option(`prefix`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`priority`,{type:`number`,description:`Priority of the static route.`}).option(`scope-colo-names`,{type:`string`,array:!0,description:`List of colo names for the ECMP scope.`}).option(`scope-colo-regions`,{type:`string`,array:!0,description:`List of colo regions for the ECMP scope.`}).option(`weight`,{type:`number`,description:`Optional weight of the ECMP scope - if provided.`}).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 ci={command:`update <route-id>`,describe:`Update Route`,builder:si,handler:async r=>c({command:`magic-transit routes update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
313
|
+
Update a specific Magic static route. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`An optional human provided description of the static route.`}).option(`nexthop`,{type:`string`,description:`The next-hop IP Address for the static route.`}).option(`prefix`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`priority`,{type:`number`,description:`Priority of the static route.`}).option(`scope-colo-names`,{type:`string`,array:!0,description:`List of colo names for the ECMP scope.`}).option(`scope-colo-regions`,{type:`string`,array:!0,description:`List of colo regions for the ECMP scope.`}).option(`weight`,{type:`number`,description:`Optional weight of the ECMP scope - if provided.`}).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 ci={command:`update <route-id>`,describe:`Update Route`,builder:si,handler:async r=>c({command:`magic-transit routes update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit routes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/routes/${r[`route-id`]==null?`<route-id>`:encodeURIComponent(String(r[`route-id`]))}`,pathParams:{"route-id":String(r[`route-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),nexthop:p(r.nexthop,`nexthop`,`text`),prefix:p(r.prefix,`prefix`,`text`),priority:r.priority,scope:{colo_names:r[`scope-colo-names`],colo_regions:r[`scope-colo-regions`]},weight:r.weight}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.routes.update({body:e,account_id:l,route_id:r[`route-id`]})),{successLabel:`Updated`});return}if(r.nexthop===void 0&&(r.nexthop=await m(`nexthop`,`The next-hop IP Address for the static route.`)),r.prefix===void 0&&(r.prefix=await m(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),r.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let d=f({description:p(r.description,`description`,`text`),nexthop:p(r.nexthop,`nexthop`,`text`),prefix:p(r.prefix,`prefix`,`text`),priority:r.priority,scope:{colo_names:r[`scope-colo-names`],colo_regions:r[`scope-colo-regions`]},weight:r.weight});a(await s(`Updating`,async()=>c.magicTransit.routes.update({body:d,account_id:l,route_id:r[`route-id`]})),{successLabel:`Updated`})})},li={command:`routes`,describe:`Static routes that direct IP prefix traffic through specific GRE/IPsec tunnels`,builder:e=>e.command(Xr).command(Qr).command(ei).command(ni).command(ii).command(oi).command(ci).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ui(e){return e.usage(`$0 magic-transit sites acls create <site-id>
|
|
314
314
|
|
|
315
|
-
Creates a new Site ACL.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Bidirectional ACL policy for local network traffic within a site.`})}const di={command:`create <site-id>`,describe:`Create a new Site ACL`,builder:ui,handler:async r=>c({command:`magic-transit sites acls create`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
315
|
+
Creates a new Site ACL.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Bidirectional ACL policy for local network traffic within a site.`})}const di={command:`create <site-id>`,describe:`Create a new Site ACL`,builder:ui,handler:async r=>c({command:`magic-transit sites acls create`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/acls`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),forward_locally:r[`forward-locally`],lan_1:{lan_id:p(r[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(r[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:r[`lan-1-port-ranges`],ports:r[`lan-1-ports`]},lan_2:{lan_id:p(r[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(r[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:r[`lan-2-port-ranges`],ports:r[`lan-2-ports`]},name:p(r.name,`name`,`text`),protocols:r.protocols,unidirectional:r.unidirectional}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.sites.acls.create({...e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`});return}r[`lan-1-lan-id`]===void 0&&(r[`lan-1-lan-id`]=await m(`lan-1-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),r[`lan-2-lan-id`]===void 0&&(r[`lan-2-lan-id`]=await m(`lan-2-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),r.name===void 0&&(r.name=await m(`name`,`The name of the ACL.`));let d=f({description:p(r.description,`description`,`text`),forward_locally:r[`forward-locally`],lan_1:{lan_id:p(r[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(r[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:r[`lan-1-port-ranges`],ports:r[`lan-1-ports`]},lan_2:{lan_id:p(r[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(r[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:r[`lan-2-port-ranges`],ports:r[`lan-2-ports`]},name:p(r.name,`name`,`text`),protocols:r.protocols,unidirectional:r.unidirectional});a(await s(`Creating`,async()=>c.magicTransit.sites.acls.create({...d,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`})})};function fi(e){return e.usage(`$0 magic-transit sites acls delete <acl-id>
|
|
316
316
|
|
|
317
|
-
Remove a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const pi={command:`delete <acl-id>`,describe:`Delete Site ACL`,builder:fi,handler:async r=>c({command:`magic-transit sites acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
317
|
+
Remove a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const pi={command:`delete <acl-id>`,describe:`Delete Site ACL`,builder:fi,handler:async r=>c({command:`magic-transit sites acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"acl-id":String(r[`acl-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
318
318
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.sites.acls.delete({account_id:l,site_id:r[`site-id`],acl_id:r[`acl-id`]})),{successLabel:`Deleted`})})};function mi(e){return e.usage(`$0 magic-transit sites acls edit <acl-id>
|
|
319
319
|
|
|
320
|
-
Patch a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).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([`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0)){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_1-* flag is set`)}return!0}).check(e=>{if([`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0)){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_2-* flag is set`)}return!0})}const hi={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:mi,handler:async r=>c({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
320
|
+
Patch a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).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([`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0)){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_1-* flag is set`)}return!0}).check(e=>{if([`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0)){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_2-* flag is set`)}return!0})}const hi={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:mi,handler:async r=>c({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"acl-id":String(r[`acl-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),forward_locally:r[`forward-locally`],lan_1:{lan_id:p(r[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(r[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:r[`lan-1-port-ranges`],ports:r[`lan-1-ports`]},lan_2:{lan_id:p(r[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(r[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:r[`lan-2-port-ranges`],ports:r[`lan-2-ports`]},name:p(r.name,`name`,`text`),protocols:r.protocols,unidirectional:r.unidirectional}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.acls.edit({body:e,account_id:l,site_id:r[`site-id`],acl_id:r[`acl-id`]})),{successLabel:`Updated`});return}let d=f({description:p(r.description,`description`,`text`),forward_locally:r[`forward-locally`],lan_1:{lan_id:p(r[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(r[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:r[`lan-1-port-ranges`],ports:r[`lan-1-ports`]},lan_2:{lan_id:p(r[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(r[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:r[`lan-2-port-ranges`],ports:r[`lan-2-ports`]},name:p(r.name,`name`,`text`),protocols:r.protocols,unidirectional:r.unidirectional});a(await s(`Updating`,async()=>c.magicTransit.sites.acls.edit({body:d,account_id:l,site_id:r[`site-id`],acl_id:r[`acl-id`]})),{successLabel:`Updated`})})};function gi(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
|
|
321
321
|
|
|
322
|
-
Get a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _i={command:`get <acl-id>`,describe:`Site ACL Details`,builder:gi,handler:async r=>c({command:`magic-transit sites acls get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
322
|
+
Get a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _i={command:`get <acl-id>`,describe:`Site ACL Details`,builder:gi,handler:async r=>c({command:`magic-transit sites acls get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"acl-id":String(r[`acl-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.sites.acls.get({account_id:l,site_id:r[`site-id`],acl_id:r[`acl-id`]})),{successLabel:`Loaded`})})};function vi(e){return e.usage(`$0 magic-transit sites acls list
|
|
323
323
|
|
|
324
|
-
Lists Site ACLs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yi={command:`list`,describe:`List Site ACLs`,builder:vi,handler:async r=>c({command:`magic-transit sites acls list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
324
|
+
Lists Site ACLs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yi={command:`list`,describe:`List Site ACLs`,builder:vi,handler:async r=>c({command:`magic-transit sites acls list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/acls`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.sites.acls.list({account_id:l,site_id:r[`site-id`]})),{successLabel:`Loaded`})})};function bi(e){return e.usage(`$0 magic-transit sites acls update <acl-id>
|
|
325
325
|
|
|
326
|
-
Update a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).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([`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0)){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_1-* flag is set`)}return!0}).check(e=>{if([`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0)){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_2-* flag is set`)}return!0})}const xi={command:`update <acl-id>`,describe:`Update Site ACL`,builder:bi,handler:async r=>c({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
326
|
+
Update a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).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([`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0)){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_1-* flag is set`)}return!0}).check(e=>{if([`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0)){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_2-* flag is set`)}return!0})}const xi={command:`update <acl-id>`,describe:`Update Site ACL`,builder:bi,handler:async r=>c({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"acl-id":String(r[`acl-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({description:p(r.description,`description`,`text`),forward_locally:r[`forward-locally`],lan_1:{lan_id:p(r[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(r[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:r[`lan-1-port-ranges`],ports:r[`lan-1-ports`]},lan_2:{lan_id:p(r[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(r[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:r[`lan-2-port-ranges`],ports:r[`lan-2-ports`]},name:p(r.name,`name`,`text`),protocols:r.protocols,unidirectional:r.unidirectional}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.acls.update({body:e,account_id:l,site_id:r[`site-id`],acl_id:r[`acl-id`]})),{successLabel:`Updated`});return}let d=f({description:p(r.description,`description`,`text`),forward_locally:r[`forward-locally`],lan_1:{lan_id:p(r[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(r[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:r[`lan-1-port-ranges`],ports:r[`lan-1-ports`]},lan_2:{lan_id:p(r[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(r[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:r[`lan-2-port-ranges`],ports:r[`lan-2-ports`]},name:p(r.name,`name`,`text`),protocols:r.protocols,unidirectional:r.unidirectional});a(await s(`Updating`,async()=>c.magicTransit.sites.acls.update({body:d,account_id:l,site_id:r[`site-id`],acl_id:r[`acl-id`]})),{successLabel:`Updated`})})},Si={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(di).command(pi).command(hi).command(_i).command(yi).command(xi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ci(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
|
|
327
327
|
|
|
328
|
-
Creates a new App Config for a site`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).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 wi={command:`create <site-id>`,describe:`Create a new App Config`,builder:Ci,handler:async r=>c({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
328
|
+
Creates a new App Config for a site`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).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 wi={command:`create <site-id>`,describe:`Create a new App Config`,builder:Ci,handler:async r=>c({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/app_configs`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({breakout:r.breakout,preferred_wans:r[`preferred-wans`],priority:r.priority}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.sites.appConfiguration.create({...e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`});return}let d=f({breakout:r.breakout,preferred_wans:r[`preferred-wans`],priority:r.priority});a(await s(`Creating`,async()=>c.magicTransit.sites.appConfiguration.create({...d,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`})})};function Ti(e){return e.usage(`$0 magic-transit sites app-configuration delete <app-config-id>
|
|
329
329
|
|
|
330
|
-
Deletes specific App Config associated with a site.`).positional(`app-config-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ei={command:`delete <app-config-id>`,describe:`Delete App Config`,builder:Ti,handler:async r=>c({command:`magic-transit sites app-configuration delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
330
|
+
Deletes specific App Config associated with a site.`).positional(`app-config-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ei={command:`delete <app-config-id>`,describe:`Delete App Config`,builder:Ti,handler:async r=>c({command:`magic-transit sites app-configuration delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/app_configs/${r[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(r[`app-config-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"app-config-id":String(r[`app-config-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
331
331
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.sites.appConfiguration.delete({account_id:l,site_id:r[`site-id`],app_config_id:r[`app-config-id`]})),{successLabel:`Deleted`})})};function Di(e){return e.usage(`$0 magic-transit sites app-configuration edit <app-config-id>
|
|
332
332
|
|
|
333
|
-
Updates an App Config for a site`).positional(`app-config-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-app-id`,{type:`string`,description:`Magic account app ID.`}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`managed-app-id`,{type:`string`,description:`Managed app ID.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).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 Oi={command:`edit <app-config-id>`,describe:`Update an App Config`,builder:Di,handler:async r=>c({command:`magic-transit sites app-configuration edit`,classification:{safeFlags:[`breakout`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
333
|
+
Updates an App Config for a site`).positional(`app-config-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-app-id`,{type:`string`,description:`Magic account app ID.`}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`managed-app-id`,{type:`string`,description:`Managed app ID.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).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 Oi={command:`edit <app-config-id>`,describe:`Update an App Config`,builder:Di,handler:async r=>c({command:`magic-transit sites app-configuration edit`,classification:{safeFlags:[`breakout`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/app_configs/${r[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(r[`app-config-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"app-config-id":String(r[`app-config-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({account_app_id:p(r[`account-app-id`],`account-app-id`,`text`),breakout:r.breakout,managed_app_id:p(r[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:r[`preferred-wans`],priority:r.priority}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.appConfiguration.edit({body:e,account_id:l,site_id:r[`site-id`],app_config_id:r[`app-config-id`]})),{successLabel:`Updated`});return}let d=f({account_app_id:p(r[`account-app-id`],`account-app-id`,`text`),breakout:r.breakout,managed_app_id:p(r[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:r[`preferred-wans`],priority:r.priority});a(await s(`Updating`,async()=>c.magicTransit.sites.appConfiguration.edit({body:d,account_id:l,site_id:r[`site-id`],app_config_id:r[`app-config-id`]})),{successLabel:`Updated`})})};function ki(e){return e.usage(`$0 magic-transit sites app-configuration list
|
|
334
334
|
|
|
335
|
-
Lists App Configs associated with a site.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ai={command:`list`,describe:`List App Configs`,builder:ki,handler:async r=>c({command:`magic-transit sites app-configuration list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
335
|
+
Lists App Configs associated with a site.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ai={command:`list`,describe:`List App Configs`,builder:ki,handler:async r=>c({command:`magic-transit sites app-configuration list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/app_configs`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.sites.appConfiguration.list({account_id:l,site_id:r[`site-id`]})),{successLabel:`Loaded`})})};function ji(e){return e.usage(`$0 magic-transit sites app-configuration update <app-config-id>
|
|
336
336
|
|
|
337
|
-
Updates an App Config for a site`).positional(`app-config-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-app-id`,{type:`string`,description:`Magic account app ID.`}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`managed-app-id`,{type:`string`,description:`Managed app ID.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).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 Mi={command:`update <app-config-id>`,describe:`Update an App Config`,builder:ji,handler:async r=>c({command:`magic-transit sites app-configuration update`,classification:{safeFlags:[`breakout`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
337
|
+
Updates an App Config for a site`).positional(`app-config-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-app-id`,{type:`string`,description:`Magic account app ID.`}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`managed-app-id`,{type:`string`,description:`Managed app ID.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).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 Mi={command:`update <app-config-id>`,describe:`Update an App Config`,builder:ji,handler:async r=>c({command:`magic-transit sites app-configuration update`,classification:{safeFlags:[`breakout`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites app-configuration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/app_configs/${r[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(r[`app-config-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"app-config-id":String(r[`app-config-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({account_app_id:p(r[`account-app-id`],`account-app-id`,`text`),breakout:r.breakout,managed_app_id:p(r[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:r[`preferred-wans`],priority:r.priority}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.appConfiguration.update({body:e,account_id:l,site_id:r[`site-id`],app_config_id:r[`app-config-id`]})),{successLabel:`Updated`});return}let d=f({account_app_id:p(r[`account-app-id`],`account-app-id`,`text`),breakout:r.breakout,managed_app_id:p(r[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:r[`preferred-wans`],priority:r.priority});a(await s(`Updating`,async()=>c.magicTransit.sites.appConfiguration.update({body:d,account_id:l,site_id:r[`site-id`],app_config_id:r[`app-config-id`]})),{successLabel:`Updated`})})},Ni={command:`app-configuration`,describe:`Operations for sites.app-configuration`,builder:e=>e.command(wi).command(Ei).command(Oi).command(Ai).command(Mi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pi(e){return e.usage(`$0 magic-transit sites create
|
|
338
338
|
|
|
339
|
-
Creates a new Site`).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`ha-mode`,{type:`boolean`,description:`Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fi={command:`create`,describe:`Create a new Site`,builder:Pi,handler:async r=>c({command:`magic-transit sites create`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
339
|
+
Creates a new Site`).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`ha-mode`,{type:`boolean`,description:`Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fi={command:`create`,describe:`Create a new Site`,builder:Pi,handler:async r=>c({command:`magic-transit sites create`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({connector_id:p(r[`connector-id`],`connector-id`,`text`),description:p(r.description,`description`,`text`),ha_mode:r[`ha-mode`],location:{lat:p(r[`location-lat`],`location-lat`,`text`),lon:p(r[`location-lon`],`location-lon`,`text`)},name:p(r.name,`name`,`text`),secondary_connector_id:p(r[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.sites.create({...e,account_id:l})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await m(`name`,`The name of the site.`));let d=f({connector_id:p(r[`connector-id`],`connector-id`,`text`),description:p(r.description,`description`,`text`),ha_mode:r[`ha-mode`],location:{lat:p(r[`location-lat`],`location-lat`,`text`),lon:p(r[`location-lon`],`location-lon`,`text`)},name:p(r.name,`name`,`text`),secondary_connector_id:p(r[`secondary-connector-id`],`secondary-connector-id`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.sites.create({...d,account_id:l})),{successLabel:`Created`})})};function Ii(e){return e.usage(`$0 magic-transit sites delete <site-id>
|
|
340
340
|
|
|
341
|
-
Remove a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Li={command:`delete <site-id>`,describe:`Delete Site`,builder:Ii,handler:async r=>c({command:`magic-transit sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
341
|
+
Remove a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Li={command:`delete <site-id>`,describe:`Delete Site`,builder:Ii,handler:async r=>c({command:`magic-transit sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
342
342
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.sites.delete({account_id:l,site_id:r[`site-id`]})),{successLabel:`Deleted`})})};function Ri(e){return e.usage(`$0 magic-transit sites edit <site-id>
|
|
343
343
|
|
|
344
|
-
Patch a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const zi={command:`edit <site-id>`,describe:`Patch Site`,builder:Ri,handler:async r=>c({command:`magic-transit sites edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
344
|
+
Patch a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const zi={command:`edit <site-id>`,describe:`Patch Site`,builder:Ri,handler:async r=>c({command:`magic-transit sites edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({connector_id:p(r[`connector-id`],`connector-id`,`text`),description:p(r.description,`description`,`text`),location:{lat:p(r[`location-lat`],`location-lat`,`text`),lon:p(r[`location-lon`],`location-lon`,`text`)},name:p(r.name,`name`,`text`),secondary_connector_id:p(r[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.edit({body:e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Updated`});return}let d=f({connector_id:p(r[`connector-id`],`connector-id`,`text`),description:p(r.description,`description`,`text`),location:{lat:p(r[`location-lat`],`location-lat`,`text`),lon:p(r[`location-lon`],`location-lon`,`text`)},name:p(r.name,`name`,`text`),secondary_connector_id:p(r[`secondary-connector-id`],`secondary-connector-id`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.sites.edit({body:d,account_id:l,site_id:r[`site-id`]})),{successLabel:`Updated`})})};function Bi(e){return e.usage(`$0 magic-transit sites get <site-id>
|
|
345
345
|
|
|
346
|
-
Get a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vi={command:`get <site-id>`,describe:`Site Details`,builder:Bi,handler:async l=>c({command:`magic-transit sites get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
346
|
+
Get a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vi={command:`get <site-id>`,describe:`Site Details`,builder:Bi,handler:async l=>c({command:`magic-transit sites get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){o({command:`cf magic-transit sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${l[`site-id`]==null?`<site-id>`:encodeURIComponent(String(l[`site-id`]))}`,pathParams:{"site-id":String(l[`site-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await n();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/magic/sites/${encodeURIComponent(String(l[`site-id`]))}`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})};function Hi(e){return e.usage(`$0 magic-transit sites lans create <site-id>
|
|
347
347
|
|
|
348
|
-
Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].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 --static_addressing-* flag is set`)}return!0})}const Ui={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:Hi,handler:async r=>c({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
348
|
+
Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].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 --static_addressing-* flag is set`)}return!0})}const Ui={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:Hi,handler:async r=>c({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/lans`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({bond_id:r[`bond-id`],ha_link:r[`ha-link`],is_breakout:r[`is-breakout`],is_prioritized:r[`is-prioritized`],name:p(r.name,`name`,`text`),nat:{static_prefix:p(r[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:r.physport,routed_subnets:d(r[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:r[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(r[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(r[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:r[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(r[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:r[`vlan-tag`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.sites.lans.create({...e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`});return}let m=f({bond_id:r[`bond-id`],ha_link:r[`ha-link`],is_breakout:r[`is-breakout`],is_prioritized:r[`is-prioritized`],name:p(r.name,`name`,`text`),nat:{static_prefix:p(r[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:r.physport,routed_subnets:d(r[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:r[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(r[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(r[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:r[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(r[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:r[`vlan-tag`]});a(await s(`Creating`,async()=>c.magicTransit.sites.lans.create({...m,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`})})};function Wi(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
|
|
349
349
|
|
|
350
|
-
Remove a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Gi={command:`delete <lan-id>`,describe:`Delete Site LAN`,builder:Wi,handler:async r=>c({command:`magic-transit sites lans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
350
|
+
Remove a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Gi={command:`delete <lan-id>`,describe:`Delete Site LAN`,builder:Wi,handler:async r=>c({command:`magic-transit sites lans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/lans/${r[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(r[`lan-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"lan-id":String(r[`lan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
351
351
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.sites.lans.delete({account_id:l,site_id:r[`site-id`],lan_id:r[`lan-id`]})),{successLabel:`Deleted`})})};function Ki(e){return e.usage(`$0 magic-transit sites lans edit <lan-id>
|
|
352
352
|
|
|
353
|
-
Patch a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].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 --static_addressing-* flag is set`)}return!0})}const qi={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Ki,handler:async r=>c({command:`magic-transit sites lans edit`,classification:{safeFlags:[`is-breakout`,`is-prioritized`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
353
|
+
Patch a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].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 --static_addressing-* flag is set`)}return!0})}const qi={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Ki,handler:async r=>c({command:`magic-transit sites lans edit`,classification:{safeFlags:[`is-breakout`,`is-prioritized`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/lans/${r[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(r[`lan-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"lan-id":String(r[`lan-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({bond_id:r[`bond-id`],is_breakout:r[`is-breakout`],is_prioritized:r[`is-prioritized`],name:p(r.name,`name`,`text`),nat:{static_prefix:p(r[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:r.physport,routed_subnets:d(r[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:r[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(r[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(r[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:r[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(r[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:r[`vlan-tag`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.lans.edit({body:e,account_id:l,site_id:r[`site-id`],lan_id:r[`lan-id`]})),{successLabel:`Updated`});return}let m=f({bond_id:r[`bond-id`],is_breakout:r[`is-breakout`],is_prioritized:r[`is-prioritized`],name:p(r.name,`name`,`text`),nat:{static_prefix:p(r[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:r.physport,routed_subnets:d(r[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:r[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(r[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(r[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:r[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(r[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:r[`vlan-tag`]});a(await s(`Updating`,async()=>c.magicTransit.sites.lans.edit({body:m,account_id:l,site_id:r[`site-id`],lan_id:r[`lan-id`]})),{successLabel:`Updated`})})};function Ji(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
|
|
354
354
|
|
|
355
|
-
Get a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yi={command:`get <lan-id>`,describe:`Site LAN Details`,builder:Ji,handler:async r=>c({command:`magic-transit sites lans get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
355
|
+
Get a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yi={command:`get <lan-id>`,describe:`Site LAN Details`,builder:Ji,handler:async r=>c({command:`magic-transit sites lans get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/lans/${r[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(r[`lan-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"lan-id":String(r[`lan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.sites.lans.get({account_id:l,site_id:r[`site-id`],lan_id:r[`lan-id`]})),{successLabel:`Loaded`})})};function Xi(e){return e.usage(`$0 magic-transit sites lans list
|
|
356
356
|
|
|
357
|
-
Lists Site LANs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zi={command:`list`,describe:`List Site LANs`,builder:Xi,handler:async r=>c({command:`magic-transit sites lans list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
357
|
+
Lists Site LANs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zi={command:`list`,describe:`List Site LANs`,builder:Xi,handler:async r=>c({command:`magic-transit sites lans list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/lans`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.sites.lans.list({account_id:l,site_id:r[`site-id`]})),{successLabel:`Loaded`})})};function Qi(e){return e.usage(`$0 magic-transit sites lans update <lan-id>
|
|
358
358
|
|
|
359
|
-
Update a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].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 --static_addressing-* flag is set`)}return!0})}const $i={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Qi,handler:async r=>c({command:`magic-transit sites lans update`,classification:{safeFlags:[`is-breakout`,`is-prioritized`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
359
|
+
Update a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].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 --static_addressing-* flag is set`)}return!0})}const $i={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Qi,handler:async r=>c({command:`magic-transit sites lans update`,classification:{safeFlags:[`is-breakout`,`is-prioritized`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/lans/${r[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(r[`lan-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"lan-id":String(r[`lan-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({bond_id:r[`bond-id`],is_breakout:r[`is-breakout`],is_prioritized:r[`is-prioritized`],name:p(r.name,`name`,`text`),nat:{static_prefix:p(r[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:r.physport,routed_subnets:d(r[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:r[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(r[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(r[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:r[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(r[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:r[`vlan-tag`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.lans.update({body:e,account_id:l,site_id:r[`site-id`],lan_id:r[`lan-id`]})),{successLabel:`Updated`});return}let m=f({bond_id:r[`bond-id`],is_breakout:r[`is-breakout`],is_prioritized:r[`is-prioritized`],name:p(r.name,`name`,`text`),nat:{static_prefix:p(r[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:r.physport,routed_subnets:d(r[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:r[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(r[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(r[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:r[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(r[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:r[`vlan-tag`]});a(await s(`Updating`,async()=>c.magicTransit.sites.lans.update({body:m,account_id:l,site_id:r[`site-id`],lan_id:r[`lan-id`]})),{successLabel:`Updated`})})},ea={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(Ui).command(Gi).command(qi).command(Yi).command(Zi).command($i).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ta(e){return e.usage(`$0 magic-transit sites list
|
|
360
360
|
|
|
361
|
-
Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID.`).option(`connectorid`,{type:`string`,description:`Identifier`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const na={command:`list`,describe:`List Sites`,builder:ta,handler:async r=>c({command:`magic-transit sites list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={connectorid:r.connectorid};if(r.dryRun){o({command:`cf magic-transit sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
361
|
+
Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID.`).option(`connectorid`,{type:`string`,description:`Identifier`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const na={command:`list`,describe:`List Sites`,builder:ta,handler:async r=>c({command:`magic-transit sites list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={connectorid:r.connectorid};if(r.dryRun){o({command:`cf magic-transit sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.magicTransit.sites.list({account_id:u,...c})),{successLabel:`Loaded`})})};function ra(e){return e.usage(`$0 magic-transit sites netflow-config create <site-id>
|
|
362
362
|
|
|
363
|
-
Creates a NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 ia={command:`create <site-id>`,describe:`Create NetFlow Configuration`,builder:ra,handler:async r=>c({command:`magic-transit sites netflow-config create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
363
|
+
Creates a NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 ia={command:`create <site-id>`,describe:`Create NetFlow Configuration`,builder:ra,handler:async r=>c({command:`magic-transit sites netflow-config create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({active_timeout:r[`active-timeout`],collector_ip:p(r[`collector-ip`],`collector-ip`,`text`),collector_port:r[`collector-port`],inactive_timeout:r[`inactive-timeout`],sampling_rate:r[`sampling-rate`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.sites.netflowConfig.create({body:e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`});return}let d=f({active_timeout:r[`active-timeout`],collector_ip:p(r[`collector-ip`],`collector-ip`,`text`),collector_port:r[`collector-port`],inactive_timeout:r[`inactive-timeout`],sampling_rate:r[`sampling-rate`]});a(await s(`Creating`,async()=>c.magicTransit.sites.netflowConfig.create({body:d,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`})})};function aa(e){return e.usage(`$0 magic-transit sites netflow-config delete <site-id>
|
|
364
364
|
|
|
365
|
-
Remove NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const oa={command:`delete <site-id>`,describe:`Delete NetFlow Configuration`,builder:aa,handler:async r=>c({command:`magic-transit sites netflow-config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
365
|
+
Remove NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const oa={command:`delete <site-id>`,describe:`Delete NetFlow Configuration`,builder:aa,handler:async r=>c({command:`magic-transit sites netflow-config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
366
366
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.sites.netflowConfig.delete({account_id:l,site_id:r[`site-id`]})),{successLabel:`Deleted`})})};function sa(e){return e.usage(`$0 magic-transit sites netflow-config edit <site-id>
|
|
367
367
|
|
|
368
|
-
Updates NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 ca={command:`edit <site-id>`,describe:`Update NetFlow Configuration`,builder:sa,handler:async r=>c({command:`magic-transit sites netflow-config edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
368
|
+
Updates NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 ca={command:`edit <site-id>`,describe:`Update NetFlow Configuration`,builder:sa,handler:async r=>c({command:`magic-transit sites netflow-config edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({active_timeout:r[`active-timeout`],collector_ip:p(r[`collector-ip`],`collector-ip`,`text`),collector_port:r[`collector-port`],inactive_timeout:r[`inactive-timeout`],sampling_rate:r[`sampling-rate`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.edit({body:e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Updated`});return}let d=f({active_timeout:r[`active-timeout`],collector_ip:p(r[`collector-ip`],`collector-ip`,`text`),collector_port:r[`collector-port`],inactive_timeout:r[`inactive-timeout`],sampling_rate:r[`sampling-rate`]});a(await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.edit({body:d,account_id:l,site_id:r[`site-id`]})),{successLabel:`Updated`})})};function la(e){return e.usage(`$0 magic-transit sites netflow-config get <site-id>
|
|
369
369
|
|
|
370
|
-
Get NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ua={command:`get <site-id>`,describe:`NetFlow Configuration Details`,builder:la,handler:async r=>c({command:`magic-transit sites netflow-config get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
370
|
+
Get NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ua={command:`get <site-id>`,describe:`NetFlow Configuration Details`,builder:la,handler:async r=>c({command:`magic-transit sites netflow-config get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.sites.netflowConfig.get({account_id:l,site_id:r[`site-id`]})),{successLabel:`Loaded`})})};function da(e){return e.usage(`$0 magic-transit sites netflow-config update <site-id>
|
|
371
371
|
|
|
372
|
-
Updates NetFlow configuration for a site (partial update).`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 fa={command:`update <site-id>`,describe:`Update NetFlow Configuration`,builder:da,handler:async r=>c({command:`magic-transit sites netflow-config update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
372
|
+
Updates NetFlow configuration for a site (partial update).`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 fa={command:`update <site-id>`,describe:`Update NetFlow Configuration`,builder:da,handler:async r=>c({command:`magic-transit sites netflow-config update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites netflow-config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({active_timeout:r[`active-timeout`],collector_ip:p(r[`collector-ip`],`collector-ip`,`text`),collector_port:r[`collector-port`],inactive_timeout:r[`inactive-timeout`],sampling_rate:r[`sampling-rate`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.update({body:e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Updated`});return}let d=f({active_timeout:r[`active-timeout`],collector_ip:p(r[`collector-ip`],`collector-ip`,`text`),collector_port:r[`collector-port`],inactive_timeout:r[`inactive-timeout`],sampling_rate:r[`sampling-rate`]});a(await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.update({body:d,account_id:l,site_id:r[`site-id`]})),{successLabel:`Updated`})})},pa={command:`netflow-config`,describe:`Operations for sites.netflow-config`,builder:e=>e.command(ia).command(oa).command(ca).command(ua).command(fa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ma(e){return e.usage(`$0 magic-transit sites update <site-id>
|
|
373
373
|
|
|
374
|
-
Update a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ha={command:`update <site-id>`,describe:`Update Site`,builder:ma,handler:async r=>c({command:`magic-transit sites update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
374
|
+
Update a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ha={command:`update <site-id>`,describe:`Update Site`,builder:ma,handler:async r=>c({command:`magic-transit sites update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({connector_id:p(r[`connector-id`],`connector-id`,`text`),description:p(r.description,`description`,`text`),location:{lat:p(r[`location-lat`],`location-lat`,`text`),lon:p(r[`location-lon`],`location-lon`,`text`)},name:p(r.name,`name`,`text`),secondary_connector_id:p(r[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.update({body:e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Updated`});return}let d=f({connector_id:p(r[`connector-id`],`connector-id`,`text`),description:p(r.description,`description`,`text`),location:{lat:p(r[`location-lat`],`location-lat`,`text`),lon:p(r[`location-lon`],`location-lon`,`text`)},name:p(r.name,`name`,`text`),secondary_connector_id:p(r[`secondary-connector-id`],`secondary-connector-id`,`text`)});a(await s(`Updating`,async()=>c.magicTransit.sites.update({body:d,account_id:l,site_id:r[`site-id`]})),{successLabel:`Updated`})})};function ga(e){return e.usage(`$0 magic-transit sites wans create <site-id>
|
|
375
375
|
|
|
376
|
-
Creates a new Site WAN.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`,`static-addressing-gateway-address`].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 --static_addressing-* flag is set`)}return!0})}const _a={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:ga,handler:async r=>c({command:`magic-transit sites wans create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
376
|
+
Creates a new Site WAN.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`,`static-addressing-gateway-address`].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 --static_addressing-* flag is set`)}return!0})}const _a={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:ga,handler:async r=>c({command:`magic-transit sites wans create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/wans`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({name:p(r.name,`name`,`text`),physport:r.physport,priority:r.priority,static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(r[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:r[`vlan-tag`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.sites.wans.create({...e,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`});return}if(r.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let d=f({name:p(r.name,`name`,`text`),physport:r.physport,priority:r.priority,static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(r[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:r[`vlan-tag`]});a(await s(`Creating`,async()=>c.magicTransit.sites.wans.create({...d,account_id:l,site_id:r[`site-id`]})),{successLabel:`Created`})})};function va(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
|
|
377
377
|
|
|
378
|
-
Remove a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ya={command:`delete <wan-id>`,describe:`Delete Site WAN`,builder:va,handler:async r=>c({command:`magic-transit sites wans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
378
|
+
Remove a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ya={command:`delete <wan-id>`,describe:`Delete Site WAN`,builder:va,handler:async r=>c({command:`magic-transit sites wans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/wans/${r[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(r[`wan-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"wan-id":String(r[`wan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
379
379
|
`);return}a(await s(`Deleting`,async()=>c.magicTransit.sites.wans.delete({account_id:l,site_id:r[`site-id`],wan_id:r[`wan-id`]})),{successLabel:`Deleted`})})};function ba(e){return e.usage(`$0 magic-transit sites wans edit <wan-id>
|
|
380
380
|
|
|
381
|
-
Patch a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`,`static-addressing-gateway-address`].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 --static_addressing-* flag is set`)}return!0})}const xa={command:`edit <wan-id>`,describe:`Patch Site WAN`,builder:ba,handler:async r=>c({command:`magic-transit sites wans edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
381
|
+
Patch a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`,`static-addressing-gateway-address`].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 --static_addressing-* flag is set`)}return!0})}const xa={command:`edit <wan-id>`,describe:`Patch Site WAN`,builder:ba,handler:async r=>c({command:`magic-transit sites wans edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/wans/${r[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(r[`wan-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"wan-id":String(r[`wan-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({name:p(r.name,`name`,`text`),physport:r.physport,priority:r.priority,static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(r[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:r[`vlan-tag`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.wans.edit({body:e,account_id:l,site_id:r[`site-id`],wan_id:r[`wan-id`]})),{successLabel:`Updated`});return}let d=f({name:p(r.name,`name`,`text`),physport:r.physport,priority:r.priority,static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(r[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:r[`vlan-tag`]});a(await s(`Updating`,async()=>c.magicTransit.sites.wans.edit({body:d,account_id:l,site_id:r[`site-id`],wan_id:r[`wan-id`]})),{successLabel:`Updated`})})};function Sa(e){return e.usage(`$0 magic-transit sites wans get <wan-id>
|
|
382
382
|
|
|
383
|
-
Get a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ca={command:`get <wan-id>`,describe:`Site WAN Details`,builder:Sa,handler:async r=>c({command:`magic-transit sites wans get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
383
|
+
Get a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ca={command:`get <wan-id>`,describe:`Site WAN Details`,builder:Sa,handler:async r=>c({command:`magic-transit sites wans get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/wans/${r[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(r[`wan-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"wan-id":String(r[`wan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.sites.wans.get({account_id:l,site_id:r[`site-id`],wan_id:r[`wan-id`]})),{successLabel:`Loaded`})})};function wa(e){return e.usage(`$0 magic-transit sites wans list
|
|
384
384
|
|
|
385
|
-
Lists Site WANs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ta={command:`list`,describe:`List Site WANs`,builder:wa,handler:async r=>c({command:`magic-transit sites wans list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
385
|
+
Lists Site WANs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ta={command:`list`,describe:`List Site WANs`,builder:wa,handler:async r=>c({command:`magic-transit sites wans list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/wans`,pathParams:{"site-id":String(r[`site-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.magicTransit.sites.wans.list({account_id:l,site_id:r[`site-id`]})),{successLabel:`Loaded`})})};function Ea(e){return e.usage(`$0 magic-transit sites wans update <wan-id>
|
|
386
386
|
|
|
387
|
-
Update a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`,`static-addressing-gateway-address`].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 --static_addressing-* flag is set`)}return!0})}const Da={command:`update <wan-id>`,describe:`Update Site WAN`,builder:Ea,handler:async r=>c({command:`magic-transit sites wans update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
387
|
+
Update a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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([`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`,`static-addressing-gateway-address`].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 --static_addressing-* flag is set`)}return!0})}const Da={command:`update <wan-id>`,describe:`Update Site WAN`,builder:Ea,handler:async r=>c({command:`magic-transit sites wans update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit sites wans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/magic/sites/${r[`site-id`]==null?`<site-id>`:encodeURIComponent(String(r[`site-id`]))}/wans/${r[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(r[`wan-id`]))}`,pathParams:{"site-id":String(r[`site-id`]??``),"wan-id":String(r[`wan-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({name:p(r.name,`name`,`text`),physport:r.physport,priority:r.priority,static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(r[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:r[`vlan-tag`]}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicTransit.sites.wans.update({body:e,account_id:l,site_id:r[`site-id`],wan_id:r[`wan-id`]})),{successLabel:`Updated`});return}let d=f({name:p(r.name,`name`,`text`),physport:r.physport,priority:r.priority,static_addressing:{address:p(r[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(r[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(r[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:r[`vlan-tag`]});a(await s(`Updating`,async()=>c.magicTransit.sites.wans.update({body:d,account_id:l,site_id:r[`site-id`],wan_id:r[`wan-id`]})),{successLabel:`Updated`})})},Oa={command:`wans`,describe:`Operations for sites.wans`,builder:e=>e.command(_a).command(ya).command(xa).command(Ca).command(Ta).command(Da).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ka={command:`sites`,describe:`Magic WAN branch sites — base CRUD, LAN/WAN interface configuration, ACLs, connectors, app configuration, and NetFlow config`,builder:e=>e.command(Fi).command(Li).command(zi).command(Vi).command(na).command(ha).command(Si).command(Ni).command(ea).command(pa).command(Oa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Aa={command:`magic-transit`,describe:`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,builder:e=>e.command(I).command(Rt).command(Yt).command(sn).command(fn).command(xn).command(Bn).command($n).command(gr).command(Lr).command(Jr).command(li).command(ka).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Aa as default};
|