cf 1.0.0-beta.17 → 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 (319) hide show
  1. package/README.md +7 -0
  2. package/dist/_meta/commands.json +9122 -6086
  3. package/dist/_meta/hand-written-commands.json +6 -0
  4. package/dist/_meta/schemas.json +8392 -5576
  5. package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-DhgunVFo.mjs} +6 -6
  6. package/dist/{access-DnWW2AAT.mjs → access-BDoDq_WZ.mjs} +1 -1
  7. package/dist/{accounts-8UcHNm3S.mjs → accounts-DLTCzZJg.mjs} +17 -13
  8. package/dist/{acm-qRM3iy4Z.mjs → acm-DS1CosYq.mjs} +1 -1
  9. package/dist/{addressing-CAb8z2Dq.mjs → addressing-DFeYj8TY.mjs} +19 -19
  10. package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-DXjQ8N0g.mjs} +6 -6
  11. package/dist/{ai-DnhytGdc.mjs → ai-V5YopMkS.mjs} +4 -4
  12. package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-yg8D0azz.mjs} +2 -2
  13. package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway--dkH9qGz.mjs} +42 -42
  14. package/dist/ai-search-BRtsUaUI.mjs +79 -0
  15. package/dist/{ai-security-KUs94UW-.mjs → ai-security-DRJCcLpF.mjs} +5 -5
  16. package/dist/{alerting-CCmyEPzN.mjs → alerting-8DsyMKGG.mjs} +30 -30
  17. package/dist/{analytics-BAvBj6qx.mjs → analytics-BpYUZTtQ.mjs} +7 -7
  18. package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
  19. package/dist/{api-security-BItVQymb.mjs → api-security-CBhWZE8z.mjs} +26 -26
  20. package/dist/{argo-DsJCvfml.mjs → argo-B0u2N3Dh.mjs} +1 -1
  21. package/dist/{artifacts-DzHXeah6.mjs → artifacts-B6XzjMiM.mjs} +1 -1
  22. package/dist/{audit-logs-D9XxsVZm.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-Cw4c0y89.mjs → auth-token-B1pP2jaK.mjs} +1 -1
  27. package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
  28. package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
  29. package/dist/{billing-COgAWTYh.mjs → billing-Ad-rK-JH.mjs} +6 -6
  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-Dx3lh9Fi.mjs → bot-management-CGpfjQ4w.mjs} +4 -4
  33. package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
  34. package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-CP73_yX8.mjs} +5 -5
  35. package/dist/browser-run-OpUfawh_.mjs +42 -0
  36. package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
  37. package/dist/build-DQZ2w_dQ.mjs +2 -0
  38. package/dist/builds-DsRNlILV.mjs +71 -0
  39. package/dist/{cache-BUh85NRr.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-DJhpXf38.mjs → cli-Dd1n2YAJ.mjs} +1 -1
  45. package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
  46. package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
  47. package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
  48. package/dist/cloudforce-one-C1xdpspb.mjs +395 -0
  49. package/dist/{command-RC9WM5jq.mjs → command-BioiZMm9.mjs} +1 -1
  50. package/dist/{command-rx0Kb5pn.mjs → command-C0nJ2LRd.mjs} +1 -1
  51. package/dist/{command-CiApsRql.mjs → command-C5ARgURy.mjs} +1 -1
  52. package/dist/{command-CCq-Z2Ua.mjs → command-C7NIRU-u.mjs} +1 -1
  53. package/dist/{command-B694oLDo.mjs → command-C8DV-x_C.mjs} +1 -1
  54. package/dist/{command-Bmee6uwe.mjs → command-CFV1cqfR.mjs} +1 -1
  55. package/dist/{command-CbQFbfps.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-CAs3SxlI.mjs → command-DWE7YdeC.mjs} +1 -1
  59. package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
  60. package/dist/{command-D1JR8Fb7.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-DerHAjQL.mjs → command-yAXk5NXh.mjs} +1 -1
  64. package/dist/{completions-11latun5.mjs → completions-Bh0Hz-hA.mjs} +3 -3
  65. package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
  68. package/dist/{connectors-DXIUG4Zi.mjs → connectors-RUEU1QDB.mjs} +1 -1
  69. package/dist/containers-xU-0EhLO.mjs +78 -0
  70. package/dist/{containers-WMWKhLkp.mjs → containers-yUOvm-4V.mjs} +211 -211
  71. package/dist/{content-scan-CRDmR7rD.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
  72. package/dist/{context-q-6bMSL-.mjs → context-BQ6KeMgq.mjs} +2 -2
  73. package/dist/cps-CgPduy0H.mjs +6 -0
  74. package/dist/csam-scanner-B0Ra6fXL.mjs +10 -0
  75. package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
  76. package/dist/custom-hostnames-Dzov_CPw.mjs +27 -0
  77. package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
  78. package/dist/custom-pages-DxVD_f10.mjs +21 -0
  79. package/dist/{d1-Dbs8HItA.mjs → d1-D7p4uJ-e.mjs} +17 -19
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-5utIiOMN.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-C9B07eJY.mjs → diagnostics-DdhTemYB.mjs} +2 -2
  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-lbM3i4x-.mjs → dls-BBODA9Rk.mjs} +1 -1
  91. package/dist/{dns-QTMPGYMa.mjs → dns-CK_hyn5q.mjs} +22 -22
  92. package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DbvX9R-7.mjs} +9 -9
  93. package/dist/{docs-bV3hPwQL.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-0JvGTV27.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
  98. package/dist/{email-auth-PzRqG0ex.mjs → email-auth-BEgDxU-g.mjs} +1 -1
  99. package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-DKWmPOVo.mjs} +13 -13
  100. package/dist/{email-security-CSTKIecn.mjs → email-security-RWbAp8qa.mjs} +44 -44
  101. package/dist/{email-sending-BSwuAir8.mjs → email-sending-BbJy_vl8.mjs} +18 -18
  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-B_lFnwaL.mjs → field-extractors-Bob6udAc.mjs} +2 -2
  105. package/dist/{firewall-BsZxVitA.mjs → firewall-DziiEsR8.mjs} +20 -20
  106. package/dist/{flagship-qBohOZaM.mjs → flagship-xOtgddUK.mjs} +11 -11
  107. package/dist/{fraud-vGNdrSm-.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-BHdOg4VW.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
  111. package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
  112. package/dist/healthchecks-CbD2PsnM.mjs +22 -0
  113. package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
  114. package/dist/{iam-Dl_n_Lqq.mjs → iam-DvsCztqU.mjs} +9 -9
  115. package/dist/{images-vMtXk2Rf.mjs → images-BipVjHNw.mjs} +37 -37
  116. package/dist/index.mjs +1 -1
  117. package/dist/init-LvFgCsNX.mjs +43 -0
  118. package/dist/{intel-Bq4GGXv-.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-BcvZS46g.mjs → ips-2iUGs8ws.mjs} +1 -1
  122. package/dist/{k2-DL4hrVTj.mjs → k2-DGzRm3NJ.mjs} +2 -2
  123. package/dist/{kv-BLo9wMgb.mjs → kv-BW-s9MJY.mjs} +4 -4
  124. package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
  125. package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
  126. package/dist/load-balancers-CtnusAzP.mjs +76 -0
  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-Du_W6b9o.mjs → login-DR60WiAY.mjs} +1 -1
  132. package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
  133. package/dist/{logos-BuhvSu_H.mjs → logos-Yzhd-VKb.mjs} +2 -2
  134. package/dist/logpush-JYG4gXZ-.mjs +46 -0
  135. package/dist/{logs-CaKOk-1v.mjs → logs-DLblEjK0.mjs} +3 -3
  136. package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
  137. package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-D2px4Ep4.mjs} +9 -9
  138. package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-Bnwsi0UQ.mjs} +170 -170
  139. package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-CTtNoxzW.mjs} +9 -9
  140. package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-B92mJi5i.mjs} +2 -2
  141. package/dist/{matches-DkLSWb5X.mjs → matches-CzbL1XD-.mjs} +1 -1
  142. package/dist/{mcp-BcV1XqE8.mjs → mcp-Cic_aMer.mjs} +10 -10
  143. package/dist/{mesh-CSSlZ-0F.mjs → mesh-DZTgD16C.mjs} +14 -14
  144. package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
  145. package/dist/{monetization-B-nJ0SyI.mjs → monetization-DCQ2_niU.mjs} +4 -4
  146. package/dist/{network-ZzxQ_Dcz.mjs → network-BqMqD2qn.mjs} +27 -25
  147. package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
  148. package/dist/o11y-CS5q1vSh.mjs +93 -0
  149. package/dist/oauth-DPLYUvRl.mjs +2 -0
  150. package/dist/oauth-DdYSPYoE.mjs +4 -0
  151. package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
  152. package/dist/{oauth-scopes-hseWES1v.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-DFRN2g6z.mjs +75 -0
  156. package/dist/{organizations-CcgZPmFl.mjs → organizations-yiGopnKf.mjs} +1 -1
  157. package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
  158. package/dist/output-O6b9MR9R.mjs +2 -0
  159. package/dist/{page-rules-DFfqfllI.mjs → page-rules-F1Jdxx6A.mjs} +4 -4
  160. package/dist/pages-CezC0YrR.mjs +54 -0
  161. package/dist/pay-per-crawl-fZ-kTBbN.mjs +38 -0
  162. package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-B14BTKVI.mjs} +8 -8
  163. package/dist/pipelines-BN7ydBHl.mjs +44 -0
  164. package/dist/precursor-B88RDDZT.mjs +4 -0
  165. package/dist/previews-CiqRIq_k.mjs +7 -0
  166. package/dist/process-DiXf4VPi.mjs +2 -0
  167. package/dist/{progress-DaQ4MzBI.mjs → progress-CdlDthXA.mjs} +1 -1
  168. package/dist/{prompt-KWYZvJWM.mjs → prompt-1AC-qwxS.mjs} +1 -1
  169. package/dist/{queries-DoyhspQf.mjs → queries-C2sgUI9j.mjs} +3 -3
  170. package/dist/{queues-BPxTU2rU.mjs → queues-DCP5x-PZ.mjs} +17 -17
  171. package/dist/{r2-CQt4S7o7.mjs → r2-D7UhzWR7.mjs} +21 -21
  172. package/dist/{radar-CALpR1vq.mjs → radar-osOiFeY_.mjs} +1 -1
  173. package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
  174. package/dist/{realtime-BiHKBoI4.mjs → realtime-DCnqxiWo.mjs} +90 -87
  175. package/dist/registrar-DAFYjjRa.mjs +43 -0
  176. package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-zeNHABZ0.mjs} +11 -9
  177. package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
  178. package/dist/{reporting-8aRJD5HX.mjs → reporting-KehV_PXm.mjs} +1 -1
  179. package/dist/{request-headers-CqfJOkpO.mjs → request-headers-ojAw3pQO.mjs} +1 -1
  180. package/dist/request-tracers-BStCgh6m.mjs +4 -0
  181. package/dist/resolve-BGNMAcGR.mjs +2 -0
  182. package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-3xtSgWG7.mjs} +19 -19
  183. package/dist/{rules-CFOuN3t2.mjs → rules-7F-G2Bg_.mjs} +6 -6
  184. package/dist/{rulesets-DkhV2Hny.mjs → rulesets-B0YtS2br.mjs} +20 -20
  185. package/dist/{rum-BnMW0Tlb.mjs → rum-B3V6tqS-.mjs} +6 -6
  186. package/dist/{run-Clc3P2u7.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-b096XMpt.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
  190. package/dist/{scim-tvZm6A-r.mjs → scim-CQ9TdajH.mjs} +6 -6
  191. package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
  192. package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-BsLMdo1r.mjs} +2 -2
  193. package/dist/{security-txt-D4pRk7-w.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-BTXQsVxz.mjs +24 -0
  197. package/dist/{snippets-BIcZ6vSW.mjs → snippets-CYVieyc3.mjs} +3 -3
  198. package/dist/source-AlTrHNem.mjs +6 -0
  199. package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
  200. package/dist/{spectrum-DjDX0geK.mjs → spectrum-DLRr4Q03.mjs} +14 -14
  201. package/dist/{speed-DiPoFJMm.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-CL1B69Pw.mjs +139 -0
  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-uhn_Zsni.mjs → stream-DrMZOO5u.mjs} +55 -55
  210. package/dist/{submit-C3suIDBX.mjs → submit-DjlLoVk2.mjs} +1 -1
  211. package/dist/tags-DY7Ur1k-.mjs +23 -0
  212. package/dist/{telemetry-DYjsavEr.mjs → telemetry-BG3kcYsV.mjs} +1 -1
  213. package/dist/telemetry-Dpm6GfZD.mjs +2 -0
  214. package/dist/{tenant-DK88yQM4.mjs → tenant-BEMfNMjO.mjs} +1 -1
  215. package/dist/{tenant-custom-nameservers-BZ1JD1Yf.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-DXrbEy2A.mjs → turnstile-DXEfneQq.mjs} +5 -5
  219. package/dist/ui-CY79jlGZ.mjs +2 -0
  220. package/dist/update-check-DfbYVefm.mjs +2 -0
  221. package/dist/{update-check-BhhtSXVZ.mjs → update-check-atcehhBC.mjs} +1 -1
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-a0mY4UsC.mjs → url-info-B1kL9asc.mjs} +1 -1
  224. package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
  225. package/dist/url-scanner-OnZP_-jm.mjs +16 -0
  226. package/dist/{user-DDH9lxf5.mjs → user-BBBuFNj4.mjs} +59 -59
  227. package/dist/{vectorize-DaT3amFV.mjs → vectorize-DcctB8bw.mjs} +17 -17
  228. package/dist/version-CLgSHoNm.mjs +2 -0
  229. package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-JaFE5wP1.mjs} +13 -13
  230. package/dist/{web-assets-NqNglLSI.mjs → web-assets-Cu0swUPe.mjs} +35 -35
  231. package/dist/{web3-UnCUuIfB.mjs → web3-C67z4OtQ.mjs} +6 -6
  232. package/dist/workers-ClTP0Ysl.mjs +43 -0
  233. package/dist/workers-builds-C5wKhvKe.mjs +14 -0
  234. package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-rxwkYyb3.mjs} +25 -22
  235. package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
  236. package/dist/{workflows-Dq-k81hU.mjs → workflows-COJ5jwvk.mjs} +24 -24
  237. package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
  238. package/dist/zaraz-BkZ7yW05.mjs +22 -0
  239. package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-lUFLYuL1.mjs} +509 -454
  240. package/dist/{zone-DcZIUTWt.mjs → zone-CC1_qxt-.mjs} +1 -1
  241. package/dist/{zones-BVdvYUCv.mjs → zones-BRiLlTmW.mjs} +45 -36
  242. package/package.json +14 -14
  243. package/dist/account-tags-zvHRQZxb.mjs +0 -15
  244. package/dist/ai-search-CtfW5fzl.mjs +0 -79
  245. package/dist/auth-C530fHKQ.mjs +0 -2
  246. package/dist/auth-Ccm5viK_.mjs +0 -2
  247. package/dist/auth-MNz2D-PD.mjs +0 -2
  248. package/dist/body-parser-DkHKPkJ7.mjs +0 -2
  249. package/dist/browser-run-ChXohmNG.mjs +0 -42
  250. package/dist/build-BRJnyeu8.mjs +0 -2
  251. package/dist/builds-DmEFTQTa.mjs +0 -71
  252. package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
  253. package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
  254. package/dist/client-certificates-B3UxH_Au.mjs +0 -13
  255. package/dist/cloudforce-one-DN5N3C3w.mjs +0 -405
  256. package/dist/containers-DCH6MFjY.mjs +0 -78
  257. package/dist/cps-Due0P5IW.mjs +0 -6
  258. package/dist/csam-scanner-DvLrPw45.mjs +0 -10
  259. package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
  260. package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
  261. package/dist/custom-hostnames-DI_dFaof.mjs +0 -27
  262. package/dist/custom-pages-ubava9Qm.mjs +0 -21
  263. package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
  264. package/dist/deploy-context-C0iVbWRG.mjs +0 -56
  265. package/dist/discover-DIDEGKo3.mjs +0 -2
  266. package/dist/error-sanitization-CIQOep3I.mjs +0 -2
  267. package/dist/generate-D80-1GnZ.mjs +0 -2
  268. package/dist/get-By1q8YlI.mjs +0 -2
  269. package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
  270. package/dist/hostnames-CLlaMqHu.mjs +0 -11
  271. package/dist/init-_7djeBVw.mjs +0 -43
  272. package/dist/interactive-DGUWZ2Gk.mjs +0 -2
  273. package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
  274. package/dist/keys-BSV5IXdU.mjs +0 -4
  275. package/dist/load-balancers-CCCWoQXv.mjs +0 -76
  276. package/dist/local-DxWDQDnG.mjs +0 -2
  277. package/dist/login-DT6Q1UJw.mjs +0 -5
  278. package/dist/logpush-DgZtF9vG.mjs +0 -46
  279. package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
  280. package/dist/o11y-LG6Y9LUZ.mjs +0 -93
  281. package/dist/oauth-Bx693Af5.mjs +0 -2
  282. package/dist/oauth-CP82E1_0.mjs +0 -4
  283. package/dist/organization-DMr_z6n4.mjs +0 -71
  284. package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
  285. package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
  286. package/dist/output-Co4xdFf6.mjs +0 -2
  287. package/dist/pages-BkcL5rC4.mjs +0 -54
  288. package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
  289. package/dist/pipelines-DUMIVwof.mjs +0 -44
  290. package/dist/precursor-DsGbA_YJ.mjs +0 -4
  291. package/dist/previews-Cma3-M7K.mjs +0 -7
  292. package/dist/process-2wmDCy17.mjs +0 -2
  293. package/dist/registrar-gERQ3b85.mjs +0 -43
  294. package/dist/request-tracers-DcnwQg3K.mjs +0 -4
  295. package/dist/resolve-BpgXeklt.mjs +0 -2
  296. package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
  297. package/dist/run-CHNyLZLG.mjs +0 -2
  298. package/dist/session-Cq3YNLoI.mjs +0 -2
  299. package/dist/shared-zePemxHi.mjs +0 -2
  300. package/dist/smart-shield-2egm1Vaw.mjs +0 -24
  301. package/dist/source-mXUcrTVw.mjs +0 -6
  302. package/dist/sql-DLjCt_R3.mjs +0 -4
  303. package/dist/src-CutrsNl4.mjs +0 -125
  304. package/dist/ssl-vNzK0c9S.mjs +0 -45
  305. package/dist/startup-profile-BOaseXnO.mjs +0 -29
  306. package/dist/startup-profile-BwEZFVGS.mjs +0 -2
  307. package/dist/state-CODDG9Nx.mjs +0 -2
  308. package/dist/tags-Dy2jG-Dt.mjs +0 -4
  309. package/dist/telemetry-Bdv5LZZs.mjs +0 -2
  310. package/dist/tunnels-DjbomhCa.mjs +0 -29
  311. package/dist/ui-BtIBQeaG.mjs +0 -2
  312. package/dist/update-check-Dld7rbLd.mjs +0 -2
  313. package/dist/url-scanner-D0egjBe5.mjs +0 -16
  314. package/dist/values-Bfr5-bL6.mjs +0 -4
  315. package/dist/version-CAuKDZAG.mjs +0 -2
  316. package/dist/workers-DfA9ugmb.mjs +0 -40
  317. package/dist/workers-builds-Cy6fdtm5.mjs +0 -14
  318. package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
  319. package/dist/zaraz-Dpr1pLDx.mjs +0 -22
