vercel 59.14.0 → 59.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/dist/chunks/add-7XFD2OHW.js +8 -0
  2. package/dist/chunks/add-HZC7AUBY.js +8 -0
  3. package/dist/chunks/add-PYUNJZ6K.js +8 -0
  4. package/dist/chunks/build-EFKQ6BND.js +7 -0
  5. package/dist/chunks/chunk-2B2MN3U5.js +8 -0
  6. package/dist/chunks/chunk-2H77IRPI.js +9 -0
  7. package/dist/chunks/chunk-2I64AYHG.js +7 -0
  8. package/dist/chunks/chunk-2PPXY24N.js +20 -0
  9. package/dist/chunks/chunk-2S6PE6GB.js +7 -0
  10. package/dist/chunks/{chunk-PIMIVJYK.js → chunk-3FMJYJUR.js} +7 -32
  11. package/dist/chunks/chunk-3IAQUNQH.js +7 -0
  12. package/dist/chunks/chunk-3QHJYVCY.js +7 -0
  13. package/dist/chunks/chunk-3QT7VOE3.js +7 -0
  14. package/dist/chunks/chunk-3TXEXPUW.js +7 -0
  15. package/dist/chunks/chunk-4MZK6JT6.js +7 -0
  16. package/dist/chunks/chunk-4NE5IQ25.js +7 -0
  17. package/dist/chunks/chunk-4PNSSS3L.js +7 -0
  18. package/dist/chunks/chunk-4QX77CP7.js +7 -0
  19. package/dist/chunks/chunk-57GHYR4Y.js +25 -0
  20. package/dist/chunks/chunk-5QQNYN4N.js +7 -0
  21. package/dist/chunks/chunk-5XJNPXQK.js +7 -0
  22. package/dist/chunks/chunk-6L236MNA.js +7 -0
  23. package/dist/chunks/chunk-6PFC3KWQ.js +7 -0
  24. package/dist/chunks/chunk-6QKS6QK7.js +7 -0
  25. package/dist/chunks/chunk-6RIQPTJA.js +8 -0
  26. package/dist/chunks/chunk-6TAQ6OWD.js +13 -0
  27. package/dist/chunks/chunk-6YAADRQB.js +9 -0
  28. package/dist/chunks/chunk-75CPY75D.js +15 -0
  29. package/dist/chunks/chunk-7HL2RPUO.js +7 -0
  30. package/dist/chunks/chunk-7PNYOSDU.js +9 -0
  31. package/dist/chunks/chunk-7R5FEXZ5.js +7 -0
  32. package/dist/chunks/chunk-7RMCBXBB.js +62 -0
  33. package/dist/chunks/chunk-7RR7MIMT.js +7 -0
  34. package/dist/chunks/chunk-7T6TL3GQ.js +7 -0
  35. package/dist/chunks/chunk-ADUYPK2G.js +13 -0
  36. package/dist/chunks/chunk-AFPOIDM5.js +7 -0
  37. package/dist/chunks/chunk-AM46JVVN.js +7 -0
  38. package/dist/chunks/chunk-AVSPFBLM.js +7 -0
  39. package/dist/chunks/chunk-B4ATVYZW.js +7 -0
  40. package/dist/chunks/chunk-BATE73HA.js +9 -0
  41. package/dist/chunks/{chunk-64IF634X.js → chunk-BRK4OB4B.js} +1 -12
  42. package/dist/chunks/chunk-BVH2AEFE.js +7 -0
  43. package/dist/chunks/chunk-CN2QZO4U.js +7 -0
  44. package/dist/chunks/chunk-COQGD2EI.js +8 -0
  45. package/dist/chunks/chunk-CUAIEGNE.js +7 -0
  46. package/dist/chunks/chunk-CVKB54WW.js +7 -0
  47. package/dist/chunks/{chunk-A3NYPUKZ.js → chunk-CZSOZKHX.js} +1 -11
  48. package/dist/chunks/chunk-D4MW3RDW.js +7 -0
  49. package/dist/chunks/chunk-DFVNL5ML.js +7 -0
  50. package/dist/chunks/chunk-EE3FVJLV.js +16 -0
  51. package/dist/chunks/chunk-EGMJRU5P.js +28 -0
  52. package/dist/chunks/chunk-ENBTTYJR.js +7 -0
  53. package/dist/chunks/chunk-ENS6KX2F.js +7 -0
  54. package/dist/chunks/chunk-EOBD4ZEG.js +8 -0
  55. package/dist/chunks/chunk-EOCTK4EA.js +7 -0
  56. package/dist/chunks/chunk-EQ52F4LH.js +7 -0
  57. package/dist/chunks/chunk-ETV3C2CV.js +7 -0
  58. package/dist/chunks/chunk-EVZRQGNK.js +7 -0
  59. package/dist/chunks/chunk-F2ZWW2IO.js +8 -0
  60. package/dist/chunks/chunk-FAW6NBLQ.js +7 -0
  61. package/dist/chunks/chunk-FI772UVH.js +7 -0
  62. package/dist/chunks/chunk-FKCOBJFH.js +7 -0
  63. package/dist/chunks/chunk-FVGESGJI.js +45 -0
  64. package/dist/chunks/chunk-G5FC5ZCO.js +9 -0
  65. package/dist/chunks/chunk-G6CTAHKY.js +39 -0
  66. package/dist/chunks/chunk-G7Y77DFH.js +7 -0
  67. package/dist/chunks/chunk-GHAY4PSD.js +7 -0
  68. package/dist/chunks/chunk-GHM7V3GG.js +7 -0
  69. package/dist/chunks/chunk-GRNTLNC7.js +7 -0
  70. package/dist/chunks/chunk-GTRGQIY2.js +10 -0
  71. package/dist/chunks/chunk-GU6VIFR5.js +7 -0
  72. package/dist/chunks/{constants-YMCRE6IG.js → chunk-GZNDA6SV.js} +2 -9
  73. package/dist/chunks/chunk-HBFPLBTX.js +10 -0
  74. package/dist/chunks/chunk-HEGJZJO7.js +7 -0
  75. package/dist/chunks/chunk-HSJ6AHWG.js +12 -0
  76. package/dist/chunks/chunk-HTC6KO2B.js +7 -0
  77. package/dist/chunks/chunk-HVUHCRZB.js +18 -0
  78. package/dist/chunks/chunk-HZZ5L472.js +7 -0
  79. package/dist/chunks/chunk-IVSSTHB6.js +7 -0
  80. package/dist/chunks/chunk-IVWPQYIH.js +7 -0
  81. package/dist/chunks/chunk-J3U3L45Y.js +7 -0
  82. package/dist/chunks/chunk-JAJW3P42.js +7 -0
  83. package/dist/chunks/chunk-JEIMW3CO.js +7 -0
  84. package/dist/chunks/chunk-JIYY3B4C.js +7 -0
  85. package/dist/chunks/chunk-JKTQV2QJ.js +7 -0
  86. package/dist/chunks/chunk-JTVVBRW7.js +7 -0
  87. package/dist/chunks/chunk-JYAUUIR4.js +7 -0
  88. package/dist/chunks/chunk-JZRMH5UA.js +7 -0
  89. package/dist/chunks/chunk-K2RAW5DI.js +10 -0
  90. package/dist/chunks/chunk-K3KJZLBD.js +7 -0
  91. package/dist/chunks/chunk-KK4AJES5.js +36 -0
  92. package/dist/chunks/chunk-KKS7XWEX.js +7 -0
  93. package/dist/chunks/chunk-KNEWCUWF.js +14 -0
  94. package/dist/chunks/chunk-KO733OJG.js +9 -0
  95. package/dist/chunks/chunk-L243RUIR.js +19 -0
  96. package/dist/chunks/chunk-L3JDEHCQ.js +7 -0
  97. package/dist/chunks/chunk-LDM3SQAU.js +13 -0
  98. package/dist/chunks/chunk-LNPMDXBJ.js +7 -0
  99. package/dist/chunks/chunk-M2W3HKV3.js +23 -0
  100. package/dist/chunks/chunk-M2XARQBF.js +9 -0
  101. package/dist/chunks/chunk-M5AV545M.js +7 -0
  102. package/dist/chunks/chunk-MAVRGZQP.js +7 -0
  103. package/dist/chunks/chunk-MBL6TXEJ.js +7 -0
  104. package/dist/chunks/chunk-MEAY2K5Z.js +11 -0
  105. package/dist/chunks/chunk-MY4MONOH.js +7 -0
  106. package/dist/chunks/chunk-N3N5UHIL.js +7 -0
  107. package/dist/chunks/chunk-N3ZZ7FHQ.js +7 -0
  108. package/dist/chunks/chunk-N6CNMMSZ.js +7 -0
  109. package/dist/chunks/chunk-NBVY237X.js +7 -0
  110. package/dist/chunks/chunk-NGNOUPWS.js +25 -0
  111. package/dist/chunks/chunk-NHTF332K.js +7 -0
  112. package/dist/chunks/chunk-NNP5NITU.js +15 -0
  113. package/dist/chunks/chunk-NS4FH2TY.js +11 -0
  114. package/dist/chunks/chunk-NUGLE4QY.js +11 -0
  115. package/dist/chunks/chunk-NWFHHUKZ.js +7 -0
  116. package/dist/chunks/chunk-O7G3CZ42.js +7 -0
  117. package/dist/chunks/chunk-OD6RZ3XZ.js +8 -0
  118. package/dist/chunks/chunk-OHDEHZLX.js +7 -0
  119. package/dist/chunks/chunk-OK3S6KFX.js +16 -0
  120. package/dist/chunks/chunk-OKZDOANA.js +23 -0
  121. package/dist/chunks/chunk-OSCCYU74.js +7 -0
  122. package/dist/chunks/chunk-OUHPDA7Q.js +7 -0
  123. package/dist/chunks/chunk-P2O5DOYE.js +7 -0
  124. package/dist/chunks/chunk-PHW54NU5.js +13 -0
  125. package/dist/chunks/chunk-PPCFQQSU.js +7 -0
  126. package/dist/chunks/chunk-QGIGNMII.js +8 -0
  127. package/dist/chunks/chunk-QGIQK47P.js +7 -0
  128. package/dist/chunks/chunk-QHJLRTVY.js +7 -0
  129. package/dist/chunks/{chunk-2473DUBR.js → chunk-QR7QPUFN.js} +1 -9
  130. package/dist/chunks/chunk-QTKJC2O5.js +7 -0
  131. package/dist/chunks/chunk-R2TGGVCT.js +19 -0
  132. package/dist/chunks/chunk-RAIBQIKB.js +7 -0
  133. package/dist/chunks/chunk-RCTYVKM5.js +16 -0
  134. package/dist/chunks/chunk-RKAUVPOQ.js +86 -0
  135. package/dist/chunks/chunk-S5CEIACD.js +7 -0
  136. package/dist/chunks/chunk-SGWVKRSR.js +8 -0
  137. package/dist/chunks/chunk-SOJCELXH.js +7 -0
  138. package/dist/chunks/chunk-SXUEGVWB.js +7 -0
  139. package/dist/chunks/{chunk-GGPE5377.js → chunk-T3GQAMBJ.js} +1 -9
  140. package/dist/chunks/chunk-T52FMXWC.js +7 -0
  141. package/dist/chunks/chunk-TG2RCYTH.js +7 -0
  142. package/dist/chunks/chunk-TJCIHDPZ.js +9 -0
  143. package/dist/chunks/chunk-TKBXN4H3.js +9 -0
  144. package/dist/chunks/chunk-TRTEXGVN.js +7 -0
  145. package/dist/chunks/chunk-TXELFFNK.js +15 -0
  146. package/dist/chunks/chunk-U56NHYAH.js +7 -0
  147. package/dist/chunks/chunk-U7KCDTCH.js +12 -0
  148. package/dist/chunks/chunk-UETTIYUQ.js +8 -0
  149. package/dist/chunks/chunk-UGMZQZJE.js +24 -0
  150. package/dist/chunks/chunk-ULLWCOYC.js +7 -0
  151. package/dist/chunks/chunk-UXTHEQVJ.js +21 -0
  152. package/dist/chunks/chunk-VLZ47RWM.js +44 -0
  153. package/dist/chunks/chunk-WKZ6JSGZ.js +7 -0
  154. package/dist/chunks/chunk-WPS6JZF6.js +7 -0
  155. package/dist/chunks/chunk-WRILLB46.js +7 -0
  156. package/dist/chunks/chunk-WUZD4KBL.js +7 -0
  157. package/dist/chunks/chunk-XCJDGQO7.js +7 -0
  158. package/dist/chunks/{pkg-56KRLZ5K.js → chunk-XD2LZRBS.js} +1 -7
  159. package/dist/chunks/chunk-XFVGX5HG.js +7 -0
  160. package/dist/chunks/chunk-XHOGOH6N.js +7 -0
  161. package/dist/chunks/{update-route-version-E3V47KNI.js → chunk-XPXOV5UO.js} +1 -7
  162. package/dist/chunks/chunk-XQ73QIQ3.js +7 -0
  163. package/dist/chunks/chunk-XSVBYDYI.js +8 -0
  164. package/dist/chunks/chunk-YKZLKOOD.js +12 -0
  165. package/dist/chunks/chunk-YMVDWVMO.js +7 -0
  166. package/dist/chunks/chunk-YPTLSODC.js +7 -0
  167. package/dist/chunks/chunk-YV6CTDHR.js +7 -0
  168. package/dist/chunks/chunk-Z6Y55QJW.js +23 -0
  169. package/dist/chunks/chunk-ZDX75YNZ.js +7 -0
  170. package/dist/chunks/chunk-ZIPVX7LD.js +7 -0
  171. package/dist/chunks/chunk-ZKYS7EAB.js +7 -0
  172. package/dist/chunks/chunk-ZT6KDLLY.js +20 -0
  173. package/dist/chunks/chunk-ZXE4XYIV.js +7 -0
  174. package/dist/chunks/chunk-ZZQRMRWD.js +20 -0
  175. package/dist/chunks/cjs-GOQHXIHX.js +54 -0
  176. package/dist/chunks/clear-5NQAVWIF.js +8 -0
  177. package/dist/chunks/compile-vercel-config-6J2XUFRK.js +7 -0
  178. package/dist/chunks/config-CKYRXZXL.js +7 -0
  179. package/dist/chunks/config-VNUY4RJ4.js +8 -0
  180. package/dist/chunks/connect-git-provider-GIU5WZ52.js +7 -0
  181. package/dist/chunks/constants-G4UYVLOF.js +7 -0
  182. package/dist/chunks/create-project-SRQGD4JY.js +7 -0
  183. package/dist/chunks/delete-GTXXCSKQ.js +10 -0
  184. package/dist/chunks/delete-HRJEO4MI.js +9 -0
  185. package/dist/chunks/detect-projects-2GNCZ4CS.js +7 -0
  186. package/dist/chunks/detect-services-GHILEGNU.js +7 -0
  187. package/dist/chunks/disable-RWCRVG5O.js +7 -0
  188. package/dist/chunks/discard-SHFIYCJU.js +14 -0
  189. package/dist/chunks/edit-DMO3NSO2.js +9 -0
  190. package/dist/chunks/edit-EVQI2RSS.js +8 -0
  191. package/dist/chunks/enable-AWDU6STD.js +7 -0
  192. package/dist/chunks/esm-7HVUFWMN.js +7 -0
  193. package/dist/chunks/esm-BZBEM7YA.js +7 -0
  194. package/dist/chunks/esm-CXICLFA3.js +9 -0
  195. package/dist/chunks/esm-HDEHVK7I.js +9 -0
  196. package/dist/chunks/esm-NQRLKALI.js +20 -0
  197. package/dist/chunks/esm-SZZI53W7.js +7 -0
  198. package/dist/chunks/esm-WGJFGCLK.js +7 -0
  199. package/dist/chunks/exec-4AISDHUV.js +16372 -0
  200. package/dist/chunks/export-IQKTA4RS.js +19 -0
  201. package/dist/chunks/fetch-proxy-AEAWC6MD.js +7 -0
  202. package/dist/chunks/future-E2FHKPJN.js +7 -0
  203. package/dist/chunks/generate-cert-for-deploy-VKOWC4PZ.js +7 -0
  204. package/dist/chunks/image-LDFYNOCA.js +7 -0
  205. package/dist/chunks/import-builders-P7CXSX2D.js +7 -0
  206. package/dist/chunks/inspect-3N47ODIH.js +15 -0
  207. package/dist/chunks/inspect-53SGDDAH.js +20 -0
  208. package/dist/chunks/inspect-5INZDUQS.js +19 -0
  209. package/dist/chunks/inspect-WMT2M335.js +9 -0
  210. package/dist/chunks/inspect-Y6BUCOUV.js +13 -0
  211. package/dist/chunks/list-BIAPHKFM.js +11 -0
  212. package/dist/chunks/list-DMOCRRSE.js +16 -0
  213. package/dist/chunks/list-K5J7OULR.js +10 -0
  214. package/dist/chunks/login-DEAEVUHM.js +7 -0
  215. package/dist/chunks/login-SRVNHI4Y.js +9 -0
  216. package/dist/chunks/logs-GK7CJBYY.js +7 -0
  217. package/dist/chunks/ls-7ZX6DCJW.js +12 -0
  218. package/dist/chunks/ls-AJWN5ZR4.js +12 -0
  219. package/dist/chunks/ls-BFJWCRLZ.js +12 -0
  220. package/dist/chunks/ls-KGIE6HCO.js +12 -0
  221. package/dist/chunks/ls-UVKTHBTE.js +8 -0
  222. package/dist/chunks/ls-WEG45IOC.js +8 -0
  223. package/dist/chunks/native-self-update-KOJVRMHR.js +7 -0
  224. package/dist/chunks/open-OEWPI5G6.js +7 -0
  225. package/dist/chunks/openapi-MO5HYMHR.js +7 -0
  226. package/dist/chunks/permissions-EPQBQFE3.js +7 -0
  227. package/dist/chunks/pkg-YFU67U7I.js +7 -0
  228. package/dist/chunks/prompt-missing-credentials-IUHLYSQU.js +7 -0
  229. package/dist/chunks/publish-JG7MEPWT.js +15 -0
  230. package/dist/chunks/pull-MRKXG6TO.js +7 -0
  231. package/dist/chunks/purchase-domain-if-available-O5ARXEZ5.js +7 -0
  232. package/dist/chunks/push-XOXJDFYO.js +7 -0
  233. package/dist/chunks/query-AL7C6WV2.js +12 -0
  234. package/dist/chunks/reauthenticate-SH4XR7NH.js +7 -0
  235. package/dist/chunks/reorder-5DMRFDBY.js +10 -0
  236. package/dist/chunks/reply-WSRNZWFD.js +9 -0
  237. package/dist/chunks/repo-info-to-url-SK3VX6UL.js +7 -0
  238. package/dist/chunks/resolve-YJUXQVOZ.js +12 -0
  239. package/dist/chunks/resolve-deployment-framework-preset-XF3NJIDS.js +7 -0
  240. package/dist/chunks/restore-QT3DBGKU.js +16 -0
  241. package/dist/chunks/rm-MHPIUEZ5.js +8 -0
  242. package/dist/chunks/rm-MVZFU6RG.js +8 -0
  243. package/dist/chunks/rm-PXR4J2US.js +8 -0
  244. package/dist/chunks/rm-WB2AIP3N.js +8 -0
  245. package/dist/chunks/rm-XRP6MRUT.js +8 -0
  246. package/dist/chunks/routes-5DERZV5M.js +7 -0
  247. package/dist/chunks/rule-inspect-TT3DRGCS.js +8 -0
  248. package/dist/chunks/rules-B5GW4KJH.js +7 -0
  249. package/dist/chunks/schema-JY5QTZOG.js +14 -0
  250. package/dist/chunks/schema-KCNKVFT3.js +44 -0
  251. package/dist/chunks/select-org-KSCYSESV.js +7 -0
  252. package/dist/chunks/set-7BANEWEL.js +7 -0
  253. package/dist/chunks/setup-and-link-ZAV3EFGC.js +7 -0
  254. package/dist/chunks/slugify-O5DBATYT.js +7 -0
  255. package/dist/chunks/stamp-OX4YO3KY.js +7 -0
  256. package/dist/chunks/tags-VZR66NUC.js +7 -0
  257. package/dist/chunks/types-LRXQEDYI.js +14 -0
  258. package/dist/chunks/update-RBFNNSWE.js +8 -0
  259. package/dist/chunks/update-route-version-XZAFPQJC.js +7 -0
  260. package/dist/chunks/utils-B5ZTMQKY.js +58 -0
  261. package/dist/chunks/vlt-builder-importer-YVCYYRVV.js +11 -0
  262. package/dist/commands/build/index.js +24 -4925
  263. package/dist/commands/deploy/index.js +43 -2875
  264. package/dist/commands/dev/index.js +56 -23857
  265. package/dist/commands/env/index.js +26 -3411
  266. package/dist/commands/link/index.js +4 -284
  267. package/dist/commands/list/index.js +6 -566
  268. package/dist/commands-bulk.js +1187 -87691
  269. package/dist/help.js +1 -8
  270. package/dist/index.js +19 -2591
  271. package/dist/version.mjs +1 -1
  272. package/package.json +50 -51
  273. package/dist/chunks/add-EQZRT4XL.js +0 -221
  274. package/dist/chunks/add-KMDROZC3.js +0 -196
  275. package/dist/chunks/add-QPJ3XMBV.js +0 -145
  276. package/dist/chunks/build-W4HPTAOB.js +0 -251
  277. package/dist/chunks/chunk-26CU4Q3C.js +0 -598
  278. package/dist/chunks/chunk-2HSQ7YUK.js +0 -93
  279. package/dist/chunks/chunk-2JIX6UMI.js +0 -4626
  280. package/dist/chunks/chunk-2LCFOK66.js +0 -1536
  281. package/dist/chunks/chunk-332LMJLZ.js +0 -16014
  282. package/dist/chunks/chunk-3HZLXCVL.js +0 -137
  283. package/dist/chunks/chunk-3VM7HWF6.js +0 -104
  284. package/dist/chunks/chunk-3ZE5CFVM.js +0 -346
  285. package/dist/chunks/chunk-4IALDGB7.js +0 -22
  286. package/dist/chunks/chunk-4KD5BYHB.js +0 -127
  287. package/dist/chunks/chunk-4TUMNBEE.js +0 -231
  288. package/dist/chunks/chunk-4WG2MYCI.js +0 -163
  289. package/dist/chunks/chunk-57RHXXXG.js +0 -150
  290. package/dist/chunks/chunk-5AJPMLDV.js +0 -28
  291. package/dist/chunks/chunk-5EIV6LPQ.js +0 -305
  292. package/dist/chunks/chunk-5NF5HOBJ.js +0 -1854
  293. package/dist/chunks/chunk-653QRQAD.js +0 -417
  294. package/dist/chunks/chunk-67CRVWDF.js +0 -81
  295. package/dist/chunks/chunk-6E6KPBXY.js +0 -43
  296. package/dist/chunks/chunk-75VENWDN.js +0 -1892
  297. package/dist/chunks/chunk-7MRDIPJY.js +0 -107
  298. package/dist/chunks/chunk-7NRNFV77.js +0 -875
  299. package/dist/chunks/chunk-7Q45OKWR.js +0 -149
  300. package/dist/chunks/chunk-AHU7WNL2.js +0 -24
  301. package/dist/chunks/chunk-AINIBIP4.js +0 -39
  302. package/dist/chunks/chunk-AJ5HUOWB.js +0 -14059
  303. package/dist/chunks/chunk-AKLTIZCU.js +0 -46
  304. package/dist/chunks/chunk-AQ6P3IGG.js +0 -49
  305. package/dist/chunks/chunk-B5NH7SLK.js +0 -324
  306. package/dist/chunks/chunk-B5XLQKHI.js +0 -849
  307. package/dist/chunks/chunk-BEQV3X2L.js +0 -86
  308. package/dist/chunks/chunk-CAHP7UGE.js +0 -79
  309. package/dist/chunks/chunk-CFDDM4TX.js +0 -13618
  310. package/dist/chunks/chunk-CJV7J7B5.js +0 -314
  311. package/dist/chunks/chunk-CV5YC2EN.js +0 -867
  312. package/dist/chunks/chunk-CXFY6A6W.js +0 -255
  313. package/dist/chunks/chunk-D5SMZXVO.js +0 -233
  314. package/dist/chunks/chunk-E336ZXPP.js +0 -43
  315. package/dist/chunks/chunk-EDMW7SBH.js +0 -246
  316. package/dist/chunks/chunk-EFYMIIER.js +0 -40
  317. package/dist/chunks/chunk-EKPSCRJZ.js +0 -26
  318. package/dist/chunks/chunk-EOZFDJSY.js +0 -18
  319. package/dist/chunks/chunk-EWBCSDTM.js +0 -1708
  320. package/dist/chunks/chunk-EZKW5YJ2.js +0 -177
  321. package/dist/chunks/chunk-F2QLCXCF.js +0 -2399
  322. package/dist/chunks/chunk-FGDKMNEN.js +0 -21
  323. package/dist/chunks/chunk-FRVG4OW3.js +0 -7438
  324. package/dist/chunks/chunk-FVF4UHDM.js +0 -1288
  325. package/dist/chunks/chunk-G5FBSUL4.js +0 -822
  326. package/dist/chunks/chunk-GDOUDU6O.js +0 -74
  327. package/dist/chunks/chunk-GGP5R3FU.js +0 -129
  328. package/dist/chunks/chunk-GVNCVKCI.js +0 -68
  329. package/dist/chunks/chunk-GY5I4AYD.js +0 -122
  330. package/dist/chunks/chunk-GZLPFESR.js +0 -48
  331. package/dist/chunks/chunk-HB4UKFDO.js +0 -1295
  332. package/dist/chunks/chunk-HD4DR3DA.js +0 -818
  333. package/dist/chunks/chunk-HKHXKSXQ.js +0 -152
  334. package/dist/chunks/chunk-HM24ZWQL.js +0 -174
  335. package/dist/chunks/chunk-HRXRELD3.js +0 -338
  336. package/dist/chunks/chunk-IB5L4LKZ.js +0 -1082
  337. package/dist/chunks/chunk-IIMSID24.js +0 -104
  338. package/dist/chunks/chunk-J7JKZM4T.js +0 -58
  339. package/dist/chunks/chunk-JC2O346E.js +0 -137
  340. package/dist/chunks/chunk-JSD4EZL3.js +0 -34
  341. package/dist/chunks/chunk-JZXJZX7O.js +0 -257
  342. package/dist/chunks/chunk-K3RED3VO.js +0 -566
  343. package/dist/chunks/chunk-KFWQ3EFH.js +0 -151
  344. package/dist/chunks/chunk-KW7BS25T.js +0 -466
  345. package/dist/chunks/chunk-KXDWXXJH.js +0 -70
  346. package/dist/chunks/chunk-LERVNZTD.js +0 -90
  347. package/dist/chunks/chunk-LYAAQDNS.js +0 -242
  348. package/dist/chunks/chunk-M5I6INNF.js +0 -61
  349. package/dist/chunks/chunk-N6HP5BLI.js +0 -18190
  350. package/dist/chunks/chunk-ND5CF2H3.js +0 -53
  351. package/dist/chunks/chunk-NFU4XJIR.js +0 -120
  352. package/dist/chunks/chunk-NW34PW6V.js +0 -1772
  353. package/dist/chunks/chunk-OAMU5QO6.js +0 -18
  354. package/dist/chunks/chunk-OCIZ6ZYA.js +0 -253
  355. package/dist/chunks/chunk-ORQZKIIB.js +0 -2914
  356. package/dist/chunks/chunk-P3SKP5WM.js +0 -27
  357. package/dist/chunks/chunk-P4QNYOFB.js +0 -96
  358. package/dist/chunks/chunk-P7VSBDR4.js +0 -827
  359. package/dist/chunks/chunk-PEC3CQSK.js +0 -90
  360. package/dist/chunks/chunk-PMSMUMUO.js +0 -30
  361. package/dist/chunks/chunk-PNGVSHR3.js +0 -40
  362. package/dist/chunks/chunk-POOO7W47.js +0 -916
  363. package/dist/chunks/chunk-PRWJUY5U.js +0 -848
  364. package/dist/chunks/chunk-Q2DGFCO7.js +0 -579
  365. package/dist/chunks/chunk-RBF2NPUP.js +0 -577
  366. package/dist/chunks/chunk-RBIFXFZX.js +0 -52
  367. package/dist/chunks/chunk-RDTRWLWB.js +0 -11441
  368. package/dist/chunks/chunk-RN6V5ODW.js +0 -114
  369. package/dist/chunks/chunk-RNSMTWA6.js +0 -122
  370. package/dist/chunks/chunk-RTJASENB.js +0 -59
  371. package/dist/chunks/chunk-RVBZ64EQ.js +0 -52
  372. package/dist/chunks/chunk-S7KYDPEM.js +0 -1564
  373. package/dist/chunks/chunk-SLPSPYVR.js +0 -334
  374. package/dist/chunks/chunk-SM3F3PYJ.js +0 -522
  375. package/dist/chunks/chunk-TO7QZGYK.js +0 -105
  376. package/dist/chunks/chunk-TSBUHSN7.js +0 -3495
  377. package/dist/chunks/chunk-TSFWMUCY.js +0 -506
  378. package/dist/chunks/chunk-TZ2YI2VH.js +0 -87
  379. package/dist/chunks/chunk-UG2WOB5L.js +0 -150
  380. package/dist/chunks/chunk-UNKHOYMF.js +0 -559
  381. package/dist/chunks/chunk-UOVWUSLG.js +0 -2099
  382. package/dist/chunks/chunk-V4RMJKQP.js +0 -36
  383. package/dist/chunks/chunk-VGIMO3ZK.js +0 -17
  384. package/dist/chunks/chunk-VGKSIKCC.js +0 -92
  385. package/dist/chunks/chunk-VP5Y3SZG.js +0 -106
  386. package/dist/chunks/chunk-VXYGCOKL.js +0 -28
  387. package/dist/chunks/chunk-W7FGI2GZ.js +0 -233
  388. package/dist/chunks/chunk-WGGABYO5.js +0 -31
  389. package/dist/chunks/chunk-XDGOOW3K.js +0 -60
  390. package/dist/chunks/chunk-XFF5TGRA.js +0 -303
  391. package/dist/chunks/chunk-XNIZGCN5.js +0 -58
  392. package/dist/chunks/chunk-XPJLPUKO.js +0 -117
  393. package/dist/chunks/chunk-XUAWTW4W.js +0 -467
  394. package/dist/chunks/chunk-YPQSDAEW.js +0 -29
  395. package/dist/chunks/chunk-YS76T533.js +0 -270
  396. package/dist/chunks/chunk-ZDU2NODC.js +0 -104
  397. package/dist/chunks/chunk-ZW6HETRE.js +0 -97
  398. package/dist/chunks/cjs-DV4RM7XU.js +0 -20743
  399. package/dist/chunks/clear-4IACMLFU.js +0 -141
  400. package/dist/chunks/compile-vercel-config-PQQ3OCLV.js +0 -33
  401. package/dist/chunks/config-BQQKMQBP.js +0 -168
  402. package/dist/chunks/config-OCPNHXQL.js +0 -127
  403. package/dist/chunks/delete-HRKIYPCO.js +0 -159
  404. package/dist/chunks/delete-P2UL3KTU.js +0 -226
  405. package/dist/chunks/detect-projects-ODNU4PK2.js +0 -18
  406. package/dist/chunks/detect-services-U7QGT7VO.js +0 -40
  407. package/dist/chunks/disable-3NYMICQ3.js +0 -198
  408. package/dist/chunks/discard-RNVEJUK3.js +0 -145
  409. package/dist/chunks/edit-63S2RQHR.js +0 -162
  410. package/dist/chunks/edit-CTENFZ7H.js +0 -647
  411. package/dist/chunks/enable-WILWXAHV.js +0 -204
  412. package/dist/chunks/exec-4IPHZ55G.js +0 -1291
  413. package/dist/chunks/export-YHGV3EPK.js +0 -177
  414. package/dist/chunks/fetch-proxy-R3JZNXBZ.js +0 -99
  415. package/dist/chunks/image-MWKS2YMB.js +0 -75
  416. package/dist/chunks/import-builders-H55X5VYD.js +0 -39
  417. package/dist/chunks/inspect-JTJMK6TO.js +0 -596
  418. package/dist/chunks/inspect-KBIPLMGR.js +0 -216
  419. package/dist/chunks/inspect-OP26FDBY.js +0 -171
  420. package/dist/chunks/inspect-SW4UMWTB.js +0 -175
  421. package/dist/chunks/inspect-WPLZPVBO.js +0 -145
  422. package/dist/chunks/list-HE7DWAWH.js +0 -387
  423. package/dist/chunks/list-OUG7WCT7.js +0 -404
  424. package/dist/chunks/list-QUSEURJZ.js +0 -426
  425. package/dist/chunks/login-MIIQJVF3.js +0 -233
  426. package/dist/chunks/ls-24N3DUK4.js +0 -183
  427. package/dist/chunks/ls-3Y7KEFKT.js +0 -175
  428. package/dist/chunks/ls-75F5HIJ5.js +0 -188
  429. package/dist/chunks/ls-REN6X2X5.js +0 -204
  430. package/dist/chunks/ls-W4STUDXK.js +0 -223
  431. package/dist/chunks/ls-Z4CTSD6C.js +0 -210
  432. package/dist/chunks/open-ARMCLPBK.js +0 -116
  433. package/dist/chunks/permissions-JKI67F62.js +0 -99
  434. package/dist/chunks/publish-SMSQ7OX2.js +0 -155
  435. package/dist/chunks/pull-4QZJZELD.js +0 -45
  436. package/dist/chunks/push-T6IYQY2J.js +0 -191
  437. package/dist/chunks/query-CP3JK5LW.js +0 -725
  438. package/dist/chunks/reorder-RAWKFGLV.js +0 -412
  439. package/dist/chunks/reply-235UHUD4.js +0 -176
  440. package/dist/chunks/resolve-5KCLN7QV.js +0 -237
  441. package/dist/chunks/resolve-deployment-framework-preset-NPE6RLV3.js +0 -36
  442. package/dist/chunks/restore-D24WAUAN.js +0 -252
  443. package/dist/chunks/rm-DBQDXSOC.js +0 -162
  444. package/dist/chunks/rm-G5INO77R.js +0 -148
  445. package/dist/chunks/rm-NLKSEKZ5.js +0 -195
  446. package/dist/chunks/rm-QV76CJA4.js +0 -322
  447. package/dist/chunks/rm-TZ4PDDUK.js +0 -147
  448. package/dist/chunks/routes-QVMBXOSX.js +0 -24
  449. package/dist/chunks/rule-inspect-76MC7I2D.js +0 -123
  450. package/dist/chunks/rules-IDUXVTPG.js +0 -89
  451. package/dist/chunks/schema-AV6BHGKY.js +0 -237
  452. package/dist/chunks/schema-QJVQTNB4.js +0 -381
  453. package/dist/chunks/set-L5NFQSCF.js +0 -250
  454. package/dist/chunks/setup-and-link-USSVDKCM.js +0 -65
  455. package/dist/chunks/stamp-AA7R3MZS.js +0 -16
  456. package/dist/chunks/tags-2NLUU4EC.js +0 -69
  457. package/dist/chunks/types-4GAJ7XQQ.js +0 -116
  458. package/dist/chunks/update-WGLBB65M.js +0 -224
  459. package/dist/chunks/vlt-builder-importer-USCFHWPL.js +0 -322
