@vercel/cli-support 0.0.0 → 65.4.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 (355) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +100 -3
  3. package/dist/chunks/add-7NS6HIWC.js +8 -0
  4. package/dist/chunks/add-NMYFDVXW.js +8 -0
  5. package/dist/chunks/add-PMJ5BECU.js +8 -0
  6. package/dist/chunks/build-BCY6HQJG.js +7 -0
  7. package/dist/chunks/chunk-25565AGS.js +7 -0
  8. package/dist/chunks/chunk-2EYYB6YN.js +7 -0
  9. package/dist/chunks/chunk-2GHZGOWT.js +7 -0
  10. package/dist/chunks/chunk-2K3ISCQ6.js +7 -0
  11. package/dist/chunks/chunk-2NABMKFV.js +29 -0
  12. package/dist/chunks/chunk-2S6PE6GB.js +7 -0
  13. package/dist/chunks/chunk-2TUVL6WE.js +12 -0
  14. package/dist/chunks/chunk-363SJ4TN.js +7 -0
  15. package/dist/chunks/chunk-3G3FQYMW.js +7 -0
  16. package/dist/chunks/chunk-3LIKVGFT.js +8 -0
  17. package/dist/chunks/chunk-3XW7N4W3.js +9 -0
  18. package/dist/chunks/chunk-462YCCJZ.js +7 -0
  19. package/dist/chunks/chunk-4CACOKMS.js +7 -0
  20. package/dist/chunks/chunk-4N6LMERQ.js +57 -0
  21. package/dist/chunks/chunk-4NTBYNFR.js +17 -0
  22. package/dist/chunks/chunk-4SAVH3H7.js +7 -0
  23. package/dist/chunks/chunk-4VFYJU37.js +7 -0
  24. package/dist/chunks/chunk-527GBU3K.js +7 -0
  25. package/dist/chunks/chunk-5IWFRZQT.js +10 -0
  26. package/dist/chunks/chunk-5KUUMQ3M.js +7 -0
  27. package/dist/chunks/chunk-5RMIM4S2.js +7 -0
  28. package/dist/chunks/chunk-5V53NA6C.js +7 -0
  29. package/dist/chunks/chunk-67GZ5REA.js +7 -0
  30. package/dist/chunks/chunk-6I6QJHCY.js +7 -0
  31. package/dist/chunks/chunk-6IDNVZZR.js +7 -0
  32. package/dist/chunks/chunk-6OVX3PWM.js +7 -0
  33. package/dist/chunks/chunk-6QKS6QK7.js +7 -0
  34. package/dist/chunks/chunk-6TXEVQA4.js +7 -0
  35. package/dist/chunks/chunk-6VH56CX2.js +19 -0
  36. package/dist/chunks/chunk-6Y2ZL5XJ.js +98 -0
  37. package/dist/chunks/chunk-6YXIWZ3X.js +25 -0
  38. package/dist/chunks/chunk-773GOZIR.js +13 -0
  39. package/dist/chunks/chunk-7E3WREH5.js +7 -0
  40. package/dist/chunks/chunk-7EJQLVWX.js +7 -0
  41. package/dist/chunks/chunk-7L2K4OKM.js +63 -0
  42. package/dist/chunks/chunk-7L5QUDUR.js +8 -0
  43. package/dist/chunks/chunk-7QAGSRCU.js +7 -0
  44. package/dist/chunks/chunk-7R6TRRG5.js +7 -0
  45. package/dist/chunks/chunk-7YKFF6CE.js +7 -0
  46. package/dist/chunks/chunk-A2RZZQEP.js +7 -0
  47. package/dist/chunks/chunk-ADLBLGT3.js +8 -0
  48. package/dist/chunks/chunk-AM46JVVN.js +7 -0
  49. package/dist/chunks/chunk-ANMDN3EG.js +9 -0
  50. package/dist/chunks/chunk-AYUUSAB7.js +7 -0
  51. package/dist/chunks/chunk-BLUPZPAS.js +7 -0
  52. package/dist/chunks/chunk-BPUANOGW.js +7 -0
  53. package/dist/chunks/chunk-BRQUZ5NC.js +7 -0
  54. package/dist/chunks/chunk-BS32OUOC.js +7 -0
  55. package/dist/chunks/chunk-BTI5TG6Q.js +7 -0
  56. package/dist/chunks/chunk-BUJITHGZ.js +8 -0
  57. package/dist/chunks/chunk-BVGGTBYE.js +7 -0
  58. package/dist/chunks/chunk-BVH2AEFE.js +7 -0
  59. package/dist/chunks/chunk-BZENIQ7N.js +7 -0
  60. package/dist/chunks/chunk-C6GY2G73.js +7 -0
  61. package/dist/chunks/chunk-C7FQMC6D.js +7 -0
  62. package/dist/chunks/chunk-CBVKB3DT.js +21 -0
  63. package/dist/chunks/chunk-CC6FLKIP.js +11 -0
  64. package/dist/chunks/chunk-COD3WAUI.js +7 -0
  65. package/dist/chunks/chunk-CR3NBTHV.js +7 -0
  66. package/dist/chunks/chunk-CWM2F235.js +7 -0
  67. package/dist/chunks/chunk-CZSOZKHX.js +7 -0
  68. package/dist/chunks/chunk-D3AHZ5LI.js +7 -0
  69. package/dist/chunks/chunk-D6REP5QQ.js +15 -0
  70. package/dist/chunks/chunk-DFVNL5ML.js +7 -0
  71. package/dist/chunks/chunk-DKJL2KV7.js +7 -0
  72. package/dist/chunks/chunk-DQ2SVW4R.js +12 -0
  73. package/dist/chunks/chunk-DWZBL4NK.js +7 -0
  74. package/dist/chunks/chunk-EAUDC24V.js +9 -0
  75. package/dist/chunks/chunk-EAXMWCOL.js +63 -0
  76. package/dist/chunks/chunk-ECEDD646.js +8 -0
  77. package/dist/chunks/chunk-ECQIO5K3.js +7 -0
  78. package/dist/chunks/chunk-EEUJLJEJ.js +7 -0
  79. package/dist/chunks/chunk-EGNR2DEI.js +7 -0
  80. package/dist/chunks/chunk-EISD3RG7.js +11 -0
  81. package/dist/chunks/chunk-EKZTFGDX.js +7 -0
  82. package/dist/chunks/chunk-ETV3C2CV.js +7 -0
  83. package/dist/chunks/chunk-EU2GBIPC.js +7 -0
  84. package/dist/chunks/chunk-F4KY2TOK.js +7 -0
  85. package/dist/chunks/chunk-F53OKXYI.js +7 -0
  86. package/dist/chunks/chunk-F6EBOT64.js +7 -0
  87. package/dist/chunks/chunk-F7AVGV4Y.js +7 -0
  88. package/dist/chunks/chunk-FBYA6LLM.js +7 -0
  89. package/dist/chunks/chunk-FGFLTLEA.js +7 -0
  90. package/dist/chunks/chunk-FHU2O7ZJ.js +8 -0
  91. package/dist/chunks/chunk-FLHO75XC.js +8 -0
  92. package/dist/chunks/chunk-FSPPKNKN.js +7 -0
  93. package/dist/chunks/chunk-FUX6LKNP.js +7 -0
  94. package/dist/chunks/chunk-GA277JFB.js +20 -0
  95. package/dist/chunks/chunk-GCZVIDNG.js +86 -0
  96. package/dist/chunks/chunk-GD7AV7BO.js +9 -0
  97. package/dist/chunks/chunk-GG5RME4X.js +7 -0
  98. package/dist/chunks/chunk-GHAY4PSD.js +7 -0
  99. package/dist/chunks/chunk-GYVJIIYL.js +7 -0
  100. package/dist/chunks/chunk-GZNDA6SV.js +8 -0
  101. package/dist/chunks/chunk-HCRD3JFL.js +7 -0
  102. package/dist/chunks/chunk-HEGJZJO7.js +7 -0
  103. package/dist/chunks/chunk-HRR57QNP.js +7 -0
  104. package/dist/chunks/chunk-HSFKISDH.js +9 -0
  105. package/dist/chunks/chunk-HTXDC7E2.js +10 -0
  106. package/dist/chunks/chunk-ID663OJ7.js +7 -0
  107. package/dist/chunks/chunk-IOZ3I765.js +7 -0
  108. package/dist/chunks/chunk-IQ7FPAI4.js +7 -0
  109. package/dist/chunks/chunk-IQKGQ2Y2.js +15 -0
  110. package/dist/chunks/chunk-ISWW3DKF.js +7 -0
  111. package/dist/chunks/chunk-IVSSTHB6.js +7 -0
  112. package/dist/chunks/chunk-J24BABG4.js +21 -0
  113. package/dist/chunks/chunk-JALVF3C2.js +7 -0
  114. package/dist/chunks/chunk-JELLVPCM.js +8 -0
  115. package/dist/chunks/chunk-JESNVRVR.js +7 -0
  116. package/dist/chunks/chunk-JLE7K4SY.js +9 -0
  117. package/dist/chunks/chunk-JLEJB6KM.js +7 -0
  118. package/dist/chunks/chunk-JP33AIDQ.js +7 -0
  119. package/dist/chunks/chunk-JRPNHWA3.js +7 -0
  120. package/dist/chunks/chunk-JUSR7V2L.js +7 -0
  121. package/dist/chunks/chunk-JWCEHQQF.js +29 -0
  122. package/dist/chunks/chunk-K5U47EVH.js +7 -0
  123. package/dist/chunks/chunk-KCKYPLIH.js +7 -0
  124. package/dist/chunks/chunk-KGBIRIFF.js +7 -0
  125. package/dist/chunks/chunk-KJA2GKPT.js +7 -0
  126. package/dist/chunks/chunk-KPQLUGFI.js +32 -0
  127. package/dist/chunks/chunk-KQCFC2JL.js +7 -0
  128. package/dist/chunks/chunk-KQCROPL3.js +8 -0
  129. package/dist/chunks/chunk-KRPY5FHJ.js +7 -0
  130. package/dist/chunks/chunk-KW6GSQXV.js +7 -0
  131. package/dist/chunks/chunk-KY335KWI.js +7 -0
  132. package/dist/chunks/chunk-L3JYCXVB.js +23 -0
  133. package/dist/chunks/chunk-LFOWP74R.js +7 -0
  134. package/dist/chunks/chunk-LOBA3E72.js +7 -0
  135. package/dist/chunks/chunk-LQVSU5HR.js +7 -0
  136. package/dist/chunks/chunk-LSF7FY6X.js +7 -0
  137. package/dist/chunks/chunk-LSQREJXO.js +11 -0
  138. package/dist/chunks/chunk-LW4N3CW6.js +9 -0
  139. package/dist/chunks/chunk-M2NXKZKX.js +16 -0
  140. package/dist/chunks/chunk-MBEKRUTQ.js +8 -0
  141. package/dist/chunks/chunk-MCRKBVZA.js +7 -0
  142. package/dist/chunks/chunk-MVGTMPMI.js +23 -0
  143. package/dist/chunks/chunk-MXTC4ZAQ.js +7 -0
  144. package/dist/chunks/chunk-N2FLYCCO.js +9 -0
  145. package/dist/chunks/chunk-N6JBQMOF.js +20 -0
  146. package/dist/chunks/chunk-NAX6IARA.js +11 -0
  147. package/dist/chunks/chunk-NB2WLB3J.js +12 -0
  148. package/dist/chunks/chunk-NGKO2OOU.js +8 -0
  149. package/dist/chunks/chunk-NW7WWUCQ.js +9 -0
  150. package/dist/chunks/chunk-NWGBDBZI.js +7 -0
  151. package/dist/chunks/chunk-NZ2TFADV.js +7 -0
  152. package/dist/chunks/chunk-O4WNSKQR.js +15 -0
  153. package/dist/chunks/chunk-O72YDZKD.js +10 -0
  154. package/dist/chunks/chunk-OAM5NJCU.js +9 -0
  155. package/dist/chunks/chunk-OCR5CRTH.js +10 -0
  156. package/dist/chunks/chunk-OFDTADPQ.js +7 -0
  157. package/dist/chunks/chunk-OHEOYFBU.js +9 -0
  158. package/dist/chunks/chunk-OO572JUC.js +7 -0
  159. package/dist/chunks/chunk-OPORM35X.js +7 -0
  160. package/dist/chunks/chunk-OZCQTXI4.js +7 -0
  161. package/dist/chunks/chunk-PADL3C6Z.js +7 -0
  162. package/dist/chunks/chunk-PFD7LETF.js +7 -0
  163. package/dist/chunks/chunk-PFPJLIFF.js +33 -0
  164. package/dist/chunks/chunk-PSOVLGHP.js +7 -0
  165. package/dist/chunks/chunk-PUKYAALC.js +7 -0
  166. package/dist/chunks/chunk-PVASGBEF.js +7 -0
  167. package/dist/chunks/chunk-Q4KTAQB3.js +7 -0
  168. package/dist/chunks/chunk-Q5ODLDCU.js +7 -0
  169. package/dist/chunks/chunk-Q7D7RGXM.js +7 -0
  170. package/dist/chunks/chunk-QB7F3UAP.js +7 -0
  171. package/dist/chunks/chunk-QHJLRTVY.js +7 -0
  172. package/dist/chunks/chunk-QIVX6SCR.js +27 -0
  173. package/dist/chunks/chunk-QVHXFHBV.js +14 -0
  174. package/dist/chunks/chunk-QVXS234E.js +7 -0
  175. package/dist/chunks/chunk-QVZAAMGQ.js +39 -0
  176. package/dist/chunks/chunk-R2BUF6Z7.js +7 -0
  177. package/dist/chunks/chunk-R2XHJDAP.js +7 -0
  178. package/dist/chunks/chunk-R6BEOVTU.js +7 -0
  179. package/dist/chunks/chunk-RLKS5G6C.js +12 -0
  180. package/dist/chunks/chunk-RM3ZDRYE.js +7 -0
  181. package/dist/chunks/chunk-RMZTB2IU.js +7 -0
  182. package/dist/chunks/chunk-RRDNKB2X.js +7 -0
  183. package/dist/chunks/chunk-RW3X523R.js +8 -0
  184. package/dist/chunks/chunk-S3L2OHPO.js +7 -0
  185. package/dist/chunks/chunk-SACGQMVQ.js +13 -0
  186. package/dist/chunks/chunk-SCV7XEEO.js +7 -0
  187. package/dist/chunks/chunk-SF4E3AQ3.js +7 -0
  188. package/dist/chunks/chunk-SLGUYM42.js +10 -0
  189. package/dist/chunks/chunk-SYFG2RM6.js +10 -0
  190. package/dist/chunks/chunk-T6243EDS.js +7 -0
  191. package/dist/chunks/chunk-TAAWMNNL.js +7 -0
  192. package/dist/chunks/chunk-TAISZMA2.js +7 -0
  193. package/dist/chunks/chunk-TEYREL44.js +7 -0
  194. package/dist/chunks/chunk-TG2RCYTH.js +7 -0
  195. package/dist/chunks/chunk-TIPQQ4TG.js +17 -0
  196. package/dist/chunks/chunk-U2OBPULW.js +7 -0
  197. package/dist/chunks/chunk-U4Z2MMOF.js +301 -0
  198. package/dist/chunks/chunk-U56NHYAH.js +7 -0
  199. package/dist/chunks/chunk-UGNIIDHR.js +32 -0
  200. package/dist/chunks/chunk-UHBMX3OK.js +7 -0
  201. package/dist/chunks/chunk-UVHKXCR5.js +11 -0
  202. package/dist/chunks/chunk-V6Y6UK6B.js +43 -0
  203. package/dist/chunks/chunk-VNIKIQVE.js +10 -0
  204. package/dist/chunks/chunk-VT6RIZJH.js +7 -0
  205. package/dist/chunks/chunk-WDXW6A4H.js +10 -0
  206. package/dist/chunks/chunk-WEH6XC4Y.js +22 -0
  207. package/dist/chunks/chunk-WKZ6JSGZ.js +7 -0
  208. package/dist/chunks/chunk-WVHCBDTB.js +7 -0
  209. package/dist/chunks/chunk-XC46OAAT.js +9 -0
  210. package/dist/chunks/chunk-XGTKHQTT.js +7 -0
  211. package/dist/chunks/chunk-XOETL6DB.js +96 -0
  212. package/dist/chunks/chunk-XP3FT56R.js +27 -0
  213. package/dist/chunks/chunk-XR6QY7RR.js +7 -0
  214. package/dist/chunks/chunk-XVDRGWXM.js +16 -0
  215. package/dist/chunks/chunk-Y5ZMKL7E.js +7 -0
  216. package/dist/chunks/chunk-YEZJNXQX.js +7 -0
  217. package/dist/chunks/chunk-YHPPP3SF.js +7 -0
  218. package/dist/chunks/chunk-YHULP2KK.js +7 -0
  219. package/dist/chunks/chunk-YMZ6WBKB.js +21 -0
  220. package/dist/chunks/chunk-ZF27J6FQ.js +7 -0
  221. package/dist/chunks/chunk-ZFRNVIHI.js +7 -0
  222. package/dist/chunks/chunk-ZN6CQWVP.js +7 -0
  223. package/dist/chunks/chunk-ZQBSAMFL.js +24 -0
  224. package/dist/chunks/cjs-2SMN43VH.js +54 -0
  225. package/dist/chunks/clear-FKVWDCVA.js +8 -0
  226. package/dist/chunks/compile-vercel-config-GWAJE44R.js +7 -0
  227. package/dist/chunks/config-5WVLG5SE.js +8 -0
  228. package/dist/chunks/config-RMOHN5YT.js +7 -0
  229. package/dist/chunks/config-validator.mjs +1 -0
  230. package/dist/chunks/connect-git-provider-FS5Q2HO4.js +7 -0
  231. package/dist/chunks/constants-JAB7MRSK.js +7 -0
  232. package/dist/chunks/create-project-IKCB6MB2.js +7 -0
  233. package/dist/chunks/delete-5WMB4WFR.js +9 -0
  234. package/dist/chunks/delete-EM4JZPFA.js +10 -0
  235. package/dist/chunks/detect-projects-OD4JEAW2.js +7 -0
  236. package/dist/chunks/detect-services-BSJGB4RM.js +7 -0
  237. package/dist/chunks/disable-QOM7UHQC.js +7 -0
  238. package/dist/chunks/discard-L5ZH7P5B.js +14 -0
  239. package/dist/chunks/dist-33WTJLVQ.js +7 -0
  240. package/dist/chunks/dist-RXYNZPEA.js +7 -0
  241. package/dist/chunks/edit-F3VJGCG2.js +9 -0
  242. package/dist/chunks/edit-TM7YCWBU.js +8 -0
  243. package/dist/chunks/enable-72C3QX34.js +7 -0
  244. package/dist/chunks/esm-33752ISR.js +7 -0
  245. package/dist/chunks/esm-4JKEE7PC.js +7 -0
  246. package/dist/chunks/esm-BYG5BWYH.js +9 -0
  247. package/dist/chunks/esm-DFFBNKNU.js +20 -0
  248. package/dist/chunks/esm-IF453UWS.js +7 -0
  249. package/dist/chunks/esm-LABWDJ72.js +7 -0
  250. package/dist/chunks/esm-TG37FXTU.js +9 -0
  251. package/dist/chunks/exec-OZSY46V6.js +16372 -0
  252. package/dist/chunks/export-EPLYZF2Q.js +19 -0
  253. package/dist/chunks/fetch-proxy-45DGILKR.js +67 -0
  254. package/dist/chunks/future-V77DRMQG.js +7 -0
  255. package/dist/chunks/generate-cert-for-deploy-Y3YHBMPU.js +7 -0
  256. package/dist/chunks/image-CVXEXU5R.js +7 -0
  257. package/dist/chunks/import-builders-PGRKJOOE.js +7 -0
  258. package/dist/chunks/inspect-BTRNXRJT.js +9 -0
  259. package/dist/chunks/inspect-CZ7WXYE5.js +20 -0
  260. package/dist/chunks/inspect-FGDVWAQP.js +13 -0
  261. package/dist/chunks/inspect-HFDGZNWC.js +15 -0
  262. package/dist/chunks/inspect-T2AIREYK.js +19 -0
  263. package/dist/chunks/list-CKRRHAOE.js +12 -0
  264. package/dist/chunks/list-FLREMGJR.js +16 -0
  265. package/dist/chunks/list-ON4YTQRN.js +10 -0
  266. package/dist/chunks/login-55LJ5ZA6.js +9 -0
  267. package/dist/chunks/login-DQRZSD4Z.js +7 -0
  268. package/dist/chunks/logs-2HQXWOHM.js +7 -0
  269. package/dist/chunks/ls-2HUJHVLA.js +12 -0
  270. package/dist/chunks/ls-3DVM5HLK.js +12 -0
  271. package/dist/chunks/ls-4B3QYHCI.js +8 -0
  272. package/dist/chunks/ls-A7K4XDQB.js +8 -0
  273. package/dist/chunks/ls-FK5XEJEU.js +12 -0
  274. package/dist/chunks/ls-QGUKJJY5.js +12 -0
  275. package/dist/chunks/ls-VTKHPDWS.js +11 -0
  276. package/dist/chunks/mutate-7ADZBCZM.js +9 -0
  277. package/dist/chunks/notifications-XZJXE2K4.js +7 -0
  278. package/dist/chunks/open-EE5IZQD7.js +7 -0
  279. package/dist/chunks/openapi-QBX62ZXC.js +7 -0
  280. package/dist/chunks/permissions-VYJ4LL5R.js +7 -0
  281. package/dist/chunks/pkg-EDJQLCNP.js +7 -0
  282. package/dist/chunks/plugin-offer-TEGYA3TA.js +9 -0
  283. package/dist/chunks/prompt-missing-credentials-VP6OVCFM.js +7 -0
  284. package/dist/chunks/publish-2HEK5UMJ.js +15 -0
  285. package/dist/chunks/pull-WRTTSY7J.js +7 -0
  286. package/dist/chunks/purchase-domain-if-available-6S3NLTUI.js +7 -0
  287. package/dist/chunks/push-L3QRGGLC.js +7 -0
  288. package/dist/chunks/query-FXXLX6UB.js +12 -0
  289. package/dist/chunks/reauthenticate-IXQDC4UZ.js +7 -0
  290. package/dist/chunks/reorder-B4OXSYCI.js +10 -0
  291. package/dist/chunks/reply-F637K6XH.js +9 -0
  292. package/dist/chunks/repo-info-to-url-XQSULSEO.js +7 -0
  293. package/dist/chunks/resolve-E3F6NYQZ.js +12 -0
  294. package/dist/chunks/resolve-agent-team-EIPCH766.js +7 -0
  295. package/dist/chunks/resolve-deployment-framework-preset-AXXYBFCL.js +7 -0
  296. package/dist/chunks/restore-Q25KRZPH.js +16 -0
  297. package/dist/chunks/rm-FWD2NUGX.js +8 -0
  298. package/dist/chunks/rm-JMQ4QKCC.js +8 -0
  299. package/dist/chunks/rm-PPG7P3GN.js +8 -0
  300. package/dist/chunks/rm-SH3DYKNS.js +8 -0
  301. package/dist/chunks/rm-UEBLKFVC.js +8 -0
  302. package/dist/chunks/routes-PKTWMDWQ.js +7 -0
  303. package/dist/chunks/rule-inspect-LKQA5I4V.js +8 -0
  304. package/dist/chunks/schema-FBV42W7N.js +14 -0
  305. package/dist/chunks/schema-ZWE5MNMG.js +44 -0
  306. package/dist/chunks/select-org-WMB752Z6.js +7 -0
  307. package/dist/chunks/set-UTYIPOLC.js +7 -0
  308. package/dist/chunks/setup-and-link-ZLY5XQW5.js +7 -0
  309. package/dist/chunks/skills-RKIGVVNM.js +590 -0
  310. package/dist/chunks/slugify-NMMUASYK.js +7 -0
  311. package/dist/chunks/stamp-TKONNIJ5.js +7 -0
  312. package/dist/chunks/tags-UCLZ5UMX.js +7 -0
  313. package/dist/chunks/token-W6P2KNI5.js +7 -0
  314. package/dist/chunks/token-util-JDQI37VN.js +7 -0
  315. package/dist/chunks/types-YM7TMHXW.js +14 -0
  316. package/dist/chunks/update-BGDQ5TXO.js +8 -0
  317. package/dist/chunks/update-route-version-KWK5S4UW.js +7 -0
  318. package/dist/chunks/utils-IQZEE4DT.js +86 -0
  319. package/dist/chunks/vlt-builder-graph-XL2XRO4V.js +7 -0
  320. package/dist/chunks/vlt-builder-importer-RBUPAB6J.js +11 -0
  321. package/dist/chunks/zod-2C2SXNIK.js +7 -0
  322. package/dist/commands/build/builder-worker.cjs +281 -0
  323. package/dist/commands/build/index.js +34 -0
  324. package/dist/commands/deploy/index.js +72 -0
  325. package/dist/commands/dev/builder-worker.cjs +110 -0
  326. package/dist/commands/dev/index.js +157 -0
  327. package/dist/commands/env/index.js +40 -0
  328. package/dist/commands/link/index.js +10 -0
  329. package/dist/commands/list/index.js +14 -0
  330. package/dist/commands/project/index.js +113 -0
  331. package/dist/commands-account.js +209 -0
  332. package/dist/commands-ai.js +200 -0
  333. package/dist/commands-blob.js +107 -0
  334. package/dist/commands-core.js +222 -0
  335. package/dist/commands-deployments.js +84 -0
  336. package/dist/commands-flags.js +377 -0
  337. package/dist/commands-integrations.js +143 -0
  338. package/dist/commands-observability.js +122 -0
  339. package/dist/commands-routing.js +273 -0
  340. package/dist/fetch-dist-tags.cjs +60 -0
  341. package/dist/get-latest-worker.cjs +222 -0
  342. package/dist/help.js +7 -0
  343. package/dist/index.js +27 -0
  344. package/dist/internal-build-worker.js +10 -0
  345. package/dist/internal-build.js +11 -0
  346. package/dist/package.json +264 -0
  347. package/dist/root-help-commands.mjs +1 -0
  348. package/dist/runtime-assets/dev-tunnel/api/tunnel.ts +443 -0
  349. package/dist/runtime-assets/dev-tunnel/lib/env.ts +25 -0
  350. package/dist/runtime-assets/dev-tunnel/lib/tunnel_pb.ts +505 -0
  351. package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +220 -0
  352. package/dist/vc.js +404 -0
  353. package/dist/version.mjs +2 -0
  354. package/package.json +224 -14
  355. package/index.js +0 -1
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{resolveProjectContext}from"./chunk-JP33AIDQ.js";import{printError}from"./chunk-HSFKISDH.js";import{detectExplicitScope}from"./chunk-K5U47EVH.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getErrorRecovery,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-WDXW6A4H.js";import{getProjectByNameOrId}from"./chunk-4N6LMERQ.js";import{ProjectNotFound,isAPIError}from"./chunk-6VH56CX2.js";import{output_manager_default}from"./chunk-XP3FT56R.js";function tracingErrorMessage(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function tracingErrorReason(err){let status=isAPIError(err)?err.status:void 0;return status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR}function handleTracingApiError(client,err){if(client.nonInteractive){let apiError=isAPIError(err)?err:void 0;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:tracingErrorReason(err),message:tracingErrorMessage(err),...apiError?.status===429&&getErrorRecovery(apiError,client)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(tracingErrorMessage(err)),1):(printError(err),1)}function configError(client,reason,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),getExitCodeForReason(reason)}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function missingEnvironment(client,message){return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.MISSING_ENVIRONMENT,message}),output_manager_default.error(message),getExitCodeForReason(AGENT_REASON.MISSING_ENVIRONMENT)}function ruleNotFound(client,message){return configError(client,AGENT_REASON.NOT_FOUND,message)}function confirmationRequired(client,message,next){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message,userActionRequired:!0,next}),output_manager_default.error(message),1}var MISSING_BOTH_MESSAGE="No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";async function resolveScope({client,flags={},linkedProject}){let flagScope=flags.scope?.trim()||void 0,flagProject=flags.project?.trim()||void 0;if(linkedProject.status==="linked"){if(!flagScope&&!flagProject)return{teamId:linkedProject.org.id,projectId:linkedProject.project.id,projectName:linkedProject.project.name};let teamId=flagScope?client.config.currentTeam:linkedProject.org.id;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject??linkedProject.project.id,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}if(flagScope&&flagProject){let teamId=client.config.currentTeam;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}return{reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE}}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE,hint:"Link a project or pass --scope and --project.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"link this directory to a project"}]}),output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?{exitCode:invalidArguments(client,`The linked project ${link.project.name} belongs to ${link.org.slug||link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`)}:{teamId:link.org.id,projectId:link.project.id,projectName:link.project.name}}export{resolveScope,tracingErrorMessage,tracingErrorReason,handleTracingApiError,invalidArguments,missingEnvironment,ruleNotFound,confirmationRequired,resolveConfigScope};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ function parseTeamRefs(args){let refs=[];for(let arg of args)for(let piece of arg.split(",")){let ref=piece.trim();ref&&!refs.includes(ref)&&refs.push(ref)}return refs}function teamRefBody(ref){return ref.startsWith("team_")?{teamId:ref}:{teamSlug:ref}}export{parseTeamRefs,teamRefBody};
@@ -0,0 +1,11 @@
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{table}from"./chunk-773GOZIR.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1);function strlen(str){return(0,import_strip_ansi.default)(str).length}function formatTable(header,align,blocks){let nrCols=header.length,padding=[],out=`
8
+ `;for(let i=0;i<nrCols;i++)padding[i]=blocks.reduce((acc,block)=>{let maxLen=Math.max(...block.rows.map(row=>strlen(`${row[i]}`)));return Math.max(acc,Math.ceil(maxLen/8))},1);for(let block of blocks){block.name&&(out+=`${block.name}
9
+ `);let rows=[header.map(s=>import_chalk.default.dim(s))].concat(block.rows);if(rows.length>0){rows[0][0]=` ${rows[0][0]}`;for(let i=1;i<rows.length;i++){let row=rows[i].slice(0);row[0]=` ${row[0]}`;for(let j=0;j<nrCols;j++){let col=`${row[j]}`,al=align[j]||"l",repeat=padding[j]>1?padding[j]*8-strlen(col):0,pad=repeat>0?" ".repeat(repeat):"";rows[i][j]=al==="l"?col+pad:pad+col}}out+=table(rows,{align,hsep:4})}out+=`
10
+
11
+ `}return out.slice(0,-1)}export{strlen,formatTable};
@@ -0,0 +1,9 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{readJSONFile}from"./chunk-R2XHJDAP.js";import{getScope}from"./chunk-K5U47EVH.js";import{humanizePath,require_types,writeToConfigFile}from"./chunk-4N6LMERQ.js";import{getArgs}from"./chunk-KCKYPLIH.js";import{CantFindConfig,CantParseJSONFile,DeprecatedNowJson,WorkingDirectoryDoesNotExist}from"./chunk-6VH56CX2.js";import{cliErrorFromUnknown,output_manager_default,recordCliError}from"./chunk-XP3FT56R.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_epipebomb=__commonJS({"../../node_modules/.pnpm/epipebomb@1.0.0/node_modules/epipebomb/epipebomb.js"(exports,module){module.exports=epipeBomb;function epipeBomb(stream,callback){stream==null&&(stream=process.stdout),callback==null&&(callback=process.exit);function epipeFilter(err){if(err.code==="EPIPE")return callback();stream.listeners("error").length<=1&&(stream.removeAllListeners(),stream.emit("error",err),stream.on("error",epipeFilter))}stream.on("error",epipeFilter)}}});var sentry;async function getSentry(){if(!sentry){let[SentryModule,{SENTRY_DSN},{default:pkg}]=await Promise.all([import("./cjs-2SMN43VH.js"),import("./constants-JAB7MRSK.js"),import("./pkg-EDJQLCNP.js")]),Sentry="init"in SentryModule?SentryModule:SentryModule.default;Sentry.init({dsn:SENTRY_DSN,release:`vercel-cli@${pkg.version}`,environment:"stable",autoSessionTracking:!1}),sentry=Sentry}return sentry}function isOutputDebugEnabled(debugFlag){return debugFlag===!0||process.env.VERCEL_CLI_DEBUG==="1"}var import_epipebomb=__toESM(require_epipebomb(),1),SILENCED_ERRORS=["DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead."],installed=!1;function installProcessGuards(){if(installed)return;installed=!0;let originalError=console.error;console.error=msg=>{SILENCED_ERRORS.some(error=>typeof msg=="string"&&msg.includes(error))||originalError(msg)},(0,import_epipebomb.default)()}var import_error_utils=__toESM(require_dist(),1);async function reportError(sentry2,client,error){if(ignoreError(error))return;let user,team,scopeError;try{({user,team}=await getScope(client))}catch(err){(0,import_error_utils.isError)(err)&&(scopeError=err)}sentry2.withScope(scope=>{if(user){let spec={email:user.email,id:user.id,username:user.username,name:user.name};scope.setUser(spec)}team&&scope.setTag("currentTeam",team.id),scopeError&&scope.setExtra("scopeError",{name:scopeError.name,message:scopeError.message,stack:scopeError.stack});let args,argsError;try{args=getArgs(process.argv.slice(2),{})}catch(err){(0,import_error_utils.isError)(err)&&(argsError=err)}if(args){let flags=["--env","--build-env","--token"];for(let flag of flags)args[flag]&&(args[flag]="REDACTED");args._.length>=4&&args._[0].startsWith("secret")&&args._[1]==="add"&&(args._[3]="REDACTED"),scope.setExtra("args",args)}else{let msg="Unable to parse args";argsError&&(msg+=`: ${argsError}`),scope.setExtra("args",msg)}scope.setExtra("node",{execPath:process.execPath,version:process.version,platform:process.platform}),sentry2.captureException(error)});let sentryClient=sentry2.getCurrentHub().getClient();sentryClient&&await sentryClient.close()}function ignoreError(error){return(0,import_error_utils.isError)(error)&&error.message.includes("uv_cwd")}var fatalErrorHandlerSymbol=Symbol.for("vercel.cli.fatal-error-handler");async function exitWithUnexpectedError(error){let handler=globalThis[fatalErrorHandlerSymbol];if(typeof handler=="function")try{await handler(error)}catch{}process.exit(1)}async function handleUnexpectedError(client,err){let{message}=err;return message.includes("sentry")&&message.includes("ENOTFOUND")?(output_manager_default.debug(`Sentry is not reachable: ${err}`),!1):(output_manager_default.error(`An unexpected error occurred!
8
+ ${err.stack}`),await reportError(await getSentry(),client,err),!0)}function registerUnexpectedErrorHandlers(getClient){process.on("unhandledRejection",async err=>{recordCliError(cliErrorFromUnknown(err)),err?err instanceof Error?await handleUnexpectedError(getClient(),err):(output_manager_default.error(`An unexpected rejection occurred
9
+ ${err}`),await reportError(await getSentry(),getClient(),err)):output_manager_default.error("An unexpected empty rejection occurred"),await exitWithUnexpectedError(err)}),process.on("uncaughtException",async error=>{await handleUnexpectedError(getClient(),error)&&await exitWithUnexpectedError(error)})}var import_types=__toESM(require_types(),1);import path from"path";var import_error_utils2=__toESM(require_dist(),1);var config;async function earlyGetConfig(configFile){if(config)return config;let localPath;try{localPath=process.cwd()}catch(err){if((0,import_error_utils2.isErrnoException)(err)&&err.code==="ENOENT")return new WorkingDirectoryDoesNotExist;throw err}if(configFile){let localFilePath=path.resolve(localPath,configFile);output_manager_default.debug(`Found config in provided --local-config path ${localFilePath}`);let localConfig=await readJSONFile(localFilePath);return localConfig instanceof CantParseJSONFile?localConfig:localConfig===null?new CantFindConfig([humanizePath(localFilePath)]):(config=localConfig,config[import_types.fileNameSymbol]=configFile,config)}let vercelFilePath=path.resolve(localPath,"vercel.json"),nowFilePath=path.resolve(localPath,"now.json"),[vercelConfig,nowConfig]=await Promise.all([readJSONFile(vercelFilePath),readJSONFile(nowFilePath)]);return vercelConfig instanceof CantParseJSONFile?vercelConfig:nowConfig instanceof CantParseJSONFile?nowConfig:vercelConfig!==null?(output_manager_default.debug(`Found config in file "${vercelFilePath}"`),config=vercelConfig,config[import_types.fileNameSymbol]="vercel.json",config):nowConfig!==null?new DeprecatedNowJson(nowFilePath):new CantFindConfig([vercelFilePath].map(humanizePath))}var fallbackReason;function recordDirectBuildFallback(reason){fallbackReason=reason}function getDirectBuildFallbackAttributes(){return fallbackReason===void 0?void 0:{directBuild:"false",fallbackReason}}function checkTelemetryStatus({config:config2}){config2.telemetry||process.env.VERCEL_TELEMETRY_DISABLED||(output_manager_default.note("The Vercel CLI now collects telemetry regarding usage of the CLI."),output_manager_default.log("This information is used to shape the CLI roadmap and prioritize features."),output_manager_default.log("You can learn more, including how to opt-out if you'd not like to participate in this program, by visiting the following URL:"),output_manager_default.log("https://vercel.com/docs/cli/about-telemetry"),config2.telemetry={enabled:!0},writeToConfigFile(config2))}export{getSentry,isOutputDebugEnabled,installProcessGuards,reportError,exitWithUnexpectedError,handleUnexpectedError,registerUnexpectedErrorHandlers,earlyGetConfig,recordDirectBuildFallback,getDirectBuildFallbackAttributes,checkTelemetryStatus};
@@ -0,0 +1,16 @@
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{parseSubcommandArguments}from"./chunk-YEZJNXQX.js";import{printError}from"./chunk-HSFKISDH.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithYes,outputAgentError,withGlobalFlags}from"./chunk-WDXW6A4H.js";import{getGlobalFlagsFromArgs}from"./chunk-QVXS234E.js";import{getCommandNamePlain}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-XP3FT56R.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var ROUTE_TYPE_LABELS={rewrite:"Rewrite",redirect:"Redirect",set_status:"Set Status",transform:"Transform"};function getRouteTypeLabel(rule){return rule.routeType?ROUTE_TYPE_LABELS[rule.routeType]??"-":"-"}var SRC_SYNTAX_LABELS={equals:"Exact Match","path-to-regexp":"Pattern",regex:"Regex"};function getSrcSyntaxLabel(rule){let syntax=rule.srcSyntax??"regex";return SRC_SYNTAX_LABELS[syntax]}function isTargetTransform(transform){return"target"in transform}var import_chalk=__toESM(require_source(),1);function withGlobalFlags2(client,commandTemplate){return withGlobalFlags(client,commandTemplate,{preserveProject:!0})}function shellQuoteRouteIdentifierForSuggestion(identifier){return identifier.includes(" ")?identifier.includes("'")?identifier.includes('"')?`"${identifier.replace(/"/g,'\\"')}"`:`"${identifier}"`:`'${identifier}'`:identifier}async function parseSubcommandArgs(argv,command,client){let parsedArgs;try{parsedArgs=parseSubcommandArguments(argv,command)}catch(err){if(client?.nonInteractive){let rawMessage=err instanceof Error?err.message:String(err),flags=getGlobalFlagsFromArgs(client.argv.slice(2),{preserveProject:!0}),message=rawMessage,next=[{command:getCommandNamePlain(`routes ${command.name} ${flags.join(" ")}`.trim()),when:"fix flags and retry"}],aiIdx=argv.indexOf("--ai");return(aiIdx!==-1&&(aiIdx===argv.length-1||argv[aiIdx+1]!==void 0&&argv[aiIdx+1].startsWith("-"))||/option requires argument.*--ai|--ai.*requires argument/i.test(rawMessage))&&(command.name==="add"||command.name==="update")&&(message=command.name==="add"?'--ai requires a description. Example: routes add --ai <description> --yes --non-interactive. Replace <description> with your text; use shell quotes if it contains spaces (e.g. --ai "Redirect /old to /new").':"--ai requires a description. Example: routes update <name-or-id> --ai <description> --yes --non-interactive. Replace placeholders; use shell quotes for <description> if it contains spaces.",next=[{command:withGlobalFlags2(client,command.name==="add"?"routes add --ai <description> --yes":"routes update <name-or-id> --ai <description> --yes"),when:"replace <description> with your text (quote it in the shell if it contains spaces), then run"},{command:getCommandNamePlain(`routes ${command.name} --help ${flags.join(" ")}`.trim()),when:"see all flags"}]),outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message,next},2),2}return printError(err),2}return parsedArgs}async function confirmAction(client,skipConfirmation,message,details){return skipConfirmation?!0:client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:`${message} Re-run with --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"re-run with --yes to confirm"}]}),process.exit(1),!1):(details&&output_manager_default.print(` ${details}
8
+ `),await client.input.confirm(message,!1))}function formatCondition(condition){let parts=[import_chalk.default.gray(`[${condition.type}]`)];if(condition.key&&parts.push(import_chalk.default.cyan(condition.key)),condition.value!==void 0){let formatted=typeof condition.value=="string"?condition.value:JSON.stringify(condition.value);parts.push(condition.key?`= ${formatted}`:formatted)}return parts.join(" ")}var TRANSFORM_TYPE_LABELS={"request.headers":"Request Header","request.query":"Request Query","response.headers":"Response Header","request.path":"Request Path"},TRANSFORM_OP_LABELS={set:"set",append:"append",delete:"delete"};function formatTransform(transform,includeType=!0){let opLabel=TRANSFORM_OP_LABELS[transform.op]??transform.op,key=isTargetTransform(transform)?typeof transform.target.key=="string"?transform.target.key:JSON.stringify(transform.target.key):"path",parts=[];if(includeType){let typeLabel=TRANSFORM_TYPE_LABELS[transform.type]??transform.type;parts.push(import_chalk.default.gray(`[${typeLabel}]`))}if(parts.push(import_chalk.default.yellow(opLabel),import_chalk.default.cyan(key)),transform.args!==void 0&&transform.op!=="delete"){let argsStr=Array.isArray(transform.args)?transform.args.join(", "):transform.args;parts.push(`= ${argsStr}`)}return parts.join(" ")}function parsePosition(position){if(position==="start")return{placement:"start"};if(position==="end")return{placement:"end"};if(position.startsWith("after:")){let referenceId=position.slice(6);if(!referenceId)throw new Error('Position "after:" requires a route ID');return{placement:"after",referenceId}}if(position.startsWith("before:")){let referenceId=position.slice(7);if(!referenceId)throw new Error('Position "before:" requires a route ID');return{placement:"before",referenceId}}throw new Error(`Invalid position: "${position}". Use: start, end, after:<id>, or before:<id>`)}async function offerAutoPromote(client,projectId,version,hadExistingStagingVersion,opts){let{default:updateRouteVersion}=await import("./update-route-version-KWK5S4UW.js"),{default:stamp}=await import("./stamp-TKONNIJ5.js");if(output_manager_default.print(`
9
+ ${import_chalk.default.gray(`This change is staged. Run ${import_chalk.default.cyan(withGlobalFlags2(client,"routes publish"))} to make it live, or ${import_chalk.default.cyan(withGlobalFlags2(client,"routes discard-staging"))} to undo.`)}
10
+ `),!hadExistingStagingVersion&&!opts.skipPrompts){if(output_manager_default.print(`
11
+ `),await client.input.confirm("This is the only staged change. Promote to production now?",!1)){let promoteStamp=stamp();output_manager_default.spinner("Promoting to production");try{await updateRouteVersion(client,projectId,version.id,"promote",{teamId:opts.teamId}),output_manager_default.log(`${import_chalk.default.cyan("Promoted")} to production ${import_chalk.default.gray(promoteStamp())}`)}catch(e){let err=e;output_manager_default.error(`Failed to promote to production: ${err.message||"Unknown error"}`)}}}else hadExistingStagingVersion&&output_manager_default.warn(`There are other staged changes. Review with ${import_chalk.default.cyan(withGlobalFlags2(client,"routes list --diff"))} before promoting.`)}function printDiffSummary(routes,maxDisplay=10){let displayRoutes=routes.slice(0,maxDisplay);for(let route of displayRoutes){let symbol=getDiffSymbol(route),label=getDiffLabel(route),routeType=getRouteTypeLabel(route);output_manager_default.print(` ${symbol} ${route.name}${routeType!=="-"?` ${import_chalk.default.gray(`(${routeType})`)}`:""} ${import_chalk.default.gray(`- ${label}`)}
12
+ `)}routes.length>maxDisplay&&output_manager_default.print(import_chalk.default.gray(`
13
+ ... and ${routes.length-maxDisplay} more changes
14
+ `))}function getDiffSymbol(route){return route.action==="+"?import_chalk.default.green("+"):route.action==="-"?import_chalk.default.red("-"):import_chalk.default.yellow("~")}function getDiffLabel(route){return route.action==="+"?"Added":route.action==="-"?"Deleted":route.previousIndex!==void 0&&route.newIndex!==void 0?`Reordered (${route.previousIndex+1} \u2192 ${route.newIndex+1})`:route.previousEnabled!==void 0?route.enabled===!1?"Disabled":"Enabled":"Modified"}async function resolveRoute(client,routes,identifier){let byId=routes.find(r=>r.id===identifier);if(byId)return byId;let query=identifier.toLowerCase(),matches=routes.filter(r=>r.name.toLowerCase()===query||r.name.toLowerCase().includes(query)||r.id.toLowerCase().includes(query));if(matches.length===0)return null;if(matches.length===1)return matches[0];if(client.nonInteractive)return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.AMBIGUOUS_ROUTE,message:`Multiple routes match "${identifier}" (${matches.length} matches). Pass an exact route name or ID.`,next:[{command:withGlobalFlags2(client,"routes list"),when:"list routes to get exact id"}]},1),null;let selectedId=await client.input.select({message:`Multiple routes match "${identifier}". Select one:`,choices:matches.map(route=>({value:route.id,name:`${route.name} ${import_chalk.default.gray(`(${route.route.src})`)}`}))});return matches.find(r=>r.id===selectedId)??null}async function resolveRoutes(client,routes,identifiers){let resolved=new Map;for(let identifier of identifiers){let route=await resolveRoute(client,routes,identifier);if(!route)return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_FOUND,message:`No route found matching "${identifier}".`,next:[{command:withGlobalFlags2(client,"routes list"),when:"list routes"}]},1),null):(output_manager_default.error(`No route found matching "${identifier}". Run ${import_chalk.default.cyan(withGlobalFlags2(client,"routes list"))} to see all routes.`),null);resolved.set(route.id,route)}return Array.from(resolved.values())}function findVersionById(client,versions,identifier){let matchingVersions=versions.filter(v=>v.id.startsWith(identifier));return matchingVersions.length===0?{error:`Version "${identifier}" not found. Run ${import_chalk.default.cyan(withGlobalFlags2(client,"routes list-versions"))} to see available versions.`}:matchingVersions.length>1?{error:`Multiple versions match "${identifier}". Please provide a more specific ID:
15
+ ${matchingVersions.map(v=>` ${v.id}`).join(`
16
+ `)}`}:{version:matchingVersions[0]}}async function getRoutes(client,projectId,options={}){let{teamId,search,filter,versionId,diff}=options,query=new URLSearchParams;teamId&&query.set("teamId",teamId),search&&query.set("q",search),filter&&query.set("filter",filter),versionId&&query.set("versionId",versionId),diff&&query.set("diff","true");let queryString=query.toString(),url=`/v1/projects/${projectId}/routes${queryString?`?${queryString}`:""}`;return await client.fetch(url)}export{getRouteTypeLabel,getSrcSyntaxLabel,isTargetTransform,withGlobalFlags2 as withGlobalFlags,shellQuoteRouteIdentifierForSuggestion,parseSubcommandArgs,confirmAction,formatCondition,TRANSFORM_TYPE_LABELS,formatTransform,parsePosition,offerAutoPromote,printDiffSummary,resolveRoute,resolveRoutes,findVersionById,getRoutes};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{sleep}from"./chunk-4N6LMERQ.js";import{output_manager_default}from"./chunk-XP3FT56R.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);async function createDeploymentProtectionToken(client,projectId,orgId){if(!client.authConfig.token)throw output_manager_default.debug("No auth token available, skipping deployment protection token"),new Error("Authentication required to create protection bypass token");try{let response=await client.fetch(`/v1/projects/${projectId}/protection-bypass`,{method:"PATCH",body:"{}",headers:{"Content-Type":"application/json"},accountId:orgId}),{protectionBypass}=response;return output_manager_default.log("You require a deployment protection bypass token to access this deployment... Generating one now..."),output_manager_default.log(`Successfully generated deployment protection bypass token for project ${import_chalk.default.bold(projectId)}
8
+ `),output_manager_default.debug(`Protection Bypass Response: ${protectionBypass}`),await sleep(1e3),getAutomationBypassToken(protectionBypass)}catch(error){throw output_manager_default.debug(`Failed to generate deployment protection bypass token: ${error}`),output_manager_default.note('To bypass deployment protection, create a "Protection Bypass for Automation" secret in your project settings:'),output_manager_default.log(` 1. Visit ${import_chalk.default.cyan("https://vercel.com/dashboard")}`),output_manager_default.log(" 2. Go to your project settings \u2192 Deployment Protection"),output_manager_default.log(' 3. Generate a "Protection Bypass for Automation" secret'),output_manager_default.log(` 4. Use it with ${import_chalk.default.cyan("--protection-bypass")} flag or set ${import_chalk.default.cyan("VERCEL_AUTOMATION_BYPASS_SECRET")} env var`),output_manager_default.log(""),new Error("Failed to create deployment protection bypass token")}}function getAutomationBypassToken(protectionBypass){if(!protectionBypass)throw new Error("No protection bypass tokens found");let token=Object.keys(protectionBypass).find(key=>protectionBypass[key].scope==="automation-bypass");if(!token)throw new Error("No automation bypass token found in protection bypass settings");return token}async function getOrCreateDeploymentProtectionToken(client,{project,org},{createIfMissing=!0}={}){if(process.env.VERCEL_AUTOMATION_BYPASS_SECRET)return output_manager_default.debug("Using protection bypass secret from environment variable"),process.env.VERCEL_AUTOMATION_BYPASS_SECRET;if(project.protectionBypass&&Object.values(project.protectionBypass).length){let protectionBypass;try{protectionBypass=getAutomationBypassToken(project.protectionBypass)}catch(error){if(!createIfMissing)return output_manager_default.debug(`No existing automation bypass token found for project ${project.id}`),null;throw error}if(protectionBypass)return output_manager_default.debug(`Using existing protection bypass token from project settings: ${protectionBypass}`),protectionBypass}return createIfMissing?await createDeploymentProtectionToken(client,project.id,org.id):(output_manager_default.debug(`Not creating an automation bypass token for project ${project.id}`),null)}export{getOrCreateDeploymentProtectionToken};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{__commonJS}from"./chunk-BZENIQ7N.js";var require_fast_deep_equal=__commonJS({"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports,module){"use strict";module.exports=function equal(a,b){if(a===b)return!0;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return!1;var length,i,keys;if(Array.isArray(a)){if(length=a.length,length!=b.length)return!1;for(i=length;i--!==0;)if(!equal(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if(keys=Object.keys(a),length=keys.length,length!==Object.keys(b).length)return!1;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;i--!==0;){var key=keys[i];if(!equal(a[key],b[key]))return!1}return!0}return a!==a&&b!==b}}});export{require_fast_deep_equal};
@@ -0,0 +1,23 @@
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{esm_default,onExit,require_cli_width,require_lib,require_wrap_ansi}from"./chunk-SACGQMVQ.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{require_cli_spinners}from"./chunk-2GHZGOWT.js";import{require_ansi_escapes}from"./chunk-YHPPP3SF.js";import{require_supports_color}from"./chunk-ISWW3DKF.js";import{require_ansi_styles}from"./chunk-BRQUZ5NC.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_util=__commonJS({"../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports,module){"use strict";var stringReplaceAll=(string,substring,replacer)=>{let index=string.indexOf(substring);if(index===-1)return string;let substringLength=substring.length,endIndex=0,returnValue="";do returnValue+=string.substr(endIndex,index-endIndex)+substring+replacer,endIndex=index+substringLength,index=string.indexOf(substring,endIndex);while(index!==-1);return returnValue+=string.substr(endIndex),returnValue},stringEncaseCRLFWithFirstIndex=(string,prefix,postfix,index)=>{let endIndex=0,returnValue="";do{let gotCR=string[index-1]==="\r";returnValue+=string.substr(endIndex,(gotCR?index-1:index)-endIndex)+prefix+(gotCR?`\r
8
+ `:`
9
+ `)+postfix,endIndex=index+1,index=string.indexOf(`
10
+ `,endIndex)}while(index!==-1);return returnValue+=string.substr(endIndex),returnValue};module.exports={stringReplaceAll,stringEncaseCRLFWithFirstIndex}}});var require_templates=__commonJS({"../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports,module){"use strict";var TEMPLATE_REGEX=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,STYLE_REGEX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,STRING_REGEX=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ESCAPE_REGEX=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,ESCAPES=new Map([["n",`
11
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function unescape(c){let u=c[0]==="u",bracket=c[1]==="{";return u&&!bracket&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):u&&bracket?String.fromCodePoint(parseInt(c.slice(2,-1),16)):ESCAPES.get(c)||c}function parseArguments(name,arguments_){let results=[],chunks=arguments_.trim().split(/\s*,\s*/g),matches;for(let chunk of chunks){let number=Number(chunk);if(!Number.isNaN(number))results.push(number);else if(matches=chunk.match(STRING_REGEX))results.push(matches[2].replace(ESCAPE_REGEX,(m,escape,character)=>escape?unescape(escape):character));else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`)}return results}function parseStyle(style){STYLE_REGEX.lastIndex=0;let results=[],matches;for(;(matches=STYLE_REGEX.exec(style))!==null;){let name=matches[1];if(matches[2]){let args=parseArguments(name,matches[2]);results.push([name].concat(args))}else results.push([name])}return results}function buildStyle(chalk3,styles){let enabled={};for(let layer of styles)for(let style of layer.styles)enabled[style[0]]=layer.inverse?null:style.slice(1);let current=chalk3;for(let[styleName,styles2]of Object.entries(enabled))if(Array.isArray(styles2)){if(!(styleName in current))throw new Error(`Unknown Chalk style: ${styleName}`);current=styles2.length>0?current[styleName](...styles2):current[styleName]}return current}module.exports=(chalk3,temporary)=>{let styles=[],chunks=[],chunk=[];if(temporary.replace(TEMPLATE_REGEX,(m,escapeCharacter,inverse,style,close,character)=>{if(escapeCharacter)chunk.push(unescape(escapeCharacter));else if(style){let string=chunk.join("");chunk=[],chunks.push(styles.length===0?string:buildStyle(chalk3,styles)(string)),styles.push({inverse,styles:parseStyle(style)})}else if(close){if(styles.length===0)throw new Error("Found extraneous } in Chalk template literal");chunks.push(buildStyle(chalk3,styles)(chunk.join(""))),chunk=[],styles.pop()}else chunk.push(character)}),chunks.push(chunk.join("")),styles.length>0){let errMessage=`Chalk template literal is missing ${styles.length} closing bracket${styles.length===1?"":"s"} (\`}\`)`;throw new Error(errMessage)}return chunks.join("")}}});var require_source=__commonJS({"../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports,module){"use strict";var ansiStyles=require_ansi_styles(),{stdout:stdoutColor,stderr:stderrColor}=require_supports_color(),{stringReplaceAll,stringEncaseCRLFWithFirstIndex}=require_util(),{isArray}=Array,levelMapping=["ansi","ansi","ansi256","ansi16m"],styles=Object.create(null),applyOptions=(object,options={})=>{if(options.level&&!(Number.isInteger(options.level)&&options.level>=0&&options.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let colorLevel=stdoutColor?stdoutColor.level:0;object.level=options.level===void 0?colorLevel:options.level},ChalkClass=class{constructor(options){return chalkFactory(options)}},chalkFactory=options=>{let chalk4={};return applyOptions(chalk4,options),chalk4.template=(...arguments_)=>chalkTag(chalk4.template,...arguments_),Object.setPrototypeOf(chalk4,Chalk.prototype),Object.setPrototypeOf(chalk4.template,chalk4),chalk4.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},chalk4.template.Instance=ChalkClass,chalk4.template};function Chalk(options){return chalkFactory(options)}for(let[styleName,style]of Object.entries(ansiStyles))styles[styleName]={get(){let builder=createBuilder(this,createStyler(style.open,style.close,this._styler),this._isEmpty);return Object.defineProperty(this,styleName,{value:builder}),builder}};styles.visible={get(){let builder=createBuilder(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:builder}),builder}};var usedModels=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let model of usedModels)styles[model]={get(){let{level}=this;return function(...arguments_){let styler=createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_),ansiStyles.color.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}};for(let model of usedModels){let bgModel="bg"+model[0].toUpperCase()+model.slice(1);styles[bgModel]={get(){let{level}=this;return function(...arguments_){let styler=createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_),ansiStyles.bgColor.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}}}var proto=Object.defineProperties(()=>{},{...styles,level:{enumerable:!0,get(){return this._generator.level},set(level){this._generator.level=level}}}),createStyler=(open,close,parent)=>{let openAll,closeAll;return parent===void 0?(openAll=open,closeAll=close):(openAll=parent.openAll+open,closeAll=close+parent.closeAll),{open,close,openAll,closeAll,parent}},createBuilder=(self,_styler,_isEmpty)=>{let builder=(...arguments_)=>isArray(arguments_[0])&&isArray(arguments_[0].raw)?applyStyle(builder,chalkTag(builder,...arguments_)):applyStyle(builder,arguments_.length===1?""+arguments_[0]:arguments_.join(" "));return Object.setPrototypeOf(builder,proto),builder._generator=self,builder._styler=_styler,builder._isEmpty=_isEmpty,builder},applyStyle=(self,string)=>{if(self.level<=0||!string)return self._isEmpty?"":string;let styler=self._styler;if(styler===void 0)return string;let{openAll,closeAll}=styler;if(string.indexOf("\x1B")!==-1)for(;styler!==void 0;)string=stringReplaceAll(string,styler.close,styler.open),styler=styler.parent;let lfIndex=string.indexOf(`
12
+ `);return lfIndex!==-1&&(string=stringEncaseCRLFWithFirstIndex(string,closeAll,openAll,lfIndex)),openAll+string+closeAll},template,chalkTag=(chalk4,...strings)=>{let[firstString]=strings;if(!isArray(firstString)||!isArray(firstString.raw))return strings.join(" ");let arguments_=strings.slice(1),parts=[firstString.raw[0]];for(let i=1;i<firstString.length;i++)parts.push(String(arguments_[i-1]).replace(/[{}\\]/g,"\\$&"),String(firstString.raw[i]));return template===void 0&&(template=require_templates()),template(chalk4,parts.join(""))};Object.defineProperties(Chalk.prototype,styles);var chalk3=Chalk();chalk3.supportsColor=stdoutColor;chalk3.stderr=Chalk({level:stderrColor?stderrColor.level:0});chalk3.stderr.supportsColor=stderrColor;module.exports=chalk3}});var isUpKey=key=>key.name==="up"||key.name==="k"||key.ctrl&&key.name==="p",isDownKey=key=>key.name==="down"||key.name==="j"||key.ctrl&&key.name==="n",isSpaceKey=key=>key.name==="space",isBackspaceKey=key=>key.name==="backspace",isNumberKey=key=>"123456789".includes(key.name),isEnterKey=key=>key.name==="enter"||key.name==="return";var CancelPromptError=class extends Error{message="Prompt was canceled"},ExitPromptError=class extends Error{},HookError=class extends Error{},ValidationError=class extends Error{};import{AsyncLocalStorage,AsyncResource}from"node:async_hooks";var hookStorage=new AsyncLocalStorage;function createStore(rl){return{rl,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function withHooks(rl,cb){let store=createStore(rl);return hookStorage.run(store,()=>{cb(store)})}function getStore(){let store=hookStorage.getStore();if(!store)throw new HookError("[Inquirer] Hook functions can only be called from within a prompt");return store}function readline(){return getStore().rl}function withUpdates(fn){let wrapped=(...args)=>{let store=getStore(),shouldUpdate=!1,oldHandleChange=store.handleChange;store.handleChange=()=>{shouldUpdate=!0};let returnValue=fn(...args);return shouldUpdate&&oldHandleChange(),store.handleChange=oldHandleChange,returnValue};return AsyncResource.bind(wrapped)}function withPointer(cb){let store=getStore(),{index}=store,pointer={get(){return store.hooks[index]},set(value){store.hooks[index]=value},initialized:index in store.hooks},returnValue=cb(pointer);return store.index++,returnValue}function handleChange(){getStore().handleChange()}var effectScheduler={queue(cb){let store=getStore(),{index}=store;store.hooksEffect.push(()=>{store.hooksCleanup[index]?.();let cleanFn=cb(readline());if(cleanFn!=null&&typeof cleanFn!="function")throw new ValidationError("useEffect return value must be a cleanup function or nothing.");store.hooksCleanup[index]=cleanFn})},run(){let store=getStore();withUpdates(()=>{store.hooksEffect.forEach(effect=>{effect()}),store.hooksEffect.length=0})()}};function useState(defaultValue){return withPointer(pointer=>{let setFn=newValue=>{pointer.get()!==newValue&&(pointer.set(newValue),handleChange())};if(pointer.initialized)return[pointer.get(),setFn];let value=typeof defaultValue=="function"?defaultValue():defaultValue;return pointer.set(value),[value,setFn]})}var import_chalk=__toESM(require_source(),1),import_cli_spinners=__toESM(require_cli_spinners(),1),defaultTheme={prefix:import_chalk.default.green("?"),spinner:{interval:import_cli_spinners.default.dots.interval,frames:import_cli_spinners.default.dots.frames.map(frame=>import_chalk.default.yellow(frame))},style:{answer:import_chalk.default.cyan,message:import_chalk.default.bold,error:text=>import_chalk.default.red(`> ${text}`),defaultAnswer:text=>import_chalk.default.dim(`(${text})`),help:import_chalk.default.dim,highlight:import_chalk.default.cyan,key:text=>import_chalk.default.cyan.bold(`<${text}>`)}};function makeTheme(...themes){return Object.assign({},defaultTheme,...themes,{style:Object.assign({},defaultTheme.style,...themes.map(theme=>theme?.style))})}import{AsyncResource as AsyncResource2}from"node:async_hooks";function useEffect(cb,depArray){withPointer(pointer=>{let oldDeps=pointer.get();(!Array.isArray(oldDeps)||depArray.some((dep,i)=>!Object.is(dep,oldDeps[i])))&&effectScheduler.queue(cb),pointer.set(depArray)})}function usePrefix({isLoading=!1,theme}){let[tick,setTick]=useState(0),{prefix,spinner}=makeTheme(theme);if(useEffect(()=>{if(isLoading){let timeout=setTimeout(AsyncResource2.bind(()=>{setTick(tick+1)}),spinner.interval);return()=>clearTimeout(timeout)}},[isLoading,tick]),isLoading){let frame=tick%spinner.frames.length;return spinner.frames[frame]}return prefix}function useMemo(fn,dependencies){return withPointer(pointer=>{let prev=pointer.get();if(!prev||prev.dependencies.length!==dependencies.length||prev.dependencies.some((dep,i)=>dep!==dependencies[i])){let value=fn();return pointer.set({value,dependencies}),value}return prev.value})}function useRef(val){return useState({current:val})[0]}function useKeypress(userHandler){let signal=useRef(userHandler);signal.current=userHandler,useEffect(rl=>{let handler=withUpdates((_input,event)=>{signal.current(event,rl)});return rl.input.on("keypress",handler),()=>{rl.input.removeListener("keypress",handler)}},[])}var import_cli_width=__toESM(require_cli_width(),1),import_wrap_ansi=__toESM(require_wrap_ansi(),1);function breakLines(content,width){return content.split(`
13
+ `).flatMap(line=>(0,import_wrap_ansi.default)(line,width,{trim:!1,hard:!0}).split(`
14
+ `).map(str=>str.trimEnd())).join(`
15
+ `)}function readlineWidth(){return(0,import_cli_width.default)({defaultWidth:80,output:readline().output})}function split(content,width){return breakLines(content,width).split(`
16
+ `)}function rotate(count,items){let max=items.length,offset=(count%max+max)%max;return items.slice(offset).concat(items.slice(0,offset))}function lines({items,width,renderItem,active,position:requested,pageSize}){let layouts=items.map((item,index)=>({item,index,isActive:index===active})),layoutsInPage=rotate(active-requested,layouts).slice(0,pageSize),renderItemAt=index=>split(renderItem(layoutsInPage[index]),width),pageBuffer=new Array(pageSize),activeItem=renderItemAt(requested).slice(0,pageSize),position=requested+activeItem.length<=pageSize?requested:pageSize-activeItem.length;pageBuffer.splice(position,activeItem.length,...activeItem);let bufferPointer=position+activeItem.length,layoutPointer=requested+1;for(;bufferPointer<pageSize&&layoutPointer<layoutsInPage.length;){for(let line of renderItemAt(layoutPointer))if(pageBuffer[bufferPointer++]=line,bufferPointer>=pageSize)break;layoutPointer++}for(bufferPointer=position-1,layoutPointer=requested-1;bufferPointer>=0&&layoutPointer>=0;){for(let line of renderItemAt(layoutPointer).reverse())if(pageBuffer[bufferPointer--]=line,bufferPointer<0)break;layoutPointer--}return pageBuffer.filter(line=>typeof line=="string")}function finite({active,pageSize,total}){let middle=Math.floor(pageSize/2);return total<=pageSize||active<middle?active:active>=total-middle?active+pageSize-total:middle}function infinite({active,lastActive,total,pageSize,pointer}){return total<=pageSize?active:lastActive<active&&active-lastActive<pageSize?Math.min(Math.floor(pageSize/2),pointer+active-lastActive):pointer}function usePagination({items,active,renderItem,pageSize,loop=!0,theme:defaultTheme2}){let state=useRef({position:0,lastActive:0}),theme=makeTheme(defaultTheme2),position=loop?infinite({active,lastActive:state.current.lastActive,total:items.length,pageSize,pointer:state.current.position}):finite({active,total:items.length,pageSize});state.current.position=position,state.current.lastActive=active;let visibleLines=lines({items,width:readlineWidth(),renderItem,active,position,pageSize}).join(`
17
+ `);return items.length>pageSize?`${visibleLines}
18
+ ${theme.style.help("(Use arrow keys to reveal more choices)")}`:visibleLines}import*as readline2 from"node:readline";var CancelablePromise=class _CancelablePromise extends Promise{cancel=()=>{};static withResolver(){let resolve,reject;return{promise:new _CancelablePromise((res,rej)=>{resolve=res,reject=rej}),resolve,reject}}};var import_mute_stream=__toESM(require_lib(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1),import_ansi_escapes=__toESM(require_ansi_escapes(),1);var height=content=>content.split(`
19
+ `).length,lastLine=content=>content.split(`
20
+ `).pop()??"",ScreenManager=class{rl;height=0;extraLinesUnderPrompt=0;cursorPos;constructor(rl){this.rl=rl,this.rl=rl,this.cursorPos=rl.getCursorPos()}render(content,bottomContent=""){let promptLine=lastLine(content),rawPromptLine=(0,import_strip_ansi.default)(promptLine),prompt=rawPromptLine;this.rl.line.length&&(prompt=prompt.slice(0,-this.rl.line.length)),this.rl.setPrompt(prompt),this.cursorPos=this.rl.getCursorPos();let width=readlineWidth();content=breakLines(content,width),bottomContent=breakLines(bottomContent,width),rawPromptLine.length%width===0&&(content+=`
21
+ `);let output=content+(bottomContent?`
22
+ `+bottomContent:""),bottomContentHeight=Math.floor(rawPromptLine.length/width)-this.cursorPos.rows+(bottomContent?height(bottomContent):0);bottomContentHeight>0&&(output+=import_ansi_escapes.default.cursorUp(bottomContentHeight)),output+=import_ansi_escapes.default.cursorTo(this.cursorPos.cols),this.clean(),this.rl.output.unmute(),this.extraLinesUnderPrompt=bottomContentHeight,this.height=height(output),this.rl.output.write(output),this.rl.output.mute()}checkCursorPos(){let cursorPos=this.rl.getCursorPos();cursorPos.cols!==this.cursorPos.cols&&(this.rl.output.unmute(),this.rl.output.write(import_ansi_escapes.default.cursorTo(cursorPos.cols)),this.rl.output.mute(),this.cursorPos=cursorPos)}clean(){this.rl.output.unmute(),this.rl.output.write([this.extraLinesUnderPrompt>0?import_ansi_escapes.default.cursorDown(this.extraLinesUnderPrompt):"",import_ansi_escapes.default.eraseLines(this.height)].join("")),this.extraLinesUnderPrompt=0,this.rl.output.mute()}clearContent(){this.rl.output.unmute(),this.rl.output.write([this.extraLinesUnderPrompt>0?import_ansi_escapes.default.cursorDown(this.extraLinesUnderPrompt):"",`
23
+ `].join("")),this.rl.output.mute()}done(){this.rl.setPrompt(""),this.rl.output.unmute(),this.rl.output.write(import_ansi_escapes.default.cursorShow),this.rl.output.end(),this.rl.close()}};function createPrompt(view){return(config,context)=>{let input=context?.input??process.stdin,output=new import_mute_stream.default;output.pipe(context?.output??process.stdout);let rl=readline2.createInterface({terminal:!0,input,output}),screen=new ScreenManager(rl),cancel=()=>{},answer=new CancelablePromise((resolve,reject)=>{withHooks(rl,store=>{function checkCursorPos(){screen.checkCursorPos()}let removeExitListener=onExit((code,signal)=>{onExit2(),reject(new ExitPromptError(`User force closed the prompt with ${code} ${signal}`))});function onExit2(){try{store.hooksCleanup.forEach(cleanFn=>{cleanFn?.()})}catch(err){reject(err)}context?.clearPromptOnDone?screen.clean():screen.clearContent(),screen.done(),removeExitListener(),store.rl.input.removeListener("keypress",checkCursorPos)}cancel=()=>{onExit2(),reject(new CancelPromptError)};function done(value){setImmediate(()=>{onExit2(),resolve(value)})}function workLoop(resolvedConfig){store.index=0,store.handleChange=()=>workLoop(resolvedConfig);try{let nextView=view(config,done),[content,bottomContent]=typeof nextView=="string"?[nextView]:nextView;screen.render(content,bottomContent),effectScheduler.run()}catch(err){onExit2(),reject(err)}}workLoop(config),store.rl.input.on("keypress",checkCursorPos)})});return answer.cancel=cancel,answer}}var import_chalk2=__toESM(require_source(),1);var Separator=class{separator=import_chalk2.default.dim(new Array(15).join(esm_default.line));type="separator";constructor(separator){separator&&(this.separator=separator)}static isSeparator(choice){return!!(choice&&choice.type==="separator")}};export{isUpKey,isDownKey,isSpaceKey,isBackspaceKey,isNumberKey,isEnterKey,ValidationError,useState,require_source,makeTheme,usePrefix,useMemo,useRef,useKeypress,usePagination,createPrompt,Separator};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{__commonJS}from"./chunk-BZENIQ7N.js";var require_ms=__commonJS({"../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports,module){var s=1e3,m=s*60,h=m*60,d=h*24,w=d*7,y=d*365.25;module.exports=function(val,options){options=options||{};var type=typeof val;if(type==="string"&&val.length>0)return parse(val);if(type==="number"&&isFinite(val))return options.long?fmtLong(val):fmtShort(val);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(val))};function parse(str){if(str=String(str),!(str.length>100)){var match=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);if(match){var n=parseFloat(match[1]),type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"weeks":case"week":case"w":return n*w;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function fmtShort(ms){var msAbs=Math.abs(ms);return msAbs>=d?Math.round(ms/d)+"d":msAbs>=h?Math.round(ms/h)+"h":msAbs>=m?Math.round(ms/m)+"m":msAbs>=s?Math.round(ms/s)+"s":ms+"ms"}function fmtLong(ms){var msAbs=Math.abs(ms);return msAbs>=d?plural(ms,msAbs,d,"day"):msAbs>=h?plural(ms,msAbs,h,"hour"):msAbs>=m?plural(ms,msAbs,m,"minute"):msAbs>=s?plural(ms,msAbs,s,"second"):ms+" ms"}function plural(ms,msAbs,n,name){var isPlural=msAbs>=n*1.5;return Math.round(ms/n)+" "+name+(isPlural?"s":"")}}});export{require_ms};
@@ -0,0 +1,9 @@
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{getDeployment}from"./chunk-R6BEOVTU.js";import{getScope}from"./chunk-K5U47EVH.js";import{require_dist}from"./chunk-4N6LMERQ.js";import{toNodeReadable}from"./chunk-FUX6LKNP.js";import{output_manager_default}from"./chunk-XP3FT56R.js";import{require_ansi_escapes}from"./chunk-YHPPP3SF.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_parser=__commonJS({"../../node_modules/.pnpm/jsonlines@0.1.1/node_modules/jsonlines/lib/parser.js"(exports,module){var Transform=__require("stream").Transform;function Parser(options){if(!(this instanceof Parser))throw new TypeError("Cannot call a class as a function");options=options||{},Transform.call(this,{objectMode:!0}),this._memory="",this._emitInvalidLines=options.emitInvalidLines||!1}Parser.prototype=Object.create(Transform.prototype);Parser.prototype._handleLines=function(lines,cb){for(var i=0;i<lines.length;i++)if(lines[i]!==""){var err=null,json=null;try{json=JSON.parse(lines[i])}catch(_err){_err.source=lines[i],err=_err}if(err)if(this._emitInvalidLines)this.emit("invalid-line",err);else return cb(err);else this.push(json)}cb(null)};Parser.prototype._transform=function(chunk,encoding,cb){var lines=(this._memory+chunk.toString()).split(`
8
+ `);this._memory=lines.pop(),this._handleLines(lines,cb)};Parser.prototype._flush=function(cb){if(!this._memory)return cb(null);var line=this._memory;this._memory="",this._handleLines([line],cb)};module.exports=Parser}});var require_stringifier=__commonJS({"../../node_modules/.pnpm/jsonlines@0.1.1/node_modules/jsonlines/lib/stringifier.js"(exports,module){var Transform=__require("stream").Transform;function Stringifier(){if(!(this instanceof Stringifier))throw new TypeError("Cannot call a class as a function");Transform.call(this,{objectMode:!0})}Stringifier.prototype=Object.create(Transform.prototype);Stringifier.prototype._transform=function(data,_,cb){var value;try{value=JSON.stringify(data)}catch(err){return err.source=data,cb(err)}cb(null,value+`
9
+ `)};module.exports=Stringifier}});var require_jsonlines=__commonJS({"../../node_modules/.pnpm/jsonlines@0.1.1/node_modules/jsonlines/index.js"(exports){var Parser=require_parser(),Stringifier=require_stringifier();exports.parse=function(options){return new Parser(options)};exports.stringify=function(){return new Stringifier}}});var import_async_retry=__toESM(require_dist(),1),import_jsonlines=__toESM(require_jsonlines(),1),import_ansi_escapes=__toESM(require_ansi_escapes(),1);import{URLSearchParams}from"url";async function printEvents(client,urlOrDeploymentId,{mode,onEvent,onAliasAssigned,quiet,findOpts},abortController){let{log,debug}=output_manager_default,scope=mode==="deploy"?await getScope(client):null,o=0;await(0,import_async_retry.default)(async(bail,attemptNumber)=>{if(abortController?.signal.aborted)return;attemptNumber>1&&debug("Retrying events");let query=new URLSearchParams({direction:findOpts.direction,follow:findOpts.follow?"1":"",format:"lines"});findOpts.limit&&query.set("limit",String(findOpts.limit)),findOpts.since&&query.set("since",String(findOpts.since)),findOpts.until&&query.set("until",String(findOpts.until));let eventsUrl=`/v3/now/deployments/${urlOrDeploymentId}/events?${query}`;try{let eventsRes=await client.fetch(eventsUrl,{json:!1,signal:abortController?.signal});if(eventsRes.ok){let readable=toNodeReadable(eventsRes.body);return new Promise((resolve,reject)=>{let stream=readable.pipe(import_jsonlines.default.parse()),poller;mode==="deploy"&&(poller=function startPoller(){return setTimeout(async()=>{try{if((await getDeployment(client,scope.contextName,urlOrDeploymentId)).readyState==="READY"){stream.end(),finish();return}poller=startPoller()}catch(err2){stream.end(),finish(err2)}},5e3)}());let finishCalled=!1;function finish(err2){finishCalled||(finishCalled=!0,clearTimeout(poller),err2?reject(err2):resolve())}let latestLogDate=0,onData=data=>{if(data.type==="alias-assigned"){data.deploymentId===urlOrDeploymentId&&onAliasAssigned?.(data);return}let{event,payload,date}=data;event==="state"&&payload.value==="READY"?mode==="deploy"&&(stream.end(),finish()):(latestLogDate=Math.max(latestLogDate,date),onEvent(data))},onErrorCalled=!1,onError=err2=>{if(finishCalled||onErrorCalled)return;if(err2.name==="AbortError"){finish();return}onErrorCalled=!0,o++;let errorMessage=`Deployment event stream error: ${err2.message}`;if(!findOpts.follow){log(errorMessage);return}debug(errorMessage),clearTimeout(poller),stream.destroy(err2);let retryFindOpts={...findOpts,since:latestLogDate},retryTimeout=setTimeout(()=>{abortController?.signal.removeEventListener("abort",onAbort),!abortController?.signal.aborted&&printEvents(client,urlOrDeploymentId,{mode,onEvent,onAliasAssigned,quiet,findOpts:retryFindOpts},abortController).then(resolve,reject)},2e3);onAliasAssigned&&retryTimeout.unref?.();let onAbort=()=>{clearTimeout(retryTimeout),finish()};abortController?.signal.addEventListener("abort",onAbort,{once:!0})};stream.on("end",finish),stream.on("data",onData),stream.on("error",onError),readable.on("error",onError)})}let err=new Error(`Deployment events status ${eventsRes.status}`);if(eventsRes.status<500)bail(err);else throw err}catch(err){if(err instanceof Error&&err.name==="AbortError")return;throw err}},{retries:4,unref:!!onAliasAssigned,onRetry:err=>{!quiet&&o&&(process.stdout.write((0,import_ansi_escapes.eraseLines)(o+1)),o=0),log(`Deployment events polling error: ${err.message}`)}})}var events_default=printEvents;export{events_default};