@depup/vercel 59.10.0-depup.0 → 59.16.0-depup.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 (429) hide show
  1. package/README.md +6 -6
  2. package/changes.json +5 -5
  3. package/dist/chunks/add-65ZSJF26.js +8 -0
  4. package/dist/chunks/add-7G6574RA.js +8 -0
  5. package/dist/chunks/add-MFTI65B7.js +8 -0
  6. package/dist/chunks/build-BLQRFSLM.js +7 -0
  7. package/dist/chunks/chunk-265LYROU.js +9 -0
  8. package/dist/chunks/chunk-2B2MN3U5.js +8 -0
  9. package/dist/chunks/chunk-2H77IRPI.js +9 -0
  10. package/dist/chunks/chunk-2I64AYHG.js +7 -0
  11. package/dist/chunks/chunk-2S6PE6GB.js +7 -0
  12. package/dist/chunks/chunk-3EBQRPCU.js +7 -0
  13. package/dist/chunks/{chunk-KJBZ5ZST.js → chunk-3FMJYJUR.js} +8 -32
  14. package/dist/chunks/chunk-3QHJYVCY.js +7 -0
  15. package/dist/chunks/chunk-3TXEXPUW.js +7 -0
  16. package/dist/chunks/chunk-4MZK6JT6.js +7 -0
  17. package/dist/chunks/chunk-4NE5IQ25.js +7 -0
  18. package/dist/chunks/chunk-4PNSSS3L.js +7 -0
  19. package/dist/chunks/chunk-4QX77CP7.js +7 -0
  20. package/dist/chunks/chunk-4XH66IEQ.js +14 -0
  21. package/dist/chunks/chunk-4XO6BRQW.js +8 -0
  22. package/dist/chunks/chunk-57GHYR4Y.js +25 -0
  23. package/dist/chunks/chunk-5XJNPXQK.js +7 -0
  24. package/dist/chunks/chunk-65JYSI26.js +7 -0
  25. package/dist/chunks/chunk-6L236MNA.js +7 -0
  26. package/dist/chunks/chunk-6NVGLVCH.js +7 -0
  27. package/dist/chunks/chunk-6PFC3KWQ.js +7 -0
  28. package/dist/chunks/chunk-6QKS6QK7.js +7 -0
  29. package/dist/chunks/chunk-6RIQPTJA.js +8 -0
  30. package/dist/chunks/chunk-6TAQ6OWD.js +13 -0
  31. package/dist/chunks/chunk-6YAADRQB.js +9 -0
  32. package/dist/chunks/chunk-75CPY75D.js +15 -0
  33. package/dist/chunks/chunk-7FEWFNWG.js +7 -0
  34. package/dist/chunks/chunk-7GU2GVQ7.js +25 -0
  35. package/dist/chunks/chunk-7HL2RPUO.js +7 -0
  36. package/dist/chunks/chunk-7HSQ4ULK.js +86 -0
  37. package/dist/chunks/chunk-7PNYOSDU.js +9 -0
  38. package/dist/chunks/chunk-7RMCBXBB.js +62 -0
  39. package/dist/chunks/chunk-7RR7MIMT.js +7 -0
  40. package/dist/chunks/chunk-7T6TL3GQ.js +7 -0
  41. package/dist/chunks/chunk-7V6DZO2T.js +16 -0
  42. package/dist/chunks/chunk-AK5EV3WD.js +13 -0
  43. package/dist/chunks/chunk-AM46JVVN.js +7 -0
  44. package/dist/chunks/chunk-AVSPFBLM.js +7 -0
  45. package/dist/chunks/chunk-B4ATVYZW.js +7 -0
  46. package/dist/chunks/chunk-BMOWQEWL.js +7 -0
  47. package/dist/chunks/{chunk-A3NYPUKZ.js → chunk-BRK4OB4B.js} +1 -11
  48. package/dist/chunks/chunk-BVH2AEFE.js +7 -0
  49. package/dist/chunks/chunk-CN2QZO4U.js +7 -0
  50. package/dist/chunks/chunk-COQGD2EI.js +8 -0
  51. package/dist/chunks/chunk-CVKB54WW.js +7 -0
  52. package/dist/chunks/{chunk-C5HKWXRR.js → chunk-CZSOZKHX.js} +1 -12
  53. package/dist/chunks/chunk-D4MW3RDW.js +7 -0
  54. package/dist/chunks/chunk-DFE7LVAK.js +10 -0
  55. package/dist/chunks/chunk-DFVNL5ML.js +7 -0
  56. package/dist/chunks/chunk-EGMJRU5P.js +28 -0
  57. package/dist/chunks/chunk-EIXOJUNN.js +7 -0
  58. package/dist/chunks/chunk-ENBTTYJR.js +7 -0
  59. package/dist/chunks/chunk-EQ52F4LH.js +7 -0
  60. package/dist/chunks/chunk-ETV3C2CV.js +7 -0
  61. package/dist/chunks/chunk-EVZRQGNK.js +7 -0
  62. package/dist/chunks/chunk-F2ZWW2IO.js +8 -0
  63. package/dist/chunks/chunk-FANE2VO3.js +7 -0
  64. package/dist/chunks/chunk-FAW6NBLQ.js +7 -0
  65. package/dist/chunks/chunk-FI772UVH.js +7 -0
  66. package/dist/chunks/chunk-G4QF3M55.js +45 -0
  67. package/dist/chunks/chunk-G6CTAHKY.js +39 -0
  68. package/dist/chunks/chunk-G7Y77DFH.js +7 -0
  69. package/dist/chunks/chunk-GHAY4PSD.js +7 -0
  70. package/dist/chunks/chunk-GHM7V3GG.js +7 -0
  71. package/dist/chunks/chunk-GRNTLNC7.js +7 -0
  72. package/dist/chunks/chunk-GU6VIFR5.js +7 -0
  73. package/dist/chunks/chunk-GYGIBRFB.js +7 -0
  74. package/dist/chunks/{constants-YMCRE6IG.js → chunk-GZNDA6SV.js} +2 -9
  75. package/dist/chunks/chunk-HBFPLBTX.js +10 -0
  76. package/dist/chunks/chunk-HEGJZJO7.js +7 -0
  77. package/dist/chunks/chunk-HTC6KO2B.js +7 -0
  78. package/dist/chunks/chunk-IT3UX6V4.js +8 -0
  79. package/dist/chunks/chunk-IVSSTHB6.js +7 -0
  80. package/dist/chunks/chunk-IVWPQYIH.js +7 -0
  81. package/dist/chunks/chunk-J3U3L45Y.js +7 -0
  82. package/dist/chunks/chunk-JAJW3P42.js +7 -0
  83. package/dist/chunks/chunk-JEIMW3CO.js +7 -0
  84. package/dist/chunks/chunk-JKTQV2QJ.js +7 -0
  85. package/dist/chunks/chunk-JTVVBRW7.js +7 -0
  86. package/dist/chunks/chunk-JYAUUIR4.js +7 -0
  87. package/dist/chunks/chunk-JZRMH5UA.js +7 -0
  88. package/dist/chunks/chunk-K2RAW5DI.js +10 -0
  89. package/dist/chunks/chunk-K3KJZLBD.js +7 -0
  90. package/dist/chunks/chunk-KK4AJES5.js +36 -0
  91. package/dist/chunks/chunk-KKS7XWEX.js +7 -0
  92. package/dist/chunks/chunk-L243RUIR.js +19 -0
  93. package/dist/chunks/chunk-L3JDEHCQ.js +7 -0
  94. package/dist/chunks/chunk-LNPMDXBJ.js +7 -0
  95. package/dist/chunks/chunk-LSBEGBBX.js +9 -0
  96. package/dist/chunks/chunk-M2W3HKV3.js +23 -0
  97. package/dist/chunks/chunk-M5AV545M.js +7 -0
  98. package/dist/chunks/chunk-M67S3ZNJ.js +44 -0
  99. package/dist/chunks/chunk-MBL6TXEJ.js +7 -0
  100. package/dist/chunks/chunk-MEAY2K5Z.js +11 -0
  101. package/dist/chunks/chunk-MPV7JL34.js +29 -0
  102. package/dist/chunks/chunk-MY4MONOH.js +7 -0
  103. package/dist/chunks/chunk-N3N5UHIL.js +7 -0
  104. package/dist/chunks/chunk-N3ZZ7FHQ.js +7 -0
  105. package/dist/chunks/chunk-N6CNMMSZ.js +7 -0
  106. package/dist/chunks/chunk-NB2UCUFL.js +9 -0
  107. package/dist/chunks/chunk-NBVY237X.js +7 -0
  108. package/dist/chunks/chunk-NNP5NITU.js +15 -0
  109. package/dist/chunks/chunk-NS4FH2TY.js +11 -0
  110. package/dist/chunks/chunk-NUGLE4QY.js +11 -0
  111. package/dist/chunks/chunk-O3QTFKP3.js +7 -0
  112. package/dist/chunks/chunk-O7G3CZ42.js +7 -0
  113. package/dist/chunks/chunk-OAKO6LVS.js +7 -0
  114. package/dist/chunks/chunk-OHDEHZLX.js +7 -0
  115. package/dist/chunks/chunk-OSCCYU74.js +7 -0
  116. package/dist/chunks/chunk-OTVTI2GM.js +8 -0
  117. package/dist/chunks/chunk-OUHPDA7Q.js +7 -0
  118. package/dist/chunks/chunk-P2O5DOYE.js +7 -0
  119. package/dist/chunks/chunk-PHW54NU5.js +13 -0
  120. package/dist/chunks/chunk-PPCFQQSU.js +7 -0
  121. package/dist/chunks/chunk-PV5PBVER.js +7 -0
  122. package/dist/chunks/chunk-PZPLBXHU.js +12 -0
  123. package/dist/chunks/chunk-QGHN2WOY.js +7 -0
  124. package/dist/chunks/chunk-QGIGNMII.js +8 -0
  125. package/dist/chunks/chunk-QGIQK47P.js +7 -0
  126. package/dist/chunks/chunk-QHJLRTVY.js +7 -0
  127. package/dist/chunks/{chunk-2473DUBR.js → chunk-QR7QPUFN.js} +1 -9
  128. package/dist/chunks/chunk-QTKJC2O5.js +7 -0
  129. package/dist/chunks/chunk-R2TGGVCT.js +19 -0
  130. package/dist/chunks/chunk-R3RHRLGI.js +13 -0
  131. package/dist/chunks/chunk-RAIBQIKB.js +7 -0
  132. package/dist/chunks/chunk-RCTYVKM5.js +16 -0
  133. package/dist/chunks/chunk-RN2EWPUH.js +18 -0
  134. package/dist/chunks/chunk-RUJT2JBX.js +7 -0
  135. package/dist/chunks/chunk-S5CEIACD.js +7 -0
  136. package/dist/chunks/chunk-SOJCELXH.js +7 -0
  137. package/dist/chunks/chunk-SXUEGVWB.js +7 -0
  138. package/dist/chunks/{chunk-GGPE5377.js → chunk-T3GQAMBJ.js} +1 -9
  139. package/dist/chunks/chunk-T52FMXWC.js +7 -0
  140. package/dist/chunks/chunk-TEAQZXCV.js +9 -0
  141. package/dist/chunks/chunk-TG2RCYTH.js +7 -0
  142. package/dist/chunks/chunk-TGVB4DJ4.js +9 -0
  143. package/dist/chunks/chunk-TJCIHDPZ.js +9 -0
  144. package/dist/chunks/{pkg-56KRLZ5K.js → chunk-TKBORMUF.js} +1 -7
  145. package/dist/chunks/chunk-TRTEXGVN.js +7 -0
  146. package/dist/chunks/chunk-U56NHYAH.js +7 -0
  147. package/dist/chunks/chunk-U7KCDTCH.js +12 -0
  148. package/dist/chunks/chunk-UETTIYUQ.js +8 -0
  149. package/dist/chunks/chunk-ULLWCOYC.js +7 -0
  150. package/dist/chunks/chunk-UXTHEQVJ.js +21 -0
  151. package/dist/chunks/chunk-V4L6NUSW.js +24 -0
  152. package/dist/chunks/chunk-V6GSMYQB.js +16 -0
  153. package/dist/chunks/chunk-WPS6JZF6.js +7 -0
  154. package/dist/chunks/chunk-WRILLB46.js +7 -0
  155. package/dist/chunks/chunk-WUZD4KBL.js +7 -0
  156. package/dist/chunks/chunk-XCJDGQO7.js +7 -0
  157. package/dist/chunks/{update-route-version-E3V47KNI.js → chunk-XD2LZRBS.js} +1 -7
  158. package/dist/chunks/{chunk-64IF634X.js → chunk-XFVGX5HG.js} +1 -12
  159. package/dist/chunks/chunk-XK2BQUWV.js +21 -0
  160. package/dist/chunks/chunk-XPXOV5UO.js +7 -0
  161. package/dist/chunks/chunk-XQ73QIQ3.js +7 -0
  162. package/dist/chunks/chunk-XSVBYDYI.js +8 -0
  163. package/dist/chunks/chunk-XZ2JXEXU.js +23 -0
  164. package/dist/chunks/chunk-YCCBAQIH.js +20 -0
  165. package/dist/chunks/chunk-YCD5VEHQ.js +7 -0
  166. package/dist/chunks/chunk-YKZLKOOD.js +12 -0
  167. package/dist/chunks/chunk-YMVDWVMO.js +7 -0
  168. package/dist/chunks/chunk-YPTLSODC.js +7 -0
  169. package/dist/chunks/chunk-YV6CTDHR.js +7 -0
  170. package/dist/chunks/chunk-Z6Y55QJW.js +23 -0
  171. package/dist/chunks/chunk-ZDX75YNZ.js +7 -0
  172. package/dist/chunks/chunk-ZIPVX7LD.js +7 -0
  173. package/dist/chunks/chunk-ZKYS7EAB.js +7 -0
  174. package/dist/chunks/chunk-ZM2RFVTV.js +18 -0
  175. package/dist/chunks/chunk-ZXE4XYIV.js +7 -0
  176. package/dist/chunks/chunk-ZZQRMRWD.js +20 -0
  177. package/dist/chunks/cjs-GOQHXIHX.js +54 -0
  178. package/dist/chunks/clear-OJ6EDV3Q.js +8 -0
  179. package/dist/chunks/compile-vercel-config-HKMFYX2L.js +7 -0
  180. package/dist/chunks/config-IVZNLEUK.js +7 -0
  181. package/dist/chunks/config-LULRZCTY.js +8 -0
  182. package/dist/chunks/config-validator.mjs +1 -1
  183. package/dist/chunks/connect-git-provider-GIU5WZ52.js +7 -0
  184. package/dist/chunks/constants-NCE2LWSS.js +7 -0
  185. package/dist/chunks/create-project-SRQGD4JY.js +7 -0
  186. package/dist/chunks/delete-DUHLA627.js +9 -0
  187. package/dist/chunks/delete-HBL7TKZ5.js +10 -0
  188. package/dist/chunks/detect-projects-2GNCZ4CS.js +7 -0
  189. package/dist/chunks/detect-services-5GIRISUS.js +7 -0
  190. package/dist/chunks/disable-XTZ2FN2I.js +7 -0
  191. package/dist/chunks/discard-4IW37YWA.js +14 -0
  192. package/dist/chunks/edit-BBEW6J4Y.js +9 -0
  193. package/dist/chunks/edit-PUQ4NHNH.js +8 -0
  194. package/dist/chunks/enable-4AIU4V44.js +7 -0
  195. package/dist/chunks/esm-7HVUFWMN.js +7 -0
  196. package/dist/chunks/esm-BZBEM7YA.js +7 -0
  197. package/dist/chunks/esm-CXICLFA3.js +9 -0
  198. package/dist/chunks/esm-HDEHVK7I.js +9 -0
  199. package/dist/chunks/esm-NQRLKALI.js +20 -0
  200. package/dist/chunks/esm-SZZI53W7.js +7 -0
  201. package/dist/chunks/esm-WGJFGCLK.js +7 -0
  202. package/dist/chunks/exec-4AISDHUV.js +16372 -0
  203. package/dist/chunks/export-NQ4SZHRW.js +19 -0
  204. package/dist/chunks/fetch-proxy-AEAWC6MD.js +7 -0
  205. package/dist/chunks/future-E2FHKPJN.js +7 -0
  206. package/dist/chunks/generate-cert-for-deploy-IGJNGQLD.js +7 -0
  207. package/dist/chunks/image-PEDML4FR.js +7 -0
  208. package/dist/chunks/import-builders-UAMMKJAT.js +7 -0
  209. package/dist/chunks/inspect-DXFD47VC.js +20 -0
  210. package/dist/chunks/inspect-EEGSI64I.js +19 -0
  211. package/dist/chunks/inspect-EZP7WID3.js +9 -0
  212. package/dist/chunks/inspect-TUXRUGES.js +15 -0
  213. package/dist/chunks/inspect-WY6ISJM6.js +13 -0
  214. package/dist/chunks/list-EQBJKUH7.js +10 -0
  215. package/dist/chunks/list-JC24ACBV.js +11 -0
  216. package/dist/chunks/list-QTYHA5QM.js +16 -0
  217. package/dist/chunks/login-DEAEVUHM.js +7 -0
  218. package/dist/chunks/login-WDMVEUBV.js +9 -0
  219. package/dist/chunks/logs-JWDSCEI5.js +7 -0
  220. package/dist/chunks/ls-3VJGBK3L.js +12 -0
  221. package/dist/chunks/ls-3ZKP7ZPO.js +8 -0
  222. package/dist/chunks/ls-BAMHXX2I.js +12 -0
  223. package/dist/chunks/ls-S6JZYPGH.js +8 -0
  224. package/dist/chunks/ls-TYHGH2W4.js +11 -0
  225. package/dist/chunks/ls-YA2L3HO5.js +12 -0
  226. package/dist/chunks/ls-YXJ4X57G.js +12 -0
  227. package/dist/chunks/mutate-PE6TUYAM.js +9 -0
  228. package/dist/chunks/native-self-update-KOJVRMHR.js +7 -0
  229. package/dist/chunks/notifications-T3RUG34N.js +7 -0
  230. package/dist/chunks/open-BAWCRPNZ.js +7 -0
  231. package/dist/chunks/openapi-MO5HYMHR.js +7 -0
  232. package/dist/chunks/permissions-4AXOWGE6.js +7 -0
  233. package/dist/chunks/pkg-YFU67U7I.js +7 -0
  234. package/dist/chunks/prompt-missing-credentials-IUHLYSQU.js +7 -0
  235. package/dist/chunks/publish-2XWTYLVS.js +15 -0
  236. package/dist/chunks/pull-KCOUWGVC.js +7 -0
  237. package/dist/chunks/purchase-domain-if-available-BLEETOAR.js +7 -0
  238. package/dist/chunks/push-HVT3DU7K.js +7 -0
  239. package/dist/chunks/query-MJ7EBPCB.js +12 -0
  240. package/dist/chunks/reauthenticate-SH4XR7NH.js +7 -0
  241. package/dist/chunks/reorder-2L5YJSXX.js +10 -0
  242. package/dist/chunks/reply-PPDMG3MF.js +9 -0
  243. package/dist/chunks/repo-info-to-url-SK3VX6UL.js +7 -0
  244. package/dist/chunks/resolve-YJVUNKED.js +12 -0
  245. package/dist/chunks/resolve-deployment-framework-preset-XF3NJIDS.js +7 -0
  246. package/dist/chunks/restore-V6I26UDI.js +16 -0
  247. package/dist/chunks/rm-3NXDUNS4.js +8 -0
  248. package/dist/chunks/rm-43ZFE4U2.js +8 -0
  249. package/dist/chunks/rm-CD6UH446.js +8 -0
  250. package/dist/chunks/rm-SQNLLMLK.js +8 -0
  251. package/dist/chunks/rm-VUOBWXNR.js +8 -0
  252. package/dist/chunks/routes-5DERZV5M.js +7 -0
  253. package/dist/chunks/rule-inspect-D6NCXGFR.js +8 -0
  254. package/dist/chunks/rules-CI4NIZTK.js +7 -0
  255. package/dist/chunks/schema-C2ZBFLA5.js +14 -0
  256. package/dist/chunks/schema-GTOTPNEE.js +44 -0
  257. package/dist/chunks/select-org-KSCYSESV.js +7 -0
  258. package/dist/chunks/set-5OG2JDEK.js +7 -0
  259. package/dist/chunks/setup-and-link-KW27P3UH.js +7 -0
  260. package/dist/chunks/slugify-O5DBATYT.js +7 -0
  261. package/dist/chunks/stamp-OX4YO3KY.js +7 -0
  262. package/dist/chunks/tags-77GJR6ZK.js +7 -0
  263. package/dist/chunks/types-LRXQEDYI.js +14 -0
  264. package/dist/chunks/update-5BEQ4XCV.js +8 -0
  265. package/dist/chunks/update-route-version-XZAFPQJC.js +7 -0
  266. package/dist/chunks/utils-BG3TNJBX.js +86 -0
  267. package/dist/chunks/vlt-builder-importer-YVCYYRVV.js +11 -0
  268. package/dist/commands/build/index.js +24 -4620
  269. package/dist/commands/deploy/index.js +43 -2866
  270. package/dist/commands/dev/index.js +56 -23811
  271. package/dist/commands/env/index.js +26 -3387
  272. package/dist/commands/link/index.js +4 -263
  273. package/dist/commands/list/index.js +6 -555
  274. package/dist/commands-bulk.js +1229 -79337
  275. package/dist/help.js +1 -8
  276. package/dist/index.js +19 -2544
  277. package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +6 -0
  278. package/dist/version.mjs +1 -1
  279. package/package.json +64 -61
  280. package/dist/chunks/add-IJZ2Q46B.js +0 -219
  281. package/dist/chunks/add-KYLIIWQV.js +0 -140
  282. package/dist/chunks/add-SGSXZWCH.js +0 -191
  283. package/dist/chunks/build-PKOCHFHL.js +0 -246
  284. package/dist/chunks/chunk-26XDDLXM.js +0 -144
  285. package/dist/chunks/chunk-2HSQ7YUK.js +0 -93
  286. package/dist/chunks/chunk-3HZLXCVL.js +0 -137
  287. package/dist/chunks/chunk-3T7WSWZH.js +0 -151
  288. package/dist/chunks/chunk-3ZE5CFVM.js +0 -346
  289. package/dist/chunks/chunk-4KD5BYHB.js +0 -127
  290. package/dist/chunks/chunk-4KVJ2M4J.js +0 -12807
  291. package/dist/chunks/chunk-52QYYTM5.js +0 -228
  292. package/dist/chunks/chunk-53J6IECW.js +0 -233
  293. package/dist/chunks/chunk-57RHXXXG.js +0 -150
  294. package/dist/chunks/chunk-5AJPMLDV.js +0 -28
  295. package/dist/chunks/chunk-5BZWQDNJ.js +0 -251
  296. package/dist/chunks/chunk-5GGUB4EO.js +0 -31
  297. package/dist/chunks/chunk-5JNGHAUT.js +0 -242
  298. package/dist/chunks/chunk-5XECIWME.js +0 -1852
  299. package/dist/chunks/chunk-6JPVTPTU.js +0 -174
  300. package/dist/chunks/chunk-7AEEQOD4.js +0 -566
  301. package/dist/chunks/chunk-7Q45OKWR.js +0 -149
  302. package/dist/chunks/chunk-7ST552E3.js +0 -46
  303. package/dist/chunks/chunk-7TYA36S5.js +0 -90
  304. package/dist/chunks/chunk-AHU7WNL2.js +0 -24
  305. package/dist/chunks/chunk-AINIBIP4.js +0 -39
  306. package/dist/chunks/chunk-ASBP32T6.js +0 -107
  307. package/dist/chunks/chunk-AXNMBJKD.js +0 -40
  308. package/dist/chunks/chunk-AYLY3ZVL.js +0 -104
  309. package/dist/chunks/chunk-BEQV3X2L.js +0 -86
  310. package/dist/chunks/chunk-BMKU5KEL.js +0 -867
  311. package/dist/chunks/chunk-CJV7J7B5.js +0 -314
  312. package/dist/chunks/chunk-DWIC7MRV.js +0 -152
  313. package/dist/chunks/chunk-E336ZXPP.js +0 -43
  314. package/dist/chunks/chunk-EKPSCRJZ.js +0 -26
  315. package/dist/chunks/chunk-EOZFDJSY.js +0 -18
  316. package/dist/chunks/chunk-EZKW5YJ2.js +0 -177
  317. package/dist/chunks/chunk-FGDKMNEN.js +0 -21
  318. package/dist/chunks/chunk-FNYNYZAZ.js +0 -2908
  319. package/dist/chunks/chunk-FRAXI2WT.js +0 -817
  320. package/dist/chunks/chunk-FWKSJYDV.js +0 -150
  321. package/dist/chunks/chunk-FXD67VN5.js +0 -467
  322. package/dist/chunks/chunk-GGP5R3FU.js +0 -129
  323. package/dist/chunks/chunk-GRINZMFI.js +0 -138
  324. package/dist/chunks/chunk-GY5I4AYD.js +0 -122
  325. package/dist/chunks/chunk-GZLPFESR.js +0 -48
  326. package/dist/chunks/chunk-I526H4AS.js +0 -270
  327. package/dist/chunks/chunk-IB5L4LKZ.js +0 -1082
  328. package/dist/chunks/chunk-IJ4X426J.js +0 -104
  329. package/dist/chunks/chunk-KTCVGTRQ.js +0 -504
  330. package/dist/chunks/chunk-KXDWXXJH.js +0 -70
  331. package/dist/chunks/chunk-L3UXB2CW.js +0 -466
  332. package/dist/chunks/chunk-LCDVMLKI.js +0 -2391
  333. package/dist/chunks/chunk-MHO3EJAF.js +0 -61
  334. package/dist/chunks/chunk-MTWHQEXI.js +0 -229
  335. package/dist/chunks/chunk-MXLA3VQS.js +0 -20
  336. package/dist/chunks/chunk-NFU4XJIR.js +0 -120
  337. package/dist/chunks/chunk-NGGLYKNU.js +0 -710
  338. package/dist/chunks/chunk-O6VHU65V.js +0 -1583
  339. package/dist/chunks/chunk-O75LSD3C.js +0 -34
  340. package/dist/chunks/chunk-OBPBFJFP.js +0 -3488
  341. package/dist/chunks/chunk-OQ3C5VXZ.js +0 -66
  342. package/dist/chunks/chunk-P3SKP5WM.js +0 -27
  343. package/dist/chunks/chunk-P4QNYOFB.js +0 -96
  344. package/dist/chunks/chunk-PMSMUMUO.js +0 -30
  345. package/dist/chunks/chunk-POOO7W47.js +0 -916
  346. package/dist/chunks/chunk-PRWJUY5U.js +0 -848
  347. package/dist/chunks/chunk-Q2DGFCO7.js +0 -579
  348. package/dist/chunks/chunk-QFAS4OVW.js +0 -4707
  349. package/dist/chunks/chunk-QQ77K4QW.js +0 -2085
  350. package/dist/chunks/chunk-RBIFXFZX.js +0 -52
  351. package/dist/chunks/chunk-RKDCNQ4S.js +0 -1874
  352. package/dist/chunks/chunk-S7KYDPEM.js +0 -1564
  353. package/dist/chunks/chunk-SLPSPYVR.js +0 -334
  354. package/dist/chunks/chunk-SRVP2UST.js +0 -249
  355. package/dist/chunks/chunk-TZ2YI2VH.js +0 -87
  356. package/dist/chunks/chunk-UTWU4DZF.js +0 -573
  357. package/dist/chunks/chunk-VGIMO3ZK.js +0 -17
  358. package/dist/chunks/chunk-VP5Y3SZG.js +0 -106
  359. package/dist/chunks/chunk-VV5XULGR.js +0 -11433
  360. package/dist/chunks/chunk-VXYGCOKL.js +0 -28
  361. package/dist/chunks/chunk-WC3XNI4B.js +0 -96
  362. package/dist/chunks/chunk-WGGABYO5.js +0 -31
  363. package/dist/chunks/chunk-WNAKOXGK.js +0 -105
  364. package/dist/chunks/chunk-X6TBTUZZ.js +0 -158
  365. package/dist/chunks/chunk-XDGOOW3K.js +0 -60
  366. package/dist/chunks/chunk-XM3LOQIX.js +0 -262
  367. package/dist/chunks/chunk-XNFHNTS2.js +0 -2939
  368. package/dist/chunks/chunk-XRWOTCDO.js +0 -53
  369. package/dist/chunks/chunk-YLNIMGMQ.js +0 -559
  370. package/dist/chunks/chunk-YPQSDAEW.js +0 -29
  371. package/dist/chunks/chunk-Z2RKD7LL.js +0 -1892
  372. package/dist/chunks/chunk-Z44PATWW.js +0 -61983
  373. package/dist/chunks/chunk-ZSFEACZU.js +0 -303
  374. package/dist/chunks/cjs-DV4RM7XU.js +0 -20743
  375. package/dist/chunks/clear-J6TY2J3M.js +0 -136
  376. package/dist/chunks/compile-vercel-config-WVGNTJXO.js +0 -36
  377. package/dist/chunks/config-3JDOCLH7.js +0 -122
  378. package/dist/chunks/config-5T7XV4JE.js +0 -163
  379. package/dist/chunks/delete-EPPNTNEW.js +0 -155
  380. package/dist/chunks/delete-XQOAWEZV.js +0 -221
  381. package/dist/chunks/disable-U5YAPWPA.js +0 -194
  382. package/dist/chunks/discard-OCUCCXKO.js +0 -141
  383. package/dist/chunks/edit-CD7EXAO3.js +0 -158
  384. package/dist/chunks/edit-PNRGHNGQ.js +0 -643
  385. package/dist/chunks/enable-25RH2LVW.js +0 -200
  386. package/dist/chunks/exec-XH4K34JM.js +0 -1287
  387. package/dist/chunks/export-YSGEUXJW.js +0 -174
  388. package/dist/chunks/fetch-proxy-R3JZNXBZ.js +0 -99
  389. package/dist/chunks/image-4ZKCR4HL.js +0 -72
  390. package/dist/chunks/import-builders-FQ2LOIWC.js +0 -34
  391. package/dist/chunks/inspect-3K2EDYL6.js +0 -212
  392. package/dist/chunks/inspect-F5DJM5DL.js +0 -167
  393. package/dist/chunks/inspect-K2NJD2AI.js +0 -171
  394. package/dist/chunks/inspect-WRBFJUSY.js +0 -592
  395. package/dist/chunks/inspect-ZC4GRGTE.js +0 -141
  396. package/dist/chunks/list-B7C56Z7B.js +0 -424
  397. package/dist/chunks/list-PUFYWIOF.js +0 -383
  398. package/dist/chunks/list-Z6VHQQBW.js +0 -400
  399. package/dist/chunks/login-ZYUF7JZQ.js +0 -228
  400. package/dist/chunks/ls-2OUQUKPT.js +0 -217
  401. package/dist/chunks/ls-ALX26ARH.js +0 -204
  402. package/dist/chunks/ls-FNOL7XTY.js +0 -176
  403. package/dist/chunks/ls-PRY6OV4B.js +0 -193
  404. package/dist/chunks/ls-SQRTT5RH.js +0 -169
  405. package/dist/chunks/ls-TBBLZ766.js +0 -182
  406. package/dist/chunks/open-673AJXYY.js +0 -111
  407. package/dist/chunks/permissions-B6SFNLN4.js +0 -96
  408. package/dist/chunks/publish-TPJHZ2PJ.js +0 -151
  409. package/dist/chunks/push-3WD5IPXP.js +0 -186
  410. package/dist/chunks/query-ZXOJQZ7G.js +0 -722
  411. package/dist/chunks/reorder-SUFOQGPC.js +0 -408
  412. package/dist/chunks/reply-YOVUA6ZF.js +0 -172
  413. package/dist/chunks/resolve-OQ7P74JY.js +0 -233
  414. package/dist/chunks/restore-BD5XJOE7.js +0 -248
  415. package/dist/chunks/rm-4KAI42EX.js +0 -142
  416. package/dist/chunks/rm-4UIILZLP.js +0 -190
  417. package/dist/chunks/rm-5TY3QJUZ.js +0 -143
  418. package/dist/chunks/rm-EKVIZG2N.js +0 -170
  419. package/dist/chunks/rm-XAMQUW3J.js +0 -315
  420. package/dist/chunks/routes-2OLIBRYX.js +0 -20
  421. package/dist/chunks/rule-inspect-XZZE54SW.js +0 -281
  422. package/dist/chunks/rules-SF5FBWFF.js +0 -86
  423. package/dist/chunks/schema-3HRYA6AT.js +0 -235
  424. package/dist/chunks/schema-45SJNY5L.js +0 -427
  425. package/dist/chunks/set-T4IYLXET.js +0 -243
  426. package/dist/chunks/stamp-AA7R3MZS.js +0 -16
  427. package/dist/chunks/tags-EZKT46VN.js +0 -66
  428. package/dist/chunks/types-JGANJ5EQ.js +0 -114
  429. package/dist/chunks/update-OE7Y2J5I.js +0 -233
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/vercel
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [vercel](https://www.npmjs.com/package/vercel) @ 59.10.0 |
17
- | Processed | 2026-08-30 |
16
+ | Original | [vercel](https://www.npmjs.com/package/vercel) @ 59.16.0 |
17
+ | Processed | 2026-09-13 |
18
18
  | Smoke test | failed |
19
19
  | Deps updated | 11 |
20
20
 
@@ -26,13 +26,13 @@ npm install @depup/vercel
26
26
  | @vercel/prepare-flags-definitions | 0.3.0 | ^0.4.0 |
27
27
  | chokidar | 4.0.0 | ^5.0.0 |
28
28
  | esbuild | 0.27.0 | ^0.28.2 |
29
- | jose | 5.9.6 | ^6.2.10 |
29
+ | jose | 5.9.6 | ^6.2.12 |
30
30
  | luxon | ^3.4.0 | ^3.7.2 |
31
- | sandbox | 4.1.0 | ^4.2.1 |
31
+ | sandbox | 4.1.0 | ^4.4.0 |
32
32
  | smol-toml | 1.5.2 | ^1.8.0 |
33
- | undici | 5.29.0 | ^8.10.0 |
33
+ | undici | 5.29.0 | ^8.10.2 |
34
34
  | uuid | 14.0.1 | ^14.0.2 |
35
- | zod | 4.1.11 | ^4.5.4 |
35
+ | zod | 4.1.11 | ^4.6.4 |
36
36
 
37
37
  ---
38
38
 
package/changes.json CHANGED
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "jose": {
20
20
  "from": "5.9.6",
21
- "to": "^6.2.10"
21
+ "to": "^6.2.12"
22
22
  },
23
23
  "luxon": {
24
24
  "from": "^3.4.0",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "sandbox": {
28
28
  "from": "4.1.0",
29
- "to": "^4.2.1"
29
+ "to": "^4.4.0"
30
30
  },
31
31
  "smol-toml": {
32
32
  "from": "1.5.2",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "undici": {
36
36
  "from": "5.29.0",
37
- "to": "^8.10.0"
37
+ "to": "^8.10.2"
38
38
  },
39
39
  "uuid": {
40
40
  "from": "14.0.1",
@@ -42,9 +42,9 @@
42
42
  },
43
43
  "zod": {
44
44
  "from": "4.1.11",
45
- "to": "^4.5.4"
45
+ "to": "^4.6.4"
46
46
  }
47
47
  },
48
- "timestamp": "2026-08-30T01:00:12.522Z",
48
+ "timestamp": "2026-09-13T01:01:09.992Z",
49
49
  "totalUpdated": 11
50
50
  }
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{emitVcrArgParseError,handleVcrApiError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-DFE7LVAK.js";import{outputError}from"./chunk-6RIQPTJA.js";import"./chunk-D4MW3RDW.js";import{addSubcommand}from"./chunk-65JYSI26.js";import"./chunk-YMVDWVMO.js";import"./chunk-O7G3CZ42.js";import"./chunk-N3N5UHIL.js";import"./chunk-HBFPLBTX.js";import"./chunk-2I64AYHG.js";import"./chunk-SOJCELXH.js";import"./chunk-QTKJC2O5.js";import{AGENT_REASON}from"./chunk-ENBTTYJR.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-NS4FH2TY.js";import"./chunk-O3QTFKP3.js";import{parseArguments}from"./chunk-HTC6KO2B.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-LNPMDXBJ.js";import"./chunk-MY4MONOH.js";import"./chunk-M67S3ZNJ.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-XSVBYDYI.js";import"./chunk-EVZRQGNK.js";import{isAPIError}from"./chunk-R2TGGVCT.js";import{packageName}from"./chunk-FI772UVH.js";import"./chunk-XFVGX5HG.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(addSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr add <name> --project <name-or-id>"),printError(err),1}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let name=parsedArgs.args[0],project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),!name)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing repository name. Example: ${packageName} vcr add <name>`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr add <name>"),when:"Replace <name> with the repository name to create"}]},1),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS","Usage: `vercel vcr add <name>`");let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=`/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;output_manager_default.spinner("Creating repository...");try{let created=await client.fetch(path,{method:"POST",body:{projectId:scope.projectId,name}});return fr.jsonOutput?client.stdout.write(`${JSON.stringify(created,null,2)}
8
+ `):output_manager_default.success(`Created repository ${created.repository?.name??name}`),0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput,{retry:{command:buildCommandWithGlobalFlags(client.argv,"vcr ls"),when:"List existing repositories (a name conflict means it already exists)"}});throw err}finally{output_manager_default.stopSpinner()}}export{add as default};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{parseTeamRefs,require_async_sema,teamRefBody}from"./chunk-S5CEIACD.js";import{repositoryPermissionsPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-DFE7LVAK.js";import{outputError}from"./chunk-6RIQPTJA.js";import"./chunk-D4MW3RDW.js";import{permissionsAddSubcommand}from"./chunk-YMVDWVMO.js";import"./chunk-HBFPLBTX.js";import"./chunk-2I64AYHG.js";import"./chunk-SOJCELXH.js";import"./chunk-QTKJC2O5.js";import{AGENT_REASON}from"./chunk-ENBTTYJR.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-NS4FH2TY.js";import"./chunk-O3QTFKP3.js";import{parseArguments}from"./chunk-HTC6KO2B.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-LNPMDXBJ.js";import"./chunk-MY4MONOH.js";import"./chunk-M67S3ZNJ.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-XSVBYDYI.js";import"./chunk-EVZRQGNK.js";import{isAPIError}from"./chunk-R2TGGVCT.js";import{packageName}from"./chunk-FI772UVH.js";import"./chunk-XFVGX5HG.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import{__toESM}from"./chunk-6L236MNA.js";var import_async_sema=__toESM(require_async_sema(),1);var USAGE="vcr permissions <repository> add <team>[,<team>...]";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsAddSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,USAGE),printError(err),1}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],teamRefs=parseTeamRefs(parsedArgs.args.slice(2)),project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),teamRefs.length===0)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing team. Example: ${packageName} vcr permissions ${repository} add team_1a2b3c4d`,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE),when:"Replace <team> with a team id or slug (comma-separate multiple teams)"}]},1),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${USAGE}\``);let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=repositoryPermissionsPath(scope,repository),added=[],failed=[];output_manager_default.spinner(`Sharing ${repository} with ${teamRefs.length===1?teamRefs[0]:`${teamRefs.length} teams`}...`);let sema=new import_async_sema.default(10),results;try{results=await Promise.all(teamRefs.map(async team=>{await sema.acquire();try{let result=await client.fetch(path,{method:"POST",body:teamRefBody(team)});return{ok:!0,team,permission:result.permission}}catch(err){if(!isAPIError(err))throw err;let message=err.serverMessage||`API error (${err.status}).`;return{ok:!1,team,failure:{team,code:err.code||"API_ERROR",message}}}finally{sema.release()}}))}finally{output_manager_default.stopSpinner()}for(let result of results)result.ok?(added.push(result.permission),fr.jsonOutput||output_manager_default.success(`Shared ${repository} with ${result.permission?.teamSlug??result.team}`)):(failed.push(result.failure),fr.jsonOutput||output_manager_default.error(`Failed to share ${repository} with ${result.team}: ${result.failure.message}`));return failed.length>0&&outputAgentError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:`Failed to share ${repository} with ${failed.map(f=>`${f.team} (${f.message})`).join(", ")}`},1),fr.jsonOutput&&client.stdout.write(`${JSON.stringify({permissions:added,failed},null,2)}
8
+ `),failed.length>0?1:0}export{add as default};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{printRuleMutationReceipt}from"./chunk-G6CTAHKY.js";import{emitRulesArgParseError,getBodyType,handleRulesApiError,outputRulesError,readRuleBody,resolveRulesProject,resolveRulesTeam,rulesCollectionPath}from"./chunk-TGVB4DJ4.js";import"./chunk-7PNYOSDU.js";import"./chunk-FANE2VO3.js";import"./chunk-6PFC3KWQ.js";import"./chunk-GZNDA6SV.js";import"./chunk-WRILLB46.js";import"./chunk-6RIQPTJA.js";import"./chunk-GHAY4PSD.js";import"./chunk-YCCBAQIH.js";import"./chunk-TRTEXGVN.js";import"./chunk-T3GQAMBJ.js";import"./chunk-J3U3L45Y.js";import"./chunk-ZIPVX7LD.js";import"./chunk-GYGIBRFB.js";import"./chunk-MBL6TXEJ.js";import{validateJsonOutput}from"./chunk-D4MW3RDW.js";import"./chunk-P2O5DOYE.js";import{rulesAddSubcommand}from"./chunk-OAKO6LVS.js";import"./chunk-GHM7V3GG.js";import"./chunk-QR7QPUFN.js";import"./chunk-QTKJC2O5.js";import"./chunk-ENBTTYJR.js";import"./chunk-6TAQ6OWD.js";import"./chunk-WPS6JZF6.js";import"./chunk-NS4FH2TY.js";import"./chunk-O3QTFKP3.js";import"./chunk-RCTYVKM5.js";import{parseArguments}from"./chunk-HTC6KO2B.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-LNPMDXBJ.js";import"./chunk-MY4MONOH.js";import"./chunk-BRK4OB4B.js";import"./chunk-M67S3ZNJ.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import"./chunk-OSCCYU74.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-XSVBYDYI.js";import"./chunk-EVZRQGNK.js";import{isAPIError}from"./chunk-R2TGGVCT.js";import"./chunk-FI772UVH.js";import"./chunk-XFVGX5HG.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";function applyScopeFlag(client,body,type,scope,flags,jsonOutput){if(Object.hasOwn(body,"ruleScope"))return flags["--project"]||flags["--all"]?outputRulesError(client,jsonOutput,"SCOPE_CONFLICT","Specify rule scope either in the body or with --project/--all, not both."):void 0;if(flags["--project"]){body.ruleScope=type==="custom"?{type:"project",projectId:scope.projectId}:{type:"include",projectIds:[scope.projectId]};return}if(flags["--all"]){if(type==="custom")return outputRulesError(client,jsonOutput,"INVALID_SCOPE","Custom alert rules must target one project. Use --project <name-or-id>.");body.ruleScope={type:"all"};return}return outputRulesError(client,jsonOutput,"MISSING_SCOPE","Missing rule scope. Add ruleScope to the body, or pass --project or --all.")}async function resolveCreateScope(client,flags,jsonOutput){return flags["--project"]&&flags["--all"]?outputRulesError(client,jsonOutput,"MUTUAL_EXCLUSIVITY","Cannot specify both --all and --project. Use one or the other."):flags["--project"]?resolveRulesProject(client,flags["--project"],jsonOutput,"alerts rules add"):resolveRulesTeam(client,jsonOutput)}async function add(client,argv){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(rulesAddSubcommand.options))}catch(error){return emitRulesArgParseError(client,error,"alerts rules add --project <name-or-id> --body <path>"),printError(error),1}let flags=parsedArgs.flags,format=validateJsonOutput(flags);if(!format.valid)return outputRulesError(client,!1,"INVALID_ARGUMENTS",format.error);if(!flags["--body"])return outputRulesError(client,format.jsonOutput,"MISSING_ARGUMENTS","Missing required flag: --body <PATH>.");let body=readRuleBody(client,flags["--body"],format.jsonOutput);if(typeof body=="number")return body;let type=getBodyType(body);if(!type)return outputRulesError(client,format.jsonOutput,"INVALID_RULE_TYPE","Create body must set a supported rule type.");if(Object.hasOwn(body,"ruleScope")&&(flags["--project"]||flags["--all"]))return outputRulesError(client,format.jsonOutput,"SCOPE_CONFLICT","Specify rule scope either in the body or with --project/--all, not both.");if(type==="custom"&&flags["--all"])return outputRulesError(client,format.jsonOutput,"INVALID_SCOPE","Custom alert rules must target one project. Use --project <name-or-id>.");let scope=await resolveCreateScope(client,flags,format.jsonOutput);if(typeof scope=="number")return scope;let scopeError=applyScopeFlag(client,body,type,scope,flags,format.jsonOutput);if(scopeError!==void 0)return scopeError;output_manager_default.spinner("Creating alert rule\u2026");try{let response=await client.fetch(rulesCollectionPath(scope.teamId),{method:"POST",body});return format.jsonOutput?client.stdout.write(`${JSON.stringify(response,null,2)}
8
+ `):printRuleMutationReceipt("Created",response.rule,client.argv),0}catch(error){if(isAPIError(error))return handleRulesApiError(client,error,format.jsonOutput);throw error}finally{output_manager_default.stopSpinner()}}export{add as default};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{DEFAULT_TAG,buildRepositoryReference,parseNameArg,validateImageParts}from"./chunk-HEGJZJO7.js";import{VCR_ENGINES,emitVcrArgParseError,isBuildxAvailable,isEngineInstalled,pushCompressionArgs,reportEngineCommandFailure,reportEnginePushFailure,resolveRegistry,resolveVcrScope,runEngine,splitPassthrough,validateVcrChoice}from"./chunk-DFE7LVAK.js";import{outputError}from"./chunk-6RIQPTJA.js";import"./chunk-D4MW3RDW.js";import{buildSubcommand}from"./chunk-65JYSI26.js";import"./chunk-YMVDWVMO.js";import"./chunk-O7G3CZ42.js";import"./chunk-N3N5UHIL.js";import"./chunk-HBFPLBTX.js";import"./chunk-2I64AYHG.js";import"./chunk-SOJCELXH.js";import"./chunk-QTKJC2O5.js";import{AGENT_REASON}from"./chunk-ENBTTYJR.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-NS4FH2TY.js";import"./chunk-O3QTFKP3.js";import{parseArguments}from"./chunk-HTC6KO2B.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-LNPMDXBJ.js";import"./chunk-MY4MONOH.js";import"./chunk-M67S3ZNJ.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import{getFlagsSpecification}from"./chunk-JAJW3P42.js";import"./chunk-XSVBYDYI.js";import"./chunk-EVZRQGNK.js";import"./chunk-R2TGGVCT.js";import"./chunk-FI772UVH.js";import"./chunk-XFVGX5HG.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";var DEFAULT_PLATFORM="linux/amd64";async function build(client,telemetry){let{own,passthrough}=splitPassthrough(client.argv),parsedArgs;try{parsedArgs=parseArguments(own,getFlagsSpecification(buildSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr build <engine> [path] [name[:tag]]"),printError(err),1}let[engineArg,pathArg,nameArg]=parsedArgs.args.slice(2),project=parsedArgs.flags["--project"],platform=parsedArgs.flags["--platform"],push=!!parsedArgs.flags["--push"];if(telemetry.trackCliArgumentEngine(engineArg),telemetry.trackCliArgumentPath(pathArg),telemetry.trackCliArgumentName(nameArg),telemetry.trackCliOptionProject(project),telemetry.trackCliOptionPlatform(platform),telemetry.trackCliFlagPush(push),!engineArg){let message=`Missing engine. Choose one of: ${VCR_ENGINES.join(", ")}.`;return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr build docker"),when:"Replace docker with the container tool you use"}]},1),outputError(client,!1,"MISSING_ARGUMENTS",message)}let choiceError=validateVcrChoice(client,"engine",engineArg,VCR_ENGINES,!1);if(typeof choiceError=="number")return choiceError;let engine=engineArg;if(!isEngineInstalled(engine)){let message=`\`${engine}\` is not installed or not on your PATH. Install it and try again.`;return outputAgentError(client,{status:"error",reason:"engine_not_found",message},1),outputError(client,!1,"ENGINE_NOT_FOUND",message)}let scope=await resolveVcrScope(client,{project,jsonOutput:!1});if(typeof scope=="number")return scope;let parsed=parseNameArg(nameArg,scope.projectName);if("error"in parsed)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:parsed.error},1),outputError(client,!1,"INVALID_ARGUMENTS",parsed.error);let validationError=validateImageParts(parsed);if(validationError)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:validationError},1),outputError(client,!1,"INVALID_ARGUMENTS",validationError);let ref=`${buildRepositoryReference({registry:resolveRegistry(),teamSlug:scope.teamSlug,projectName:scope.projectName,repository:parsed.repository})}:${parsed.tag??DEFAULT_TAG}`,contextPath=pathArg??".",buildPlatform=platform??DEFAULT_PLATFORM;if(push&&engine==="docker"&&await isBuildxAvailable()){let outputSpec=`type=image,name=${ref},push=true,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true`,engineArgs2=["buildx","build","--platform",buildPlatform,"--output",outputSpec,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs2.join(" ")}`);let result2=await runEngine(engine,engineArgs2,{cwd:client.cwd,captureStderr:!0});return result2.exitCode!==0?reportEnginePushFailure(client,engine,"buildx build",result2):(output_manager_default.success(`Built and pushed ${ref} (zstd compression)`),0)}push&&engine==="docker"&&output_manager_default.warn("Docker Buildx is not available; building and pushing without zstd compression. Install Buildx for smaller, faster image pushes.");let engineArgs=["build","--platform",buildPlatform,"--tag",ref,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs.join(" ")}`);let result=await runEngine(engine,engineArgs,{cwd:client.cwd});if(result.exitCode!==0)return reportEngineCommandFailure(client,engine,"build",result);if(!push)return output_manager_default.success(`Built ${ref}`),output_manager_default.log(`Push it with \`${buildCommandWithGlobalFlags(client.argv,`vcr push ${engine}${nameArg?` ${nameArg}`:""}`)}\`.`),0;let pushArgs=["push",...pushCompressionArgs(engine),ref];output_manager_default.log(`Running: ${engine} ${pushArgs.join(" ")}`);let pushResult=await runEngine(engine,pushArgs,{cwd:client.cwd,captureStderr:!0});if(pushResult.exitCode!==0)return reportEnginePushFailure(client,engine,"push",pushResult);let compressed=engine!=="docker";return output_manager_default.success(`Built and pushed ${ref}${compressed?" (zstd compression)":""}`),0}export{build as default};
@@ -0,0 +1,9 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{MISSING_BOTH_MESSAGE}from"./chunk-YCD5VEHQ.js";import{RULE_ENVIRONMENTS}from"./chunk-IVWPQYIH.js";import{resolveProjectContext}from"./chunk-RUJT2JBX.js";import{AGENT_REASON,AGENT_STATUS}from"./chunk-ENBTTYJR.js";import{outputAgentError}from"./chunk-NS4FH2TY.js";import{detectExplicitScope}from"./chunk-O3QTFKP3.js";import{printError}from"./chunk-LNPMDXBJ.js";import{isAPIError}from"./chunk-R2TGGVCT.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";function messageFor(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function handleTracingApiError(client,err){if(client.nonInteractive){let status=isAPIError(err)?err.status:void 0;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:AGENT_REASON.API_ERROR,message:messageFor(err)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(messageFor(err)),1):(printError(err),1)}function configError(client,reason,message){return client.nonInteractive&&outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),1}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function ruleNotFound(client,message){return configError(client,AGENT_REASON.NOT_FOUND,message)}function confirmationRequired(client,message,next){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message,userActionRequired:!0,next}),output_manager_default.error(message),1}function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
8
+ `);return}client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,projectId:project.id,projectName:project.name,...envelope,message,next},null,2)}
9
+ `)}var RULE_LIMIT=10,MIN_SAMPLE_RATE=1,MAX_SAMPLE_RATE=100;function isRuleEnvironment(value){return RULE_ENVIRONMENTS.includes(value)}var ENVIRONMENT_ERROR=`\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`,RATE_ERROR=`\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`,EMPTY_PATH_ERROR="`requestPath` cannot be empty.";function parseSampleRate(value){if(!/^\d+$/.test(value.trim()))return;let rate=Number(value);return rate>=MIN_SAMPLE_RATE&&rate<=MAX_SAMPLE_RATE?rate:void 0}function toRow(rule){return{environment:rule.env??"any",requestPath:rule.requestPath??null,sampleRate:Math.round(rule.rate*100)}}function toApiRate(sampleRate){return sampleRate/100}function toRule(row){return{rate:toApiRate(row.sampleRate),...row.environment==="any"?{}:{env:row.environment},...row.requestPath===null?{}:{requestPath:row.requestPath}}}var ALL_PATHS_LABEL="(all paths)";function formatPath(requestPath){return requestPath??ALL_PATHS_LABEL}function formatRate(sampleRate){return`${sampleRate}%`}function formatRuleTarget(environment,requestPath){return`${environment} ${formatPath(requestPath)}`}function formatRuleLine(row){return`${formatRuleTarget(row.environment,row.requestPath)} ${formatRate(row.sampleRate)}`}var COMMAND_WORD_COUNT=3;function subcommandArguments(positional){return positional.slice(COMMAND_WORD_COUNT)}function hasSameKey(a,b){return a.environment===b.environment&&a.requestPath===b.requestPath}async function readProjectTracing({client,teamId,projectId}){let project=await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:teamId}),tracing=project.tracing??null;return{project,tracing,entries:(tracing?.samplingRules??[]).map(rule=>({rule,row:toRow(rule)}))}}async function writeSamplingRules({client,teamId,projectId,tracing,rules}){let body={tracing:{...tracing??{},samplingRules:rules}};await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:teamId,method:"PATCH",body})}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?(output_manager_default.error(`The linked project ${link.project.name} belongs to ${link.org.slug||link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`),{exitCode:1}):{teamId:link.org.id,projectId:link.project.id}}export{handleTracingApiError,invalidArguments,ruleNotFound,confirmationRequired,writeConfigJson,RULE_LIMIT,isRuleEnvironment,ENVIRONMENT_ERROR,RATE_ERROR,EMPTY_PATH_ERROR,parseSampleRate,toApiRate,toRule,formatPath,formatRate,formatRuleTarget,formatRuleLine,subcommandArguments,hasSameKey,readProjectTracing,writeSamplingRules,resolveConfigScope};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{noBorderChars,require_cli_table3}from"./chunk-6TAQ6OWD.js";import{require_dist}from"./chunk-57GHYR4Y.js";import{globalCommandOptions}from"./chunk-JAJW3P42.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1),import_constants=__toESM(require_dist(),1),import_cli_table3=__toESM(require_cli_table3(),1);var INDENT=" ".repeat(2),NEWLINE=`
8
+ `,tableOptions={chars:noBorderChars,style:{"padding-left":0,"padding-right":0}};function wordWrap(text,maxWidth){let _tableOptions=Object.assign({},tableOptions,{colWidths:[maxWidth],style:{"padding-left":INDENT.length}}),table=new import_cli_table3.default(_tableOptions);return table.push([{content:text,wordWrap:!0}]),table.toString()}function lineToString(line){let string="";for(let i=0;i<line.length;i++)if(i===line.length-1)string+=line[i];else{let curr=line[i],next=line[i+1];string+=curr,curr.trim()!==""&&next.trim()!==""&&(string+=" ")}return string}function outputArrayToString(outputArray){return outputArray.filter(line=>line!==null).join(NEWLINE)}function buildCommandSynopsisLine(command,parent){let line=[INDENT,import_constants.LOGO,import_chalk.default.bold(import_constants.NAME)];parent&&line.push(import_chalk.default.bold(parent.name)),line.push(import_chalk.default.bold(command.name));let args=command.arguments.slice(0);if(args.length===0&&command.subcommands&&command.subcommands.length>0&&args.push({name:"command",required:!command.subcommands.some(subcommand=>subcommand.default)}),args.length>0)for(let argument of args){let{name}=argument;argument.multiple&&(name+=" ..."),line.push(argument.required?name:`[${name}]`)}return command.options.length>0&&line.push("[options]"),line.push(NEWLINE),lineToString(line)}function buildCommandOptionLines(commandOptions,options,sectionTitle){let filteredCommandOptions=commandOptions.filter(option=>!option.deprecated&&option.description!==void 0);if(filteredCommandOptions.length===0)return null;filteredCommandOptions.sort((a,b)=>a.name<b.name?-1:a.name>b.name?1:0);let maxWidthOfUnwrappedColumns=0,rows=[];for(let option of filteredCommandOptions){let shorthandCell=option.shorthand?`${INDENT}-${option.shorthand},`:"",longhandCell=`${INDENT}--${option.name}`;option.argument&&(longhandCell+=` <${option.argument}>`),longhandCell+=INDENT;let widthOfUnwrappedColumns=shorthandCell.length+longhandCell.length;maxWidthOfUnwrappedColumns=Math.max(widthOfUnwrappedColumns,maxWidthOfUnwrappedColumns),rows.push([shorthandCell,longhandCell,{content:option.description,wordWrap:!0}])}let finalColumnWidth=options.columns-maxWidthOfUnwrappedColumns,table=new import_cli_table3.default(Object.assign({},tableOptions,{colWidths:[null,null,finalColumnWidth]}));return table.push(...rows),[`${INDENT}${import_chalk.default.dim(sectionTitle)}:`,NEWLINE,NEWLINE,table.toString(),NEWLINE,NEWLINE].join("")}function buildSubcommandLines(subcommands,options){if(!subcommands)return null;let maxWidthOfUnwrappedColumns=0,rows=[];for(let command of subcommands){if(command.hidden)continue;let nameCell=`${INDENT}${command.name}`,argsCell=INDENT;argsCell+=command.arguments.map(arg=>arg.required?arg.name:`[${arg.name}]`).join(" "),argsCell+=INDENT;let widthOfUnwrappedColumns=nameCell.length+argsCell.length;maxWidthOfUnwrappedColumns=Math.max(widthOfUnwrappedColumns,maxWidthOfUnwrappedColumns),rows.push([nameCell,argsCell,{content:command.default?`${command.description} ${import_chalk.default.bold("(default)")}`:command.description,wordWrap:!0}])}let rightMargin=INDENT.repeat(4).length,finalColumnWidth=options.columns-maxWidthOfUnwrappedColumns-rightMargin,table=new import_cli_table3.default(Object.assign({},tableOptions,{colWidths:[null,null,finalColumnWidth]}));return rows.length===0?null:(table.push(...rows),[`${INDENT}${import_chalk.default.dim("Commands")}:`,NEWLINE,NEWLINE,table.toString(),NEWLINE,NEWLINE].join(""))}function buildCommandExampleLines(command){if(!command.examples?.length)return null;let outputArray=[`${INDENT}${import_chalk.default.dim("Examples:")}`,""];for(let example of command.examples){let nameLine=[INDENT];nameLine.push(import_chalk.default.gray("-")),nameLine.push(example.name),outputArray.push(lineToString(nameLine)),outputArray.push("");let buildValueLine=value=>lineToString([INDENT,INDENT,import_chalk.default.cyan(`$ ${value}`)]);if(Array.isArray(example.value))for(let line of example.value)outputArray.push(buildValueLine(line));else outputArray.push(buildValueLine(example.value));outputArray.push("")}return outputArrayToString(outputArray)}function buildCommandDocumentationLines(command,options){if(options.omitDocumentation)return null;let documentation=command.documentation??options.parent?.documentation;return documentation?outputArrayToString([`${INDENT}${import_chalk.default.dim(`${documentation.label}:`)}`,"",lineToString([INDENT,INDENT,import_chalk.default.cyan(documentation.url)]),""]):null}function buildDescriptionLine(command,options){return`${wordWrap(command.description,options.columns)}${NEWLINE}`}function buildHelpOutput(command,options){let filteredGlobalOptions=command.disabledGlobalOptions?globalCommandOptions.filter(opt=>!command.disabledGlobalOptions?.includes(opt.name)):globalCommandOptions,outputArray=["",buildCommandSynopsisLine(command,options.parent),buildDescriptionLine(command,options),buildSubcommandLines(command.subcommands,options),buildCommandOptionLines(command.options,options,"Options"),buildCommandOptionLines(filteredGlobalOptions,options,"Global Options"),buildCommandExampleLines(command),buildCommandDocumentationLines(command,options),""];return outputArrayToString(outputArray)}function help(command,options){return buildHelpOutput(command,{...options,columns:options.columns??80})}export{buildCommandDocumentationLines,help};
@@ -0,0 +1,9 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{require_figures}from"./chunk-OHDEHZLX.js";import{Separator,ValidationError,createPrompt,isBackspaceKey,isDownKey,isEnterKey,isNumberKey,isUpKey,makeTheme,require_source,useKeypress,useMemo,usePagination,usePrefix,useRef,useState}from"./chunk-M2W3HKV3.js";import{require_ansi_escapes}from"./chunk-7HL2RPUO.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1),import_figures=__toESM(require_figures(),1),import_ansi_escapes=__toESM(require_ansi_escapes(),1),selectTheme={icon:{cursor:import_figures.default.pointer},style:{disabled:text=>import_chalk.default.dim(`- ${text}`)}};function isSelectable(item){return!Separator.isSeparator(item)&&!item.disabled}var esm_default=createPrompt((config,done)=>{let{choices:items,loop=!0,pageSize=7}=config,firstRender=useRef(!0),theme=makeTheme(selectTheme,config.theme),prefix=usePrefix({theme}),[status,setStatus]=useState("pending"),searchTimeoutRef=useRef(void 0),bounds=useMemo(()=>{let first=items.findIndex(isSelectable),last=items.length-1-[...items].reverse().findIndex(isSelectable);if(first<0)throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");return{first,last}},[items]),defaultItemIndex=useMemo(()=>"default"in config?items.findIndex(item=>isSelectable(item)&&item.value===config.default):-1,[config.default,items]),[active,setActive]=useState(defaultItemIndex===-1?bounds.first:defaultItemIndex),selectedChoice=items[active];useKeypress((key,rl)=>{if(clearTimeout(searchTimeoutRef.current),isEnterKey(key))setStatus("done"),done(selectedChoice.value);else if(isUpKey(key)||isDownKey(key)){if(rl.clearLine(0),loop||isUpKey(key)&&active!==bounds.first||isDownKey(key)&&active!==bounds.last){let offset=isUpKey(key)?-1:1,next=active;do next=(next+offset+items.length)%items.length;while(!isSelectable(items[next]));setActive(next)}}else if(isNumberKey(key)){rl.clearLine(0);let position=Number(key.name)-1,item=items[position];item!=null&&isSelectable(item)&&setActive(position)}else if(isBackspaceKey(key))rl.clearLine(0);else{let searchTerm=rl.line.toLowerCase(),matchIndex=items.findIndex(item=>Separator.isSeparator(item)||!isSelectable(item)?!1:String(item.name||item.value).toLowerCase().startsWith(searchTerm));matchIndex>=0&&setActive(matchIndex),searchTimeoutRef.current=setTimeout(()=>{rl.clearLine(0)},700)}});let message=theme.style.message(config.message),helpTip;firstRender.current&&items.length<=pageSize&&(firstRender.current=!1,helpTip=theme.style.help("(Use arrow keys)"));let page=usePagination({items,active,renderItem({item,isActive}){if(Separator.isSeparator(item))return` ${item.separator}`;let line=item.name||item.value;if(item.disabled){let disabledLabel=typeof item.disabled=="string"?item.disabled:"(disabled)";return theme.style.disabled(`${line} ${disabledLabel}`)}let color=isActive?theme.style.highlight:x=>x,cursor=isActive?theme.icon.cursor:" ";return color(`${cursor} ${line}`)},pageSize,loop,theme});if(status==="done"){let answer=selectedChoice.name||String(selectedChoice.value);return`${prefix} ${message} ${theme.style.answer(answer)}`}let choiceDescription=selectedChoice.description?`
8
+ ${selectedChoice.description}`:"";return`${[prefix,message,helpTip].filter(Boolean).join(" ")}
9
+ ${page}${choiceDescription}${import_ansi_escapes.default.cursorHide}`});export{esm_default};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{require_once}from"./chunk-SOJCELXH.js";import{__commonJS}from"./chunk-6L236MNA.js";var require_end_of_stream=__commonJS({"../../node_modules/.pnpm/end-of-stream@1.4.1/node_modules/end-of-stream/index.js"(exports,module){var once=require_once(),noop=function(){},isRequest=function(stream){return stream.setHeader&&typeof stream.abort=="function"},isChildProcess=function(stream){return stream.stdio&&Array.isArray(stream.stdio)&&stream.stdio.length===3},eos=function(stream,opts,callback){if(typeof opts=="function")return eos(stream,null,opts);opts||(opts={}),callback=once(callback||noop);var ws=stream._writableState,rs=stream._readableState,readable=opts.readable||opts.readable!==!1&&stream.readable,writable=opts.writable||opts.writable!==!1&&stream.writable,onlegacyfinish=function(){stream.writable||onfinish()},onfinish=function(){writable=!1,readable||callback.call(stream)},onend=function(){readable=!1,writable||callback.call(stream)},onexit=function(exitCode){callback.call(stream,exitCode?new Error("exited with error code: "+exitCode):null)},onerror=function(err){callback.call(stream,err)},onclose=function(){if(readable&&!(rs&&rs.ended))return callback.call(stream,new Error("premature close"));if(writable&&!(ws&&ws.ended))return callback.call(stream,new Error("premature close"))},onrequest=function(){stream.req.on("finish",onfinish)};return isRequest(stream)?(stream.on("complete",onfinish),stream.on("abort",onclose),stream.req?onrequest():stream.on("request",onrequest)):writable&&!ws&&(stream.on("end",onlegacyfinish),stream.on("close",onlegacyfinish)),isChildProcess(stream)&&stream.on("exit",onexit),stream.on("end",onend),stream.on("finish",onfinish),opts.error!==!1&&stream.on("error",onerror),stream.on("close",onclose),function(){stream.removeListener("complete",onfinish),stream.removeListener("abort",onclose),stream.removeListener("request",onrequest),stream.req&&stream.req.removeListener("finish",onfinish),stream.removeListener("end",onlegacyfinish),stream.removeListener("close",onlegacyfinish),stream.removeListener("finish",onfinish),stream.removeListener("exit",onexit),stream.removeListener("end",onend),stream.removeListener("error",onerror),stream.removeListener("close",onclose)}};module.exports=eos}});export{require_end_of_stream};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ function parseThreadArg(arg){if(!/^https?:\/\//i.test(arg))return{id:arg};let url;try{url=new URL(arg)}catch{return}let segments=url.pathname.split("/").filter(Boolean),cIndex=segments.lastIndexOf("c");if(cIndex!==-1&&cIndex+1<segments.length){let id=safeDecode(segments[cIndex+1]);return id?{id,teamSlug:cIndex>1?safeDecode(segments[0]):void 0}:void 0}}function safeDecode(segment){try{return decodeURIComponent(segment)||void 0}catch{return}}export{parseThreadArg};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{printProjectNotFoundError}from"./chunk-R3RHRLGI.js";import{param}from"./chunk-SXUEGVWB.js";import{buildCommandWithYes,outputActionRequired}from"./chunk-NS4FH2TY.js";import{detectExplicitScope}from"./chunk-O3QTFKP3.js";import{getLinkedProject,resolveProjectCwd}from"./chunk-M67S3ZNJ.js";import{getCommandName,getCommandNamePlain}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";var parseEnv=env=>{if(!env)return{};if(typeof env=="string"&&(env=[env]),Array.isArray(env)){let startingDict={};return env.reduce((o,e)=>{let key,value,equalsSign=e.indexOf("=");return equalsSign===-1?key=e:(key=e.slice(0,equalsSign),value=e.slice(equalsSign+1)),o[key]=value,o},startingDict)}return env};async function ensureLink(commandName,client,cwd,opts={}){cwd=await resolveProjectCwd(cwd);let link=opts.link,nonInteractive=opts.nonInteractive??client.nonInteractive??!1;if(opts.nonInteractive=nonInteractive,link||(opts.forceDelete?link={status:"not_linked",org:null,project:null}:link=await getLinkedProject(client,{cwd,projectName:opts.projectName,projectNameIsExplicit:!!(opts.projectName&&opts.failIfNotFound),scopeIsExplicit:detectExplicitScope(client),allowOwnerLookupFallback:opts.allowOwnerLookupFallback,skipRemoteLookup:opts.skipRemoteLookup}),opts.link=link),link.status==="linked"&&opts.forceDelete||link.status==="not_linked"){if(link.status==="not_linked"&&opts.failIfNotFound&&opts.projectName)return await printProjectNotFoundError(client,opts.projectName,commandName,link.orgId),1;if(link.status==="not_linked"&&opts.requireExistingLink)return output_manager_default.error(`Project is not linked. Run ${getCommandName("link")} first.`),1;let{default:setupAndLink}=await import("./setup-and-link-KW27P3UH.js");if(link=await setupAndLink(client,cwd,opts),link.status==="not_linked")return 0}return link.status==="error"?(link.reason==="HEADLESS"&&(nonInteractive?outputActionRequired(client,{status:"action_required",reason:"confirmation_required",message:`Command ${getCommandNamePlain(commandName)} requires confirmation. Use option --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"Confirm and run"}]},link.exitCode):output_manager_default.error(`Command ${getCommandName(commandName)} requires confirmation. Use option ${param("--yes")} to confirm.`)),nonInteractive&&process.exit(link.exitCode),link.exitCode):link}export{parseEnv,ensureLink};
@@ -4,18 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import {
8
- require_source
9
- } from "./chunk-S7KYDPEM.js";
10
- import {
11
- __toESM
12
- } from "./chunk-TZ2YI2VH.js";
13
-
14
- // src/help.ts
15
- var import_chalk = __toESM(require_source(), 1);
16
- var packageName = "vercel";
17
- var logo = "\u25B2";
18
- var help = () => `
7
+ import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1),packageName="vercel",logo="\u25B2",help=()=>`
19
8
  ${import_chalk.default.bold(`${logo} ${packageName}`)} [options] <command | path>
