@vercel/cli-support 66.6.0 → 67.0.0

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 (399) hide show
  1. package/dist/chunks/add-PULH4LLG.js +8 -0
  2. package/dist/chunks/add-SWKAAP2V.js +8 -0
  3. package/dist/chunks/add-U3ILHW5T.js +8 -0
  4. package/dist/chunks/{alerts-72Q42HNT.js → alerts-GXY7LZWX.js} +1 -1
  5. package/dist/chunks/build-UNR3B22D.js +7 -0
  6. package/dist/chunks/{chunk-ZZD5W5KT.js → chunk-23FY4PR3.js} +1 -1
  7. package/dist/chunks/{chunk-YTRKHRL3.js → chunk-27FVSW45.js} +1 -1
  8. package/dist/chunks/chunk-2BI5SSHB.js +7 -0
  9. package/dist/chunks/{chunk-IIK6GUVI.js → chunk-2BK7SZQA.js} +1 -1
  10. package/dist/chunks/{chunk-WJX5PGNN.js → chunk-2DH6LTUI.js} +1 -1
  11. package/dist/chunks/{chunk-7AVHDJSP.js → chunk-2KXLL3DX.js} +4 -4
  12. package/dist/chunks/{chunk-DZ77BIEV.js → chunk-2OMMOXFL.js} +1 -1
  13. package/dist/chunks/{chunk-6PDKIOAO.js → chunk-2TJQY7PH.js} +1 -1
  14. package/dist/chunks/{chunk-DJZBJC2A.js → chunk-3AFEVHHY.js} +1 -1
  15. package/dist/chunks/{chunk-YOAQNRBN.js → chunk-3C6BMAGB.js} +2 -2
  16. package/dist/chunks/{chunk-Q66LJNIV.js → chunk-3RFQ2NXZ.js} +1 -1
  17. package/dist/chunks/{chunk-F4UEGELU.js → chunk-3VNS4D7V.js} +1 -1
  18. package/dist/chunks/{chunk-QZJOKECY.js → chunk-4GYDXPNC.js} +2 -2
  19. package/dist/chunks/{chunk-H2KNSYPR.js → chunk-55FPQ5MM.js} +1 -1
  20. package/dist/chunks/{chunk-RBW62SOU.js → chunk-55WV4RRW.js} +1 -1
  21. package/dist/chunks/{chunk-5KSBRQI2.js → chunk-5727HGA6.js} +1 -1
  22. package/dist/chunks/{chunk-D2TVI7KK.js → chunk-5CFLIIMP.js} +4 -4
  23. package/dist/chunks/chunk-5DHOC47O.js +13 -0
  24. package/dist/chunks/{chunk-CSCUVSJM.js → chunk-5GKIRBHJ.js} +1 -1
  25. package/dist/chunks/{chunk-YLLFLPNA.js → chunk-5QMXW5KS.js} +1 -1
  26. package/dist/chunks/{chunk-UUBPAYTG.js → chunk-5RMIM4S2.js} +1 -1
  27. package/dist/chunks/{chunk-NLK7NGVP.js → chunk-5ZL2RRO3.js} +1 -1
  28. package/dist/chunks/chunk-67GZ5REA.js +7 -0
  29. package/dist/chunks/chunk-6D44CCJA.js +23 -0
  30. package/dist/chunks/{chunk-VHSAI6FS.js → chunk-6FEMU5YF.js} +1 -1
  31. package/dist/chunks/{chunk-UDZJCD5W.js → chunk-6KNWKZR4.js} +1 -1
  32. package/dist/chunks/{chunk-ZKNEIE44.js → chunk-6NC2JFUQ.js} +1 -1
  33. package/dist/chunks/{chunk-SYVWRGFQ.js → chunk-6UWBCYEW.js} +1 -1
  34. package/dist/chunks/{chunk-X7KKWUPS.js → chunk-6WBEU34Y.js} +1 -1
  35. package/dist/chunks/{chunk-NBTFAXL4.js → chunk-6Z5REGCM.js} +1 -1
  36. package/dist/chunks/chunk-742MHFPK.js +31 -0
  37. package/dist/chunks/chunk-7HQZRU25.js +10 -0
  38. package/dist/chunks/{chunk-QZKRVE44.js → chunk-7J7SOUFS.js} +1 -1
  39. package/dist/chunks/{chunk-XECELSF5.js → chunk-7JU5RJ3H.js} +1 -1
  40. package/dist/chunks/{chunk-UQZZX2J7.js → chunk-7OZ7OKPS.js} +1 -1
  41. package/dist/chunks/{chunk-PFOOPXTN.js → chunk-7RABG6HV.js} +2 -2
  42. package/dist/chunks/{chunk-OISNKAC6.js → chunk-7W4GWVUP.js} +2 -2
  43. package/dist/chunks/{chunk-AMH5MXDW.js → chunk-7WDSOKOY.js} +1 -1
  44. package/dist/chunks/{chunk-ELM2KPYX.js → chunk-A4LOQ3UK.js} +1 -1
  45. package/dist/chunks/{chunk-SYJXONEV.js → chunk-A6CMQOL7.js} +1 -1
  46. package/dist/chunks/{chunk-6GE4V7MW.js → chunk-ANT2GN7F.js} +2 -2
  47. package/dist/chunks/{chunk-YEUIG3JC.js → chunk-AZVSMIPP.js} +1 -1
  48. package/dist/chunks/{chunk-Y77DXGGN.js → chunk-B6YVE4WJ.js} +1 -1
  49. package/dist/chunks/chunk-B7IB5CTS.js +7 -0
  50. package/dist/chunks/{chunk-XLYO5QNG.js → chunk-B7IUFV5P.js} +2 -2
  51. package/dist/chunks/{chunk-YIOMTAUF.js → chunk-BKFRN6C2.js} +1 -1
  52. package/dist/chunks/chunk-BS32OUOC.js +7 -0
  53. package/dist/chunks/{chunk-YJNMDXEG.js → chunk-BUBVZ6SQ.js} +1 -1
  54. package/dist/chunks/{chunk-VZ4URN3U.js → chunk-BYBELFCP.js} +1 -1
  55. package/dist/chunks/{chunk-B7GCRM5I.js → chunk-BYYNR34Q.js} +1 -1
  56. package/dist/chunks/{chunk-FOFX7LHS.js → chunk-C3KNFAVK.js} +1 -1
  57. package/dist/chunks/{chunk-OE26EQSH.js → chunk-C7TNFTTK.js} +1 -1
  58. package/dist/chunks/{chunk-5TMHRECT.js → chunk-CAJ2OUSR.js} +1 -1
  59. package/dist/chunks/chunk-CDJ25IKC.js +7 -0
  60. package/dist/chunks/chunk-CO5LKOMH.js +7 -0
  61. package/dist/chunks/{chunk-REJLEESP.js → chunk-CTMTO2W4.js} +1 -1
  62. package/dist/chunks/{chunk-K3MGQQEP.js → chunk-D5JQZXL7.js} +1 -1
  63. package/dist/chunks/{chunk-LM3YPF3K.js → chunk-DOOBZO4W.js} +1 -1
  64. package/dist/chunks/chunk-DORCX7UB.js +7 -0
  65. package/dist/chunks/{chunk-XDYVJWGX.js → chunk-E5A7E7X6.js} +1 -1
  66. package/dist/chunks/{chunk-GLCSWIB4.js → chunk-E7IN2DGU.js} +1 -1
  67. package/dist/chunks/{chunk-N6JHFCWC.js → chunk-EM4OX47A.js} +1 -1
  68. package/dist/chunks/{chunk-VPSR2O55.js → chunk-EOUT7E7U.js} +3 -3
  69. package/dist/chunks/chunk-EYRBV6RM.js +25 -0
  70. package/dist/chunks/{chunk-AKOYIH3A.js → chunk-F4KY2TOK.js} +1 -1
  71. package/dist/chunks/{chunk-TSNRTRIM.js → chunk-FB37TFVF.js} +1 -1
  72. package/dist/chunks/chunk-FFHV7BRT.js +7 -0
  73. package/dist/chunks/{chunk-ACN6DBTC.js → chunk-FHUDTYY7.js} +1 -1
  74. package/dist/chunks/{chunk-T7GKQYWA.js → chunk-FXLZM6Q7.js} +1 -1
  75. package/dist/chunks/{chunk-RVIJRFVD.js → chunk-G24EKATW.js} +1 -1
  76. package/dist/chunks/{chunk-3A3GU62R.js → chunk-G2CDEA2E.js} +1 -1
  77. package/dist/chunks/chunk-GQXKF3PR.js +7 -0
  78. package/dist/chunks/{chunk-KSGN5OCV.js → chunk-GT3JH2FU.js} +1 -1
  79. package/dist/chunks/{chunk-FFN3EGSF.js → chunk-GWYQXFBP.js} +1 -1
  80. package/dist/chunks/{chunk-BCAI7MED.js → chunk-H75TYZ4K.js} +1 -1
  81. package/dist/chunks/{chunk-W2L24GM7.js → chunk-HT445TYO.js} +1 -1
  82. package/dist/chunks/{chunk-DOMBKOLJ.js → chunk-HZRU7VS6.js} +1 -1
  83. package/dist/chunks/{chunk-TOTTVS5P.js → chunk-ID663OJ7.js} +1 -1
  84. package/dist/chunks/{chunk-ZA5O22ZY.js → chunk-IGJBSAFY.js} +1 -1
  85. package/dist/chunks/{chunk-CINNNQDJ.js → chunk-INIZJZ3O.js} +1 -1
  86. package/dist/chunks/chunk-IPORRCTF.js +12 -0
  87. package/dist/chunks/{chunk-LNZEYUEC.js → chunk-IVZNPSHU.js} +1 -1
  88. package/dist/chunks/{chunk-6CJFPT4F.js → chunk-JDDPCL3K.js} +1 -1
  89. package/dist/chunks/{chunk-R33HJGYA.js → chunk-JYGOOFIW.js} +1 -1
  90. package/dist/chunks/{chunk-FEJD7MRH.js → chunk-KA2KG3SY.js} +1 -1
  91. package/dist/chunks/{chunk-JBYROCAC.js → chunk-KC5BRLPR.js} +1 -1
  92. package/dist/chunks/{table-W6LOHWWF.js → chunk-KG526MHL.js} +1 -1
  93. package/dist/chunks/{chunk-QGHAD5A5.js → chunk-KHDRQS6I.js} +1 -1
  94. package/dist/chunks/{chunk-L5PIUIUM.js → chunk-KJUFWRZP.js} +1 -1
  95. package/dist/chunks/chunk-L3DJOYTO.js +11 -0
  96. package/dist/chunks/{chunk-54FY6GJ5.js → chunk-L46V6VL3.js} +1 -1
  97. package/dist/chunks/{chunk-ANIA2G6F.js → chunk-LDDXXDN5.js} +1 -1
  98. package/dist/chunks/{chunk-2AU6O6Z5.js → chunk-LIQLOS7B.js} +1 -1
  99. package/dist/chunks/chunk-LYQECLRR.js +10 -0
  100. package/dist/chunks/{chunk-M7FED5YP.js → chunk-M2Q2DUHO.js} +1 -1
  101. package/dist/chunks/{chunk-5ZCSFPWG.js → chunk-MDRI27KN.js} +1 -1
  102. package/dist/chunks/{chunk-GUGP6OY2.js → chunk-ME52HBX7.js} +1 -1
  103. package/dist/chunks/{chunk-XAGG5BJT.js → chunk-MFOBJA6M.js} +1 -1
  104. package/dist/chunks/{chunk-GHNHUSVK.js → chunk-MMMJO2M3.js} +1 -1
  105. package/dist/chunks/chunk-MNDFF42B.js +30 -0
  106. package/dist/chunks/{chunk-AFHZC47H.js → chunk-MPOK5ZI5.js} +1 -1
  107. package/dist/chunks/{chunk-WAFBTC45.js → chunk-N3IQO5HN.js} +1 -1
  108. package/dist/chunks/{chunk-2G2SALNN.js → chunk-NBRW54IL.js} +1 -1
  109. package/dist/chunks/chunk-NJFXR3FN.js +77 -0
  110. package/dist/chunks/chunk-NMY2YZ6M.js +8 -0
  111. package/dist/chunks/chunk-NTSJNYRU.js +11 -0
  112. package/dist/chunks/{chunk-EFP3LK4G.js → chunk-OBBFWQJ3.js} +1 -1
  113. package/dist/chunks/{chunk-SQCVI2EG.js → chunk-OOAIU7WR.js} +1 -1
  114. package/dist/chunks/{chunk-ZJNDLFZ7.js → chunk-OOPF73RV.js} +1 -1
  115. package/dist/chunks/{chunk-YRKW42CD.js → chunk-OQXHBPPS.js} +1 -1
  116. package/dist/chunks/chunk-PHK4OYIZ.js +8 -0
  117. package/dist/chunks/{chunk-IF6GA273.js → chunk-PKCEKIQP.js} +1 -1
  118. package/dist/chunks/{chunk-33HVDSWP.js → chunk-PYHNDBNH.js} +1 -1
  119. package/dist/chunks/chunk-QFE3RPMA.js +19 -0
  120. package/dist/chunks/{chunk-S4AANAHX.js → chunk-QKK5BAZO.js} +1 -1
  121. package/dist/chunks/{chunk-RDDIWY3O.js → chunk-QPX6N5CV.js} +3 -3
  122. package/dist/chunks/{chunk-3UZE566G.js → chunk-QSL6AG2B.js} +1 -1
  123. package/dist/chunks/{chunk-BDXK4TCN.js → chunk-RHFNVIFD.js} +1 -1
  124. package/dist/chunks/chunk-RNHPL4C7.js +13 -0
  125. package/dist/chunks/chunk-RPYIWRSN.js +7 -0
  126. package/dist/chunks/{chunk-AP6DZGTK.js → chunk-RYSO5U3E.js} +1 -1
  127. package/dist/chunks/{chunk-2OMI3IUW.js → chunk-S6QZTDZ3.js} +1 -1
  128. package/dist/chunks/{chunk-5O4AXCN7.js → chunk-SGFMVYFR.js} +1 -1
  129. package/dist/chunks/chunk-SGNDE4YS.js +7 -0
  130. package/dist/chunks/{chunk-GLIQ4KNY.js → chunk-SQ62IODX.js} +1 -1
  131. package/dist/chunks/{chunk-PIDEH4SJ.js → chunk-T44RB754.js} +1 -1
  132. package/dist/chunks/{chunk-DHKWTBF6.js → chunk-T4DOV5S4.js} +1 -1
  133. package/dist/chunks/{chunk-TNQUCTJH.js → chunk-THMCHMVZ.js} +1 -1
  134. package/dist/chunks/{chunk-TJUZVODP.js → chunk-TLKBGAOL.js} +1 -1
  135. package/dist/chunks/{chunk-E4VPDMRQ.js → chunk-TRDAU3LX.js} +1 -1
  136. package/dist/chunks/chunk-TVTGVWCV.js +8 -0
  137. package/dist/chunks/{chunk-CJZE7647.js → chunk-U5SZQUYO.js} +1 -1
  138. package/dist/chunks/chunk-UEFDCTG6.js +7 -0
  139. package/dist/chunks/{chunk-OXS5VO4X.js → chunk-URJT7V4L.js} +1 -1
  140. package/dist/chunks/chunk-UT3HLSJV.js +8 -0
  141. package/dist/chunks/chunk-V5TIFXUP.js +15 -0
  142. package/dist/chunks/chunk-VGSSSQFT.js +7 -0
  143. package/dist/chunks/{chunk-OF32Z3UP.js → chunk-VT7UAUY6.js} +1 -1
  144. package/dist/chunks/{chunk-QRG24GJG.js → chunk-VWFFYVJ2.js} +1 -1
  145. package/dist/chunks/chunk-VWKA6RKB.js +7 -0
  146. package/dist/chunks/{chunk-FCTTEFC5.js → chunk-WAOS5OCB.js} +1 -1
  147. package/dist/chunks/{chunk-2D5PTFAY.js → chunk-WOXLDQR3.js} +1 -1
  148. package/dist/chunks/{chunk-WIF4VGYZ.js → chunk-X3LOIVIS.js} +1 -1
  149. package/dist/chunks/{chunk-MINTHN6C.js → chunk-X4ECSRFL.js} +1 -1
  150. package/dist/chunks/{chunk-6FYPSSL4.js → chunk-X6JQI64G.js} +1 -1
  151. package/dist/chunks/{chunk-L75A5BMY.js → chunk-X755TPX6.js} +1 -1
  152. package/dist/chunks/{chunk-C335SWOB.js → chunk-X7TIJWNO.js} +1 -1
  153. package/dist/chunks/chunk-XTCRLS6X.js +10 -0
  154. package/dist/chunks/{chunk-KLYFOXYH.js → chunk-XUMXJUE4.js} +3 -3
  155. package/dist/chunks/{chunk-XDWAUOFO.js → chunk-XXLU5IHA.js} +1 -1
  156. package/dist/chunks/{chunk-AB4WXRCO.js → chunk-Y3V4JYK6.js} +1 -1
  157. package/dist/chunks/{chunk-LKW6GVP2.js → chunk-Y4YBQUQM.js} +1 -1
  158. package/dist/chunks/{chunk-I5KIA2XV.js → chunk-YBAGKQXC.js} +1 -1
  159. package/dist/chunks/{chunk-YEDS2UMW.js → chunk-YBKH3IDY.js} +1 -1
  160. package/dist/chunks/{chunk-3OZCZF4N.js → chunk-YFOBGEOW.js} +1 -1
  161. package/dist/chunks/chunk-YKIKCZQ4.js +37 -0
  162. package/dist/chunks/chunk-YLXXGQQQ.js +7 -0
  163. package/dist/chunks/chunk-YMVS467I.js +7 -0
  164. package/dist/chunks/{chunk-BMIYC2MH.js → chunk-YN3HZJXW.js} +1 -1
  165. package/dist/chunks/chunk-YTSGFU5T.js +7 -0
  166. package/dist/chunks/{chunk-Z2PTPD6J.js → chunk-YTSUDTAK.js} +1 -1
  167. package/dist/chunks/{chunk-DOBV3XLO.js → chunk-Z3YQZSU4.js} +1 -1
  168. package/dist/chunks/{chunk-O7GNYVVM.js → chunk-Z5HRQ3IQ.js} +2 -2
  169. package/dist/chunks/{chunk-D2E4COIY.js → chunk-ZBZQEDZY.js} +1 -1
  170. package/dist/chunks/{chunk-F37XFLFP.js → chunk-ZNEXVCPE.js} +1 -1
  171. package/dist/chunks/chunk-ZRFDZO7Y.js +7 -0
  172. package/dist/chunks/{chunk-UECFEOOH.js → chunk-ZXSZH7N5.js} +1 -1
  173. package/dist/chunks/clear-ZYFF7TKK.js +8 -0
  174. package/dist/chunks/cli-embedded-NR5F35LW.js +87 -0
  175. package/dist/chunks/compile-vercel-config-PM32YSEA.js +7 -0
  176. package/dist/chunks/config-BOZHXFS2.js +8 -0
  177. package/dist/chunks/config-PEQFEYH3.js +7 -0
  178. package/dist/chunks/config-validator.mjs +1 -1
  179. package/dist/chunks/{connect-git-provider-CIRRFPI2.js → connect-git-provider-WGKVFXW2.js} +1 -1
  180. package/dist/chunks/create-project-BTOHPKZB.js +7 -0
  181. package/dist/chunks/delete-5ZT5D2ZC.js +9 -0
  182. package/dist/chunks/delete-QOXGYAV7.js +10 -0
  183. package/dist/chunks/describe-PB4P77HZ.js +25 -0
  184. package/dist/chunks/detect-projects-YFNBW57H.js +7 -0
  185. package/dist/chunks/detect-services-ZN2R3RDF.js +7 -0
  186. package/dist/chunks/disable-UB445BYJ.js +7 -0
  187. package/dist/chunks/discard-EDFRCWQJ.js +14 -0
  188. package/dist/chunks/edit-RZUR2MEI.js +9 -0
  189. package/dist/chunks/edit-ZWAA6ERV.js +8 -0
  190. package/dist/chunks/enable-YTPIGKFW.js +7 -0
  191. package/dist/chunks/{engine-D8YAsQS_-WNPHYRQF.js → engine-C8wCzkw--PYVABGU4.js} +1 -1
  192. package/dist/chunks/esm-5GQXHN7C.js +9 -0
  193. package/dist/chunks/esm-FJCIOBBV.js +7 -0
  194. package/dist/chunks/{esm-FSME24KA.js → esm-IYH32MTQ.js} +1 -1
  195. package/dist/chunks/esm-LEQXRLFV.js +9 -0
  196. package/dist/chunks/esm-NHCCFW7Z.js +7 -0
  197. package/dist/chunks/esm-QQ3MUOW4.js +7 -0
  198. package/dist/chunks/esm-T655CG6O.js +7 -0
  199. package/dist/chunks/{exec-ALB7WFEF.js → exec-PCSP64LR.js} +1 -1
  200. package/dist/chunks/{export-TOSUN6JO.js → export-GAUHNKEC.js} +2 -3
  201. package/dist/chunks/future-5CMQQWD5.js +7 -0
  202. package/dist/chunks/generate-cert-for-deploy-UIPNZXKH.js +7 -0
  203. package/dist/chunks/image-6E4KXK2L.js +7 -0
  204. package/dist/chunks/import-builders-XWE653DS.js +7 -0
  205. package/dist/chunks/{inspect-GBH7FAW6.js → inspect-6R3QRA5N.js} +1 -1
  206. package/dist/chunks/{inspect-4Y2OD5MI.js → inspect-CAFSMVCJ.js} +1 -1
  207. package/dist/chunks/{inspect-SX3QQUEQ.js → inspect-D7ABHU5K.js} +1 -1
  208. package/dist/chunks/{inspect-DFYVVIJW.js → inspect-INPZEWQW.js} +1 -1
  209. package/dist/chunks/inspect-MTGXZZ56.js +9 -0
  210. package/dist/chunks/inspect-RAXMU5ZB.js +13 -0
  211. package/dist/chunks/{list-HD6KXAIG.js → list-FIHRZBUS.js} +1 -1
  212. package/dist/chunks/list-JBJW5CJ5.js +12 -0
  213. package/dist/chunks/{list-4RRL326Z.js → list-VMOJ7VVX.js} +1 -1
  214. package/dist/chunks/{list-MW2FV253.js → list-ZVDEIXDS.js} +1 -1
  215. package/dist/chunks/login-H2G7BS6W.js +7 -0
  216. package/dist/chunks/login-LKMOWVCB.js +9 -0
  217. package/dist/chunks/logs-VXZM4UHP.js +7 -0
  218. package/dist/chunks/{ls-RKOM46KV.js → ls-C6AD24SN.js} +1 -1
  219. package/dist/chunks/{ls-TLEAYYXQ.js → ls-F7VCPUQX.js} +1 -1
  220. package/dist/chunks/{ls-VFE7PE25.js → ls-GDKBTL2S.js} +1 -1
  221. package/dist/chunks/ls-HDEMDHPT.js +8 -0
  222. package/dist/chunks/ls-JQ27BRGL.js +11 -0
  223. package/dist/chunks/{ls-Q4WGEEBZ.js → ls-LAGLNA5S.js} +1 -1
  224. package/dist/chunks/{ls-I767MTW4.js → ls-Z6MWIX4Y.js} +1 -1
  225. package/dist/chunks/migrate-experimental-services-EDKYGFQN.js +7 -0
  226. package/dist/chunks/mutate-QQV7STKJ.js +9 -0
  227. package/dist/chunks/{native-self-update-JDTL3IBF.js → native-self-update-Q3EN6NZK.js} +1 -1
  228. package/dist/chunks/notifications-RS7NVKX3.js +7 -0
  229. package/dist/chunks/open-FJ2GR5YN.js +7 -0
  230. package/dist/chunks/{openapi-NEYEIRF2.js → openapi-TMDHCYVN.js} +1 -1
  231. package/dist/chunks/permissions-5A7V4SB3.js +7 -0
  232. package/dist/chunks/{plugin-offer-NPJAEILN.js → plugin-offer-EVN7NAJK.js} +1 -1
  233. package/dist/chunks/prompt-missing-credentials-KI75QVSM.js +7 -0
  234. package/dist/chunks/publish-XSPN4TNJ.js +15 -0
  235. package/dist/chunks/pull-6UMQJKSF.js +7 -0
  236. package/dist/chunks/purchase-domain-if-available-CT4I2TPX.js +7 -0
  237. package/dist/chunks/push-KY26BHB6.js +7 -0
  238. package/dist/chunks/query-RISEG5SJ.js +7 -0
  239. package/dist/chunks/raw-query-VVRMDGD2.js +8 -0
  240. package/dist/chunks/reauthenticate-OSPJ3JEZ.js +7 -0
  241. package/dist/chunks/{remove-IEEZGRB2.js → remove-2IJXYNP5.js} +1 -1
  242. package/dist/chunks/reorder-V7HLFPNM.js +10 -0
  243. package/dist/chunks/reply-DBWSTVHX.js +9 -0
  244. package/dist/chunks/repo-root-DZ6WFHMP.js +7 -0
  245. package/dist/chunks/resolve-NNJNHWK7.js +12 -0
  246. package/dist/chunks/resolve-agent-team-SDRK736H.js +7 -0
  247. package/dist/chunks/{resolve-deployment-framework-preset-4TKUU6AH.js → resolve-deployment-framework-preset-BLMQLCIN.js} +1 -1
  248. package/dist/chunks/restore-JLS3DHVR.js +16 -0
  249. package/dist/chunks/rm-44NX26ZY.js +8 -0
  250. package/dist/chunks/rm-6K2ZAQ26.js +8 -0
  251. package/dist/chunks/rm-KX2MW3CD.js +8 -0
  252. package/dist/chunks/rm-TADMPEWP.js +8 -0
  253. package/dist/chunks/rm-YCOVLR77.js +8 -0
  254. package/dist/chunks/routes-SBMN6SDF.js +7 -0
  255. package/dist/chunks/rule-inspect-4OICMTIG.js +8 -0
  256. package/dist/chunks/{schema-L5VCG6FJ.js → schema-JVSAUVFJ.js} +1 -1
  257. package/dist/chunks/schema-NPCCNUH2.js +14 -0
  258. package/dist/chunks/select-org-PQVCQGYR.js +7 -0
  259. package/dist/chunks/{serving-aOQsBok0-OL36TMZU.js → serving-C1mhZQqH-73TMEGEB.js} +1 -1
  260. package/dist/chunks/{set-6U4QIX7A.js → set-GBB3DG2V.js} +1 -1
  261. package/dist/chunks/set-XADF6YK4.js +7 -0
  262. package/dist/chunks/setup-and-link-CBVABGTY.js +7 -0
  263. package/dist/chunks/{skills-ZMFZGPQL.js → skills-VPLIJJQG.js} +4 -19
  264. package/dist/chunks/table-SCLK33K7.js +7 -0
  265. package/dist/chunks/tags-PVI45KIL.js +7 -0
  266. package/dist/chunks/{types-CVLZCTL2.js → types-MTNJRJKG.js} +1 -1
  267. package/dist/chunks/{update-A727QN7H.js → update-KIOGBNX7.js} +1 -1
  268. package/dist/chunks/usage-XTWSFFZT.js +15 -0
  269. package/dist/chunks/validate-config-IREIABSK.js +7 -0
  270. package/dist/commands/build/index.js +1 -1
  271. package/dist/commands/deploy/index.js +28 -25
  272. package/dist/commands/dev/index.js +7 -7
  273. package/dist/commands/env/index.js +11 -10
  274. package/dist/commands/link/index.js +3 -3
  275. package/dist/commands/list/index.js +1 -1
  276. package/dist/commands/project/index.js +4 -4
  277. package/dist/commands/tunnel/index.js +1 -1
  278. package/dist/commands-account.js +16 -10
  279. package/dist/commands-ai.js +17 -10
  280. package/dist/commands-blob.js +6 -6
  281. package/dist/commands-core.js +15 -16
  282. package/dist/commands-deployments.js +12 -11
  283. package/dist/commands-flags.js +25 -20
  284. package/dist/commands-integrations.js +3 -3
  285. package/dist/commands-observability.js +38 -28
  286. package/dist/commands-routing.js +4 -4
  287. package/dist/help.js +1 -1
  288. package/dist/index.js +6 -6
  289. package/dist/internal-build-worker.js +1 -1
  290. package/dist/internal-build.js +1 -1
  291. package/dist/package.json +42 -42
  292. package/dist/version.mjs +1 -1
  293. package/package.json +43 -43
  294. package/dist/chunks/add-563RV6JX.js +0 -8
  295. package/dist/chunks/add-HRB6XY33.js +0 -8
  296. package/dist/chunks/add-IUTGTBA4.js +0 -8
  297. package/dist/chunks/build-OMIYCGMR.js +0 -7
  298. package/dist/chunks/chunk-2GBU6ULJ.js +0 -7
  299. package/dist/chunks/chunk-2RRZCRWX.js +0 -7
  300. package/dist/chunks/chunk-4SS6W6JK.js +0 -11
  301. package/dist/chunks/chunk-5J4E2W4F.js +0 -12
  302. package/dist/chunks/chunk-76DSBD4X.js +0 -7
  303. package/dist/chunks/chunk-7W565DJB.js +0 -8
  304. package/dist/chunks/chunk-AIXEVICT.js +0 -37
  305. package/dist/chunks/chunk-BULSRTQE.js +0 -7
  306. package/dist/chunks/chunk-C35SG42R.js +0 -7
  307. package/dist/chunks/chunk-CFJBDBYH.js +0 -7
  308. package/dist/chunks/chunk-DDPH26ZO.js +0 -7
  309. package/dist/chunks/chunk-EAQAV7UZ.js +0 -8
  310. package/dist/chunks/chunk-EFFJUYYS.js +0 -31
  311. package/dist/chunks/chunk-GOI2VVI7.js +0 -19
  312. package/dist/chunks/chunk-GYUNOFDD.js +0 -10
  313. package/dist/chunks/chunk-KDCODXVL.js +0 -25
  314. package/dist/chunks/chunk-KMTHGHJV.js +0 -8
  315. package/dist/chunks/chunk-KQ6X77WP.js +0 -7
  316. package/dist/chunks/chunk-KRP4EMD2.js +0 -10
  317. package/dist/chunks/chunk-OCR5CRTH.js +0 -10
  318. package/dist/chunks/chunk-PKR32I2N.js +0 -30
  319. package/dist/chunks/chunk-SPVOJ3HW.js +0 -7
  320. package/dist/chunks/chunk-SXW2G4WD.js +0 -10
  321. package/dist/chunks/chunk-TC4E2TFA.js +0 -8
  322. package/dist/chunks/chunk-TUB3APDV.js +0 -7
  323. package/dist/chunks/chunk-UG3FZ5Q7.js +0 -7
  324. package/dist/chunks/chunk-VF7XWPXA.js +0 -7
  325. package/dist/chunks/chunk-VKVH7LHB.js +0 -7
  326. package/dist/chunks/chunk-VUUU4KDL.js +0 -7
  327. package/dist/chunks/chunk-W3ZH27MN.js +0 -13
  328. package/dist/chunks/chunk-X47GV5HM.js +0 -15
  329. package/dist/chunks/chunk-XBHAU2M3.js +0 -9
  330. package/dist/chunks/chunk-XR2J7PQN.js +0 -12
  331. package/dist/chunks/chunk-YI7NKOCU.js +0 -23
  332. package/dist/chunks/chunk-Z2KANBOU.js +0 -69
  333. package/dist/chunks/chunk-Z7WZVEPP.js +0 -7
  334. package/dist/chunks/clear-TH6G33QK.js +0 -8
  335. package/dist/chunks/cli-embedded-FD3CAPRY.js +0 -84
  336. package/dist/chunks/compile-vercel-config-24IXPM4W.js +0 -7
  337. package/dist/chunks/config-2SBML7OY.js +0 -8
  338. package/dist/chunks/config-BCKJNJPS.js +0 -7
  339. package/dist/chunks/create-project-I7UXVWIR.js +0 -7
  340. package/dist/chunks/delete-RGHXL4JH.js +0 -9
  341. package/dist/chunks/delete-ZV4SHUTR.js +0 -10
  342. package/dist/chunks/describe-442UUQIF.js +0 -25
  343. package/dist/chunks/detect-projects-NBZSMQ5C.js +0 -7
  344. package/dist/chunks/detect-services-CRZW6FKM.js +0 -7
  345. package/dist/chunks/disable-MYGA6HVS.js +0 -7
  346. package/dist/chunks/discard-I5TKYCDJ.js +0 -14
  347. package/dist/chunks/edit-KGCUTTOZ.js +0 -8
  348. package/dist/chunks/edit-ZRNGGRVL.js +0 -9
  349. package/dist/chunks/enable-NODSFDKF.js +0 -7
  350. package/dist/chunks/esm-CF5UHWPM.js +0 -7
  351. package/dist/chunks/esm-EYOXGOVF.js +0 -7
  352. package/dist/chunks/esm-IUATPKKB.js +0 -9
  353. package/dist/chunks/esm-L6OKDFWP.js +0 -7
  354. package/dist/chunks/esm-ORQC2ZSA.js +0 -7
  355. package/dist/chunks/esm-PYIZNQIK.js +0 -9
  356. package/dist/chunks/future-RXI2OW2C.js +0 -7
  357. package/dist/chunks/generate-cert-for-deploy-7BX47IPD.js +0 -7
  358. package/dist/chunks/image-6A2EJP4N.js +0 -7
  359. package/dist/chunks/import-builders-I4JB6BA6.js +0 -7
  360. package/dist/chunks/inspect-STKCC3MC.js +0 -9
  361. package/dist/chunks/inspect-VFUV7BDM.js +0 -13
  362. package/dist/chunks/list-6ENV2ZGG.js +0 -12
  363. package/dist/chunks/login-O6NLJ42W.js +0 -7
  364. package/dist/chunks/login-U5VDJURN.js +0 -9
  365. package/dist/chunks/logs-X3KGHA3J.js +0 -7
  366. package/dist/chunks/ls-HRSD6VNW.js +0 -8
  367. package/dist/chunks/ls-OLJMGFTV.js +0 -11
  368. package/dist/chunks/migrate-experimental-services-7ZYHE5WA.js +0 -7
  369. package/dist/chunks/mutate-BJXJON5E.js +0 -9
  370. package/dist/chunks/notifications-F3NRNUHQ.js +0 -7
  371. package/dist/chunks/open-JK42ZTLB.js +0 -7
  372. package/dist/chunks/permissions-3AQO3DCH.js +0 -7
  373. package/dist/chunks/prompt-missing-credentials-AHAH27TZ.js +0 -7
  374. package/dist/chunks/publish-7SCXBVZR.js +0 -15
  375. package/dist/chunks/pull-LAPD5XJG.js +0 -7
  376. package/dist/chunks/purchase-domain-if-available-7MI52MFD.js +0 -7
  377. package/dist/chunks/push-BCSGQBAM.js +0 -7
  378. package/dist/chunks/query-U72BDMAK.js +0 -7
  379. package/dist/chunks/raw-query-4UAW7M5Q.js +0 -8
  380. package/dist/chunks/reauthenticate-HGOLSK2M.js +0 -7
  381. package/dist/chunks/reorder-YL6L6IWC.js +0 -10
  382. package/dist/chunks/reply-7Y5TN5UV.js +0 -9
  383. package/dist/chunks/resolve-C62436YM.js +0 -12
  384. package/dist/chunks/resolve-agent-team-SR3ALPCH.js +0 -7
  385. package/dist/chunks/restore-Z63JM5CN.js +0 -16
  386. package/dist/chunks/rm-C6QSHEA2.js +0 -8
  387. package/dist/chunks/rm-DDKE62T7.js +0 -8
  388. package/dist/chunks/rm-IUB55CCM.js +0 -8
  389. package/dist/chunks/rm-NZX43GMQ.js +0 -8
  390. package/dist/chunks/rm-UBUI7JNY.js +0 -8
  391. package/dist/chunks/routes-TME3VYIF.js +0 -7
  392. package/dist/chunks/rule-inspect-KF4BLH4K.js +0 -8
  393. package/dist/chunks/schema-P7DFLXCG.js +0 -14
  394. package/dist/chunks/select-org-MBBMOUK2.js +0 -7
  395. package/dist/chunks/set-SCKMJ7LZ.js +0 -7
  396. package/dist/chunks/setup-and-link-5TPDTJIN.js +0 -7
  397. package/dist/chunks/tags-7M2EW6LU.js +0 -7
  398. package/dist/chunks/usage-HT5JXVAA.js +0 -13
  399. package/dist/chunks/validate-config-Q77XESW5.js +0 -7
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{CertConfigurationError,CertError,DomainNotFound,TooManyRequests}from"./chunk-GOI2VVI7.js";function mapCertError(error,cns){let errorCode=error.code;if(errorCode==="too_many_requests"){let retryAfter=typeof error.retryAfterMs=="number"?error.retryAfterMs:0;return new TooManyRequests("certificates",retryAfter)}return errorCode==="not_found"?new DomainNotFound(error.domain):errorCode==="configuration_error"?new CertConfigurationError({cns:cns||error.cns||[],message:error.message,external:error.external,helpUrl:error.helpUrl,type:error.statusCode===449?"http-01":"dns-01"}):errorCode==="bad_domains"||errorCode==="challenge_still_pending"||errorCode==="common_name_domain_name_mismatch"||errorCode==="conflicting_caa_record"||errorCode==="domain_not_verified"||errorCode==="invalid_cn"||errorCode==="invalid_domain"||errorCode==="rate_limited"||errorCode==="should_share_root_domain"||errorCode==="unauthorized_request_error"||errorCode==="unsupported_challenge_priority"||errorCode==="wildcard_not_allowed"||errorCode==="validation_running"||errorCode==="dns_error"||errorCode==="challenge_error"||errorCode==="txt_record_not_found"?new CertError({cns:cns||error.cns||[],code:errorCode,message:error.message,helpUrl:error.helpUrl}):null}export{mapCertError};
7
+ import{CertConfigurationError,CertError,DomainNotFound,TooManyRequests}from"./chunk-QFE3RPMA.js";function mapCertError(error,cns){let errorCode=error.code;if(errorCode==="too_many_requests"){let retryAfter=typeof error.retryAfterMs=="number"?error.retryAfterMs:0;return new TooManyRequests("certificates",retryAfter)}return errorCode==="not_found"?new DomainNotFound(error.domain):errorCode==="configuration_error"?new CertConfigurationError({cns:cns||error.cns||[],message:error.message,external:error.external,helpUrl:error.helpUrl,type:error.statusCode===449?"http-01":"dns-01"}):errorCode==="bad_domains"||errorCode==="challenge_still_pending"||errorCode==="common_name_domain_name_mismatch"||errorCode==="conflicting_caa_record"||errorCode==="domain_not_verified"||errorCode==="invalid_cn"||errorCode==="invalid_domain"||errorCode==="rate_limited"||errorCode==="should_share_root_domain"||errorCode==="unauthorized_request_error"||errorCode==="unsupported_challenge_priority"||errorCode==="wildcard_not_allowed"||errorCode==="validation_running"||errorCode==="dns_error"||errorCode==="challenge_error"||errorCode==="txt_record_not_found"?new CertError({cns:cns||error.cns||[],code:errorCode,message:error.message,helpUrl:error.helpUrl}):null}export{mapCertError};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{resolveProjectContext}from"./chunk-VF7XWPXA.js";import{printError}from"./chunk-33HVDSWP.js";import{detectExplicitScope}from"./chunk-NLK7NGVP.js";import{getProjectByNameOrId}from"./chunk-DJZBJC2A.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getErrorRecovery,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-4SS6W6JK.js";import{ProjectNotFound,isAPIError}from"./chunk-GOI2VVI7.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";function tracingErrorMessage(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function tracingErrorReason(err){let status=isAPIError(err)?err.status:void 0;return status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR}function handleTracingApiError(client,err){if(client.nonInteractive){let apiError=isAPIError(err)?err:void 0;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:tracingErrorReason(err),message:tracingErrorMessage(err),...apiError?.status===429&&getErrorRecovery(apiError,client)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(tracingErrorMessage(err)),1):(printError(err),1)}function configError(client,reason,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),getExitCodeForReason(reason)}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function missingEnvironment(client,message){return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.MISSING_ENVIRONMENT,message}),output_manager_default.error(message),getExitCodeForReason(AGENT_REASON.MISSING_ENVIRONMENT)}function ruleNotFound(client,message){return configError(client,AGENT_REASON.NOT_FOUND,message)}function confirmationRequired(client,message,next){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message,userActionRequired:!0,next}),output_manager_default.error(message),1}var MISSING_BOTH_MESSAGE="No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";async function resolveScope({client,flags={},linkedProject}){let flagScope=flags.scope?.trim()||void 0,flagProject=flags.project?.trim()||void 0;if(linkedProject.status==="linked"){if(!flagScope&&!flagProject)return{teamId:linkedProject.org.id,projectId:linkedProject.project.id,projectName:linkedProject.project.name};let teamId=flagScope?client.config.currentTeam:linkedProject.org.id;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject??linkedProject.project.id,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}if(flagScope&&flagProject){let teamId=client.config.currentTeam;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}return{reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE}}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE,hint:"Link a project or pass --scope and --project.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"link this directory to a project"}]}),output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?{exitCode:invalidArguments(client,`The linked project ${link.project.name} belongs to ${link.org.slug||link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`)}:{teamId:link.org.id,teamSlug:link.org.slug,projectId:link.project.id,projectName:link.project.name}}export{resolveScope,tracingErrorMessage,tracingErrorReason,handleTracingApiError,invalidArguments,missingEnvironment,ruleNotFound,confirmationRequired,resolveConfigScope};
7
+ import{resolveProjectContext}from"./chunk-B7IB5CTS.js";import{detectExplicitScope}from"./chunk-5ZL2RRO3.js";import{getProjectByNameOrId}from"./chunk-3AFEVHHY.js";import{printError}from"./chunk-PYHNDBNH.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getErrorRecovery,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-NTSJNYRU.js";import{ProjectNotFound,isAPIError}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";function tracingErrorMessage(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function tracingErrorReason(err){let status=isAPIError(err)?err.status:void 0;return status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR}function handleTracingApiError(client,err){if(client.nonInteractive){let apiError=isAPIError(err)?err:void 0;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:tracingErrorReason(err),message:tracingErrorMessage(err),...apiError?.status===429&&getErrorRecovery(apiError,client)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(tracingErrorMessage(err)),1):(printError(err),1)}function configError(client,reason,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),getExitCodeForReason(reason)}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function missingEnvironment(client,message){return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.MISSING_ENVIRONMENT,message}),output_manager_default.error(message),getExitCodeForReason(AGENT_REASON.MISSING_ENVIRONMENT)}function ruleNotFound(client,message){return configError(client,AGENT_REASON.NOT_FOUND,message)}function confirmationRequired(client,message,next){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message,userActionRequired:!0,next}),output_manager_default.error(message),1}var MISSING_BOTH_MESSAGE="No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";async function resolveScope({client,flags={},linkedProject}){let flagScope=flags.scope?.trim()||void 0,flagProject=flags.project?.trim()||void 0;if(linkedProject.status==="linked"){if(!flagScope&&!flagProject)return{teamId:linkedProject.org.id,projectId:linkedProject.project.id,projectName:linkedProject.project.name};let teamId=flagScope?client.config.currentTeam:linkedProject.org.id;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject??linkedProject.project.id,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}if(flagScope&&flagProject){let teamId=client.config.currentTeam;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}return{reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE}}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE,hint:"Link a project or pass --scope and --project.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"link this directory to a project"}]}),output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?{exitCode:invalidArguments(client,`The linked project ${link.project.name} belongs to ${link.org.slug||link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`)}:{teamId:link.org.id,teamSlug:link.org.slug,projectId:link.project.id,projectName:link.project.name}}export{tracingErrorMessage,tracingErrorReason,handleTracingApiError,invalidArguments,missingEnvironment,ruleNotFound,confirmationRequired,resolveScope,resolveConfigScope};
@@ -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{canPrompt}from"./chunk-IQ7FPAI4.js";import{require_lib}from"./chunk-NJFXR3FN.js";import{AGENT_REASON,AGENT_STATUS,outputActionRequired}from"./chunk-NTSJNYRU.js";import{humanizePath}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_fs_extra=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1);import{homedir}from"os";import{resolve,sep}from"path";import{realpath as realpathCallback}from"node:fs";import*as fs from"node:fs/promises";import{promisify}from"node:util";var realpathInJavaScript=promisify(realpathCallback);async function validateRootDirectory(cwd,path,errorSuffix=""){let pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null),suffix=errorSuffix?` ${errorSuffix}`:"";return pathStat?pathStat.isDirectory()?await resolvesInside(cwd,path)?!0:(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is outside of the project.${suffix}`),!1):(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is a file, but expected a directory.${suffix}`),!1):(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} does not exist.${suffix}`),!1)}async function validatePaths(client,paths,{allowFiles=!1}={}){if(paths.length>1)return output_manager_default.error("Can't deploy more than one path."),{valid:!1,exitCode:1};let path=paths[0],pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null);if(!pathStat)return output_manager_default.error(`Could not find ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)}`),{valid:!1,exitCode:1};let isFile=pathStat.isFile();if(!pathStat.isDirectory()&&!(allowFiles&&isFile))return output_manager_default.fatal(allowFiles?"Deploy a regular file or directory. Symbolic links and special files are not supported as deployment paths.":"This command requires a directory. Use `vercel <file>` to deploy a single file."),{valid:!1,exitCode:1};let refusal=await confirmHomeDirectory(client,path);return refusal||{valid:!0,path,isFile}}async function validateUploadRoot(client,path,repoRoot){if(!repoRoot||repoRoot===path)return{valid:!0,path};let[resolvedRoot,resolvedPath]=await Promise.all([resolveLinks(repoRoot),resolveLinks(path)]);return resolvedRoot===resolvedPath?{valid:!0,path:repoRoot}:rootContains(repoRoot,path,resolvedRoot,resolvedPath)?await confirmHomeDirectory(client,repoRoot,`The repository link ${humanizePath(resolve(repoRoot,".vercel","repo.json"))} makes your home directory the directory to deploy.`)??{valid:!0,path:repoRoot}:(output_manager_default.error(repoRootOutsideMessage("deploy",path,repoRoot)),{valid:!1,exitCode:1})}async function repoRootContains(repoRoot,path){let[resolvedRoot,resolvedPath]=await Promise.all([resolveLinks(repoRoot),resolveLinks(path)]);return rootContains(repoRoot,path,resolvedRoot,resolvedPath)}function rootContains(repoRoot,path,resolvedRoot,resolvedPath){return isInside(repoRoot,path)||isInside(resolvedRoot,resolvedPath)}function repoRootOutsideMessage(action,path,repoRoot){return`Can't ${action} ${humanizePath(path)}. Git reports the repository root ${humanizePath(repoRoot)}, which does not contain this directory. Check \`core.worktree\` in the Git configuration and the \`GIT_WORK_TREE\` environment variable.`}async function resolvesInside(directory,path){let[base,target]=await Promise.all([resolveExisting(directory),resolveExisting(path)]);return base!==null&&target!==null&&isInside(base,target)}async function resolvesToDirectoryInside(directory,path){return!!(await fs.stat(path).catch(()=>null))?.isDirectory()&&await resolvesInside(directory,path)}async function resolveExisting(path){try{return await fs.realpath(path)}catch{return realpathInJavaScript(path).catch(()=>null)}}async function confirmHomeDirectory(client,path,cause){if(!await isHomeDirectory(path))return null;if(!canPrompt(client)){let message=`Can't deploy your home directory without interactive confirmation. ${cause?`${cause} Run`:"Run from your project directory, or run"} in a terminal to confirm deploying your home directory.`;return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.INTERACTIVE_CONFIRMATION_REQUIRED,message,userActionRequired:!0},2),output_manager_default.error(message),{valid:!1,exitCode:2}}return cause&&output_manager_default.warning(cause),await client.input.confirm("You are deploying your home directory. Do you want to continue?",!1)?null:(output_manager_default.print(`Canceled
8
+ `),{valid:!1,exitCode:0})}async function isHomeDirectory(path){let home=homedir();return path===home||await resolveLinks(path)===await resolveLinks(home)}function resolveLinks(path){return fs.realpath(path).catch(()=>path)}function isInside(directory,path){let base=resolve(directory),target=resolve(path);return target===base||target.startsWith(base.endsWith(sep)?base:base+sep)}export{validateRootDirectory,validatePaths,validateUploadRoot,repoRootContains,repoRootOutsideMessage,resolvesInside,resolvesToDirectoryInside};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{require_string_width}from"./chunk-BULSRTQE.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_debug=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/debug.js"(exports,module){var messages=[],level=0,debug=(msg,min)=>{level>=min&&messages.push(msg)};debug.WARN=1;debug.INFO=2;debug.DEBUG=3;debug.reset=()=>{messages=[]};debug.setDebugLevel=v=>{level=v};debug.warn=msg=>debug(msg,debug.WARN);debug.info=msg=>debug(msg,debug.INFO);debug.debug=msg=>debug(msg,debug.DEBUG);debug.debugMessages=()=>messages;module.exports=debug}});var require_utils=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/utils.js"(exports,module){var stringWidth=require_string_width();function codeRegex(capture){return capture?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function strlen(str){let code=codeRegex();return(""+str).replace(code,"").split(`
7
+ import{require_string_width}from"./chunk-67GZ5REA.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_debug=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/debug.js"(exports,module){var messages=[],level=0,debug=(msg,min)=>{level>=min&&messages.push(msg)};debug.WARN=1;debug.INFO=2;debug.DEBUG=3;debug.reset=()=>{messages=[]};debug.setDebugLevel=v=>{level=v};debug.warn=msg=>debug(msg,debug.WARN);debug.info=msg=>debug(msg,debug.INFO);debug.debug=msg=>debug(msg,debug.DEBUG);debug.debugMessages=()=>messages;module.exports=debug}});var require_utils=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/utils.js"(exports,module){var stringWidth=require_string_width();function codeRegex(capture){return capture?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function strlen(str){let code=codeRegex();return(""+str).replace(code,"").split(`
8
8
  `).reduce(function(memo,s){return stringWidth(s)>memo?stringWidth(s):memo},0)}function repeat(str,times){return Array(times+1).join(str)}function pad(str,len,pad2,dir){let length=strlen(str);if(len+1>=length){let padlen=len-length;switch(dir){case"right":{str=repeat(pad2,padlen)+str;break}case"center":{let right=Math.ceil(padlen/2),left=padlen-right;str=repeat(pad2,left)+str+repeat(pad2,right);break}default:{str=str+repeat(pad2,padlen);break}}}return str}var codeCache={};function addToCodeCache(name,on,off){on="\x1B["+on+"m",off="\x1B["+off+"m",codeCache[on]={set:name,to:!0},codeCache[off]={set:name,to:!1},codeCache[name]={on,off}}addToCodeCache("bold",1,22);addToCodeCache("italics",3,23);addToCodeCache("underline",4,24);addToCodeCache("inverse",7,27);addToCodeCache("strikethrough",9,29);function updateState(state,controlChars){let controlCode=controlChars[1]?parseInt(controlChars[1].split(";")[0]):0;if(controlCode>=30&&controlCode<=39||controlCode>=90&&controlCode<=97){state.lastForegroundAdded=controlChars[0];return}if(controlCode>=40&&controlCode<=49||controlCode>=100&&controlCode<=107){state.lastBackgroundAdded=controlChars[0];return}if(controlCode===0){for(let i in state)Object.prototype.hasOwnProperty.call(state,i)&&delete state[i];return}let info=codeCache[controlChars[0]];info&&(state[info.set]=info.to)}function readState(line){let code=codeRegex(!0),controlChars=code.exec(line),state={};for(;controlChars!==null;)updateState(state,controlChars),controlChars=code.exec(line);return state}function unwindState(state,ret){let lastBackgroundAdded=state.lastBackgroundAdded,lastForegroundAdded=state.lastForegroundAdded;return delete state.lastBackgroundAdded,delete state.lastForegroundAdded,Object.keys(state).forEach(function(key){state[key]&&(ret+=codeCache[key].off)}),lastBackgroundAdded&&lastBackgroundAdded!="\x1B[49m"&&(ret+="\x1B[49m"),lastForegroundAdded&&lastForegroundAdded!="\x1B[39m"&&(ret+="\x1B[39m"),ret}function rewindState(state,ret){let lastBackgroundAdded=state.lastBackgroundAdded,lastForegroundAdded=state.lastForegroundAdded;return delete state.lastBackgroundAdded,delete state.lastForegroundAdded,Object.keys(state).forEach(function(key){state[key]&&(ret=codeCache[key].on+ret)}),lastBackgroundAdded&&lastBackgroundAdded!="\x1B[49m"&&(ret=lastBackgroundAdded+ret),lastForegroundAdded&&lastForegroundAdded!="\x1B[39m"&&(ret=lastForegroundAdded+ret),ret}function truncateWidth(str,desiredLength){if(str.length===strlen(str))return str.substr(0,desiredLength);for(;strlen(str)>desiredLength;)str=str.slice(0,-1);return str}function truncateWidthWithAnsi(str,desiredLength){let code=codeRegex(!0),split=str.split(codeRegex()),splitIndex=0,retLen=0,ret="",myArray,state={};for(;retLen<desiredLength;){myArray=code.exec(str);let toAdd=split[splitIndex];if(splitIndex++,retLen+strlen(toAdd)>desiredLength&&(toAdd=truncateWidth(toAdd,desiredLength-retLen)),ret+=toAdd,retLen+=strlen(toAdd),retLen<desiredLength){if(!myArray)break;ret+=myArray[0],updateState(state,myArray)}}return unwindState(state,ret)}function truncate(str,desiredLength,truncateChar){return truncateChar=truncateChar||"\u2026",strlen(str)<=desiredLength?str:(desiredLength-=strlen(truncateChar),truncateWidthWithAnsi(str,desiredLength)+truncateChar)}function defaultOptions(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function mergeOptions(options,defaults){options=options||{},defaults=defaults||defaultOptions();let ret=Object.assign({},defaults,options);return ret.chars=Object.assign({},defaults.chars,options.chars),ret.style=Object.assign({},defaults.style,options.style),ret}function wordWrap(maxLength,input){let lines=[],split=input.split(/(\s+)/g),line=[],lineLength=0,whitespace;for(let i=0;i<split.length;i+=2){let word=split[i],newLength=lineLength+strlen(word);lineLength>0&&whitespace&&(newLength+=whitespace.length),newLength>maxLength?(lineLength!==0&&lines.push(line.join("")),line=[word],lineLength=strlen(word)):(line.push(whitespace||"",word),lineLength=newLength),whitespace=split[i+1]}return lineLength&&lines.push(line.join("")),lines}function textWrap(maxLength,input){let lines=[],line="";function pushLine(str,ws){for(line.length&&ws&&(line+=ws),line+=str;line.length>maxLength;)lines.push(line.slice(0,maxLength)),line=line.slice(maxLength)}let split=input.split(/(\s+)/g);for(let i=0;i<split.length;i+=2)pushLine(split[i],i&&split[i-1]);return line.length&&lines.push(line),lines}function multiLineWordWrap(maxLength,input,wrapOnWordBoundary=!0){let output=[];input=input.split(`
