vercel 59.14.0 → 59.15.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 (459) hide show
  1. package/dist/chunks/add-7XFD2OHW.js +8 -0
  2. package/dist/chunks/add-HZC7AUBY.js +8 -0
  3. package/dist/chunks/add-PYUNJZ6K.js +8 -0
  4. package/dist/chunks/build-EFKQ6BND.js +7 -0
  5. package/dist/chunks/chunk-2B2MN3U5.js +8 -0
  6. package/dist/chunks/chunk-2H77IRPI.js +9 -0
  7. package/dist/chunks/chunk-2I64AYHG.js +7 -0
  8. package/dist/chunks/chunk-2PPXY24N.js +20 -0
  9. package/dist/chunks/chunk-2S6PE6GB.js +7 -0
  10. package/dist/chunks/{chunk-PIMIVJYK.js → chunk-3FMJYJUR.js} +7 -32
  11. package/dist/chunks/chunk-3IAQUNQH.js +7 -0
  12. package/dist/chunks/chunk-3QHJYVCY.js +7 -0
  13. package/dist/chunks/chunk-3QT7VOE3.js +7 -0
  14. package/dist/chunks/chunk-3TXEXPUW.js +7 -0
  15. package/dist/chunks/chunk-4MZK6JT6.js +7 -0
  16. package/dist/chunks/chunk-4NE5IQ25.js +7 -0
  17. package/dist/chunks/chunk-4PNSSS3L.js +7 -0
  18. package/dist/chunks/chunk-4QX77CP7.js +7 -0
  19. package/dist/chunks/chunk-57GHYR4Y.js +25 -0
  20. package/dist/chunks/chunk-5QQNYN4N.js +7 -0
  21. package/dist/chunks/chunk-5XJNPXQK.js +7 -0
  22. package/dist/chunks/chunk-6L236MNA.js +7 -0
  23. package/dist/chunks/chunk-6PFC3KWQ.js +7 -0
  24. package/dist/chunks/chunk-6QKS6QK7.js +7 -0
  25. package/dist/chunks/chunk-6RIQPTJA.js +8 -0
  26. package/dist/chunks/chunk-6TAQ6OWD.js +13 -0
  27. package/dist/chunks/chunk-6YAADRQB.js +9 -0
  28. package/dist/chunks/chunk-75CPY75D.js +15 -0
  29. package/dist/chunks/chunk-7HL2RPUO.js +7 -0
  30. package/dist/chunks/chunk-7PNYOSDU.js +9 -0
  31. package/dist/chunks/chunk-7R5FEXZ5.js +7 -0
  32. package/dist/chunks/chunk-7RMCBXBB.js +62 -0
  33. package/dist/chunks/chunk-7RR7MIMT.js +7 -0
  34. package/dist/chunks/chunk-7T6TL3GQ.js +7 -0
  35. package/dist/chunks/chunk-ADUYPK2G.js +13 -0
  36. package/dist/chunks/chunk-AFPOIDM5.js +7 -0
  37. package/dist/chunks/chunk-AM46JVVN.js +7 -0
  38. package/dist/chunks/chunk-AVSPFBLM.js +7 -0
  39. package/dist/chunks/chunk-B4ATVYZW.js +7 -0
  40. package/dist/chunks/chunk-BATE73HA.js +9 -0
  41. package/dist/chunks/{chunk-64IF634X.js → chunk-BRK4OB4B.js} +1 -12
  42. package/dist/chunks/chunk-BVH2AEFE.js +7 -0
  43. package/dist/chunks/chunk-CN2QZO4U.js +7 -0
  44. package/dist/chunks/chunk-COQGD2EI.js +8 -0
  45. package/dist/chunks/chunk-CUAIEGNE.js +7 -0
  46. package/dist/chunks/chunk-CVKB54WW.js +7 -0
  47. package/dist/chunks/{chunk-A3NYPUKZ.js → chunk-CZSOZKHX.js} +1 -11
  48. package/dist/chunks/chunk-D4MW3RDW.js +7 -0
  49. package/dist/chunks/chunk-DFVNL5ML.js +7 -0
  50. package/dist/chunks/chunk-EE3FVJLV.js +16 -0
  51. package/dist/chunks/chunk-EGMJRU5P.js +28 -0
  52. package/dist/chunks/chunk-ENBTTYJR.js +7 -0
  53. package/dist/chunks/chunk-ENS6KX2F.js +7 -0
  54. package/dist/chunks/chunk-EOBD4ZEG.js +8 -0
  55. package/dist/chunks/chunk-EOCTK4EA.js +7 -0
  56. package/dist/chunks/chunk-EQ52F4LH.js +7 -0
  57. package/dist/chunks/chunk-ETV3C2CV.js +7 -0
  58. package/dist/chunks/chunk-EVZRQGNK.js +7 -0
  59. package/dist/chunks/chunk-F2ZWW2IO.js +8 -0
  60. package/dist/chunks/chunk-FAW6NBLQ.js +7 -0
  61. package/dist/chunks/chunk-FI772UVH.js +7 -0
  62. package/dist/chunks/chunk-FKCOBJFH.js +7 -0
  63. package/dist/chunks/chunk-FVGESGJI.js +45 -0
  64. package/dist/chunks/chunk-G5FC5ZCO.js +9 -0
  65. package/dist/chunks/chunk-G6CTAHKY.js +39 -0
  66. package/dist/chunks/chunk-G7Y77DFH.js +7 -0
  67. package/dist/chunks/chunk-GHAY4PSD.js +7 -0
  68. package/dist/chunks/chunk-GHM7V3GG.js +7 -0
  69. package/dist/chunks/chunk-GRNTLNC7.js +7 -0
  70. package/dist/chunks/chunk-GTRGQIY2.js +10 -0
  71. package/dist/chunks/chunk-GU6VIFR5.js +7 -0
  72. package/dist/chunks/{constants-YMCRE6IG.js → chunk-GZNDA6SV.js} +2 -9
  73. package/dist/chunks/chunk-HBFPLBTX.js +10 -0
  74. package/dist/chunks/chunk-HEGJZJO7.js +7 -0
  75. package/dist/chunks/chunk-HSJ6AHWG.js +12 -0
  76. package/dist/chunks/chunk-HTC6KO2B.js +7 -0
  77. package/dist/chunks/chunk-HVUHCRZB.js +18 -0
  78. package/dist/chunks/chunk-HZZ5L472.js +7 -0
  79. package/dist/chunks/chunk-IVSSTHB6.js +7 -0
  80. package/dist/chunks/chunk-IVWPQYIH.js +7 -0
  81. package/dist/chunks/chunk-J3U3L45Y.js +7 -0
  82. package/dist/chunks/chunk-JAJW3P42.js +7 -0
  83. package/dist/chunks/chunk-JEIMW3CO.js +7 -0
  84. package/dist/chunks/chunk-JIYY3B4C.js +7 -0
  85. package/dist/chunks/chunk-JKTQV2QJ.js +7 -0
  86. package/dist/chunks/chunk-JTVVBRW7.js +7 -0
  87. package/dist/chunks/chunk-JYAUUIR4.js +7 -0
  88. package/dist/chunks/chunk-JZRMH5UA.js +7 -0
  89. package/dist/chunks/chunk-K2RAW5DI.js +10 -0
  90. package/dist/chunks/chunk-K3KJZLBD.js +7 -0
  91. package/dist/chunks/chunk-KK4AJES5.js +36 -0
  92. package/dist/chunks/chunk-KKS7XWEX.js +7 -0
  93. package/dist/chunks/chunk-KNEWCUWF.js +14 -0
  94. package/dist/chunks/chunk-KO733OJG.js +9 -0
  95. package/dist/chunks/chunk-L243RUIR.js +19 -0
  96. package/dist/chunks/chunk-L3JDEHCQ.js +7 -0
  97. package/dist/chunks/chunk-LDM3SQAU.js +13 -0
  98. package/dist/chunks/chunk-LNPMDXBJ.js +7 -0
  99. package/dist/chunks/chunk-M2W3HKV3.js +23 -0
  100. package/dist/chunks/chunk-M2XARQBF.js +9 -0
  101. package/dist/chunks/chunk-M5AV545M.js +7 -0
  102. package/dist/chunks/chunk-MAVRGZQP.js +7 -0
  103. package/dist/chunks/chunk-MBL6TXEJ.js +7 -0
  104. package/dist/chunks/chunk-MEAY2K5Z.js +11 -0
  105. package/dist/chunks/chunk-MY4MONOH.js +7 -0
  106. package/dist/chunks/chunk-N3N5UHIL.js +7 -0
  107. package/dist/chunks/chunk-N3ZZ7FHQ.js +7 -0
  108. package/dist/chunks/chunk-N6CNMMSZ.js +7 -0
  109. package/dist/chunks/chunk-NBVY237X.js +7 -0
  110. package/dist/chunks/chunk-NGNOUPWS.js +25 -0
  111. package/dist/chunks/chunk-NHTF332K.js +7 -0
  112. package/dist/chunks/chunk-NNP5NITU.js +15 -0
  113. package/dist/chunks/chunk-NS4FH2TY.js +11 -0
  114. package/dist/chunks/chunk-NUGLE4QY.js +11 -0
  115. package/dist/chunks/chunk-NWFHHUKZ.js +7 -0
  116. package/dist/chunks/chunk-O7G3CZ42.js +7 -0
  117. package/dist/chunks/chunk-OD6RZ3XZ.js +8 -0
  118. package/dist/chunks/chunk-OHDEHZLX.js +7 -0
  119. package/dist/chunks/chunk-OK3S6KFX.js +16 -0
  120. package/dist/chunks/chunk-OKZDOANA.js +23 -0
  121. package/dist/chunks/chunk-OSCCYU74.js +7 -0
  122. package/dist/chunks/chunk-OUHPDA7Q.js +7 -0
  123. package/dist/chunks/chunk-P2O5DOYE.js +7 -0
  124. package/dist/chunks/chunk-PHW54NU5.js +13 -0
  125. package/dist/chunks/chunk-PPCFQQSU.js +7 -0
  126. package/dist/chunks/chunk-QGIGNMII.js +8 -0
  127. package/dist/chunks/chunk-QGIQK47P.js +7 -0
  128. package/dist/chunks/chunk-QHJLRTVY.js +7 -0
  129. package/dist/chunks/{chunk-2473DUBR.js → chunk-QR7QPUFN.js} +1 -9
  130. package/dist/chunks/chunk-QTKJC2O5.js +7 -0
  131. package/dist/chunks/chunk-R2TGGVCT.js +19 -0
  132. package/dist/chunks/chunk-RAIBQIKB.js +7 -0
  133. package/dist/chunks/chunk-RCTYVKM5.js +16 -0
  134. package/dist/chunks/chunk-RKAUVPOQ.js +86 -0
  135. package/dist/chunks/chunk-S5CEIACD.js +7 -0
  136. package/dist/chunks/chunk-SGWVKRSR.js +8 -0
  137. package/dist/chunks/chunk-SOJCELXH.js +7 -0
  138. package/dist/chunks/chunk-SXUEGVWB.js +7 -0
  139. package/dist/chunks/{chunk-GGPE5377.js → chunk-T3GQAMBJ.js} +1 -9
  140. package/dist/chunks/chunk-T52FMXWC.js +7 -0
  141. package/dist/chunks/chunk-TG2RCYTH.js +7 -0
  142. package/dist/chunks/chunk-TJCIHDPZ.js +9 -0
  143. package/dist/chunks/chunk-TKBXN4H3.js +9 -0
  144. package/dist/chunks/chunk-TRTEXGVN.js +7 -0
  145. package/dist/chunks/chunk-TXELFFNK.js +15 -0
  146. package/dist/chunks/chunk-U56NHYAH.js +7 -0
  147. package/dist/chunks/chunk-U7KCDTCH.js +12 -0
  148. package/dist/chunks/chunk-UETTIYUQ.js +8 -0
  149. package/dist/chunks/chunk-UGMZQZJE.js +24 -0
  150. package/dist/chunks/chunk-ULLWCOYC.js +7 -0
  151. package/dist/chunks/chunk-UXTHEQVJ.js +21 -0
  152. package/dist/chunks/chunk-VLZ47RWM.js +44 -0
  153. package/dist/chunks/chunk-WKZ6JSGZ.js +7 -0
  154. package/dist/chunks/chunk-WPS6JZF6.js +7 -0
  155. package/dist/chunks/chunk-WRILLB46.js +7 -0
  156. package/dist/chunks/chunk-WUZD4KBL.js +7 -0
  157. package/dist/chunks/chunk-XCJDGQO7.js +7 -0
  158. package/dist/chunks/{pkg-56KRLZ5K.js → chunk-XD2LZRBS.js} +1 -7
  159. package/dist/chunks/chunk-XFVGX5HG.js +7 -0
  160. package/dist/chunks/chunk-XHOGOH6N.js +7 -0
  161. package/dist/chunks/{update-route-version-E3V47KNI.js → chunk-XPXOV5UO.js} +1 -7
  162. package/dist/chunks/chunk-XQ73QIQ3.js +7 -0
  163. package/dist/chunks/chunk-XSVBYDYI.js +8 -0
  164. package/dist/chunks/chunk-YKZLKOOD.js +12 -0
  165. package/dist/chunks/chunk-YMVDWVMO.js +7 -0
  166. package/dist/chunks/chunk-YPTLSODC.js +7 -0
  167. package/dist/chunks/chunk-YV6CTDHR.js +7 -0
  168. package/dist/chunks/chunk-Z6Y55QJW.js +23 -0
  169. package/dist/chunks/chunk-ZDX75YNZ.js +7 -0
  170. package/dist/chunks/chunk-ZIPVX7LD.js +7 -0
  171. package/dist/chunks/chunk-ZKYS7EAB.js +7 -0
  172. package/dist/chunks/chunk-ZT6KDLLY.js +20 -0
  173. package/dist/chunks/chunk-ZXE4XYIV.js +7 -0
  174. package/dist/chunks/chunk-ZZQRMRWD.js +20 -0
  175. package/dist/chunks/cjs-GOQHXIHX.js +54 -0
  176. package/dist/chunks/clear-5NQAVWIF.js +8 -0
  177. package/dist/chunks/compile-vercel-config-6J2XUFRK.js +7 -0
  178. package/dist/chunks/config-CKYRXZXL.js +7 -0
  179. package/dist/chunks/config-VNUY4RJ4.js +8 -0
  180. package/dist/chunks/connect-git-provider-GIU5WZ52.js +7 -0
  181. package/dist/chunks/constants-G4UYVLOF.js +7 -0
  182. package/dist/chunks/create-project-SRQGD4JY.js +7 -0
  183. package/dist/chunks/delete-GTXXCSKQ.js +10 -0
  184. package/dist/chunks/delete-HRJEO4MI.js +9 -0
  185. package/dist/chunks/detect-projects-2GNCZ4CS.js +7 -0
  186. package/dist/chunks/detect-services-GHILEGNU.js +7 -0
  187. package/dist/chunks/disable-RWCRVG5O.js +7 -0
  188. package/dist/chunks/discard-SHFIYCJU.js +14 -0
  189. package/dist/chunks/edit-DMO3NSO2.js +9 -0
  190. package/dist/chunks/edit-EVQI2RSS.js +8 -0
  191. package/dist/chunks/enable-AWDU6STD.js +7 -0
  192. package/dist/chunks/esm-7HVUFWMN.js +7 -0
  193. package/dist/chunks/esm-BZBEM7YA.js +7 -0
  194. package/dist/chunks/esm-CXICLFA3.js +9 -0
  195. package/dist/chunks/esm-HDEHVK7I.js +9 -0
  196. package/dist/chunks/esm-NQRLKALI.js +20 -0
  197. package/dist/chunks/esm-SZZI53W7.js +7 -0
  198. package/dist/chunks/esm-WGJFGCLK.js +7 -0
  199. package/dist/chunks/exec-4AISDHUV.js +16372 -0
  200. package/dist/chunks/export-IQKTA4RS.js +19 -0
  201. package/dist/chunks/fetch-proxy-AEAWC6MD.js +7 -0
  202. package/dist/chunks/future-E2FHKPJN.js +7 -0
  203. package/dist/chunks/generate-cert-for-deploy-VKOWC4PZ.js +7 -0
  204. package/dist/chunks/image-LDFYNOCA.js +7 -0
  205. package/dist/chunks/import-builders-P7CXSX2D.js +7 -0
  206. package/dist/chunks/inspect-3N47ODIH.js +15 -0
  207. package/dist/chunks/inspect-53SGDDAH.js +20 -0
  208. package/dist/chunks/inspect-5INZDUQS.js +19 -0
  209. package/dist/chunks/inspect-WMT2M335.js +9 -0
  210. package/dist/chunks/inspect-Y6BUCOUV.js +13 -0
  211. package/dist/chunks/list-BIAPHKFM.js +11 -0
  212. package/dist/chunks/list-DMOCRRSE.js +16 -0
  213. package/dist/chunks/list-K5J7OULR.js +10 -0
  214. package/dist/chunks/login-DEAEVUHM.js +7 -0
  215. package/dist/chunks/login-SRVNHI4Y.js +9 -0
  216. package/dist/chunks/logs-GK7CJBYY.js +7 -0
  217. package/dist/chunks/ls-7ZX6DCJW.js +12 -0
  218. package/dist/chunks/ls-AJWN5ZR4.js +12 -0
  219. package/dist/chunks/ls-BFJWCRLZ.js +12 -0
  220. package/dist/chunks/ls-KGIE6HCO.js +12 -0
  221. package/dist/chunks/ls-UVKTHBTE.js +8 -0
  222. package/dist/chunks/ls-WEG45IOC.js +8 -0
  223. package/dist/chunks/native-self-update-KOJVRMHR.js +7 -0
  224. package/dist/chunks/open-OEWPI5G6.js +7 -0
  225. package/dist/chunks/openapi-MO5HYMHR.js +7 -0
  226. package/dist/chunks/permissions-EPQBQFE3.js +7 -0
  227. package/dist/chunks/pkg-YFU67U7I.js +7 -0
  228. package/dist/chunks/prompt-missing-credentials-IUHLYSQU.js +7 -0
  229. package/dist/chunks/publish-JG7MEPWT.js +15 -0
  230. package/dist/chunks/pull-MRKXG6TO.js +7 -0
  231. package/dist/chunks/purchase-domain-if-available-O5ARXEZ5.js +7 -0
  232. package/dist/chunks/push-XOXJDFYO.js +7 -0
  233. package/dist/chunks/query-AL7C6WV2.js +12 -0
  234. package/dist/chunks/reauthenticate-SH4XR7NH.js +7 -0
  235. package/dist/chunks/reorder-5DMRFDBY.js +10 -0
  236. package/dist/chunks/reply-WSRNZWFD.js +9 -0
  237. package/dist/chunks/repo-info-to-url-SK3VX6UL.js +7 -0
  238. package/dist/chunks/resolve-YJUXQVOZ.js +12 -0
  239. package/dist/chunks/resolve-deployment-framework-preset-XF3NJIDS.js +7 -0
  240. package/dist/chunks/restore-QT3DBGKU.js +16 -0
  241. package/dist/chunks/rm-MHPIUEZ5.js +8 -0
  242. package/dist/chunks/rm-MVZFU6RG.js +8 -0
  243. package/dist/chunks/rm-PXR4J2US.js +8 -0
  244. package/dist/chunks/rm-WB2AIP3N.js +8 -0
  245. package/dist/chunks/rm-XRP6MRUT.js +8 -0
  246. package/dist/chunks/routes-5DERZV5M.js +7 -0
  247. package/dist/chunks/rule-inspect-TT3DRGCS.js +8 -0
  248. package/dist/chunks/rules-B5GW4KJH.js +7 -0
  249. package/dist/chunks/schema-JY5QTZOG.js +14 -0
  250. package/dist/chunks/schema-KCNKVFT3.js +44 -0
  251. package/dist/chunks/select-org-KSCYSESV.js +7 -0
  252. package/dist/chunks/set-7BANEWEL.js +7 -0
  253. package/dist/chunks/setup-and-link-ZAV3EFGC.js +7 -0
  254. package/dist/chunks/slugify-O5DBATYT.js +7 -0
  255. package/dist/chunks/stamp-OX4YO3KY.js +7 -0
  256. package/dist/chunks/tags-VZR66NUC.js +7 -0
  257. package/dist/chunks/types-LRXQEDYI.js +14 -0
  258. package/dist/chunks/update-RBFNNSWE.js +8 -0
  259. package/dist/chunks/update-route-version-XZAFPQJC.js +7 -0
  260. package/dist/chunks/utils-B5ZTMQKY.js +58 -0
  261. package/dist/chunks/vlt-builder-importer-YVCYYRVV.js +11 -0
  262. package/dist/commands/build/index.js +24 -4925
  263. package/dist/commands/deploy/index.js +43 -2875
  264. package/dist/commands/dev/index.js +56 -23857
  265. package/dist/commands/env/index.js +26 -3411
  266. package/dist/commands/link/index.js +4 -284
  267. package/dist/commands/list/index.js +6 -566
  268. package/dist/commands-bulk.js +1187 -87691
  269. package/dist/help.js +1 -8
  270. package/dist/index.js +19 -2591
  271. package/dist/version.mjs +1 -1
  272. package/package.json +50 -51
  273. package/dist/chunks/add-EQZRT4XL.js +0 -221
  274. package/dist/chunks/add-KMDROZC3.js +0 -196
  275. package/dist/chunks/add-QPJ3XMBV.js +0 -145
  276. package/dist/chunks/build-W4HPTAOB.js +0 -251
  277. package/dist/chunks/chunk-26CU4Q3C.js +0 -598
  278. package/dist/chunks/chunk-2HSQ7YUK.js +0 -93
  279. package/dist/chunks/chunk-2JIX6UMI.js +0 -4626
  280. package/dist/chunks/chunk-2LCFOK66.js +0 -1536
  281. package/dist/chunks/chunk-332LMJLZ.js +0 -16014
  282. package/dist/chunks/chunk-3HZLXCVL.js +0 -137
  283. package/dist/chunks/chunk-3VM7HWF6.js +0 -104
  284. package/dist/chunks/chunk-3ZE5CFVM.js +0 -346
  285. package/dist/chunks/chunk-4IALDGB7.js +0 -22
  286. package/dist/chunks/chunk-4KD5BYHB.js +0 -127
  287. package/dist/chunks/chunk-4TUMNBEE.js +0 -231
  288. package/dist/chunks/chunk-4WG2MYCI.js +0 -163
  289. package/dist/chunks/chunk-57RHXXXG.js +0 -150
  290. package/dist/chunks/chunk-5AJPMLDV.js +0 -28
  291. package/dist/chunks/chunk-5EIV6LPQ.js +0 -305
  292. package/dist/chunks/chunk-5NF5HOBJ.js +0 -1854
  293. package/dist/chunks/chunk-653QRQAD.js +0 -417
  294. package/dist/chunks/chunk-67CRVWDF.js +0 -81
  295. package/dist/chunks/chunk-6E6KPBXY.js +0 -43
  296. package/dist/chunks/chunk-75VENWDN.js +0 -1892
  297. package/dist/chunks/chunk-7MRDIPJY.js +0 -107
  298. package/dist/chunks/chunk-7NRNFV77.js +0 -875
  299. package/dist/chunks/chunk-7Q45OKWR.js +0 -149
  300. package/dist/chunks/chunk-AHU7WNL2.js +0 -24
  301. package/dist/chunks/chunk-AINIBIP4.js +0 -39
  302. package/dist/chunks/chunk-AJ5HUOWB.js +0 -14059
  303. package/dist/chunks/chunk-AKLTIZCU.js +0 -46
  304. package/dist/chunks/chunk-AQ6P3IGG.js +0 -49
  305. package/dist/chunks/chunk-B5NH7SLK.js +0 -324
  306. package/dist/chunks/chunk-B5XLQKHI.js +0 -849
  307. package/dist/chunks/chunk-BEQV3X2L.js +0 -86
  308. package/dist/chunks/chunk-CAHP7UGE.js +0 -79
  309. package/dist/chunks/chunk-CFDDM4TX.js +0 -13618
  310. package/dist/chunks/chunk-CJV7J7B5.js +0 -314
  311. package/dist/chunks/chunk-CV5YC2EN.js +0 -867
  312. package/dist/chunks/chunk-CXFY6A6W.js +0 -255
  313. package/dist/chunks/chunk-D5SMZXVO.js +0 -233
  314. package/dist/chunks/chunk-E336ZXPP.js +0 -43
  315. package/dist/chunks/chunk-EDMW7SBH.js +0 -246
  316. package/dist/chunks/chunk-EFYMIIER.js +0 -40
  317. package/dist/chunks/chunk-EKPSCRJZ.js +0 -26
  318. package/dist/chunks/chunk-EOZFDJSY.js +0 -18
  319. package/dist/chunks/chunk-EWBCSDTM.js +0 -1708
  320. package/dist/chunks/chunk-EZKW5YJ2.js +0 -177
  321. package/dist/chunks/chunk-F2QLCXCF.js +0 -2399
  322. package/dist/chunks/chunk-FGDKMNEN.js +0 -21
  323. package/dist/chunks/chunk-FRVG4OW3.js +0 -7438
  324. package/dist/chunks/chunk-FVF4UHDM.js +0 -1288
  325. package/dist/chunks/chunk-G5FBSUL4.js +0 -822
  326. package/dist/chunks/chunk-GDOUDU6O.js +0 -74
  327. package/dist/chunks/chunk-GGP5R3FU.js +0 -129
  328. package/dist/chunks/chunk-GVNCVKCI.js +0 -68
  329. package/dist/chunks/chunk-GY5I4AYD.js +0 -122
  330. package/dist/chunks/chunk-GZLPFESR.js +0 -48
  331. package/dist/chunks/chunk-HB4UKFDO.js +0 -1295
  332. package/dist/chunks/chunk-HD4DR3DA.js +0 -818
  333. package/dist/chunks/chunk-HKHXKSXQ.js +0 -152
  334. package/dist/chunks/chunk-HM24ZWQL.js +0 -174
  335. package/dist/chunks/chunk-HRXRELD3.js +0 -338
  336. package/dist/chunks/chunk-IB5L4LKZ.js +0 -1082
  337. package/dist/chunks/chunk-IIMSID24.js +0 -104
  338. package/dist/chunks/chunk-J7JKZM4T.js +0 -58
  339. package/dist/chunks/chunk-JC2O346E.js +0 -137
  340. package/dist/chunks/chunk-JSD4EZL3.js +0 -34
  341. package/dist/chunks/chunk-JZXJZX7O.js +0 -257
  342. package/dist/chunks/chunk-K3RED3VO.js +0 -566
  343. package/dist/chunks/chunk-KFWQ3EFH.js +0 -151
  344. package/dist/chunks/chunk-KW7BS25T.js +0 -466
  345. package/dist/chunks/chunk-KXDWXXJH.js +0 -70
  346. package/dist/chunks/chunk-LERVNZTD.js +0 -90
  347. package/dist/chunks/chunk-LYAAQDNS.js +0 -242
  348. package/dist/chunks/chunk-M5I6INNF.js +0 -61
  349. package/dist/chunks/chunk-N6HP5BLI.js +0 -18190
  350. package/dist/chunks/chunk-ND5CF2H3.js +0 -53
  351. package/dist/chunks/chunk-NFU4XJIR.js +0 -120
  352. package/dist/chunks/chunk-NW34PW6V.js +0 -1772
  353. package/dist/chunks/chunk-OAMU5QO6.js +0 -18
  354. package/dist/chunks/chunk-OCIZ6ZYA.js +0 -253
  355. package/dist/chunks/chunk-ORQZKIIB.js +0 -2914
  356. package/dist/chunks/chunk-P3SKP5WM.js +0 -27
  357. package/dist/chunks/chunk-P4QNYOFB.js +0 -96
  358. package/dist/chunks/chunk-P7VSBDR4.js +0 -827
  359. package/dist/chunks/chunk-PEC3CQSK.js +0 -90
  360. package/dist/chunks/chunk-PMSMUMUO.js +0 -30
  361. package/dist/chunks/chunk-PNGVSHR3.js +0 -40
  362. package/dist/chunks/chunk-POOO7W47.js +0 -916
  363. package/dist/chunks/chunk-PRWJUY5U.js +0 -848
  364. package/dist/chunks/chunk-Q2DGFCO7.js +0 -579
  365. package/dist/chunks/chunk-RBF2NPUP.js +0 -577
  366. package/dist/chunks/chunk-RBIFXFZX.js +0 -52
  367. package/dist/chunks/chunk-RDTRWLWB.js +0 -11441
  368. package/dist/chunks/chunk-RN6V5ODW.js +0 -114
  369. package/dist/chunks/chunk-RNSMTWA6.js +0 -122
  370. package/dist/chunks/chunk-RTJASENB.js +0 -59
  371. package/dist/chunks/chunk-RVBZ64EQ.js +0 -52
  372. package/dist/chunks/chunk-S7KYDPEM.js +0 -1564
  373. package/dist/chunks/chunk-SLPSPYVR.js +0 -334
  374. package/dist/chunks/chunk-SM3F3PYJ.js +0 -522
  375. package/dist/chunks/chunk-TO7QZGYK.js +0 -105
  376. package/dist/chunks/chunk-TSBUHSN7.js +0 -3495
  377. package/dist/chunks/chunk-TSFWMUCY.js +0 -506
  378. package/dist/chunks/chunk-TZ2YI2VH.js +0 -87
  379. package/dist/chunks/chunk-UG2WOB5L.js +0 -150
  380. package/dist/chunks/chunk-UNKHOYMF.js +0 -559
  381. package/dist/chunks/chunk-UOVWUSLG.js +0 -2099
  382. package/dist/chunks/chunk-V4RMJKQP.js +0 -36
  383. package/dist/chunks/chunk-VGIMO3ZK.js +0 -17
  384. package/dist/chunks/chunk-VGKSIKCC.js +0 -92
  385. package/dist/chunks/chunk-VP5Y3SZG.js +0 -106
  386. package/dist/chunks/chunk-VXYGCOKL.js +0 -28
  387. package/dist/chunks/chunk-W7FGI2GZ.js +0 -233
  388. package/dist/chunks/chunk-WGGABYO5.js +0 -31
  389. package/dist/chunks/chunk-XDGOOW3K.js +0 -60
  390. package/dist/chunks/chunk-XFF5TGRA.js +0 -303
  391. package/dist/chunks/chunk-XNIZGCN5.js +0 -58
  392. package/dist/chunks/chunk-XPJLPUKO.js +0 -117
  393. package/dist/chunks/chunk-XUAWTW4W.js +0 -467
  394. package/dist/chunks/chunk-YPQSDAEW.js +0 -29
  395. package/dist/chunks/chunk-YS76T533.js +0 -270
  396. package/dist/chunks/chunk-ZDU2NODC.js +0 -104
  397. package/dist/chunks/chunk-ZW6HETRE.js +0 -97
  398. package/dist/chunks/cjs-DV4RM7XU.js +0 -20743
  399. package/dist/chunks/clear-4IACMLFU.js +0 -141
  400. package/dist/chunks/compile-vercel-config-PQQ3OCLV.js +0 -33
  401. package/dist/chunks/config-BQQKMQBP.js +0 -168
  402. package/dist/chunks/config-OCPNHXQL.js +0 -127
  403. package/dist/chunks/delete-HRKIYPCO.js +0 -159
  404. package/dist/chunks/delete-P2UL3KTU.js +0 -226
  405. package/dist/chunks/detect-projects-ODNU4PK2.js +0 -18
  406. package/dist/chunks/detect-services-U7QGT7VO.js +0 -40
  407. package/dist/chunks/disable-3NYMICQ3.js +0 -198
  408. package/dist/chunks/discard-RNVEJUK3.js +0 -145
  409. package/dist/chunks/edit-63S2RQHR.js +0 -162
  410. package/dist/chunks/edit-CTENFZ7H.js +0 -647
  411. package/dist/chunks/enable-WILWXAHV.js +0 -204
  412. package/dist/chunks/exec-4IPHZ55G.js +0 -1291
  413. package/dist/chunks/export-YHGV3EPK.js +0 -177
  414. package/dist/chunks/fetch-proxy-R3JZNXBZ.js +0 -99
  415. package/dist/chunks/image-MWKS2YMB.js +0 -75
  416. package/dist/chunks/import-builders-H55X5VYD.js +0 -39
  417. package/dist/chunks/inspect-JTJMK6TO.js +0 -596
  418. package/dist/chunks/inspect-KBIPLMGR.js +0 -216
  419. package/dist/chunks/inspect-OP26FDBY.js +0 -171
  420. package/dist/chunks/inspect-SW4UMWTB.js +0 -175
  421. package/dist/chunks/inspect-WPLZPVBO.js +0 -145
  422. package/dist/chunks/list-HE7DWAWH.js +0 -387
  423. package/dist/chunks/list-OUG7WCT7.js +0 -404
  424. package/dist/chunks/list-QUSEURJZ.js +0 -426
  425. package/dist/chunks/login-MIIQJVF3.js +0 -233
  426. package/dist/chunks/ls-24N3DUK4.js +0 -183
  427. package/dist/chunks/ls-3Y7KEFKT.js +0 -175
  428. package/dist/chunks/ls-75F5HIJ5.js +0 -188
  429. package/dist/chunks/ls-REN6X2X5.js +0 -204
  430. package/dist/chunks/ls-W4STUDXK.js +0 -223
  431. package/dist/chunks/ls-Z4CTSD6C.js +0 -210
  432. package/dist/chunks/open-ARMCLPBK.js +0 -116
  433. package/dist/chunks/permissions-JKI67F62.js +0 -99
  434. package/dist/chunks/publish-SMSQ7OX2.js +0 -155
  435. package/dist/chunks/pull-4QZJZELD.js +0 -45
  436. package/dist/chunks/push-T6IYQY2J.js +0 -191
  437. package/dist/chunks/query-CP3JK5LW.js +0 -725
  438. package/dist/chunks/reorder-RAWKFGLV.js +0 -412
  439. package/dist/chunks/reply-235UHUD4.js +0 -176
  440. package/dist/chunks/resolve-5KCLN7QV.js +0 -237
  441. package/dist/chunks/resolve-deployment-framework-preset-NPE6RLV3.js +0 -36
  442. package/dist/chunks/restore-D24WAUAN.js +0 -252
  443. package/dist/chunks/rm-DBQDXSOC.js +0 -162
  444. package/dist/chunks/rm-G5INO77R.js +0 -148
  445. package/dist/chunks/rm-NLKSEKZ5.js +0 -195
  446. package/dist/chunks/rm-QV76CJA4.js +0 -322
  447. package/dist/chunks/rm-TZ4PDDUK.js +0 -147
  448. package/dist/chunks/routes-QVMBXOSX.js +0 -24
  449. package/dist/chunks/rule-inspect-76MC7I2D.js +0 -123
  450. package/dist/chunks/rules-IDUXVTPG.js +0 -89
  451. package/dist/chunks/schema-AV6BHGKY.js +0 -237
  452. package/dist/chunks/schema-QJVQTNB4.js +0 -381
  453. package/dist/chunks/set-L5NFQSCF.js +0 -250
  454. package/dist/chunks/setup-and-link-USSVDKCM.js +0 -65
  455. package/dist/chunks/stamp-AA7R3MZS.js +0 -16
  456. package/dist/chunks/tags-2NLUU4EC.js +0 -69
  457. package/dist/chunks/types-4GAJ7XQQ.js +0 -116
  458. package/dist/chunks/update-WGLBB65M.js +0 -224
  459. package/dist/chunks/vlt-builder-importer-USCFHWPL.js +0 -322
