@vercel/cli-support 65.3.1 → 65.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/add-7NS6HIWC.js +8 -0
  3. package/dist/chunks/add-NMYFDVXW.js +8 -0
  4. package/dist/chunks/add-PMJ5BECU.js +8 -0
  5. package/dist/chunks/build-BCY6HQJG.js +7 -0
  6. package/dist/chunks/{chunk-SKYDLHEZ.js → chunk-2K3ISCQ6.js} +1 -1
  7. package/dist/chunks/{chunk-BL3HBRF6.js → chunk-2TUVL6WE.js} +1 -1
  8. package/dist/chunks/{chunk-22FDWPWY.js → chunk-363SJ4TN.js} +1 -1
  9. package/dist/chunks/chunk-462YCCJZ.js +7 -0
  10. package/dist/chunks/{chunk-KNLGWGUE.js → chunk-4N6LMERQ.js} +6 -6
  11. package/dist/chunks/chunk-527GBU3K.js +7 -0
  12. package/dist/chunks/chunk-5IWFRZQT.js +10 -0
  13. package/dist/chunks/chunk-5KUUMQ3M.js +7 -0
  14. package/dist/chunks/{chunk-IVSC7ZFJ.js → chunk-5V53NA6C.js} +1 -1
  15. package/dist/chunks/chunk-6I6QJHCY.js +7 -0
  16. package/dist/chunks/chunk-6TXEVQA4.js +7 -0
  17. package/dist/chunks/{chunk-2PKEEQ5W.js → chunk-6YXIWZ3X.js} +1 -1
  18. package/dist/chunks/{chunk-7HV7O6DM.js → chunk-7E3WREH5.js} +1 -1
  19. package/dist/chunks/{chunk-Y6AGOERS.js → chunk-7L5QUDUR.js} +1 -1
  20. package/dist/chunks/{chunk-X4762EE4.js → chunk-7QAGSRCU.js} +1 -1
  21. package/dist/chunks/{chunk-NTZ5WWYV.js → chunk-7R6TRRG5.js} +1 -1
  22. package/dist/chunks/{chunk-WCWP4GBR.js → chunk-AYUUSAB7.js} +1 -1
  23. package/dist/chunks/chunk-BVGGTBYE.js +7 -0
  24. package/dist/chunks/{chunk-YN3C5BL5.js → chunk-C7FQMC6D.js} +1 -1
  25. package/dist/chunks/{chunk-2U7DJZSQ.js → chunk-CBVKB3DT.js} +1 -1
  26. package/dist/chunks/{chunk-FDNYYENK.js → chunk-CC6FLKIP.js} +1 -1
  27. package/dist/chunks/chunk-CR3NBTHV.js +7 -0
  28. package/dist/chunks/{chunk-BBKEP7RO.js → chunk-CWM2F235.js} +1 -1
  29. package/dist/chunks/{chunk-IUXSJWL3.js → chunk-DKJL2KV7.js} +1 -1
  30. package/dist/chunks/{chunk-2ACMWVTB.js → chunk-DQ2SVW4R.js} +1 -1
  31. package/dist/chunks/{chunk-SLI2O5X7.js → chunk-EAXMWCOL.js} +2 -2
  32. package/dist/chunks/{chunk-LRYGNQ6C.js → chunk-ECEDD646.js} +1 -1
  33. package/dist/chunks/{chunk-IGDG5CWT.js → chunk-EEUJLJEJ.js} +1 -1
  34. package/dist/chunks/{chunk-VQSLPYAF.js → chunk-EGNR2DEI.js} +1 -1
  35. package/dist/chunks/chunk-EISD3RG7.js +11 -0
  36. package/dist/chunks/{chunk-GVTXA6HG.js → chunk-EKZTFGDX.js} +1 -1
  37. package/dist/chunks/{chunk-CEMPU323.js → chunk-EU2GBIPC.js} +1 -1
  38. package/dist/chunks/{chunk-3ADDGPEN.js → chunk-F6EBOT64.js} +1 -1
  39. package/dist/chunks/chunk-FHU2O7ZJ.js +8 -0
  40. package/dist/chunks/{chunk-KH6565YH.js → chunk-FLHO75XC.js} +1 -1
  41. package/dist/chunks/chunk-FSPPKNKN.js +7 -0
  42. package/dist/chunks/{chunk-43GBAKL2.js → chunk-GCZVIDNG.js} +1 -1
  43. package/dist/chunks/{chunk-G4T7VBGN.js → chunk-HSFKISDH.js} +1 -1
  44. package/dist/chunks/{chunk-OQCMRU3J.js → chunk-HTXDC7E2.js} +2 -2
  45. package/dist/chunks/{chunk-76SVVWPH.js → chunk-IOZ3I765.js} +1 -1
  46. package/dist/chunks/{chunk-UKQMYTWW.js → chunk-JLE7K4SY.js} +1 -1
  47. package/dist/chunks/{chunk-3JGBBS6V.js → chunk-JP33AIDQ.js} +1 -1
  48. package/dist/chunks/{chunk-ULHNMQ7C.js → chunk-JRPNHWA3.js} +1 -1
  49. package/dist/chunks/{chunk-D2BZMGHP.js → chunk-JUSR7V2L.js} +1 -1
  50. package/dist/chunks/{chunk-XB4SKARZ.js → chunk-JWCEHQQF.js} +1 -1
  51. package/dist/chunks/chunk-K5U47EVH.js +7 -0
  52. package/dist/chunks/{chunk-VOCZ34ON.js → chunk-KCKYPLIH.js} +1 -1
  53. package/dist/chunks/{chunk-2WYYGGEO.js → chunk-KGBIRIFF.js} +1 -1
  54. package/dist/chunks/{chunk-RRREFECI.js → chunk-KJA2GKPT.js} +1 -1
  55. package/dist/chunks/{chunk-S5IWVPYT.js → chunk-KPQLUGFI.js} +1 -1
  56. package/dist/chunks/{chunk-S4SJ7GIZ.js → chunk-KQCFC2JL.js} +1 -1
  57. package/dist/chunks/{chunk-XXXRTHTP.js → chunk-KQCROPL3.js} +1 -1
  58. package/dist/chunks/{chunk-3KKFLKQG.js → chunk-KY335KWI.js} +1 -1
  59. package/dist/chunks/{chunk-OWOWPOIE.js → chunk-L3JYCXVB.js} +1 -1
  60. package/dist/chunks/chunk-LFOWP74R.js +7 -0
  61. package/dist/chunks/{chunk-PFNYWWLI.js → chunk-LOBA3E72.js} +1 -1
  62. package/dist/chunks/{chunk-XZV4BFM5.js → chunk-LQVSU5HR.js} +1 -1
  63. package/dist/chunks/{chunk-2H3SB5RP.js → chunk-LW4N3CW6.js} +1 -1
  64. package/dist/chunks/{chunk-6ISAISGD.js → chunk-M2NXKZKX.js} +1 -1
  65. package/dist/chunks/{chunk-F2SWJEYV.js → chunk-MBEKRUTQ.js} +1 -1
  66. package/dist/chunks/{chunk-UJSW56GS.js → chunk-N2FLYCCO.js} +1 -1
  67. package/dist/chunks/{chunk-ZH6KHD55.js → chunk-N6JBQMOF.js} +2 -2
  68. package/dist/chunks/{chunk-OCQPXOTX.js → chunk-NAX6IARA.js} +1 -1
  69. package/dist/chunks/{chunk-4UGHFESV.js → chunk-NGKO2OOU.js} +1 -1
  70. package/dist/chunks/chunk-NW7WWUCQ.js +9 -0
  71. package/dist/chunks/chunk-O4WNSKQR.js +15 -0
  72. package/dist/chunks/{chunk-7Z3WUAO5.js → chunk-O72YDZKD.js} +1 -1
  73. package/dist/chunks/{chunk-LKLH6DZP.js → chunk-OHEOYFBU.js} +1 -1
  74. package/dist/chunks/{chunk-LJBUJ23M.js → chunk-OZCQTXI4.js} +1 -1
  75. package/dist/chunks/{chunk-LCHECISY.js → chunk-Q4KTAQB3.js} +1 -1
  76. package/dist/chunks/{chunk-TZFDVQ72.js → chunk-QIVX6SCR.js} +1 -1
  77. package/dist/chunks/{chunk-7Y46LB43.js → chunk-QVHXFHBV.js} +1 -1
  78. package/dist/chunks/chunk-QVXS234E.js +7 -0
  79. package/dist/chunks/{chunk-SXOSF4O6.js → chunk-QVZAAMGQ.js} +1 -1
  80. package/dist/chunks/chunk-R2BUF6Z7.js +7 -0
  81. package/dist/chunks/{chunk-OGPENBY2.js → chunk-R2XHJDAP.js} +1 -1
  82. package/dist/chunks/{chunk-E6CO6TUM.js → chunk-RMZTB2IU.js} +1 -1
  83. package/dist/chunks/{chunk-LT3UK4K6.js → chunk-SLGUYM42.js} +1 -1
  84. package/dist/chunks/{chunk-7BGKE3JW.js → chunk-SYFG2RM6.js} +1 -1
  85. package/dist/chunks/chunk-T6243EDS.js +7 -0
  86. package/dist/chunks/chunk-TAISZMA2.js +7 -0
  87. package/dist/chunks/{chunk-TO5PJDEN.js → chunk-TEYREL44.js} +1 -1
  88. package/dist/chunks/{chunk-6KVHNQW4.js → chunk-TIPQQ4TG.js} +1 -1
  89. package/dist/chunks/{chunk-DUT4U5YY.js → chunk-U2OBPULW.js} +1 -1
  90. package/dist/chunks/{chunk-OQPXJCMK.js → chunk-UGNIIDHR.js} +1 -1
  91. package/dist/chunks/{chunk-NQWGRKF4.js → chunk-UHBMX3OK.js} +1 -1
  92. package/dist/chunks/{chunk-QMCHGGDX.js → chunk-VNIKIQVE.js} +1 -1
  93. package/dist/chunks/{chunk-DGYHWXD2.js → chunk-WDXW6A4H.js} +2 -2
  94. package/dist/chunks/{chunk-L4NSF346.js → chunk-WEH6XC4Y.js} +1 -1
  95. package/dist/chunks/{chunk-TKBORMUF.js → chunk-WKZ6JSGZ.js} +1 -1
  96. package/dist/chunks/{chunk-WGXKX24Q.js → chunk-WVHCBDTB.js} +1 -1
  97. package/dist/chunks/{chunk-COM5YCHF.js → chunk-XC46OAAT.js} +1 -1
  98. package/dist/chunks/{chunk-WBF36MYT.js → chunk-XVDRGWXM.js} +1 -1
  99. package/dist/chunks/{chunk-IKQTP764.js → chunk-Y5ZMKL7E.js} +1 -1
  100. package/dist/chunks/{chunk-NEFDNROD.js → chunk-YEZJNXQX.js} +1 -1
  101. package/dist/chunks/{chunk-VMMMBWD3.js → chunk-YHULP2KK.js} +1 -1
  102. package/dist/chunks/{chunk-OMCGXRSA.js → chunk-YMZ6WBKB.js} +2 -2
  103. package/dist/chunks/{chunk-URPEIX6M.js → chunk-ZN6CQWVP.js} +1 -1
  104. package/dist/chunks/{chunk-YK7XLFU2.js → chunk-ZQBSAMFL.js} +1 -1
  105. package/dist/chunks/clear-FKVWDCVA.js +8 -0
  106. package/dist/chunks/{compile-vercel-config-3IYM2CHC.js → compile-vercel-config-GWAJE44R.js} +1 -1
  107. package/dist/chunks/config-5WVLG5SE.js +8 -0
  108. package/dist/chunks/{config-ZFIC7N4D.js → config-RMOHN5YT.js} +1 -1
  109. package/dist/chunks/config-validator.mjs +1 -1
  110. package/dist/chunks/{constants-ICJL2EO5.js → constants-JAB7MRSK.js} +1 -1
  111. package/dist/chunks/delete-5WMB4WFR.js +9 -0
  112. package/dist/chunks/delete-EM4JZPFA.js +10 -0
  113. package/dist/chunks/{detect-services-MOXTX5XG.js → detect-services-BSJGB4RM.js} +1 -1
  114. package/dist/chunks/disable-QOM7UHQC.js +7 -0
  115. package/dist/chunks/discard-L5ZH7P5B.js +14 -0
  116. package/dist/chunks/edit-F3VJGCG2.js +9 -0
  117. package/dist/chunks/edit-TM7YCWBU.js +8 -0
  118. package/dist/chunks/enable-72C3QX34.js +7 -0
  119. package/dist/chunks/{export-MHSH7QCX.js → export-EPLYZF2Q.js} +1 -1
  120. package/dist/chunks/{future-FFOGTKMF.js → future-V77DRMQG.js} +1 -1
  121. package/dist/chunks/generate-cert-for-deploy-Y3YHBMPU.js +7 -0
  122. package/dist/chunks/{image-7METSS6F.js → image-CVXEXU5R.js} +1 -1
  123. package/dist/chunks/{import-builders-GM2SERWV.js → import-builders-PGRKJOOE.js} +1 -1
  124. package/dist/chunks/inspect-BTRNXRJT.js +9 -0
  125. package/dist/chunks/{inspect-IAWVHJXQ.js → inspect-CZ7WXYE5.js} +1 -1
  126. package/dist/chunks/inspect-FGDVWAQP.js +13 -0
  127. package/dist/chunks/{inspect-A7WJQQZO.js → inspect-HFDGZNWC.js} +1 -1
  128. package/dist/chunks/{inspect-DI434TAM.js → inspect-T2AIREYK.js} +1 -1
  129. package/dist/chunks/list-CKRRHAOE.js +12 -0
  130. package/dist/chunks/{list-WWU734RK.js → list-FLREMGJR.js} +1 -1
  131. package/dist/chunks/{list-INRPH25K.js → list-ON4YTQRN.js} +1 -1
  132. package/dist/chunks/login-55LJ5ZA6.js +9 -0
  133. package/dist/chunks/{login-R5NQRPQC.js → login-DQRZSD4Z.js} +1 -1
  134. package/dist/chunks/logs-2HQXWOHM.js +7 -0
  135. package/dist/chunks/{ls-S5E2NQMI.js → ls-2HUJHVLA.js} +1 -1
  136. package/dist/chunks/{ls-V2ZSIVO3.js → ls-3DVM5HLK.js} +1 -1
  137. package/dist/chunks/ls-4B3QYHCI.js +8 -0
  138. package/dist/chunks/{ls-MCQ2NS65.js → ls-A7K4XDQB.js} +1 -1
  139. package/dist/chunks/{ls-LIGIBVAT.js → ls-FK5XEJEU.js} +1 -1
  140. package/dist/chunks/{ls-VXH4QYF5.js → ls-QGUKJJY5.js} +1 -1
  141. package/dist/chunks/ls-VTKHPDWS.js +11 -0
  142. package/dist/chunks/mutate-7ADZBCZM.js +9 -0
  143. package/dist/chunks/{notifications-KFZ333V5.js → notifications-XZJXE2K4.js} +1 -1
  144. package/dist/chunks/open-EE5IZQD7.js +7 -0
  145. package/dist/chunks/{openapi-JGYEFJJV.js → openapi-QBX62ZXC.js} +1 -1
  146. package/dist/chunks/{permissions-ZSHKMXBZ.js → permissions-VYJ4LL5R.js} +1 -1
  147. package/dist/chunks/{plugin-offer-Z6FCPQFD.js → plugin-offer-TEGYA3TA.js} +1 -1
  148. package/dist/chunks/{prompt-missing-credentials-KOA7C4QC.js → prompt-missing-credentials-VP6OVCFM.js} +1 -1
  149. package/dist/chunks/publish-2HEK5UMJ.js +15 -0
  150. package/dist/chunks/pull-WRTTSY7J.js +7 -0
  151. package/dist/chunks/purchase-domain-if-available-6S3NLTUI.js +7 -0
  152. package/dist/chunks/push-L3QRGGLC.js +7 -0
  153. package/dist/chunks/{query-JGPO7TNY.js → query-FXXLX6UB.js} +3 -3
  154. package/dist/chunks/{reauthenticate-OZRQFR66.js → reauthenticate-IXQDC4UZ.js} +1 -1
  155. package/dist/chunks/reorder-B4OXSYCI.js +10 -0
  156. package/dist/chunks/reply-F637K6XH.js +9 -0
  157. package/dist/chunks/resolve-E3F6NYQZ.js +12 -0
  158. package/dist/chunks/{resolve-agent-team-KX77HEAF.js → resolve-agent-team-EIPCH766.js} +1 -1
  159. package/dist/chunks/restore-Q25KRZPH.js +16 -0
  160. package/dist/chunks/rm-FWD2NUGX.js +8 -0
  161. package/dist/chunks/rm-JMQ4QKCC.js +8 -0
  162. package/dist/chunks/rm-PPG7P3GN.js +8 -0
  163. package/dist/chunks/rm-SH3DYKNS.js +8 -0
  164. package/dist/chunks/rm-UEBLKFVC.js +8 -0
  165. package/dist/chunks/{routes-P6LKQCWH.js → routes-PKTWMDWQ.js} +1 -1
  166. package/dist/chunks/rule-inspect-LKQA5I4V.js +8 -0
  167. package/dist/chunks/{schema-YOEAK4VX.js → schema-FBV42W7N.js} +1 -1
  168. package/dist/chunks/{schema-BEUO7G52.js → schema-ZWE5MNMG.js} +1 -1
  169. package/dist/chunks/{select-org-OMLGQEKK.js → select-org-WMB752Z6.js} +1 -1
  170. package/dist/chunks/set-UTYIPOLC.js +7 -0
  171. package/dist/chunks/setup-and-link-ZLY5XQW5.js +7 -0
  172. package/dist/chunks/{skills-4J2NC2QI.js → skills-RKIGVVNM.js} +2 -2
  173. package/dist/chunks/{tags-ZXZQEXOV.js → tags-UCLZ5UMX.js} +1 -1
  174. package/dist/chunks/{types-SK6J2HFE.js → types-YM7TMHXW.js} +1 -1
  175. package/dist/chunks/{update-25CKNOY5.js → update-BGDQ5TXO.js} +1 -1
  176. package/dist/commands/build/index.js +1 -1
  177. package/dist/commands/deploy/index.js +4 -4
  178. package/dist/commands/dev/index.js +4 -4
  179. package/dist/commands/env/index.js +1 -1
  180. package/dist/commands/link/index.js +1 -1
  181. package/dist/commands/list/index.js +1 -1
  182. package/dist/commands/project/index.js +8 -8
  183. package/dist/commands-account.js +8 -8
  184. package/dist/commands-ai.js +12 -12
  185. package/dist/commands-blob.js +8 -8
  186. package/dist/commands-core.js +11 -11
  187. package/dist/commands-deployments.js +1 -1
  188. package/dist/commands-flags.js +6 -6
  189. package/dist/commands-integrations.js +16 -16
  190. package/dist/commands-observability.js +5 -5
  191. package/dist/commands-routing.js +18 -18
  192. package/dist/help.js +1 -1
  193. package/dist/index.js +5 -3
  194. package/dist/internal-build.js +1 -1
  195. package/dist/package.json +60 -61
  196. package/dist/root-help-commands.mjs +1 -1
  197. package/dist/vc.js +148 -137
  198. package/dist/version.mjs +1 -1
  199. package/package.json +54 -54
  200. package/dist/chunks/add-5YZQTIQM.js +0 -8
  201. package/dist/chunks/add-A524QQ2H.js +0 -8
  202. package/dist/chunks/add-V4JMUHKO.js +0 -8
  203. package/dist/chunks/build-K2PVDJZ4.js +0 -7
  204. package/dist/chunks/chunk-3AYYFYZG.js +0 -7
  205. package/dist/chunks/chunk-5IASAERQ.js +0 -7
  206. package/dist/chunks/chunk-76KGQU2G.js +0 -7
  207. package/dist/chunks/chunk-ABZEMNDR.js +0 -7
  208. package/dist/chunks/chunk-APZULWJC.js +0 -8
  209. package/dist/chunks/chunk-AWMQGOS2.js +0 -7
  210. package/dist/chunks/chunk-B4UE4LVE.js +0 -7
  211. package/dist/chunks/chunk-B4YYOSPY.js +0 -7
  212. package/dist/chunks/chunk-E2SADN6I.js +0 -7
  213. package/dist/chunks/chunk-IA3MXJRC.js +0 -8
  214. package/dist/chunks/chunk-IEPW2YRH.js +0 -7
  215. package/dist/chunks/chunk-LUBUI5GF.js +0 -7
  216. package/dist/chunks/chunk-OKEBIUKZ.js +0 -7
  217. package/dist/chunks/chunk-QZX7VG2V.js +0 -9
  218. package/dist/chunks/chunk-RUXO73ON.js +0 -7
  219. package/dist/chunks/chunk-TPNOSQZ3.js +0 -15
  220. package/dist/chunks/chunk-UNEGQPD3.js +0 -7
  221. package/dist/chunks/chunk-V7BEC3E4.js +0 -10
  222. package/dist/chunks/chunk-YHQ7PPXP.js +0 -7
  223. package/dist/chunks/clear-ZS4KQ7OT.js +0 -8
  224. package/dist/chunks/config-N2SBVW4T.js +0 -8
  225. package/dist/chunks/delete-2ZE2NVHI.js +0 -10
  226. package/dist/chunks/delete-AL57HZDQ.js +0 -9
  227. package/dist/chunks/disable-MKI3BKNH.js +0 -7
  228. package/dist/chunks/discard-SI4H7ST3.js +0 -14
  229. package/dist/chunks/edit-DNWH6SPE.js +0 -8
  230. package/dist/chunks/edit-WYNWDFUJ.js +0 -9
  231. package/dist/chunks/enable-J6MMYPYF.js +0 -7
  232. package/dist/chunks/generate-cert-for-deploy-YZKNGAEQ.js +0 -7
  233. package/dist/chunks/inspect-H2Q7XOWN.js +0 -13
  234. package/dist/chunks/inspect-H5JC2XKI.js +0 -9
  235. package/dist/chunks/list-ELEUTZWJ.js +0 -12
  236. package/dist/chunks/login-ZF2TLCQB.js +0 -9
  237. package/dist/chunks/logs-UD7FEXZ7.js +0 -7
  238. package/dist/chunks/ls-5ZEAKKPQ.js +0 -8
  239. package/dist/chunks/ls-IXRLAJ4L.js +0 -11
  240. package/dist/chunks/mutate-OQWOKLIW.js +0 -9
  241. package/dist/chunks/open-HH6K7ZRC.js +0 -7
  242. package/dist/chunks/publish-FPNQ2US4.js +0 -15
  243. package/dist/chunks/pull-7OGOIKB3.js +0 -7
  244. package/dist/chunks/purchase-domain-if-available-F4LKHVBD.js +0 -7
  245. package/dist/chunks/push-NY3SIK2C.js +0 -7
  246. package/dist/chunks/reorder-4J2STFUS.js +0 -10
  247. package/dist/chunks/reply-EO4NTTPW.js +0 -9
  248. package/dist/chunks/resolve-RPHHRPNM.js +0 -12
  249. package/dist/chunks/restore-TEA6TSVK.js +0 -16
  250. package/dist/chunks/rm-BPILSPUI.js +0 -8
  251. package/dist/chunks/rm-F6XVUDBM.js +0 -8
  252. package/dist/chunks/rm-JCPXV2FN.js +0 -8
  253. package/dist/chunks/rm-LPQRGX7N.js +0 -8
  254. package/dist/chunks/rm-WHUGT6TE.js +0 -8
  255. package/dist/chunks/rule-inspect-BOETGPFO.js +0 -8
  256. package/dist/chunks/set-5XY27S7R.js +0 -7
  257. package/dist/chunks/setup-and-link-A7M3QT52.js +0 -7
