@vercel/cli-support 65.8.0 → 65.9.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 (310) hide show
  1. package/dist/chunks/add-6YFDZCAK.js +8 -0
  2. package/dist/chunks/add-QDZPCCUD.js +8 -0
  3. package/dist/chunks/add-Z24IIQDY.js +8 -0
  4. package/dist/chunks/build-HLU4YO37.js +7 -0
  5. package/dist/chunks/chunk-2CSCY66I.js +11 -0
  6. package/dist/chunks/{chunk-G7X2TVUO.js → chunk-2DODPQ5J.js} +1 -1
  7. package/dist/chunks/{chunk-FQVSBXRY.js → chunk-2H4DUZJZ.js} +1 -1
  8. package/dist/chunks/{chunk-QTCS2HDX.js → chunk-2JNDJISE.js} +1 -1
  9. package/dist/chunks/{chunk-BLFPDEXE.js → chunk-2JXQWOK5.js} +1 -1
  10. package/dist/chunks/{chunk-44XDCARR.js → chunk-2RXUQ72I.js} +1 -1
  11. package/dist/chunks/{chunk-TSKFDJ77.js → chunk-2TRNHR72.js} +1 -1
  12. package/dist/chunks/{chunk-EZL4AJXH.js → chunk-32AS5X7G.js} +1 -1
  13. package/dist/chunks/chunk-32NXYHYC.js +10 -0
  14. package/dist/chunks/{chunk-OTJNOMRV.js → chunk-375JVQYK.js} +1 -1
  15. package/dist/chunks/{chunk-QR7PY5JS.js → chunk-43P35KUA.js} +1 -1
  16. package/dist/chunks/{chunk-IECNFRTK.js → chunk-4BZ3DNGM.js} +1 -1
  17. package/dist/chunks/chunk-4CQKN5TW.js +10 -0
  18. package/dist/chunks/{chunk-4UIMSZZB.js → chunk-4KM733OB.js} +1 -1
  19. package/dist/chunks/{chunk-GKUHMS3A.js → chunk-4OTI552J.js} +1 -1
  20. package/dist/chunks/{chunk-KARAZGCO.js → chunk-4SJU5QSD.js} +1 -1
  21. package/dist/chunks/{chunk-6KCYUYUM.js → chunk-4VF5BZJP.js} +1 -1
  22. package/dist/chunks/{chunk-P2HBUDGR.js → chunk-4XJVEKTD.js} +1 -1
  23. package/dist/chunks/chunk-4Z3APEBF.js +7 -0
  24. package/dist/chunks/chunk-5CVEW3HD.js +12 -0
  25. package/dist/chunks/{chunk-LFOWP74R.js → chunk-5DXC4TE2.js} +1 -1
  26. package/dist/chunks/{chunk-FNOCIKAU.js → chunk-5K4UTJSY.js} +1 -1
  27. package/dist/chunks/{chunk-62FZFXPJ.js → chunk-5M3WBT3N.js} +1 -1
  28. package/dist/chunks/{constants-JAB7MRSK.js → chunk-5MDNVAE6.js} +1 -1
  29. package/dist/chunks/{chunk-HA2ICIB5.js → chunk-5TI3ZXW3.js} +1 -1
  30. package/dist/chunks/{chunk-3LQ2ADXO.js → chunk-64UCX5JM.js} +1 -1
  31. package/dist/chunks/{chunk-UAUVCOGS.js → chunk-6RCFEJZK.js} +1 -1
  32. package/dist/chunks/chunk-7DM3IJ7L.js +10 -0
  33. package/dist/chunks/chunk-7PGGP2QT.js +10 -0
  34. package/dist/chunks/{chunk-A6F3EE2O.js → chunk-7ULVGK67.js} +1 -1
  35. package/dist/chunks/{chunk-MCP63EVQ.js → chunk-7WY7ASKE.js} +1 -1
  36. package/dist/chunks/{chunk-YTZPQVGF.js → chunk-AUCTNGW2.js} +1 -1
  37. package/dist/chunks/{chunk-LD42X7ZH.js → chunk-AX3V7N44.js} +1 -1
  38. package/dist/chunks/chunk-BRETAWE7.js +10 -0
  39. package/dist/chunks/{chunk-T2SRGJPU.js → chunk-BT5C6MCY.js} +1 -1
  40. package/dist/chunks/{chunk-D3GYYGSS.js → chunk-BWS3ZOHJ.js} +1 -1
  41. package/dist/chunks/{chunk-OV7G6RIQ.js → chunk-BZNRYQ6U.js} +1 -1
  42. package/dist/chunks/{chunk-KDRCBWRY.js → chunk-C6525MLX.js} +1 -1
  43. package/dist/chunks/chunk-CBVVVYUP.js +10 -0
  44. package/dist/chunks/{chunk-KIMIK4SG.js → chunk-CGTD4QFC.js} +1 -1
  45. package/dist/chunks/{chunk-5MHRCRIN.js → chunk-CMHL66LK.js} +1 -1
  46. package/dist/chunks/{chunk-H4DE2OFO.js → chunk-D2JHIOVH.js} +1 -1
  47. package/dist/chunks/{chunk-WRC5CTUD.js → chunk-D4TD2KWH.js} +1 -1
  48. package/dist/chunks/{chunk-XBOGVOV5.js → chunk-D4ZEJM3T.js} +1 -1
  49. package/dist/chunks/{chunk-5O7CRJE5.js → chunk-D6REP5QQ.js} +1 -1
  50. package/dist/chunks/chunk-DASHFOKO.js +8 -0
  51. package/dist/chunks/chunk-DSNIVABS.js +7 -0
  52. package/dist/chunks/{chunk-A67TLHES.js → chunk-DUJAQS7I.js} +1 -1
  53. package/dist/chunks/{chunk-M4TIOVOP.js → chunk-DUPAU76G.js} +1 -1
  54. package/dist/chunks/{chunk-TCEEQLD4.js → chunk-E5CN62HO.js} +1 -1
  55. package/dist/chunks/{chunk-APNR444T.js → chunk-E7DYXF6G.js} +1 -1
  56. package/dist/chunks/{chunk-ZBJ44DRL.js → chunk-EBBDSEEU.js} +1 -1
  57. package/dist/chunks/{chunk-GP5MFCGO.js → chunk-ECQKK4JU.js} +1 -1
  58. package/dist/chunks/chunk-EDOTKQ7L.js +15 -0
  59. package/dist/chunks/{chunk-PY5A73YH.js → chunk-EVH5524J.js} +1 -1
  60. package/dist/chunks/{chunk-LOEU4R4Z.js → chunk-EW62WSXG.js} +1 -1
  61. package/dist/chunks/{chunk-XUJA3RZD.js → chunk-EXLKCL5I.js} +1 -1
  62. package/dist/chunks/{chunk-U3J7VS56.js → chunk-FBYA6LLM.js} +1 -1
  63. package/dist/chunks/{chunk-SOCGBVML.js → chunk-FVVOHGQE.js} +1 -1
  64. package/dist/chunks/{chunk-QLW5DCM4.js → chunk-FWTBSC7Z.js} +1 -1
  65. package/dist/chunks/{chunk-2OET5FWH.js → chunk-G2BNLRPU.js} +1 -1
  66. package/dist/chunks/{chunk-DBV6AB6T.js → chunk-G3LWP5CH.js} +1 -1
  67. package/dist/chunks/{chunk-YIOT5B5Z.js → chunk-G6HUSV7F.js} +1 -1
  68. package/dist/chunks/{chunk-7V2PXIVW.js → chunk-GCPPL24C.js} +1 -1
  69. package/dist/chunks/{chunk-3AXMZRAB.js → chunk-GCXUSXB4.js} +1 -1
  70. package/dist/chunks/{chunk-GZWYJT4C.js → chunk-GHEGWXH2.js} +1 -1
  71. package/dist/chunks/{chunk-JRBPVMQO.js → chunk-GJCVOEC2.js} +1 -1
  72. package/dist/chunks/{chunk-ELQBQ2O5.js → chunk-GN5IAG3M.js} +1 -1
  73. package/dist/chunks/{chunk-HTFQFHPR.js → chunk-H34SGIVS.js} +1 -1
  74. package/dist/chunks/{chunk-O7IYJGOR.js → chunk-IFCMWIRB.js} +1 -1
  75. package/dist/chunks/{pkg-EDJQLCNP.js → chunk-ITQPDXXA.js} +1 -1
  76. package/dist/chunks/{chunk-XK3W6Q5I.js → chunk-IZ4GFKGR.js} +1 -1
  77. package/dist/chunks/{chunk-CJLRNGWY.js → chunk-JMAXX2I6.js} +1 -1
  78. package/dist/chunks/{chunk-V5A4EBV3.js → chunk-JOXGYP5S.js} +1 -1
  79. package/dist/chunks/{chunk-2QSNFVB6.js → chunk-K5YO4UD7.js} +1 -1
  80. package/dist/chunks/{chunk-WZ2R4Z7N.js → chunk-KRPY5FHJ.js} +1 -1
  81. package/dist/chunks/{chunk-7E6UJXLR.js → chunk-KV2DYFUG.js} +1 -1
  82. package/dist/chunks/{chunk-3KSTUMR6.js → chunk-M73W4XNR.js} +1 -1
  83. package/dist/chunks/{chunk-BHJLCFQ4.js → chunk-MXURT5TX.js} +1 -1
  84. package/dist/chunks/chunk-MY4MONOH.js +7 -0
  85. package/dist/chunks/{chunk-SBBD2Q5A.js → chunk-NAU6URTI.js} +1 -1
  86. package/dist/chunks/{chunk-B3ETPBO4.js → chunk-NEUQZYBL.js} +2 -2
  87. package/dist/chunks/{chunk-3P4Y46MS.js → chunk-NIS66BFX.js} +2 -2
  88. package/dist/chunks/{chunk-RIAOB3RF.js → chunk-NNIQPNGP.js} +1 -1
  89. package/dist/chunks/chunk-NTUDWWSL.js +14 -0
  90. package/dist/chunks/{chunk-AEOG4E5G.js → chunk-O4CQRV2G.js} +1 -1
  91. package/dist/chunks/{chunk-QZEZCUUZ.js → chunk-OZPBJWYU.js} +13 -13
  92. package/dist/chunks/chunk-PBX7RJ2K.js +12 -0
  93. package/dist/chunks/{chunk-T3S63EA3.js → chunk-QBOY2CXL.js} +1 -1
  94. package/dist/chunks/{chunk-63DO6KMD.js → chunk-QJAIUZVZ.js} +3 -3
  95. package/dist/chunks/{chunk-JULKMXVP.js → chunk-QKWJN6OE.js} +1 -1
  96. package/dist/chunks/{chunk-37DIJCWK.js → chunk-QQA2OMXJ.js} +1 -1
  97. package/dist/chunks/{chunk-HNOZM6D4.js → chunk-QY5RG6BB.js} +1 -1
  98. package/dist/chunks/{chunk-K2R3QPOC.js → chunk-R5ZLTWKB.js} +1 -1
  99. package/dist/chunks/chunk-RBIHS5QI.js +7 -0
  100. package/dist/chunks/{chunk-T34C75TI.js → chunk-RCUDI7OF.js} +1 -1
  101. package/dist/chunks/{chunk-7EJ3BZ67.js → chunk-RZY54T7B.js} +1 -1
  102. package/dist/chunks/{chunk-3DDEBTCC.js → chunk-SNCQOAFU.js} +1 -1
  103. package/dist/chunks/{chunk-GP2FXUFE.js → chunk-SR2SHYJA.js} +1 -1
  104. package/dist/chunks/{chunk-FXEMEIST.js → chunk-T2FCF46I.js} +1 -1
  105. package/dist/chunks/{chunk-IHRM7L23.js → chunk-T5TOBY4D.js} +1 -1
  106. package/dist/chunks/{chunk-EKB2DYCQ.js → chunk-TCB4XM23.js} +1 -1
  107. package/dist/chunks/{chunk-YRK2BCTJ.js → chunk-TD7AL545.js} +1 -1
  108. package/dist/chunks/{chunk-4MP4HVBG.js → chunk-TGPYWWX3.js} +1 -1
  109. package/dist/chunks/{chunk-6V67VZJD.js → chunk-TMXIVQ45.js} +1 -1
  110. package/dist/chunks/{chunk-J52UJYOK.js → chunk-TRZDIAX3.js} +1 -1
  111. package/dist/chunks/{chunk-7BML2OR6.js → chunk-U6KJOCXX.js} +1 -1
  112. package/dist/chunks/{chunk-Y55DGB3L.js → chunk-UIJYRI3G.js} +1 -1
  113. package/dist/chunks/{chunk-NAXFG37F.js → chunk-UNASHUWQ.js} +1 -1
  114. package/dist/chunks/chunk-UOQGI6CL.js +8 -0
  115. package/dist/chunks/{chunk-753RQ6WV.js → chunk-USYEDO7R.js} +1 -1
  116. package/dist/chunks/{chunk-YKNHA3RN.js → chunk-UVE5COCG.js} +1 -1
  117. package/dist/chunks/{chunk-3RXEJWYM.js → chunk-UZTDRGCW.js} +1 -1
  118. package/dist/chunks/{chunk-F76MNMH3.js → chunk-VR5ROBAO.js} +1 -1
  119. package/dist/chunks/{chunk-JESNVRVR.js → chunk-VRH7LWOC.js} +1 -1
  120. package/dist/chunks/{chunk-QIPUFI6P.js → chunk-VU3RBRDH.js} +1 -1
  121. package/dist/chunks/{chunk-AQA4JVKA.js → chunk-VZKQP67Q.js} +1 -1
  122. package/dist/chunks/{chunk-ZRJKGAUT.js → chunk-W634OFUG.js} +3 -3
  123. package/dist/chunks/{chunk-SKLRHAGH.js → chunk-WFCGAYP5.js} +1 -1
  124. package/dist/chunks/{chunk-5GOQ3FBV.js → chunk-WFOJ2LEA.js} +1 -1
  125. package/dist/chunks/{chunk-KL6HNOFN.js → chunk-WGVIQTOI.js} +1 -1
  126. package/dist/chunks/{chunk-IHNEF3BG.js → chunk-WGWGDC3N.js} +1 -1
  127. package/dist/chunks/{chunk-C4XT3PG4.js → chunk-WKYFWE37.js} +1 -1
  128. package/dist/chunks/{chunk-YHFZIUXF.js → chunk-XBWISZCG.js} +1 -1
  129. package/dist/chunks/chunk-XRIM4BUF.js +7 -0
  130. package/dist/chunks/chunk-Y5YXAXK3.js +13 -0
  131. package/dist/chunks/{chunk-YEPB52XE.js → chunk-Y6WXTTZS.js} +1 -1
  132. package/dist/chunks/{chunk-45UDRX4C.js → chunk-ZBZPCKTW.js} +1 -1
  133. package/dist/chunks/{chunk-KUNFE2M6.js → chunk-ZCXKEZS4.js} +1 -1
  134. package/dist/chunks/{chunk-MDWYXLDB.js → chunk-ZERZX6BZ.js} +3 -3
  135. package/dist/chunks/{chunk-2B7U6BB5.js → chunk-ZGKJLJ47.js} +1 -1
  136. package/dist/chunks/chunk-ZS2WS4AM.js +7 -0
  137. package/dist/chunks/clear-RU72IUXU.js +8 -0
  138. package/dist/chunks/compile-vercel-config-DRTOWZK6.js +7 -0
  139. package/dist/chunks/config-MNRKCDQA.js +7 -0
  140. package/dist/chunks/config-PIFTR3UF.js +8 -0
  141. package/dist/chunks/connect-git-provider-AWEOEEOO.js +7 -0
  142. package/dist/chunks/delete-47BF6SIO.js +9 -0
  143. package/dist/chunks/delete-QNSKEIGO.js +10 -0
  144. package/dist/chunks/{detect-projects-A4H2ZEAP.js → detect-projects-K7SVMH5T.js} +1 -1
  145. package/dist/chunks/detect-services-GXKWIX52.js +7 -0
  146. package/dist/chunks/disable-SBFW3F7B.js +7 -0
  147. package/dist/chunks/discard-DUZR3OWZ.js +14 -0
  148. package/dist/chunks/edit-6BQ7FZC4.js +8 -0
  149. package/dist/chunks/edit-WO7FLNW2.js +9 -0
  150. package/dist/chunks/enable-OK4MR3Z6.js +7 -0
  151. package/dist/chunks/{exec-7LB36K52.js → exec-UV73J2ZB.js} +1 -1
  152. package/dist/chunks/{export-AI2O22W5.js → export-N5F7EY7B.js} +1 -1
  153. package/dist/chunks/future-5AQIYILU.js +7 -0
  154. package/dist/chunks/generate-cert-for-deploy-7ERAHVOV.js +7 -0
  155. package/dist/chunks/image-IRC2NJVA.js +7 -0
  156. package/dist/chunks/import-builders-OAGJKQNW.js +7 -0
  157. package/dist/chunks/{inspect-4A67JORH.js → inspect-35WHAXL2.js} +1 -1
  158. package/dist/chunks/inspect-5FKOSDTK.js +13 -0
  159. package/dist/chunks/inspect-ACNGICEF.js +9 -0
  160. package/dist/chunks/{inspect-3NMNI7GY.js → inspect-GX34WQGR.js} +1 -1
  161. package/dist/chunks/{inspect-OM5S5YQ2.js → inspect-UDUI3ETL.js} +1 -1
  162. package/dist/chunks/{list-NEV4FBTY.js → list-BINT67HQ.js} +1 -1
  163. package/dist/chunks/list-TRFGY6WP.js +12 -0
  164. package/dist/chunks/{list-TUJ7HCQK.js → list-VVND632B.js} +1 -1
  165. package/dist/chunks/login-MYVTOBRG.js +9 -0
  166. package/dist/chunks/login-SOZ5ME3D.js +7 -0
  167. package/dist/chunks/logs-EMAGPMIZ.js +7 -0
  168. package/dist/chunks/{ls-OVM2DZYL.js → ls-2MJY6EKD.js} +1 -1
  169. package/dist/chunks/{ls-CVO4MCX5.js → ls-6HYUGM62.js} +1 -1
  170. package/dist/chunks/{ls-COOTTCRW.js → ls-7OZ5TSNW.js} +1 -1
  171. package/dist/chunks/{ls-UY3KCDSF.js → ls-HTNWWU45.js} +1 -1
  172. package/dist/chunks/ls-KU35N6DP.js +8 -0
  173. package/dist/chunks/ls-WFC636QK.js +11 -0
  174. package/dist/chunks/ls-YT3MWU4U.js +8 -0
  175. package/dist/chunks/mutate-JVDDZLVE.js +9 -0
  176. package/dist/chunks/native-self-update-75UJCHGZ.js +7 -0
  177. package/dist/chunks/notifications-CXDBNBHU.js +7 -0
  178. package/dist/chunks/open-3CD5ZNKU.js +7 -0
  179. package/dist/chunks/openapi-KYC6JIXI.js +7 -0
  180. package/dist/chunks/permissions-PNBST4WN.js +7 -0
  181. package/dist/chunks/{plugin-offer-4YTKDZGS.js → plugin-offer-URT5JNEU.js} +1 -1
  182. package/dist/chunks/prompt-missing-credentials-Q5JCRP3R.js +7 -0
  183. package/dist/chunks/publish-LH5CIXCP.js +15 -0
  184. package/dist/chunks/pull-XLZXPTLS.js +7 -0
  185. package/dist/chunks/purchase-domain-if-available-PDJGZ6MY.js +7 -0
  186. package/dist/chunks/push-XB57XK6H.js +7 -0
  187. package/dist/chunks/{query-NIMDIFLO.js → query-POTX2HYL.js} +1 -1
  188. package/dist/chunks/reauthenticate-CRI4D2BQ.js +7 -0
  189. package/dist/chunks/reorder-KUQ5EQBV.js +10 -0
  190. package/dist/chunks/reply-LO76EKEE.js +9 -0
  191. package/dist/chunks/resolve-KZJYJJLA.js +12 -0
  192. package/dist/chunks/resolve-agent-team-N7QMB7UO.js +7 -0
  193. package/dist/chunks/restore-L3T5KOG7.js +16 -0
  194. package/dist/chunks/rm-7UKXTIZW.js +8 -0
  195. package/dist/chunks/rm-AKKEQN32.js +8 -0
  196. package/dist/chunks/rm-ELC57ULY.js +8 -0
  197. package/dist/chunks/rm-K7XEZ7TY.js +8 -0
  198. package/dist/chunks/rm-MOYCAXNO.js +8 -0
  199. package/dist/chunks/routes-S75L7Z7A.js +7 -0
  200. package/dist/chunks/rule-inspect-ZCS4EBKR.js +8 -0
  201. package/dist/chunks/{schema-44U7GOQE.js → schema-P4T4GQBF.js} +1 -1
  202. package/dist/chunks/schema-TOVLKRPJ.js +14 -0
  203. package/dist/chunks/select-org-6NEM7F25.js +7 -0
  204. package/dist/chunks/set-NXFB6JXG.js +7 -0
  205. package/dist/chunks/setup-and-link-L67MMSUD.js +7 -0
  206. package/dist/chunks/{skills-XOH4Q7KK.js → skills-DZYJV7BE.js} +3 -3
  207. package/dist/chunks/statuspage-45LJ2XYT.js +7 -0
  208. package/dist/chunks/tags-5AV6WAOF.js +7 -0
  209. package/dist/chunks/{types-6W3KAE2A.js → types-YA6BOCRV.js} +1 -1
  210. package/dist/chunks/{update-YLFMSPQF.js → update-YSAO36V7.js} +1 -1
  211. package/dist/chunks/validate-config-XWZ7ZZ3G.js +7 -0
  212. package/dist/commands/build/index.js +1 -6
  213. package/dist/commands/deploy/index.js +14 -14
  214. package/dist/commands/dev/index.js +3 -3
  215. package/dist/commands/env/index.js +1 -1
  216. package/dist/commands/link/index.js +1 -1
  217. package/dist/commands/list/index.js +1 -1
  218. package/dist/commands/project/index.js +1 -1
  219. package/dist/commands-account.js +112 -91
  220. package/dist/commands-ai.js +2 -2
  221. package/dist/commands-blob.js +1 -1
  222. package/dist/commands-core.js +62 -44
  223. package/dist/commands-deployments.js +9 -6
  224. package/dist/commands-flags.js +4 -3
  225. package/dist/commands-integrations.js +98 -74
  226. package/dist/commands-observability.js +5 -5
  227. package/dist/commands-routing.js +154 -162
  228. package/dist/help.js +1 -1
  229. package/dist/index.js +5 -5
  230. package/dist/internal-build.js +1 -1
  231. package/dist/native-download.js +1 -1
  232. package/dist/package.json +58 -59
  233. package/dist/root-help-commands.mjs +1 -1
  234. package/dist/version.mjs +1 -1
  235. package/package.json +51 -52
  236. package/dist/chunks/add-3MWFJH54.js +0 -8
  237. package/dist/chunks/add-CJWCA3MM.js +0 -8
  238. package/dist/chunks/add-GLCVYEEN.js +0 -8
  239. package/dist/chunks/build-6RK6VECG.js +0 -7
  240. package/dist/chunks/chunk-2PYFJXKS.js +0 -14
  241. package/dist/chunks/chunk-5SMV2PPI.js +0 -10
  242. package/dist/chunks/chunk-7A5WO5KA.js +0 -8
  243. package/dist/chunks/chunk-CJHVHB2F.js +0 -8
  244. package/dist/chunks/chunk-EGPVNTKP.js +0 -7
  245. package/dist/chunks/chunk-GJB72ITS.js +0 -12
  246. package/dist/chunks/chunk-H3SJJO6S.js +0 -10
  247. package/dist/chunks/chunk-INH6RXBH.js +0 -9
  248. package/dist/chunks/chunk-IU6PHFPQ.js +0 -7
  249. package/dist/chunks/chunk-KAUKCHQF.js +0 -10
  250. package/dist/chunks/chunk-NDWGYZRT.js +0 -10
  251. package/dist/chunks/chunk-OLAG7Y3P.js +0 -10
  252. package/dist/chunks/chunk-TK2ILW2O.js +0 -21
  253. package/dist/chunks/chunk-WKZ6JSGZ.js +0 -7
  254. package/dist/chunks/chunk-X65XZSWS.js +0 -10
  255. package/dist/chunks/cjs-2SMN43VH.js +0 -54
  256. package/dist/chunks/clear-375VKVXY.js +0 -8
  257. package/dist/chunks/compile-vercel-config-LNRUSKTH.js +0 -7
  258. package/dist/chunks/config-GOYBATSI.js +0 -8
  259. package/dist/chunks/config-VAW454ZH.js +0 -7
  260. package/dist/chunks/connect-git-provider-7KRYVDFS.js +0 -7
  261. package/dist/chunks/delete-3SN6XFOW.js +0 -10
  262. package/dist/chunks/delete-W6BZHLGP.js +0 -9
  263. package/dist/chunks/detect-services-6L57MV5F.js +0 -7
  264. package/dist/chunks/disable-UUV5MYYH.js +0 -7
  265. package/dist/chunks/discard-Y6ZITZ2P.js +0 -14
  266. package/dist/chunks/edit-CVMUITFG.js +0 -9
  267. package/dist/chunks/edit-LLRI57RF.js +0 -8
  268. package/dist/chunks/enable-TFA6XWAA.js +0 -7
  269. package/dist/chunks/future-EZEU2CBY.js +0 -7
  270. package/dist/chunks/generate-cert-for-deploy-QP5BUOJL.js +0 -7
  271. package/dist/chunks/image-YLUF7SHR.js +0 -7
  272. package/dist/chunks/import-builders-ANLKHIYK.js +0 -7
  273. package/dist/chunks/inspect-3TRAN3SP.js +0 -9
  274. package/dist/chunks/inspect-VEUY4QJ2.js +0 -13
  275. package/dist/chunks/list-DJKKVFUL.js +0 -12
  276. package/dist/chunks/login-4HCFKDKL.js +0 -7
  277. package/dist/chunks/login-EPBJQDEK.js +0 -9
  278. package/dist/chunks/logs-Q7XXVFR3.js +0 -7
  279. package/dist/chunks/ls-3TKRCF4T.js +0 -8
  280. package/dist/chunks/ls-LS5J5ERG.js +0 -11
  281. package/dist/chunks/ls-OQQTUQFN.js +0 -8
  282. package/dist/chunks/mutate-I6QWCURL.js +0 -9
  283. package/dist/chunks/notifications-UKC5Z6AH.js +0 -7
  284. package/dist/chunks/open-CYATUDTT.js +0 -7
  285. package/dist/chunks/openapi-B7WSK7AU.js +0 -7
  286. package/dist/chunks/permissions-4ZYPHPOZ.js +0 -7
  287. package/dist/chunks/prompt-missing-credentials-4OKJMYW5.js +0 -7
  288. package/dist/chunks/publish-N6E7VTRK.js +0 -15
  289. package/dist/chunks/pull-LPIT3XUR.js +0 -7
  290. package/dist/chunks/purchase-domain-if-available-IS6UDPJT.js +0 -7
  291. package/dist/chunks/push-ETLU6OCC.js +0 -7
  292. package/dist/chunks/reauthenticate-TESIUM6U.js +0 -7
  293. package/dist/chunks/reorder-PQU2BQEE.js +0 -10
  294. package/dist/chunks/reply-RKDDYV5I.js +0 -9
  295. package/dist/chunks/resolve-ZF7BFXIW.js +0 -12
  296. package/dist/chunks/resolve-agent-team-QSIJ665W.js +0 -7
  297. package/dist/chunks/restore-U5A3BEFQ.js +0 -16
  298. package/dist/chunks/rm-7H5O3T7G.js +0 -8
  299. package/dist/chunks/rm-EPPMQEAV.js +0 -8
  300. package/dist/chunks/rm-FNMW2FPM.js +0 -8
  301. package/dist/chunks/rm-OZIA3DFM.js +0 -8
  302. package/dist/chunks/rm-W3VOR2ED.js +0 -8
  303. package/dist/chunks/routes-BLE5XZJE.js +0 -7
  304. package/dist/chunks/rule-inspect-YAVRRGAP.js +0 -8
  305. package/dist/chunks/schema-6SAZ7T2S.js +0 -14
  306. package/dist/chunks/select-org-L5FJVL5Q.js +0 -7
  307. package/dist/chunks/set-3NQXDGJV.js +0 -7
  308. package/dist/chunks/setup-and-link-H36NRP3A.js +0 -7
  309. package/dist/chunks/tags-CRG27GFL.js +0 -7
  310. /package/dist/chunks/{chunk-OO572JUC.js → chunk-DBT6PGEH.js} +0 -0
