@vercel/cli-support 65.9.0 → 65.10.0-snapshot-c80a43d75dc7

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 (271) hide show
  1. package/dist/chunks/add-A3SN7KWS.js +8 -0
  2. package/dist/chunks/add-RFPJCD35.js +8 -0
  3. package/dist/chunks/add-TOKTANDW.js +8 -0
  4. package/dist/chunks/build-25I6XOV7.js +7 -0
  5. package/dist/chunks/{chunk-5M3WBT3N.js → chunk-22UXDTCE.js} +1 -1
  6. package/dist/chunks/chunk-2AMO2VMV.js +68 -0
  7. package/dist/chunks/{chunk-U6KJOCXX.js → chunk-2DHDKWYN.js} +1 -1
  8. package/dist/chunks/chunk-2EFBGKRC.js +8 -0
  9. package/dist/chunks/{chunk-UOQGI6CL.js → chunk-2HLYY3KF.js} +1 -1
  10. package/dist/chunks/{chunk-7PGGP2QT.js → chunk-2JCJP43W.js} +1 -1
  11. package/dist/chunks/chunk-2VBFQZ72.js +7 -0
  12. package/dist/chunks/{chunk-EXLKCL5I.js → chunk-3AX7ZZJ7.js} +1 -1
  13. package/dist/chunks/{chunk-CMHL66LK.js → chunk-3F5BOG4A.js} +1 -1
  14. package/dist/chunks/chunk-3PXE5BLH.js +7 -0
  15. package/dist/chunks/{chunk-BZNRYQ6U.js → chunk-3WYSEF57.js} +1 -1
  16. package/dist/chunks/{chunk-EW62WSXG.js → chunk-4JWAXIIN.js} +1 -1
  17. package/dist/chunks/{chunk-R5ZLTWKB.js → chunk-4LGAV2WN.js} +1 -1
  18. package/dist/chunks/{chunk-7WY7ASKE.js → chunk-56UH6NQ3.js} +1 -1
  19. package/dist/chunks/{chunk-MXURT5TX.js → chunk-5I7CC45F.js} +1 -1
  20. package/dist/chunks/{chunk-QQA2OMXJ.js → chunk-5KE67O45.js} +1 -1
  21. package/dist/chunks/{chunk-4XJVEKTD.js → chunk-6AJWRPTY.js} +1 -1
  22. package/dist/chunks/{chunk-EBBDSEEU.js → chunk-6RUAAORO.js} +1 -1
  23. package/dist/chunks/{chunk-TRZDIAX3.js → chunk-77LSSWXL.js} +1 -1
  24. package/dist/chunks/{chunk-2JXQWOK5.js → chunk-7UFI6OYF.js} +1 -1
  25. package/dist/chunks/{chunk-EVH5524J.js → chunk-7ULLVH2G.js} +1 -1
  26. package/dist/chunks/{chunk-GHEGWXH2.js → chunk-ANCWFEOM.js} +1 -1
  27. package/dist/chunks/{chunk-7ULVGK67.js → chunk-BB5UMZMF.js} +1 -1
  28. package/dist/chunks/{chunk-4Z3APEBF.js → chunk-BJXLR2RE.js} +1 -1
  29. package/dist/chunks/{chunk-Y6WXTTZS.js → chunk-BPRGAX62.js} +1 -1
  30. package/dist/chunks/{chunk-G6HUSV7F.js → chunk-BZV2S4H6.js} +1 -1
  31. package/dist/chunks/{chunk-QY5RG6BB.js → chunk-C24IKNZN.js} +1 -1
  32. package/dist/chunks/chunk-C4N4LKPM.js +7 -0
  33. package/dist/chunks/chunk-CFYTFXX6.js +7 -0
  34. package/dist/chunks/chunk-CKTLP5GX.js +7 -0
  35. package/dist/chunks/{chunk-GCPPL24C.js → chunk-CUBRYWA2.js} +1 -1
  36. package/dist/chunks/{chunk-M73W4XNR.js → chunk-CZOD25BC.js} +1 -1
  37. package/dist/chunks/{chunk-UIJYRI3G.js → chunk-DBPN2VGJ.js} +1 -1
  38. package/dist/chunks/{chunk-IFCMWIRB.js → chunk-DRLGZXAL.js} +1 -1
  39. package/dist/chunks/{chunk-QKWJN6OE.js → chunk-DX2OHM56.js} +1 -1
  40. package/dist/chunks/{chunk-XBWISZCG.js → chunk-EJ34DLV4.js} +1 -1
  41. package/dist/chunks/{chunk-T5TOBY4D.js → chunk-EJZNJN4N.js} +1 -1
  42. package/dist/chunks/{chunk-TMXIVQ45.js → chunk-F2LNGJOZ.js} +1 -1
  43. package/dist/chunks/{chunk-G3LWP5CH.js → chunk-FAVZ6WVS.js} +1 -1
  44. package/dist/chunks/{chunk-D4ZEJM3T.js → chunk-FI5O4WHD.js} +1 -1
  45. package/dist/chunks/{chunk-UVE5COCG.js → chunk-FOQD62WW.js} +1 -1
  46. package/dist/chunks/{chunk-PBX7RJ2K.js → chunk-FPYHB76H.js} +1 -1
  47. package/dist/chunks/{chunk-4SJU5QSD.js → chunk-FQVIWQ6M.js} +1 -1
  48. package/dist/chunks/chunk-FTACGWII.js +14 -0
  49. package/dist/chunks/{chunk-FWTBSC7Z.js → chunk-FY4ORPZH.js} +1 -1
  50. package/dist/chunks/{chunk-VBKFCR5W.js → chunk-G5T6UQAL.js} +1 -1
  51. package/dist/chunks/chunk-G7H33IKQ.js +10 -0
  52. package/dist/chunks/{chunk-33U57CNE.js → chunk-GKALP6QD.js} +1 -1
  53. package/dist/chunks/{chunk-WGWGDC3N.js → chunk-GPISCZ2P.js} +1 -1
  54. package/dist/chunks/{chunk-DUPAU76G.js → chunk-HJ45TAM4.js} +1 -1
  55. package/dist/chunks/chunk-HR462OEG.js +10 -0
  56. package/dist/chunks/{chunk-JOXGYP5S.js → chunk-JVNIDSP5.js} +1 -1
  57. package/dist/chunks/chunk-KMPDQE4Q.js +7 -0
  58. package/dist/chunks/{chunk-OZPBJWYU.js → chunk-KNAOHPOI.js} +8 -8
  59. package/dist/chunks/{chunk-4OTI552J.js → chunk-KWXJIVBG.js} +1 -1
  60. package/dist/chunks/{chunk-QJAIUZVZ.js → chunk-L4QQTYUI.js} +5 -5
  61. package/dist/chunks/{chunk-43P35KUA.js → chunk-L6CZL2IQ.js} +1 -1
  62. package/dist/chunks/{chunk-6RCFEJZK.js → chunk-LC4BSDDG.js} +1 -1
  63. package/dist/chunks/{chunk-ZERZX6BZ.js → chunk-LQAQD5LG.js} +2 -2
  64. package/dist/chunks/{chunk-2DODPQ5J.js → chunk-MBL7MWP5.js} +1 -1
  65. package/dist/chunks/{chunk-VZKQP67Q.js → chunk-MKYFAYCD.js} +1 -1
  66. package/dist/chunks/{chunk-D2JHIOVH.js → chunk-MOF4QNZH.js} +1 -1
  67. package/dist/chunks/{chunk-32AS5X7G.js → chunk-MUNGQJGO.js} +1 -1
  68. package/dist/chunks/{chunk-UZTDRGCW.js → chunk-NAEY6HG5.js} +1 -1
  69. package/dist/chunks/{chunk-E5CN62HO.js → chunk-NAJCRBQB.js} +1 -1
  70. package/dist/chunks/{chunk-GN5IAG3M.js → chunk-NGHFFOD2.js} +1 -1
  71. package/dist/chunks/{chunk-4BZ3DNGM.js → chunk-NLKM5LR5.js} +1 -1
  72. package/dist/chunks/{chunk-NEUQZYBL.js → chunk-PMEYNJU2.js} +1 -1
  73. package/dist/chunks/{chunk-5K4UTJSY.js → chunk-PXQAWH7E.js} +1 -1
  74. package/dist/chunks/{chunk-SNCQOAFU.js → chunk-Q25FOMOX.js} +1 -1
  75. package/dist/chunks/{chunk-BWS3ZOHJ.js → chunk-Q4GX2UTG.js} +1 -1
  76. package/dist/chunks/{chunk-CBVVVYUP.js → chunk-QCIIUQV3.js} +1 -1
  77. package/dist/chunks/chunk-QGZZL6YY.js +7 -0
  78. package/dist/chunks/{chunk-GCXUSXB4.js → chunk-QVMU7ZKQ.js} +1 -1
  79. package/dist/chunks/{chunk-DASHFOKO.js → chunk-QXYCICNB.js} +1 -1
  80. package/dist/chunks/{chunk-ZGKJLJ47.js → chunk-R2P4PNRQ.js} +1 -1
  81. package/dist/chunks/{chunk-Y5YXAXK3.js → chunk-R3D4M5RE.js} +1 -1
  82. package/dist/chunks/{chunk-H34SGIVS.js → chunk-S5JBQCBA.js} +1 -1
  83. package/dist/chunks/chunk-SHY7P3C6.js +10 -0
  84. package/dist/chunks/{chunk-QBOY2CXL.js → chunk-SODZSOOL.js} +1 -1
  85. package/dist/chunks/{chunk-TGPYWWX3.js → chunk-SXEOJSZQ.js} +1 -1
  86. package/dist/chunks/{chunk-KV2DYFUG.js → chunk-T7HE23VK.js} +1 -1
  87. package/dist/chunks/{chunk-2H4DUZJZ.js → chunk-TL4ZLZ2Q.js} +1 -1
  88. package/dist/chunks/{chunk-DUJAQS7I.js → chunk-TNNEKGGF.js} +1 -1
  89. package/dist/chunks/{chunk-USYEDO7R.js → chunk-TNUQME3L.js} +1 -1
  90. package/dist/chunks/chunk-TZ6MSTOI.js +7 -0
  91. package/dist/chunks/chunk-U6XJYQJS.js +7 -0
  92. package/dist/chunks/chunk-UWJ3UPS5.js +11 -0
  93. package/dist/chunks/chunk-V32V4SXB.js +7 -0
  94. package/dist/chunks/{chunk-ECQKK4JU.js → chunk-VD2FK6OF.js} +1 -1
  95. package/dist/chunks/chunk-VPUYTI5E.js +25 -0
  96. package/dist/chunks/{chunk-2JNDJISE.js → chunk-VYRMHE34.js} +1 -1
  97. package/dist/chunks/{chunk-WFOJ2LEA.js → chunk-VZGTL3YC.js} +1 -1
  98. package/dist/chunks/{chunk-ZBZPCKTW.js → chunk-W5GHMAHP.js} +1 -1
  99. package/dist/chunks/{chunk-ZCXKEZS4.js → chunk-WHUZRBYL.js} +1 -1
  100. package/dist/chunks/{chunk-BRETAWE7.js → chunk-XEXOSJIU.js} +1 -1
  101. package/dist/chunks/{chunk-JMAXX2I6.js → chunk-XGOELSYA.js} +1 -1
  102. package/dist/chunks/{chunk-TCB4XM23.js → chunk-Y57DK3ZN.js} +1 -1
  103. package/dist/chunks/{chunk-WKYFWE37.js → chunk-YO6SJCZP.js} +1 -1
  104. package/dist/chunks/chunk-YOWMZJPA.js +7 -0
  105. package/dist/chunks/{chunk-EDOTKQ7L.js → chunk-ZGQNI22M.js} +1 -1
  106. package/dist/chunks/chunk-ZUI5EMXD.js +11 -0
  107. package/dist/chunks/clear-B764MEAM.js +8 -0
  108. package/dist/chunks/{compile-vercel-config-DRTOWZK6.js → compile-vercel-config-EWCB7SIC.js} +1 -1
  109. package/dist/chunks/{config-MNRKCDQA.js → config-CW4JO67Q.js} +1 -1
  110. package/dist/chunks/config-D4WY2HG4.js +8 -0
  111. package/dist/chunks/delete-SKYFHUWD.js +10 -0
  112. package/dist/chunks/delete-W3GMFAKA.js +9 -0
  113. package/dist/chunks/{detect-services-GXKWIX52.js → detect-services-3TRRRLES.js} +1 -1
  114. package/dist/chunks/disable-EBPZ2LYC.js +7 -0
  115. package/dist/chunks/discard-SMVPENSP.js +14 -0
  116. package/dist/chunks/edit-A3M3GBGP.js +8 -0
  117. package/dist/chunks/edit-CGTNGJKY.js +9 -0
  118. package/dist/chunks/enable-6A5THWDP.js +7 -0
  119. package/dist/chunks/{export-N5F7EY7B.js → export-R5IUWAW5.js} +1 -1
  120. package/dist/chunks/future-CPJUUZTU.js +7 -0
  121. package/dist/chunks/generate-cert-for-deploy-Z3HCAR5H.js +7 -0
  122. package/dist/chunks/image-VNSN2SKE.js +7 -0
  123. package/dist/chunks/{import-builders-OAGJKQNW.js → import-builders-GPJQAMXT.js} +1 -1
  124. package/dist/chunks/{inspect-UDUI3ETL.js → inspect-6FEL5DYV.js} +1 -1
  125. package/dist/chunks/inspect-BO2ACFEG.js +13 -0
  126. package/dist/chunks/{inspect-35WHAXL2.js → inspect-TEPB7KVC.js} +1 -1
  127. package/dist/chunks/inspect-WC2C4MDP.js +9 -0
  128. package/dist/chunks/{inspect-GX34WQGR.js → inspect-WWOHWQKS.js} +1 -1
  129. package/dist/chunks/{list-VVND632B.js → list-4KSJEP23.js} +1 -1
  130. package/dist/chunks/{list-BINT67HQ.js → list-C5GUZ35P.js} +1 -1
  131. package/dist/chunks/list-EZWZSVM4.js +12 -0
  132. package/dist/chunks/login-PDZT4PQR.js +7 -0
  133. package/dist/chunks/login-ZNCCVA4H.js +9 -0
  134. package/dist/chunks/logs-YKQMUTMG.js +7 -0
  135. package/dist/chunks/{ls-2MJY6EKD.js → ls-3HUS6KS6.js} +1 -1
  136. package/dist/chunks/ls-KQJYKADC.js +8 -0
  137. package/dist/chunks/{ls-7OZ5TSNW.js → ls-LYVPEIIT.js} +1 -1
  138. package/dist/chunks/{ls-6HYUGM62.js → ls-RBPRE6BF.js} +1 -1
  139. package/dist/chunks/{ls-YT3MWU4U.js → ls-TASQJDLF.js} +1 -1
  140. package/dist/chunks/{ls-HTNWWU45.js → ls-WX4BJRDV.js} +1 -1
  141. package/dist/chunks/ls-ZP7OBTTV.js +11 -0
  142. package/dist/chunks/mutate-5N6DMBYS.js +9 -0
  143. package/dist/chunks/{native-self-update-75UJCHGZ.js → native-self-update-7OAY4AVR.js} +1 -1
  144. package/dist/chunks/notifications-OVFMQLHL.js +7 -0
  145. package/dist/chunks/open-DOBOKUEK.js +7 -0
  146. package/dist/chunks/{openapi-KYC6JIXI.js → openapi-YAZA3237.js} +1 -1
  147. package/dist/chunks/permissions-PHCOVDWK.js +7 -0
  148. package/dist/chunks/{plugin-offer-URT5JNEU.js → plugin-offer-M7KJSJU6.js} +1 -1
  149. package/dist/chunks/prompt-missing-credentials-RTNCHH6Y.js +7 -0
  150. package/dist/chunks/{publish-LH5CIXCP.js → publish-JIFRJNDV.js} +1 -1
  151. package/dist/chunks/pull-HLJSW3W4.js +7 -0
  152. package/dist/chunks/purchase-domain-if-available-3EBONBX3.js +7 -0
  153. package/dist/chunks/push-ZN6CBJLJ.js +7 -0
  154. package/dist/chunks/{query-POTX2HYL.js → query-MT6ID6C7.js} +1 -1
  155. package/dist/chunks/reauthenticate-OXFB64PS.js +7 -0
  156. package/dist/chunks/reorder-N2L43LXD.js +10 -0
  157. package/dist/chunks/reply-WBR3XXBJ.js +9 -0
  158. package/dist/chunks/resolve-NMR24Y67.js +12 -0
  159. package/dist/chunks/resolve-agent-team-KRTLBC5D.js +7 -0
  160. package/dist/chunks/{restore-L3T5KOG7.js → restore-AKAVSLAK.js} +1 -1
  161. package/dist/chunks/rm-DGMHU3CU.js +8 -0
  162. package/dist/chunks/rm-ERBTFH3G.js +8 -0
  163. package/dist/chunks/rm-H2T7HB3F.js +8 -0
  164. package/dist/chunks/rm-Q3ZXEMGI.js +8 -0
  165. package/dist/chunks/rm-TNGYCAFJ.js +8 -0
  166. package/dist/chunks/{routes-S75L7Z7A.js → routes-4WGST7VN.js} +1 -1
  167. package/dist/chunks/rule-inspect-ZVHPS2PL.js +8 -0
  168. package/dist/chunks/{schema-P4T4GQBF.js → schema-TSHU5NN6.js} +1 -1
  169. package/dist/chunks/{schema-TOVLKRPJ.js → schema-YUXTIJSB.js} +1 -1
  170. package/dist/chunks/select-org-35NFUKXO.js +7 -0
  171. package/dist/chunks/set-PP5K4NBO.js +7 -0
  172. package/dist/chunks/setup-and-link-ACSPPTME.js +7 -0
  173. package/dist/chunks/{skills-DZYJV7BE.js → skills-X5TPVYXW.js} +1 -1
  174. package/dist/chunks/{statuspage-45LJ2XYT.js → statuspage-KHTMA4WL.js} +1 -1
  175. package/dist/chunks/tags-6QB3FP3B.js +7 -0
  176. package/dist/chunks/{types-YA6BOCRV.js → types-SENK43U4.js} +1 -1
  177. package/dist/chunks/{update-YSAO36V7.js → update-QA3NLSTV.js} +1 -1
  178. package/dist/chunks/zod-Y3ZBY67C.js +7 -0
  179. package/dist/commands/build/index.js +1 -1
  180. package/dist/commands/deploy/index.js +30 -23
  181. package/dist/commands/dev/index.js +2 -2
  182. package/dist/commands/env/index.js +1 -1
  183. package/dist/commands/link/index.js +1 -1
  184. package/dist/commands/list/index.js +1 -1
  185. package/dist/commands/project/index.js +7 -7
  186. package/dist/commands-account.js +18 -3
  187. package/dist/commands-ai.js +2 -2
  188. package/dist/commands-blob.js +1 -1
  189. package/dist/commands-core.js +6 -6
  190. package/dist/commands-deployments.js +5 -3
  191. package/dist/commands-flags.js +7 -9
  192. package/dist/commands-integrations.js +1 -1
  193. package/dist/commands-observability.js +5 -5
  194. package/dist/commands-routing.js +2 -2
  195. package/dist/help.js +1 -1
  196. package/dist/index.js +4 -4
  197. package/dist/internal-build-worker.js +1 -1
  198. package/dist/internal-build.js +1 -1
  199. package/dist/launcher-errors.js +11 -0
  200. package/dist/native-download.js +1 -1
  201. package/dist/package.json +29 -29
  202. package/dist/vc.js +355 -86
  203. package/dist/version.mjs +1 -1
  204. package/package.json +22 -22
  205. package/dist/chunks/add-6YFDZCAK.js +0 -8
  206. package/dist/chunks/add-QDZPCCUD.js +0 -8
  207. package/dist/chunks/add-Z24IIQDY.js +0 -8
  208. package/dist/chunks/build-HLU4YO37.js +0 -7
  209. package/dist/chunks/chunk-2CSCY66I.js +0 -11
  210. package/dist/chunks/chunk-2NABMKFV.js +0 -29
  211. package/dist/chunks/chunk-2TRNHR72.js +0 -7
  212. package/dist/chunks/chunk-32NXYHYC.js +0 -10
  213. package/dist/chunks/chunk-4CQKN5TW.js +0 -10
  214. package/dist/chunks/chunk-7DM3IJ7L.js +0 -10
  215. package/dist/chunks/chunk-AUCTNGW2.js +0 -7
  216. package/dist/chunks/chunk-C6525MLX.js +0 -10
  217. package/dist/chunks/chunk-CGTD4QFC.js +0 -7
  218. package/dist/chunks/chunk-DSNIVABS.js +0 -7
  219. package/dist/chunks/chunk-F53OKXYI.js +0 -7
  220. package/dist/chunks/chunk-K5YO4UD7.js +0 -7
  221. package/dist/chunks/chunk-NAU6URTI.js +0 -25
  222. package/dist/chunks/chunk-NNIQPNGP.js +0 -7
  223. package/dist/chunks/chunk-NTUDWWSL.js +0 -14
  224. package/dist/chunks/chunk-RZY54T7B.js +0 -7
  225. package/dist/chunks/chunk-SR2SHYJA.js +0 -7
  226. package/dist/chunks/chunk-WGVIQTOI.js +0 -8
  227. package/dist/chunks/chunk-YPPDRKVC.js +0 -7
  228. package/dist/chunks/clear-RU72IUXU.js +0 -8
  229. package/dist/chunks/config-PIFTR3UF.js +0 -8
  230. package/dist/chunks/delete-47BF6SIO.js +0 -9
  231. package/dist/chunks/delete-QNSKEIGO.js +0 -10
  232. package/dist/chunks/disable-SBFW3F7B.js +0 -7
  233. package/dist/chunks/discard-DUZR3OWZ.js +0 -14
  234. package/dist/chunks/edit-6BQ7FZC4.js +0 -8
  235. package/dist/chunks/edit-WO7FLNW2.js +0 -9
  236. package/dist/chunks/enable-OK4MR3Z6.js +0 -7
  237. package/dist/chunks/future-5AQIYILU.js +0 -7
  238. package/dist/chunks/generate-cert-for-deploy-7ERAHVOV.js +0 -7
  239. package/dist/chunks/image-IRC2NJVA.js +0 -7
  240. package/dist/chunks/inspect-5FKOSDTK.js +0 -13
  241. package/dist/chunks/inspect-ACNGICEF.js +0 -9
  242. package/dist/chunks/list-TRFGY6WP.js +0 -12
  243. package/dist/chunks/login-MYVTOBRG.js +0 -9
  244. package/dist/chunks/login-SOZ5ME3D.js +0 -7
  245. package/dist/chunks/logs-EMAGPMIZ.js +0 -7
  246. package/dist/chunks/ls-KU35N6DP.js +0 -8
  247. package/dist/chunks/ls-WFC636QK.js +0 -11
  248. package/dist/chunks/mutate-JVDDZLVE.js +0 -9
  249. package/dist/chunks/notifications-CXDBNBHU.js +0 -7
  250. package/dist/chunks/open-3CD5ZNKU.js +0 -7
  251. package/dist/chunks/permissions-PNBST4WN.js +0 -7
  252. package/dist/chunks/prompt-missing-credentials-Q5JCRP3R.js +0 -7
  253. package/dist/chunks/pull-XLZXPTLS.js +0 -7
  254. package/dist/chunks/purchase-domain-if-available-PDJGZ6MY.js +0 -7
  255. package/dist/chunks/push-XB57XK6H.js +0 -7
  256. package/dist/chunks/reauthenticate-CRI4D2BQ.js +0 -7
  257. package/dist/chunks/reorder-KUQ5EQBV.js +0 -10
  258. package/dist/chunks/reply-LO76EKEE.js +0 -9
  259. package/dist/chunks/resolve-KZJYJJLA.js +0 -12
  260. package/dist/chunks/resolve-agent-team-N7QMB7UO.js +0 -7
  261. package/dist/chunks/rm-7UKXTIZW.js +0 -8
  262. package/dist/chunks/rm-AKKEQN32.js +0 -8
  263. package/dist/chunks/rm-ELC57ULY.js +0 -8
  264. package/dist/chunks/rm-K7XEZ7TY.js +0 -8
  265. package/dist/chunks/rm-MOYCAXNO.js +0 -8
  266. package/dist/chunks/rule-inspect-ZCS4EBKR.js +0 -8
  267. package/dist/chunks/select-org-6NEM7F25.js +0 -7
  268. package/dist/chunks/set-NXFB6JXG.js +0 -7
  269. package/dist/chunks/setup-and-link-L67MMSUD.js +0 -7
  270. package/dist/chunks/tags-5AV6WAOF.js +0 -7
  271. package/dist/chunks/zod-2C2SXNIK.js +0 -7
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{collectBuildLogs,displayBuildLogs}from"./chunks/chunk-TCB4XM23.js";import{InvalidEventsResponseError,RecordTooLargeError,decodeContinuation,encodeContinuation,fetchEventPages,recordLine,serializeTimeRange,sortIntervals,warningLine}from"./chunks/chunk-DASHFOKO.js";import{indent_default}from"./chunks/chunk-GZNDA6SV.js";import{getBuildMachineResourceConfig}from"./chunks/chunk-ZF27J6FQ.js";import{isDeploying}from"./chunks/chunk-ZFRNVIHI.js";import"./chunks/chunk-USYEDO7R.js";import{readStandardInput}from"./chunks/chunk-PSOVLGHP.js";import"./chunks/chunk-XOETL6DB.js";import{summaryLine,writeJsonError}from"./chunks/chunk-CBVVVYUP.js";import{parseTimeFlag,validateIntegerRangeWithDefault}from"./chunks/chunk-AX3V7N44.js";import{getDeployment}from"./chunks/chunk-VU3RBRDH.js";import"./chunks/chunk-4VF5BZJP.js";import{external_exports}from"./chunks/chunk-2NABMKFV.js";import{require_format}from"./chunks/chunk-PFD7LETF.js";import{printNextPageCommand}from"./chunks/chunk-NEUQZYBL.js";import{elapsed}from"./chunks/chunk-Q7D7RGXM.js";import{getSubcommand}from"./chunks/chunk-ETV3C2CV.js";import{getTeams}from"./chunks/chunk-Y6WXTTZS.js";import{BACKGROUND_FUNCTION_EXCLUSION,DEFAULT_LIMIT,DEFAULT_WINDOW,MAX_LIMIT,getCommandAliases,inspectCommand,logsCommand,logsSources,requestsSubcommand,runtimeSubcommand,sourceForEvent}from"./chunks/chunk-NTUDWWSL.js";import"./chunks/chunk-M73W4XNR.js";import"./chunks/chunk-32AS5X7G.js";import"./chunks/chunk-ZBZPCKTW.js";import"./chunks/chunk-TRZDIAX3.js";import"./chunks/chunk-GHEGWXH2.js";import"./chunks/chunk-GCXUSXB4.js";import"./chunks/chunk-2H4DUZJZ.js";import"./chunks/chunk-ECQKK4JU.js";import"./chunks/chunk-JOXGYP5S.js";import"./chunks/chunk-7ULVGK67.js";import"./chunks/chunk-4BZ3DNGM.js";import"./chunks/chunk-R5ZLTWKB.js";import"./chunks/chunk-T5TOBY4D.js";import"./chunks/chunk-H34SGIVS.js";import"./chunks/chunk-5DXC4TE2.js";import"./chunks/chunk-G3LWP5CH.js";import"./chunks/chunk-QQA2OMXJ.js";import"./chunks/chunk-KV2DYFUG.js";import"./chunks/chunk-JALVF3C2.js";import"./chunks/chunk-GCPPL24C.js";import{printError}from"./chunks/chunk-BWS3ZOHJ.js";import{help}from"./chunks/chunk-33U57CNE.js";import{detectExplicitScope,getContextName}from"./chunks/chunk-DSNIVABS.js";import{TelemetryClient}from"./chunks/chunk-NAU6URTI.js";import"./chunks/chunk-2EYYB6YN.js";import"./chunks/chunk-NWGBDBZI.js";import{AGENT_REASON,getErrorRecovery}from"./chunks/chunk-32NXYHYC.js";import"./chunks/chunk-FWTBSC7Z.js";import{getProjectByNameOrId,getProjectLink,resolveProjectCwd,sleep}from"./chunks/chunk-OZPBJWYU.js";import"./chunks/chunk-64UCX5JM.js";import"./chunks/chunk-ITQPDXXA.js";import"./chunks/chunk-7WY7ASKE.js";import"./chunks/chunk-4NTBYNFR.js";import{isArgumentError,parseArguments}from"./chunks/chunk-CGTD4QFC.js";import{getTeamByIdOrSlug,quoteArg}from"./chunks/chunk-F53OKXYI.js";import{validateJsonOutput,warnDeprecatedSubcommand}from"./chunks/chunk-GJCVOEC2.js";import"./chunks/chunk-LUX4PBJL.js";import"./chunks/chunk-OPORM35X.js";import{require_ms}from"./chunks/chunk-MXTC4ZAQ.js";import"./chunks/chunk-4SAVH3H7.js";import{DeploymentNotFound,DeploymentPermissionDenied,InvalidDeploymentId,ProjectNotFound,isAPIError,require_bytes}from"./chunks/chunk-T2FCF46I.js";import{getCommandName,getCommandNamePlain,require_lib}from"./chunks/chunk-VRH7LWOC.js";import"./chunks/chunk-DBT6PGEH.js";import{output_manager_default}from"./chunks/chunk-W634OFUG.js";import"./chunks/chunk-BLUPZPAS.js";import"./chunks/chunk-ZS2WS4AM.js";import{require_build_utils}from"./chunks/chunk-5MDNVAE6.js";import"./chunks/chunk-OCR5CRTH.js";import{require_dist}from"./chunks/chunk-RM3ZDRYE.js";import"./chunks/chunk-YHPPP3SF.js";import"./chunks/chunk-PUKYAALC.js";import{getFlagsSpecification}from"./chunks/chunk-YPPDRKVC.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-NB2WLB3J.js";import"./chunks/chunk-ISWW3DKF.js";import{require_strip_ansi}from"./chunks/chunk-BULSRTQE.js";import"./chunks/chunk-BRQUZ5NC.js";import"./chunks/chunk-D6REP5QQ.js";import"./chunks/chunk-FBYA6LLM.js";import"./chunks/chunk-MY4MONOH.js";import"./chunks/chunk-7EJQLVWX.js";import"./chunks/chunk-SCV7XEEO.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)}
7
+ import{collectBuildLogs,displayBuildLogs}from"./chunks/chunk-Y57DK3ZN.js";import{InvalidEventsResponseError,RecordTooLargeError,decodeContinuation,encodeContinuation,fetchEventPages,recordLine,serializeTimeRange,sortIntervals,warningLine}from"./chunks/chunk-QXYCICNB.js";import{readStandardInput}from"./chunks/chunk-PSOVLGHP.js";import"./chunks/chunk-XOETL6DB.js";import{indent_default}from"./chunks/chunk-GZNDA6SV.js";import{getBuildMachineResourceConfig}from"./chunks/chunk-ZF27J6FQ.js";import{isDeploying}from"./chunks/chunk-ZFRNVIHI.js";import"./chunks/chunk-TNUQME3L.js";import{external_exports}from"./chunks/chunk-2AMO2VMV.js";import{require_format}from"./chunks/chunk-PFD7LETF.js";import{summaryLine,writeJsonError}from"./chunks/chunk-QCIIUQV3.js";import{parseTimeFlag,validateIntegerRangeWithDefault}from"./chunks/chunk-AX3V7N44.js";import{printNextPageCommand}from"./chunks/chunk-PMEYNJU2.js";import{getDeployment}from"./chunks/chunk-VU3RBRDH.js";import"./chunks/chunk-4VF5BZJP.js";import{elapsed}from"./chunks/chunk-Q7D7RGXM.js";import{getSubcommand}from"./chunks/chunk-ETV3C2CV.js";import{getTeams}from"./chunks/chunk-BPRGAX62.js";import{BACKGROUND_FUNCTION_EXCLUSION,DEFAULT_LIMIT,DEFAULT_WINDOW,MAX_LIMIT,getCommandAliases,inspectCommand,logsCommand,logsSources,requestsSubcommand,runtimeSubcommand,sourceForEvent}from"./chunks/chunk-FTACGWII.js";import"./chunks/chunk-CZOD25BC.js";import"./chunks/chunk-77LSSWXL.js";import"./chunks/chunk-MUNGQJGO.js";import"./chunks/chunk-W5GHMAHP.js";import"./chunks/chunk-ANCWFEOM.js";import"./chunks/chunk-QVMU7ZKQ.js";import"./chunks/chunk-TL4ZLZ2Q.js";import"./chunks/chunk-VD2FK6OF.js";import"./chunks/chunk-JVNIDSP5.js";import"./chunks/chunk-NLKM5LR5.js";import"./chunks/chunk-BB5UMZMF.js";import"./chunks/chunk-4LGAV2WN.js";import"./chunks/chunk-EJZNJN4N.js";import"./chunks/chunk-S5JBQCBA.js";import"./chunks/chunk-5DXC4TE2.js";import"./chunks/chunk-FAVZ6WVS.js";import"./chunks/chunk-5KE67O45.js";import"./chunks/chunk-T7HE23VK.js";import"./chunks/chunk-JALVF3C2.js";import"./chunks/chunk-CUBRYWA2.js";import{printError}from"./chunks/chunk-Q4GX2UTG.js";import{help}from"./chunks/chunk-GKALP6QD.js";import{detectExplicitScope,getContextName}from"./chunks/chunk-TZ6MSTOI.js";import{TelemetryClient}from"./chunks/chunk-VPUYTI5E.js";import"./chunks/chunk-2EYYB6YN.js";import"./chunks/chunk-NWGBDBZI.js";import{getErrorRecovery}from"./chunks/chunk-ZUI5EMXD.js";import"./chunks/chunk-FY4ORPZH.js";import{getProjectByNameOrId,getProjectLink,resolveProjectCwd,sleep}from"./chunks/chunk-KNAOHPOI.js";import"./chunks/chunk-64UCX5JM.js";import"./chunks/chunk-ITQPDXXA.js";import"./chunks/chunk-56UH6NQ3.js";import"./chunks/chunk-4NTBYNFR.js";import{isArgumentError,parseArguments}from"./chunks/chunk-C4N4LKPM.js";import{getTeamByIdOrSlug}from"./chunks/chunk-2VBFQZ72.js";import{validateJsonOutput,warnDeprecatedSubcommand}from"./chunks/chunk-GJCVOEC2.js";import"./chunks/chunk-LUX4PBJL.js";import"./chunks/chunk-OPORM35X.js";import{require_ms}from"./chunks/chunk-MXTC4ZAQ.js";import"./chunks/chunk-ZS2WS4AM.js";import"./chunks/chunk-4SAVH3H7.js";import{DeploymentNotFound,DeploymentPermissionDenied,InvalidDeploymentId,ProjectNotFound,isAPIError,require_bytes}from"./chunks/chunk-T2FCF46I.js";import{getCommandName,getCommandNamePlain,require_lib}from"./chunks/chunk-VRH7LWOC.js";import"./chunks/chunk-DBT6PGEH.js";import{output_manager_default}from"./chunks/chunk-W634OFUG.js";import"./chunks/chunk-BLUPZPAS.js";import{require_build_utils}from"./chunks/chunk-5MDNVAE6.js";import"./chunks/chunk-OCR5CRTH.js";import{require_dist}from"./chunks/chunk-RM3ZDRYE.js";import"./chunks/chunk-YHPPP3SF.js";import"./chunks/chunk-PUKYAALC.js";import{getFlagsSpecification,quoteArg}from"./chunks/chunk-CKTLP5GX.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-NB2WLB3J.js";import"./chunks/chunk-ISWW3DKF.js";import{require_strip_ansi}from"./chunks/chunk-BULSRTQE.js";import"./chunks/chunk-BRQUZ5NC.js";import"./chunks/chunk-D6REP5QQ.js";import"./chunks/chunk-FBYA6LLM.js";import"./chunks/chunk-MY4MONOH.js";import"./chunks/chunk-7EJQLVWX.js";import"./chunks/chunk-SCV7XEEO.js";import{AGENT_REASON}from"./chunks/chunk-CFYTFXX6.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
8
  `),finalBuildsLength++}else{hiddenBuildGroup.push(buildGroup[0]);continue}else if(buildGroup.length===1){let item=buildGroup[0];final.push(`${styleBuild(item,times,longestSource)}
