cf 1.0.0-beta.18 → 1.0.0-beta.19

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.
Files changed (281) hide show
  1. package/README.md +7 -0
  2. package/dist/_meta/commands.json +3003 -1544
  3. package/dist/_meta/hand-written-commands.json +6 -0
  4. package/dist/_meta/schemas.json +2127 -1070
  5. package/dist/{abuse-reports-Ce-g5uZP.mjs → abuse-reports-DhgunVFo.mjs} +3 -3
  6. package/dist/{access-BtsMwesh.mjs → access-BDoDq_WZ.mjs} +1 -1
  7. package/dist/{accounts-X5QVzEUW.mjs → accounts-DLTCzZJg.mjs} +24 -26
  8. package/dist/{acm-C_NepMi6.mjs → acm-DS1CosYq.mjs} +1 -1
  9. package/dist/{addressing-BkQY1hoA.mjs → addressing-DFeYj8TY.mjs} +2 -2
  10. package/dist/{agent-memory-1OPgC3lK.mjs → agent-memory-DXjQ8N0g.mjs} +1 -1
  11. package/dist/{ai-Bb0_Zknm.mjs → ai-V5YopMkS.mjs} +4 -4
  12. package/dist/{ai-audit-DuEjVdML.mjs → ai-audit-yg8D0azz.mjs} +2 -2
  13. package/dist/{ai-gateway-Cm2vWMSI.mjs → ai-gateway--dkH9qGz.mjs} +13 -13
  14. package/dist/ai-search-BRtsUaUI.mjs +79 -0
  15. package/dist/{ai-security-A2STvE1b.mjs → ai-security-DRJCcLpF.mjs} +1 -1
  16. package/dist/{alerting-CIwSk-Ks.mjs → alerting-8DsyMKGG.mjs} +30 -30
  17. package/dist/{analytics-H--uM3DA.mjs → analytics-BpYUZTtQ.mjs} +1 -1
  18. package/dist/{analytics-engine-Alu7cllT.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
  19. package/dist/{api-security-D-pcnhUL.mjs → api-security-CBhWZE8z.mjs} +6 -6
  20. package/dist/{argo-Lvmcx3am.mjs → argo-B0u2N3Dh.mjs} +1 -1
  21. package/dist/{artifacts-xT5S-mVa.mjs → artifacts-B6XzjMiM.mjs} +1 -1
  22. package/dist/{audit-logs-DEoRBLkU.mjs → audit-logs-59fCc1aw.mjs} +1 -1
  23. package/dist/auth-5cgi8ePZ.mjs +2 -0
  24. package/dist/auth-BaUNb1Ed.mjs +2 -0
  25. package/dist/auth-ChYOc_rS.mjs +2 -0
  26. package/dist/{auth-token-D9XIPlwf.mjs → auth-token-B1pP2jaK.mjs} +1 -1
  27. package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
  28. package/dist/{basin-catalog-DFHt3cWi.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
  29. package/dist/{billing-Bm2JNSGa.mjs → billing-Ad-rK-JH.mjs} +3 -3
  30. package/dist/{blocks-Bat9A8V_.mjs → blocks-CKb_aLWN.mjs} +1 -1
  31. package/dist/body-parser-ChnyBsfm.mjs +2 -0
  32. package/dist/{bot-management-CSr38g-O.mjs → bot-management-CGpfjQ4w.mjs} +1 -1
  33. package/dist/{botnet-feed-ebeWWSJj.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
  34. package/dist/{brand-protection-BCn9Mv-d.mjs → brand-protection-CP73_yX8.mjs} +1 -1
  35. package/dist/{browser-run-BcWxzhAn.mjs → browser-run-OpUfawh_.mjs} +21 -21
  36. package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
  37. package/dist/build-DQZ2w_dQ.mjs +2 -0
  38. package/dist/{builds-BMwDzi7G.mjs → builds-DsRNlILV.mjs} +39 -39
  39. package/dist/{cache-_VaTLC5T.mjs → cache-RppXjxXA.mjs} +3 -3
  40. package/dist/{cf-Bq4pA4n6.mjs → cf-PISMdEje.mjs} +11 -11
  41. package/dist/{chunk-2HLTAS5V-D7COzUOd.mjs → chunk-2HLTAS5V-B92NbX1j.mjs} +1 -1
  42. package/dist/{chunk-2K52M2W5-CYxfQXUq.mjs → chunk-2K52M2W5-c__08AOB.mjs} +7 -7
  43. package/dist/chunk-DSGVRFIS-DfQO1boa.mjs +2 -0
  44. package/dist/{cli-P3q5DG3W.mjs → cli-Dd1n2YAJ.mjs} +1 -1
  45. package/dist/{client-side-security-CjSXrpa9.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
  46. package/dist/{cloud-connector-BPJBeP06.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
  47. package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
  48. package/dist/{cloudforce-one-DXX31GMi.mjs → cloudforce-one-C1xdpspb.mjs} +200 -210
  49. package/dist/{command-Bkc04OyY.mjs → command-BioiZMm9.mjs} +1 -1
  50. package/dist/{command-BbsPxJBT.mjs → command-C0nJ2LRd.mjs} +1 -1
  51. package/dist/{command-DDcBC4px.mjs → command-C5ARgURy.mjs} +1 -1
  52. package/dist/{command-CL7LLXM7.mjs → command-C7NIRU-u.mjs} +1 -1
  53. package/dist/{command-BXiA79DP.mjs → command-C8DV-x_C.mjs} +1 -1
  54. package/dist/{command-BtTc28ql.mjs → command-CFV1cqfR.mjs} +1 -1
  55. package/dist/{command-NoxvOARP.mjs → command-ChQXv0jP.mjs} +1 -1
  56. package/dist/{command-DCQgsd2U.mjs → command-D203VrTG.mjs} +1 -1
  57. package/dist/{command-DZfKHiru.mjs → command-D5BUzDX8.mjs} +1 -1
  58. package/dist/{command-CBZhxmKD.mjs → command-DWE7YdeC.mjs} +1 -1
  59. package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
  60. package/dist/{command-CxWLFv5Y.mjs → command-DmPQXNRg.mjs} +1 -1
  61. package/dist/{command-Bgb-3yPg.mjs → command-F0jlqvKr.mjs} +1 -1
  62. package/dist/{command-DppVezAB.mjs → command-FOQNhNqP.mjs} +1 -1
  63. package/dist/{command-CYyfigfC.mjs → command-yAXk5NXh.mjs} +1 -1
  64. package/dist/{completions-CrDmwKnK.mjs → completions-Bh0Hz-hA.mjs} +3 -3
  65. package/dist/{connector-interrupts-V4HGULCM.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-D9mTcfbJ.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-COrPVKol.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
  68. package/dist/{connectors-DvVlxGDx.mjs → connectors-RUEU1QDB.mjs} +1 -1
  69. package/dist/containers-xU-0EhLO.mjs +78 -0
  70. package/dist/{containers-BtcOgwm5.mjs → containers-yUOvm-4V.mjs} +211 -211
  71. package/dist/{content-scan-DldLmTjy.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
  72. package/dist/{context-C_a8oSY9.mjs → context-BQ6KeMgq.mjs} +2 -2
  73. package/dist/{cps-REo1OWP1.mjs → cps-CgPduy0H.mjs} +1 -1
  74. package/dist/{csam-scanner-CIbbdoJK.mjs → csam-scanner-B0Ra6fXL.mjs} +1 -1
  75. package/dist/{custom-csrs-iGNc3rSZ.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
  76. package/dist/{custom-hostnames-BNxYbTyu.mjs → custom-hostnames-Dzov_CPw.mjs} +15 -15
  77. package/dist/{custom-nameservers-BMJoTSlQ.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
  78. package/dist/{custom-pages-Qdemt1Fm.mjs → custom-pages-DxVD_f10.mjs} +1 -1
  79. package/dist/{d1-DvCiQibO.mjs → d1-D7p4uJ-e.mjs} +10 -12
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-K664XPOb.mjs → deploy-BjWvVZol.mjs} +1 -1
  82. package/dist/deploy-context-C-ZdGP0Z.mjs +56 -0
  83. package/dist/{deploy-input-KK6yyBN_.mjs → deploy-input-B8Nq6Eh6.mjs} +1 -1
  84. package/dist/{dev-CnoMHxf4.mjs → dev-D20UkcYT.mjs} +1 -1
  85. package/dist/{diagnostics-Cw0mtcep.mjs → diagnostics-DdhTemYB.mjs} +1 -1
  86. package/dist/{dialog-D4Y9ocuF.mjs → dialog-BnIgdgWi.mjs} +1 -1
  87. package/dist/discover-DEjUARkU.mjs +2 -0
  88. package/dist/{dist-DZRTPMMA.mjs → dist-CnKd5XoR.mjs} +19 -19
  89. package/dist/{dist-uRuGmkMB.mjs → dist-DAeCUX-u.mjs} +3 -3
  90. package/dist/{dls-DoqfqutH.mjs → dls-BBODA9Rk.mjs} +1 -1
  91. package/dist/{dns-DC6WcO3m.mjs → dns-CK_hyn5q.mjs} +5 -5
  92. package/dist/{dns-firewall-DpQH9BCE.mjs → dns-firewall-DbvX9R-7.mjs} +1 -1
  93. package/dist/{docs-CqNRBHab.mjs → docs-BDTijwM3.mjs} +1 -1
  94. package/dist/{dot-prop-IITUZ2XW-BnPfnQkb.mjs → dot-prop-IITUZ2XW-C4pkmT-K.mjs} +1 -1
  95. package/dist/{dotenv-usOKkeW7.mjs → dotenv-Ck-6V1hm.mjs} +1 -1
  96. package/dist/{dry-run-C2KjGX10.mjs → dry-run-DQmFkNK_.mjs} +1 -1
  97. package/dist/{durable-objects-CJDDy3CC.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
  98. package/dist/{email-auth--NHg1TjG.mjs → email-auth-BEgDxU-g.mjs} +1 -1
  99. package/dist/{email-routing-COjENK55.mjs → email-routing-DKWmPOVo.mjs} +1 -1
  100. package/dist/{email-security-rdjH95T2.mjs → email-security-RWbAp8qa.mjs} +15 -15
  101. package/dist/{email-sending-26VJhR6Q.mjs → email-sending-BbJy_vl8.mjs} +1 -1
  102. package/dist/error-sanitization-Byb-_IS9.mjs +2 -0
  103. package/dist/{error-sanitization-pOyzm2F1.mjs → error-sanitization-DWJ5ka7h.mjs} +1 -1
  104. package/dist/{field-extractors-DBOvGOwz.mjs → field-extractors-Bob6udAc.mjs} +1 -1
  105. package/dist/{firewall-D8K93ffF.mjs → firewall-DziiEsR8.mjs} +1 -1
  106. package/dist/{flagship-CHdmCmvQ.mjs → flagship-xOtgddUK.mjs} +1 -1
  107. package/dist/{fraud-CY4TV5Vc.mjs → fraud-BUS7i5Yh.mjs} +1 -1
  108. package/dist/generate-D6V4Q58z.mjs +2 -0
  109. package/dist/get-BTisquA3.mjs +2 -0
  110. package/dist/{google-tag-gateway-DzSt4wlz.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
  111. package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
  112. package/dist/{healthchecks-B52Mf3uL.mjs → healthchecks-CbD2PsnM.mjs} +1 -1
  113. package/dist/{hyperdrive-CHsW0r6Z.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
  114. package/dist/{iam-o1n9eUXf.mjs → iam-DvsCztqU.mjs} +5 -5
  115. package/dist/{images-CJHAGxX6.mjs → images-BipVjHNw.mjs} +1 -1
  116. package/dist/index.mjs +1 -1
  117. package/dist/init-LvFgCsNX.mjs +43 -0
  118. package/dist/{intel-B3S1gxUg.mjs → intel-D1LPkkBM.mjs} +31 -41
  119. package/dist/{interactive-BW9T1D1q.mjs → interactive-d_lFnSev.mjs} +3 -3
  120. package/dist/interactive-pjVqirHx.mjs +2 -0
  121. package/dist/{ips-q_UJMiy8.mjs → ips-2iUGs8ws.mjs} +1 -1
  122. package/dist/{k2-BNqVZnDN.mjs → k2-DGzRm3NJ.mjs} +1 -1
  123. package/dist/{kv-B0nXSOcW.mjs → kv-BW-s9MJY.mjs} +4 -4
  124. package/dist/{lazy-command-4ccdBqrc.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
  125. package/dist/{leaked-credential-checks-BXwIjlTs.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
  126. package/dist/{load-balancers-DJtMztJ0.mjs → load-balancers-CtnusAzP.mjs} +1 -1
  127. package/dist/{local-Dil4fTWX.mjs → local-B4sZZTRA.mjs} +1 -1
  128. package/dist/local-DCnFIgLJ.mjs +2 -0
  129. package/dist/{local-runtime-B7TKFu6E.mjs → local-runtime-DoBuyriC.mjs} +1 -1
  130. package/dist/login-CqZJgUF1.mjs +5 -0
  131. package/dist/{login-D-1FiBNv.mjs → login-DR60WiAY.mjs} +1 -1
  132. package/dist/{logo-matches-qVYq8tWL.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
  133. package/dist/{logos-tnIahhcu.mjs → logos-Yzhd-VKb.mjs} +2 -2
  134. package/dist/{logpush-D4s3pJRw.mjs → logpush-JYG4gXZ-.mjs} +3 -3
  135. package/dist/{logs-cw7UL5V2.mjs → logs-DLblEjK0.mjs} +1 -1
  136. package/dist/{magic-cloud-networking-CLEHztNY.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
  137. package/dist/{magic-network-monitoring-DRwygeVq.mjs → magic-network-monitoring-D2px4Ep4.mjs} +3 -3
  138. package/dist/{magic-transit-BFopRdPs.mjs → magic-transit-Bnwsi0UQ.mjs} +61 -61
  139. package/dist/{managed-defense-D5kpmq0T.mjs → managed-defense-CTtNoxzW.mjs} +3 -3
  140. package/dist/{managed-transforms-CT4jjnzJ.mjs → managed-transforms-B92mJi5i.mjs} +1 -1
  141. package/dist/{matches-ClJ_24EY.mjs → matches-CzbL1XD-.mjs} +1 -1
  142. package/dist/{mcp-50os3IRG.mjs → mcp-Cic_aMer.mjs} +1 -1
  143. package/dist/{mesh-jxtQP8sS.mjs → mesh-DZTgD16C.mjs} +14 -14
  144. package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
  145. package/dist/{monetization-D6cCDi-h.mjs → monetization-DCQ2_niU.mjs} +1 -1
  146. package/dist/{network-dnWHB2uY.mjs → network-BqMqD2qn.mjs} +1 -1
  147. package/dist/{network-interconnects-Cf8qSVdt.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
  148. package/dist/{o11y-oMSg1pG4.mjs → o11y-CS5q1vSh.mjs} +5 -5
  149. package/dist/oauth-DPLYUvRl.mjs +2 -0
  150. package/dist/oauth-DdYSPYoE.mjs +4 -0
  151. package/dist/{oauth-clients-XDmoe-b4.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
  152. package/dist/{oauth-scopes-D9VYGuTs.mjs → oauth-scopes-CLOKfQi2.mjs} +1 -1
  153. package/dist/{open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs → open-PCXX3ZDZ-5J5IU2MX-DFe2CQkm.mjs} +1 -1
  154. package/dist/{open-PCXX3ZDZ-D55O2jpQ.mjs → open-PCXX3ZDZ-BD2iNJqn.mjs} +1 -1
  155. package/dist/{organization-94lHeeOs.mjs → organization-DFRN2g6z.mjs} +1 -1
  156. package/dist/{organizations-BJf3UTFi.mjs → organizations-yiGopnKf.mjs} +1 -1
  157. package/dist/{origin-post-quantum-encryption-DMytVSUZ.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
  158. package/dist/output-O6b9MR9R.mjs +2 -0
  159. package/dist/{page-rules-BUI-50oz.mjs → page-rules-F1Jdxx6A.mjs} +1 -1
  160. package/dist/{pages-CcdpCzHs.mjs → pages-CezC0YrR.mjs} +2 -2
  161. package/dist/{pay-per-crawl-B1uHZn9j.mjs → pay-per-crawl-fZ-kTBbN.mjs} +2 -2
  162. package/dist/{pay-per-use-t066I5wm.mjs → pay-per-use-B14BTKVI.mjs} +2 -2
  163. package/dist/{pipelines-Co6S044l.mjs → pipelines-BN7ydBHl.mjs} +5 -5
  164. package/dist/{precursor-BftyvS86.mjs → precursor-B88RDDZT.mjs} +2 -2
  165. package/dist/previews-CiqRIq_k.mjs +7 -0
  166. package/dist/process-DiXf4VPi.mjs +2 -0
  167. package/dist/{progress-Q5w9PNTT.mjs → progress-CdlDthXA.mjs} +1 -1
  168. package/dist/{prompt-C0hKSr-R.mjs → prompt-1AC-qwxS.mjs} +1 -1
  169. package/dist/{queries-4MubO6Sz.mjs → queries-C2sgUI9j.mjs} +1 -1
  170. package/dist/{queues-CteS5M92.mjs → queues-DCP5x-PZ.mjs} +1 -1
  171. package/dist/{r2-2QpT_Gso.mjs → r2-D7UhzWR7.mjs} +26 -26
  172. package/dist/{radar-ODKaK4FJ.mjs → radar-osOiFeY_.mjs} +1 -1
  173. package/dist/{raw-fetch-CEOuoKl9.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
  174. package/dist/{realtime-DkfU8uEX.mjs → realtime-DCnqxiWo.mjs} +90 -87
  175. package/dist/{registrar-DM6JTVPS.mjs → registrar-DAFYjjRa.mjs} +8 -8
  176. package/dist/{registrar-sandbox-BPNGf65G.mjs → registrar-sandbox-zeNHABZ0.mjs} +4 -4
  177. package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
  178. package/dist/{reporting-5yFNXbJg.mjs → reporting-KehV_PXm.mjs} +1 -1
  179. package/dist/{request-headers-DXvswze2.mjs → request-headers-ojAw3pQO.mjs} +1 -1
  180. package/dist/{request-tracers-BarLZY95.mjs → request-tracers-BStCgh6m.mjs} +1 -1
  181. package/dist/resolve-BGNMAcGR.mjs +2 -0
  182. package/dist/{resource-sharing-BVEwBPs8.mjs → resource-sharing-3xtSgWG7.mjs} +3 -3
  183. package/dist/{rules-_C31X4Jz.mjs → rules-7F-G2Bg_.mjs} +3 -3
  184. package/dist/{rulesets-8RwxoFhG.mjs → rulesets-B0YtS2br.mjs} +20 -20
  185. package/dist/{rum-CAUcpXpM.mjs → rum-B3V6tqS-.mjs} +1 -1
  186. package/dist/{run-DtFLvOHB.mjs → run-B_07PrkW.mjs} +1 -1
  187. package/dist/run-D6AJfZT-.mjs +2 -0
  188. package/dist/{schema-S3pUZwpI.mjs → schema-C-tyhSnb.mjs} +1 -1
  189. package/dist/{schema-flags-DibfxEF6.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
  190. package/dist/{scim-DX5XrQ4w.mjs → scim-CQ9TdajH.mjs} +6 -6
  191. package/dist/{secrets-store-DSqqrr25.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
  192. package/dist/{security-insights-FSktO04S.mjs → security-insights-BsLMdo1r.mjs} +2 -2
  193. package/dist/{security-txt-D2g3lQdg.mjs → security-txt-pCAiHvys.mjs} +1 -1
  194. package/dist/session-BsNzFtPi.mjs +2 -0
  195. package/dist/shared-CWBjMZDR.mjs +2 -0
  196. package/dist/{smart-shield-IVb2sR0C.mjs → smart-shield-BTXQsVxz.mjs} +1 -1
  197. package/dist/{snippets-cWwWficN.mjs → snippets-CYVieyc3.mjs} +2 -2
  198. package/dist/source-AlTrHNem.mjs +6 -0
  199. package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
  200. package/dist/{spectrum-DYiIBYRB.mjs → spectrum-DLRr4Q03.mjs} +14 -14
  201. package/dist/{speed-C7uiW2Wf.mjs → speed-BJfaDYxz.mjs} +13 -13
  202. package/dist/sql-DQ4xrdc2.mjs +4 -0
  203. package/dist/src-BnMvFE3q.mjs +125 -0
  204. package/dist/{ssl-xQP_HbWN.mjs → ssl-CL1B69Pw.mjs} +1 -1
  205. package/dist/startup-profile-DuaJFX1y.mjs +2 -0
  206. package/dist/startup-profile-HMblAiBi.mjs +29 -0
  207. package/dist/{state-Boubf1X6.mjs → state-DN9yfd2C.mjs} +1 -1
  208. package/dist/state-DePlO0Kv.mjs +2 -0
  209. package/dist/{stream-CfWgj8Cr.mjs → stream-DrMZOO5u.mjs} +17 -17
  210. package/dist/{submit-DxGr1T40.mjs → submit-DjlLoVk2.mjs} +1 -1
  211. package/dist/{tags-LEJ2VYhQ.mjs → tags-DY7Ur1k-.mjs} +4 -4
  212. package/dist/{telemetry-BHne10Yy.mjs → telemetry-BG3kcYsV.mjs} +1 -1
  213. package/dist/telemetry-Dpm6GfZD.mjs +2 -0
  214. package/dist/{tenant-7d5vwc6K.mjs → tenant-BEMfNMjO.mjs} +1 -1
  215. package/dist/{tenant-custom-nameservers-BkxlPr5O.mjs → tenant-custom-nameservers-CCRbb0ch.mjs} +1 -1
  216. package/dist/{tools-BCCRUENY.mjs → tools-ZffhHUDd.mjs} +1 -1
  217. package/dist/tunnels-_JXe-UgM.mjs +29 -0
  218. package/dist/{turnstile-DhLkdhij.mjs → turnstile-DXEfneQq.mjs} +1 -1
  219. package/dist/ui-CY79jlGZ.mjs +2 -0
  220. package/dist/update-check-DfbYVefm.mjs +2 -0
  221. package/dist/{update-check-wvjOsnGK.mjs → update-check-atcehhBC.mjs} +1 -1
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-CeoV5dBc.mjs → url-info-B1kL9asc.mjs} +1 -1
  224. package/dist/{url-normalization-9NoaoRNh.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
  225. package/dist/{url-scanner-w_-Sumz-.mjs → url-scanner-OnZP_-jm.mjs} +2 -2
  226. package/dist/{user-D33B3alX.mjs → user-BBBuFNj4.mjs} +1 -1
  227. package/dist/{vectorize-Wp9De13y.mjs → vectorize-DcctB8bw.mjs} +3 -3
  228. package/dist/version-CLgSHoNm.mjs +2 -0
  229. package/dist/{waiting-rooms-BE8FloRd.mjs → waiting-rooms-JaFE5wP1.mjs} +2 -2
  230. package/dist/{web-assets-ew0iaP7c.mjs → web-assets-Cu0swUPe.mjs} +10 -10
  231. package/dist/{web3-BUyXBaqq.mjs → web3-C67z4OtQ.mjs} +1 -1
  232. package/dist/{workers-pP5tsDbD.mjs → workers-ClTP0Ysl.mjs} +5 -5
  233. package/dist/{workers-builds-DzU9NGno.mjs → workers-builds-C5wKhvKe.mjs} +7 -7
  234. package/dist/{workers-for-platforms-B4xzFNxJ.mjs → workers-for-platforms-rxwkYyb3.mjs} +5 -5
  235. package/dist/{workers-vpc-Bre_t9Al.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
  236. package/dist/{workflows-DXYGKtqq.mjs → workflows-COJ5jwvk.mjs} +24 -24
  237. package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
  238. package/dist/{zaraz-DoH4QD0u.mjs → zaraz-BkZ7yW05.mjs} +2 -2
  239. package/dist/{zero-trust-DKt20rzE.mjs → zero-trust-lUFLYuL1.mjs} +496 -444
  240. package/dist/{zone-BXM3p0JR.mjs → zone-CC1_qxt-.mjs} +1 -1
  241. package/dist/{zones-CJdtqEBx.mjs → zones-BRiLlTmW.mjs} +37 -28
  242. package/package.json +11 -11
  243. package/dist/ai-search-DDRpxyOM.mjs +0 -79
  244. package/dist/auth-B73lQS2h.mjs +0 -2
  245. package/dist/auth-DMzEmOhG.mjs +0 -2
  246. package/dist/auth-Db1KT0vm.mjs +0 -2
  247. package/dist/body-parser-DnBfDdx3.mjs +0 -2
  248. package/dist/build-BRJnyeu8.mjs +0 -2
  249. package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
  250. package/dist/containers-Bt2zFsFd.mjs +0 -78
  251. package/dist/deploy-context-ClNVJYlR.mjs +0 -56
  252. package/dist/discover-DIDEGKo3.mjs +0 -2
  253. package/dist/error-sanitization-CIQOep3I.mjs +0 -2
  254. package/dist/generate-D80-1GnZ.mjs +0 -2
  255. package/dist/get-By1q8YlI.mjs +0 -2
  256. package/dist/hostnames-BMITIM8P.mjs +0 -11
  257. package/dist/init-CqQDL6i3.mjs +0 -43
  258. package/dist/interactive-DGUWZ2Gk.mjs +0 -2
  259. package/dist/local-DxWDQDnG.mjs +0 -2
  260. package/dist/login-chQP8825.mjs +0 -5
  261. package/dist/oauth-BfBdHhPS.mjs +0 -4
  262. package/dist/oauth-DDOiiH7h.mjs +0 -2
  263. package/dist/output-Co4xdFf6.mjs +0 -2
  264. package/dist/previews-BLhnhElx.mjs +0 -7
  265. package/dist/process-2wmDCy17.mjs +0 -2
  266. package/dist/resolve-BpgXeklt.mjs +0 -2
  267. package/dist/run-LcOb9rhI.mjs +0 -2
  268. package/dist/session-Cq3YNLoI.mjs +0 -2
  269. package/dist/shared-eefMO8R4.mjs +0 -2
  270. package/dist/source-mXUcrTVw.mjs +0 -6
  271. package/dist/sql-TGV8qQMj.mjs +0 -4
  272. package/dist/src-BUH-P_zd.mjs +0 -125
  273. package/dist/startup-profile-BOaseXnO.mjs +0 -29
  274. package/dist/startup-profile-BwEZFVGS.mjs +0 -2
  275. package/dist/state-CODDG9Nx.mjs +0 -2
  276. package/dist/telemetry-BavSU4ku.mjs +0 -2
  277. package/dist/tunnels-DlGODvwT.mjs +0 -29
  278. package/dist/ui-BtIBQeaG.mjs +0 -2
  279. package/dist/update-check-nLfkSfdz.mjs +0 -2
  280. package/dist/version-B2RUUqGT.mjs +0 -2
  281. package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{a as u,i as d,n as f,r as p,t as m}from"./body-parser-DnBfDdx3.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-C0hKSr-R.mjs";import{n as ee,t as te}from"./raw-fetch-CEOuoKl9.mjs";var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function re(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-1AC-qwxS.mjs";import{n as ee,t as te}from"./raw-fetch-1VlXDwwX.mjs";var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function re(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
3
3
 
4
4
  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 ie={command:`bulk-delete`,describe:`Delete all DNS Protection rules.`,builder:re,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
5
5
  `);return}let u=await c(`Deleting`,async()=>n.send(ne,{account_id:l}));o(u,{successLabel:`Deleted`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,body:`json`};function ae(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
6
6
 
7
- 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 oe={command:`create`,describe:`Create DNS Protection rule.`,builder:ae,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`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'.`)),e[`profile-sensitivity`]===void 0&&(e[`profile-sensitivity`]=await g(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let u=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),d=await c(`Creating`,async()=>n.send(y,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var se={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function ce(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete <rule-id>
7
+ 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 oe={command:`create`,describe:`Create DNS Protection rule.`,builder:ae,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`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'.`)),e[`profile-sensitivity`]===void 0&&(e[`profile-sensitivity`]=await g(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let u=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(y,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var se={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function ce(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete <rule-id>
8
8
 
9
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 le={command:`delete <rule-id>`,describe:`Delete DNS Protection rule.`,builder:ce,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
10
10
  `);return}let u=await c(`Deleting`,async()=>n.send(se,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function de(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules get <rule-id>
@@ -13,12 +13,12 @@ Get a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{t
13
13
 
14
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 he={command:`list`,describe:`List all DNS Protection rules.`,builder:me,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(pe,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ge={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`,body:`json`};function _e(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 ve={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:_e,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ge,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),d=await c(`Updating`,async()=>n.send(ge,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(d,{successLabel:`Updated`})})},ye={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(ie).command(oe).command(le).command(fe).command(he).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`};function Te(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist bulk-delete
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 ve={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:_e,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(ge,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(ge,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},ye={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(ie).command(oe).command(le).command(fe).command(he).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`};function Te(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist bulk-delete
17
17
 
18
18
  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 Ee={command:`bulk-delete`,describe:`Delete all allowlist prefixes.`,builder:Te,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
19
19
  `);return}let u=await c(`Deleting`,async()=>n.send(we,{account_id:l}));o(u,{successLabel:`Deleted`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`,body:`json`};function De(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist create
20
20
 
21
- 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 Oe={command:`create`,describe:`Create allowlist prefix.`,builder:De,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled,prefix:h(e.prefix,`prefix`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(b,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.comment===void 0&&(e.comment=await g(`comment`,`An comment describing the allowlist prefix.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.prefix===void 0&&(e.prefix=await g(`prefix`,`The allowlist prefix to add in CIDR format.`));let u=m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled,prefix:h(e.prefix,`prefix`,`text`)}),d=await c(`Creating`,async()=>n.send(b,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function Ae(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist list
21
+ 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 Oe={command:`create`,describe:`Create allowlist prefix.`,builder:De,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled,prefix:h(e.prefix,`prefix`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(b,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.comment===void 0&&(e.comment=await g(`comment`,`An comment describing the allowlist prefix.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.prefix===void 0&&(e.prefix=await g(`prefix`,`The allowlist prefix to add in CIDR format.`));let u=m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled,prefix:h(e.prefix,`prefix`,`text`)}),f=await c(`Creating`,async()=>n.send(b,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function Ae(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist list
22
22
 
23
23
  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 je={command:`list`,describe:`List all allowlist prefixes.`,builder:Ae,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ke,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Me={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist/${t.prefix_id}`};function Ne(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix delete <prefix-id>
24
24
 
@@ -27,14 +27,14 @@ Delete the allowlist prefix for an account given a UUID.`).positional(`prefix-id
27
27
 
28
28
  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 Le={command:`get <prefix-id>`,describe:`Get allowlist prefix.`,builder:Ie,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Fe,{account_id:l,prefix_id:e[`prefix-id`]}));o(u,{successLabel:`Loaded`})})};var x={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist/${t.prefix_id}`,body:`json`};function Re(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix 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 ze={command:`update <prefix-id>`,describe:`Update allowlist prefix.`,builder:Re,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(x,{body:t,account_id:l,prefix_id:e[`prefix-id`]}));o(r,{successLabel:`Updated`});return}let u=m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled}),d=await c(`Updating`,async()=>n.send(x,{body:u,account_id:l,prefix_id:e[`prefix-id`]}));o(d,{successLabel:`Updated`})})},Be={command:`prefix`,describe:`Operations for advanced-tcp-protection.configs.allowlist.prefix`,builder:e=>e.command(Pe).command(Le).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ve={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist`,builder:e=>e.command(Ee).command(Oe).command(je).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var He={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`};function Ue(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk-delete
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 ze={command:`update <prefix-id>`,describe:`Update allowlist prefix.`,builder:Re,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(x,{body:t,account_id:l,prefix_id:e[`prefix-id`]}));o(r,{successLabel:`Updated`});return}let u=m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled}),f=await c(`Updating`,async()=>n.send(x,{body:u,account_id:l,prefix_id:e[`prefix-id`]}));o(f,{successLabel:`Updated`})})},Be={command:`prefix`,describe:`Operations for advanced-tcp-protection.configs.allowlist.prefix`,builder:e=>e.command(Pe).command(Le).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ve={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist`,builder:e=>e.command(Ee).command(Oe).command(je).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var He={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`};function Ue(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk-delete
31
31
 
32
32
  Delete all 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 We={command:`bulk-delete`,describe:`Delete all prefixes.`,builder:Ue,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
33
33
  `);return}let u=await c(`Deleting`,async()=>n.send(He,{account_id:l}));o(u,{successLabel:`Deleted`})})};var Ge={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/bulk`,body:`json`};function Ke(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk create
34
34
 
35
- 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 qe={command:`create`,describe:`Create multiple prefixes.`,builder:Ke,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes bulk create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Ge,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Je={command:`bulk`,describe:`Operations for advanced-tcp-protection.configs.prefixes.bulk`,builder:e=>e.command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`,body:`json`};function Ye(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes create
35
+ 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 qe={command:`create`,describe:`Create multiple prefixes.`,builder:Ke,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes bulk create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Ge,{body:t,account_id:l}));o(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Je={command:`bulk`,describe:`Operations for advanced-tcp-protection.configs.prefixes.bulk`,builder:e=>e.command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`,body:`json`};function Ye(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes create
36
36
 
37
- 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 Xe={command:`create`,describe:`Create prefix.`,builder:Ye,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes create`,classification:{safeFlags:[`excluded`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded,prefix:h(e.prefix,`prefix`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(S,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.comment===void 0&&(e.comment=await g(`comment`,`A comment describing the prefix.`)),e.excluded===void 0)throw Error(`--excluded is required (or pass --body with this field set).`);e.prefix===void 0&&(e.prefix=await g(`prefix`,`The prefix to add in CIDR format.`));let u=m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded,prefix:h(e.prefix,`prefix`,`text`)}),d=await c(`Creating`,async()=>n.send(S,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Ze={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`};function Qe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes delete <prefix-id>
37
+ 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 Xe={command:`create`,describe:`Create prefix.`,builder:Ye,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes create`,classification:{safeFlags:[`excluded`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded,prefix:h(e.prefix,`prefix`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(S,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.comment===void 0&&(e.comment=await g(`comment`,`A comment describing the prefix.`)),e.excluded===void 0)throw Error(`--excluded is required (or pass --body with this field set).`);e.prefix===void 0&&(e.prefix=await g(`prefix`,`The prefix to add in CIDR format.`));let u=m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded,prefix:h(e.prefix,`prefix`,`text`)}),f=await c(`Creating`,async()=>n.send(S,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var Ze={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`};function Qe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes delete <prefix-id>
38
38
 
39
39
  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 $e={command:`delete <prefix-id>`,describe:`Delete prefix.`,builder:Qe,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
40
40
  `);return}let u=await c(`Deleting`,async()=>n.send(Ze,{account_id:l,prefix_id:e[`prefix-id`]}));o(u,{successLabel:`Deleted`})})};var et={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`};function tt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes get <prefix-id>
@@ -43,12 +43,12 @@ Get a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string
43
43
 
44
44
  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 at={command:`list`,describe:`List all prefixes.`,builder:it,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(rt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var C={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`,body:`json`};function ot(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes update <prefix-id>
45
45
 
46
- 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 st={command:`update <prefix-id>`,describe:`Update prefix.`,builder:ot,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes update`,classification:{safeFlags:[`excluded`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(C,{body:t,account_id:l,prefix_id:e[`prefix-id`]}));o(r,{successLabel:`Updated`});return}let u=m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded}),d=await c(`Updating`,async()=>n.send(C,{body:u,account_id:l,prefix_id:e[`prefix-id`]}));o(d,{successLabel:`Updated`})})},ct={command:`prefixes`,describe:`Operations for advanced-tcp-protection.configs.prefixes`,builder:e=>e.command(We).command(Xe).command($e).command(nt).command(at).command(st).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`};function ut(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters bulk-delete
46
+ 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 st={command:`update <prefix-id>`,describe:`Update prefix.`,builder:ot,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes update`,classification:{safeFlags:[`excluded`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(C,{body:t,account_id:l,prefix_id:e[`prefix-id`]}));o(r,{successLabel:`Updated`});return}let u=m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded}),f=await c(`Updating`,async()=>n.send(C,{body:u,account_id:l,prefix_id:e[`prefix-id`]}));o(f,{successLabel:`Updated`})})},ct={command:`prefixes`,describe:`Operations for advanced-tcp-protection.configs.prefixes`,builder:e=>e.command(We).command(Xe).command($e).command(nt).command(at).command(st).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`};function ut(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters bulk-delete
47
47
 
48
48
  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 dt={command:`bulk-delete`,describe:`Delete all SYN Protection filters.`,builder:ut,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
49
49
  `);return}let u=await c(`Deleting`,async()=>n.send(lt,{account_id:l}));o(u,{successLabel:`Deleted`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`,body:`json`};function ft(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters create
50
50
 
51
- 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 pt={command:`create`,describe:`Create a SYN Protection filter.`,builder:ft,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(w,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`));let u=m({expression:h(e.expression,`expression`,`text`)}),d=await c(`Creating`,async()=>n.send(w,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var mt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function ht(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete <filter-id>
51
+ 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 pt={command:`create`,describe:`Create a SYN Protection filter.`,builder:ft,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(w,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`));let u=m({expression:h(e.expression,`expression`,`text`)}),f=await c(`Creating`,async()=>n.send(w,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var mt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function ht(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete <filter-id>
52
52
 
53
53
  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 gt={command:`delete <filter-id>`,describe:`Delete SYN Protection filter.`,builder:ht,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
54
54
  `);return}let u=await c(`Deleting`,async()=>n.send(mt,{account_id:l,filter_id:e[`filter-id`]}));o(u,{successLabel:`Deleted`})})};var _t={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function vt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters get <filter-id>
@@ -57,12 +57,12 @@ Get a SYN Protection filter specified by the given UUID.`).positional(`filter-id
57
57
 
58
58
  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 St={command:`list`,describe:`List all SYN Protection filters.`,builder:xt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={mode:e[`filter-mode`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(bt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var T={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`,body:`json`};function Ct(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters update <filter-id>
59
59
 
60
- 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 wt={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:Ct,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(T,{body:t,account_id:l,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let u=m({expression:h(e.expression,`expression`,`text`)}),d=await c(`Updating`,async()=>n.send(T,{body:u,account_id:l,filter_id:e[`filter-id`]}));o(d,{successLabel:`Updated`})})},Tt={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(dt).command(pt).command(gt).command(yt).command(St).command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Et={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`};function Dt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules bulk-delete
60
+ 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 wt={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:Ct,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(T,{body:t,account_id:l,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let u=m({expression:h(e.expression,`expression`,`text`)}),f=await c(`Updating`,async()=>n.send(T,{body:u,account_id:l,filter_id:e[`filter-id`]}));o(f,{successLabel:`Updated`})})},Tt={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(dt).command(pt).command(gt).command(yt).command(St).command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Et={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`};function Dt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules bulk-delete
61
61
 
62
62
  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 Ot={command:`bulk-delete`,describe:`Delete all SYN Protection rules.`,builder:Dt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
63
63
  `);return}let u=await c(`Deleting`,async()=>n.send(Et,{account_id:l}));o(u,{successLabel:`Deleted`})})};var E={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`,body:`json`};function kt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules create
64
64
 
65
- 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 At={command:`create`,describe:`Create SYN Protection rule.`,builder:kt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(E,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`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'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),d=await c(`Creating`,async()=>n.send(E,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var jt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function Mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete <rule-id>
65
+ 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 At={command:`create`,describe:`Create SYN Protection rule.`,builder:kt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(E,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`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'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(E,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var jt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function Mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete <rule-id>
66
66
 
67
67
  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 Nt={command:`delete <rule-id>`,describe:`Delete SYN Protection rule.`,builder:Mt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
68
68
  `);return}let u=await c(`Deleting`,async()=>n.send(jt,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var Pt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function Ft(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules get <rule-id>
@@ -71,12 +71,12 @@ Get a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{t
71
71
 
72
72
  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 zt={command:`list`,describe:`List all SYN Protection rules.`,builder:Rt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Lt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var D={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`,body:`json`};function Bt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules update <rule-id>
73
73
 
74
- 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 Vt={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:Bt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(D,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),d=await c(`Updating`,async()=>n.send(D,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(d,{successLabel:`Updated`})})},Ht={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(Ot).command(At).command(Nt).command(It).command(zt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(Tt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wt={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`};function Kt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete
74
+ 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 Vt={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:Bt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(D,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(D,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},Ht={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(Ot).command(At).command(Nt).command(It).command(zt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(Tt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wt={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`};function Kt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete
75
75
 
76
76
  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 qt={command:`bulk-delete`,describe:`Delete all TCP Flow Protection filters.`,builder:Kt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
77
77
  `);return}let u=await c(`Deleting`,async()=>n.send(Gt,{account_id:l}));o(u,{successLabel:`Deleted`})})};var O={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,body:`json`};function Jt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters create
78
78
 
79
- 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 Yt={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:Jt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(O,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`));let u=m({expression:h(e.expression,`expression`,`text`)}),d=await c(`Creating`,async()=>n.send(O,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Xt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function Zt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete <filter-id>
79
+ 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 Yt={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:Jt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(O,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`));let u=m({expression:h(e.expression,`expression`,`text`)}),f=await c(`Creating`,async()=>n.send(O,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var Xt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function Zt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete <filter-id>
80
80
 
81
81
  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 Qt={command:`delete <filter-id>`,describe:`Delete TCP Flow Protection filter.`,builder:Zt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
82
82
  `);return}let u=await c(`Deleting`,async()=>n.send(Xt,{account_id:l,filter_id:e[`filter-id`]}));o(u,{successLabel:`Deleted`})})};var $t={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function en(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters get <filter-id>
@@ -85,12 +85,12 @@ Get a TCP Flow Protection filter specified by the given UUID.`).positional(`filt
85
85
 
86
86
  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 an={command:`list`,describe:`List all TCP Flow Protection filters.`,builder:rn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={mode:e[`filter-mode`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(nn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var k={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`,body:`json`};function on(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters update <filter-id>
87
87
 
88
- 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 sn={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:on,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(k,{body:t,account_id:l,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let u=m({expression:h(e.expression,`expression`,`text`)}),d=await c(`Updating`,async()=>n.send(k,{body:u,account_id:l,filter_id:e[`filter-id`]}));o(d,{successLabel:`Updated`})})},cn={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(qt).command(Yt).command(Qt).command(tn).command(an).command(sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ln={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`};function un(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete
88
+ 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 sn={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:on,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(k,{body:t,account_id:l,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let u=m({expression:h(e.expression,`expression`,`text`)}),f=await c(`Updating`,async()=>n.send(k,{body:u,account_id:l,filter_id:e[`filter-id`]}));o(f,{successLabel:`Updated`})})},cn={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(qt).command(Yt).command(Qt).command(tn).command(an).command(sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ln={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`};function un(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete
89
89
 
90
90
  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 dn={command:`bulk-delete`,describe:`Delete all TCP Flow Protection rules.`,builder:un,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
91
91
  `);return}let u=await c(`Deleting`,async()=>n.send(ln,{account_id:l}));o(u,{successLabel:`Deleted`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,body:`json`};function fn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules create
92
92
 
93
- 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 pn={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:fn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(A,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`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'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the TCP Flow Protection rule.`));let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),d=await c(`Creating`,async()=>n.send(A,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var mn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function hn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete <rule-id>
93
+ 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 pn={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:fn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(A,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`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'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the TCP Flow Protection rule.`));let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(A,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var mn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function hn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete <rule-id>
94
94
 
95
95
  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 gn={command:`delete <rule-id>`,describe:`Delete TCP Flow Protection rule.`,builder:hn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
96
96
  `);return}let u=await c(`Deleting`,async()=>n.send(mn,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var _n={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function vn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules get <rule-id>
@@ -99,22 +99,22 @@ Get a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-i
99
99
 
100
100
  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 Sn={command:`list`,describe:`List all TCP Flow Protection rules.`,builder:xn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(bn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var j={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`,body:`json`};function Cn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules update <rule-id>
101
101
 
102
- 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 wn={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Cn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(j,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),d=await c(`Updating`,async()=>n.send(j,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(d,{successLabel:`Updated`})})},Tn={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(dn).command(pn).command(gn).command(yn).command(Sn).command(wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},En={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command(cn).command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Dn={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(En).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var On={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`};function kn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
102
+ 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 wn={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Cn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(j,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(j,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},Tn={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(dn).command(pn).command(gn).command(yn).command(Sn).command(wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},En={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command(cn).command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Dn={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(En).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var On={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`};function kn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
103
103
 
104
104
  Get the protection status of the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const An={command:`get`,describe:`Get protection status.`,builder:kn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp protection status get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp protection status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(On,{account_id:l}));o(u,{successLabel:`Loaded`})})};var M={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`,body:`json`};function jn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status update
105
105
 
106
- 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 Mn={command:`update`,describe:`Update protection status.`,builder:jn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp protection status update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp protection status update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({enabled:e.enabled}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(M,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=m({enabled:e.enabled}),d=await c(`Updating`,async()=>n.send(M,{body:u,account_id:l}));o(d,{successLabel:`Updated`})})},Nn={command:`status`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection.status`,builder:e=>e.command(An).command(Mn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pn={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection`,builder:e=>e.command(Nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fn={command:`tcp`,describe:`Operations for advanced-tcp-protection.configs.tcp`,builder:e=>e.command(Dn).command(Pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},In={command:`configs`,describe:`Operations for advanced-tcp-protection.configs`,builder:e=>e.command(Ve).command(ct).command(Wt).command(Fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ln={command:`advanced-tcp-protection`,describe:`Advanced Tcp Protection operations`,builder:e=>e.command(In).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/apps`,body:`json`};function Rn(e){return e.usage(`$0 magic-transit apps create
106
+ 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 Mn={command:`update`,describe:`Update protection status.`,builder:jn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp protection status update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp protection status update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({enabled:e.enabled}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(M,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=m({enabled:e.enabled}),f=await c(`Updating`,async()=>n.send(M,{body:u,account_id:l}));o(f,{successLabel:`Updated`})})},Nn={command:`status`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection.status`,builder:e=>e.command(An).command(Mn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pn={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection`,builder:e=>e.command(Nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fn={command:`tcp`,describe:`Operations for advanced-tcp-protection.configs.tcp`,builder:e=>e.command(Dn).command(Pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},In={command:`configs`,describe:`Operations for advanced-tcp-protection.configs`,builder:e=>e.command(Ve).command(ct).command(Wt).command(Fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ln={command:`advanced-tcp-protection`,describe:`Advanced Tcp Protection operations`,builder:e=>e.command(In).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/apps`,body:`json`};function Rn(e){return e.usage(`$0 magic-transit apps create
107
107
 
108
- 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 zn={command:`create`,describe:`Create a new App`,builder:Rn,handler:async e=>l({command:`magic-transit apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(N,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Display name for the app.`)),e.type===void 0&&(e.type=await g(`type`,`Category of the app.`));let u=m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}),d=await c(`Creating`,async()=>n.send(N,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Bn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/apps/${t.account_app_id}`};function Vn(e){return e.usage(`$0 magic-transit apps delete <account-app-id>
108
+ 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 zn={command:`create`,describe:`Create a new App`,builder:Rn,handler:async e=>l({command:`magic-transit apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(N,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Display name for the app.`)),e.type===void 0&&(e.type=await g(`type`,`Category of the app.`));let u=m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}),f=await c(`Creating`,async()=>n.send(N,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var Bn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/apps/${t.account_app_id}`};function Vn(e){return e.usage(`$0 magic-transit apps delete <account-app-id>
109
109
 
110
110
  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 Hn={command:`delete <account-app-id>`,describe:`Delete Account App`,builder:Vn,handler:async e=>l({command:`magic-transit apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps/${e[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(e[`account-app-id`]))}`,pathParams:{"account-app-id":String(e[`account-app-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
111
111
  `);return}let u=await c(`Deleting`,async()=>n.send(Bn,{account_id:l,account_app_id:e[`account-app-id`]}));o(u,{successLabel:`Deleted`})})};var Un={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/apps`};function Wn(e){return e.usage(`$0 magic-transit apps list
112
112
 
113
113
  Lists Apps associated with an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gn={command:`list`,describe:`List Apps`,builder:Wn,handler:async e=>l({command:`magic-transit apps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Un,{account_id:l}));o(u,{successLabel:`Loaded`})})};var P={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/apps/${t.account_app_id}`,body:`json`};function Kn(e){return e.usage(`$0 magic-transit apps update <account-app-id>
114
114
 
115
- 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 qn={command:`update <account-app-id>`,describe:`Update an App`,builder:Kn,handler:async e=>l({command:`magic-transit apps update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps/${e[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(e[`account-app-id`]))}`,pathParams:{"account-app-id":String(e[`account-app-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(P,{body:t,account_id:l,account_app_id:e[`account-app-id`]}));o(r,{successLabel:`Updated`});return}let u=m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}),d=await c(`Updating`,async()=>n.send(P,{body:u,account_id:l,account_app_id:e[`account-app-id`]}));o(d,{successLabel:`Updated`})})},Jn={command:`apps`,describe:`Application-aware traffic policies for Magic WAN that steer traffic by app type`,builder:e=>e.command(zn).command(Hn).command(Gn).command(qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles`,body:`json`};function Yn(e){return e.usage(`$0 magic-transit bgp-filter-profiles create
115
+ 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 qn={command:`update <account-app-id>`,describe:`Update an App`,builder:Kn,handler:async e=>l({command:`magic-transit apps update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps/${e[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(e[`account-app-id`]))}`,pathParams:{"account-app-id":String(e[`account-app-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(P,{body:t,account_id:l,account_app_id:e[`account-app-id`]}));o(r,{successLabel:`Updated`});return}let u=m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}),f=await c(`Updating`,async()=>n.send(P,{body:u,account_id:l,account_app_id:e[`account-app-id`]}));o(f,{successLabel:`Updated`})})},Jn={command:`apps`,describe:`Application-aware traffic policies for Magic WAN that steer traffic by app type`,builder:e=>e.command(zn).command(Hn).command(Gn).command(qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles`,body:`json`};function Yn(e){return e.usage(`$0 magic-transit bgp-filter-profiles create
116
116
 
117
- 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`]}).coerce(`match-action`,e=>h(e,`match-action`,`text`)).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 Xn={command:`create`,describe:`Create BGP Filter Profile`,builder:Yn,handler:async e=>l({command:`magic-transit bgp-filter-profiles create`,classification:{safeFlags:[`match-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(F,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`match-action`]===void 0&&(e[`match-action`]=await _(`match-action`,`Action to take when a route matches one of the targets in this profile`,[`allow`,`deny`])),e.name===void 0&&(e.name=await g(`name`,`Friendly name for the filter profile`)),e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let u=m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}),d=await c(`Creating`,async()=>n.send(F,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Zn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`};function Qn(e){return e.usage(`$0 magic-transit bgp-filter-profiles delete <profile-id>
117
+ 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`]}).coerce(`match-action`,e=>h(e,`match-action`,`text`)).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 Xn={command:`create`,describe:`Create BGP Filter Profile`,builder:Yn,handler:async e=>l({command:`magic-transit bgp-filter-profiles create`,classification:{safeFlags:[`match-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(F,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`match-action`]===void 0&&(e[`match-action`]=await _(`match-action`,`Action to take when a route matches one of the targets in this profile`,[`allow`,`deny`])),e.name===void 0&&(e.name=await g(`name`,`Friendly name for the filter profile`)),e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let u=m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}),f=await c(`Creating`,async()=>n.send(F,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var Zn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`};function Qn(e){return e.usage(`$0 magic-transit bgp-filter-profiles delete <profile-id>
118
118
 
119
119
  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 $n={command:`delete <profile-id>`,describe:`Delete BGP Filter Profile`,builder:Qn,handler:async e=>l({command:`magic-transit bgp-filter-profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
120
120
  `);return}let u=await c(`Deleting`,async()=>n.send(Zn,{account_id:l,profile_id:e[`profile-id`]}));o(u,{successLabel:`Deleted`})})};var er={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`};function tr(e){return e.usage(`$0 magic-transit bgp-filter-profiles get <profile-id>
@@ -123,13 +123,13 @@ Gets a specific BGP filter profile for an account.`).positional(`profile-id`,{ty
123
123
 
124
124
  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 ar={command:`list`,describe:`List BGP Filter Profiles`,builder:ir,handler:async e=>l({command:`magic-transit bgp-filter-profiles list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit bgp-filter-profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(rr,{account_id:l}));o(u,{successLabel:`Loaded`})})};var I={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`,body:`json`};function or(e){return e.usage(`$0 magic-transit bgp-filter-profiles update <profile-id>
125
125
 
126
- 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`]}).coerce(`match-action`,e=>h(e,`match-action`,`text`)).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 sr={command:`update <profile-id>`,describe:`Update BGP Filter Profile`,builder:or,handler:async e=>l({command:`magic-transit bgp-filter-profiles update`,classification:{safeFlags:[`match-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(I,{body:t,account_id:l,profile_id:e[`profile-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}),d=await c(`Updating`,async()=>n.send(I,{body:u,account_id:l,profile_id:e[`profile-id`]}));o(d,{successLabel:`Updated`})})},cr={command:`bgp-filter-profiles`,describe:`BGP filter profiles for controlling which routes are allowed or denied on Magic Transit tunnels`,builder:e=>e.command(Xn).command($n).command(nr).command(ar).command(sr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/settings`};function ur(e){return e.usage(`$0 magic-transit bgp-settings get
126
+ 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`]}).coerce(`match-action`,e=>h(e,`match-action`,`text`)).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 sr={command:`update <profile-id>`,describe:`Update BGP Filter Profile`,builder:or,handler:async e=>l({command:`magic-transit bgp-filter-profiles update`,classification:{safeFlags:[`match-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(I,{body:t,account_id:l,profile_id:e[`profile-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}),f=await c(`Updating`,async()=>n.send(I,{body:u,account_id:l,profile_id:e[`profile-id`]}));o(f,{successLabel:`Updated`})})},cr={command:`bgp-filter-profiles`,describe:`BGP filter profiles for controlling which routes are allowed or denied on Magic Transit tunnels`,builder:e=>e.command(Xn).command($n).command(nr).command(ar).command(sr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/settings`};function ur(e){return e.usage(`$0 magic-transit bgp-settings get
127
127
 
128
128
  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 dr={command:`get`,describe:`Get BGP Settings`,builder:ur,handler:async e=>l({command:`magic-transit bgp-settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit bgp-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(lr,{account_id:l}));o(u,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/bgp/settings`,body:`json`};function fr(e){return e.usage(`$0 magic-transit bgp-settings update
129
129
 
130
- 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 pr={command:`update`,describe:`Update BGP Settings`,builder:fr,handler:async e=>l({command:`magic-transit bgp-settings update`,classification:{safeFlags:[`redistribute-static:wan`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({cloudflare_asn:e[`cloudflare-asn`],redistribute:{"static:wan":e[`redistribute-static:wan`]}}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(L,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}let u=m({cloudflare_asn:e[`cloudflare-asn`],redistribute:{"static:wan":e[`redistribute-static:wan`]}}),d=await c(`Updating`,async()=>n.send(L,{body:u,account_id:l}));o(d,{successLabel:`Updated`})})},mr={command:`bgp-settings`,describe:`BGP settings for controlling default ASN and route redistribution on Magic Transit tunnels`,builder:e=>e.command(dr).command(pr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hr(e){return e.usage(`$0 magic-transit cf-interconnects bulk-update
130
+ 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 pr={command:`update`,describe:`Update BGP Settings`,builder:fr,handler:async e=>l({command:`magic-transit bgp-settings update`,classification:{safeFlags:[`redistribute-static:wan`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({cloudflare_asn:e[`cloudflare-asn`],redistribute:{"static:wan":e[`redistribute-static:wan`]}}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(L,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}let u=m({cloudflare_asn:e[`cloudflare-asn`],redistribute:{"static:wan":e[`redistribute-static:wan`]}}),f=await c(`Updating`,async()=>n.send(L,{body:u,account_id:l}));o(f,{successLabel:`Updated`})})},mr={command:`bgp-settings`,describe:`BGP settings for controlling default ASN and route redistribution on Magic Transit tunnels`,builder:e=>e.command(dr).command(pr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hr(e){return e.usage(`$0 magic-transit cf-interconnects bulk-update
131
131
 
132
- 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 gr={command:`bulk-update`,describe:`Update multiple interconnects`,builder:hr,handler:async e=>l({command:`magic-transit cf-interconnects bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit cf-interconnects bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/magic/cf_interconnects`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/magic/cf_interconnects`,{headers:Object.keys(l).length>0?l:void 0}));o(p,{successLabel:`Updated`})})};function _r(e){return e.usage(`$0 magic-transit cf-interconnects get <cf-interconnect-id>
132
+ 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 gr={command:`bulk-update`,describe:`Update multiple interconnects`,builder:hr,handler:async e=>l({command:`magic-transit cf-interconnects bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit cf-interconnects bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{headers:Object.keys(l).length>0?l:void 0}));o(p,{successLabel:`Updated`})})};function _r(e){return e.usage(`$0 magic-transit cf-interconnects get <cf-interconnect-id>
133
133
 
134
134
  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 vr={command:`get <cf-interconnect-id>`,describe:`List interconnect Details`,builder:_r,handler:async e=>l({command:`magic-transit cf-interconnects get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit cf-interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects/${e[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(e[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(e[`cf-interconnect-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function yr(e){return e.usage(`$0 magic-transit cf-interconnects list
135
135
 
@@ -155,9 +155,9 @@ use a /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix
155
155
  may be used. Version 1.5 interconnects require a /31 prefix and may
156
156
  also use a prefix from the account's authorized prefixes; otherwise,
157
157
  select the subnet from RFC 1918 or the approved link-local ranges.
158
- `}).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 Sr={command:`update <cf-interconnect-id>`,describe:`Update interconnect`,builder:xr,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit cf-interconnects update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects/${e[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(e[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(e[`cf-interconnect-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{as_no:e[`bgp-as-no`],cloudflare_endpoint:h(e[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`),customer_asn:e[`bgp-customer-asn`],customer_endpoint:h(e[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`),export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},description:h(e.description,`description`,`text`),gre:{cloudflare_endpoint:h(e[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)},health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`],source:h(e[`health-check-source`],`health-check-source`,`text`)},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`)}):f(e.body)});return}let d=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${p}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let g={};e[`automatic-return-routing`]!==void 0&&u(g,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-as-no`]!==void 0&&u(g,[`bgp`,`as_no`],e[`bgp-as-no`]),e[`bgp-cloudflare-endpoint`]!==void 0&&u(g,[`bgp`,`cloudflare_endpoint`],h(e[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`)),e[`bgp-customer-asn`]!==void 0&&u(g,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-customer-endpoint`]!==void 0&&u(g,[`bgp`,`customer_endpoint`],h(e[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`)),e[`bgp-export-filter-id`]!==void 0&&u(g,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&u(g,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&u(g,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&u(g,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e.description!==void 0&&u(g,[`description`],h(e.description,`description`,`text`)),e[`gre-cloudflare-endpoint`]!==void 0&&u(g,[`gre`,`cloudflare_endpoint`],h(e[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)),e[`health-check-enabled`]!==void 0&&u(g,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&u(g,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&u(g,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&u(g,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&u(g,[`health_check`,`direction`],e[`health-check-direction`]),e[`health-check-source`]!==void 0&&u(g,[`health_check`,`source`],h(e[`health-check-source`],`health-check-source`,`text`)),e[`interface-address`]!==void 0&&u(g,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&u(g,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&u(g,[`mtu`],e.mtu),e.name!==void 0&&u(g,[`name`],h(e.name,`name`,`text`));let _=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${p}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Updated`})})},Cr={command:`cf-interconnects`,describe:`Cloudflare Network Interconnect (CNI) links for direct physical or virtual peering`,builder:e=>e.command(gr).command(vr).command(br).command(Sr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wr={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites`,body:`json`};function Tr(e){return e.usage(`$0 magic-transit cf1-sites create
158
+ `}).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 Sr={command:`update <cf-interconnect-id>`,describe:`Update interconnect`,builder:xr,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit cf-interconnects update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects/${e[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(e[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(e[`cf-interconnect-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{as_no:e[`bgp-as-no`],cloudflare_endpoint:h(e[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`),customer_asn:e[`bgp-customer-asn`],customer_endpoint:h(e[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`),export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},description:h(e.description,`description`,`text`),gre:{cloudflare_endpoint:h(e[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)},health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`],source:h(e[`health-check-source`],`health-check-source`,`text`)},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`)}):d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let g={};e[`automatic-return-routing`]!==void 0&&p(g,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-as-no`]!==void 0&&p(g,[`bgp`,`as_no`],e[`bgp-as-no`]),e[`bgp-cloudflare-endpoint`]!==void 0&&p(g,[`bgp`,`cloudflare_endpoint`],h(e[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`)),e[`bgp-customer-asn`]!==void 0&&p(g,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-customer-endpoint`]!==void 0&&p(g,[`bgp`,`customer_endpoint`],h(e[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`)),e[`bgp-export-filter-id`]!==void 0&&p(g,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(g,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(g,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(g,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e.description!==void 0&&p(g,[`description`],h(e.description,`description`,`text`)),e[`gre-cloudflare-endpoint`]!==void 0&&p(g,[`gre`,`cloudflare_endpoint`],h(e[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)),e[`health-check-enabled`]!==void 0&&p(g,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(g,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(g,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(g,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(g,[`health_check`,`direction`],e[`health-check-direction`]),e[`health-check-source`]!==void 0&&p(g,[`health_check`,`source`],h(e[`health-check-source`],`health-check-source`,`text`)),e[`interface-address`]!==void 0&&p(g,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(g,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(g,[`mtu`],e.mtu),e.name!==void 0&&p(g,[`name`],h(e.name,`name`,`text`));let _=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Updated`})})},Cr={command:`cf-interconnects`,describe:`Cloudflare Network Interconnect (CNI) links for direct physical or virtual peering`,builder:e=>e.command(gr).command(vr).command(br).command(Sr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wr={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites`,body:`json`};function Tr(e){return e.usage(`$0 magic-transit cf1-sites create
159
159
 
160
- 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 Er={command:`create`,describe:`Create CF1 Sites`,builder:Tr,handler:async e=>l({command:`magic-transit cf1-sites create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(wr,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var Dr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`};function Or(e){return e.usage(`$0 magic-transit cf1-sites delete <cf1-site-id>
160
+ 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 Er={command:`create`,describe:`Create CF1 Sites`,builder:Tr,handler:async e=>l({command:`magic-transit cf1-sites create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(wr,{body:t,account_id:l}));o(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var Dr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`};function Or(e){return e.usage(`$0 magic-transit cf1-sites delete <cf1-site-id>
161
161
 
162
162
  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 kr={command:`delete <cf1-site-id>`,describe:`Delete CF1 Site`,builder:Or,handler:async e=>l({command:`magic-transit cf1-sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
163
163
  `);return}let u=await c(`Deleting`,async()=>n.send(Dr,{account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(u,{successLabel:`Deleted`})})};var Ar={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`};function jr(e){return e.usage(`$0 magic-transit cf1-sites get <cf1-site-id>
@@ -166,7 +166,7 @@ Gets a specific CF1 Site for an account.`).positional(`cf1-site-id`,{type:`strin
166
166
 
167
167
  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 Fr={command:`list`,describe:`List CF1 Sites`,builder:Pr,handler:async e=>l({command:`magic-transit cf1-sites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit cf1-sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Nr,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Ir={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps`,body:`json`};function Lr(e){return e.usage(`$0 magic-transit cf1-sites ramps create <cf1-site-id>
168
168
 
169
- 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 Rr={command:`create <cf1-site-id>`,describe:`Create CF1 Site Ramps`,builder:Lr,handler:async e=>l({command:`magic-transit cf1-sites ramps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Ir,{body:t,account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(r,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var zr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps/${t.ramp_id}`};function Br(e){return e.usage(`$0 magic-transit cf1-sites ramps delete <ramp-id>
169
+ 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 Rr={command:`create <cf1-site-id>`,describe:`Create CF1 Site Ramps`,builder:Lr,handler:async e=>l({command:`magic-transit cf1-sites ramps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Ir,{body:t,account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var zr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps/${t.ramp_id}`};function Br(e){return e.usage(`$0 magic-transit cf1-sites ramps delete <ramp-id>
170
170
 
171
171
  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 Vr={command:`delete <ramp-id>`,describe:`Delete CF1 Site Ramp`,builder:Br,handler:async e=>l({command:`magic-transit cf1-sites ramps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps/${e[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(e[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``),"ramp-id":String(e[`ramp-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
172
172
  `);return}let u=await c(`Deleting`,async()=>n.send(zr,{account_id:l,cf1_site_id:e[`cf1-site-id`],ramp_id:e[`ramp-id`]}));o(u,{successLabel:`Deleted`})})};var Hr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps/${t.ramp_id}`};function Ur(e){return e.usage(`$0 magic-transit cf1-sites ramps get <ramp-id>
@@ -175,9 +175,9 @@ Gets a specific ramp for a CF1 Site.`).positional(`ramp-id`,{type:`string`,descr
175
175
 
176
176
  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 qr={command:`list`,describe:`List CF1 Site Ramps`,builder:Kr,handler:async e=>l({command:`magic-transit cf1-sites ramps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Gr,{account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(u,{successLabel:`Loaded`})})},Jr={command:`ramps`,describe:`Operations for cf1-sites.ramps`,builder:e=>e.command(Rr).command(Vr).command(Wr).command(qr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`,body:`json`};function Yr(e){return e.usage(`$0 magic-transit cf1-sites update <cf1-site-id>
177
177
 
178
- 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 Xr={command:`update <cf1-site-id>`,describe:`Update CF1 Site`,builder:Yr,handler:async e=>l({command:`magic-transit cf1-sites update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),location:{lat:e[`location-lat`],long:e[`location-long`],name:h(e[`location-name`],`location-name`,`text`)},name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(R,{body:t,account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),location:{lat:e[`location-lat`],long:e[`location-long`],name:h(e[`location-name`],`location-name`,`text`)},name:h(e.name,`name`,`text`)}),d=await c(`Updating`,async()=>n.send(R,{body:u,account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(d,{successLabel:`Updated`})})},Zr={command:`cf1-sites`,describe:`Operations for cf1-sites`,builder:e=>e.command(Er).command(kr).command(Mr).command(Fr).command(Xr).command(Jr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qr(e){return e.usage(`$0 magic-transit gre-tunnels bulk-update
178
+ 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 Xr={command:`update <cf1-site-id>`,describe:`Update CF1 Site`,builder:Yr,handler:async e=>l({command:`magic-transit cf1-sites update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),location:{lat:e[`location-lat`],long:e[`location-long`],name:h(e[`location-name`],`location-name`,`text`)},name:h(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(R,{body:t,account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),location:{lat:e[`location-lat`],long:e[`location-long`],name:h(e[`location-name`],`location-name`,`text`)},name:h(e.name,`name`,`text`)}),f=await c(`Updating`,async()=>n.send(R,{body:u,account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(f,{successLabel:`Updated`})})},Zr={command:`cf1-sites`,describe:`Operations for cf1-sites`,builder:e=>e.command(Er).command(kr).command(Mr).command(Fr).command(Xr).command(Jr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qr(e){return e.usage(`$0 magic-transit gre-tunnels bulk-update
179
179
 
180
- 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 $r={command:`bulk-update`,describe:`Update multiple GRE tunnels`,builder:Qr,handler:async e=>l({command:`magic-transit gre-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/magic/gre_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/magic/gre_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(p,{successLabel:`Updated`})})};function ei(e){return e.usage(`$0 magic-transit gre-tunnels create
180
+ 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 $r={command:`bulk-update`,describe:`Update multiple GRE tunnels`,builder:Qr,handler:async e=>l({command:`magic-transit gre-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(p,{successLabel:`Updated`})})};function ei(e){return e.usage(`$0 magic-transit gre-tunnels create
181
181
 
182
182
  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.
183
183
 
@@ -194,7 +194,7 @@ character:
194
194
  In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
195
195
  quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
196
196
  (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
197
- 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`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).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`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).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`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).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 ti={command:`create`,describe:`Create a GRE tunnel`,builder:ei,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`),ttl:e.ttl}):f(e.body)});return}let d=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${p}/magic/gre_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await g(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await g(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`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.`)),e.name===void 0&&(e.name=await g(`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 _={};e[`automatic-return-routing`]!==void 0&&u(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&u(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&u(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&u(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&u(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&u(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-gre-endpoint`]!==void 0&&u(_,[`cloudflare_gre_endpoint`],h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&u(_,[`customer_gre_endpoint`],h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&u(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&u(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&u(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&u(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&u(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&u(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&u(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&u(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&u(_,[`mtu`],e.mtu),e.name!==void 0&&u(_,[`name`],h(e.name,`name`,`text`)),e.ttl!==void 0&&u(_,[`ttl`],e.ttl);let v=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${p}/magic/gre_tunnels`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function ni(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
197
+ 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`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).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`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).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`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).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 ti={command:`create`,describe:`Create a GRE tunnel`,builder:ei,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`),ttl:e.ttl}):d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/gre_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await g(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await g(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`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.`)),e.name===void 0&&(e.name=await g(`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 _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-gre-endpoint`]!==void 0&&p(_,[`cloudflare_gre_endpoint`],h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&p(_,[`customer_gre_endpoint`],h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(_,[`mtu`],e.mtu),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.ttl!==void 0&&p(_,[`ttl`],e.ttl);let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/gre_tunnels`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function ni(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
198
198
 
199
199
  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 ri={command:`delete <gre-tunnel-id>`,describe:`Delete GRE Tunnel`,builder:ni,handler:async e=>l({command:`magic-transit gre-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force})){process.stderr.write(`Aborted.
200
200
  `);return}let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function ii(e){return e.usage(`$0 magic-transit gre-tunnels get <gre-tunnel-id>
@@ -203,9 +203,9 @@ Lists informtion for a specific GRE tunnel.`).positional(`gre-tunnel-id`,{type:`
203
203
 
204
204
  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 si={command:`list`,describe:`List GRE tunnels`,builder:oi,handler:async e=>l({command:`magic-transit gre-tunnels list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let e=await i();s({command:`cf magic-transit gre-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/gre_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function ci(e){return e.usage(`$0 magic-transit gre-tunnels update <gre-tunnel-id>
205
205
 
206
- 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`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).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`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).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`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).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 li={command:`update <gre-tunnel-id>`,describe:`Update GRE Tunnel`,builder:ci,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],cloudflare_gre_endpoint:h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`),ttl:e.ttl}):f(e.body)});return}let d=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${p}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await g(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await g(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`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.`)),e.name===void 0&&(e.name=await g(`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 _={};e[`automatic-return-routing`]!==void 0&&u(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`cloudflare-gre-endpoint`]!==void 0&&u(_,[`cloudflare_gre_endpoint`],h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&u(_,[`customer_gre_endpoint`],h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&u(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&u(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&u(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&u(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&u(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&u(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&u(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&u(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&u(_,[`mtu`],e.mtu),e.name!==void 0&&u(_,[`name`],h(e.name,`name`,`text`)),e.ttl!==void 0&&u(_,[`ttl`],e.ttl);let v=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${p}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},ui={command:`gre-tunnels`,describe:`GRE tunnel endpoints that connect your network to Cloudflare for Magic Transit`,builder:e=>e.command($r).command(ti).command(ri).command(ai).command(si).command(li).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function di(e){return e.usage(`$0 magic-transit ipsec-tunnels bulk-update
206
+ 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`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).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`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).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`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).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 li={command:`update <gre-tunnel-id>`,describe:`Update GRE Tunnel`,builder:ci,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],cloudflare_gre_endpoint:h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`),ttl:e.ttl}):d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await g(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await g(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`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.`)),e.name===void 0&&(e.name=await g(`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 _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`cloudflare-gre-endpoint`]!==void 0&&p(_,[`cloudflare_gre_endpoint`],h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&p(_,[`customer_gre_endpoint`],h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(_,[`mtu`],e.mtu),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.ttl!==void 0&&p(_,[`ttl`],e.ttl);let v=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},ui={command:`gre-tunnels`,describe:`GRE tunnel endpoints that connect your network to Cloudflare for Magic Transit`,builder:e=>e.command($r).command(ti).command(ri).command(ai).command(si).command(li).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function di(e){return e.usage(`$0 magic-transit ipsec-tunnels bulk-update
207
207
 
208
- 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 fi={command:`bulk-update`,describe:`Update multiple IPsec tunnels`,builder:di,handler:async e=>l({command:`magic-transit ipsec-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/magic/ipsec_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/magic/ipsec_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(p,{successLabel:`Updated`})})};function pi(e){return e.usage(`$0 magic-transit ipsec-tunnels create
208
+ 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 fi={command:`bulk-update`,describe:`Update multiple IPsec tunnels`,builder:di,handler:async e=>l({command:`magic-transit ipsec-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(p,{successLabel:`Updated`})})};function pi(e){return e.usage(`$0 magic-transit ipsec-tunnels create
209
209
 
210
210
  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.
211
211
 
@@ -229,7 +229,7 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
229
229
 
230
230
  This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
231
231
  fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
232
- 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`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).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`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).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`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).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 mi={command:`create`,describe:`Create an IPsec tunnel`,builder:pi,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):f(e.body),sensitiveBodyPaths:[[`psk`]]});return}let d=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${p}/magic/ipsec_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`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.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};e[`automatic-return-routing`]!==void 0&&u(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&u(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&u(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&u(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&u(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&u(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&u(_,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&u(_,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&u(_,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&u(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&u(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&u(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&u(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&u(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&u(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&u(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&u(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&u(_,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&u(_,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&u(_,[`replay_protection`],e[`replay-protection`]);let v=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${p}/magic/ipsec_tunnels`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function hi(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
232
+ 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`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).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`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).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`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).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 mi={command:`create`,describe:`Create an IPsec tunnel`,builder:pi,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):d(e.body),sensitiveBodyPaths:[[`psk`]]});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/ipsec_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`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.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(_,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(_,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(_,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&p(_,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(_,[`replay_protection`],e[`replay-protection`]);let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/ipsec_tunnels`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function hi(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
233
233
 
234
234
  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 gi={command:`delete <ipsec-tunnel-id>`,describe:`Delete IPsec Tunnel`,builder:hi,handler:async e=>l({command:`magic-transit ipsec-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force})){process.stderr.write(`Aborted.
235
235
  `);return}let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function _i(e){return e.usage(`$0 magic-transit ipsec-tunnels get <ipsec-tunnel-id>
@@ -240,7 +240,7 @@ Lists IPsec tunnels associated with an account.`).option(`x-magic-new-hc-target`
240
240
 
241
241
  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 Ci={command:`psk-generate <ipsec-tunnel-id>`,describe:`Generate Pre-Shared Key (PSK) for IPsec tunnels`,builder:Si,handler:async e=>l({command:`magic-transit ipsec-tunnels psk-generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels psk-generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}/psk_generate`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(xi,{account_id:l,ipsec_tunnel_id:e[`ipsec-tunnel-id`]}));o(u,{successLabel:`Created`})})};var wi={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/ipsec_tunnels/psk`,query:[`validate_only`],body:`json`};function Ti(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-set
242
242
 
243
- 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 Ei={command:`psk-set`,describe:`Set Pre-Shared Keys (PSK) for IPsec tunnels`,builder:Ti,handler:async e=>l({command:`magic-transit ipsec-tunnels psk-set`,classification:{safeFlags:[`validate-only`,`dry-run`]}},e,async()=>{let n={validate_only:e[`validate-only`]};if(e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels psk-set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/psk`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?m({psks:d(e.psks,`psks`)}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(wi,{body:t,account_id:u,...n}));o(r,{successLabel:`Created`});return}if(e.psks===void 0)throw Error(`--psks is required (or pass --body with this field set).`);let p=m({psks:d(e.psks,`psks`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await c(`Creating`,async()=>l.send(wi,{body:p,account_id:u,...n}));o(h,{successLabel:`Created`})})};function Di(e){return e.usage(`$0 magic-transit ipsec-tunnels update <ipsec-tunnel-id>
243
+ 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 Ei={command:`psk-set`,describe:`Set Pre-Shared Keys (PSK) for IPsec tunnels`,builder:Ti,handler:async e=>l({command:`magic-transit ipsec-tunnels psk-set`,classification:{safeFlags:[`validate-only`,`dry-run`]}},e,async()=>{let n={validate_only:e[`validate-only`]};if(e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels psk-set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/psk`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?m({psks:u(e.psks,`psks`)}):d(e.body)});return}let l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(wi,{body:t,account_id:f,...n}));o(r,{successLabel:`Created`});return}if(e.psks===void 0)throw Error(`--psks is required (or pass --body with this field set).`);let p=m({psks:u(e.psks,`psks`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await c(`Creating`,async()=>l.send(wi,{body:p,account_id:f,...n}));o(h,{successLabel:`Created`})})};function Di(e){return e.usage(`$0 magic-transit ipsec-tunnels update <ipsec-tunnel-id>
244
244
 
245
245
  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.
246
246
 
@@ -264,9 +264,9 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
264
264
 
265
265
  This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
266
266
  fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
267
- 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`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).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`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).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`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).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 Oi={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:Di,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):f(e.body),sensitiveBodyPaths:[[`psk`]]});return}let d=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${p}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`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.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};e[`automatic-return-routing`]!==void 0&&u(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&u(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&u(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&u(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&u(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&u(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&u(_,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&u(_,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&u(_,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&u(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&u(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&u(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&u(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&u(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&u(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&u(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&u(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&u(_,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&u(_,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&u(_,[`replay_protection`],e[`replay-protection`]);let v=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${p}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},ki={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command(fi).command(mi).command(gi).command(vi).command(bi).command(Ci).command(Ei).command(Oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ai={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps`,body:`json`};function ji(e){return e.usage(`$0 magic-transit pcaps create
267
+ 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`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).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`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).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`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).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 Oi={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:Di,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):d(e.body),sensitiveBodyPaths:[[`psk`]]});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`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.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(_,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(_,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(_,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&p(_,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(_,[`replay_protection`],e[`replay-protection`]);let v=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},ki={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command(fi).command(mi).command(gi).command(vi).command(bi).command(Ci).command(Ei).command(Oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ai={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps`,body:`json`};function ji(e){return e.usage(`$0 magic-transit pcaps create
268
268
 
269
- 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 Mi={command:`create`,describe:`Create PCAP request`,builder:ji,handler:async e=>l({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Ai,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Ni(e){return e.usage(`$0 magic-transit pcaps download get <pcap-id>
269
+ 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 Mi={command:`create`,describe:`Create PCAP request`,builder:ji,handler:async e=>l({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Ai,{body:t,account_id:l}));o(r,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Ni(e){return e.usage(`$0 magic-transit pcaps download get <pcap-id>
270
270
 
271
271
  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 Pi={command:`get <pcap-id>`,describe:`Download Simple PCAP`,builder:Ni,handler:async e=>l({command:`magic-transit pcaps download get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/${e[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(e[`pcap-id`]))}/download`,pathParams:{"pcap-id":String(e[`pcap-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>te(`/accounts/${n}/pcaps/${encodeURIComponent(String(e[`pcap-id`]))}/download`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));ee(e.text===!0?o.toString(`utf-8`):o)})},Fi={command:`download`,describe:`Operations for pcaps.download`,builder:e=>e.command(Pi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ii={method:`GET`,path:t=>e`/accounts/${t.account_id}/pcaps/${t.pcap_id}`};function Li(e){return e.usage(`$0 magic-transit pcaps get <pcap-id>
272
272
 
@@ -274,19 +274,19 @@ Get information for a PCAP request by id.`).positional(`pcap-id`,{type:`string`,
274
274
 
275
275
  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 Vi={command:`list`,describe:`List packet capture requests`,builder:Bi,handler:async e=>l({command:`magic-transit pcaps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit pcaps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(zi,{account_id:l}));o(u,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership`,body:`json`};function Hi(e){return e.usage(`$0 magic-transit pcaps ownership create
276
276
 
277
- 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 Ui={command:`create`,describe:`Add buckets for full packet captures`,builder:Hi,handler:async e=>l({command:`magic-transit pcaps ownership create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(z,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await g(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures."));let u=m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`)}),d=await c(`Creating`,async()=>n.send(z,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Wi={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership/${t.ownership_id}`,response:!1};function Gi(e){return e.usage(`$0 magic-transit pcaps ownership delete <ownership-id>
277
+ 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 Ui={command:`create`,describe:`Add buckets for full packet captures`,builder:Hi,handler:async e=>l({command:`magic-transit pcaps ownership create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(z,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await g(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures."));let u=m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`)}),f=await c(`Creating`,async()=>n.send(z,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var Wi={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership/${t.ownership_id}`,response:!1};function Gi(e){return e.usage(`$0 magic-transit pcaps ownership delete <ownership-id>
278
278
 
279
279
  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 Ki={command:`delete <ownership-id>`,describe:`Delete buckets for full packet captures`,builder:Gi,handler:async e=>l({command:`magic-transit pcaps ownership delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps ownership delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership/${e[`ownership-id`]==null?`<ownership-id>`:encodeURIComponent(String(e[`ownership-id`]))}`,pathParams:{"ownership-id":String(e[`ownership-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
280
280
  `);return}let u=await c(`Deleting`,async()=>n.send(Wi,{account_id:l,ownership_id:e[`ownership-id`]}));o(u,{successLabel:`Deleted`})})};var qi={method:`GET`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership`};function Ji(e){return e.usage(`$0 magic-transit pcaps ownership get
281
281
 
282
282
  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 Yi={command:`get`,describe:`List PCAPs Bucket Ownership`,builder:Ji,handler:async e=>l({command:`magic-transit pcaps ownership get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit pcaps ownership get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(qi,{account_id:l}));o(u,{successLabel:`Loaded`})})};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership/validate`,body:`json`};function Xi(e){return e.usage(`$0 magic-transit pcaps ownership validate
283
283
 
284
- 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 Zi={command:`validate`,describe:`Validate buckets for full packet captures`,builder:Xi,handler:async e=>l({command:`magic-transit pcaps ownership validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:h(e[`ownership-challenge`],`ownership-challenge`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(B,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await g(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures.")),e[`ownership-challenge`]===void 0&&(e[`ownership-challenge`]=await g(`ownership-challenge`,`The ownership challenge filename stored in the bucket.`));let u=m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:h(e[`ownership-challenge`],`ownership-challenge`,`text`)}),d=await c(`Creating`,async()=>n.send(B,{body:u,account_id:l}));o(d,{successLabel:`Created`})})},Qi={command:`ownership`,describe:`Operations for pcaps.ownership`,builder:e=>e.command(Ui).command(Ki).command(Yi).command(Zi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $i={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pcaps/${t.pcap_id}/stop`,response:!1};function ea(e){return e.usage(`$0 magic-transit pcaps stop <pcap-id>
284
+ 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 Zi={command:`validate`,describe:`Validate buckets for full packet captures`,builder:Xi,handler:async e=>l({command:`magic-transit pcaps ownership validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:h(e[`ownership-challenge`],`ownership-challenge`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Validating`,async()=>n.send(B,{body:t,account_id:l}));o(r,{successLabel:`Validated`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await g(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures.")),e[`ownership-challenge`]===void 0&&(e[`ownership-challenge`]=await g(`ownership-challenge`,`The ownership challenge filename stored in the bucket.`));let u=m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:h(e[`ownership-challenge`],`ownership-challenge`,`text`)}),f=await c(`Validating`,async()=>n.send(B,{body:u,account_id:l}));o(f,{successLabel:`Validated`})})},Qi={command:`ownership`,describe:`Operations for pcaps.ownership`,builder:e=>e.command(Ui).command(Ki).command(Yi).command(Zi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $i={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pcaps/${t.pcap_id}/stop`,response:!1};function ea(e){return e.usage(`$0 magic-transit pcaps stop <pcap-id>
285
285
 
286
286
  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 ta={command:`stop <pcap-id>`,describe:`Stop full PCAP`,builder:ea,handler:async e=>l({command:`magic-transit pcaps stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps stop`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/${e[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(e[`pcap-id`]))}/stop`,pathParams:{"pcap-id":String(e[`pcap-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This operation halts an in-progress full packet capture. Any unsaved capture data will be lost.`})){process.stderr.write(`Aborted.
287
287
  `);return}let u=await c(`Deleting`,async()=>n.send($i,{account_id:l,pcap_id:e[`pcap-id`]}));o(u,{successLabel:`Deleted`})})},na={command:`pcaps`,describe:`Packet capture requests for debugging traffic flowing through Magic Transit tunnels`,builder:e=>e.command(Mi).command(Ri).command(Vi).command(ta).command(Fi).command(Qi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups`,body:`json`};function ra(e){return e.usage(`$0 magic-transit redundancy-groups create
288
288
 
289
- 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 ia={command:`create`,describe:`Create a Redundancy Group`,builder:ra,handler:async e=>l({command:`magic-transit redundancy-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),members:d(e.members,`members`),name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(V,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Human-readable name for the redundancy group`));let u=m({description:h(e.description,`description`,`text`),members:d(e.members,`members`),name:h(e.name,`name`,`text`)}),p=await c(`Creating`,async()=>n.send(V,{body:u,account_id:l}));o(p,{successLabel:`Created`})})};var aa={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`};function oa(e){return e.usage(`$0 magic-transit redundancy-groups delete <redundancy-group-id>
289
+ 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 ia={command:`create`,describe:`Create a Redundancy Group`,builder:ra,handler:async e=>l({command:`magic-transit redundancy-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),members:u(e.members,`members`),name:h(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(V,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Human-readable name for the redundancy group`));let f=m({description:h(e.description,`description`,`text`),members:u(e.members,`members`),name:h(e.name,`name`,`text`)}),p=await c(`Creating`,async()=>n.send(V,{body:f,account_id:l}));o(p,{successLabel:`Created`})})};var aa={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`};function oa(e){return e.usage(`$0 magic-transit redundancy-groups delete <redundancy-group-id>
290
290
 
291
291
  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 sa={command:`delete <redundancy-group-id>`,describe:`Delete a Redundancy Group`,builder:oa,handler:async e=>l({command:`magic-transit redundancy-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
292
292
  `);return}let u=await c(`Deleting`,async()=>n.send(aa,{account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));o(u,{successLabel:`Deleted`})})};var ca={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`};function la(e){return e.usage(`$0 magic-transit redundancy-groups get <redundancy-group-id>
@@ -295,92 +295,92 @@ Gets details for a specific redundancy group, including full member tunnel data.
295
295
 
296
296
  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 pa={command:`list`,describe:`List Redundancy Groups`,builder:fa,handler:async e=>l({command:`magic-transit redundancy-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit redundancy-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(da,{account_id:l}));o(u,{successLabel:`Loaded`})})};var H={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`,body:`json`};function ma(e){return e.usage(`$0 magic-transit redundancy-groups update <redundancy-group-id>
297
297
 
298
- 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 ha={command:`update <redundancy-group-id>`,describe:`Update a Redundancy Group`,builder:ma,handler:async e=>l({command:`magic-transit redundancy-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),members:d(e.members,`members`),name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(H,{body:t,account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));o(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await g(`name`,`Human-readable name for the redundancy group`));let u=m({description:h(e.description,`description`,`text`),members:d(e.members,`members`),name:h(e.name,`name`,`text`)}),p=await c(`Updating`,async()=>n.send(H,{body:u,account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));o(p,{successLabel:`Updated`})})},ga={command:`redundancy-groups`,describe:`Operations for redundancy-groups`,builder:e=>e.command(ia).command(sa).command(ua).command(pa).command(ha).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function _a(e){return e.usage(`$0 magic-transit routes bulk-update
298
+ 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 ha={command:`update <redundancy-group-id>`,describe:`Update a Redundancy Group`,builder:ma,handler:async e=>l({command:`magic-transit redundancy-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),members:u(e.members,`members`),name:h(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(H,{body:t,account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));o(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await g(`name`,`Human-readable name for the redundancy group`));let f=m({description:h(e.description,`description`,`text`),members:u(e.members,`members`),name:h(e.name,`name`,`text`)}),p=await c(`Updating`,async()=>n.send(H,{body:f,account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));o(p,{successLabel:`Updated`})})},ga={command:`redundancy-groups`,describe:`Operations for redundancy-groups`,builder:e=>e.command(ia).command(sa).command(ua).command(pa).command(ha).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function _a(e){return e.usage(`$0 magic-transit routes bulk-update
299
299
 
300
- 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 va={command:`bulk-update`,describe:`Update Many Routes`,builder:_a,handler:async e=>l({command:`magic-transit routes bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({routes:d(e.routes,`routes`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(U,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let u=m({routes:d(e.routes,`routes`)}),p=await c(`Updating`,async()=>n.send(U,{body:u,account_id:l}));o(p,{successLabel:`Updated`})})};var W={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function ya(e){return e.usage(`$0 magic-transit routes create
300
+ 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 va={command:`bulk-update`,describe:`Update Many Routes`,builder:_a,handler:async e=>l({command:`magic-transit routes bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({routes:u(e.routes,`routes`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(U,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let f=m({routes:u(e.routes,`routes`)}),p=await c(`Updating`,async()=>n.send(U,{body:f,account_id:l}));o(p,{successLabel:`Updated`})})};var W={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function ya(e){return e.usage(`$0 magic-transit routes create
301
301
 
302
- 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 ba={command:`create`,describe:`Create a Route`,builder:ya,handler:async e=>l({command:`magic-transit routes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(W,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.nexthop===void 0&&(e.nexthop=await g(`nexthop`,`The next-hop IP Address for the static route.`)),e.prefix===void 0&&(e.prefix=await g(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),e.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let u=m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}),d=await c(`Creating`,async()=>n.send(W,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var xa={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`};function Sa(e){return e.usage(`$0 magic-transit routes delete <route-id>
302
+ 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 ba={command:`create`,describe:`Create a Route`,builder:ya,handler:async e=>l({command:`magic-transit routes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(W,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.nexthop===void 0&&(e.nexthop=await g(`nexthop`,`The next-hop IP Address for the static route.`)),e.prefix===void 0&&(e.prefix=await g(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),e.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let u=m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}),f=await c(`Creating`,async()=>n.send(W,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var xa={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`};function Sa(e){return e.usage(`$0 magic-transit routes delete <route-id>
303
303
 
304
304
  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 Ca={command:`delete <route-id>`,describe:`Delete Route`,builder:Sa,handler:async e=>l({command:`magic-transit routes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
305
305
  `);return}let u=await c(`Deleting`,async()=>n.send(xa,{account_id:l,route_id:e[`route-id`]}));o(u,{successLabel:`Deleted`})})};var G={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function wa(e){return e.usage(`$0 magic-transit routes empty
306
306
 
307
- 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 Ta={command:`empty`,describe:`Delete Many Routes`,builder:wa,handler:async e=>l({command:`magic-transit routes empty`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes empty`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({routes:d(e.routes,`routes`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
308
- `);return}if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(G,{body:t,account_id:l}));o(r,{successLabel:`Deleted`});return}if(e.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let u=m({routes:d(e.routes,`routes`)}),p=await c(`Deleting`,async()=>n.send(G,{body:u,account_id:l}));o(p,{successLabel:`Deleted`})})};var Ea={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`};function Da(e){return e.usage(`$0 magic-transit routes get <route-id>
307
+ 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 Ta={command:`empty`,describe:`Delete Many Routes`,builder:wa,handler:async e=>l({command:`magic-transit routes empty`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes empty`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({routes:u(e.routes,`routes`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
308
+ `);return}if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n.send(G,{body:t,account_id:l}));o(r,{successLabel:`Deleted`});return}if(e.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let f=m({routes:u(e.routes,`routes`)}),p=await c(`Deleting`,async()=>n.send(G,{body:f,account_id:l}));o(p,{successLabel:`Deleted`})})};var Ea={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`};function Da(e){return e.usage(`$0 magic-transit routes get <route-id>
309
309
 
310
310
  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 Oa={command:`get <route-id>`,describe:`Route Details`,builder:Da,handler:async e=>l({command:`magic-transit routes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ea,{account_id:l,route_id:e[`route-id`]}));o(u,{successLabel:`Loaded`})})};var ka={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/routes`};function Aa(e){return e.usage(`$0 magic-transit routes list
311
311
 
312
312
  List all Magic static routes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ja={command:`list`,describe:`List Routes`,builder:Aa,handler:async e=>l({command:`magic-transit routes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit routes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ka,{account_id:l}));o(u,{successLabel:`Loaded`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`,body:`json`};function Ma(e){return e.usage(`$0 magic-transit routes update <route-id>
313
313
 
314
- 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 Na={command:`update <route-id>`,describe:`Update Route`,builder:Ma,handler:async e=>l({command:`magic-transit routes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(K,{body:t,account_id:l,route_id:e[`route-id`]}));o(r,{successLabel:`Updated`});return}if(e.nexthop===void 0&&(e.nexthop=await g(`nexthop`,`The next-hop IP Address for the static route.`)),e.prefix===void 0&&(e.prefix=await g(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),e.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let u=m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}),d=await c(`Updating`,async()=>n.send(K,{body:u,account_id:l,route_id:e[`route-id`]}));o(d,{successLabel:`Updated`})})},Pa={command:`routes`,describe:`Static routes that direct IP prefix traffic through specific GRE/IPsec tunnels`,builder:e=>e.command(va).command(ba).command(Ca).command(Ta).command(Oa).command(ja).command(Na).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls`,body:`json`};function Fa(e){return e.usage(`$0 magic-transit sites acls create <site-id>
314
+ 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 Na={command:`update <route-id>`,describe:`Update Route`,builder:Ma,handler:async e=>l({command:`magic-transit routes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(K,{body:t,account_id:l,route_id:e[`route-id`]}));o(r,{successLabel:`Updated`});return}if(e.nexthop===void 0&&(e.nexthop=await g(`nexthop`,`The next-hop IP Address for the static route.`)),e.prefix===void 0&&(e.prefix=await g(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),e.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let u=m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}),f=await c(`Updating`,async()=>n.send(K,{body:u,account_id:l,route_id:e[`route-id`]}));o(f,{successLabel:`Updated`})})},Pa={command:`routes`,describe:`Static routes that direct IP prefix traffic through specific GRE/IPsec tunnels`,builder:e=>e.command(va).command(ba).command(Ca).command(Ta).command(Oa).command(ja).command(Na).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls`,body:`json`};function Fa(e){return e.usage(`$0 magic-transit sites acls create <site-id>
315
315
 
316
- 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 Ia={command:`create <site-id>`,describe:`Create a new Site ACL`,builder:Fa,handler:async e=>l({command:`magic-transit sites acls create`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(q,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}e[`lan-1-lan-id`]===void 0&&(e[`lan-1-lan-id`]=await g(`lan-1-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),e[`lan-2-lan-id`]===void 0&&(e[`lan-2-lan-id`]=await g(`lan-2-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the ACL.`));let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),d=await c(`Creating`,async()=>n.send(q,{body:u,account_id:l,site_id:e[`site-id`]}));o(d,{successLabel:`Created`})})};var La={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function Ra(e){return e.usage(`$0 magic-transit sites acls delete <acl-id>
316
+ 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 Ia={command:`create <site-id>`,describe:`Create a new Site ACL`,builder:Fa,handler:async e=>l({command:`magic-transit sites acls create`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(q,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}e[`lan-1-lan-id`]===void 0&&(e[`lan-1-lan-id`]=await g(`lan-1-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),e[`lan-2-lan-id`]===void 0&&(e[`lan-2-lan-id`]=await g(`lan-2-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the ACL.`));let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Creating`,async()=>n.send(q,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Created`})})};var La={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function Ra(e){return e.usage(`$0 magic-transit sites acls delete <acl-id>
317
317
 
318
318
  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 za={command:`delete <acl-id>`,describe:`Delete Site ACL`,builder:Ra,handler:async e=>l({command:`magic-transit sites acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
319
319
  `);return}let u=await c(`Deleting`,async()=>n.send(La,{account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(u,{successLabel:`Deleted`})})};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`,body:`json`};function Ba(e){return e.usage(`$0 magic-transit sites acls edit <acl-id>
320
320
 
321
- 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 Va={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:Ba,handler:async e=>l({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),d=await c(`Updating`,async()=>n.send(J,{body:u,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(d,{successLabel:`Updated`})})};var Ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function Ua(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
321
+ 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 Va={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:Ba,handler:async e=>l({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Updating`,async()=>n.send(J,{body:u,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(f,{successLabel:`Updated`})})};var Ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function Ua(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
322
322
 
323
323
  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 Wa={command:`get <acl-id>`,describe:`Site ACL Details`,builder:Ua,handler:async e=>l({command:`magic-transit sites acls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ha,{account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(u,{successLabel:`Loaded`})})};var Ga={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls`};function Ka(e){return e.usage(`$0 magic-transit sites acls list
324
324
 
325
325
  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 qa={command:`list`,describe:`List Site ACLs`,builder:Ka,handler:async e=>l({command:`magic-transit sites acls list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ga,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`,body:`json`};function Ja(e){return e.usage(`$0 magic-transit sites acls update <acl-id>
326
326
 
327
- 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 Ya={command:`update <acl-id>`,describe:`Update Site ACL`,builder:Ja,handler:async e=>l({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Y,{body:t,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),d=await c(`Updating`,async()=>n.send(Y,{body:u,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(d,{successLabel:`Updated`})})},Xa={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(Ia).command(za).command(Va).command(Wa).command(qa).command(Ya).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`,body:`json`};function Za(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
327
+ 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 Ya={command:`update <acl-id>`,describe:`Update Site ACL`,builder:Ja,handler:async e=>l({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(Y,{body:t,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Updating`,async()=>n.send(Y,{body:u,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(f,{successLabel:`Updated`})})},Xa={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(Ia).command(za).command(Va).command(Wa).command(qa).command(Ya).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`,body:`json`};function Za(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
328
328
 
329
- 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 Qa={command:`create <site-id>`,describe:`Create a new App Config`,builder:Za,handler:async e=>l({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(X,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let u=m({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}),d=await c(`Creating`,async()=>n.send(X,{body:u,account_id:l,site_id:e[`site-id`]}));o(d,{successLabel:`Created`})})};var $a={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs/${t.app_config_id}`};function eo(e){return e.usage(`$0 magic-transit sites app-configuration delete <app-config-id>
329
+ 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 Qa={command:`create <site-id>`,describe:`Create a new App Config`,builder:Za,handler:async e=>l({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(X,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let u=m({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}),f=await c(`Creating`,async()=>n.send(X,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Created`})})};var $a={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs/${t.app_config_id}`};function eo(e){return e.usage(`$0 magic-transit sites app-configuration delete <app-config-id>
330
330
 
331
331
  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 to={command:`delete <app-config-id>`,describe:`Delete App Config`,builder:eo,handler:async e=>l({command:`magic-transit sites app-configuration delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs/${e[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(e[`app-config-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"app-config-id":String(e[`app-config-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
332
332
  `);return}let u=await c(`Deleting`,async()=>n.send($a,{account_id:l,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));o(u,{successLabel:`Deleted`})})};var no={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`};function ro(e){return e.usage(`$0 magic-transit sites app-configuration list
333
333
 
334
334
  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 io={command:`list`,describe:`List App Configs`,builder:ro,handler:async e=>l({command:`magic-transit sites app-configuration list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(no,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs/${t.app_config_id}`,body:`json`};function ao(e){return e.usage(`$0 magic-transit sites app-configuration update <app-config-id>
335
335
 
336
- 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 oo={command:`update <app-config-id>`,describe:`Update an App Config`,builder:ao,handler:async e=>l({command:`magic-transit sites app-configuration update`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs/${e[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(e[`app-config-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"app-config-id":String(e[`app-config-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({account_app_id:h(e[`account-app-id`],`account-app-id`,`text`),breakout:e.breakout,managed_app_id:h(e[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:e[`preferred-wans`],priority:e.priority}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Z,{body:t,account_id:l,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));o(r,{successLabel:`Updated`});return}let u=m({account_app_id:h(e[`account-app-id`],`account-app-id`,`text`),breakout:e.breakout,managed_app_id:h(e[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:e[`preferred-wans`],priority:e.priority}),d=await c(`Updating`,async()=>n.send(Z,{body:u,account_id:l,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));o(d,{successLabel:`Updated`})})},so={command:`app-configuration`,describe:`Operations for sites.app-configuration`,builder:e=>e.command(Qa).command(to).command(io).command(oo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites`,body:`json`};function co(e){return e.usage(`$0 magic-transit sites create
336
+ 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 oo={command:`update <app-config-id>`,describe:`Update an App Config`,builder:ao,handler:async e=>l({command:`magic-transit sites app-configuration update`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs/${e[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(e[`app-config-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"app-config-id":String(e[`app-config-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({account_app_id:h(e[`account-app-id`],`account-app-id`,`text`),breakout:e.breakout,managed_app_id:h(e[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:e[`preferred-wans`],priority:e.priority}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(Z,{body:t,account_id:l,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));o(r,{successLabel:`Updated`});return}let u=m({account_app_id:h(e[`account-app-id`],`account-app-id`,`text`),breakout:e.breakout,managed_app_id:h(e[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:e[`preferred-wans`],priority:e.priority}),f=await c(`Updating`,async()=>n.send(Z,{body:u,account_id:l,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));o(f,{successLabel:`Updated`})})},so={command:`app-configuration`,describe:`Operations for sites.app-configuration`,builder:e=>e.command(Qa).command(to).command(io).command(oo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites`,body:`json`};function co(e){return e.usage(`$0 magic-transit sites create
337
337
 
338
- 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 lo={command:`create`,describe:`Create a new Site`,builder:co,handler:async e=>l({command:`magic-transit sites create`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Q,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`The name of the site.`));let u=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),d=await c(`Creating`,async()=>n.send(Q,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var uo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`};function fo(e){return e.usage(`$0 magic-transit sites delete <site-id>
338
+ 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 lo={command:`create`,describe:`Create a new Site`,builder:co,handler:async e=>l({command:`magic-transit sites create`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Q,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`The name of the site.`));let u=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),f=await c(`Creating`,async()=>n.send(Q,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var uo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`};function fo(e){return e.usage(`$0 magic-transit sites delete <site-id>
339
339
 
340
340
  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 po={command:`delete <site-id>`,describe:`Delete Site`,builder:fo,handler:async e=>l({command:`magic-transit sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
341
341
  `);return}let u=await c(`Deleting`,async()=>n.send(uo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Deleted`})})};var mo={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`,body:`json`};function ho(e){return e.usage(`$0 magic-transit sites edit <site-id>
342
342
 
343
- 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(`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 go={command:`edit <site-id>`,describe:`Patch Site`,builder:ho,handler:async e=>l({command:`magic-transit sites edit`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(mo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),d=await c(`Updating`,async()=>n.send(mo,{body:u,account_id:l,site_id:e[`site-id`]}));o(d,{successLabel:`Updated`})})};function _o(e){return e.usage(`$0 magic-transit sites get <site-id>
343
+ 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(`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 go={command:`edit <site-id>`,describe:`Patch Site`,builder:ho,handler:async e=>l({command:`magic-transit sites edit`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(mo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),f=await c(`Updating`,async()=>n.send(mo,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Updated`})})};function _o(e){return e.usage(`$0 magic-transit sites get <site-id>
344
344
 
345
345
  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 vo={command:`get <site-id>`,describe:`Site Details`,builder:_o,handler:async e=>l({command:`magic-transit sites get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/sites/${encodeURIComponent(String(e[`site-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};var yo={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans`,body:`json`};function bo(e){return e.usage(`$0 magic-transit sites lans create <site-id>
346
346
 
347
- 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-server`,{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-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).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-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`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 xo={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:bo,handler:async e=>l({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:d(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:p(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(yo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let u=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:d(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:p(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Creating`,async()=>n.send(yo,{body:u,account_id:l,site_id:e[`site-id`]}));o(g,{successLabel:`Created`})})};var So={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function Co(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
347
+ 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-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).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-server`,{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-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).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-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`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 xo={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:bo,handler:async e=>l({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(yo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Creating`,async()=>n.send(yo,{body:p,account_id:l,site_id:e[`site-id`]}));o(g,{successLabel:`Created`})})};var So={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function Co(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
348
348
 
349
349
  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 wo={command:`delete <lan-id>`,describe:`Delete Site LAN`,builder:Co,handler:async e=>l({command:`magic-transit sites lans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
350
350
  `);return}let u=await c(`Deleting`,async()=>n.send(So,{account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(u,{successLabel:`Deleted`})})};var To={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`,body:`json`};function Eo(e){return e.usage(`$0 magic-transit sites lans edit <lan-id>
351
351
 
352
- 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(`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-server`,{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-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).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-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`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 Do={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Eo,handler:async e=>l({command:`magic-transit sites lans edit`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:d(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:p(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(To,{body:t,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let u=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:d(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:p(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Updating`,async()=>n.send(To,{body:u,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(g,{successLabel:`Updated`})})};var Oo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function ko(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
352
+ 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(`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-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).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-server`,{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-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).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-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`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 Do={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Eo,handler:async e=>l({command:`magic-transit sites lans edit`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(To,{body:t,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Updating`,async()=>n.send(To,{body:p,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(g,{successLabel:`Updated`})})};var Oo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function ko(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
353
353
 
354
354
  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 Ao={command:`get <lan-id>`,describe:`Site LAN Details`,builder:ko,handler:async e=>l({command:`magic-transit sites lans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Oo,{account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(u,{successLabel:`Loaded`})})};var jo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans`};function Mo(e){return e.usage(`$0 magic-transit sites lans list
355
355
 
356
356
  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 No={command:`list`,describe:`List Site LANs`,builder:Mo,handler:async e=>l({command:`magic-transit sites lans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(jo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Po={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`,body:`json`};function Fo(e){return e.usage(`$0 magic-transit sites lans update <lan-id>
357
357
 
358
- 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(`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-server`,{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-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).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-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`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 Io={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Fo,handler:async e=>l({command:`magic-transit sites lans update`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:d(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:p(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Po,{body:t,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let u=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:d(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:p(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Updating`,async()=>n.send(Po,{body:u,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(g,{successLabel:`Updated`})})},Lo={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(xo).command(wo).command(Do).command(Ao).command(No).command(Io).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ro={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites`,query:[`connectorid`]};function zo(e){return e.usage(`$0 magic-transit sites list
358
+ 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(`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-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).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-server`,{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-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).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-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`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 Io={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Fo,handler:async e=>l({command:`magic-transit sites lans update`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(Po,{body:t,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Updating`,async()=>n.send(Po,{body:p,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(g,{successLabel:`Updated`})})},Lo={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(xo).command(wo).command(Do).command(Ao).command(No).command(Io).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ro={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites`,query:[`connectorid`]};function zo(e){return e.usage(`$0 magic-transit sites list
359
359
 
360
360
  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 Bo={command:`list`,describe:`List Sites`,builder:zo,handler:async e=>l({command:`magic-transit sites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={connectorid:e.connectorid};if(e.dryRun){let e=await i();s({command:`cf magic-transit sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ro,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Vo={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function Ho(e){return e.usage(`$0 magic-transit sites netflow-config create <site-id>
361
361
 
362
- 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 Uo={command:`create <site-id>`,describe:`Create NetFlow Configuration`,builder:Ho,handler:async e=>l({command:`magic-transit sites netflow-config create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Vo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let u=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),d=await c(`Creating`,async()=>n.send(Vo,{body:u,account_id:l,site_id:e[`site-id`]}));o(d,{successLabel:`Created`})})};var Wo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`};function Go(e){return e.usage(`$0 magic-transit sites netflow-config delete <site-id>
362
+ 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 Uo={command:`create <site-id>`,describe:`Create NetFlow Configuration`,builder:Ho,handler:async e=>l({command:`magic-transit sites netflow-config create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Vo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let u=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),f=await c(`Creating`,async()=>n.send(Vo,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Created`})})};var Wo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`};function Go(e){return e.usage(`$0 magic-transit sites netflow-config delete <site-id>
363
363
 
364
364
  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 Ko={command:`delete <site-id>`,describe:`Delete NetFlow Configuration`,builder:Go,handler:async e=>l({command:`magic-transit sites netflow-config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
365
365
  `);return}let u=await c(`Deleting`,async()=>n.send(Wo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function qo(e){return e.usage(`$0 magic-transit sites netflow-config edit <site-id>
366
366
 
367
- 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 Jo={command:`edit <site-id>`,describe:`Update NetFlow Configuration`,builder:qo,handler:async e=>l({command:`magic-transit sites netflow-config edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send($,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),d=await c(`Updating`,async()=>n.send($,{body:u,account_id:l,site_id:e[`site-id`]}));o(d,{successLabel:`Updated`})})};var Yo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`};function Xo(e){return e.usage(`$0 magic-transit sites netflow-config get <site-id>
367
+ 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 Jo={command:`edit <site-id>`,describe:`Update NetFlow Configuration`,builder:qo,handler:async e=>l({command:`magic-transit sites netflow-config edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send($,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),f=await c(`Updating`,async()=>n.send($,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Updated`})})};var Yo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`};function Xo(e){return e.usage(`$0 magic-transit sites netflow-config get <site-id>
368
368
 
369
369
  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 Zo={command:`get <site-id>`,describe:`NetFlow Configuration Details`,builder:Xo,handler:async e=>l({command:`magic-transit sites netflow-config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Yo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Qo={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function $o(e){return e.usage(`$0 magic-transit sites netflow-config update <site-id>
370
370
 
371
- 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 es={command:`update <site-id>`,describe:`Update NetFlow Configuration`,builder:$o,handler:async e=>l({command:`magic-transit sites netflow-config update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Qo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),d=await c(`Updating`,async()=>n.send(Qo,{body:u,account_id:l,site_id:e[`site-id`]}));o(d,{successLabel:`Updated`})})},ts={command:`netflow-config`,describe:`Operations for sites.netflow-config`,builder:e=>e.command(Uo).command(Ko).command(Jo).command(Zo).command(es).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ns={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`,body:`json`};function rs(e){return e.usage(`$0 magic-transit sites update <site-id>
371
+ 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 es={command:`update <site-id>`,describe:`Update NetFlow Configuration`,builder:$o,handler:async e=>l({command:`magic-transit sites netflow-config update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(Qo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),f=await c(`Updating`,async()=>n.send(Qo,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Updated`})})},ts={command:`netflow-config`,describe:`Operations for sites.netflow-config`,builder:e=>e.command(Uo).command(Ko).command(Jo).command(Zo).command(es).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ns={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`,body:`json`};function rs(e){return e.usage(`$0 magic-transit sites update <site-id>
372
372
 
373
- 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(`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 is={command:`update <site-id>`,describe:`Update Site`,builder:rs,handler:async e=>l({command:`magic-transit sites update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ns,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),d=await c(`Updating`,async()=>n.send(ns,{body:u,account_id:l,site_id:e[`site-id`]}));o(d,{successLabel:`Updated`})})};var as={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans`,body:`json`};function os(e){return e.usage(`$0 magic-transit sites wans create <site-id>
373
+ 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(`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 is={command:`update <site-id>`,describe:`Update Site`,builder:rs,handler:async e=>l({command:`magic-transit sites update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(ns,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),f=await c(`Updating`,async()=>n.send(ns,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Updated`})})};var as={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans`,body:`json`};function os(e){return e.usage(`$0 magic-transit sites wans create <site-id>
374
374
 
375
- Creates a new Site WAN.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:"Magic WAN health check rate for tunnels created on this link. The default value is `mid`.",choices:[`low`,`mid`,`high`],default:`mid`}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`,default:!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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second.`}).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(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site.`}).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`,`static-addressing-secondary-gateway-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 ss={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:os,handler:async e=>l({command:`magic-transit sites wans create`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(as,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}if(e.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let u=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),d=await c(`Creating`,async()=>n.send(as,{body:u,account_id:l,site_id:e[`site-id`]}));o(d,{successLabel:`Created`})})};var cs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function ls(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
375
+ Creates a new Site WAN.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:"Magic WAN health check rate for tunnels created on this link. The default value is `mid`.",choices:[`low`,`mid`,`high`],default:`mid`}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`,default:!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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second.`}).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(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site.`}).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`,`static-addressing-secondary-gateway-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 ss={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:os,handler:async e=>l({command:`magic-transit sites wans create`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(as,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}if(e.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let u=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),f=await c(`Creating`,async()=>n.send(as,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Created`})})};var cs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function ls(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
376
376
 
377
377
  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 us={command:`delete <wan-id>`,describe:`Delete Site WAN`,builder:ls,handler:async e=>l({command:`magic-transit sites wans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force})){process.stderr.write(`Aborted.
378
378
  `);return}let u=await c(`Deleting`,async()=>n.send(cs,{account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(u,{successLabel:`Deleted`})})};var ds={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`,body:`json`};function fs(e){return e.usage(`$0 magic-transit sites wans edit <wan-id>
379
379
 
380
- Patch a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:`Magic WAN health check rate for tunnels created on this link.`,choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`}).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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).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(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site. Set to null to remove it.`}).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)`})}const ps={command:`edit <wan-id>`,describe:`Patch Site WAN`,builder:fs,handler:async e=>l({command:`magic-transit sites wans edit`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ds,{body:t,account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(r,{successLabel:`Updated`});return}let u=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),d=await c(`Updating`,async()=>n.send(ds,{body:u,account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(d,{successLabel:`Updated`})})};var ms={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function hs(e){return e.usage(`$0 magic-transit sites wans get <wan-id>
380
+ Patch a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:`Magic WAN health check rate for tunnels created on this link.`,choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`}).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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).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(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site. Set to null to remove it.`}).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)`})}const ps={command:`edit <wan-id>`,describe:`Patch Site WAN`,builder:fs,handler:async e=>l({command:`magic-transit sites wans edit`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(ds,{body:t,account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(r,{successLabel:`Updated`});return}let u=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),f=await c(`Updating`,async()=>n.send(ds,{body:u,account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(f,{successLabel:`Updated`})})};var ms={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function hs(e){return e.usage(`$0 magic-transit sites wans get <wan-id>
381
381
 
382
382
  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 gs={command:`get <wan-id>`,describe:`Site WAN Details`,builder:hs,handler:async e=>l({command:`magic-transit sites wans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ms,{account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(u,{successLabel:`Loaded`})})};var _s={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans`};function vs(e){return e.usage(`$0 magic-transit sites wans list
383
383
 
384
384
  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 ys={command:`list`,describe:`List Site WANs`,builder:vs,handler:async e=>l({command:`magic-transit sites wans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(_s,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var bs={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`,body:`json`};function xs(e){return e.usage(`$0 magic-transit sites wans update <wan-id>
385
385
 
386
- Update a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:`Magic WAN health check rate for tunnels created on this link.`,choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`}).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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).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(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site. Set to null to remove it.`}).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)`})}const Ss={command:`update <wan-id>`,describe:`Update Site WAN`,builder:xs,handler:async e=>l({command:`magic-transit sites wans update`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(bs,{body:t,account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(r,{successLabel:`Updated`});return}let u=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),d=await c(`Updating`,async()=>n.send(bs,{body:u,account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(d,{successLabel:`Updated`})})},Cs={command:`wans`,describe:`Operations for sites.wans`,builder:e=>e.command(ss).command(us).command(ps).command(gs).command(ys).command(Ss).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ws={command:`sites`,describe:`Magic WAN branch sites — base CRUD, LAN/WAN interface configuration, ACLs, connectors, app configuration, and NetFlow config`,builder:e=>e.command(lo).command(po).command(go).command(vo).command(Bo).command(is).command(Xa).command(so).command(Lo).command(ts).command(Cs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ts={command:`magic-transit`,describe:`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,builder:e=>e.command(Ce).command(Ln).command(Jn).command(cr).command(mr).command(Cr).command(Zr).command(ui).command(ki).command(na).command(ga).command(Pa).command(ws).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ts as default};
386
+ Update a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:`Magic WAN health check rate for tunnels created on this link.`,choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`}).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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).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(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site. Set to null to remove it.`}).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)`})}const Ss={command:`update <wan-id>`,describe:`Update Site WAN`,builder:xs,handler:async e=>l({command:`magic-transit sites wans update`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(bs,{body:t,account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(r,{successLabel:`Updated`});return}let u=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),f=await c(`Updating`,async()=>n.send(bs,{body:u,account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(f,{successLabel:`Updated`})})},Cs={command:`wans`,describe:`Operations for sites.wans`,builder:e=>e.command(ss).command(us).command(ps).command(gs).command(ys).command(Ss).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ws={command:`sites`,describe:`Magic WAN branch sites — base CRUD, LAN/WAN interface configuration, ACLs, connectors, app configuration, and NetFlow config`,builder:e=>e.command(lo).command(po).command(go).command(vo).command(Bo).command(is).command(Xa).command(so).command(Lo).command(ts).command(Cs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ts={command:`magic-transit`,describe:`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,builder:e=>e.command(Ce).command(Ln).command(Jn).command(cr).command(mr).command(Cr).command(Zr).command(ui).command(ki).command(na).command(ga).command(Pa).command(ws).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ts as default};