@vercel/cli-support 65.14.0 → 65.15.0-snapshot-9209a1e84cf9

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 (262) hide show
  1. package/dist/chunks/add-6T3KGMEH.js +8 -0
  2. package/dist/chunks/add-LULORXI7.js +8 -0
  3. package/dist/chunks/add-WGP6UVQN.js +8 -0
  4. package/dist/chunks/alerts-IFUWVZU4.js +8 -0
  5. package/dist/chunks/build-H5WTYJH4.js +7 -0
  6. package/dist/chunks/chunk-26EJ4FM6.js +7 -0
  7. package/dist/chunks/{chunk-HDUZSFTK.js → chunk-2OQD274E.js} +7 -8
  8. package/dist/chunks/{chunk-B7SLQSME.js → chunk-2QYOZU6E.js} +1 -1
  9. package/dist/chunks/chunk-2W4ND5DH.js +9 -0
  10. package/dist/chunks/{chunk-22FAXGPD.js → chunk-3EHJOZJB.js} +1 -1
  11. package/dist/chunks/{chunk-QTTJMXKJ.js → chunk-3JFPC5MK.js} +1 -1
  12. package/dist/chunks/{chunk-RJJYX4RA.js → chunk-3S7H6NCV.js} +1 -1
  13. package/dist/chunks/{chunk-FT5IZURV.js → chunk-4TAAEP5J.js} +1 -1
  14. package/dist/chunks/{chunk-4L6SITE4.js → chunk-554TYJKV.js} +1 -1
  15. package/dist/chunks/{chunk-3N64YUGR.js → chunk-5DEAFZBT.js} +1 -1
  16. package/dist/chunks/chunk-5PAMKYPV.js +14 -0
  17. package/dist/chunks/chunk-5THEFDOZ.js +10 -0
  18. package/dist/chunks/{chunk-HFQ5T6HP.js → chunk-6MFLATDD.js} +1 -1
  19. package/dist/chunks/{chunk-A5UV4EAX.js → chunk-6TYBUUO4.js} +1 -1
  20. package/dist/chunks/{chunk-25W3CLDF.js → chunk-7GSB5AQE.js} +1 -1
  21. package/dist/chunks/{chunk-IWFB7TGB.js → chunk-7O2W7ILO.js} +1 -1
  22. package/dist/chunks/{chunk-HNLLL52N.js → chunk-7OJMANDL.js} +1 -1
  23. package/dist/chunks/{chunk-QEMYZTK7.js → chunk-7RAGU3PA.js} +1 -1
  24. package/dist/chunks/chunk-A7YTYTWM.js +7 -0
  25. package/dist/chunks/{chunk-D4URLIDE.js → chunk-AR3ADTVY.js} +1 -1
  26. package/dist/chunks/{chunk-ZP36CA3U.js → chunk-ATUJAOUR.js} +1 -1
  27. package/dist/chunks/{chunk-P3JKE7TX.js → chunk-B6WYIUOW.js} +1 -1
  28. package/dist/chunks/{chunk-PURYFV4L.js → chunk-BYJQPGPK.js} +1 -1
  29. package/dist/chunks/{chunk-ZRHHEWGW.js → chunk-C35XH6YM.js} +1 -1
  30. package/dist/chunks/{chunk-Y6PC5E6Y.js → chunk-DCUWC7WP.js} +1 -1
  31. package/dist/chunks/{chunk-BSCJRQ3E.js → chunk-DETGGKXT.js} +1 -1
  32. package/dist/chunks/{chunk-V4AZABH6.js → chunk-EB7744O7.js} +1 -1
  33. package/dist/chunks/{chunk-OX5KSZFU.js → chunk-EI4CUIVA.js} +1 -1
  34. package/dist/chunks/{chunk-SJU4QJVF.js → chunk-EZ7CJF5G.js} +1 -1
  35. package/dist/chunks/{chunk-3G6TOS6I.js → chunk-GTOSMVDY.js} +1 -1
  36. package/dist/chunks/chunk-HFVCKK5P.js +10 -0
  37. package/dist/chunks/chunk-HIK5CJTT.js +7 -0
  38. package/dist/chunks/chunk-HOGVBY6Q.js +11 -0
  39. package/dist/chunks/{chunk-TF5BOGQN.js → chunk-HSCWCGL7.js} +1 -1
  40. package/dist/chunks/{chunk-LRBJZNET.js → chunk-HVBSYQDN.js} +1 -1
  41. package/dist/chunks/{chunk-WKFLDUTU.js → chunk-HVQEYQWF.js} +1 -1
  42. package/dist/chunks/{chunk-4JPTCTBV.js → chunk-HVZ5OOOP.js} +1 -1
  43. package/dist/chunks/{chunk-76FG2WPQ.js → chunk-IDHH6QTJ.js} +2 -2
  44. package/dist/chunks/{chunk-AAD3PR73.js → chunk-JQHS743O.js} +1 -1
  45. package/dist/chunks/{chunk-SAPTIA7Q.js → chunk-JZ4NMX3Z.js} +1 -1
  46. package/dist/chunks/{chunk-TEHLABJO.js → chunk-KAYGNWHX.js} +1 -1
  47. package/dist/chunks/{chunk-AII372TC.js → chunk-KRVZKKJV.js} +1 -1
  48. package/dist/chunks/{chunk-5OOWE5CD.js → chunk-KRZBZ7PB.js} +1 -1
  49. package/dist/chunks/{chunk-MBEYI5HF.js → chunk-KVDSSSSF.js} +1 -1
  50. package/dist/chunks/{chunk-JR3732RL.js → chunk-LNQAOLNW.js} +1 -1
  51. package/dist/chunks/chunk-LOA7SZWH.js +7 -0
  52. package/dist/chunks/chunk-LT3Z7YQX.js +7 -0
  53. package/dist/chunks/{chunk-HWUQVJIJ.js → chunk-MCLT57FD.js} +1 -1
  54. package/dist/chunks/chunk-MZ7ITRVR.js +12 -0
  55. package/dist/chunks/{chunk-RD45QAHF.js → chunk-N7NTAYBS.js} +1 -1
  56. package/dist/chunks/{chunk-FM4UZVFU.js → chunk-O3I6OKIE.js} +1 -1
  57. package/dist/chunks/chunk-O47OWLP7.js +7 -0
  58. package/dist/chunks/{chunk-BJBJYWAJ.js → chunk-ODM3YKPR.js} +1 -1
  59. package/dist/chunks/chunk-ONXOTUO6.js +7 -0
  60. package/dist/chunks/{chunk-UKBMDOUD.js → chunk-P333Z5AT.js} +1 -1
  61. package/dist/chunks/{chunk-E7T3YJRB.js → chunk-PL6TMRQZ.js} +1 -1
  62. package/dist/chunks/{chunk-7DT2GH67.js → chunk-PRNTZKYB.js} +1 -1
  63. package/dist/chunks/{chunk-QUAIU6FH.js → chunk-PSPPENIK.js} +1 -1
  64. package/dist/chunks/{chunk-QU4WGUNK.js → chunk-QEZ6KFSY.js} +1 -1
  65. package/dist/chunks/{chunk-E56JZWPW.js → chunk-QFCYM4RS.js} +1 -1
  66. package/dist/chunks/{chunk-ZZTIGQXP.js → chunk-RWK4YZLO.js} +1 -1
  67. package/dist/chunks/{chunk-MVOMOVK3.js → chunk-SPV6M2GS.js} +1 -1
  68. package/dist/chunks/chunk-SZO73QV5.js +7 -0
  69. package/dist/chunks/{chunk-NR2JDEYD.js → chunk-T7XSLFZ6.js} +1 -1
  70. package/dist/chunks/chunk-TA4HB2ZR.js +10 -0
  71. package/dist/chunks/{chunk-DRXBDUAL.js → chunk-TDHFWPK5.js} +1 -1
  72. package/dist/chunks/{chunk-DMPPORR6.js → chunk-U3J3SJJ5.js} +2 -2
  73. package/dist/chunks/{chunk-JXLJZBJK.js → chunk-U6P3UM3Z.js} +1 -1
  74. package/dist/chunks/{chunk-6CHTRMWQ.js → chunk-UDKIA6WN.js} +1 -1
  75. package/dist/chunks/{chunk-2CMY3JXZ.js → chunk-UIGZMWS6.js} +1 -1
  76. package/dist/chunks/{chunk-Z3IAHGBR.js → chunk-VBGL7MZR.js} +1 -1
  77. package/dist/chunks/{chunk-ZMT7EYYL.js → chunk-VHRQW57O.js} +1 -1
  78. package/dist/chunks/{chunk-2SVS5PWL.js → chunk-VTZH5DW3.js} +1 -1
  79. package/dist/chunks/chunk-W45KFKUW.js +7 -0
  80. package/dist/chunks/{chunk-WFAY2HPY.js → chunk-X5I33MJS.js} +1 -1
  81. package/dist/chunks/{chunk-N56EMHCO.js → chunk-X5LOHZT5.js} +1 -1
  82. package/dist/chunks/{chunk-TRGD2PHX.js → chunk-XDBRJ7H3.js} +1 -1
  83. package/dist/chunks/{chunk-QHR6TD34.js → chunk-XEISEISC.js} +1 -1
  84. package/dist/chunks/{chunk-E3E7SPFO.js → chunk-XF3327G6.js} +1 -1
  85. package/dist/chunks/{chunk-6FP3V45O.js → chunk-XHPIQGUS.js} +1 -1
  86. package/dist/chunks/chunk-YE245S4O.js +7 -0
  87. package/dist/chunks/chunk-YEQ7BBOS.js +11 -0
  88. package/dist/chunks/{chunk-WAWNYFSK.js → chunk-YVIAN4VL.js} +1 -1
  89. package/dist/chunks/{chunk-NNHPXHOT.js → chunk-Z2HYNJLC.js} +1 -1
  90. package/dist/chunks/clear-L4HSULAA.js +8 -0
  91. package/dist/chunks/compile-vercel-config-3AD57TKS.js +7 -0
  92. package/dist/chunks/config-E7OJDF2P.js +8 -0
  93. package/dist/chunks/{config-XH62NJX7.js → config-N4SB5PPU.js} +1 -1
  94. package/dist/chunks/contract-EULMKZS4.js +11 -0
  95. package/dist/chunks/delete-33WIMH3P.js +9 -0
  96. package/dist/chunks/delete-45EEPRWI.js +10 -0
  97. package/dist/chunks/{describe-RNFQJQD5.js → describe-QAF4MI7I.js} +1 -1
  98. package/dist/chunks/detect-services-AAVP4EBS.js +7 -0
  99. package/dist/chunks/disable-H3Z7OJJE.js +7 -0
  100. package/dist/chunks/discard-KIEAG7NI.js +14 -0
  101. package/dist/chunks/edit-3Q36ZYIA.js +9 -0
  102. package/dist/chunks/edit-YQJNSZTX.js +8 -0
  103. package/dist/chunks/enable-BMB5D7AO.js +7 -0
  104. package/dist/chunks/{export-TVJDXCZA.js → export-QQAZAQOU.js} +1 -1
  105. package/dist/chunks/future-TZACZMSV.js +7 -0
  106. package/dist/chunks/generate-cert-for-deploy-EZM5MW2G.js +7 -0
  107. package/dist/chunks/{image-NFARXO3R.js → image-YAMHIRFF.js} +1 -1
  108. package/dist/chunks/import-builders-DE7NPR7N.js +7 -0
  109. package/dist/chunks/inspect-DIH47SML.js +8 -0
  110. package/dist/chunks/inspect-MFVWIQT4.js +9 -0
  111. package/dist/chunks/{inspect-4RQLEUGZ.js → inspect-OHNQUBKI.js} +1 -1
  112. package/dist/chunks/inspect-QNZWH5O3.js +13 -0
  113. package/dist/chunks/{inspect-H6LSGCYS.js → inspect-VCJDESUJ.js} +1 -1
  114. package/dist/chunks/{inspect-RMP4AAQR.js → inspect-Y5LG6JUC.js} +1 -1
  115. package/dist/chunks/{list-WEGUICE6.js → list-AYUHH7TO.js} +1 -1
  116. package/dist/chunks/{list-6SRUT2BU.js → list-C7GYUVSJ.js} +1 -1
  117. package/dist/chunks/list-KB6YGNJZ.js +12 -0
  118. package/dist/chunks/list-YJSC2ST6.js +8 -0
  119. package/dist/chunks/login-E47LQVJN.js +9 -0
  120. package/dist/chunks/login-T2VKRCUS.js +7 -0
  121. package/dist/chunks/logs-BLMH6Y45.js +7 -0
  122. package/dist/chunks/ls-5KNEE66N.js +11 -0
  123. package/dist/chunks/{ls-YC4IWYN7.js → ls-BPRVNFEB.js} +1 -1
  124. package/dist/chunks/ls-CBV4C474.js +8 -0
  125. package/dist/chunks/{ls-PTRVCVXJ.js → ls-EBJTSOO7.js} +1 -1
  126. package/dist/chunks/{ls-7Z5WT5OK.js → ls-GI4HMBK6.js} +1 -1
  127. package/dist/chunks/{ls-CKOBQXUR.js → ls-JOOH2AF2.js} +1 -1
  128. package/dist/chunks/{ls-7JX4KZXU.js → ls-V6KTI55Z.js} +1 -1
  129. package/dist/chunks/migrate-experimental-services-ZMZITRD4.js +7 -0
  130. package/dist/chunks/mutate-5AQS53DH.js +9 -0
  131. package/dist/chunks/{notifications-BTVI6EIG.js → notifications-T74YEQUZ.js} +1 -1
  132. package/dist/chunks/open-GUNAPG6S.js +7 -0
  133. package/dist/chunks/{openapi-D66WN4LW.js → openapi-5WTF7EXK.js} +1 -1
  134. package/dist/chunks/{permissions-JGQHHLCP.js → permissions-BISSYSWA.js} +1 -1
  135. package/dist/chunks/{plugin-offer-OQF2T2HP.js → plugin-offer-NIDPSYYJ.js} +1 -1
  136. package/dist/chunks/prompt-missing-credentials-YR5RBSGW.js +7 -0
  137. package/dist/chunks/publish-D7EXNS3C.js +15 -0
  138. package/dist/chunks/pull-NQ2FQBCM.js +7 -0
  139. package/dist/chunks/purchase-domain-if-available-YG3AOXZ7.js +7 -0
  140. package/dist/chunks/push-OCU3RUHV.js +7 -0
  141. package/dist/chunks/{query-XKNAII7Y.js → query-FM6SRTQP.js} +1 -1
  142. package/dist/chunks/reauthenticate-S7ZZYONP.js +7 -0
  143. package/dist/chunks/remove-LZTO47IA.js +9 -0
  144. package/dist/chunks/reorder-TMBGWMPR.js +10 -0
  145. package/dist/chunks/reply-55HPMB6K.js +9 -0
  146. package/dist/chunks/resolve-BTBTAK33.js +12 -0
  147. package/dist/chunks/resolve-agent-team-3QXPCCT7.js +7 -0
  148. package/dist/chunks/restore-K6LCLHTG.js +16 -0
  149. package/dist/chunks/rm-4PSIPJUA.js +8 -0
  150. package/dist/chunks/rm-CEUCQRIX.js +8 -0
  151. package/dist/chunks/rm-I5PRDQHP.js +8 -0
  152. package/dist/chunks/rm-LL6X65SS.js +8 -0
  153. package/dist/chunks/rm-UOP7BPBQ.js +8 -0
  154. package/dist/chunks/rule-inspect-DKODR7X2.js +8 -0
  155. package/dist/chunks/{schema-DULOJDLJ.js → schema-L3YB2LQE.js} +1 -1
  156. package/dist/chunks/schema-LRVPWIYU.js +14 -0
  157. package/dist/chunks/select-org-JQBD5NDP.js +7 -0
  158. package/dist/chunks/set-UMNUZAGG.js +8 -0
  159. package/dist/chunks/set-YBCB2ZLD.js +7 -0
  160. package/dist/chunks/setup-and-link-JRQ5DLOI.js +7 -0
  161. package/dist/chunks/{skills-TZOXQHF6.js → skills-DDFYTBGG.js} +1 -1
  162. package/dist/chunks/{tags-FHC6EMQ2.js → tags-WRH47Z4W.js} +1 -1
  163. package/dist/chunks/{types-5YOSC6SX.js → types-NQECZN4K.js} +1 -1
  164. package/dist/chunks/{update-S6EDQLRE.js → update-FAMBH7PW.js} +1 -1
  165. package/dist/chunks/usage-YACGLTPY.js +13 -0
  166. package/dist/chunks/{validate-config-YBBR32MV.js → validate-config-X6DF35VG.js} +1 -1
  167. package/dist/commands/build/index.js +1 -1
  168. package/dist/commands/deploy/index.js +4 -4
  169. package/dist/commands/dev/index.js +2 -2
  170. package/dist/commands/env/index.js +7 -7
  171. package/dist/commands/link/index.js +1 -1
  172. package/dist/commands/list/index.js +1 -1
  173. package/dist/commands/project/index.js +1 -1
  174. package/dist/commands/tunnel/index.js +1 -1
  175. package/dist/commands-account.js +61 -52
  176. package/dist/commands-ai.js +4 -4
  177. package/dist/commands-blob.js +2 -2
  178. package/dist/commands-core.js +70 -48
  179. package/dist/commands-deployments.js +1 -1
  180. package/dist/commands-flags.js +1 -1
  181. package/dist/commands-integrations.js +53 -32
  182. package/dist/commands-observability.js +8 -7
  183. package/dist/commands-routing.js +46 -32
  184. package/dist/help.js +1 -1
  185. package/dist/index.js +7 -5
  186. package/dist/internal-build.js +1 -1
  187. package/dist/package.json +13 -13
  188. package/dist/root-help-commands.mjs +1 -1
  189. package/dist/version.mjs +1 -1
  190. package/package.json +20 -20
  191. package/dist/chunks/add-BYNKYST2.js +0 -8
  192. package/dist/chunks/add-HXK3HUQG.js +0 -8
  193. package/dist/chunks/add-WTK2AFMX.js +0 -8
  194. package/dist/chunks/alerts-XAOLRZK3.js +0 -8
  195. package/dist/chunks/build-BXCATM4H.js +0 -7
  196. package/dist/chunks/chunk-5YLKPSZI.js +0 -7
  197. package/dist/chunks/chunk-623OWG6A.js +0 -7
  198. package/dist/chunks/chunk-EWHM5VFZ.js +0 -10
  199. package/dist/chunks/chunk-IRNQJ6ZX.js +0 -11
  200. package/dist/chunks/chunk-JLURS22G.js +0 -7
  201. package/dist/chunks/chunk-K5Z2NE3P.js +0 -7
  202. package/dist/chunks/chunk-KHXWKYEZ.js +0 -10
  203. package/dist/chunks/chunk-LC535OIW.js +0 -7
  204. package/dist/chunks/chunk-LGN3TASP.js +0 -7
  205. package/dist/chunks/chunk-MGFM2KHC.js +0 -11
  206. package/dist/chunks/chunk-PLGG2AWX.js +0 -10
  207. package/dist/chunks/chunk-TPKFVYL5.js +0 -12
  208. package/dist/chunks/chunk-VTM6RPYS.js +0 -7
  209. package/dist/chunks/chunk-WE5MHW2O.js +0 -12
  210. package/dist/chunks/chunk-WFH24UO3.js +0 -7
  211. package/dist/chunks/clear-IVHCV4EA.js +0 -8
  212. package/dist/chunks/compile-vercel-config-PYYVTC3B.js +0 -7
  213. package/dist/chunks/config-JUMF25FF.js +0 -8
  214. package/dist/chunks/contract-BLBTK32L.js +0 -10
  215. package/dist/chunks/delete-6FYWPVDH.js +0 -9
  216. package/dist/chunks/delete-PVH4423M.js +0 -10
  217. package/dist/chunks/detect-services-25NRRPII.js +0 -7
  218. package/dist/chunks/disable-HOKABZ7L.js +0 -7
  219. package/dist/chunks/discard-TLBZGTGN.js +0 -14
  220. package/dist/chunks/edit-HSJ4FSZQ.js +0 -8
  221. package/dist/chunks/edit-NNIE7NNF.js +0 -9
  222. package/dist/chunks/enable-TY6QUZWZ.js +0 -7
  223. package/dist/chunks/future-OELW62EE.js +0 -7
  224. package/dist/chunks/generate-cert-for-deploy-HBBZE5NA.js +0 -7
  225. package/dist/chunks/import-builders-ZEJEFXAX.js +0 -7
  226. package/dist/chunks/inspect-HXE2UT6Z.js +0 -8
  227. package/dist/chunks/inspect-OCHE3DVA.js +0 -13
  228. package/dist/chunks/inspect-UTYZYPSK.js +0 -9
  229. package/dist/chunks/list-YYHMAGMG.js +0 -8
  230. package/dist/chunks/list-ZXY2AMNN.js +0 -12
  231. package/dist/chunks/login-DBKNZ6RP.js +0 -7
  232. package/dist/chunks/login-XNS4A4L7.js +0 -9
  233. package/dist/chunks/logs-F7AR7Y5S.js +0 -7
  234. package/dist/chunks/ls-GGIZNTY4.js +0 -11
  235. package/dist/chunks/ls-ISBLA37G.js +0 -8
  236. package/dist/chunks/migrate-experimental-services-XHPJAZFK.js +0 -7
  237. package/dist/chunks/mutate-AQGXSJED.js +0 -9
  238. package/dist/chunks/open-TZLOIAGJ.js +0 -7
  239. package/dist/chunks/prompt-missing-credentials-ATEAZE3Q.js +0 -7
  240. package/dist/chunks/publish-E2QCYVQM.js +0 -15
  241. package/dist/chunks/pull-YEEZTBZB.js +0 -7
  242. package/dist/chunks/purchase-domain-if-available-66DVKBZ5.js +0 -7
  243. package/dist/chunks/push-WT2R2MH2.js +0 -7
  244. package/dist/chunks/reauthenticate-JONKFLTL.js +0 -7
  245. package/dist/chunks/remove-PLSYF2ZB.js +0 -9
  246. package/dist/chunks/reorder-4UCOO5AJ.js +0 -10
  247. package/dist/chunks/reply-B2OCHHMQ.js +0 -9
  248. package/dist/chunks/resolve-PU5UR7JC.js +0 -12
  249. package/dist/chunks/resolve-agent-team-FFV2K42Z.js +0 -7
  250. package/dist/chunks/restore-7AWVT7RT.js +0 -16
  251. package/dist/chunks/rm-523X3JI3.js +0 -8
  252. package/dist/chunks/rm-DTGRJLGC.js +0 -8
  253. package/dist/chunks/rm-GHF2AEO6.js +0 -8
  254. package/dist/chunks/rm-GVFFKCYP.js +0 -8
  255. package/dist/chunks/rm-QXPFFK7Z.js +0 -8
  256. package/dist/chunks/rule-inspect-N3B2737B.js +0 -8
  257. package/dist/chunks/schema-KZ3NXHDV.js +0 -14
  258. package/dist/chunks/select-org-RK3NJUXQ.js +0 -7
  259. package/dist/chunks/set-CYNAACFX.js +0 -7
  260. package/dist/chunks/set-UDHZOYCP.js +0 -8
  261. package/dist/chunks/setup-and-link-BUARMJER.js +0 -7
  262. package/dist/chunks/usage-OZY35PJU.js +0 -13
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{printRuleMutationReceipt}from"./chunk-TDHFWPK5.js";import"./chunk-GHNHUSVK.js";import{resolveRulesProject,resolveRulesTeam}from"./chunk-HVQEYQWF.js";import"./chunk-HIK5CJTT.js";import{emitRulesArgParseError,getBodyType,handleRulesApiError,outputRulesError,readRuleBody,rulesCollectionPath}from"./chunk-Z2HYNJLC.js";import"./chunk-ZJNDLFZ7.js";import"./chunk-GHAY4PSD.js";import"./chunk-D3M2JG5C.js";import"./chunk-TOTTVS5P.js";import"./chunk-HRR57QNP.js";import"./chunk-GZNDA6SV.js";import"./chunk-PFD7LETF.js";import{trackCreatedId}from"./chunk-YJNMDXEG.js";import"./chunk-CJZE7647.js";import{monitorsAddSubcommand}from"./chunk-W25UARQV.js";import{printError}from"./chunk-VHRQW57O.js";import"./chunk-HVZ5OOOP.js";import"./chunk-KDCODXVL.js";import"./chunk-NWGBDBZI.js";import"./chunk-HOGVBY6Q.js";import"./chunk-OFZUWHZW.js";import"./chunk-2OQD274E.js";import"./chunk-M7FED5YP.js";import"./chunk-4HR3I3ML.js";import"./chunk-LOA7SZWH.js";import"./chunk-MTZYPCZ7.js";import"./chunk-D6REP5QQ.js";import"./chunk-UXRRYYSD.js";import{parseArguments}from"./chunk-NHB43235.js";import"./chunk-2VBFQZ72.js";import{validateJsonOutput}from"./chunk-6GKP6VUF.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4NTBYNFR.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import"./chunk-24SIHFEW.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import"./chunk-BZENIQ7N.js";function applyScopeFlag(client,body,type,scope,flags,jsonOutput){if(Object.hasOwn(body,"ruleScope"))return flags["--project"]||flags["--all"]?outputRulesError(client,jsonOutput,"SCOPE_CONFLICT","Specify monitor scope either in the body or with --project/--all, not both."):void 0;if(flags["--project"]){body.ruleScope=type==="custom"?{type:"project",projectId:scope.projectId}:{type:"include",projectIds:[scope.projectId]};return}if(flags["--all"]){if(type==="custom")return outputRulesError(client,jsonOutput,"INVALID_SCOPE","Custom monitors must target one project. Use --project <name-or-id>.");body.ruleScope={type:"all"};return}return outputRulesError(client,jsonOutput,"MISSING_SCOPE","Missing monitor scope. Add ruleScope to the body, or pass --project or --all.")}async function resolveCreateScope(client,flags,jsonOutput){return flags["--project"]&&flags["--all"]?outputRulesError(client,jsonOutput,"MUTUAL_EXCLUSIVITY","Cannot specify both --all and --project. Use one or the other."):flags["--project"]?resolveRulesProject(client,flags["--project"],jsonOutput,"monitors add"):resolveRulesTeam(client,jsonOutput)}async function add(client,argv,api){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(monitorsAddSubcommand.options))}catch(error){return emitRulesArgParseError(client,error,"monitors add --project <name-or-id> --body <path>"),printError(error),2}let flags=parsedArgs.flags,format=validateJsonOutput(flags);if(!format.valid)return outputRulesError(client,!1,"INVALID_ARGUMENTS",format.error);if(!flags["--body"])return outputRulesError(client,format.jsonOutput,"MISSING_ARGUMENTS","Missing required option: --body <PATH>.");let body=readRuleBody(client,flags["--body"],format.jsonOutput);if(typeof body=="number")return body;let type=getBodyType(body);if(!type)return outputRulesError(client,format.jsonOutput,"INVALID_RULE_TYPE","Create body must set a supported monitor type.");if(Object.hasOwn(body,"ruleScope")&&(flags["--project"]||flags["--all"]))return outputRulesError(client,format.jsonOutput,"SCOPE_CONFLICT","Specify monitor scope either in the body or with --project/--all, not both.");if(type==="custom"&&flags["--all"])return outputRulesError(client,format.jsonOutput,"INVALID_SCOPE","Custom monitors must target one project. Use --project <name-or-id>.");let scope=await resolveCreateScope(client,flags,format.jsonOutput);if(typeof scope=="number")return scope;let scopeError=applyScopeFlag(client,body,type,scope,flags,format.jsonOutput);if(scopeError!==void 0)return scopeError;output_manager_default.spinner("Creating monitor\u2026");try{let response=await client.fetch(rulesCollectionPath(api,scope.teamId),{method:"POST",body});return trackCreatedId(client,"monitor",response[api.itemKey]?.id),format.jsonOutput?client.stdout.write(`${JSON.stringify(response,null,2)}
8
+ `):printRuleMutationReceipt("Created",response[api.itemKey],client.argv),0}catch(error){if(isAPIError(error))return handleRulesApiError(client,error,format.jsonOutput);throw error}finally{output_manager_default.stopSpinner()}}export{add as default};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{parseTeamRefs,teamRefBody}from"./chunk-LSF7FY6X.js";import{repositoryPermissionsPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-HFVCKK5P.js";import{outputError}from"./chunk-ZJNDLFZ7.js";import"./chunk-D3M2JG5C.js";import{require_async_sema}from"./chunk-NZ2TFADV.js";import"./chunk-M32HBBPK.js";import"./chunk-GD7AV7BO.js";import{permissionsAddSubcommand}from"./chunk-SP6E7PHW.js";import{printError}from"./chunk-VHRQW57O.js";import"./chunk-HVZ5OOOP.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-HOGVBY6Q.js";import"./chunk-OFZUWHZW.js";import"./chunk-2OQD274E.js";import"./chunk-M7FED5YP.js";import"./chunk-4HR3I3ML.js";import"./chunk-LOA7SZWH.js";import"./chunk-MTZYPCZ7.js";import"./chunk-D6REP5QQ.js";import"./chunk-UXRRYYSD.js";import{parseArguments}from"./chunk-NHB43235.js";import"./chunk-2VBFQZ72.js";import"./chunk-6GKP6VUF.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4NTBYNFR.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{packageName}from"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_async_sema=__toESM(require_async_sema(),1);var USAGE="vcr permissions <repository> add <team>[,<team>...]";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsAddSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,USAGE),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],teamRefs=parseTeamRefs(parsedArgs.args.slice(2)),project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),teamRefs.length===0)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing team. Example: ${packageName} vcr permissions ${repository} add team_1a2b3c4d`,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE),when:"Replace <team> with a team id or slug (comma-separate multiple teams)"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${USAGE}\``);let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=repositoryPermissionsPath(scope,repository),added=[],failed=[];output_manager_default.spinner(`Sharing ${repository} with ${teamRefs.length===1?teamRefs[0]:`${teamRefs.length} teams`}...`);let sema=new import_async_sema.default(10),results;try{results=await Promise.all(teamRefs.map(async team=>{await sema.acquire();try{let result=await client.fetch(path,{method:"POST",body:teamRefBody(team)});return{ok:!0,team,permission:result.permission}}catch(err){if(!isAPIError(err))throw err;let message=err.serverMessage||`API error (${err.status}).`;return{ok:!1,team,failure:{team,code:err.code||"API_ERROR",message}}}finally{sema.release()}}))}finally{output_manager_default.stopSpinner()}for(let result of results)result.ok?(added.push(result.permission),fr.jsonOutput||output_manager_default.success(`Shared ${repository} with ${result.permission?.teamSlug??result.team}`)):(failed.push(result.failure),fr.jsonOutput||output_manager_default.error(`Failed to share ${repository} with ${result.team}: ${result.failure.message}`));return failed.length>0&&outputAgentError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:`Failed to share ${repository} with ${failed.map(f=>`${f.team} (${f.message})`).join(", ")}`},1),fr.jsonOutput&&client.stdout.write(`${JSON.stringify({permissions:added,failed},null,2)}
8
+ `),failed.length>0?1:0}export{add as default};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{emitVcrArgParseError,handleVcrApiError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-HFVCKK5P.js";import{outputError}from"./chunk-ZJNDLFZ7.js";import"./chunk-D3M2JG5C.js";import"./chunk-M32HBBPK.js";import"./chunk-GD7AV7BO.js";import{trackCreatedId}from"./chunk-YJNMDXEG.js";import{addSubcommand}from"./chunk-JVGENO2R.js";import"./chunk-SP6E7PHW.js";import"./chunk-OFOZ5DBA.js";import"./chunk-6Q2XEYCJ.js";import{printError}from"./chunk-VHRQW57O.js";import"./chunk-HVZ5OOOP.js";import"./chunk-KDCODXVL.js";import"./chunk-NWGBDBZI.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-HOGVBY6Q.js";import"./chunk-OFZUWHZW.js";import"./chunk-2OQD274E.js";import"./chunk-M7FED5YP.js";import"./chunk-4HR3I3ML.js";import"./chunk-LOA7SZWH.js";import"./chunk-MTZYPCZ7.js";import"./chunk-D6REP5QQ.js";import"./chunk-UXRRYYSD.js";import{parseArguments}from"./chunk-NHB43235.js";import"./chunk-2VBFQZ72.js";import"./chunk-6GKP6VUF.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4NTBYNFR.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{packageName}from"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import"./chunk-24SIHFEW.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import"./chunk-BZENIQ7N.js";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(addSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr create <name> --project <name-or-id>"),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let name=parsedArgs.args[0],project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),!name)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing repository name. Example: ${packageName} vcr create <name>`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr create <name>"),when:"Replace <name> with the repository name to create"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS","Usage: `vercel vcr create <name>`");let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=`/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;output_manager_default.spinner("Creating repository...");try{let created=await client.fetch(path,{method:"POST",body:{projectId:scope.projectId,name}});return trackCreatedId(client,"vcr-repository",created.repository?.id),fr.jsonOutput?client.stdout.write(`${JSON.stringify(created,null,2)}
8
+ `):output_manager_default.success(`Created repository ${created.repository?.name??name}`),0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput,{retry:{command:buildCommandWithGlobalFlags(client.argv,"vcr ls"),when:"List existing repositories (a name conflict means it already exists)"}});throw err}finally{output_manager_default.stopSpinner()}}export{add as default};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{loadScopeNames,printBudgetAlertsTable,scopeNameOf}from"./chunk-YEQ7BBOS.js";import{organizationTarget,parseBudgetFilterOptions,rejectUnexpectedArgs,resolveBudgetFilter,resolveBudgetOwner,trackScopeOptions,typeFilter}from"./chunk-O47OWLP7.js";import{handleValidationError,outputError,validateOptionalIntegerRange,validateTimeBound,validateTimeOrder}from"./chunk-ZJNDLFZ7.js";import"./chunk-2W4ND5DH.js";import"./chunk-6VUD3LZP.js";import"./chunk-D3M2JG5C.js";import"./chunk-2AMO2VMV.js";import{budgetAlertJson,listBudgetAlerts,ownerJson}from"./chunk-W45KFKUW.js";import{INVALID_NEXT_MESSAGE}from"./chunk-C6GY2G73.js";import{getSubcommand}from"./chunk-ETV3C2CV.js";import"./chunk-CJZE7647.js";import{MAX_LIST_LIMIT,getNextPageCommand,printNextPageCommand}from"./chunk-MSJA64LL.js";import{getCommandAliases}from"./chunk-MZ7ITRVR.js";import"./chunk-2V6UURUN.js";import"./chunk-OKKG2FUS.js";import"./chunk-5L566FZB.js";import"./chunk-6737KAJP.js";import"./chunk-O3DAPRJ3.js";import"./chunk-UZQJQXGJ.js";import{alertsListSubcommand,alertsSubcommand,isBudgetScope}from"./chunk-YE245S4O.js";import"./chunk-SNGM6NSO.js";import"./chunk-JVGENO2R.js";import"./chunk-SP6E7PHW.js";import"./chunk-OFOZ5DBA.js";import"./chunk-6Q2XEYCJ.js";import"./chunk-SEHERY6U.js";import"./chunk-2LOA3LC6.js";import"./chunk-E7CEQ2PO.js";import"./chunk-W25UARQV.js";import"./chunk-Z5FNUSWW.js";import"./chunk-ABSFPYM4.js";import"./chunk-YANOBY2G.js";import"./chunk-F7L5SXJM.js";import"./chunk-QFCYM4RS.js";import"./chunk-GUSOYIW6.js";import"./chunk-JALVF3C2.js";import"./chunk-26EJ4FM6.js";import"./chunk-SQ76HIB6.js";import"./chunk-HR66URIC.js";import{printError}from"./chunk-VHRQW57O.js";import"./chunk-6C5KUHQP.js";import"./chunk-GLIQ4KNY.js";import{TelemetryClient}from"./chunk-KDCODXVL.js";import"./chunk-NWGBDBZI.js";import{AGENT_REASON}from"./chunk-HOGVBY6Q.js";import"./chunk-OFZUWHZW.js";import{require_pluralize}from"./chunk-4HR3I3ML.js";import"./chunk-LOA7SZWH.js";import{parseArguments,takeCommand}from"./chunk-NHB43235.js";import"./chunk-2VBFQZ72.js";import{validateJsonOutput}from"./chunk-6GKP6VUF.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4NTBYNFR.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import"./chunk-BLUPZPAS.js";import"./chunk-5MDNVAE6.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import"./chunk-24SIHFEW.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_pluralize=__toESM(require_pluralize(),1);function encodeBudgetAlertsCursor(value){return Buffer.from(JSON.stringify({c:value.cursor,t:value.teamId,o:value.owner==="organization"?value.owner:void 0,s:value.since,u:value.until,sc:value.selector?.scope,si:value.selector&&"scopeId"in value.selector?value.selector.scopeId:void 0})).toString("base64url")}function decodeBudgetAlertsCursor(value){if(value===void 0)return{valid:!0,value:void 0};let invalid={valid:!1,code:"INVALID_NEXT",message:INVALID_NEXT_MESSAGE},raw;try{raw=JSON.parse(Buffer.from(value,"base64url").toString("utf8"))}catch{return invalid}if(typeof raw!="object"||raw===null)return invalid;let{c,t,o,s,u,sc,si}=raw;if(typeof c!="string"||typeof t!="string"||!(o===void 0||o==="organization"&&sc==="organization"&&si===void 0)||!isOptionalMs(s)||!isOptionalMs(u)||!(sc===void 0||isBudgetScope(sc)||isScopeList(sc))||!(si===void 0||typeof si=="string"&&isBudgetScope(sc)))return invalid;let selector;return isScopeList(sc)?selector={scope:sc}:isBudgetScope(sc)&&(selector=si===void 0?{scope:sc}:{scope:sc,scopeId:si}),o==="organization"?{valid:!0,value:{cursor:c,teamId:t,owner:o,since:s,until:u,selector:{scope:"organization",orgId:t}}}:{valid:!0,value:{cursor:c,teamId:t,since:s,until:u,selector}}}function isScopeList(value){return Array.isArray(value)&&value.length>0&&value.every(isBudgetScope)}function isOptionalMs(value){return value===void 0||Number.isFinite(value)}var BudgetAlertsTelemetryClient=class extends TelemetryClient{trackCliOptionOrganization(organization){organization&&this.trackCliOption({option:"organization",value:this.redactedValue})}trackCliOptionProject(project){project&&this.trackCliOption({option:"project",value:this.redactedValue})}trackCliOptionType(types){types?.length&&this.trackCliOption({option:"type",value:types.join(",")})}trackCliOptionProduct(product){product&&this.trackCliOption({option:"product",value:this.redactedValue})}trackCliSubcommandList(actual){this.trackCliSubcommand({subcommand:"list",value:actual})}trackCliOptionSince(since){since&&this.trackCliOption({option:"since",value:this.redactedValue})}trackCliOptionUntil(until){until&&this.trackCliOption({option:"until",value:this.redactedValue})}trackCliOptionLimit(limit){limit!==void 0&&this.trackCliOption({option:"limit",value:String(limit)})}trackCliOptionNext(next){next&&this.trackCliOption({option:"next",value:this.redactedValue})}trackCliOptionFormat(format){format&&this.trackCliOption({option:"format",value:format})}trackCliFlagJson(json){json&&this.trackCliFlag("json")}};async function alerts(client,argv){let telemetry=new BudgetAlertsTelemetryClient({opts:{store:client.telemetryEventStore}}),action,parsedArgs,flagsSpecification=getFlagsSpecification(alertsSubcommand.options);try{let selected=takeCommand(argv,flagsSpecification);action=getSubcommand(selected.command?[selected.command]:[],{list:getCommandAliases(alertsListSubcommand)}),parsedArgs=parseArguments(action.subcommand?selected.args:argv,flagsSpecification)}catch(error){return printError(error),2}let{flags:opts,args}=parsedArgs;action.subcommand==="list"&&telemetry.trackCliSubcommandList(action.subcommandOriginal);let formatResult=validateJsonOutput(opts);if(!formatResult.valid)return output_manager_default.error(formatResult.error),2;let asJson=formatResult.jsonOutput;if(rejectUnexpectedArgs(args,"billing budgets alerts"))return 2;let scopeArgs=parseBudgetFilterOptions(opts);if("error"in scopeArgs)return outputError(client,asJson,"INVALID_ARGUMENTS",scopeArgs.error);trackScopeOptions(telemetry,opts),telemetry.trackCliOptionType(opts["--type"]),telemetry.trackCliOptionSince(opts["--since"]),telemetry.trackCliOptionUntil(opts["--until"]),telemetry.trackCliOptionLimit(opts["--limit"]),telemetry.trackCliOptionNext(opts["--next"]),telemetry.trackCliOptionFormat(opts["--format"]?"json":void 0),telemetry.trackCliFlagJson(opts["--json"]);let nextResult=decodeBudgetAlertsCursor(opts["--next"]);if(!nextResult.valid)return handleValidationError(nextResult,asJson,client);let cursor=nextResult.value,{types}=scopeArgs.value;if(cursor&&types&&!sameSelector(cursor.selector,{scope:types}))return outputError(client,asJson,"INVALID_NEXT",OTHER_FILTER_CURSOR);let warnings=[],limit=opts["--limit"];if(typeof limit=="number"&&Number.isInteger(limit)&&limit>MAX_LIST_LIMIT){let message=`--limit ${limit} is above the maximum of ${MAX_LIST_LIMIT}. Using ${MAX_LIST_LIMIT}.`;warnings.push({reason:AGENT_REASON.LIMIT_CLAMPED,message}),asJson||output_manager_default.warning(message),limit=MAX_LIST_LIMIT}let limitResult=validateOptionalIntegerRange(limit,{flag:"--limit",min:1,max:MAX_LIST_LIMIT});if(!limitResult.valid)return handleValidationError(limitResult,asJson,client);let sinceResult=validateTimeBound(opts["--since"]);if(!sinceResult.valid)return handleValidationError(sinceResult,asJson,client);let untilResult=validateTimeBound(opts["--until"]);if(!untilResult.valid)return handleValidationError(untilResult,asJson,client);let order=validateTimeOrder(sinceResult.value,untilResult.value);if(!order.valid)return handleValidationError(order,asJson,client);let resolvedOwner=await resolveBudgetOwner(client,scopeArgs.value.input??(cursor?.owner==="organization"?{scope:"organization",value:cursor.teamId}:null));if(!resolvedOwner)return 2;if("error"in resolvedOwner)return outputError(client,asJson,resolvedOwner.usage?"INVALID_ARGUMENTS":"API_ERROR",resolvedOwner.error);let owner=resolvedOwner.value;if(cursor&&cursor.teamId!==owner.id)return outputError(client,asJson,"INVALID_NEXT",`This --next cursor is from another team or organization, not ${owner.slug}. Use the --scope or --organization it was printed with.`);let since=cursor?cursor.since:sinceResult.value?.getTime(),until=cursor?cursor.until:untilResult.value?.getTime();output_manager_default.spinner("Fetching budget alerts\u2026");let resolved=cursor&&!scopeArgs.value.input&&!scopeArgs.value.types?{value:cursorFilter(owner,cursor.selector)}:await resolveBudgetFilter(client,owner,scopeArgs.value);if("error"in resolved)return output_manager_default.stopSpinner(),outputError(client,asJson,resolved.usage?"INVALID_ARGUMENTS":"API_ERROR",resolved.error);let filter=resolved.value;if(cursor&&!sameSelector(cursor.selector,filter.selector))return output_manager_default.stopSpinner(),outputError(client,asJson,"INVALID_NEXT",OTHER_FILTER_CURSOR);let page;try{page=await listBudgetAlerts(client,filter.selector,{since,until,limit:limitResult.value,next:cursor?.cursor})}catch(err){if(output_manager_default.stopSpinner(),isAPIError(err))return err.code==="invalid_cursor"?outputError(client,asJson,"INVALID_NEXT",INVALID_NEXT_MESSAGE):outputError(client,asJson,err.code||"API_ERROR",err.message);throw err}let names=await loadScopeNames(client,owner,page.data);output_manager_default.stopSpinner();let next=page.next?encodeBudgetAlertsCursor({cursor:page.next,teamId:owner.id,owner:owner.type,since,until,selector:filter.selector}):null;if(asJson)return client.stdout.write(`${JSON.stringify({...ownerJson(owner),...filter.selector?{filter:filter.json}:{},alerts:page.data.map(alert=>budgetAlertJson(alert,scopeNameOf(names,alert))),pagination:{next},...warnings.length>0?{warnings}:{}},null,2)}
8
+ `),0;let{where}=filter;return page.data.length===0?(output_manager_default.log(cursor?`No more budget alerts ${where}.`:`No budget alerts found ${where}.`),0):(output_manager_default.log(`${(0,import_pluralize.default)("budget alert",page.data.length,!0)} ${where}`),client.stdout.write(printBudgetAlertsTable(page.data,names)),next&&printNextPageCommand(getNextPageCommand(client.argv,next,WINDOW_FLAGS)),0)}function cursorFilter(owner,selector){if(owner.type==="organization")return organizationTarget(owner);if(!selector)return typeFilter(owner,null);if(Array.isArray(selector.scope))return typeFilter(owner,selector.scope);let{scope}=selector,scopeId="scopeId"in selector?selector.scopeId:void 0;return{selector,args:"",where:scopeId?`on ${scope} ${scopeId}`:`on ${scope}`,json:{scope,scopeId:scopeId??null,name:null}}}var OTHER_FILTER_CURSOR="This --next cursor is from a list with a different --type, --organization, --project, or --product. Use the options it was printed with.";function sameSelector(a,b){return queryKey(a)===queryKey(b)}function queryKey(query){return query?Array.isArray(query.scope)?query.scope.join(","):"scopeId"in query&&query.scopeId?`${query.scope}:${query.scopeId}`:query.scope:""}var WINDOW_FLAGS=["--since","-s","--until","-u"];export{alerts as default};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{DEFAULT_TAG,buildRepositoryReference,parseNameArg,validateImageParts}from"./chunk-HEGJZJO7.js";import{VCR_ENGINES,emitVcrArgParseError,isBuildxAvailable,isEngineInstalled,pushCompressionArgs,reportEngineCommandFailure,reportEnginePushFailure,resolveRegistry,resolveVcrScope,runEngine,splitPassthrough,validateVcrChoice}from"./chunk-HFVCKK5P.js";import{outputError}from"./chunk-ZJNDLFZ7.js";import"./chunk-D3M2JG5C.js";import"./chunk-M32HBBPK.js";import"./chunk-GD7AV7BO.js";import{buildSubcommand}from"./chunk-JVGENO2R.js";import"./chunk-SP6E7PHW.js";import"./chunk-OFOZ5DBA.js";import"./chunk-6Q2XEYCJ.js";import{printError}from"./chunk-VHRQW57O.js";import"./chunk-HVZ5OOOP.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-HOGVBY6Q.js";import"./chunk-OFZUWHZW.js";import"./chunk-2OQD274E.js";import"./chunk-M7FED5YP.js";import"./chunk-4HR3I3ML.js";import"./chunk-LOA7SZWH.js";import"./chunk-MTZYPCZ7.js";import"./chunk-D6REP5QQ.js";import"./chunk-UXRRYYSD.js";import{parseArguments}from"./chunk-NHB43235.js";import"./chunk-2VBFQZ72.js";import"./chunk-6GKP6VUF.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4NTBYNFR.js";import"./chunk-4SAVH3H7.js";import"./chunk-GOI2VVI7.js";import"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import"./chunk-BZENIQ7N.js";var DEFAULT_PLATFORM="linux/amd64";async function build(client,telemetry){let{own,passthrough}=splitPassthrough(client.argv),parsedArgs;try{parsedArgs=parseArguments(own,getFlagsSpecification(buildSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr build <engine> [path] [name[:tag]]"),printError(err),2}let[engineArg,pathArg,nameArg]=parsedArgs.args.slice(2),project=parsedArgs.flags["--project"],platform=parsedArgs.flags["--platform"],push=!!parsedArgs.flags["--push"];if(telemetry.trackCliArgumentEngine(engineArg),telemetry.trackCliArgumentPath(pathArg),telemetry.trackCliArgumentName(nameArg),telemetry.trackCliOptionProject(project),telemetry.trackCliOptionPlatform(platform),telemetry.trackCliFlagPush(push),!engineArg){let message=`Missing engine. Choose one of: ${VCR_ENGINES.join(", ")}.`;return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr build docker"),when:"Replace docker with the container tool you use"}]},2),outputError(client,!1,"MISSING_ARGUMENTS",message)}let choiceError=validateVcrChoice(client,"engine",engineArg,VCR_ENGINES,!1);if(typeof choiceError=="number")return choiceError;let engine=engineArg;if(!isEngineInstalled(engine)){let message=`\`${engine}\` is not installed or not on your PATH. Install it and try again.`;return outputAgentError(client,{status:"error",reason:"engine_not_found",message},1),outputError(client,!1,"ENGINE_NOT_FOUND",message)}let scope=await resolveVcrScope(client,{project,jsonOutput:!1});if(typeof scope=="number")return scope;let parsed=parseNameArg(nameArg,scope.projectName);if("error"in parsed)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:parsed.error},2),outputError(client,!1,"INVALID_ARGUMENTS",parsed.error);let validationError=validateImageParts(parsed);if(validationError)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:validationError},2),outputError(client,!1,"INVALID_ARGUMENTS",validationError);let ref=`${buildRepositoryReference({registry:resolveRegistry(),teamSlug:scope.teamSlug,projectName:scope.projectName,repository:parsed.repository})}:${parsed.tag??DEFAULT_TAG}`,contextPath=pathArg??".",buildPlatform=platform??DEFAULT_PLATFORM;if(push&&engine==="docker"&&await isBuildxAvailable()){let outputSpec=`type=image,name=${ref},push=true,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true`,engineArgs2=["buildx","build","--platform",buildPlatform,"--output",outputSpec,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs2.join(" ")}`);let result2=await runEngine(engine,engineArgs2,{cwd:client.cwd,captureStderr:!0});return result2.exitCode!==0?reportEnginePushFailure(client,engine,"buildx build",result2):(output_manager_default.success(`Built and pushed ${ref} (zstd compression)`),0)}push&&engine==="docker"&&output_manager_default.warn("Docker Buildx is not available; building and pushing without zstd compression. Install Buildx for smaller, faster image pushes.");let engineArgs=["build","--platform",buildPlatform,"--tag",ref,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs.join(" ")}`);let result=await runEngine(engine,engineArgs,{cwd:client.cwd});if(result.exitCode!==0)return reportEngineCommandFailure(client,engine,"build",result);if(!push)return output_manager_default.success(`Built ${ref}`),output_manager_default.log(`Push it with \`${buildCommandWithGlobalFlags(client.argv,`vcr push ${engine}${nameArg?` ${nameArg}`:""}`)}\`.`),0;let pushArgs=["push",...pushCompressionArgs(engine),ref];output_manager_default.log(`Running: ${engine} ${pushArgs.join(" ")}`);let pushResult=await runEngine(engine,pushArgs,{cwd:client.cwd,captureStderr:!0});if(pushResult.exitCode!==0)return reportEnginePushFailure(client,engine,"push",pushResult);let compressed=engine!=="docker";return output_manager_default.success(`Built and pushed ${ref}${compressed?" (zstd compression)":""}`),0}export{build as default};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{warnDeprecatedInput}from"./chunk-6GKP6VUF.js";import{packageName,require_lib}from"./chunk-B4KA3ZH2.js";import{require_dist}from"./chunk-24SIHFEW.js";import{confirmNameOption,deploymentOption,environmentOption,forceOption,formatOption,gitBranchOption,jsonOption,projectOption,yesOption}from"./chunk-EZVNGJN5.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_constants=__toESM(require_dist(),1),import_title=__toESM(require_lib(),1);var envTargetChoices=import_constants.PROJECT_ENV_TARGET.map(t=>({name:(0,import_title.default)(t),value:t}));function isValidEnvTarget(target){return typeof target>"u"||envTargetChoices.map(c=>c.value).includes(target)}function getEnvTargetPlaceholder(){return`<${envTargetChoices.map(c=>c.value).join(" | ")}>`}function parseEnvTargetArg(arg){return Array.from(new Set(arg.split(",").map(t=>t.trim()).filter(Boolean)))}function resolveEnvTargetInput(client,input){let environment=Array.isArray(input.environment)?input.environment.join(","):input.environment;return input.legacyEnvironment!==void 0&&environment!==void 0?{error:"Can't use an environment argument with --environment. Use --environment, and --git-branch for a Git branch."}:input.legacyGitBranch!==void 0&&input.gitBranch!==void 0?{error:"Can't use a Git branch argument with --git-branch. Use --git-branch."}:(input.legacyEnvironment!==void 0&&warnDeprecatedInput(client,"The environment argument","--environment"),input.legacyGitBranch!==void 0&&warnDeprecatedInput(client,"The Git branch argument","--git-branch"),{environment:environment??input.legacyEnvironment,gitBranch:input.gitBranch??input.legacyGitBranch})}var targetPlaceholder=getEnvTargetPlaceholder(),listSubcommand={name:"list",aliases:["ls"],description:"List all Environment Variables for a Project",arguments:[],options:[{...environmentOption,description:"List only the variables for this environment"},{...gitBranchOption,description:"List only the variables for this Git branch"},{...formatOption,description:"Specify the output format (json, including readable Environment Variable values)"},{...jsonOption,description:"Output as JSON, including readable Environment Variable values"},projectOption,{name:"guidance",description:"Receive command suggestions once command is complete",shorthand:null,type:Boolean,deprecated:!1}],examples:[]},addSubcommand={name:"add",aliases:[],description:"Add an Environment Variable",arguments:[{name:"name",required:!0}],options:[projectOption,{...environmentOption,type:[String],description:"Environments to add the variable to; repeatable or comma-separated. Prompts when omitted"},{...gitBranchOption,description:"Set the Git branch for a Preview Environment Variable"},{name:"sensitive",description:"Store the value as a Secret",shorthand:null,type:Boolean,deprecated:!1},{name:"no-sensitive",description:"Store the value as Config",shorthand:null,type:Boolean,deprecated:!1},{name:"type",description:"Set the Environment Variable type (`config` or `secret`)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"visibility",description:"Deprecated alias for `--type`",shorthand:null,type:String,argument:"VISIBILITY",deprecated:!0},{...forceOption,description:"Overwrite an existing variable in the same environment",shorthand:null},{...yesOption,description:"Accept default choices when adding an Environment Variable"},{name:"guidance",description:"Show command suggestions after completion",shorthand:null,type:Boolean,deprecated:!1},{name:"value",description:"Set the variable value for non-interactive use; otherwise use stdin or the prompt",shorthand:null,type:String,argument:"VALUE",deprecated:!1},jsonOption],examples:[{name:"Add a new variable (prompts for value and Environments)",placeholders:["<name>"],value:`${packageName} env add <name>`},{name:"Add a new Environment Variable to a specific Environment",placeholders:["<name>",targetPlaceholder],value:`${packageName} env add <name> --environment ${targetPlaceholder}`},{name:"Add one variable to multiple Environments (comma-separated)",placeholders:["<name>","<environment>"],value:`${packageName} env add <name> --environment <environment>[,<environment>]`},{name:"Override an existing Environment Variable in the same environment (production, preview, development)",value:`${packageName} env add API_TOKEN --force`},{name:"Add a Config Environment Variable that remains readable later",value:`${packageName} env add API_TOKEN --no-sensitive`},{name:"Add a new Environment Variable for a specific Environment and Git Branch",placeholders:["<name>","<BRANCH>",targetPlaceholder],value:`${packageName} env add <name> --environment ${targetPlaceholder} --git-branch <BRANCH>`},{name:"Add a variable from piped input",placeholders:["<file>","<name>",targetPlaceholder],value:`cat <file> | ${packageName} env add <name> --environment ${targetPlaceholder}`},{name:"Add a variable from a file",placeholders:["<file>","<name>",targetPlaceholder],value:`${packageName} env add <name> --environment ${targetPlaceholder} < <file>`},{name:"Add with --value for non-interactive use",placeholders:["<value>"],value:`${packageName} env add API_TOKEN --environment production --value "<value>" --yes`}]},removeSubcommand={name:"remove",aliases:["rm"],description:"Remove an Environment Variable (see examples below)",arguments:[{name:"name",required:!0}],options:[projectOption,{...environmentOption,description:"Remove the variable from this environment only. Without it, the variable is removed from all of its environments"},{...gitBranchOption,description:"Remove the variable for this Git branch only"},{...confirmNameOption,description:"Approve the removal by naming the variable"},{...yesOption,description:"Deprecated: use --confirm-name. Agents can't approve with --yes"},jsonOption],examples:[{name:"Remove a variable from multiple Environments",placeholders:["<name>"],value:`${packageName} env remove <name>`},{name:"Remove a variable from a specific Environment",placeholders:["<name>",targetPlaceholder],value:`${packageName} env remove <name> --environment ${targetPlaceholder}`},{name:"Remove a variable from a specific Environment and Git Branch",placeholders:["<name>","<BRANCH>",targetPlaceholder],value:`${packageName} env remove <name> --environment ${targetPlaceholder} --git-branch <BRANCH>`},{name:"Remove a variable without a prompt, once a person approves",placeholders:["<name>",targetPlaceholder],value:`${packageName} env remove <name> --environment ${targetPlaceholder} --confirm-name <name>`}],consequence:"destructive"},pullSubcommand={name:"pull",aliases:[],description:"Pull Environment Variables into a local file (default: .env.local)",arguments:[{name:"filename",required:!1}],options:[projectOption,{name:"environment",description:"Select the environment to pull (default: development)",shorthand:"e",type:String,argument:"ENVIRONMENT",deprecated:!1},{...gitBranchOption,description:"Specify the Git branch to pull specific Environment Variables for"},{...deploymentOption,description:"Pull Environment Variables for a specific deployment (e.g. dpl_xxx)"},{name:"id",shorthand:null,type:String,deprecated:!0},{...yesOption,description:"Skip the confirmation prompt when overwriting an existing file"}],examples:[{name:"Pull Development Environment Variables into a custom file (check .gitignore)",placeholders:["<file>"],value:`${packageName} env pull <file>`},{name:"Pull Environment Variables for a specific deployment",value:`${packageName} env pull --deployment dpl_xxx`}]},runSubcommand={name:"run",aliases:[],description:"Run a command with environment variables from the linked Vercel project",arguments:[{name:"command",required:!0,multiple:!0}],options:[projectOption,{name:"environment",description:"Specify the environment to pull variables from (default: development)",shorthand:"e",type:String,argument:"ENVIRONMENT",deprecated:!1},{...gitBranchOption,description:"Specify the Git branch to pull specific Environment Variables for"}],examples:[{name:"Run Next.js dev server with development environment variables",value:`${packageName} env run -- next dev`},{name:"Run tests with preview environment variables for a specific branch",value:`${packageName} env run -e preview --git-branch feature-x -- npm test`}]},updateSubcommand={name:"update",aliases:[],description:"Update the value of an existing Environment Variable (see examples below)",arguments:[{name:"name",required:!0}],options:[projectOption,{...environmentOption,description:"Pick the variable to update by an environment it covers. The new value applies to all of its environments"},{...gitBranchOption,description:"Pick the variable to update by its Git branch"},{name:"sensitive",description:"Store the updated value as a Secret",shorthand:null,type:Boolean,deprecated:!1},{name:"type",description:"Set the Environment Variable type (`config` or `secret`)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"visibility",description:"Deprecated alias for `--type`",shorthand:null,type:String,argument:"VISIBILITY",deprecated:!0},{...yesOption,description:"Skip the confirmation prompt when updating an Environment Variable"},{name:"value",description:"New value for the variable (non-interactive). Otherwise use stdin or you will be prompted.",shorthand:null,type:String,argument:"VALUE",deprecated:!1}],examples:[{name:"Update a variable in all Environments",placeholders:["<name>"],value:`${packageName} env update <name>`},{name:"Update the variable that covers a specific Environment",placeholders:["<name>",targetPlaceholder],value:`${packageName} env update <name> --environment ${targetPlaceholder}`},{name:"Update the variable for a specific Environment and Git Branch",placeholders:["<name>","<BRANCH>",targetPlaceholder],value:`${packageName} env update <name> --environment ${targetPlaceholder} --git-branch <BRANCH>`},{name:"Update a variable from piped input",placeholders:["<file>","<name>",targetPlaceholder],value:`cat <file> | ${packageName} env update <name> --environment ${targetPlaceholder}`},{name:"Update a variable from a file",placeholders:["<file>","<name>",targetPlaceholder],value:`${packageName} env update <name> --environment ${targetPlaceholder} < <file>`}]},envCommand={name:"env",aliases:[],description:"Interact with Environment Variables for a Project",arguments:[],subcommands:[addSubcommand,listSubcommand,pullSubcommand,removeSubcommand,runSubcommand,updateSubcommand],options:[],examples:[{name:"Run a command with Environment Variables from the linked Project",placeholders:["<command>"],value:`${packageName} env run -- <command>`},{name:"Add one variable to multiple Environments",value:`${packageName} env add API_URL --environment production,preview,development`}]};export{envTargetChoices,isValidEnvTarget,getEnvTargetPlaceholder,parseEnvTargetArg,resolveEnvTargetInput,listSubcommand,addSubcommand,removeSubcommand,pullSubcommand,runSubcommand,updateSubcommand,envCommand};