9
9
  `);let handler=wrapOnWordBoundary?wordWrap:textWrap;for(let i=0;i<input.length;i++)output.push.apply(output,handler(maxLength,input[i]));return output}function colorizeLines(input){let state={},output=[];for(let i=0;i<input.length;i++){let line=rewindState(state,input[i]);state=readState(line);let temp=Object.assign({},state);output.push(unwindState(temp,line))}return output}function hyperlink(url,text){let OSC="\x1B]",BEL="\x07",SEP=";";return[OSC,"8",SEP,SEP,url||text,BEL,text,OSC,"8",SEP,SEP,BEL].join("")}module.exports={strlen,repeat,pad,truncate,mergeOptions,wordWrap:multiLineWordWrap,colorizeLines,hyperlink}}});var require_styles=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js"(exports,module){var styles={};module.exports=styles;var codes={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(codes).forEach(function(key){var val=codes[key],style=styles[key]=[];style.open="\x1B["+val[0]+"m",style.close="\x1B["+val[1]+"m"})}});var require_has_flag=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js"(exports,module){"use strict";module.exports=function(flag,argv){argv=argv||process.argv;var terminatorPos=argv.indexOf("--"),prefix=/^-{1,2}/.test(flag)?"":"--",pos=argv.indexOf(prefix+flag);return pos!==-1&&(terminatorPos===-1?!0:pos<terminatorPos)}}});var require_supports_colors=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js"(exports,module){"use strict";var os=__require("os"),hasFlag=require_has_flag(),env=process.env,forceColor=void 0;hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")?forceColor=!1:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(forceColor=!0);"FORCE_COLOR"in env&&(forceColor=env.FORCE_COLOR.length===0||parseInt(env.FORCE_COLOR,10)!==0);function translateLevel(level){return level===0?!1:{level,hasBasic:!0,has256:level>=2,has16m:level>=3}}function supportsColor(stream){if(forceColor===!1)return 0;if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2;if(stream&&!stream.isTTY&&forceColor!==!0)return 0;var min=forceColor?1:0;if(process.platform==="win32"){var osRelease=os.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(osRelease[0])>=10&&Number(osRelease[2])>=10586?Number(osRelease[2])>=14931?3:2:1}if("CI"in env)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(sign){return sign in env})||env.CI_NAME==="codeship"?1:min;if("TEAMCITY_VERSION"in env)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in env){var version=parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(env.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)||"COLORTERM"in env?1:(env.TERM==="dumb",min)}function getSupportLevel(stream){var level=supportsColor(stream);return translateLevel(level)}module.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}}});var require_trap=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js"(exports,module){module.exports=function(text,options){var result="";text=text||"Run the trap, drop the bass",text=text.split("");var trap={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return text.forEach(function(c){c=c.toLowerCase();var chars=trap[c]||[" "],rand=Math.floor(Math.random()*chars.length);typeof trap[c]<"u"?result+=trap[c][rand]:result+=c}),result}}});var require_zalgo=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js"(exports,module){module.exports=function(text,options){text=text||" he is here ";var soul={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},all=[].concat(soul.up,soul.down,soul.mid);function randomNumber(range){var r=Math.floor(Math.random()*range);return r}function isChar(character){var bool=!1;return all.filter(function(i){bool=i===character}),bool}function heComes(text2,options2){var result="",counts,l;options2=options2||{},options2.up=typeof options2.up<"u"?options2.up:!0,options2.mid=typeof options2.mid<"u"?options2.mid:!0,options2.down=typeof options2.down<"u"?options2.down:!0,options2.size=typeof options2.size<"u"?options2.size:"maxi",text2=text2.split("");for(l in text2)if(!isChar(l)){switch(result=result+text2[l],counts={up:0,down:0,mid:0},options2.size){case"mini":counts.up=randomNumber(8),counts.mid=randomNumber(2),counts.down=randomNumber(8);break;case"maxi":counts.up=randomNumber(16)+3,counts.mid=randomNumber(4)+1,counts.down=randomNumber(64)+3;break;default:counts.up=randomNumber(8)+1,counts.mid=randomNumber(6)/2,counts.down=randomNumber(8)+1;break}var arr=["up","mid","down"];for(var d in arr)for(var index=arr[d],i=0;i<=counts[index];i++)options2[index]&&(result=result+soul[index][randomNumber(soul[index].length)])}return result}return heComes(text,options)}}});var require_america=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js"(exports,module){module.exports=function(colors){return function(letter,i,exploded){if(letter===" ")return letter;switch(i%3){case 0:return colors.red(letter);case 1:return colors.white(letter);case 2:return colors.blue(letter)}}}}});var require_zebra=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js"(exports,module){module.exports=function(colors){return function(letter,i,exploded){return i%2===0?letter:colors.inverse(letter)}}}});var require_rainbow=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js"(exports,module){module.exports=function(colors){var rainbowColors=["red","yellow","green","blue","magenta"];return function(letter,i,exploded){return letter===" "?letter:colors[rainbowColors[i++%rainbowColors.length]](letter)}}}});var require_random=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js"(exports,module){module.exports=function(colors){var available=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(letter,i,exploded){return letter===" "?letter:colors[available[Math.round(Math.random()*(available.length-2))]](letter)}}}});var require_colors=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js"(exports,module){var colors={};module.exports=colors;colors.themes={};var util=__require("util"),ansiStyles=colors.styles=require_styles(),defineProps=Object.defineProperties,newLineRegex=new RegExp(/[\r\n]+/g);colors.supportsColor=require_supports_colors().supportsColor;typeof colors.enabled>"u"&&(colors.enabled=colors.supportsColor()!==!1);colors.enable=function(){colors.enabled=!0};colors.disable=function(){colors.enabled=!1};colors.stripColors=colors.strip=function(str){return(""+str).replace(/\x1B\[\d+m/g,"")};var stylize=colors.stylize=function(str,style){if(!colors.enabled)return str+"";var styleMap=ansiStyles[style];return!styleMap&&style in colors?colors[style](str):styleMap.open+str+styleMap.close},matchOperatorsRe=/[|\\{}()[\]^$+*?.]/g,escapeStringRegexp=function(str){if(typeof str!="string")throw new TypeError("Expected a string");return str.replace(matchOperatorsRe,"\\$&")};function build(_styles){var builder=function builder2(){return applyStyle.apply(builder2,arguments)};return builder._styles=_styles,builder.__proto__=proto,builder}var styles=function(){var ret={};return ansiStyles.grey=ansiStyles.gray,Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g"),ret[key]={get:function(){return build(this._styles.concat(key))}}}),ret}(),proto=defineProps(function(){},styles);function applyStyle(){var args=Array.prototype.slice.call(arguments),str=args.map(function(arg){return arg!=null&&arg.constructor===String?arg:util.inspect(arg)}).join(" ");if(!colors.enabled||!str)return str;for(var newLinesPresent=str.indexOf(`