9
9
  `),finalBuildsLength++}else final.push(`${styleHiddenBuilds(`${commonPath}/*`,buildGroup,times,longestSource)}
10
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)}
@@ -67,9 +67,11 @@ import{collectBuildLogs,displayBuildLogs}from"./chunks/chunk-TCB4XM23.js";import
67
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
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
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>")}.
70
+ ${hint}`,json:{...base,reason:AGENT_REASON.INVALID_ARGUMENTS,message:"The requested time range is outside the available retention.",hint},exitCode:2}}if(err.status===403)return{human:serverMessage,json:{...base,reason:AGENT_REASON.PERMISSION_DENIED,message:`You don't have access to ${source} logs for this project.`},exitCode:1};if(err.status===400)return{human:serverMessage,json:{...base,reason:AGENT_REASON.API_ERROR,message:`The API rejected the ${source} query.`},exitCode:1};if(err.status===504){let retries=typeof err.retries=="number"?err.retries:0,message=`Couldn't retrieve ${source} logs: the query timed out.`,hint="Narrow --query, --since, or --until, then try again.";return{human:`${message}
71
+ Retries: ${retries}
72
+ ${hint}`,json:{...base,reason:AGENT_REASON.API_ERROR,message,hint,data:{...base.data,retries}},exitCode:1}}return 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&&status!==504||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
73
  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.
74
+ 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.`}var GATEWAY_TIMEOUT_RETRIES=1;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,gatewayTimeoutRetries:GATEWAY_TIMEOUT_RETRIES},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
75
  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
76
  `)}:{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
77
  `),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,{stream:client.stderr,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()}