20
9
 
21
10
  ${import_chalk.default.dim("For deploy command help, run `vercel deploy --help`")}
@@ -24,9 +13,7 @@ var help = () => `
24
13
 
25
14
  ${import_chalk.default.dim("Basic")}
26
15
 
27
- deploy [path] Performs a deployment ${import_chalk.default.bold(
28
- "(default)"
29
- )}
16
+ deploy [path] Performs a deployment ${import_chalk.default.bold("(default)")}
30
17
  build Build the project locally into './vercel/output'
31
18
  cache [cmd] Manages cache for your current Project
32
19
  dev Start a local development server
@@ -86,6 +73,7 @@ var help = () => `
86
73
  rr | rolling-release [cmd] Manage rolling releases for gradual traffic shifting
87
74
  sandbox Interact with Vercel Sandbox
88
75
  skills [query] Discover agent skills relevant to your project
76
+ storage [cmd] Connect and manage storage resources for your Projects
89
77
  target [cmd] Manage custom environments for your Project
90
78
  teams Manages your teams
91
79
  telemetry [cmd] Enable or disable telemetry collection
@@ -103,19 +91,13 @@ var help = () => `
103
91
  -v, --version Output the version number
104
92
  --changelog Show the 5 latest Vercel product updates
105
93
  --cwd Current working directory
106
- -A ${import_chalk.default.bold.underline("FILE")}, --local-config=${import_chalk.default.bold.underline(
107
- "FILE"
108
- )} Path to the local ${"`vercel.json`"} file
109
- -Q ${import_chalk.default.bold.underline("DIR")}, --global-config=${import_chalk.default.bold.underline(
110
- "DIR"
111
- )} Path to the global ${"`.vercel`"} directory
94
+ -A ${import_chalk.default.bold.underline("FILE")}, --local-config=${import_chalk.default.bold.underline("FILE")} Path to the local \`vercel.json\` file
95
+ -Q ${import_chalk.default.bold.underline("DIR")}, --global-config=${import_chalk.default.bold.underline("DIR")} Path to the global \`.vercel\` directory
112
96
  -d, --debug Debug mode [off]
113
97
  --no-color No color mode [off]
114
98
  --non-interactive Run without interactive prompts (default when agent detected)
115
99
  -S, --scope Set a custom scope
116
- -t ${import_chalk.default.underline("TOKEN")}, --token=${import_chalk.default.underline(
117
- "TOKEN"
118
- )} Login token
100
+ -t ${import_chalk.default.underline("TOKEN")}, --token=${import_chalk.default.underline("TOKEN")} Login token
119
101
 
120
102
  ${import_chalk.default.dim("Examples:")}
121
103
 
@@ -131,9 +113,7 @@ var help = () => `
131
113
 