10
10
  `)!=-1,nestedStyles=this._styles,i=nestedStyles.length;i--;){var code=ansiStyles[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close,newLinesPresent&&(str=str.replace(newLineRegex,function(match){return code.close+match+code.open}))}return str}colors.setTheme=function(theme){if(typeof theme=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var style in theme)(function(style2){colors[style2]=function(str){if(typeof theme[style2]=="object"){var out=str;for(var i in theme[style2])out=colors[theme[style2][i]](out);return out}return colors[theme[style2]](str)}})(style)};function init(){var ret={};return Object.keys(styles).forEach(function(name){ret[name]={get:function(){return build([name])}}}),ret}var sequencer=function(map2,str){var exploded=str.split("");return exploded=exploded.map(map2),exploded.join("")};colors.trap=require_trap();colors.zalgo=require_zalgo();colors.maps={};colors.maps.america=require_america()(colors);colors.maps.zebra=require_zebra()(colors);colors.maps.rainbow=require_rainbow()(colors);colors.maps.random=require_random()(colors);for(map in colors.maps)(function(map2){colors[map2]=function(str){return sequencer(colors.maps[map2],str)}})(map);var map;defineProps(colors,init())}});var require_safe=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js"(exports,module){var colors=require_colors();module.exports=colors}});var require_cell=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/cell.js"(exports,module){var{info,debug}=require_debug(),utils=require_utils(),Cell=class _Cell{constructor(options){this.setOptions(options),this.x=null,this.y=null}setOptions(options){["boolean","number","string"].indexOf(typeof options)!==-1&&(options={content:""+options}),options=options||{},this.options=options;let content=options.content;if(["boolean","number","string"].indexOf(typeof content)!==-1)this.content=String(content);else if(!content)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof content);this.colSpan=options.colSpan||1,this.rowSpan=options.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(tableOptions,cells){this.cells=cells;let optionsChars=this.options.chars||{},tableChars=tableOptions.chars,chars=this.chars={};CHAR_NAMES.forEach(function(name){setOption(optionsChars,tableChars,name,chars)}),this.truncate=this.options.truncate||tableOptions.truncate;let style=this.options.style=this.options.style||{},tableStyle=tableOptions.style;setOption(style,tableStyle,"padding-left",this),setOption(style,tableStyle,"padding-right",this),this.head=style.head||tableStyle.head,this.border=style.border||tableStyle.border,this.fixedWidth=tableOptions.colWidths[this.x],this.lines=this.computeLines(tableOptions),this.desiredWidth=utils.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(tableOptions){let tableWordWrap=tableOptions.wordWrap||tableOptions.textWrap,{wordWrap=tableWordWrap}=this.options;if(this.fixedWidth&&wordWrap){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let i=1;for(;i<this.colSpan;)this.fixedWidth+=tableOptions.colWidths[this.x+i],i++}let{wrapOnWordBoundary:tableWrapOnWordBoundary=!0}=tableOptions,{wrapOnWordBoundary=tableWrapOnWordBoundary}=this.options;return this.wrapLines(utils.wordWrap(this.fixedWidth,this.content,wrapOnWordBoundary))}return this.wrapLines(this.content.split(`
