cf 1.0.0-beta.0 → 1.0.0-beta.10

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 (375) hide show
  1. package/README.md +12 -0
  2. package/dist/_meta/commands.json +11755 -14070
  3. package/dist/_meta/hand-written-commands.json +610 -42
  4. package/dist/_meta/schemas.json +18290 -20222
  5. package/dist/abuse-reports-BhSTEz7h.mjs +24 -0
  6. package/dist/access-D4DN4XZF.mjs +2 -0
  7. package/dist/{account-tags-BNrSShjj.mjs → account-tags-BWEIZLID.mjs} +5 -5
  8. package/dist/{accounts-CCAnDjFk.mjs → accounts-ZQvIqGJz.mjs} +66 -60
  9. package/dist/{acm-ZPYQbZQr.mjs → acm-OQqE8FMc.mjs} +3 -3
  10. package/dist/{addressing-BFpzLfTn.mjs → addressing-DCFm17JQ.mjs} +50 -50
  11. package/dist/agent-context-GRiQ4zRU.mjs +2 -0
  12. package/dist/{agent-memory-DEvy2dLU.mjs → agent-memory-BtfPt2me.mjs} +15 -15
  13. package/dist/ai-B0_sZbmy.mjs +29 -0
  14. package/dist/{ai-audit-Dn03zntn.mjs → ai-audit-DaubuhYF.mjs} +1 -1
  15. package/dist/ai-gateway-CJ-1Dzzr.mjs +82 -0
  16. package/dist/{ai-search-g0tR8Cut.mjs → ai-search-Dywa1kqX.mjs} +37 -37
  17. package/dist/{ai-security-BXXA0Jnk.mjs → ai-security-2wxMPqKS.mjs} +1 -1
  18. package/dist/{alerting-Bst10SOG.mjs → alerting-yad9DYRv.mjs} +26 -26
  19. package/dist/analytics-DKNw2fVc.mjs +20 -0
  20. package/dist/{analytics_engine-B4DvcYmB.mjs → analytics_engine-BA3kF46s.mjs} +2 -2
  21. package/dist/{api-security-Dkx1Codr.mjs → api-security-CSuYMpMO.mjs} +61 -61
  22. package/dist/{argo-BvswWPlP.mjs → argo-DMfNmOV4.mjs} +1 -1
  23. package/dist/args-CXgkQKK7.mjs +2 -0
  24. package/dist/{artifacts-D8kZKJq0.mjs → artifacts-Cb3hwClm.mjs} +20 -20
  25. package/dist/{audit-logs-Bp_yQpXJ.mjs → audit-logs-BrjNuiLx.mjs} +2 -2
  26. package/dist/auth-BBlAI8HG.mjs +2 -0
  27. package/dist/auth-BIr56Mbx.mjs +8 -0
  28. package/dist/autoconfig-DPUztTL2.mjs +511 -0
  29. package/dist/banner-ClclgnBn.mjs +2 -0
  30. package/dist/basin-catalog-BLsQhJP4.mjs +46 -0
  31. package/dist/{billing-Cqj64fqz.mjs → billing-CRwD7oQS.mjs} +10 -10
  32. package/dist/{bot-management-CzZx_aml.mjs → bot-management-CyW8F8Wm.mjs} +1 -1
  33. package/dist/{botnet-feed-Co0c8Xdj.mjs → botnet-feed-BBKsxf3Y.mjs} +5 -5
  34. package/dist/{brand-protection-CDsGaPIl.mjs → brand-protection-DSeD8LXl.mjs} +13 -13
  35. package/dist/browser-extension-C1zmKFDG.mjs +2 -0
  36. package/dist/{browser-run-DFrohJ1p.mjs → browser-run-BAcUTwB4.mjs} +23 -23
  37. package/dist/build-B5UYMEQH.mjs +2 -0
  38. package/dist/build-DLZ9gBNA.mjs +2 -0
  39. package/dist/{builds-CamhClyb.mjs → builds-W1HEG7Bv.mjs} +31 -31
  40. package/dist/{cache-BiTk4-Zc.mjs → cache-B7E_PXUp.mjs} +27 -27
  41. package/dist/{certificate-authorities-Dal9DNjW.mjs → certificate-authorities-D_uAJH9B.mjs} +1 -1
  42. package/dist/cf-Bh_fTFIj.mjs +18 -0
  43. package/dist/chunk-FT2NMTJB-1VFYM1Ro.mjs +97 -0
  44. package/dist/chunk-KKDV4JPS-DdzLLtnl.mjs +2 -0
  45. package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +2 -0
  46. package/dist/chunk-WMOON6TZ-D_ToS88f.mjs +2 -0
  47. package/dist/cli-BeXSqJAj.mjs +6 -0
  48. package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
  49. package/dist/client-certificates-DqFcK_s1.mjs +13 -0
  50. package/dist/{client-side-security-CIO_YPtN.mjs → client-side-security-DJXZ1XAu.mjs} +1 -1
  51. package/dist/{cloud-connector-vwdixea0.mjs → cloud-connector-Czg1GdQi.mjs} +1 -1
  52. package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-DGuau-lC.mjs} +1 -1
  53. package/dist/{cloudforce-one-C1cFVBGK.mjs → cloudforce-one-B1IhIZcp.mjs} +213 -222
  54. package/dist/command-6YTtWltE.mjs +2 -0
  55. package/dist/command-B6DqnUwt.mjs +2 -0
  56. package/dist/command-BCag-xjk.mjs +2 -0
  57. package/dist/command-BOLlvEan.mjs +2 -0
  58. package/dist/command-BrHTpaji.mjs +2 -0
  59. package/dist/command-CAtsHc1V.mjs +2 -0
  60. package/dist/command-C__qB2mo.mjs +2 -0
  61. package/dist/command-DUafPVUr.mjs +2 -0
  62. package/dist/command-DZookrfw.mjs +2 -0
  63. package/dist/command-DfffeX-k.mjs +2 -0
  64. package/dist/command-DxSJy_ym.mjs +2 -0
  65. package/dist/command-DzHL5LKI.mjs +2 -0
  66. package/dist/command-K1-DZFJS.mjs +2 -0
  67. package/dist/command-TCklVvOY.mjs +2 -0
  68. package/dist/command-xU78ACNA.mjs +2 -0
  69. package/dist/{completions-xPLd1cvL.mjs → completions-Cm9brGAI.mjs} +26 -26
  70. package/dist/{connector-interrupts-DQ5T-HMN.mjs → connector-interrupts-D93KTMkw.mjs} +3 -3
  71. package/dist/{connector-telemetry-events-DWam38_9.mjs → connector-telemetry-events-D6CmKR14.mjs} +3 -3
  72. package/dist/{connector-telemetry-snapshots-DX6AJf9Q.mjs → connector-telemetry-snapshots-WO9IUk0e.mjs} +3 -3
  73. package/dist/{connectors-CBhLWVd-.mjs → connectors-DNT6GTW3.mjs} +7 -7
  74. package/dist/{containers-C7blN-pe.mjs → containers-Btx7vCDP.mjs} +17 -17
  75. package/dist/{containers-Bx_44bmJ.mjs → containers-Ce7IO-Ia.mjs} +70 -72
  76. package/dist/{content-scan-CC91dAlv.mjs → content-scan-C_ROsbTJ.mjs} +1 -1
  77. package/dist/context-CEOHpZgd.mjs +7 -0
  78. package/dist/{cps-D9a4N_bH.mjs → cps-BPQqyL2E.mjs} +1 -1
  79. package/dist/{csamScanner-T7nbCnep.mjs → csamScanner-D-oO5cxT.mjs} +1 -1
  80. package/dist/{ct-alerting-CkjNJlla.mjs → ct-alerting-CnTRE1Fb.mjs} +1 -1
  81. package/dist/{custom-certificates-DnWnt9oJ.mjs → custom-certificates-DvnFBZdJ.mjs} +4 -4
  82. package/dist/{custom-csrs-Db2pF9Ib.mjs → custom-csrs-BZ8TXbuQ.mjs} +5 -5
  83. package/dist/{custom-hostnames-B_N-uSIa.mjs → custom-hostnames-CTqf-KlT.mjs} +6 -6
  84. package/dist/{custom-nameservers-DPA_sFY8.mjs → custom-nameservers-B0CpnUVg.mjs} +5 -5
  85. package/dist/{custom-pages-D6fxEBoh.mjs → custom-pages-DcoSGN56.mjs} +10 -10
  86. package/dist/{d1-DXs1xVmH.mjs → d1-m7UfzBzl.mjs} +16 -20
  87. package/dist/{dcv-delegation-as1ue_wx.mjs → dcv-delegation-yOtz90qE.mjs} +1 -1
  88. package/dist/{delegate-GctF_lrq.mjs → delegate-B6LetRpZ.mjs} +1 -1
  89. package/dist/delegate.mjs +1 -1
  90. package/dist/{deploy-D2XXCkqk.mjs → deploy-C4p6SzLH.mjs} +1 -1
  91. package/dist/{deploy-input-BCYyKXpp.mjs → deploy-input-DTjBGloL.mjs} +1 -1
  92. package/dist/dev-BML-bpNU.mjs +4 -0
  93. package/dist/{diagnostics-BKH1Oh-C.mjs → diagnostics-hOvnx5DT.mjs} +7 -7
  94. package/dist/dialog-BlUXJKbA.mjs +2 -0
  95. package/dist/discover-C5aiI6u0.mjs +2 -0
  96. package/dist/discover-DwczTkRX.mjs +2 -0
  97. package/dist/dist-BuCJ_55d.mjs +366 -0
  98. package/dist/dist-C3s9SXTd.mjs +48 -0
  99. package/dist/{dist-BpadEMNY.mjs → dist-DW47TUGh.mjs} +35 -35
  100. package/dist/{dls-C5kAQsN6.mjs → dls-v6DyEWTd.mjs} +8 -8
  101. package/dist/{dns-CYwXrdJO.mjs → dns-C9sUPsNt.mjs} +72 -63
  102. package/dist/{dns-firewall-BEw4QcXj.mjs → dns-firewall-EDiT-Zli.mjs} +8 -8
  103. package/dist/dot-prop-IITUZ2XW-BilKo4kO.mjs +2 -0
  104. package/dist/dotenv-CcQjGlV0.mjs +4 -0
  105. package/dist/dry-run-Bq0JAsbX.mjs +2 -0
  106. package/dist/durable-objects-C01phVwL.mjs +6 -0
  107. package/dist/{email-auth-B3MD8FrJ.mjs → email-auth-BgvoEHJk.mjs} +1 -1
  108. package/dist/{email-routing-C4YhZGPw.mjs → email-routing-Bggn219w.mjs} +24 -24
  109. package/dist/email-security-_t7rzrzd.mjs +158 -0
  110. package/dist/{email-sending-BO1GOAho.mjs → email-sending-_dKCs2VF.mjs} +23 -23
  111. package/dist/error-sanitization-CJ5OLJrh.mjs +2 -0
  112. package/dist/error-sanitization-hmi1CqE5.mjs +2 -0
  113. package/dist/{fieldExtractors-BJDnzNCN.mjs → fieldExtractors-Cm5QnkE0.mjs} +4 -4
  114. package/dist/firewall-CZEN8iA_.mjs +36 -0
  115. package/dist/flagship-B_SAI_ZL.mjs +28 -0
  116. package/dist/{fraud-C7kS7kP9.mjs → fraud-9_9hobAh.mjs} +1 -1
  117. package/dist/generate-BPqoDbck.mjs +2 -0
  118. package/dist/generate-CLqGOlOx.mjs +3 -0
  119. package/dist/{google-tag-gateway-8VR-j0sa.mjs → google-tag-gateway-O_N0vHRY.mjs} +1 -1
  120. package/dist/gt-DmcMNPX6.mjs +2 -0
  121. package/dist/{healthchecks-BJleItOD.mjs → healthchecks-Bt3Gw_JZ.mjs} +1 -1
  122. package/dist/{hostnames-CHajvoHa.mjs → hostnames-DdOube3R.mjs} +1 -1
  123. package/dist/hyperdrive-C14NAh9l.mjs +37 -0
  124. package/dist/{iam-B7oTr6vW.mjs → iam-DUW7neMx.mjs} +24 -24
  125. package/dist/{images-xLAYe436.mjs → images-B9dnr1z0.mjs} +38 -38
  126. package/dist/index.mjs +1 -1
  127. package/dist/init-BGcAIvV7.mjs +39 -0
  128. package/dist/{intel-DwZXY1YE.mjs → intel-BQpZMck3.mjs} +38 -38
  129. package/dist/interactive-C-o16XQs.mjs +32 -0
  130. package/dist/interactive-SgAjen2z.mjs +2 -0
  131. package/dist/{ips-BC_9nKE7.mjs → ips-PT_uQKAf.mjs} +1 -1
  132. package/dist/k2-nPYti7Y0.mjs +13 -0
  133. package/dist/keyless-certificates-BHvas2q1.mjs +13 -0
  134. package/dist/{keys-K-GFzhku.mjs → keys-O5kAW9ox.mjs} +2 -2
  135. package/dist/kv-BUP_ZLM_.mjs +15 -0
  136. package/dist/lazy-command-glNW3jzf.mjs +2 -0
  137. package/dist/{leaked-credential-checks-D8UuxztO.mjs → leaked-credential-checks-De9hI1rl.mjs} +1 -1
  138. package/dist/{load-balancers-B0XeGLhT.mjs → load-balancers-Cs6bUHS1.mjs} +39 -39
  139. package/dist/{local-B6b2OIBW.mjs → local-B5oRPTEN.mjs} +1 -1
  140. package/dist/local-Bj-l0TP6.mjs +2 -0
  141. package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-CZnegFEM.mjs} +1 -1
  142. package/dist/login-C5nSIS-T.mjs +2 -0
  143. package/dist/login-CUup7w0e.mjs +5 -0
  144. package/dist/{logo-matches-DWg5ezsM.mjs → logo-matches-BkQKdu4Z.mjs} +3 -3
  145. package/dist/{logos-6A6gJC5C.mjs → logos-C_sv-boo.mjs} +3 -3
  146. package/dist/{logpush-DwehajAw.mjs → logpush-NUcyMKHi.mjs} +23 -23
  147. package/dist/logs-BZT4PlqZ.mjs +36 -0
  148. package/dist/{magic-cloud-networking--14hNj2F.mjs → magic-cloud-networking-DQnSdmgA.mjs} +34 -34
  149. package/dist/{magic-network-monitoring-Dzo4L6kd.mjs → magic-network-monitoring-pHTU6aS8.mjs} +17 -17
  150. package/dist/{magic-transit-DDO0A5v4.mjs → magic-transit-5302bQNh.mjs} +154 -158
  151. package/dist/{managed-defense-DQ0iwWdG.mjs → managed-defense-8OEfDzuO.mjs} +9 -9
  152. package/dist/{managed-transforms-DDIdcPG0.mjs → managed-transforms-CCpUz4TY.mjs} +1 -1
  153. package/dist/{matches-D6ahHNaP.mjs → matches-BSiYXs99.mjs} +3 -3
  154. package/dist/{mcp-BcIrLbRv.mjs → mcp-CCMiS75R.mjs} +15 -15
  155. package/dist/{mesh-wLiPcWyN.mjs → mesh-DKBGTlCD.mjs} +12 -12
  156. package/dist/migrate-BJ9Go_wP.mjs +2 -0
  157. package/dist/monetization-CFf_lb6x.mjs +20 -0
  158. package/dist/mtls-certificates-DsF3NFNs.mjs +13 -0
  159. package/dist/{network-DZsrs_sw.mjs → network-Bm0qYRqY.mjs} +24 -24
  160. package/dist/{network-interconnects-Cjbu4EMv.mjs → network-interconnects-YiRUBbjx.mjs} +17 -17
  161. package/dist/{oauth-Cu1twz9z.mjs → oauth-DxGgIwFc.mjs} +1 -1
  162. package/dist/oauth-cNZUky3h.mjs +9 -0
  163. package/dist/{oauth-clients-DR0hzakz.mjs → oauth-clients-CP6alY0_.mjs} +7 -7
  164. package/dist/{oauth-scopes-BDNpJJ32.mjs → oauth-scopes-xl-pcWdg.mjs} +1 -1
  165. package/dist/{observability-BnHy2M6p.mjs → observability-Bp71PtlD.mjs} +44 -44
  166. package/dist/open-PCXX3ZDZ-BKRik1gi.mjs +4 -0
  167. package/dist/{organization-iasRm69J.mjs → organization-Dbom1gTR.mjs} +7 -7
  168. package/dist/{organizations-CUzCIKXV.mjs → organizations-OUMVsuen.mjs} +1 -1
  169. package/dist/{origin-ca-certificates-iQXSqBI0.mjs → origin-ca-certificates-B3-T0-Nn.mjs} +3 -3
  170. package/dist/{origin-post-quantum-encryption-DcMDK6Tz.mjs → origin-post-quantum-encryption-CGB6AfPa.mjs} +1 -1
  171. package/dist/{origin-tls-client-auth-D1X26X7y.mjs → origin-tls-client-auth-CgzzfAWr.mjs} +5 -5
  172. package/dist/output-CvQFJkvi.mjs +2 -0
  173. package/dist/{page-rules-CXa8EYcP.mjs → page-rules-B9BQKU4_.mjs} +1 -1
  174. package/dist/pages-DZPdyuT4.mjs +54 -0
  175. package/dist/{pay-per-crawl-DmF8xlm_.mjs → pay-per-crawl-CnveMVDi.mjs} +32 -32
  176. package/dist/{pay-per-use-DIp2fwJU.mjs → pay-per-use-Bpxe8PHv.mjs} +3 -3
  177. package/dist/{pipelines-MmXlsxYO.mjs → pipelines-CHev3o5G.mjs} +20 -20
  178. package/dist/precursor-C9PK9Bue.mjs +4 -0
  179. package/dist/previews-BIMI1dTz.mjs +4 -0
  180. package/dist/progress-A61dRbXl.mjs +2 -0
  181. package/dist/prompt-CGUzvBgY.mjs +3 -0
  182. package/dist/{queries-VzdcSR5H.mjs → queries-f-btyefs.mjs} +4 -4
  183. package/dist/{queues-BZYl2emH.mjs → queues-kLNdeb3q.mjs} +29 -35
  184. package/dist/r2-D_awYx2p.mjs +125 -0
  185. package/dist/r2-data-catalog-2jQrdAdo.mjs +2 -0
  186. package/dist/{radar-JzBTD249.mjs → radar-CU4T02Ag.mjs} +1 -1
  187. package/dist/raw-fetch-CvkmFO23.mjs +2 -0
  188. package/dist/{realtime-yIdAJ0Yf.mjs → realtime-C0dvcBBM.mjs} +78 -78
  189. package/dist/{registrar-D-Li9gNk.mjs → registrar-CHc-4vcf.mjs} +8 -8
  190. package/dist/{registrar-sandbox-CKSSHAyv.mjs → registrar-sandbox-Dq8LV2AI.mjs} +6 -6
  191. package/dist/{registry-vreNkX6u.mjs → registry-Cg5lP8oo.mjs} +1 -1
  192. package/dist/{reporting-Cf-pnw6h.mjs → reporting-4u21g6Dk.mjs} +7 -7
  193. package/dist/request-headers-D31kdxrQ.mjs +2 -0
  194. package/dist/{request-tracers-BegIQTzt.mjs → request-tracers-CupJ_83j.mjs} +2 -2
  195. package/dist/resolve-PZuJ878-.mjs +2 -0
  196. package/dist/{resource-sharing-DEVgiYzM.mjs → resource-sharing-CO-Lh-u7.mjs} +14 -14
  197. package/dist/{resource-tagging-Cm2yJkU9.mjs → resource-tagging-D0R5SzR6.mjs} +2 -2
  198. package/dist/{rules-DDCa7cYF.mjs → rules-BsmKzB9H.mjs} +8 -8
  199. package/dist/{rulesets-BhS7Hvtu.mjs → rulesets-HOOnxHZZ.mjs} +20 -20
  200. package/dist/{rum-EIj9ViSn.mjs → rum-wcLEvVJl.mjs} +14 -14
  201. package/dist/run-CIJTelJL.mjs +2 -0
  202. package/dist/run-quhbAvQi.mjs +2 -0
  203. package/dist/schema-GdBsV4P7.mjs +2 -0
  204. package/dist/{schema-flags--GosoCMU.mjs → schema-flags-D8vL2oiF.mjs} +2 -2
  205. package/dist/{scim-DA83eNe-.mjs → scim-BkdJmAS8.mjs} +10 -10
  206. package/dist/{sdk-CvIO3tWS.mjs → sdk-BCzcRJCi.mjs} +2 -2
  207. package/dist/{secrets-store-BTd3eGIB.mjs → secrets-store-CHs0oYA0.mjs} +11 -11
  208. package/dist/security-insights-vsl-4xFa.mjs +40 -0
  209. package/dist/{security-txt-DSrHhVEN.mjs → security-txt-Fnl3LdSn.mjs} +1 -1
  210. package/dist/session-CZTuHcbm.mjs +2 -0
  211. package/dist/shared-BS30oCf8.mjs +2 -0
  212. package/dist/{smart-shield-DnSTo-OI.mjs → smart-shield-DB0E7cZI.mjs} +1 -1
  213. package/dist/{snippets-An5kQs33.mjs → snippets-CFaF_NyG.mjs} +1 -1
  214. package/dist/source-38bULAR8.mjs +6 -0
  215. package/dist/spawn-B0Sl8lUu.mjs +10 -0
  216. package/dist/{spectrum-Ci79n7fd.mjs → spectrum-DtG0jYjE.mjs} +1 -1
  217. package/dist/{speed-BBL7LrLn.mjs → speed-B-RiNHGK.mjs} +1 -1
  218. package/dist/src-CM3XaB4p.mjs +109 -0
  219. package/dist/{ssl-B2psFIRm.mjs → ssl-DBVpCZAM.mjs} +4 -4
  220. package/dist/startup-profile-CLmojOrn.mjs +2 -0
  221. package/dist/startup-profile-CR7GMuLx.mjs +17 -0
  222. package/dist/{state-BxCejn42.mjs → state-BaGRaYow.mjs} +1 -1
  223. package/dist/state-CpXhcMdX.mjs +2 -0
  224. package/dist/{stream-Du0Q7UOh.mjs → stream-cAdBvpS1.mjs} +45 -45
  225. package/dist/{submit-CU8S2jBT.mjs → submit-Bkd7l2rK.mjs} +2 -2
  226. package/dist/{tags-C3l5aZSi.mjs → tags--eph7JbN.mjs} +2 -2
  227. package/dist/telemetry-51etasAu.mjs +2 -0
  228. package/dist/telemetry-Q3_UmwHj.mjs +2 -0
  229. package/dist/tenant-Bj-He2xO.mjs +10 -0
  230. package/dist/{tenant-custom-nameservers-DtKeyM5J.mjs → tenant-custom-nameservers-B5IIIwbz.mjs} +1 -1
  231. package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
  232. package/dist/tools-BJZ0DDlL.mjs +2 -0
  233. package/dist/{tunnels-D1tRWQQi.mjs → tunnels-CgtuRpcD.mjs} +15 -15
  234. package/dist/turnstile-Bmcnrzw7.mjs +33 -0
  235. package/dist/ui-BQxRjahW.mjs +5 -0
  236. package/dist/update-check-BqSpgzHk.mjs +2 -0
  237. package/dist/update-check-DC0qP_8z.mjs +2 -0
  238. package/dist/update-check-worker.mjs +1 -1
  239. package/dist/{url-info-BRA0XGT2.mjs → url-info-DhVehaT8.mjs} +2 -2
  240. package/dist/{url-normalization-B6N2m5s6.mjs → url-normalization-BpGDUUQc.mjs} +1 -1
  241. package/dist/{url-scanner-CeKkzkhe.mjs → url-scanner-DiLdqsQk.mjs} +8 -8
  242. package/dist/{user-CftksgmF.mjs → user-B6P5_OjP.mjs} +1 -1
  243. package/dist/{values-m7w9PX3o.mjs → values-Cxx4Lxrd.mjs} +2 -2
  244. package/dist/{vectorize-BWBEtsgZ.mjs → vectorize-YyxVpql-.mjs} +15 -15
  245. package/dist/version-C0pInAZ9.mjs +2 -0
  246. package/dist/{waiting-rooms-BVZSYTNJ.mjs → waiting-rooms-BdahlCdD.mjs} +25 -25
  247. package/dist/{web-assets-CLU5vAgP.mjs → web-assets-yaKxN4w_.mjs} +1 -1
  248. package/dist/{web3-Dkd4XRNH.mjs → web3-Bu9c_QAt.mjs} +1 -1
  249. package/dist/workers-5GgoGA2e.mjs +38 -0
  250. package/dist/{workers-builds-BgtPSDYJ.mjs → workers-builds-h-1FJjE1.mjs} +7 -7
  251. package/dist/workers-for-platforms-CV9iRrp9.mjs +42 -0
  252. package/dist/{workers-vpc-DjGfJgQn.mjs → workers-vpc-C1oUHHqk.mjs} +6 -6
  253. package/dist/{workflows-Cm7WsAgB.mjs → workflows-dtMlkj1-.mjs} +20 -20
  254. package/dist/wrangler-migration-CJEb9hY3.mjs +2 -0
  255. package/dist/{zaraz-DurWe32F.mjs → zaraz-838AbMEX.mjs} +1 -1
  256. package/dist/{zero-trust-D8SVU8YZ.mjs → zero-trust-CYt-eELJ.mjs} +460 -434
  257. package/dist/{zone-B3AEAfcd.mjs → zone-uJwRLSnn.mjs} +1 -1
  258. package/dist/{zones-DiX5LoSU.mjs → zones-Dpofsnth.mjs} +1 -1
  259. package/package.json +15 -12
  260. package/dist/abuse-reports-BwsJLiPN.mjs +0 -26
  261. package/dist/access-BVbIajYr.mjs +0 -27
  262. package/dist/account-DBLarar2.mjs +0 -12
  263. package/dist/ai-BF0_0NtS.mjs +0 -31
  264. package/dist/ai-gateway-CVABbCjv.mjs +0 -147
  265. package/dist/analytics-DgEaxta8.mjs +0 -21
  266. package/dist/auth-B9w55oRg.mjs +0 -2
  267. package/dist/auth-C80y97yu.mjs +0 -8
  268. package/dist/browser-extension-BRHJm3Qf.mjs +0 -15
  269. package/dist/build-BbjcJxKq.mjs +0 -2
  270. package/dist/build-DQh5-KK4.mjs +0 -2
  271. package/dist/cf-oadujOtC.mjs +0 -18
  272. package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
  273. package/dist/chunk-DL5FNmn1.mjs +0 -2
  274. package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
  275. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
  276. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
  277. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
  278. package/dist/client-certificates-DDisXoTE.mjs +0 -13
  279. package/dist/command-BP7ldws1.mjs +0 -2
  280. package/dist/command-BtNRBTP6.mjs +0 -2
  281. package/dist/command-CF0giIIc.mjs +0 -3
  282. package/dist/command-Ck9rbHA4.mjs +0 -2
  283. package/dist/config-B4vIa0zp.mjs +0 -2
  284. package/dist/data-security-CVZAIzhe.mjs +0 -71
  285. package/dist/dev-nsNxyg2D.mjs +0 -4
  286. package/dist/dialog-Dx4rRcKM.mjs +0 -2
  287. package/dist/dist-BDOzKthe.mjs +0 -48
  288. package/dist/dist-dc4E1u01.mjs +0 -272
  289. package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
  290. package/dist/dry-run-CLX6Pbtq.mjs +0 -2
  291. package/dist/durable-objects-3jvUgzKd.mjs +0 -8
  292. package/dist/email-security-BcFyWNby.mjs +0 -160
  293. package/dist/error-sanitization-BkgUhGVc.mjs +0 -2
  294. package/dist/error-sanitization-DOlqWkNu.mjs +0 -2
  295. package/dist/firewall-BSMa9aH3.mjs +0 -56
  296. package/dist/flagship-BJYMb7hb.mjs +0 -28
  297. package/dist/hyperdrive-DlxQrok-.mjs +0 -37
  298. package/dist/interactive-B6woOLo-.mjs +0 -32
  299. package/dist/interactive-DnUvQHjc.mjs +0 -2
  300. package/dist/keyless-certificates-CtsCsbZ2.mjs +0 -13
  301. package/dist/kv-Bfwz_ULu.mjs +0 -21
  302. package/dist/local-BrfySqnx.mjs +0 -2
  303. package/dist/login-CAsRUF4c.mjs +0 -2
  304. package/dist/login-DaglE6WA.mjs +0 -5
  305. package/dist/logs-BWg7YymF.mjs +0 -48
  306. package/dist/mtls-certificates-AEuNOERQ.mjs +0 -13
  307. package/dist/oauth-C-QCVfWz.mjs +0 -14
  308. package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
  309. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
  310. package/dist/output-Bia1u2k5.mjs +0 -2
  311. package/dist/pages-Cu0m9GSH.mjs +0 -60
  312. package/dist/precursor-jqeEG_mJ.mjs +0 -4
  313. package/dist/previews-Cg6lc24N.mjs +0 -4
  314. package/dist/progress-Bpp73hIu.mjs +0 -2
  315. package/dist/prompt-CpZztV8c.mjs +0 -3
  316. package/dist/r2-data-catalog-DISnPFPY.mjs +0 -44
  317. package/dist/r2-omcKF8_A.mjs +0 -127
  318. package/dist/raw-fetch-DxGs_eRm.mjs +0 -2
  319. package/dist/request-headers-DaXBfmVn.mjs +0 -2
  320. package/dist/resolve-BXemCSyA.mjs +0 -2
  321. package/dist/run-CSFE1qVX.mjs +0 -2
  322. package/dist/run-ChM_YpZ0.mjs +0 -2
  323. package/dist/schema-DCBb3Fcs.mjs +0 -2
  324. package/dist/security-center-DbH_7h-T.mjs +0 -30
  325. package/dist/shared-CtBkOWGN.mjs +0 -2
  326. package/dist/source-BR4_k2ad.mjs +0 -6
  327. package/dist/spawn-7IW1UyoH.mjs +0 -523
  328. package/dist/src-CNHNCZpy.mjs +0 -108
  329. package/dist/startup-profile-CYEokTVe.mjs +0 -2
  330. package/dist/startup-profile-CgWHy4rE.mjs +0 -17
  331. package/dist/state-DSzkxXML.mjs +0 -2
  332. package/dist/telemetry-CNt8H3aA.mjs +0 -2
  333. package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
  334. package/dist/telemetry-PHe8XxA2.mjs +0 -2
  335. package/dist/tenant-BZ0ysR9L.mjs +0 -12
  336. package/dist/tools-BMKpYraQ.mjs +0 -2
  337. package/dist/turnstile-DBa4_Vyz.mjs +0 -33
  338. package/dist/ui-DH95w1Qk.mjs +0 -5
  339. package/dist/undici-DTSBJHNS.mjs +0 -96
  340. package/dist/update-check-AAn7EXw8.mjs +0 -2
  341. package/dist/update-check-BbIXBq1o.mjs +0 -2
  342. package/dist/version-cPq-WKL8.mjs +0 -2
  343. package/dist/workers-BQi4_SBS.mjs +0 -36
  344. package/dist/workers-for-platforms-actLCM6Q.mjs +0 -25
  345. /package/dist/{Page-C-JHZnIy.mjs → Page-CjJht2qT.mjs} +0 -0
  346. /package/dist/{alerts-CstOk8n0.mjs → alerts-DY_7Nknx.mjs} +0 -0
  347. /package/dist/{autorag-PRTwXGgn.mjs → autorag-K396-M2S.mjs} +0 -0
  348. /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-hh2avzkz.mjs} +0 -0
  349. /package/dist/{brands-BHRXlWDm.mjs → brands-DeLbFxSt.mjs} +0 -0
  350. /package/dist/{clear-UvKESVx3.mjs → clear-CRfI7WS7.mjs} +0 -0
  351. /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-DoVT5q_M.mjs} +0 -0
  352. /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
  353. /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
  354. /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-aiwP60Fo.mjs} +0 -0
  355. /package/dist/{health-CwPzzrV6.mjs → health-Bz33n-_F.mjs} +0 -0
  356. /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-Dk52b0me.mjs} +0 -0
  357. /package/dist/{internal-WLHfxX64.mjs → internal-BHrJbbdA.mjs} +0 -0
  358. /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
  359. /package/dist/{live-D_k7eHdv.mjs → live-MeJQXIei.mjs} +0 -0
  360. /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
  361. /package/dist/{project-settings-DSXevRvj.mjs → project-settings-DO6njFg_.mjs} +0 -0
  362. /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-CU55zqCU.mjs} +0 -0
  363. /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-CZ-qHDPK.mjs} +0 -0
  364. /package/dist/{ready-CvwvbdTX.mjs → ready-BOpbZ1pN.mjs} +0 -0
  365. /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-KDqD2HyS.mjs} +0 -0
  366. /package/dist/{refute-CIAFMj00.mjs → refute-DkF4XIMw.mjs} +0 -0
  367. /package/dist/{resolve-CUDKxUrW.mjs → resolve-BCTrtcx7.mjs} +0 -0
  368. /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-DQkf6glG.mjs} +0 -0
  369. /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-CMOJ_E0n.mjs} +0 -0
  370. /package/dist/{search-12jA1b4l.mjs → search-Bre1Zwn3.mjs} +0 -0
  371. /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-24ZbX4yV.mjs} +0 -0
  372. /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-BmkbZVqM.mjs} +0 -0
  373. /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-j8OAF_cE.mjs} +0 -0
  374. /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-fe3EWYmF.mjs} +0 -0
  375. /package/dist/{verify-CZW5Fo1q.mjs → verify-CKgZYvln.mjs} +0 -0
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{i as l,n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p}from"./prompt-CpZztV8c.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{a as r,r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{i as l,n as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{a as p}from"./prompt-CGUzvBgY.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(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 g={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:h,handler:async r=>c({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${r[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(r[`repo-id`]))}/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}/report`,pathParams:{"repo-id":String(r[`repo-id`]??``),"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.reports.get({account_id:l,repo_id:r[`repo-id`],scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})},_={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(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 g={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:h,handler:async r=>c({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${r[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(r[`repo-id`]))}/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}/report`,pathParams:{"repo-id":String(r[`repo-id`]??``),"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.reports.get({account_id:l,repo_id:r[`repo-id`],scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})},_={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(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 y={command:`create`,describe:`Create repository`,builder:v,handler:async m=>c({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},m,async()=>{let c={};if(m[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(m[`idempotency-key`])),m.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:m.body===void 0?d({name:f(m.name,`name`,`text`),worker_script_name:f(m[`worker-script-name`],`worker-script-name`,`text`)}):u(m.body)});return}let h=await i(m),g=m.local?e:await t();if(m.accountId=g,m.body){let e=u(m.body);a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}m.name===void 0&&(m.name=await p(`name`,`The name field`));let _={};m.name!==void 0&&l(_,[`name`],f(m.name,`name`,`text`)),m[`worker-script-name`]!==void 0&&l(_,[`worker_script_name`],f(m[`worker-script-name`],`worker-script-name`,`text`)),a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function b(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 y={command:`create`,describe:`Create repository`,builder:v,handler:async m=>c({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},m,async()=>{let c={};if(m[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(m[`idempotency-key`])),m.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:m.body===void 0?d({name:f(m.name,`name`,`text`),worker_script_name:f(m[`worker-script-name`],`worker-script-name`,`text`)}):u(m.body)});return}let h=await i(m),g=m.local?e:await n();if(m.accountId=g,m.body){let e=u(m.body);a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}m.name===void 0&&(m.name=await p(`name`,`The name field`));let _={};m.name!==void 0&&l(_,[`name`],f(m.name,`name`,`text`)),m[`worker-script-name`]!==void 0&&l(_,[`worker_script_name`],f(m[`worker-script-name`],`worker-script-name`,`text`)),a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function b(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 x={command:`get <repo-id>`,describe:`Get repository`,builder:b,handler:async r=>c({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={scan_limit:r[`scan-limit`],scan_cursor:r[`scan-cursor`]};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${r[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(r[`repo-id`]))}`,pathParams:{"repo-id":String(r[`repo-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.repositories.get({account_id:u,repo_id:r[`repo-id`],...c})),{successLabel:`Loaded`})})};function S(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 x={command:`get <repo-id>`,describe:`Get repository`,builder:b,handler:async r=>c({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={scan_limit:r[`scan-limit`],scan_cursor:r[`scan-cursor`]};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${r[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(r[`repo-id`]))}`,pathParams:{"repo-id":String(r[`repo-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.repositories.get({account_id:u,repo_id:r[`repo-id`],...c})),{successLabel:`Loaded`})})};function S(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 C={command:`list`,describe:`List repositories`,builder:S,handler:async r=>c({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.repositories.list({account_id:u,...c})),{successLabel:`Loaded`})})},w={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(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 C={command:`list`,describe:`List repositories`,builder:S,handler:async r=>c({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.repositories.list({account_id:u,...c})),{successLabel:`Loaded`})})},w={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(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 E={command:`create`,describe:`Create scan`,builder:T,handler:async p=>c({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{let c={};if(p[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(p[`idempotency-key`])),p.dryRun){o({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:p.body===void 0?d({repos:p.repos,telemetry_window:{end:f(p[`telemetry-window-end`],`telemetry-window-end`,`text`),start:f(p[`telemetry-window-start`],`telemetry-window-start`,`text`)}}):u(p.body)});return}let m=await i(p),h=p.local?e:await t();if(p.accountId=h,p.body){let e=u(p.body);a(await s(`Creating`,async()=>r(m,`POST`,`/accounts/${h}/managed-defense/vulnerability-discovery/scans`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}if(p.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let g={};p.repos!==void 0&&l(g,[`repos`],p.repos),p[`telemetry-window-end`]!==void 0&&l(g,[`telemetry_window`,`end`],f(p[`telemetry-window-end`],`telemetry-window-end`,`text`)),p[`telemetry-window-start`]!==void 0&&l(g,[`telemetry_window`,`start`],f(p[`telemetry-window-start`],`telemetry-window-start`,`text`)),a(await s(`Creating`,async()=>r(m,`POST`,`/accounts/${h}/managed-defense/vulnerability-discovery/scans`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function D(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <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(`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 E={command:`create`,describe:`Create scan`,builder:T,handler:async p=>c({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{let c={};if(p[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(p[`idempotency-key`])),p.dryRun){o({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:p.body===void 0?d({repos:p.repos,telemetry_window:{end:f(p[`telemetry-window-end`],`telemetry-window-end`,`text`),start:f(p[`telemetry-window-start`],`telemetry-window-start`,`text`)}}):u(p.body)});return}let m=await i(p),h=p.local?e:await n();if(p.accountId=h,p.body){let e=u(p.body);a(await s(`Creating`,async()=>r(m,`POST`,`/accounts/${h}/managed-defense/vulnerability-discovery/scans`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}if(p.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let g={};p.repos!==void 0&&l(g,[`repos`],p.repos),p[`telemetry-window-end`]!==void 0&&l(g,[`telemetry_window`,`end`],f(p[`telemetry-window-end`],`telemetry-window-end`,`text`)),p[`telemetry-window-start`]!==void 0&&l(g,[`telemetry_window`,`start`],f(p[`telemetry-window-start`],`telemetry-window-start`,`text`)),a(await s(`Creating`,async()=>r(m,`POST`,`/accounts/${h}/managed-defense/vulnerability-discovery/scans`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function D(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <scan-id>
13
13
 
14
- 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 O={command:`get <scan-id>`,describe:`Get scan`,builder:D,handler:async r=>c({command:`managed-defense vulnerability-discovery scans get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}`,pathParams:{"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.scans.get({account_id:l,scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 managed-defense vulnerability-discovery scans getReport <scan-id>
14
+ 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 O={command:`get <scan-id>`,describe:`Get scan`,builder:D,handler:async r=>c({command:`managed-defense vulnerability-discovery scans get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}`,pathParams:{"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.scans.get({account_id:l,scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 managed-defense vulnerability-discovery scans getReport <scan-id>
15
15
 
16
- 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 A={command:`getReport <scan-id>`,describe:`Get reviewed vulnerability report`,builder:k,handler:async r=>c({command:`managed-defense vulnerability-discovery scans getReport`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans getReport`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}/report`,pathParams:{"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.scans.getReport({account_id:l,scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})};function j(e){return e.usage(`$0 managed-defense vulnerability-discovery scans list
16
+ 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 A={command:`getReport <scan-id>`,describe:`Get reviewed vulnerability report`,builder:k,handler:async r=>c({command:`managed-defense vulnerability-discovery scans getReport`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans getReport`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}/report`,pathParams:{"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.scans.getReport({account_id:l,scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})};function j(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 M={command:`list`,describe:`List scans`,builder:m(j),handler:async r=>c({command:`managed-defense vulnerability-discovery scans list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor,status:r.status,repo:r.repo};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.scans.list({account_id:u,...c})),{successLabel:`Loaded`})})},N={command:`scans`,describe:`Operations for vulnerability-discovery.scans`,builder:e=>e.command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`vulnerability-discovery`,describe:`Operations for vulnerability-discovery`,builder:e=>e.command(_).command(w).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`managed-defense`,describe:`managed-defense`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{F 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 M={command:`list`,describe:`List scans`,builder:m(j),handler:async r=>c({command:`managed-defense vulnerability-discovery scans list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor,status:r.status,repo:r.repo};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.scans.list({account_id:u,...c})),{successLabel:`Loaded`})})},N={command:`scans`,describe:`Operations for vulnerability-discovery.scans`,builder:e=>e.command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`vulnerability-discovery`,describe:`Operations for vulnerability-discovery`,builder:e=>e.command(_).command(w).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`managed-defense`,describe:`managed-defense`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{F as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./prompt-CpZztV8c.mjs";function u(e){return e.usage(`$0 managed-transforms delete
2
+ import{i as e}from"./context-CEOHpZgd.mjs";import{r as t}from"./auth-BIr56Mbx.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-A61dRbXl.mjs";import{t as a}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./prompt-CGUzvBgY.mjs";function u(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 d={command:`delete`,describe:`Delete Managed Transforms`,builder:u,handler:async o=>a({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await l({force:!!o.force})){process.stderr.write(`Aborted.
5
5
  `);return}n(await i(`Deleting`,async()=>a.managedTransforms.delete({zone_id:s})),{successLabel:`Deleted`})})};function f(e){return e.usage(`$0 managed-transforms list
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";function c(e){return e.usage(`$0 matches download get
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{r}from"./auth-BIr56Mbx.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-A61dRbXl.mjs";import{t as s}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";function c(e){return e.usage(`$0 matches download get
3
3
 
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 l={command:`get`,describe:`Download matches for string queries by ID`,builder:c,handler:async c=>s({command:`matches download get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},c,async()=>{let s={id:c.id,offset:c.offset,limit:c.limit,include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`]};if(c.dryRun){a({command:`cf matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/matches/download`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.matches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 matches get
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 l={command:`get`,describe:`Download matches for string queries by ID`,builder:c,handler:async c=>s({command:`matches download get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},c,async()=>{let s={id:c.id,offset:c.offset,limit:c.limit,include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`]};if(c.dryRun){a({command:`cf matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/matches/download`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.matches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 matches get
5
5
 
6
- Return matches 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 f={command:`get`,describe:`Read matches for string queries by ID`,builder:d,handler:async c=>s({command:`matches get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},c,async()=>{let s={id:c.id,offset:c.offset,limit:c.limit,include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`]};if(c.dryRun){a({command:`cf matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.matches.get({account_id:u,...s})),{successLabel:`Loaded`})})},p={command:`matches`,describe:`matches`,builder:e=>e.command(f).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
6
+ Return matches 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 f={command:`get`,describe:`Read matches for string queries by ID`,builder:d,handler:async c=>s({command:`matches get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},c,async()=>{let s={id:c.id,offset:c.offset,limit:c.limit,include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`]};if(c.dryRun){a({command:`cf matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.matches.get({account_id:u,...s})),{successLabel:`Loaded`})})},p={command:`matches`,describe:`matches`,builder:e=>e.command(f).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-CpZztV8c.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 mcp portals account-tool-call-analytics
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{r}from"./auth-BIr56Mbx.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-A61dRbXl.mjs";import{t as s}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-CGUzvBgY.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(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 _={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:h(g),handler:async c=>s({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.portals.accountToolCallAnalytics({account_id:u,...s})),{successLabel:`Loaded`})})};function v(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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:h(g),handler:async c=>s({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.portals.accountToolCallAnalytics({account_id:u,...s})),{successLabel:`Loaded`})})};function v(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`]}).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 y={command:`create`,describe:`Create a new MCP Portal`,builder:v,handler:async p=>s({command:`mcp portals create`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf mcp portals create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({allow_code_mode:p[`allow-code-mode`],code_mode:d(p[`code-mode`],`code-mode`,`text`),description:d(p.description,`description`,`text`),hostname:d(p.hostname,`hostname`,`text`),id:d(p.id,`id`,`text`),name:d(p.name,`name`,`text`),secure_web_gateway:p[`secure-web-gateway`],servers:l(p.servers,`servers`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.mcp.portals.create({...e,account_id:m})),{successLabel:`Created`});return}p.hostname===void 0&&(p.hostname=await f(`hostname`,`Hostname where the MCP portal is available.`)),p.id===void 0&&(p.id=await f(`id`,`Unique identifier for the MCP portal.`)),p.name===void 0&&(p.name=await f(`name`,`Display name for the MCP portal.`));let h=u({allow_code_mode:p[`allow-code-mode`],code_mode:d(p[`code-mode`],`code-mode`,`text`),description:d(p.description,`description`,`text`),hostname:d(p.hostname,`hostname`,`text`),id:d(p.id,`id`,`text`),name:d(p.name,`name`,`text`),secure_web_gateway:p[`secure-web-gateway`],servers:l(p.servers,`servers`)});i(await o(`Creating`,async()=>s.mcp.portals.create({...h,account_id:m})),{successLabel:`Created`})})};function b(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`]}).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 y={command:`create`,describe:`Create a new MCP Portal`,builder:v,handler:async p=>s({command:`mcp portals create`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf mcp portals create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({allow_code_mode:p[`allow-code-mode`],code_mode:d(p[`code-mode`],`code-mode`,`text`),description:d(p.description,`description`,`text`),hostname:d(p.hostname,`hostname`,`text`),id:d(p.id,`id`,`text`),name:d(p.name,`name`,`text`),secure_web_gateway:p[`secure-web-gateway`],servers:l(p.servers,`servers`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await n();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.mcp.portals.create({...e,account_id:m})),{successLabel:`Created`});return}p.hostname===void 0&&(p.hostname=await f(`hostname`,`Hostname where the MCP portal is available.`)),p.id===void 0&&(p.id=await f(`id`,`Unique identifier for the MCP portal.`)),p.name===void 0&&(p.name=await f(`name`,`Display name for the MCP portal.`));let h=u({allow_code_mode:p[`allow-code-mode`],code_mode:d(p[`code-mode`],`code-mode`,`text`),description:d(p.description,`description`,`text`),hostname:d(p.hostname,`hostname`,`text`),id:d(p.id,`id`,`text`),name:d(p.name,`name`,`text`),secure_web_gateway:p[`secure-web-gateway`],servers:l(p.servers,`servers`)});i(await o(`Creating`,async()=>s.mcp.portals.create({...h,account_id:m})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 mcp portals delete <id>
7
7
 
8
- Deletes an MCP portal from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <id>`,describe:`Delete an MCP Portal`,builder:b,handler:async c=>s({command:`mcp portals delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mcp portals delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes the MCP portal.`})){process.stderr.write(`Aborted.
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 x={command:`delete <id>`,describe:`Delete an MCP Portal`,builder:b,handler:async c=>s({command:`mcp portals delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mcp portals delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/portals/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes the MCP portal.`})){process.stderr.write(`Aborted.
9
9
  `);return}i(await o(`Deleting`,async()=>s.mcp.portals.delete({account_id:l,id:c.id})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 mcp portals list
10
10
 
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 C={command:`list`,describe:`List MCP Portals`,builder:S,handler:async c=>s({command:`mcp portals list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf mcp portals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.portals.list({account_id:u,...s})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 mcp portals read <id>
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 C={command:`list`,describe:`List MCP Portals`,builder:S,handler:async c=>s({command:`mcp portals list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf mcp portals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.portals.list({account_id:u,...s})),{successLabel:`Loaded`})})};function w(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 T={command:`read <id>`,describe:`Read details of an MCP Portal`,builder:w,handler:async c=>s({command:`mcp portals read`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp portals read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mcp.portals.read({account_id:l,id:c.id})),{successLabel:`Loaded`})})};function E(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 T={command:`read <id>`,describe:`Read details of an MCP Portal`,builder:w,handler:async c=>s({command:`mcp portals read`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp portals read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/portals/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mcp.portals.read({account_id:l,id:c.id})),{successLabel:`Loaded`})})};function E(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 D={command:`tool-call-analytics <portal-id>`,describe:`Per-portal MCP tool-call timeseries`,builder:h(E),handler:async c=>s({command:`mcp portals tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp portals tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/analytics/portals/${c[`portal-id`]==null?`<portal-id>`:encodeURIComponent(String(c[`portal-id`]))}/tool-calls/timeseries`,pathParams:{"portal-id":String(c[`portal-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.portals.toolCallAnalytics({account_id:u,portal_id:c[`portal-id`],...s})),{successLabel:`Loaded`})})};function O(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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`tool-call-analytics <portal-id>`,describe:`Per-portal MCP tool-call timeseries`,builder:h(E),handler:async c=>s({command:`mcp portals tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp portals tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/analytics/portals/${c[`portal-id`]==null?`<portal-id>`:encodeURIComponent(String(c[`portal-id`]))}/tool-calls/timeseries`,pathParams:{"portal-id":String(c[`portal-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.portals.toolCallAnalytics({account_id:u,portal_id:c[`portal-id`],...s})),{successLabel:`Loaded`})})};function O(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`]}).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 k={command:`update <id>`,describe:`Update an MCP Portal`,builder:O,handler:async f=>s({command:`mcp portals update`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mcp portals update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?u({allow_code_mode:f[`allow-code-mode`],code_mode:d(f[`code-mode`],`code-mode`,`text`),description:d(f.description,`description`,`text`),hostname:d(f.hostname,`hostname`,`text`),name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],servers:l(f.servers,`servers`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.mcp.portals.update({...e,account_id:p,id:f.id})),{successLabel:`Updated`});return}let m=u({allow_code_mode:f[`allow-code-mode`],code_mode:d(f[`code-mode`],`code-mode`,`text`),description:d(f.description,`description`,`text`),hostname:d(f.hostname,`hostname`,`text`),name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],servers:l(f.servers,`servers`)});i(await o(`Updating`,async()=>s.mcp.portals.update({...m,account_id:p,id:f.id})),{successLabel:`Updated`})})},A={command:`portals`,describe:`Manage MCP portals, attached servers, and Code Mode settings`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(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`]}).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 k={command:`update <id>`,describe:`Update an MCP Portal`,builder:O,handler:async f=>s({command:`mcp portals update`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mcp portals update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/portals/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?u({allow_code_mode:f[`allow-code-mode`],code_mode:d(f[`code-mode`],`code-mode`,`text`),description:d(f.description,`description`,`text`),hostname:d(f.hostname,`hostname`,`text`),name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],servers:l(f.servers,`servers`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.mcp.portals.update({...e,account_id:p,id:f.id})),{successLabel:`Updated`});return}let m=u({allow_code_mode:f[`allow-code-mode`],code_mode:d(f[`code-mode`],`code-mode`,`text`),description:d(f.description,`description`,`text`),hostname:d(f.hostname,`hostname`,`text`),name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],servers:l(f.servers,`servers`)});i(await o(`Updating`,async()=>s.mcp.portals.update({...m,account_id:p,id:f.id})),{successLabel:`Updated`})})},A={command:`portals`,describe:`Operations for portals`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(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:'Static credential 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":"..."}}`).'}).option(`auth-type`,{type:`string`,description:`Authentication method used to connect to the upstream MCP server.`,choices:[`oauth`,`bearer`,`unauthenticated`]}).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. 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 M={command:`create`,describe:`Create a new MCP Server`,builder:j,handler:async m=>s({command:`mcp servers create`,classification:{safeFlags:[`auth-type`,`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},m,async()=>{if(m.dryRun){a({command:`cf mcp servers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},bodyKind:`json`,body:m.body===void 0?u({auth_credentials:d(m[`auth-credentials`],`auth-credentials`,`text`),auth_type:d(m[`auth-type`],`auth-type`,`text`),client_secret:d(m[`client-secret`],`client-secret`,`text`),description:d(m.description,`description`,`text`),hostname:d(m.hostname,`hostname`,`text`),id:d(m.id,`id`,`text`),is_shared_oauth_callback_enabled:m[`is-shared-oauth-callback-enabled`],name:d(m.name,`name`,`text`),secure_web_gateway:m[`secure-web-gateway`],updated_prompts:l(m[`updated-prompts`],`updated-prompts`),updated_tools:l(m[`updated-tools`],`updated-tools`)}):c(m.body)});return}let s=await r(m),h=m.local?e:await t();if(m.accountId=h,m.body){let e=c(m.body);i(await o(`Creating`,async()=>s.mcp.servers.create({...e,account_id:h})),{successLabel:`Created`});return}m[`auth-type`]===void 0&&(m[`auth-type`]=await p(`auth-type`,`Authentication method used to connect to the upstream MCP server.`,[`oauth`,`bearer`,`unauthenticated`])),m.hostname===void 0&&(m.hostname=await f(`hostname`,`URL of the upstream MCP endpoint.`)),m.id===void 0&&(m.id=await f(`id`,`Unique identifier for the MCP server.`)),m.name===void 0&&(m.name=await f(`name`,`Display name for the MCP server.`));let g=u({auth_credentials:d(m[`auth-credentials`],`auth-credentials`,`text`),auth_type:d(m[`auth-type`],`auth-type`,`text`),client_secret:d(m[`client-secret`],`client-secret`,`text`),description:d(m.description,`description`,`text`),hostname:d(m.hostname,`hostname`,`text`),id:d(m.id,`id`,`text`),is_shared_oauth_callback_enabled:m[`is-shared-oauth-callback-enabled`],name:d(m.name,`name`,`text`),secure_web_gateway:m[`secure-web-gateway`],updated_prompts:l(m[`updated-prompts`],`updated-prompts`),updated_tools:l(m[`updated-tools`],`updated-tools`)});i(await o(`Creating`,async()=>s.mcp.servers.create({...g,account_id:h})),{successLabel:`Created`})})};function N(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:'Static credential 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":"..."}}`).'}).option(`auth-type`,{type:`string`,description:`Authentication method used to connect to the upstream MCP server.`,choices:[`oauth`,`bearer`,`unauthenticated`]}).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. 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 M={command:`create`,describe:`Create a new MCP Server`,builder:j,handler:async m=>s({command:`mcp servers create`,classification:{safeFlags:[`auth-type`,`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},m,async()=>{if(m.dryRun){a({command:`cf mcp servers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},bodyKind:`json`,body:m.body===void 0?u({auth_credentials:d(m[`auth-credentials`],`auth-credentials`,`text`),auth_type:d(m[`auth-type`],`auth-type`,`text`),client_secret:d(m[`client-secret`],`client-secret`,`text`),description:d(m.description,`description`,`text`),hostname:d(m.hostname,`hostname`,`text`),id:d(m.id,`id`,`text`),is_shared_oauth_callback_enabled:m[`is-shared-oauth-callback-enabled`],name:d(m.name,`name`,`text`),secure_web_gateway:m[`secure-web-gateway`],updated_prompts:l(m[`updated-prompts`],`updated-prompts`),updated_tools:l(m[`updated-tools`],`updated-tools`)}):c(m.body)});return}let s=await r(m),h=m.local?e:await n();if(m.accountId=h,m.body){let e=c(m.body);i(await o(`Creating`,async()=>s.mcp.servers.create({...e,account_id:h})),{successLabel:`Created`});return}m[`auth-type`]===void 0&&(m[`auth-type`]=await p(`auth-type`,`Authentication method used to connect to the upstream MCP server.`,[`oauth`,`bearer`,`unauthenticated`])),m.hostname===void 0&&(m.hostname=await f(`hostname`,`URL of the upstream MCP endpoint.`)),m.id===void 0&&(m.id=await f(`id`,`Unique identifier for the MCP server.`)),m.name===void 0&&(m.name=await f(`name`,`Display name for the MCP server.`));let g=u({auth_credentials:d(m[`auth-credentials`],`auth-credentials`,`text`),auth_type:d(m[`auth-type`],`auth-type`,`text`),client_secret:d(m[`client-secret`],`client-secret`,`text`),description:d(m.description,`description`,`text`),hostname:d(m.hostname,`hostname`,`text`),id:d(m.id,`id`,`text`),is_shared_oauth_callback_enabled:m[`is-shared-oauth-callback-enabled`],name:d(m.name,`name`,`text`),secure_web_gateway:m[`secure-web-gateway`],updated_prompts:l(m[`updated-prompts`],`updated-prompts`),updated_tools:l(m[`updated-tools`],`updated-tools`)});i(await o(`Creating`,async()=>s.mcp.servers.create({...g,account_id:h})),{successLabel:`Created`})})};function N(e){return e.usage(`$0 mcp servers delete <id>
20
20
 
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 P={command:`delete <id>`,describe:`Delete an MCP Server`,builder:N,handler:async c=>s({command:`mcp servers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes the MCP server, removes it from every portal, and deletes its stored OAuth secrets.`})){process.stderr.write(`Aborted.
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 P={command:`delete <id>`,describe:`Delete an MCP Server`,builder:N,handler:async c=>s({command:`mcp servers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await m({force:!!c.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}i(await o(`Deleting`,async()=>s.mcp.servers.delete({account_id:l,id:c.id})),{successLabel:`Deleted`})})};function F(e){return e.usage(`$0 mcp servers list
23
23
 
24
- Lists all MCP servers configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List MCP Servers`,builder:F,handler:async c=>s({command:`mcp servers list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf mcp servers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.servers.list({account_id:u,...s})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 mcp servers read <id>
24
+ Lists all MCP servers configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List MCP Servers`,builder:F,handler:async c=>s({command:`mcp servers list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf mcp servers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.servers.list({account_id:u,...s})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 mcp servers read <id>
25
25
 
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 R={command:`read <id>`,describe:`Read the details of an MCP Server`,builder:L,handler:async c=>s({command:`mcp servers read`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mcp.servers.read({account_id:l,id:c.id})),{successLabel:`Loaded`})})};function z(e){return e.usage(`$0 mcp servers sync <id>
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 R={command:`read <id>`,describe:`Read the details of an MCP Server`,builder:L,handler:async c=>s({command:`mcp servers read`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mcp.servers.read({account_id:l,id:c.id})),{successLabel:`Loaded`})})};function z(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 B={command:`sync <id>`,describe:`Sync MCP Server Capabilities`,builder:z,handler:async c=>s({command:`mcp servers sync`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers sync`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}/sync`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.mcp.servers.sync({account_id:l,id:c.id})),{successLabel:`Created`})})};function V(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 B={command:`sync <id>`,describe:`Sync MCP Server Capabilities`,builder:z,handler:async c=>s({command:`mcp servers sync`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers sync`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}/sync`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Creating`,async()=>s.mcp.servers.sync({account_id:l,id:c.id})),{successLabel:`Created`})})};function V(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 H={command:`tool-call-analytics <server-id>`,describe:`Per-server MCP tool-call timeseries`,builder:h(V),handler:async c=>s({command:`mcp servers tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp servers tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/analytics/servers/${c[`server-id`]==null?`<server-id>`:encodeURIComponent(String(c[`server-id`]))}/tool-calls/timeseries`,pathParams:{"server-id":String(c[`server-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.servers.toolCallAnalytics({account_id:u,server_id:c[`server-id`],...s})),{successLabel:`Loaded`})})};function U(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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`tool-call-analytics <server-id>`,describe:`Per-server MCP tool-call timeseries`,builder:h(V),handler:async c=>s({command:`mcp servers tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp servers tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/analytics/servers/${c[`server-id`]==null?`<server-id>`:encodeURIComponent(String(c[`server-id`]))}/tool-calls/timeseries`,pathParams:{"server-id":String(c[`server-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.servers.toolCallAnalytics({account_id:u,server_id:c[`server-id`],...s})),{successLabel:`Loaded`})})};function U(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:'Static credential 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":"..."}}`).'}).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. 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 W={command:`update <id>`,describe:`Update an MCP Server`,builder:U,handler:async f=>s({command:`mcp servers update`,classification:{safeFlags:[`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mcp servers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?u({auth_credentials:d(f[`auth-credentials`],`auth-credentials`,`text`),client_secret:d(f[`client-secret`],`client-secret`,`text`),description:d(f.description,`description`,`text`),is_shared_oauth_callback_enabled:f[`is-shared-oauth-callback-enabled`],name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],updated_prompts:l(f[`updated-prompts`],`updated-prompts`),updated_tools:l(f[`updated-tools`],`updated-tools`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.mcp.servers.update({...e,account_id:p,id:f.id})),{successLabel:`Updated`});return}let m=u({auth_credentials:d(f[`auth-credentials`],`auth-credentials`,`text`),client_secret:d(f[`client-secret`],`client-secret`,`text`),description:d(f.description,`description`,`text`),is_shared_oauth_callback_enabled:f[`is-shared-oauth-callback-enabled`],name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],updated_prompts:l(f[`updated-prompts`],`updated-prompts`),updated_tools:l(f[`updated-tools`],`updated-tools`)});i(await o(`Updating`,async()=>s.mcp.servers.update({...m,account_id:p,id:f.id})),{successLabel:`Updated`})})},G={command:`servers`,describe:`Manage upstream MCP servers, credentials, capabilities, and sync state`,builder:e=>e.command(M).command(P).command(I).command(R).command(B).command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},K={command:`mcp`,describe:`mcp`,builder:e=>e.command(A).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K 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:'Static credential 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":"..."}}`).'}).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. 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 W={command:`update <id>`,describe:`Update an MCP Server`,builder:U,handler:async f=>s({command:`mcp servers update`,classification:{safeFlags:[`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mcp servers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/access/ai-controls/mcp/servers/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?u({auth_credentials:d(f[`auth-credentials`],`auth-credentials`,`text`),client_secret:d(f[`client-secret`],`client-secret`,`text`),description:d(f.description,`description`,`text`),is_shared_oauth_callback_enabled:f[`is-shared-oauth-callback-enabled`],name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],updated_prompts:l(f[`updated-prompts`],`updated-prompts`),updated_tools:l(f[`updated-tools`],`updated-tools`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.mcp.servers.update({...e,account_id:p,id:f.id})),{successLabel:`Updated`});return}let m=u({auth_credentials:d(f[`auth-credentials`],`auth-credentials`,`text`),client_secret:d(f[`client-secret`],`client-secret`,`text`),description:d(f.description,`description`,`text`),is_shared_oauth_callback_enabled:f[`is-shared-oauth-callback-enabled`],name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],updated_prompts:l(f[`updated-prompts`],`updated-prompts`),updated_tools:l(f[`updated-tools`],`updated-tools`)});i(await o(`Updating`,async()=>s.mcp.servers.update({...m,account_id:p,id:f.id})),{successLabel:`Updated`})})},G={command:`servers`,describe:`Operations for servers`,builder:e=>e.command(M).command(P).command(I).command(R).command(B).command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},K={command:`mcp`,describe:`mcp`,builder:e=>e.command(A).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
@@ -1,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-CpZztV8c.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{r}from"./auth-BIr56Mbx.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-A61dRbXl.mjs";import{t as s}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-CGUzvBgY.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
3
3
 
4
- Gets the high-availability configuration for a WARP Connector tunnel.`).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 g={command:`get <tunnel-id>`,describe:`Get WARP Connector HA configuration`,builder:h,handler:async c=>s({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.configurations.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
4
+ Gets the high-availability configuration for a WARP Connector tunnel.`).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 g={command:`get <tunnel-id>`,describe:`Get WARP Connector HA configuration`,builder:h,handler:async c=>s({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.configurations.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
5
5
 
6
- Adds or updates the high-availability configuration for a WARP Connector tunnel.`).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 WARP Connector tunnel. `none` means HA is enabled but no provider is configured yet (newly created tunnels 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`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`update <tunnel-id>`,describe:`Update WARP Connector HA configuration`,builder:_,handler:async d=>s({command:`mesh nodes configurations update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf mesh nodes configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${d[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(d[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(d[`tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({config:{fnr_id:u(d[`config-fnr-id`],`config-fnr-id`,`text`)},ha_mode:u(d[`ha-mode`],`ha-mode`,`text`)}):c(d.body)});return}let s=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.mesh.nodes.configurations.update({...e,account_id:p,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`});return}d[`ha-mode`]===void 0&&(d[`ha-mode`]=await f(`ha-mode`,"High-availability mode for the WARP Connector tunnel. `none` means HA is enabled but no provider is configured yet (newly created tunnels 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 m=l({config:{fnr_id:u(d[`config-fnr-id`],`config-fnr-id`,`text`)},ha_mode:u(d[`ha-mode`],`ha-mode`,`text`)});i(await o(`Updating`,async()=>s.mesh.nodes.configurations.update({...m,account_id:p,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`})})},y={command:`configurations`,describe:`Operations for nodes.configurations`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 mesh nodes connections list
6
+ Adds or updates the high-availability configuration for a WARP Connector tunnel.`).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 WARP Connector tunnel. `none` means HA is enabled but no provider is configured yet (newly created tunnels 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`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`update <tunnel-id>`,describe:`Update WARP Connector HA configuration`,builder:_,handler:async d=>s({command:`mesh nodes configurations update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf mesh nodes configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${d[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(d[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(d[`tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({config:{fnr_id:u(d[`config-fnr-id`],`config-fnr-id`,`text`)},ha_mode:u(d[`ha-mode`],`ha-mode`,`text`)}):c(d.body)});return}let s=await r(d),p=d.local?e:await n();if(d.accountId=p,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.mesh.nodes.configurations.update({...e,account_id:p,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`});return}d[`ha-mode`]===void 0&&(d[`ha-mode`]=await f(`ha-mode`,"High-availability mode for the WARP Connector tunnel. `none` means HA is enabled but no provider is configured yet (newly created tunnels 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 m=l({config:{fnr_id:u(d[`config-fnr-id`],`config-fnr-id`,`text`)},ha_mode:u(d[`ha-mode`],`ha-mode`,`text`)});i(await o(`Updating`,async()=>s.mesh.nodes.configurations.update({...m,account_id:p,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`})})},y={command:`configurations`,describe:`Operations for nodes.configurations`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 mesh nodes connections list
7
7
 
8
- Fetches connection details for a WARP Connector Tunnel.`).option(`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 x={command:`list`,describe:`List WARP Connector Tunnel connections`,builder:b,handler:async c=>s({command:`mesh nodes connections list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.connections.list({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})},S={command:`connections`,describe:`Operations for nodes.connections`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 mesh nodes connectors get <connector-id>
8
+ Fetches connection details for a WARP Connector Tunnel.`).option(`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 x={command:`list`,describe:`List WARP Connector Tunnel connections`,builder:b,handler:async c=>s({command:`mesh nodes connections list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.connections.list({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})},S={command:`connections`,describe:`Operations for nodes.connections`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 mesh nodes connectors get <connector-id>
9
9
 
10
- Fetches connector and connection details for a WARP Connector Tunnel.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`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 w={command:`get <connector-id>`,describe:`Get WARP Connector Tunnel connector`,builder:C,handler:async c=>s({command:`mesh nodes connectors get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``),"connector-id":String(c[`connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.connectors.get({account_id:l,tunnel_id:c[`tunnel-id`],connector_id:c[`connector-id`]})),{successLabel:`Loaded`})})},T={command:`connectors`,describe:`Operations for nodes.connectors`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 mesh nodes create
10
+ Fetches connector and connection details for a WARP Connector Tunnel.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`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 w={command:`get <connector-id>`,describe:`Get WARP Connector Tunnel connector`,builder:C,handler:async c=>s({command:`mesh nodes connectors get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``),"connector-id":String(c[`connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.connectors.get({account_id:l,tunnel_id:c[`tunnel-id`],connector_id:c[`connector-id`]})),{successLabel:`Loaded`})})},T={command:`connectors`,describe:`Operations for nodes.connectors`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 mesh nodes create
11
11
 
12
- Creates a new Warp Connector Tunnel 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 D={command:`create`,describe:`Create a Warp Connector Tunnel`,builder:E,handler:async f=>s({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({ha:f.ha,name:u(f.name,`name`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.mesh.nodes.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`A user-friendly name for a tunnel.`));let m=l({ha:f.ha,name:u(f.name,`name`,`text`)});i(await o(`Creating`,async()=>s.mesh.nodes.create({...m,account_id:p})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 mesh nodes delete <tunnel-id>
12
+ Creates a new Warp Connector Tunnel 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 D={command:`create`,describe:`Create a Warp Connector Tunnel`,builder:E,handler:async f=>s({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({ha:f.ha,name:u(f.name,`name`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.mesh.nodes.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`A user-friendly name for a tunnel.`));let m=l({ha:f.ha,name:u(f.name,`name`,`text`)});i(await o(`Creating`,async()=>s.mesh.nodes.create({...m,account_id:p})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 mesh nodes delete <tunnel-id>
13
13
 
14
- Deletes a Warp Connector Tunnel from an account.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const k={command:`delete <tunnel-id>`,describe:`Delete a Warp Connector Tunnel`,builder:O,handler:async c=>s({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation permanently deletes a Mesh node (Warp Connector Tunnel).`})){process.stderr.write(`Aborted.
14
+ Deletes a Warp Connector Tunnel from an account.`).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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const k={command:`delete <tunnel-id>`,describe:`Delete a Warp Connector Tunnel`,builder:O,handler:async c=>s({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await p({force:!!c.force,message:`This operation permanently deletes a Mesh node (Warp Connector Tunnel).`})){process.stderr.write(`Aborted.
15
15
  `);return}i(await o(`Deleting`,async()=>s.mesh.nodes.delete({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Deleted`})})};function A(e){return e.usage(`$0 mesh nodes edit <tunnel-id>
16
16
 
17
- Updates an existing Warp Connector Tunnel.`).positional(`tunnel-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 j={command:`edit <tunnel-id>`,describe:`Update a Warp Connector Tunnel`,builder:A,handler:async d=>s({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${d[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(d[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(d[`tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({name:u(d.name,`name`,`text`),tunnel_secret:u(d[`tunnel-secret`],`tunnel-secret`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.mesh.nodes.edit({...e,account_id:f,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`});return}let p=l({name:u(d.name,`name`,`text`),tunnel_secret:u(d[`tunnel-secret`],`tunnel-secret`,`text`)});i(await o(`Updating`,async()=>s.mesh.nodes.edit({...p,account_id:f,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`})})};function M(e){return e.usage(`$0 mesh nodes failover <tunnel-id>
17
+ Updates an existing Warp Connector Tunnel.`).positional(`tunnel-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 j={command:`edit <tunnel-id>`,describe:`Update a Warp Connector Tunnel`,builder:A,handler:async d=>s({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${d[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(d[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(d[`tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({name:u(d.name,`name`,`text`),tunnel_secret:u(d[`tunnel-secret`],`tunnel-secret`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.mesh.nodes.edit({...e,account_id:f,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`});return}let p=l({name:u(d.name,`name`,`text`),tunnel_secret:u(d[`tunnel-secret`],`tunnel-secret`,`text`)});i(await o(`Updating`,async()=>s.mesh.nodes.edit({...p,account_id:f,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`})})};function M(e){return e.usage(`$0 mesh nodes failover <tunnel-id>
18
18
 
19
- Triggers a manual failover for a specific WARP Connector Tunnel, 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(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-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 N={command:`failover <tunnel-id>`,describe:`Trigger a manual failover for a WARP Connector Tunnel`,builder:M,handler:async f=>s({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},f,async()=>{if(f.dryRun){a({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${f[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(f[`tunnel-id`]))}/failover`,pathParams:{"tunnel-id":String(f[`tunnel-id`]??``)},bodyKind:`json`,body:f.body===void 0?l({client_id:u(f[`client-id`],`client-id`,`text`)}):c(f.body)});return}let s=await r(f),m=f.local?e:await t();if(f.accountId=m,!await p({force:!!f.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`})){process.stderr.write(`Aborted.
19
+ Triggers a manual failover for a specific WARP Connector Tunnel, 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(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-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 N={command:`failover <tunnel-id>`,describe:`Trigger a manual failover for a WARP Connector Tunnel`,builder:M,handler:async f=>s({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},f,async()=>{if(f.dryRun){a({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${f[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(f[`tunnel-id`]))}/failover`,pathParams:{"tunnel-id":String(f[`tunnel-id`]??``)},bodyKind:`json`,body:f.body===void 0?l({client_id:u(f[`client-id`],`client-id`,`text`)}):c(f.body)});return}let s=await r(f),m=f.local?e:await n();if(f.accountId=m,!await p({force:!!f.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`})){process.stderr.write(`Aborted.
20
20
  `);return}if(f.body){let e=c(f.body);i(await o(`Deleting`,async()=>s.mesh.nodes.failover({...e,account_id:m,tunnel_id:f[`tunnel-id`]})),{successLabel:`Deleted`});return}f[`client-id`]===void 0&&(f[`client-id`]=await d(`client-id`,`UUID of the Cloudflare Tunnel connector.`));let h=l({client_id:u(f[`client-id`],`client-id`,`text`)});i(await o(`Deleting`,async()=>s.mesh.nodes.failover({...h,account_id:m,tunnel_id:f[`tunnel-id`]})),{successLabel:`Deleted`})})};function P(e){return e.usage(`$0 mesh nodes get <tunnel-id>
21
21
 
22
- Fetches a single Warp Connector Tunnel.`).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 F={command:`get <tunnel-id>`,describe:`Get a Warp Connector Tunnel`,builder:P,handler:async c=>s({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 mesh nodes list
22
+ Fetches a single Warp Connector Tunnel.`).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 F={command:`get <tunnel-id>`,describe:`Get a Warp Connector Tunnel`,builder:P,handler:async c=>s({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 mesh nodes list
23
23
 
24
- Lists and filters Warp Connector Tunnels 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 L={command:`list`,describe:`List Warp Connector Tunnels`,builder:m(I),handler:async c=>s({command:`mesh nodes list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},c,async()=>{let s={name:c.name,is_deleted:c[`is-deleted`],existed_at:c[`existed-at`],uuid:c.uuid,was_active_at:c[`was-active-at`],was_inactive_at:c[`was-inactive-at`],include_prefix:c[`include-prefix`],exclude_prefix:c[`exclude-prefix`],status:c.status,per_page:c[`per-page`],page:c.page};if(c.dryRun){a({command:`cf mesh nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.mesh.nodes.list({account_id:u,...s})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 mesh nodes token get <tunnel-id>
24
+ Lists and filters Warp Connector Tunnels 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 L={command:`list`,describe:`List Warp Connector Tunnels`,builder:m(I),handler:async c=>s({command:`mesh nodes list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},c,async()=>{let s={name:c.name,is_deleted:c[`is-deleted`],existed_at:c[`existed-at`],uuid:c.uuid,was_active_at:c[`was-active-at`],was_inactive_at:c[`was-inactive-at`],include_prefix:c[`include-prefix`],exclude_prefix:c[`exclude-prefix`],status:c.status,per_page:c[`per-page`],page:c.page};if(c.dryRun){a({command:`cf mesh nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.mesh.nodes.list({account_id:u,...s})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 mesh nodes token get <tunnel-id>
25
25
 
26
- Gets the token used to associate warp device with a specific Warp Connector tunnel.`).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 z={command:`get <tunnel-id>`,describe:`Get a Warp Connector Tunnel token`,builder:R,handler:async c=>s({command:`mesh nodes token get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.token.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})},B={command:`token`,describe:`Operations for nodes.token`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`nodes`,describe:`Operations for nodes`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).command(L).command(y).command(S).command(T).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`mesh`,describe:`mesh`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
26
+ Gets the token used to associate warp device with a specific Warp Connector tunnel.`).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 z={command:`get <tunnel-id>`,describe:`Get a Warp Connector Tunnel token`,builder:R,handler:async c=>s({command:`mesh nodes token get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.token.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})},B={command:`token`,describe:`Operations for nodes.token`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`nodes`,describe:`Operations for nodes`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).command(L).command(y).command(S).command(T).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`mesh`,describe:`mesh`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import"./ui-BQxRjahW.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-CJEb9hY3.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};
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-CEOHpZgd.mjs";import{r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f}from"./input-validation-Dk52b0me.mjs";import{n as p}from"./prompt-CGUzvBgY.mjs";function m(e){return e.usage(`$0 monetization account-eligibility check
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 h={command:`check`,describe:`Check account or zone monetization eligibility`,builder:m,handler:async u=>c({command:`monetization account-eligibility check`,classification:{safeFlags:[`accepted-terms-of-service`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await t():void 0,n=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf monetization account-eligibility check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({acceptedTermsOfService:u[`accepted-terms-of-service`]}):l(u.body)});return}let c=await i(u),f=u.zone===void 0?`accounts`:`zones`,p=f===`zones`?await n({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await r();if(f===`zones`?u.zoneId=p:u.accountId=p,u.body){let e=l(u.body);a(await s(`Creating`,async()=>c.monetization.accountEligibility.check({...e,account_or_zone:f,account_or_zone_id:p})),{successLabel:`Created`});return}if(u[`accepted-terms-of-service`]===void 0)throw Error(`--accepted-terms-of-service is required (or pass --body with this field set).`);let m=d({acceptedTermsOfService:u[`accepted-terms-of-service`]});a(await s(`Creating`,async()=>c.monetization.accountEligibility.check({...m,account_or_zone:f,account_or_zone_id:p})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 monetization account-eligibility get
5
+
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 _={command:`get`,describe:`Get account or zone monetization eligibility`,builder:g,handler:async l=>c({command:`monetization account-eligibility get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf monetization account-eligibility get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.monetization.accountEligibility.get({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})},v={command:`account-eligibility`,describe:`Operations for account-eligibility`,builder:e=>e.command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 monetization rules delete-all
7
+
8
+ Removes every Payment Required rule from the zone. Any rules the service does not own are preserved. Deleting a zone with no payment rules is a no-op. Returns the resulting (empty) rule collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete-all`,describe:`Delete all payment rules`,builder:y,handler:async e=>c({command:`monetization rules delete-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf monetization rules delete-all`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force,message:`This operation deletes every Monetization Gateway rule for the zone.`})){process.stderr.write(`Aborted.
9
+ `);return}a(await s(`Deleting`,async()=>t.monetization.rules.deleteAll({zone_id:r})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 monetization rules delete <rule-id>
10
+
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 S={command:`delete <rule-id>`,describe:`Delete a payment rule`,builder:x,handler:async e=>c({command:`monetization rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({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 i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force,message:`This operation deletes the selected Monetization Gateway rule.`})){process.stderr.write(`Aborted.
12
+ `);return}a(await s(`Deleting`,async()=>t.monetization.rules.delete({zone_id:r,rule_id:e[`rule-id`]})),{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 monetization rules edit <rule-id>
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`]}).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 w={command:`edit <rule-id>`,describe:`Update a payment rule`,builder:C,handler:async e=>c({command:`monetization rules edit`,classification:{safeFlags:[`enabled`,`scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){o({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?d({address:f(e.address,`address`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`),price:f(e.price,`price`,`text`),scheme:f(e.scheme,`scheme`,`text`)}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Updating`,async()=>t.monetization.rules.edit({...n,zone_id:r,rule_id:e[`rule-id`]})),{successLabel:`Updated`});return}let c=d({address:f(e.address,`address`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`),price:f(e.price,`price`,`text`),scheme:f(e.scheme,`scheme`,`text`)});a(await s(`Updating`,async()=>t.monetization.rules.edit({...c,zone_id:r,rule_id:e[`rule-id`]})),{successLabel:`Updated`})})};function T(e){return e.usage(`$0 monetization rules get <rule-id>
15
+
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 E={command:`get <rule-id>`,describe:`Get a payment rule`,builder:T,handler:async e=>c({command:`monetization rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({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 i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.monetization.rules.get({zone_id:r,rule_id:e[`rule-id`]})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 monetization rules list
17
+
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 O={command:`list`,describe:`List payment rules`,builder:D,handler:async e=>c({command:`monetization rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({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 i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.monetization.rules.list({zone_id:r})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 monetization rules update
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 A={command:`update`,describe:`Deploy payment ruleset`,builder:k,handler:async e=>c({command:`monetization rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({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?d({rules:u(e.rules,`rules`)}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Updating`,async()=>t.monetization.rules.update({...n,zone_id:r})),{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let c=d({rules:u(e.rules,`rules`)});a(await s(`Updating`,async()=>t.monetization.rules.update({...c,zone_id:r})),{successLabel:`Updated`})})},j={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(S).command(b).command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`monetization`,describe:`monetization`,builder:e=>e.command(v).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{r}from"./auth-BIr56Mbx.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-A61dRbXl.mjs";import{t as s}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,n as f}from"./prompt-CGUzvBgY.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
3
+
4
+ Lists all active associations between the certificate and Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <mtls-certificate-id>`,describe:`List mTLS certificate associations`,builder:m,handler:async c=>s({command:`mtls-certificates associations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.associations.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})},g={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 mtls-certificates create
5
+
6
+ Upload a certificate that you want to use with mTLS-enabled Cloudflare services, such as Bring Your Own CA (BYO-CA) for mTLS. To create certificates issued by the Cloudflare managed CA, use the [Create Client Certificate endpoint](/api/resources/client_certificates/methods/create/).`).option(`ca`,{type:`boolean`,description:`Indicates whether the certificate is a CA or leaf certificate.`}).option(`certificates`,{type:`string`,description:`The uploaded root CA certificate.`}).option(`name`,{type:`string`,description:`Optional unique name for the certificate. Only used for human readability.`}).option(`private-key`,{type:`string`,description:`The private key for the certificate. This field is only needed for specific use cases such as using a custom certificate with Zero Trust's block page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Upload mTLS certificate`,builder:_,handler:async f=>s({command:`mtls-certificates create`,classification:{safeFlags:[`ca`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mtls-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/mtls_certificates`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({ca:f.ca,certificates:u(f.certificates,`certificates`,`text`),name:u(f.name,`name`,`text`),private_key:u(f[`private-key`],`private-key`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.mtlsCertificates.create({...e,account_id:p})),{successLabel:`Created`});return}if(f.ca===void 0)throw Error(`--ca is required (or pass --body with this field set).`);f.certificates===void 0&&(f.certificates=await d(`certificates`,`The uploaded root CA certificate.`));let m=l({ca:f.ca,certificates:u(f.certificates,`certificates`,`text`),name:u(f.name,`name`,`text`),private_key:u(f[`private-key`],`private-key`,`text`)});i(await o(`Creating`,async()=>s.mtlsCertificates.create({...m,account_id:p})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 mtls-certificates delete <mtls-certificate-id>
7
+
8
+ Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <mtls-certificate-id>`,describe:`Delete mTLS certificate`,builder:y,handler:async c=>s({command:`mtls-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
9
+ `);return}i(await o(`Deleting`,async()=>s.mtlsCertificates.delete({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 mtls-certificates get <mtls-certificate-id>
10
+
11
+ Fetches a single mTLS certificate uploaded to your account. To get a certificate issued by the Cloudflare managed CA, use the [Client Certificate Details endpoint](/api/resources/client_certificates/methods/get/).`).positional(`mtls-certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <mtls-certificate-id>`,describe:`Get mTLS certificate`,builder:x,handler:async c=>s({command:`mtls-certificates get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 mtls-certificates list
12
+
13
+ Lists all mTLS certificates uploaded to your account, such as Bring Your Own CA (BYO-CA) for mTLS. To list certificates issued by the Cloudflare managed CA, use the [List Client Certificates endpoint](/api/resources/client_certificates/methods/list/).`).option(`type`,{type:`string`,description:`Filters results by certificate type. Multiple types can be comma-separated.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List mTLS certificates`,builder:p(C),handler:async c=>s({command:`mtls-certificates list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={type:c.type};if(c.dryRun){a({command:`cf mtls-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/mtls_certificates`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.mtlsCertificates.list({account_id:u,...s})),{successLabel:`Loaded`})})},T={command:`mtls-certificates`,describe:`mtls-certificates`,builder:e=>e.command(v).command(b).command(S).command(w).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};