@vercel/cli-support 0.0.0 → 65.3.1

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-5YZQTIQM.js +8 -0
  4. package/dist/chunks/add-A524QQ2H.js +8 -0
  5. package/dist/chunks/add-V4JMUHKO.js +8 -0
  6. package/dist/chunks/build-K2PVDJZ4.js +7 -0
  7. package/dist/chunks/chunk-22FDWPWY.js +7 -0
  8. package/dist/chunks/chunk-25565AGS.js +7 -0
  9. package/dist/chunks/chunk-2ACMWVTB.js +12 -0
  10. package/dist/chunks/chunk-2EYYB6YN.js +7 -0
  11. package/dist/chunks/chunk-2GHZGOWT.js +7 -0
  12. package/dist/chunks/chunk-2H3SB5RP.js +9 -0
  13. package/dist/chunks/chunk-2NABMKFV.js +29 -0
  14. package/dist/chunks/chunk-2PKEEQ5W.js +25 -0
  15. package/dist/chunks/chunk-2S6PE6GB.js +7 -0
  16. package/dist/chunks/chunk-2U7DJZSQ.js +21 -0
  17. package/dist/chunks/chunk-2WYYGGEO.js +7 -0
  18. package/dist/chunks/chunk-3ADDGPEN.js +7 -0
  19. package/dist/chunks/chunk-3AYYFYZG.js +7 -0
  20. package/dist/chunks/chunk-3G3FQYMW.js +7 -0
  21. package/dist/chunks/chunk-3JGBBS6V.js +7 -0
  22. package/dist/chunks/chunk-3KKFLKQG.js +7 -0
  23. package/dist/chunks/chunk-3LIKVGFT.js +8 -0
  24. package/dist/chunks/chunk-3XW7N4W3.js +9 -0
  25. package/dist/chunks/chunk-43GBAKL2.js +86 -0
  26. package/dist/chunks/chunk-4CACOKMS.js +7 -0
  27. package/dist/chunks/chunk-4NTBYNFR.js +17 -0
  28. package/dist/chunks/chunk-4SAVH3H7.js +7 -0
  29. package/dist/chunks/chunk-4UGHFESV.js +8 -0
  30. package/dist/chunks/chunk-4VFYJU37.js +7 -0
  31. package/dist/chunks/chunk-5IASAERQ.js +7 -0
  32. package/dist/chunks/chunk-5RMIM4S2.js +7 -0
  33. package/dist/chunks/chunk-67GZ5REA.js +7 -0
  34. package/dist/chunks/chunk-6IDNVZZR.js +7 -0
  35. package/dist/chunks/chunk-6ISAISGD.js +16 -0
  36. package/dist/chunks/chunk-6KVHNQW4.js +17 -0
  37. package/dist/chunks/chunk-6OVX3PWM.js +7 -0
  38. package/dist/chunks/chunk-6QKS6QK7.js +7 -0
  39. package/dist/chunks/chunk-6VH56CX2.js +19 -0
  40. package/dist/chunks/chunk-6Y2ZL5XJ.js +98 -0
  41. package/dist/chunks/chunk-76KGQU2G.js +7 -0
  42. package/dist/chunks/chunk-76SVVWPH.js +7 -0
  43. package/dist/chunks/chunk-773GOZIR.js +13 -0
  44. package/dist/chunks/chunk-7BGKE3JW.js +10 -0
  45. package/dist/chunks/chunk-7EJQLVWX.js +7 -0
  46. package/dist/chunks/chunk-7HV7O6DM.js +7 -0
  47. package/dist/chunks/chunk-7L2K4OKM.js +63 -0
  48. package/dist/chunks/chunk-7Y46LB43.js +14 -0
  49. package/dist/chunks/chunk-7YKFF6CE.js +7 -0
  50. package/dist/chunks/chunk-7Z3WUAO5.js +10 -0
  51. package/dist/chunks/chunk-A2RZZQEP.js +7 -0
  52. package/dist/chunks/chunk-ABZEMNDR.js +7 -0
  53. package/dist/chunks/chunk-ADLBLGT3.js +8 -0
  54. package/dist/chunks/chunk-AM46JVVN.js +7 -0
  55. package/dist/chunks/chunk-ANMDN3EG.js +9 -0
  56. package/dist/chunks/chunk-APZULWJC.js +8 -0
  57. package/dist/chunks/chunk-AWMQGOS2.js +7 -0
  58. package/dist/chunks/chunk-B4UE4LVE.js +7 -0
  59. package/dist/chunks/chunk-B4YYOSPY.js +7 -0
  60. package/dist/chunks/chunk-BBKEP7RO.js +7 -0
  61. package/dist/chunks/chunk-BL3HBRF6.js +12 -0
  62. package/dist/chunks/chunk-BLUPZPAS.js +7 -0
  63. package/dist/chunks/chunk-BPUANOGW.js +7 -0
  64. package/dist/chunks/chunk-BRQUZ5NC.js +7 -0
  65. package/dist/chunks/chunk-BS32OUOC.js +7 -0
  66. package/dist/chunks/chunk-BTI5TG6Q.js +7 -0
  67. package/dist/chunks/chunk-BUJITHGZ.js +8 -0
  68. package/dist/chunks/chunk-BVH2AEFE.js +7 -0
  69. package/dist/chunks/chunk-BZENIQ7N.js +7 -0
  70. package/dist/chunks/chunk-C6GY2G73.js +7 -0
  71. package/dist/chunks/chunk-CEMPU323.js +7 -0
  72. package/dist/chunks/chunk-COD3WAUI.js +7 -0
  73. package/dist/chunks/chunk-COM5YCHF.js +9 -0
  74. package/dist/chunks/chunk-CZSOZKHX.js +7 -0
  75. package/dist/chunks/chunk-D2BZMGHP.js +7 -0
  76. package/dist/chunks/chunk-D3AHZ5LI.js +7 -0
  77. package/dist/chunks/chunk-D6REP5QQ.js +15 -0
  78. package/dist/chunks/chunk-DFVNL5ML.js +7 -0
  79. package/dist/chunks/chunk-DGYHWXD2.js +10 -0
  80. package/dist/chunks/chunk-DUT4U5YY.js +7 -0
  81. package/dist/chunks/chunk-DWZBL4NK.js +7 -0
  82. package/dist/chunks/chunk-E2SADN6I.js +7 -0
  83. package/dist/chunks/chunk-E6CO6TUM.js +7 -0
  84. package/dist/chunks/chunk-EAUDC24V.js +9 -0
  85. package/dist/chunks/chunk-ECQIO5K3.js +7 -0
  86. package/dist/chunks/chunk-ETV3C2CV.js +7 -0
  87. package/dist/chunks/chunk-F2SWJEYV.js +8 -0
  88. package/dist/chunks/chunk-F4KY2TOK.js +7 -0
  89. package/dist/chunks/chunk-F53OKXYI.js +7 -0
  90. package/dist/chunks/chunk-F7AVGV4Y.js +7 -0
  91. package/dist/chunks/chunk-FBYA6LLM.js +7 -0
  92. package/dist/chunks/chunk-FDNYYENK.js +11 -0
  93. package/dist/chunks/chunk-FGFLTLEA.js +7 -0
  94. package/dist/chunks/chunk-FUX6LKNP.js +7 -0
  95. package/dist/chunks/chunk-G4T7VBGN.js +9 -0
  96. package/dist/chunks/chunk-GA277JFB.js +20 -0
  97. package/dist/chunks/chunk-GD7AV7BO.js +9 -0
  98. package/dist/chunks/chunk-GG5RME4X.js +7 -0
  99. package/dist/chunks/chunk-GHAY4PSD.js +7 -0
  100. package/dist/chunks/chunk-GVTXA6HG.js +7 -0
  101. package/dist/chunks/chunk-GYVJIIYL.js +7 -0
  102. package/dist/chunks/chunk-GZNDA6SV.js +8 -0
  103. package/dist/chunks/chunk-HCRD3JFL.js +7 -0
  104. package/dist/chunks/chunk-HEGJZJO7.js +7 -0
  105. package/dist/chunks/chunk-HRR57QNP.js +7 -0
  106. package/dist/chunks/chunk-IA3MXJRC.js +8 -0
  107. package/dist/chunks/chunk-ID663OJ7.js +7 -0
  108. package/dist/chunks/chunk-IEPW2YRH.js +7 -0
  109. package/dist/chunks/chunk-IGDG5CWT.js +7 -0
  110. package/dist/chunks/chunk-IKQTP764.js +7 -0
  111. package/dist/chunks/chunk-IQ7FPAI4.js +7 -0
  112. package/dist/chunks/chunk-IQKGQ2Y2.js +15 -0
  113. package/dist/chunks/chunk-ISWW3DKF.js +7 -0
  114. package/dist/chunks/chunk-IUXSJWL3.js +7 -0
  115. package/dist/chunks/chunk-IVSC7ZFJ.js +7 -0
  116. package/dist/chunks/chunk-IVSSTHB6.js +7 -0
  117. package/dist/chunks/chunk-J24BABG4.js +21 -0
  118. package/dist/chunks/chunk-JALVF3C2.js +7 -0
  119. package/dist/chunks/chunk-JELLVPCM.js +8 -0
  120. package/dist/chunks/chunk-JESNVRVR.js +7 -0
  121. package/dist/chunks/chunk-JLEJB6KM.js +7 -0
  122. package/dist/chunks/chunk-KH6565YH.js +8 -0
  123. package/dist/chunks/chunk-KNLGWGUE.js +57 -0
  124. package/dist/chunks/chunk-KRPY5FHJ.js +7 -0
  125. package/dist/chunks/chunk-KW6GSQXV.js +7 -0
  126. package/dist/chunks/chunk-L4NSF346.js +22 -0
  127. package/dist/chunks/chunk-LCHECISY.js +7 -0
  128. package/dist/chunks/chunk-LJBUJ23M.js +7 -0
  129. package/dist/chunks/chunk-LKLH6DZP.js +9 -0
  130. package/dist/chunks/chunk-LRYGNQ6C.js +8 -0
  131. package/dist/chunks/chunk-LSF7FY6X.js +7 -0
  132. package/dist/chunks/chunk-LSQREJXO.js +11 -0
  133. package/dist/chunks/chunk-LT3UK4K6.js +10 -0
  134. package/dist/chunks/chunk-LUBUI5GF.js +7 -0
  135. package/dist/chunks/chunk-MCRKBVZA.js +7 -0
  136. package/dist/chunks/chunk-MVGTMPMI.js +23 -0
  137. package/dist/chunks/chunk-MXTC4ZAQ.js +7 -0
  138. package/dist/chunks/chunk-NB2WLB3J.js +12 -0
  139. package/dist/chunks/chunk-NEFDNROD.js +7 -0
  140. package/dist/chunks/chunk-NQWGRKF4.js +7 -0
  141. package/dist/chunks/chunk-NTZ5WWYV.js +7 -0
  142. package/dist/chunks/chunk-NWGBDBZI.js +7 -0
  143. package/dist/chunks/chunk-NZ2TFADV.js +7 -0
  144. package/dist/chunks/chunk-OAM5NJCU.js +9 -0
  145. package/dist/chunks/chunk-OCQPXOTX.js +11 -0
  146. package/dist/chunks/chunk-OCR5CRTH.js +10 -0
  147. package/dist/chunks/chunk-OFDTADPQ.js +7 -0
  148. package/dist/chunks/chunk-OGPENBY2.js +7 -0
  149. package/dist/chunks/chunk-OKEBIUKZ.js +7 -0
  150. package/dist/chunks/chunk-OMCGXRSA.js +21 -0
  151. package/dist/chunks/chunk-OO572JUC.js +7 -0
  152. package/dist/chunks/chunk-OPORM35X.js +7 -0
  153. package/dist/chunks/chunk-OQCMRU3J.js +10 -0
  154. package/dist/chunks/chunk-OQPXJCMK.js +32 -0
  155. package/dist/chunks/chunk-OWOWPOIE.js +23 -0
  156. package/dist/chunks/chunk-PADL3C6Z.js +7 -0
  157. package/dist/chunks/chunk-PFD7LETF.js +7 -0
  158. package/dist/chunks/chunk-PFNYWWLI.js +7 -0
  159. package/dist/chunks/chunk-PFPJLIFF.js +33 -0
  160. package/dist/chunks/chunk-PSOVLGHP.js +7 -0
  161. package/dist/chunks/chunk-PUKYAALC.js +7 -0
  162. package/dist/chunks/chunk-PVASGBEF.js +7 -0
  163. package/dist/chunks/chunk-Q5ODLDCU.js +7 -0
  164. package/dist/chunks/chunk-Q7D7RGXM.js +7 -0
  165. package/dist/chunks/chunk-QB7F3UAP.js +7 -0
  166. package/dist/chunks/chunk-QHJLRTVY.js +7 -0
  167. package/dist/chunks/chunk-QMCHGGDX.js +10 -0
  168. package/dist/chunks/chunk-QZX7VG2V.js +9 -0
  169. package/dist/chunks/chunk-R6BEOVTU.js +7 -0
  170. package/dist/chunks/chunk-RLKS5G6C.js +12 -0
  171. package/dist/chunks/chunk-RM3ZDRYE.js +7 -0
  172. package/dist/chunks/chunk-RRDNKB2X.js +7 -0
  173. package/dist/chunks/chunk-RRREFECI.js +7 -0
  174. package/dist/chunks/chunk-RUXO73ON.js +7 -0
  175. package/dist/chunks/chunk-RW3X523R.js +8 -0
  176. package/dist/chunks/chunk-S3L2OHPO.js +7 -0
  177. package/dist/chunks/chunk-S4SJ7GIZ.js +7 -0
  178. package/dist/chunks/chunk-S5IWVPYT.js +32 -0
  179. package/dist/chunks/chunk-SACGQMVQ.js +13 -0
  180. package/dist/chunks/chunk-SCV7XEEO.js +7 -0
  181. package/dist/chunks/chunk-SF4E3AQ3.js +7 -0
  182. package/dist/chunks/chunk-SKYDLHEZ.js +7 -0
  183. package/dist/chunks/chunk-SLI2O5X7.js +63 -0
  184. package/dist/chunks/chunk-SXOSF4O6.js +39 -0
  185. package/dist/chunks/chunk-TAAWMNNL.js +7 -0
  186. package/dist/chunks/chunk-TG2RCYTH.js +7 -0
  187. package/dist/chunks/chunk-TKBORMUF.js +7 -0
  188. package/dist/chunks/chunk-TO5PJDEN.js +7 -0
  189. package/dist/chunks/chunk-TPNOSQZ3.js +15 -0
  190. package/dist/chunks/chunk-TZFDVQ72.js +27 -0
  191. package/dist/chunks/chunk-U4Z2MMOF.js +301 -0
  192. package/dist/chunks/chunk-U56NHYAH.js +7 -0
  193. package/dist/chunks/chunk-UJSW56GS.js +9 -0
  194. package/dist/chunks/chunk-UKQMYTWW.js +9 -0
  195. package/dist/chunks/chunk-ULHNMQ7C.js +7 -0
  196. package/dist/chunks/chunk-UNEGQPD3.js +7 -0
  197. package/dist/chunks/chunk-URPEIX6M.js +7 -0
  198. package/dist/chunks/chunk-UVHKXCR5.js +11 -0
  199. package/dist/chunks/chunk-V6Y6UK6B.js +43 -0
  200. package/dist/chunks/chunk-V7BEC3E4.js +10 -0
  201. package/dist/chunks/chunk-VMMMBWD3.js +7 -0
  202. package/dist/chunks/chunk-VOCZ34ON.js +7 -0
  203. package/dist/chunks/chunk-VQSLPYAF.js +7 -0
  204. package/dist/chunks/chunk-VT6RIZJH.js +7 -0
  205. package/dist/chunks/chunk-WBF36MYT.js +16 -0
  206. package/dist/chunks/chunk-WCWP4GBR.js +7 -0
  207. package/dist/chunks/chunk-WGXKX24Q.js +7 -0
  208. package/dist/chunks/chunk-X4762EE4.js +7 -0
  209. package/dist/chunks/chunk-XB4SKARZ.js +29 -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-XXXRTHTP.js +8 -0
  215. package/dist/chunks/chunk-XZV4BFM5.js +7 -0
  216. package/dist/chunks/chunk-Y6AGOERS.js +8 -0
  217. package/dist/chunks/chunk-YHPPP3SF.js +7 -0
  218. package/dist/chunks/chunk-YHQ7PPXP.js +7 -0
  219. package/dist/chunks/chunk-YK7XLFU2.js +24 -0
  220. package/dist/chunks/chunk-YN3C5BL5.js +7 -0
  221. package/dist/chunks/chunk-ZF27J6FQ.js +7 -0
  222. package/dist/chunks/chunk-ZFRNVIHI.js +7 -0
  223. package/dist/chunks/chunk-ZH6KHD55.js +20 -0
  224. package/dist/chunks/cjs-2SMN43VH.js +54 -0
  225. package/dist/chunks/clear-ZS4KQ7OT.js +8 -0
  226. package/dist/chunks/compile-vercel-config-3IYM2CHC.js +7 -0
  227. package/dist/chunks/config-N2SBVW4T.js +8 -0
  228. package/dist/chunks/config-ZFIC7N4D.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-ICJL2EO5.js +7 -0
  232. package/dist/chunks/create-project-IKCB6MB2.js +7 -0
  233. package/dist/chunks/delete-2ZE2NVHI.js +10 -0
  234. package/dist/chunks/delete-AL57HZDQ.js +9 -0
  235. package/dist/chunks/detect-projects-OD4JEAW2.js +7 -0
  236. package/dist/chunks/detect-services-MOXTX5XG.js +7 -0
  237. package/dist/chunks/disable-MKI3BKNH.js +7 -0
  238. package/dist/chunks/discard-SI4H7ST3.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-DNWH6SPE.js +8 -0
  242. package/dist/chunks/edit-WYNWDFUJ.js +9 -0
  243. package/dist/chunks/enable-J6MMYPYF.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-MHSH7QCX.js +19 -0
  253. package/dist/chunks/fetch-proxy-45DGILKR.js +67 -0
  254. package/dist/chunks/future-FFOGTKMF.js +7 -0
  255. package/dist/chunks/generate-cert-for-deploy-YZKNGAEQ.js +7 -0
  256. package/dist/chunks/image-7METSS6F.js +7 -0
  257. package/dist/chunks/import-builders-GM2SERWV.js +7 -0
  258. package/dist/chunks/inspect-A7WJQQZO.js +15 -0
  259. package/dist/chunks/inspect-DI434TAM.js +19 -0
  260. package/dist/chunks/inspect-H2Q7XOWN.js +13 -0
  261. package/dist/chunks/inspect-H5JC2XKI.js +9 -0
  262. package/dist/chunks/inspect-IAWVHJXQ.js +20 -0
  263. package/dist/chunks/list-ELEUTZWJ.js +12 -0
  264. package/dist/chunks/list-INRPH25K.js +10 -0
  265. package/dist/chunks/list-WWU734RK.js +16 -0
  266. package/dist/chunks/login-R5NQRPQC.js +7 -0
  267. package/dist/chunks/login-ZF2TLCQB.js +9 -0
  268. package/dist/chunks/logs-UD7FEXZ7.js +7 -0
  269. package/dist/chunks/ls-5ZEAKKPQ.js +8 -0
  270. package/dist/chunks/ls-IXRLAJ4L.js +11 -0
  271. package/dist/chunks/ls-LIGIBVAT.js +12 -0
  272. package/dist/chunks/ls-MCQ2NS65.js +8 -0
  273. package/dist/chunks/ls-S5E2NQMI.js +12 -0
  274. package/dist/chunks/ls-V2ZSIVO3.js +12 -0
  275. package/dist/chunks/ls-VXH4QYF5.js +12 -0
  276. package/dist/chunks/mutate-OQWOKLIW.js +9 -0
  277. package/dist/chunks/notifications-KFZ333V5.js +7 -0
  278. package/dist/chunks/open-HH6K7ZRC.js +7 -0
  279. package/dist/chunks/openapi-JGYEFJJV.js +7 -0
  280. package/dist/chunks/permissions-ZSHKMXBZ.js +7 -0
  281. package/dist/chunks/pkg-EDJQLCNP.js +7 -0
  282. package/dist/chunks/plugin-offer-Z6FCPQFD.js +9 -0
  283. package/dist/chunks/prompt-missing-credentials-KOA7C4QC.js +7 -0
  284. package/dist/chunks/publish-FPNQ2US4.js +15 -0
  285. package/dist/chunks/pull-7OGOIKB3.js +7 -0
  286. package/dist/chunks/purchase-domain-if-available-F4LKHVBD.js +7 -0
  287. package/dist/chunks/push-NY3SIK2C.js +7 -0
  288. package/dist/chunks/query-JGPO7TNY.js +12 -0
  289. package/dist/chunks/reauthenticate-OZRQFR66.js +7 -0
  290. package/dist/chunks/reorder-4J2STFUS.js +10 -0
  291. package/dist/chunks/reply-EO4NTTPW.js +9 -0
  292. package/dist/chunks/repo-info-to-url-XQSULSEO.js +7 -0
  293. package/dist/chunks/resolve-RPHHRPNM.js +12 -0
  294. package/dist/chunks/resolve-agent-team-KX77HEAF.js +7 -0
  295. package/dist/chunks/resolve-deployment-framework-preset-AXXYBFCL.js +7 -0
  296. package/dist/chunks/restore-TEA6TSVK.js +16 -0
  297. package/dist/chunks/rm-BPILSPUI.js +8 -0
  298. package/dist/chunks/rm-F6XVUDBM.js +8 -0
  299. package/dist/chunks/rm-JCPXV2FN.js +8 -0
  300. package/dist/chunks/rm-LPQRGX7N.js +8 -0
  301. package/dist/chunks/rm-WHUGT6TE.js +8 -0
  302. package/dist/chunks/routes-P6LKQCWH.js +7 -0
  303. package/dist/chunks/rule-inspect-BOETGPFO.js +8 -0
  304. package/dist/chunks/schema-BEUO7G52.js +44 -0
  305. package/dist/chunks/schema-YOEAK4VX.js +14 -0
  306. package/dist/chunks/select-org-OMLGQEKK.js +7 -0
  307. package/dist/chunks/set-5XY27S7R.js +7 -0
  308. package/dist/chunks/setup-and-link-A7M3QT52.js +7 -0
  309. package/dist/chunks/skills-4J2NC2QI.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-ZXZQEXOV.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-SK6J2HFE.js +14 -0
  316. package/dist/chunks/update-25CKNOY5.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 +25 -0
  344. package/dist/internal-build-worker.js +10 -0
  345. package/dist/internal-build.js +11 -0
  346. package/dist/package.json +265 -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 +393 -0
  353. package/dist/version.mjs +2 -0
  354. package/package.json +224 -14
  355. package/index.js +0 -1
