@depup/vercel 59.11.7-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 (466) hide show
  1. package/README.md +4 -4
  2. package/changes.json +3 -3
  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-O26N2UPI.js → chunk-CZSOZKHX.js} +1 -9
  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-WEQVJSYS.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-QR7QPUFN.js +7 -0
  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/{pkg-56KRLZ5K.js → chunk-T3GQAMBJ.js} +1 -7
  139. package/dist/chunks/chunk-T52FMXWC.js +7 -0
  140. package/dist/chunks/chunk-TEAQZXCV.js +9 -0
  141. package/dist/chunks/{chunk-2473DUBR.js → chunk-TG2RCYTH.js} +1 -9
  142. package/dist/chunks/chunk-TGVB4DJ4.js +9 -0
  143. package/dist/chunks/chunk-TJCIHDPZ.js +9 -0
  144. package/dist/chunks/{update-route-version-E3V47KNI.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/chunk-XD2LZRBS.js +7 -0
  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 -4918
  269. package/dist/commands/deploy/index.js +43 -2875
  270. package/dist/commands/dev/index.js +56 -23857
  271. package/dist/commands/env/index.js +26 -3411
  272. package/dist/commands/link/index.js +4 -284
  273. package/dist/commands/list/index.js +6 -566
  274. package/dist/commands-bulk.js +1229 -79709
  275. package/dist/help.js +1 -8
  276. package/dist/index.js +19 -2581
  277. package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +6 -0
  278. package/dist/version.mjs +1 -1
  279. package/package.json +58 -55
  280. package/dist/chunks/add-KSJQYR5C.js +0 -196
  281. package/dist/chunks/add-PERLOALD.js +0 -233
  282. package/dist/chunks/add-WU2QYHYL.js +0 -145
  283. package/dist/chunks/build-F3J6FLPD.js +0 -251
  284. package/dist/chunks/chunk-26CU4Q3C.js +0 -598
  285. package/dist/chunks/chunk-2HSQ7YUK.js +0 -93
  286. package/dist/chunks/chunk-2JIX6UMI.js +0 -4626
  287. package/dist/chunks/chunk-2TSBB22D.js +0 -14059
  288. package/dist/chunks/chunk-332LMJLZ.js +0 -16014
  289. package/dist/chunks/chunk-3HZLXCVL.js +0 -137
  290. package/dist/chunks/chunk-3VM7HWF6.js +0 -104
  291. package/dist/chunks/chunk-3ZE5CFVM.js +0 -346
  292. package/dist/chunks/chunk-4IALDGB7.js +0 -22
  293. package/dist/chunks/chunk-4IVSM24H.js +0 -522
  294. package/dist/chunks/chunk-4KD5BYHB.js +0 -127
  295. package/dist/chunks/chunk-57RHXXXG.js +0 -150
  296. package/dist/chunks/chunk-5AJPMLDV.js +0 -28
  297. package/dist/chunks/chunk-5GGUB4EO.js +0 -31
  298. package/dist/chunks/chunk-5NF5HOBJ.js +0 -1854
  299. package/dist/chunks/chunk-6E6KPBXY.js +0 -43
  300. package/dist/chunks/chunk-7KROIXQM.js +0 -59
  301. package/dist/chunks/chunk-7MRDIPJY.js +0 -107
  302. package/dist/chunks/chunk-7Q45OKWR.js +0 -149
  303. package/dist/chunks/chunk-A5JZS6ZN.js +0 -92
  304. package/dist/chunks/chunk-AHU7WNL2.js +0 -24
  305. package/dist/chunks/chunk-AINIBIP4.js +0 -39
  306. package/dist/chunks/chunk-AKLTIZCU.js +0 -46
  307. package/dist/chunks/chunk-ARU7VBKR.js +0 -144
  308. package/dist/chunks/chunk-B5XLQKHI.js +0 -849
  309. package/dist/chunks/chunk-BEQV3X2L.js +0 -86
  310. package/dist/chunks/chunk-C762AAVU.js +0 -137
  311. package/dist/chunks/chunk-CEDN47PH.js +0 -233
  312. package/dist/chunks/chunk-CJV7J7B5.js +0 -314
  313. package/dist/chunks/chunk-CNDPIHY5.js +0 -3490
  314. package/dist/chunks/chunk-CV5YC2EN.js +0 -867
  315. package/dist/chunks/chunk-DBYHS3CK.js +0 -257
  316. package/dist/chunks/chunk-DSTNNQVV.js +0 -253
  317. package/dist/chunks/chunk-DWIC7MRV.js +0 -152
  318. package/dist/chunks/chunk-E336ZXPP.js +0 -43
  319. package/dist/chunks/chunk-EFYMIIER.js +0 -40
  320. package/dist/chunks/chunk-EKPSCRJZ.js +0 -26
  321. package/dist/chunks/chunk-EOZFDJSY.js +0 -18
  322. package/dist/chunks/chunk-EPOLDWRA.js +0 -90
  323. package/dist/chunks/chunk-EZKW5YJ2.js +0 -177
  324. package/dist/chunks/chunk-EZQDYIVB.js +0 -506
  325. package/dist/chunks/chunk-FGDKMNEN.js +0 -21
  326. package/dist/chunks/chunk-FL4JLNT2.js +0 -559
  327. package/dist/chunks/chunk-FRVG4OW3.js +0 -7438
  328. package/dist/chunks/chunk-FVNJTRCE.js +0 -577
  329. package/dist/chunks/chunk-FVT74RZ5.js +0 -1536
  330. package/dist/chunks/chunk-G3PXSXIB.js +0 -18188
  331. package/dist/chunks/chunk-G5FBSUL4.js +0 -822
  332. package/dist/chunks/chunk-GCVXKRR5.js +0 -817
  333. package/dist/chunks/chunk-GGP5R3FU.js +0 -129
  334. package/dist/chunks/chunk-GHKJAK5V.js +0 -1288
  335. package/dist/chunks/chunk-GUU4Z2AQ.js +0 -2099
  336. package/dist/chunks/chunk-GVNCVKCI.js +0 -68
  337. package/dist/chunks/chunk-GY5I4AYD.js +0 -122
  338. package/dist/chunks/chunk-GZLPFESR.js +0 -48
  339. package/dist/chunks/chunk-HB4UKFDO.js +0 -1295
  340. package/dist/chunks/chunk-HRXRELD3.js +0 -338
  341. package/dist/chunks/chunk-IB5L4LKZ.js +0 -1082
  342. package/dist/chunks/chunk-IIMSID24.js +0 -104
  343. package/dist/chunks/chunk-JSD4EZL3.js +0 -34
  344. package/dist/chunks/chunk-K3RED3VO.js +0 -566
  345. package/dist/chunks/chunk-KEKR7OCB.js +0 -140
  346. package/dist/chunks/chunk-KFWQ3EFH.js +0 -151
  347. package/dist/chunks/chunk-KW7BS25T.js +0 -466
  348. package/dist/chunks/chunk-KXDWXXJH.js +0 -70
  349. package/dist/chunks/chunk-MXLA3VQS.js +0 -20
  350. package/dist/chunks/chunk-N4QHMXOO.js +0 -162
  351. package/dist/chunks/chunk-ND5CF2H3.js +0 -53
  352. package/dist/chunks/chunk-NFU4XJIR.js +0 -120
  353. package/dist/chunks/chunk-NSOYO6JQ.js +0 -2399
  354. package/dist/chunks/chunk-NW34PW6V.js +0 -1772
  355. package/dist/chunks/chunk-OAMU5QO6.js +0 -18
  356. package/dist/chunks/chunk-OIH6FP5Y.js +0 -231
  357. package/dist/chunks/chunk-P3SKP5WM.js +0 -27
  358. package/dist/chunks/chunk-P4QNYOFB.js +0 -96
  359. package/dist/chunks/chunk-P7VSBDR4.js +0 -827
  360. package/dist/chunks/chunk-PEC3CQSK.js +0 -90
  361. package/dist/chunks/chunk-PFM75KY3.js +0 -255
  362. package/dist/chunks/chunk-PJXMXMCO.js +0 -81
  363. package/dist/chunks/chunk-PMSMUMUO.js +0 -30
  364. package/dist/chunks/chunk-PNGVSHR3.js +0 -40
  365. package/dist/chunks/chunk-POOO7W47.js +0 -916
  366. package/dist/chunks/chunk-PRWJUY5U.js +0 -848
  367. package/dist/chunks/chunk-Q2DGFCO7.js +0 -579
  368. package/dist/chunks/chunk-QHS645AZ.js +0 -11441
  369. package/dist/chunks/chunk-QKX7WKIN.js +0 -98
  370. package/dist/chunks/chunk-QOPTXV4G.js +0 -417
  371. package/dist/chunks/chunk-RBIFXFZX.js +0 -52
  372. package/dist/chunks/chunk-RN6V5ODW.js +0 -114
  373. package/dist/chunks/chunk-RVBZ64EQ.js +0 -52
  374. package/dist/chunks/chunk-S7KYDPEM.js +0 -1564
  375. package/dist/chunks/chunk-SHFNEZVI.js +0 -49
  376. package/dist/chunks/chunk-SLPSPYVR.js +0 -334
  377. package/dist/chunks/chunk-TGNEG57M.js +0 -1612
  378. package/dist/chunks/chunk-TO7QZGYK.js +0 -105
  379. package/dist/chunks/chunk-TZ2YI2VH.js +0 -87
  380. package/dist/chunks/chunk-UARGTFCT.js +0 -875
  381. package/dist/chunks/chunk-UG2WOB5L.js +0 -150
  382. package/dist/chunks/chunk-V4RMJKQP.js +0 -36
  383. package/dist/chunks/chunk-VGIMO3ZK.js +0 -17
  384. package/dist/chunks/chunk-VP5Y3SZG.js +0 -106
  385. package/dist/chunks/chunk-VT3Z7HF6.js +0 -233
  386. package/dist/chunks/chunk-VUS2JQB2.js +0 -121
  387. package/dist/chunks/chunk-VXYGCOKL.js +0 -28
  388. package/dist/chunks/chunk-VYC45Q4Z.js +0 -1892
  389. package/dist/chunks/chunk-WGGABYO5.js +0 -31
  390. package/dist/chunks/chunk-WL6QYSGD.js +0 -12868
  391. package/dist/chunks/chunk-X7DBBZQD.js +0 -242
  392. package/dist/chunks/chunk-XD4DCYMX.js +0 -61
  393. package/dist/chunks/chunk-XDGOOW3K.js +0 -60
  394. package/dist/chunks/chunk-XFF5TGRA.js +0 -303
  395. package/dist/chunks/chunk-XIFATBH5.js +0 -2914
  396. package/dist/chunks/chunk-XM3LOQIX.js +0 -262
  397. package/dist/chunks/chunk-XNIZGCN5.js +0 -58
  398. package/dist/chunks/chunk-XPJLPUKO.js +0 -117
  399. package/dist/chunks/chunk-XUAWTW4W.js +0 -467
  400. package/dist/chunks/chunk-YPQSDAEW.js +0 -29
  401. package/dist/chunks/chunk-YS76T533.js +0 -270
  402. package/dist/chunks/chunk-Z7JWYFOY.js +0 -58
  403. package/dist/chunks/chunk-ZBEECGFD.js +0 -174
  404. package/dist/chunks/chunk-ZDU2NODC.js +0 -104
  405. package/dist/chunks/chunk-ZW6HETRE.js +0 -97
  406. package/dist/chunks/cjs-DV4RM7XU.js +0 -20743
  407. package/dist/chunks/clear-XUQO4ZTK.js +0 -141
  408. package/dist/chunks/compile-vercel-config-D3ARNHTN.js +0 -33
  409. package/dist/chunks/config-37OAE7QJ.js +0 -127
  410. package/dist/chunks/config-MEDLXUVM.js +0 -168
  411. package/dist/chunks/delete-3N3YZZOF.js +0 -159
  412. package/dist/chunks/delete-VSWDZ2SW.js +0 -226
  413. package/dist/chunks/detect-projects-ODNU4PK2.js +0 -18
  414. package/dist/chunks/detect-services-TESZCQWG.js +0 -40
  415. package/dist/chunks/disable-A4FLFMC7.js +0 -198
  416. package/dist/chunks/discard-CHGFULBZ.js +0 -145
  417. package/dist/chunks/edit-JZ63AJYQ.js +0 -162
  418. package/dist/chunks/edit-MHSYAPDR.js +0 -647
  419. package/dist/chunks/enable-KD46SEC5.js +0 -204
  420. package/dist/chunks/exec-4IPHZ55G.js +0 -1291
  421. package/dist/chunks/export-42QZLBSN.js +0 -177
  422. package/dist/chunks/fetch-proxy-R3JZNXBZ.js +0 -99
  423. package/dist/chunks/image-GP4H73A2.js +0 -75
  424. package/dist/chunks/import-builders-6TBLMPL2.js +0 -39
  425. package/dist/chunks/inspect-5FMWMY3C.js +0 -596
  426. package/dist/chunks/inspect-MUVK6MMT.js +0 -145
  427. package/dist/chunks/inspect-Q3DWW7MC.js +0 -216
  428. package/dist/chunks/inspect-QFXAOUL4.js +0 -175
  429. package/dist/chunks/inspect-RNTSYM6O.js +0 -171
  430. package/dist/chunks/list-IHHIPXEC.js +0 -387
  431. package/dist/chunks/list-JRNWLSO5.js +0 -426
  432. package/dist/chunks/list-XHD5DLEX.js +0 -404
  433. package/dist/chunks/login-PCT6KFWY.js +0 -233
  434. package/dist/chunks/ls-GPEHEFCF.js +0 -210
  435. package/dist/chunks/ls-PF7F4PP4.js +0 -197
  436. package/dist/chunks/ls-PQZ2RIDX.js +0 -188
  437. package/dist/chunks/ls-SVOHC3XW.js +0 -223
  438. package/dist/chunks/ls-TGHCCARZ.js +0 -175
  439. package/dist/chunks/ls-VRIH5WA3.js +0 -183
  440. package/dist/chunks/open-E7DEKYDU.js +0 -116
  441. package/dist/chunks/permissions-JKOONWVL.js +0 -99
  442. package/dist/chunks/publish-EDDELDE5.js +0 -155
  443. package/dist/chunks/pull-646WEVDE.js +0 -45
  444. package/dist/chunks/push-LTNW5OVD.js +0 -191
  445. package/dist/chunks/query-LU4N6KPO.js +0 -725
  446. package/dist/chunks/reorder-22PKJMZP.js +0 -412
  447. package/dist/chunks/reply-SF2EZMVZ.js +0 -176
  448. package/dist/chunks/resolve-ZCZGXTOT.js +0 -237
  449. package/dist/chunks/resolve-deployment-framework-preset-NPE6RLV3.js +0 -36
  450. package/dist/chunks/restore-VJAWZXB4.js +0 -252
  451. package/dist/chunks/rm-KN2QFCKO.js +0 -195
  452. package/dist/chunks/rm-KVEAJPRE.js +0 -147
  453. package/dist/chunks/rm-OSZ5FZUM.js +0 -322
  454. package/dist/chunks/rm-W722Q2AO.js +0 -173
  455. package/dist/chunks/rm-WNPGTUBH.js +0 -148
  456. package/dist/chunks/routes-QVMBXOSX.js +0 -24
  457. package/dist/chunks/rule-inspect-25Z6SNX3.js +0 -285
  458. package/dist/chunks/rules-65LKAQ35.js +0 -89
  459. package/dist/chunks/schema-7D6IGJEJ.js +0 -429
  460. package/dist/chunks/schema-NXCW4M75.js +0 -237
  461. package/dist/chunks/set-FYJVKMPV.js +0 -250
  462. package/dist/chunks/setup-and-link-KXPZE32P.js +0 -65
  463. package/dist/chunks/stamp-AA7R3MZS.js +0 -16
  464. package/dist/chunks/tags-ANIRP5E3.js +0 -69
  465. package/dist/chunks/types-4GAJ7XQQ.js +0 -116
  466. package/dist/chunks/update-UT6CTKVG.js +0 -246
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.11.7 |
17
- | Processed | 2026-09-06 |
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
 
@@ -28,11 +28,11 @@ npm install @depup/vercel
28
28
  | esbuild | 0.27.0 | ^0.28.2 |
29
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
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
@@ -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",
@@ -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-09-06T01:01:07.921Z",
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};
@@ -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{require_dist2,require_minimatch}from"./chunk-7RMCBXBB.js";import{require_semver}from"./chunk-KKS7XWEX.js";import{readJSONFile}from"./chunk-6NVGLVCH.js";import{VERCEL_CONFIG_EXTENSIONS}from"./chunk-QR7QPUFN.js";import{require_execa}from"./chunk-HBFPLBTX.js";import{isNativeBinaryInstall}from"./chunk-7T6TL3GQ.js";import{VERCEL_DIR,require_lib,require_pluralize}from"./chunk-M67S3ZNJ.js";import{CantParseJSONFile,code}from"./chunk-R2TGGVCT.js";import{cmd}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import{require_dist}from"./chunk-QGIQK47P.js";import{pkg_default}from"./chunk-AVSPFBLM.js";import{__commonJS,__export,__require,__toESM}from"./chunk-6L236MNA.js";var require_builtins=__commonJS({"../../node_modules/.pnpm/builtins@1.0.3/node_modules/builtins/builtins.json"(exports,module){module.exports=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]}});var require_validate_npm_package_name=__commonJS({"../../node_modules/.pnpm/validate-npm-package-name@3.0.0/node_modules/validate-npm-package-name/index.js"(exports,module){"use strict";var scopedPackagePattern=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),builtins=require_builtins(),blacklist=["node_modules","favicon.ico"],validate=module.exports=function(name){var warnings=[],errors=[];if(name===null)return errors.push("name cannot be null"),done(warnings,errors);if(name===void 0)return errors.push("name cannot be undefined"),done(warnings,errors);if(typeof name!="string")return errors.push("name must be a string"),done(warnings,errors);if(name.length||errors.push("name length must be greater than zero"),name.match(/^\./)&&errors.push("name cannot start with a period"),name.match(/^_/)&&errors.push("name cannot start with an underscore"),name.trim()!==name&&errors.push("name cannot contain leading or trailing spaces"),blacklist.forEach(function(blacklistedName){name.toLowerCase()===blacklistedName&&errors.push(blacklistedName+" is a blacklisted name")}),builtins.forEach(function(builtin){name.toLowerCase()===builtin&&warnings.push(builtin+" is a core module name")}),name.length>214&&warnings.push("name can no longer contain more than 214 characters"),name.toLowerCase()!==name&&warnings.push("name can no longer contain capital letters"),/[~'!()*]/.test(name.split("/").slice(-1)[0])&&warnings.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(name)!==name){var nameMatch=name.match(scopedPackagePattern);if(nameMatch){var user=nameMatch[1],pkg=nameMatch[2];if(encodeURIComponent(user)===user&&encodeURIComponent(pkg)===pkg)return done(warnings,errors)}errors.push("name can only contain URL-friendly characters")}return done(warnings,errors)};validate.scopedPackagePattern=scopedPackagePattern;var done=function(warnings,errors){var result={validForNewPackages:errors.length===0&&warnings.length===0,validForOldPackages:errors.length===0,warnings,errors};return result.warnings.length||delete result.warnings,result.errors.length||delete result.errors,result}}});var require_git_host_info=__commonJS({"../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/git-host-info.js"(exports,module){"use strict";var gitHosts=module.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(fragment){return"file-"+formatHashFragment(fragment)}}},gitHostDefaults={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:formatHashFragment};Object.keys(gitHosts).forEach(function(name){Object.keys(gitHostDefaults).forEach(function(key){gitHosts[name][key]||(gitHosts[name][key]=gitHostDefaults[key])}),gitHosts[name].protocols_re=RegExp("^("+gitHosts[name].protocols.map(function(protocol){return protocol.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function formatHashFragment(fragment){return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}}});var require_git_host=__commonJS({"../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/git-host.js"(exports,module){"use strict";var gitHosts=require_git_host_info(),extend=Object.assign||function(target,source){if(source===null||typeof source!="object")return target;for(var keys=Object.keys(source),i=keys.length;i--;)target[keys[i]]=source[keys[i]];return target};module.exports=GitHost;function GitHost(type,user,auth,project,committish,defaultRepresentation,opts){var gitHostInfo=this;gitHostInfo.type=type,Object.keys(gitHosts[type]).forEach(function(key){gitHostInfo[key]=gitHosts[type][key]}),gitHostInfo.user=user,gitHostInfo.auth=auth,gitHostInfo.project=project,gitHostInfo.committish=committish,gitHostInfo.default=defaultRepresentation,gitHostInfo.opts=opts||{}}GitHost.prototype.hash=function(){return this.committish?"#"+this.committish:""};GitHost.prototype._fill=function(template,opts){if(template){var vars=extend({},opts);vars.path=vars.path?vars.path.replace(/^[/]+/g,""):"",opts=extend(extend({},this.opts),opts);var self=this;Object.keys(this).forEach(function(key){self[key]!=null&&vars[key]==null&&(vars[key]=self[key])});var rawAuth=vars.auth,rawcommittish=vars.committish,rawFragment=vars.fragment,rawPath=vars.path,rawProject=vars.project;Object.keys(vars).forEach(function(key){var value=vars[key];(key==="path"||key==="project")&&typeof value=="string"?vars[key]=value.split("/").map(function(pathComponent){return encodeURIComponent(pathComponent)}).join("/"):vars[key]=encodeURIComponent(value)}),vars["auth@"]=rawAuth?rawAuth+"@":"",vars["#fragment"]=rawFragment?"#"+this.hashformat(rawFragment):"",vars.fragment=vars.fragment?vars.fragment:"",vars["#path"]=rawPath?"#"+this.hashformat(rawPath):"",vars["/path"]=vars.path?"/"+vars.path:"",vars.projectPath=rawProject.split("/").map(encodeURIComponent).join("/"),opts.noCommittish?(vars["#committish"]="",vars["/tree/committish"]="",vars["/committish"]="",vars.committish=""):(vars["#committish"]=rawcommittish?"#"+rawcommittish:"",vars["/tree/committish"]=vars.committish?"/"+vars.treepath+"/"+vars.committish:"",vars["/committish"]=vars.committish?"/"+vars.committish:"",vars.committish=vars.committish||"master");var res=template;return Object.keys(vars).forEach(function(key){res=res.replace(new RegExp("[{]"+key+"[}]","g"),vars[key])}),opts.noGitPlus?res.replace(/^git[+]/,""):res}};GitHost.prototype.ssh=function(opts){return this._fill(this.sshtemplate,opts)};GitHost.prototype.sshurl=function(opts){return this._fill(this.sshurltemplate,opts)};GitHost.prototype.browse=function(P,F,opts){return typeof P=="string"?(typeof F!="string"&&(opts=F,F=null),this._fill(this.browsefiletemplate,extend({fragment:F,path:P},opts))):this._fill(this.browsetemplate,P)};GitHost.prototype.docs=function(opts){return this._fill(this.docstemplate,opts)};GitHost.prototype.bugs=function(opts){return this._fill(this.bugstemplate,opts)};GitHost.prototype.https=function(opts){return this._fill(this.httpstemplate,opts)};GitHost.prototype.git=function(opts){return this._fill(this.gittemplate,opts)};GitHost.prototype.shortcut=function(opts){return this._fill(this.shortcuttemplate,opts)};GitHost.prototype.path=function(opts){return this._fill(this.pathtemplate,opts)};GitHost.prototype.tarball=function(opts_){var opts=extend({},opts_,{noCommittish:!1});return this._fill(this.tarballtemplate,opts)};GitHost.prototype.file=function(P,opts){return this._fill(this.filetemplate,extend({path:P},opts))};GitHost.prototype.getDefaultRepresentation=function(){return this.default};GitHost.prototype.toString=function(opts){return this.default&&typeof this[this.default]=="function"?this[this.default](opts):this.sshurl(opts)}}});var require_hosted_git_info=__commonJS({"../../node_modules/.pnpm/hosted-git-info@2.8.9/node_modules/hosted-git-info/index.js"(exports,module){"use strict";var url=__require("url"),gitHosts=require_git_host_info(),GitHost=module.exports=require_git_host(),protocolToRepresentationMap={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function protocolToRepresentation(protocol){return protocolToRepresentationMap[protocol]||protocol.slice(0,-1)}var authProtocols={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0},cache={};module.exports.fromUrl=function(giturl,opts){if(typeof giturl=="string"){var key=giturl+JSON.stringify(opts||{});return key in cache||(cache[key]=fromUrl(giturl,opts)),cache[key]}};function fromUrl(giturl,opts){if(!(giturl==null||giturl==="")){var url2=fixupUnqualifiedGist(isGitHubShorthand(giturl)?"github:"+giturl:giturl),parsed=parseGitUrl(url2),shortcutMatch=url2.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),matches=Object.keys(gitHosts).map(function(gitHostName){try{var gitHostInfo=gitHosts[gitHostName],auth=null;parsed.auth&&authProtocols[parsed.protocol]&&(auth=parsed.auth);var committish=parsed.hash?decodeURIComponent(parsed.hash.substr(1)):null,user=null,project=null,defaultRepresentation=null;if(shortcutMatch&&shortcutMatch[1]===gitHostName)user=shortcutMatch[2]&&decodeURIComponent(shortcutMatch[2]),project=decodeURIComponent(shortcutMatch[3].replace(/\.git$/,"")),defaultRepresentation="shortcut";else{if(parsed.host&&parsed.host!==gitHostInfo.domain&&parsed.host.replace(/^www[.]/,"")!==gitHostInfo.domain||!gitHostInfo.protocols_re.test(parsed.protocol)||!parsed.path)return;var pathmatch=gitHostInfo.pathmatch,matched=parsed.path.match(pathmatch);if(!matched)return;matched[1]!==null&&matched[1]!==void 0&&(user=decodeURIComponent(matched[1].replace(/^:/,""))),project=decodeURIComponent(matched[2]),defaultRepresentation=protocolToRepresentation(parsed.protocol)}return new GitHost(gitHostName,user,auth,project,committish,defaultRepresentation,opts)}catch(ex){if(!(ex instanceof URIError))throw ex}}).filter(function(gitHostInfo){return gitHostInfo});if(matches.length===1)return matches[0]}}function isGitHubShorthand(arg){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg)}function fixupUnqualifiedGist(giturl){var parsed=url.parse(giturl);return parsed.protocol==="gist:"&&parsed.host&&!parsed.path?parsed.protocol+"/"+parsed.host:giturl}function parseGitUrl(giturl){var matched=giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!matched){var legacy=url.parse(giturl);if(legacy.auth&&typeof url.URL=="function"){var authmatch=giturl.match(/[^@]+@[^:/]+/);if(authmatch){var whatwg=new url.URL(authmatch[0]);legacy.auth=whatwg.username||"",whatwg.password&&(legacy.auth+=":"+whatwg.password)}}return legacy}return{protocol:"git+ssh:",slashes:!0,auth:matched[1],host:matched[2],port:null,hostname:matched[2],hash:matched[4],search:null,query:null,pathname:"/"+matched[3],path:"/"+matched[3],href:"git+ssh://"+matched[1]+"@"+matched[2]+"/"+matched[3]+(matched[4]||"")}}}});var require_os_tmpdir=__commonJS({"../../node_modules/.pnpm/os-tmpdir@1.0.2/node_modules/os-tmpdir/index.js"(exports,module){"use strict";var isWindows=process.platform==="win32",trailingSlashRe=isWindows?/[^:]\\$/:/.\/$/;module.exports=function(){var path;return isWindows?path=process.env.TEMP||process.env.TMP||(process.env.SystemRoot||process.env.windir)+"\\temp":path=process.env.TMPDIR||process.env.TMP||process.env.TEMP||"/tmp",trailingSlashRe.test(path)&&(path=path.slice(0,-1)),path}}});var require_os_homedir=__commonJS({"../../node_modules/.pnpm/os-homedir@1.0.2/node_modules/os-homedir/index.js"(exports,module){"use strict";var os=__require("os");function homedir(){var env=process.env,home=env.HOME,user=env.LOGNAME||env.USER||env.LNAME||env.USERNAME;return process.platform==="win32"?env.USERPROFILE||env.HOMEDRIVE+env.HOMEPATH||home||null:process.platform==="darwin"?home||(user?"/Users/"+user:null):process.platform==="linux"?home||(process.getuid()===0?"/root":user?"/home/"+user:null):home||null}module.exports=typeof os.homedir=="function"?os.homedir:homedir}});var require_osenv=__commonJS({"../../node_modules/.pnpm/osenv@0.1.5/node_modules/osenv/osenv.js"(exports){var isWindows=process.platform==="win32",path=__require("path"),exec=__require("child_process").exec,osTmpdir=require_os_tmpdir(),osHomedir=require_os_homedir();function memo(key,lookup,fallback){var fell=!1,falling=!1;exports[key]=function(cb){var val=lookup();return!val&&!fell&&!falling&&fallback&&(fell=!0,falling=!0,exec(fallback,function(er,output,stderr){falling=!1,!er&&(val=output.trim())})),exports[key]=function(cb2){return cb2&&process.nextTick(cb2.bind(null,null,val)),val},cb&&!falling&&process.nextTick(cb.bind(null,null,val)),val}}memo("user",function(){return isWindows?process.env.USERDOMAIN+"\\"+process.env.USERNAME:process.env.USER},"whoami");memo("prompt",function(){return isWindows?process.env.PROMPT:process.env.PS1});memo("hostname",function(){return isWindows?process.env.COMPUTERNAME:process.env.HOSTNAME},"hostname");memo("tmpdir",function(){return osTmpdir()});memo("home",function(){return osHomedir()});memo("path",function(){return(process.env.PATH||process.env.Path||process.env.path).split(isWindows?";":":")});memo("editor",function(){return process.env.EDITOR||process.env.VISUAL||(isWindows?"notepad.exe":"vi")});memo("shell",function(){return isWindows?process.env.ComSpec||"cmd":process.env.SHELL||"bash"})}});var require_npa=__commonJS({"../../node_modules/.pnpm/npm-package-arg@6.1.0/node_modules/npm-package-arg/npa.js"(exports,module){"use strict";module.exports=npa2;module.exports.resolve=resolve;module.exports.Result=Result;var url,HostedGit,semver,path,validatePackageName,osenv,isWindows=process.platform==="win32"||global.FAKE_WINDOWS,hasSlashes=isWindows?/\\|[/]/:/[/]/,isURL=/^(?:git[+])?[a-z]+:/i,isFilename=/[.](?:tgz|tar.gz|tar)$/i;function npa2(arg,where){let name,spec;if(typeof arg=="object")return arg instanceof Result&&(!where||where===arg.where)?arg:arg.name&&arg.rawSpec?npa2.resolve(arg.name,arg.rawSpec,where||arg.where):npa2(arg.raw,where||arg.where);let nameEndsAt=arg[0]==="@"?arg.slice(1).indexOf("@")+1:arg.indexOf("@"),namePart=nameEndsAt>0?arg.slice(0,nameEndsAt):arg;return isURL.test(arg)||namePart[0]!=="@"&&(hasSlashes.test(namePart)||isFilename.test(namePart))?spec=arg:nameEndsAt>0?(name=namePart,spec=arg.slice(nameEndsAt+1)):(validatePackageName||(validatePackageName=require_validate_npm_package_name()),validatePackageName(arg).validForOldPackages?name=arg:spec=arg),resolve(name,spec,where,arg)}var isFilespec=isWindows?/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/:/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/;function resolve(name,spec,where,arg){let res=new Result({raw:arg,name,rawSpec:spec,fromArgument:arg!=null});if(name&&res.setName(name),spec&&(isFilespec.test(spec)||/^file:/i.test(spec)))return fromFile(res,where);if(spec&&/^npm:/i.test(spec))return fromAlias(res,where);HostedGit||(HostedGit=require_hosted_git_info());let hosted=HostedGit.fromUrl(spec,{noGitPlus:!0,noCommittish:!0});return hosted?fromHostedGit(res,hosted):spec&&isURL.test(spec)?fromURL(res):spec&&(hasSlashes.test(spec)||isFilename.test(spec))?fromFile(res,where):fromRegistry(res)}function invalidPackageName(name,valid){let err=new Error(`Invalid package name "${name}": ${valid.errors.join("; ")}`);return err.code="EINVALIDPACKAGENAME",err}function invalidTagName(name){let err=new Error(`Invalid tag name "${name}": Tags may not have any characters that encodeURIComponent encodes.`);return err.code="EINVALIDTAGNAME",err}function Result(opts){this.type=opts.type,this.registry=opts.registry,this.where=opts.where,opts.raw==null?this.raw=opts.name?opts.name+"@"+opts.rawSpec:opts.rawSpec:this.raw=opts.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=opts.rawSpec==null?"":opts.rawSpec,this.saveSpec=opts.saveSpec,this.fetchSpec=opts.fetchSpec,opts.name&&this.setName(opts.name),this.gitRange=opts.gitRange,this.gitCommittish=opts.gitCommittish,this.hosted=opts.hosted}Result.prototype={};Result.prototype.setName=function(name){validatePackageName||(validatePackageName=require_validate_npm_package_name());let valid=validatePackageName(name);if(!valid.validForOldPackages)throw invalidPackageName(name,valid);return this.name=name,this.scope=name[0]==="@"?name.slice(0,name.indexOf("/")):void 0,this.escapedName=name.replace("/","%2f"),this};Result.prototype.toString=function(){let full=[];this.name!=null&&this.name!==""&&full.push(this.name);let spec=this.saveSpec||this.fetchSpec||this.rawSpec;return spec!=null&&spec!==""&&full.push(spec),full.length?full.join("@"):this.raw};Result.prototype.toJSON=function(){let result=Object.assign({},this);return delete result.hosted,result};function setGitCommittish(res,committish){return committish!=null&&committish.length>=7&&committish.slice(0,7)==="semver:"?(res.gitRange=decodeURIComponent(committish.slice(7)),res.gitCommittish=null):res.gitCommittish=committish===""?null:committish,res}var isAbsolutePath=/^[/]|^[A-Za-z]:/;function resolvePath(where,spec){return isAbsolutePath.test(spec)?spec:(path||(path=__require("path")),path.resolve(where,spec))}function isAbsolute(dir){return!!(dir[0]==="/"||/^[A-Za-z]:/.test(dir))}function fromFile(res,where){where||(where=process.cwd()),res.type=isFilename.test(res.rawSpec)?"file":"directory",res.where=where;let spec=res.rawSpec.replace(/\\/g,"/").replace(/^file:[/]*([A-Za-z]:)/,"$1").replace(/^file:(?:[/]*([~./]))?/,"$1");return/^~[/]/.test(spec)?(osenv||(osenv=require_osenv()),res.fetchSpec=resolvePath(osenv.home(),spec.slice(2)),res.saveSpec="file:"+spec):(res.fetchSpec=resolvePath(where,spec),isAbsolute(spec)?res.saveSpec="file:"+spec:(path||(path=__require("path")),res.saveSpec="file:"+path.relative(where,res.fetchSpec))),res}function fromHostedGit(res,hosted){return res.type="git",res.hosted=hosted,res.saveSpec=hosted.toString({noGitPlus:!1,noCommittish:!1}),res.fetchSpec=hosted.getDefaultRepresentation()==="shortcut"?null:hosted.toString(),setGitCommittish(res,hosted.committish)}function unsupportedURLType(protocol,spec){let err=new Error(`Unsupported URL Type "${protocol}": ${spec}`);return err.code="EUNSUPPORTEDPROTOCOL",err}function matchGitScp(spec){let matched=spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);return matched&&!matched[1].match(/:[0-9]+\/?.*$/i)&&{fetchSpec:matched[1],gitCommittish:matched[2]==null?null:matched[2]}}function fromURL(res){url||(url=__require("url"));let urlparse=url.parse(res.rawSpec);switch(res.saveSpec=res.rawSpec,urlparse.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":res.type="git";let match=urlparse.protocol==="git+ssh:"&&matchGitScp(res.rawSpec);match?(setGitCommittish(res,match.gitCommittish),res.fetchSpec=match.fetchSpec):(setGitCommittish(res,urlparse.hash!=null?urlparse.hash.slice(1):""),urlparse.protocol=urlparse.protocol.replace(/^git[+]/,""),delete urlparse.hash,res.fetchSpec=url.format(urlparse));break;case"http:":case"https:":res.type="remote",res.fetchSpec=res.saveSpec;break;default:throw unsupportedURLType(urlparse.protocol,res.rawSpec)}return res}function fromAlias(res,where){let subSpec=npa2(res.rawSpec.substr(4),where);if(subSpec.type==="alias")throw new Error("nested aliases not supported");if(!subSpec.registry)throw new Error("aliases only work for registry deps");return res.subSpec=subSpec,res.registry=!0,res.type="alias",res.saveSpec=null,res.fetchSpec=null,res}function fromRegistry(res){res.registry=!0;let spec=res.rawSpec===""?"latest":res.rawSpec;res.saveSpec=null,res.fetchSpec=spec,semver||(semver=require_semver());let version2=semver.valid(spec,!0),range=semver.validRange(spec,!0);if(version2)res.type="version";else if(range)res.type="range";else{if(encodeURIComponent(spec)!==spec)throw invalidTagName(spec);res.type="tag"}return res}}});var require_import_builders=__commonJS({"../../internals/builder-orchestration/dist/import-builders.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export2=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),import_builders_exports={};__export2(import_builders_exports,{createImportBuilders:()=>createImportBuilders2,formatResolvedBuilders:()=>formatResolvedBuilders2,getBuildersDir:()=>getBuildersDir2});module.exports=__toCommonJS(import_builders_exports);var import_npm_package_arg2=__toESM2(require_npa()),import_semver=require_semver(),import_path=__require("path"),import_fs_extra=require_lib(),import_fs_detectors=require_dist2(),import_error_utils=require_dist();function isRemoteBuilderPin(pin){return/^https?:\/\//i.test(pin)}function isBareSpec(parsed){return parsed.type==="tag"&&parsed.rawSpec===""}function formatResolvedBuilders2(builders){return Array.from(builders.values(),b=>b.pkgPath?`${b.pkg.name}@${b.pkg.version}=${(0,import_path.dirname)(b.pkgPath)}`:`${b.pkg.name}=built-in`).join(",")}function pinBuilderSpecs(specs,pins){let pinnedSpecs=new Map;for(let spec of specs){let parsed=(0,import_npm_package_arg2.default)(spec);if(parsed.name&&isBareSpec(parsed)){let version2=pins.get(parsed.name);version2&&pinnedSpecs.set(spec,isRemoteBuilderPin(version2)?version2:`${parsed.name}@${version2}`)}}return pinnedSpecs}function getBuildersDir2(cwd,vercelDir=".vercel"){let override=process.env.VERCEL_BUILDERS_DIR;return override?(0,import_path.isAbsolute)(override)?override:(0,import_path.resolve)(cwd,override):(0,import_path.join)(cwd,vercelDir,"builders")}function createImportBuilders2(dependencies){let{debug,installBuilders:installBuilders2,isNativeBinaryInstall:isNativeBinaryInstall2,require:require2,staticBuilder,vercelDir}=dependencies,builderPins=new Map;for(let[name,version2]of Object.entries(dependencies.builderPins))((0,import_semver.validRange)(version2)||isRemoteBuilderPin(version2))&&builderPins.set(name,version2);let resolveDependencies={builderPins,debug,isNativeBinaryInstall:isNativeBinaryInstall2,require:require2,staticBuilder};return async function(builderSpecs,cwd,span){let buildersDir=getBuildersDir2(cwd,vercelDir),importResult=await resolveBuilders(buildersDir,builderSpecs,resolveDependencies);if("buildersToAdd"in importResult){let{buildersToAdd,installReasons}=importResult,pinnedSpecs=pinBuilderSpecs(buildersToAdd,builderPins),installResult=await installBuilders2(buildersDir,new Set(Array.from(buildersToAdd,spec=>pinnedSpecs.get(spec)??spec)),span,installReasons,pinnedSpecs),allowedPinDriftSpecs=new Set(Array.from(pinnedSpecs.keys()).filter(spec=>installResult.has(spec)));if(importResult=await resolveBuilders(buildersDir,builderSpecs,resolveDependencies,installResult,allowedPinDriftSpecs),"buildersToAdd"in importResult){let{buildersToAdd:failed,installReasons:reasons}=importResult,failures=Array.from(failed,spec=>{let reason=reasons.get(spec);return reason?`${spec} (${reason})`:spec}),err=new Error(`Failed to load Builders after installing them: ${failures.join(", ")}. Retry the build. If the failure persists, contact Vercel Support.`);throw Object.assign(err,{link:"https://vercel.link/builder-dependencies-install-failed"}),err}}let resolvedBuildersDebug=[];for(let[spec,builderSpec]of importResult.builders)resolvedBuildersDebug.push(`${spec} => ${builderSpec.pkg.version}`);return debug(`Resolved builders: "${resolvedBuildersDebug.join(", ")}"`),importResult.builders}}function missingModuleId(err){let id=/Cannot find module '([^']+)'/.exec(err.message)?.[1];if(id&&!(id.startsWith("/")||id.startsWith(".")||/^[A-Za-z]:[\\/]/.test(id)))return id.replace(/[,=]/g,"_").slice(0,100)}async function resolveBuilders(buildersDir,builderSpecs,dependencies,resolvedSpecs,allowedPinDriftSpecs){let builders=new Map,buildersToAdd=new Set,installReasons=new Map;for(let spec of builderSpecs){let resolvedSpec=resolvedSpecs?.get(spec)||spec,parsed=(0,import_npm_package_arg2.default)(resolvedSpec),{name}=parsed;if(!name){buildersToAdd.add(spec),installReasons.set(spec,"url-spec");continue}if((0,import_fs_detectors.isStaticRuntime)(name)){builders.set(name,{builder:dependencies.staticBuilder,pkg:{name},path:"",pkgPath:"",dynamicallyInstalled:!1});continue}let entrypointLoadFailed=!1;try{let pkgPath,builderPkg;try{pkgPath=(0,import_path.join)(buildersDir,"node_modules",name,"package.json"),builderPkg=await(0,import_fs_extra.readJSON)(pkgPath)}catch(error){if(!(0,import_error_utils.isErrnoException)(error)||error.code!=="ENOENT")throw error;if(dependencies.isNativeBinaryInstall()){buildersToAdd.add(spec),installReasons.set(spec,"not-installed");continue}pkgPath=dependencies.require.resolve(`${name}/package.json`),builderPkg=await(0,import_fs_extra.readJSON)(pkgPath)}if(!builderPkg||!pkgPath)throw new Error(`Failed to load \`package.json\` for "${name}"`);if(typeof builderPkg.version!="string")throw new Error(`\`package.json\` for "${name}" does not contain a "version" field`);let peerVersion=dependencies.builderPins.get(name);if(isBareSpec(parsed)&&peerVersion&&(0,import_semver.valid)(peerVersion)&&builderPkg.version!==peerVersion&&!allowedPinDriftSpecs?.has(spec)){dependencies.debug(`Resolved "${name}@${builderPkg.version}" does not match pin "${peerVersion}"`),buildersToAdd.add(spec),installReasons.set(spec,"pin-version-mismatch");continue}if(isBareSpec(parsed)&&peerVersion&&isRemoteBuilderPin(peerVersion)&&pkgPath.startsWith(buildersDir)&&!allowedPinDriftSpecs?.has(spec)){let installedSpec;try{installedSpec=(await(0,import_fs_extra.readJSON)((0,import_path.join)(buildersDir,"package.json"))).dependencies?.[name]}catch(error){if(!(0,import_error_utils.isErrnoException)(error)||error.code!=="ENOENT")throw error}if(installedSpec!==peerVersion){if(dependencies.debug(`Installed source for "${name}@${builderPkg.version}" is "${installedSpec??"unknown"}", not pin "${peerVersion}"`),dependencies.isNativeBinaryInstall()){buildersToAdd.add(spec),installReasons.set(spec,"preview-pack-mismatch");continue}try{pkgPath=dependencies.require.resolve(`${name}/package.json`),builderPkg=await(0,import_fs_extra.readJSON)(pkgPath)}catch(resolveError){if((0,import_error_utils.isErrnoException)(resolveError)&&(resolveError.code==="MODULE_NOT_FOUND"||resolveError.code==="ENOENT")){buildersToAdd.add(spec),installReasons.set(spec,"preview-pack-mismatch");continue}throw resolveError}}}if(!builderPkg||!pkgPath)throw new Error(`Failed to load \`package.json\` for "${name}"`);if(typeof builderPkg.version!="string")throw new Error(`\`package.json\` for "${name}" does not contain a "version" field`);if(parsed.type==="version"&&parsed.rawSpec!==builderPkg.version){dependencies.debug(`Installed version "${name}@${builderPkg.version}" does not match "${parsed.rawSpec}"`),buildersToAdd.add(spec),installReasons.set(spec,"version-mismatch");continue}if(parsed.type==="range"&&!(0,import_semver.satisfies)(builderPkg.version,parsed.rawSpec)){dependencies.debug(`Installed version "${name}@${builderPkg.version}" is not compatible with "${parsed.rawSpec}"`),buildersToAdd.add(spec),installReasons.set(spec,"range-mismatch");continue}let path=(0,import_path.join)((0,import_path.dirname)(pkgPath),builderPkg.main||"index.js"),builder;try{builder=dependencies.require(path)}catch(requireErr){throw entrypointLoadFailed=!0,requireErr}let dynamicallyInstalled=pkgPath.startsWith(buildersDir);builders.set(spec,{builder,pkg:{name,...builderPkg},path,pkgPath,dynamicallyInstalled}),dependencies.debug(`Imported Builder "${name}" from "${(0,import_path.dirname)(pkgPath)}"`)}catch(error){if(!(error instanceof Error))throw error;let err=error;if((err.code==="MODULE_NOT_FOUND"||err.code==="ENOENT")&&!resolvedSpecs)if(dependencies.debug(`Failed to import "${name}": ${err}`),buildersToAdd.add(spec),entrypointLoadFailed){let missing=missingModuleId(err);installReasons.set(spec,missing?`entrypoint-load-failed:${missing}`:"entrypoint-load-failed")}else installReasons.set(spec,"not-installed");else throw err.message=`Importing "${name}": ${err.message}`,err}}return buildersToAdd.size>0?{buildersToAdd,installReasons}:{builders}}}});var require_static_builder=__commonJS({"../../internals/builder-orchestration/dist/static-builder.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export2=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),static_builder_exports2={};__export2(static_builder_exports2,{createStaticBuilder:()=>createStaticBuilder2,version:()=>version2});module.exports=__toCommonJS(static_builder_exports2);var import_minimatch=__toESM2(require_minimatch()),import_build_utils=__require("@vercel/build-utils"),version2=2,ALWAYS_EXCLUDED_PREFIXES=[".git/","node_modules/"],DEFAULT_EXCLUDED_FILES=[".gitignore","package.json","package-lock.json","yarn.lock","pnpm-lock.yaml","bun.lock","bun.lockb","README.md"];function createStaticBuilder2(vercelConfigExtensions){let alwaysExcludedFiles=["vercel.json","vercel.toml",...vercelConfigExtensions.map(ext=>`vercel.${ext}`),".vercelignore","now.json",".nowignore"];return{version:version2,build:async({entrypoint,files,config})=>{let output={},outputDirectory=config.zeroConfig?config.outputDirectory:"";for(let[filename,fileFsRef]of Object.entries(files))if(!(ALWAYS_EXCLUDED_PREFIXES.some(prefix=>filename.startsWith(prefix))||alwaysExcludedFiles.includes(filename)||DEFAULT_EXCLUDED_FILES.includes(filename)||filename.startsWith(".env"))&&!(entrypoint&&!(entrypoint===filename||(0,import_minimatch.default)(filename,entrypoint,{dot:!0})))){if(outputDirectory){let outputMatch=outputDirectory+"/";filename.startsWith(outputMatch)&&(filename=filename.slice(outputMatch.length))}output[filename]=fileFsRef}return{output}},shouldServe:_opts=>{let opts={..._opts},{config:{zeroConfig,outputDirectory}}=opts;return zeroConfig&&outputDirectory&&(opts.entrypoint=`${outputDirectory}/${opts.entrypoint}`,opts.requestPath=`${outputDirectory}/${opts.requestPath}`),(0,import_build_utils.shouldServe)(opts)},diagnostics:async({service})=>({[import_build_utils.MANIFEST_FILENAME]:new import_build_utils.FileBlob({data:JSON.stringify({version:import_build_utils.MANIFEST_VERSION,runtime:"static",buildType:"app",dependencies:[],serviceType:service!==void 0?(0,import_build_utils.getReportedServiceType)(service):void 0})})})}}}});var require_install_builders=__commonJS({"../../internals/builder-orchestration/dist/install-builders.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export2=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),install_builders_exports={};__export2(install_builders_exports,{createInstallBuilders:()=>createInstallBuilders2,getBuildUtilsSpec:()=>getBuildUtilsSpec});module.exports=__toCommonJS(install_builders_exports);var import_url=__require("url"),import_pluralize=__toESM2(require_pluralize()),import_path=__require("path"),import_npm_package_arg2=__toESM2(require_npa()),import_semver=require_semver(),import_fs_extra=require_lib(),import_error_utils=require_dist();function getBuildUtilsSpec(buildUtilsVersion){if(!buildUtilsVersion)return"@vercel/build-utils";if((0,import_semver.validRange)(buildUtilsVersion))return`@vercel/build-utils@${buildUtilsVersion}`;try{if((0,import_npm_package_arg2.default)(buildUtilsVersion).type==="remote")return`@vercel/build-utils@${buildUtilsVersion}`}catch{}return"@vercel/build-utils"}function getErrorMessage(err,execaMessage){return!err||!("stderr"in err)?execaMessage:typeof err.stderr=="string"?err.stderr:execaMessage}async function untracedInstallBuilders(buildersDir,buildersToAdd,dependencies){let{buildUtilsVersion,code:code2,cmd:cmd2,output,readJSONFile:readJSONFile2,run}=dependencies,resolvedSpecs=new Map,buildersPkgPath=(0,import_path.join)(buildersDir,"package.json");try{let emptyPkgJson={private:!0,license:"UNLICENSED"};await(0,import_fs_extra.outputJSON)(buildersPkgPath,emptyPkgJson,{flag:"wx"})}catch(error){if(!(0,import_error_utils.isErrnoException)(error)||error.code!=="EEXIST")throw error}output.log(`Installing ${(0,import_pluralize.default)("Builder",buildersToAdd.size)}: ${Array.from(buildersToAdd).join(", ")}`);let installArgs=["install",getBuildUtilsSpec(buildUtilsVersion),...buildersToAdd];try{let{stderr}=await run("npm",installArgs,{cwd:buildersDir,stdio:"pipe",reject:!0});stderr.split(`/\r?
8
+ /`).filter(line=>line.includes("npm WARN deprecated")).forEach(line=>{output.warn(line)})}catch(err){if((0,import_error_utils.isError)(err)){let execaMessage=err.message,message=getErrorMessage(err,execaMessage);if(execaMessage.startsWith("Command failed with ENOENT"))message=`Please install ${cmd2("npm")} before continuing`;else{let notFoundUrl=/GET (.*) - Not found/.exec(message)?.[1];if(notFoundUrl){let url=new import_url.URL(notFoundUrl),packagePath=decodeURIComponent(url.pathname),packageName=/(@[^/]+\/[^/]+)$/.exec(packagePath)?.[1]??packagePath.split("/").filter(Boolean).at(-1)??packagePath;message=`The package ${code2(packageName)} is not published on the npm registry`}}err.message=message,Object.assign(err,{link:"https://vercel.link/builder-dependencies-install-failed"})}throw err}let nowScopePath=(0,import_path.join)(buildersDir,"node_modules/@now");await(0,import_fs_extra.mkdirp)(nowScopePath);try{await(0,import_fs_extra.symlink)("../@vercel/build-utils",(0,import_path.join)(nowScopePath,"build-utils"))}catch(err){if(!(0,import_error_utils.isErrnoException)(err)||err.code!=="EEXIST")throw err}let buildersPkg=await readJSONFile2(buildersPkgPath);if(dependencies.isCantParseJSONFile(buildersPkg))throw buildersPkg;if(!buildersPkg)throw new Error(`Failed to load "${buildersPkgPath}"`);for(let spec of buildersToAdd)for(let[name,version2]of Object.entries(buildersPkg.dependencies||{}))version2===spec&&(output.debug(`Resolved Builder spec "${spec}" to name "${name}"`),resolvedSpecs.set(spec,name));return resolvedSpecs}function createInstallBuilders2(dependencies){let{output}=dependencies;return async function(buildersDir,buildersToAdd,span,installReasons,pinnedSpecs){let install=async()=>{try{return await untracedInstallBuilders(buildersDir,buildersToAdd,dependencies)}catch(err){if(!pinnedSpecs?.size)throw err;let fallbackSpecs=new Set(Array.from(buildersToAdd,spec=>{for(let[originalSpec,pinnedSpec]of pinnedSpecs)if(pinnedSpec===spec)return originalSpec;return spec}));output.warn("Could not install the Builder versions pinned by this Vercel CLI release. Retrying with versions allowed by your npm settings.");let resolvedSpecs=await untracedInstallBuilders(buildersDir,fallbackSpecs,dependencies);for(let originalSpec of pinnedSpecs.keys())fallbackSpecs.has(originalSpec)&&resolvedSpecs.set(originalSpec,originalSpec);return resolvedSpecs}};if(!span)return install();let attributes={packages:Array.from(buildersToAdd).join(",")};return installReasons&&installReasons.size>0&&(attributes.reasons=Array.from(installReasons).map(([spec,reason])=>`${spec}=${reason}`).join(",")),pinnedSpecs&&pinnedSpecs.size>0&&(attributes.pinned="true",attributes.pinnedPackages=Array.from(pinnedSpecs.values()).join(",")),span.child("vc.installBuilders",attributes).trace(async s=>{try{return await install()}catch(err){throw s.setAttributes({error:(0,import_error_utils.isError)(err)?err.message:String(err)}),err}})}}}});var import_import_builders=__toESM(require_import_builders(),1);var static_builder_exports={};__export(static_builder_exports,{build:()=>build,diagnostics:()=>diagnostics,shouldServe:()=>shouldServe,version:()=>version});var import_static_builder=__toESM(require_static_builder(),1);var{version,build,shouldServe,diagnostics}=(0,import_static_builder.createStaticBuilder)(VERCEL_CONFIG_EXTENSIONS);var import_install_builders=__toESM(require_install_builders(),1);var import_execa=__toESM(require_execa(),1),installBuilders=(0,import_install_builders.createInstallBuilders)({buildUtilsVersion:pkg_default.dependencies?.["@vercel/build-utils"],code,cmd,isCantParseJSONFile:value=>value instanceof CantParseJSONFile,output:output_manager_default,readJSONFile,run:import_execa.default});import{createRequire}from"module";import{brotliDecompress}from"node:zlib";import{promisify}from"node:util";import{readFile}from"node:fs/promises";import{join}from"node:path";var decompress=promisify(brotliDecompress),embeddedGraphs;function defaultGraphPaths(){return[join(__dirname,"builder-graph.json.br"),join(__dirname,"..","builders","builder-graph.json.br")]}async function readDefaultGraph(){let lastError;for(let path of defaultGraphPaths())try{return await readFile(path)}catch(error){lastError=error}throw lastError}function loadEmbeddedBuilderGraphs(readGraph=readDefaultGraph){return embeddedGraphs??=(async()=>{try{let compressed=await readGraph(),graphs=JSON.parse((await decompress(new Uint8Array(compressed))).toString("utf8"));if(graphs.schemaVersion!==1||!graphs.builders||typeof graphs.builders!="object")throw new Error("invalid schema");return graphs}catch(error){throw embeddedGraphs=void 0,new Error("Could not load the embedded vlt Builder graphs.",{cause:error})}})(),embeddedGraphs}var import_npm_package_arg=__toESM(require_npa(),1);function isManagedSpec(spec,managedNames){let parsed=(0,import_npm_package_arg.default)(spec);return!!parsed.name&&managedNames.has(parsed.name)&&parsed.type==="tag"&&(parsed.rawSpec===""||parsed.rawSpec==="latest")}function partitionBuilderSpecs(specs,managedNames){let managed=new Map,legacy=new Set;for(let spec of specs)isManagedSpec(spec,managedNames)?managed.set(spec,(0,import_npm_package_arg.default)(spec).name):legacy.add(spec);return{managed,legacy}}var require_=createRequire(__filename);var legacyImportBuilders=(0,import_import_builders.createImportBuilders)({builderPins:pkg_default.builders??{},debug:message=>output_manager_default.debug(message),installBuilders,isNativeBinaryInstall,require:require_,staticBuilder:static_builder_exports,vercelDir:VERCEL_DIR}),managedBuilderNames=new Set(Object.keys(pkg_default.builders??{}));async function importBuilders(builderSpecs,cwd,span){if(!isNativeBinaryInstall()||process.env.VERCEL_EXPERIMENTAL_VLT_BUILDERS!=="1")return legacyImportBuilders(builderSpecs,cwd,span);let{managed,legacy}=partitionBuilderSpecs(builderSpecs,managedBuilderNames);if(output_manager_default.debug(`Builder import routing: vlt=[${[...managed].map(([spec])=>spec).join(", ")}], legacy=[${[...legacy].join(", ")}]`),managed.size===0)return legacyImportBuilders(legacy,cwd,span);let[{createVltBuilderImporter},graphs]=await Promise.all([import("./vlt-builder-importer-YVCYYRVV.js"),loadEmbeddedBuilderGraphs()]),vltImportBuilders=createVltBuilderImporter({loadGraphs:async()=>graphs,require:require_,debug:message=>output_manager_default.debug(message)}),[vltBuilders,legacyBuilders]=await Promise.all([vltImportBuilders(managed),legacy.size?legacyImportBuilders(legacy,cwd,span):Promise.resolve(new Map)]);return new Map([...vltBuilders,...legacyBuilders])}export{require_npa,import_import_builders,importBuilders};