@@ -1,2099 +0,0 @@
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 {
8
- getGlobalPathConfig,
9
- highlight
10
- } from "./chunk-AINIBIP4.js";
11
- import {
12
- getLocalPathConfig
13
- } from "./chunk-J7JKZM4T.js";
14
- import {
15
- PromptBackError,
16
- PromptCanceledError
17
- } from "./chunk-V4RMJKQP.js";
18
- import {
19
- require_dist as require_dist2
20
- } from "./chunk-N6HP5BLI.js";
21
- import {
22
- DEFAULT_VERCEL_CONFIG_FILENAME,
23
- VERCEL_CONFIG_EXTENSIONS
24
- } from "./chunk-653QRQAD.js";
25
- import {
26
- performDeviceCodeFlow
27
- } from "./chunk-JZXJZX7O.js";
28
- import {
29
- require_load_json_file
30
- } from "./chunk-B5XLQKHI.js";
31
- import {
32
- isOAuthError,
33
- processTokenResponse,
34
- refreshTokenRequest,
35
- ua_default
36
- } from "./chunk-SM3F3PYJ.js";
37
- import {
38
- Headers,
39
- fetch
40
- } from "./chunk-XNIZGCN5.js";
41
- import {
42
- parseArguments
43
- } from "./chunk-57RHXXXG.js";
44
- import {
45
- VERCEL_DIR,
46
- createPrompt,
47
- esm_default,
48
- esm_default2,
49
- esm_default3,
50
- humanizePath,
51
- isBackspaceKey,
52
- isEnterKey,
53
- makeTheme,
54
- onExit,
55
- require_cli_width,
56
- require_lib2 as require_lib,
57
- require_source as require_source2,
58
- require_wrap_ansi,
59
- useKeypress,
60
- usePrefix,
61
- useState
62
- } from "./chunk-AJ5HUOWB.js";
63
- import {
64
- require_strip_ansi
65
- } from "./chunk-XPJLPUKO.js";
66
- import {
67
- APIError,
68
- NowError
69
- } from "./chunk-CV5YC2EN.js";
70
- import {
71
- emoji,
72
- link_default,
73
- output_manager_default,
74
- prependEmoji,
75
- require_ansi_escapes
76
- } from "./chunk-2JIX6UMI.js";
77
- import {
78
- pkg_default
79
- } from "./chunk-P4QNYOFB.js";
80
- import {
81
- require_dist
82
- } from "./chunk-ZW6HETRE.js";
83
- import {
84
- require_source
85
- } from "./chunk-S7KYDPEM.js";
86
- import {
87
- __commonJS,
88
- __publicField,
89
- __require,
90
- __toESM
91
- } from "./chunk-TZ2YI2VH.js";
92
-
93
- // ../../node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js
94
- var require_yoctocolors_cjs = __commonJS({
95
- "../../node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js"(exports, module) {
96
- var tty = __require("tty");
97
- var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
98
- var format = (open, close) => {
99
- if (!hasColors) {
100
- return (input) => input;
101
- }
102
- const openCode = `\x1B[${open}m`;
103
- const closeCode = `\x1B[${close}m`;
104
- return (input) => {
105
- const string = input + "";
106
- let index = string.indexOf(closeCode);
107
- if (index === -1) {
108
- return openCode + string + closeCode;
109
- }
110
- let result = openCode;
111
- let lastIndex = 0;
112
- const reopenOnNestedClose = close === 22;
113
- const replaceCode = (reopenOnNestedClose ? closeCode : "") + openCode;
114
- while (index !== -1) {
115
- result += string.slice(lastIndex, index) + replaceCode;
116
- lastIndex = index + closeCode.length;
117
- index = string.indexOf(closeCode, lastIndex);
118
- }
119
- result += string.slice(lastIndex) + closeCode;
120
- return result;
121
- };
122
- };
123
- var colors4 = {};
124
- colors4.reset = format(0, 0);
125
- colors4.bold = format(1, 22);
126
- colors4.dim = format(2, 22);
127
- colors4.italic = format(3, 23);
128
- colors4.underline = format(4, 24);
129
- colors4.overline = format(53, 55);
130
- colors4.inverse = format(7, 27);
131
- colors4.hidden = format(8, 28);
132
- colors4.strikethrough = format(9, 29);
133
- colors4.black = format(30, 39);
134
- colors4.red = format(31, 39);
135
- colors4.green = format(32, 39);
136
- colors4.yellow = format(33, 39);
137
- colors4.blue = format(34, 39);
138
- colors4.magenta = format(35, 39);
139
- colors4.cyan = format(36, 39);
140
- colors4.white = format(37, 39);
141
- colors4.gray = format(90, 39);
142
- colors4.bgBlack = format(40, 49);
143
- colors4.bgRed = format(41, 49);
144
- colors4.bgGreen = format(42, 49);
145
- colors4.bgYellow = format(43, 49);
146
- colors4.bgBlue = format(44, 49);
147
- colors4.bgMagenta = format(45, 49);
148
- colors4.bgCyan = format(46, 49);
149
- colors4.bgWhite = format(47, 49);
150
- colors4.bgGray = format(100, 49);
151
- colors4.redBright = format(91, 39);
152
- colors4.greenBright = format(92, 39);
153
- colors4.yellowBright = format(93, 39);
154
- colors4.blueBright = format(94, 39);
155
- colors4.magentaBright = format(95, 39);
156
- colors4.cyanBright = format(96, 39);
157
- colors4.whiteBright = format(97, 39);
158
- colors4.bgRedBright = format(101, 49);
159
- colors4.bgGreenBright = format(102, 49);
160
- colors4.bgYellowBright = format(103, 49);
161
- colors4.bgBlueBright = format(104, 49);
162
- colors4.bgMagentaBright = format(105, 49);
163
- colors4.bgCyanBright = format(106, 49);
164
- colors4.bgWhiteBright = format(107, 49);
165
- module.exports = colors4;
166
- }
167
- });
168
-
169
- // ../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry_operation.js
170
- var require_retry_operation = __commonJS({
171
- "../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry_operation.js"(exports, module) {
172
- function RetryOperation(timeouts, options) {
173
- if (typeof options === "boolean") {
174
- options = { forever: options };
175
- }
176
- this._timeouts = timeouts;
177
- this._options = options || {};
178
- this._fn = null;
179
- this._errors = [];
180
- this._attempts = 1;
181
- this._operationTimeout = null;
182
- this._operationTimeoutCb = null;
183
- this._timeout = null;
184
- if (this._options.forever) {
185
- this._cachedTimeouts = this._timeouts.slice(0);
186
- }
187
- }
188
- module.exports = RetryOperation;
189
- RetryOperation.prototype.stop = function() {
190
- if (this._timeout) {
191
- clearTimeout(this._timeout);
192
- }
193
- this._timeouts = [];
194
- this._cachedTimeouts = null;
195
- };
196
- RetryOperation.prototype.retry = function(err) {
197
- if (this._timeout) {
198
- clearTimeout(this._timeout);
199
- }
200
- if (!err) {
201
- return false;
202
- }
203
- this._errors.push(err);
204
- var timeout = this._timeouts.shift();
205
- if (timeout === void 0) {
206
- if (this._cachedTimeouts) {
207
- this._errors.splice(this._errors.length - 1, this._errors.length);
208
- this._timeouts = this._cachedTimeouts.slice(0);
209
- timeout = this._timeouts.shift();
210
- } else {
211
- return false;
212
- }
213
- }
214
- var self = this;
215
- var timer = setTimeout(function() {
216
- self._attempts++;
217
- if (self._operationTimeoutCb) {
218
- self._timeout = setTimeout(function() {
219
- self._operationTimeoutCb(self._attempts);
220
- }, self._operationTimeout);
221
- if (this._options.unref) {
222
- self._timeout.unref();
223
- }
224
- }
225
- self._fn(self._attempts);
226
- }, timeout);
227
- if (this._options.unref) {
228
- timer.unref();
229
- }
230
- return true;
231
- };
232
- RetryOperation.prototype.attempt = function(fn, timeoutOps) {
233
- this._fn = fn;
234
- if (timeoutOps) {
235
- if (timeoutOps.timeout) {
236
- this._operationTimeout = timeoutOps.timeout;
237
- }
238
- if (timeoutOps.cb) {
239
- this._operationTimeoutCb = timeoutOps.cb;
240
- }
241
- }
242
- var self = this;
243
- if (this._operationTimeoutCb) {
244
- this._timeout = setTimeout(function() {
245
- self._operationTimeoutCb();
246
- }, self._operationTimeout);
247
- }
248
- this._fn(this._attempts);
249
- };
250
- RetryOperation.prototype.try = function(fn) {
251
- console.log("Using RetryOperation.try() is deprecated");
252
- this.attempt(fn);
253
- };
254
- RetryOperation.prototype.start = function(fn) {
255
- console.log("Using RetryOperation.start() is deprecated");
256
- this.attempt(fn);
257
- };
258
- RetryOperation.prototype.start = RetryOperation.prototype.try;
259
- RetryOperation.prototype.errors = function() {
260
- return this._errors;
261
- };
262
- RetryOperation.prototype.attempts = function() {
263
- return this._attempts;
264
- };
265
- RetryOperation.prototype.mainError = function() {
266
- if (this._errors.length === 0) {
267
- return null;
268
- }
269
- var counts = {};
270
- var mainError = null;
271
- var mainErrorCount = 0;
272
- for (var i = 0; i < this._errors.length; i++) {
273
- var error = this._errors[i];
274
- var message = error.message;
275
- var count = (counts[message] || 0) + 1;
276
- counts[message] = count;
277
- if (count >= mainErrorCount) {
278
- mainError = error;
279
- mainErrorCount = count;
280
- }
281
- }
282
- return mainError;
283
- };
284
- }
285
- });
286
-
287
- // ../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry.js
288
- var require_retry = __commonJS({
289
- "../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry.js"(exports) {
290
- var RetryOperation = require_retry_operation();
291
- exports.operation = function(options) {
292
- var timeouts = exports.timeouts(options);
293
- return new RetryOperation(timeouts, {
294
- forever: options && options.forever,
295
- unref: options && options.unref
296
- });
297
- };
298
- exports.timeouts = function(options) {
299
- if (options instanceof Array) {
300
- return [].concat(options);
301
- }
302
- var opts = {
303
- retries: 10,
304
- factor: 2,
305
- minTimeout: 1 * 1e3,
306
- maxTimeout: Infinity,
307
- randomize: false
308
- };
309
- for (var key in options) {
310
- opts[key] = options[key];
311
- }
312
- if (opts.minTimeout > opts.maxTimeout) {
313
- throw new Error("minTimeout is greater than maxTimeout");
314
- }
315
- var timeouts = [];
316
- for (var i = 0; i < opts.retries; i++) {
317
- timeouts.push(this.createTimeout(i, opts));
318
- }
319
- if (options && options.forever && !timeouts.length) {
320
- timeouts.push(this.createTimeout(i, opts));
321
- }
322
- timeouts.sort(function(a, b) {
323
- return a - b;
324
- });
325
- return timeouts;
326
- };
327
- exports.createTimeout = function(attempt, opts) {
328
- var random = opts.randomize ? Math.random() + 1 : 1;
329
- var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
330
- timeout = Math.min(timeout, opts.maxTimeout);
331
- return timeout;
332
- };
333
- exports.wrap = function(obj, options, methods) {
334
- if (options instanceof Array) {
335
- methods = options;
336
- options = null;
337
- }
338
- if (!methods) {
339
- methods = [];
340
- for (var key in obj) {
341
- if (typeof obj[key] === "function") {
342
- methods.push(key);
343
- }
344
- }
345
- }
346
- for (var i = 0; i < methods.length; i++) {
347
- var method = methods[i];
348
- var original = obj[method];
349
- obj[method] = function retryWrapper() {
350
- var op = exports.operation(options);
351
- var args = Array.prototype.slice.call(arguments);
352
- var callback = args.pop();
353
- args.push(function(err) {
354
- if (op.retry(err)) {
355
- return;
356
- }
357
- if (err) {
358
- arguments[0] = op.mainError();
359
- }
360
- callback.apply(this, arguments);
361
- });
362
- op.attempt(function() {
363
- original.apply(obj, args);
364
- });
365
- };
366
- obj[method].options = options;
367
- }
368
- };
369
- }
370
- });
371
-
372
- // ../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/index.js
373
- var require_retry2 = __commonJS({
374
- "../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/index.js"(exports, module) {
375
- module.exports = require_retry();
376
- }
377
- });
378
-
379
- // ../../node_modules/.pnpm/async-retry@1.1.3/node_modules/async-retry/dist/index.js
380
- var require_dist3 = __commonJS({
381
- "../../node_modules/.pnpm/async-retry@1.1.3/node_modules/async-retry/dist/index.js"(exports, module) {
382
- "use strict";
383
- var retrier = require_retry2();
384
- module.exports = function(fn, opts) {
385
- opts = opts || {};
386
- return new Promise(function(resolve2, reject) {
387
- var op = retrier.operation(opts);
388
- var bail = function bail2(err) {
389
- return reject(err || new Error("Aborted"));
390
- };
391
- var onError = function onError2(err) {
392
- if (err.bail) {
393
- return bail(err);
394
- }
395
- if (!op.retry(err)) {
396
- reject(op.mainError());
397
- } else if (opts.onRetry) {
398
- opts.onRetry(err);
399
- }
400
- };
401
- op.attempt(function(num) {
402
- var val = void 0;
403
- try {
404
- val = fn(bail, num);
405
- } catch (err) {
406
- return onError(err);
407
- }
408
- Promise.resolve(val).then(resolve2, onError);
409
- });
410
- });
411
- };
412
- }
413
- });
414
-
415
- // src/util/config/files.ts
416
- var import_load_json_file = __toESM(require_load_json_file(), 1);
417
- var import_error_utils = __toESM(require_dist(), 1);
418
- var import_client = __toESM(require_dist2(), 1);
419
- import { join, basename, dirname } from "path";
420
- import { accessSync, constants } from "fs";
421
- import * as config from "@vercel/cli-config";
422
- import {
423
- persistCliAuthConfig,
424
- readCliAuthConfig
425
- } from "@vercel/cli-auth/credentials-store.js";
426
- var VERCEL_DIR2 = getGlobalPathConfig();
427
- var CONFIG_FILE_PATH = config.getConfigFilePath(VERCEL_DIR2);
428
- var AUTH_CONFIG_FILE_PATH = config.getAuthConfigFilePath(VERCEL_DIR2);
429
- var readConfigFile = () => {
430
- return config.readGlobalConfigFile(CONFIG_FILE_PATH);
431
- };
432
- var writeToConfigFile = (stuff) => {
433
- try {
434
- config.writeGlobalConfigFile(CONFIG_FILE_PATH, stuff);
435
- } catch (err) {
436
- if ((0, import_error_utils.isErrnoException)(err)) {
437
- if ((0, import_error_utils.isErrnoException)(err) && err.code === "EPERM") {
438
- output_manager_default.error(
439
- `Not able to create ${highlight(
440
- CONFIG_FILE_PATH
441
- )} (operation not permitted).`
442
- );
443
- process.exit(1);
444
- } else if (err.code === "EBADF") {
445
- output_manager_default.error(
446
- `Not able to create ${highlight(
447
- CONFIG_FILE_PATH
448
- )} (bad file descriptor).`
449
- );
450
- process.exit(1);
451
- }
452
- }
453
- throw err;
454
- }
455
- };
456
- var readAuthConfigFile = (_globalConfig) => {
457
- return {
458
- ...config.getDefaultAuthConfig(),
459
- ...readCliAuthConfig(VERCEL_DIR2)
460
- };
461
- };
462
- var persistAuthConfig = (authConfig, _globalConfig) => {
463
- try {
464
- return persistCliAuthConfig(VERCEL_DIR2, authConfig);
465
- } catch (err) {
466
- const wrappedError = new Error(
467
- `Not able to create ${humanizePath(AUTH_CONFIG_FILE_PATH)} (${(0, import_error_utils.errorToStringFriendly)(
468
- err
469
- )}).`
470
- );
471
- wrappedError.cause = err;
472
- throw wrappedError;
473
- }
474
- };
475
- function getConfigFilePath2() {
476
- return CONFIG_FILE_PATH;
477
- }
478
- function getAuthConfigFilePath2() {
479
- return AUTH_CONFIG_FILE_PATH;
480
- }
481
- function readLocalConfig(prefix = process.cwd()) {
482
- let config2 = void 0;
483
- let target = "";
484
- try {
485
- target = getLocalPathConfig(prefix);
486
- } catch (err) {
487
- if (err instanceof NowError) {
488
- output_manager_default.error(err.message);
489
- process.exit(1);
490
- } else {
491
- throw err;
492
- }
493
- }
494
- if (!target) {
495
- return;
496
- }
497
- try {
498
- accessSync(target, constants.F_OK);
499
- config2 = import_load_json_file.default.sync(target);
500
- } catch (err) {
501
- if ((0, import_error_utils.isErrnoException)(err) && err.code === "ENOENT") {
502
- } else if ((0, import_error_utils.isError)(err) && err.name === "JSONError") {
503
- output_manager_default.error(err.message);
504
- process.exit(1);
505
- } else if ((0, import_error_utils.isErrnoException)(err)) {
506
- const code = err.code ? ` (${err.code})` : "";
507
- output_manager_default.error(`Failed to read config file: ${target}${code}`);
508
- process.exit(1);
509
- } else {
510
- output_manager_default.prettyError(err);
511
- process.exit(1);
512
- }
513
- }
514
- if (!config2) {
515
- return;
516
- }
517
- const isCompiledConfig = basename(target) === "vercel.json" && basename(dirname(target)) === VERCEL_DIR;
518
- if (isCompiledConfig) {
519
- const workPath = dirname(dirname(target));
520
- let sourceFile = null;
521
- for (const ext of VERCEL_CONFIG_EXTENSIONS) {
522
- const configPath = join(workPath, `vercel.${ext}`);
523
- try {
524
- accessSync(configPath, constants.F_OK);
525
- sourceFile = basename(configPath);
526
- break;
527
- } catch {
528
- }
529
- }
530
- if (!sourceFile) {
531
- const tomlPath = join(workPath, "vercel.toml");
532
- try {
533
- accessSync(tomlPath, constants.F_OK);
534
- sourceFile = "vercel.toml";
535
- } catch {
536
- }
537
- }
538
- config2[import_client.fileNameSymbol] = sourceFile || DEFAULT_VERCEL_CONFIG_FILENAME;
539
- } else {
540
- config2[import_client.fileNameSymbol] = basename(target);
541
- }
542
- return config2;
543
- }
544
-
545
- // src/util/client.ts
546
- var import_chalk4 = __toESM(require_source(), 1);
547
-
548
- // ../../node_modules/.pnpm/@inquirer+confirm@3.1.2/node_modules/@inquirer/confirm/dist/esm/index.mjs
549
- var esm_default4 = createPrompt((config2, done) => {
550
- const { transformer = (answer) => answer ? "yes" : "no" } = config2;
551
- const [status, setStatus] = useState("pending");
552
- const [value, setValue] = useState("");
553
- const theme = makeTheme(config2.theme);
554
- const prefix = usePrefix({ theme });
555
- useKeypress((key, rl) => {
556
- if (isEnterKey(key)) {
557
- let answer = config2.default !== false;
558
- if (/^(y|yes)/i.test(value))
559
- answer = true;
560
- else if (/^(n|no)/i.test(value))
561
- answer = false;
562
- setValue(transformer(answer));
563
- setStatus("done");
564
- done(answer);
565
- } else {
566
- setValue(rl.line);
567
- }
568
- });
569
- let formattedValue = value;
570
- let defaultValue = "";
571
- if (status === "done") {
572
- formattedValue = theme.style.answer(value);
573
- } else {
574
- defaultValue = ` ${theme.style.defaultAnswer(config2.default === false ? "y/N" : "Y/n")}`;
575
- }
576
- const message = theme.style.message(config2.message);
577
- return `${prefix} ${message}${defaultValue} ${formattedValue}`;
578
- });
579
-
580
- // ../../node_modules/.pnpm/@inquirer+expand@2.1.2/node_modules/@inquirer/expand/dist/esm/index.mjs
581
- var import_chalk = __toESM(require_source2(), 1);
582
- var helpChoice = {
583
- key: "h",
584
- name: "Help, list all options",
585
- value: void 0
586
- };
587
- function getChoiceKey(choice, key) {
588
- if (key === "name") {
589
- if ("name" in choice)
590
- return choice.name;
591
- return choice.value;
592
- }
593
- if ("value" in choice)
594
- return choice.value;
595
- return choice.name;
596
- }
597
- var esm_default5 = createPrompt((config2, done) => {
598
- const { choices, default: defaultKey = "h", expanded: defaultExpandState = false } = config2;
599
- const [status, setStatus] = useState("pending");
600
- const [value, setValue] = useState("");
601
- const [expanded, setExpanded] = useState(defaultExpandState);
602
- const [errorMsg, setError] = useState(void 0);
603
- const theme = makeTheme(config2.theme);
604
- const prefix = usePrefix({ theme });
605
- useKeypress((event, rl) => {
606
- if (isEnterKey(event)) {
607
- const answer = (value || defaultKey).toLowerCase();
608
- if (answer === "h" && !expanded) {
609
- setExpanded(true);
610
- } else {
611
- const selectedChoice = choices.find(({ key }) => key === answer);
612
- if (selectedChoice) {
613
- const finalValue = getChoiceKey(selectedChoice, "value");
614
- setValue(finalValue);
615
- setStatus("done");
616
- done(finalValue);
617
- } else if (value === "") {
618
- setError("Please input a value");
619
- } else {
620
- setError(`"${import_chalk.default.red(value)}" isn't an available option`);
621
- }
622
- }
623
- } else {
624
- setValue(rl.line);
625
- setError(void 0);
626
- }
627
- });
628
- const message = theme.style.message(config2.message);
629
- if (status === "done") {
630
- return `${prefix} ${message} ${theme.style.answer(value)}`;
631
- }
632
- const allChoices = expanded ? choices : [...choices, helpChoice];
633
- let longChoices = "";
634
- let shortChoices = allChoices.map((choice) => {
635
- if (choice.key === defaultKey) {
636
- return choice.key.toUpperCase();
637
- }
638
- return choice.key;
639
- }).join("");
640
- shortChoices = ` ${theme.style.defaultAnswer(shortChoices)}`;
641
- if (expanded) {
642
- shortChoices = "";
643
- longChoices = allChoices.map((choice) => {
644
- const line = ` ${choice.key}) ${getChoiceKey(choice, "name")}`;
645
- if (choice.key === value.toLowerCase()) {
646
- return theme.style.highlight(line);
647
- }
648
- return line;
649
- }).join("\n");
650
- }
651
- let helpTip = "";
652
- const currentOption = allChoices.find(({ key }) => key === value.toLowerCase());
653
- if (currentOption) {
654
- helpTip = `${import_chalk.default.cyan(">>")} ${getChoiceKey(currentOption, "name")}`;
655
- }
656
- let error = "";
657
- if (errorMsg) {
658
- error = theme.style.error(errorMsg);
659
- }
660
- return [
661
- `${prefix} ${message}${shortChoices} ${value}`,
662
- [longChoices, helpTip, error].filter(Boolean).join("\n")
663
- ];
664
- });
665
-
666
- // ../../node_modules/.pnpm/@inquirer+input@2.1.2/node_modules/@inquirer/input/dist/esm/index.mjs
667
- var esm_default6 = createPrompt((config2, done) => {
668
- const { validate = () => true } = config2;
669
- const theme = makeTheme(config2.theme);
670
- const [status, setStatus] = useState("pending");
671
- const [defaultValue = "", setDefaultValue] = useState(config2.default);
672
- const [errorMsg, setError] = useState(void 0);
673
- const [value, setValue] = useState("");
674
- const isLoading = status === "loading";
675
- const prefix = usePrefix({ isLoading, theme });
676
- useKeypress(async (key, rl) => {
677
- if (status !== "pending") {
678
- return;
679
- }
680
- if (isEnterKey(key)) {
681
- const answer = value || defaultValue;
682
- setStatus("loading");
683
- const isValid = await validate(answer);
684
- if (isValid === true) {
685
- setValue(answer);
686
- setStatus("done");
687
- done(answer);
688
- } else {
689
- rl.write(value);
690
- setError(isValid || "You must provide a valid value");
691
- setStatus("pending");
692
- }
693
- } else if (isBackspaceKey(key) && !value) {
694
- setDefaultValue(void 0);
695
- } else if (key.name === "tab" && !value) {
696
- setDefaultValue(void 0);
697
- rl.clearLine(0);
698
- rl.write(defaultValue);
699
- setValue(defaultValue);
700
- } else {
701
- setValue(rl.line);
702
- setError(void 0);
703
- }
704
- });
705
- const message = theme.style.message(config2.message);
706
- let formattedValue = value;
707
- if (typeof config2.transformer === "function") {
708
- formattedValue = config2.transformer(value, { isFinal: status === "done" });
709
- } else if (status === "done") {
710
- formattedValue = theme.style.answer(value);
711
- }
712
- let defaultStr;
713
- if (defaultValue && status !== "done" && !value) {
714
- defaultStr = theme.style.defaultAnswer(defaultValue);
715
- }
716
- let error = "";
717
- if (errorMsg) {
718
- error = theme.style.error(errorMsg);
719
- }
720
- return [
721
- [prefix, message, defaultStr, formattedValue].filter((v) => v !== void 0).join(" "),
722
- error
723
- ];
724
- });
725
-
726
- // ../../node_modules/.pnpm/@inquirer+password@2.1.2/node_modules/@inquirer/password/dist/esm/index.mjs
727
- var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
728
- var esm_default7 = createPrompt((config2, done) => {
729
- const { validate = () => true } = config2;
730
- const theme = makeTheme(config2.theme);
731
- const [status, setStatus] = useState("pending");
732
- const [errorMsg, setError] = useState(void 0);
733
- const [value, setValue] = useState("");
734
- const isLoading = status === "loading";
735
- const prefix = usePrefix({ isLoading, theme });
736
- useKeypress(async (key, rl) => {
737
- if (status !== "pending") {
738
- return;
739
- }
740
- if (isEnterKey(key)) {
741
- const answer = value;
742
- setStatus("loading");
743
- const isValid = await validate(answer);
744
- if (isValid === true) {
745
- setValue(answer);
746
- setStatus("done");
747
- done(answer);
748
- } else {
749
- rl.write(value);
750
- setError(isValid || "You must provide a valid value");
751
- setStatus("pending");
752
- }
753
- } else {
754
- setValue(rl.line);
755
- setError(void 0);
756
- }
757
- });
758
- const message = theme.style.message(config2.message);
759
- let formattedValue = "";
760
- let helpTip;
761
- if (config2.mask) {
762
- const maskChar = typeof config2.mask === "string" ? config2.mask : "*";
763
- formattedValue = maskChar.repeat(value.length);
764
- } else if (status !== "done") {
765
- helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes.default.cursorHide}`;
766
- }
767
- if (status === "done") {
768
- formattedValue = theme.style.answer(formattedValue);
769
- }
770
- let error = "";
771
- if (errorMsg) {
772
- error = theme.style.error(errorMsg);
773
- }
774
- return [[prefix, message, formattedValue, helpTip].filter(Boolean).join(" "), error];
775
- });
776
-
777
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/key.mjs
778
- var isEnterKey2 = (key) => key.name === "enter" || key.name === "return";
779
-
780
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/errors.mjs
781
- var AbortPromptError = class extends Error {
782
- constructor(options) {
783
- super();
784
- __publicField(this, "name", "AbortPromptError");
785
- __publicField(this, "message", "Prompt was aborted");
786
- this.cause = options?.cause;
787
- }
788
- };
789
- var CancelPromptError = class extends Error {
790
- constructor() {
791
- super(...arguments);
792
- __publicField(this, "name", "CancelPromptError");
793
- __publicField(this, "message", "Prompt was canceled");
794
- }
795
- };
796
- var ExitPromptError = class extends Error {
797
- constructor() {
798
- super(...arguments);
799
- __publicField(this, "name", "ExitPromptError");
800
- }
801
- };
802
- var HookError = class extends Error {
803
- constructor() {
804
- super(...arguments);
805
- __publicField(this, "name", "HookError");
806
- }
807
- };
808
- var ValidationError = class extends Error {
809
- constructor() {
810
- super(...arguments);
811
- __publicField(this, "name", "ValidationError");
812
- }
813
- };
814
-
815
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/use-prefix.mjs
816
- import { AsyncResource as AsyncResource2 } from "async_hooks";
817
-
818
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/hook-engine.mjs
819
- import { AsyncLocalStorage, AsyncResource } from "async_hooks";
820
- var hookStorage = new AsyncLocalStorage();
821
- function createStore(rl) {
822
- const store = {
823
- rl,
824
- hooks: [],
825
- hooksCleanup: [],
826
- hooksEffect: [],
827
- index: 0,
828
- handleChange() {
829
- }
830
- };
831
- return store;
832
- }
833
- function withHooks(rl, cb) {
834
- const store = createStore(rl);
835
- return hookStorage.run(store, () => {
836
- function cycle(render) {
837
- store.handleChange = () => {
838
- store.index = 0;
839
- render();
840
- };
841
- store.handleChange();
842
- }
843
- return cb(cycle);
844
- });
845
- }
846
- function getStore() {
847
- const store = hookStorage.getStore();
848
- if (!store) {
849
- throw new HookError("[Inquirer] Hook functions can only be called from within a prompt");
850
- }
851
- return store;
852
- }
853
- function readline() {
854
- return getStore().rl;
855
- }
856
- function withUpdates(fn) {
857
- const wrapped = (...args) => {
858
- const store = getStore();
859
- let shouldUpdate = false;
860
- const oldHandleChange = store.handleChange;
861
- store.handleChange = () => {
862
- shouldUpdate = true;
863
- };
864
- const returnValue = fn(...args);
865
- if (shouldUpdate) {
866
- oldHandleChange();
867
- }
868
- store.handleChange = oldHandleChange;
869
- return returnValue;
870
- };
871
- return AsyncResource.bind(wrapped);
872
- }
873
- function withPointer(cb) {
874
- const store = getStore();
875
- const { index } = store;
876
- const pointer = {
877
- get() {
878
- return store.hooks[index];
879
- },
880
- set(value) {
881
- store.hooks[index] = value;
882
- },
883
- initialized: index in store.hooks
884
- };
885
- const returnValue = cb(pointer);
886
- store.index++;
887
- return returnValue;
888
- }
889
- function handleChange() {
890
- getStore().handleChange();
891
- }
892
- var effectScheduler = {
893
- queue(cb) {
894
- const store = getStore();
895
- const { index } = store;
896
- store.hooksEffect.push(() => {
897
- store.hooksCleanup[index]?.();
898
- const cleanFn = cb(readline());
899
- if (cleanFn != null && typeof cleanFn !== "function") {
900
- throw new ValidationError("useEffect return value must be a cleanup function or nothing.");
901
- }
902
- store.hooksCleanup[index] = cleanFn;
903
- });
904
- },
905
- run() {
906
- const store = getStore();
907
- withUpdates(() => {
908
- store.hooksEffect.forEach((effect) => {
909
- effect();
910
- });
911
- store.hooksEffect.length = 0;
912
- })();
913
- },
914
- clearAll() {
915
- const store = getStore();
916
- store.hooksCleanup.forEach((cleanFn) => {
917
- cleanFn?.();
918
- });
919
- store.hooksEffect.length = 0;
920
- store.hooksCleanup.length = 0;
921
- }
922
- };
923
-
924
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/use-state.mjs
925
- function useState2(defaultValue) {
926
- return withPointer((pointer) => {
927
- const setFn = (newValue) => {
928
- if (pointer.get() !== newValue) {
929
- pointer.set(newValue);
930
- handleChange();
931
- }
932
- };
933
- if (pointer.initialized) {
934
- return [pointer.get(), setFn];
935
- }
936
- const value = typeof defaultValue === "function" ? defaultValue() : defaultValue;
937
- pointer.set(value);
938
- return [value, setFn];
939
- });
940
- }
941
-
942
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/use-effect.mjs
943
- function useEffect(cb, depArray) {
944
- withPointer((pointer) => {
945
- const oldDeps = pointer.get();
946
- const hasChanged = !Array.isArray(oldDeps) || depArray.some((dep, i) => !Object.is(dep, oldDeps[i]));
947
- if (hasChanged) {
948
- effectScheduler.queue(cb);
949
- }
950
- pointer.set(depArray);
951
- });
952
- }
953
-
954
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/theme.mjs
955
- var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
956
- var defaultTheme = {
957
- prefix: {
958
- idle: import_yoctocolors_cjs.default.blue("?"),
959
- // TODO: use figure
960
- done: import_yoctocolors_cjs.default.green(esm_default.tick)
961
- },
962
- spinner: {
963
- interval: 80,
964
- frames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"].map((frame) => import_yoctocolors_cjs.default.yellow(frame))
965
- },
966
- style: {
967
- answer: import_yoctocolors_cjs.default.cyan,
968
- message: import_yoctocolors_cjs.default.bold,
969
- error: (text) => import_yoctocolors_cjs.default.red(`> ${text}`),
970
- defaultAnswer: (text) => import_yoctocolors_cjs.default.dim(`(${text})`),
971
- help: import_yoctocolors_cjs.default.dim,
972
- highlight: import_yoctocolors_cjs.default.cyan,
973
- key: (text) => import_yoctocolors_cjs.default.cyan(import_yoctocolors_cjs.default.bold(`<${text}>`))
974
- }
975
- };
976
-
977
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/make-theme.mjs
978
- function isPlainObject(value) {
979
- if (typeof value !== "object" || value === null)
980
- return false;
981
- let proto = value;
982
- while (Object.getPrototypeOf(proto) !== null) {
983
- proto = Object.getPrototypeOf(proto);
984
- }
985
- return Object.getPrototypeOf(value) === proto;
986
- }
987
- function deepMerge(...objects) {
988
- const output = {};
989
- for (const obj of objects) {
990
- for (const [key, value] of Object.entries(obj)) {
991
- const prevValue = output[key];
992
- output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
993
- }
994
- }
995
- return output;
996
- }
997
- function makeTheme2(...themes) {
998
- const themesToMerge = [
999
- defaultTheme,
1000
- ...themes.filter((theme) => theme != null)
1001
- ];
1002
- return deepMerge(...themesToMerge);
1003
- }
1004
-
1005
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/use-prefix.mjs
1006
- function usePrefix2({ status = "idle", theme }) {
1007
- const [showLoader, setShowLoader] = useState2(false);
1008
- const [tick, setTick] = useState2(0);
1009
- const { prefix, spinner } = makeTheme2(theme);
1010
- useEffect(() => {
1011
- if (status === "loading") {
1012
- let tickInterval;
1013
- let inc = -1;
1014
- const delayTimeout = setTimeout(AsyncResource2.bind(() => {
1015
- setShowLoader(true);
1016
- tickInterval = setInterval(AsyncResource2.bind(() => {
1017
- inc = inc + 1;
1018
- setTick(inc % spinner.frames.length);
1019
- }), spinner.interval);
1020
- }), 300);
1021
- return () => {
1022
- clearTimeout(delayTimeout);
1023
- clearInterval(tickInterval);
1024
- };
1025
- } else {
1026
- setShowLoader(false);
1027
- }
1028
- }, [status]);
1029
- if (showLoader) {
1030
- return spinner.frames[tick];
1031
- }
1032
- const iconName = status === "loading" ? "idle" : status;
1033
- return typeof prefix === "string" ? prefix : prefix[iconName];
1034
- }
1035
-
1036
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/use-memo.mjs
1037
- function useMemo(fn, dependencies) {
1038
- return withPointer((pointer) => {
1039
- const prev = pointer.get();
1040
- if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
1041
- const value = fn();
1042
- pointer.set({ value, dependencies });
1043
- return value;
1044
- }
1045
- return prev.value;
1046
- });
1047
- }
1048
-
1049
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/use-ref.mjs
1050
- function useRef(val) {
1051
- return useState2({ current: val })[0];
1052
- }
1053
-
1054
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/use-keypress.mjs
1055
- function useKeypress2(userHandler) {
1056
- const signal = useRef(userHandler);
1057
- signal.current = userHandler;
1058
- useEffect((rl) => {
1059
- let ignore = false;
1060
- const handler = withUpdates((_input, event) => {
1061
- if (ignore)
1062
- return;
1063
- void signal.current(event, rl);
1064
- });
1065
- rl.input.on("keypress", handler);
1066
- return () => {
1067
- ignore = true;
1068
- rl.input.removeListener("keypress", handler);
1069
- };
1070
- }, []);
1071
- }
1072
-
1073
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/utils.mjs
1074
- var import_cli_width = __toESM(require_cli_width(), 1);
1075
- var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
1076
- function breakLines(content, width) {
1077
- return content.split("\n").flatMap((line) => (0, import_wrap_ansi.default)(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");
1078
- }
1079
- function readlineWidth() {
1080
- return (0, import_cli_width.default)({ defaultWidth: 80, output: readline().output });
1081
- }
1082
-
1083
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.mjs
1084
- function split(content, width) {
1085
- return breakLines(content, width).split("\n");
1086
- }
1087
- function rotate(count, items) {
1088
- const max = items.length;
1089
- const offset = (count % max + max) % max;
1090
- return [...items.slice(offset), ...items.slice(0, offset)];
1091
- }
1092
- function lines({ items, width, renderItem, active, position: requested, pageSize }) {
1093
- const layouts = items.map((item, index) => ({
1094
- item,
1095
- index,
1096
- isActive: index === active
1097
- }));
1098
- const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
1099
- const renderItemAt = (index) => layoutsInPage[index] == null ? [] : split(renderItem(layoutsInPage[index]), width);
1100
- const pageBuffer = Array.from({ length: pageSize });
1101
- const activeItem = renderItemAt(requested).slice(0, pageSize);
1102
- const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
1103
- pageBuffer.splice(position, activeItem.length, ...activeItem);
1104
- let bufferPointer = position + activeItem.length;
1105
- let layoutPointer = requested + 1;
1106
- while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
1107
- for (const line of renderItemAt(layoutPointer)) {
1108
- pageBuffer[bufferPointer++] = line;
1109
- if (bufferPointer >= pageSize)
1110
- break;
1111
- }
1112
- layoutPointer++;
1113
- }
1114
- bufferPointer = position - 1;
1115
- layoutPointer = requested - 1;
1116
- while (bufferPointer >= 0 && layoutPointer >= 0) {
1117
- for (const line of renderItemAt(layoutPointer).reverse()) {
1118
- pageBuffer[bufferPointer--] = line;
1119
- if (bufferPointer < 0)
1120
- break;
1121
- }
1122
- layoutPointer--;
1123
- }
1124
- return pageBuffer.filter((line) => typeof line === "string");
1125
- }
1126
-
1127
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/pagination/position.mjs
1128
- function finite({ active, pageSize, total }) {
1129
- const middle = Math.floor(pageSize / 2);
1130
- if (total <= pageSize || active < middle)
1131
- return active;
1132
- if (active >= total - middle)
1133
- return active + pageSize - total;
1134
- return middle;
1135
- }
1136
- function infinite({ active, lastActive, total, pageSize, pointer }) {
1137
- if (total <= pageSize)
1138
- return active;
1139
- if (lastActive < active && active - lastActive < pageSize) {
1140
- return Math.min(Math.floor(pageSize / 2), pointer + active - lastActive);
1141
- }
1142
- return pointer;
1143
- }
1144
-
1145
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.mjs
1146
- function usePagination({ items, active, renderItem, pageSize, loop = true }) {
1147
- const state = useRef({ position: 0, lastActive: 0 });
1148
- const position = loop ? infinite({
1149
- active,
1150
- lastActive: state.current.lastActive,
1151
- total: items.length,
1152
- pageSize,
1153
- pointer: state.current.position
1154
- }) : finite({
1155
- active,
1156
- total: items.length,
1157
- pageSize
1158
- });
1159
- state.current.position = position;
1160
- state.current.lastActive = active;
1161
- return lines({
1162
- items,
1163
- width: readlineWidth(),
1164
- renderItem,
1165
- active,
1166
- position,
1167
- pageSize
1168
- }).join("\n");
1169
- }
1170
-
1171
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/create-prompt.mjs
1172
- var import_mute_stream = __toESM(require_lib(), 1);
1173
- import * as readline2 from "readline";
1174
- import { AsyncResource as AsyncResource3 } from "async_hooks";
1175
-
1176
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/screen-manager.mjs
1177
- var import_strip_ansi = __toESM(require_strip_ansi(), 1);
1178
- var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
1179
- var height = (content) => content.split("\n").length;
1180
- var lastLine = (content) => content.split("\n").pop() ?? "";
1181
- function cursorDown(n) {
1182
- return n > 0 ? import_ansi_escapes2.default.cursorDown(n) : "";
1183
- }
1184
- var ScreenManager = class {
1185
- constructor(rl) {
1186
- __publicField(this, "rl");
1187
- // These variables are keeping information to allow correct prompt re-rendering
1188
- __publicField(this, "height", 0);
1189
- __publicField(this, "extraLinesUnderPrompt", 0);
1190
- __publicField(this, "cursorPos");
1191
- this.rl = rl;
1192
- this.rl = rl;
1193
- this.cursorPos = rl.getCursorPos();
1194
- }
1195
- write(content) {
1196
- this.rl.output.unmute();
1197
- this.rl.output.write(content);
1198
- this.rl.output.mute();
1199
- }
1200
- render(content, bottomContent = "") {
1201
- const promptLine = lastLine(content);
1202
- const rawPromptLine = (0, import_strip_ansi.default)(promptLine);
1203
- let prompt = rawPromptLine;
1204
- if (this.rl.line.length > 0) {
1205
- prompt = prompt.slice(0, -this.rl.line.length);
1206
- }
1207
- this.rl.setPrompt(prompt);
1208
- this.cursorPos = this.rl.getCursorPos();
1209
- const width = readlineWidth();
1210
- content = breakLines(content, width);
1211
- bottomContent = breakLines(bottomContent, width);
1212
- if (rawPromptLine.length % width === 0) {
1213
- content += "\n";
1214
- }
1215
- let output = content + (bottomContent ? "\n" + bottomContent : "");
1216
- const promptLineUpDiff = Math.floor(rawPromptLine.length / width) - this.cursorPos.rows;
1217
- const bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0);
1218
- if (bottomContentHeight > 0)
1219
- output += import_ansi_escapes2.default.cursorUp(bottomContentHeight);
1220
- output += import_ansi_escapes2.default.cursorTo(this.cursorPos.cols);
1221
- this.write(cursorDown(this.extraLinesUnderPrompt) + import_ansi_escapes2.default.eraseLines(this.height) + output);
1222
- this.extraLinesUnderPrompt = bottomContentHeight;
1223
- this.height = height(output);
1224
- }
1225
- checkCursorPos() {
1226
- const cursorPos = this.rl.getCursorPos();
1227
- if (cursorPos.cols !== this.cursorPos.cols) {
1228
- this.write(import_ansi_escapes2.default.cursorTo(cursorPos.cols));
1229
- this.cursorPos = cursorPos;
1230
- }
1231
- }
1232
- done({ clearContent }) {
1233
- this.rl.setPrompt("");
1234
- let output = cursorDown(this.extraLinesUnderPrompt);
1235
- output += clearContent ? import_ansi_escapes2.default.eraseLines(this.height) : "\n";
1236
- output += import_ansi_escapes2.default.cursorShow;
1237
- this.write(output);
1238
- this.rl.close();
1239
- }
1240
- };
1241
-
1242
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.mjs
1243
- var PromisePolyfill = class extends Promise {
1244
- // Available starting from Node 22
1245
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
1246
- static withResolver() {
1247
- let resolve2;
1248
- let reject;
1249
- const promise = new Promise((res, rej) => {
1250
- resolve2 = res;
1251
- reject = rej;
1252
- });
1253
- return { promise, resolve: resolve2, reject };
1254
- }
1255
- };
1256
-
1257
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/create-prompt.mjs
1258
- function createPrompt2(view) {
1259
- const prompt = (config2, context = {}) => {
1260
- const { input = process.stdin, signal } = context;
1261
- const cleanups = /* @__PURE__ */ new Set();
1262
- const output = new import_mute_stream.default();
1263
- output.pipe(context.output ?? process.stdout);
1264
- const rl = readline2.createInterface({
1265
- terminal: true,
1266
- input,
1267
- output
1268
- });
1269
- const screen = new ScreenManager(rl);
1270
- const { promise, resolve: resolve2, reject } = PromisePolyfill.withResolver();
1271
- const cancel = () => reject(new CancelPromptError());
1272
- if (signal) {
1273
- const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
1274
- if (signal.aborted) {
1275
- abort();
1276
- return Object.assign(promise, { cancel });
1277
- }
1278
- signal.addEventListener("abort", abort);
1279
- cleanups.add(() => signal.removeEventListener("abort", abort));
1280
- }
1281
- cleanups.add(onExit((code, signal2) => {
1282
- reject(new ExitPromptError(`User force closed the prompt with ${code} ${signal2}`));
1283
- }));
1284
- const checkCursorPos = () => screen.checkCursorPos();
1285
- rl.input.on("keypress", checkCursorPos);
1286
- cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
1287
- return withHooks(rl, (cycle) => {
1288
- const hooksCleanup = AsyncResource3.bind(() => effectScheduler.clearAll());
1289
- rl.on("close", hooksCleanup);
1290
- cleanups.add(() => rl.removeListener("close", hooksCleanup));
1291
- cycle(() => {
1292
- try {
1293
- const nextView = view(config2, (value) => {
1294
- setImmediate(() => resolve2(value));
1295
- });
1296
- const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
1297
- screen.render(content, bottomContent);
1298
- effectScheduler.run();
1299
- } catch (error) {
1300
- reject(error);
1301
- }
1302
- });
1303
- return Object.assign(promise.then((answer) => {
1304
- effectScheduler.clearAll();
1305
- return answer;
1306
- }, (error) => {
1307
- effectScheduler.clearAll();
1308
- throw error;
1309
- }).finally(() => {
1310
- cleanups.forEach((cleanup) => cleanup());
1311
- screen.done({ clearContent: Boolean(context?.clearPromptOnDone) });
1312
- output.end();
1313
- }).then(() => promise), { cancel });
1314
- });
1315
- };
1316
- return prompt;
1317
- }
1318
-
1319
- // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/Separator.mjs
1320
- var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
1321
- var Separator = class {
1322
- constructor(separator) {
1323
- __publicField(this, "separator", import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line)));
1324
- __publicField(this, "type", "separator");
1325
- if (separator) {
1326
- this.separator = separator;
1327
- }
1328
- }
1329
- static isSeparator(choice) {
1330
- return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
1331
- }
1332
- };
1333
-
1334
- // ../../node_modules/.pnpm/@inquirer+search@2.0.1/node_modules/@inquirer/search/dist/esm/index.mjs
1335
- var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
1336
- var searchTheme = {
1337
- icon: { cursor: esm_default.pointer },
1338
- style: {
1339
- disabled: (text) => import_yoctocolors_cjs3.default.dim(`- ${text}`),
1340
- searchTerm: (text) => import_yoctocolors_cjs3.default.cyan(text),
1341
- description: (text) => import_yoctocolors_cjs3.default.cyan(text)
1342
- },
1343
- helpMode: "auto"
1344
- };
1345
- function isSelectable(item) {
1346
- return !Separator.isSeparator(item) && !item.disabled;
1347
- }
1348
- function normalizeChoices(choices) {
1349
- return choices.map((choice) => {
1350
- if (Separator.isSeparator(choice))
1351
- return choice;
1352
- if (typeof choice === "string") {
1353
- return {
1354
- value: choice,
1355
- name: choice,
1356
- short: choice,
1357
- disabled: false
1358
- };
1359
- }
1360
- const name = choice.name ?? String(choice.value);
1361
- return {
1362
- value: choice.value,
1363
- name,
1364
- description: choice.description,
1365
- short: choice.short ?? name,
1366
- disabled: choice.disabled ?? false
1367
- };
1368
- });
1369
- }
1370
- var esm_default8 = createPrompt2((config2, done) => {
1371
- const { pageSize = 7, validate = () => true } = config2;
1372
- const theme = makeTheme2(searchTheme, config2.theme);
1373
- const firstRender = useRef(true);
1374
- const [status, setStatus] = useState2("loading");
1375
- const [searchTerm, setSearchTerm] = useState2("");
1376
- const [searchResults, setSearchResults] = useState2([]);
1377
- const [searchError, setSearchError] = useState2();
1378
- const prefix = usePrefix2({ status, theme });
1379
- const bounds = useMemo(() => {
1380
- const first = searchResults.findIndex(isSelectable);
1381
- const last = searchResults.findLastIndex(isSelectable);
1382
- return { first, last };
1383
- }, [searchResults]);
1384
- const [active = bounds.first, setActive] = useState2();
1385
- useEffect(() => {
1386
- const controller = new AbortController();
1387
- setStatus("loading");
1388
- setSearchError(void 0);
1389
- const fetchResults = async () => {
1390
- try {
1391
- const results = await config2.source(searchTerm || void 0, {
1392
- signal: controller.signal
1393
- });
1394
- if (!controller.signal.aborted) {
1395
- setActive(void 0);
1396
- setSearchError(void 0);
1397
- setSearchResults(normalizeChoices(results));
1398
- setStatus("idle");
1399
- }
1400
- } catch (error2) {
1401
- if (!controller.signal.aborted && error2 instanceof Error) {
1402
- setSearchError(error2.message);
1403
- }
1404
- }
1405
- };
1406
- void fetchResults();
1407
- return () => {
1408
- controller.abort();
1409
- };
1410
- }, [searchTerm]);
1411
- const selectedChoice = searchResults[active];
1412
- useKeypress2(async (key, rl) => {
1413
- if (isEnterKey2(key)) {
1414
- if (selectedChoice) {
1415
- setStatus("loading");
1416
- const isValid = await validate(selectedChoice.value);
1417
- setStatus("idle");
1418
- if (isValid === true) {
1419
- setStatus("done");
1420
- done(selectedChoice.value);
1421
- } else if (selectedChoice.name === searchTerm) {
1422
- setSearchError(isValid || "You must provide a valid value");
1423
- } else {
1424
- rl.write(selectedChoice.name);
1425
- setSearchTerm(selectedChoice.name);
1426
- }
1427
- } else {
1428
- rl.write(searchTerm);
1429
- }
1430
- } else if (key.name === "tab" && selectedChoice) {
1431
- rl.clearLine(0);
1432
- rl.write(selectedChoice.name);
1433
- setSearchTerm(selectedChoice.name);
1434
- } else if (status !== "loading" && (key.name === "up" || key.name === "down")) {
1435
- rl.clearLine(0);
1436
- if (key.name === "up" && active !== bounds.first || key.name === "down" && active !== bounds.last) {
1437
- const offset = key.name === "up" ? -1 : 1;
1438
- let next = active;
1439
- do {
1440
- next = (next + offset + searchResults.length) % searchResults.length;
1441
- } while (!isSelectable(searchResults[next]));
1442
- setActive(next);
1443
- }
1444
- } else {
1445
- setSearchTerm(rl.line);
1446
- }
1447
- });
1448
- const message = theme.style.message(config2.message, status);
1449
- if (active > 0) {
1450
- firstRender.current = false;
1451
- }
1452
- let helpTip = "";
1453
- if (searchResults.length > 1 && (theme.helpMode === "always" || theme.helpMode === "auto" && firstRender.current)) {
1454
- helpTip = searchResults.length > pageSize ? `
1455
- ${theme.style.help("(Use arrow keys to reveal more choices)")}` : `
1456
- ${theme.style.help("(Use arrow keys)")}`;
1457
- }
1458
- const page = usePagination({
1459
- items: searchResults,
1460
- active,
1461
- renderItem({ item, isActive }) {
1462
- if (Separator.isSeparator(item)) {
1463
- return ` ${item.separator}`;
1464
- }
1465
- if (item.disabled) {
1466
- const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
1467
- return theme.style.disabled(`${item.name} ${disabledLabel}`);
1468
- }
1469
- const color = isActive ? theme.style.highlight : (x) => x;
1470
- const cursor = isActive ? theme.icon.cursor : ` `;
1471
- return color(`${cursor} ${item.name}`);
1472
- },
1473
- pageSize,
1474
- loop: false
1475
- });
1476
- let error;
1477
- if (searchError) {
1478
- error = theme.style.error(searchError);
1479
- } else if (searchResults.length === 0 && searchTerm !== "" && status === "idle") {
1480
- error = theme.style.error("No results found");
1481
- }
1482
- let searchStr;
1483
- if (status === "done" && selectedChoice) {
1484
- const answer = selectedChoice.short ?? selectedChoice.name;
1485
- return `${prefix} ${message} ${theme.style.answer(answer)}`;
1486
- } else {
1487
- searchStr = theme.style.searchTerm(searchTerm);
1488
- }
1489
- const choiceDescription = selectedChoice?.description ? `
1490
- ${theme.style.description(selectedChoice.description)}` : ``;
1491
- return [
1492
- [prefix, message, searchStr].filter(Boolean).join(" "),
1493
- `${error ?? page}${helpTip}${choiceDescription}`
1494
- ];
1495
- });
1496
-
1497
- // src/util/client.ts
1498
- var import_async_retry = __toESM(require_dist3(), 1);
1499
- import { join as join2, resolve } from "path";
1500
- import { EventEmitter } from "events";
1501
- import { URL } from "url";
1502
- import {
1503
- getGlobalPathConfig as getSharedGlobalPathConfig,
1504
- readConfigFile as readSharedConfigFile,
1505
- writeConfigFile as writeSharedConfigFile
1506
- } from "@vercel/cli-config";
1507
-
1508
- // src/util/response-error.ts
1509
- async function responseError(res, fallbackMessage = null, parsedBody = {}) {
1510
- let bodyError;
1511
- if (!res.ok) {
1512
- let body;
1513
- try {
1514
- body = await res.json();
1515
- } catch (_err) {
1516
- body = parsedBody;
1517
- }
1518
- bodyError = body.error || body.err || body;
1519
- }
1520
- const msg = bodyError?.message || fallbackMessage || "Response Error";
1521
- return new APIError(msg, res, bodyError);
1522
- }
1523
-
1524
- // src/util/print-indications.ts
1525
- var import_chalk2 = __toESM(require_source(), 1);
1526
- function printIndications(res) {
1527
- const indications = /* @__PURE__ */ new Set(["warning", "notice", "tip"]);
1528
- const regex = /^x-(?:vercel|now)-(warning|notice|tip)-(.*)$/;
1529
- for (const [name, payload] of res.headers) {
1530
- const match = name.match(regex);
1531
- if (match) {
1532
- const [, type, identifier] = match;
1533
- const action = res.headers.get(`x-vercel-action-${identifier}`);
1534
- const link = res.headers.get(`x-vercel-link-${identifier}`);
1535
- if (indications.has(type)) {
1536
- const newline = "\n";
1537
- const message = prependEmoji(import_chalk2.default.dim(payload), emoji(type)) + newline;
1538
- let finalLink = "";
1539
- if (link) {
1540
- finalLink = import_chalk2.default.dim(`${action || "Learn More"}: ${link_default(link)}`) + newline;
1541
- }
1542
- output_manager_default.print(message + finalLink);
1543
- }
1544
- }
1545
- }
1546
- }
1547
-
1548
- // src/util/login/reauthenticate.ts
1549
- var import_chalk3 = __toESM(require_source(), 1);
1550
- async function reauthenticate(client, error) {
1551
- const { tokenSource } = client.authConfig;
1552
- const reauthAction = error.enforced ? "SAML re-authentication is required" : "Re-authentication is required";
1553
- if (tokenSource === "flag") {
1554
- throw new Error(
1555
- `${reauthAction} for ${(0, import_chalk3.bold)(error.scope)} scope, but the token provided via \`--token\` does not have access. Provide a token that is authorized for that scope.`
1556
- );
1557
- }
1558
- if (tokenSource === "env") {
1559
- throw new Error(
1560
- `${reauthAction} for ${(0, import_chalk3.bold)(error.scope)} scope, but the token provided via the VERCEL_TOKEN environment variable does not have access. Set VERCEL_TOKEN to a token that is authorized for that scope.`
1561
- );
1562
- }
1563
- if (!client.stdin.isTTY && process.env.CI) {
1564
- throw new Error(
1565
- `${reauthAction} for ${(0, import_chalk3.bold)(error.scope)} scope, but the current environment is non-interactive so the device-code flow cannot be completed. Run \`vercel login\` in an interactive shell, or set VERCEL_TOKEN / pass \`--token\` with a token that is authorized for that scope.`
1566
- );
1567
- }
1568
- if (error.teamId && error.enforced) {
1569
- output_manager_default.log(
1570
- `You must re-authenticate with SAML to use ${(0, import_chalk3.bold)(error.scope)} scope.`
1571
- );
1572
- } else {
1573
- output_manager_default.log(`You must re-authenticate to use ${(0, import_chalk3.bold)(error.scope)} scope.`);
1574
- }
1575
- const tokens = await performDeviceCodeFlow(client, {
1576
- teamId: error.teamId || void 0
1577
- });
1578
- if (!tokens) {
1579
- return 1;
1580
- }
1581
- client.updateAuthConfig({
1582
- token: tokens.access_token,
1583
- userId: void 0,
1584
- expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in,
1585
- refreshToken: tokens.refresh_token
1586
- });
1587
- client.persistAuthConfig();
1588
- output_manager_default.success(`Authentication complete for ${(0, import_chalk3.bold)(error.scope)} scope.`);
1589
- return { token: tokens.access_token, email: "" };
1590
- }
1591
-
1592
- // src/util/promise.ts
1593
- function sharedPromise(fn) {
1594
- let promise = null;
1595
- return function(...args) {
1596
- if (!promise) {
1597
- promise = fn.apply(this, args);
1598
- promise.finally(() => {
1599
- promise = null;
1600
- });
1601
- }
1602
- return promise;
1603
- };
1604
- }
1605
-
1606
- // src/util/client.ts
1607
- var import_error_utils2 = __toESM(require_dist(), 1);
1608
-
1609
- // src/util/sleep.ts
1610
- function sleep(ms) {
1611
- return new Promise((resolve2) => {
1612
- setTimeout(resolve2, ms);
1613
- });
1614
- }
1615
-
1616
- // src/util/client.ts
1617
- var DOMAINS_API_PATH = /^\/v\d+\/(?:domains|registrar)(?:\/|$)/;
1618
- var isSAMLError = (v) => {
1619
- return v && v.saml;
1620
- };
1621
- var isJSONObject = (v) => {
1622
- return v && typeof v == "object" && v.constructor === Object;
1623
- };
1624
- function isValidAccessToken(authConfig) {
1625
- if (!authConfig.token)
1626
- return false;
1627
- if (typeof authConfig.expiresAt !== "number")
1628
- return true;
1629
- const nowInSeconds = Math.floor(Date.now() / 1e3);
1630
- return authConfig.expiresAt >= nowInSeconds;
1631
- }
1632
- function hasRefreshToken(authConfig) {
1633
- return "refreshToken" in authConfig;
1634
- }
1635
- var Client = class extends EventEmitter {
1636
- constructor(opts) {
1637
- super();
1638
- this._argv = [];
1639
- /** Track if we've already logged the token source debug message */
1640
- this._loggedTokenSource = false;
1641
- this.escapePromptCancellationDepth = 0;
1642
- this.promptBackNavigationDepth = 0;
1643
- this.reauthenticate = sharedPromise(async function(error) {
1644
- const result = await reauthenticate(this, error);
1645
- if (typeof result === "number") {
1646
- if (error instanceof APIError) {
1647
- output_manager_default.prettyError(error);
1648
- } else {
1649
- output_manager_default.error(
1650
- `Failed to re-authenticate for ${(0, import_chalk4.bold)(error.scope)} scope`
1651
- );
1652
- }
1653
- throw error;
1654
- }
1655
- });
1656
- this._onRetry = (error) => {
1657
- output_manager_default.debug(`Retrying: ${error}
1658
- ${error.stack}`);
1659
- };
1660
- this.setArgv(opts.argv);
1661
- this.apiUrl = opts.apiUrl;
1662
- this.authConfig = opts.authConfig;
1663
- this.stdin = opts.stdin;
1664
- this.stdout = opts.stdout;
1665
- this.stderr = opts.stderr;
1666
- this.config = opts.config;
1667
- this.localConfig = opts.localConfig;
1668
- this.localConfigPath = opts.localConfigPath;
1669
- this.requestIdCounter = 1;
1670
- this.telemetryEventStore = opts.telemetryEventStore;
1671
- this.isAgent = opts.isAgent ?? false;
1672
- this.agentName = opts.agentName;
1673
- this.nonInteractive = opts.nonInteractive ?? this.isAgent;
1674
- this.dangerouslySkipPermissions = opts.dangerouslySkipPermissions ?? false;
1675
- const theme = {
1676
- prefix: (0, import_chalk4.gray)("?"),
1677
- style: { answer: import_chalk4.gray }
1678
- };
1679
- this.input = {
1680
- text: (opts2) => this.runPrompt(
1681
- esm_default6({ theme, ...opts2 }, { input: this.stdin, output: this.stderr })
1682
- ),
1683
- password: (opts2) => this.runPrompt(
1684
- esm_default7(
1685
- { theme, ...opts2 },
1686
- { input: this.stdin, output: this.stderr }
1687
- )
1688
- ),
1689
- checkbox: (opts2) => this.runPrompt(
1690
- esm_default2(
1691
- { theme, ...opts2 },
1692
- { input: this.stdin, output: this.stderr }
1693
- )
1694
- ),
1695
- expand: (opts2) => this.runPrompt(
1696
- esm_default5({ theme, ...opts2 }, { input: this.stdin, output: this.stderr })
1697
- ),
1698
- confirm: (message, default_value) => this.runPrompt(
1699
- esm_default4(
1700
- { theme, message, default: default_value },
1701
- { input: this.stdin, output: this.stderr }
1702
- )
1703
- ),
1704
- select: (opts2) => this.runPrompt(
1705
- esm_default3(
1706
- { theme, ...opts2 },
1707
- { input: this.stdin, output: this.stderr }
1708
- )
1709
- ),
1710
- search: (opts2) => this.runPrompt(
1711
- esm_default8(
1712
- { theme, ...opts2 },
1713
- { input: this.stdin, output: this.stderr }
1714
- )
1715
- )
1716
- };
1717
- }
1718
- async withEscapePromptCancellation(run) {
1719
- this.escapePromptCancellationDepth++;
1720
- try {
1721
- return await run();
1722
- } finally {
1723
- this.escapePromptCancellationDepth--;
1724
- }
1725
- }
1726
- async withPromptBackNavigation(run) {
1727
- this.promptBackNavigationDepth++;
1728
- try {
1729
- return await run();
1730
- } finally {
1731
- this.promptBackNavigationDepth--;
1732
- }
1733
- }
1734
- runPrompt(prompt) {
1735
- const escapeCancellationEnabled = this.escapePromptCancellationDepth > 0;
1736
- const backNavigationEnabled = this.promptBackNavigationDepth > 0;
1737
- if (!escapeCancellationEnabled && !backNavigationEnabled || !this.stdin.isTTY || !prompt.cancel) {
1738
- return prompt;
1739
- }
1740
- let cancellation;
1741
- const onKeypress = (_input, key) => {
1742
- if (key?.name === "escape" && escapeCancellationEnabled && !cancellation) {
1743
- cancellation = "escape";
1744
- prompt.cancel?.();
1745
- } else if (key?.name === "up" && backNavigationEnabled && !cancellation) {
1746
- cancellation = "back";
1747
- prompt.cancel?.();
1748
- }
1749
- };
1750
- this.stdin.on("keypress", onKeypress);
1751
- return prompt.catch((error) => {
1752
- if (cancellation === "escape") {
1753
- throw new PromptCanceledError();
1754
- }
1755
- if (cancellation === "back") {
1756
- throw new PromptBackError();
1757
- }
1758
- throw error;
1759
- }).finally(() => {
1760
- this.stdin.off("keypress", onKeypress);
1761
- });
1762
- }
1763
- get argv() {
1764
- return this._argv;
1765
- }
1766
- setArgv(argvOrFirst, ...rest) {
1767
- const argv = Array.isArray(argvOrFirst) ? argvOrFirst : [argvOrFirst, ...rest];
1768
- this._argv = argv;
1769
- this._parsedArgsCache = void 0;
1770
- }
1771
- getParsedArgs() {
1772
- if (!this._parsedArgsCache) {
1773
- this._parsedArgsCache = parseArguments(
1774
- this.argv.slice(2),
1775
- {},
1776
- {
1777
- permissive: true
1778
- }
1779
- );
1780
- }
1781
- return this._parsedArgsCache;
1782
- }
1783
- retry(fn, { retries = 3, maxTimeout = Infinity } = {}) {
1784
- return (0, import_async_retry.default)(fn, {
1785
- retries,
1786
- maxTimeout,
1787
- onRetry: this._onRetry
1788
- });
1789
- }
1790
- /**
1791
- * This method silently tries to refresh the access_token if it is expired.
1792
- *
1793
- * If the refresh_token is also expired, it will not attempt to refresh it.
1794
- * If there is any error during the refresh process, it will not throw an error.
1795
- */
1796
- async ensureAuthorized() {
1797
- const { authConfig } = this;
1798
- if (isValidAccessToken(authConfig)) {
1799
- if (!this._loggedTokenSource) {
1800
- if (authConfig.tokenSource === "flag") {
1801
- output_manager_default.debug(
1802
- "Using token from `--token` argument, skipping token refresh."
1803
- );
1804
- } else if (authConfig.tokenSource === "env") {
1805
- output_manager_default.debug(
1806
- "Using token from VERCEL_TOKEN environment variable, skipping token refresh."
1807
- );
1808
- } else {
1809
- output_manager_default.debug("Valid access token, skipping token refresh.");
1810
- }
1811
- this._loggedTokenSource = true;
1812
- }
1813
- return;
1814
- }
1815
- if (!hasRefreshToken(authConfig)) {
1816
- output_manager_default.debug("No refresh token found, emptying auth config.");
1817
- this.emptyAuthConfig();
1818
- this.persistAuthConfig();
1819
- return;
1820
- }
1821
- const tokenResponse = await refreshTokenRequest({
1822
- refresh_token: authConfig.refreshToken
1823
- });
1824
- const [tokensError, tokens] = await processTokenResponse(tokenResponse);
1825
- if (isOAuthError(tokensError) && tokensError.code === "invalid_grant" && !authConfig.tokenSource && this.stdin.isTTY && !this.nonInteractive) {
1826
- output_manager_default.debug(
1827
- `Stored session refresh failed: ${tokensError.cause.message}`
1828
- );
1829
- output_manager_default.log("Couldn't refresh the saved login. Starting a new login.");
1830
- const recoveredTokens = await performDeviceCodeFlow(this);
1831
- if (recoveredTokens) {
1832
- this.updateAuthConfig({
1833
- token: recoveredTokens.access_token,
1834
- userId: void 0,
1835
- expiresAt: Math.floor(Date.now() / 1e3) + recoveredTokens.expires_in,
1836
- refreshToken: recoveredTokens.refresh_token
1837
- });
1838
- this.persistAuthConfig();
1839
- return;
1840
- }
1841
- }
1842
- if (tokensError) {
1843
- output_manager_default.debug("Error refreshing token, emptying auth config.");
1844
- this.emptyAuthConfig();
1845
- this.persistAuthConfig();
1846
- return;
1847
- }
1848
- this.updateAuthConfig({
1849
- token: tokens.access_token,
1850
- expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in
1851
- });
1852
- if (tokens.refresh_token) {
1853
- this.updateAuthConfig({ refreshToken: tokens.refresh_token });
1854
- }
1855
- this.persistAuthConfig();
1856
- this.writeToConfigFile();
1857
- output_manager_default.debug("Tokens refreshed successfully.");
1858
- }
1859
- getGlobalPathConfig() {
1860
- const confFlag = this.getParsedArgs().flags["--global-config"];
1861
- if (typeof confFlag === "string") {
1862
- return resolve(this.cwd, confFlag);
1863
- }
1864
- return getSharedGlobalPathConfig();
1865
- }
1866
- async readConfig(fileName, schema) {
1867
- const filePath = join2(this.getGlobalPathConfig(), fileName);
1868
- return readSharedConfigFile(filePath, schema);
1869
- }
1870
- async maybeReadConfig(fileName, schema) {
1871
- try {
1872
- return await this.readConfig(fileName, schema);
1873
- } catch {
1874
- return null;
1875
- }
1876
- }
1877
- async writeConfig(fileName, schema, value) {
1878
- const filePath = join2(this.getGlobalPathConfig(), fileName);
1879
- writeSharedConfigFile(filePath, schema, value);
1880
- }
1881
- updateConfig(config2) {
1882
- this.config = { ...this.config, ...config2 };
1883
- }
1884
- writeToConfigFile() {
1885
- writeToConfigFile(this.config);
1886
- }
1887
- updateAuthConfig(authConfig) {
1888
- if (authConfig.token && authConfig.token !== this.authConfig.token) {
1889
- this.user = void 0;
1890
- this.userPromise = void 0;
1891
- this.teams = void 0;
1892
- this.teamsPromise = void 0;
1893
- }
1894
- this.authConfig = { ...this.authConfig, ...authConfig };
1895
- }
1896
- emptyAuthConfig() {
1897
- this.user = void 0;
1898
- this.userPromise = void 0;
1899
- this.teams = void 0;
1900
- this.teamsPromise = void 0;
1901
- this.authConfig = this.authConfig.skipWrite ? { skipWrite: true } : {};
1902
- }
1903
- persistAuthConfig() {
1904
- persistAuthConfig(this.authConfig, this.config);
1905
- }
1906
- /**
1907
- * Confirms DELETE operations with the user.
1908
- *
1909
- * - DELETE operations always require confirmation (unless --dangerously-skip-permissions is used)
1910
- * - When running under an AI agent with --dangerously-skip-permissions,
1911
- * a warning is displayed for visibility
1912
- *
1913
- * @returns true if the operation should proceed, false if canceled
1914
- */
1915
- async confirmMutatingOperation(url, method) {
1916
- const normalizedMethod = (method || "GET").toUpperCase();
1917
- const isDelete = normalizedMethod === "DELETE";
1918
- if (!isDelete) {
1919
- return true;
1920
- }
1921
- if (this.isAgent && this.dangerouslySkipPermissions) {
1922
- const agentInfo = this.agentName ? ` (${this.agentName})` : "";
1923
- output_manager_default.print("\n");
1924
- output_manager_default.print(
1925
- (0, import_chalk4.bgRed)((0, import_chalk4.white)((0, import_chalk4.bold)(" \u26A0 WARNING "))) + (0, import_chalk4.red)((0, import_chalk4.bold)(" AGENT MODE - DELETE CONFIRMATION BYPASSED\n"))
1926
- );
1927
- output_manager_default.print(
1928
- (0, import_chalk4.yellow)(
1929
- ` An AI agent${agentInfo} is executing a ${(0, import_chalk4.bold)("DELETE")} request with --dangerously-skip-permissions flag.
1930
- `
1931
- )
1932
- );
1933
- output_manager_default.print((0, import_chalk4.yellow)(` This operation will delete data: ${(0, import_chalk4.bold)(url)}
1934
- `));
1935
- output_manager_default.print(
1936
- (0, import_chalk4.yellow)(
1937
- ` The --dangerously-skip-permissions flag has bypassed the confirmation prompt.
1938
-
1939
- `
1940
- )
1941
- );
1942
- }
1943
- if (this.dangerouslySkipPermissions) {
1944
- return true;
1945
- }
1946
- if (!this.stdin.isTTY) {
1947
- output_manager_default.error(
1948
- `DELETE operations require confirmation. Use ${(0, import_chalk4.bold)("--dangerously-skip-permissions")} to skip confirmation in non-interactive mode.`
1949
- );
1950
- return false;
1951
- }
1952
- const message = `You are about to perform a ${(0, import_chalk4.red)((0, import_chalk4.bold)("DELETE"))} operation on:
1953
- ${(0, import_chalk4.bold)(url)}
1954
-
1955
- Are you sure you want to proceed?`;
1956
- output_manager_default.print("\n");
1957
- const confirmed = await this.input.confirm(message, false);
1958
- output_manager_default.print("\n");
1959
- if (!confirmed) {
1960
- output_manager_default.log("Operation canceled by user.");
1961
- }
1962
- return confirmed;
1963
- }
1964
- async _fetch(_url, opts = {}) {
1965
- const url = new URL(_url, this.apiUrl);
1966
- if (opts.accountId || opts.useCurrentTeam !== false) {
1967
- if (opts.accountId) {
1968
- if (opts.accountId.startsWith("team_")) {
1969
- url.searchParams.set("teamId", opts.accountId);
1970
- } else {
1971
- url.searchParams.delete("teamId");
1972
- }
1973
- } else if (opts.useCurrentTeam !== false && this.config.currentTeam && !url.searchParams.has("teamId")) {
1974
- url.searchParams.set("teamId", this.config.currentTeam);
1975
- }
1976
- }
1977
- const headers = new Headers(opts.headers);
1978
- headers.set("user-agent", ua_default);
1979
- if (DOMAINS_API_PATH.test(url.pathname)) {
1980
- headers.set("x-vercel-cli-version", pkg_default.version);
1981
- }
1982
- if (this.agentName) {
1983
- headers.set("x-ai-agent", this.agentName);
1984
- }
1985
- headers.set(
1986
- "x-vercel-cli-session-id",
1987
- this.telemetryEventStore.currentSessionId
1988
- );
1989
- headers.set(
1990
- "x-vercel-cli-invocation-id",
1991
- this.telemetryEventStore.currentInvocationId
1992
- );
1993
- await this.ensureAuthorized();
1994
- if (this.authConfig.token) {
1995
- headers.set("authorization", `Bearer ${this.authConfig.token}`);
1996
- }
1997
- let body;
1998
- if (isJSONObject(opts.body)) {
1999
- body = JSON.stringify(opts.body);
2000
- headers.set("content-type", "application/json; charset=utf-8");
2001
- } else {
2002
- body = opts.body;
2003
- }
2004
- const requestId = this.requestIdCounter++;
2005
- return output_manager_default.time(
2006
- (res) => {
2007
- if (res) {
2008
- return `#${requestId} \u2190 ${res.status} ${res.statusText}: ${res.headers.get("x-vercel-id")}`;
2009
- } else {
2010
- return `#${requestId} \u2192 ${opts.method || "GET"} ${url.href}`;
2011
- }
2012
- },
2013
- fetch(url, { ...opts, headers, body })
2014
- );
2015
- }
2016
- fetch(url, opts = {}) {
2017
- return this.retry(async (bail) => {
2018
- let res;
2019
- try {
2020
- res = await this._fetch(url, opts);
2021
- } catch (err) {
2022
- if (err instanceof Error && err.name === "AbortError") {
2023
- return bail(err);
2024
- }
2025
- throw err;
2026
- }
2027
- printIndications(res);
2028
- if (!res.ok) {
2029
- if (opts.redirect === "manual" && res.status >= 300 && res.status < 400) {
2030
- return res;
2031
- }
2032
- const error = await responseError(res);
2033
- if (isSAMLError(error) && error.teamId) {
2034
- try {
2035
- await this.reauthenticate(error);
2036
- } catch (reauthError) {
2037
- return bail((0, import_error_utils2.normalizeError)(reauthError));
2038
- }
2039
- } else if (res.status === 429 && opts.bailOn429) {
2040
- return bail(error);
2041
- } else if (typeof error.retryAfterMs === "number") {
2042
- const randomSkewMs = 3e4 * Math.random();
2043
- await sleep(error.retryAfterMs + randomSkewMs);
2044
- } else if (res.status >= 400 && res.status < 500) {
2045
- return bail(error);
2046
- }
2047
- throw error;
2048
- }
2049
- if (opts.json === false) {
2050
- return res;
2051
- }
2052
- const contentType = res.headers.get("content-type");
2053
- if (!contentType) {
2054
- return null;
2055
- }
2056
- return contentType.includes("application/json") ? res.json() : res;
2057
- }, opts.retry);
2058
- }
2059
- async *fetchPaginated(url, opts) {
2060
- const endpoint = typeof url === "string" ? new URL(url, this.apiUrl) : new URL(url.href);
2061
- if (!endpoint.searchParams.has("limit")) {
2062
- endpoint.searchParams.set("limit", "100");
2063
- }
2064
- let next;
2065
- do {
2066
- if (next) {
2067
- await sleep(100);
2068
- endpoint.searchParams.set("until", String(next));
2069
- }
2070
- const res = await this.fetch(
2071
- endpoint.href,
2072
- opts
2073
- );
2074
- yield res;
2075
- next = res.pagination?.next;
2076
- } while (next);
2077
- }
2078
- get cwd() {
2079
- return process.cwd();
2080
- }
2081
- set cwd(v) {
2082
- process.chdir(v);
2083
- }
2084
- };
2085
-
2086
- export {
2087
- require_dist3 as require_dist,
2088
- printIndications,
2089
- readConfigFile,
2090
- writeToConfigFile,
2091
- readAuthConfigFile,
2092
- persistAuthConfig,
2093
- getConfigFilePath2 as getConfigFilePath,
2094
- getAuthConfigFilePath2 as getAuthConfigFilePath,
2095
- readLocalConfig,
2096
- sleep,
2097
- isJSONObject,
2098
- Client
2099
- };