@@ -0,0 +1,84 @@
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{collectBuildLogs,displayBuildLogs}from"./chunks/chunk-OCQPXOTX.js";import{InvalidEventsResponseError,RecordTooLargeError,decodeContinuation,encodeContinuation,fetchEventPages,recordLine,serializeTimeRange,sortIntervals,warningLine}from"./chunks/chunk-XXXRTHTP.js";import{summaryLine,writeJsonError}from"./chunks/chunk-7Z3WUAO5.js";import{getBuildMachineResourceConfig}from"./chunks/chunk-ZF27J6FQ.js";import{isDeploying}from"./chunks/chunk-ZFRNVIHI.js";import"./chunks/chunk-UJSW56GS.js";import{readStandardInput}from"./chunks/chunk-PSOVLGHP.js";import"./chunks/chunk-XOETL6DB.js";import{parseTimeFlag,validateIntegerRangeWithDefault}from"./chunks/chunk-RW3X523R.js";import{external_exports}from"./chunks/chunk-2NABMKFV.js";import{elapsed}from"./chunks/chunk-Q7D7RGXM.js";import{indent_default}from"./chunks/chunk-GZNDA6SV.js";import{getDeployment}from"./chunks/chunk-R6BEOVTU.js";import"./chunks/chunk-HCRD3JFL.js";import"./chunks/chunk-7EJQLVWX.js";import{printNextPageCommand}from"./chunks/chunk-QMCHGGDX.js";import{require_format}from"./chunks/chunk-PFD7LETF.js";import{getSubcommand}from"./chunks/chunk-ETV3C2CV.js";import{BACKGROUND_FUNCTION_EXCLUSION,DEFAULT_LIMIT,DEFAULT_WINDOW,MAX_LIMIT,getCommandAliases,inspectCommand,logsCommand,logsSources,requestsSubcommand,runtimeSubcommand,sourceForEvent}from"./chunks/chunk-TPNOSQZ3.js";import"./chunks/chunk-LUBUI5GF.js";import"./chunks/chunk-GVTXA6HG.js";import"./chunks/chunk-5IASAERQ.js";import"./chunks/chunk-WGXKX24Q.js";import"./chunks/chunk-E2SADN6I.js";import"./chunks/chunk-ABZEMNDR.js";import"./chunks/chunk-3AYYFYZG.js";import"./chunks/chunk-76KGQU2G.js";import"./chunks/chunk-UNEGQPD3.js";import"./chunks/chunk-YHQ7PPXP.js";import"./chunks/chunk-NQWGRKF4.js";import"./chunks/chunk-IGDG5CWT.js";import"./chunks/chunk-QZX7VG2V.js";import"./chunks/chunk-3ADDGPEN.js";import"./chunks/chunk-B4YYOSPY.js";import"./chunks/chunk-PFNYWWLI.js";import"./chunks/chunk-NTZ5WWYV.js";import"./chunks/chunk-JALVF3C2.js";import"./chunks/chunk-LJBUJ23M.js";import"./chunks/chunk-OKEBIUKZ.js";import{help}from"./chunks/chunk-KH6565YH.js";import"./chunks/chunk-773GOZIR.js";import{printError}from"./chunks/chunk-G4T7VBGN.js";import"./chunks/chunk-67GZ5REA.js";import{require_strip_ansi}from"./chunks/chunk-BS32OUOC.js";import{TelemetryClient}from"./chunks/chunk-2PKEEQ5W.js";import"./chunks/chunk-PUKYAALC.js";import{detectExplicitScope,getContextName}from"./chunks/chunk-B4UE4LVE.js";import{require_ms}from"./chunks/chunk-MXTC4ZAQ.js";import"./chunks/chunk-NWGBDBZI.js";import{getTeams}from"./chunks/chunk-FGFLTLEA.js";import{AGENT_REASON,getErrorRecovery}from"./chunks/chunk-DGYHWXD2.js";import"./chunks/chunk-IUXSJWL3.js";import{getProjectByNameOrId,getProjectLink,resolveProjectCwd,sleep}from"./chunks/chunk-KNLGWGUE.js";import"./chunks/chunk-ADLBLGT3.js";import"./chunks/chunk-BBKEP7RO.js";import"./chunks/chunk-4NTBYNFR.js";import{isArgumentError,parseArguments}from"./chunks/chunk-VOCZ34ON.js";import{getTeamByIdOrSlug,quoteArg}from"./chunks/chunk-F53OKXYI.js";import{getFlagsSpecification,validateJsonOutput,warnDeprecatedSubcommand}from"./chunks/chunk-AWMQGOS2.js";import"./chunks/chunk-FUX6LKNP.js";import"./chunks/chunk-OPORM35X.js";import"./chunks/chunk-4SAVH3H7.js";import{DeploymentNotFound,DeploymentPermissionDenied,InvalidDeploymentId,ProjectNotFound,isAPIError,require_bytes}from"./chunks/chunk-6VH56CX2.js";import{getCommandName,getCommandNamePlain,require_lib}from"./chunks/chunk-JESNVRVR.js";import{output_manager_default,require_build_utils}from"./chunks/chunk-XP3FT56R.js";import"./chunks/chunk-BLUPZPAS.js";import{require_dist}from"./chunks/chunk-RM3ZDRYE.js";import"./chunks/chunk-OO572JUC.js";import"./chunks/chunk-D3AHZ5LI.js";import"./chunks/chunk-2GHZGOWT.js";import"./chunks/chunk-YHPPP3SF.js";import{require_source}from"./chunks/chunk-NB2WLB3J.js";import"./chunks/chunk-ISWW3DKF.js";import"./chunks/chunk-BRQUZ5NC.js";import{__toESM}from"./chunks/chunk-BZENIQ7N.js";var import_error_utils=__toESM(require_dist(),1),import_chalk3=__toESM(require_source(),1),import_ms=__toESM(require_ms(),1),import_title=__toESM(require_lib(),1);var NOT_SAVED_LABELS={disabled:"not saved (caching disabled)",prebuilt:"not saved (prebuilt deployment)",no_cache_branch:"not saved (no branch to cache)",forced_skip:"not saved (skipped)",missing_metadata:"not saved (missing metadata)",no_files:"not saved (nothing to cache)"};function describeBuildCache(summary){let save=getKnownSave(summary);if(!save)return"unavailable";if(save.saved){let rows=[["size",`${formatCacheBytes(save.compressedSizeBytes)} / ${formatCacheBytes(save.cacheLimitBytes)} limit`]];return save.fileCount!==void 0&&rows.push(["file count",`~${save.fileCount.toLocaleString("en-US")} (approx., paths selected for packing)`]),rows}return"cacheLimitBytes"in save?`not saved (exceeded ${formatCacheBytes(save.cacheLimitBytes)} limit)`:save.reason==="failed"?"upload failed":NOT_SAVED_LABELS[save.reason]??"not saved"}function getBuildCacheJson(summary){if(!summary||typeof summary!="object")return;let{save}=summary;return save===void 0?void 0:{save}}function getKnownSave(summary){if(!summary||typeof summary!="object")return;let{version,save}=summary;if(!(version!==1||!save||typeof save!="object")){if(save.saved===!0)return isCount(save.compressedSizeBytes)&&isCount(save.cacheLimitBytes)&&(save.fileCount===void 0||isCount(save.fileCount))?save:void 0;if(!(save.saved!==!1||typeof save.reason!="string"))return save.reason==="size_exceeded"?isCount(save.cacheLimitBytes)?save:void 0:{saved:!1,reason:save.reason}}}function isCount(value){return typeof value=="number"&&Number.isSafeInteger(value)&&value>=0}var BINARY_UNITS=["B","KiB","MiB","GiB","TiB"];function formatCacheBytes(value){let unit=0,scaled=value;for(;scaled>=1024&&unit<BINARY_UNITS.length-1;)scaled/=1024,unit++;return`${Number(scaled.toFixed(2))} ${BINARY_UNITS[unit]}`}var import_chalk=__toESM(require_source(),1),import_bytes=__toESM(require_bytes(),1);var isReady=({readyState})=>readyState==="READY",isFailed=({readyState})=>readyState.endsWith("_ERROR")||readyState==="ERROR";var padding=8,MAX_BUILD_GROUPS=5,MAX_OUTPUTS_PER_GROUP=5,hasOutput=b=>Array.isArray(b.output)&&b.output.length>0,getCommonPath=buildGroup=>{let commonPath=[],splits=buildGroup.map(build=>getDirPath(build.entrypoint).split("/")),shortest=splits.reduce((prevValue,currentValue)=>Math.min(prevValue,currentValue.length),1/0);for(let i=0;i<=shortest;i++){let first=splits[0][i];if(splits.every(pathParts=>pathParts[i]===first)){commonPath.push(first);continue}break}return commonPath.join("/")||"/"},styleBuild=(build,times,longestSource)=>{let{entrypoint,id}=build,time=typeof times[id]=="string"?times[id]:"",pathColor=import_chalk.default.cyan;isFailed(build)&&(pathColor=import_chalk.default.red);let entry=entrypoint.padEnd(longestSource+padding),prefix=hasOutput(build)?"\u250C":"\u2576";return`${import_chalk.default.grey(prefix)} ${pathColor(entry)}${time}`},styleHiddenBuilds=(commonPath,buildGroup,times,longestSource,isHidden=!1)=>{let{id}=buildGroup[0],entry=commonPath.padEnd(longestSource+padding),time=typeof times[id]=="string"?times[id]:"",prefix=isHidden===!1&&buildGroup.some(hasOutput)?"\u250C":"\u2576",pathColor=import_chalk.default.cyan;return buildGroup.every(isFailed)&&(pathColor=import_chalk.default.red),isHidden&&(pathColor=import_chalk.default.grey),`${import_chalk.default.grey(prefix)} ${pathColor(entry)}${time}`},styleOutput=(output,readyState,isLast)=>{let{type,path,size,lambda}=output,prefix=type==="lambda"?"\u03BB ":"",finalSize=size?` ${import_chalk.default.grey(`(${(0,import_bytes.default)(size)})`)}`:"",color=import_chalk.default.grey,finalRegion="";if(isReady({readyState})?color=import_chalk.default:isFailed({readyState})&&(color=import_chalk.default.red),lambda){let{deployedTo}=lambda;deployedTo&&deployedTo.length>0&&(finalRegion=` ${import_chalk.default.grey(`[${deployedTo.join(", ")}]`)}`)}let corner=isLast?"\u2514\u2500\u2500":"\u251C\u2500\u2500",main=prefix+path+finalSize+finalRegion;return`${import_chalk.default.grey(corner)} ${color(main)}`},getDirPath=(path,level=0,highestLevel=null)=>{let parts=path.split("/").slice(0,-1);if(highestLevel===null||level===0)return parts.join("/");let reverseLevel=highestLevel-level;return parts.slice(0,reverseLevel).join("/")},sortByEntrypoint=(a,b)=>{let aPath=getDirPath(a.entrypoint),bPath=getDirPath(b.entrypoint);return aPath===""?1:bPath===""?-1:aPath>bPath?1:bPath>aPath?-1:0},groupBuilds=(buildList,highestLevel,counter)=>{let currentIndex=counter%buildList.length,__level=Math.ceil(counter/buildList.length),_level=(__level===0?1:__level)-1,level=_level>highestLevel?highestLevel:_level,currentPath=getDirPath(buildList[currentIndex][0].entrypoint,level,highestLevel),nextList=[],currentGroup=[];for(let i=0;i<buildList.length;i++){let group=buildList[i];getDirPath(group[0].entrypoint,level,highestLevel)===currentPath?currentGroup.push(...group):nextList.push(group)}return currentIndex===0?nextList.unshift(currentGroup):nextList.splice(currentIndex,0,currentGroup),nextList},builds_default=(builds,times)=>{let path=builds.sort(sortByEntrypoint).map(build=>[build]),highestLevel=builds.reduce((prev,curr)=>{let partCounter=curr.entrypoint.split("/").length-1;return partCounter>prev?partCounter:prev},0),counter=0;for(;path.length>MAX_BUILD_GROUPS;)path=groupBuilds(path,highestLevel,counter),counter++;path=path.reverse();let longestSource=builds.reduce((final2,current)=>{let{length}=current.entrypoint;return length>final2?length:final2},0),final=[],finalBuildsLength=path.length,lengthWithoutRootPaths=path.length,hiddenBuildGroup=[];path=(()=>{let nextList=[],rootList=[];for(let group of path)getCommonPath(group)==="/"?group.map(item=>rootList.push([item])):nextList.push(group);return lengthWithoutRootPaths=nextList.length,rootList.map(group=>nextList.push(group)),nextList})();for(let buildGroup of path){let commonPath=getCommonPath(buildGroup);if(commonPath==="/")if(lengthWithoutRootPaths<=MAX_BUILD_GROUPS&&finalBuildsLength<=MAX_BUILD_GROUPS){let item=buildGroup[0];final.push(`${styleBuild(item,times,longestSource)}
8
+ `),finalBuildsLength++}else{hiddenBuildGroup.push(buildGroup[0]);continue}else if(buildGroup.length===1){let item=buildGroup[0];final.push(`${styleBuild(item,times,longestSource)}
9
+ `),finalBuildsLength++}else final.push(`${styleHiddenBuilds(`${commonPath}/*`,buildGroup,times,longestSource)}
10
+ `),finalBuildsLength++;let outputs=[];for(let build of buildGroup)Array.isArray(build.output)&&outputs.push(...build.output);outputs.slice(0,MAX_OUTPUTS_PER_GROUP).forEach((output,index)=>final.push(`${styleOutput(output,"READY",outputs.length===index+1)}
11
+ `)),outputs.length>MAX_OUTPUTS_PER_GROUP&&final.push(import_chalk.default.grey(`\u2514\u2500\u2500 ${outputs.length-MAX_OUTPUTS_PER_GROUP} output items hidden
12
+ `))}return hiddenBuildGroup.length&&final.push(`${styleHiddenBuilds(`${hiddenBuildGroup.length} builds hidden`,hiddenBuildGroup,times,longestSource,!0)}
13
+ `),{lines:final.length+1,toPrint:`${final.join("")}`}};var import_chalk2=__toESM(require_source(),1),longestProperty=(routes2,name)=>{let val=routes2.sort((a,b)=>{let aName=a[name],bName=b[name],firstItem=typeof aName=="string"?aName.length:0;return(typeof bName=="string"?bName.length:0)-firstItem})[0][name];return typeof val=="string"?val.length:0};function routes(routes2){let toPrint="",longestSrc=longestProperty(routes2,"src"),longestDest=longestProperty(routes2,"dest"),padding2=6,space=" ".repeat(padding2),destSpace=" ".repeat(longestDest||10),arrow=import_chalk2.default.grey("->");for(let item of routes2){if("handle"in item){toPrint+=`${import_chalk2.default.grey("\u2576")} ${import_chalk2.default.cyan(item.handle)}`;continue}let{src,dest,status,headers}=item,suffix=routes2.indexOf(item)===routes2.length-1?"":`
14
+ `,finalSrc=import_chalk2.default.cyan(src.padEnd(longestSrc+padding2)),finalDest=dest?`${arrow}${space}${dest}`:` ${space}${destSpace}`,finalStatus=status?import_chalk2.default.grey(`[${status}]`):"",finalHeaders=null;if(headers){finalHeaders=`
15
+ `;let headerKeys=Object.keys(headers);for(let header of headerKeys){let value=headers[header],last2=headerKeys.indexOf(header)===headerKeys.length-1,suffix2=last2?"":`
16
+ `,prefix2=import_chalk2.default.grey(last2?"\u2514\u2500\u2500":"\u251C\u2500\u2500");finalHeaders+=`${prefix2} ${header}: ${value}${suffix2}`}}let prefix=import_chalk2.default.grey(finalHeaders?"\u250C":"\u2576"),fill=`${finalSrc}${finalDest}${space}${finalStatus}`;toPrint+=`${prefix} ${fill}${finalHeaders||""}${suffix}`}return toPrint}import{URL as URL2}from"url";function parseDeploymentUrl(input){let url;try{url=new URL2(input)}catch{return normalizeDeploymentId(input)}return url.hostname==="vercel.com"||url.hostname==="www.vercel.com"?parseVercelDashboardUrl(url):{deploymentIdOrHost:url.hostname}}function parseVercelDashboardUrl(url){let pathParts=url.pathname.split("/").filter(Boolean);if(pathParts.length>=3){let[scope,,deploymentId]=pathParts;return{deploymentIdOrHost:normalizeDeploymentId(deploymentId).deploymentIdOrHost,scope}}return{deploymentIdOrHost:url.hostname}}function normalizeDeploymentId(input){return input.includes(".")?{deploymentIdOrHost:input}:input.startsWith("dpl_")?{deploymentIdOrHost:input}:{deploymentIdOrHost:`dpl_${input}`}}var InspectTelemetryClient=class extends TelemetryClient{trackCliArgumentDeployment(idOrHost){idOrHost&&this.trackCliArgument({arg:"deploymentIdOrHost",value:this.redactedValue})}trackCliOptionTimeout(timeout){timeout&&this.trackCliOption({option:"timeout",value:this.redactedValue})}trackCliFlagLogs(logs2){logs2&&this.trackCliFlag("logs")}trackCliFlagWait(wait){wait&&this.trackCliFlag("wait")}trackCliFlagJson(json){json&&this.trackCliFlag("json")}};async function inspect(client){let{print,error,warn}=output_manager_default,telemetry=new InspectTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArguments,flagsSpecification=getFlagsSpecification(inspectCommand.options);try{parsedArguments=parseArguments(client.argv.slice(2),flagsSpecification)}catch(err){return printError(err),2}if(parsedArguments.flags["--help"])return telemetry.trackCliFlagHelp("inspect"),print(help(inspectCommand,{columns:client.stderr.columns})),0;parsedArguments.args[0]===inspectCommand.name&&parsedArguments.args.shift();let[deploymentIdOrHost]=parsedArguments.args;if(!deploymentIdOrHost){let stdInput=(await readStandardInput(client.stdin)).trim();stdInput&&(deploymentIdOrHost=stdInput)}if(!deploymentIdOrHost)return error(`${getCommandName("inspect <deployment>")} expects exactly one argument`),print(help(inspectCommand,{columns:client.stderr.columns})),2;telemetry.trackCliArgumentDeployment(deploymentIdOrHost),telemetry.trackCliOptionTimeout(parsedArguments.flags["--timeout"]),telemetry.trackCliFlagLogs(parsedArguments.flags["--logs"]),telemetry.trackCliFlagWait(parsedArguments.flags["--wait"]),telemetry.trackCliOptionFormat(parsedArguments.flags["--format"]),telemetry.trackCliFlagJson(parsedArguments.flags["--json"]);let timeout=(0,import_ms.default)(parsedArguments.flags["--timeout"]??"3m");if(timeout===void 0)return error(`Invalid timeout "${parsedArguments.flags["--timeout"]}"`),1;let contextName=null,parsed=parseDeploymentUrl(deploymentIdOrHost);if(deploymentIdOrHost=parsed.deploymentIdOrHost,parsed.scope&&!detectExplicitScope(client)){let team=(await getTeams(client)).find(t=>t.slug===parsed.scope);team&&(client.config.currentTeam=team.id)}try{contextName=await getContextName(client)}catch(err){if((0,import_error_utils.isErrnoException)(err)&&(err.code==="NOT_AUTHORIZED"||err.code==="TEAM_DELETED"))return error(err.message),1;throw err}let until=Date.now()+timeout,wait=parsedArguments.flags["--wait"]??!1,withLogs=parsedArguments.flags["--logs"],formatResult=validateJsonOutput(parsedArguments.flags);if(!formatResult.valid)return error(formatResult.error),2;let asJson=formatResult.jsonOutput,startTimestamp=Date.now();asJson&&withLogs||output_manager_default.spinner(`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk3.default.bold(contextName)}`);let prefetchedBuilds;!wait&&!withLogs&&deploymentIdOrHost.startsWith("dpl_")&&(prefetchedBuilds=fetchBuilds(client,deploymentIdOrHost),prefetchedBuilds.catch(()=>{}));let deployment=await getDeployment(client,contextName,deploymentIdOrHost);deployment.id!==deploymentIdOrHost&&(prefetchedBuilds=void 0);let abortController,buildLogsPromise;if(withLogs)if(asJson){let promise;({abortController,promise}=collectBuildLogs(client,deployment,wait)),buildLogsPromise=promise.catch(error2=>(warn(`Failed to read build logs: ${error2}`),[]))}else{let promise;({abortController,promise}=displayBuildLogs(client,deployment,wait)),wait?promise.catch(error2=>warn(`Failed to read build logs: ${error2}`)):await promise}let timedOut=!1;for(;wait;){if(await sleep(250),deployment=await getDeployment(client,contextName,deploymentIdOrHost),!isDeploying(deployment.readyState)){abortController?.abort();break}if(Date.now()>until){warn(`stopped waiting after ${(0,import_ms.default)(timeout,{long:!0})}, the deployment is still in progress`),timedOut=!0,abortController?.abort();break}}return asJson?(output_manager_default.stopSpinner(),withLogs?printLogsJson(client,await buildLogsPromise??[]):await printJson({deployment,contextName,client,prefetchedBuilds})):withLogs?print(`${import_chalk3.default.cyan("status")} ${stateString(deployment.readyState)}
17
+ `):await printDetails({deployment,contextName,client,startTimestamp,prefetchedBuilds}),timedOut?1:exitCode(deployment.readyState)}function stateString(s){let CIRCLE="\u25CF ",sTitle=s&&(0,import_title.default)(s);switch(s){case"INITIALIZING":case"BUILDING":return import_chalk3.default.yellow(CIRCLE)+sTitle;case"ERROR":case"BLOCKED":return import_chalk3.default.red(CIRCLE)+sTitle;case"READY":return import_chalk3.default.green(CIRCLE)+sTitle;case"QUEUED":return import_chalk3.default.gray(CIRCLE)+sTitle;case"CANCELED":return import_chalk3.default.gray(CIRCLE)+sTitle;default:return import_chalk3.default.gray("UNKNOWN")}}async function printDetails({deployment,contextName,client,startTimestamp,prefetchedBuilds}){output_manager_default.log(`Fetched deployment "${import_chalk3.default.bold(deployment.url)}" in ${import_chalk3.default.bold(contextName)} ${elapsed(Date.now()-startTimestamp)}`);let{id,name,url,createdAt,routes:routes2,readyState,readyStateReason,alias:aliases}=deployment,{print,link}=output_manager_default,builds=deployment.version===2?await(prefetchedBuilds??fetchBuilds(client,id)):[];print(`
18
+ `),print(import_chalk3.default.bold(` General
19
+
20
+ `)),print(` ${import_chalk3.default.cyan("id")} ${id}
21
+ `),print(` ${import_chalk3.default.cyan("name")} ${name}
22
+ `);let target=deployment.customEnvironment?.slug??deployment.target??"preview";print(` ${import_chalk3.default.cyan("target")} `),print(deployment.customEnvironment&&deployment.team?.slug?`${link(`${target}`,`https://vercel.com/${deployment.team.slug}/${name}/settings/environments/${deployment.customEnvironment.id}`,{fallback:()=>target,color:!1})}
23
+ `:`${target}
24
+ `),print(` ${import_chalk3.default.cyan("status")} ${stateString(readyState)}
25
+ `),readyStateReason&&print(` ${import_chalk3.default.cyan("reason")} ${readyStateReason}
26
+ `),print(` ${import_chalk3.default.cyan("url")} https://${url}
27
+ `),createdAt&&print(` ${import_chalk3.default.cyan("created")} ${new Date(createdAt)} ${elapsed(Date.now()-createdAt,!0)}
28
+ `),print(`
29
+
30
+ `);let buildMachine=getBuildMachineResourceConfig(deployment);if(buildMachine){let fields=[["requested build machine",buildMachine.machine??"unavailable"],["actual assigned cores",buildMachine.cores===void 0?"unavailable":`${buildMachine.cores} vCPU (actual assignment)`],["memory",buildMachine.memory===void 0?void 0:`${buildMachine.memory} MiB`],["selection type",buildMachine.selectionType],["selection source",buildMachine.selectionSource]];print(import_chalk3.default.bold(` Build Machine
31
+
32
+ `));let labelWidth=Math.max(...fields.map(([label])=>label.length))+1;for(let[label,value]of fields)value!==void 0&&print(` ${import_chalk3.default.cyan(label.padEnd(labelWidth))}${value}
33
+ `);print(`
34
+
35
+ `)}print(import_chalk3.default.bold(` Build Cache
36
+
37
+ `));let buildCache=describeBuildCache(deployment.buildCacheSummary);if(typeof buildCache=="string")print(` ${buildCache}
38
+ `);else{let labelWidth=Math.max(...buildCache.map(([label])=>label.length))+1;for(let[label,value]of buildCache)print(` ${import_chalk3.default.cyan(label.padEnd(labelWidth))}${value}
39
+ `)}print(`
40
+
41
+ `),print(import_chalk3.default.bold(` Duration
42
+
43
+ `));let{duration}=deployment;if(print(` ${import_chalk3.default.cyan("build duration")} ${formatDuration(duration?.timeToReady)}
44
+ `),print(` ${import_chalk3.default.cyan("post-build duration")} ${formatDuration(getPostBuildDuration(duration))}
45
+ `),print(` ${import_chalk3.default.cyan("billable duration")} ${formatDuration(duration?.timeForBilling)}
46
+ `),print(` ${import_chalk3.default.cyan("CPU Minutes Usage")} ${formatCpuMinutes(duration?.cpuTimeForBilling,duration?.timeForBilling,deployment.resourceConfig?.buildMachine?.cores)}
47
+ `),print(`
48
+
49
+ `),aliases!==void 0&&aliases.length>0){print(import_chalk3.default.bold(` Aliases
50
+
51
+ `));let aliasList="";for(let alias of aliases)aliasList+=`${import_chalk3.default.gray("\u2576")} https://${alias}
52
+ `;print(indent_default(aliasList,4)),print(`
53
+
54
+ `)}if(builds.length>0){let times={};for(let build of builds){let{id:id2,createdAt:createdAt2,readyStateAt}=build;times[id2]=createdAt2&&readyStateAt?elapsed(readyStateAt-createdAt2):null}print(import_chalk3.default.bold(` Builds
55
+
56
+ `)),print(indent_default(builds_default(builds,times).toPrint,4)),print(`
57
+
58
+ `)}Array.isArray(routes2)&&routes2.length>0&&(print(import_chalk3.default.bold(` Routes
59
+
60
+ `)),print(indent_default(routes(routes2),4)),print(`
61
+
62
+ `))}async function printJson({deployment,contextName,client,prefetchedBuilds}){let{id,name,url,createdAt,routes:routes2,readyState,readyStateReason,alias:aliases,target,customEnvironment,buildCacheSummary}=deployment,builds=deployment.version===2?await(prefetchedBuilds??fetchBuilds(client,id)):[],buildMachine=getBuildMachineResourceConfig(deployment),buildCacheJson=getBuildCacheJson(buildCacheSummary),jsonOutput={id,name,url,target:customEnvironment?.slug??target??"preview",readyState,...readyStateReason&&{readyStateReason},createdAt,...deployment.duration&&{duration:deployment.duration},...buildMachine&&{buildMachine},...buildCacheJson&&{buildCacheSummary:buildCacheJson},...aliases&&aliases.length>0&&{aliases},...builds.length>0&&{builds},...Array.isArray(routes2)&&routes2.length>0&&{routes:routes2},...contextName&&{contextName}};client.stdout.write(`${JSON.stringify(jsonOutput,null,2)}
63
+ `)}async function fetchBuilds(client,deploymentId){let{builds}=await client.fetch(`/v11/deployments/${deploymentId}/builds`);return builds}function getPostBuildDuration(duration){if(duration?.timeToReady===void 0||duration.timeToContainerExit===void 0)return;let postBuildDuration=duration.timeToContainerExit-duration.timeToReady;return postBuildDuration>=0?postBuildDuration:void 0}function formatDuration(durationMs){if(durationMs===void 0)return"unavailable";if(durationMs<1e3)return`${durationMs}ms`;let totalSeconds=Math.round(durationMs/1e3),minutes=Math.floor(totalSeconds/60),seconds=totalSeconds%60;return minutes===0?`${seconds}s`:seconds===0?`${minutes}m`:`${minutes}m ${seconds}s`}function formatCpuMinutes(billedBuildCpuMs,billableDurationMs,assignedCpuCores){if(billedBuildCpuMs===void 0)return"unavailable";let minutes=billedBuildCpuMs/6e4,calculation=billableDurationMs!==void 0&&assignedCpuCores!==void 0?` (${formatDuration(billableDurationMs)} x ${assignedCpuCores}vCPU)`:"";return`${minutes} minutes${calculation}`}function printLogsJson(client,logs2){client.stdout.write(`${JSON.stringify(logs2,null,2)}
64
+ `)}function exitCode(state){return state==="ERROR"||state==="CANCELED"?1:0}var import_chalk5=__toESM(require_source(),1),import_error_utils2=__toESM(require_dist(),1);function writeWithBackpressure(stream,text2){return new Promise((resolve,reject)=>{let cleanup=()=>{stream.removeListener("drain",onDrain),stream.removeListener("error",onError),stream.removeListener("close",onClose)},onDrain=()=>{cleanup(),resolve()},onError=err=>{cleanup(),reject(err)},onClose=()=>{cleanup(),reject(new Error("Output stream closed."))};if(stream.destroyed){onClose();return}stream.once("drain",onDrain),stream.once("error",onError),stream.once("close",onClose);try{stream.write(text2)&&onDrain()}catch(err){onError(err instanceof Error?err:new Error(String(err)))}})}var LogsTelemetryClient=class extends TelemetryClient{trackCliSubcommandRuntime(actual){this.trackCliSubcommand({subcommand:"runtime",value:actual})}trackCliSubcommandRequests(actual){this.trackCliSubcommand({subcommand:"requests",value:actual})}trackCliLegacyOption(name){this.trackCliOption({option:name,value:"removed"})}trackCliArgumentPositional(kind){this.trackCliArgument({arg:"positional",value:kind})}trackCliOptionDeployment(v){v&&this.trackCliOption({option:"deployment",value:this.redactedValue})}trackCliOptionEnvironment(v){if(v){let value=["production","preview"].includes(v)?v:this.redactedValue;this.trackCliOption({option:"environment",value})}}trackCliOptionQuery(v){v!==void 0&&this.trackCliOption({option:"query",value:this.redactedValue})}trackCliOptionNext(v){v!==void 0&&this.trackCliOption({option:"next",value:this.redactedValue})}trackCliOptionFormat(v){if(v){let value=v.toLowerCase()==="json"?"json":this.redactedValue;this.trackCliOption({option:"format",value})}}trackCliFlagJson(v){v&&this.trackCliFlag("json")}trackCliOptionLimit(v){typeof v=="number"&&this.trackCliOption({option:"limit",value:this.redactedValue})}trackCliOptionSince(v){v&&this.trackCliOption({option:"since",value:this.redactedValue})}trackCliOptionUntil(v){v&&this.trackCliOption({option:"until",value:this.redactedValue})}trackCliFlagFollow(v){v&&this.trackCliFlag("follow")}};var import_chalk4=__toESM(require_source(),1),import_format=__toESM(require_format(),1),import_strip_ansi=__toESM(require_strip_ansi(),1),TIME_ONLY_FORMAT="HH:mm:ss.SSS",DATE_TIME_FORMAT="MMM DD HH:mm:ss.SSS",LEVEL_WIDTH=7,PRODUCER_WIDTH=16,STATUS_WIDTH=6,METHOD_WIDTH=7,CACHE_WIDTH=9,REQUEST_ID_WIDTH=32,CONTROL_CHARACTERS=/[\u0000-\u0008\u000B-\u001F\u007F-\u009F]/g;function sanitize(value){return(0,import_strip_ansi.default)(value.replace(/\r\n?/g,`
65
+ `)).replace(CONTROL_CHARACTERS,"")}function text(event,field){let value=event[field];return value==null?"":sanitize(typeof value=="string"?value:String(value))}function cell(value,width){return(value||"-").padEnd(width)}function timeFormatFor(range){return range.start.toDateString()===new Date(range.end.getTime()-1).toDateString()&&range.end.toDateString()===new Date().toDateString()?TIME_ONLY_FORMAT:DATE_TIME_FORMAT}function formatTime(event,timeFormat){let value=event.timestamp,date=typeof value=="string"||typeof value=="number"?new Date(value):void 0;return!date||isNaN(date.getTime())?text(event,"timestamp")||"-":(0,import_format.default)(date,timeFormat)}function colorizeLevel(value,level){switch(level){case"fatal":return import_chalk4.default.red.bold(value);case"error":return import_chalk4.default.red(value);case"warning":return import_chalk4.default.yellow(value);default:return import_chalk4.default.dim(value)}}function colorizeStatus(value,status){return status>=500?import_chalk4.default.red(value):status>=400?import_chalk4.default.yellow(value):status>=300?import_chalk4.default.cyan(value):status>=200?import_chalk4.default.green(value):import_chalk4.default.gray(value)}function runtimeRenderer(timeFormat,timeWidth){let messageIndent=" ".repeat(timeWidth+LEVEL_WIDTH+PRODUCER_WIDTH+6);return{header:()=>import_chalk4.default.dim(["TIME".padEnd(timeWidth),"LEVEL".padEnd(LEVEL_WIDTH),"SERVICE/SOURCE".padEnd(PRODUCER_WIDTH),"MESSAGE"].join(" ")),row:event=>{let level=text(event,"level"),producer=text(event,"service")||text(event,"source"),message=text(event,"message").replace(/\n+$/,""),[first="",...rest]=message.split(`
66
+ `),truncated=event.truncated===!0,lines=[[import_chalk4.default.dim(formatTime(event,timeFormat).padEnd(timeWidth)),colorizeLevel(cell(level,LEVEL_WIDTH),level),cell(producer,PRODUCER_WIDTH),first||(rest.length===0?import_chalk4.default.dim("(no message)"):"")].join(" "),...rest.map(line=>`${messageIndent}${line}`)];return truncated&&lines.push(`${messageIndent}${import_chalk4.default.yellow("[message truncated]")}`),lines.join(`
67
+ `)}}}function requestsRenderer(timeFormat,timeWidth){return{header:()=>import_chalk4.default.dim(["TIME".padEnd(timeWidth),"STATUS".padEnd(STATUS_WIDTH),"METHOD".padEnd(METHOD_WIDTH),"CACHE".padEnd(CACHE_WIDTH),"REQUEST ID".padEnd(REQUEST_ID_WIDTH),"HOST AND PATH"].join(" ")),row:event=>{let status=event.httpStatus,statusCell=(typeof status=="number"&&status>0?String(status):"-").padEnd(STATUS_WIDTH);return[import_chalk4.default.dim(formatTime(event,timeFormat).padEnd(timeWidth)),typeof status=="number"?colorizeStatus(statusCell,status):statusCell,cell(text(event,"requestMethod"),METHOD_WIDTH),cell(text(event,"cacheResult"),CACHE_WIDTH),cell(text(event,"requestId"),REQUEST_ID_WIDTH),`${text(event,"requestHostname")}${text(event,"requestPath")}`||"-"].join(" ")}}}function createRenderer(source,range){let timeFormat=timeFormatFor(range),timeWidth=(0,import_format.default)(new Date(0),timeFormat).length;return source==="runtime"?runtimeRenderer(timeFormat,timeWidth):requestsRenderer(timeFormat,timeWidth)}function formatWindow(range){let sameDay=range.start.toDateString()===range.end.toDateString(),start=(0,import_format.default)(range.start,"YYYY-MM-DD HH:mm:ss"),end=(0,import_format.default)(range.end,sameDay?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss"),zone=(0,import_format.default)(range.end,"Z");return`${start} to ${end} (UTC${zone})`}var issuesSchema=external_exports.array(external_exports.object({path:external_exports.string(),message:external_exports.string()})),REQUESTS_ACCESS_MESSAGE="CDN request logs require Observability Plus, a Priority project, or the Enterprise Agents & Apps entitlement.";function describeLogsApiError(client,err,source){if(!isAPIError(err))return;let serverMessage=sanitize(err.serverMessage||err.message),base={status:"error",...getErrorRecovery(err,client),data:{httpStatus:err.status,serverMessage,...typeof err.code=="string"?{code:err.code}:{}}};if(err.status===402)return{human:source==="requests"?`${REQUESTS_ACCESS_MESSAGE}
68
+ ${serverMessage}`:serverMessage,json:{...base,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,message:source==="requests"?REQUESTS_ACCESS_MESSAGE:"The selected team can't query runtime logs for this window."},exitCode:1};let issues=issuesSchema.safeParse(err.issues);if(err.status===400&&issues.success&&issues.data.length>0){let messages=issues.data.map(issue=>sanitize(issue.message)),timeIssue=issues.data.some(issue=>issue.path.startsWith("timeRange")),hint=timeIssue?"Adjust --since or --until.":`See ${getCommandNamePlain(`logs ${source} --help`)} for supported filter forms.`,humanHint=timeIssue?hint:`See ${getCommandName(`logs ${source} --help`)} for supported filter forms.`;return{human:`${source}: ${messages.join("; ")}
69
+ ${humanHint}`,json:{...base,reason:AGENT_REASON.INVALID_ARGUMENTS,message:`The ${source} query was rejected.`,hint,data:{...base.data,issues:issues.data.map(issue=>({field:issue.path,reason:"invalid",message:sanitize(issue.message)}))}},exitCode:2}}if(err.status===400&&/time range|retain/i.test(serverMessage)){let hint=`Use a later --since, or omit it to search the last ${DEFAULT_WINDOW}.`;return{human:`${serverMessage}
70
+ ${hint}`,json:{...base,reason:AGENT_REASON.INVALID_ARGUMENTS,message:"The requested time range is outside the available retention.",hint},exitCode:2}}return err.status===403?{human:serverMessage,json:{...base,reason:AGENT_REASON.PERMISSION_DENIED,message:`You don't have access to ${source} logs for this project.`},exitCode:1}:err.status===400?{human:serverMessage,json:{...base,reason:AGENT_REASON.API_ERROR,message:`The API rejected the ${source} query.`},exitCode:1}:err.status===429?{human:serverMessage,json:{...base,reason:AGENT_REASON.RATE_LIMITED,message:`Couldn't retrieve ${source} logs: the request limit was reached.`},exitCode:1}:{human:serverMessage,json:{...base,reason:AGENT_REASON.API_ERROR,message:`Couldn't retrieve ${source} logs.`},exitCode:1}}function printLogsApiError(client,err,source){let failure=describeLogsApiError(client,err,source);if(!failure){printError(err);return}let status=isAPIError(err)?err.status:void 0;if(failure.json.reason===AGENT_REASON.API_ERROR&&status!==400||failure.json.reason===AGENT_REASON.RATE_LIMITED){printError(err);return}output_manager_default.error(failure.human)}var legacyLogsOptions=[{name:"search",shorthand:null,type:String,deprecated:!0},{name:"branch",shorthand:"b",type:String,deprecated:!0},{name:"no-branch",shorthand:null,type:Boolean,deprecated:!0},{name:"no-follow",shorthand:null,type:Boolean,deprecated:!0},{name:"request-id",shorthand:null,type:String,deprecated:!0},{name:"level",shorthand:null,type:[String],deprecated:!0},{name:"source",shorthand:null,type:[String],deprecated:!0},{name:"status-code",shorthand:null,type:String,deprecated:!0},{name:"expand",shorthand:"x",type:Boolean,deprecated:!0}],SIMPLE_VALUE=/^[\w.\-:/]+$/;function filterCommand(filter,source){return getCommandName(`logs${source?` ${source}`:""} --query '${filter}'`)}function alternatives(field,values){return values.length===1?`${field}:${values[0]}`:`${field}:(${values.join(" OR ")})`}function statusFilter(value){let statusClass=/^([1-5])xx$/i.exec(value);if(statusClass){let base=Number(statusClass[1])*100;return`httpStatus >= ${base} AND httpStatus < ${base+100}`}return/^\d{3}$/.test(value)?`httpStatus:${value}`:"httpStatus:500"}function sourceReplacement(values){let normalized=values.map(value=>value.trim().toLowerCase());return normalized.length>0&&normalized.every(v=>v==="static")?`--source was removed. Static and CDN traffic is in ${getCommandName("logs requests")}.`:normalized.length>0&&normalized.every(v=>v==="serverless")?`--source was removed. Use ${filterCommand("source:function")}.`:`--source was removed. Use ${filterCommand("source:<value>")}.
71
+ See ${getCommandName("logs runtime --help")} for filter fields and examples.`}function usedLegacyOptions(flags){return legacyLogsOptions.map(option=>option.name).filter(name=>flags[`--${name}`]!==void 0)}function getLegacyOptionError(flags){if(flags["--search"]!==void 0)return`--search was replaced by --query, which uses a new KQL-inspired syntax.
72
+ See ${getCommandName("logs runtime --help")} or ${getCommandName("logs requests --help")} for filter fields and examples.`;if(flags["--branch"]!==void 0)return"--branch is no longer supported. Remove it from the command.";let requestId=flags["--request-id"];if(requestId!==void 0){let value=SIMPLE_VALUE.test(requestId)?requestId:"<request-id>";return`--request-id was removed. Use ${filterCommand(`requestId:"${value}"`)}.`}let levels=flags["--level"];if(levels!==void 0){let values=levels.every(level=>SIMPLE_VALUE.test(level))?levels:["error"];return`--level was removed. Use ${filterCommand(alternatives("level",values))}.`}let sources=flags["--source"];if(sources!==void 0)return sourceReplacement(sources);let statusCode=flags["--status-code"];if(statusCode!==void 0)return`--status-code was removed. Use ${filterCommand(statusFilter(statusCode.trim()),"requests")}.`;if(flags["--expand"]!==void 0)return"--expand was removed. Full runtime messages are shown by default; remove the option.";for(let flag of["--no-branch","--no-follow"])if(flags[flag]!==void 0)return`${flag} was removed and has no effect. Remove it from the command.`}function quoteFilterValue(value){return JSON.stringify(value)}function composeFilter({source,deploymentId,environment,filter}){let clauses=[];if(deploymentId&&clauses.push(`deploymentId:${quoteFilterValue(deploymentId)}`),environment&&clauses.push(`environment:${quoteFilterValue(environment)}`),clauses.push(...source.fixedFilters),filter&&clauses.push(filter),clauses.length!==0)return clauses.map(clause=>`(${clause})`).join(" AND ")}function fetchEventPages2(client,query,limit,startCursor){return fetchEventPages(client,{event:query.source.event,ownerId:query.teamId,projectIds:[query.projectId],timeRange:{start:query.timeRange.start.toISOString(),end:query.timeRange.end.toISOString()},filter:query.filter,select:query.source.select,queryReason:query.source.queryReason},limit,startCursor)}var import_build_utils=__toESM(require_build_utils(),1);var NOT_LINKED_MESSAGE=`Your codebase isn't linked to a project on Vercel. Run ${getCommandName("link")}, or select a team and project with --scope <team> --project <name>.`;function fail(reason,error,exitCode2=1){return{error,exitCode:exitCode2,reason}}async function readLink(client,project){let orgId=(0,import_build_utils.getPlatformEnv)("ORG_ID"),projectId=(0,import_build_utils.getPlatformEnv)("PROJECT_ID");if(orgId&&projectId)return{link:{orgId,projectId}};if(orgId||projectId){let present=orgId?"`VERCEL_ORG_ID`":"`VERCEL_PROJECT_ID`",missing=orgId?"`VERCEL_PROJECT_ID`":"`VERCEL_ORG_ID`";return fail(AGENT_REASON.INVALID_CONFIGURATION,`You specified ${present} but you forgot to specify ${missing}. You need to specify both to select a custom project.`)}let path=await resolveProjectCwd(client.cwd);if(project){let selected=await getProjectLink(client,path,project,!0);if(selected)return{link:{orgId:selected.orgId,projectId:selected.projectId}}}let link=await getProjectLink(client,path);return{link:link?{orgId:link.orgId,projectId:link.projectId}:null}}async function teamLabel(client,teamId){try{return(await getTeamByIdOrSlug(client,teamId,{useCurrentTeam:!1})).slug||teamId}catch(err){return output_manager_default.debug(`Could not fetch team ${teamId}: ${err}`),teamId}}function isTeamId(ownerId){return ownerId.startsWith("team_")}var PERSONAL_ACCOUNT_MESSAGE="Logs are available for team-owned projects only. Select a team with --scope <team>.";async function resolveLogsTarget(client,{project:projectOption,deployment:deploymentOption,deploymentFromArgument=!1,quiet=!1}){let spinner=message=>{quiet||output_manager_default.spinner(message,1e3)},explicitScope=detectExplicitScope(client),explicitTeamId=explicitScope?client.config.currentTeam:void 0;if(explicitScope&&!explicitTeamId)return fail(AGENT_REASON.MISSING_SCOPE,PERSONAL_ACCOUNT_MESSAGE);let replacesLinkedProject=!!(projectOption||deploymentOption),link=null;if(!(explicitTeamId&&replacesLinkedProject)){let linkResult=await readLink(client,projectOption);if("error"in linkResult)return linkResult;link=linkResult.link}let teamId=explicitTeamId??link?.orgId;if(!teamId)return fail(AGENT_REASON.NOT_LINKED,NOT_LINKED_MESSAGE);if(!isTeamId(teamId))return fail(AGENT_REASON.MISSING_SCOPE,PERSONAL_ACCOUNT_MESSAGE);if(!replacesLinkedProject){if(!link)return fail(AGENT_REASON.NOT_LINKED,NOT_LINKED_MESSAGE);if(link.orgId!==teamId){let[requested,linked]=await Promise.all([teamLabel(client,teamId),teamLabel(client,link.orgId)]);return fail(AGENT_REASON.TARGET_CONFLICT,`This directory is linked to a project in team ${linked}, but ${requested} was selected.
73
+ Select a project in ${requested} with --project <name>, select the linked team with --scope ${linked}, or run ${getCommandName("link")} to relink.`)}}client.config.currentTeam=teamId;let labelPromise=teamLabel(client,teamId),deploymentId,deploymentProjectId;if(deploymentOption){let label2=await labelPromise;spinner(`Resolving deployment "${deploymentOption}"`);try{let deployment=await getDeployment(client,label2,deploymentOption);deploymentId=deployment.id,deploymentProjectId=deployment.projectId}catch(err){if(err instanceof DeploymentNotFound||err instanceof DeploymentPermissionDenied)return fail(AGENT_REASON.NOT_FOUND,`Deployment not found: ${deploymentOption} under ${label2}`);if(err instanceof InvalidDeploymentId)return fail(AGENT_REASON.NOT_FOUND,`Invalid deployment ID or URL: ${deploymentOption}`);throw err}finally{output_manager_default.stopSpinner()}if(!deploymentProjectId)return fail(AGENT_REASON.NOT_FOUND,`Deployment ${deploymentOption} is not associated with a project.`)}let projectIdOrName=projectOption??deploymentProjectId??link?.projectId;if(!projectIdOrName)return fail(AGENT_REASON.NOT_LINKED,NOT_LINKED_MESSAGE);spinner("Retrieving project\u2026");let project;try{project=await getProjectByNameOrId(client,projectIdOrName,teamId)}finally{output_manager_default.stopSpinner()}let label=await labelPromise;if(project instanceof ProjectNotFound)return!projectOption&&!deploymentProjectId?fail(AGENT_REASON.PROJECT_NOT_FOUND,`The linked project ${projectIdOrName} was not found under ${label}. Run ${getCommandName("link")} to relink, or select a project with --project <name>.`):fail(AGENT_REASON.PROJECT_NOT_FOUND,`Project not found: ${projectIdOrName} under ${label}`);if(deploymentProjectId&&project.id!==deploymentProjectId){let deploymentInput=deploymentFromArgument?"the deployment argument":"--deployment";return fail(AGENT_REASON.TARGET_CONFLICT,`Deployment ${deploymentOption} does not belong to project ${project.name}. Remove ${deploymentInput} or --project.`)}return{target:{teamId,teamLabel:label,projectId:project.id,projectName:project.name,deploymentId}}}var import_ms2=__toESM(require_ms(),1);function parseBound(flag,value,now){try{return parseTimeFlag(value,now)}catch{return`Invalid time format "${value}" for ${flag}. Use a relative duration (1h, 30m, 2d), an ISO 8601 datetime, or now.`}}function resolveLogsTimeRange({since,until,now,wholeSeconds}){let end=until!==void 0?parseBound("--until",until,now):new Date(now);if(typeof end=="string")return{error:end};let start=since!==void 0?parseBound("--since",since,now):new Date(end.getTime()-(0,import_ms2.default)(DEFAULT_WINDOW));if(typeof start=="string")return{error:start};let range=wholeSeconds?{start:floorToSecond(start),end:floorToSecond(end)}:{start,end};return range.start.getTime()>=range.end.getTime()?{error:[`The time range is empty: the start (${range.start.toISOString()}) must be before the end (${range.end.toISOString()}).`,"Use --since to set an earlier start."].join(`
74
+ `)}:{range}}function floorToSecond(date){return new Date(Math.floor(date.getTime()/1e3)*1e3)}var COMMAND_CONFIG={runtime:getCommandAliases(runtimeSubcommand),requests:getCommandAliases(requestsSubcommand)},SUBCOMMAND_METADATA={runtime:runtimeSubcommand,requests:requestsSubcommand},SOURCE_TITLES={runtime:"Runtime logs",requests:"CDN requests"},CONTINUATION_CONFLICTS=["--project","--deployment","--environment","--query","--since","--until"];function looksLikeDeployment(value){return value.startsWith("dpl_")||value.includes(".")||/^https?:\/\//i.test(value)}function deploymentHost(value){try{return new URL(value).hostname}catch{return value}}function argvRequestsJson(argv){let args=argv.slice(2);for(let[index,arg]of args.entries()){if(arg==="--")break;if(arg==="--json")return!0;if(arg.startsWith("--json=")){if(arg.slice(7).toLowerCase()!=="false")return!0;continue}if(arg.toLowerCase()==="--format=json"||arg.startsWith("-F=")&&arg.slice(3).toLowerCase()==="json"||(arg==="--format"||arg==="-F")&&args[index+1]?.toLowerCase()==="json")return!0}return!1}function isRemovedJsonShorthandError(err){return isArgumentError(err)&&err.invalidOption==="-j"}function argvHasScopeFlag(argv){for(let arg of argv.slice(2)){if(arg==="--")break;if(arg==="--scope"||arg==="--team"||arg==="-S"||arg==="-T"||arg.startsWith("--scope=")||arg.startsWith("--team="))return!0}return!1}function deploymentFlag(value){return`--deployment ${quoteArg(deploymentHost(value))}`}function positionalError(value,explicitSource){let sourcePart=explicitSource?` ${explicitSource}`:"";return looksLikeDeployment(value)?`Select a deployment with --deployment: ${getCommandName(`logs${sourcePart} ${deploymentFlag(value)}`)}`:explicitSource?`Unexpected argument "${value}". ${getCommandName(`logs ${explicitSource}`)} takes no arguments.`:`Unknown data source "${value}". Use runtime or requests. See ${getCommandName("logs --help")}.`}function isClosedOutputError(err){return err instanceof Error&&(err.code==="EPIPE"||err.message==="Output stream closed.")}function streamGapMessage(interval){return`Results omit ${sanitize(interval.start)} to ${sanitize(interval.end)}: data for this period is unavailable to this query.`}async function logs(client){let commandStart=Date.now(),telemetry=new LogsTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArguments;try{parsedArguments=parseArguments(client.argv.slice(2),getFlagsSpecification([...logsCommand.options,...legacyLogsOptions]))}catch(err){let removedShorthand=isRemovedJsonShorthandError(err);removedShorthand&&telemetry.trackCliLegacyOption("j");let message=removedShorthand?"-j was removed. Use --json.":err instanceof Error?err.message:String(err);return client.nonInteractive||argvRequestsJson(client.argv)?writeJsonError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message,next:[{command:"vercel logs --help"}]}):removedShorthand?(output_manager_default.error(message),2):(printError(err),output_manager_default.print(`Run ${getCommandName("logs --help")} for usage.
75
+ `),2)}parsedArguments.args[0]==="log"&&warnDeprecatedSubcommand(client,"log","logs");let{flags}=parsedArguments,formatResult=validateJsonOutput(flags),json=!!flags["--json"]||formatResult.valid&&formatResult.jsonOutput||argvRequestsJson(client.argv)||client.nonInteractive,{subcommand,subcommandOriginal,args}=getSubcommand(parsedArguments.args.slice(1),COMMAND_CONFIG),explicitSource=subcommand==="runtime"||subcommand==="requests"?subcommand:void 0;if(flags["--help"])return telemetry.trackCliFlagHelp("logs",explicitSource&&subcommandOriginal),output_manager_default.print(help(explicitSource?SUBCOMMAND_METADATA[explicitSource]:logsCommand,{parent:explicitSource?logsCommand:void 0,columns:client.stderr.columns})),0;let nextOption=flags["--next"],trimmedNext=nextOption?.trim(),continuation=trimmedNext?decodeContinuation(trimmedNext):void 0,continuationSource=continuation?sourceForEvent(continuation.event):void 0,sourceName=explicitSource??continuationSource?.name??"runtime";sourceName==="requests"?telemetry.trackCliSubcommandRequests(subcommandOriginal):telemetry.trackCliSubcommandRuntime(subcommandOriginal);let projectOption=flags["--project"],deploymentOption=flags["--deployment"],environmentOption=flags["--environment"],queryOption=flags["--query"],sinceOption=flags["--since"],untilOption=flags["--until"],limitOption=flags["--limit"];telemetry.trackCliOptionProject(projectOption),telemetry.trackCliOptionDeployment(deploymentOption),telemetry.trackCliOptionEnvironment(environmentOption),telemetry.trackCliOptionQuery(queryOption),telemetry.trackCliOptionSince(sinceOption),telemetry.trackCliOptionUntil(untilOption),telemetry.trackCliOptionLimit(limitOption),telemetry.trackCliOptionNext(nextOption),telemetry.trackCliOptionFormat(flags["--format"]),telemetry.trackCliFlagJson(flags["--json"]),telemetry.trackCliFlagFollow(flags["--follow"]);let fail2=(reason,message,exitCode2,extra={})=>(output_manager_default.stopSpinner(),json?writeJsonError(client,{status:"error",reason,message,...extra},exitCode2):(output_manager_default.error(message),exitCode2??(reason===AGENT_REASON.INVALID_ARGUMENTS?2:1))),usageError=message=>fail2(AGENT_REASON.INVALID_ARGUMENTS,message,2),failUnexpected=err=>{if(output_manager_default.stopSpinner(),!json)return printError(err),1;let failure=describeLogsApiError(client,err,sourceName);return failure?writeJsonError(client,failure.json,failure.exitCode):writeJsonError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:(0,import_error_utils2.errorToString)(err)})};if(!formatResult.valid)return usageError(formatResult.error);let legacyOptions=usedLegacyOptions(flags);for(let name of legacyOptions)telemetry.trackCliLegacyOption(name);let legacyError=getLegacyOptionError(flags);if(legacyError)return usageError(legacyError);let positionalDeployment;if(args.length>0){if(telemetry.trackCliArgumentPositional(looksLikeDeployment(args[0])?"deployment":"unknown"),args.length>1||!looksLikeDeployment(args[0]))return usageError(positionalError(args[0],explicitSource));if(deploymentOption!==void 0)return usageError("Pass the deployment once, with --deployment. Remove the deployment argument.");if(nextOption!==void 0)return usageError("A deployment argument can't be combined with --next. The cursor keeps the original target, filter, and time window.");positionalDeployment=args[0]}let upfrontWarnings=[],warn=(reason,message,data)=>{json?upfrontWarnings.push(warningLine({reason,message,data})):output_manager_default.warning(message)};flags["--follow"]&&warn("deprecated","--follow is deprecated and no longer streams logs. Showing a bounded result; remove --follow."),positionalDeployment!==void 0&&warn("deprecated",`Passing a deployment as an argument is deprecated. Use ${deploymentFlag(positionalDeployment)}.`);let limit;if(typeof limitOption=="number"&&Number.isInteger(limitOption)&&limitOption>MAX_LIMIT)limit=MAX_LIMIT,warn("limit_clamped",`--limit ${limitOption} is above the maximum of ${MAX_LIMIT}. Using ${MAX_LIMIT}.`,{requested:limitOption,limit:MAX_LIMIT});else{let limitResult=validateIntegerRangeWithDefault(limitOption,{flag:"--limit",min:1,max:MAX_LIMIT,defaultValue:DEFAULT_LIMIT});if(!limitResult.valid)return usageError(limitResult.message);limit=limitResult.value}let plan;if(nextOption!==void 0){let planResult=await planContinuation();if(typeof planResult=="number")return planResult;plan=planResult}else{let planResult=await planQuery();if(typeof planResult=="number")return planResult;plan=planResult}async function planContinuation(){if(!trimmedNext)return usageError("--next must not be empty.");let invalidCursor=`--next is not a valid cursor. Use the pagination.next value from the summary of a previous ${getCommandName("logs --json")} run.`;if(!continuation||!continuationSource)return usageError(invalidCursor);let parsed=parseContinuation(continuation);if(!parsed)return usageError(invalidCursor);if(explicitSource&&explicitSource!==continuationSource.name)return usageError(`The --next cursor continues a ${continuationSource.name} query. Use ${getCommandName("logs --next <CURSOR>")} without "${explicitSource}".`);for(let flag of CONTINUATION_CONFLICTS)if(flags[flag]!==void 0)return usageError(`${flag} can't be combined with --next. The cursor keeps the original target, filter, and time window.`);if(argvHasScopeFlag(client.argv)&&client.config.currentTeam!==continuation.ownerId)return usageError("The --next cursor belongs to a different team than --scope. Remove --scope to use the team in the cursor.");let{teamId,projectId,timeRange:timeRange2}=parsed;return{source:continuationSource,teamId,projectId,timeRange:timeRange2,filter:continuation.filter,startCursor:continuation.cursor,context:async()=>{let[label,project]=await Promise.all([teamLabel(client,teamId),getProjectByNameOrId(client,projectId,teamId).catch(()=>null)]),projectName=project&&!(project instanceof ProjectNotFound)?project.name:projectId;return`${SOURCE_TITLES[continuationSource.name]} for ${label}/${projectName} (continued), ${formatWindow(timeRange2)}`}}}async function planQuery(){let source2=logsSources[sourceName],filter=queryOption?.trim();if(queryOption!==void 0&&!filter)return usageError("--query must not be empty.");let environment=environmentOption?.trim();if(environmentOption!==void 0&&!environment)return usageError("--environment must not be empty.");let deploymentInput=deploymentOption??positionalDeployment,deployment=deploymentInput?.trim();if(deploymentInput!==void 0&&!deployment)return usageError("--deployment must not be empty.");let project=projectOption?.trim();if(projectOption!==void 0&&!project)return usageError("--project must not be empty.");let timeRangeResult=resolveLogsTimeRange({since:sinceOption,until:untilOption,now:commandStart,wholeSeconds:source2.wholeSecondBounds});if("error"in timeRangeResult)return usageError(timeRangeResult.error);let timeRange2=timeRangeResult.range,targetResult;try{targetResult=await resolveLogsTarget(client,{project,deployment:deployment&&deploymentHost(deployment),deploymentFromArgument:positionalDeployment!==void 0,quiet:json})}catch(err){return failUnexpected(err)}if("error"in targetResult)return fail2(targetResult.reason,targetResult.error,targetResult.exitCode);let{target}=targetResult;return{source:source2,teamId:target.teamId,projectId:target.projectId,timeRange:timeRange2,filter:composeFilter({source:source2,deploymentId:target.deploymentId,environment,filter}),context:async()=>{let details=[target.deploymentId?`deployment ${target.deploymentId}`:void 0,environment?`environment ${environment}`:void 0].filter(Boolean);return`${SOURCE_TITLES[source2.name]} for ${target.teamLabel}/${target.projectName}`+(details.length>0?` (${details.join(", ")})`:"")+`, ${formatWindow(timeRange2)}`}}}let{source,timeRange}=plan,serializedTimeRange=serializeTimeRange(timeRange),tokenFor=cursor=>encodeContinuation({event:source.event,ownerId:plan.teamId,projectIds:[plan.projectId],timeRange:serializedTimeRange,...plan.filter!==void 0?{filter:plan.filter}:{},order:"desc",cursor}),write=async text2=>{try{return await writeWithBackpressure(client.stdout,text2),!0}catch(err){if(isClosedOutputError(err))return!1;throw err}};json||output_manager_default.print(import_chalk5.default.dim(`${await plan.context()}
76
+ `));let pages=fetchEventPages2(client,{source,teamId:plan.teamId,projectId:plan.projectId,timeRange,filter:plan.filter},limit,plan.startCursor),renderer=json?void 0:createRenderer(source.name,timeRange),excludedIntervals=new Map,written=0,pagesFetched=0,resumeCursor=plan.startCursor,result;try{if(upfrontWarnings.length>0&&!await write(upfrontWarnings.join("")))return 0;for(;;){!json&&pagesFetched===0&&output_manager_default.spinner(`Fetching ${source.recordsLabel}\u2026`,1e3);let next;try{next=await pages.next()}catch(err){return reportFetchFailure(err)}if(output_manager_default.stopSpinner(),pagesFetched+=1,next.done){result=next.value;break}for(let interval of next.value.excludedIntervals)excludedIntervals.set(`${interval.start}/${interval.end}`,interval);let{events}=next.value,chunk="";if(renderer){written===0&&events.length>0&&(chunk+=`${renderer.header()}
77
+ `);for(let event of events)chunk+=`${renderer.row(event)}
78
+ `}else for(let event of events)chunk+=recordLine(source.recordType,event);if(chunk&&!await write(chunk))return 0;written+=events.length,resumeCursor=next.value.nextCursor??void 0}let intervals=sortIntervals(excludedIntervals.values()),nextToken=result.nextCursor?tokenFor(result.nextCursor):null;if(json){let tail=intervals.map(interval=>warningLine({reason:"stream_gap",message:streamGapMessage(interval),data:{start:interval.start,end:interval.end}})).join("")+summaryLine({recordsReturned:written,timeRange:serializedTimeRange,pagination:{hasMore:result.hasMore,next:nextToken},excludedIntervals:intervals});return await write(tail),0}for(let interval of intervals)output_manager_default.warning(streamGapMessage(interval));if(written===0){let notes=[`No ${source.recordsLabel} found in this window. Use an earlier --since to search further back.`];source.fixedFilters.includes(BACKGROUND_FUNCTION_EXCLUSION)&&notes.push("Background function executions are always excluded."),output_manager_default.print(import_chalk5.default.dim(`${notes.join(`
79
+ `)}
80
+ `))}return result.hasMore&&(output_manager_default.log(`More ${source.recordsLabel} matched.`),nextToken&&(output_manager_default.print(`
81
+ `),printNextPageCommand(getCommandNamePlain(`logs --next ${nextToken}`))),(!nextToken||limit===MAX_LIMIT)&&output_manager_default.print(`Narrow --query, --since, or --until to see the rest.
82
+ `)),0}catch(err){return fail2("output_error",`Couldn't write the output: ${(0,import_error_utils2.errorToString)(err)}`,1)}function reportFetchFailure(err){output_manager_default.stopSpinner();let intervals=sortIntervals(excludedIntervals.values()),progress=written>0?{recordsReturned:written,outputIncomplete:!0,timeRange:serializedTimeRange,pagination:{hasMore:!0,next:resumeCursor?tokenFor(resumeCursor):null},excludedIntervals:intervals}:void 0,knownError=err instanceof RecordTooLargeError||err instanceof InvalidEventsResponseError;if(json){if(knownError)return writeJsonError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:err.message,...progress?{data:progress}:{}});let failure=describeLogsApiError(client,err,source.name),payload=failure?failure.json:{status:"error",reason:AGENT_REASON.API_ERROR,message:(0,import_error_utils2.errorToString)(err)};return writeJsonError(client,progress?{...payload,data:{...payload.data,...progress}}:payload,failure?.exitCode??1)}let exitCode2=1;return knownError?output_manager_default.error(err.message):(exitCode2=describeLogsApiError(client,err,source.name)?.exitCode??1,printLogsApiError(client,err,source.name)),progress&&(output_manager_default.error(`Output is incomplete: ${written} ${source.recordsLabel} were printed before the failure.`),progress.pagination.next&&output_manager_default.print(`Retry the failed page:
83
+ ${getCommandName(`logs --next ${progress.pagination.next}`)}
84
+ `)),exitCode2}}function parseContinuation(continuation){let projectIds=continuation.projectIds??[];if(projectIds.length!==1||continuation.order!=="desc")return;let start=new Date(continuation.timeRange.start),end=new Date(continuation.timeRange.end);if(!(Number.isNaN(start.getTime())||Number.isNaN(end.getTime())||start.getTime()>=end.getTime()||start.toISOString()!==continuation.timeRange.start||end.toISOString()!==continuation.timeRange.end))return{teamId:continuation.ownerId,projectId:projectIds[0],timeRange:{start,end}}}export{inspect,logs};