132
114
  ${import_chalk.default.cyan(`$ ${packageName} -e NODE_ENV=production`)}
133
115
 
134
- ${import_chalk.default.gray("\u2013")} Show the usage information for the sub command ${import_chalk.default.dim(
135
- "`list`"
136
- )}
116
+ ${import_chalk.default.gray("\u2013")} Show the usage information for the sub command ${import_chalk.default.dim("`list`")}
137
117
 
138
118
  ${import_chalk.default.cyan(`$ ${packageName} help list`)}
139
119
 
@@ -144,8 +124,4 @@ var help = () => `
144
124
  ${import_chalk.default.gray("\u2013")} Search Vercel product updates
145
125
 
146
126
  ${import_chalk.default.cyan(`$ ${packageName} changelog search "AI SDK"`)}
147
- `;
148
-
149
- export {
150
- help
151
- };
127
+ `;export{help};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{projectOption,yesOption}from"./chunk-JAJW3P42.js";import{packageName}from"./chunk-FI772UVH.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,{name:"search",description:"Search by name, description, source, or destination",shorthand:"s",type:String,argument:"QUERY",deprecated:!1},{name:"filter",description:"Filter by type: rewrite, redirect, set_status, transform",shorthand:"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:"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,{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,{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 (default), path-to-regexp, equals",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:"disabled",description:"Create route in disabled state",shorthand:null,type:Boolean,deprecated:!1},{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 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:"delete",aliases:["rm"],description:"Delete one or more routing rules",arguments:[{name:"name-or-id",required:!0,multiple:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when deleting"}],examples:[{name:"Delete a route by name",value:`${packageName} routes delete "Old Redirect"`},{name:"Delete a route by ID",value:`${packageName} routes delete abc123`},{name:"Delete multiple routes",value:`${packageName} routes delete "Route A" "Route B"`},{name:"Delete without confirmation",value:`${packageName} routes delete "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:"reorder",aliases:["move"],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 reordering"}],examples:[{name:"Move to first position",value:`${packageName} routes reorder "Catch All" --first`},{name:"Move to last position",value:`${packageName} routes reorder "Catch All" --last`},{name:"Move to a specific position",value:`${packageName} routes reorder "API Proxy" --position 3`},{name:"Move after another route",value:`${packageName} routes reorder "API Proxy" --position after:route-id-123`},{name:"Interactive reorder (prompts for position)",value:`${packageName} routes reorder "API Proxy"`}]},editSubcommand={name:"edit",aliases:[],description:"Edit 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 edit "API Proxy"`},{name:"Edit with AI",value:`${packageName} routes edit "API Proxy" --ai "Add CORS headers and change status to 308"`},{name:"Change destination",value:`${packageName} routes edit "API Proxy" --dest "https://new-api.example.com/:path*"`},{name:"Switch to redirect",value:`${packageName} routes edit "Old Route" --action redirect --dest "/new" --status 301`},{name:"Add a response header",value:`${packageName} routes edit "My Route" --set-response-header "Cache-Control=public, max-age=3600"`},{name:"Clear all conditions and add new ones",value:`${packageName} routes edit "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 (default) or .ts",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};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{getCommandName}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function validateLsArgs(options){let{commandName,args,maxArgs=0,exitCode=1,usageString}=options;if(args.length>maxArgs){let usage=usageString||getCommandName(commandName);return output_manager_default.error(`Invalid number of arguments. Usage: ${import_chalk.default.cyan(usage)}`),exitCode}return 0}export{validateLsArgs};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{__commonJS}from"./chunk-6L236MNA.js";var require_fast_deep_equal=__commonJS({"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports,module){"use strict";module.exports=function equal(a,b){if(a===b)return!0;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return!1;var length,i,keys;if(Array.isArray(a)){if(length=a.length,length!=b.length)return!1;for(i=length;i--!==0;)if(!equal(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if(keys=Object.keys(a),length=keys.length,length!==Object.keys(b).length)return!1;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;i--!==0;){var key=keys[i];if(!equal(a[key],b[key]))return!1}return!0}return a!==a&&b!==b}}});export{require_fast_deep_equal};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{TelemetryClient}from"./chunk-57GHYR4Y.js";var RoutesTelemetryClient=class extends TelemetryClient{trackCliSubcommandList(actual){this.trackCliSubcommand({subcommand:"list",value:actual})}trackCliSubcommandListVersions(actual){this.trackCliSubcommand({subcommand:"list-versions",value:actual})}trackCliSubcommandInspect(actual){this.trackCliSubcommand({subcommand:"inspect",value:actual})}trackCliSubcommandAdd(actual){this.trackCliSubcommand({subcommand:"add",value:actual})}trackCliSubcommandPublish(actual){this.trackCliSubcommand({subcommand:"publish",value:actual})}trackCliSubcommandRestore(actual){this.trackCliSubcommand({subcommand:"restore",value:actual})}trackCliSubcommandDiscardStaging(actual){this.trackCliSubcommand({subcommand:"discard-staging",value:actual})}trackCliSubcommandDelete(actual){this.trackCliSubcommand({subcommand:"delete",value:actual})}trackCliSubcommandExport(actual){this.trackCliSubcommand({subcommand:"export",value:actual})}trackCliSubcommandEnable(actual){this.trackCliSubcommand({subcommand:"enable",value:actual})}trackCliSubcommandDisable(actual){this.trackCliSubcommand({subcommand:"disable",value:actual})}trackCliSubcommandReorder(actual){this.trackCliSubcommand({subcommand:"reorder",value:actual})}trackCliSubcommandEdit(actual){this.trackCliSubcommand({subcommand:"edit",value:actual})}},RoutesAddTelemetryClient=class extends TelemetryClient{trackCliArgumentName(name){name&&this.trackCliArgument({arg:"name",value:this.redactedValue})}trackCliFlagYes(flag){flag&&this.trackCliFlag("yes")}trackCliFlagDisabled(flag){flag&&this.trackCliFlag("disabled")}trackCliOptionSrc(src){src&&this.trackCliOption({option:"src",value:this.redactedValue})}trackCliOptionSrcSyntax(syntax){syntax&&this.trackCliOption({option:"src-syntax",value:syntax})}trackCliOptionAction(action){action&&this.trackCliOption({option:"action",value:action})}trackCliOptionDest(dest){dest&&this.trackCliOption({option:"dest",value:this.redactedValue})}trackCliOptionStatus(status){status!==void 0&&this.trackCliOption({option:"status",value:String(status)})}trackCliOptionPosition(position){if(position){let placement=position.split(":")[0];this.trackCliOption({option:"position",value:placement})}}trackCliOptionDescription(description){description&&this.trackCliOption({option:"description",value:this.redactedValue})}trackCliOptionSetResponseHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"set-response-header",value:this.redactedValue})}trackCliOptionAppendResponseHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"append-response-header",value:this.redactedValue})}trackCliOptionDeleteResponseHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"delete-response-header",value:this.redactedValue})}trackCliOptionSetRequestHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"set-request-header",value:this.redactedValue})}trackCliOptionAppendRequestHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"append-request-header",value:this.redactedValue})}trackCliOptionDeleteRequestHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"delete-request-header",value:this.redactedValue})}trackCliOptionSetRequestQuery(params){params&&params.length>0&&this.trackCliOption({option:"set-request-query",value:this.redactedValue})}trackCliOptionAppendRequestQuery(params){params&&params.length>0&&this.trackCliOption({option:"append-request-query",value:this.redactedValue})}trackCliOptionDeleteRequestQuery(params){params&&params.length>0&&this.trackCliOption({option:"delete-request-query",value:this.redactedValue})}trackCliOptionHas(conditions){conditions&&conditions.length>0&&this.trackCliOption({option:"has",value:this.redactedValue})}trackCliOptionMissing(conditions){conditions&&conditions.length>0&&this.trackCliOption({option:"missing",value:this.redactedValue})}trackCliOptionAi(prompt){prompt&&this.trackCliOption({option:"ai",value:this.redactedValue})}trackCliActionType(actionType){this.trackCliOption({option:"action-type",value:actionType})}trackCliFlagHasConditions(hasConditions){hasConditions&&this.trackCliFlag("has-conditions")}trackCliFlagMissingConditions(hasMissingConditions){hasMissingConditions&&this.trackCliFlag("missing-conditions")}trackCliFlagResponseHeaders(hasResponseHeaders){hasResponseHeaders&&this.trackCliFlag("response-headers")}trackCliFlagRequestTransforms(hasRequestTransforms){hasRequestTransforms&&this.trackCliFlag("request-transforms")}},RoutesEditTelemetryClient=class extends TelemetryClient{trackCliArgumentNameOrId(id){id&&this.trackCliArgument({arg:"name-or-id",value:this.redactedValue})}trackCliFlagYes(flag){flag&&this.trackCliFlag("yes")}trackCliFlagNoDest(flag){flag&&this.trackCliFlag("no-dest")}trackCliFlagNoStatus(flag){flag&&this.trackCliFlag("no-status")}trackCliFlagClearConditions(flag){flag&&this.trackCliFlag("clear-conditions")}trackCliFlagClearHeaders(flag){flag&&this.trackCliFlag("clear-headers")}trackCliFlagClearTransforms(flag){flag&&this.trackCliFlag("clear-transforms")}trackCliOptionName(name){name&&this.trackCliOption({option:"name",value:this.redactedValue})}trackCliOptionDescription(desc){desc&&this.trackCliOption({option:"description",value:this.redactedValue})}trackCliOptionSrc(src){src&&this.trackCliOption({option:"src",value:this.redactedValue})}trackCliOptionSrcSyntax(syntax){syntax&&this.trackCliOption({option:"src-syntax",value:syntax})}trackCliOptionAction(action){action&&this.trackCliOption({option:"action",value:action})}trackCliOptionDest(dest){dest&&this.trackCliOption({option:"dest",value:this.redactedValue})}trackCliOptionStatus(status){status!==void 0&&this.trackCliOption({option:"status",value:String(status)})}trackCliOptionSetResponseHeader(h){h&&h.length>0&&this.trackCliOption({option:"set-response-header",value:this.redactedValue})}trackCliOptionAppendResponseHeader(h){h&&h.length>0&&this.trackCliOption({option:"append-response-header",value:this.redactedValue})}trackCliOptionDeleteResponseHeader(h){h&&h.length>0&&this.trackCliOption({option:"delete-response-header",value:this.redactedValue})}trackCliOptionSetRequestHeader(h){h&&h.length>0&&this.trackCliOption({option:"set-request-header",value:this.redactedValue})}trackCliOptionAppendRequestHeader(h){h&&h.length>0&&this.trackCliOption({option:"append-request-header",value:this.redactedValue})}trackCliOptionDeleteRequestHeader(h){h&&h.length>0&&this.trackCliOption({option:"delete-request-header",value:this.redactedValue})}trackCliOptionSetRequestQuery(p){p&&p.length>0&&this.trackCliOption({option:"set-request-query",value:this.redactedValue})}trackCliOptionAppendRequestQuery(p){p&&p.length>0&&this.trackCliOption({option:"append-request-query",value:this.redactedValue})}trackCliOptionDeleteRequestQuery(p){p&&p.length>0&&this.trackCliOption({option:"delete-request-query",value:this.redactedValue})}trackCliOptionHas(conditions){conditions&&conditions.length>0&&this.trackCliOption({option:"has",value:this.redactedValue})}trackCliOptionMissing(conditions){conditions&&conditions.length>0&&this.trackCliOption({option:"missing",value:this.redactedValue})}trackCliOptionAi(prompt){prompt&&this.trackCliOption({option:"ai",value:this.redactedValue})}};export{RoutesTelemetryClient,RoutesAddTelemetryClient,RoutesEditTelemetryClient};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{require_dist2 as require_dist}from"./chunk-7RMCBXBB.js";import{require_frameworks}from"./chunk-KK4AJES5.js";import{__toESM}from"./chunk-6L236MNA.js";var import_frameworks=__toESM(require_frameworks(),1),import_fs_detectors=__toESM(require_dist(),1);import{join}from"path";async function detectProjects(cwd){let fs=new import_fs_detectors.LocalFileSystemDetector(cwd),workspaces=await(0,import_fs_detectors.getWorkspaces)({fs}),detectedProjects=new Map,packagePaths=(await Promise.all(workspaces.map(workspace=>(0,import_fs_detectors.getWorkspacePackagePaths)({fs,workspace})))).flat();return packagePaths.length===0&&packagePaths.push("/"),await Promise.all(packagePaths.map(async p=>{let frameworks=await(0,import_fs_detectors.detectFrameworks)({fs:fs.chdir(join(".",p)),frameworkList:import_frameworks.frameworkList});frameworks.length!==0&&detectedProjects.set(p.slice(1),frameworks)})),detectedProjects}export{detectProjects};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{STANDARD_ENVIRONMENTS}from"./chunk-YV6CTDHR.js";import{require_lib}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var import_title=__toESM(require_lib(),1);function formatEnvironment(orgSlug,projectSlug,environment){let projectUrl=`https://vercel.com/${orgSlug}/${projectSlug}`,boldName=import_chalk.default.bold(STANDARD_ENVIRONMENTS.includes(environment.slug)?(0,import_title.default)(environment.slug):environment.slug);return output_manager_default.link(boldName,`${projectUrl}/settings/environments/${environment.slug}`,{fallback:()=>boldName,color:!1})}export{formatEnvironment};
@@ -0,0 +1,14 @@
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{VERCEL_CONFIG_EXTENSIONS}from"./chunk-QR7QPUFN.js";import{VERCEL_DIR}from"./chunk-M67S3ZNJ.js";import{ConflictingConfigFiles,DeprecatedNowJson}from"./chunk-R2TGGVCT.js";import{require_build_utils}from"./chunk-XFVGX5HG.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_main=__commonJS({"../../node_modules/.pnpm/dotenv@4.0.0/node_modules/dotenv/lib/main.js"(exports,module){"use strict";var fs=__require("fs");function parse(src){var obj={};return src.toString().split(`
8
+ `).forEach(function(line){var keyValueArr=line.match(/^\s*([\w\.\-]+)\s*=\s*(.*)?\s*$/);if(keyValueArr!=null){var key=keyValueArr[1],value=keyValueArr[2]?keyValueArr[2]:"",len=value?value.length:0;len>0&&value.charAt(0)==='"'&&value.charAt(len-1)==='"'&&(value=value.replace(/\\n/gm,`
9
+ `)),value=value.replace(/(^['"]|['"]$)/g,"").trim(),obj[key]=value}}),obj}function config(options){var path=".env",encoding="utf8";options&&(options.path&&(path=options.path),options.encoding&&(encoding=options.encoding));try{var parsedObj=parse(fs.readFileSync(path,{encoding}));return Object.keys(parsedObj).forEach(function(key){process.env[key]=process.env[key]||parsedObj[key]}),{parsed:parsedObj}}catch(e){return{error:e}}}module.exports.config=config;module.exports.load=config;module.exports.parse=parse}});var import_dotenv=__toESM(require_main(),1);import{mkdir,readFile,writeFile,unlink,access}from"fs/promises";import{join,basename}from"path";import{fork}from"child_process";var import_build_utils=__toESM(require_build_utils(),1);function toRouteFormat(item){if("src"in item)return item;let{source,destination,headers,statusCode,permanent,...rest}=item,route={src:source,...rest};return destination&&(route.dest=destination),headers&&(route.headers=Object.fromEntries(headers.map(h=>[h.key,h.value]))),statusCode!==void 0?route.status=statusCode:permanent!==void 0&&(route.status=permanent?308:307),route}function normalizeConfig(config){let normalized={...config},{rewrites,redirects,headers}=normalized,allRoutes=normalized.routes||[],hasRoutes=allRoutes.length>0,hasRewrites=(rewrites?.length??0)>0,hasRedirects=(redirects?.length??0)>0,hasHeaders=(headers?.length??0)>0;function hasRouteFormat(items){return items?.some(item=>"src"in item)??!1}if(hasRoutes&&(hasRewrites||hasRedirects||hasHeaders))return normalized;let shouldConvertRewrites=hasRewrites&&hasRouteFormat(rewrites),shouldConvertRedirects=hasRedirects&&hasRouteFormat(redirects),shouldConvertHeaders=hasHeaders&&hasRouteFormat(headers);if((shouldConvertRewrites||shouldConvertRedirects||shouldConvertHeaders)&&(hasRewrites&&!shouldConvertRewrites||hasRedirects&&!shouldConvertRedirects||hasHeaders&&!shouldConvertHeaders))throw new import_build_utils.NowBuildError({code:"INVALID_VERCEL_CONFIG",message:"Transforms (e.g., requestHeaders) require the `routes` format, which cannot be used alongside `rewrites`, `redirects`, or `headers`. Move everything into the `routes` array instead.",link:"https://vercel.com/docs/projects/project-configuration#routes"});return rewrites&&shouldConvertRewrites&&(allRoutes=[...allRoutes,...rewrites.map(toRouteFormat)],delete normalized.rewrites),redirects&&shouldConvertRedirects&&(allRoutes=[...allRoutes,...redirects.map(toRouteFormat)],delete normalized.redirects),headers&&shouldConvertHeaders&&(allRoutes=[...allRoutes,...headers.map(toRouteFormat)],delete normalized.headers),allRoutes.length>0&&(normalized.routes=allRoutes.map(toRouteFormat)),normalized}async function fileExists(filePath){try{return await access(filePath),!0}catch{return!1}}async function findAllVercelConfigFiles(workPath){let foundFiles=[];for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);await fileExists(configPath)&&foundFiles.push(configPath)}return foundFiles}async function findSourceVercelConfigFile(workPath){for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);if(await fileExists(configPath))return basename(configPath)}let tomlPath=join(workPath,"vercel.toml");return await fileExists(tomlPath)?"vercel.toml":null}async function findVercelConfigFile(workPath){let foundFiles=await findAllVercelConfigFiles(workPath);if(foundFiles.length>1)throw new ConflictingConfigFiles(foundFiles,"Multiple vercel config files found. Please use only one configuration file.","https://vercel.com/docs/projects/project-configuration");return foundFiles[0]||null}function parseConfigLoaderError(stderr){if(!stderr.trim())return"";let moduleNotFoundMatch=stderr.match(/Error \[ERR_MODULE_NOT_FOUND\]: Cannot find package '([^']+)'/);if(moduleNotFoundMatch)return`Cannot find package '${moduleNotFoundMatch[1]}'. Make sure it's installed in your project dependencies.`;let syntaxErrorMatch=stderr.match(/SyntaxError: (.+?)(?:\n|$)/);if(syntaxErrorMatch)return`Syntax error: ${syntaxErrorMatch[1]}`;let errorMatch=stderr.match(/^(?:Error|TypeError|ReferenceError): (.+?)(?:\n|$)/m);return errorMatch?errorMatch[1]:stderr.trim()}async function compileVercelConfig(workPath){let vercelJsonPath=join(workPath,"vercel.json"),nowJsonPath=join(workPath,"now.json"),vercelTomlPath=join(workPath,"vercel.toml"),hasVercelJson=await fileExists(vercelJsonPath),hasNowJson=await fileExists(nowJsonPath),hasVercelToml=await fileExists(vercelTomlPath),vercelConfigPath=await findVercelConfigFile(workPath),vercelDir=join(workPath,VERCEL_DIR),compiledConfigPath=join(vercelDir,"vercel.json");if(hasNowJson)throw new DeprecatedNowJson(nowJsonPath);let foundConfigs=[];if(hasVercelJson&&foundConfigs.push(vercelJsonPath),hasVercelToml&&foundConfigs.push(vercelTomlPath),vercelConfigPath&&foundConfigs.push(vercelConfigPath),foundConfigs.length>1)throw new ConflictingConfigFiles(foundConfigs,`Multiple config files found: ${foundConfigs.map(f=>basename(f)).join(", ")}. Please use only one configuration method.`,"https://vercel.com/docs/projects/project-configuration");if(!vercelConfigPath&&!hasVercelToml)return hasVercelJson?{configPath:vercelJsonPath,wasCompiled:!1}:await fileExists(compiledConfigPath)?{configPath:compiledConfigPath,wasCompiled:!0,sourceFile:await findSourceVercelConfigFile(workPath)??void 0}:{configPath:null,wasCompiled:!1};if(hasVercelToml)try{let{parse:tomlParse}=await import("smol-toml"),tomlContent=await readFile(vercelTomlPath,"utf8"),config=tomlParse(tomlContent),normalizedConfig=normalizeConfig(config);return await mkdir(vercelDir,{recursive:!0}),await writeFile(compiledConfigPath,JSON.stringify(normalizedConfig,null,2),"utf-8"),output_manager_default.debug(`Compiled ${vercelTomlPath} -> ${compiledConfigPath}`),{configPath:compiledConfigPath,wasCompiled:!0,sourceFile:"vercel.toml"}}catch(error){throw new import_build_utils.NowBuildError({code:error.code??"vercel_toml_parse_failed",message:`Failed to parse vercel.toml: ${error.message}`,link:error.link??"https://vercel.com/docs/projects/project-configuration"})}let sourceConfigPath=vercelConfigPath;(0,import_dotenv.config)({path:join(workPath,".env")}),(0,import_dotenv.config)({path:join(workPath,".env.local")});let tempOutPath=join(vercelDir,"vercel-temp.mjs"),loaderPath=join(vercelDir,"vercel-loader.mjs");try{let{build}=await import("esbuild");await mkdir(vercelDir,{recursive:!0}),await build({entryPoints:[sourceConfigPath],bundle:!0,platform:"node",format:"esm",outfile:tempOutPath,packages:"external",target:"node20",sourcemap:"inline"}),await writeFile(loaderPath,`
10
+ import { pathToFileURL } from 'url';
11
+ const configModule = await import(pathToFileURL(process.argv[2]).href);
12
+ const config = ('default' in configModule) ? configModule.default : ('config' in configModule) ? configModule.config : configModule;
13
+ process.send(config);
14
+ `,"utf-8");let config=await new Promise((resolve,reject)=>{let child=fork(loaderPath,[tempOutPath],{execPath:(0,import_build_utils.getNodeExecPath)(),stdio:["pipe","pipe","pipe","ipc"]}),stderrOutput="",stdoutOutput="";child.stderr&&child.stderr.on("data",data=>{stderrOutput+=data.toString()}),child.stdout&&child.stdout.on("data",data=>{stdoutOutput+=data.toString()});let timeout=setTimeout(()=>{child.kill(),reject(new Error("Config loader timed out after 10 seconds"))},1e4);child.on("message",message=>{clearTimeout(timeout),child.kill(),resolve(message)}),child.on("error",err=>{clearTimeout(timeout),reject(err)}),child.on("exit",code=>{if(clearTimeout(timeout),code!==0){stderrOutput.trim()&&output_manager_default.log(stderrOutput),stdoutOutput.trim()&&output_manager_default.log(stdoutOutput);let parsedError=parseConfigLoaderError(stderrOutput);parsedError?reject(new Error(parsedError)):stdoutOutput.trim()?reject(new Error(stdoutOutput.trim())):reject(new Error(`Config loader exited with code ${code}`))}})}),normalizedConfig=normalizeConfig(config);return await writeFile(compiledConfigPath,JSON.stringify(normalizedConfig,null,2),"utf-8"),output_manager_default.debug(`Compiled ${sourceConfigPath} -> ${compiledConfigPath}`),{configPath:compiledConfigPath,wasCompiled:!0,sourceFile:await findSourceVercelConfigFile(workPath)??void 0}}catch(error){throw new import_build_utils.NowBuildError({code:error.code??"vercel_ts_compilation_failed",message:`Failed to compile ${basename(sourceConfigPath)}: ${error.message}`,link:error.link??"https://vercel.com/docs/projects/project-configuration"})}finally{await Promise.all([unlink(tempOutPath).catch(err=>{err.code!=="ENOENT"&&output_manager_default.debug(`Failed to cleanup temp file: ${err}`)}),unlink(loaderPath).catch(err=>{err.code!=="ENOENT"&&output_manager_default.debug(`Failed to cleanup loader file: ${err}`)})])}}async function getVercelConfigPath(workPath){let vercelJsonPath=join(workPath,"vercel.json"),vercelTomlPath=join(workPath,"vercel.toml"),compiledConfigPath=join(workPath,VERCEL_DIR,"vercel.json");return await fileExists(vercelJsonPath)?vercelJsonPath:await fileExists(vercelTomlPath)?vercelTomlPath:await fileExists(compiledConfigPath)?compiledConfigPath:vercelJsonPath}export{require_main,normalizeConfig,findSourceVercelConfigFile,compileVercelConfig,getVercelConfigPath};