@@ -1,18 +1,18 @@
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-MNz2D-PD.mjs";import{a as i,t as a}from"./context-q-6bMSL-.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-DaQ4MzBI.mjs";import{t as l}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{i as u,n as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m}from"./prompt-KWYZvJWM.mjs";var h={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`}};function g(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
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{n as u,r as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-1AC-qwxS.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
3
3
 
4
- Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:g,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(h,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})},v={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create
4
+ Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:_,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(g,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})},y={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create
5
5
 
6
- Creates an upload repository or reserves an asynchronous deployed Worker import by name. Worker imports require Idempotency-Key.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`name`,{type:`string`,description:`The name field`}).option(`worker-script-name`,{type:`string`,description:`The worker_script_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Create repository`,builder:y,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),worker_script_name:p(e[`worker-script-name`],`worker-script-name`,`text`)}):d(e.body)});return}let h=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,`The name field`));let _={};e.name!==void 0&&u(_,[`name`],p(e.name,`name`,`text`)),e[`worker-script-name`]!==void 0&&u(_,[`worker_script_name`],p(e[`worker-script-name`],`worker-script-name`,`text`));let v=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}`,query:[`scan_limit`,`scan_cursor`],errors:{404:`NotFoundError`}};function S(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories get <repo-id>
6
+ Creates an upload repository or reserves an asynchronous deployed Worker import by name. Worker imports require Idempotency-Key.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`name`,{type:`string`,description:`The name field`}).option(`worker-script-name`,{type:`string`,description:`The worker_script_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create`,describe:`Create repository`,builder:b,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),worker_script_name:m(e[`worker-script-name`],`worker-script-name`,`text`)}):u(e.body)});return}let d=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name field`));let _={};e.name!==void 0&&f(_,[`name`],m(e.name,`name`,`text`)),e[`worker-script-name`]!==void 0&&f(_,[`worker_script_name`],m(e[`worker-script-name`],`worker-script-name`,`text`));let v=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}`,query:[`scan_limit`,`scan_cursor`],errors:{404:`NotFoundError`}};function C(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories get <repo-id>
7
7
 
8
- Gets repository metadata, source readiness, and customer scan history.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`scan-limit`,{type:`number`,description:`Scan limit`}).option(`scan-cursor`,{type:`string`,description:`Scan cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <repo-id>`,describe:`Get repository`,builder:S,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={scan_limit:e[`scan-limit`],scan_cursor:e[`scan-cursor`]};if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}`,pathParams:{"repo-id":String(e[`repo-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(x,{account_id:u,repo_id:e[`repo-id`],...n}));o(d,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos`,query:[`limit`,`cursor`],errors:{404:`NotFoundError`}};function T(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories list
8
+ Gets repository metadata, source readiness, and customer scan history.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`scan-limit`,{type:`number`,description:`Scan limit`}).option(`scan-cursor`,{type:`string`,description:`Scan cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <repo-id>`,describe:`Get repository`,builder:C,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={scan_limit:e[`scan-limit`],scan_cursor:e[`scan-cursor`]};if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}`,pathParams:{"repo-id":String(e[`repo-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(S,{account_id:u,repo_id:e[`repo-id`],...n}));o(d,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos`,query:[`limit`,`cursor`],errors:{404:`NotFoundError`}};function E(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories list
9
9
 
10
- Lists repositories available for vulnerability discovery in an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List repositories`,builder:T,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(w,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},D={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(b).command(C).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 managed-defense vulnerability-discovery scans create
10
+ Lists repositories available for vulnerability discovery in an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List repositories`,builder:E,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(T,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},O={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(x).command(w).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 managed-defense vulnerability-discovery scans create
11
11
 
12
- Submits repository intent for operator review. This endpoint does not immediately start execution. Worker-imported repositories must be ready; explicit \`repo_hosts\` must be authorized before the request is persisted.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`repos`,{type:`string`,array:!0,description:`The repos field`}).option(`telemetry-window-end`,{type:`string`,description:`The telemetry_window.end field`}).option(`telemetry-window-start`,{type:`string`,description:`The telemetry_window.start field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`telemetry-window-end`,`telemetry-window-start`].some(t=>e[t]!==void 0)){let t=[`telemetry-window-end`,`telemetry-window-start`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --telemetry_window-* flag is set`)}return!0})}const k={command:`create`,describe:`Create scan`,builder:O,handler:async e=>l({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({repos:e.repos,telemetry_window:{end:p(e[`telemetry-window-end`],`telemetry-window-end`,`text`),start:p(e[`telemetry-window-start`],`telemetry-window-start`,`text`)}}):d(e.body)});return}let m=await r(e),h=e.local?t:await a();if(e.accountId=h,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(m,`POST`,`/accounts/${h}/managed-defense/vulnerability-discovery/scans`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let g={};e.repos!==void 0&&u(g,[`repos`],e.repos),e[`telemetry-window-end`]!==void 0&&u(g,[`telemetry_window`,`end`],p(e[`telemetry-window-end`],`telemetry-window-end`,`text`)),e[`telemetry-window-start`]!==void 0&&u(g,[`telemetry_window`,`start`],p(e[`telemetry-window-start`],`telemetry-window-start`,`text`));let _=await c(`Creating`,async()=>n(m,`POST`,`/accounts/${h}/managed-defense/vulnerability-discovery/scans`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(_,{successLabel:`Created`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`}};function j(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get-report <scan-id>
12
+ Submits repository intent for operator review. This endpoint does not immediately start execution. Worker-imported repositories must be ready; explicit \`repo_hosts\` must be authorized before the request is persisted.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`repo-hosts`,{type:`string`,description:`Explicit hostname scopes. Every hostname must be authorized for its repository before review admission; rejected scopes return 422 and do not persist a scan request. Provide as a JSON object or @path/to/file.json.`}).option(`repos`,{type:`string`,array:!0,description:`The repos field`}).option(`telemetry-window-end`,{type:`string`,description:`The telemetry_window.end field`}).option(`telemetry-window-start`,{type:`string`,description:`The telemetry_window.start field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`telemetry-window-end`,`telemetry-window-start`].some(t=>e[t]!==void 0)){let t=[`telemetry-window-end`,`telemetry-window-start`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --telemetry_window-* flag is set`)}return!0})}const A={command:`create`,describe:`Create scan`,builder:k,handler:async e=>l({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({repo_hosts:d(e[`repo-hosts`],`repo-hosts`),repos:e.repos,telemetry_window:{end:m(e[`telemetry-window-end`],`telemetry-window-end`,`text`),start:m(e[`telemetry-window-start`],`telemetry-window-start`,`text`)}},[[`repo_hosts`]]):u(e.body)});return}let h=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/scans`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let _={};e[`repo-hosts`]!==void 0&&f(_,[`repo_hosts`],d(e[`repo-hosts`],`repo-hosts`)),e.repos!==void 0&&f(_,[`repos`],e.repos),e[`telemetry-window-end`]!==void 0&&f(_,[`telemetry_window`,`end`],m(e[`telemetry-window-end`],`telemetry-window-end`,`text`)),e[`telemetry-window-start`]!==void 0&&f(_,[`telemetry_window`,`start`],m(e[`telemetry-window-start`],`telemetry-window-start`,`text`));let v=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/scans`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`}};function M(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get-report <scan-id>
13
13
 
14
- Gets the active operator-reviewed scan report. Repository metadata records report readiness even when no publication is available.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get-report <scan-id>`,describe:`Get reviewed vulnerability report`,builder:j,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(A,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}`,errors:{404:`NotFoundError`}};function P(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <scan-id>
14
+ Gets the active operator-reviewed scan report. Repository metadata records report readiness even when no publication is available.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get-report <scan-id>`,describe:`Get reviewed vulnerability report`,builder:M,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(j,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}`,errors:{404:`NotFoundError`}};function F(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <scan-id>
15
15
 
16
- Gets one customer-requested scan across its review and execution lifecycle.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <scan-id>`,describe:`Get scan`,builder:P,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(N,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans`,query:[`limit`,`cursor`,`status`,`repo`],errors:{404:`NotFoundError`}};function L(e){return e.usage(`$0 managed-defense vulnerability-discovery scans list
16
+ Gets one customer-requested scan across its review and execution lifecycle.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <scan-id>`,describe:`Get scan`,builder:F,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(P,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans`,query:[`limit`,`cursor`,`status`,`repo`],errors:{404:`NotFoundError`}};function R(e){return e.usage(`$0 managed-defense vulnerability-discovery scans list
17
17
 
18
- Lists customer-requested scans across review and execution lifecycle states.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`status`,{type:`string`,description:`Repeat parameter or provide comma-separated values.`}).option(`repo`,{type:`string`,description:`Repo`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List scans`,builder:L,handler:async e=>l({command:`managed-defense vulnerability-discovery scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor,status:e.status,repo:e.repo};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(I,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},z={command:`scans`,describe:`Operations for vulnerability-discovery.scans`,builder:e=>e.command(k).command(F).command(M).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},B={command:`vulnerability-discovery`,describe:`Operations for vulnerability-discovery`,builder:e=>e.command(v).command(D).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`managed-defense`,describe:`managed-defense`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
18
+ Lists customer-requested scans across review and execution lifecycle states.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`status`,{type:`string`,description:`Repeat parameter or provide comma-separated values.`}).option(`repo`,{type:`string`,description:`Repo`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List scans`,builder:R,handler:async e=>l({command:`managed-defense vulnerability-discovery scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor,status:e.status,repo:e.repo};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(L,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},B={command:`scans`,describe:`Operations for vulnerability-discovery.scans`,builder:e=>e.command(A).command(I).command(N).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`vulnerability-discovery`,describe:`Operations for vulnerability-discovery`,builder:e=>e.command(y).command(O).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`managed-defense`,describe:`managed-defense`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{i as n}from"./context-q-6bMSL-.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-DaQ4MzBI.mjs";import{t as o}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as s,r as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./prompt-KWYZvJWM.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./prompt-1AC-qwxS.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
3
3
 
4
4
  Disables all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete`,describe:`Delete Managed Transforms`,builder:f,handler:async e=>o({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force})){process.stderr.write(`Aborted.
5
5
  `);return}let c=await a(`Deleting`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/managed_headers`};function h(e){return e.usage(`$0 managed-transforms list
6
6
 
7
7
  Fetches a list of all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`List Managed Transforms`,builder:h,handler:async e=>o({command:`managed-transforms list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var _={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/managed_headers`,body:`json`};function v(e){return e.usage(`$0 managed-transforms update
8
8
 
9
- Updates the status of one or more Managed Transforms.`).option(`managed-request-headers`,{type:`string`,description:`The list of Managed Request Transforms. Provide as a JSON array of objects or @path/to/file.json.`}).option(`managed-response-headers`,{type:`string`,description:`The list of Managed Response Transforms. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A Managed Transforms patch object. Both fields are optional; only the sections provided will be updated.`})}const y={command:`update`,describe:`Update Managed Transforms`,builder:v,handler:async e=>o({command:`managed-transforms update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed_request_headers:c(e[`managed-request-headers`],`managed-request-headers`),managed_response_headers:c(e[`managed-response-headers`],`managed-response-headers`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(_,{body:t,zone_id:u}));r(n,{successLabel:`Updated`});return}let d=l({managed_request_headers:c(e[`managed-request-headers`],`managed-request-headers`),managed_response_headers:c(e[`managed-response-headers`],`managed-response-headers`)}),f=await a(`Updating`,async()=>o.send(_,{body:d,zone_id:u}));r(f,{successLabel:`Updated`})})},b={command:`managed-transforms`,describe:`managed-transforms`,builder:e=>e.command(p).command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
9
+ Updates the status of one or more Managed Transforms.`).option(`managed-request-headers`,{type:`string`,description:`The list of Managed Request Transforms. Provide as a JSON array of objects or @path/to/file.json.`}).option(`managed-response-headers`,{type:`string`,description:`The list of Managed Response Transforms. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A Managed Transforms patch object. Both fields are optional; only the sections provided will be updated.`})}const y={command:`update`,describe:`Update Managed Transforms`,builder:v,handler:async e=>o({command:`managed-transforms update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed_request_headers:s(e[`managed-request-headers`],`managed-request-headers`),managed_response_headers:s(e[`managed-response-headers`],`managed-response-headers`)}):c(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(_,{body:t,zone_id:u}));r(n,{successLabel:`Updated`});return}let d=l({managed_request_headers:s(e[`managed-request-headers`],`managed-request-headers`),managed_response_headers:s(e[`managed-response-headers`],`managed-response-headers`)}),f=await a(`Updating`,async()=>o.send(_,{body:d,zone_id:u}));r(f,{successLabel:`Updated`})})},b={command:`managed-transforms`,describe:`managed-transforms`,builder:e=>e.command(p).command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-MNz2D-PD.mjs";import{a as r,t as i}from"./context-q-6bMSL-.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-DaQ4MzBI.mjs";import{t as c}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/matches/download`,query:[`id`,`offset`,`limit`,`include_domain_id`,`include_dismissed`],errors:{422:`UnprocessableEntityError`}};function u(e){return e.usage(`$0 matches download get
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/matches/download`,query:[`id`,`offset`,`limit`,`include_domain_id`,`include_dismissed`],errors:{422:`UnprocessableEntityError`}};function u(e){return e.usage(`$0 matches download get
3
3
 
4
4
  Return matches as CSV for string queries based on ID`).option(`id`,{type:`string`,description:`ID`}).option(`offset`,{type:`number`,description:`Offset`}).option(`limit`,{type:`number`,description:`Limit`}).option(`include-domain-id`,{type:`boolean`,description:`Include domain ID`}).option(`include-dismissed`,{type:`boolean`,description:`Include dismissed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Download matches for string queries by ID`,builder:u,handler:async e=>c({command:`matches download get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},e,async()=>{let c={id:e.id,offset:e.offset,limit:e.limit,include_domain_id:e[`include-domain-id`],include_dismissed:e[`include-dismissed`]};if(e.dryRun){let e=await r();o({command:`cf matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/matches/download`,pathParams:{},query:c,bodyKind:`none`});return}let u=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));a(f,{successLabel:`Loaded`})})},f={command:`download`,describe:`Operations for download`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var p={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/matches`,query:[`id`,`offset`,`limit`,`include_domain_id`,`include_dismissed`],errors:{422:`UnprocessableEntityError`}};function m(e){return e.usage(`$0 matches get
5
5
 
@@ -1,22 +1,22 @@
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{n}from"./auth-MNz2D-PD.mjs";import{a as r,t as i}from"./context-q-6bMSL-.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-DaQ4MzBI.mjs";import{t as c}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-KWYZvJWM.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-1AC-qwxS.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
3
3
 
4
- Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:_,handler:async e=>c({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days};if(e.dryRun){let e=await r();o({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,body:`json`,errors:{400:`BadRequestError`}};function b(e){return e.usage(`$0 mcp portals create
4
+ Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:_,handler:async e=>c({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let e=await r();o({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,body:`json`,errors:{400:`BadRequestError`}};function b(e){return e.usage(`$0 mcp portals create
5
5
 
6
- Creates a new MCP portal for managing AI tool access through Cloudflare Access.`).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`,default:!1}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create`,describe:`Create a new MCP Portal`,builder:b,handler:async e=>c({command:`mcp portals create`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:u(e.servers,`servers`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(y,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await p(`hostname`,`Hostname where the MCP portal is available.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP portal.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP portal.`));let h=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:u(e.servers,`servers`)}),g=await s(`Creating`,async()=>c.send(y,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function S(e){return e.usage(`$0 mcp portals delete <id>
6
+ Creates a new MCP portal for managing AI tool access through Cloudflare Access.`).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`,default:!1}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create`,describe:`Create a new MCP Portal`,builder:b,handler:async e=>c({command:`mcp portals create`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}):u(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(y,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await p(`hostname`,`Hostname where the MCP portal is available.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP portal.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP portal.`));let h=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}),g=await s(`Creating`,async()=>c.send(y,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function S(e){return e.usage(`$0 mcp portals delete <id>
7
7
 
8
8
  Deletes an MCP portal from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <id>`,describe:`Delete an MCP Portal`,builder:S,handler:async e=>c({command:`mcp portals delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP portal.`})){process.stderr.write(`Aborted.
9
9
  `);return}let u=await s(`Deleting`,async()=>c.send(ee,{account_id:l,id:e.id}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function T(e){return e.usage(`$0 mcp portals list
10
10
 
11
11
  Lists all MCP portals configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name, hostname`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List MCP Portals`,builder:T,handler:async e=>c({command:`mcp portals list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search};if(e.dryRun){let e=await r();o({command:`cf mcp portals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(w,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 mcp portals read <id>
12
12
 
13
- Read the details of a single MCP Portal, including its configured servers.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`read <id>`,describe:`Read details of an MCP Portal`,builder:O,handler:async e=>c({command:`mcp portals read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l,id:e.id}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/portals/${t.portal_id}/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`],errors:{400:`BadRequestError`}};function j(e){return e.usage(`$0 mcp portals tool-call-analytics <portal-id>
13
+ Read the details of a single MCP Portal, including its configured servers.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`read <id>`,describe:`Read details of an MCP Portal`,builder:O,handler:async e=>c({command:`mcp portals read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l,id:e.id}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/portals/${t.portal_id}/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function j(e){return e.usage(`$0 mcp portals tool-call-analytics <portal-id>
14
14
 
15
- Returns daily or monthly tool-call counts for a portal.`).positional(`portal-id`,{type:`string`,description:`Portal ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`tool-call-analytics <portal-id>`,describe:`Per-portal MCP tool-call timeseries`,builder:j,handler:async e=>c({command:`mcp portals tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days};if(e.dryRun){let t=await r();o({command:`cf mcp portals tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/analytics/portals/${e[`portal-id`]==null?`<portal-id>`:encodeURIComponent(String(e[`portal-id`]))}/tool-calls/timeseries`,pathParams:{"portal-id":String(e[`portal-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(A,{account_id:u,portal_id:e[`portal-id`],...c}));a(d,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 mcp portals update <id>
15
+ Returns daily or monthly tool-call counts for a portal.`).positional(`portal-id`,{type:`string`,description:`Portal ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`tool-call-analytics <portal-id>`,describe:`Per-portal MCP tool-call timeseries`,builder:j,handler:async e=>c({command:`mcp portals tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let t=await r();o({command:`cf mcp portals tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/analytics/portals/${e[`portal-id`]==null?`<portal-id>`:encodeURIComponent(String(e[`portal-id`]))}/tool-calls/timeseries`,pathParams:{"portal-id":String(e[`portal-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(A,{account_id:u,portal_id:e[`portal-id`],...c}));a(d,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 mcp portals update <id>
16
16
 
17
- Updates an MCP portal configuration.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update <id>`,describe:`Update an MCP Portal`,builder:P,handler:async e=>c({command:`mcp portals update`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:u(e.servers,`servers`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:p,id:e.id}));a(n,{successLabel:`Updated`});return}let m=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:u(e.servers,`servers`)}),h=await s(`Updating`,async()=>c.send(N,{body:m,account_id:p,id:e.id}));a(h,{successLabel:`Updated`})})},I={command:`portals`,describe:`Manage MCP portals, attached servers, and Code Mode settings`,builder:e=>e.command(v).command(x).command(C).command(E).command(k).command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,body:`json`,errors:{400:`BadRequestError`}};function te(e){return e.usage(`$0 mcp servers create
17
+ Updates an MCP portal configuration.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update <id>`,describe:`Update an MCP Portal`,builder:P,handler:async e=>c({command:`mcp portals update`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}):u(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:p,id:e.id}));a(n,{successLabel:`Updated`});return}let m=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}),h=await s(`Updating`,async()=>c.send(N,{body:m,account_id:p,id:e.id}));a(h,{successLabel:`Updated`})})},I={command:`portals`,describe:`Manage MCP portals, attached servers, and Code Mode settings`,builder:e=>e.command(v).command(x).command(C).command(E).command(k).command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,body:`json`,errors:{400:`BadRequestError`}};function te(e){return e.usage(`$0 mcp servers create
18
18
 
19
- Creates a new MCP server for connecting to an upstream MCP endpoint.`).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`auth-type`,{type:`string`,description:`Authentication method used to connect to the upstream MCP server.`,choices:[`oauth`,`bearer`,`unauthenticated`]}).coerce(`auth-type`,e=>f(e,`auth-type`,`text`)).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. Required when creating a manual OAuth server or converting an existing server to manual mode. Omit it on update to preserve the existing secret; provide it to rotate the secret. Stored AES-GCM-encrypted in server_oauth_secrets; never returned by read endpoints.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`hostname`,{type:`string`,description:`URL of the upstream MCP endpoint.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, the gateway worker uses the shared Cloudflare-owned OAuth callback endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the customer portal hostname. Defaults to false (off); opt in per server by setting true.`,default:!1}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`,default:!1}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a new MCP Server`,builder:te,handler:async e=>c({command:`mcp servers create`,classification:{safeFlags:[`auth-type`,`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:u(e[`updated-prompts`],`updated-prompts`),updated_tools:u(e[`updated-tools`],`updated-tools`)}):l(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(L,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e[`auth-type`]===void 0&&(e[`auth-type`]=await m(`auth-type`,`Authentication method used to connect to the upstream MCP server.`,[`oauth`,`bearer`,`unauthenticated`])),e.hostname===void 0&&(e.hostname=await p(`hostname`,`URL of the upstream MCP endpoint.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP server.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP server.`));let g=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:u(e[`updated-prompts`],`updated-prompts`),updated_tools:u(e[`updated-tools`],`updated-tools`)}),_=await s(`Creating`,async()=>c.send(L,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var z={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,errors:{404:`NotFoundError`}};function B(e){return e.usage(`$0 mcp servers delete <id>
19
+ Creates a new MCP server for connecting to an upstream MCP endpoint.`).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`auth-type`,{type:`string`,description:`Authentication method used to connect to the upstream MCP server.`,choices:[`oauth`,`bearer`,`unauthenticated`]}).coerce(`auth-type`,e=>f(e,`auth-type`,`text`)).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. Required when creating a manual OAuth server or converting an existing server to manual mode. Omit it on update to preserve the existing secret; provide it to rotate the secret. Stored AES-GCM-encrypted in server_oauth_secrets; never returned by read endpoints.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`hostname`,{type:`string`,description:`URL of the upstream MCP endpoint.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, the gateway worker uses the shared Cloudflare-owned OAuth callback endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the customer portal hostname. Defaults to false (off); opt in per server by setting true.`,default:!1}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`,default:!1}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a new MCP Server`,builder:te,handler:async e=>c({command:`mcp servers create`,classification:{safeFlags:[`auth-type`,`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}):u(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(L,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e[`auth-type`]===void 0&&(e[`auth-type`]=await m(`auth-type`,`Authentication method used to connect to the upstream MCP server.`,[`oauth`,`bearer`,`unauthenticated`])),e.hostname===void 0&&(e.hostname=await p(`hostname`,`URL of the upstream MCP endpoint.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP server.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP server.`));let g=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}),_=await s(`Creating`,async()=>c.send(L,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var z={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,errors:{404:`NotFoundError`}};function B(e){return e.usage(`$0 mcp servers delete <id>
20
20
 
21
21
  Deletes an MCP server from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <id>`,describe:`Delete an MCP Server`,builder:B,handler:async e=>c({command:`mcp servers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP server, removes it from every portal, and deletes its stored OAuth secrets.`})){process.stderr.write(`Aborted.
22
22
  `);return}let u=await s(`Deleting`,async()=>c.send(z,{account_id:l,id:e.id}));a(u,{successLabel:`Deleted`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function U(e){return e.usage(`$0 mcp servers list
@@ -25,8 +25,8 @@ Lists all MCP servers configured for the account.`).option(`page`,{type:`number`
25
25
 
26
26
  Retrieves an MCP server's configuration and capability sync state.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`read <id>`,describe:`Read the details of an MCP Server`,builder:K,handler:async e=>c({command:`mcp servers read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(G,{account_id:l,id:e.id}));a(u,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}/sync`,errors:{404:`NotFoundError`}};function Y(e){return e.usage(`$0 mcp servers sync <id>
27
27
 
28
- Syncs an MCP server's capabilities and returns the updated server state, including any connection errors.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`sync <id>`,describe:`Sync MCP Server Capabilities`,builder:Y,handler:async e=>c({command:`mcp servers sync`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers sync`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/sync`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(J,{account_id:l,id:e.id}));a(u,{successLabel:`Created`})})};var Z={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/servers/${t.server_id}/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`],errors:{400:`BadRequestError`}};function Q(e){return e.usage(`$0 mcp servers tool-call-analytics <server-id>
28
+ Syncs an MCP server's capabilities and returns the updated server state, including any connection errors.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`sync <id>`,describe:`Sync MCP Server Capabilities`,builder:Y,handler:async e=>c({command:`mcp servers sync`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers sync`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/sync`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(J,{account_id:l,id:e.id}));a(u,{successLabel:`Created`})})};var Z={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/servers/${t.server_id}/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function Q(e){return e.usage(`$0 mcp servers tool-call-analytics <server-id>
29
29
 
30
- Returns daily or monthly tool-call counts for a server.`).positional(`server-id`,{type:`string`,description:`Server ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`tool-call-analytics <server-id>`,describe:`Per-server MCP tool-call timeseries`,builder:Q,handler:async e=>c({command:`mcp servers tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days};if(e.dryRun){let t=await r();o({command:`cf mcp servers tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/analytics/servers/${e[`server-id`]==null?`<server-id>`:encodeURIComponent(String(e[`server-id`]))}/tool-calls/timeseries`,pathParams:{"server-id":String(e[`server-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Z,{account_id:u,server_id:e[`server-id`],...c}));a(d,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function re(e){return e.usage(`$0 mcp servers update <id>
30
+ Returns daily or monthly tool-call counts for a server.`).positional(`server-id`,{type:`string`,description:`Server ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`tool-call-analytics <server-id>`,describe:`Per-server MCP tool-call timeseries`,builder:Q,handler:async e=>c({command:`mcp servers tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let t=await r();o({command:`cf mcp servers tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/analytics/servers/${e[`server-id`]==null?`<server-id>`:encodeURIComponent(String(e[`server-id`]))}/tool-calls/timeseries`,pathParams:{"server-id":String(e[`server-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Z,{account_id:u,server_id:e[`server-id`],...c}));a(d,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function re(e){return e.usage(`$0 mcp servers update <id>
31
31
 
32
- Updates an MCP server's configuration and credentials.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. Required when creating a manual OAuth server or converting an existing server to manual mode. Omit it on update to preserve the existing secret; provide it to rotate the secret. Stored AES-GCM-encrypted in server_oauth_secrets; never returned by read endpoints.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, the gateway worker uses the shared Cloudflare-owned OAuth callback endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the customer portal hostname. Defaults to false (off); opt in per server by setting true.`}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`update <id>`,describe:`Update an MCP Server`,builder:re,handler:async e=>c({command:`mcp servers update`,classification:{safeFlags:[`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:u(e[`updated-prompts`],`updated-prompts`),updated_tools:u(e[`updated-tools`],`updated-tools`)}):l(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send($,{body:t,account_id:p,id:e.id}));a(n,{successLabel:`Updated`});return}let m=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:u(e[`updated-prompts`],`updated-prompts`),updated_tools:u(e[`updated-tools`],`updated-tools`)}),h=await s(`Updating`,async()=>c.send($,{body:m,account_id:p,id:e.id}));a(h,{successLabel:`Updated`})})},ae={command:`servers`,describe:`Manage upstream MCP servers, credentials, capabilities, and sync state`,builder:e=>e.command(R).command(V).command(W).command(q).command(X).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oe={command:`mcp`,describe:`Manage MCP portals and upstream MCP servers for Cloudflare Access AI controls`,builder:e=>e.command(I).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{oe as default};
32
+ Updates an MCP server's configuration and credentials.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. Required when creating a manual OAuth server or converting an existing server to manual mode. Omit it on update to preserve the existing secret; provide it to rotate the secret. Stored AES-GCM-encrypted in server_oauth_secrets; never returned by read endpoints.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, the gateway worker uses the shared Cloudflare-owned OAuth callback endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the customer portal hostname. Defaults to false (off); opt in per server by setting true.`}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`update <id>`,describe:`Update an MCP Server`,builder:re,handler:async e=>c({command:`mcp servers update`,classification:{safeFlags:[`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}):u(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send($,{body:t,account_id:p,id:e.id}));a(n,{successLabel:`Updated`});return}let m=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}),h=await s(`Updating`,async()=>c.send($,{body:m,account_id:p,id:e.id}));a(h,{successLabel:`Updated`})})},ae={command:`servers`,describe:`Manage upstream MCP servers, credentials, capabilities, and sync state`,builder:e=>e.command(R).command(V).command(W).command(q).command(X).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oe={command:`mcp`,describe:`Manage MCP portals and upstream MCP servers for Cloudflare Access AI controls`,builder:e=>e.command(I).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{oe as default};
@@ -1,26 +1,26 @@
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-MNz2D-PD.mjs";import{a as i,t as a}from"./context-q-6bMSL-.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-DaQ4MzBI.mjs";import{t as l}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{i as u,n as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-KWYZvJWM.mjs";var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function v(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
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,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-1AC-qwxS.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
3
3
 
4
- Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <tunnel-id>`,describe:`Get Mesh node HA configuration`,builder:v,handler:async e=>l({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(_,{account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})};var b={method:`PUT`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`,body:`json`};function x(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
4
+ Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <tunnel-id>`,describe:`Get Mesh node HA configuration`,builder:y,handler:async e=>l({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(v,{account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
5
5
 
6
- Adds or updates the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`config-fnr-id`,{type:`string`,description:`Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.`}).option(`ha-mode`,{type:`string`,description:"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",choices:[`none`,`disabled`,`aws`,`local`]}).coerce(`ha-mode`,e=>p(e,`ha-mode`,`text`)).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 S={command:`update <tunnel-id>`,describe:`Update Mesh node HA configuration`,builder:x,handler:async e=>l({command:`mesh nodes configurations update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({config:{fnr_id:p(e[`config-fnr-id`],`config-fnr-id`,`text`)},ha_mode:e[`ha-mode`]}):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(b,{body:t,account_id:l,tunnel_id:e[`tunnel-id`]}));o(r,{successLabel:`Updated`});return}e[`ha-mode`]===void 0&&(e[`ha-mode`]=await h(`ha-mode`,"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",[`none`,`disabled`,`aws`,`local`]));let u=f({config:{fnr_id:p(e[`config-fnr-id`],`config-fnr-id`,`text`)},ha_mode:e[`ha-mode`]}),m=await c(`Updating`,async()=>n.send(b,{body:u,account_id:l,tunnel_id:e[`tunnel-id`]}));o(m,{successLabel:`Updated`})})},C={command:`configurations`,describe:`Operations for nodes.configurations`,builder:e=>e.command(y).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 mesh nodes connections list
6
+ Adds or updates the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`mesh-config-fnr-id`,{type:`string`,description:`Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.`}).option(`mesh-config-vips`,{type:`string`,description:`VIPs to assign on the CloudflareWARP interface. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mesh-config-vips-previous`,{type:`string`,description:`VIPs to clean up on demotion or version drift. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ha-mode`,{type:`string`,description:"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",choices:[`none`,`disabled`,`aws`,`local`]}).coerce(`ha-mode`,e=>m(e,`ha-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`mesh-config-fnr-id`,[`mesh-config-vips`,`mesh-config-vips-previous`]).conflicts(`mesh-config-vips`,[`mesh-config-fnr-id`]).conflicts(`mesh-config-vips-previous`,[`mesh-config-fnr-id`])}const C={command:`update <tunnel-id>`,describe:`Update Mesh node HA configuration`,builder:S,handler:async e=>l({command:`mesh nodes configurations update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({config:{fnr_id:m(e[`mesh-config-fnr-id`],`mesh-config-fnr-id`,`text`),vips:u(e[`mesh-config-vips`],`mesh-config-vips`),vips_previous:u(e[`mesh-config-vips-previous`],`mesh-config-vips-previous`)},ha_mode:e[`ha-mode`]}):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,tunnel_id:e[`tunnel-id`]}));o(r,{successLabel:`Updated`});return}e[`ha-mode`]===void 0&&(e[`ha-mode`]=await g(`ha-mode`,"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",[`none`,`disabled`,`aws`,`local`]));let f=p({config:{fnr_id:m(e[`mesh-config-fnr-id`],`mesh-config-fnr-id`,`text`),vips:u(e[`mesh-config-vips`],`mesh-config-vips`),vips_previous:u(e[`mesh-config-vips-previous`],`mesh-config-vips-previous`)},ha_mode:e[`ha-mode`]}),h=await c(`Updating`,async()=>n.send(x,{body:f,account_id:l,tunnel_id:e[`tunnel-id`]}));o(h,{successLabel:`Updated`})})},w={command:`configurations`,describe:`Operations for nodes.configurations`,builder:e=>e.command(b).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 mesh nodes connections list
7
7
 
8
- Lists connection details for a Mesh node.`).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List Mesh node connections`,builder:w,handler:async e=>l({command:`mesh nodes connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connections`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connections`));o(d,{successLabel:`Loaded`})})},E={command:`connections`,describe:`Operations for nodes.connections`,builder:e=>e.command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.usage(`$0 mesh nodes connectors get <connector-id>
8
+ Lists connection details for a Mesh node.`).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Mesh node connections`,builder:T,handler:async e=>l({command:`mesh nodes connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connections`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connections`));o(d,{successLabel:`Loaded`})})},D={command:`connections`,describe:`Operations for nodes.connections`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 mesh nodes connectors get <connector-id>
9
9
 
10
- Fetches connector and connection details for a Mesh node.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <connector-id>`,describe:`Get a Mesh node connector`,builder:D,handler:async e=>l({command:`mesh nodes connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connectors/${encodeURIComponent(String(e[`connector-id`]))}`));o(d,{successLabel:`Loaded`})})},k={command:`connectors`,describe:`Operations for nodes.connectors`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/warp_connector`,body:`json`};function j(e){return e.usage(`$0 mesh nodes create
10
+ Fetches connector and connection details for a Mesh node.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <connector-id>`,describe:`Get a Mesh node connector`,builder:O,handler:async e=>l({command:`mesh nodes connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connectors/${encodeURIComponent(String(e[`connector-id`]))}`));o(d,{successLabel:`Loaded`})})},A={command:`connectors`,describe:`Operations for nodes.connectors`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`POST`,path:t=>e`/accounts/${t.account_id}/warp_connector`,body:`json`};function M(e){return e.usage(`$0 mesh nodes create
11
11
 
12
- Creates a new Mesh node in an account.`).option(`ha`,{type:`boolean`,description:`Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.`,default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`create`,describe:`Create a Mesh node`,builder:j,handler:async e=>l({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({ha:e.ha,name:p(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(A,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,`A user-friendly name for a tunnel.`));let u=f({ha:e.ha,name:p(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>n.send(A,{body:u,account_id:l}));o(h,{successLabel:`Created`})})};function N(e){return e.usage(`$0 mesh nodes delete <node-id>
12
+ Creates a new Mesh node in an account.`).option(`ha`,{type:`boolean`,description:`Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.`,default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`create`,describe:`Create a Mesh node`,builder:M,handler:async e=>l({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({ha:e.ha,name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(j,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`A user-friendly name for a tunnel.`));let u=p({ha:e.ha,name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(j,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function P(e){return e.usage(`$0 mesh nodes delete <node-id>
13
13
 
14
- Deletes a Mesh node from an account.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const P={command:`delete <node-id>`,describe:`Delete a Mesh node`,builder:N,handler:async e=>l({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await g({force:!!e.force,message:`This operation permanently deletes a Mesh node.`})){process.stderr.write(`Aborted.
15
- `);return}let d=await c(`Deleting`,async()=>n(l,`DELETE`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Deleted`})})};function F(e){return e.usage(`$0 mesh nodes edit <node-id>
14
+ Deletes a Mesh node from an account.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`delete <node-id>`,describe:`Delete a Mesh node`,builder:P,handler:async e=>l({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation permanently deletes a Mesh node.`})){process.stderr.write(`Aborted.
15
+ `);return}let d=await c(`Deleting`,async()=>n(l,`DELETE`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 mesh nodes edit <node-id>
16
16
 
17
- Updates an existing Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`edit <node-id>`,describe:`Update a Mesh node`,builder:F,handler:async e=>l({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),tunnel_secret:p(e[`tunnel-secret`],`tunnel-secret`,`text`)}):d(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let l=await r(e),m=e.local?t:await a();if(e.accountId=m,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${m}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:t}));o(r,{successLabel:`Updated`});return}let h={};e.name!==void 0&&u(h,[`name`],p(e.name,`name`,`text`)),e[`tunnel-secret`]!==void 0&&u(h,[`tunnel_secret`],p(e[`tunnel-secret`],`tunnel-secret`,`text`));let g=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${m}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:h}));o(g,{successLabel:`Updated`})})};function L(e){return e.usage(`$0 mesh nodes failover <node-id>
17
+ Updates an existing Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`edit <node-id>`,describe:`Update a Mesh node`,builder:I,handler:async e=>l({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}):d(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:t}));o(r,{successLabel:`Updated`});return}let h={};e.name!==void 0&&f(h,[`name`],m(e.name,`name`,`text`)),e[`tunnel-secret`]!==void 0&&f(h,[`tunnel_secret`],m(e[`tunnel-secret`],`tunnel-secret`,`text`));let g=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:h}));o(g,{successLabel:`Updated`})})};function R(e){return e.usage(`$0 mesh nodes failover <node-id>
18
18
 
19
- Triggers a manual failover for a specific Mesh node, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`failover <node-id>`,describe:`Trigger a manual failover for a Mesh node`,builder:L,handler:async e=>l({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/failover`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({client_id:p(e[`connector-id`],`connector-id`,`text`)}):d(e.body)});return}let l=await r(e),h=e.local?t:await a();if(e.accountId=h,!await g({force:!!e.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`})){process.stderr.write(`Aborted.
20
- `);return}if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${h}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:t}));o(r,{successLabel:`Deleted`});return}e[`connector-id`]===void 0&&(e[`connector-id`]=await m(`connector-id`,`UUID of the Cloudflare Tunnel connector.`));let _={};e[`connector-id`]!==void 0&&u(_,[`client_id`],p(e[`connector-id`],`connector-id`,`text`));let v=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${h}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:_}));o(v,{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 mesh nodes get <node-id>
19
+ Triggers a manual failover for a specific Mesh node, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`failover <node-id>`,describe:`Trigger a manual failover for a Mesh node`,builder:R,handler:async e=>l({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/failover`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({client_id:m(e[`connector-id`],`connector-id`,`text`)}):d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`})){process.stderr.write(`Aborted.
20
+ `);return}if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:t}));o(r,{successLabel:`Deleted`});return}e[`connector-id`]===void 0&&(e[`connector-id`]=await h(`connector-id`,`UUID of the Cloudflare Tunnel connector.`));let g={};e[`connector-id`]!==void 0&&f(g,[`client_id`],m(e[`connector-id`],`connector-id`,`text`));let v=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:g}));o(v,{successLabel:`Deleted`})})};function B(e){return e.usage(`$0 mesh nodes get <node-id>
21
21
 
22
- Fetches a single Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <node-id>`,describe:`Get a Mesh node`,builder:z,handler:async e=>l({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Loaded`})})};var V={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`status`,`per_page`,`page`]};function H(e){return e.usage(`$0 mesh nodes list
22
+ Fetches a single Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <node-id>`,describe:`Get a Mesh node`,builder:B,handler:async e=>l({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`status`,`per_page`,`page`]};function U(e){return e.usage(`$0 mesh nodes list
23
23
 
24
- Lists and filters Mesh nodes in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List Mesh nodes`,builder:H,handler:async e=>l({command:`mesh nodes list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let n={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await i();s({command:`cf mesh nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/warp_connector`,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(V,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 mesh nodes token get <node-id>
24
+ Lists and filters Mesh nodes in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Mesh nodes`,builder:U,handler:async e=>l({command:`mesh nodes list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let n={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await i();s({command:`cf mesh nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/warp_connector`,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(H,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 mesh nodes token get <node-id>
25
25
 
26
- Gets the token used to associate a WARP device with a specific Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <node-id>`,describe:`Get a Mesh node token`,builder:W,handler:async e=>l({command:`mesh nodes token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/token`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/token`));o(d,{successLabel:`Loaded`})})},K={command:`token`,describe:`Operations for nodes.token`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},q={command:`nodes`,describe:`Operations for nodes`,builder:e=>e.command(M).command(P).command(I).command(R).command(B).command(U).command(C).command(E).command(k).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`mesh`,describe:`mesh`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
26
+ Gets the token used to associate a WARP device with a specific Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <node-id>`,describe:`Get a Mesh node token`,builder:G,handler:async e=>l({command:`mesh nodes token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/token`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/token`));o(d,{successLabel:`Loaded`})})},q={command:`token`,describe:`Operations for nodes.token`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`nodes`,describe:`Operations for nodes`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).command(W).command(w).command(D).command(A).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`mesh`,describe:`mesh`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-BtIBQeaG.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-R9TQ_4Qd.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.log(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-CY79jlGZ.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-Cp546RDG.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.log(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
@@ -1,7 +1,7 @@
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{n}from"./auth-MNz2D-PD.mjs";import{a as r,i,t as a}from"./context-q-6bMSL-.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-DaQ4MzBI.mjs";import{t as l}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{n as m}from"./prompt-KWYZvJWM.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,body:`json`,constants:{acceptedTermsOfService:!0}};function g(e){return e.usage(`$0 monetization account-eligibility check
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,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,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,body:`json`,constants:{acceptedTermsOfService:!0}};function g(e){return e.usage(`$0 monetization account-eligibility check
3
3
 
4
- Checks the account or zone for Monetization Gateway eligibility and returns its pending, approved, or rejected decision.`).option(`accepted-terms-of-service`,{type:`boolean`,description:`Confirms acceptance of the Monetization Gateway terms of service.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`check`,describe:`Check account or zone monetization eligibility`,builder:g,handler:async e=>l({command:`monetization account-eligibility check`,classification:{safeFlags:[`accepted-terms-of-service`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf monetization account-eligibility check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({acceptedTermsOfService:e[`accepted-terms-of-service`]}):u(e.body)});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,p=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=p:e.accountId=p,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:d,account_or_zone_id:p}));o(n,{successLabel:`Created`});return}if(e[`accepted-terms-of-service`]===void 0)throw Error(`--accepted-terms-of-service is required (or pass --body with this field set).`);let m=f({acceptedTermsOfService:e[`accepted-terms-of-service`]}),g=await c(`Creating`,async()=>l.send(h,{body:m,account_or_zone:d,account_or_zone_id:p}));o(g,{successLabel:`Created`})})};var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,errors:{404:`NotFoundError`}};function y(e){return e.usage(`$0 monetization account-eligibility get
4
+ Checks the account or zone for Monetization Gateway eligibility and returns its pending, approved, or rejected decision.`).option(`accepted-terms-of-service`,{type:`boolean`,description:`Confirms acceptance of the Monetization Gateway terms of service.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`check`,describe:`Check account or zone monetization eligibility`,builder:g,handler:async e=>l({command:`monetization account-eligibility check`,classification:{safeFlags:[`accepted-terms-of-service`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf monetization account-eligibility check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({acceptedTermsOfService:e[`accepted-terms-of-service`]}):d(e.body)});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,p=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=p:e.accountId=p,e.body){let t=d(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:u,account_or_zone_id:p}));o(n,{successLabel:`Created`});return}if(e[`accepted-terms-of-service`]===void 0)throw Error(`--accepted-terms-of-service is required (or pass --body with this field set).`);let m=f({acceptedTermsOfService:e[`accepted-terms-of-service`]}),g=await c(`Creating`,async()=>l.send(h,{body:m,account_or_zone:u,account_or_zone_id:p}));o(g,{successLabel:`Created`})})};var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,errors:{404:`NotFoundError`}};function y(e){return e.usage(`$0 monetization account-eligibility get
5
5
 
6
6
  Returns the account or zone's latest stored monetization eligibility result.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Get account or zone monetization eligibility`,builder:y,handler:async e=>l({command:`monetization account-eligibility get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf monetization account-eligibility get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(v,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})},x={command:`account-eligibility`,describe:`Operations for account-eligibility`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/monetization/rules`};function C(e){return e.usage(`$0 monetization rules delete-all
7
7
 
@@ -11,10 +11,10 @@ Removes every Payment Required rule from the zone. Any rules the service does no
11
11
  Removes a single Payment Required rule identified by its ID. Every other rule is preserved. Returns the resulting rule collection.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the payment rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const D={command:`delete <rule-id>`,describe:`Delete a payment rule`,builder:E,handler:async e=>l({command:`monetization rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await m({force:!!e.force,message:`This operation deletes the selected Monetization Gateway rule.`})){process.stderr.write(`Aborted.
12
12
  `);return}let a=await c(`Deleting`,async()=>t.send(T,{zone_id:r,rule_id:e[`rule-id`]}));o(a,{successLabel:`Deleted`})})};var O={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/monetization/rules/${t.rule_id}`,body:`json`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function k(e){return e.usage(`$0 monetization rules edit <rule-id>
13
13
 
14
- Applies a partial update to a single Payment Required rule. Only the fields present in the request body are changed; omitted fields keep their current values. Returns the full resulting rule collection.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the payment rule.`,demandOption:!0}).option(`address`,{type:`string`,description:`0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The effective address must pass wallet screening whenever the rule is patched.`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`expression`,{type:`string`,description:`Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.`}).option(`price`,{type:`string`,description:`Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origin_controlled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origin_controlled" rules; the pattern matches exactly the set of values the server accepts.`}).option(`scheme`,{type:`string`,description:`X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount; "origin_controlled" lets the origin server set pricing dynamically, in which case the rule carries no price and the price field must be omitted.`,choices:[`exact`,`upto`,`origin_controlled`]}).coerce(`scheme`,e=>p(e,`scheme`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update to a single payment rule. Only the fields present are modified; omitted fields keep their existing values.`})}const A={command:`edit <rule-id>`,describe:`Update a payment rule`,builder:k,handler:async e=>l({command:`monetization rules edit`,classification:{safeFlags:[`enabled`,`scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({address:p(e.address,`address`,`text`),description:p(e.description,`description`,`text`),enabled:e.enabled,expression:p(e.expression,`expression`,`text`),price:p(e.price,`price`,`text`),scheme:e.scheme}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.send(O,{body:n,zone_id:r,rule_id:e[`rule-id`]}));o(i,{successLabel:`Updated`});return}let a=f({address:p(e.address,`address`,`text`),description:p(e.description,`description`,`text`),enabled:e.enabled,expression:p(e.expression,`expression`,`text`),price:p(e.price,`price`,`text`),scheme:e.scheme}),l=await c(`Updating`,async()=>t.send(O,{body:a,zone_id:r,rule_id:e[`rule-id`]}));o(l,{successLabel:`Updated`})})};var j={method:`GET`,path:t=>e`/zones/${t.zone_id}/monetization/rules/${t.rule_id}`,errors:{404:`NotFoundError`}};function M(e){return e.usage(`$0 monetization rules get <rule-id>
14
+ Applies a partial update to a single Payment Required rule. Only the fields present in the request body are changed; omitted fields keep their current values. Returns the full resulting rule collection.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the payment rule.`,demandOption:!0}).option(`address`,{type:`string`,description:`0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The effective address must pass wallet screening whenever the rule is patched.`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`expression`,{type:`string`,description:`Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.`}).option(`price`,{type:`string`,description:`Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origin_controlled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origin_controlled" rules; the pattern matches exactly the set of values the server accepts.`}).option(`scheme`,{type:`string`,description:`X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount; "origin_controlled" lets the origin server set pricing dynamically, in which case the rule carries no price and the price field must be omitted.`,choices:[`exact`,`upto`,`origin_controlled`]}).coerce(`scheme`,e=>p(e,`scheme`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update to a single payment rule. Only the fields present are modified; omitted fields keep their existing values.`})}const A={command:`edit <rule-id>`,describe:`Update a payment rule`,builder:k,handler:async e=>l({command:`monetization rules edit`,classification:{safeFlags:[`enabled`,`scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({address:p(e.address,`address`,`text`),description:p(e.description,`description`,`text`),enabled:e.enabled,expression:p(e.expression,`expression`,`text`),price:p(e.price,`price`,`text`),scheme:e.scheme}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.send(O,{body:n,zone_id:r,rule_id:e[`rule-id`]}));o(i,{successLabel:`Updated`});return}let a=f({address:p(e.address,`address`,`text`),description:p(e.description,`description`,`text`),enabled:e.enabled,expression:p(e.expression,`expression`,`text`),price:p(e.price,`price`,`text`),scheme:e.scheme}),l=await c(`Updating`,async()=>t.send(O,{body:a,zone_id:r,rule_id:e[`rule-id`]}));o(l,{successLabel:`Updated`})})};var j={method:`GET`,path:t=>e`/zones/${t.zone_id}/monetization/rules/${t.rule_id}`,errors:{404:`NotFoundError`}};function M(e){return e.usage(`$0 monetization rules get <rule-id>
15
15
 
16
16
  Returns a single Payment Required rule identified by its ID.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the payment rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <rule-id>`,describe:`Get a payment rule`,builder:M,handler:async e=>l({command:`monetization rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(j,{zone_id:r,rule_id:e[`rule-id`]}));o(a,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/zones/${t.zone_id}/monetization/rules`,errors:{404:`NotFoundError`}};function F(e){return e.usage(`$0 monetization rules list
17
17
 
18
18
  Returns the currently deployed Payment Required rules for a zone. A zone with no Payment Required ruleset returns 404.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List payment rules`,builder:F,handler:async e=>l({command:`monetization rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(P,{zone_id:r}));o(a,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/zones/${t.zone_id}/monetization/rules`,body:`json`,errors:{403:`ForbiddenError`}};function R(e){return e.usage(`$0 monetization rules update
19
19
 
20
- Replaces the zone's Payment Required ruleset with the submitted desired state. Submit an empty rules array to clear all payment rules.`).option(`rules`,{type:`string`,description:`Full desired Payment Required ruleset. An empty array clears all payment rules. The ruleset may contain at most 40 unique wallet addresses; address comparison is case-insensitive. Every address must pass wallet screening before deployment. 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 z={command:`update`,describe:`Deploy payment ruleset`,builder:R,handler:async e=>l({command:`monetization rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({rules:d(e.rules,`rules`)}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.send(L,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let a=f({rules:d(e.rules,`rules`)}),l=await c(`Updating`,async()=>t.send(L,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})},B={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(D).command(w).command(A).command(N).command(I).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`monetization`,describe:`monetization`,builder:e=>e.command(x).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
20
+ Replaces the zone's Payment Required ruleset with the submitted desired state. Submit an empty rules array to clear all payment rules.`).option(`rules`,{type:`string`,description:`Full desired Payment Required ruleset. An empty array clears all payment rules. The ruleset may contain at most 40 unique wallet addresses; address comparison is case-insensitive. Every address must pass wallet screening before deployment. 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 z={command:`update`,describe:`Deploy payment ruleset`,builder:R,handler:async e=>l({command:`monetization rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({rules:u(e.rules,`rules`)}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.send(L,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let a=f({rules:u(e.rules,`rules`)}),l=await c(`Updating`,async()=>t.send(L,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})},B={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(D).command(w).command(A).command(N).command(I).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`monetization`,describe:`monetization`,builder:e=>e.command(x).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};