@@ -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{findOrganization}from"./chunk-2BI5SSHB.js";import{TEAM_BUDGET,listBudgetProducts}from"./chunk-3VNS4D7V.js";import{BUDGET_SCOPES,OPTION_SCOPES,isBudgetScope}from"./chunk-GQXKF3PR.js";import{getProjectByNameOrId}from"./chunk-3AFEVHHY.js";import{getTeamByIdOrSlug}from"./chunk-NTSJNYRU.js";import{ProjectNotFound,isAPIError}from"./chunk-QFE3RPMA.js";import{getCommandName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";async function resolveBudgetTeam(client){let id=await client.resolveCurrentTeam();if(!id)return output_manager_default.error("No team selected. Use `vercel --scope <team-slug> budget \u2026` or run `vercel switch` first."),null;try{let team=await getTeamByIdOrSlug(client,id);return{id:team.id,slug:team.slug}}catch{return{id,slug:id}}}var SCOPE_OPTIONS={organization:{noun:"an organization slug or ID",resolve:async(_client,organization)=>({value:organizationTarget(organization)})},project:{noun:"a project name or ID",resolve:resolveProject},product:{noun:"a product name or ID",resolve:resolveProduct}};function parseBudgetScopeOptions(opts){let given=OPTION_SCOPES.filter(scope2=>opts[`--${scope2}`]!==void 0);if(given.length>1)return{error:`Can't use --${given[0]} with --${given[1]}.`};if(given.length===0)return{value:null};let scope=given[0],value=opts[`--${scope}`]?.trim();return value?{value:{scope,value}}:{error:`Provide ${SCOPE_OPTIONS[scope].noun} with --${scope}.`}}function parseBudgetFilterOptions(opts){let scope=parseBudgetScopeOptions(opts);if("error"in scope)return scope;let values=(opts["--type"]??[]).flatMap(value=>value.split(",")).map(value=>value.trim());if(values.length===0)return{value:{input:scope.value,types:null}};let unknown=values.find(value=>!isBudgetScope(value));return unknown!==void 0?{error:`Unknown budget type "${unknown}". Expected one of: ${BUDGET_SCOPES.join(", ")}.`}:scope.value?{error:`Can't use --type with --${scope.value.scope}.`}:{value:{input:null,types:BUDGET_SCOPES.filter(type=>values.includes(type))}}}function scopeOptionArgs(input){return input?` --${input.scope} ${quoteArg(input.value)}`:""}function quoteArg(arg){return/\s/.test(arg)?JSON.stringify(arg):arg}function teamTarget(team){return{selector:TEAM_BUDGET,args:"",where:`on team ${team.slug}`,pauses:`all projects on team ${team.slug}`,json:{scope:"team",scopeId:team.id,name:team.slug}}}async function resolveBudgetTarget(client,team,input,{readOnly=!1}={}){return input?SCOPE_OPTIONS[input.scope].resolve(client,team,input.value,readOnly):{value:teamTarget(team)}}function typeFilter(team,types){if(!types)return{selector:void 0,args:"",where:`on team ${team.slug}`,json:{scope:null,scopeId:null,name:null}};let[first]=types;return{selector:{scope:types},args:types.includes("team")||first===void 0?"":` --${first} <${first.toUpperCase()}>`,where:`on team ${team.slug} (type ${types.join(", ")})`,json:{type:types}}}async function resolveBudgetFilter(client,team,{input,types}){return input?resolveBudgetTarget(client,team,input,{readOnly:!0}):{value:typeFilter(team,types)}}async function resolveBudgetOwner(client,input){if(input?.scope==="organization")return resolveOrganization(client,input.value);let team=await resolveBudgetTeam(client);return team?{value:{...team,type:"team"}}:null}async function resolveOrganization(client,value){let found=await findOrganization(client,value);return"error"in found?{error:found.error,usage:!1}:{value:{type:"organization",...found.value}}}function organizationTarget(organization){return{selector:{scope:"organization",orgId:organization.id},args:` --organization ${organization.slug}`,where:`on organization ${organization.slug}`,pauses:null,json:{scope:"organization",scopeId:organization.id,name:organization.slug}}}var PROJECT_ID=/^prj_[A-Za-z0-9]+$/;async function resolveProject(client,team,name,readOnly){let project;try{project=await getProjectByNameOrId(client,name,team.id)}catch(err){if(isAPIError(err))return{error:err.message,usage:!1};throw err}return project instanceof ProjectNotFound&&readOnly&&PROJECT_ID.test(name)?{value:{selector:{scope:"project",scopeId:name},args:` --project ${name}`,where:`on project ${name}`,pauses:`project ${name}`,json:{scope:"project",scopeId:name,name:null}}}:project instanceof ProjectNotFound?{error:`Project "${name}" was not found on team ${team.slug}.`,usage:!1}:{value:{selector:{scope:"project",scopeId:project.id},args:` --project ${project.name}`,where:`on project ${project.name}`,pauses:`project ${project.name}`,json:{scope:"project",scopeId:project.id,name:project.name}}}}var MAX_PRODUCT_SUGGESTIONS=5,PRODUCT_ID=/^prod_[a-z0-9]+$/;async function resolveProduct(client,team,name){let products;try{products=await listBudgetProducts(client)}catch(err){if(isAPIError(err))return{error:err.message,usage:!1};throw err}let lower=name.toLowerCase(),product=products.find(p=>p.id===name)??products.find(p=>p.name.toLowerCase()===lower);if(!product&&PRODUCT_ID.test(name))return{value:{selector:{scope:"product",scopeId:name},args:` --product ${name}`,where:`on product ${name}`,pauses:null,json:{scope:"product",scopeId:name,name:null}}};if(!product){if(products.length===0)return{error:`Team ${team.slug} has no products that can have a budget.`,usage:!0};let similar=products.filter(p=>p.name.toLowerCase().includes(lower)),hint=similar.length>0&&similar.length<=MAX_PRODUCT_SUGGESTIONS?`Did you mean ${similar.map(p=>`"${p.name}"`).join(", ")}?`:`Products that can have one: ${products.map(p=>p.name).sort((a,b)=>a.localeCompare(b)).join(", ")}.`;return{error:`Product "${name}" can't have a budget on team ${team.slug}. ${hint}`,usage:!0}}return{value:{selector:{scope:"product",scopeId:product.id},args:` --product ${product.id}`,where:`on product ${product.name}`,pauses:product.pausable?`${product.name} usage`:null,json:{scope:"product",scopeId:product.id,name:product.name}}}}function rejectUnexpectedArgs(args,command){return args.length===0?!1:(output_manager_default.error(`Unexpected argument "${args[0]}". ${getCommandName(command)} takes options only.`),!0)}function trackScopeOptions(telemetry,opts){for(let scope of OPTION_SCOPES){let method=`trackCliOption${capitalize(scope)}`;telemetry[method](opts[`--${scope}`])}}function capitalize(value){return`${value[0].toUpperCase()}${value.slice(1)}`}export{parseBudgetScopeOptions,parseBudgetFilterOptions,scopeOptionArgs,resolveBudgetTarget,typeFilter,resolveBudgetFilter,resolveBudgetOwner,organizationTarget,rejectUnexpectedArgs,trackScopeOptions};
@@ -4,6 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{RULE_ENVIRONMENTS}from"./chunk-PIDEH4SJ.js";import{AGENT_STATUS}from"./chunk-4SS6W6JK.js";import{warnDeprecatedInput}from"./chunk-FEJD7MRH.js";function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
7
+ import{RULE_ENVIRONMENTS}from"./chunk-T44RB754.js";import{AGENT_STATUS}from"./chunk-NTSJNYRU.js";import{warnDeprecatedInput}from"./chunk-KA2KG3SY.js";function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
8
8
  `);return}client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,projectId:project.id,projectName:project.name,...envelope,message,next},null,2)}
9
9
  `)}var RULE_LIMIT=10,MIN_SAMPLE_RATE=1,MAX_SAMPLE_RATE=100;function isRuleEnvironment(value){return RULE_ENVIRONMENTS.includes(value)}var ENVIRONMENT_ERROR=`\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`,RATE_ERROR=`\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`,EMPTY_PATH_ERROR="`requestPath` cannot be empty.";function parseSampleRate(value){if(!/^\d+$/.test(value.trim()))return;let rate=Number(value);return rate>=MIN_SAMPLE_RATE&&rate<=MAX_SAMPLE_RATE?rate:void 0}function toRow(rule){return{environment:rule.env??"any",requestPath:rule.requestPath??null,sampleRate:Math.round(rule.rate*100)}}function toApiRate(sampleRate){return sampleRate/100}function toRule(row){return{type:"head_sampling",rate:toApiRate(row.sampleRate),...row.environment==="any"?{}:{env:row.environment},...row.requestPath===null?{}:{requestPath:row.requestPath}}}var ALL_PATHS_LABEL="(all paths)";function formatPath(requestPath){return requestPath??ALL_PATHS_LABEL}function formatRate(sampleRate){return`${sampleRate}%`}function formatRuleTarget(environment,requestPath){return`${environment} ${formatPath(requestPath)}`}function formatRuleLine(row){return`${formatRuleTarget(row.environment,row.requestPath)} ${formatRate(row.sampleRate)}`}var COMMAND_WORD_COUNT=3;function subcommandArguments(positional){return positional.slice(COMMAND_WORD_COUNT)}function resolveRuleEnvironment(client,environmentFlag,args){if(environmentFlag===void 0){let[environment,...rest]=args;return environment!==void 0&&isRuleEnvironment(environment)?(warnDeprecatedInput(client,"The environment argument","--environment"),{environment,args:rest}):{environment:void 0,args}}return args[0]!==void 0&&isRuleEnvironment(args[0])?{error:"Can't use an environment argument with --environment. Use --environment."}:{environment:environmentFlag,args}}function hasSameKey(a,b){return a.environment===b.environment&&a.requestPath===b.requestPath}async function readTracingConfig({client,teamId,projectId,projectName}){let config=await client.fetch(`/v1/drains/tracing/config?${new URLSearchParams({projectId})}`,{accountId:teamId}),sampling=config.enabled&&config.sampling.length===0?[{type:"head_sampling",rate:1}]:config.sampling;return{project:{id:projectId,name:projectName},enabled:config.enabled,entries:sampling.map(rule=>({rule,row:toRow(rule)}))}}async function writeSamplingRules({client,teamId,projectId,rules}){await client.fetch(`/v1/drains/tracing/config?${new URLSearchParams({projectId})}`,{accountId:teamId,method:"PUT",body:{enabled:rules.length>0,...rules.length>0?{sampling:rules}:{}}})}export{writeConfigJson,RULE_LIMIT,isRuleEnvironment,ENVIRONMENT_ERROR,RATE_ERROR,EMPTY_PATH_ERROR,parseSampleRate,toApiRate,toRule,formatPath,formatRate,formatRuleTarget,formatRuleLine,subcommandArguments,resolveRuleEnvironment,hasSameKey,readTracingConfig,writeSamplingRules};