@@ -1,7 +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{jsonOption,projectOption,yesOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var listSubcommand={name:"list",aliases:["ls"],description:"List all routing rules for the current project. These routes apply to all deployments and environments.",arguments:[],options:[projectOption,jsonOption,{name:"search",description:"Search by name, description, source, or destination",shorthand:null,deprecatedShorthand:"s",type:String,argument:"QUERY",deprecated:!1},{name:"filter",description:"Filter by type: rewrite, redirect, set_status, transform",shorthand:null,deprecatedShorthand:"f",type:String,argument:"TYPE",deprecated:!1},{name:"production",description:"List routes from the live production version",shorthand:null,type:Boolean,deprecated:!1},{name:"version-id",description:"List routes from a specific version ID",shorthand:null,type:String,argument:"VERSION_ID",deprecated:!1},{name:"diff",description:"Compare staged changes against production. Use with --version-id to compare a specific version.",shorthand:null,type:Boolean,deprecated:!1},{name:"expand",description:"Show expanded details for each route",shorthand:null,deprecatedShorthand:"e",type:Boolean,deprecated:!1}],examples:[{name:"List all routes",value:`${packageName} routes list`},{name:"Search for routes",value:`${packageName} routes list --search "api"`},{name:"Filter by type",value:`${packageName} routes list --filter rewrite`},{name:"Show staged changes",value:`${packageName} routes list --diff`},{name:"Show live production routes",value:`${packageName} routes list --production`},{name:"Show expanded details",value:`${packageName} routes list --expand`}]},listVersionsSubcommand={name:"list-versions",aliases:["ls-versions"],description:"List all versions of routing rules",arguments:[],options:[projectOption,jsonOption,{name:"count",description:"Number of versions to fetch (default: 20, max: 100)",shorthand:null,type:Number,argument:"NUMBER",deprecated:!1}],examples:[{name:"List route versions",value:`${packageName} routes list-versions`},{name:"List more versions",value:`${packageName} routes list-versions --count 50`}]},inspectSubcommand={name:"inspect",aliases:[],description:"Show detailed information about a specific route",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,jsonOption,{name:"diff",description:"Compare staged changes against production for this route",shorthand:null,type:Boolean,deprecated:!1}],examples:[{name:"Inspect a route by name",value:`${packageName} routes inspect "API rewrite"`},{name:"Inspect a route by ID",value:`${packageName} routes inspect abc123`},{name:"Show staged changes for a route",value:`${packageName} routes inspect "My route" --diff`}]},addSubcommand={name:"add",aliases:[],description:"Add a new routing rule to the project",arguments:[{name:"name",required:!1}],options:[projectOption,{name:"src",description:"Path pattern (required in non-interactive mode)",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Path syntax: regex, path-to-regexp, equals (default: regex)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Action type: rewrite, redirect, or set-status (required with --dest/--status)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Destination URL for rewrite or redirect",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Status code (301/302/307/308 for redirect, or any for set-status)",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Condition that must match: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'"Does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"description",description:"Route description (max 1024 chars)",shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"no-enable",description:"Add the route turned off (default: on)",shorthand:null,type:Boolean,deprecated:!1},{name:"disabled",description:"Deprecated alias for `--no-enable`",shorthand:null,type:Boolean,deprecated:!0},{name:"ai",description:"Generate route from a natural language description (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{name:"position",description:"Position: start, end, after:<id>, before:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"yes",description:"Skip confirmation prompts",shorthand:"y",type:Boolean,deprecated:!1}],examples:[{name:"Interactive mode",value:`${packageName} routes add`},{name:"Create with AI",value:`${packageName} routes add --ai "Rewrite /api/* to https://backend.internal/*"`},{name:"Add a rewrite",value:`${packageName} routes add "API Proxy" --src "/api/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://api.example.com/:path*" --yes`},{name:"Add a redirect",value:`${packageName} routes add "Old Blog" --src "/blog" --src-syntax equals --action redirect --dest "/articles" --status 301 --yes`},{name:"Add CORS headers",value:`${packageName} routes add "CORS" --src "^/api/.*$" --set-response-header "Access-Control-Allow-Origin=*" --yes`},{name:"Block access (set status)",value:`${packageName} routes add "Block Admin" --src "^/admin/.*$" --action set-status --status 403 --yes`},{name:"Conditional redirect",value:`${packageName} routes add "Auth Required" --src "/protected/:path*" --src-syntax path-to-regexp --action redirect --dest "/login" --status 307 --missing "cookie:session" --yes`},{name:"Rewrite with request headers",value:`${packageName} routes add "Backend Proxy" --src "/backend/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://internal.example.com/:path*" --set-request-header "X-Forwarded-Host=myapp.com" --yes`},{name:"Add route at start",value:`${packageName} routes add "Priority Route" --src "/priority" --src-syntax equals --action rewrite --dest "/handler" --position start --yes`}]},publishSubcommand={name:"publish",aliases:[],description:"Publish all staged routing changes to production",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when publishing"}],examples:[{name:"Publish staged changes",value:`${packageName} routes publish`},{name:"Publish without confirmation",value:`${packageName} routes publish --yes`}]},restoreSubcommand={name:"restore",aliases:[],description:"Restore a previous routing version to production",arguments:[{name:"version-id",required:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when restoring"}],examples:[{name:"Restore a previous version",value:`${packageName} routes restore <version-id>`},{name:"Restore without confirmation",value:`${packageName} routes restore <version-id> --yes`}]},discardSubcommand={name:"discard-staging",aliases:[],description:"Discard staged routing changes",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when discarding"}],examples:[{name:"Discard staged changes",value:`${packageName} routes discard-staging`},{name:"Discard without confirmation",value:`${packageName} routes discard-staging --yes`}]},deleteSubcommand={name:"remove",aliases:["rm","delete"],description:"Remove one or more routing rules",arguments:[{name:"name-or-id",required:!0,multiple:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when removing"}],examples:[{name:"Remove a route by name",value:`${packageName} routes remove "Old Redirect"`},{name:"Remove a route by ID",value:`${packageName} routes remove abc123`},{name:"Remove multiple routes",value:`${packageName} routes remove "Route A" "Route B"`},{name:"Remove without confirmation",value:`${packageName} routes remove "Old Route" --yes`}]},enableSubcommand={name:"enable",aliases:[],description:"Enable a disabled routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Enable a route by name",value:`${packageName} routes enable "API Proxy"`},{name:"Enable a route by ID",value:`${packageName} routes enable abc123`}]},disableSubcommand={name:"disable",aliases:[],description:"Disable a routing rule without deleting it",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Disable a route by name",value:`${packageName} routes disable "API Proxy"`},{name:"Disable a route by ID",value:`${packageName} routes disable abc123`}]},reorderSubcommand={name:"move",aliases:["reorder"],description:"Move a routing rule to a different position",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"position",description:"Target position: start, end, a number (1-based), before:<id>, after:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"first",description:"Move to the first position (highest priority)",shorthand:null,type:Boolean,deprecated:!1},{name:"last",description:"Move to the last position (lowest priority)",shorthand:null,type:Boolean,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt when moving"}],examples:[{name:"Move to first position",value:`${packageName} routes move "Catch All" --first`},{name:"Move to last position",value:`${packageName} routes move "Catch All" --last`},{name:"Move to a specific position",value:`${packageName} routes move "API Proxy" --position 3`},{name:"Move after another route",value:`${packageName} routes move "API Proxy" --position after:route-id-123`},{name:"Interactive move (prompts for position)",value:`${packageName} routes move "API Proxy"`}]},editSubcommand={name:"update",aliases:["edit"],description:"Update an existing routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"name",description:"Change route name",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"description",description:'Change description (use "" to clear)',shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"src",description:"Change source path pattern",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Change path syntax: regex, path-to-regexp, equals",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Set action type: rewrite, redirect, or set-status (required when switching types)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Set destination URL",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Set status code",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"no-dest",description:"Remove destination",shorthand:null,type:Boolean,deprecated:!1},{name:"no-status",description:"Remove status code",shorthand:null,type:Boolean,deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Add a has condition: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'Add a "does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"clear-conditions",description:"Remove all has/does-not-have conditions",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-headers",description:"Remove all response headers",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-transforms",description:"Remove all transforms (request headers, request query)",shorthand:null,type:Boolean,deprecated:!1},{name:"ai",description:"Describe changes using natural language (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{...yesOption,description:"Skip confirmation prompts"}],examples:[{name:"Interactive mode",value:`${packageName} routes update "API Proxy"`},{name:"Update with AI",value:`${packageName} routes update "API Proxy" --ai "Add CORS headers and change status to 308"`},{name:"Change destination",value:`${packageName} routes update "API Proxy" --dest "https://new-api.example.com/:path*"`},{name:"Switch to redirect",value:`${packageName} routes update "Old Route" --action redirect --dest "/new" --status 301`},{name:"Add a response header",value:`${packageName} routes update "My Route" --set-response-header "Cache-Control=public, max-age=3600"`},{name:"Clear all conditions and add new ones",value:`${packageName} routes update "My Route" --clear-conditions --has "header:Authorization"`}]},exportSubcommand={name:"export",aliases:[],description:"Export routes to a vercel.json or vercel.ts file",arguments:[{name:"name-or-id",required:!1}],options:[projectOption,{name:"output",description:"Output file format: .json or .ts (default: .json)",shorthand:"o",type:String,argument:"json|ts",deprecated:!1}],examples:[{name:"Export as vercel.json format",value:`${packageName} routes export`},{name:"Export as vercel.ts format",value:`${packageName} routes export --output ts`},{name:"Export a specific route",value:`${packageName} routes export "API Proxy"`},{name:"Export to a file",value:`${packageName} routes export > routes.json`}]},routesCommand={name:"routes",aliases:[],description:"Manage routing rules for a project. Routes managed at the project level apply to all deployments and environments.",arguments:[],subcommands:[listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,editSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,exportSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand],options:[],examples:[]};export{listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,editSubcommand,exportSubcommand,routesCommand};
@@ -1,7 +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{formatOption,jsonOption,limitOption,projectOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (default: linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Continue from a previous response",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},TAGS_SORT_BY_CHOICES=["updatedAt","tag"],TAGS_SORT_ORDER_CHOICES=["asc","desc"],tagsLsSubcommand={name:"ls",aliases:["list"],description:"List a repository's tags",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,{name:"sort-by",shorthand:null,type:String,deprecated:!1,description:"Field to sort tags by (default: updatedAt)",argument:"FIELD",choices:TAGS_SORT_BY_CHOICES},{name:"sort-order",shorthand:null,type:String,deprecated:!1,description:"Sort direction (default: desc)",argument:"ORDER",choices:TAGS_SORT_ORDER_CHOICES},limitOption,nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List a repository's tags",value:`${packageName} vcr tag ls my-app`}]},tagsInspectSubcommand={name:"inspect",aliases:["get"],description:"Show details for a single tag",arguments:[{name:"repository",required:!0},{name:"tag",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Inspect a tag by name",value:`${packageName} vcr tag inspect my-app latest`}]},tagsAggregateCommand={name:"tag",aliases:["tags"],description:"List or inspect a repository's tags",arguments:[],subcommands:[tagsLsSubcommand,tagsInspectSubcommand],options:[],examples:[]};export{TAGS_SORT_BY_CHOICES,TAGS_SORT_ORDER_CHOICES,tagsLsSubcommand,tagsInspectSubcommand,tagsAggregateCommand};
@@ -1,7 +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{permissionsAggregateCommand}from"./chunk-3AYYFYZG.js";import{tagsAggregateCommand}from"./chunk-76KGQU2G.js";import{imageAggregateCommand}from"./chunk-UNEGQPD3.js";import{formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (default: linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Continue from a previous response",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},platformOption={name:"platform",shorthand:null,type:String,deprecated:!1,description:"Target platform for the build (default: linux/amd64).",argument:"PLATFORM"},pushOption={name:"push",shorthand:null,type:Boolean,deprecated:!1,description:"Push the image after building. With Docker this builds and pushes in one step (Buildx enables zstd compression); Podman and Buildah build, then push with zstd compression."},publicOption={name:"public",shorthand:null,type:Boolean,deprecated:!1,description:"Make the repository public.",legacyValues:{on:"true",off:"false"}},noPublicOption={name:"no-public",shorthand:null,type:Boolean,deprecated:!1,description:"Make the repository private."},listSubcommand={name:"ls",aliases:["list"],description:"List container registry repositories for a project",arguments:[],options:[projectScopeOption,limitOption,nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"List repositories for a specific project as JSON",value:`${packageName} vcr ls --project my-app --json`}]},inspectSubcommand={name:"inspect",aliases:["get"],description:"Show details for a single repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Inspect a repository by name",value:`${packageName} vcr inspect my-repository`}]},addSubcommand={name:"create",aliases:["add"],description:"Create a container registry repository",arguments:[{name:"name",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Create a repository",value:`${packageName} vcr create my-repository`}]},configSubcommand={name:"update",aliases:["config"],description:"Update a container registry repository, such as the repository's visibility",arguments:[{name:"repository",required:!0}],options:[publicOption,noPublicOption,projectScopeOption,formatOption,jsonOption],examples:[{name:"Make a repository public",value:`${packageName} vcr update my-repository --public`},{name:"Make a repository private",value:`${packageName} vcr update my-repository --no-public`}]},removeSubcommand={name:"delete",aliases:["rm","del","remove"],description:"Delete a container registry repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,yesOption,formatOption,jsonOption],examples:[{name:"Delete a repository",value:`${packageName} vcr delete my-repository`},{name:"Delete a repository without the confirmation prompt",value:`${packageName} vcr delete my-repository --yes`}]},loginSubcommand={name:"login",aliases:[],description:"Authenticate a container tool (docker, podman, or buildah) with the Vercel Container Registry",arguments:[{name:"engine",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Log in with Docker",value:`${packageName} vcr login docker`},{name:"Log in with Podman",value:`${packageName} vcr login podman`},{name:"Log in with Buildah",value:`${packageName} vcr login buildah`},{name:"Log in for a specific project",value:`${packageName} vcr login docker --project my-app`}]},buildSubcommand={name:"build",aliases:[],description:"Build a container image tagged for the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"path",required:!1},{name:"name",required:!1}],options:[projectScopeOption,platformOption,pushOption],examples:[{name:"Build the current directory into the linked project (repository defaults to the project name, tag to latest)",value:`${packageName} vcr build docker`},{name:"Build and push in one step (Docker Buildx enables zstd compression)",value:`${packageName} vcr build docker --push`},{name:"Build a specific context path with a repository and tag",value:`${packageName} vcr build docker ./app my-api:1.2.3`},{name:"Pass extra flags through to the container tool",value:`${packageName} vcr build docker . -- --no-cache --build-arg KEY=value`}]},pushSubcommand={name:"push",aliases:[],description:"Push a container image to the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"name",required:!1}],options:[projectScopeOption],examples:[{name:"Push the linked project image (repository defaults to the project name, tag to latest)",value:`${packageName} vcr push docker`},{name:"Push a specific repository and tag",value:`${packageName} vcr push docker my-api:1.2.3`}]},vcrCommand={name:"vcr",aliases:[],description:"Manage Vercel Container Registry repositories and images (see `vcr image`).",arguments:[],subcommands:[listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,tagsAggregateCommand,imageAggregateCommand,permissionsAggregateCommand],options:[],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"Create a repository",value:`${packageName} vcr create my-app`},{name:"List images in a repository",value:`${packageName} vcr image ls my-app`}]};export{listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,vcrCommand};
@@ -1,8 +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{require_dist}from"./chunk-ZH6KHD55.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{AGENT_REASON,AGENT_STATUS,outputActionRequired}from"./chunk-DGYHWXD2.js";import{humanizePath,require_lib}from"./chunk-KNLGWGUE.js";import{output_manager_default}from"./chunk-XP3FT56R.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_client=__toESM(require_dist(),1);import{dirname,isAbsolute,relative,sep}from"path";var singleFileConfig={framework:null,buildCommand:"",installCommand:"",outputDirectory:"."},singleFileProjectSettings={...singleFileConfig,rootDirectory:null};async function isIgnoredFile(file,cwd){let roots=new Set([dirname(file)]),fromCwd=relative(cwd,file);fromCwd&&!fromCwd.startsWith(`..${sep}`)&&!isAbsolute(fromCwd)&&roots.add(cwd);for(let root of roots){let{ig}=await(0,import_client.getVercelIgnore)(root);if(ig.ignores(relative(root,file).split(sep).join("/")))return!0}return!1}var import_fs_extra=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1);import{homedir}from"os";import{resolve,sep as sep2}from"path";async function validateRootDirectory(cwd,path,errorSuffix=""){let pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null),suffix=errorSuffix?` ${errorSuffix}`:"";if(!pathStat)return output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} does not exist.${suffix}`),!1;if(!pathStat.isDirectory())return output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is a file, but expected a directory.${suffix}`),!1;let base=resolve(cwd),target=resolve(path);return target!==base&&!target.startsWith(base+sep2)?(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is outside of the project.${suffix}`),!1):!0}async function validatePaths(client,paths,{allowFiles=!1}={}){if(paths.length>1)return output_manager_default.error("Can't deploy more than one path."),{valid:!1,exitCode:1};let path=paths[0],pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null);if(!pathStat)return output_manager_default.error(`Could not find ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)}`),{valid:!1,exitCode:1};let isFile=pathStat.isFile();if(!pathStat.isDirectory()&&!(allowFiles&&isFile))return output_manager_default.fatal(allowFiles?"Deploy a regular file or directory. Symbolic links and special files are not supported as deployment paths.":"This command requires a directory. Use `vercel <file>` to deploy a single file."),{valid:!1,exitCode:1};if(path===homedir()){if(!canPrompt(client)){let message="Can't deploy your home directory without interactive confirmation. Run from your project directory, or run in a terminal to confirm deploying your home directory.";return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.INTERACTIVE_CONFIRMATION_REQUIRED,message,userActionRequired:!0},2),output_manager_default.error(message),{valid:!1,exitCode:2}}if(!await client.input.confirm("You are deploying your home directory. Do you want to continue?",!1))return output_manager_default.print(`Canceled
8
- `),{valid:!1,exitCode:0}}return{valid:!0,path,isFile}}export{singleFileConfig,singleFileProjectSettings,isIgnoredFile,validateRootDirectory,validatePaths};
@@ -1,7 +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{getCommandName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-XP3FT56R.js";var DEPRECATED_SHORTHANDS=Symbol("deprecated shorthands");function getShortFlags(option){return[option.shorthand,option.deprecatedShorthand].filter(letter=>!!letter).map(letter=>`-${letter}`)}function getFlagsSpecification(options){let flagsSpecification={},deprecatedShorthands=new Set;for(let option of options)flagsSpecification[`--${option.name}`]=option.type,option.shorthand&&(flagsSpecification[`-${option.shorthand}`]=`--${option.name}`),option.deprecatedShorthand&&(flagsSpecification[`-${option.deprecatedShorthand}`]=`--${option.name}`,deprecatedShorthands.add(`-${option.deprecatedShorthand}`));return flagsSpecification["--next"]&&!flagsSpecification["-N"]&&(flagsSpecification["-N"]="--next",deprecatedShorthands.add("-N")),deprecatedShorthands.size>0&&(flagsSpecification[DEPRECATED_SHORTHANDS]=[...deprecatedShorthands]),flagsSpecification}var SENSITIVE_AUTH_FLAG_NAMES=new Set(["--token","-t"]),SDK_KEY_PATTERN=/^vf_(?:server|client)_/;function normalizeFlagName(flag){return flag.includes("=")?flag.slice(0,flag.indexOf("=")):flag}function stripSensitiveAuthArgs(args){let out=[],afterDelimiter=!1;for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--"&&(afterDelimiter=!0),!afterDelimiter&&(arg.startsWith("--sdk-key=")||SDK_KEY_PATTERN.test(arg)))continue;let name=normalizeFlagName(arg);if(SENSITIVE_AUTH_FLAG_NAMES.has(name)){!arg.includes("=")&&i+1<args.length&&i++;continue}if(!afterDelimiter&&/^-[A-Za-z]{2,}$/.test(arg)&&arg.includes("t")){let rest=arg.replace(/t/g,"");rest!=="-"&&out.push(rest),i+1<args.length&&i++;continue}out.push(arg)}return out}var globalCommandOptions=[{name:"help",shorthand:"h",type:Boolean,description:"Output usage information",deprecated:!1},{name:"version",shorthand:"v",type:Boolean,description:"Output the version number",deprecated:!1},{name:"cwd",shorthand:null,type:String,argument:"DIR",description:"Sets the current working directory for a single run of a command",deprecated:!1},{name:"local-config",shorthand:"A",type:String,argument:"FILE",description:"Path to the local `vercel.json` file",deprecated:!1},{name:"global-config",shorthand:"Q",type:String,argument:"DIR",description:"Path to the global `.vercel` directory",deprecated:!1},{name:"debug",shorthand:"d",type:Boolean,description:"Debug mode (default: off)",deprecated:!1},{name:"no-color",shorthand:null,type:Boolean,description:"No color mode (default: off)",deprecated:!1},{name:"non-interactive",shorthand:null,type:Boolean,description:"Run without interactive prompts (default: on when an agent is detected)",deprecated:!1},{name:"scope",shorthand:"S",type:String,description:"Set a custom scope",deprecated:!1},{name:"token",shorthand:"t",type:String,argument:"TOKEN",description:"Login token",deprecated:!1},{name:"team",shorthand:"T",type:String,deprecated:!1},{name:"api",shorthand:null,type:String,deprecated:!1}],GLOBAL_CLI_FLAG_NAMES=(()=>{let set=new Set;for(let opt of globalCommandOptions){set.add(`--${opt.name}`);for(let flag of getShortFlags(opt))set.add(flag)}return set})();function globalCliFlagTakesValue(flagName){let normalized=normalizeFlagName(flagName);for(let opt of globalCommandOptions)if(`--${opt.name}`===normalized||getShortFlags(opt).includes(normalized))return opt.type===String;return!1}var SUGGESTION_FLAGS_TAKING_VALUE=new Set(["--config","--deployment","--environment","--git-branch","--id","--value","--status","--name","--slug","--version","--search","--format","--project","--page","--per-page"]);function suggestionFlagTakesSeparateValue(flagName){let name=normalizeFlagName(flagName);return globalCliFlagTakesValue(name)?!0:SUGGESTION_FLAGS_TAKING_VALUE.has(name)}function getSameSubcommandSuggestionFlags(args){let safeArgs=stripSensitiveAuthArgs(args),out=[];for(let i=0;i<safeArgs.length;i++){let a=safeArgs[i];if(!a.startsWith("-")||(out.push(a),a.includes("=")))continue;suggestionFlagTakesSeparateValue(a)&&i+1<safeArgs.length&&!safeArgs[i+1].startsWith("-")&&out.push(safeArgs[++i])}return out}var GLOBAL_OPTIONS=getFlagsSpecification(globalCommandOptions),arg_common_default=()=>GLOBAL_OPTIONS,yesOption={name:"yes",shorthand:"y",type:Boolean,deprecated:!1,description:"Accept default value for all prompts"},nextCursorOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Show the next page using the cursor from the previous output",argument:"CURSOR"},confirmOption={name:"confirm",shorthand:"c",type:Boolean,deprecated:!0},limitOption={name:"limit",shorthand:null,type:Number,deprecated:!1,description:"Number of results to return per page (default: 20, max: 100)",argument:"NUMBER"},sinceOption={name:"since",shorthand:"s",type:String,argument:"TIME",deprecated:!1,description:"Start time: ISO 8601 or relative, like 1h or 7d"},untilOption={name:"until",shorthand:"u",type:String,argument:"TIME",deprecated:!1,description:"End time: ISO 8601 or relative (default: now)"},environmentOption={name:"environment",shorthand:"e",type:String,argument:"ENVIRONMENT",deprecated:!1,description:"Environment: production, preview, development, or a custom environment"},targetOption={name:"target",shorthand:null,type:String,argument:"ENVIRONMENT",deprecated:!0,description:"Deprecated alias for `--environment`"},gitBranchOption={name:"git-branch",shorthand:null,type:String,argument:"BRANCH",deprecated:!1,description:"Git branch"},forceOption={name:"force",shorthand:null,type:Boolean,deprecated:!1},formatOption={name:"format",shorthand:"F",type:String,argument:"FORMAT",description:"Specify the output format (json)",deprecated:!0},jsonOption={name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Output as JSON"};var allOption={name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"List resources across all projects"},projectOption={name:"project",shorthand:null,type:String,argument:"NAME_OR_ID",description:"Project name or ID (default: linked project)",deprecated:!1},deploymentOption={name:"deployment",shorthand:null,type:String,deprecated:!1,description:"The deployment ID or URL to target",argument:"DEPLOYMENT"},protectionBypassOption={name:"protection-bypass",shorthand:null,type:String,deprecated:!1,description:"Protection bypass secret for accessing protected deployments",argument:"SECRET"},GLOBAL_LONG_TO_OPT=new Map,GLOBAL_SHORT_TO_OPT=new Map;for(let opt of globalCommandOptions){GLOBAL_LONG_TO_OPT.set(`--${opt.name}`,opt);for(let flag of getShortFlags(opt))GLOBAL_SHORT_TO_OPT.set(flag,opt)}function getGlobalFlagsFromArgs(args,options){let delimiterIndex=args.indexOf("--"),cliArgs=delimiterIndex===-1?args:args.slice(0,delimiterIndex),safeArgs=stripSensitiveAuthArgs(cliArgs),out=[];for(let i=0;i<safeArgs.length;i++){let a=safeArgs[i];if(options?.preserveYes&&(a==="--yes"||a==="-y")){out.push(a);continue}if(options?.preserveConfig&&(a==="--config"||a.startsWith("--config="))){if(out.push(a),a==="--config"){let next=safeArgs[i+1];next&&!next.startsWith("-")&&(out.push(next),i++)}continue}let opt;if(a.startsWith("--")&&a.includes("=")){let name=a.slice(2).split("=")[0];opt=GLOBAL_LONG_TO_OPT.get(`--${name}`),opt&&out.push(a);continue}if(opt=GLOBAL_LONG_TO_OPT.get(a)||GLOBAL_SHORT_TO_OPT.get(a),!!opt&&(out.push(a),opt.type===String&&!a.includes("="))){let next=safeArgs[i+1];next&&!next.startsWith("-")&&(out.push(next),i++)}}if(options?.preserveProject){let projectOption2=findProjectOption(safeArgs);projectOption2&&out.push(...projectOption2.args)}return out}function findProjectOption(args){for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--")return;if(arg.startsWith("--project="))return{value:arg.slice(10),args:[arg]};if(arg==="--project"){let value=args[i+1];return value&&!value.startsWith("-")?{value,args:[arg,value]}:void 0}}}function getProjectOptionFromArgs(args){return findProjectOption(args)?.value}var OUTPUT_FORMATS=["json"];function parseOutputFormat(value){let normalized=value.toLowerCase();if(OUTPUT_FORMATS.includes(normalized))return normalized;throw new Error(`Invalid output format: "${value}". Valid formats: ${OUTPUT_FORMATS.join(", ")}`)}function getOutputFormat(flags){let formatFlag=flags["--format"],jsonFlag=flags["--json"];if(formatFlag)return parseOutputFormat(formatFlag);if(jsonFlag)return"json"}function isJsonOutput(flags){return getOutputFormat(flags)==="json"}function validateJsonOutput(flags){try{return{valid:!0,jsonOutput:isJsonOutput(flags)}}catch(err){return{valid:!1,error:err.message}}}function wantsMachineReadableOutput(subcommand,argv){if(argv.includes("--help")||argv.includes("-h"))return!1;if(subcommand==="api"||argv.includes("--json"))return!0;for(let arg of argv)if(arg.toLowerCase()==="--format=json")return!0;let formatIdx=argv.indexOf("--format");return formatIdx!==-1&&argv[formatIdx+1]?.toLowerCase()==="json"}function shouldPrintVersionBanner(subcommand,argv){return!wantsMachineReadableOutput(subcommand,argv)}function warnDeprecatedSubcommand(client,deprecated,replacement){wantsMachineReadableOutput(void 0,client.argv)||output_manager_default.warning(`${getCommandName(deprecated)} is deprecated. Use ${getCommandName(replacement)}.`)}function warnDeprecatedOption(argv,deprecated,replacement){wantsMachineReadableOutput(void 0,argv)||output_manager_default.warning(`${deprecated} is deprecated. Use ${replacement}.`)}function warnDeprecatedInput(client,deprecated,replacement){wantsMachineReadableOutput(void 0,client.argv)||output_manager_default.warning(`${deprecated} is deprecated. Use ${replacement}.`)}export{DEPRECATED_SHORTHANDS,getShortFlags,getFlagsSpecification,SDK_KEY_PATTERN,normalizeFlagName,stripSensitiveAuthArgs,globalCommandOptions,GLOBAL_CLI_FLAG_NAMES,globalCliFlagTakesValue,suggestionFlagTakesSeparateValue,getSameSubcommandSuggestionFlags,arg_common_default,yesOption,nextCursorOption,confirmOption,limitOption,sinceOption,untilOption,environmentOption,targetOption,gitBranchOption,forceOption,formatOption,jsonOption,allOption,projectOption,deploymentOption,protectionBypassOption,getGlobalFlagsFromArgs,getProjectOptionFromArgs,validateJsonOutput,wantsMachineReadableOutput,shouldPrintVersionBanner,warnDeprecatedSubcommand,warnDeprecatedOption,warnDeprecatedInput};
@@ -1,7 +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{require_ms}from"./chunk-MXTC4ZAQ.js";import{getTeams}from"./chunk-FGFLTLEA.js";import{AGENT_REASON,outputAgentError}from"./chunk-DGYHWXD2.js";import{findProjectsFromPath,getConfigFilePath,getLinkFromDir,getRepoLink,getUser,getVercelDirectory,inspectTokenRequest,processInspectTokenResponse}from"./chunk-KNLGWGUE.js";import{getTeamByIdOrSlug}from"./chunk-F53OKXYI.js";import{require_cli_config}from"./chunk-4SAVH3H7.js";import{InvalidToken,TeamDeleted}from"./chunk-6VH56CX2.js";import{output_manager_default,require_build_utils}from"./chunk-XP3FT56R.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_build_utils=__toESM(require_build_utils(),1);var VERCEL_API_ORIGIN="https://api.vercel.com";async function introspectToken(client){let token=client.authConfig.token;if(!token)throw new Error("No token to introspect");if(new URL(client.apiUrl).origin!==VERCEL_API_ORIGIN)throw new Error("Token introspection is unavailable for custom API origins");let[error,introspection]=await processInspectTokenResponse(await inspectTokenRequest(token));if(error)throw error;return introspection}function isAppPrincipalEnabled(){return!!process.env.APP_PRINCIPAL_ENABLED}function resolveAppFromToken(token){return!token.active||!token.client_id?null:{id:token.client_id,name:token.client_name}}async function getAppTokenTeamId(client){try{await getUser(client);return}catch{let token=await introspectToken(client).catch(()=>null);return token&&resolveAppFromToken(token)?token.team?.id:void 0}}function assertOrgIdMatchesAppTeam(client,appTeamId){let envOrgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");if(!envOrgId||envOrgId===appTeamId)return;let message=`This token only works with team ${appTeamId}, but VERCEL_ORG_ID is set to ${envOrgId}.`;throw outputAgentError(client,{status:"error",reason:AGENT_REASON.SCOPE_NOT_ACCESSIBLE,message}),new Error(message)}async function resolveAppTokenScope(client,scope){let token=await introspectToken(client).catch(()=>null),app=token?resolveAppFromToken(token):null,team=token?.team;return!app||!team||team.id!==scope&&team.slug!==scope?!1:(client.config.currentTeam=team.id,!0)}var VERCEL_TEAM_SLUG="vercel";function isVercelianFromLoadedTeams(client){return client.teams?.some(team=>team.slug===VERCEL_TEAM_SLUG)===!0}async function isVercelian(client){if(isVercelianFromLoadedTeams(client))return!0;try{return(await getTeams(client)).some(team=>team.slug===VERCEL_TEAM_SLUG)}catch{return!1}}var import_cli_config=__toESM(require_cli_config(),1),import_ms=__toESM(require_ms(),1);var TEAM_SLUG_TTL_MS=(0,import_ms.default)("1d");function getCachedTeamSlug(config,teamId,now=Date.now()){let saved=config.cachedTeamSlugs?.[teamId];if(!isSavedTeamSlug(saved))return;let age=now-saved.savedAt;return age>=0&&age<TEAM_SLUG_TTL_MS?saved.slug:void 0}function setCachedTeamSlug(client,teamId,slug){if(getCachedTeamSlug(client.config,teamId)===slug)return;let saved={slug,savedAt:Date.now()};updateCachedTeamSlugs(client,slugs=>({...slugs,[teamId]:saved}))}function forgetCachedTeamSlug(client,teamId){let slugs=client.config.cachedTeamSlugs;!slugs||!(teamId in slugs)||updateCachedTeamSlugs(client,saved=>{let rest={...saved};return delete rest[teamId],rest})}function isSavedTeamSlug(value){return typeof value=="object"&&value!==null&&typeof value.slug=="string"&&typeof value.savedAt=="number"}function updateCachedTeamSlugs(client,update){try{let configPath=getConfigFilePath(),savedConfig=(0,import_cli_config.readGlobalConfigFile)(configPath),cachedTeamSlugs=update(savedConfig.cachedTeamSlugs??{}),config={...savedConfig,cachedTeamSlugs};(0,import_cli_config.writeGlobalConfigFile)(configPath,config),client.config.cachedTeamSlugs=cachedTeamSlugs}catch{output_manager_default.debug("Failed to persist cached team slugs.")}}var import_build_utils2=__toESM(require_build_utils(),1);import{relative}from"path";var import_cli_config2=__toESM(require_cli_config(),1);function isEligibleForNativeBinaryAutoOptIn(client){return isVercelianFromLoadedTeams(client)}function autoOptInNativeBinary(client){let envOverride=process.env.VERCEL_CLI_USE_NATIVE_BINARY;if(!(envOverride==="false"||envOverride==="0"||typeof client.config.useNativeBinary=="boolean"||client.config.nativeBinaryAutoOptIn===!0||!isEligibleForNativeBinaryAutoOptIn(client)))try{let configPath=getConfigFilePath(),savedConfig=(0,import_cli_config2.readGlobalConfigFile)(configPath);if(typeof savedConfig.useNativeBinary=="boolean"||savedConfig.nativeBinaryAutoOptIn===!0)return;let config={...savedConfig,nativeBinaryAutoOptIn:!0};(0,import_cli_config2.writeGlobalConfigFile)(configPath,config),client.config={...client.config,nativeBinaryAutoOptIn:!0}}catch{output_manager_default.debug("Failed to persist automatic native binary enrollment.")}}async function getScope(client,opts={}){let{user,app,token}=await getPrincipal(client);user&&autoOptInNativeBinary(client);let defaultTeamId=user?.version==="northstar"&&!client.ignoresSavedTeam?user.defaultTeamId:void 0,appTeamId=!user&&app?token?.team?.id:void 0;if(!user&&app&&opts.getTeam===!1)throw new Error("App principal scope resolution requires a team lookup.");!user&&app&&(client.ignoresSavedTeam&&appTeamId&&assertOrgIdMatchesAppTeam(client,appTeamId),client.config.currentTeam=appTeamId),!client.config.currentTeam&&defaultTeamId&&(client.config.currentTeam=defaultTeamId),client.isTeamUnchosen()&&await client.chooseTeam({ask:opts.chooseTeam!==!1});let teamId=client.config.currentTeam||defaultTeamId,team=teamId&&opts.getTeam!==!1?await getTeam(client,teamId):null,contextName=team?.slug||user?.username||user?.email;if(!contextName)throw new Error("Unable to determine context name");return opts.resolveLocalScope?resolveLocalScopeContext(client,{user,app,team}):{contextName,team,user,app}}async function getContextName(client,opts={}){let teamId=client.config.currentTeam,cachedSlug=teamId&&!client.authConfig.tokenSource?getCachedTeamSlug(client.config,teamId):void 0;if(cachedSlug&&!(opts.resolveLocalScope&&await hasLocalScope(client)))return output_manager_default.debug(`Using saved name "${cachedSlug}" for team ${teamId}`),cachedSlug;let{contextName,team}=opts.resolveLocalScope?await getScope(client,{resolveLocalScope:!0}):await getScope(client);return team&&!client.authConfig.tokenSource&&setCachedTeamSlug(client,team.id,team.slug),contextName}async function hasLocalScope(client){if(detectExplicitScope(client))return!1;let{localOrgId,isCrossTeamRepo}=await findLocalLink(client);return!!localOrgId||isCrossTeamRepo}async function getPrincipal(client){if(!isAppPrincipalEnabled())return{user:await getUser(client),app:null,token:null};let[userResult,tokenResult]=await Promise.allSettled([getUser(client),introspectToken(client)]),token=tokenResult.status==="fulfilled"?tokenResult.value:null,app=token?resolveAppFromToken(token):null;if(userResult.status==="rejected"&&!(app&&userResult.reason instanceof InvalidToken))throw userResult.reason;return{user:userResult.status==="fulfilled"?userResult.value:null,app,token}}async function resolveLocalScopeContext(client,{user,app,team}){let explicitScopeProvided=detectExplicitScope(client)||client.ignoresSavedTeam&&!!(0,import_build_utils2.getPlatformEnv)("ORG_ID"),globalTeamId=client.config.currentTeam,{localOrgId,linkedRepo,isCrossTeamRepo}=await findLocalLink(client),isAppPrincipal=!user&&!!app,effectiveLocalOrgId=isAppPrincipal?void 0:localOrgId,scopeMismatch=!!(effectiveLocalOrgId&&globalTeamId&&globalTeamId!==effectiveLocalOrgId);!isAppPrincipal&&!explicitScopeProvided&&!effectiveLocalOrgId&&isCrossTeamRepo&&output_manager_default.warn("This repository has projects across multiple teams. Use `--scope` to specify which team, or `cd` into a project directory.");let resolvedTeam=!explicitScopeProvided&&effectiveLocalOrgId?await applyLocalOrg(client,effectiveLocalOrgId):team,{org,contextName}=resolveOrg(resolvedTeam,user);return{org,contextName,user,team:resolvedTeam,app,globalTeam:team,linkedRepo,isCrossTeamRepo,localOrgId:effectiveLocalOrgId,scopeMismatch,explicitScopeProvided}}async function applyLocalOrg(client,localOrgId){return client.config.currentTeam=localOrgId.startsWith("team_")?localOrgId:void 0,client.config.currentTeam?await getTeamByIdOrSlug(client,client.config.currentTeam):null}async function getTeam(client,teamId){let team=await getTeamByIdOrSlug(client,teamId);if(!team)throw new TeamDeleted;return team}function resolveOrg(team,user){if(team)return{org:{type:"team",id:team.id,slug:team.slug},contextName:team.slug};if(user)return{org:{type:"user",id:user.id,slug:user.username},contextName:user.username||user.email};throw new Error("Unable to determine scope: no team or personal account is available for this token. Use `--scope` to specify a team.")}async function getLocalOrgId(client){return(await findLocalLink(client)).localOrgId}async function findLocalLink(client){let[projectLink,repoLink]=await Promise.all([findProjectLink(client),findRepoLink(client)]);return{localOrgId:findLocalOrgId(client.cwd,projectLink,repoLink),linkedRepo:repoLink?.repoConfig?{repoConfig:repoLink.repoConfig,rootPath:repoLink.rootPath}:null,isCrossTeamRepo:detectCrossTeamRepo(repoLink?.repoConfig)}}async function findProjectLink(client){try{return await getLinkFromDir(getVercelDirectory(client.cwd))}catch{return null}}async function findRepoLink(client){try{return await getRepoLink(client,client.cwd)}catch{return null}}function findLocalOrgId(cwd,projectLink,repoLink){if(projectLink)return projectLink.orgId;if(repoLink?.repoConfig)return findRepoOrgId(repoLink.repoConfig,relative(repoLink.rootPath,cwd))}function findRepoOrgId(repoConfig,pathFromRepoRoot){let matchedProjects=findProjectsFromPath(repoConfig.projects,pathFromRepoRoot),projects=matchedProjects.length===0&&pathFromRepoRoot===""?repoConfig.projects:matchedProjects,orgIds=new Set(projects.map(p=>p.orgId??repoConfig.orgId??""));if(orgIds.size!==1)return;let[orgId]=orgIds;return orgId||void 0}function scopeFlagPassed(argv){for(let arg of argv){if(arg==="--")break;if(arg==="--scope"||arg==="--team"||arg.startsWith("--scope=")||arg.startsWith("--team=")||arg==="-S"||arg==="-T")return!0}return!1}function detectExplicitScope(client){return scopeFlagPassed(client.argv)||!!client.localConfig?.scope}function detectCrossTeamRepo(repoConfig){if(!repoConfig?.projects||repoConfig.projects.length<2)return!1;let orgIds=new Set;for(let project of repoConfig.projects){let orgId=project.orgId??repoConfig.orgId;orgId&&orgIds.add(orgId)}return orgIds.size>1}export{introspectToken,isAppPrincipalEnabled,resolveAppFromToken,getAppTokenTeamId,assertOrgIdMatchesAppTeam,resolveAppTokenScope,isVercelian,autoOptInNativeBinary,forgetCachedTeamSlug,getScope,getContextName,getLocalOrgId,scopeFlagPassed,detectExplicitScope};
@@ -1,7 +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{packageName}from"./chunk-JESNVRVR.js";var loginCommand={name:"login",aliases:[],description:"Sign in to your Vercel account.",arguments:[{name:"email or team id",required:!1}],options:[{name:"github",description:"Log in with GitHub",shorthand:null,type:Boolean,deprecated:!0},{name:"oob",description:'Log in with "out of band" authentication',shorthand:null,type:Boolean,deprecated:!0},{name:"gitlab",shorthand:null,type:Boolean,deprecated:!0},{name:"bitbucket",shorthand:null,type:Boolean,deprecated:!0},{name:"future",description:"Sign in using OAuth Device Authorization",shorthand:null,type:Boolean,deprecated:!0}],examples:[{name:"Sign in to your Vercel account.",value:`${packageName} login`}],disabledGlobalOptions:["token"]};export{loginCommand};
@@ -1,7 +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{environmentOption,formatOption,jsonOption,projectOption,sinceOption,untilOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var schemaSubcommand={name:"schema",aliases:[],description:"List available metrics or inspect a specific metric.",arguments:[{name:"metric-or-prefix",required:!1}],options:[formatOption,jsonOption],examples:[{name:"List all metrics",value:`${packageName} metrics schema`},{name:"Show metric details",value:`${packageName} metrics schema vercel.function_invocation`},{name:"Schema as JSON for agents",value:`${packageName} metrics schema vercel.request.count --json`}]},metricsCommand={name:"metrics",aliases:[],description:"Query observability metrics for your Vercel project or team.",arguments:[{name:"metric-id",required:!1}],subcommands:[{name:"query",aliases:[],description:"",default:!0,hidden:!0,arguments:[],options:[],examples:[]},schemaSubcommand],options:[{name:"aggregation",shorthand:null,deprecatedShorthand:"a",type:String,deprecated:!1,description:"Aggregation function (default: sum for counts/bytes/currency, avg for durations/memory/ratios)",argument:"FN"},{name:"group-by",shorthand:null,type:[String],deprecated:!1,description:"Dimensions to group by (repeatable)",argument:"DIM"},{name:"limit",shorthand:null,deprecatedShorthand:"l",type:Number,deprecated:!1,description:"Max groups per time bucket (default: 10)",argument:"N"},{name:"order-by",shorthand:null,type:String,deprecated:!1,description:"Order grouped results by value or count (default: count, or value when count is unsupported)",argument:"value|count"},{name:"order",shorthand:null,type:String,deprecated:!1,description:"Order direction for grouped results: asc or desc (default: desc)",argument:"asc|desc"},{name:"filter",shorthand:null,deprecatedShorthand:"f",type:[String],deprecated:!1,get description(){return process.env.FF_LEGACY_METRICS?"OData filter expression (repeatable, ANDed together)":"KQL filter expression (repeatable, ANDed together)"},argument:"EXPR"},{...environmentOption,description:"Limit the query to one environment, such as production or preview"},{name:"prod",shorthand:null,type:Boolean,deprecated:!0,description:"Deprecated alias for `--environment production`"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption,{name:"granularity",shorthand:null,deprecatedShorthand:"g",type:String,deprecated:!1,description:"Time bucket size: 5m, 15m, 1h, 1d (default: auto)",argument:"SIZE"},{name:"bucket-timezone",shorthand:null,type:String,deprecated:!1,description:"IANA timezone for calendar bucket alignment only; does not shift --since/--until or output timestamps (e.g., Europe/Paris)",argument:"ZONE"},{...projectOption,shorthand:"p"},{name:"all",shorthand:null,type:Boolean,deprecated:!1,description:"Query across all projects for the team"},formatOption,jsonOption],get examples(){let canonical=!process.env.FF_LEGACY_METRICS,httpStatus=canonical?"httpStatus":"http_status",errorCode=canonical?"errorCode":"error_code",aiProvider=canonical?"aiProvider":"ai_provider",aiGatewayCostMetric=canonical?"vercel.ai_gateway.request.cost":"vercel.ai_gateway_request.cost",pageViewMetric=canonical?"vercel.analytics.page_view.count":"vercel.analytics_pageview.count",visitorId=canonical?"visitorId":"visitor_id",projectId=canonical?"projectId":"project_id",statusFilter=canonical?"httpStatus >= 500":"http_status ge 500",routeFilter=canonical?`'route:"/api"'`:`"contains(request_path, '/api')"`;return[{name:"5xx errors by error code in the last hour",value:`${packageName} metrics vercel.function_invocation.count --filter "${statusFilter}" --group-by ${errorCode} --since 1h`},{name:"Function invocations by HTTP status code",value:`${packageName} metrics vercel.function_invocation.count --group-by ${httpStatus} --since 6h`},{name:"Function duration by route",value:`${packageName} metrics vercel.function_invocation.function_duration_ms --aggregation avg --group-by route --since 1h`},{name:"AI Gateway costs by provider",value:`${packageName} metrics ${aiGatewayCostMetric} --aggregation sum --group-by ${aiProvider} --since 7d`},{name:"Core Web Vitals (LCP) by route",value:`${packageName} metrics vercel.speed_insights.lcp_ms --aggregation p75 --environment production --group-by route --since 7d`},{name:"Routes with the lowest p75 LCP",value:`${packageName} metrics vercel.speed_insights.lcp_ms --aggregation p75 --environment production --group-by route --since 7d --order-by value --order asc`},{name:canonical?"Daily pageviews":"Daily pageviews with a Paris-aligned bucket",value:canonical?`${packageName} metrics ${pageViewMetric} --since 7d --granularity 1d`:`${packageName} metrics ${pageViewMetric} --since 7d --granularity 1d --bucket-timezone Europe/Paris`},{name:"Visitors time series from the top 5 countries",value:`${packageName} metrics ${pageViewMetric} --aggregation unique/${visitorId} --group-by country --since 1d --granularity 1h --limit 5`},{name:"List available metrics",value:`${packageName} metrics schema`},{name:"Function executions matching an API route",value:`${packageName} metrics vercel.function_invocation.count --filter ${routeFilter} --group-by route --since 1h`},{name:"Function executions matching multiple filters",value:`${packageName} metrics vercel.function_invocation.count --filter "${statusFilter}" --filter ${routeFilter} --since 1h`},{name:"Show schema for a metric prefix",value:`${packageName} metrics schema vercel.request`},{name:"Team-wide function executions by project",value:`${packageName} metrics --all vercel.function_invocation.count --group-by ${projectId} --since 24h`}]}};export{schemaSubcommand,metricsCommand};
@@ -1,8 +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{did_you_mean_default}from"./chunk-DWZBL4NK.js";import{param}from"./chunk-3G3FQYMW.js";import{shouldEmitNonInteractiveCommandError,writeAgentError}from"./chunk-DGYHWXD2.js";import{buildCorrectedCommand,suggestCorrection}from"./chunk-VOCZ34ON.js";import{getFlagsSpecification}from"./chunk-AWMQGOS2.js";import{output_manager_default}from"./chunk-XP3FT56R.js";function handleCommandTypo({command,availableCommands,threshold=.7,client}){if(!command||command.startsWith("-"))return!1;let visibleCommands=availableCommands.filter(command2=>!command2.hidden),commandNames=visibleCommands.flatMap(({name,aliases})=>[name,...aliases]),correction=suggestCorrection(command,commandNames),suggestion=correction??did_you_mean_default(command,commandNames,threshold);if(suggestion){if(client){let definition=visibleCommands.find(candidate=>candidate.name===correction||candidate.aliases.some(alias=>alias===correction)),corrected=correction?buildCorrectedCommand(client.argv,command,correction,getFlagsSpecification(definition?.options??[])):void 0,payload={status:"error",reason:"unknown_command",message:`Unknown command "${command}". Did you mean "${suggestion}"?`,hint:corrected?"Use the suggested command after replacing any placeholders with the intended values.":`Accepted commands: ${commandNames.join(", ")}.`,...corrected&&{next:[{command:corrected,when:"Run the corrected command; replace any placeholders first"}]}};return shouldEmitNonInteractiveCommandError(client)?writeAgentError(client,payload):(output_manager_default.fatal(payload.message),output_manager_default.print(` ${corrected??payload.hint}
8
- `)),!0}return output_manager_default.error(`${param(command)} is not a valid target directory or subcommand. Did you mean ${param(suggestion)}?`),!0}return!1}export{handleCommandTypo};
@@ -1,7 +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{AGENT_REASON,AGENT_STATUS,shouldEmitNonInteractiveCommandError,writeAgentError}from"./chunk-DGYHWXD2.js";import{output_manager_default}from"./chunk-XP3FT56R.js";function getRenamedOption(flags,name,oldName,{json=!1}={}){let value=flags[name],oldValue=flags[oldName];if(value!==void 0&&oldValue!==void 0)return{error:`Can't use ${name} with ${oldName}.`};if(value!==void 0&&value.trim()==="")return{error:`${name} can't be empty.`};if(oldValue===void 0)return{value};let message=`${oldName} is deprecated. Use ${name}.`;return json?{value:oldValue,warning:{reason:AGENT_REASON.DEPRECATED,message}}:(output_manager_default.warning(message),{value:oldValue})}function reportRenamedOptionError(client,message,{json=!1}={}){return json||shouldEmitNonInteractiveCommandError(client)?writeAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}):output_manager_default.error(message),2}function renameOptionInArgs(args,oldName,name){let end=args.indexOf("--");return args.map((arg,index)=>(end===-1||index<end)&&(arg===oldName||arg.startsWith(`${oldName}=`))?`${name}${arg.slice(oldName.length)}`:arg)}export{getRenamedOption,reportRenamedOptionError,renameOptionInArgs};
@@ -1,7 +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{tracesConfigCommand}from"./chunk-GVTXA6HG.js";import{deploymentOption,nextCursorOption,projectOption,protectionBypassOption,sinceOption,untilOption,yesOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var spanQueryOptions=[{...projectOption,shorthand:"p",description:"Filter spans to one project (default: all team projects)"},{name:"environment",shorthand:"e",type:String,argument:"ENVIRONMENT",deprecated:!1,description:"Environment: production or preview (case-insensitive)"},{name:"service",shorthand:null,type:String,deprecated:!1,description:"Filter by service name"},{name:"name",shorthand:null,type:String,deprecated:!1,description:"Filter by span name"},{name:"kind",shorthand:null,type:String,deprecated:!1,description:"Filter by span kind: unspecified (0), internal (1), server (2), client (3), producer (4), consumer (5)"},{name:"status",shorthand:null,type:String,deprecated:!1,description:"Status: error, ok, or unset (case-insensitive)"},{...deploymentOption,description:"Filter by deployment ID"},{name:"deployment-id",shorthand:null,type:String,deprecated:!0},{name:"request-id",shorthand:null,type:String,deprecated:!1,description:"Filter by request ID. Some IDs return 404 in traces inspect. Reuse --scope and --project. See traces inspect --help."},{name:"trace-id",shorthand:null,type:String,deprecated:!1,description:"Filter by trace ID"},{name:"span-id",shorthand:null,type:String,deprecated:!1,description:"Filter by span ID"},{name:"root",shorthand:null,type:Boolean,deprecated:!1,description:"Show root spans only"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption];var requestIdLookupHelp={title:"Request-ID lookup",body:["A request ID in search results does not guarantee traces inspect can retrieve the trace. Lookup requires a matching root span in the same project within 30 minutes after the request-ID timestamp.","","If no matching root is found, lookup returns 404. Use the same --scope and --project for search and inspect."]},getSubcommand={name:"inspect",aliases:["get"],default:!0,description:"Fetch a captured trace by trace ID or request ID",helpSections:[{title:"Trace-ID lookup",body:["A 32-character hexadecimal ID selects trace-ID lookup. Other IDs select request-ID lookup.","Trace-ID lookup retrieves the trace directly within the trace retention window. Use the same --scope and --project as search."]},requestIdLookupHelp],arguments:[{name:"id",required:!0}],options:[{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Print the raw trace JSON to stdout"},{name:"project",shorthand:null,type:String,argument:"NAME|ID",deprecated:!1,description:"Project name or id to fetch the trace from (overrides the linked project)."},{name:"open",shorthand:null,type:Boolean,deprecated:!1,description:"Open the trace in the Vercel Dashboard instead of printing it."},{name:"view",shorthand:null,type:String,argument:"timeline|tree|waterfall",deprecated:!1,description:"Dashboard view to open (default: timeline). Only valid with --open."}],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Fetch a trace without the default inspect subcommand",value:`${packageName} traces e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace from a specific team and project",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --scope my-team --project my-app`},{name:"Open the trace in the Vercel Dashboard",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open`},{name:"Open the trace in the Vercel Dashboard with the waterfall view",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open --view waterfall`}]},createSubcommand={name:"create",aliases:[],description:"Capture a session trace for a request (alias for `vercel curl --trace`).",arguments:[{name:"path",required:!0}],options:[deploymentOption,protectionBypassOption,{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Emit { response, requestId } as JSON on stdout"},{...yesOption,description:"Skip the production confirmation prompt (e.g. in non-interactive mode)"}],examples:[{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Target a specific deployment",value:`${packageName} traces create /api/status --deployment https://your-project-abc123.vercel.app`},{name:"Pass curl flags after the separator",value:`${packageName} traces create /api/test -- --request POST --data '{"name": "John"}'`}]},searchSubcommand={name:"search",aliases:[],description:"Search team spans. Use --project to filter one project. Results are newest first. Duration filters do not sort results.",helpSections:[{title:"Table columns",body:["Available: span.startTime, span.duration, span.name, span.status.code, service.name, environment, request.id, trace.id, span.id, parent.id, span.kind","Default: all except environment, request.id, and span.kind."]},{title:"KQL filters",body:["Fields: project.id, environment, service.name, deployment.id, request.id, user.id, session.id","Span fields: span.name, span.kind, span.id, parent.id, span.isRoot, span.status.code, span.duration","Trace fields: trace.id, trace.state","","Other fields search span attributes first, then resource attributes.","","span.duration uses milliseconds.","span.kind uses the numeric values shown under --kind.","span.status.code uses Error, Ok, or Unset.","Use field:value filters. Plain text search is not supported.","Use NOT to exclude values. End a value with * to match a prefix.","Wrap values with spaces in double quotes. Keep the full query in single quotes."]},{title:"Paging",body:["When more spans match, a Next page command is printed on stderr.","--json prints one span line per record and ends with a summary line; --non-interactive implies --json.","--next continues from the summary's pagination.next value. It keeps the original team, project, filters, and time window, so it can't be combined with them. --limit can change."]}],arguments:[],options:[...spanQueryOptions,{name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Maximum number of spans (default: 100)"},{name:"query",shorthand:"q",type:String,deprecated:!1,description:"Filter spans using KQL"},{name:"columns",shorthand:null,argument:"LIST",type:String,deprecated:!1,description:"Columns to show, in order. Separate names with commas. Cannot be used with --json or --non-interactive."},{...nextCursorOption,description:"Continue a previous search from its summary's next value"},{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Output JSON Lines ending with a summary line"}],examples:[{name:"Find production errors for one service",value:`${packageName} traces search --environment production --service checkout-api --status error --since 1h`},{name:"Use KQL and output JSON Lines",value:`${packageName} traces search --query 'http.route:"/api/checkout"' --kind server --json`},{name:"Exclude span names starting with app/lib/fetch-api",value:`${packageName} traces search --query 'NOT span.name:app/lib/fetch-api*'`},{name:"Exclude exact span names",value:`${packageName} traces search --query 'NOT span.name:("GET /screenshot/v2" OR "middleware GET")'`},{name:"Find spans longer than 2 seconds",value:`${packageName} traces search --query 'span.duration > 2000' --columns span.startTime,span.duration,span.name,span.kind,span.status.code`},{name:"Continue from the summary's next value",value:`${packageName} traces search --next <CURSOR> --json`}]},tracesCommand={name:"traces",aliases:[],description:"Fetch project traces and search spans across a Vercel team.",arguments:[{name:"id",required:!1}],subcommands:[getSubcommand,searchSubcommand,createSubcommand,tracesConfigCommand],options:[],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Search recent spans",value:`${packageName} traces search --status error`},{name:"List the trace sampling rules for a project",value:`${packageName} traces config ls`}]};export{getSubcommand,createSubcommand,searchSubcommand,tracesCommand};
@@ -1,7 +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{allOption,confirmOption,formatOption,jsonOption,limitOption,nextCursorOption,yesOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var listCommand={name:"list",aliases:["ls"],description:"List deployments.",arguments:[{name:"app",required:!1}],options:[allOption,{name:"meta",description:"Filter deployments by metadata (e.g.: `-m KEY=value`). Can appear many times.",argument:"KEY=VALUE",shorthand:null,deprecatedShorthand:"m",type:[String],deprecated:!1},{name:"policy",description:"See deployments with provided Deployment Retention policies (e.g.: `-p KEY=value`). Can appear many times.",argument:"KEY=VALUE",shorthand:null,deprecatedShorthand:"p",type:[String],deprecated:!1},{name:"environment",description:"Filter deployments by environment",argument:"ENVIRONMENT",shorthand:"e",type:String,deprecated:!1},{name:"status",description:"Filter deployments by their status. Can be comma-separated for multiple statuses (e.g.: `--status BUILDING,READY`)",argument:"STATUS",shorthand:null,deprecatedShorthand:"s",type:String,deprecated:!1},nextCursorOption,limitOption,{name:"prod",shorthand:null,type:Boolean,deprecated:!0},yesOption,confirmOption,formatOption,jsonOption],examples:[{name:"List all deployments for the currently linked project",value:`${packageName} list`},{name:"List all deployments across all projects",value:`${packageName} list --all`},{name:"List all deployments for the project `my-app`",value:`${packageName} list my-app`},{name:"Filter deployments by metadata",value:`${packageName} list --meta key1=value1 --meta key2=value2`},{name:"Paginate deployments for a project, where `1584722256178` is the time in milliseconds since the UNIX epoch",value:`${packageName} list my-app --next <CURSOR>`},{name:"Filter deployments by status",value:`${packageName} list --status READY`},{name:"Filter deployments by multiple statuses",value:`${packageName} list --status BUILDING,ERROR`}]};export{listCommand};
@@ -1,9 +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{formatOption,jsonOption,projectOption,yesOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var builtInBody={type:"built-in",name:"Production server errors",triggers:{mode:"selected",items:[{type:"error_anomaly",filter:"statusGroup:5xx AND route:/api/*"}]},matchMinimumSeverityLevel:"high"},patchBody={name:"Critical production errors",matchMinimumSeverityLevel:"critical"},authoringReference={title:"Authoring reference",body:["vercel monitors schema --type built-in"]},monitorsAddHelpSections=[{title:"Scope",body:["Provide ruleScope in the body or use a scope flag, not both.","--project maps to one included project.","--all maps to every project in the team."]},{title:"Built-in body (rule.json)",body:[...JSON.stringify(builtInBody,null,2).split(`
8
- `),"","vercel monitors add --project my-app --body ./rule.json"]},authoringReference],monitorsUpdateHelpSections=[{title:"Update body",body:["Include only the fields to change. type is optional and inferred from the stored monitor.","Use --project or --all to change scope with or without --body.","Do not combine a ruleScope field in the body with --project or --all.","--all moves the monitor to team-wide scope."]},{title:"Partial body (patch.json)",body:[...JSON.stringify(patchBody,null,2).split(`
9
- `),"","vercel monitors update ar_abc123 --body ./patch.json","vercel monitors update ar_abc123 --project my-app"]},authoringReference];var projectScopeOption={...projectOption,shorthand:"p",description:"Use a project by name or ID"},listAllOption={name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"List all accessible monitors in the selected team"},mutationAllOption={...listAllOption,description:"Apply the monitor to all projects in the selected team"},deprecatedItemScopeOptions=[{...projectScopeOption,deprecated:!0},{...listAllOption,deprecated:!0}],bodyOption={name:"body",shorthand:null,type:String,argument:"PATH",deprecated:!1,description:"Read the monitor body from a JSON file"},monitorsLsSubcommand={name:"ls",aliases:["list"],default:!0,description:"List monitors for a project or team",arguments:[],options:[projectScopeOption,listAllOption,{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by monitor type"},formatOption,jsonOption],examples:[{name:"List monitors affecting the linked project",value:`${packageName} monitors ls`},{name:"List all monitors in the selected team",value:`${packageName} monitors ls --all`},{name:"Write JSON output",value:`${packageName} monitors ls --all --json`}]},monitorsSchemaSubcommand={name:"schema",aliases:[],description:"Show monitor request fields and examples",arguments:[],options:[{name:"type",shorthand:null,type:String,argument:"TYPE",deprecated:!1,description:"Monitor type to describe"},formatOption,jsonOption],examples:[{name:"List supported monitor types",value:`${packageName} monitors schema`},{name:"Show the built-in monitor schema",value:`${packageName} monitors schema --type built-in`}]},monitorsAddSubcommand={name:"add",aliases:["create"],description:"Create a monitor from a JSON body",helpSections:monitorsAddHelpSections,arguments:[],options:[projectScopeOption,mutationAllOption,formatOption,jsonOption,bodyOption],examples:[{name:"Create a project-scoped monitor",value:`${packageName} monitors add --project my-app --body ./rule.json`},{name:"Create a team-wide built-in monitor",value:`${packageName} monitors add --all --body ./rule.json`}]},monitorsInspectSubcommand={name:"inspect",aliases:["get"],description:"Show one monitor by ID",arguments:[{name:"monitorId",required:!0}],options:[...deprecatedItemScopeOptions,formatOption,jsonOption],examples:[{name:"Inspect a monitor",value:`${packageName} monitors inspect ar_abc123`},{name:"Write JSON output",value:`${packageName} monitors inspect ar_abc123 --json`}]},monitorsRmSubcommand={name:"remove",aliases:["rm","delete"],description:"Remove a monitor",arguments:[{name:"monitorId",required:!0}],options:[...deprecatedItemScopeOptions,formatOption,jsonOption,yesOption],examples:[{name:"Remove with confirmation",value:`${packageName} monitors remove ar_abc123`},{name:"Remove without a prompt",value:`${packageName} monitors remove ar_abc123 --yes`}]},monitorsUpdateSubcommand={name:"update",aliases:["patch"],description:"Patch a monitor or change its scope",helpSections:monitorsUpdateHelpSections,arguments:[{name:"monitorId",required:!0}],options:[projectScopeOption,mutationAllOption,formatOption,jsonOption,{...bodyOption,description:"Read the partial update body from a JSON file"}],examples:[{name:"Update fields from a file",value:`${packageName} monitors update ar_abc123 --body ./patch.json`},{name:"Move a monitor to a project",value:`${packageName} monitors update ar_abc123 --project my-app`}]},notificationTargetOptions=[{name:"webhook",shorthand:null,type:String,argument:"WEBHOOK_ID",deprecated:!1,description:"Select an account webhook by ID"},{name:"slack-channel",shorthand:null,type:String,argument:"CHANNEL_ID",deprecated:!1,description:"Select a Slack channel by ID"},{name:"slack-installation-id",shorthand:null,type:String,argument:"INSTALLATION_ID",deprecated:!1,description:"Slack installation ID. Optional only when the team has exactly one completed Slack installation."}],criticalOnlyOption={name:"critical-only",shorthand:null,type:Boolean,deprecated:!1,description:"Notify only when Vercel Agent escalates an alert to Critical"},noCriticalOnlyOption={name:"no-critical-only",shorthand:null,type:Boolean,deprecated:!1,description:"Deliver every alert matched by the monitor"},monitorsNotificationsLsSubcommand={name:"ls",aliases:["list"],default:!0,description:"List notification destinations for all readable monitors or one monitor",arguments:[{name:"monitorId",required:!1}],options:[formatOption,jsonOption],examples:[{name:"List notification destinations for all readable monitors",value:`${packageName} monitors notifications ls`},{name:"List notification destinations for one monitor",value:`${packageName} monitors notifications ls ar_abc123`},{name:"Write JSON output",value:`${packageName} monitors notifications ar_abc123 --json`}]},monitorsNotificationsLinkSubcommand={name:"link",aliases:[],description:"Link a Slack channel or account webhook to a monitor",arguments:[{name:"<monitorId>",required:!0}],options:[...notificationTargetOptions,criticalOnlyOption,formatOption,jsonOption],examples:[{name:"Link a Slack channel",value:`${packageName} monitors notifications link ar_abc123 --slack-channel C123`},{name:"Link a Slack channel from a specific installation",value:`${packageName} monitors notifications link ar_abc123 --slack-channel C123 --slack-installation-id icfg_abc123`},{name:"Link a webhook",value:`${packageName} monitors notifications link ar_abc123 --webhook wh_abc123`},{name:"Link a Critical-only webhook",value:`${packageName} monitors notifications link ar_abc123 --webhook wh_abc123 --critical-only`}]},monitorsNotificationsUpdateSubcommand={name:"update",aliases:["patch"],description:"Update a notification destination's delivery setting",arguments:[{name:"<monitorId>",required:!0}],options:[...notificationTargetOptions,criticalOnlyOption,noCriticalOnlyOption,formatOption,jsonOption],examples:[{name:"Restrict a Slack channel to Critical alerts",value:`${packageName} monitors notifications update ar_abc123 --slack-channel C123 --critical-only`},{name:"Restore delivery for every alert matched by the monitor",value:`${packageName} monitors notifications update ar_abc123 --webhook wh_abc123 --no-critical-only`}]},monitorsNotificationsUnlinkSubcommand={name:"unlink",aliases:[],description:"Unlink a Slack channel or account webhook from a monitor",arguments:[{name:"<monitorId>",required:!0}],options:[...notificationTargetOptions,formatOption,jsonOption],examples:[{name:"Unlink a Slack channel",value:`${packageName} monitors notifications unlink ar_abc123 --slack-channel C123`},{name:"Unlink a webhook",value:`${packageName} monitors notifications unlink ar_abc123 --webhook wh_abc123`}]},monitorsNotificationsAggregateCommand={name:"notifications",aliases:[],description:"List and manage linked Slack and webhook destinations for monitors",arguments:[],subcommands:[monitorsNotificationsLsSubcommand,monitorsNotificationsLinkSubcommand,monitorsNotificationsUpdateSubcommand,monitorsNotificationsUnlinkSubcommand],options:[formatOption,jsonOption],examples:[{name:"List destinations for all readable monitors",value:`${packageName} monitors notifications`},{name:"List destinations for one monitor",value:`${packageName} monitors notifications ar_abc123`},{name:"Link Slack with the team's only installation",value:`${packageName} monitors notifications link ar_abc123 --slack-channel C123`}]},monitorsCommand={name:"monitors",aliases:[],description:"Create, inspect, list, update, and delete monitors and manage their notification destinations",arguments:[],subcommands:[monitorsLsSubcommand,monitorsSchemaSubcommand,monitorsAddSubcommand,monitorsInspectSubcommand,monitorsRmSubcommand,monitorsUpdateSubcommand,monitorsNotificationsAggregateCommand],options:monitorsLsSubcommand.options,examples:[{name:"List monitors for the linked project",value:`${packageName} monitors ls`},{name:"Add a monitor",value:`${packageName} monitors add --project my-app --body ./rule.json`},{name:"Inspect a monitor",value:`${packageName} monitors inspect ar_abc123`},{name:"Update a monitor",value:`${packageName} monitors update ar_abc123 --body ./patch.json`},{name:"Remove a monitor",value:`${packageName} monitors remove ar_abc123`},{name:"List notification destinations for a monitor",value:`${packageName} monitors notifications ar_abc123`}]};export{monitorsLsSubcommand,monitorsSchemaSubcommand,monitorsAddSubcommand,monitorsInspectSubcommand,monitorsRmSubcommand,monitorsUpdateSubcommand,monitorsNotificationsLsSubcommand,monitorsNotificationsLinkSubcommand,monitorsNotificationsUpdateSubcommand,monitorsNotificationsUnlinkSubcommand,monitorsNotificationsAggregateCommand,monitorsCommand};
@@ -1,7 +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{require_dist,require_dist2}from"./chunk-7L2K4OKM.js";import{require_types}from"./chunk-KNLGWGUE.js";import{require_build_utils}from"./chunk-XP3FT56R.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_dist3=__commonJS({"../../internals/service-topology/dist/index.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{INTERNAL_SERVICE_PREFIX:()=>import_fs_detectors2.INTERNAL_SERVICE_PREFIX,autoDetectServices:()=>import_fs_detectors2.autoDetectServices,detectDaemons:()=>import_fs_detectors2.detectDaemons,detectServices:()=>import_fs_detectors2.detectServices,generateServiceRewrites:()=>import_fs_detectors2.generateServiceRewrites,generateServicesRoutes:()=>import_fs_detectors2.generateServicesRoutes,getInternalServiceCronPath:()=>import_fs_detectors2.getInternalServiceCronPath,getInternalServiceCronPathPrefix:()=>import_fs_detectors2.getInternalServiceCronPathPrefix,getInternalServiceFunctionPath:()=>import_fs_detectors2.getInternalServiceFunctionPath,getInternalServiceWorkerPath:()=>import_fs_detectors2.getInternalServiceWorkerPath,getInternalServiceWorkerPathPrefix:()=>import_fs_detectors2.getInternalServiceWorkerPathPrefix,hasLegacyServicesConfig:()=>import_fs_detectors2.hasLegacyServicesConfig,isExperimentalService:()=>import_fs_detectors2.isExperimentalService,isExperimentalServiceV2:()=>import_fs_detectors2.isExperimentalServiceV2,isRouteOwningBuilder:()=>import_fs_detectors2.isRouteOwningBuilder,isStaticBuild:()=>import_fs_detectors2.isStaticBuild,migrateExperimentalServices:()=>import_fs_detectors2.migrateExperimentalServices,planExperimentalServicesMigration:()=>import_fs_detectors2.planExperimentalServicesMigration,resolveAllConfiguredServices:()=>import_fs_detectors2.resolveAllConfiguredServices,resolveAllConfiguredServicesV2:()=>import_fs_detectors2.resolveAllConfiguredServicesV2,resolveConfiguredServiceV2:()=>import_fs_detectors2.resolveConfiguredServiceV2,validateServiceConfigV2:()=>import_fs_detectors2.validateServiceConfigV2});module.exports=__toCommonJS(src_exports);var import_fs_detectors2=require_dist2()}});var import_routing_utils=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1),import_types=__toESM(require_types(),1),import_fs_detectors=__toESM(require_dist2(),1);import{getConfigValidator}from"./config-validator.mjs";var imagesSchema={type:"object",additionalProperties:!1,required:["sizes"],properties:{contentDispositionType:{enum:["inline","attachment"]},contentSecurityPolicy:{type:"string",minLength:1,maxLength:256},dangerouslyAllowSVG:{type:"boolean"},domains:{type:"array",minItems:0,maxItems:50,items:{type:"string",minLength:1,maxLength:256}},formats:{type:"array",minItems:1,maxItems:4,items:{enum:["image/avif","image/webp","image/jpeg","image/png"]}},localPatterns:{type:"array",minItems:0,maxItems:25,items:{type:"object",additionalProperties:!1,properties:{pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},minimumCacheTTL:{type:"integer",minimum:1,maximum:31536e4},qualities:{type:"array",minItems:1,maxItems:20,items:{type:"integer",minimum:1,maximum:100}},remotePatterns:{type:"array",minItems:0,maxItems:50,items:{type:"object",additionalProperties:!1,required:["hostname"],properties:{protocol:{enum:["http","https"]},hostname:{type:"string",minLength:1,maxLength:256},port:{type:"string",minLength:0,maxLength:5},pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},sizes:{type:"array",minItems:1,maxItems:50,items:{type:"number"}}}},cronsSchema={type:"array",minItems:0,items:{type:"object",additionalProperties:!1,required:["path","schedule"],properties:{path:{type:"string",minLength:1,maxLength:512,pattern:"^/.*"},schedule:{type:"string",minLength:9,maxLength:256}}}},scheduleNameSchema={type:"string",minLength:1,maxLength:256,pattern:"^[0-9A-Za-z][0-9A-Za-z._-]*$"},scheduleDefinitionSchema={type:"object",additionalProperties:!1,required:["schedule"],properties:{schedule:{type:"string",minLength:9,maxLength:256},timezone:{type:"string",minLength:1,maxLength:50,description:"IANA timezone for cron evaluation. Defaults to UTC."},jitter:{type:"integer",minimum:1,maximum:15},path:{description:"Deployment path to invoke over HTTP, like `crons[].path`. Must start with `/`.",type:"string",maxLength:512,pattern:"^/"},requestMethod:{description:"HTTP method used to invoke `path`. Only valid with `path`. Defaults to `POST`.",enum:["GET","POST"]},function:{type:"string",minLength:1},service:{description:"Service that owns `function`, from `services`. When set, `function` is the path within that service. Only valid with `function`.",type:"string",minLength:1,maxLength:64,pattern:"^[a-z]([a-z_-]*[a-z])?$"},topic:{type:"string",minLength:1,maxLength:256,pattern:"^[A-Za-z0-9_-]+$"},command:{description:"Command to run for each firing. Only valid with a Dockerfile or Containerfile entrypoint.",type:"array",minItems:1,items:[{type:"string",pattern:"\\S"}],additionalItems:{type:"string"}},root:{description:"Directory of the service that runs `command`. `entrypoint` is relative to it. Only valid with `command`.",type:"string",minLength:1,maxLength:512},entrypoint:{type:"string",minLength:1,maxLength:512}},dependencies:{requestMethod:["path"],service:["function"],command:["entrypoint","root"],root:["command"]},oneOf:[{required:["path"]},{required:["function"]},{required:["topic"]},{required:["entrypoint"]}]},maxSchedules=100,schedulesSchema={if:{type:"array"},then:{type:"array",maxItems:maxSchedules,items:{...scheduleDefinitionSchema,required:["name","schedule"],properties:{name:scheduleNameSchema,...scheduleDefinitionSchema.properties}}},else:{type:"object",maxProperties:maxSchedules,propertyNames:scheduleNameSchema,additionalProperties:scheduleDefinitionSchema}},experimentalServicesMountSchema={oneOf:[{type:"string",minLength:1,maxLength:512},{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},anyOf:[{required:["path"]},{required:["subdomain"]}]}]},staticExperimentalServiceScheduleSchema={type:"string",minLength:9,maxLength:256,not:{const:"<dynamic>"}},experimentalServiceScheduleSchema={oneOf:[{type:"string",minLength:9,maxLength:256},{type:"array",minItems:1,items:staticExperimentalServiceScheduleSchema}]},experimentalServiceQueueTopicSchema={type:"object",additionalProperties:!1,required:["topic"],properties:{topic:{type:"string",minLength:1,maxLength:256},retryAfterSeconds:{type:"integer",minimum:1,maximum:86400},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400}}},experimentalServiceTopicsSchema={oneOf:[{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:256}},{type:"array",minItems:1,items:experimentalServiceQueueTopicSchema}]},envVarNamesSchema={pattern:"^[A-Za-z_][A-Za-z0-9_]*$",maxLength:256},getExperimentalServicesCommonProperties=()=>({entrypoint:{type:"string",minLength:1,maxLength:512},root:{type:"string",minLength:1,maxLength:512},workspace:{type:"string",minLength:1,maxLength:512},framework:{type:"string",minLength:1,maxLength:256},builder:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},buildCommand:{type:"string",minLength:1,maxLength:2048},installCommand:{type:"string",minLength:1,maxLength:2048},preDeployCommand:{type:"string",minLength:1,maxLength:2048},command:{oneOf:[{type:"string",minLength:1,maxLength:2048},{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:2048}}]},memory:{type:"integer",minimum:128,maximum:10240},maxDuration:(0,import_build_utils.getMaxDurationSchema)(),includeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]},excludeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]}}),experimentalServicesRoutableProperties={mount:experimentalServicesMountSchema,routePrefix:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},getExperimentalServicesServiceConfigSchema=()=>({oneOf:[{type:"object",additionalProperties:!1,properties:{...getExperimentalServicesCommonProperties(),...experimentalServicesRoutableProperties,type:{enum:["web"]}}},{type:"object",additionalProperties:!1,required:["type","trigger","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"schedule"},schedule:experimentalServiceScheduleSchema}},{type:"object",additionalProperties:!1,required:["type","trigger","topics"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"queue"},topics:experimentalServiceTopicsSchema,consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","trigger","entrypoint"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"workflow"}}},{type:"object",additionalProperties:!1,required:["type"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"worker"},topics:{type:"array",items:{type:"string",minLength:1,maxLength:256},minItems:1},consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"cron"},schedule:experimentalServiceScheduleSchema}}]}),getExperimentalServicesSchema=()=>({type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:getExperimentalServicesServiceConfigSchema()}),experimentalServiceGroupsSchema={type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:{type:"array",items:{type:"string",minLength:1,maxLength:256}}},servicesPathSchema={type:"string",minLength:1,maxLength:512},servicesCommandSchema={type:"string",minLength:1,maxLength:2048},servicesBindingSchema={type:"object",additionalProperties:!1,required:["service","format","env"],properties:{type:{description:"Optional binding type marker. Currently the only supported type is `service`. When present this must be `service`.",const:"service"},service:{type:"string",minLength:1,maxLength:64,pattern:import_build_utils.SERVICE_NAME_PATTERN},format:{const:"url"},env:{type:"string",...envVarNamesSchema}}},servicesBindingsSchema={type:"array",maxItems:100,items:servicesBindingSchema},getServicesServiceConfigSchema=()=>({type:"object",additionalProperties:!1,required:["root"],properties:{root:servicesPathSchema,framework:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},entrypoint:servicesPathSchema,command:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},installCommand:servicesCommandSchema,buildCommand:servicesCommandSchema,devCommand:servicesCommandSchema,ignoreCommand:servicesCommandSchema,outputDirectory:servicesPathSchema,bindings:servicesBindingsSchema,functions:(0,import_build_utils.getFunctionsSchema)(),headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,trailingSlash:import_routing_utils.trailingSlashSchema}}),daemonConfigSchema={type:"object",additionalProperties:!1,required:["root","entrypoint"],anyOf:[{required:["instances"]},{required:["replicas"]}],properties:{root:servicesPathSchema,entrypoint:servicesPathSchema,command:{type:"array",minItems:1,maxItems:128,items:{type:"string",minLength:1,maxLength:4096}},instances:{type:"object",additionalProperties:{type:"integer",minimum:0}},replicas:{description:"Deprecated. Use `instances`. Ignored when `instances` is set.",deprecated:!0,type:"object",additionalProperties:{type:"integer",minimum:0}},resources:{type:"object",additionalProperties:!1,required:["requests"],properties:{requests:{type:"object",additionalProperties:!1,required:["memory"],properties:{memory:{enum:["1Gi","2Gi","4Gi","8Gi"]}}}}},terminationGracePeriodSeconds:{type:"integer",minimum:0},livenessProbe:{type:"object",additionalProperties:!1,required:["httpGet"],properties:{httpGet:{type:"object",additionalProperties:!1,required:["port"],properties:{path:{type:"string",minLength:1},port:{type:"integer",minimum:1,maximum:65535},host:{type:"string",minLength:1},scheme:{enum:["HTTP","HTTPS"]},httpHeaders:{type:"array",items:{type:"object",additionalProperties:!1,required:["name","value"],properties:{name:{type:"string",minLength:1},value:{type:"string"}}}}}},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400},periodSeconds:{type:"integer",minimum:1,maximum:86400},timeoutSeconds:{type:"integer",minimum:1,maximum:86400},successThreshold:{type:"integer",minimum:1,maximum:10},failureThreshold:{type:"integer",minimum:1,maximum:10}}},bindings:{...servicesBindingsSchema,items:{...servicesBindingSchema,required:["type",...servicesBindingSchema.required]}}}},getServicesSchema=()=>({type:"object",propertyNames:{pattern:import_build_utils.SERVICE_NAME_PATTERN,maxLength:64},additionalProperties:getServicesServiceConfigSchema()}),maxDaemons=100,daemonsSchema={type:"object",maxProperties:maxDaemons,propertyNames:{pattern:import_build_utils.DAEMON_NAME_PATTERN,maxLength:64},additionalProperties:daemonConfigSchema},proxySchema={type:"object",additionalProperties:!1,required:["entrypoint"],properties:{entrypoint:{type:"string",minLength:1},matcher:{oneOf:[{type:"string",minLength:1},{type:"array",minItems:1,items:{type:"string",minLength:1}}]}}};function buildVercelConfigSchema(){return{type:"object",additionalProperties:!0,properties:{builds:import_build_utils.buildsSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,trailingSlash:import_routing_utils.trailingSlashSchema,functions:(0,import_build_utils.getFunctionsSchema)(),images:imagesSchema,crons:cronsSchema,schedules:schedulesSchema,bunVersion:{type:"string"},proxy:proxySchema,experimentalServices:getExperimentalServicesSchema(),experimentalServiceGroups:experimentalServiceGroupsSchema,services:getServicesSchema(),experimentalServicesV2:getServicesSchema(),daemons:daemonsSchema}}}var isDockerfilePath=path=>/(docker|container)file/i.test(path.split(/[\\/]/).pop()??"");function validateConfig(config){let validate=getConfigValidator(buildVercelConfigSchema);if(!validate(config)&&validate.errors&&validate.errors[0]){let error=validate.errors[0],fileName=config[import_types.fileNameSymbol]||"vercel.json",niceError=(0,import_build_utils.getPrettyError)(error);return niceError.message=`Invalid ${fileName} - ${niceError.message}`,niceError}let schedules=Array.isArray(config.schedules)?config.schedules.map((schedule,index)=>[`schedules[${index}]`,schedule.name,schedule]):Object.entries(config.schedules??{}).map(([name,schedule])=>[`schedules.${name}`,name,schedule]),serviceNames=new Set([...Object.keys(config.services??{}),...Object.keys(config.daemons??{})]),invalidCommand=message=>new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_COMMAND",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - ${message}`});for(let[path,name,schedule]of schedules){if("command"in schedule){if(!isDockerfilePath(schedule.entrypoint))return invalidCommand(`\`${path}.command\` requires a Dockerfile or Containerfile \`entrypoint\`.`);if(name.length>64||!new RegExp(import_build_utils.SERVICE_NAME_PATTERN).test(name))return invalidCommand(`\`${path}\` runs a command, so its name must be a valid service name: lowercase letters, \`-\` and \`_\`, at most 64 characters.`);if(serviceNames.has(name))return invalidCommand(`\`${path}\` runs a command as service "${name}", which is already the name of a service or daemon.`)}if(schedule.timezone!==void 0)try{if(!/^[A-Za-z][A-Za-z0-9_+/-]*$/.test(schedule.timezone))throw new RangeError("Expected a named timezone");new Intl.DateTimeFormat("en-US",{timeZone:schedule.timezone})}catch{return new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_TIMEZONE",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - \`${path}.timezone\` must be a valid IANA timezone, such as "America/New_York". Omit it to use UTC.`})}}let functionMaps=[config.functions,...Object.values(config.services??{}).map(service=>service.functions),...Object.values(config.experimentalServicesV2??{}).map(service=>service.functions)];for(let functions of functionMaps)for(let[pattern,fn]of Object.entries(functions??{})){let regions=[...new Set(fn.regions)];if(fn.affinity?.mode==="strict"&&(regions.includes("all")||regions.length>1))return new import_build_utils.NowBuildError({code:"INVALID_FUNCTION_AFFINITY_REGIONS",message:`Function affinity mode "strict" requires at most one statically configured region. Update \`functions[${JSON.stringify(pattern)}].regions\` to contain a single region.`,link:"https://vercel.com/docs/concepts/projects/project-configuration#functions"})}if(config.proxy){let proxyError=(0,import_fs_detectors.validateProxyConfig)(config.proxy);if(proxyError)return new import_build_utils.NowBuildError({code:proxyError.code.toUpperCase(),message:proxyError.message})}if(config.functions&&config.builds)return new import_build_utils.NowBuildError({code:"FUNCTIONS_AND_BUILDS",message:"The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.",link:"https://vercel.link/functions-and-builds"});if(config.proxy&&config.builds)return new import_build_utils.NowBuildError({code:"PROXY_AND_BUILDS",message:"The `proxy` property cannot be used with the `builds` property. Remove `builds` to use an explicit proxy entrypoint."});let hasExperimentalServices=!!config.experimentalServices;if(hasExperimentalServices&&config.builds)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_BUILDS",message:"The `experimentalServices` property cannot be used in conjunction with the `builds` property. Please remove one of them."});if(hasExperimentalServices&&config.functions)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_FUNCTIONS",message:"The `experimentalServices` property cannot be used in conjunction with the `functions` property. Please remove one of them."});if(config.experimentalServiceGroups&&!config.experimentalServices)return new import_build_utils.NowBuildError({code:"SERVICE_GROUPS_WITHOUT_SERVICES",message:"The `experimentalServiceGroups` property requires `experimentalServices` to be defined. Service groups reference services by name."});let hasServices=config.services!=null,hasExperimentalServicesV2=config.experimentalServicesV2!=null;if(hasServices&&hasExperimentalServicesV2)return new import_build_utils.NowBuildError({code:"SERVICES_AND_EXPERIMENTAL_SERVICES_V2",message:"The `services` property cannot be used in conjunction with its deprecated alias `experimentalServicesV2`. Please use only `services`."});let servicesConfig=config.services??config.experimentalServicesV2,servicesConfigKey=hasServices?"services":"experimentalServicesV2",servicesErrorCodePrefix=hasServices?"SERVICES":"EXPERIMENTAL_SERVICES_V2";if(servicesConfig&&hasExperimentalServices)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_EXPERIMENTAL_SERVICES`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`experimentalServices\` property. Please use only one services configuration.`});if(servicesConfig&&config.builds)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_BUILDS`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`builds\` property. Please remove one of them.`});if(servicesConfig){let ambiguousTopLevel=[];if(config.functions!=null&&ambiguousTopLevel.push("functions"),config.installCommand!=null&&ambiguousTopLevel.push("installCommand"),config.buildCommand!=null&&ambiguousTopLevel.push("buildCommand"),config.devCommand!=null&&ambiguousTopLevel.push("devCommand"),config.ignoreCommand!=null&&ambiguousTopLevel.push("ignoreCommand"),config.outputDirectory!=null&&ambiguousTopLevel.push("outputDirectory"),config.framework!=null&&ambiguousTopLevel.push("framework"),ambiguousTopLevel.length>0){let count=ambiguousTopLevel.length,fields=ambiguousTopLevel.map(field=>`\`${field}\``).join(", ");return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_TOP_LEVEL_BUILD_SETTINGS`,message:`The top-level ${count>1?"properties":"property"} ${fields} cannot be used with \`${servicesConfigKey}\` because the owning service is ambiguous. Move ${count>1?"them":"it"} under the relevant service in \`${servicesConfigKey}\`.`})}}if(config.daemons){let daemonError=validateDaemons(config,config.daemons);if(daemonError)return daemonError}if(servicesConfig){let serviceNames2=new Set(Object.keys(servicesConfig));for(let[serviceName,serviceConfig]of Object.entries(servicesConfig))for(let binding of serviceConfig.bindings??[])if(!serviceNames2.has(binding.service))return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_BINDING_UNKNOWN_SERVICE`,message:`Service "${serviceName}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`${servicesConfigKey}\` or fix the binding.`})}return null}function validateDaemons(config,daemons){let invalid=message=>new import_build_utils.NowBuildError({code:"INVALID_DAEMON",message}),daemonNames=new Set(Object.keys(daemons));for(let[name,daemon]of Object.entries(daemons))if(!isDockerfilePath(daemon.entrypoint))return invalid(`Daemon "${name}" must set \`entrypoint\` to a Dockerfile or Containerfile.`);let services={...config.experimentalServicesV2,...config.services},isDaemonTarget=name=>daemonNames.has(name)&&!Object.prototype.hasOwnProperty.call(services,name);for(let[name,service]of Object.entries(services)){let binding=service.bindings?.find(binding2=>isDaemonTarget(binding2.service));if(binding)return invalid(`Service "${name}" cannot bind to daemon "${binding.service}" because daemons do not receive traffic.`)}for(let[name,daemon]of Object.entries(daemons)){let envs=new Set;for(let binding of daemon.bindings??[]){if(!Object.prototype.hasOwnProperty.call(services,binding.service))return invalid(`Daemon "${name}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`services\` or fix the binding.`);if(envs.has(binding.env))return invalid(`Daemon "${name}" declares more than one binding for the environment variable "${binding.env}".`);envs.add(binding.env)}}let destinations=[...config.rewrites??[],...config.routes??[],...Object.values(services).flatMap(service=>[...service.rewrites??[],...service.routes??[]])].map(entry=>"destination"in entry?entry.destination:void 0);for(let destination of destinations)if(typeof destination=="object"&&destination!==null&&isDaemonTarget(destination.service))return invalid(`Rewrites and routes cannot target daemon "${destination.service}" because daemons do not receive traffic.`);return null}export{require_dist3 as require_dist,validateConfig};