@@ -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-CMHL66LK.js";import"./chunk-FVVOHGQE.js";import{resolveRulesProject,resolveRulesTeam}from"./chunk-RZY54T7B.js";import"./chunk-NNIQPNGP.js";import"./chunk-GZNDA6SV.js";import{emitRulesArgParseError,getBodyType,handleRulesApiError,outputRulesError,readRuleBody,rulesCollectionPath}from"./chunk-JMAXX2I6.js";import"./chunk-GHAY4PSD.js";import"./chunk-AX3V7N44.js";import"./chunk-TOTTVS5P.js";import"./chunk-HRR57QNP.js";import"./chunk-PFD7LETF.js";import"./chunk-375JVQYK.js";import{monitorsAddSubcommand}from"./chunk-T5TOBY4D.js";import{printError}from"./chunk-BWS3ZOHJ.js";import"./chunk-DSNIVABS.js";import"./chunk-32NXYHYC.js";import"./chunk-FWTBSC7Z.js";import"./chunk-OZPBJWYU.js";import"./chunk-64UCX5JM.js";import"./chunk-ITQPDXXA.js";import"./chunk-7WY7ASKE.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-CGTD4QFC.js";import"./chunk-F53OKXYI.js";import{validateJsonOutput}from"./chunk-GJCVOEC2.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-T2FCF46I.js";import"./chunk-VRH7LWOC.js";import"./chunk-DBT6PGEH.js";import{output_manager_default}from"./chunk-W634OFUG.js";import"./chunk-BLUPZPAS.js";import"./chunk-ZS2WS4AM.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-RM3ZDRYE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-YPPDRKVC.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BULSRTQE.js";import"./chunk-BRQUZ5NC.js";import"./chunk-D6REP5QQ.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-BZENIQ7N.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 monitor 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 monitors must target one project. Use --project <name-or-id>.");body.ruleScope={type:"all"};return}return outputRulesError(client,jsonOutput,"MISSING_SCOPE","Missing monitor 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,"monitors add"):resolveRulesTeam(client,jsonOutput)}async function add(client,argv,api){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(monitorsAddSubcommand.options))}catch(error){return emitRulesArgParseError(client,error,"monitors add --project <name-or-id> --body <path>"),printError(error),2}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 option: --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 monitor type.");if(Object.hasOwn(body,"ruleScope")&&(flags["--project"]||flags["--all"]))return outputRulesError(client,format.jsonOutput,"SCOPE_CONFLICT","Specify monitor scope either in the body or with --project/--all, not both.");if(type==="custom"&&flags["--all"])return outputRulesError(client,format.jsonOutput,"INVALID_SCOPE","Custom monitors 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 monitor\u2026");try{let response=await client.fetch(rulesCollectionPath(api,scope.teamId),{method:"POST",body});return format.jsonOutput?client.stdout.write(`${JSON.stringify(response,null,2)}
8
+ `):printRuleMutationReceipt("Created",response[api.itemKey],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,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,teamRefBody}from"./chunk-LSF7FY6X.js";import{repositoryPermissionsPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-C6525MLX.js";import{outputError}from"./chunk-AX3V7N44.js";import{require_async_sema}from"./chunk-NZ2TFADV.js";import"./chunk-RCUDI7OF.js";import"./chunk-GD7AV7BO.js";import{permissionsAddSubcommand}from"./chunk-2H4DUZJZ.js";import{printError}from"./chunk-BWS3ZOHJ.js";import"./chunk-DSNIVABS.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-32NXYHYC.js";import"./chunk-FWTBSC7Z.js";import"./chunk-OZPBJWYU.js";import"./chunk-64UCX5JM.js";import"./chunk-ITQPDXXA.js";import"./chunk-7WY7ASKE.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-CGTD4QFC.js";import"./chunk-F53OKXYI.js";import"./chunk-GJCVOEC2.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-T2FCF46I.js";import{packageName}from"./chunk-VRH7LWOC.js";import"./chunk-DBT6PGEH.js";import{output_manager_default}from"./chunk-W634OFUG.js";import"./chunk-BLUPZPAS.js";import"./chunk-ZS2WS4AM.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-RM3ZDRYE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-YPPDRKVC.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BULSRTQE.js";import"./chunk-BRQUZ5NC.js";import"./chunk-D6REP5QQ.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import{__toESM}from"./chunk-BZENIQ7N.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),2}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)"}]},2),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{emitVcrArgParseError,handleVcrApiError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-C6525MLX.js";import{outputError}from"./chunk-AX3V7N44.js";import"./chunk-RCUDI7OF.js";import"./chunk-GD7AV7BO.js";import{addSubcommand}from"./chunk-GCXUSXB4.js";import"./chunk-2H4DUZJZ.js";import"./chunk-ECQKK4JU.js";import"./chunk-JOXGYP5S.js";import{printError}from"./chunk-BWS3ZOHJ.js";import"./chunk-DSNIVABS.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-32NXYHYC.js";import"./chunk-FWTBSC7Z.js";import"./chunk-OZPBJWYU.js";import"./chunk-64UCX5JM.js";import"./chunk-ITQPDXXA.js";import"./chunk-7WY7ASKE.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-CGTD4QFC.js";import"./chunk-F53OKXYI.js";import"./chunk-GJCVOEC2.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-T2FCF46I.js";import{packageName}from"./chunk-VRH7LWOC.js";import"./chunk-DBT6PGEH.js";import{output_manager_default}from"./chunk-W634OFUG.js";import"./chunk-BLUPZPAS.js";import"./chunk-ZS2WS4AM.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-RM3ZDRYE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-YPPDRKVC.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BULSRTQE.js";import"./chunk-BRQUZ5NC.js";import"./chunk-D6REP5QQ.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-BZENIQ7N.js";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(addSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr create <name> --project <name-or-id>"),printError(err),2}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 create <name>`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr create <name>"),when:"Replace <name> with the repository name to create"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS","Usage: `vercel vcr create <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,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-C6525MLX.js";import{outputError}from"./chunk-AX3V7N44.js";import"./chunk-RCUDI7OF.js";import"./chunk-GD7AV7BO.js";import{buildSubcommand}from"./chunk-GCXUSXB4.js";import"./chunk-2H4DUZJZ.js";import"./chunk-ECQKK4JU.js";import"./chunk-JOXGYP5S.js";import{printError}from"./chunk-BWS3ZOHJ.js";import"./chunk-DSNIVABS.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-32NXYHYC.js";import"./chunk-FWTBSC7Z.js";import"./chunk-OZPBJWYU.js";import"./chunk-64UCX5JM.js";import"./chunk-ITQPDXXA.js";import"./chunk-7WY7ASKE.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-CGTD4QFC.js";import"./chunk-F53OKXYI.js";import"./chunk-GJCVOEC2.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4SAVH3H7.js";import"./chunk-T2FCF46I.js";import"./chunk-VRH7LWOC.js";import"./chunk-DBT6PGEH.js";import{output_manager_default}from"./chunk-W634OFUG.js";import"./chunk-BLUPZPAS.js";import"./chunk-ZS2WS4AM.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-RM3ZDRYE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-YPPDRKVC.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BULSRTQE.js";import"./chunk-BRQUZ5NC.js";import"./chunk-D6REP5QQ.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-BZENIQ7N.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),2}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"}]},2),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},2),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},2),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,11 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{AGENT_REASON,writeActionRequired}from"./chunk-32NXYHYC.js";import{output_manager_default}from"./chunk-W634OFUG.js";function isNonProductionTarget(target){return!!target&&target!=="production"}async function hasDeployment(client,org,projectId){let{deployments}=await client.fetch(`/v6/deployments?projectId=${encodeURIComponent(projectId)}&limit=1`,{accountId:org.id});return deployments.length>0}async function hasEarlierDeployment(client,org,projectId,listedDeployments){if(listedDeployments?.length)return!0;try{return await hasDeployment(client,org,projectId)}catch(err){return output_manager_default.debug(`Couldn't check the project for earlier deployments: ${err}`),!0}}function refuseFirstDeployment(client,{target,newProject,prodCommand,prepareCommands=[]}){let environment=target==="preview"?"Preview":target,cause=newProject?"This deploy would create a new project":"This project has no deployments yet",recovery=prepareCommands.length?"pull its Production settings, build again with --prod, then retry with --prod":"retry with --prod",message=`Can't create a ${environment} deployment. ${cause}, and a project's first deployment is assigned to Production. To deploy to Production, ${recovery}. Later deployments can use --environment ${target}.`,note=prodCommand.note?`; ${prodCommand.note}`:"",steps=prepareCommands.length?[...prepareCommands,{command:prodCommand.command,action:`deploy the build to Production${note}`}]:[{command:prodCommand.command,action:`deploy to Production instead${note}`}];return client.nonInteractive&&writeActionRequired(client,{status:"action_required",reason:AGENT_REASON.FIRST_DEPLOYMENT_PRODUCTION,message,userActionRequired:!0,hint:"Ask the user before deploying to Production.",next:steps.map((step,i)=>({command:step.command,when:i===0?`Only after the user approves: ${step.action}`:`Then ${step.action}`}))}),output_manager_default.error(`${message}
8
+
9
+ ${steps.map((step,i)=>`${i===0?"To":"Then"} ${step.action}:
10
+ ${step.command}`).join(`
11
+ `)}`),1}export{isNonProductionTarget,hasDeployment,hasEarlierDeployment,refuseFirstDeployment};
@@ -4,4 +4,4 @@ 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{require_minimatch}from"./chunk-3P4Y46MS.js";import{pullEnvRecords}from"./chunk-PY5A73YH.js";import{js_yaml_default}from"./chunk-V6Y6UK6B.js";import{output_manager_default}from"./chunk-ZRJKGAUT.js";import{__toESM}from"./chunk-BZENIQ7N.js";var INTEGRATIONS_POLL_INTERVAL_MS=5e3,INTEGRATIONS_POLL_TIMEOUT_MS=3*60*1e3;async function fetchDeploymentBuildEnv(client,deploymentId,{quiet=!1}={}){let deadline=Date.now()+INTEGRATIONS_POLL_TIMEOUT_MS,isPolling=!1;for(;Date.now()<deadline;)try{return await pullEnvRecords(client,deploymentId,"vercel-cli:pull")}catch(err){if(err&&typeof err=="object"&&"integrationsStatus"in err&&err.integrationsStatus==="pending"){!isPolling&&!quiet&&(output_manager_default.spinner("Waiting for deployment integrations to finish provisioning..."),isPolling=!0),await new Promise(resolve=>setTimeout(resolve,INTEGRATIONS_POLL_INTERVAL_MS));continue}throw err}throw new Error("Timed out waiting for deployment integrations to complete provisioning.")}import{existsSync,readFileSync}from"node:fs";import{dirname,join,parse,relative}from"node:path";var import_minimatch=__toESM(require_minimatch(),1);function findWorkspaceRootCandidates(startDir){let{root}=parse(startDir),candidates=[],dir=startDir;for(let i=0;i<64;i++){let type=workspaceTypeOf(dir);if(type&&candidates.unshift({dir,type}),dir===root)break;let parent=dirname(dir);if(parent===dir)break;dir=parent}return candidates}function workspaceTypeOf(dir){if(existsSync(join(dir,"pnpm-workspace.yaml")))return"pnpm";let pkgPath=join(dir,"package.json");if(existsSync(pkgPath))try{let pkg=JSON.parse(readFileSync(pkgPath,"utf8")),{workspaces}=pkg;if(Array.isArray(workspaces)&&workspaces.length>0||workspaces&&typeof workspaces=="object"&&Array.isArray(workspaces.packages)&&workspaces.packages.length>0)return"npm"}catch{}return null}function readWorkspacePatterns(candidate){try{if(candidate.type==="pnpm"){let packages2=js_yaml_default.load(readFileSync(join(candidate.dir,"pnpm-workspace.yaml"),"utf8"))?.packages;return Array.isArray(packages2)?packages2.filter(p=>typeof p=="string"):null}let pkg=JSON.parse(readFileSync(join(candidate.dir,"package.json"),"utf8")),{workspaces}=pkg,packages=Array.isArray(workspaces)?workspaces:workspaces?.packages;return Array.isArray(packages)?packages.filter(p=>typeof p=="string"):null}catch{return null}}function workspaceClaims(candidate,memberDir){let rel=normalizeRelative(relative(candidate.dir,memberDir));if(rel==="")return!1;let patterns=readWorkspacePatterns(candidate);if(!patterns||patterns.length===0)return!1;let positives=[],negatives=[];for(let pattern of patterns)pattern.startsWith("!")?negatives.push(normalizeRelative(pattern.slice(1))):positives.push(normalizeRelative(pattern));let matches=pattern=>(0,import_minimatch.default)(rel,pattern,{dot:!1});return!positives.some(matches)||negatives.some(matches)?!1:existsSync(join(memberDir,"package.json"))}function resolvePerDirectoryLinkRoot(anchorDir,rootDirectorySetting){let repoRoot=anchorDir;for(let candidate of findWorkspaceRootCandidates(anchorDir))if(workspaceClaims(candidate,anchorDir)){repoRoot=candidate.dir;break}let linkLocation=normalizeRelative(relative(repoRoot,anchorDir));if(linkLocation==="")return{repoRoot,resolvedRootDirectory:""};let setting=normalizeRelative(rootDirectorySetting??"");return setting===""?{repoRoot,resolvedRootDirectory:linkLocation}:existsSync(join(anchorDir,setting))?{repoRoot,resolvedRootDirectory:normalizeRelative(relative(repoRoot,join(anchorDir,setting)))}:{repoRoot,resolvedRootDirectory:linkLocation,advisory:`Ignoring "rootDirectory" setting "${setting}" for the project linked in "${anchorDir}": "${join(anchorDir,setting)}" does not exist, so the build will use the linked directory "${linkLocation}" instead. Remove the "rootDirectory" setting, or configure it at the repository root.`}}function normalizeRelative(p){let normalized=p.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"");return normalized==="."?"":normalized}export{fetchDeploymentBuildEnv,resolvePerDirectoryLinkRoot};
7
+ import{require_minimatch}from"./chunk-NIS66BFX.js";import{pullEnvRecords}from"./chunk-EVH5524J.js";import{js_yaml_default}from"./chunk-V6Y6UK6B.js";import{output_manager_default}from"./chunk-W634OFUG.js";import{__toESM}from"./chunk-BZENIQ7N.js";var INTEGRATIONS_POLL_INTERVAL_MS=5e3,INTEGRATIONS_POLL_TIMEOUT_MS=3*60*1e3;async function fetchDeploymentBuildEnv(client,deploymentId,{quiet=!1}={}){let deadline=Date.now()+INTEGRATIONS_POLL_TIMEOUT_MS,isPolling=!1;for(;Date.now()<deadline;)try{return await pullEnvRecords(client,deploymentId,"vercel-cli:pull")}catch(err){if(err&&typeof err=="object"&&"integrationsStatus"in err&&err.integrationsStatus==="pending"){!isPolling&&!quiet&&(output_manager_default.spinner("Waiting for deployment integrations to finish provisioning..."),isPolling=!0),await new Promise(resolve=>setTimeout(resolve,INTEGRATIONS_POLL_INTERVAL_MS));continue}throw err}throw new Error("Timed out waiting for deployment integrations to complete provisioning.")}import{existsSync,readFileSync}from"node:fs";import{dirname,join,parse,relative}from"node:path";var import_minimatch=__toESM(require_minimatch(),1);function findWorkspaceRootCandidates(startDir){let{root}=parse(startDir),candidates=[],dir=startDir;for(let i=0;i<64;i++){let type=workspaceTypeOf(dir);if(type&&candidates.unshift({dir,type}),dir===root)break;let parent=dirname(dir);if(parent===dir)break;dir=parent}return candidates}function workspaceTypeOf(dir){if(existsSync(join(dir,"pnpm-workspace.yaml")))return"pnpm";let pkgPath=join(dir,"package.json");if(existsSync(pkgPath))try{let pkg=JSON.parse(readFileSync(pkgPath,"utf8")),{workspaces}=pkg;if(Array.isArray(workspaces)&&workspaces.length>0||workspaces&&typeof workspaces=="object"&&Array.isArray(workspaces.packages)&&workspaces.packages.length>0)return"npm"}catch{}return null}function readWorkspacePatterns(candidate){try{if(candidate.type==="pnpm"){let packages2=js_yaml_default.load(readFileSync(join(candidate.dir,"pnpm-workspace.yaml"),"utf8"))?.packages;return Array.isArray(packages2)?packages2.filter(p=>typeof p=="string"):null}let pkg=JSON.parse(readFileSync(join(candidate.dir,"package.json"),"utf8")),{workspaces}=pkg,packages=Array.isArray(workspaces)?workspaces:workspaces?.packages;return Array.isArray(packages)?packages.filter(p=>typeof p=="string"):null}catch{return null}}function workspaceClaims(candidate,memberDir){let rel=normalizeRelative(relative(candidate.dir,memberDir));if(rel==="")return!1;let patterns=readWorkspacePatterns(candidate);if(!patterns||patterns.length===0)return!1;let positives=[],negatives=[];for(let pattern of patterns)pattern.startsWith("!")?negatives.push(normalizeRelative(pattern.slice(1))):positives.push(normalizeRelative(pattern));let matches=pattern=>(0,import_minimatch.default)(rel,pattern,{dot:!1});return!positives.some(matches)||negatives.some(matches)?!1:existsSync(join(memberDir,"package.json"))}function resolvePerDirectoryLinkRoot(anchorDir,rootDirectorySetting){let repoRoot=anchorDir;for(let candidate of findWorkspaceRootCandidates(anchorDir))if(workspaceClaims(candidate,anchorDir)){repoRoot=candidate.dir;break}let linkLocation=normalizeRelative(relative(repoRoot,anchorDir));if(linkLocation==="")return{repoRoot,resolvedRootDirectory:""};let setting=normalizeRelative(rootDirectorySetting??"");return setting===""?{repoRoot,resolvedRootDirectory:linkLocation}:existsSync(join(anchorDir,setting))?{repoRoot,resolvedRootDirectory:normalizeRelative(relative(repoRoot,join(anchorDir,setting)))}:{repoRoot,resolvedRootDirectory:linkLocation,advisory:`Ignoring "rootDirectory" setting "${setting}" for the project linked in "${anchorDir}": "${join(anchorDir,setting)}" does not exist, so the build will use the linked directory "${linkLocation}" instead. Remove the "rootDirectory" setting, or configure it at the repository root.`}}function normalizeRelative(p){let normalized=p.replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"");return normalized==="."?"":normalized}export{fetchDeploymentBuildEnv,resolvePerDirectoryLinkRoot};
@@ -4,4 +4,4 @@ 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{packageName}from"./chunk-JESNVRVR.js";import{formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-YPPDRKVC.js";var PERMISSIONS_ACTIONS={ls:["ls","list"],add:["add"],rm:["rm","remove"],clear:["clear"]},projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (default: linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Show the next page using the cursor from the previous output",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},permissionsLsSubcommand={name:"ls",aliases:["list"],description:"List teams with access to a repository",arguments:[],options:[projectScopeOption,{...limitOption,description:"Number of results to return per page (default: 100, max: 100)"},nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List teams with access to a repository",value:`${packageName} vcr permissions my-app ls`},{name:"List teams with access as JSON",value:`${packageName} vcr permissions my-app ls --json`}]},permissionsAddSubcommand={name:"add",aliases:[],description:"Give one or more teams access to pull images from a repository",arguments:[{name:"team",required:!0,multiple:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Share a repository with a team by id",value:`${packageName} vcr permissions my-app add team_1a2b3c4d`},{name:"Share a repository with a team by slug",value:`${packageName} vcr permissions my-app add my-team`},{name:"Share a repository with multiple teams",value:`${packageName} vcr permissions my-app add team_1a2b3c4d,other-team`}]},permissionsRmSubcommand={name:"remove",aliases:["rm"],description:"Remove one or more teams' access to a repository",arguments:[{name:"team",required:!0,multiple:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Remove a team's access by id",value:`${packageName} vcr permissions my-app remove team_1a2b3c4d`},{name:"Remove multiple teams' access",value:`${packageName} vcr permissions my-app remove team_1a2b3c4d,other-team`}]},permissionsClearSubcommand={name:"clear",aliases:[],description:"Remove access to a repository for every team",arguments:[],options:[projectScopeOption,yesOption,formatOption,jsonOption],examples:[{name:"Clear all repository permissions",value:`${packageName} vcr permissions my-app clear`},{name:"Clear all repository permissions without the confirmation prompt",value:`${packageName} vcr permissions my-app clear --yes`}]},permissionsAggregateCommand={name:"permissions",aliases:["permission"],argumentsBeforeSubcommand:!0,description:"Manage which teams can pull images from a container registry repository",arguments:[{name:"repository",required:!0}],subcommands:[permissionsLsSubcommand,permissionsAddSubcommand,permissionsRmSubcommand,permissionsClearSubcommand],options:[],examples:[{name:"List teams with access to a repository",value:`${packageName} vcr permissions my-app ls`},{name:"Share a repository with a team",value:`${packageName} vcr permissions my-app add team_1a2b3c4d`},{name:"Remove a team's access to a repository",value:`${packageName} vcr permissions my-app remove team_1a2b3c4d`},{name:"Clear all repository permissions",value:`${packageName} vcr permissions my-app clear`}]};export{PERMISSIONS_ACTIONS,permissionsLsSubcommand,permissionsAddSubcommand,permissionsRmSubcommand,permissionsClearSubcommand,permissionsAggregateCommand};
7
+ import{packageName}from"./chunk-VRH7LWOC.js";import{formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-YPPDRKVC.js";var PERMISSIONS_ACTIONS={ls:["ls","list"],add:["add"],rm:["rm","remove"],clear:["clear"]},projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (default: linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Show the next page using the cursor from the previous output",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},permissionsLsSubcommand={name:"ls",aliases:["list"],description:"List teams with access to a repository",arguments:[],options:[projectScopeOption,{...limitOption,description:"Number of results to return per page (default: 100, max: 100)"},nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List teams with access to a repository",value:`${packageName} vcr permissions my-app ls`},{name:"List teams with access as JSON",value:`${packageName} vcr permissions my-app ls --json`}]},permissionsAddSubcommand={name:"add",aliases:[],description:"Give one or more teams access to pull images from a repository",arguments:[{name:"team",required:!0,multiple:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Share a repository with a team by id",value:`${packageName} vcr permissions my-app add team_1a2b3c4d`},{name:"Share a repository with a team by slug",value:`${packageName} vcr permissions my-app add my-team`},{name:"Share a repository with multiple teams",value:`${packageName} vcr permissions my-app add team_1a2b3c4d,other-team`}]},permissionsRmSubcommand={name:"remove",aliases:["rm"],description:"Remove one or more teams' access to a repository",arguments:[{name:"team",required:!0,multiple:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Remove a team's access by id",value:`${packageName} vcr permissions my-app remove team_1a2b3c4d`},{name:"Remove multiple teams' access",value:`${packageName} vcr permissions my-app remove team_1a2b3c4d,other-team`}]},permissionsClearSubcommand={name:"clear",aliases:[],description:"Remove access to a repository for every team",arguments:[],options:[projectScopeOption,yesOption,formatOption,jsonOption],examples:[{name:"Clear all repository permissions",value:`${packageName} vcr permissions my-app clear`},{name:"Clear all repository permissions without the confirmation prompt",value:`${packageName} vcr permissions my-app clear --yes`}]},permissionsAggregateCommand={name:"permissions",aliases:["permission"],argumentsBeforeSubcommand:!0,description:"Manage which teams can pull images from a container registry repository",arguments:[{name:"repository",required:!0}],subcommands:[permissionsLsSubcommand,permissionsAddSubcommand,permissionsRmSubcommand,permissionsClearSubcommand],options:[],examples:[{name:"List teams with access to a repository",value:`${packageName} vcr permissions my-app ls`},{name:"Share a repository with a team",value:`${packageName} vcr permissions my-app add team_1a2b3c4d`},{name:"Remove a team's access to a repository",value:`${packageName} vcr permissions my-app remove team_1a2b3c4d`},{name:"Clear all repository permissions",value:`${packageName} vcr permissions my-app clear`}]};export{PERMISSIONS_ACTIONS,permissionsLsSubcommand,permissionsAddSubcommand,permissionsRmSubcommand,permissionsClearSubcommand,permissionsAggregateCommand};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{require_dist as require_dist2,validateConfig}from"./chunk-EGPVNTKP.js";import{require_dist2 as require_dist}from"./chunk-3P4Y46MS.js";import{compileVercelConfig,findSourceVercelConfigFile}from"./chunk-BHJLCFQ4.js";import{applyEdits,findNodeAtLocation,init_main,modify,parse,parseTree}from"./chunk-J24BABG4.js";import{init_dist,stringify}from"./chunk-U4Z2MMOF.js";import{printAlignedLabel}from"./chunk-3LQ2ADXO.js";import{code}from"./chunk-FXEMEIST.js";import{link_default,output_manager_default,require_build_utils}from"./chunk-ZRJKGAUT.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);init_main();init_dist();var import_build_utils=__toESM(require_build_utils(),1),import_fs_detectors=__toESM(require_dist(),1),import_service_topology=__toESM(require_dist2(),1);import{readFile,writeFile}from"fs/promises";import{basename}from"path";var EXPERIMENTAL_SERVICES_DOCS_URL="https://vercel.com/docs/services/experimental";async function prepareExperimentalServicesMigration(cwd,detectServicesResult){let compileResult=await compileVercelConfig(cwd);if(!compileResult.configPath)return null;let rawConfig=await readFile(compileResult.configPath,"utf8"),config=parse(rawConfig);if(!config||!(0,import_service_topology.hasLegacyServicesConfig)(config))return null;let resolvedServices=detectServicesResult?.resolved?.source==="configured"?detectServicesResult.services.filter(s=>(0,import_build_utils.isExperimentalService)(s)):void 0,plan=await(0,import_service_topology.migrateExperimentalServices)({fs:new import_fs_detectors.LocalFileSystemDetector(cwd),config,resolvedServices:resolvedServices&&resolvedServices.length>0?resolvedServices:void 0}),sourceFile=compileResult.sourceFile??basename(compileResult.configPath),preparation={plan,sourceFile,snippet:renderSnippet(sourceFile,plan)};if(plan.errors.length>0)return preparation;if(compileResult.wasCompiled)return preparation.writeBlocker=`${sourceFile} can't be updated automatically.`,preparation;let content=applyPlanToJson(rawConfig,config,plan),parseErrors=[],nextConfig=parse(content,parseErrors);if(parseErrors.length>0)return preparation.writeBlocker=`Couldn't produce a valid ${sourceFile}.`,preparation;let validationError=validateConfig(nextConfig);return validationError?(preparation.writeBlocker=validationError.message,preparation):(preparation.write={configPath:compileResult.configPath,content},preparation)}function applyPlanToJson(rawConfig,config,plan){let eol=rawConfig.includes(`\r
7
+ import{require_dist as require_dist2}from"./chunk-XRIM4BUF.js";import{validateConfig}from"./chunk-RBIHS5QI.js";import{require_dist2 as require_dist}from"./chunk-NIS66BFX.js";import{compileVercelConfig,findSourceVercelConfigFile}from"./chunk-MXURT5TX.js";import{applyEdits,findNodeAtLocation,init_main,modify,parse,parseTree}from"./chunk-J24BABG4.js";import{init_dist,stringify}from"./chunk-U4Z2MMOF.js";import{printAlignedLabel}from"./chunk-64UCX5JM.js";import{code}from"./chunk-T2FCF46I.js";import{link_default,output_manager_default}from"./chunk-W634OFUG.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);init_main();init_dist();var import_build_utils=__toESM(require_build_utils(),1),import_fs_detectors=__toESM(require_dist(),1),import_service_topology=__toESM(require_dist2(),1);import{readFile,writeFile}from"fs/promises";import{basename}from"path";var EXPERIMENTAL_SERVICES_DOCS_URL="https://vercel.com/docs/services/experimental";async function prepareExperimentalServicesMigration(cwd,detectServicesResult){let compileResult=await compileVercelConfig(cwd);if(!compileResult.configPath)return null;let rawConfig=await readFile(compileResult.configPath,"utf8"),config=parse(rawConfig);if(!config||!(0,import_service_topology.hasLegacyServicesConfig)(config))return null;let resolvedServices=detectServicesResult?.resolved?.source==="configured"?detectServicesResult.services.filter(s=>(0,import_build_utils.isExperimentalService)(s)):void 0,plan=await(0,import_service_topology.migrateExperimentalServices)({fs:new import_fs_detectors.LocalFileSystemDetector(cwd),config,resolvedServices:resolvedServices&&resolvedServices.length>0?resolvedServices:void 0}),sourceFile=compileResult.sourceFile??basename(compileResult.configPath),preparation={plan,sourceFile,snippet:renderSnippet(sourceFile,plan)};if(plan.errors.length>0)return preparation;if(compileResult.wasCompiled)return preparation.writeBlocker=`${sourceFile} can't be updated automatically.`,preparation;let content=applyPlanToJson(rawConfig,config,plan),parseErrors=[],nextConfig=parse(content,parseErrors);if(parseErrors.length>0)return preparation.writeBlocker=`Couldn't produce a valid ${sourceFile}.`,preparation;let validationError=validateConfig(nextConfig);return validationError?(preparation.writeBlocker=validationError.message,preparation):(preparation.write={configPath:compileResult.configPath,content},preparation)}function applyPlanToJson(rawConfig,config,plan){let eol=rawConfig.includes(`\r
8
8
  `)?`\r
9
9
  `:`
10
10
  `,indent2=/^([ \t]+)\S/m.exec(rawConfig)?.[1]??" ",formattingOptions={eol,insertSpaces:!indent2.startsWith(" "),tabSize:indent2.startsWith(" ")?1:indent2.length},legacyKey=config.experimentalServices?"experimentalServices":"experimentalServicesV2",key=findNodeAtLocation(parseTree(rawConfig),[legacyKey]).parent.children[0],text=applyEdits(rawConfig,[{offset:key.offset,length:key.length,content:'"services"'}]);text=applyEdits(text,modify(text,["services"],plan.patch.services,{formattingOptions}));for(let key2 of plan.removeKeys)key2!==legacyKey&&(text=applyEdits(text,modify(text,[key2],void 0,{formattingOptions})));for(let[key2,value]of Object.entries(plan.patch.build?.env??{}))text=applyEdits(text,modify(text,["build","env",key2],value,{formattingOptions}));if(plan.patch.rewrites.length>0)if(Array.isArray(config.rewrites))for(let rewrite of plan.patch.rewrites)text=applyEdits(text,modify(text,["rewrites",-1],rewrite,{formattingOptions}));else text=applyEdits(text,modify(text,["rewrites"],plan.patch.rewrites,{formattingOptions,getInsertionIndex:keys=>keys.indexOf("services")+1}));return text.endsWith(`
@@ -4,5 +4,5 @@ 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{loadEmbeddedBuilderGraphs,loadEmbeddedBuilderIndex}from"./chunk-4CACOKMS.js";import{require_dist2,require_minimatch}from"./chunk-3P4Y46MS.js";import{readJSONFile}from"./chunk-KARAZGCO.js";import{require_semver}from"./chunk-BPUANOGW.js";import{require_execa}from"./chunk-T34C75TI.js";import{isManagedBuildersInstall}from"./chunk-NWGBDBZI.js";import{VERCEL_CONFIG_EXTENSIONS,VERCEL_DIR,require_lib,require_pluralize}from"./chunk-QZEZCUUZ.js";import{CantParseJSONFile,code}from"./chunk-FXEMEIST.js";import{cmd}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-ZRJKGAUT.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{pkg_default}from"./chunk-OO572JUC.js";import{__commonJS,__export,__require,__toESM}from"./chunk-BZENIQ7N.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 isAbsolute2(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),isAbsolute2(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,pinBuilderSpecs:()=>pinBuilderSpecs});module.exports=__toCommonJS(import_builders_exports);var import_npm_package_arg2=__toESM2(require_npa()),import_semver=require_semver(),import_path2=__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 isDefaultSpec(parsed){return parsed.type==="tag"&&(parsed.rawSpec===""||parsed.rawSpec==="latest")}function formatResolvedBuilders2(builders){return Array.from(builders.values(),b=>b.pkgPath?`${b.pkg.name}@${b.pkg.version}=${(0,import_path2.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&&isDefaultSpec(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_path2.isAbsolute)(override)?override:(0,import_path2.resolve)(cwd,override):(0,import_path2.join)(cwd,vercelDir,"builders")}function createImportBuilders2(dependencies){let{buildersDir:resolveBuildersDir=getBuildersDir2,debug,installBuilders:installBuilders2,isNativeBinaryInstall,require:require2,staticBuilder,vercelDir}=dependencies,builderPins2=new Map;for(let[name,version2]of Object.entries(dependencies.builderPins))((0,import_semver.validRange)(version2)||isRemoteBuilderPin(version2))&&builderPins2.set(name,version2);let resolveDependencies={builderPins:builderPins2,debug,isNativeBinaryInstall,require:require2,staticBuilder};return async function(builderSpecs,cwd,span){let buildersDir=resolveBuildersDir(cwd,vercelDir),importResult=await resolveBuilders(buildersDir,builderSpecs,resolveDependencies);if("buildersToAdd"in importResult){let{buildersToAdd,installReasons}=importResult,pinnedSpecs=pinBuilderSpecs(buildersToAdd,builderPins2),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_path2.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(isDefaultSpec(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(isDefaultSpec(parsed)&&peerVersion&&isRemoteBuilderPin(peerVersion)&&pkgPath.startsWith(buildersDir)&&!allowedPinDriftSpecs?.has(spec)){let installedSpec;try{installedSpec=(await(0,import_fs_extra.readJSON)((0,import_path2.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_path2.join)((0,import_path2.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_path2.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_path2=__require("path"),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,workPath,meta={},service})=>{let output={},outputDirectory=config.zeroConfig?config.outputDirectory:"",canPublish=meta.daemonContext?await(0,import_build_utils.createDaemonStaticFileFilter)({context:meta.daemonContext,publishPath:(0,import_path2.resolve)(workPath,outputDirectory||"."),serviceName:service?.name}):void 0;for(let[srcFilename,fileFsRef]of Object.entries(files)){if(entrypoint&&!(entrypoint===srcFilename||(0,import_minimatch.default)(srcFilename,entrypoint,{dot:!0})))continue;let filename=srcFilename;if(outputDirectory){let outputMatch=outputDirectory+"/";filename.startsWith(outputMatch)&&(filename=filename.slice(outputMatch.length))}ALWAYS_EXCLUDED_PREFIXES.some(prefix=>filename.startsWith(prefix))||alwaysExcludedFiles.includes(filename)||DEFAULT_EXCLUDED_FILES.includes(filename)||filename.startsWith(".env")||(!canPublish||await canPublish((0,import_path2.resolve)(workPath,srcFilename)))&&(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,getBuildUtilsVersionForInstall:()=>getBuildUtilsVersionForInstall,shouldFallbackBuilderPins:()=>shouldFallbackBuilderPins});module.exports=__toCommonJS(install_builders_exports);var import_url=__require("url"),import_pluralize=__toESM2(require_pluralize()),import_path2=__require("path"),import_npm_package_arg2=__toESM2(require_npa()),import_semver=require_semver(),import_fs_extra=require_lib(),import_error_utils=require_dist();function getBuildUtilsVersionForInstall(dependencies,usePinnedVersion){return usePinnedVersion?dependencies.pinnedBuildUtilsVersion??dependencies.buildUtilsVersion:dependencies.buildUtilsVersion}function shouldFallbackBuilderPins(dependencies,pinnedSpecCount){return pinnedSpecCount>0&&!dependencies.strictBuilderPins}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,buildUtilsVersion=dependencies.buildUtilsVersion){let{code:code2,cmd:cmd2,output,readJSONFile:readJSONFile2,run}=dependencies,resolvedSpecs=new Map,buildersPkgPath=(0,import_path2.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?
7
+ import{loadEmbeddedBuilderGraphs,loadEmbeddedBuilderIndex}from"./chunk-4CACOKMS.js";import{require_dist2,require_minimatch}from"./chunk-NIS66BFX.js";import{require_semver}from"./chunk-BPUANOGW.js";import{readJSONFile}from"./chunk-4SJU5QSD.js";import{require_execa}from"./chunk-RCUDI7OF.js";import{isManagedBuildersInstall}from"./chunk-NWGBDBZI.js";import{VERCEL_CONFIG_EXTENSIONS,VERCEL_DIR,require_lib,require_pluralize}from"./chunk-OZPBJWYU.js";import{CantParseJSONFile,code}from"./chunk-T2FCF46I.js";import{cmd}from"./chunk-VRH7LWOC.js";import{pkg_default}from"./chunk-DBT6PGEH.js";import{output_manager_default}from"./chunk-W634OFUG.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{__commonJS,__export,__require,__toESM}from"./chunk-BZENIQ7N.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 isAbsolute2(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),isAbsolute2(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,pinBuilderSpecs:()=>pinBuilderSpecs});module.exports=__toCommonJS(import_builders_exports);var import_npm_package_arg2=__toESM2(require_npa()),import_semver=require_semver(),import_path2=__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 isDefaultSpec(parsed){return parsed.type==="tag"&&(parsed.rawSpec===""||parsed.rawSpec==="latest")}function formatResolvedBuilders2(builders){return Array.from(builders.values(),b=>b.pkgPath?`${b.pkg.name}@${b.pkg.version}=${(0,import_path2.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&&isDefaultSpec(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_path2.isAbsolute)(override)?override:(0,import_path2.resolve)(cwd,override):(0,import_path2.join)(cwd,vercelDir,"builders")}function createImportBuilders2(dependencies){let{buildersDir:resolveBuildersDir=getBuildersDir2,debug,installBuilders:installBuilders2,isNativeBinaryInstall,require:require2,staticBuilder,vercelDir}=dependencies,builderPins2=new Map;for(let[name,version2]of Object.entries(dependencies.builderPins))((0,import_semver.validRange)(version2)||isRemoteBuilderPin(version2))&&builderPins2.set(name,version2);let resolveDependencies={builderPins:builderPins2,debug,isNativeBinaryInstall,require:require2,staticBuilder};return async function(builderSpecs,cwd,span){let buildersDir=resolveBuildersDir(cwd,vercelDir),importResult=await resolveBuilders(buildersDir,builderSpecs,resolveDependencies);if("buildersToAdd"in importResult){let{buildersToAdd,installReasons}=importResult,pinnedSpecs=pinBuilderSpecs(buildersToAdd,builderPins2),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_path2.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(isDefaultSpec(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(isDefaultSpec(parsed)&&peerVersion&&isRemoteBuilderPin(peerVersion)&&pkgPath.startsWith(buildersDir)&&!allowedPinDriftSpecs?.has(spec)){let installedSpec;try{installedSpec=(await(0,import_fs_extra.readJSON)((0,import_path2.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_path2.join)((0,import_path2.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_path2.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_path2=__require("path"),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,workPath,meta={},service})=>{let output={},outputDirectory=config.zeroConfig?config.outputDirectory:"",canPublish=meta.daemonContext?await(0,import_build_utils.createDaemonStaticFileFilter)({context:meta.daemonContext,publishPath:(0,import_path2.resolve)(workPath,outputDirectory||"."),serviceName:service?.name}):void 0;for(let[srcFilename,fileFsRef]of Object.entries(files)){if(entrypoint&&!(entrypoint===srcFilename||(0,import_minimatch.default)(srcFilename,entrypoint,{dot:!0})))continue;let filename=srcFilename;if(outputDirectory){let outputMatch=outputDirectory+"/";filename.startsWith(outputMatch)&&(filename=filename.slice(outputMatch.length))}ALWAYS_EXCLUDED_PREFIXES.some(prefix=>filename.startsWith(prefix))||alwaysExcludedFiles.includes(filename)||DEFAULT_EXCLUDED_FILES.includes(filename)||filename.startsWith(".env")||(!canPublish||await canPublish((0,import_path2.resolve)(workPath,srcFilename)))&&(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,getBuildUtilsVersionForInstall:()=>getBuildUtilsVersionForInstall,shouldFallbackBuilderPins:()=>shouldFallbackBuilderPins});module.exports=__toCommonJS(install_builders_exports);var import_url=__require("url"),import_pluralize=__toESM2(require_pluralize()),import_path2=__require("path"),import_npm_package_arg2=__toESM2(require_npa()),import_semver=require_semver(),import_fs_extra=require_lib(),import_error_utils=require_dist();function getBuildUtilsVersionForInstall(dependencies,usePinnedVersion){return usePinnedVersion?dependencies.pinnedBuildUtilsVersion??dependencies.buildUtilsVersion:dependencies.buildUtilsVersion}function shouldFallbackBuilderPins(dependencies,pinnedSpecCount){return pinnedSpecCount>0&&!dependencies.strictBuilderPins}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,buildUtilsVersion=dependencies.buildUtilsVersion){let{code:code2,cmd:cmd2,output,readJSONFile:readJSONFile2,run}=dependencies,resolvedSpecs=new Map,buildersPkgPath=(0,import_path2.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
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_path2.join)(buildersDir,"node_modules/@now");await(0,import_fs_extra.mkdirp)(nowScopePath);try{await(0,import_fs_extra.symlink)("../@vercel/build-utils",(0,import_path2.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,getBuildUtilsVersionForInstall(dependencies,!!pinnedSpecs?.size))}catch(err){let fallbackPins=pinnedSpecs;if(!fallbackPins||!shouldFallbackBuilderPins(dependencies,fallbackPins.size))throw err;let fallbackSpecs=new Set(Array.from(buildersToAdd,spec=>{for(let[originalSpec,pinnedSpec]of fallbackPins)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,dependencies.buildUtilsVersion);for(let originalSpec of fallbackPins.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),binaryPkg=pkg_default,installBuilders=(0,import_install_builders.createInstallBuilders)({buildUtilsVersion:pkg_default.dependencies?.["@vercel/build-utils"],pinnedBuildUtilsVersion:binaryPkg.pinnedBuildUtilsVersion,strictBuilderPins:binaryPkg.strictBuilderPins,code,cmd,isCantParseJSONFile:value=>value instanceof CantParseJSONFile,output:output_manager_default,readJSONFile,run:import_execa.default});import{createRequire}from"module";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}}import{isAbsolute,join}from"path";var require_=createRequire(__filename);var builderPins=pkg_default.builders??{},managedBuilderNames=new Set(Object.keys(builderPins)),legacyImportBuilders=(0,import_import_builders.createImportBuilders)({builderPins,buildersDir:(cwd,vercelDir=VERCEL_DIR)=>join(cwd,vercelDir,"builders"),debug:message=>output_manager_default.debug(message),installBuilders,isNativeBinaryInstall:isManagedBuildersInstall,require:require_,staticBuilder:static_builder_exports,vercelDir:VERCEL_DIR}),vltImports,vltPreload,vltPreloadState="notStarted";function loadVltImports(){if(!vltImports){let imports=Promise.all([import("./vlt-builder-importer-RBUPAB6J.js"),loadEmbeddedBuilderIndex()]);vltImports=imports,imports.catch(()=>{vltImports===imports&&(vltImports=void 0)})}return vltImports}function getVltPreloadState(){return vltPreloadState}function preloadVltBuilderImports(){return vltPreload??=(async()=>{vltPreloadState="inFlight";try{await loadVltImports(),vltPreloadState="done"}catch(error){throw vltPreloadState="failed",error}})(),vltPreload}async function importBuilders(builderSpecs,cwd,span){let managedBuilders=isManagedBuildersInstall(),buildersDir=managedBuilders?process.env.VERCEL_BUILDERS_DIR:void 0;if(buildersDir&&!isAbsolute(buildersDir))throw new Error("VERCEL_BUILDERS_DIR must be an absolute path.");if(!managedBuilders)return legacyImportBuilders(builderSpecs,cwd,span);let{managed,legacy}=partitionBuilderSpecs(builderSpecs,managedBuilderNames);if(buildersDir&&managed.size>0&&span?.setAttributes({"builders.directory.enabled":"true","builders.directory.path":(0,import_import_builders.getBuildersDir)(cwd)}),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 preloadState=vltPreloadState,loadStartedAt=performance.now(),[{createVltBuilderImporter},index]=await loadVltImports();span?.setAttributes({"builders.vlt.preloadState":preloadState,"builders.vlt.preloadAwaitMs":String(Math.round(performance.now()-loadStartedAt))});let vltImportBuilders=createVltBuilderImporter({loadIndex:async()=>index,loadGraphs:()=>loadEmbeddedBuilderGraphs(),require:require_,cacheRoot:buildersDir?(0,import_import_builders.getBuildersDir)(cwd):void 0,debug:message=>output_manager_default.debug(message)}),[vltBuilders,legacyBuilders]=await Promise.all([vltImportBuilders(managed,span),legacy.size?legacyImportBuilders(legacy,cwd,span):Promise.resolve(new Map)]);return new Map([...vltBuilders,...legacyBuilders])}export{require_npa,import_import_builders,getVltPreloadState,preloadVltBuilderImports,importBuilders};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{table}from"./chunk-OTJNOMRV.js";import{require_source}from"./chunk-NB2WLB3J.js";import{require_strip_ansi}from"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1);function strlen(str){return(0,import_strip_ansi.default)(str).length}function formatTable(header,align,blocks){let nrCols=header.length,padding=[],out=`
7
+ import{table}from"./chunk-375JVQYK.js";import{require_source}from"./chunk-NB2WLB3J.js";import{require_strip_ansi}from"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1);function strlen(str){return(0,import_strip_ansi.default)(str).length}function formatTable(header,align,blocks){let nrCols=header.length,padding=[],out=`
8
8
  `;for(let i=0;i<nrCols;i++)padding[i]=blocks.reduce((acc,block)=>{let maxLen=Math.max(...block.rows.map(row=>strlen(`${row[i]}`)));return Math.max(acc,Math.ceil(maxLen/8))},1);for(let block of blocks){block.name&&(out+=`${block.name}
9
9
  `);let rows=[header.map(s=>import_chalk.default.dim(s))].concat(block.rows);if(rows.length>0){rows[0][0]=` ${rows[0][0]}`;for(let i=1;i<rows.length;i++){let row=rows[i].slice(0);row[0]=` ${row[0]}`;for(let j=0;j<nrCols;j++){let col=`${row[j]}`,al=align[j]||"l",repeat=padding[j]>1?padding[j]*8-strlen(col):0,pad=repeat>0?" ".repeat(repeat):"";rows[i][j]=al==="l"?col+pad:pad+col}}out+=table(rows,{align,hsep:4})}out+=`
10
10
 
@@ -4,4 +4,4 @@ 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{resolveProjectContext}from"./chunk-JULKMXVP.js";import{printError}from"./chunk-D3GYYGSS.js";import{detectExplicitScope}from"./chunk-IU6PHFPQ.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getErrorRecovery,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-KAUKCHQF.js";import{getProjectByNameOrId}from"./chunk-QZEZCUUZ.js";import{ProjectNotFound,isAPIError}from"./chunk-FXEMEIST.js";import{output_manager_default}from"./chunk-ZRJKGAUT.js";function tracingErrorMessage(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function tracingErrorReason(err){let status=isAPIError(err)?err.status:void 0;return status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR}function handleTracingApiError(client,err){if(client.nonInteractive){let apiError=isAPIError(err)?err:void 0;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:tracingErrorReason(err),message:tracingErrorMessage(err),...apiError?.status===429&&getErrorRecovery(apiError,client)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(tracingErrorMessage(err)),1):(printError(err),1)}function configError(client,reason,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),getExitCodeForReason(reason)}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function missingEnvironment(client,message){return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.MISSING_ENVIRONMENT,message}),output_manager_default.error(message),getExitCodeForReason(AGENT_REASON.MISSING_ENVIRONMENT)}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}var MISSING_BOTH_MESSAGE="No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";async function resolveScope({client,flags={},linkedProject}){let flagScope=flags.scope?.trim()||void 0,flagProject=flags.project?.trim()||void 0;if(linkedProject.status==="linked"){if(!flagScope&&!flagProject)return{teamId:linkedProject.org.id,projectId:linkedProject.project.id,projectName:linkedProject.project.name};let teamId=flagScope?client.config.currentTeam:linkedProject.org.id;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject??linkedProject.project.id,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}if(flagScope&&flagProject){let teamId=client.config.currentTeam;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}return{reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE}}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE,hint:"Link a project or pass --scope and --project.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"link this directory to a project"}]}),output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?{exitCode:invalidArguments(client,`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.`)}:{teamId:link.org.id,projectId:link.project.id,projectName:link.project.name}}export{resolveScope,tracingErrorMessage,tracingErrorReason,handleTracingApiError,invalidArguments,missingEnvironment,ruleNotFound,confirmationRequired,resolveConfigScope};
7
+ import{resolveProjectContext}from"./chunk-QKWJN6OE.js";import{printError}from"./chunk-BWS3ZOHJ.js";import{detectExplicitScope}from"./chunk-DSNIVABS.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getErrorRecovery,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-32NXYHYC.js";import{getProjectByNameOrId}from"./chunk-OZPBJWYU.js";import{ProjectNotFound,isAPIError}from"./chunk-T2FCF46I.js";import{output_manager_default}from"./chunk-W634OFUG.js";function tracingErrorMessage(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function tracingErrorReason(err){let status=isAPIError(err)?err.status:void 0;return status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR}function handleTracingApiError(client,err){if(client.nonInteractive){let apiError=isAPIError(err)?err:void 0;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:tracingErrorReason(err),message:tracingErrorMessage(err),...apiError?.status===429&&getErrorRecovery(apiError,client)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(tracingErrorMessage(err)),1):(printError(err),1)}function configError(client,reason,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),getExitCodeForReason(reason)}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function missingEnvironment(client,message){return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.MISSING_ENVIRONMENT,message}),output_manager_default.error(message),getExitCodeForReason(AGENT_REASON.MISSING_ENVIRONMENT)}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}var MISSING_BOTH_MESSAGE="No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";async function resolveScope({client,flags={},linkedProject}){let flagScope=flags.scope?.trim()||void 0,flagProject=flags.project?.trim()||void 0;if(linkedProject.status==="linked"){if(!flagScope&&!flagProject)return{teamId:linkedProject.org.id,projectId:linkedProject.project.id,projectName:linkedProject.project.name};let teamId=flagScope?client.config.currentTeam:linkedProject.org.id;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject??linkedProject.project.id,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}if(flagScope&&flagProject){let teamId=client.config.currentTeam;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id,projectName:project.name}}return{reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE}}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE,hint:"Link a project or pass --scope and --project.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"link this directory to a project"}]}),output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?{exitCode:invalidArguments(client,`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.`)}:{teamId:link.org.id,projectId:link.project.id,projectName:link.project.name}}export{resolveScope,tracingErrorMessage,tracingErrorReason,handleTracingApiError,invalidArguments,missingEnvironment,ruleNotFound,confirmationRequired,resolveConfigScope};
@@ -4,4 +4,4 @@ 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{tracesConfigCommand}from"./chunk-45UDRX4C.js";import{packageName}from"./chunk-JESNVRVR.js";import{deploymentOption,nextCursorOption,projectOption,protectionBypassOption,sinceOption,untilOption,yesOption}from"./chunk-YPPDRKVC.js";var spanQueryOptions=[{...projectOption,shorthand:"p",description:"Filter spans to one project (default: all team projects)"},{name:"environment",shorthand:"e",type:String,argument:"ENVIRONMENT",deprecated:!1,description:"Environment: production or preview (case-insensitive)"},{name:"service",shorthand:null,type:String,deprecated:!1,description:"Filter by service name"},{name:"name",shorthand:null,type:String,deprecated:!1,description:"Filter by span name"},{name:"kind",shorthand:null,type:String,deprecated:!1,description:"Filter by span kind: unspecified (0), internal (1), server (2), client (3), producer (4), consumer (5)"},{name:"status",shorthand:null,type:String,deprecated:!1,description:"Status: error, ok, or unset (case-insensitive)"},{...deploymentOption,description:"Filter by deployment ID"},{name:"deployment-id",shorthand:null,type:String,deprecated:!0},{name:"request-id",shorthand:null,type:String,deprecated:!1,description:"Filter by request ID. Some IDs return 404 in traces inspect. Reuse --scope and --project. See traces inspect --help."},{name:"trace",shorthand:null,type:String,argument:"TRACE",deprecated:!1,description:"Filter by trace ID"},{name:"trace-id",shorthand:null,type:String,deprecated:!0},{name:"span",shorthand:null,type:String,argument:"SPAN",deprecated:!1,description:"Filter by span ID"},{name:"span-id",shorthand:null,type:String,deprecated:!0},{name:"root",shorthand:null,type:Boolean,deprecated:!1,description:"Show root spans only"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption];var requestIdLookupHelp={title:"Request-ID lookup",body:["A request ID in search results does not guarantee traces inspect can retrieve the trace. Lookup requires a matching root span in the same project within 30 minutes after the request-ID timestamp.","","If no matching root is found, lookup returns 404. Use the same --scope and --project for search and inspect."]},getSubcommand={name:"inspect",aliases:["get"],default:!0,description:"Show a captured trace by trace ID or request ID",helpSections:[{title:"Trace-ID lookup",body:["A 32-character hexadecimal ID selects trace-ID lookup. Other IDs select request-ID lookup.","Trace-ID lookup retrieves the trace directly within the trace retention window. Use the same --scope and --project as search."]},requestIdLookupHelp],arguments:[{name:"id",required:!0}],options:[{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Print the raw trace JSON to stdout"},{name:"project",shorthand:"p",type:String,argument:"NAME|ID",deprecated:!1,description:"Project that owns the trace (default: linked project)"},{name:"open",shorthand:null,type:Boolean,deprecated:!1,description:"Open the trace in the Vercel Dashboard instead of printing it."},{name:"view",shorthand:null,type:String,argument:"timeline|tree|waterfall",deprecated:!1,description:"Dashboard view to open (default: timeline). Only valid with --open."}],examples:[{name:"Inspect a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Inspect a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Inspect a trace without typing the default inspect subcommand",value:`${packageName} traces e5c0d1efb3904155472b01692c7f2d00`},{name:"Inspect a trace from a specific team and project",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --scope my-team --project my-app`},{name:"Open the trace in the Vercel Dashboard",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open`},{name:"Open the trace in the Vercel Dashboard with the waterfall view",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open --view waterfall`}]},createSubcommand={name:"create",aliases:[],description:"Capture a session trace for a request (alias for `vercel curl --trace`).",arguments:[{name:"path",required:!0}],forwardsUnknownOptions:!0,options:[deploymentOption,protectionBypassOption,{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Emit { response, requestId } as JSON on stdout"},{...yesOption,description:"Skip the production confirmation prompt (e.g. in non-interactive mode)"}],examples:[{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Target a specific deployment",value:`${packageName} traces create /api/status --deployment https://your-project-abc123.vercel.app`},{name:"Pass curl options after the separator",value:`${packageName} traces create /api/test -- --request POST --data '{"name": "John"}'`}]},searchSubcommand={name:"search",aliases:[],description:"Search team spans. Use --project to filter one project. Results are newest first. Duration filters do not sort results.",helpSections:[{title:"Table columns",body:["Available: span.startTime, span.duration, span.name, span.status.code, service.name, environment, request.id, trace.id, span.id, parent.id, span.kind","Default: all except environment, request.id, and span.kind."]},{title:"KQL filters",body:["Fields: project.id, environment, service.name, deployment.id, request.id, user.id, session.id","Span fields: span.name, span.kind, span.id, parent.id, span.isRoot, span.status.code, span.duration","Trace fields: trace.id, trace.state","","Other fields search span attributes first, then resource attributes.","","span.duration uses milliseconds.","span.kind uses the numeric values shown under --kind.","span.status.code uses Error, Ok, or Unset.","Use field:value filters. Plain text search is not supported.","Use NOT to exclude values. End a value with * to match a prefix.","Wrap values with spaces in double quotes. Keep the full query in single quotes."]},{title:"Paging",body:["When more spans match, a Next page command is printed on stderr.","--json prints one span line per record and ends with a summary line; --non-interactive implies --json.","--next continues from the summary's pagination.next value. It keeps the original team, project, filters, and time window, so it can't be combined with them. --limit can change."]}],arguments:[],options:[...spanQueryOptions,{name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Maximum number of spans (default: 100, max: 1000)"},{name:"query",shorthand:"q",type:String,deprecated:!1,description:"Filter spans using KQL"},{name:"columns",shorthand:null,argument:"LIST",type:String,deprecated:!1,description:"Columns to show, in order. Separate names with commas. Cannot be used with --json or --non-interactive."},{...nextCursorOption,description:"Continue a previous search from its summary's next value"},{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Output JSON Lines ending with a summary line"}],examples:[{name:"Find production errors for one service",value:`${packageName} traces search --environment production --service checkout-api --status error --since 1h`},{name:"Use KQL and output JSON Lines",value:`${packageName} traces search --query 'http.route:"/api/checkout"' --kind server --json`},{name:"Exclude span names starting with app/lib/fetch-api",value:`${packageName} traces search --query 'NOT span.name:app/lib/fetch-api*'`},{name:"Exclude exact span names",value:`${packageName} traces search --query 'NOT span.name:("GET /screenshot/v2" OR "middleware GET")'`},{name:"Find spans longer than 2 seconds",value:`${packageName} traces search --query 'span.duration > 2000' --columns span.startTime,span.duration,span.name,span.kind,span.status.code`},{name:"Continue from the summary's next value",placeholders:["<CURSOR>"],value:`${packageName} traces search --next <CURSOR> --json`}]},tracesCommand={name:"traces",aliases:[],description:"Inspect project traces and search spans across a Vercel team.",arguments:[{name:"id",required:!1}],subcommands:[getSubcommand,searchSubcommand,createSubcommand,tracesConfigCommand],options:[],examples:[{name:"Inspect a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Inspect a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Search recent spans",value:`${packageName} traces search --status error`},{name:"List the trace sampling rules for a project",value:`${packageName} traces config ls`}]};export{getSubcommand,createSubcommand,searchSubcommand,tracesCommand};
7
+ import{tracesConfigCommand}from"./chunk-ZBZPCKTW.js";import{packageName}from"./chunk-VRH7LWOC.js";import{deploymentOption,nextCursorOption,projectOption,protectionBypassOption,sinceOption,untilOption,yesOption}from"./chunk-YPPDRKVC.js";var spanQueryOptions=[{...projectOption,shorthand:"p",description:"Filter spans to one project (default: all team projects)"},{name:"environment",shorthand:"e",type:String,argument:"ENVIRONMENT",deprecated:!1,description:"Environment: production or preview (case-insensitive)"},{name:"service",shorthand:null,type:String,deprecated:!1,description:"Filter by service name"},{name:"name",shorthand:null,type:String,deprecated:!1,description:"Filter by span name"},{name:"kind",shorthand:null,type:String,deprecated:!1,description:"Filter by span kind: unspecified (0), internal (1), server (2), client (3), producer (4), consumer (5)"},{name:"status",shorthand:null,type:String,deprecated:!1,description:"Status: error, ok, or unset (case-insensitive)"},{...deploymentOption,description:"Filter by deployment ID"},{name:"deployment-id",shorthand:null,type:String,deprecated:!0},{name:"request-id",shorthand:null,type:String,deprecated:!1,description:"Filter by request ID. Some IDs return 404 in traces inspect. Reuse --scope and --project. See traces inspect --help."},{name:"trace",shorthand:null,type:String,argument:"TRACE",deprecated:!1,description:"Filter by trace ID"},{name:"trace-id",shorthand:null,type:String,deprecated:!0},{name:"span",shorthand:null,type:String,argument:"SPAN",deprecated:!1,description:"Filter by span ID"},{name:"span-id",shorthand:null,type:String,deprecated:!0},{name:"root",shorthand:null,type:Boolean,deprecated:!1,description:"Show root spans only"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption];var requestIdLookupHelp={title:"Request-ID lookup",body:["A request ID in search results does not guarantee traces inspect can retrieve the trace. Lookup requires a matching root span in the same project within 30 minutes after the request-ID timestamp.","","If no matching root is found, lookup returns 404. Use the same --scope and --project for search and inspect."]},getSubcommand={name:"inspect",aliases:["get"],default:!0,description:"Show a captured trace by trace ID or request ID",helpSections:[{title:"Trace-ID lookup",body:["A 32-character hexadecimal ID selects trace-ID lookup. Other IDs select request-ID lookup.","Trace-ID lookup retrieves the trace directly within the trace retention window. Use the same --scope and --project as search."]},requestIdLookupHelp],arguments:[{name:"id",required:!0}],options:[{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Print the raw trace JSON to stdout"},{name:"project",shorthand:"p",type:String,argument:"NAME|ID",deprecated:!1,description:"Project that owns the trace (default: linked project)"},{name:"open",shorthand:null,type:Boolean,deprecated:!1,description:"Open the trace in the Vercel Dashboard instead of printing it."},{name:"view",shorthand:null,type:String,argument:"timeline|tree|waterfall",deprecated:!1,description:"Dashboard view to open (default: timeline). Only valid with --open."}],examples:[{name:"Inspect a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Inspect a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Inspect a trace without typing the default inspect subcommand",value:`${packageName} traces e5c0d1efb3904155472b01692c7f2d00`},{name:"Inspect a trace from a specific team and project",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --scope my-team --project my-app`},{name:"Open the trace in the Vercel Dashboard",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open`},{name:"Open the trace in the Vercel Dashboard with the waterfall view",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open --view waterfall`}]},createSubcommand={name:"create",aliases:[],description:"Capture a session trace for a request (alias for `vercel curl --trace`).",arguments:[{name:"path",required:!0}],forwardsUnknownOptions:!0,options:[deploymentOption,protectionBypassOption,{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Emit { response, requestId } as JSON on stdout"},{...yesOption,description:"Skip the production confirmation prompt (e.g. in non-interactive mode)"}],examples:[{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Target a specific deployment",value:`${packageName} traces create /api/status --deployment https://your-project-abc123.vercel.app`},{name:"Pass curl options after the separator",value:`${packageName} traces create /api/test -- --request POST --data '{"name": "John"}'`}]},searchSubcommand={name:"search",aliases:[],description:"Search team spans. Use --project to filter one project. Results are newest first. Duration filters do not sort results.",helpSections:[{title:"Table columns",body:["Available: span.startTime, span.duration, span.name, span.status.code, service.name, environment, request.id, trace.id, span.id, parent.id, span.kind","Default: all except environment, request.id, and span.kind."]},{title:"KQL filters",body:["Fields: project.id, environment, service.name, deployment.id, request.id, user.id, session.id","Span fields: span.name, span.kind, span.id, parent.id, span.isRoot, span.status.code, span.duration","Trace fields: trace.id, trace.state","","Other fields search span attributes first, then resource attributes.","","span.duration uses milliseconds.","span.kind uses the numeric values shown under --kind.","span.status.code uses Error, Ok, or Unset.","Use field:value filters. Plain text search is not supported.","Use NOT to exclude values. End a value with * to match a prefix.","Wrap values with spaces in double quotes. Keep the full query in single quotes."]},{title:"Paging",body:["When more spans match, a Next page command is printed on stderr.","--json prints one span line per record and ends with a summary line; --non-interactive implies --json.","--next continues from the summary's pagination.next value. It keeps the original team, project, filters, and time window, so it can't be combined with them. --limit can change."]}],arguments:[],options:[...spanQueryOptions,{name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Maximum number of spans (default: 100, max: 1000)"},{name:"query",shorthand:"q",type:String,deprecated:!1,description:"Filter spans using KQL"},{name:"columns",shorthand:null,argument:"LIST",type:String,deprecated:!1,description:"Columns to show, in order. Separate names with commas. Cannot be used with --json or --non-interactive."},{...nextCursorOption,description:"Continue a previous search from its summary's next value"},{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Output JSON Lines ending with a summary line"}],examples:[{name:"Find production errors for one service",value:`${packageName} traces search --environment production --service checkout-api --status error --since 1h`},{name:"Use KQL and output JSON Lines",value:`${packageName} traces search --query 'http.route:"/api/checkout"' --kind server --json`},{name:"Exclude span names starting with app/lib/fetch-api",value:`${packageName} traces search --query 'NOT span.name:app/lib/fetch-api*'`},{name:"Exclude exact span names",value:`${packageName} traces search --query 'NOT span.name:("GET /screenshot/v2" OR "middleware GET")'`},{name:"Find spans longer than 2 seconds",value:`${packageName} traces search --query 'span.duration > 2000' --columns span.startTime,span.duration,span.name,span.kind,span.status.code`},{name:"Continue from the summary's next value",placeholders:["<CURSOR>"],value:`${packageName} traces search --next <CURSOR> --json`}]},tracesCommand={name:"traces",aliases:[],description:"Inspect project traces and search spans across a Vercel team.",arguments:[{name:"id",required:!1}],subcommands:[getSubcommand,searchSubcommand,createSubcommand,tracesConfigCommand],options:[],examples:[{name:"Inspect a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Inspect a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Search recent spans",value:`${packageName} traces search --status error`},{name:"List the trace sampling rules for a project",value:`${packageName} traces config ls`}]};export{getSubcommand,createSubcommand,searchSubcommand,tracesCommand};