@@ -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{external_exports}from"./chunk-2AMO2VMV.js";import{recordLine}from"./chunk-NJFXR3FN.js";import{isAPIError}from"./chunk-QFE3RPMA.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var CONTINUATION_VERSION=1,continuationSchema=external_exports.object({v:external_exports.literal(CONTINUATION_VERSION),event:external_exports.string().min(1),ownerId:external_exports.string().min(1),projectIds:external_exports.array(external_exports.string().min(1)).optional(),timeRange:external_exports.object({start:external_exports.string().min(1),end:external_exports.string().min(1)}),filter:external_exports.string().optional(),order:external_exports.enum(["asc","desc"]),cursor:external_exports.string().min(1)});function encodeContinuation(continuation){let payload={v:CONTINUATION_VERSION,event:continuation.event,ownerId:continuation.ownerId,...continuation.projectIds?{projectIds:[...continuation.projectIds]}:{},timeRange:{start:continuation.timeRange.start,end:continuation.timeRange.end},...continuation.filter!==void 0?{filter:continuation.filter}:{},order:continuation.order,cursor:continuation.cursor};return Buffer.from(JSON.stringify(payload),"utf8").toString("base64url")}function decodeContinuation(token){if(!/^[A-Za-z0-9_-]+$/.test(token))return;let raw;try{raw=JSON.parse(Buffer.from(token,"base64url").toString("utf8"))}catch{return}let parsed=continuationSchema.safeParse(raw);if(!parsed.success)return;let{v:_version,...continuation}=parsed.data;return continuation}var MAX_PAGE_SIZE=1e3,QUERY_REASON_HEADER="x-vercel-observability-query-reason",responseSchema=external_exports.object({events:external_exports.array(external_exports.record(external_exports.string(),external_exports.unknown())),pagination:external_exports.object({hasMore:external_exports.boolean(),nextCursor:external_exports.string().nullable()}),meta:external_exports.object({excludedIntervals:external_exports.array(external_exports.object({start:external_exports.string(),end:external_exports.string()})).optional()}).passthrough().optional()}),InvalidEventsResponseError=class extends Error{constructor(){super("The Observability API returned an invalid events response."),this.name="InvalidEventsResponseError"}},RecordTooLargeError=class extends Error{constructor(){super("A single record exceeds the API response size limit and cannot be returned."),this.name="RecordTooLargeError"}};function isResultTooLarge(err){return isAPIError(err)&&err.status===413&&err.code==="result_too_large"}async function fetchEventsPage(client,request,limit,cursor){let body={event:request.event,scope:{ownerId:request.ownerId,...request.projectIds?{projectIds:[...request.projectIds]}:{}},timeRange:{start:request.timeRange.start,end:request.timeRange.end},select:[...request.select],order:"desc",limit};request.filter&&(body.filter=request.filter),cursor&&(body.cursor=cursor);let params=new URLSearchParams({teamId:request.ownerId}),response=await client.fetch(`/v1/observability/events?${params}`,{method:"POST",headers:{[QUERY_REASON_HEADER]:request.queryReason},body,useCurrentTeam:!1,...request.bailOn429?{bailOn429:!0}:{},...request.gatewayTimeoutRetries!==void 0?{gatewayTimeoutRetries:request.gatewayTimeoutRetries}:{}}),parsed=responseSchema.safeParse(response);if(!parsed.success)throw new InvalidEventsResponseError;return parsed.data}async function*fetchEventPages(client,request,limit,startCursor){let remaining=limit,maxPageSize=MAX_PAGE_SIZE,cursor=startCursor,lastNextCursor=null;for(;remaining>0;){let pageSize=Math.min(remaining,maxPageSize),response;for(;;)try{response=await fetchEventsPage(client,request,pageSize,cursor);break}catch(err){if(!isResultTooLarge(err))throw err;if(pageSize===1)throw new RecordTooLargeError;pageSize=Math.max(1,Math.floor(pageSize/2)),maxPageSize=pageSize}let events=response.events.slice(0,remaining);remaining-=events.length;let{hasMore,nextCursor}=response.pagination,continues=hasMore&&!!nextCursor&&nextCursor!==cursor;if(lastNextCursor=continues?nextCursor:null,yield{events,excludedIntervals:response.meta?.excludedIntervals??[],nextCursor:lastNextCursor},!continues)return{hasMore,nextCursor:null};cursor=nextCursor??void 0}return{hasMore:!0,nextCursor:lastNextCursor}}function sortIntervals(intervals){return[...intervals].sort((a,b)=>Date.parse(a.start)-Date.parse(b.start)||Date.parse(a.end)-Date.parse(b.end))}var import_strip_ansi=__toESM(require_strip_ansi(),1);function recordLine2(type,event){return recordLine(type,event)}function warningLine(warning){let line={type:"warning",reason:warning.reason,message:(0,import_strip_ansi.default)(warning.message),...warning.data?{data:warning.data}:{}};return`${JSON.stringify(line)}
8
+ `}function serializeTimeRange(range){return{start:range.start.toISOString(),end:range.end.toISOString()}}export{encodeContinuation,decodeContinuation,InvalidEventsResponseError,RecordTooLargeError,fetchEventPages,sortIntervals,recordLine2 as recordLine,warningLine,serializeTimeRange};
@@ -0,0 +1,15 @@
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{getNativePackageName}from"./chunk-FXLZM6Q7.js";import{HOMEBREW_UPGRADE_COMMAND,execPackageManager,findTrustedExecutable,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,packageManagerInvocation,requireTrustedUpgradeDirectory,trustedUpgradeEnvironment,withEnvironmentOverrides}from"./chunk-VGSSSQFT.js";import{withDirectoryLock}from"./chunk-TABMJZVW.js";import{progress}from"./chunk-U56NHYAH.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_semver}from"./chunk-BPUANOGW.js";import{require_ci_info}from"./chunk-EYRBV6RM.js";import{getCachedUsername,require_lib}from"./chunk-NJFXR3FN.js";import{pkg_default}from"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_lib2=__commonJS({"../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js"(exports,module){"use strict";var os=__require("os"),paths=__require("path"),isWinOS=/^win/i.test(process.platform);function normalize_path(path){return paths.normalize(paths.join(path,"."))}var base=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TMPDIR||env.TEMP||env.TMP),object},windows=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.USERPROFILE||paths.join(env.HOMEDRIVE,env.HOMEPATH)||env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TEMP||env.TMP||paths.join(env.LOCALAPPDATA||env.SystemRoot||env.windir,"Temp")),object},_OSPaths=class __OSPaths{constructor(){let OSPaths=function(){return new __OSPaths};this._fn=OSPaths;let extension=isWinOS?windows():base();return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _OSPaths}});var require_lib3=__commonJS({"../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js"(exports,module){"use strict";var path=__require("path"),osPaths=require_lib2(),linux=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(osPaths.home()||osPaths.temp(),".cache"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(osPaths.home()||osPaths.temp(),".config"),object.data=()=>process.env.XDG_DATA_HOME||path.join(osPaths.home()||osPaths.temp(),".local","share"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(osPaths.home()||osPaths.temp(),".local","state"),object},macos=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Caches"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Preferences"),object.data=()=>process.env.XDG_DATA_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Application Support"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"State"),object},windows=()=>{let object={};return object.cache=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_CACHE_HOME||path.join(localAppData,"xdg.cache")},object.config=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_CONFIG_HOME||path.join(appData,"xdg.config")},object.data=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_DATA_HOME||path.join(appData,"xdg.data")},object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_STATE_HOME||path.join(localAppData,"xdg.state")},object},_XDGPortable=()=>{let XDGPortable=function(){return _XDGPortable()},extension={};return/^darwin$/i.test(process.platform)?extension=macos():/^win/i.test(process.platform)?extension=windows():extension=linux(),extension.configDirs=()=>{let dirs=[];return dirs.push(extension.config()),process.env.XDG_CONFIG_DIRS&&dirs.push(...process.env.XDG_CONFIG_DIRS.split(path.delimiter)),dirs},extension.dataDirs=()=>{let dirs=[];return dirs.push(extension.data()),process.env.XDG_DATA_DIRS&&dirs.push(...process.env.XDG_DATA_DIRS.split(path.delimiter)),dirs},Object.keys(extension).forEach(key=>{XDGPortable[key]=extension[key]}),XDGPortable};module.exports=_XDGPortable()}});var require_xdg_app_paths=__commonJS({"../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js"(exports,module){"use strict";var path=__require("path"),os=__require("os"),xdg=require_lib3(),isWinOS=/^win/i.test(process.platform);function _normalizeOptions(options,isolated){if(options=options||{},typeof options!="object"&&(options={isolated:options}),options.isolated=options.isolated===void 0||options.isolated===null?isolated:options.isolated,typeof options.isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof options.isolated}`);return options}var base=(name,isolated)=>{let object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.cache(),options.isolated?name:"")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.config(),options.isolated?name:"")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.data(),options.isolated?name:"")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.state(),options.isolated?name:"")),object.configDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.configDirs().map(s=>path.join(s,options.isolated?name:""))),object.dataDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.dataDirs().map(s=>path.join(s,options.isolated?name:""))),object},windows=(name,isolated)=>{let{env}=process,homedir=os.homedir(),tmpdir=os.tmpdir(),appData=env.APPDATA||path.join(homedir||tmpdir,"AppData","Roaming"),localAppData=env.LOCALAPPDATA||path.join(homedir||tmpdir,"AppData","Local"),object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CACHE_HOME?path.join(xdg.cache(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","Cache")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CONFIG_HOME?path.join(xdg.config(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Config")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_DATA_HOME?path.join(xdg.data(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Data")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_STATE_HOME?path.join(xdg.state(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","State")),object.configDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.config(options)];return env.XDG_CONFIG_DIRS&&dirs.push(...env.XDG_CONFIG_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object.dataDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.data(options)];return env.XDG_DATA_DIRS&&dirs.push(...env.XDG_DATA_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object},_XDGAppPaths=class __XDGAppPaths{constructor(options={name:null,suffix:null,isolated:!0}){let XDGAppPaths2=function(options2={name:null,suffix:null,isolated:!0}){return new __XDGAppPaths(options2)};this._fn=XDGAppPaths2,options=options||{},typeof options!="object"&&(options={name:options});let name=options.name||"";if(typeof name!="string")throw new TypeError(`Expected string for "name" argument, got ${typeof name}`);let suffix=options.suffix||"";if(typeof suffix!="string")throw new TypeError(`Expected string for "suffix" argument, got ${typeof suffix}`);let isolated=options.isolated===void 0||options.isolated===null?!0:options.isolated;if(typeof isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof isolated}`);name||(name=path.parse(process.pkg?process.execPath:__require.main?__require.main.filename:process.argv[0]).name),suffix&&(name+=suffix),this._fn.$name=()=>name,this._fn.$isolated=()=>isolated;let extension=isWinOS?windows(name,isolated):base(name,isolated);return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _XDGAppPaths}});var require_fetch_dist_tags=__commonJS({"src/util/get-latest-version/fetch-dist-tags.cjs"(exports,module){"use strict";var https=__require("https");function fetchDistTags(name,options){let timeout=options&&options.timeout||3e3,agent=new https.Agent({keepAlive:!0,maxSockets:15}),headers={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},url=`https://registry.npmjs.org/-/package/${name}/dist-tags`;return new Promise(resolve2=>{let timer=setTimeout(()=>{req.destroy(),resolve2(void 0)},timeout),req=https.get(url,{agent,headers},res=>{let buf="";res.on("data",chunk=>{buf+=chunk}),res.on("end",()=>{clearTimeout(timer);try{if(res.statusCode&&res.statusCode>=400){resolve2(void 0);return}resolve2(JSON.parse(buf))}catch{resolve2(void 0)}})});req.on("error",()=>{clearTimeout(timer),resolve2(void 0)})})}module.exports={fetchDistTags}}});function getWhoamiCachedAnswer(args,authConfig){return args.includes("--cached")?getCachedUsername(authConfig):void 0}var import_semver=__toESM(require_semver(),1);import{spawn}from"child_process";function renderUpgradeProgress(current,total,phase){let bar=progress(current,total);output_manager_default.spinner(bar?`Upgrading Vercel CLI [${bar}] (${current}/${total})${phase?` ${phase}`:""}`:phase||"Upgrading Vercel CLI\u2026",0)}function packageManagerEnvironment(packageManager,env){return withEnvironmentOverrides(env,getUpgradePackageManager(packageManager).env)}async function requireExecutable(name,env){let executable=await findTrustedExecutable(name,env);if(!executable)throw new Error(`${name} is not in a directory that PATH names in full`);return executable}async function execFileStdout(packageManager,args,cwd,env=trustedUpgradeEnvironment){return execPackageManager(await requireExecutable(packageManager,env),args,{cwd,env:packageManagerEnvironment(packageManager,env),timeout:15e3})}function parseVersionOutput(stdout){for(let line of[stdout.trim(),...stdout.trim().split(`
8
+ `).reverse()])try{let value=JSON.parse(line),parsed=Array.isArray(value)&&value.length===1?value[0]:value,version=typeof parsed=="string"?parsed:typeof parsed?.data=="string"?parsed.data:void 0;if(version&&import_semver.default.valid(version))return version}catch{let version=line.trim();if(import_semver.default.valid(version))return version}}async function getLatestPackageVersion(packageManager,installArgs,cwd,global,env,bypassMinReleaseAge=!0){let packageSpecifier=installArgs.find(arg=>arg.endsWith("@latest"));if(!packageSpecifier)return;let manager=getUpgradePackageManager(packageManager),queryArgs=[...manager.metadataArgs(packageSpecifier),...bypassMinReleaseAge?manager.releaseAgeBypassArgs:[]];try{let stdout=await execFileStdout(packageManager,queryArgs,cwd,env);return parseVersionOutput(stdout)}catch(error){output_manager_default.debug(`Failed to resolve the latest Vercel CLI version: ${error instanceof Error?error.message:String(error)}`);return}}async function getInstalledPackageVersion(packageManager,installArgs,cwd,global){let packageSpecifier=installArgs.find(arg=>arg.endsWith("@latest"));if(!packageSpecifier)return;let packageName=packageSpecifier.slice(0,-7);try{let stdout=await execFileStdout(packageManager,["list",packageName,"--depth=0","--json",...global?["--global"]:[]],cwd),parsed=JSON.parse(stdout),projects=Array.isArray(parsed)?parsed:[parsed];for(let project of projects){let version=project?.dependencies?.[packageName]?.version??project?.devDependencies?.[packageName]?.version??project?.optionalDependencies?.[packageName]?.version;if(typeof version=="string"&&import_semver.default.valid(version))return version}}catch(error){output_manager_default.debug(`Failed to read the installed Vercel CLI version: ${error instanceof Error?error.message:String(error)}`)}}function isVersionCurrent(current,latest){return import_semver.default.valid(current)&&import_semver.default.valid(latest)?import_semver.default.gte(current,latest):current===latest}function pinPackageVersion(args,version){return args.map(arg=>arg.endsWith("@latest")?`${arg.slice(0,-6)}${version}`:arg)}async function getMinReleaseAgeContext(packageManager,cwd,global){let setting=packageManager==="pnpm"?"minimumReleaseAge":"min-release-age";try{let raw=(await execFileStdout(packageManager,["config","get",setting,"--json",...global?["--global"]:[]],cwd)).trim(),value=raw===""||raw==="undefined"?void 0:JSON.parse(raw);if(!(value==null||value===""||value==="undefined")){let age=typeof value=="number"||typeof value=="string"&&value.trim()!==""?Number(value):NaN;if(!Number.isFinite(age)||age<0)return`Could not determine ${packageManager}'s configured minimum release age.`;let minutes=packageManager==="pnpm"?age:age*1440,duration=minutes>0&&minutes%60===0?`${minutes/60} ${minutes===60?"hour":"hours"}`:`${minutes} ${minutes===1?"minute":"minutes"}`;return`${packageManager} ${setting} is configured to ${duration}.`}if(packageManager==="pnpm"){let version=parseVersionOutput(await execFileStdout(packageManager,["--version"],cwd));if(version&&!import_semver.default.prerelease(version)&&import_semver.default.gte(version,"11.0.0"))return`pnpm ${version} defaults to a minimum release age of 24 hours (1440 minutes); no explicit minimumReleaseAge setting was reported.`}return`${packageManager} did not report a configured minimum release age.`}catch{return`Could not determine ${packageManager}'s configured minimum release age.`}}function isMinReleaseAgeError(packageManager,stdout,stderr){let installerOutput=`${stdout}
9
+ ${stderr}`;return packageManager==="pnpm"?installerOutput.includes("ERR_PNPM_NO_MATURE_MATCHING_VERSION")||installerOutput.includes("ERR_PNPM_NO_MATCHING_VERSION")&&installerOutput.includes("satisfies the specs but was released at"):packageManager==="npm"?/\bETARGET\b/.test(installerOutput)&&installerOutput.includes("with a date before")||/min-release-age cannot be provided/i.test(installerOutput):!1}function setMinReleaseAgeBypass(client,enabled){client.config={...client.config,updates:{...client.config.updates,bypassMinReleaseAge:enabled}},client.writeToConfigFile()}async function executeHomebrewUpgrade(env=trustedUpgradeEnvironment){let[brew,...args]=HOMEBREW_UPGRADE_COMMAND.split(" "),cwd=requireTrustedUpgradeDirectory();output_manager_default.debug(`Executing: ${HOMEBREW_UPGRADE_COMMAND}`);let executable=await requireExecutable(brew,env).catch(error=>error),result=await new Promise(resolve2=>{if(typeof executable!="string"){resolve2({code:1,spawnError:executable});return}let settled=!1,brewProcess=spawn(executable,args,{cwd,env:{...env},stdio:"inherit",shell:!1});brewProcess.on("error",spawnError=>{settled||(settled=!0,resolve2({code:1,spawnError}))}),brewProcess.on("close",code=>{settled||(settled=!0,resolve2({code:code??1}))})});return result.spawnError?(output_manager_default.error(`Failed to run Homebrew: ${result.spawnError.message}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`),1):(result.code!==0&&(output_manager_default.error(`Homebrew upgrade failed with exit code ${result.code}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`)),result.code)}function executeAutomaticUpgrade(client,env=trustedUpgradeEnvironment){return executeUpgrade("latest",client,!1,!0,env,"package-manager")}async function executeUpgrade(targetVersion,client,bypassMinReleaseAge=!1,explicitTarget=!1,env=trustedUpgradeEnvironment,releaseAgePolicy="newest",outcome){let totalSteps=targetVersion?2:3;renderUpgradeProgress(0,totalSteps,"Resolving installer\u2026");let{command:updateCommand,global,packageManager}=await getUpdateCommandInfo(env).catch(error=>{throw output_manager_default.stopSpinner(),error}),[command,...args]=updateCommand.split(" "),cwd=global?requireTrustedUpgradeDirectory():process.cwd(),executable=await requireExecutable(command,env).catch(error=>error),bypassArgs=getUpgradePackageManager(packageManager).releaseAgeBypassArgs;if(bypassMinReleaseAge&&bypassArgs.length===0)return output_manager_default.stopSpinner(),output_manager_default.error(`Minimum release-age bypass is not supported for ${packageManager}. Run the upgrade without --bypass-min-release-age, or configure release-age settings in ${packageManager} directly.`),1;bypassMinReleaseAge&&client&&client.config.updates?.bypassMinReleaseAge!==!0&&setMinReleaseAgeBypass(client,!0);let versionBefore=pkg_default.version,installLatestTag=explicitTarget&&targetVersion==="latest",resolvedTargetVersion=installLatestTag?void 0:targetVersion;if(targetVersion||(renderUpgradeProgress(1,totalSteps,"Checking for updates\u2026"),resolvedTargetVersion=await getLatestPackageVersion(packageManager,args,cwd,global,env,releaseAgePolicy==="newest")),!resolvedTargetVersion&&!installLatestTag)return output_manager_default.stopSpinner(),output_manager_default.error("Failed to resolve the latest Vercel CLI version."),1;if(!explicitTarget&&resolvedTargetVersion&&isVersionCurrent(versionBefore,resolvedTargetVersion))return renderUpgradeProgress(totalSteps,totalSteps),output_manager_default.stopSpinner(),output_manager_default.log(`No upgrade available. Vercel CLI is already up to date (v${versionBefore}).`),0;let installArgs=resolvedTargetVersion?pinPackageVersion(args,resolvedTargetVersion):args,shouldBypass=releaseAgePolicy==="newest"&&bypassArgs.length>0&&(bypassMinReleaseAge||client?.config.updates?.bypassMinReleaseAge===!0);shouldBypass&&(installArgs=[...installArgs,...bypassArgs]);let runInstall=currentArgs=>{let installCommand=[command,...currentArgs].join(" ");return output_manager_default.debug(`Executing: ${installCommand} (cwd: ${cwd})`),new Promise(resolve2=>{let stdout=[],stderr=[],invocation;try{if(typeof executable!="string")throw executable;invocation=packageManagerInvocation(executable,currentArgs,env)}catch(spawnError){resolve2({code:1,stdout:"",stderr:"",spawnError});return}let upgradeProcess=spawn(invocation.file,invocation.args,{cwd,env:packageManagerEnvironment(packageManager,env),stdio:["inherit","pipe","pipe"],shell:!1,windowsVerbatimArguments:invocation.windowsVerbatimArguments});upgradeProcess.stdout?.on("data",data=>{stdout.push(Uint8Array.from(data)),output_manager_default.debug(`[upgrade stdout] ${data.toString().trimEnd()}`)}),upgradeProcess.stderr?.on("data",data=>{stderr.push(Uint8Array.from(data)),output_manager_default.debug(`[upgrade stderr] ${data.toString().trimEnd()}`)});let settled=!1;upgradeProcess.on("error",spawnError=>{settled||(settled=!0,resolve2({code:1,stdout:"",stderr:"",spawnError}))}),upgradeProcess.on("close",code=>{settled||(settled=!0,resolve2({code:code??1,stdout:Buffer.concat(stdout).toString(),stderr:Buffer.concat(stderr).toString()}))})})};renderUpgradeProgress(targetVersion?1:2,totalSteps,"Installing\u2026");let result=await runInstall(installArgs),usedAllowedRelease=!1;if(result.code!==0&&!result.spawnError&&releaseAgePolicy==="newest"&&!shouldBypass&&bypassArgs.length>0&&isMinReleaseAgeError(packageManager,result.stdout,result.stderr)){let context=await getMinReleaseAgeContext(packageManager,cwd,global);output_manager_default.stopSpinner();let blockedMessage=`The package manager blocked this Vercel CLI release because of its minimum release-age setting. ${context}`;if(!client||client.nonInteractive||!client.stdin.isTTY)return output_manager_default.error(`${blockedMessage}
10
+ To install the newest release allowed by your settings:
11
+ vc upgrade latest
12
+ To bypass the minimum release age for this and future foreground upgrades:
13
+ vc upgrade --bypass-min-release-age`),outcome&&(outcome.releaseAgeBlocked=!0),1;output_manager_default.print(`! ${blockedMessage}
14
+ `);let action=await client.input.select({message:"Which upgrade option?",choices:[{name:"Install the newest release allowed by my settings",value:"allowed"},{name:"Bypass the minimum release age for this and future foreground upgrades",value:"bypass"},{name:"Cancel",value:"cancel"}],default:"allowed"});if(action==="allowed")resolvedTargetVersion=void 0,installArgs=args,usedAllowedRelease=!0;else if(action==="bypass")setMinReleaseAgeBypass(client,!0),output_manager_default.log("To restore release-age checks, run `vc upgrade --no-bypass-min-release-age`."),installArgs=[...installArgs,...bypassArgs];else return output_manager_default.log("Upgrade canceled."),0;renderUpgradeProgress(targetVersion?1:2,totalSteps,"Installing\u2026"),result=await runInstall(installArgs)}return result.spawnError?(output_manager_default.stopSpinner(),output_manager_default.error(`Failed to execute upgrade command: ${result.spawnError.message}`),output_manager_default.log(`You can try running the command manually: ${[command,...installArgs].join(" ")}`),1):result.code!==0?(output_manager_default.stopSpinner(),result.stdout&&output_manager_default.print(result.stdout),result.stderr&&output_manager_default.print(result.stderr),output_manager_default.error(`Upgrade failed with exit code ${result.code}`),output_manager_default.log(`You can try running the command manually: ${[command,...installArgs].join(" ")}`),result.code):usedAllowedRelease&&(resolvedTargetVersion=await getInstalledPackageVersion(packageManager,args,cwd,global),resolvedTargetVersion===versionBefore)?(output_manager_default.stopSpinner(),output_manager_default.log(`Vercel CLI remains at v${versionBefore} under your package manager settings.`),0):(renderUpgradeProgress(totalSteps,totalSteps),output_manager_default.stopSpinner(),output_manager_default.success(resolvedTargetVersion?`Upgraded Vercel CLI to v${resolvedTargetVersion}.`:"Upgraded Vercel CLI."),0)}var import_semver2=__toESM(require_semver(),1),import_ci_info=__toESM(require_ci_info(),1),import_xdg_app_paths=__toESM(require_xdg_app_paths(),1),import_fs_extra=__toESM(require_lib(),1);import{randomUUID}from"node:crypto";import{mkdir,rename,rm,writeFile}from"node:fs/promises";import{dirname,isAbsolute,relative,resolve}from"node:path";import{spawn as spawn2}from"node:child_process";var NATIVE_UPDATE_CHILD_ENV="VERCEL_NATIVE_UPDATE_CHILD",NATIVE_UPDATE_VERSION_ENV="VERCEL_NATIVE_UPDATE_VERSION",NATIVE_UPDATE_SELECT_PRODUCTION_ENV="VERCEL_NATIVE_UPDATE_SELECT_PRODUCTION";function isNativeUpdateChild(){return process.env[NATIVE_UPDATE_CHILD_ENV]==="1"}function spawnDetachedUpdate(env){let child=spawn2(process.execPath,["version","check"],{detached:!0,stdio:"ignore",windowsHide:!0,env});child.on("error",()=>{}),child.unref()}function spawnNativeUpdateCheck(){let env={...process.env,[NATIVE_UPDATE_CHILD_ENV]:"1",[NATIVE_UPDATE_SELECT_PRODUCTION_ENV]:"0"};delete env[NATIVE_UPDATE_VERSION_ENV],spawnDetachedUpdate(env)}function spawnNativeUpdateChild(version,selectProduction){spawnDetachedUpdate({...process.env,[NATIVE_UPDATE_CHILD_ENV]:"1",[NATIVE_UPDATE_VERSION_ENV]:version,[NATIVE_UPDATE_SELECT_PRODUCTION_ENV]:selectProduction?"1":"0"})}var NATIVE_UPDATE_CHECK_INTERVAL=1e3*60*60*24,NATIVE_UPDATE_DISCOVERY_LEASE=1e3*60;function isNativeAutoUpdateEnabled(config){return config.updates?.auto!==!1}var CACHE_LOCK_RETRY_MS=10,CACHE_LOCK_ABANDONED_MS=1e4;function getNativeUpdateCacheFile(cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache()){let packageName=getNativePackageName().replaceAll("/","-");return resolve(cacheDir,"package-updates",`${packageName}-latest.json`)}function readNativeUpdateCache(cacheDir){try{let cache=(0,import_fs_extra.readJSONSync)(getNativeUpdateCacheFile(cacheDir));if(typeof cache?.expireAt=="number"&&(cache.version===void 0||typeof cache.version=="string"&&import_semver2.default.valid(cache.version)))return cache}catch{}}async function atomicWriteCache(cacheDir,cache){let cacheFile=getNativeUpdateCacheFile(cacheDir);await mkdir(dirname(cacheFile),{recursive:!0});let temporary=`${cacheFile}.tmp-${randomUUID()}`;await writeFile(temporary,`${JSON.stringify(cache)}
15
+ `);try{await rename(temporary,cacheFile)}catch(error){throw await rm(temporary,{force:!0}),error}}async function withNativeUpdateCacheLock(cacheDir,action,{waitMs=5e3}={}){let lock=`${getNativeUpdateCacheFile(cacheDir)}.lock`;await withDirectoryLock(lock,action,{waitMs,retryMs:CACHE_LOCK_RETRY_MS,abandonedAfterMs:CACHE_LOCK_ABANDONED_MS,busyMessage:path=>`Timed out waiting for the native update cache. If no Vercel update is running, remove the lock at ${path} and retry.`})}async function cacheNativeUpdateVersion(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now(),selectProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir),keepNewerExisting=!!(existing?.version&&import_semver2.default.gt(existing.version,version)),nextVersion=keepNewerExisting?existing?.version:version,shouldSelectProduction=selectProduction||existing?.selectProduction===!0,staged=shouldSelectProduction?!1:keepNewerExisting||existing?.version===version?existing?.staged===!0:!1;await atomicWriteCache(cacheDir,{expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,selectProduction:shouldSelectProduction,staged,version:nextVersion})})}async function cacheNativeUpdateDiscoveryAttempt({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir);await atomicWriteCache(cacheDir,{...existing,discoveryStartedAt:now,expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,staged:existing?.selectProduction===!0?existing.staged===!0:!0})})}async function restoreNativeUpdateAfterDiscoveryFailure({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,staged:!1})})}async function markNativeUpdateStaged(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),selectedProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version===version&&(cache.selectProduction!==!0||selectedProduction)&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,selectProduction:!1,staged:!0})})}function isWithinInstallRoot(executablePath,installRoot){let pathFromRoot=relative(resolve(installRoot),resolve(executablePath));return pathFromRoot!==""&&pathFromRoot!==".."&&!pathFromRoot.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!isAbsolute(pathFromRoot)}function scheduleNativeAutoUpdate(client,exitCode,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),executablePath=process.execPath,installRoot=getInstallRoot(),now=Date.now()}={}){if(exitCode!==0||import_ci_info.default.isCI||client.isAgent||client.nonInteractive||isNativeUpdateChild()||!isNativeBinaryInstall()||!isWithinInstallRoot(executablePath,installRoot))return;let cache=readNativeUpdateCache(cacheDir);if(!isNativeAutoUpdateEnabled(client.config)&&cache?.selectProduction!==!0)return;if(!cache?.expireAt||cache.expireAt<=now){spawnNativeUpdateCheck();return}let abandonedDiscovery=!!(cache.version&&cache.staged===!0&&cache.discoveryStartedAt&&cache.discoveryStartedAt+NATIVE_UPDATE_DISCOVERY_LEASE<=now);cache.version&&(cache.staged!==!0||abandonedDiscovery)&&spawnNativeUpdateChild(cache.version,cache.selectProduction===!0)}var import_ci_info2=__toESM(require_ci_info(),1);function isAutoUpdateEnabled(config){return config.updates?.auto===!0}function hasAutoUpdatePreference(config){return typeof config.updates?.auto=="boolean"}function setAutoUpdate(client,enabled){client.config={...client.config,updates:{...client.config.updates,auto:enabled}},client.writeToConfigFile()}async function canAutoUpdate(client,exitCode,command){return isNativeBinaryInstall()||!isAutoUpdateEnabled(client.config)||exitCode!==0||import_ci_info2.default.isCI||client.nonInteractive||client.isAgent||command==="upgrade"?!1:isGlobal()}export{require_xdg_app_paths,require_fetch_dist_tags,getWhoamiCachedAnswer,pinPackageVersion,setMinReleaseAgeBypass,executeHomebrewUpgrade,executeAutomaticUpgrade,executeUpgrade,NATIVE_UPDATE_VERSION_ENV,NATIVE_UPDATE_SELECT_PRODUCTION_ENV,isNativeUpdateChild,spawnNativeUpdateChild,isNativeAutoUpdateEnabled,cacheNativeUpdateVersion,cacheNativeUpdateDiscoveryAttempt,restoreNativeUpdateAfterDiscoveryFailure,markNativeUpdateStaged,scheduleNativeAutoUpdate,isAutoUpdateEnabled,hasAutoUpdatePreference,setAutoUpdate,canAutoUpdate};
@@ -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{isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_lib}from"./chunk-NJFXR3FN.js";import{packageName}from"./chunk-B4KA3ZH2.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_fs_extra=__toESM(require_lib(),1);import{access as access2}from"fs/promises";import{basename,dirname as dirname2,join as join2,sep}from"path";import{execFile,spawnSync}from"child_process";import{win32}from"path";var SAFE_ARGUMENT=/^[\w@./:=+-]+$/,UNSAFE_EXECUTABLE_PATH=/["%!^&|<>\x00-\x1f]/;function envValue(env,name){let key=Object.keys(env).find(key2=>key2.toLowerCase()===name.toLowerCase());return key?env[key]:void 0}function packageManagerInvocation(command,args,env=process.env,platform=process.platform){if(platform!=="win32")return{file:command,args};let absolute=win32.isAbsolute(command);for(let arg of[command,...args])if(!(absolute&&arg===command?!UNSAFE_EXECUTABLE_PATH.test(arg):SAFE_ARGUMENT.test(arg)))throw new Error(`Refusing to pass ${JSON.stringify(arg)} to cmd.exe for ${command}`);let systemRoot=envValue(env,"SystemRoot");return{file:envValue(env,"ComSpec")||(systemRoot?`${systemRoot}\\System32\\cmd.exe`:"cmd.exe"),args:["/d","/s","/c",`"${[absolute?`"${command}"`:command,...args].join(" ")}"`],windowsVerbatimArguments:!0}}function execPackageManager(command,args,{cwd,env,timeout,signal},platform=process.platform){return new Promise((resolve,reject)=>{let invocation=packageManagerInvocation(command,args,env,platform),windows=platform==="win32",timer,stop=()=>stopProcessTree(child,env),child=execFile(invocation.file,invocation.args,{encoding:"utf8",windowsHide:!0,windowsVerbatimArguments:invocation.windowsVerbatimArguments,cwd,env:{...env},...windows?{}:{timeout,signal}},(error,stdout)=>{clearTimeout(timer),signal?.removeEventListener("abort",stop),error?reject(error):resolve(String(stdout))});windows&&(timer=setTimeout(stop,timeout),signal?.aborted?stop():signal?.addEventListener("abort",stop,{once:!0}))})}function stopProcessTree(child,env){if(!child?.pid)return;let systemRoot=envValue(env,"SystemRoot");spawnSync(systemRoot?`${systemRoot}\\System32\\taskkill.exe`:"taskkill.exe",["/pid",String(child.pid),"/T","/F"],{stdio:"ignore",windowsHide:!0})}import{constants}from"node:fs";import{access,stat}from"node:fs/promises";import path from"node:path";var DEFAULT_WINDOWS_EXTENSIONS=".COM;.EXE;.BAT;.CMD",WINDOWS_ABSOLUTE=/^(?:[a-zA-Z]:[\\/]|[\\/]{2}[^\\/])/;async function isExecutableFile(file){try{return(await stat(file)).isFile()?(process.platform!=="win32"&&await access(file,constants.X_OK),!0):!1}catch{return!1}}function envValue2(env,name,platform){if(platform!=="win32")return env[name];let key=Object.keys(env).find(key2=>key2.toLowerCase()===name.toLowerCase());return key?env[key]:void 0}async function findTrustedExecutable(name,env,platform=process.platform,isExecutable=isExecutableFile){let windows=platform==="win32",{delimiter,join:join3}=windows?path.win32:path.posix,isAbsolute=windows?directory=>WINDOWS_ABSOLUTE.test(directory):path.posix.isAbsolute,extensions=windows?(envValue2(env,"PATHEXT",platform)||DEFAULT_WINDOWS_EXTENSIONS).split(";").filter(Boolean):[""];for(let directory of(envValue2(env,"PATH",platform)??"").split(delimiter))if(isAbsolute(directory))for(let extension of extensions){let file=join3(directory,`${name}${extension}`);if(await isExecutable(file))return file}return null}import{lstatSync,realpathSync}from"node:fs";import{homedir,tmpdir,userInfo}from"node:os";import path2 from"node:path";var trustedUpgradeEnvironment=Object.freeze({...process.env});function read(directory){try{return directory()}catch{return}}var startupDirectories={temporary:read(tmpdir),runtime:process.env.XDG_RUNTIME_DIR,home:read(homedir),accountHome:()=>read(()=>userInfo().homedir)},fileSystem={realpath:realpathSync.native,stat:lstatSync},SHARED_WRITE=18;function isPrivateDirectory(directory,uid,stat2){let own=stat2(directory);if(!own.isDirectory()||own.uid!==uid)return!1;for(let current=directory;;){let{uid:owner,mode}=stat2(current);if(owner!==uid&&owner!==0||mode&SHARED_WRITE)return!1;let parent=path2.dirname(current);if(parent===current)return!0;current=parent}}function findPrivateDirectory(candidates,uid,{realpath:realpath2,stat:stat2}=fileSystem){for(let candidate of candidates)if(!(!candidate||!path2.isAbsolute(candidate)))try{let directory=realpath2(candidate);if(isPrivateDirectory(directory,uid,stat2))return directory}catch{}}function findWindowsDirectory({temporary,home},{realpath:realpath2}){let{isAbsolute,relative}=path2.win32;if(!(!home||!isAbsolute(home))){try{if(temporary&&isAbsolute(temporary)){let inside=relative(realpath2(home),realpath2(temporary));if(inside&&!inside.startsWith("..")&&!isAbsolute(inside))return temporary}}catch{}return home}}function resolveTrustedUpgradeDirectory(candidates,uid,reader=fileSystem){if(uid===void 0)return findWindowsDirectory(candidates,reader);let{temporary,runtime,home,accountHome}=candidates;return findPrivateDirectory([temporary,runtime,home],uid,reader)??findPrivateDirectory([accountHome?.()],uid,reader)}var trustedUpgradeDirectory;function getTrustedUpgradeDirectory(){return trustedUpgradeDirectory??={path:resolveTrustedUpgradeDirectory(startupDirectories,process.getuid?.())},trustedUpgradeDirectory.path}function withEnvironmentOverrides(env,overrides){let names=new Set(Object.keys(overrides).map(name=>name.toLowerCase())),result={};for(let[name,value]of Object.entries(env))names.has(name.toLowerCase())||(result[name]=value);return Object.assign(result,overrides)}import{dirname,join}from"path";var sharedEnv={COREPACK_ENABLE_PROJECT_SPEC:"0",NODE_DISABLE_COMPILE_CACHE:"1",DISABLE_V8_COMPILE_CACHE:"1"},packageManagers={npm:{metadataArgs:specifier=>["view",specifier,"version","--json","--global"],installArgs:specifier=>["i","-g",specifier],releaseAgeBypassArgs:["--min-release-age=0"],env:sharedEnv,globalDetection:{args:["root","-g"],packageDir:(root,pkg)=>join(root,pkg),installMarkers:nodeModules=>[join(nodeModules,".package-lock.json")]}},pnpm:{metadataArgs:specifier=>["view",specifier,"version","--json"],installArgs:specifier=>["i","-g",specifier],releaseAgeBypassArgs:["--config.minimumReleaseAge=0"],env:{...sharedEnv,npm_config_manage_package_manager_versions:"false",pnpm_config_pm_on_fail:"ignore"},globalDetection:{args:pkg=>["list","-g",pkg,"--depth=0","--json"],packageDir:(output,pkg)=>{try{let projects=JSON.parse(output),path3=(Array.isArray(projects)?projects[0]:projects)?.dependencies?.[pkg]?.path;return typeof path3=="string"?path3:void 0}catch{return}},installMarkers:nodeModules=>[join(nodeModules,".modules.yaml")]}},yarn:{metadataArgs:specifier=>["info",specifier.endsWith("@latest")?specifier.slice(0,-7):specifier,"version","--json"],installArgs:specifier=>["global","add",specifier],releaseAgeBypassArgs:[],env:{...sharedEnv,YARN_IGNORE_PATH:"1",SKIP_YARN_COREPACK_CHECK:"1"},globalDetection:{args:["--silent","global","dir"],packageDir:(root,pkg)=>join(root,"node_modules",pkg),installMarkers:nodeModules=>[join(nodeModules,".yarn-integrity")]}},bun:{metadataArgs:specifier=>["info",specifier,"version","--json","--global"],installArgs:specifier=>["add","-g",specifier],releaseAgeBypassArgs:[],env:sharedEnv,globalDetection:{args:["pm","bin","-g"],binaryNames:["vercel","vc"],installMarkers:nodeModules=>[join(dirname(nodeModules),"bun.lock"),join(dirname(nodeModules),"bun.lockb")]}}};function getUpgradePackageManager(name){return packageManagers[name]}var UnsupportedUpgradeInstallError=class extends Error{constructor(){super(...arguments);this.code="unsupported_install"}},HOMEBREW_UPGRADE_COMMAND="brew upgrade vercel",HomebrewInstallError=class extends UnsupportedUpgradeInstallError{constructor(){super(`This Vercel CLI was installed with Homebrew. Update it with \`${HOMEBREW_UPGRADE_COMMAND}\`.`);this.code="homebrew_install"}};async function isHomebrewInstall(){return isNativeBinaryInstall()?(await(0,import_fs_extra.realpath)(process.execPath).catch(()=>process.execPath)).includes(`${sep}Caskroom${sep}vercel${sep}`):!1}var globalCliTypes=["npm","pnpm","yarn","bun"];function requireTrustedUpgradeDirectory(){let directory=getTrustedUpgradeDirectory();if(!directory)throw new UnsupportedUpgradeInstallError("Can't run a package manager to check or update Vercel CLI. Other users can write to the temporary directory and to your home directory. Update Vercel CLI with the package manager that installed it.");return directory}async function exists(file){try{return await access2(file),!0}catch{return!1}}async function findInstallMarkers(installPaths,cliTypes=globalCliTypes){let found=[];for(let installPath of new Set(installPaths))for(let dir=dirname2(installPath);;){if(basename(dir)==="node_modules")for(let cliType of cliTypes){let{installMarkers}=getUpgradePackageManager(cliType).globalDetection;if(!found.includes(cliType)){for(let marker of installMarkers(dir))if(await exists(marker)){found.push(cliType);break}}}let parent=dirname2(dir);if(parent===dir)break;dir=parent}return found}function throwIfAborted(signal){if(signal?.aborted)throw signal.reason instanceof Error?signal.reason:new Error("Package manager detection was aborted")}async function getPackageManagerGlobalRoot(cliType,pkg,env=trustedUpgradeEnvironment,signal){try{let manager=getUpgradePackageManager(cliType),detection=manager.globalDetection,cwd=getTrustedUpgradeDirectory(),executable=await findTrustedExecutable(cliType,env);return!cwd||!executable?null:(await execPackageManager(executable,typeof detection.args=="function"?detection.args(pkg):detection.args,{cwd,env:withEnvironmentOverrides(env,manager.env),timeout:15e3,signal})).trim()||null}catch{return throwIfAborted(signal),null}}async function detectGlobalPackageManager(installPath,pkg,cliTypes=globalCliTypes,env=trustedUpgradeEnvironment,signal){for(let cliType of cliTypes){throwIfAborted(signal);let root=await getPackageManagerGlobalRoot(cliType,pkg,env,signal);if(!root)continue;let detection=getUpgradePackageManager(cliType).globalDetection;if(detection.packageDir)try{let packageDir=detection.packageDir(root,pkg);if(!packageDir)continue;let resolvedPackageDir=await(0,import_fs_extra.realpath)(packageDir);if(installPath===resolvedPackageDir||installPath.startsWith(resolvedPackageDir+sep))return cliType}catch{}for(let binary of detection.binaryNames||[])try{let target=await(0,import_fs_extra.realpath)(join2(root,binary));if(target===installPath||target.startsWith(installPath+sep)||installPath.startsWith(target+sep))return cliType;let entrypoint=await(0,import_fs_extra.realpath)(process.argv[1]);if(!isNativeBinaryInstall()&&target===entrypoint)return cliType}catch{}}return null}async function resolveInstall(env=trustedUpgradeEnvironment,signal){if(throwIfAborted(signal),await isHomebrewInstall())throw new HomebrewInstallError;let nativeExecutable=isNativeBinaryInstall()&&env.VERCEL_CLI_PACKAGE_EXECUTABLE,resolvedNativeExecutable=nativeExecutable&&await(0,import_fs_extra.realpath)(nativeExecutable).catch(()=>null),entrypoint=resolvedNativeExecutable&&resolvedNativeExecutable===await(0,import_fs_extra.realpath)(process.execPath).catch(()=>null)?env.VERCEL_CLI_PACKAGE_ENTRYPOINT:process.argv[1],installPath=entrypoint&&await(0,import_fs_extra.realpath)(entrypoint).catch(()=>null);if(!installPath)throw new UnsupportedUpgradeInstallError("Could not resolve this Vercel CLI installation. Update it with the package manager that installed it.");requireTrustedUpgradeDirectory();let marked=await findInstallMarkers([entrypoint,installPath]),packageManager=await detectGlobalPackageManager(installPath,packageName,marked.length>0?marked:globalCliTypes,env,signal);if(!packageManager)throw new UnsupportedUpgradeInstallError("Could not detect a supported global npm, pnpm, Yarn, or Bun installation of Vercel CLI. Update it with the package manager that installed it.");return{packageManager,global:!0,assumed:!1}}async function isGlobal(){if(await isHomebrewInstall())return!0;try{return await resolveInstall(),!0}catch{return!1}}async function getUpdateCommandInfo(env=trustedUpgradeEnvironment,signal){let{packageManager}=await resolveInstall(env,signal),args=getUpgradePackageManager(packageManager).installArgs(`${packageName}@latest`),allowBuild=pnpmAllowBuildFlag(packageManager,"esbuild");return{command:`${packageManager} ${args.join(" ")}${allowBuild}`,global:!0,packageManager,assumed:!1}}function pnpmAllowBuildFlag(cliType,pkg){return cliType==="pnpm"?` --allow-build=${pkg}`:""}async function getUpdateCommand(){return await isHomebrewInstall()?HOMEBREW_UPGRADE_COMMAND:(await getUpdateCommandInfo()).command}export{packageManagerInvocation,execPackageManager,findTrustedExecutable,trustedUpgradeEnvironment,withEnvironmentOverrides,getUpgradePackageManager,HOMEBREW_UPGRADE_COMMAND,isHomebrewInstall,requireTrustedUpgradeDirectory,isGlobal,getUpdateCommandInfo,getUpdateCommand};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{AGENT_REASON,AGENT_STATUS,shouldEmitNonInteractiveCommandError,writeAgentError}from"./chunk-4SS6W6JK.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";function withWarnings(result,warnings){let added=warnings.filter(warning=>warning!==void 0);if(added.length===0)return result;let existing=result.warnings;return{...result,warnings:[...Array.isArray(existing)?existing:[],...added]}}function getRenamedOption(flags,name,oldName,{json=!1,typedName=oldName}={}){let value=flags[name],oldValue=flags[oldName];if(value!==void 0&&oldValue!==void 0)return{error:`Can't use ${name} with ${typedName}.`};if(typeof value=="string"&&value.trim()==="")return{error:`${name} can't be empty.`};if(oldValue===void 0)return{value};let message=`${typedName} is deprecated. Use ${name}.`;return json?{value:oldValue,warning:{reason:AGENT_REASON.DEPRECATED,message}}:(output_manager_default.warning(message),{value:oldValue})}function reportRenamedOptionError(client,message,{json=!1}={}){return json||shouldEmitNonInteractiveCommandError(client)?writeAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}):output_manager_default.error(message),2}function renameOptionInArgs(args,oldName,name){let end=args.indexOf("--");return args.map((arg,index)=>(end===-1||index<end)&&(arg===oldName||arg.startsWith(`${oldName}=`))?`${name}${arg.slice(oldName.length)}`:arg)}export{withWarnings,getRenamedOption,reportRenamedOptionError,renameOptionInArgs};
7
+ import{AGENT_REASON,AGENT_STATUS,shouldEmitNonInteractiveCommandError,writeAgentError}from"./chunk-NTSJNYRU.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";function withWarnings(result,warnings){let added=warnings.filter(warning=>warning!==void 0);if(added.length===0)return result;let existing=result.warnings;return{...result,warnings:[...Array.isArray(existing)?existing:[],...added]}}function getRenamedOption(flags,name,oldName,{json=!1,typedName=oldName}={}){let value=flags[name],oldValue=flags[oldName];if(value!==void 0&&oldValue!==void 0)return{error:`Can't use ${name} with ${typedName}.`};if(typeof value=="string"&&value.trim()==="")return{error:`${name} can't be empty.`};if(oldValue===void 0)return{value};let message=`${typedName} is deprecated. Use ${name}.`;return json?{value:oldValue,warning:{reason:AGENT_REASON.DEPRECATED,message}}:(output_manager_default.warning(message),{value:oldValue})}function reportRenamedOptionError(client,message,{json=!1}={}){return json||shouldEmitNonInteractiveCommandError(client)?writeAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}):output_manager_default.error(message),2}function renameOptionInArgs(args,oldName,name){let end=args.indexOf("--");return args.map((arg,index)=>(end===-1||index<end)&&(arg===oldName||arg.startsWith(`${oldName}=`))?`${name}${arg.slice(oldName.length)}`:arg)}export{withWarnings,getRenamedOption,reportRenamedOptionError,renameOptionInArgs};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{printAlignedLabel}from"./chunk-M7FED5YP.js";import{buildCommandWithGlobalFlags}from"./chunk-4SS6W6JK.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import{quoteArg}from"./chunk-CFJBDBYH.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var CRITICAL_DELIVERY_DESCRIPTION="Critical only (escalated by Vercel Agent)";function formatMinimumSeverity(notification){let level=notification.minimumSeverityLevel;return level==="critical"?CRITICAL_DELIVERY_DESCRIPTION:level?`${level[0].toUpperCase()}${level.slice(1)} and above`:notification.type==="webhook"&&!("url"in notification.webhook)?"Details unavailable":"Monitor setting"}function formatProjectScope(scope){return scope.type==="all"?"all projects":`${scope.projectName} (${scope.projectId})`}function formatNotificationExpanded(notification,index){if(notification.type==="slack")return[` ${index+1}. ${import_chalk.default.bold("Slack")} ${import_chalk.default.cyan(`#${notification.channelName}`)}`,` ${import_chalk.default.dim("Project scope:")} ${formatProjectScope(notification.projectScope)}`,` ${import_chalk.default.dim("Channel ID:")} ${notification.channelId}`,` ${import_chalk.default.dim("Slack installation ID:")} ${notification.configId}`,` ${import_chalk.default.dim("Minimum severity:")} ${formatMinimumSeverity(notification)}`].join(`
7
+ import{printAlignedLabel}from"./chunk-M2Q2DUHO.js";import{buildCommandWithGlobalFlags}from"./chunk-NTSJNYRU.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{quoteArg}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var CRITICAL_DELIVERY_DESCRIPTION="Critical only (escalated by Vercel Agent)";function formatMinimumSeverity(notification){let level=notification.minimumSeverityLevel;return level==="critical"?CRITICAL_DELIVERY_DESCRIPTION:level?`${level[0].toUpperCase()}${level.slice(1)} and above`:notification.type==="webhook"&&!("url"in notification.webhook)?"Details unavailable":"Monitor setting"}function formatProjectScope(scope){return scope.type==="all"?"all projects":`${scope.projectName} (${scope.projectId})`}function formatNotificationExpanded(notification,index){if(notification.type==="slack")return[` ${index+1}. ${import_chalk.default.bold("Slack")} ${import_chalk.default.cyan(`#${notification.channelName}`)}`,` ${import_chalk.default.dim("Project scope:")} ${formatProjectScope(notification.projectScope)}`,` ${import_chalk.default.dim("Channel ID:")} ${notification.channelId}`,` ${import_chalk.default.dim("Slack installation ID:")} ${notification.configId}`,` ${import_chalk.default.dim("Minimum severity:")} ${formatMinimumSeverity(notification)}`].join(`
8
8
  `);let{webhook}=notification;return[` ${index+1}. ${import_chalk.default.bold("Webhook")}`,` ${import_chalk.default.dim("Webhook ID:")} ${webhook.id}`,` ${import_chalk.default.dim("URL:")} ${"url"in webhook?webhook.url:"Details unavailable"}`,` ${import_chalk.default.dim("Minimum severity:")} ${formatMinimumSeverity(notification)}`].join(`
9
9
  `)}function formatRuleExpanded(ruleId,notifications){let lines=[` ${import_chalk.default.bold(ruleId)}`];return notifications.length===0?lines.push(` ${import_chalk.default.dim("No notification destinations")}`):lines.push(notifications.map((notification,index)=>formatNotificationExpanded(notification,index)).join(`
10
10
 
@@ -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{js_yaml_default}from"./chunk-V6Y6UK6B.js";import{require_minimatch}from"./chunk-CTMTO2W4.js";import{remoteText}from"./chunk-SQ62IODX.js";import{__toESM}from"./chunk-BZENIQ7N.js";import{existsSync,readFileSync}from"node:fs";import{homedir}from"node:os";import{dirname,join,parse,relative}from"node:path";var import_minimatch=__toESM(require_minimatch(),1);function findWorkspaceRootCandidates(startDir){let{root}=parse(startDir),candidates=[],dir=startDir;for(let i=0;i<64;i++){let type=workspaceTypeOf(dir);if(type&&candidates.unshift({dir,type}),dir===root)break;let parent=dirname(dir);if(parent===dir)break;dir=parent}return candidates}function workspaceTypeOf(dir){if(existsSync(join(dir,"pnpm-workspace.yaml")))return"pnpm";let pkgPath=join(dir,"package.json");if(existsSync(pkgPath))try{let pkg=JSON.parse(readFileSync(pkgPath,"utf8")),{workspaces}=pkg;if(Array.isArray(workspaces)&&workspaces.length>0||workspaces&&typeof workspaces=="object"&&Array.isArray(workspaces.packages)&&workspaces.packages.length>0)return"npm"}catch{}return null}function readWorkspacePatterns(candidate){try{if(candidate.type==="pnpm"){let packages2=js_yaml_default.load(readFileSync(join(candidate.dir,"pnpm-workspace.yaml"),"utf8"))?.packages;return Array.isArray(packages2)?packages2.filter(p=>typeof p=="string"):null}let pkg=JSON.parse(readFileSync(join(candidate.dir,"package.json"),"utf8")),{workspaces}=pkg,packages=Array.isArray(workspaces)?workspaces:workspaces?.packages;return Array.isArray(packages)?packages.filter(p=>typeof p=="string"):null}catch{return null}}function workspaceClaims(candidate,memberDir){let rel=normalizeRelative(relative(candidate.dir,memberDir));if(rel==="")return!1;let patterns=readWorkspacePatterns(candidate);if(!patterns||patterns.length===0)return!1;let positives=[],negatives=[];for(let pattern of patterns)pattern.startsWith("!")?negatives.push(normalizeRelative(pattern.slice(1))):positives.push(normalizeRelative(pattern));let matches=pattern=>(0,import_minimatch.default)(rel,pattern,{dot:!1});return!positives.some(matches)||negatives.some(matches)?!1:existsSync(join(memberDir,"package.json"))}function resolvePerDirectoryLinkRoot(anchorDir,rootDirectorySetting){let repoRoot=anchorDir;for(let candidate of findWorkspaceRootCandidates(anchorDir))if(workspaceClaims(candidate,anchorDir)){repoRoot=candidate.dir;break}let linkLocation=normalizeRelative(relative(repoRoot,anchorDir)),setting=typeof rootDirectorySetting=="string"?normalizeRelative(rootDirectorySetting):"";if(linkLocation===""){let gitRoot=setting!==""&&!existsSync(join(anchorDir,setting))?findEnclosingGitRoot(anchorDir):null;return gitRoot&&normalizeRelative(relative(gitRoot,anchorDir))===setting?{repoRoot,resolvedRootDirectory:"",ignoreRootDirectory:!0,advisory:`Ignoring the Root Directory ${quote(setting,setting)} of the project linked in "${anchorDir}": it is the path of this directory in its Git repository, and ${quote(join(anchorDir,setting),setting)} does not exist. The build uses the linked directory. To correct this, link the project from "${gitRoot}", or clear the Root Directory in the Project Settings and pull them again.`}:{repoRoot,resolvedRootDirectory:""}}return setting===""?{repoRoot,resolvedRootDirectory:linkLocation}:existsSync(join(anchorDir,setting))?{repoRoot,resolvedRootDirectory:normalizeRelative(relative(repoRoot,join(anchorDir,setting)))}:{repoRoot,resolvedRootDirectory:linkLocation,advisory:`Ignoring "rootDirectory" setting ${quote(setting,setting)} for the project linked in "${anchorDir}": ${quote(join(anchorDir,setting),setting)} does not exist, so the build will use the linked directory "${linkLocation}" instead. Remove the "rootDirectory" setting, or configure it at the repository root.`}}function findEnclosingGitRoot(dir){if(existsSync(join(dir,".git")))return null;let home=homedir(),current=dir;for(let i=0;i<64;i++){let parent=dirname(current);if(parent===current||parent===home)return null;if(existsSync(join(parent,".git")))return parent;current=parent}return null}var PLAIN_PATH=/^[\p{L}\p{N}_.@-]+(?:\/[\p{L}\p{N}_.@-]+)*\/?$/u;function isPlainPath(value){return typeof value=="string"&&value.length<=256&&PLAIN_PATH.test(value)}function quote(text,setting){return isPlainPath(setting)?`"${text}"`:remoteText(JSON.stringify(text))}function normalizeRelative(p){let normalized=p.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"");return normalized==="."?"":normalized}export{findWorkspaceRootCandidates,resolvePerDirectoryLinkRoot,isPlainPath};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{isAPIError}from"./chunk-GOI2VVI7.js";var NO_SERVER_MESSAGE="Response Error";function apiServerMessage(error){let message=isAPIError(error)?error.serverMessage:void 0;return message&&message!==NO_SERVER_MESSAGE?message:void 0}export{apiServerMessage};
7
+ import{isAPIError}from"./chunk-QFE3RPMA.js";var NO_SERVER_MESSAGE="Response Error";function apiServerMessage(error){let message=isAPIError(error)?error.serverMessage:void 0;return message&&message!==NO_SERVER_MESSAGE?message:void 0}export{apiServerMessage};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{FILTER_DEPRECATION_WARNING,alignTimeRangeToGranularity,canonicalResponseToMetricsResponse,createCanonicalMetricsRequest,usesODataSyntax}from"./chunk-Y77DXGGN.js";import{OBSERVABILITY_METRICS_PATH,fetchCatalogMetricDetailOrExit}from"./chunk-ZA5O22ZY.js";import{computeGranularity,formatText,getDefaultCustomMetricAggregation}from"./chunk-ACN6DBTC.js";import{formatErrorJson,formatQueryJson,getRollupColumnName,handleApiError,toPublicQueryMeta}from"./chunk-C335SWOB.js";import{validateAllProjectMutualExclusivity}from"./chunk-ZJNDLFZ7.js";import{resolveTimeRange}from"./chunk-D3M2JG5C.js";import{warnDeprecatedProdFlag}from"./chunk-LNZEYUEC.js";import{getRenamedOption}from"./chunk-OF32Z3UP.js";import{metricsCommand}from"./chunk-GLCSWIB4.js";import{printError}from"./chunk-33HVDSWP.js";import{getScope}from"./chunk-NLK7NGVP.js";import{getLinkedProject}from"./chunk-Z2KANBOU.js";import{getProjectByNameOrId}from"./chunk-DJZBJC2A.js";import{getTypedOptionName,parseArguments}from"./chunk-CINNNQDJ.js";import{validateJsonOutput}from"./chunk-FEJD7MRH.js";import{ProjectNotFound,isAPIError}from"./chunk-GOI2VVI7.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import{getFlagsSpecification}from"./chunk-CFJBDBYH.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function validateRequiredMetric(metric){return metric?{valid:!0,value:metric}:{valid:!1,code:"MISSING_METRIC",message:`Missing required metric. Specify the metric to query.
7
+ import{FILTER_DEPRECATION_WARNING,alignTimeRangeToGranularity,canonicalResponseToMetricsResponse,createCanonicalMetricsRequest,usesODataSyntax}from"./chunk-B6YVE4WJ.js";import{OBSERVABILITY_METRICS_PATH,fetchCatalogMetricDetailOrExit}from"./chunk-IGJBSAFY.js";import{computeGranularity,formatText,getDefaultCustomMetricAggregation}from"./chunk-FHUDTYY7.js";import{formatErrorJson,formatQueryJson,getRollupColumnName,handleApiError,toPublicQueryMeta}from"./chunk-X7TIJWNO.js";import{validateAllProjectMutualExclusivity}from"./chunk-OOPF73RV.js";import{resolveTimeRange}from"./chunk-D3M2JG5C.js";import{warnDeprecatedProdFlag}from"./chunk-IVZNPSHU.js";import{getRenamedOption}from"./chunk-VT7UAUY6.js";import{metricsCommand}from"./chunk-E7IN2DGU.js";import{getScope}from"./chunk-5ZL2RRO3.js";import{getLinkedProject}from"./chunk-NJFXR3FN.js";import{getProjectByNameOrId}from"./chunk-3AFEVHHY.js";import{printError}from"./chunk-PYHNDBNH.js";import{getTypedOptionName,parseArguments}from"./chunk-INIZJZ3O.js";import{validateJsonOutput}from"./chunk-KA2KG3SY.js";import{ProjectNotFound,isAPIError}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{getFlagsSpecification}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function validateRequiredMetric(metric){return metric?{valid:!0,value:metric}:{valid:!1,code:"MISSING_METRIC",message:`Missing required metric. Specify the metric to query.
8
8
 
9
9
  Run 'vercel metrics schema' to see available metrics.`}}function validateOrderDirection(orderDirection){return orderDirection===void 0?{valid:!0,value:void 0}:orderDirection==="asc"||orderDirection==="desc"?{valid:!0,value:orderDirection}:{valid:!1,code:"INVALID_ORDER",message:`Invalid order "${orderDirection}". Use "asc" or "desc".`,allowedValues:["asc","desc"]}}function validateOrderBy(orderBy){return orderBy===void 0?{valid:!0,value:void 0}:orderBy==="value"||orderBy==="count"?{valid:!0,value:orderBy}:{valid:!1,code:"INVALID_ORDER_BY",message:`Invalid order-by "${orderBy}". Use "value" or "count".`,allowedValues:["value","count"]}}function handleValidationError(result,jsonOutput,client,telemetry){return telemetry.trackCliError(result.code),jsonOutput?client.stdout.write(formatErrorJson(result.code,result.message,result.allowedValues)):(output_manager_default.error(result.message),result.allowedValues&&result.allowedValues.length>0&&output_manager_default.print(`
10
10
  Available values: ${result.allowedValues.join(", ")}
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{buildCommandWithGlobalFlags}from"./chunk-4SS6W6JK.js";import{getCommandName,packageName}from"./chunk-B4KA3ZH2.js";function scopedBudgetCommand(client,owner,subcommand){return getCommandName(scopedBudgetSubcommand(client,owner,subcommand))}function scopedBudgetSubcommand(client,owner,subcommand){return buildCommandWithGlobalFlags(client.argv,owner.type==="organization"?subcommand:`--scope ${owner.slug} ${subcommand}`,packageName,{prependGlobalFlags:!0,excludeFlags:["--scope","-S","--team","-T"]}).slice(packageName.length+1)}export{scopedBudgetCommand};
7
+ import{buildCommandWithGlobalFlags}from"./chunk-NTSJNYRU.js";import{getCommandName,packageName}from"./chunk-B4KA3ZH2.js";function scopedBudgetCommand(client,owner,subcommand){return getCommandName(scopedBudgetSubcommand(client,owner,subcommand))}function scopedBudgetSubcommand(client,owner,subcommand){return buildCommandWithGlobalFlags(client.argv,owner.type==="organization"?subcommand:`--scope ${owner.slug} ${subcommand}`,packageName,{prependGlobalFlags:!0,excludeFlags:["--scope","-S","--team","-T"]}).slice(packageName.length+1)}export{scopedBudgetCommand};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{resolveProjectContext}from"./chunk-VF7XWPXA.js";import{parseArguments}from"./chunk-CINNNQDJ.js";import{AGENT_REASON,AGENT_STATUS,outputAgentError}from"./chunk-4SS6W6JK.js";import{getCommandName,getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import{getFlagsSpecification,getGlobalFlagsFromArgs}from"./chunk-CFJBDBYH.js";function parseSubcommandArguments(argv,command){let flagsSpecification=getFlagsSpecification(command.options);return parseArguments(argv,flagsSpecification)}function validateRequiredArguments(args,required){for(let i=0;i<required.length;i++)if(!args[i])return`Missing required argument: ${required[i]}`;return null}async function requireProjectContext(client,command,projectName){let link=await resolveProjectContext({client,projectNameOrId:projectName,allowOwnerLookupFallback:!0});if(link.status==="error")return link.exitCode;if(link.status==="not_linked"){if(client.nonInteractive)if(command==="redirects"){let linkCmd=getCommandNamePlain("link");outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,message:`Your codebase isn't linked to a project on Vercel. Run ${linkCmd} to begin.`,next:[{command:linkCmd}]},1)}else{let flags=getGlobalFlagsFromArgs(client.argv.slice(2)),cmd=getCommandNamePlain(`link ${flags.join(" ")}`.trim());return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,userActionRequired:!0,message:`Your codebase is not linked to a Vercel project. Run link first, then retry ${command} commands.`,next:[{command:cmd,when:"to link this directory to a project"}]},1),1}return output_manager_default.error(`Your codebase isn't linked to a project on Vercel. Run ${getCommandName("link")} to begin.`),1}return client.config.currentTeam=link.org.type==="team"?link.org.id:void 0,link}export{parseSubcommandArguments,validateRequiredArguments,requireProjectContext};
7
+ import{resolveProjectContext}from"./chunk-B7IB5CTS.js";import{parseArguments}from"./chunk-INIZJZ3O.js";import{AGENT_REASON,AGENT_STATUS,outputAgentError}from"./chunk-NTSJNYRU.js";import{getCommandName,getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{getFlagsSpecification,getGlobalFlagsFromArgs}from"./chunk-DORCX7UB.js";function parseSubcommandArguments(argv,command){let flagsSpecification=getFlagsSpecification(command.options);return parseArguments(argv,flagsSpecification)}function validateRequiredArguments(args,required){for(let i=0;i<required.length;i++)if(!args[i])return`Missing required argument: ${required[i]}`;return null}async function requireProjectContext(client,command,projectName){let link=await resolveProjectContext({client,projectNameOrId:projectName,allowOwnerLookupFallback:!0});if(link.status==="error")return link.exitCode;if(link.status==="not_linked"){if(client.nonInteractive)if(command==="redirects"){let linkCmd=getCommandNamePlain("link");outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,message:`Your codebase isn't linked to a project on Vercel. Run ${linkCmd} to begin.`,next:[{command:linkCmd}]},1)}else{let flags=getGlobalFlagsFromArgs(client.argv.slice(2)),cmd=getCommandNamePlain(`link ${flags.join(" ")}`.trim());return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,userActionRequired:!0,message:`Your codebase is not linked to a Vercel project. Run link first, then retry ${command} commands.`,next:[{command:cmd,when:"to link this directory to a project"}]},1),1}return output_manager_default.error(`Your codebase isn't linked to a project on Vercel. Run ${getCommandName("link")} to begin.`),1}return client.config.currentTeam=link.org.type==="team"?link.org.id:void 0,link}export{parseSubcommandArguments,validateRequiredArguments,requireProjectContext};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,jsonOption,limitOption,projectOption,sinceOption,untilOption}from"./chunk-CFJBDBYH.js";var listSubcommand={name:"ls",aliases:["list"],description:"",default:!0,hidden:!0,arguments:[],options:[],examples:[]},inspectSubcommand={name:"inspect",aliases:[],description:"Show details for a single alert group",arguments:[{name:"groupId",required:!0}],options:[formatOption,jsonOption,{...projectOption,shorthand:"p",description:"Filter by project (overrides auto-detected linked project)."},{name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"Use team-wide scope (ignore linked project auto-scoping)."}],examples:[{name:"Inspect a group in the linked project",value:`${packageName} alerts inspect grp_abc123`},{name:"Inspect as JSON",value:`${packageName} alerts inspect grp_abc123 --json`}]},alertsCommand={name:"alerts",aliases:[],description:"List alert groups or inspect a group. To manage alert rules, see `vercel monitors`.",arguments:[],subcommands:[listSubcommand,inspectSubcommand],options:[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by alert type. Repeatable and comma-separated (for example --type usage_anomaly,error_anomaly)."},{...projectOption,shorthand:"p",description:"Filter by project (overrides auto-detected linked project)."},{name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"Show team-wide alerts (ignore linked project auto-scoping)."},{name:"ai",shorthand:null,type:Boolean,deprecated:!1,description:"Print AI-focused sections (title, resolved time, summary, key findings) instead of table output."},{...sinceOption,description:`${sinceOption.description} (default: 24h ago)`},untilOption,limitOption,formatOption,jsonOption],examples:[{name:"List alerts for the linked project",value:`${packageName} alerts`},{name:"List team-wide alerts",value:`${packageName} alerts --all`},{name:"Filter by type",value:`${packageName} alerts --type usage_anomaly --type error_anomaly`},{name:"Output JSON",value:`${packageName} alerts --json`},{name:"Custom time range",value:`${packageName} alerts --since 2026-03-01T00:00:00.000Z --until 2026-03-02T00:00:00.000Z`}]};export{listSubcommand,inspectSubcommand,alertsCommand};
7
+ import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,jsonOption,limitOption,projectOption,sinceOption,untilOption}from"./chunk-DORCX7UB.js";var listSubcommand={name:"ls",aliases:["list"],description:"",default:!0,hidden:!0,arguments:[],options:[],examples:[]},inspectSubcommand={name:"inspect",aliases:[],description:"Show details for a single alert group",arguments:[{name:"groupId",required:!0}],options:[formatOption,jsonOption,{...projectOption,shorthand:"p",description:"Filter by project (overrides auto-detected linked project)."},{name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"Use team-wide scope (ignore linked project auto-scoping)."}],examples:[{name:"Inspect a group in the linked project",value:`${packageName} alerts inspect grp_abc123`},{name:"Inspect as JSON",value:`${packageName} alerts inspect grp_abc123 --json`}]},alertsCommand={name:"alerts",aliases:[],description:"List alert groups or inspect a group. To manage alert rules, see `vercel monitors`.",arguments:[],subcommands:[listSubcommand,inspectSubcommand],options:[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by alert type. Repeatable and comma-separated (for example --type usage_anomaly,error_anomaly)."},{...projectOption,shorthand:"p",description:"Filter by project (overrides auto-detected linked project)."},{name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"Show team-wide alerts (ignore linked project auto-scoping)."},{name:"ai",shorthand:null,type:Boolean,deprecated:!1,description:"Print AI-focused sections (title, resolved time, summary, key findings) instead of table output."},{...sinceOption,description:`${sinceOption.description} (default: 24h ago)`},untilOption,limitOption,formatOption,jsonOption],examples:[{name:"List alerts for the linked project",value:`${packageName} alerts`},{name:"List team-wide alerts",value:`${packageName} alerts --all`},{name:"Filter by type",value:`${packageName} alerts --type usage_anomaly --type error_anomaly`},{name:"Output JSON",value:`${packageName} alerts --json`},{name:"Custom time range",value:`${packageName} alerts --since 2026-03-01T00:00:00.000Z --until 2026-03-02T00:00:00.000Z`}]};export{listSubcommand,inspectSubcommand,alertsCommand};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{Separator}from"./chunk-YTRKHRL3.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{eraseLines,link_default,output_manager_default}from"./chunk-AP6DZGTK.js";import{require_source}from"./chunk-NB2WLB3J.js";import{require_strip_ansi}from"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);import{URL}from"url";var import_strip_ansi=__toESM(require_strip_ansi(),1);function getLength(input){let biggestLength=0;for(let line of input.split(`
7
+ import{Separator}from"./chunk-27FVSW45.js";import{isAPIError}from"./chunk-QFE3RPMA.js";import{eraseLines,link_default,output_manager_default}from"./chunk-RYSO5U3E.js";import{require_source}from"./chunk-NB2WLB3J.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);import{URL}from"url";var import_strip_ansi=__toESM(require_strip_ansi(),1);function getLength(input){let biggestLength=0;for(let line of input.split(`
8
8
  `)){let str=(0,import_strip_ansi.default)(line);str.length>biggestLength&&(biggestLength=str.length)}return biggestLength}async function list(client,{message="the question",choices:_choices=[{name:`something
9
9
  description
10
10
  details
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{withWarnings}from"./chunk-OF32Z3UP.js";import{agentErrorMetadata,buildCommandWithGlobalFlags,clientObservabilityPlanRecovery,getErrorRecovery,trackAgentError}from"./chunk-4SS6W6JK.js";import{output_manager_default}from"./chunk-AP6DZGTK.js";import{remoteText}from"./chunk-GLIQ4KNY.js";import{require_strip_ansi}from"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_strip_ansi=__toESM(require_strip_ansi(),1);function getApiIssues(error){if(typeof error!="object"||error===null)return[];let issues=error.issues;if(!Array.isArray(issues))return[];let result=[];for(let issue of issues){if(typeof issue!="object"||issue===null)continue;let{message,path}=issue;typeof message!="string"||message.length===0||result.push(typeof path=="string"?{path,message}:{message})}return result}function getRollupColumnName(metric,aggregation){return`${metric}_${aggregation}`.replace(/[./]/g,"_")}function getResolvedOrderMetadata(query,response){let orderBy=query.orderBy??(response.orderBy?"count":void 0),orderDirection=response.orderDirection??query.orderDirection;return{...orderBy?{orderBy}:{},...orderDirection?{orderDirection}:{}}}function formatQueryJson(query,response,warnings=[],details){let orderMetadata=getResolvedOrderMetadata(query,response),queryWithResponseMetadata={...query,...orderMetadata};return JSON.stringify(withWarnings({query:queryWithResponseMetadata,summary:response.summary??[],data:response.data??[],...orderMetadata,...details},warnings),null,2)}var PUBLIC_OUTPUT_FIELDS=["kind","metric","aggregation","unit","per","normalize","dependsOn"];function toPublicQueryMeta(meta,outputColumns){let outputs=Object.entries(meta?.outputs??{}).flatMap(([alias,output])=>{let column=outputColumns?outputColumns[alias]:alias;if(!column)return[];let picked={};for(let field of PUBLIC_OUTPUT_FIELDS)output[field]!==void 0&&Object.assign(picked,{[field]:output[field]});return[[column,picked]]});return{...outputs.length>0?{outputs:Object.fromEntries(outputs)}:{},...meta?.projects?{projects:meta.projects}:{},...meta?.excludedIntervals?{excludedIntervals:meta.excludedIntervals}:{},...meta?.effectiveTimeRange?{effectiveTimeRange:meta.effectiveTimeRange}:{}}}function toFlatRow(row){return{...row.timestamp?{timestamp:row.timestamp}:{},...row.dimensions,...row.isRemainder?{isRemainder:!0}:{},...row.values}}function formatDataQueryJson(query,response){return JSON.stringify({query,summary:(response.summary??[]).map(toFlatRow),data:(response.series??[]).map(toFlatRow),queryId:response.queryId??null,meta:toPublicQueryMeta(response.meta)},null,2)}function formatErrorJson(code,message,allowedValues,recovery={}){let error={code,message};return allowedValues&&allowedValues.length>0&&(error.allowedValues=allowedValues),JSON.stringify({error:{...error,...recovery}},null,2)}var MAX_HUMAN_ISSUES=5;function projectSelectorFromArgv(argv){let args=argv.slice(2);for(let i=0;i<args.length;i++){let arg=args[i];if(arg.startsWith("--project="))return arg.slice(10);if(arg==="--project"&&i+1<args.length)return args[i+1]}}function hintRestatesCommand(hint,steps){if(!steps?.length)return!1;let plain=(0,import_strip_ansi.default)(hint).replace(/`/g,"").trim();return steps.some(step=>{let command=step.command.trim();return command===plain||command.startsWith(`${plain} `)})}function handleApiError(err,jsonOutput,client,overrides={},target={}){let code,message,override=overrides[err.status];if(override)code=override.code||err.code||"BAD_REQUEST",message=override.message;else switch(err.status){case 402:code=err.code||"PAYMENT_REQUIRED",message=err.serverMessage||"This feature requires an Observability Plus subscription.";break;case 429:code=err.code||"RATE_LIMITED",message=err.serverMessage||"You have reached the metrics query rate limit. Please wait and try again. If you need a higher limit, request one from your Vercel account team.";break;case 403:code="FORBIDDEN",message=err.serverMessage&&err.serverMessage!=="Response Error"?err.serverMessage:"You do not have permission to query metrics for this project/team.";break;case 500:code="INTERNAL_ERROR",message="An internal error occurred. Please try again later.";break;case 504:code="TIMEOUT",message="The query timed out. Try a shorter time range or fewer groups.";break;case 400:code=err.code||"BAD_REQUEST",message=err.serverMessage||`API error (${err.status})`;break;default:code=err.code||"BAD_REQUEST",message=err.serverMessage||`API error (${err.status})`}let billing=err.status===402?clientObservabilityPlanRecovery(client,err,message,target.projectName??projectSelectorFromArgv(client.argv),target.scope):void 0,recovery={...getErrorRecovery({...err,serverMessage:message},client),...billing&&{hint:billing.hint}},next=billing?.command?[{command:buildCommandWithGlobalFlags(client.argv.filter(arg=>!/^(?:--yes|--force|-y)(?:=|$)/.test(arg)),billing.command,void 0,{excludeFlags:billing.excludeFlags,preserveProject:billing.preserveProject}),when:billing.when}]:void 0;recovery.hint&&hintRestatesCommand(recovery.hint,next)&&delete recovery.hint;let issues=getApiIssues(err),details={...recovery,...next&&{next},...issues.length>0&&{issues},...agentErrorMetadata(client)};if(trackAgentError(client,{reason:err.status===403?"forbidden":err.status===402?"payment_required":err.status===429?"rate_limited":code,...recovery}),jsonOutput||client.nonInteractive)client.stdout.write(formatErrorJson(code,message,err.allowedValues,details));else{let issueRows=issues.slice(0,MAX_HUMAN_ISSUES).map(issue=>remoteText(issue.message));issues.length>MAX_HUMAN_ISSUES&&issueRows.push(`and ${issues.length-MAX_HUMAN_ISSUES} more`),output_manager_default.fatal([message,...issueRows].join(`
7
+ import{withWarnings}from"./chunk-VT7UAUY6.js";import{agentErrorMetadata,buildCommandWithGlobalFlags,clientObservabilityPlanRecovery,getErrorRecovery,trackAgentError}from"./chunk-NTSJNYRU.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{remoteText}from"./chunk-SQ62IODX.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_strip_ansi=__toESM(require_strip_ansi(),1);function getApiIssues(error){if(typeof error!="object"||error===null)return[];let issues=error.issues;if(!Array.isArray(issues))return[];let result=[];for(let issue of issues){if(typeof issue!="object"||issue===null)continue;let{message,path}=issue;typeof message!="string"||message.length===0||result.push(typeof path=="string"?{path,message}:{message})}return result}function getRollupColumnName(metric,aggregation){return`${metric}_${aggregation}`.replace(/[./]/g,"_")}function getResolvedOrderMetadata(query,response){let orderBy=query.orderBy??(response.orderBy?"count":void 0),orderDirection=response.orderDirection??query.orderDirection;return{...orderBy?{orderBy}:{},...orderDirection?{orderDirection}:{}}}function formatQueryJson(query,response,warnings=[],details){let orderMetadata=getResolvedOrderMetadata(query,response),queryWithResponseMetadata={...query,...orderMetadata};return JSON.stringify(withWarnings({query:queryWithResponseMetadata,summary:response.summary??[],data:response.data??[],...orderMetadata,...details},warnings),null,2)}var PUBLIC_OUTPUT_FIELDS=["kind","metric","aggregation","unit","per","normalize","dependsOn"];function toPublicQueryMeta(meta,outputColumns){let outputs=Object.entries(meta?.outputs??{}).flatMap(([alias,output])=>{let column=outputColumns?outputColumns[alias]:alias;if(!column)return[];let picked={};for(let field of PUBLIC_OUTPUT_FIELDS)output[field]!==void 0&&Object.assign(picked,{[field]:output[field]});return[[column,picked]]});return{...outputs.length>0?{outputs:Object.fromEntries(outputs)}:{},...meta?.projects?{projects:meta.projects}:{},...meta?.excludedIntervals?{excludedIntervals:meta.excludedIntervals}:{},...meta?.effectiveTimeRange?{effectiveTimeRange:meta.effectiveTimeRange}:{}}}function toFlatRow(row){return{...row.timestamp?{timestamp:row.timestamp}:{},...row.dimensions,...row.isRemainder?{isRemainder:!0}:{},...row.values}}function formatDataQueryJson(query,response){return JSON.stringify({query,summary:(response.summary??[]).map(toFlatRow),data:(response.series??[]).map(toFlatRow),queryId:response.queryId??null,meta:toPublicQueryMeta(response.meta)},null,2)}function formatErrorJson(code,message,allowedValues,recovery={}){let error={code,message};return allowedValues&&allowedValues.length>0&&(error.allowedValues=allowedValues),JSON.stringify({error:{...error,...recovery}},null,2)}var MAX_HUMAN_ISSUES=5;function projectSelectorFromArgv(argv){let args=argv.slice(2);for(let i=0;i<args.length;i++){let arg=args[i];if(arg.startsWith("--project="))return arg.slice(10);if(arg==="--project"&&i+1<args.length)return args[i+1]}}function hintRestatesCommand(hint,steps){if(!steps?.length)return!1;let plain=(0,import_strip_ansi.default)(hint).replace(/`/g,"").trim();return steps.some(step=>{let command=step.command.trim();return command===plain||command.startsWith(`${plain} `)})}function handleApiError(err,jsonOutput,client,overrides={},target={}){let code,message,override=overrides[err.status];if(override)code=override.code||err.code||"BAD_REQUEST",message=override.message;else switch(err.status){case 402:code=err.code||"PAYMENT_REQUIRED",message=err.serverMessage||"This feature requires an Observability Plus subscription.";break;case 429:code=err.code||"RATE_LIMITED",message=err.serverMessage||"You have reached the metrics query rate limit. Please wait and try again. If you need a higher limit, request one from your Vercel account team.";break;case 403:code="FORBIDDEN",message=err.serverMessage&&err.serverMessage!=="Response Error"?err.serverMessage:"You do not have permission to query metrics for this project/team.";break;case 500:code="INTERNAL_ERROR",message="An internal error occurred. Please try again later.";break;case 504:code="TIMEOUT",message="The query timed out. Try a shorter time range or fewer groups.";break;case 400:code=err.code||"BAD_REQUEST",message=err.serverMessage||`API error (${err.status})`;break;default:code=err.code||"BAD_REQUEST",message=err.serverMessage||`API error (${err.status})`}let billing=err.status===402?clientObservabilityPlanRecovery(client,err,message,target.projectName??projectSelectorFromArgv(client.argv),target.scope):void 0,recovery={...getErrorRecovery({...err,serverMessage:message},client),...billing&&{hint:billing.hint}},next=billing?.command?[{command:buildCommandWithGlobalFlags(client.argv.filter(arg=>!/^(?:--yes|--force|-y)(?:=|$)/.test(arg)),billing.command,void 0,{excludeFlags:billing.excludeFlags,preserveProject:billing.preserveProject}),when:billing.when}]:void 0;recovery.hint&&hintRestatesCommand(recovery.hint,next)&&delete recovery.hint;let issues=getApiIssues(err),details={...recovery,...next&&{next},...issues.length>0&&{issues},...agentErrorMetadata(client)};if(trackAgentError(client,{reason:err.status===403?"forbidden":err.status===402?"payment_required":err.status===429?"rate_limited":code,...recovery}),jsonOutput||client.nonInteractive)client.stdout.write(formatErrorJson(code,message,err.allowedValues,details));else{let issueRows=issues.slice(0,MAX_HUMAN_ISSUES).map(issue=>remoteText(issue.message));issues.length>MAX_HUMAN_ISSUES&&issueRows.push(`and ${issues.length-MAX_HUMAN_ISSUES} more`),output_manager_default.fatal([message,...issueRows].join(`
8
8
  `)),recovery.hint&&output_manager_default.print(` ${recovery.hint}
9
9
  `);for(let step of next??[])output_manager_default.print(` ${step.command}
10
10
  `);err.allowedValues&&err.allowedValues.length>0&&output_manager_default.print(`
@@ -0,0 +1,10 @@
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{readJSONFile}from"./chunk-GWYQXFBP.js";import{getNetworkFailureCause}from"./chunk-KXK4TF6L.js";import{commands}from"./chunk-RNHPL4C7.js";import{getScope}from"./chunk-5ZL2RRO3.js";import{readConfigFile}from"./chunk-NJFXR3FN.js";import{fetch}from"./chunk-MY4MONOH.js";import{getArgs}from"./chunk-INIZJZ3O.js";import{require_types}from"./chunk-AW33SRYY.js";import{CantFindConfig,CantParseJSONFile,DeprecatedNowJson,WorkingDirectoryDoesNotExist,humanizePath}from"./chunk-QFE3RPMA.js";import{pkg_default}from"./chunk-BOJDM3O7.js";import{cliErrorFromUnknown,output_manager_default,recordCliError}from"./chunk-RYSO5U3E.js";import{require_dist}from"./chunk-MCYG7CCE.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_epipebomb=__commonJS({"../../node_modules/.pnpm/epipebomb@1.0.0/node_modules/epipebomb/epipebomb.js"(exports,module){module.exports=epipeBomb;function epipeBomb(stream,callback){stream==null&&(stream=process.stdout),callback==null&&(callback=process.exit);function epipeFilter(err){if(err.code==="EPIPE")return callback();stream.listeners("error").length<=1&&(stream.removeAllListeners(),stream.emit("error",err),stream.on("error",epipeFilter))}stream.on("error",epipeFilter)}}});function isOutputDebugEnabled(debugFlag){return debugFlag===!0||process.env.VERCEL_CLI_DEBUG==="1"}var import_epipebomb=__toESM(require_epipebomb(),1),SILENCED_ERRORS=["DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead."],installed=!1;function installProcessGuards(){if(installed)return;installed=!0;let originalError=console.error;console.error=msg=>{SILENCED_ERRORS.some(error=>typeof msg=="string"&&msg.includes(error))||originalError(msg)},(0,import_epipebomb.default)()}var import_error_utils=__toESM(require_dist(),1),CRASH_REPORT_TIMEOUT_MS=2e3;async function reportError(client,error){if(ignoreError(error)||!telemetryEnabled(client))return;let user,team,scopeError;if(client&&!getNetworkFailureCause(error))try{({user,team}=await getScope(client))}catch(err){(0,import_error_utils.isError)(err)&&(scopeError=err)}let crashReport={cli_version:pkg_default.version,invocation_id:client?.telemetryEventStore?.currentInvocationId,error:(0,import_error_utils.isError)(error)?{kind:error.name,message:error.message,stack:stackOf(error)}:{kind:"NonError",message:String(error)},user:user?{id:user.id,email:user.email,username:user.username,name:user.name}:void 0,team_id:team?.id,scope_error:scopeError?{name:scopeError.name,message:scopeError.message,stack:scopeError.stack}:void 0,args:reportableArgs(),node:{execPath:process.execPath,version:process.version,platform:process.platform}};try{(await fetch(process.env.VERCEL_TELEMETRY_BRIDGE_URL||"https://telemetry.vercel.com/api/vercel-cli/v1/events",{method:"POST",headers:{"Content-Type":"application/json","x-vercel-cli-crash-report":"1"},body:JSON.stringify({version:1,crashReport}),signal:AbortSignal.timeout(CRASH_REPORT_TIMEOUT_MS)})).body?.cancel().catch(()=>{})}catch{}}function telemetryEnabled(client){if(process.env.VERCEL_TELEMETRY_DISABLED)return!1;if(client?.telemetryEventStore)return client.telemetryEventStore.enabled;try{return readConfigFile().telemetry?.enabled!==!1}catch(err){return(0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"}}function stackOf(error){let stacks=[],current=error;for(;(0,import_error_utils.isError)(current)&&stacks.length<5;)stacks.push(current.stack??`${current.name}: ${current.message}`),current=current.cause;return stacks.join(`
8
+ Caused by: `)}function reportableArgs(){try{let parsed=getArgs(process.argv.slice(2),{},{permissive:!0}),{_,...flags}=parsed,[command]=_;return{...typeof command=="string"&&commands.has(command)?{command}:{},flags:Object.keys(flags).sort()}}catch(err){return`Unable to parse args${(0,import_error_utils.isError)(err)?`: ${err}`:""}`}}function ignoreError(error){return(0,import_error_utils.isError)(error)&&error.message.includes("uv_cwd")}var fatalErrorHandlerSymbol=Symbol.for("vercel.cli.fatal-error-handler");async function exitWithUnexpectedError(error){let handler=globalThis[fatalErrorHandlerSymbol];if(typeof handler=="function")try{await handler(error)}catch{}process.exit(1)}async function handleUnexpectedError(client,err){output_manager_default.error(`An unexpected error occurred!
9
+ ${err.stack}`),await reportError(client,err)}function registerUnexpectedErrorHandlers(getClient){process.on("unhandledRejection",async err=>{recordCliError(cliErrorFromUnknown(err)),err?err instanceof Error?await handleUnexpectedError(getClient(),err):(output_manager_default.error(`An unexpected rejection occurred
10
+ ${err}`),await reportError(getClient(),err)):output_manager_default.error("An unexpected empty rejection occurred"),await exitWithUnexpectedError(err)}),process.on("uncaughtException",async error=>{await handleUnexpectedError(getClient(),error),await exitWithUnexpectedError(error)})}var import_types=__toESM(require_types(),1);import path from"path";var import_error_utils2=__toESM(require_dist(),1);var config;async function earlyGetConfig(configFile){if(config)return config;let localPath;try{localPath=process.cwd()}catch(err){if((0,import_error_utils2.isErrnoException)(err)&&err.code==="ENOENT")return new WorkingDirectoryDoesNotExist;throw err}if(configFile){let localFilePath=path.resolve(localPath,configFile);output_manager_default.debug(`Found config in provided --local-config path ${localFilePath}`);let localConfig=await readJSONFile(localFilePath);return localConfig instanceof CantParseJSONFile?localConfig:localConfig===null?new CantFindConfig([humanizePath(localFilePath)]):(config=localConfig,config[import_types.fileNameSymbol]=configFile,config)}let vercelFilePath=path.resolve(localPath,"vercel.json"),nowFilePath=path.resolve(localPath,"now.json"),[vercelConfig,nowConfig]=await Promise.all([readJSONFile(vercelFilePath),readJSONFile(nowFilePath)]);return vercelConfig instanceof CantParseJSONFile?vercelConfig:nowConfig instanceof CantParseJSONFile?nowConfig:vercelConfig!==null?(output_manager_default.debug(`Found config in file "${vercelFilePath}"`),config=vercelConfig,config[import_types.fileNameSymbol]="vercel.json",config):nowConfig!==null?new DeprecatedNowJson(nowFilePath):new CantFindConfig([vercelFilePath].map(humanizePath))}var fallbackReason;function recordDirectBuildFallback(reason){fallbackReason=reason}function getDirectBuildFallbackAttributes(){return fallbackReason===void 0?void 0:{directBuild:"false",fallbackReason}}function resolveNonInteractive({argv,nonInteractiveFlag,isAgent,stdinIsTTY}){let explicitNonInteractiveFalse=argv.includes("--non-interactive=false")||argv.includes("--no-non-interactive")||argv.includes("--non-interactive")&&argv[argv.indexOf("--non-interactive")+1]==="false";return{nonInteractive:explicitNonInteractiveFalse?!1:nonInteractiveFlag||isAgent&&!stdinIsTTY,explicitNonInteractiveFalse}}export{isOutputDebugEnabled,installProcessGuards,reportError,exitWithUnexpectedError,handleUnexpectedError,registerUnexpectedErrorHandlers,earlyGetConfig,recordDirectBuildFallback,getDirectBuildFallbackAttributes,resolveNonInteractive};