@@ -1,725 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __dirname_ } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __dirname_(__filename);
7
- import {
8
- OBSERVABILITY_METRICS_PATH,
9
- fetchCatalogMetricDetailOrExit,
10
- fetchMetricDetailOrExit,
11
- getDefaultAggregation
12
- } from "./chunk-HM24ZWQL.js";
13
- import {
14
- computeGranularity,
15
- formatText,
16
- getDefaultCustomMetricAggregation,
17
- isCanonicalAggregation
18
- } from "./chunk-HD4DR3DA.js";
19
- import {
20
- formatErrorJson,
21
- formatQueryJson,
22
- getRollupColumnName,
23
- handleApiError
24
- } from "./chunk-7MRDIPJY.js";
25
- import "./chunk-5AJPMLDV.js";
26
- import "./chunk-A3NYPUKZ.js";
27
- import {
28
- resolveTimeRange,
29
- validateAllProjectMutualExclusivity
30
- } from "./chunk-KFWQ3EFH.js";
31
- import "./chunk-ND5CF2H3.js";
32
- import {
33
- validateJsonOutput
34
- } from "./chunk-KXDWXXJH.js";
35
- import {
36
- metricsCommand
37
- } from "./chunk-4TUMNBEE.js";
38
- import "./chunk-VXYGCOKL.js";
39
- import "./chunk-GGP5R3FU.js";
40
- import {
41
- getScope
42
- } from "./chunk-SM3F3PYJ.js";
43
- import "./chunk-XNIZGCN5.js";
44
- import "./chunk-NW34PW6V.js";
45
- import {
46
- printError
47
- } from "./chunk-3VM7HWF6.js";
48
- import {
49
- parseArguments
50
- } from "./chunk-57RHXXXG.js";
51
- import {
52
- getLinkedProject,
53
- getProjectByNameOrId
54
- } from "./chunk-AJ5HUOWB.js";
55
- import "./chunk-G5FBSUL4.js";
56
- import "./chunk-26CU4Q3C.js";
57
- import "./chunk-XPJLPUKO.js";
58
- import {
59
- ProjectNotFound,
60
- isAPIError
61
- } from "./chunk-CV5YC2EN.js";
62
- import {
63
- getFlagsSpecification
64
- } from "./chunk-Q2DGFCO7.js";
65
- import {
66
- output_manager_default
67
- } from "./chunk-2JIX6UMI.js";
68
- import "./chunk-P4QNYOFB.js";
69
- import "./chunk-ZW6HETRE.js";
70
- import {
71
- require_source
72
- } from "./chunk-S7KYDPEM.js";
73
- import {
74
- __toESM
75
- } from "./chunk-TZ2YI2VH.js";
76
-
77
- // src/commands/metrics/query.ts
78
- var import_chalk = __toESM(require_source(), 1);
79
-
80
- // src/commands/metrics/validation.ts
81
- function validateRequiredMetric(metric) {
82
- if (metric) {
83
- return { valid: true, value: metric };
84
- }
85
- return {
86
- valid: false,
87
- code: "MISSING_METRIC",
88
- message: "Missing required metric. Specify the metric to query.\n\nRun 'vercel metrics schema' to see available metrics."
89
- };
90
- }
91
- function validateOrderDirection(orderDirection) {
92
- if (orderDirection === void 0) {
93
- return { valid: true, value: void 0 };
94
- }
95
- if (orderDirection === "asc" || orderDirection === "desc") {
96
- return { valid: true, value: orderDirection };
97
- }
98
- return {
99
- valid: false,
100
- code: "INVALID_ORDER",
101
- message: `Invalid order "${orderDirection}". Use "asc" or "desc".`,
102
- allowedValues: ["asc", "desc"]
103
- };
104
- }
105
- function validateOrderBy(orderBy) {
106
- if (orderBy === void 0) {
107
- return { valid: true, value: void 0 };
108
- }
109
- if (orderBy === "value" || orderBy === "count") {
110
- return { valid: true, value: orderBy };
111
- }
112
- return {
113
- valid: false,
114
- code: "INVALID_ORDER_BY",
115
- message: `Invalid order-by "${orderBy}". Use "value" or "count".`,
116
- allowedValues: ["value", "count"]
117
- };
118
- }
119
-
120
- // src/commands/metrics/query.ts
121
- function handleValidationError(result, jsonOutput, client, telemetry) {
122
- telemetry.trackCliError(result.code);
123
- if (jsonOutput) {
124
- client.stdout.write(
125
- formatErrorJson(result.code, result.message, result.allowedValues)
126
- );
127
- } else {
128
- output_manager_default.error(result.message);
129
- if (result.allowedValues && result.allowedValues.length > 0) {
130
- output_manager_default.print(`
131
- Available values: ${result.allowedValues.join(", ")}
132
- `);
133
- }
134
- }
135
- return 1;
136
- }
137
- var PRODUCTION_ENVIRONMENT_FILTER = "environment eq 'production'";
138
- var PRODUCTION_ENVIRONMENT_KQL_FILTER = "environment:production";
139
- var CUSTOM_METRIC_VALUE_ALIAS = "value";
140
- var CUSTOM_METRIC_COUNT_ALIAS = "__seriesCount";
141
- var SUM_DEFAULT_METRIC_UNITS = /* @__PURE__ */ new Set(["bytes", "count", "usd", "units"]);
142
- var FILTER_DEPRECATION_WARNING = "OData support in --filter is deprecated and will be removed soon. KQL will be the only supported filter syntax.";
143
- function combineFilters(filters, prod, syntax = "odata") {
144
- const nonEmptyFilters = [
145
- ...filters?.filter((filter) => filter.length > 0) ?? [],
146
- ...prod ? [
147
- syntax === "kql" ? PRODUCTION_ENVIRONMENT_KQL_FILTER : PRODUCTION_ENVIRONMENT_FILTER
148
- ] : []
149
- ];
150
- if (nonEmptyFilters.length === 0) {
151
- return void 0;
152
- }
153
- if (nonEmptyFilters.length === 1) {
154
- return nonEmptyFilters[0];
155
- }
156
- const conjunction = syntax === "kql" ? " AND " : " and ";
157
- return nonEmptyFilters.map((filter) => `(${filter})`).join(conjunction);
158
- }
159
- function usesODataSyntax(filters) {
160
- return filters?.some((filter) => {
161
- const unquoted = filter.replace(/"(?:\\.|[^"\\])*"|'(?:''|[^'])*'/g, "");
162
- return /\s(?:eq|ne|gt|ge|lt|le|in)\s/i.test(unquoted) || /\b(?:contains|startswith|endswith)\s*\(/i.test(unquoted);
163
- }) ?? false;
164
- }
165
- function getRequestOrderBy(metric, aggregation, orderBy) {
166
- return orderBy === "value" ? getRollupColumnName(metric, aggregation) : void 0;
167
- }
168
- function toBucketSeconds(granularity) {
169
- if ("minutes" in granularity)
170
- return granularity.minutes * 60;
171
- if ("hours" in granularity)
172
- return granularity.hours * 60 * 60;
173
- return granularity.days * 24 * 60 * 60;
174
- }
175
- function alignTimeRangeToGranularity(startTime, endTime, granularity) {
176
- const bucketMs = toBucketSeconds(granularity) * 1e3;
177
- return {
178
- startTime: new Date(Math.floor(startTime.getTime() / bucketMs) * bucketMs),
179
- endTime: new Date(Math.ceil(endTime.getTime() / bucketMs) * bucketMs)
180
- };
181
- }
182
- function getCatalogDefaultAggregation(metric, isPlatformMetric) {
183
- if (!isPlatformMetric) {
184
- return getDefaultCustomMetricAggregation(metric.unit, metric.aggregations);
185
- }
186
- const defaultAggregation = SUM_DEFAULT_METRIC_UNITS.has(metric.unit) ? "sum" : "avg";
187
- if (metric.aggregations.includes(defaultAggregation)) {
188
- return defaultAggregation;
189
- }
190
- if (defaultAggregation === "sum" && metric.aggregations.includes("count")) {
191
- return "count";
192
- }
193
- return metric.aggregations.includes("sum") ? "sum" : metric.aggregations[0];
194
- }
195
- function toCanonicalMetricSelection(metric, aggregation, supportedAggregations) {
196
- const [aggregationName, ...dimensionParts] = aggregation.split("/");
197
- const dimension = dimensionParts.join("/") || void 0;
198
- const countOnlyMetric = supportedAggregations?.includes("count") === true && !supportedAggregations.includes("sum");
199
- const additiveAggregation = supportedAggregations?.includes("sum") ? "sum" : countOnlyMetric || supportedAggregations === void 0 && metric.endsWith(".count") ? "count" : "sum";
200
- if (aggregation === "persecond") {
201
- return { metric, aggregation: additiveAggregation, per: "second" };
202
- }
203
- if (aggregation === "percent") {
204
- return { metric, aggregation: additiveAggregation, normalize: "percent" };
205
- }
206
- if (aggregationName === "unique") {
207
- if (dimension) {
208
- return { metric, aggregation: "unique", dimensions: [dimension] };
209
- }
210
- return {
211
- valid: false,
212
- code: "UNSUPPORTED_AGGREGATION",
213
- message: 'The unique aggregation requires a dimension, for example "unique/visitorId".'
214
- };
215
- }
216
- if (isCanonicalAggregation(aggregation)) {
217
- return { metric, aggregation };
218
- }
219
- return {
220
- valid: false,
221
- code: "INVALID_AGGREGATION",
222
- message: `Aggregation "${aggregation}" is not supported by the Observability query API.`
223
- };
224
- }
225
- function getCanonicalOrderBy(orderBy, selection, supportedAggregations) {
226
- if (orderBy === "value") {
227
- return "value";
228
- }
229
- const supportsCount = supportedAggregations === void 0 || supportedAggregations.includes("count");
230
- if (selection.aggregation === "count" || supportsCount) {
231
- return "count";
232
- }
233
- if (orderBy === "count") {
234
- return {
235
- valid: false,
236
- code: "INVALID_ORDER_BY",
237
- message: "--order-by count is not available because this metric does not support the count aggregation. Use --order-by value.",
238
- allowedValues: ["value"]
239
- };
240
- }
241
- return "value";
242
- }
243
- function createCanonicalMetricsRequest(options) {
244
- const metrics = {
245
- [CUSTOM_METRIC_VALUE_ALIAS]: options.selection
246
- };
247
- let rankMetric = CUSTOM_METRIC_VALUE_ALIAS;
248
- if (options.groupBy.length > 0 && options.orderBy === "count" && options.selection.aggregation !== "count") {
249
- metrics[CUSTOM_METRIC_COUNT_ALIAS] = {
250
- metric: options.metric,
251
- aggregation: "count"
252
- };
253
- rankMetric = CUSTOM_METRIC_COUNT_ALIAS;
254
- }
255
- return {
256
- scope: {
257
- ownerId: options.scope.ownerId,
258
- ...options.scope.type === "project" ? { projectIds: options.scope.projectIds } : {}
259
- },
260
- timeRange: {
261
- start: options.startTime.toISOString(),
262
- end: options.endTime.toISOString()
263
- },
264
- bucketSeconds: toBucketSeconds(options.granularity),
265
- ...options.groupBy.length > 0 ? { groupBy: options.groupBy } : {},
266
- ...options.filter ? { filter: options.filter } : {},
267
- metrics,
268
- outputs: [CUSTOM_METRIC_VALUE_ALIAS],
269
- ...options.groupBy.length > 0 ? {
270
- seriesSelection: {
271
- limit: options.limit,
272
- mode: "exact",
273
- rankBy: [
274
- {
275
- metric: rankMetric,
276
- direction: options.orderDirection ?? "desc"
277
- }
278
- ]
279
- }
280
- } : {}
281
- };
282
- }
283
- function canonicalResponseToMetricsResponse(response, rollupColumn, orderBy, orderDirection) {
284
- const toRow = (point) => ({
285
- ...point.dimensions,
286
- [rollupColumn]: point.values[CUSTOM_METRIC_VALUE_ALIAS] ?? null
287
- });
288
- return {
289
- ...response.series ? {
290
- data: response.series.map((point) => ({
291
- timestamp: point.timestamp,
292
- ...toRow(point)
293
- }))
294
- } : {},
295
- summary: response.summary.map(toRow),
296
- statistics: {
297
- rowsRead: response.meta.statistics.rowsRead,
298
- bytesRead: response.meta.statistics.bytesRead,
299
- dbTimeSeconds: response.meta.statistics.databaseElapsedMs / 1e3,
300
- engineTimeSeconds: response.meta.statistics.elapsedMs / 1e3,
301
- queryTable: [...new Set(response.meta.sources.map((source) => source.id))].sort().join(",")
302
- },
303
- ...orderBy ? { orderBy } : {},
304
- ...orderDirection ? { orderDirection } : {}
305
- };
306
- }
307
- async function resolveQueryScope(client, telemetry, opts) {
308
- if (opts.project || opts.all) {
309
- const { team } = await getScope(client);
310
- if (!team) {
311
- const errMsg = "No team context found. Run `vercel switch` to select a team, or use `vercel link` in a project directory.";
312
- return handleValidationError(
313
- { valid: false, code: "NO_TEAM", message: errMsg },
314
- opts.jsonOutput,
315
- client,
316
- telemetry
317
- );
318
- }
319
- if (opts.all) {
320
- return {
321
- scope: { type: "owner", ownerId: team.id },
322
- accountId: team.id,
323
- teamName: team.slug
324
- };
325
- }
326
- const project = await getProjectByNameOrId(client, opts.project, team.id);
327
- if (project instanceof ProjectNotFound) {
328
- const errMsg = `Project "${opts.project}" was not found in team "${team.slug}".`;
329
- return handleValidationError(
330
- { valid: false, code: "PROJECT_NOT_FOUND", message: errMsg },
331
- opts.jsonOutput,
332
- client,
333
- telemetry
334
- );
335
- }
336
- return {
337
- scope: {
338
- type: "project",
339
- ownerId: team.id,
340
- projectIds: [project.id]
341
- },
342
- accountId: team.id,
343
- teamName: team.slug,
344
- projectName: project.name
345
- };
346
- }
347
- const linkedProject = await getLinkedProject(client);
348
- if (linkedProject.status === "error") {
349
- telemetry.trackCliError("LINK_ERROR");
350
- return linkedProject.exitCode;
351
- }
352
- if (linkedProject.status === "not_linked") {
353
- const errMsg = "No linked project found. Run `vercel link` to link a project, or use --project <name-or-id> or --all.";
354
- return handleValidationError(
355
- { valid: false, code: "NOT_LINKED", message: errMsg },
356
- opts.jsonOutput,
357
- client,
358
- telemetry
359
- );
360
- }
361
- return {
362
- scope: {
363
- type: "project",
364
- ownerId: linkedProject.org.id,
365
- projectIds: [linkedProject.project.id]
366
- },
367
- accountId: linkedProject.org.id,
368
- teamName: linkedProject.org.slug,
369
- projectName: linkedProject.project.name
370
- };
371
- }
372
- async function query(client, telemetry) {
373
- let parsedArgs;
374
- const flagsSpecification = getFlagsSpecification(metricsCommand.options);
375
- try {
376
- parsedArgs = parseArguments(client.argv.slice(2), flagsSpecification);
377
- } catch (err) {
378
- telemetry.trackCliError("INVALID_ARGUMENTS");
379
- printError(err);
380
- return 1;
381
- }
382
- const flags = parsedArgs.flags;
383
- const positionalArgs = parsedArgs.args.slice(1);
384
- const positionalMetric = positionalArgs[0] === "query" ? positionalArgs[1] : positionalArgs[0];
385
- const formatResult = validateJsonOutput(flags);
386
- if (!formatResult.valid) {
387
- telemetry.trackCliError("INVALID_OUTPUT_FORMAT");
388
- output_manager_default.error(formatResult.error);
389
- return 1;
390
- }
391
- const jsonOutput = formatResult.jsonOutput;
392
- const metricFlag = positionalMetric;
393
- const aggregationFlag = flags["--aggregation"];
394
- const groupBy = flags["--group-by"] ?? [];
395
- const limit = flags["--limit"];
396
- const orderByInput = typeof flags["--order-by"] === "string" ? flags["--order-by"].trim().toLowerCase() : void 0;
397
- const orderInput = typeof flags["--order"] === "string" ? flags["--order"].trim().toLowerCase() : void 0;
398
- const filters = flags["--filter"];
399
- const prod = flags["--prod"];
400
- const since = flags["--since"];
401
- const until = flags["--until"];
402
- const granularity = flags["--granularity"];
403
- const bucketTimezone = flags["--bucket-timezone"]?.trim();
404
- const project = flags["--project"];
405
- const all = flags["--all"];
406
- telemetry.trackCliArgumentMetricId(metricFlag);
407
- telemetry.trackCliOptionAggregation(aggregationFlag);
408
- telemetry.trackCliOptionGroupBy(groupBy.length > 0 ? groupBy : void 0);
409
- telemetry.trackCliOptionLimit(limit);
410
- telemetry.trackCliOptionOrderBy(orderByInput);
411
- telemetry.trackCliOptionOrder(orderInput);
412
- telemetry.trackCliOptionFilter(filters);
413
- telemetry.trackCliFlagProd(prod);
414
- telemetry.trackCliOptionSince(since);
415
- telemetry.trackCliOptionUntil(until);
416
- telemetry.trackCliOptionGranularity(granularity);
417
- telemetry.trackCliOptionBucketTimezone(bucketTimezone);
418
- telemetry.trackCliOptionProject(project);
419
- telemetry.trackCliFlagAll(all);
420
- telemetry.trackCliOptionFormat(flags["--format"]);
421
- const orderByResult = validateOrderBy(orderByInput);
422
- if (!orderByResult.valid) {
423
- return handleValidationError(orderByResult, jsonOutput, client, telemetry);
424
- }
425
- const orderByMode = orderByResult.value;
426
- const requiredMetric = validateRequiredMetric(metricFlag);
427
- if (!requiredMetric.valid) {
428
- return handleValidationError(requiredMetric, jsonOutput, client, telemetry);
429
- }
430
- const metric = requiredMetric.value;
431
- const mutualResult = validateAllProjectMutualExclusivity(all, project);
432
- if (!mutualResult.valid) {
433
- return handleValidationError(mutualResult, jsonOutput, client, telemetry);
434
- }
435
- const orderDirectionResult = validateOrderDirection(orderInput);
436
- if (!orderDirectionResult.valid) {
437
- return handleValidationError(
438
- orderDirectionResult,
439
- jsonOutput,
440
- client,
441
- telemetry
442
- );
443
- }
444
- const orderDirection = orderDirectionResult.value;
445
- const scopeResult = await resolveQueryScope(client, telemetry, {
446
- project,
447
- all,
448
- jsonOutput
449
- });
450
- if (typeof scopeResult === "number") {
451
- return scopeResult;
452
- }
453
- const { scope, accountId, teamName, projectName } = scopeResult;
454
- const isPlatformMetric = metric.startsWith("vercel.");
455
- const useCanonicalQuery = !isPlatformMetric || !process.env.FF_LEGACY_METRICS;
456
- const filterUsesOData = usesODataSyntax(filters);
457
- if (useCanonicalQuery && filterUsesOData) {
458
- output_manager_default.print(`${import_chalk.default.yellow("!")} ${FILTER_DEPRECATION_WARNING}
459
- `);
460
- }
461
- const filter = combineFilters(
462
- filters,
463
- prod,
464
- useCanonicalQuery && !filterUsesOData ? "kql" : "odata"
465
- );
466
- let startTime;
467
- let endTime;
468
- try {
469
- ({ startTime, endTime } = resolveTimeRange(since, until));
470
- } catch (err) {
471
- const errMsg = err instanceof Error ? err.message : String(err);
472
- return handleValidationError(
473
- { valid: false, code: "INVALID_TIME", message: errMsg },
474
- jsonOutput,
475
- client,
476
- telemetry
477
- );
478
- }
479
- let metricUnit;
480
- let aggregationInput;
481
- let canonicalAggregations;
482
- if (useCanonicalQuery) {
483
- const catalogOrExitCode = await fetchCatalogMetricDetailOrExit(
484
- client,
485
- accountId,
486
- jsonOutput,
487
- metric,
488
- isPlatformMetric ? "system" : "custom",
489
- startTime.toISOString()
490
- );
491
- if (typeof catalogOrExitCode === "number") {
492
- telemetry.trackCliError("SCHEMA_FETCH_FAILED");
493
- return catalogOrExitCode;
494
- }
495
- const catalogMetric = catalogOrExitCode.find((item) => item.id === metric);
496
- if (!catalogMetric) {
497
- return handleValidationError(
498
- {
499
- valid: false,
500
- code: "UNKNOWN_METRIC",
501
- message: `Unknown metric "${metric}".`,
502
- allowedValues: catalogOrExitCode.map((item) => item.id)
503
- },
504
- jsonOutput,
505
- client,
506
- telemetry
507
- );
508
- }
509
- metricUnit = catalogMetric.unit;
510
- canonicalAggregations = catalogMetric.aggregations;
511
- if (aggregationFlag) {
512
- aggregationInput = aggregationFlag;
513
- } else {
514
- const defaultAggregation = getCatalogDefaultAggregation(
515
- catalogMetric,
516
- isPlatformMetric
517
- );
518
- if (!defaultAggregation) {
519
- return handleValidationError(
520
- {
521
- valid: false,
522
- code: "INVALID_AGGREGATION",
523
- message: `Metric "${metric}" does not support any query aggregations.`
524
- },
525
- jsonOutput,
526
- client,
527
- telemetry
528
- );
529
- }
530
- aggregationInput = defaultAggregation;
531
- }
532
- } else {
533
- const detailOrExitCode = await fetchMetricDetailOrExit(
534
- client,
535
- accountId,
536
- metric,
537
- jsonOutput
538
- );
539
- if (typeof detailOrExitCode === "number") {
540
- telemetry.trackCliError("SCHEMA_FETCH_FAILED");
541
- return detailOrExitCode;
542
- }
543
- aggregationInput = aggregationFlag ?? getDefaultAggregation(detailOrExitCode, metric) ?? "sum";
544
- metricUnit = detailOrExitCode.find((item) => item.id === metric)?.unit ?? "count";
545
- }
546
- const aggregation = aggregationInput;
547
- const orderBy = getRequestOrderBy(metric, aggregation, orderByMode);
548
- const rangeMs = endTime.getTime() - startTime.getTime();
549
- const granResult = computeGranularity(rangeMs, granularity);
550
- const queryTimeRange = useCanonicalQuery ? alignTimeRangeToGranularity(startTime, endTime, granResult.duration) : { startTime, endTime };
551
- if (!jsonOutput && granResult.adjusted && granResult.notice) {
552
- output_manager_default.log(`Notice: ${granResult.notice}`);
553
- }
554
- let body;
555
- let canonicalOrderBy;
556
- if (!useCanonicalQuery) {
557
- body = {
558
- scope,
559
- metric,
560
- aggregation,
561
- startTime: startTime.toISOString(),
562
- endTime: endTime.toISOString(),
563
- granularity: granResult.duration,
564
- ...bucketTimezone ? { bucketTimezone } : {},
565
- ...groupBy.length > 0 ? { groupBy } : {},
566
- ...filter ? { filter } : {},
567
- limit: limit ?? 10,
568
- ...orderBy ? { orderBy } : {},
569
- ...orderDirection ? { orderDirection } : {}
570
- };
571
- } else {
572
- if (bucketTimezone) {
573
- return handleValidationError(
574
- {
575
- valid: false,
576
- code: "UNSUPPORTED_BUCKET_TIMEZONE",
577
- message: "--bucket-timezone is not supported by the new Observability query API yet."
578
- },
579
- jsonOutput,
580
- client,
581
- telemetry
582
- );
583
- }
584
- const selection = toCanonicalMetricSelection(
585
- metric,
586
- aggregation,
587
- canonicalAggregations
588
- );
589
- if ("valid" in selection) {
590
- return handleValidationError(selection, jsonOutput, client, telemetry);
591
- }
592
- const supportedAggregation = selection.aggregation;
593
- if (canonicalAggregations && !canonicalAggregations.includes(supportedAggregation)) {
594
- return handleValidationError(
595
- {
596
- valid: false,
597
- code: "INVALID_AGGREGATION",
598
- message: `Aggregation "${aggregation}" is not valid for metric "${metric}".`,
599
- allowedValues: [...canonicalAggregations]
600
- },
601
- jsonOutput,
602
- client,
603
- telemetry
604
- );
605
- }
606
- const canonicalOrderByResult = groupBy.length > 0 ? getCanonicalOrderBy(orderByMode, selection, canonicalAggregations) : void 0;
607
- if (canonicalOrderByResult && typeof canonicalOrderByResult !== "string") {
608
- return handleValidationError(
609
- canonicalOrderByResult,
610
- jsonOutput,
611
- client,
612
- telemetry
613
- );
614
- }
615
- canonicalOrderBy = canonicalOrderByResult;
616
- body = createCanonicalMetricsRequest({
617
- scope,
618
- metric,
619
- selection,
620
- startTime: queryTimeRange.startTime,
621
- endTime: queryTimeRange.endTime,
622
- granularity: granResult.duration,
623
- groupBy,
624
- filter,
625
- limit: limit ?? 10,
626
- orderBy: canonicalOrderBy,
627
- orderDirection
628
- });
629
- }
630
- const resolvedOrderBy = canonicalOrderBy ?? orderByMode;
631
- if (!jsonOutput) {
632
- output_manager_default.spinner("Querying metrics...");
633
- }
634
- let response;
635
- try {
636
- if (!useCanonicalQuery) {
637
- response = await client.fetch(
638
- "/v2/observability/query",
639
- {
640
- method: "POST",
641
- body: JSON.stringify(body),
642
- headers: { "Content-Type": "application/json" },
643
- accountId,
644
- bailOn429: true
645
- }
646
- );
647
- } else {
648
- const canonicalResponse = await client.fetch(
649
- OBSERVABILITY_METRICS_PATH,
650
- {
651
- method: "POST",
652
- body: JSON.stringify(body),
653
- headers: { "Content-Type": "application/json" },
654
- accountId,
655
- bailOn429: true
656
- }
657
- );
658
- response = canonicalResponseToMetricsResponse(
659
- canonicalResponse,
660
- getRollupColumnName(metric, aggregation),
661
- canonicalOrderBy,
662
- groupBy.length > 0 ? orderDirection ?? "desc" : void 0
663
- );
664
- }
665
- } catch (err) {
666
- if (isAPIError(err)) {
667
- telemetry.trackCliError(err.code ?? "API_ERROR", err.status);
668
- return handleApiError(err, jsonOutput, client);
669
- }
670
- const errMsg = err instanceof Error ? err.message : String(err);
671
- telemetry.trackCliError("NETWORK_ERROR");
672
- if (jsonOutput) {
673
- client.stdout.write(formatErrorJson("NETWORK_ERROR", errMsg));
674
- } else {
675
- output_manager_default.error(errMsg);
676
- }
677
- return 1;
678
- } finally {
679
- if (!jsonOutput) {
680
- output_manager_default.stopSpinner();
681
- }
682
- }
683
- if (jsonOutput) {
684
- client.stdout.write(
685
- formatQueryJson(
686
- {
687
- metric,
688
- aggregation,
689
- groupBy,
690
- filter,
691
- startTime: queryTimeRange.startTime.toISOString(),
692
- endTime: queryTimeRange.endTime.toISOString(),
693
- granularity: granResult.duration,
694
- ...bucketTimezone ? { bucketTimezone } : {},
695
- ...resolvedOrderBy ? { orderBy: resolvedOrderBy } : {},
696
- ...orderDirection ? { orderDirection } : {}
697
- },
698
- response
699
- )
700
- );
701
- } else {
702
- client.stdout.write(
703
- formatText(response, {
704
- metric,
705
- metricUnit,
706
- aggregation,
707
- groupBy,
708
- filter,
709
- scope,
710
- projectName,
711
- teamName,
712
- periodStart: queryTimeRange.startTime.toISOString(),
713
- periodEnd: queryTimeRange.endTime.toISOString(),
714
- granularity: granResult.duration,
715
- bucketTimezone,
716
- orderBy: resolvedOrderBy,
717
- orderDirection
718
- })
719
- );
720
- }
721
- return 0;
722
- }
723
- export {
724
- query as default
725
- };