@vercel/cli-support 65.11.0 → 65.12.0-snapshot-f37009a35593

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 (369) hide show
  1. package/README.md +8 -120
  2. package/dist/chunks/add-6HUHUS65.js +8 -0
  3. package/dist/chunks/add-Q4SUNMBK.js +8 -0
  4. package/dist/chunks/add-Z7P3MHVF.js +8 -0
  5. package/dist/chunks/{alerts-JGRRCQA4.js → alerts-VOYMO6NJ.js} +1 -1
  6. package/dist/chunks/build-73WG7HKM.js +7 -0
  7. package/dist/chunks/{chunk-PUKYAALC.js → chunk-24SIHFEW.js} +1 -1
  8. package/dist/chunks/{chunk-QROI2U32.js → chunk-2CQJKBKV.js} +2 -4
  9. package/dist/chunks/{chunk-7MZLV3KK.js → chunk-2CZL3GJU.js} +1 -1
  10. package/dist/chunks/{chunk-TPJV5UNE.js → chunk-2I6UGVH5.js} +1 -1
  11. package/dist/chunks/{chunk-4E6BGQWR.js → chunk-2LOA3LC6.js} +1 -1
  12. package/dist/chunks/{chunk-EBIJ26IV.js → chunk-2PHHMZHH.js} +1 -1
  13. package/dist/chunks/{chunk-M3Z6NSC2.js → chunk-2V6UURUN.js} +1 -1
  14. package/dist/chunks/{chunk-CFYLTZSV.js → chunk-3AGRCSWN.js} +1 -1
  15. package/dist/chunks/{chunk-42J2KCDF.js → chunk-3EFPSM6M.js} +1 -1
  16. package/dist/chunks/{chunk-RR5SDYNN.js → chunk-3G4I23WW.js} +1 -1
  17. package/dist/chunks/{chunk-DQASZDQT.js → chunk-3SNWIYU7.js} +1 -1
  18. package/dist/chunks/{chunk-EVBGFSK5.js → chunk-42Y46TZ3.js} +1 -1
  19. package/dist/chunks/{chunk-KV3QXTRZ.js → chunk-4OO6TXBM.js} +1 -1
  20. package/dist/chunks/chunk-4ZDL2HTZ.js +13 -0
  21. package/dist/chunks/{chunk-UUDE44NV.js → chunk-54FY6GJ5.js} +1 -1
  22. package/dist/chunks/{chunk-RIJ45N7C.js → chunk-5HQEYPDO.js} +1 -1
  23. package/dist/chunks/chunk-5KL6UFII.js +7 -0
  24. package/dist/chunks/{chunk-ECFLIVEE.js → chunk-5L566FZB.js} +1 -1
  25. package/dist/chunks/{chunk-4ELZOAQH.js → chunk-5TMHRECT.js} +1 -1
  26. package/dist/chunks/chunk-5UXMH3EL.js +7 -0
  27. package/dist/chunks/{chunk-74VQ7PQV.js → chunk-5YLKPSZI.js} +1 -1
  28. package/dist/chunks/chunk-66TKNVRG.js +60 -0
  29. package/dist/chunks/{chunk-RDWLLSPU.js → chunk-6737KAJP.js} +1 -1
  30. package/dist/chunks/{chunk-EGTJTCCW.js → chunk-6G5IWHTD.js} +1 -1
  31. package/dist/chunks/chunk-6JFZDAQH.js +7 -0
  32. package/dist/chunks/{chunk-V5TOMLK4.js → chunk-6Q2XEYCJ.js} +1 -1
  33. package/dist/chunks/{chunk-7VGBGUX7.js → chunk-6S6UZV3V.js} +1 -1
  34. package/dist/chunks/{chunk-NUSKXXZZ.js → chunk-6X3MLL5W.js} +1 -1
  35. package/dist/chunks/chunk-77MIP53X.js +7 -0
  36. package/dist/chunks/chunk-7BDQUBSO.js +7 -0
  37. package/dist/chunks/{chunk-42FOKWGX.js → chunk-7PGDJTAH.js} +1 -1
  38. package/dist/chunks/{chunk-BZIC36KP.js → chunk-7TVNKTN2.js} +1 -1
  39. package/dist/chunks/{chunk-TUAS3L5I.js → chunk-7YHKDIPH.js} +1 -1
  40. package/dist/chunks/{chunk-IIGNDMLO.js → chunk-ABSFPYM4.js} +1 -1
  41. package/dist/chunks/{chunk-MBXLL2HF.js → chunk-AGLOVMPC.js} +3 -3
  42. package/dist/chunks/chunk-AILHY5MN.js +7 -0
  43. package/dist/chunks/{chunk-WBSFE6IE.js → chunk-AQBK55BT.js} +1 -1
  44. package/dist/chunks/{chunk-UNPK7LVC.js → chunk-AUAV6LGZ.js} +1 -1
  45. package/dist/chunks/chunk-AW33SRYY.js +7 -0
  46. package/dist/chunks/chunk-AYT5GPAY.js +7 -0
  47. package/dist/chunks/{chunk-VRH7LWOC.js → chunk-B4KA3ZH2.js} +1 -1
  48. package/dist/chunks/chunk-BF2L7ASS.js +7 -0
  49. package/dist/chunks/{chunk-PFZCGMJ7.js → chunk-BH5OASEJ.js} +1 -1
  50. package/dist/chunks/chunk-BIGJEDOA.js +11 -0
  51. package/dist/chunks/chunk-BOJDM3O7.js +7 -0
  52. package/dist/chunks/chunk-C7SUDWRU.js +10 -0
  53. package/dist/chunks/{chunk-B56SRT5W.js → chunk-CHZP4RWN.js} +1 -1
  54. package/dist/chunks/{chunk-375JVQYK.js → chunk-CJZE7647.js} +1 -1
  55. package/dist/chunks/{chunk-YZKARZ2B.js → chunk-CKJZSRAC.js} +1 -1
  56. package/dist/chunks/{chunk-MIIHBRKV.js → chunk-DUMYLYQM.js} +1 -1
  57. package/dist/chunks/{chunk-SF4E3AQ3.js → chunk-E3WP42P2.js} +1 -1
  58. package/dist/chunks/{chunk-6UMVJ7RL.js → chunk-E7CEQ2PO.js} +1 -1
  59. package/dist/chunks/chunk-EM3U6PRB.js +7 -0
  60. package/dist/chunks/{chunk-AMPJ6RWT.js → chunk-EZVNGJN5.js} +1 -1
  61. package/dist/chunks/{chunk-WMWB7QKG.js → chunk-F2QYQZQH.js} +1 -1
  62. package/dist/chunks/{chunk-ZPBGAZC2.js → chunk-F6KURUPQ.js} +1 -1
  63. package/dist/chunks/{chunk-5DXC4TE2.js → chunk-F7L5SXJM.js} +1 -1
  64. package/dist/chunks/{chunk-XH2R2EIK.js → chunk-FBI6U33Y.js} +1 -1
  65. package/dist/chunks/{chunk-7NMC4E66.js → chunk-FGLU4ZJS.js} +1 -1
  66. package/dist/chunks/{chunk-FNH3T3CF.js → chunk-FGZXIHGN.js} +1 -1
  67. package/dist/chunks/{chunk-W24TLPO5.js → chunk-G2PVH4GO.js} +1 -1
  68. package/dist/chunks/{chunk-HNH3DPIZ.js → chunk-GAILIG45.js} +1 -1
  69. package/dist/chunks/{chunk-FVVOHGQE.js → chunk-GHNHUSVK.js} +1 -1
  70. package/dist/chunks/{chunk-4DMKP6AO.js → chunk-GOI2VVI7.js} +2 -2
  71. package/dist/chunks/chunk-GORL5DZC.js +11 -0
  72. package/dist/chunks/{chunk-GL66K54F.js → chunk-GPDERS2D.js} +1 -1
  73. package/dist/chunks/{chunk-UBJVL3NJ.js → chunk-GQJ3M4XR.js} +3 -3
  74. package/dist/chunks/{chunk-JUSNW3IF.js → chunk-GTXGURVR.js} +1 -1
  75. package/dist/chunks/{chunk-CU3LNJZV.js → chunk-GUSOYIW6.js} +1 -1
  76. package/dist/chunks/{chunk-AO6AMYBF.js → chunk-GY44CQXK.js} +1 -1
  77. package/dist/chunks/{chunk-EZLPMOHM.js → chunk-H2LSYF4A.js} +1 -1
  78. package/dist/chunks/{chunk-4U6ACPA4.js → chunk-HR66URIC.js} +1 -1
  79. package/dist/chunks/{chunk-4KM733OB.js → chunk-HVJN2SSK.js} +1 -1
  80. package/dist/chunks/{chunk-C5QEQSEX.js → chunk-I6ONU42A.js} +1 -1
  81. package/dist/chunks/{chunk-VAZ7JG2Z.js → chunk-ICD2IWKG.js} +1 -1
  82. package/dist/chunks/{chunk-UF2E5BDE.js → chunk-ICR2CGFN.js} +1 -1
  83. package/dist/chunks/{chunk-NT2N5UR4.js → chunk-IRIFXCZW.js} +1 -1
  84. package/dist/chunks/{chunk-CD6ZWCKT.js → chunk-J7BMH22N.js} +1 -1
  85. package/dist/chunks/{chunk-ECGY67NB.js → chunk-J7RNU6AO.js} +1 -1
  86. package/dist/chunks/{chunk-SDYCW5JM.js → chunk-JONZUKWX.js} +1 -1
  87. package/dist/chunks/{chunk-P24YBQ6H.js → chunk-JVGENO2R.js} +1 -1
  88. package/dist/chunks/{chunk-PKNEWN4W.js → chunk-K46QQRUN.js} +1 -1
  89. package/dist/chunks/{chunk-BJXLR2RE.js → chunk-KKYNEEM7.js} +1 -1
  90. package/dist/chunks/{chunk-3TDFSO4X.js → chunk-KPSINH7T.js} +1 -1
  91. package/dist/chunks/chunk-KR4DMT3I.js +7 -0
  92. package/dist/chunks/{chunk-MO2G2ND2.js → chunk-LM66FQOH.js} +1 -1
  93. package/dist/chunks/{chunk-6ORJPXDQ.js → chunk-LTBNB6FS.js} +1 -1
  94. package/dist/chunks/{chunk-RCUDI7OF.js → chunk-M32HBBPK.js} +1 -1
  95. package/dist/chunks/{chunk-ZQXXESKG.js → chunk-MAA5GRIM.js} +1 -1
  96. package/dist/chunks/chunk-MCYG7CCE.js +7 -0
  97. package/dist/chunks/{chunk-ITQPDXXA.js → chunk-MTZYPCZ7.js} +1 -1
  98. package/dist/chunks/{chunk-NE6PKR2J.js → chunk-MWWMY5R6.js} +1 -1
  99. package/dist/chunks/{chunk-UFXIPUNI.js → chunk-MXALPSIX.js} +1 -1
  100. package/dist/chunks/{chunk-7JMN657A.js → chunk-NBTFAXL4.js} +1 -1
  101. package/dist/chunks/{chunk-HYOWFNOP.js → chunk-NIZW6D6D.js} +1 -1
  102. package/dist/chunks/{chunk-KBVYN635.js → chunk-NREH4VSU.js} +1 -1
  103. package/dist/chunks/{chunk-QDHTI5WK.js → chunk-NVTAZWAJ.js} +1 -1
  104. package/dist/chunks/{chunk-5B5CLOKM.js → chunk-NWNNLRAY.js} +1 -1
  105. package/dist/chunks/{chunk-NDMQVBTV.js → chunk-NYJTWSSD.js} +1 -1
  106. package/dist/chunks/{chunk-7ZJ7VUIR.js → chunk-O3DAPRJ3.js} +1 -1
  107. package/dist/chunks/{chunk-K7ARJYAG.js → chunk-OFOZ5DBA.js} +1 -1
  108. package/dist/chunks/{chunk-FYE7ILRR.js → chunk-OFZUWHZW.js} +1 -1
  109. package/dist/chunks/{chunk-RI6DJAFI.js → chunk-OHEM2CSW.js} +1 -1
  110. package/dist/chunks/{chunk-IHTWZEQW.js → chunk-OKKG2FUS.js} +1 -1
  111. package/dist/chunks/{chunk-DR6OJB6P.js → chunk-OLHEIHLT.js} +1 -1
  112. package/dist/chunks/chunk-OMMFXWXP.js +10 -0
  113. package/dist/chunks/chunk-OMR2EZCN.js +7 -0
  114. package/dist/chunks/chunk-PKXUVASX.js +8 -0
  115. package/dist/chunks/{chunk-VKCBEW6R.js → chunk-PSMNKYYB.js} +1 -1
  116. package/dist/chunks/{chunk-EIMHC5UY.js → chunk-PW27HP2P.js} +1 -1
  117. package/dist/chunks/{chunk-TZE4CS4K.js → chunk-QBHTNUM5.js} +1 -1
  118. package/dist/chunks/{chunk-YUHKH4TK.js → chunk-QKOLFLLP.js} +1 -1
  119. package/dist/chunks/{chunk-B6QVH6IG.js → chunk-QTED25YU.js} +1 -1
  120. package/dist/chunks/chunk-RAF34CKY.js +13 -0
  121. package/dist/chunks/chunk-REJLEESP.js +10 -0
  122. package/dist/chunks/chunk-SEHERY6U.js +7 -0
  123. package/dist/chunks/{chunk-5FIY443M.js → chunk-SMETSNPH.js} +1 -1
  124. package/dist/chunks/{chunk-NMIZSQDN.js → chunk-SP6E7PHW.js} +1 -1
  125. package/dist/chunks/chunk-SQBDW5FO.js +10 -0
  126. package/dist/chunks/chunk-SQKTR4V7.js +8 -0
  127. package/dist/chunks/{chunk-CHIYT3V4.js → chunk-TA7KTIDV.js} +1 -1
  128. package/dist/chunks/{chunk-VWJXV5ZM.js → chunk-TCFQL43G.js} +1 -1
  129. package/dist/chunks/{chunk-2J35YKA2.js → chunk-TFTF3C3G.js} +12 -12
  130. package/dist/chunks/{chunk-NZW3RIQM.js → chunk-TJ3V2D24.js} +1 -1
  131. package/dist/chunks/{chunk-JTAUWH5V.js → chunk-TJUZVODP.js} +1 -1
  132. package/dist/chunks/chunk-U7XX53IQ.js +10 -0
  133. package/dist/chunks/{chunk-WTFD4MDT.js → chunk-UZQJQXGJ.js} +1 -1
  134. package/dist/chunks/{chunk-UIMJNASP.js → chunk-V7G4VDZI.js} +1 -1
  135. package/dist/chunks/{chunk-WNDR5HCU.js → chunk-VCJIB3FB.js} +1 -1
  136. package/dist/chunks/{chunk-AYZ52QDF.js → chunk-VM6X5BTK.js} +1 -1
  137. package/dist/chunks/{chunk-HZEKH3RO.js → chunk-VVTMF2AY.js} +1 -1
  138. package/dist/chunks/{chunk-N65H4JMJ.js → chunk-W25UARQV.js} +1 -1
  139. package/dist/chunks/chunk-WLMW7K7F.js +7 -0
  140. package/dist/chunks/{chunk-4VP57TOJ.js → chunk-WZ6SPHBV.js} +1 -1
  141. package/dist/chunks/{chunk-HDISAMDF.js → chunk-WZCHLGSK.js} +1 -1
  142. package/dist/chunks/{chunk-IHCYNUI2.js → chunk-XJYDISH3.js} +1 -1
  143. package/dist/chunks/{chunk-ZTHW5VNH.js → chunk-XM4PXDYM.js} +2 -2
  144. package/dist/chunks/{chunk-4T57TXQ3.js → chunk-XTCS76ZH.js} +1 -1
  145. package/dist/chunks/{chunk-YODQLETL.js → chunk-XVDUP67R.js} +1 -1
  146. package/dist/chunks/{chunk-SLCPSRDR.js → chunk-Y2FVJ7YO.js} +1 -1
  147. package/dist/chunks/{chunk-FVTRIRML.js → chunk-Y5S2OEJH.js} +1 -1
  148. package/dist/chunks/{chunk-EJN55YDV.js → chunk-YANOBY2G.js} +1 -1
  149. package/dist/chunks/{chunk-2RXUQ72I.js → chunk-YIOMTAUF.js} +1 -1
  150. package/dist/chunks/{chunk-BW25OFQG.js → chunk-YLCIOXSX.js} +1 -1
  151. package/dist/chunks/{chunk-GZLYNPNU.js → chunk-YNCWSPPJ.js} +1 -1
  152. package/dist/chunks/chunk-YTGBRFGS.js +12 -0
  153. package/dist/chunks/{chunk-UI2H2EIM.js → chunk-YTRKHRL3.js} +1 -1
  154. package/dist/chunks/{chunk-F7AVGV4Y.js → chunk-Z73UJVGD.js} +1 -1
  155. package/dist/chunks/chunk-ZGB2RHJO.js +7 -0
  156. package/dist/chunks/{chunk-6Y2ZL5XJ.js → chunk-ZKNEIE44.js} +2 -2
  157. package/dist/chunks/chunk-ZZLCRSES.js +11 -0
  158. package/dist/chunks/clear-UUIST3TQ.js +8 -0
  159. package/dist/chunks/{cli-embedded-Y74S252S.js → cli-embedded-ABHGJLYX.js} +1 -1
  160. package/dist/chunks/compile-vercel-config-TCWZLB4R.js +7 -0
  161. package/dist/chunks/config-EN7EVY7Y.js +7 -0
  162. package/dist/chunks/config-SQJODWK5.js +8 -0
  163. package/dist/chunks/config-validator.mjs +1 -1
  164. package/dist/chunks/{connect-git-provider-GFAJLQLU.js → connect-git-provider-BMUUC7ND.js} +1 -1
  165. package/dist/chunks/contract-V2RNNPSD.js +10 -0
  166. package/dist/chunks/delete-FWZRAXCE.js +10 -0
  167. package/dist/chunks/delete-OKKKJTHJ.js +9 -0
  168. package/dist/chunks/describe-XDK4J6I4.js +25 -0
  169. package/dist/chunks/detect-projects-AKK2XI76.js +7 -0
  170. package/dist/chunks/detect-services-BA2VYT26.js +7 -0
  171. package/dist/chunks/disable-BUKHXRKK.js +7 -0
  172. package/dist/chunks/discard-NTONJLH6.js +14 -0
  173. package/dist/chunks/edit-5TTS2KXH.js +8 -0
  174. package/dist/chunks/edit-T3TLRCN7.js +9 -0
  175. package/dist/chunks/enable-MQS3YEHK.js +7 -0
  176. package/dist/chunks/{esm-4ZHGYTUV.js → esm-CF5UHWPM.js} +1 -1
  177. package/dist/chunks/{esm-LNIAU767.js → esm-EYOXGOVF.js} +1 -1
  178. package/dist/chunks/{esm-IBY43SSX.js → esm-FSME24KA.js} +1 -1
  179. package/dist/chunks/{esm-7FVTQHRH.js → esm-IUATPKKB.js} +1 -1
  180. package/dist/chunks/{esm-GTSUYLKG.js → esm-L6OKDFWP.js} +1 -1
  181. package/dist/chunks/{esm-TEM4KPXZ.js → esm-ORQC2ZSA.js} +1 -1
  182. package/dist/chunks/{esm-TLAM7FSK.js → esm-PYIZNQIK.js} +1 -1
  183. package/dist/chunks/{exec-H3X7U4P3.js → exec-RQ257MTR.js} +1 -1
  184. package/dist/chunks/{export-25TQ3YBT.js → export-JFOZSZ3A.js} +1 -1
  185. package/dist/chunks/future-UE6MKJBW.js +7 -0
  186. package/dist/chunks/generate-cert-for-deploy-QOZGFDZ3.js +7 -0
  187. package/dist/chunks/image-L464C43M.js +7 -0
  188. package/dist/chunks/import-builders-OKHP2LMP.js +7 -0
  189. package/dist/chunks/{inspect-3W3TUJ6P.js → inspect-6X7WDJ7A.js} +1 -1
  190. package/dist/chunks/inspect-I6LQLOBG.js +8 -0
  191. package/dist/chunks/inspect-J6DQEWE6.js +9 -0
  192. package/dist/chunks/{inspect-BRYVSQBD.js → inspect-MEXR5NED.js} +1 -1
  193. package/dist/chunks/{inspect-TN2QY3BP.js → inspect-PB7FEMTF.js} +1 -1
  194. package/dist/chunks/inspect-QVKTTC25.js +13 -0
  195. package/dist/chunks/list-763XVNFH.js +8 -0
  196. package/dist/chunks/{list-WA6Q7DUN.js → list-JNP2JS6S.js} +1 -1
  197. package/dist/chunks/list-WCFVA323.js +12 -0
  198. package/dist/chunks/{list-6W4UQBY4.js → list-YABLIB6F.js} +1 -1
  199. package/dist/chunks/login-ESQGN76L.js +7 -0
  200. package/dist/chunks/login-TCDMQCUN.js +9 -0
  201. package/dist/chunks/logs-XQ3GRSVT.js +7 -0
  202. package/dist/chunks/ls-G3LVLUUA.js +11 -0
  203. package/dist/chunks/{ls-4WP6LHLL.js → ls-HN627DO2.js} +1 -1
  204. package/dist/chunks/{ls-UXE5RSZN.js → ls-IDVSAIXK.js} +1 -1
  205. package/dist/chunks/{ls-L5LLKZBV.js → ls-QJRJMA3M.js} +1 -1
  206. package/dist/chunks/ls-VHFDKCAX.js +8 -0
  207. package/dist/chunks/ls-VKEGSWJC.js +8 -0
  208. package/dist/chunks/{ls-MAJ4QZTY.js → ls-WS2Y3HLU.js} +1 -1
  209. package/dist/chunks/migrate-experimental-services-ACV46HSU.js +7 -0
  210. package/dist/chunks/mutate-YODDN5YZ.js +9 -0
  211. package/dist/chunks/{native-self-update-DEVBYOH2.js → native-self-update-7LL6RPJW.js} +1 -1
  212. package/dist/chunks/notifications-JB5C3EOX.js +7 -0
  213. package/dist/chunks/open-U3RARGVY.js +7 -0
  214. package/dist/chunks/openapi-457MABMI.js +7 -0
  215. package/dist/chunks/permissions-IJ5RWOFN.js +7 -0
  216. package/dist/chunks/{plugin-offer-JUYWL4I7.js → plugin-offer-G2O7LE5J.js} +1 -1
  217. package/dist/chunks/prompt-missing-credentials-64B3MTSQ.js +7 -0
  218. package/dist/chunks/publish-U5CL2T2R.js +15 -0
  219. package/dist/chunks/pull-2GWUZBZP.js +7 -0
  220. package/dist/chunks/purchase-domain-if-available-YAXCMJJ4.js +7 -0
  221. package/dist/chunks/push-KLJAUP23.js +7 -0
  222. package/dist/chunks/query-L24ELT33.js +12 -0
  223. package/dist/chunks/reauthenticate-B6AQPMND.js +7 -0
  224. package/dist/chunks/remove-PWS5EJ7F.js +9 -0
  225. package/dist/chunks/reorder-UHLYHQWA.js +10 -0
  226. package/dist/chunks/reply-6K6KF3BQ.js +9 -0
  227. package/dist/chunks/resolve-NBUE43YD.js +12 -0
  228. package/dist/chunks/resolve-agent-team-A2MA7WKR.js +7 -0
  229. package/dist/chunks/{resolve-deployment-framework-preset-AXXYBFCL.js → resolve-deployment-framework-preset-4TKUU6AH.js} +1 -1
  230. package/dist/chunks/restore-6E42I6QB.js +16 -0
  231. package/dist/chunks/rm-ACOGDOLU.js +8 -0
  232. package/dist/chunks/rm-CQTPSSV7.js +8 -0
  233. package/dist/chunks/rm-J4ADWWIH.js +8 -0
  234. package/dist/chunks/rm-Q45IZPKT.js +8 -0
  235. package/dist/chunks/rm-SCRKJUPY.js +8 -0
  236. package/dist/chunks/{routes-BP54NO3Z.js → routes-NEZJKMR5.js} +1 -1
  237. package/dist/chunks/rule-inspect-J4FPZ744.js +8 -0
  238. package/dist/chunks/{schema-753JMRZA.js → schema-JYUBHEHG.js} +1 -1
  239. package/dist/chunks/schema-X6YVMDC2.js +14 -0
  240. package/dist/chunks/select-org-ZDUXNG4O.js +7 -0
  241. package/dist/chunks/set-NYEQ7AZZ.js +7 -0
  242. package/dist/chunks/set-Q2EJ3V44.js +9 -0
  243. package/dist/chunks/setup-and-link-4QGFYNOP.js +7 -0
  244. package/dist/chunks/{skills-QZ4AMS2K.js → skills-DUOUHPBY.js} +1 -1
  245. package/dist/chunks/{statuspage-KHTMA4WL.js → statuspage-K5SC7KAQ.js} +1 -1
  246. package/dist/chunks/{detect-projects-K7SVMH5T.js → table-W6LOHWWF.js} +1 -1
  247. package/dist/chunks/tags-AX2D63LZ.js +7 -0
  248. package/dist/chunks/{types-NPUAHKSK.js → types-7L6HBXAU.js} +1 -1
  249. package/dist/chunks/{update-7XH7HM5F.js → update-WJXK5YUS.js} +1 -1
  250. package/dist/chunks/usage-WDUNWCTW.js +13 -0
  251. package/dist/chunks/validate-config-YLL6RPCP.js +7 -0
  252. package/dist/commands/build/index.js +1 -1
  253. package/dist/commands/deploy/index.js +19 -37
  254. package/dist/commands/dev/index.js +4 -4
  255. package/dist/commands/env/index.js +1 -1
  256. package/dist/commands/link/index.js +1 -1
  257. package/dist/commands/list/index.js +1 -1
  258. package/dist/commands/project/index.js +1 -1
  259. package/dist/commands-account.js +3 -3
  260. package/dist/commands-ai.js +6 -6
  261. package/dist/commands-blob.js +1 -1
  262. package/dist/commands-core.js +20 -20
  263. package/dist/commands-deployments.js +5 -5
  264. package/dist/commands-flags.js +1 -1
  265. package/dist/commands-integrations.js +1 -1
  266. package/dist/commands-observability.js +15 -8
  267. package/dist/commands-routing.js +5 -4
  268. package/dist/help.js +1 -1
  269. package/dist/index.js +5 -5
  270. package/dist/internal-build.js +1 -1
  271. package/dist/package.json +45 -245
  272. package/dist/vc.js +47 -695
  273. package/dist/version.mjs +1 -1
  274. package/package.json +50 -195
  275. package/dist/chunks/add-4R6FUHQT.js +0 -8
  276. package/dist/chunks/add-F3H4BFJZ.js +0 -8
  277. package/dist/chunks/add-TCOJ4SIQ.js +0 -8
  278. package/dist/chunks/build-GOLTZF6S.js +0 -7
  279. package/dist/chunks/chunk-3KJ6HWSX.js +0 -7
  280. package/dist/chunks/chunk-5X635INY.js +0 -11
  281. package/dist/chunks/chunk-7LPNDK2O.js +0 -7
  282. package/dist/chunks/chunk-A3M2BHWR.js +0 -13
  283. package/dist/chunks/chunk-BUFEV3T4.js +0 -11
  284. package/dist/chunks/chunk-BVR6OIU5.js +0 -7
  285. package/dist/chunks/chunk-D7BB5BPA.js +0 -10
  286. package/dist/chunks/chunk-DBT6PGEH.js +0 -7
  287. package/dist/chunks/chunk-DRZVM7CB.js +0 -12
  288. package/dist/chunks/chunk-EICEQXVS.js +0 -7
  289. package/dist/chunks/chunk-F2R7L3ZB.js +0 -7
  290. package/dist/chunks/chunk-FHMCTV5E.js +0 -7
  291. package/dist/chunks/chunk-FOE3MWES.js +0 -7
  292. package/dist/chunks/chunk-HKU6D7DU.js +0 -8
  293. package/dist/chunks/chunk-IOTKHTZH.js +0 -7
  294. package/dist/chunks/chunk-K4JTCVNW.js +0 -13
  295. package/dist/chunks/chunk-LALPOYIA.js +0 -8
  296. package/dist/chunks/chunk-M3R7F2N4.js +0 -7
  297. package/dist/chunks/chunk-MUKXOI2K.js +0 -8
  298. package/dist/chunks/chunk-NIS66BFX.js +0 -63
  299. package/dist/chunks/chunk-NSPW47RU.js +0 -7
  300. package/dist/chunks/chunk-NTDP6RTQ.js +0 -11
  301. package/dist/chunks/chunk-Q2QVK3TH.js +0 -7
  302. package/dist/chunks/chunk-RM3ZDRYE.js +0 -7
  303. package/dist/chunks/chunk-UCRMJMH6.js +0 -10
  304. package/dist/chunks/chunk-XQDHMFQY.js +0 -7
  305. package/dist/chunks/chunk-XRIM4BUF.js +0 -7
  306. package/dist/chunks/chunk-Z64MQIOE.js +0 -10
  307. package/dist/chunks/chunk-ZS2WS4AM.js +0 -7
  308. package/dist/chunks/clear-PECHXMV5.js +0 -8
  309. package/dist/chunks/compile-vercel-config-EM3HYOQC.js +0 -7
  310. package/dist/chunks/config-DA2NZUDH.js +0 -8
  311. package/dist/chunks/config-X6O3DT7V.js +0 -7
  312. package/dist/chunks/contract-RHMWRX4W.js +0 -10
  313. package/dist/chunks/delete-5RN5VW5L.js +0 -9
  314. package/dist/chunks/delete-MT6I7R7K.js +0 -10
  315. package/dist/chunks/detect-services-HSA4JHJX.js +0 -7
  316. package/dist/chunks/disable-LXPZDQMC.js +0 -7
  317. package/dist/chunks/discard-PW65T65S.js +0 -14
  318. package/dist/chunks/edit-WFSONASO.js +0 -8
  319. package/dist/chunks/edit-YID3FOJ3.js +0 -9
  320. package/dist/chunks/enable-X2EKQCIY.js +0 -7
  321. package/dist/chunks/future-DQBK457G.js +0 -7
  322. package/dist/chunks/generate-cert-for-deploy-OMEACY5G.js +0 -7
  323. package/dist/chunks/image-AO2OZG4W.js +0 -7
  324. package/dist/chunks/import-builders-GSDV4K4A.js +0 -7
  325. package/dist/chunks/inspect-4244CRHI.js +0 -13
  326. package/dist/chunks/inspect-C43IV7X4.js +0 -9
  327. package/dist/chunks/inspect-RP5KXOYQ.js +0 -8
  328. package/dist/chunks/list-2SY6PZLC.js +0 -12
  329. package/dist/chunks/list-WBKZGIMQ.js +0 -8
  330. package/dist/chunks/login-K6XBWOFD.js +0 -9
  331. package/dist/chunks/login-OGMXEW5N.js +0 -7
  332. package/dist/chunks/logs-R3ZERQ7M.js +0 -7
  333. package/dist/chunks/ls-EVAQD3LI.js +0 -8
  334. package/dist/chunks/ls-O5DKK3TY.js +0 -8
  335. package/dist/chunks/ls-PTHGXQLK.js +0 -11
  336. package/dist/chunks/mutate-EKZWPQQJ.js +0 -9
  337. package/dist/chunks/notifications-F5S3RKZF.js +0 -7
  338. package/dist/chunks/open-KGVG54NN.js +0 -7
  339. package/dist/chunks/openapi-7TPDTMCU.js +0 -7
  340. package/dist/chunks/permissions-5K7JZOMB.js +0 -7
  341. package/dist/chunks/prompt-missing-credentials-DX2KJB5X.js +0 -7
  342. package/dist/chunks/publish-KIRTO2ZO.js +0 -15
  343. package/dist/chunks/pull-3CRJK7BX.js +0 -7
  344. package/dist/chunks/purchase-domain-if-available-55IXEF43.js +0 -7
  345. package/dist/chunks/push-4YG5HKSD.js +0 -7
  346. package/dist/chunks/query-67KQVLTR.js +0 -12
  347. package/dist/chunks/reauthenticate-SWSBFGDU.js +0 -7
  348. package/dist/chunks/remove-SYTIFVWW.js +0 -9
  349. package/dist/chunks/reorder-TX5MXJEB.js +0 -10
  350. package/dist/chunks/reply-XVK33N5T.js +0 -9
  351. package/dist/chunks/resolve-JZ262ZF4.js +0 -12
  352. package/dist/chunks/resolve-agent-team-BG5YW55B.js +0 -7
  353. package/dist/chunks/restore-IPFL7TKT.js +0 -16
  354. package/dist/chunks/rm-2BCAZGQU.js +0 -8
  355. package/dist/chunks/rm-3CCU3CE6.js +0 -8
  356. package/dist/chunks/rm-5CQV5LYG.js +0 -8
  357. package/dist/chunks/rm-OV4OU6H2.js +0 -8
  358. package/dist/chunks/rm-WFGMOZ3G.js +0 -8
  359. package/dist/chunks/rule-inspect-RFJIIXZH.js +0 -8
  360. package/dist/chunks/schema-SUNFQGUL.js +0 -14
  361. package/dist/chunks/select-org-MPHPWWPU.js +0 -7
  362. package/dist/chunks/set-BR6EEOPB.js +0 -7
  363. package/dist/chunks/set-I3NWZRSI.js +0 -9
  364. package/dist/chunks/setup-and-link-MRTKVOWD.js +0 -7
  365. package/dist/chunks/tags-7DIZEAVE.js +0 -7
  366. package/dist/chunks/usage-3BS7JCCU.js +0 -13
  367. package/dist/chunks/validate-config-LAD7BU3B.js +0 -7
  368. package/dist/launcher-errors.js +0 -11
  369. package/dist/native-download.js +0 -8
@@ -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-VRH7LWOC.js";import{formatOption,jsonOption,limitOption,nextCursorOption,projectOption,sinceOption,untilOption}from"./chunk-AMPJ6RWT.js";var typesSubcommand={name:"types",aliases:[],description:"List available event types with descriptions.",arguments:[],options:[formatOption,jsonOption],examples:[{name:"List all event types",value:`${packageName} activity types`},{name:"Output JSON",value:`${packageName} activity types --json`}]},activityCommand={name:"activity",aliases:[],description:"List user activity events.",arguments:[],subcommands:[{name:"ls",aliases:["list"],description:"",default:!0,hidden:!0,arguments:[],options:[],examples:[]},typesSubcommand],options:[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by event type. Repeatable and comma-separated (e.g. --type deployment --type project-created or --type deployment,project-created)."},sinceOption,untilOption,{...projectOption,shorthand:"p",description:"Filter by project (overrides auto-detected linked project)."},{name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"Show all team events (ignore linked project auto-scoping)."},limitOption,nextCursorOption,formatOption,jsonOption],examples:[{name:"List events for the linked project",value:`${packageName} activity`},{name:"Filter events by multiple types",value:`${packageName} activity --type deployment --type project-created --since 7d`},{name:"Filter events by comma-separated types",value:`${packageName} activity --type deployment,project-created --since 7d`},{name:"List all team events",value:`${packageName} activity --all --since 30d`},{name:"Output JSON",value:`${packageName} activity --json | jq '.events[]'`},{name:"List activity event types",value:`${packageName} activity types`}]};export{typesSubcommand,activityCommand};
7
+ import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,jsonOption,limitOption,nextCursorOption,projectOption,sinceOption,untilOption}from"./chunk-EZVNGJN5.js";var typesSubcommand={name:"types",aliases:[],description:"List available event types with descriptions.",arguments:[],options:[formatOption,jsonOption],examples:[{name:"List all event types",value:`${packageName} activity types`},{name:"Output JSON",value:`${packageName} activity types --json`}]},activityCommand={name:"activity",aliases:[],description:"List user activity events.",arguments:[],subcommands:[{name:"ls",aliases:["list"],description:"",default:!0,hidden:!0,arguments:[],options:[],examples:[]},typesSubcommand],options:[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by event type. Repeatable and comma-separated (e.g. --type deployment --type project-created or --type deployment,project-created)."},sinceOption,untilOption,{...projectOption,shorthand:"p",description:"Filter by project (overrides auto-detected linked project)."},{name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"Show all team events (ignore linked project auto-scoping)."},limitOption,nextCursorOption,formatOption,jsonOption],examples:[{name:"List events for the linked project",value:`${packageName} activity`},{name:"Filter events by multiple types",value:`${packageName} activity --type deployment --type project-created --since 7d`},{name:"Filter events by comma-separated types",value:`${packageName} activity --type deployment,project-created --since 7d`},{name:"List all team events",value:`${packageName} activity --all --since 30d`},{name:"Output JSON",value:`${packageName} activity --json | jq '.events[]'`},{name:"List activity event types",value:`${packageName} activity types`}]};export{typesSubcommand,activityCommand};
@@ -4,10 +4,10 @@ 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_ci_info}from"./chunk-2EYYB6YN.js";import{isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_graceful_fs,require_load_json_file,require_pify}from"./chunk-4NTBYNFR.js";import{UNCLASSIFIED_ERROR_CODE,output_manager_default,peekCliError}from"./chunk-GZLYNPNU.js";import{require_signal_exit}from"./chunk-BLUPZPAS.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_dist}from"./chunk-PUKYAALC.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_imurmurhash=__commonJS({"../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports,module){(function(){var cache;function MurmurHash3(key,seed){var m=this instanceof MurmurHash3?this:cache;if(m.reset(seed),typeof key=="string"&&key.length>0&&m.hash(key),m!==this)return m}MurmurHash3.prototype.hash=function(key){var h1,k1,i,top,len;switch(len=key.length,this.len+=len,k1=this.k1,i=0,this.rem){case 0:k1^=len>i?key.charCodeAt(i++)&65535:0;case 1:k1^=len>i?(key.charCodeAt(i++)&65535)<<8:0;case 2:k1^=len>i?(key.charCodeAt(i++)&65535)<<16:0;case 3:k1^=len>i?(key.charCodeAt(i)&255)<<24:0,k1^=len>i?(key.charCodeAt(i++)&65280)>>8:0}if(this.rem=len+this.rem&3,len-=this.rem,len>0){for(h1=this.h1;k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196&4294967295,!(i>=len);)k1=key.charCodeAt(i++)&65535^(key.charCodeAt(i++)&65535)<<8^(key.charCodeAt(i++)&65535)<<16,top=key.charCodeAt(i++),k1^=(top&255)<<24^(top&65280)>>8;switch(k1=0,this.rem){case 3:k1^=(key.charCodeAt(i+2)&65535)<<16;case 2:k1^=(key.charCodeAt(i+1)&65535)<<8;case 1:k1^=key.charCodeAt(i)&65535}this.h1=h1}return this.k1=k1,this},MurmurHash3.prototype.result=function(){var k1,h1;return k1=this.k1,h1=this.h1,k1>0&&(k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1),h1^=this.len,h1^=h1>>>16,h1=h1*51819+(h1&65535)*2246770688&4294967295,h1^=h1>>>13,h1=h1*44597+(h1&65535)*3266445312&4294967295,h1^=h1>>>16,h1>>>0},MurmurHash3.prototype.reset=function(seed){return this.h1=typeof seed=="number"?seed:0,this.rem=this.k1=this.len=0,this},cache=new MurmurHash3,typeof module<"u"?module.exports=MurmurHash3:this.MurmurHash3=MurmurHash3})()}});var require_write_file_atomic=__commonJS({"../../node_modules/.pnpm/write-file-atomic@2.4.3/node_modules/write-file-atomic/index.js"(exports,module){"use strict";module.exports=writeFile;module.exports.sync=writeFileSync2;module.exports._getTmpname=getTmpname;module.exports._cleanupOnExit=cleanupOnExit;var fs=require_graceful_fs(),MurmurHash3=require_imurmurhash(),onExit=require_signal_exit(),path=__require("path"),activeFiles={},threadId=function(){try{var workerThreads=__require("worker_threads");return workerThreads.threadId}catch{return 0}}(),invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return function(){try{fs.unlinkSync(typeof tmpfile=="function"?tmpfile():tmpfile)}catch{}}}function writeFile(filename,data,options,callback){options?options instanceof Function?(callback=options,options={}):typeof options=="string"&&(options={encoding:options}):options={};var Promise2=options.Promise||global.Promise,truename,fd,tmpfile,removeOnExitHandler=onExit(cleanupOnExit(()=>tmpfile)),absoluteName=path.resolve(filename);new Promise2(function(resolve){activeFiles[absoluteName]||(activeFiles[absoluteName]=[]),activeFiles[absoluteName].push(resolve),activeFiles[absoluteName].length===1&&resolve()}).then(function(){return new Promise2(function(resolve){fs.realpath(filename,function(_,realname){truename=realname||filename,tmpfile=getTmpname(truename),resolve()})})}).then(function(){return new Promise2(function(resolve){options.mode&&options.chown?resolve():fs.stat(truename,function(err,stats){err||!stats||(options=Object.assign({},options),options.mode==null&&(options.mode=stats.mode),options.chown==null&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})),resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.open(tmpfile,"w",options.mode,function(err,_fd){fd=_fd,err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){Buffer.isBuffer(data)?fs.write(fd,data,0,data.length,0,function(err){err?reject(err):resolve()}):data!=null?fs.write(fd,String(data),0,String(options.encoding||"utf8"),function(err){err?reject(err):resolve()}):resolve()})}).then(function(){return new Promise2(function(resolve,reject){options.fsync!==!1?fs.fsync(fd,function(err){err?fs.close(fd,()=>reject(err)):fs.close(fd,resolve)}):fs.close(fd,resolve)})}).then(function(){if(fd=null,options.chown)return new Promise2(function(resolve,reject){fs.chown(tmpfile,options.chown.uid,options.chown.gid,function(err){err?reject(err):resolve()})})}).then(function(){if(options.mode)return new Promise2(function(resolve,reject){fs.chmod(tmpfile,options.mode,function(err){err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.rename(tmpfile,truename,function(err){err?reject(err):resolve()})})}).then(function(){removeOnExitHandler(),callback()},function(err){return new Promise2(resolve=>fd?fs.close(fd,resolve):resolve()).then(()=>{removeOnExitHandler(),fs.unlink(tmpfile,function(){callback(err)})})}).then(function(){activeFiles[absoluteName].shift(),activeFiles[absoluteName].length>0?activeFiles[absoluteName][0]():delete activeFiles[absoluteName]})}function writeFileSync2(filename,data,options){typeof options=="string"?options={encoding:options}:options||(options={});try{filename=fs.realpathSync(filename)}catch{}var tmpfile=getTmpname(filename);if(!options.mode||!options.chown)try{var stats=fs.statSync(filename);options=Object.assign({},options),options.mode||(options.mode=stats.mode),!options.chown&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})}catch{}var fd,cleanup=cleanupOnExit(tmpfile),removeOnExitHandler=onExit(cleanup);try{fd=fs.openSync(tmpfile,"w",options.mode),Buffer.isBuffer(data)?fs.writeSync(fd,data,0,data.length,0):data!=null&&fs.writeSync(fd,String(data),0,String(options.encoding||"utf8")),options.fsync!==!1&&fs.fsyncSync(fd),fs.closeSync(fd),options.chown&&fs.chownSync(tmpfile,options.chown.uid,options.chown.gid),options.mode&&fs.chmodSync(tmpfile,options.mode),fs.renameSync(tmpfile,filename),removeOnExitHandler()}catch(err){if(fd)try{fs.closeSync(fd)}catch{}throw removeOnExitHandler(),cleanup(),err}}}});var require_is_plain_obj=__commonJS({"../../node_modules/.pnpm/is-plain-obj@1.1.0/node_modules/is-plain-obj/index.js"(exports,module){"use strict";var toString=Object.prototype.toString;module.exports=function(x){var prototype;return toString.call(x)==="[object Object]"&&(prototype=Object.getPrototypeOf(x),prototype===null||prototype===Object.getPrototypeOf({}))}}});var require_sort_keys=__commonJS({"../../node_modules/.pnpm/sort-keys@1.1.2/node_modules/sort-keys/index.js"(exports,module){"use strict";var isPlainObj=require_is_plain_obj();module.exports=function(obj,opts){if(!isPlainObj(obj))throw new TypeError("Expected a plain object");opts=opts||{},typeof opts=="function"&&(opts={compare:opts});var deep=opts.deep,seenInput=[],seenOutput=[],sortKeys=function(x){var seenIndex=seenInput.indexOf(x);if(seenIndex!==-1)return seenOutput[seenIndex];var ret={},keys=Object.keys(x).sort(opts.compare);seenInput.push(x),seenOutput.push(ret);for(var i=0;i<keys.length;i++){var key=keys[i],val=x[key];ret[key]=deep&&isPlainObj(val)?sortKeys(val):val}return ret};return sortKeys(obj)}}});var require_pify2=__commonJS({"../../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js"(exports,module){"use strict";var processFn=(fn,opts)=>function(){let P=opts.promiseModule,args=new Array(arguments.length);for(let i=0;i<arguments.length;i++)args[i]=arguments[i];return new P((resolve,reject)=>{opts.errorFirst?args.push(function(err,result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=1;i<arguments.length;i++)results[i-1]=arguments[i];err?(results.unshift(err),reject(results)):resolve(results)}else err?reject(err):resolve(result)}):args.push(function(result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=0;i<arguments.length;i++)results[i]=arguments[i];resolve(results)}else resolve(result)}),fn.apply(this,args)})};module.exports=(obj,opts)=>{opts=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},opts);let filter=key=>{let match=pattern=>typeof pattern=="string"?key===pattern:pattern.test(key);return opts.include?opts.include.some(match):!opts.exclude.some(match)},ret;typeof obj=="function"?ret=function(){return opts.excludeMain?obj.apply(this,arguments):processFn(obj,opts).apply(this,arguments)}:ret=Object.create(Object.getPrototypeOf(obj));for(let key in obj){let x=obj[key];ret[key]=typeof x=="function"&&filter(key)?processFn(x,opts):x}return ret}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/make-dir@1.3.0/node_modules/make-dir/index.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),pify=require_pify2(),defaults={mode:511&~process.umask(),fs},checkPath=pth=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let err=new Error(`Path contains invalid characters: ${pth}`);throw err.code="EINVAL",err}};module.exports=(input,opts)=>Promise.resolve().then(()=>{checkPath(input),opts=Object.assign({},defaults,opts);let mkdir=pify(opts.fs.mkdir),stat=pify(opts.fs.stat),make=pth=>mkdir(pth,opts.mode).then(()=>pth).catch(err=>{if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)).then(()=>make(pth))}return stat(pth).then(stats=>stats.isDirectory()?pth:Promise.reject()).catch(()=>{throw err})});return make(path.resolve(input))});module.exports.sync=(input,opts)=>{checkPath(input),opts=Object.assign({},defaults,opts);let make=pth=>{try{opts.fs.mkdirSync(pth,opts.mode)}catch(err){if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)),make(pth)}try{if(!opts.fs.statSync(pth).isDirectory())throw new Error("The path is not a directory")}catch{throw err}}return pth};return make(path.resolve(input))}}});var require_detect_indent=__commonJS({"../../node_modules/.pnpm/detect-indent@5.0.0/node_modules/detect-indent/index.js"(exports,module){"use strict";var INDENT_RE=/^(?:( )+|\t+)/;function getMostUsed(indents){let result=0,maxUsed=0,maxWeight=0;for(let entry of indents){let key=entry[0],val=entry[1],u=val[0],w=val[1];(u>maxUsed||u===maxUsed&&w>maxWeight)&&(maxUsed=u,maxWeight=w,result=Number(key))}return result}module.exports=str=>{if(typeof str!="string")throw new TypeError("Expected a string");let tabs=0,spaces=0,prev=0,indents=new Map,current,isIndent;for(let line of str.split(/\n/g)){if(!line)continue;let indent2,matches=line.match(INDENT_RE);matches?(indent2=matches[0].length,matches[1]?spaces++:tabs++):indent2=0;let diff=indent2-prev;prev=indent2,diff?(isIndent=diff>0,current=indents.get(isIndent?diff:-diff),current?current[0]++:(current=[1,0],indents.set(diff,current))):current&&(current[1]+=Number(isIndent))}let amount=getMostUsed(indents),type,indent;return amount?spaces>=tabs?(type="space",indent=" ".repeat(amount)):(type="tab",indent=" ".repeat(amount)):(type=null,indent=""),{amount,type,indent}}}});var require_write_json_file=__commonJS({"../../node_modules/.pnpm/write-json-file@2.2.0/node_modules/write-json-file/index.js"(exports,module){"use strict";var path=__require("path"),fs=require_graceful_fs(),writeFileAtomic=require_write_file_atomic(),sortKeys=require_sort_keys(),makeDir=require_make_dir(),pify=require_pify(),detectIndent=require_detect_indent(),init=(fn,fp,data,opts)=>{if(!fp)throw new TypeError("Expected a filepath");if(data===void 0)throw new TypeError("Expected data to stringify");return opts=Object.assign({indent:" ",sortKeys:!1},opts),opts.sortKeys&&(data=sortKeys(data,{deep:!0,compare:typeof opts.sortKeys=="function"&&opts.sortKeys})),fn(fp,data,opts)},readFile=fp=>pify(fs.readFile)(fp,"utf8").catch(()=>{}),main=(fp,data,opts)=>(opts.detectIndent?readFile(fp):Promise.resolve()).then(str=>{let indent=str?detectIndent(str).indent:opts.indent,json=JSON.stringify(data,opts.replacer,indent);return pify(writeFileAtomic)(fp,`${json}
7
+ import{require_ci_info}from"./chunk-2EYYB6YN.js";import{isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_graceful_fs,require_load_json_file,require_pify}from"./chunk-4NTBYNFR.js";import{UNCLASSIFIED_ERROR_CODE,output_manager_default,peekCliError}from"./chunk-YNCWSPPJ.js";import{require_signal_exit}from"./chunk-BLUPZPAS.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_dist}from"./chunk-24SIHFEW.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_imurmurhash=__commonJS({"../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports,module){(function(){var cache;function MurmurHash3(key,seed){var m=this instanceof MurmurHash3?this:cache;if(m.reset(seed),typeof key=="string"&&key.length>0&&m.hash(key),m!==this)return m}MurmurHash3.prototype.hash=function(key){var h1,k1,i,top,len;switch(len=key.length,this.len+=len,k1=this.k1,i=0,this.rem){case 0:k1^=len>i?key.charCodeAt(i++)&65535:0;case 1:k1^=len>i?(key.charCodeAt(i++)&65535)<<8:0;case 2:k1^=len>i?(key.charCodeAt(i++)&65535)<<16:0;case 3:k1^=len>i?(key.charCodeAt(i)&255)<<24:0,k1^=len>i?(key.charCodeAt(i++)&65280)>>8:0}if(this.rem=len+this.rem&3,len-=this.rem,len>0){for(h1=this.h1;k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196&4294967295,!(i>=len);)k1=key.charCodeAt(i++)&65535^(key.charCodeAt(i++)&65535)<<8^(key.charCodeAt(i++)&65535)<<16,top=key.charCodeAt(i++),k1^=(top&255)<<24^(top&65280)>>8;switch(k1=0,this.rem){case 3:k1^=(key.charCodeAt(i+2)&65535)<<16;case 2:k1^=(key.charCodeAt(i+1)&65535)<<8;case 1:k1^=key.charCodeAt(i)&65535}this.h1=h1}return this.k1=k1,this},MurmurHash3.prototype.result=function(){var k1,h1;return k1=this.k1,h1=this.h1,k1>0&&(k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1),h1^=this.len,h1^=h1>>>16,h1=h1*51819+(h1&65535)*2246770688&4294967295,h1^=h1>>>13,h1=h1*44597+(h1&65535)*3266445312&4294967295,h1^=h1>>>16,h1>>>0},MurmurHash3.prototype.reset=function(seed){return this.h1=typeof seed=="number"?seed:0,this.rem=this.k1=this.len=0,this},cache=new MurmurHash3,typeof module<"u"?module.exports=MurmurHash3:this.MurmurHash3=MurmurHash3})()}});var require_write_file_atomic=__commonJS({"../../node_modules/.pnpm/write-file-atomic@2.4.3/node_modules/write-file-atomic/index.js"(exports,module){"use strict";module.exports=writeFile;module.exports.sync=writeFileSync2;module.exports._getTmpname=getTmpname;module.exports._cleanupOnExit=cleanupOnExit;var fs=require_graceful_fs(),MurmurHash3=require_imurmurhash(),onExit=require_signal_exit(),path=__require("path"),activeFiles={},threadId=function(){try{var workerThreads=__require("worker_threads");return workerThreads.threadId}catch{return 0}}(),invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return function(){try{fs.unlinkSync(typeof tmpfile=="function"?tmpfile():tmpfile)}catch{}}}function writeFile(filename,data,options,callback){options?options instanceof Function?(callback=options,options={}):typeof options=="string"&&(options={encoding:options}):options={};var Promise2=options.Promise||global.Promise,truename,fd,tmpfile,removeOnExitHandler=onExit(cleanupOnExit(()=>tmpfile)),absoluteName=path.resolve(filename);new Promise2(function(resolve){activeFiles[absoluteName]||(activeFiles[absoluteName]=[]),activeFiles[absoluteName].push(resolve),activeFiles[absoluteName].length===1&&resolve()}).then(function(){return new Promise2(function(resolve){fs.realpath(filename,function(_,realname){truename=realname||filename,tmpfile=getTmpname(truename),resolve()})})}).then(function(){return new Promise2(function(resolve){options.mode&&options.chown?resolve():fs.stat(truename,function(err,stats){err||!stats||(options=Object.assign({},options),options.mode==null&&(options.mode=stats.mode),options.chown==null&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})),resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.open(tmpfile,"w",options.mode,function(err,_fd){fd=_fd,err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){Buffer.isBuffer(data)?fs.write(fd,data,0,data.length,0,function(err){err?reject(err):resolve()}):data!=null?fs.write(fd,String(data),0,String(options.encoding||"utf8"),function(err){err?reject(err):resolve()}):resolve()})}).then(function(){return new Promise2(function(resolve,reject){options.fsync!==!1?fs.fsync(fd,function(err){err?fs.close(fd,()=>reject(err)):fs.close(fd,resolve)}):fs.close(fd,resolve)})}).then(function(){if(fd=null,options.chown)return new Promise2(function(resolve,reject){fs.chown(tmpfile,options.chown.uid,options.chown.gid,function(err){err?reject(err):resolve()})})}).then(function(){if(options.mode)return new Promise2(function(resolve,reject){fs.chmod(tmpfile,options.mode,function(err){err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.rename(tmpfile,truename,function(err){err?reject(err):resolve()})})}).then(function(){removeOnExitHandler(),callback()},function(err){return new Promise2(resolve=>fd?fs.close(fd,resolve):resolve()).then(()=>{removeOnExitHandler(),fs.unlink(tmpfile,function(){callback(err)})})}).then(function(){activeFiles[absoluteName].shift(),activeFiles[absoluteName].length>0?activeFiles[absoluteName][0]():delete activeFiles[absoluteName]})}function writeFileSync2(filename,data,options){typeof options=="string"?options={encoding:options}:options||(options={});try{filename=fs.realpathSync(filename)}catch{}var tmpfile=getTmpname(filename);if(!options.mode||!options.chown)try{var stats=fs.statSync(filename);options=Object.assign({},options),options.mode||(options.mode=stats.mode),!options.chown&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})}catch{}var fd,cleanup=cleanupOnExit(tmpfile),removeOnExitHandler=onExit(cleanup);try{fd=fs.openSync(tmpfile,"w",options.mode),Buffer.isBuffer(data)?fs.writeSync(fd,data,0,data.length,0):data!=null&&fs.writeSync(fd,String(data),0,String(options.encoding||"utf8")),options.fsync!==!1&&fs.fsyncSync(fd),fs.closeSync(fd),options.chown&&fs.chownSync(tmpfile,options.chown.uid,options.chown.gid),options.mode&&fs.chmodSync(tmpfile,options.mode),fs.renameSync(tmpfile,filename),removeOnExitHandler()}catch(err){if(fd)try{fs.closeSync(fd)}catch{}throw removeOnExitHandler(),cleanup(),err}}}});var require_is_plain_obj=__commonJS({"../../node_modules/.pnpm/is-plain-obj@1.1.0/node_modules/is-plain-obj/index.js"(exports,module){"use strict";var toString=Object.prototype.toString;module.exports=function(x){var prototype;return toString.call(x)==="[object Object]"&&(prototype=Object.getPrototypeOf(x),prototype===null||prototype===Object.getPrototypeOf({}))}}});var require_sort_keys=__commonJS({"../../node_modules/.pnpm/sort-keys@1.1.2/node_modules/sort-keys/index.js"(exports,module){"use strict";var isPlainObj=require_is_plain_obj();module.exports=function(obj,opts){if(!isPlainObj(obj))throw new TypeError("Expected a plain object");opts=opts||{},typeof opts=="function"&&(opts={compare:opts});var deep=opts.deep,seenInput=[],seenOutput=[],sortKeys=function(x){var seenIndex=seenInput.indexOf(x);if(seenIndex!==-1)return seenOutput[seenIndex];var ret={},keys=Object.keys(x).sort(opts.compare);seenInput.push(x),seenOutput.push(ret);for(var i=0;i<keys.length;i++){var key=keys[i],val=x[key];ret[key]=deep&&isPlainObj(val)?sortKeys(val):val}return ret};return sortKeys(obj)}}});var require_pify2=__commonJS({"../../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js"(exports,module){"use strict";var processFn=(fn,opts)=>function(){let P=opts.promiseModule,args=new Array(arguments.length);for(let i=0;i<arguments.length;i++)args[i]=arguments[i];return new P((resolve,reject)=>{opts.errorFirst?args.push(function(err,result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=1;i<arguments.length;i++)results[i-1]=arguments[i];err?(results.unshift(err),reject(results)):resolve(results)}else err?reject(err):resolve(result)}):args.push(function(result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=0;i<arguments.length;i++)results[i]=arguments[i];resolve(results)}else resolve(result)}),fn.apply(this,args)})};module.exports=(obj,opts)=>{opts=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},opts);let filter=key=>{let match=pattern=>typeof pattern=="string"?key===pattern:pattern.test(key);return opts.include?opts.include.some(match):!opts.exclude.some(match)},ret;typeof obj=="function"?ret=function(){return opts.excludeMain?obj.apply(this,arguments):processFn(obj,opts).apply(this,arguments)}:ret=Object.create(Object.getPrototypeOf(obj));for(let key in obj){let x=obj[key];ret[key]=typeof x=="function"&&filter(key)?processFn(x,opts):x}return ret}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/make-dir@1.3.0/node_modules/make-dir/index.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),pify=require_pify2(),defaults={mode:511&~process.umask(),fs},checkPath=pth=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let err=new Error(`Path contains invalid characters: ${pth}`);throw err.code="EINVAL",err}};module.exports=(input,opts)=>Promise.resolve().then(()=>{checkPath(input),opts=Object.assign({},defaults,opts);let mkdir=pify(opts.fs.mkdir),stat=pify(opts.fs.stat),make=pth=>mkdir(pth,opts.mode).then(()=>pth).catch(err=>{if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)).then(()=>make(pth))}return stat(pth).then(stats=>stats.isDirectory()?pth:Promise.reject()).catch(()=>{throw err})});return make(path.resolve(input))});module.exports.sync=(input,opts)=>{checkPath(input),opts=Object.assign({},defaults,opts);let make=pth=>{try{opts.fs.mkdirSync(pth,opts.mode)}catch(err){if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)),make(pth)}try{if(!opts.fs.statSync(pth).isDirectory())throw new Error("The path is not a directory")}catch{throw err}}return pth};return make(path.resolve(input))}}});var require_detect_indent=__commonJS({"../../node_modules/.pnpm/detect-indent@5.0.0/node_modules/detect-indent/index.js"(exports,module){"use strict";var INDENT_RE=/^(?:( )+|\t+)/;function getMostUsed(indents){let result=0,maxUsed=0,maxWeight=0;for(let entry of indents){let key=entry[0],val=entry[1],u=val[0],w=val[1];(u>maxUsed||u===maxUsed&&w>maxWeight)&&(maxUsed=u,maxWeight=w,result=Number(key))}return result}module.exports=str=>{if(typeof str!="string")throw new TypeError("Expected a string");let tabs=0,spaces=0,prev=0,indents=new Map,current,isIndent;for(let line of str.split(/\n/g)){if(!line)continue;let indent2,matches=line.match(INDENT_RE);matches?(indent2=matches[0].length,matches[1]?spaces++:tabs++):indent2=0;let diff=indent2-prev;prev=indent2,diff?(isIndent=diff>0,current=indents.get(isIndent?diff:-diff),current?current[0]++:(current=[1,0],indents.set(diff,current))):current&&(current[1]+=Number(isIndent))}let amount=getMostUsed(indents),type,indent;return amount?spaces>=tabs?(type="space",indent=" ".repeat(amount)):(type="tab",indent=" ".repeat(amount)):(type=null,indent=""),{amount,type,indent}}}});var require_write_json_file=__commonJS({"../../node_modules/.pnpm/write-json-file@2.2.0/node_modules/write-json-file/index.js"(exports,module){"use strict";var path=__require("path"),fs=require_graceful_fs(),writeFileAtomic=require_write_file_atomic(),sortKeys=require_sort_keys(),makeDir=require_make_dir(),pify=require_pify(),detectIndent=require_detect_indent(),init=(fn,fp,data,opts)=>{if(!fp)throw new TypeError("Expected a filepath");if(data===void 0)throw new TypeError("Expected data to stringify");return opts=Object.assign({indent:" ",sortKeys:!1},opts),opts.sortKeys&&(data=sortKeys(data,{deep:!0,compare:typeof opts.sortKeys=="function"&&opts.sortKeys})),fn(fp,data,opts)},readFile=fp=>pify(fs.readFile)(fp,"utf8").catch(()=>{}),main=(fp,data,opts)=>(opts.detectIndent?readFile(fp):Promise.resolve()).then(str=>{let indent=str?detectIndent(str).indent:opts.indent,json=JSON.stringify(data,opts.replacer,indent);return pify(writeFileAtomic)(fp,`${json}
8
8
  `,{mode:opts.mode})}),mainSync=(fp,data,opts)=>{let indent=opts.indent;if(opts.detectIndent)try{let file=fs.readFileSync(fp,"utf8");indent=detectIndent(file).indent}catch(err){if(err.code!=="ENOENT")throw err}let json=JSON.stringify(data,opts.replacer,indent);return writeFileAtomic.sync(fp,`${json}
9
- `,{mode:opts.mode})};module.exports=(fp,data,opts)=>makeDir(path.dirname(fp),{fs}).then(()=>init(main,fp,data,opts));module.exports.sync=(fp,data,opts)=>{makeDir.sync(path.dirname(fp),{fs}),init(mainSync,fp,data,opts)}}});var import_ci_info=__toESM(require_ci_info(),1);var launchTargets=["cli-support","darwin-arm64","darwin-x64","linux-arm64","linux-arm64-musl","linux-x64","linux-x64-musl","win32-arm64","win32-x64"],launchFallbackReasons=["target_missing","ENOENT","EACCES","ENOEXEC","EPERM","EFTYPE","UNKNOWN","opt_out","inherited_native_env","download_failed","cache_unwritable","not_in_node_modules"],launchSources=["download","cache"],downloadErrors=["timed_out","proxy_refused","proxy_auth_required","dns","connection_refused","connection_reset","connect_timeout","network","tls","http_403","http_404","http_other","checksum_mismatch","bad_metadata","no_binary","binary_did_not_start","binary_killed","binary_exited","version_mismatch","filesystem","other"],downloadPhases=["setup","metadata","tarball","extract","check","install"],downloadCodes=["ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","ETIMEDOUT","EHOSTUNREACH","ENETUNREACH","ENETDOWN","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","EACCES","EPERM","ENOSPC","EROFS","EEXIST","ENOENT","EISDIR","ENOTDIR","EDQUOT","EMFILE","Z_DATA_ERROR","Z_BUF_ERROR","SELF_SIGNED_CERT_IN_CHAIN","DEPTH_ZERO_SELF_SIGNED_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID","ENOEXEC","E2BIG","SIGKILL","SIGTERM","SIGABRT","SIGSEGV","SIGBUS","SIGILL","SIGTRAP"],downloadTimeouts=["metadata","stall","total"],downloadAttempts=["1","2"],downloadFailures=["1","2","3_or_more"],downloadProgress=["none","under_half","over_half","complete","unknown"],launchValues=["native","dist","cli-support","other","true","false","default","custom",...launchTargets,...launchFallbackReasons,...launchSources,...downloadErrors,...downloadPhases,...downloadCodes,...downloadTimeouts,...downloadAttempts,...downloadFailures,...downloadProgress];function oneOf(value,allowed){return typeof value=="string"&&allowed.includes(value)?value:"other"}function readLaunch(){let launch=globalThis[Symbol.for("vercel.cli.launch")];if(launch?.runtime==="native")return launch.source===void 0?{runtime:"native"}:{runtime:"native",source:oneOf(launch.source,launchSources),...launch.downloadAttempts!==void 0&&{downloadAttempts:oneOf(launch.downloadAttempts,downloadAttempts)}};if(launch?.runtime==="cli-support")return{runtime:"cli-support"};if(launch?.runtime==="dist")return{runtime:"dist",target:oneOf(launch.target,launchTargets),reason:oneOf(launch.reason,launchFallbackReasons),...launch.downloadError!==void 0&&{downloadError:oneOf(launch.downloadError,downloadErrors)},...launch.downloadPhase!==void 0&&{downloadPhase:oneOf(launch.downloadPhase,downloadPhases)},...launch.downloadCode!==void 0&&{downloadCode:oneOf(launch.downloadCode,downloadCodes)},...launch.downloadAttempts!==void 0&&{downloadAttempts:oneOf(launch.downloadAttempts,downloadAttempts)},...launch.downloadFailures!==void 0&&{downloadFailures:oneOf(launch.downloadFailures,downloadFailures)},...launch.downloadTimeout!==void 0&&{downloadTimeout:oneOf(launch.downloadTimeout,downloadTimeouts)},...launch.downloadProgress!==void 0&&{downloadProgress:oneOf(launch.downloadProgress,downloadProgress)},...launch.downloadProxy!==void 0&&{downloadProxy:oneOf(launch.downloadProxy,["true","false"])},...launch.npmRegistry!==void 0&&{npmRegistry:oneOf(launch.npmRegistry,["default","custom"])},...launch.npmProxy!==void 0&&{npmProxy:oneOf(launch.npmProxy,["true","false"])},...launch.npmTls!==void 0&&{npmTls:oneOf(launch.npmTls,["true","false"])}}}function launchTags(launch){return launch?launch.runtime==="native"?{launcher:"native",...launch.source&&{launcher_source:launch.source}}:launch.runtime==="cli-support"?{launcher:"cli-support"}:{launcher:"dist",launcher_target:launch.target,launcher_fallback:launch.reason,...launch.downloadError&&{launcher_download_error:launch.downloadError}}:{}}var BRIDGE_TAG=/^[a-zA-Z0-9_.:-]{1,80}$/,ERROR_CODE=/^[A-Za-z][A-Za-z0-9_-]{0,79}$/;function getStartupDurationMs(excludedMs=0){let entryAt=Reflect.get(globalThis,Symbol.for("vercel.cli.entry-at"));return typeof entryAt=="number"?Math.max(0,performance.now()-entryAt-excludedMs):void 0}function getOutcome({exitCode,completion}){return exitCode===130?"canceled":exitCode!==0?"failure":completion==="process_exit"?"unknown":"success"}function toCommandTrace(event,context){let tags={command:context.command,invocation_id:context.invocationId,cli_version:context.cliVersion,release_channel:context.releaseChannel,platform:process.platform,arch:process.arch,is_agent:String(context.isAgent),exit_code:String(context.exitCode),completion:context.completion,outcome:getOutcome(context)};if(tags.outcome==="failure"){let details=peekCliError();tags.error_code=details?.code&&ERROR_CODE.test(details.code)?details.code:UNCLASSIFIED_ERROR_CODE,tags.error_source=context.errorSource??(details?"recorded":"unknown")}return context.agentName&&BRIDGE_TAG.test(context.agentName)&&(tags.agent_name=context.agentName),import_ci_info.default.id&&(tags.ci=import_ci_info.default.id),context.subcommand&&BRIDGE_TAG.test(context.subcommand)&&(tags.subcommand=context.subcommand),context.startupDurationMs!==void 0&&(tags.startup_duration_ms=context.startupDurationMs.toFixed(3)),Object.assign(tags,launchTags(readLaunch())),{id:event.id,name:event.name,timestamp:event.timestamp,startTime:event.startTime,duration:event.duration,tags}}var SPAN_NAME=/^vc(?:\.[a-zA-Z0-9_.]{1,77})?$/,safeCount=value=>/^(0|[1-9][0-9]{0,15})$/.test(value)&&Number.isSafeInteger(Number(value))?value:void 0,SAFE_TAGS={phase:value=>BRIDGE_TAG.test(value)?value:void 0,http_method:value=>/^[A-Z]{1,7}$/.test(value)?value:void 0,http_route:value=>/^[a-z0-9/:*_-]{1,80}$/i.test(value)?value:void 0,http_status_code:value=>/^[1-5][0-9]{2}$/.test(value)?value:void 0,error:()=>"true",file_count:safeCount,byte_count:safeCount,function_count:safeCount,layer_count:safeCount,attempt:safeCount,dropped_spans:safeCount,cache_hit:value=>["true","false"].includes(value)?value:void 0,deployment_state:value=>["INITIALIZING","ANALYZING","BUILDING","DEPLOYING","READY","QUEUED","CANCELED","ERROR"].includes(value)?value:void 0},MAX_SPANS=1e3;function localWaterfall(command,events){let runId=command.parentId;if(!runId)return[];let candidates=events.filter(event=>event.name!=="vc.cli.command"&&event.id!==runId&&SPAN_NAME.test(event.name)),byId=new Map(candidates.map(event=>[event.id,event])),selected=new Map;for(let span of candidates){let chain=[],seen=new Set,current=span,complete=!1;for(;current&&!(seen.has(current.id)||chain.length>=31);){if(seen.add(current.id),chain.push(current),current.parentId===runId||current.parentId===command.id){complete=!0;break}current=byId.get(current.parentId??"")}let missing=chain.filter(ancestor=>!selected.has(ancestor.id));if(!(!complete||selected.size+missing.length>MAX_SPANS))for(let ancestor of missing.reverse())selected.set(ancestor.id,ancestor)}let commandEnd=command.timestamp+command.duration,spans=[...selected.values()].sort((a,b)=>a.timestamp-b.timestamp).map(span=>({id:span.id,name:span.name,timestamp:span.timestamp,startTime:span.startTime,duration:span.duration,parentId:span.parentId===runId&&span.timestamp>=command.timestamp&&span.timestamp<commandEnd?command.id:span.parentId,tags:Object.fromEntries(Object.entries(SAFE_TAGS).flatMap(([key,safe])=>{let value=span.tags[key]&&safe(span.tags[key]);return value?[[key,value]]:[]}))}));if(!spans.length)return[];let start=Math.min(command.timestamp,...spans.map(span=>span.timestamp)),end=Math.max(command.timestamp+command.duration,...spans.map(span=>span.timestamp+span.duration));return[{id:runId,name:"vc.cli.run",timestamp:start,startTime:command.startTime+Math.floor((start-command.timestamp)/1e3),duration:end-start,tags:selected.size<candidates.length?{dropped_spans:String(candidates.length-selected.size)}:{}},...spans]}import{randomUUID}from"node:crypto";function timings(){return Reflect.get(globalThis,Symbol.for("vercel.cli.startup-timings"))}function markStartup(phase){timings()?.marks.push({phase,timestamp:Number(process.hrtime.bigint()/BigInt(1e3))})}function startupEvents(command){let marks=timings()?.marks.filter(mark=>mark.timestamp<=command.timestamp);if(!marks?.length||!command.parentId)return[];let group={id:randomUUID(),parentId:command.parentId,name:"vc.cli.startup",timestamp:marks[0].timestamp,startTime:command.startTime+Math.floor((marks[0].timestamp-command.timestamp)/1e3),duration:command.timestamp-marks[0].timestamp,tags:{}};return[group,...marks.map((mark,index)=>({id:randomUUID(),parentId:group.id,name:`vc.cli.startup.${mark.phase}`,timestamp:mark.timestamp,startTime:command.startTime+Math.floor((mark.timestamp-command.timestamp)/1e3),duration:(marks[index+1]?.timestamp??command.timestamp)-mark.timestamp,tags:{}}))]}import{randomUUID as randomUUID3}from"node:crypto";import os from"node:os";var import_constants=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1);import{spawn}from"node:child_process";var import_load_json_file=__toESM(require_load_json_file(),1),import_write_json_file=__toESM(require_write_json_file(),1);import{randomUUID as randomUUID2}from"node:crypto";import{mkdirSync,renameSync,rmSync,writeFileSync}from"node:fs";import{dirname}from"node:path";import{readdirSync}from"node:fs";function isLibc(value){return value==="glibc"||value==="musl"}function hasMuslLoader(){try{return readdirSync("/lib").some(name=>name.startsWith("ld-musl-")&&name.endsWith(".so.1"))}catch{return!1}}function detectLibcFromReport(){let report=process.report;if(!report||typeof report.getReport!="function")return;let originalExcludeNetwork=report.excludeNetwork;try{report.excludeNetwork=!0;let{header}=report.getReport();return header?.glibcVersionRuntime?"glibc":"musl"}catch{return}finally{report.excludeNetwork=originalExcludeNetwork}}function detectLibc(){if(process.platform==="linux")return detectLibcFromReport()??(hasMuslLoader()?"musl":"glibc")}var DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS=30*60*1e3,DEFAULT_CLI_SESSION_MAX_LIFETIME_MS=24*60*60*1e3;function isPersistedCliSession(value){if(!value||typeof value!="object")return!1;let session=value;return typeof session.id=="string"&&typeof session.createdAt=="number"&&Number.isFinite(session.createdAt)&&typeof session.lastSeenAt=="number"&&Number.isFinite(session.lastSeenAt)}function isPersistedCliDevice(value){if(!value||typeof value!="object")return!1;let device=value;return typeof device.id=="string"&&(device.libc===void 0||isLibc(device.libc))}function readPersistedCliSession(filePath){try{let session=import_load_json_file.default.sync(filePath);return isPersistedCliSession(session)?session:null}catch{return null}}function writePersistedCliSession(filePath,session){let temporaryPath=`${filePath}.${process.pid}.${randomUUID2()}.tmp`;try{mkdirSync(dirname(filePath),{recursive:!0}),writeFileSync(temporaryPath,`${JSON.stringify(session,null,2)}
10
- `,{flag:"wx",mode:384}),renameSync(temporaryPath,filePath)}catch{}finally{try{rmSync(temporaryPath,{force:!0})}catch{}}}function readPersistedCliDevice(filePath){try{let device=import_load_json_file.default.sync(filePath);return isPersistedCliDevice(device)?device:null}catch{return null}}function writePersistedCliDevice(filePath,device){try{mkdirSync(dirname(filePath),{recursive:!0}),import_write_json_file.default.sync(filePath,device,{indent:2})}catch{}}function getOrCreatePersistedCliSession(opts){let now=opts.now?.()??Date.now(),inactivityTimeoutMs=opts.inactivityTimeoutMs??DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS,maxLifetimeMs=opts.maxLifetimeMs??DEFAULT_CLI_SESSION_MAX_LIFETIME_MS,existing=readPersistedCliSession(opts.filePath),session=existing&&now-existing.lastSeenAt<=inactivityTimeoutMs&&now-existing.createdAt<=maxLifetimeMs?{...existing,lastSeenAt:now}:{id:randomUUID2(),createdAt:now,lastSeenAt:now};return writePersistedCliSession(opts.filePath,session),session}function touchPersistedCliSession(opts,session){let nextSession={...session,lastSeenAt:opts.now?.()??Date.now()};return writePersistedCliSession(opts.filePath,nextSession),nextSession}function getOrCreatePersistedCliDevice(opts){let existing=readPersistedCliDevice(opts.filePath);if(existing?.libc)return existing;let libc=(opts.detectLibc??detectLibc)(),device={id:existing?.id??randomUUID2(),...libc?{libc}:{}};return(!existing||libc)&&writePersistedCliDevice(opts.filePath,device),device}import{gzipSync,gunzipSync}from"node:zlib";var COMPRESSION_THRESHOLD=64*1024,MAX_DECOMPRESSED_BYTES=4*1024*1024;function encodeHandoff(payload){let serialized=JSON.stringify(payload),bytes=Buffer.byteLength(serialized);return bytes>COMPRESSION_THRESHOLD&&bytes<=MAX_DECOMPRESSED_BYTES?gzipSync(serialized,{level:1}):serialized}function decodeHandoff(bytes){return(bytes[0]===31&&bytes[1]===139?gunzipSync(new Uint8Array(bytes),{maxOutputLength:MAX_DECOMPRESSED_BYTES}):bytes).toString("utf8")}var LogLabel="['telemetry']:",MAX_ERROR_SERVER_MESSAGE_LENGTH=500,TelemetryClient=class{constructor({opts}){this.redactedValue="[REDACTED]";this.noValueToTriggerPrompt="[TRIGGER_PROMPT]";this.redactedArgumentsLength=args=>args&&args.length===1?"ONE":args.length>1?"MANY":"NONE";this.redactedTargetName=target=>import_constants.PROJECT_ENV_TARGET.includes(target)?target:this.redactedValue;this.isDebug=opts.isDebug||!1,this.store=opts.store}track(eventData){this.isDebug&&output_manager_default.debug(`${LogLabel} ${eventData.key}:${eventData.value}`);let event={id:randomUUID3(),eventTime:Date.now(),...eventData};this.store.add(event)}trackCliCommand(eventData){this.track({key:`command:${eventData.command}`,value:eventData.value})}trackCliSubcommand(eventData){this.store.commandSubcommand=eventData.subcommand,this.track({key:`subcommand:${eventData.subcommand}`,value:eventData.value})}trackCliArgument(eventData){eventData.value&&this.track({key:`argument:${eventData.arg}`,value:eventData.value})}trackCliOption(eventData){this.track({key:`option:${eventData.option}`,value:eventData.value})}trackRedactedCliOption(option,value){value&&this.trackCliOption({option,value:this.redactedValue})}trackTargetEnvironment(targetEnvironment){this.track({key:"target_environment",value:targetEnvironment})}trackCommandOutput(eventData){this.track({key:`output:${eventData.key}`,value:eventData.value})}trackCliFlag(flag){this.track({key:`flag:${flag}`,value:"TRUE"})}trackDeprecatedShorthand(shorthand){this.track({key:"deprecated_shorthand",value:shorthand})}trackOidcTokenRefresh(count){this.track({key:"oidc-token-refresh",value:`${count}`})}trackDpopKeyStorage(storage){this.track({key:"dpop-key",value:storage})}trackCPUs(){this.track({key:"cpu_count",value:String(os.cpus().length)})}trackAgenticUse(agent){agent&&this.track({key:"agent",value:agent})}trackPlatform(){this.track({key:"platform",value:os.platform()})}trackArch(){this.track({key:"arch",value:os.arch()})}trackLibc(libc){libc&&this.track({key:"libc",value:libc})}trackLaunch(launch){this.track({key:"launcher",value:launch.runtime}),launch.runtime==="native"&&launch.source&&this.track({key:"launcher_source",value:launch.source}),launch.runtime==="native"&&launch.downloadAttempts&&this.track({key:"launcher_download_attempts",value:launch.downloadAttempts}),launch.runtime==="dist"&&(this.track({key:"launcher_target",value:launch.target}),this.track({key:"launcher_fallback",value:launch.reason}),launch.downloadError&&this.track({key:"launcher_download_error",value:launch.downloadError}),launch.downloadAttempts&&this.track({key:"launcher_download_attempts",value:launch.downloadAttempts}),launch.downloadFailures&&this.track({key:"launcher_download_failures",value:launch.downloadFailures}),launch.downloadPhase&&this.track({key:"launcher_download_phase",value:launch.downloadPhase}),launch.downloadCode&&this.track({key:"launcher_download_code",value:launch.downloadCode}),launch.downloadTimeout&&this.track({key:"launcher_download_timeout",value:launch.downloadTimeout}),launch.downloadProgress&&this.track({key:"launcher_download_progress",value:launch.downloadProgress}),launch.downloadProxy&&this.track({key:"launcher_download_proxy",value:launch.downloadProxy}),launch.npmRegistry&&this.track({key:"launcher_npm_registry",value:launch.npmRegistry}),launch.npmProxy&&this.track({key:"launcher_npm_proxy",value:launch.npmProxy}),launch.npmTls&&this.track({key:"launcher_npm_tls",value:launch.npmTls}))}trackCI(ciVendorName){ciVendorName&&this.track({key:"ci",value:ciVendorName})}trackStdinIsTTY(isTTY){this.track({key:"stdin_is_tty",value:isTTY?"true":"false"})}trackVersion(version){version&&this.track({key:"version",value:version})}trackDefaultDeploy(){this.track({key:"default-deploy",value:"TRUE"})}trackProjectId(projectId){projectId&&this.track({key:"project_id",value:projectId})}trackInvocationId(invocationId){invocationId&&this.track({key:"invocation_id",value:invocationId})}trackDeviceId(deviceId){deviceId&&this.track({key:"device_id",value:deviceId})}trackVercelPluginActiveSession(){this.track({key:"vercel_plugin_active_session",value:"TRUE"})}trackVercelPluginVersion(version){version&&this.track({key:"vercel_plugin_version",value:version})}trackErrorStatus(status){typeof status<"u"&&this.track({key:"error_status",value:String(status)})}trackErrorCode(code){code&&this.track({key:"error_code",value:code})}trackErrorSlug(slug){slug&&this.track({key:"error_slug",value:slug})}trackErrorAction(action){action&&this.track({key:"error_action",value:action})}trackErrorServerMessage(serverMessage){if(serverMessage){let normalizedServerMessage=serverMessage.trim().replace(/\s+/g," ");this.track({key:"error_server_message",value:normalizedServerMessage.slice(0,MAX_ERROR_SERVER_MESSAGE_LENGTH)})}}trackExtension(){this.track({key:"extension",value:this.redactedValue})}trackLoginState(state){state==="started"&&(this.loginAttempt=randomUUID3()),this.loginAttempt&&this.track({key:`login:attempt:${this.loginAttempt}`,value:state}),state!=="started"&&(this.loginAttempt=void 0)}trackCliFlagHelp(command,subcommands){let subcommand;subcommands&&(subcommand=Array.isArray(subcommands)?subcommands[0]:subcommands),this.track({key:"flag:help",value:subcommand?`${command}:${subcommand}`:command})}trackCliOptionFormat(format){if(format){let allowedFormat=["json"].includes(format)?format:this.redactedValue;this.trackCliOption({option:"format",value:allowedFormat})}}trackCliOptionProject(value){value&&(Array.isArray(value)&&value.length===0||this.trackCliOption({option:"project",value:this.redactedValue}))}},TelemetryEventStore=class{constructor(opts){this.localEvents=[];this.teamId="NO_TEAM_ID";this.userId="NO_USER_ID";this.projectId="NO_PROJECT_ID";this.isDebug=opts?.isDebug||!1,this.events=[],this.config=opts?.config,this.globalConfigDir=opts?.globalConfigDir,this.cliDeviceOptions=opts?.cliDevice,this.cliSessionOptions=opts?.cliSession,this.invocationId=randomUUID3(),this.deviceId=randomUUID3(),this.cliDeviceOptions&&(this.cliDevice=getOrCreatePersistedCliDevice(this.cliDeviceOptions),this.deviceId=this.cliDevice.id),this.cliSessionOptions?(this.cliSession=getOrCreatePersistedCliSession(this.cliSessionOptions),this.sessionId=this.cliSession.id):this.sessionId=randomUUID3()}add(event){event.sessionId=this.sessionId,event.invocationId=this.invocationId,event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,this.events.push(event)}updateConfig(config){this.config=config}updateTeamId(teamId){teamId&&(this.teamId=teamId)}updateUserId(userId){userId&&(this.userId=userId)}updateProjectId(projectId){projectId&&(this.projectId=projectId)}get hasUserId(){return this.userId!=="NO_USER_ID"}get currentProjectId(){return this.projectId}get currentInvocationId(){return this.invocationId}get currentDeviceId(){return this.deviceId}get currentLibc(){return this.cliDevice?.libc}get currentSessionId(){return this.sessionId}get readonlyEvents(){return Array.from(this.events)}reset(){this.events=[]}get enabled(){return process.env.VERCEL_TELEMETRY_DISABLED?!1:this.config?.enabled??!0}setCommandTrace(event,buildLabel,localEvent,localEvents=[]){this.commandTrace={event,buildLabel},this.localCommandEvent=localEvent,this.localEvents=localEvents}getCommandTrace(){let local=this.localCommandEvent;if(!this.commandTrace||!local)return this.commandTrace;let spans=localWaterfall(local,[...startupEvents(local),...this.localEvents]);return spans.length?{...this.commandTrace,event:{...this.commandTrace.event,parentId:local.parentId},spans}:this.commandTrace}async save({detach=!1}={}){if(this.cliSession&&this.cliSessionOptions&&(this.cliSession=touchPersistedCliSession(this.cliSessionOptions,this.cliSession)),this.isDebug){output_manager_default.log(`${LogLabel} Flushing Events`);for(let event of this.events)event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,output_manager_default.log(JSON.stringify(event));let commandTrace=this.getCommandTrace();commandTrace&&output_manager_default.log(`${LogLabel} Command trace ${JSON.stringify(commandTrace)}`);return}if(this.enabled){let commandTrace=this.getCommandTrace(),sessionId=this.events[0]?.sessionId;if(!sessionId){output_manager_default.debug("Unable to send metrics: no session ID");return}let events=this.events.map(event=>{let{eventTime,invocationId,...rest}=event;return delete rest.sessionId,delete rest.teamId,delete rest.userId,delete rest.projectId,{event_time:eventTime,invocation_id:invocationId,team_id:this.teamId,user_id:this.userId,project_id:this.projectId,...rest}});if(detach&&commandTrace?.spans&&Buffer.byteLength(JSON.stringify(commandTrace))>16384){let{parentId:_parentId,...event}=commandTrace.event;commandTrace={event,buildLabel:commandTrace.buildLabel}}let payload={invocationId:this.invocationId,headers:{"Client-id":"vercel-cli","x-vercel-cli-topic-id":"generic","x-vercel-cli-session-id":sessionId},body:events,...commandTrace?{commandTrace}:{}};await this.sendToSubprocess(payload,output_manager_default.debugEnabled&&!detach)}}async sendToSubprocess(payload,outputDebugEnabled){let serialized=encodeHandoff(payload),flushArgs=["telemetry","flush"];this.globalConfigDir&&flushArgs.push("--global-config",this.globalConfigDir);let nodeBinaryPath,script;if(isNativeBinaryInstall())nodeBinaryPath=process.execPath,script=flushArgs;else{let args=[process.execPath,process.argv[0],process.argv[1]];args[0]===args[1]&&args.shift(),nodeBinaryPath=args[0],script=[...args.slice(1),...flushArgs]}let env=(0,import_build_utils.cloneEnv)(process.env,{VERCEL_TELEMETRY_DISABLED:"1"});if(outputDebugEnabled)return new Promise(resolve=>{let childProcess=spawn(nodeBinaryPath,script,{env,stdio:["pipe","pipe","pipe"]});childProcess.stdin.on("error",()=>{}),childProcess.stdin.end(serialized),childProcess.stderr.on("data",data=>output_manager_default.debug(data.toString())),childProcess.stdout.on("data",data=>output_manager_default.debug(data.toString())),childProcess.on("error",d=>{output_manager_default.debug(d),clearTimeout(timeout),resolve()});let timeout=setTimeout(()=>{output_manager_default.debug("Telemetry subprocess killed due to timeout"),childProcess.kill()},2e3);childProcess.on("exit",code=>{output_manager_default.debug(`Telemetry subprocess exited with code ${code}`),childProcess.unref(),clearTimeout(timeout),resolve()})});{let childProcess=spawn(nodeBinaryPath,script,{stdio:["pipe","ignore","ignore"],env,windowsHide:!0,detached:!0});childProcess.on("error",()=>{}),childProcess.stdin.on("error",()=>{}),childProcess.stdin.end(serialized),childProcess.unref()}}};export{readLaunch,getStartupDurationMs,toCommandTrace,markStartup,decodeHandoff,TelemetryClient,TelemetryEventStore};
9
+ `,{mode:opts.mode})};module.exports=(fp,data,opts)=>makeDir(path.dirname(fp),{fs}).then(()=>init(main,fp,data,opts));module.exports.sync=(fp,data,opts)=>{makeDir.sync(path.dirname(fp),{fs}),init(mainSync,fp,data,opts)}}});var import_ci_info=__toESM(require_ci_info(),1);var launchTargets=["cli-support","darwin-arm64","darwin-x64","linux-arm64","linux-arm64-musl","linux-x64","linux-x64-musl","win32-arm64","win32-x64"],launchFallbackReasons=["target_missing","ENOENT","EACCES","ENOEXEC","EPERM","EFTYPE","UNKNOWN","opt_out","inherited_native_env","download_failed","cache_unwritable","not_in_node_modules"],launchSources=["download","cache"],downloadErrors=["timed_out","proxy_refused","proxy_auth_required","dns","connection_refused","connection_reset","connect_timeout","network","tls","http_403","http_404","http_other","checksum_mismatch","bad_metadata","no_binary","binary_did_not_start","binary_killed","binary_exited","version_mismatch","filesystem","other"],downloadPhases=["setup","metadata","tarball","extract","check","install"],downloadCodes=["ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","ETIMEDOUT","EHOSTUNREACH","ENETUNREACH","ENETDOWN","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","EACCES","EPERM","ENOSPC","EROFS","EEXIST","ENOENT","EISDIR","ENOTDIR","EDQUOT","EMFILE","Z_DATA_ERROR","Z_BUF_ERROR","SELF_SIGNED_CERT_IN_CHAIN","DEPTH_ZERO_SELF_SIGNED_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID","ENOEXEC","E2BIG","SIGKILL","SIGTERM","SIGABRT","SIGSEGV","SIGBUS","SIGILL","SIGTRAP"],downloadTimeouts=["metadata","stall","total"],downloadAttempts=["1","2"],downloadFailures=["1","2","3_or_more"],downloadProgress=["none","under_half","over_half","complete","unknown"],launchValues=["native","cli-support","other","true","false","default","custom",...launchTargets,...launchFallbackReasons,...launchSources,...downloadErrors,...downloadPhases,...downloadCodes,...downloadTimeouts,...downloadAttempts,...downloadFailures,...downloadProgress];function oneOf(value,allowed){return typeof value=="string"&&allowed.includes(value)?value:"other"}function readLaunch(){let launch=globalThis[Symbol.for("vercel.cli.launch")];if(launch?.runtime==="native")return launch.source===void 0?{runtime:"native"}:{runtime:"native",source:oneOf(launch.source,launchSources),...launch.downloadAttempts!==void 0&&{downloadAttempts:oneOf(launch.downloadAttempts,downloadAttempts)}};if(launch?.runtime==="cli-support")return launch.reason===void 0?{runtime:"cli-support"}:{runtime:"cli-support",...launch.target!==void 0&&{target:oneOf(launch.target,launchTargets)},reason:oneOf(launch.reason,launchFallbackReasons),...launch.downloadError!==void 0&&{downloadError:oneOf(launch.downloadError,downloadErrors)},...launch.downloadPhase!==void 0&&{downloadPhase:oneOf(launch.downloadPhase,downloadPhases)},...launch.downloadCode!==void 0&&{downloadCode:oneOf(launch.downloadCode,downloadCodes)},...launch.downloadAttempts!==void 0&&{downloadAttempts:oneOf(launch.downloadAttempts,downloadAttempts)},...launch.downloadFailures!==void 0&&{downloadFailures:oneOf(launch.downloadFailures,downloadFailures)},...launch.downloadTimeout!==void 0&&{downloadTimeout:oneOf(launch.downloadTimeout,downloadTimeouts)},...launch.downloadProgress!==void 0&&{downloadProgress:oneOf(launch.downloadProgress,downloadProgress)},...launch.downloadProxy!==void 0&&{downloadProxy:oneOf(launch.downloadProxy,["true","false"])},...launch.npmRegistry!==void 0&&{npmRegistry:oneOf(launch.npmRegistry,["default","custom"])},...launch.npmProxy!==void 0&&{npmProxy:oneOf(launch.npmProxy,["true","false"])},...launch.npmTls!==void 0&&{npmTls:oneOf(launch.npmTls,["true","false"])}}}function launchTags(launch){return launch?launch.runtime==="native"?{launcher:"native",...launch.source&&{launcher_source:launch.source}}:launch.reason?{launcher:"cli-support",...launch.target&&{launcher_target:launch.target},launcher_fallback:launch.reason,...launch.downloadError&&{launcher_download_error:launch.downloadError}}:{launcher:"cli-support"}:{}}var BRIDGE_TAG=/^[a-zA-Z0-9_.:-]{1,80}$/,ERROR_CODE=/^[A-Za-z][A-Za-z0-9_-]{0,79}$/;function getStartupDurationMs(excludedMs=0){let entryAt=Reflect.get(globalThis,Symbol.for("vercel.cli.entry-at"));return typeof entryAt=="number"?Math.max(0,performance.now()-entryAt-excludedMs):void 0}function getOutcome({exitCode,completion}){return exitCode===130?"canceled":exitCode!==0?"failure":completion==="process_exit"?"unknown":"success"}function toCommandTrace(event,context){let tags={command:context.command,invocation_id:context.invocationId,cli_version:context.cliVersion,release_channel:context.releaseChannel,platform:process.platform,arch:process.arch,is_agent:String(context.isAgent),exit_code:String(context.exitCode),completion:context.completion,outcome:getOutcome(context)};if(tags.outcome==="failure"){let details=peekCliError();tags.error_code=details?.code&&ERROR_CODE.test(details.code)?details.code:UNCLASSIFIED_ERROR_CODE,tags.error_source=context.errorSource??(details?"recorded":"unknown")}return context.agentName&&BRIDGE_TAG.test(context.agentName)&&(tags.agent_name=context.agentName),import_ci_info.default.id&&(tags.ci=import_ci_info.default.id),context.subcommand&&BRIDGE_TAG.test(context.subcommand)&&(tags.subcommand=context.subcommand),context.startupDurationMs!==void 0&&(tags.startup_duration_ms=context.startupDurationMs.toFixed(3)),Object.assign(tags,launchTags(readLaunch())),{id:event.id,name:event.name,timestamp:event.timestamp,startTime:event.startTime,duration:event.duration,tags}}var SPAN_NAME=/^vc(?:\.[a-zA-Z0-9_.]{1,77})?$/,safeCount=value=>/^(0|[1-9][0-9]{0,15})$/.test(value)&&Number.isSafeInteger(Number(value))?value:void 0,SAFE_TAGS={phase:value=>BRIDGE_TAG.test(value)?value:void 0,http_method:value=>/^[A-Z]{1,7}$/.test(value)?value:void 0,http_route:value=>/^[a-z0-9/:*_-]{1,80}$/i.test(value)?value:void 0,http_status_code:value=>/^[1-5][0-9]{2}$/.test(value)?value:void 0,error:()=>"true",file_count:safeCount,byte_count:safeCount,function_count:safeCount,layer_count:safeCount,attempt:safeCount,dropped_spans:safeCount,cache_hit:value=>["true","false"].includes(value)?value:void 0,deployment_state:value=>["INITIALIZING","ANALYZING","BUILDING","DEPLOYING","READY","QUEUED","CANCELED","ERROR"].includes(value)?value:void 0},MAX_SPANS=1e3;function localWaterfall(command,events){let runId=command.parentId;if(!runId)return[];let candidates=events.filter(event=>event.name!=="vc.cli.command"&&event.id!==runId&&SPAN_NAME.test(event.name)),byId=new Map(candidates.map(event=>[event.id,event])),selected=new Map;for(let span of candidates){let chain=[],seen=new Set,current=span,complete=!1;for(;current&&!(seen.has(current.id)||chain.length>=31);){if(seen.add(current.id),chain.push(current),current.parentId===runId||current.parentId===command.id){complete=!0;break}current=byId.get(current.parentId??"")}let missing=chain.filter(ancestor=>!selected.has(ancestor.id));if(!(!complete||selected.size+missing.length>MAX_SPANS))for(let ancestor of missing.reverse())selected.set(ancestor.id,ancestor)}let commandEnd=command.timestamp+command.duration,spans=[...selected.values()].sort((a,b)=>a.timestamp-b.timestamp).map(span=>({id:span.id,name:span.name,timestamp:span.timestamp,startTime:span.startTime,duration:span.duration,parentId:span.parentId===runId&&span.timestamp>=command.timestamp&&span.timestamp<commandEnd?command.id:span.parentId,tags:Object.fromEntries(Object.entries(SAFE_TAGS).flatMap(([key,safe])=>{let value=span.tags[key]&&safe(span.tags[key]);return value?[[key,value]]:[]}))}));if(!spans.length)return[];let start=Math.min(command.timestamp,...spans.map(span=>span.timestamp)),end=Math.max(command.timestamp+command.duration,...spans.map(span=>span.timestamp+span.duration));return[{id:runId,name:"vc.cli.run",timestamp:start,startTime:command.startTime+Math.floor((start-command.timestamp)/1e3),duration:end-start,tags:selected.size<candidates.length?{dropped_spans:String(candidates.length-selected.size)}:{}},...spans]}import{randomUUID}from"node:crypto";function timings(){return Reflect.get(globalThis,Symbol.for("vercel.cli.startup-timings"))}function markStartup(phase){timings()?.marks.push({phase,timestamp:Number(process.hrtime.bigint()/BigInt(1e3))})}function startupEvents(command){let marks=timings()?.marks.filter(mark=>mark.timestamp<=command.timestamp);if(!marks?.length||!command.parentId)return[];let group={id:randomUUID(),parentId:command.parentId,name:"vc.cli.startup",timestamp:marks[0].timestamp,startTime:command.startTime+Math.floor((marks[0].timestamp-command.timestamp)/1e3),duration:command.timestamp-marks[0].timestamp,tags:{}};return[group,...marks.map((mark,index)=>({id:randomUUID(),parentId:group.id,name:`vc.cli.startup.${mark.phase}`,timestamp:mark.timestamp,startTime:command.startTime+Math.floor((mark.timestamp-command.timestamp)/1e3),duration:(marks[index+1]?.timestamp??command.timestamp)-mark.timestamp,tags:{}}))]}import{randomUUID as randomUUID3}from"node:crypto";import os from"node:os";var import_constants=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1);import{spawn}from"node:child_process";var import_load_json_file=__toESM(require_load_json_file(),1),import_write_json_file=__toESM(require_write_json_file(),1);import{randomUUID as randomUUID2}from"node:crypto";import{mkdirSync,renameSync,rmSync,writeFileSync}from"node:fs";import{dirname}from"node:path";import{readdirSync}from"node:fs";function isLibc(value){return value==="glibc"||value==="musl"}function hasMuslLoader(){try{return readdirSync("/lib").some(name=>name.startsWith("ld-musl-")&&name.endsWith(".so.1"))}catch{return!1}}function detectLibcFromReport(){let report=process.report;if(!report||typeof report.getReport!="function")return;let originalExcludeNetwork=report.excludeNetwork;try{report.excludeNetwork=!0;let{header}=report.getReport();return header?.glibcVersionRuntime?"glibc":"musl"}catch{return}finally{report.excludeNetwork=originalExcludeNetwork}}function detectLibc(){if(process.platform==="linux")return detectLibcFromReport()??(hasMuslLoader()?"musl":"glibc")}var DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS=30*60*1e3,DEFAULT_CLI_SESSION_MAX_LIFETIME_MS=24*60*60*1e3;function isPersistedCliSession(value){if(!value||typeof value!="object")return!1;let session=value;return typeof session.id=="string"&&typeof session.createdAt=="number"&&Number.isFinite(session.createdAt)&&typeof session.lastSeenAt=="number"&&Number.isFinite(session.lastSeenAt)}function isPersistedCliDevice(value){if(!value||typeof value!="object")return!1;let device=value;return typeof device.id=="string"&&(device.libc===void 0||isLibc(device.libc))}function readPersistedCliSession(filePath){try{let session=import_load_json_file.default.sync(filePath);return isPersistedCliSession(session)?session:null}catch{return null}}function writePersistedCliSession(filePath,session){let temporaryPath=`${filePath}.${process.pid}.${randomUUID2()}.tmp`;try{mkdirSync(dirname(filePath),{recursive:!0}),writeFileSync(temporaryPath,`${JSON.stringify(session,null,2)}
10
+ `,{flag:"wx",mode:384}),renameSync(temporaryPath,filePath)}catch{}finally{try{rmSync(temporaryPath,{force:!0})}catch{}}}function readPersistedCliDevice(filePath){try{let device=import_load_json_file.default.sync(filePath);return isPersistedCliDevice(device)?device:null}catch{return null}}function writePersistedCliDevice(filePath,device){try{mkdirSync(dirname(filePath),{recursive:!0}),import_write_json_file.default.sync(filePath,device,{indent:2})}catch{}}function getOrCreatePersistedCliSession(opts){let now=opts.now?.()??Date.now(),inactivityTimeoutMs=opts.inactivityTimeoutMs??DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS,maxLifetimeMs=opts.maxLifetimeMs??DEFAULT_CLI_SESSION_MAX_LIFETIME_MS,existing=readPersistedCliSession(opts.filePath),session=existing&&now-existing.lastSeenAt<=inactivityTimeoutMs&&now-existing.createdAt<=maxLifetimeMs?{...existing,lastSeenAt:now}:{id:randomUUID2(),createdAt:now,lastSeenAt:now};return writePersistedCliSession(opts.filePath,session),session}function touchPersistedCliSession(opts,session){let nextSession={...session,lastSeenAt:opts.now?.()??Date.now()};return writePersistedCliSession(opts.filePath,nextSession),nextSession}function getOrCreatePersistedCliDevice(opts){let existing=readPersistedCliDevice(opts.filePath);if(existing?.libc)return existing;let libc=(opts.detectLibc??detectLibc)(),device={id:existing?.id??randomUUID2(),...libc?{libc}:{}};return(!existing||libc)&&writePersistedCliDevice(opts.filePath,device),device}import{gzipSync,gunzipSync}from"node:zlib";var COMPRESSION_THRESHOLD=64*1024,MAX_DECOMPRESSED_BYTES=4*1024*1024;function encodeHandoff(payload){let serialized=JSON.stringify(payload),bytes=Buffer.byteLength(serialized);return bytes>COMPRESSION_THRESHOLD&&bytes<=MAX_DECOMPRESSED_BYTES?gzipSync(serialized,{level:1}):serialized}function decodeHandoff(bytes){return(bytes[0]===31&&bytes[1]===139?gunzipSync(new Uint8Array(bytes),{maxOutputLength:MAX_DECOMPRESSED_BYTES}):bytes).toString("utf8")}var LogLabel="['telemetry']:",MAX_ERROR_SERVER_MESSAGE_LENGTH=500,TelemetryClient=class{constructor({opts}){this.redactedValue="[REDACTED]";this.noValueToTriggerPrompt="[TRIGGER_PROMPT]";this.redactedArgumentsLength=args=>args&&args.length===1?"ONE":args.length>1?"MANY":"NONE";this.redactedTargetName=target=>import_constants.PROJECT_ENV_TARGET.includes(target)?target:this.redactedValue;this.isDebug=opts.isDebug||!1,this.store=opts.store}track(eventData){this.isDebug&&output_manager_default.debug(`${LogLabel} ${eventData.key}:${eventData.value}`);let event={id:randomUUID3(),eventTime:Date.now(),...eventData};this.store.add(event)}trackCliCommand(eventData){this.track({key:`command:${eventData.command}`,value:eventData.value})}trackCliSubcommand(eventData){this.store.commandSubcommand=eventData.subcommand,this.track({key:`subcommand:${eventData.subcommand}`,value:eventData.value})}trackCliArgument(eventData){eventData.value&&this.track({key:`argument:${eventData.arg}`,value:eventData.value})}trackCliOption(eventData){this.track({key:`option:${eventData.option}`,value:eventData.value})}trackRedactedCliOption(option,value){value&&this.trackCliOption({option,value:this.redactedValue})}trackTargetEnvironment(targetEnvironment){this.track({key:"target_environment",value:targetEnvironment})}trackCommandOutput(eventData){this.track({key:`output:${eventData.key}`,value:eventData.value})}trackCliFlag(flag){this.track({key:`flag:${flag}`,value:"TRUE"})}trackDeprecatedShorthand(shorthand){this.track({key:"deprecated_shorthand",value:shorthand})}trackOidcTokenRefresh(count){this.track({key:"oidc-token-refresh",value:`${count}`})}trackDpopKeyStorage(storage){this.track({key:"dpop-key",value:storage})}trackCPUs(){this.track({key:"cpu_count",value:String(os.cpus().length)})}trackAgenticUse(agent){agent&&this.track({key:"agent",value:agent})}trackPlatform(){this.track({key:"platform",value:os.platform()})}trackArch(){this.track({key:"arch",value:os.arch()})}trackLibc(libc){libc&&this.track({key:"libc",value:libc})}trackLaunch(launch){this.track({key:"launcher",value:launch.runtime}),launch.runtime==="native"&&launch.source&&this.track({key:"launcher_source",value:launch.source}),launch.runtime==="native"&&launch.downloadAttempts&&this.track({key:"launcher_download_attempts",value:launch.downloadAttempts}),!(launch.runtime!=="cli-support"||!launch.reason)&&(launch.target&&this.track({key:"launcher_target",value:launch.target}),this.track({key:"launcher_fallback",value:launch.reason}),launch.downloadError&&this.track({key:"launcher_download_error",value:launch.downloadError}),launch.downloadAttempts&&this.track({key:"launcher_download_attempts",value:launch.downloadAttempts}),launch.downloadFailures&&this.track({key:"launcher_download_failures",value:launch.downloadFailures}),launch.downloadPhase&&this.track({key:"launcher_download_phase",value:launch.downloadPhase}),launch.downloadCode&&this.track({key:"launcher_download_code",value:launch.downloadCode}),launch.downloadTimeout&&this.track({key:"launcher_download_timeout",value:launch.downloadTimeout}),launch.downloadProgress&&this.track({key:"launcher_download_progress",value:launch.downloadProgress}),launch.downloadProxy&&this.track({key:"launcher_download_proxy",value:launch.downloadProxy}),launch.npmRegistry&&this.track({key:"launcher_npm_registry",value:launch.npmRegistry}),launch.npmProxy&&this.track({key:"launcher_npm_proxy",value:launch.npmProxy}),launch.npmTls&&this.track({key:"launcher_npm_tls",value:launch.npmTls}))}trackCI(ciVendorName){ciVendorName&&this.track({key:"ci",value:ciVendorName})}trackStdinIsTTY(isTTY){this.track({key:"stdin_is_tty",value:isTTY?"true":"false"})}trackVersion(version){version&&this.track({key:"version",value:version})}trackDefaultDeploy(){this.track({key:"default-deploy",value:"TRUE"})}trackProjectId(projectId){projectId&&this.track({key:"project_id",value:projectId})}trackInvocationId(invocationId){invocationId&&this.track({key:"invocation_id",value:invocationId})}trackDeviceId(deviceId){deviceId&&this.track({key:"device_id",value:deviceId})}trackVercelPluginActiveSession(){this.track({key:"vercel_plugin_active_session",value:"TRUE"})}trackVercelPluginVersion(version){version&&this.track({key:"vercel_plugin_version",value:version})}trackErrorStatus(status){typeof status<"u"&&this.track({key:"error_status",value:String(status)})}trackErrorCode(code){code&&this.track({key:"error_code",value:code})}trackErrorSlug(slug){slug&&this.track({key:"error_slug",value:slug})}trackErrorAction(action){action&&this.track({key:"error_action",value:action})}trackErrorServerMessage(serverMessage){if(serverMessage){let normalizedServerMessage=serverMessage.trim().replace(/\s+/g," ");this.track({key:"error_server_message",value:normalizedServerMessage.slice(0,MAX_ERROR_SERVER_MESSAGE_LENGTH)})}}trackExtension(){this.track({key:"extension",value:this.redactedValue})}trackLoginState(state){state==="started"&&(this.loginAttempt=randomUUID3()),this.loginAttempt&&this.track({key:`login:attempt:${this.loginAttempt}`,value:state}),state!=="started"&&(this.loginAttempt=void 0)}trackCliFlagHelp(command,subcommands){let subcommand;subcommands&&(subcommand=Array.isArray(subcommands)?subcommands[0]:subcommands),this.track({key:"flag:help",value:subcommand?`${command}:${subcommand}`:command})}trackCliOptionFormat(format){if(format){let allowedFormat=["json"].includes(format)?format:this.redactedValue;this.trackCliOption({option:"format",value:allowedFormat})}}trackCliOptionProject(value){value&&(Array.isArray(value)&&value.length===0||this.trackCliOption({option:"project",value:this.redactedValue}))}},TelemetryEventStore=class{constructor(opts){this.localEvents=[];this.teamId="NO_TEAM_ID";this.userId="NO_USER_ID";this.projectId="NO_PROJECT_ID";this.sendOptOut=!1;this.isDebug=opts?.isDebug||!1,this.events=[],this.config=opts?.config,this.globalConfigDir=opts?.globalConfigDir,this.cliDeviceOptions=opts?.cliDevice,this.cliSessionOptions=opts?.cliSession,this.invocationId=randomUUID3(),this.deviceId=randomUUID3(),this.cliDeviceOptions&&(this.cliDevice=getOrCreatePersistedCliDevice(this.cliDeviceOptions),this.deviceId=this.cliDevice.id),this.cliSessionOptions?(this.cliSession=getOrCreatePersistedCliSession(this.cliSessionOptions),this.sessionId=this.cliSession.id):this.sessionId=randomUUID3()}add(event){event.sessionId=this.sessionId,event.invocationId=this.invocationId,event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,this.events.push(event)}updateConfig(config){this.config=config}updateTeamId(teamId){teamId&&(this.teamId=teamId)}updateUserId(userId){userId&&(this.userId=userId)}updateProjectId(projectId){projectId&&(this.projectId=projectId)}get hasUserId(){return this.userId!=="NO_USER_ID"}get currentProjectId(){return this.projectId}get currentInvocationId(){return this.invocationId}get currentDeviceId(){return this.deviceId}get currentLibc(){return this.cliDevice?.libc}get currentSessionId(){return this.sessionId}get readonlyEvents(){return Array.from(this.events)}reset(){this.events=[]}allowOptOutSend(){this.sendOptOut=!0}get enabled(){return process.env.VERCEL_TELEMETRY_DISABLED?!1:this.config?.enabled??!0}setCommandTrace(event,buildLabel,localEvent,localEvents=[]){this.commandTrace={event,buildLabel},this.localCommandEvent=localEvent,this.localEvents=localEvents}getCommandTrace(){let local=this.localCommandEvent;if(!this.commandTrace||!local)return this.commandTrace;let spans=localWaterfall(local,[...startupEvents(local),...this.localEvents]);return spans.length?{...this.commandTrace,event:{...this.commandTrace.event,parentId:local.parentId},spans}:this.commandTrace}async save({detach=!1}={}){if(this.cliSession&&this.cliSessionOptions&&(this.cliSession=touchPersistedCliSession(this.cliSessionOptions,this.cliSession)),this.isDebug){output_manager_default.log(`${LogLabel} Flushing Events`);for(let event of this.events)event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,output_manager_default.log(JSON.stringify(event));let commandTrace=this.getCommandTrace();commandTrace&&output_manager_default.log(`${LogLabel} Command trace ${JSON.stringify(commandTrace)}`);return}if(this.enabled||this.sendOptOut){this.sendOptOut=!1;let commandTrace=this.getCommandTrace(),sessionId=this.events[0]?.sessionId;if(!sessionId){output_manager_default.debug("Unable to send metrics: no session ID");return}let events=this.events.map(event=>{let{eventTime,invocationId,...rest}=event;return delete rest.sessionId,delete rest.teamId,delete rest.userId,delete rest.projectId,{event_time:eventTime,invocation_id:invocationId,team_id:this.teamId,user_id:this.userId,project_id:this.projectId,...rest}});if(detach&&commandTrace?.spans&&Buffer.byteLength(JSON.stringify(commandTrace))>16384){let{parentId:_parentId,...event}=commandTrace.event;commandTrace={event,buildLabel:commandTrace.buildLabel}}let payload={invocationId:this.invocationId,headers:{"Client-id":"vercel-cli","x-vercel-cli-topic-id":"generic","x-vercel-cli-session-id":sessionId},body:events,...commandTrace?{commandTrace}:{}};await this.sendToSubprocess(payload,output_manager_default.debugEnabled&&!detach)}}async sendToSubprocess(payload,outputDebugEnabled){let serialized=encodeHandoff(payload),flushArgs=["telemetry","flush"];this.globalConfigDir&&flushArgs.push("--global-config",this.globalConfigDir);let nodeBinaryPath,script;if(isNativeBinaryInstall())nodeBinaryPath=process.execPath,script=flushArgs;else{let args=[process.execPath,process.argv[0],process.argv[1]];args[0]===args[1]&&args.shift(),nodeBinaryPath=args[0],script=[...args.slice(1),...flushArgs]}let env=(0,import_build_utils.cloneEnv)(process.env,{VERCEL_TELEMETRY_DISABLED:"1"});if(outputDebugEnabled)return new Promise(resolve=>{let childProcess=spawn(nodeBinaryPath,script,{env,stdio:["pipe","pipe","pipe"]});childProcess.stdin.on("error",()=>{}),childProcess.stdin.end(serialized),childProcess.stderr.on("data",data=>output_manager_default.debug(data.toString())),childProcess.stdout.on("data",data=>output_manager_default.debug(data.toString())),childProcess.on("error",d=>{output_manager_default.debug(d),clearTimeout(timeout),resolve()});let timeout=setTimeout(()=>{output_manager_default.debug("Telemetry subprocess killed due to timeout"),childProcess.kill()},2e3);childProcess.on("exit",code=>{output_manager_default.debug(`Telemetry subprocess exited with code ${code}`),childProcess.unref(),clearTimeout(timeout),resolve()})});{let childProcess=spawn(nodeBinaryPath,script,{stdio:["pipe","ignore","ignore"],env,windowsHide:!0,detached:!0});childProcess.on("error",()=>{}),childProcess.stdin.on("error",()=>{}),childProcess.stdin.end(serialized),childProcess.unref()}}};export{readLaunch,getStartupDurationMs,toCommandTrace,markStartup,decodeHandoff,TelemetryClient,TelemetryEventStore};
11
11
  /*! Bundled license information:
12
12
 
13
13
  imurmurhash/imurmurhash.js:
@@ -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{getScope}from"./chunk-ZGB2RHJO.js";import{sleep}from"./chunk-TFTF3C3G.js";import{require_ms}from"./chunk-MXTC4ZAQ.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_ms=__toESM(require_ms(),1);var DEFAULT_ORDER_WAIT="1m",DEFAULT_ORDER_WAIT_MS=(0,import_ms.default)(DEFAULT_ORDER_WAIT);function getOrderOutcome(order,domain){let item=order.domains.find(d=>d.domainName===domain);return order.status==="completed"&&item?.status==="completed"?"completed":order.error?.code==="payment-failed"?order.error.details?.reason==="authentication-required"?"payment_authentication_required":"payment_failed":item?.status==="refund-failed"?"refund_failed":item?.status==="refunded"?"refunded":item?.status==="failed"?"failed":"unknown"}async function getOrder(client,orderId,{signal}={}){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"";try{return await client.fetch(`/v1/registrar/orders/${orderId}${teamParam}`,{retry:{retries:0},bailOn429:!0,signal})}catch(err){if(isAPIError(err)){if(err.status===404)return null;if(err.status<500)return err}throw err}}function remainingWait(waitMs,sentAt){return Math.max(waitMs-(Date.now()-sentAt),0)}var ORDER_READ_TIMING={minReadMs:5*1e3},pollForOrder=async(client,orderId,timeoutMs)=>{let intervalMs=500,lastStatus=null,startTime=Date.now();for(;;){let sleepMs=intervalMs,order;try{let leftMs2=timeoutMs-(Date.now()-startTime);order=await getOrder(client,orderId,{signal:AbortSignal.timeout(Math.max(leftMs2,ORDER_READ_TIMING.minReadMs))})}catch{order=null}if(order instanceof Error)if(order.status===429)typeof order.retryAfterMs=="number"&&(sleepMs=Math.max(sleepMs,order.retryAfterMs));else return{order:null,lastStatus,readError:{status:order.status,code:order.code}};else if(order!==null){let pending=order.domains.some(d=>d.status==="pending");if(order.status==="failed"||order.status==="completed"&&!pending)return{order};order.status!=="completed"&&(lastStatus=order.status)}let leftMs=timeoutMs-(Date.now()-startTime);if(leftMs<=0)break;await sleep(Math.min(sleepMs,leftMs)),intervalMs=Math.min(intervalMs*2,5e3)}return{order:null,lastStatus}};export{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS,getOrderOutcome,remainingWait,ORDER_READ_TIMING,pollForOrder};
@@ -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{BETA_COMMANDS,buildCommandExampleLines,buildCommandOptionLines,createHelpTheme,helpColumns,helpCommandNames,helpLiterals,helpRows,helpSection,helpUsage}from"./chunk-HZEKH3RO.js";import{globalCommandOptions}from"./chunk-AMPJ6RWT.js";var ROOT_HELP_GROUPS={"Deploy and Develop":["deploy","build","dev","init","inspect","list","promote","redeploy","rollback","remove","rolling-release","bisect","ci","curl","httpstat"],"Projects and Configuration":["project","link","open","pull","env","git","cache","target","environments","flags","microfrontends","deploy-hooks"],"Domains and Traffic":["domains","dns","alias","certs","redirects","routes"],"Data and Compute":["storage","blob","global-config","sandbox","vcr","daemons","crons","schedules","ai-gateway"],"Operations and Security":["activity","health","agent-runs","alerts","monitors","comments","logs","drains","metrics","traces","security","firewall","kms","webhooks"],"Account and Billing":["login","logout","signup","switch","teams","organizations","tokens","whoami","billing","buy","pricing"],"CLI and Integrations":["help","doctor","feedback","api","install","integration","integration-resource","connect","agent","mcp","setup","skills","changelog","telemetry","upgrade","version","token-pass"]};function commandGroup(name,fallback="CLI and Integrations"){return Object.entries(ROOT_HELP_GROUPS).find(([,names])=>names.includes(name))?.[0]??fallback}var DEPRECATED_COMMANDS=new Set(["integration-resource"]),DEFAULT_COMMAND="deploy",HELP_ROW={names:["help"],description:"Show help for a command",group:commandGroup("help"),default:!1};function summarize(description){let firstLine=description.trim().split(/\n\s*\n/)[0].replace(/\s*\n\s*/g," "),abbreviations=new Set(["e.g.","i.e.","vs.","etc."]),sentenceEnd=[...firstLine.matchAll(/[^.]\.(\s|$)/g)].find(match=>{let prefix=firstLine.slice(0,match.index+2);return!abbreviations.has((prefix.split(/\s/).at(-1)??"").replace(/^[^a-z]+/i,""))});return(sentenceEnd?firstLine.slice(0,sentenceEnd.index+1):firstLine).replace(/\.$/,"")}function getRootHelpCommands(commands){let rows=[HELP_ROW];for(let command of commands){if(!("description"in command)||command.hidden||command.name==="help"||DEPRECATED_COMMANDS.has(command.name))continue;let names=helpCommandNames(command),description=command.summary?command.summary.replace(/\.$/,""):summarize(command.description);BETA_COMMANDS.has(command.name)&&(description+=" [beta]"),rows.push({names,description,group:commandGroup(command.name),default:command.name===DEFAULT_COMMAND});for(let alias of command.aliases){let subcommand=command.subcommands?.find(candidate=>candidate.name===alias&&!candidate.hidden);subcommand&&rows.push({names:[alias],description:subcommand.summary?subcommand.summary.replace(/\.$/,""):summarize(subcommand.description),group:commandGroup(alias,commandGroup(command.name)),default:!1})}}return rows.sort((a,b)=>{if(a.default!==b.default)return a.default?-1:1;let aName=a.names[a.names.length-1],bName=b.names[b.names.length-1];return aName<bName?-1:aName>bName?1:0})}var ROOT_HELP_EXAMPLES=[{name:"Deploy the current directory",value:"vercel"},{name:"Deploy a linked project without prompts",value:"vercel deploy --yes --non-interactive"},{name:"Show help for a command",value:"vercel domains --help"}];function help(commands,columns=80,theme=createHelpTheme()){columns=helpColumns(columns);let sections=Object.keys(ROOT_HELP_GROUPS).flatMap(group=>{let rows=commands.filter(command=>command.group===group);return rows.length?[helpSection(group,helpRows(rows.map(command=>({syntax:helpLiterals(command.names),description:`${command.description}${command.default?" (default)":""}`})),columns,theme),theme)]:[]});return[`${helpUsage(theme)} ${theme.reference("vercel")} [options] [command | path]`,...sections,buildCommandOptionLines([...globalCommandOptions,{name:"changelog",shorthand:null,type:Boolean,deprecated:!1,description:"Show the 5 latest Vercel product updates"}],{columns,theme},"Global Options"),buildCommandExampleLines({examples:ROOT_HELP_EXAMPLES},columns,theme)].filter(Boolean).join(`
7
+ import{BETA_COMMANDS,buildCommandExampleLines,buildCommandOptionLines,createHelpTheme,helpColumns,helpCommandNames,helpLiterals,helpRows,helpSection,helpUsage}from"./chunk-VVTMF2AY.js";import{globalCommandOptions}from"./chunk-EZVNGJN5.js";var ROOT_HELP_GROUPS={"Deploy and Develop":["deploy","build","dev","init","inspect","list","promote","redeploy","rollback","remove","rolling-release","bisect","ci","curl","httpstat"],"Projects and Configuration":["project","link","open","pull","env","git","cache","target","environments","flags","microfrontends","deploy-hooks"],"Domains and Traffic":["domains","dns","alias","certs","redirects","routes"],"Data and Compute":["storage","blob","global-config","sandbox","vcr","daemons","crons","schedules","ai-gateway"],"Operations and Security":["activity","health","agent-runs","alerts","monitors","comments","logs","drains","metrics","traces","security","firewall","kms","webhooks"],"Account and Billing":["login","logout","signup","switch","teams","organizations","tokens","whoami","billing","buy","pricing"],"CLI and Integrations":["help","doctor","feedback","api","install","integration","integration-resource","connect","agent","mcp","setup","skills","changelog","telemetry","upgrade","version","token-pass"]};function commandGroup(name,fallback="CLI and Integrations"){return Object.entries(ROOT_HELP_GROUPS).find(([,names])=>names.includes(name))?.[0]??fallback}var DEPRECATED_COMMANDS=new Set(["integration-resource"]),DEFAULT_COMMAND="deploy",HELP_ROW={names:["help"],description:"Show help for a command",group:commandGroup("help"),default:!1};function summarize(description){let firstLine=description.trim().split(/\n\s*\n/)[0].replace(/\s*\n\s*/g," "),abbreviations=new Set(["e.g.","i.e.","vs.","etc."]),sentenceEnd=[...firstLine.matchAll(/[^.]\.(\s|$)/g)].find(match=>{let prefix=firstLine.slice(0,match.index+2);return!abbreviations.has((prefix.split(/\s/).at(-1)??"").replace(/^[^a-z]+/i,""))});return(sentenceEnd?firstLine.slice(0,sentenceEnd.index+1):firstLine).replace(/\.$/,"")}function getRootHelpCommands(commands){let rows=[HELP_ROW];for(let command of commands){if(!("description"in command)||command.hidden||command.name==="help"||DEPRECATED_COMMANDS.has(command.name))continue;let names=helpCommandNames(command),description=command.summary?command.summary.replace(/\.$/,""):summarize(command.description);BETA_COMMANDS.has(command.name)&&(description+=" [beta]"),rows.push({names,description,group:commandGroup(command.name),default:command.name===DEFAULT_COMMAND});for(let alias of command.aliases){let subcommand=command.subcommands?.find(candidate=>candidate.name===alias&&!candidate.hidden);subcommand&&rows.push({names:[alias],description:subcommand.summary?subcommand.summary.replace(/\.$/,""):summarize(subcommand.description),group:commandGroup(alias,commandGroup(command.name)),default:!1})}}return rows.sort((a,b)=>{if(a.default!==b.default)return a.default?-1:1;let aName=a.names[a.names.length-1],bName=b.names[b.names.length-1];return aName<bName?-1:aName>bName?1:0})}var ROOT_HELP_EXAMPLES=[{name:"Deploy the current directory",value:"vercel"},{name:"Deploy a linked project without prompts",value:"vercel deploy --yes --non-interactive"},{name:"Show help for a command",value:"vercel domains --help"}];function help(commands,columns=80,theme=createHelpTheme()){columns=helpColumns(columns);let sections=Object.keys(ROOT_HELP_GROUPS).flatMap(group=>{let rows=commands.filter(command=>command.group===group);return rows.length?[helpSection(group,helpRows(rows.map(command=>({syntax:helpLiterals(command.names),description:`${command.description}${command.default?" (default)":""}`})),columns,theme),theme)]:[]});return[`${helpUsage(theme)} ${theme.reference("vercel")} [options] [command | path]`,...sections,buildCommandOptionLines([...globalCommandOptions,{name:"changelog",shorthand:null,type:Boolean,deprecated:!1,description:"Show the 5 latest Vercel product updates"}],{columns,theme},"Global Options"),buildCommandExampleLines({examples:ROOT_HELP_EXAMPLES},columns,theme)].filter(Boolean).join(`
8
8
 
9
9
  `)+`
10
10
  `}export{getRootHelpCommands,ROOT_HELP_EXAMPLES,help};
@@ -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{printProjectNotFoundError}from"./chunk-JUSNW3IF.js";import{detectExplicitScope}from"./chunk-NSPW47RU.js";import{omitGlobalFlagsFromArgs}from"./chunk-5X635INY.js";import{getLinkedProject}from"./chunk-2J35YKA2.js";function getInvokingCommandFromArgv(argv){let args=omitGlobalFlagsFromArgs(argv.slice(2)),positionals=[];for(let arg of args){if(arg.startsWith("-"))break;positionals.push(arg)}return positionals.join(" ")}async function resolveProjectContext({client,cwd=client.cwd,projectNameOrId,commandName="",projectNotFoundHandling="report",skipOwnerLookup,quiet}){let context=await getLinkedProject(client,{cwd,projectName:projectNameOrId,projectNameIsExplicit:!!projectNameOrId,scopeIsExplicit:detectExplicitScope(client),skipOwnerLookup,quiet});return context.status==="not_linked"&&projectNameOrId&&projectNotFoundHandling==="report"?(await printProjectNotFoundError(client,projectNameOrId,commandName||getInvokingCommandFromArgv(client.argv),context.orgId),{status:"error",exitCode:1,orgId:context.orgId}):context}export{resolveProjectContext};
7
+ import{printProjectNotFoundError}from"./chunk-GTXGURVR.js";import{detectExplicitScope}from"./chunk-ZGB2RHJO.js";import{omitGlobalFlagsFromArgs}from"./chunk-GORL5DZC.js";import{getLinkedProject}from"./chunk-TFTF3C3G.js";function getInvokingCommandFromArgv(argv){let args=omitGlobalFlagsFromArgs(argv.slice(2)),positionals=[];for(let arg of args){if(arg.startsWith("-"))break;positionals.push(arg)}return positionals.join(" ")}async function resolveProjectContext({client,cwd=client.cwd,projectNameOrId,commandName="",projectNotFoundHandling="report",skipOwnerLookup,quiet}){let context=await getLinkedProject(client,{cwd,projectName:projectNameOrId,projectNameIsExplicit:!!projectNameOrId,scopeIsExplicit:detectExplicitScope(client),skipOwnerLookup,quiet});return context.status==="not_linked"&&projectNameOrId&&projectNotFoundHandling==="report"?(await printProjectNotFoundError(client,projectNameOrId,commandName||getInvokingCommandFromArgv(client.argv),context.orgId),{status:"error",exitCode:1,orgId:context.orgId}):context}export{resolveProjectContext};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{__commonJS}from"./chunk-BZENIQ7N.js";var require_types=__commonJS({"../../packages/client/dist/types.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),types_exports={};__export(types_exports,{VALID_ARCHIVE_FORMATS:()=>VALID_ARCHIVE_FORMATS,fileNameSymbol:()=>fileNameSymbol});module.exports=__toCommonJS(types_exports);var VALID_ARCHIVE_FORMATS=["tgz"],fileNameSymbol=Symbol("fileName")}});export{require_types};
@@ -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{outputError}from"./chunk-7PGDJTAH.js";import{getScope}from"./chunk-ZGB2RHJO.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-GORL5DZC.js";import{getLinkedProject,getProjectByNameOrId}from"./chunk-TFTF3C3G.js";import{ProjectNotFound,isAPIError}from"./chunk-GOI2VVI7.js";function emitAlertsScopeError(client,jsonOutput,code,message,agent){return outputAgentError(client,{status:"error",reason:agent.reason,message,hint:agent.hint,next:agent.next},1),outputError(client,jsonOutput,code,message)}async function resolveAlertsScope(client,opts){let command=opts.command??"alerts",projectCommand=`${command} --project <name_or_id>`,allCommand=`${command} --all`;if(opts.all||opts.project){let{team}=await getScope(client);if(!team){let msg="No team context found. Run `vercel switch` to select a team, or use `vercel link` in a project directory.";return emitAlertsScopeError(client,opts.jsonOutput,"NO_TEAM",msg,{reason:AGENT_REASON.MISSING_SCOPE,hint:"Select a team scope before using --project or --all with alerts.",next:[{command:buildCommandWithGlobalFlags(client.argv,"whoami"),when:"See current user and team"},{command:buildCommandWithGlobalFlags(client.argv,"teams switch"),when:"Switch to a team that owns the project"}]})}if(opts.all)return{teamId:team.id};let projectResult;try{projectResult=await getProjectByNameOrId(client,opts.project,team.id)}catch(err){if(isAPIError(err)){let msg=err.serverMessage||(err.status===403?`You do not have permission to access project "${opts.project}" in team "${team.slug}".`:`API error (${err.status}).`),reason=err.status===401?"not_authorized":err.status===403?"forbidden":AGENT_REASON.API_ERROR;return emitAlertsScopeError(client,opts.jsonOutput,err.code||"API_ERROR",msg,{reason,next:[{command:buildCommandWithGlobalFlags(client.argv,projectCommand),when:"Retry with a project you can access (replace <name_or_id>)"}]})}throw err}if(projectResult instanceof ProjectNotFound){let msg=`Project "${opts.project}" was not found in team "${team.slug}".`;return emitAlertsScopeError(client,opts.jsonOutput,"PROJECT_NOT_FOUND",msg,{reason:AGENT_REASON.NOT_FOUND,next:[{command:buildCommandWithGlobalFlags(client.argv,projectCommand),when:"Retry with a valid project (replace <name_or_id>)"}]})}return{teamId:team.id,projectId:projectResult.id,projectName:projectResult.name}}let linkedProject=await getLinkedProject(client);if(linkedProject.status==="error")return linkedProject.exitCode;if(linkedProject.status==="not_linked"){let msg="No linked project found. Run `vercel link` to link a project, or use --project <name> or --all.";return emitAlertsScopeError(client,opts.jsonOutput,"NOT_LINKED",msg,{reason:AGENT_REASON.NOT_LINKED,hint:"Agents should pass --project or --all when no .vercel link exists in --cwd.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"Link this directory to a Vercel project"},{command:buildCommandWithGlobalFlags(client.argv,projectCommand),when:"Retry with an explicit project (replace <name_or_id>)"},{command:buildCommandWithGlobalFlags(client.argv,allCommand),when:"Use team-wide scope without a linked project"}]})}return scopeFromLinkedProject(linkedProject)}function scopeFromLinkedProject(linkedProject){return{teamId:linkedProject.org.id,projectId:linkedProject.project.id,projectName:linkedProject.project.name}}export{emitAlertsScopeError,resolveAlertsScope,scopeFromLinkedProject};
@@ -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{pkg_default}from"./chunk-DBT6PGEH.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_lower_case=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/lower-case.js"(exports,module){var conjunctions=["for","and","nor","but","or","yet","so"],articles=["a","an","the"],prepositions=["aboard","about","above","across","after","against","along","amid","among","anti","around","as","at","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","considering","despite","down","during","except","excepting","excluding","following","for","from","in","inside","into","like","minus","near","of","off","on","onto","opposite","over","past","per","plus","regarding","round","save","since","than","through","to","toward","towards","under","underneath","unlike","until","up","upon","versus","via","with","within","without"];module.exports=new Set([...conjunctions,...articles,...prepositions])}});var require_specials=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/specials.js"(exports,module){var intended=["ZEIT","ZEIT Inc.","CLI","API","HTTP","HTTPS","JSX","DNS","URL","now.sh","now.json","CI","CDN","package.json","GitHub","CSS","JS","HTML","WordPress","JavaScript","Next.js","Node.js"];module.exports=intended}});var require_lib=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/index.js"(exports,module){var lowerCase=require_lower_case(),specials=require_specials(),regex=/(?:(?:(\s?(?:^|[.\(\)!?;:"-])\s*)(\w))|(\w))(\w*[’']*\w*)/g,convertToRegExp=specials2=>specials2.map(s=>[new RegExp(`\\b${s}\\b`,"gi"),s]);function parseMatch(match){let firstCharacter=match[0];return/\s/.test(firstCharacter)?match.substr(1):/[\(\)]/.test(firstCharacter)?null:match}module.exports=(str,options={})=>{str=str.toLowerCase().replace(regex,(m,lead="",forced,lower,rest)=>{let parsedMatch=parseMatch(m);if(!parsedMatch)return m;if(!forced){let fullLower=lower+rest;if(lowerCase.has(fullLower))return parsedMatch}return lead+(lower||forced).toUpperCase()+rest});let customSpecials=options.special||[],replace=[...specials,...customSpecials];return convertToRegExp(replace).forEach(([pattern,s])=>{str=str.replace(pattern,s)}),str}}});var import_chalk=__toESM(require_source(),1);function cmd(text){return`${import_chalk.default.gray("`")}${import_chalk.default.cyan(text)}${import_chalk.default.gray("`")}`}var import_title=__toESM(require_lib(),1);var packageName=pkg_default.name;function getTitleName(){return(0,import_title.default)(packageName)}function getCommandName(subcommands){let vercel=packageName;return subcommands&&(vercel=`${vercel} ${subcommands}`),cmd(vercel)}function getCommandNamePlain(subcommands){return subcommands?`${packageName} ${subcommands}`:packageName}export{require_lib,cmd,packageName,getTitleName,getCommandName,getCommandNamePlain};
7
+ import{pkg_default}from"./chunk-BOJDM3O7.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_lower_case=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/lower-case.js"(exports,module){var conjunctions=["for","and","nor","but","or","yet","so"],articles=["a","an","the"],prepositions=["aboard","about","above","across","after","against","along","amid","among","anti","around","as","at","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","considering","despite","down","during","except","excepting","excluding","following","for","from","in","inside","into","like","minus","near","of","off","on","onto","opposite","over","past","per","plus","regarding","round","save","since","than","through","to","toward","towards","under","underneath","unlike","until","up","upon","versus","via","with","within","without"];module.exports=new Set([...conjunctions,...articles,...prepositions])}});var require_specials=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/specials.js"(exports,module){var intended=["ZEIT","ZEIT Inc.","CLI","API","HTTP","HTTPS","JSX","DNS","URL","now.sh","now.json","CI","CDN","package.json","GitHub","CSS","JS","HTML","WordPress","JavaScript","Next.js","Node.js"];module.exports=intended}});var require_lib=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/index.js"(exports,module){var lowerCase=require_lower_case(),specials=require_specials(),regex=/(?:(?:(\s?(?:^|[.\(\)!?;:"-])\s*)(\w))|(\w))(\w*[’']*\w*)/g,convertToRegExp=specials2=>specials2.map(s=>[new RegExp(`\\b${s}\\b`,"gi"),s]);function parseMatch(match){let firstCharacter=match[0];return/\s/.test(firstCharacter)?match.substr(1):/[\(\)]/.test(firstCharacter)?null:match}module.exports=(str,options={})=>{str=str.toLowerCase().replace(regex,(m,lead="",forced,lower,rest)=>{let parsedMatch=parseMatch(m);if(!parsedMatch)return m;if(!forced){let fullLower=lower+rest;if(lowerCase.has(fullLower))return parsedMatch}return lead+(lower||forced).toUpperCase()+rest});let customSpecials=options.special||[],replace=[...specials,...customSpecials];return convertToRegExp(replace).forEach(([pattern,s])=>{str=str.replace(pattern,s)}),str}}});var import_chalk=__toESM(require_source(),1);function cmd(text){return`${import_chalk.default.gray("`")}${import_chalk.default.cyan(text)}${import_chalk.default.gray("`")}`}var import_title=__toESM(require_lib(),1);var packageName=pkg_default.name;function getTitleName(){return(0,import_title.default)(packageName)}function getCommandName(subcommands){let vercel=packageName;return subcommands&&(vercel=`${vercel} ${subcommands}`),cmd(vercel)}function getCommandNamePlain(subcommands){return subcommands?`${packageName} ${subcommands}`:packageName}export{require_lib,cmd,packageName,getTitleName,getCommandName,getCommandNamePlain};
@@ -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{resolveProjectContext}from"./chunk-AUAV6LGZ.js";import{AGENT_REASON,AGENT_STATUS,outputAgentError}from"./chunk-GORL5DZC.js";import{parseArguments}from"./chunk-VM6X5BTK.js";import{getCommandName,getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import{getFlagsSpecification,getGlobalFlagsFromArgs}from"./chunk-EZVNGJN5.js";async function requireProjectContext(client,command,projectName){let link=await resolveProjectContext({client,projectNameOrId:projectName});if(link.status==="error")return link.exitCode;if(link.status==="not_linked"){if(client.nonInteractive)if(command==="redirects"){let linkCmd=getCommandNamePlain("link");outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,message:`Your codebase isn't linked to a project on Vercel. Run ${linkCmd} to begin.`,next:[{command:linkCmd}]},1)}else{let flags=getGlobalFlagsFromArgs(client.argv.slice(2)),cmd=getCommandNamePlain(`link ${flags.join(" ")}`.trim());return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,userActionRequired:!0,message:`Your codebase is not linked to a Vercel project. Run link first, then retry ${command} commands.`,next:[{command:cmd,when:"to link this directory to a project"}]},1),1}return output_manager_default.error(`Your codebase isn't linked to a project on Vercel. Run ${getCommandName("link")} to begin.`),1}return client.config.currentTeam=link.org.type==="team"?link.org.id:void 0,link}function parseSubcommandArguments(argv,command){let flagsSpecification=getFlagsSpecification(command.options);return parseArguments(argv,flagsSpecification)}function validateRequiredArguments(args,required){for(let i=0;i<required.length;i++)if(!args[i])return`Missing required argument: ${required[i]}`;return null}export{requireProjectContext,parseSubcommandArguments,validateRequiredArguments};
@@ -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{warnDeprecatedInput}from"./chunk-SDYCW5JM.js";var VALUE_LIKE=/^(on|off|true|false|yes|no|1|0|enabled?|disabled?)$/i;function negationOf(name){return`--no-${name.slice(2)}`}function readOnOffOption(client,flags,names){let typed=name=>name!==void 0&&flags[name]===!0,onNames=[names.on,names.oldOn].filter(typed),offNames=[names.off,names.oldOff].filter(typed);return onNames.length>0&&offNames.length>0?{error:`Can't use ${onNames[0]} with ${offNames[0]}.`}:(names.oldOn&&onNames.includes(names.oldOn)&&warnDeprecatedInput(client,names.oldOn,names.on),names.oldOff&&offNames.includes(names.oldOff)&&warnDeprecatedInput(client,names.oldOff,names.off),{value:onNames.length>0?!0:offNames.length>0?!1:void 0})}function rewriteLegacyOnOffValues(args,options,client){let legacyOptions=options.filter(option=>option.legacyValues),out=[],legacy=new Map,end=args.indexOf("--");for(let i=0;i<args.length;i++){let token=args[i];if(end!==-1&&i>=end){out.push(token);continue}let option=legacyOptions.find(candidate=>token===`--${candidate.name}`||token.startsWith(`--${candidate.name}=`));if(!option?.legacyValues){out.push(token);continue}let name=`--${option.name}`,negation=negationOf(name),{on,off}=option.legacyValues,invalid={error:`${name} doesn't take a value. Use ${name} or ${negation}.`};if(token===name){let next=args[i+1];if(next===void 0||end!==-1&&i+1>=end)out.push(token);else if(next===on||next===off)out.push(next===on?name:negation),legacy.set(name,next),client&&warnDeprecatedInput(client,`${name} ${next}`,next===on?name:negation),i++;else{if(VALUE_LIKE.test(next))return invalid;out.push(token)}continue}let value=token.slice(name.length+1);if(value==="true"||value==="false")out.push(value==="true"?name:negation);else if(value===on||value===off)out.push(value===on?name:negation),legacy.set(name,value),client&&warnDeprecatedInput(client,token,value===on?name:negation);else return invalid}return{args:out,legacy}}function getFalseValueWarnings(args,options){let booleans=new Set(options.filter(option=>option.type===Boolean&&!option.legacyValues&&!option.rejectsValue&&option.name!=="non-interactive").map(option=>option.name)),warnings=new Set;for(let token of args){if(token==="--")break;let match=/^--([^=]+)=(.*)$/.exec(token);if(!match||!booleans.has(match[1])||!/^false$/i.test(match[2]))continue;let name=`--${match[1]}`;warnings.add(match[1].startsWith("no-")?`${token} turns ${name} on. Leave out ${name} to turn it off.`:`${token} turns ${name} on. Use ${negationOf(name)} to turn it off.`)}return[...warnings]}export{readOnOffOption,rewriteLegacyOnOffValues,getFalseValueWarnings};
7
+ import{warnDeprecatedInput}from"./chunk-JONZUKWX.js";var VALUE_LIKE=/^(on|off|true|false|yes|no|1|0|enabled?|disabled?)$/i;function negationOf(name){return`--no-${name.slice(2)}`}function readOnOffOption(client,flags,names){let typed=name=>name!==void 0&&flags[name]===!0,onNames=[names.on,names.oldOn].filter(typed),offNames=[names.off,names.oldOff].filter(typed);return onNames.length>0&&offNames.length>0?{error:`Can't use ${onNames[0]} with ${offNames[0]}.`}:(names.oldOn&&onNames.includes(names.oldOn)&&warnDeprecatedInput(client,names.oldOn,names.on),names.oldOff&&offNames.includes(names.oldOff)&&warnDeprecatedInput(client,names.oldOff,names.off),{value:onNames.length>0?!0:offNames.length>0?!1:void 0})}function rewriteLegacyOnOffValues(args,options,client){let legacyOptions=options.filter(option=>option.legacyValues),out=[],legacy=new Map,end=args.indexOf("--");for(let i=0;i<args.length;i++){let token=args[i];if(end!==-1&&i>=end){out.push(token);continue}let option=legacyOptions.find(candidate=>token===`--${candidate.name}`||token.startsWith(`--${candidate.name}=`));if(!option?.legacyValues){out.push(token);continue}let name=`--${option.name}`,negation=negationOf(name),{on,off}=option.legacyValues,invalid={error:`${name} doesn't take a value. Use ${name} or ${negation}.`};if(token===name){let next=args[i+1];if(next===void 0||end!==-1&&i+1>=end)out.push(token);else if(next===on||next===off)out.push(next===on?name:negation),legacy.set(name,next),client&&warnDeprecatedInput(client,`${name} ${next}`,next===on?name:negation),i++;else{if(VALUE_LIKE.test(next))return invalid;out.push(token)}continue}let value=token.slice(name.length+1);if(value==="true"||value==="false")out.push(value==="true"?name:negation);else if(value===on||value===off)out.push(value===on?name:negation),legacy.set(name,value),client&&warnDeprecatedInput(client,token,value===on?name:negation);else return invalid}return{args:out,legacy}}function getFalseValueWarnings(args,options){let booleans=new Set(options.filter(option=>option.type===Boolean&&!option.legacyValues&&!option.rejectsValue&&option.name!=="non-interactive").map(option=>option.name)),warnings=new Set;for(let token of args){if(token==="--")break;let match=/^--([^=]+)=(.*)$/.exec(token);if(!match||!booleans.has(match[1])||!/^false$/i.test(match[2]))continue;let name=`--${match[1]}`;warnings.add(match[1].startsWith("no-")?`${token} turns ${name} on. Leave out ${name} to turn it off.`:`${token} turns ${name} on. Use ${negationOf(name)} to turn it off.`)}return[...warnings]}export{readOnOffOption,rewriteLegacyOnOffValues,getFalseValueWarnings};
@@ -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-GORL5DZC.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";var FIRST_DEPLOYMENT_PRODUCTION_NOTICE="This is the project\u2019s first deployment, so it will go to production.";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{FIRST_DEPLOYMENT_PRODUCTION_NOTICE,isNonProductionTarget,hasDeployment,hasEarlierDeployment,refuseFirstDeployment};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_dist=__commonJS({"../get-package-json/dist/index.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,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__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),src_exports={};__export(src_exports,{getPackageJSON:()=>getPackageJSON2});module.exports=__toCommonJS(src_exports);var import_fs=__toESM2(__require("fs")),import_path=__toESM2(__require("path")),import_url=__require("url"),cache=new Map;function getPackageJSONPath(dir){return import_path.default.join(dir,"package.json")}function captureCallerCallSite(){let _prepareStackTrace=Error.prepareStackTrace,callSite;try{Error.prepareStackTrace=(_,stack)=>stack,callSite=new Error().stack[2]}finally{Error.prepareStackTrace=_prepareStackTrace}return callSite}function getPackageJSON2(){let callSite=captureCallerCallSite(),filePath=callSite.getFileName()||callSite.getEvalOrigin();filePath.startsWith("file://")&&(filePath=(0,import_url.fileURLToPath)(filePath));let rootDir=import_path.default.dirname(filePath),packageJSONPath=getPackageJSONPath(rootDir);for(;!import_fs.default.existsSync(packageJSONPath);)rootDir=import_path.default.join(rootDir,".."),packageJSONPath=getPackageJSONPath(rootDir);let packageJSON=cache.get(packageJSONPath);return packageJSON||(packageJSON=JSON.parse(import_fs.default.readFileSync(packageJSONPath,"utf-8")),cache.set(packageJSONPath,packageJSON)),packageJSON}}});var import_get_package_json=__toESM(require_dist(),1),pkg=(0,import_get_package_json.getPackageJSON)(),pkg_default={...pkg,name:"vercel"};export{pkg_default};
@@ -0,0 +1,10 @@
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{outputError}from"./chunk-7PGDJTAH.js";import{require_execa}from"./chunk-M32HBBPK.js";import{getScope}from"./chunk-ZGB2RHJO.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-GORL5DZC.js";import{getLinkedProject,getProjectByNameOrId}from"./chunk-TFTF3C3G.js";import{validateJsonOutput}from"./chunk-JONZUKWX.js";import{require_lib}from"./chunk-LUX4PBJL.js";import{require_ms}from"./chunk-MXTC4ZAQ.js";import{ProjectNotFound,isAPIError,require_bytes}from"./chunk-GOI2VVI7.js";import{packageName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import{__toESM}from"./chunk-BZENIQ7N.js";function emitVcrScopeError(client,jsonOutput,code,message,agent){return outputAgentError(client,{status:"error",reason:agent.reason,message,hint:agent.hint,next:agent.next},1),outputError(client,jsonOutput,code,message)}async function resolveVcrScope(client,opts){if(opts.project){let{team}=await getScope(client);if(!team){let msg="No team context found. Run `vercel switch` to select a team, or use `vercel link` in a project directory.";return emitVcrScopeError(client,opts.jsonOutput,"NO_TEAM",msg,{reason:AGENT_REASON.MISSING_SCOPE,hint:"Select a team scope before using --project with vcr.",next:[{command:buildCommandWithGlobalFlags(client.argv,"whoami"),when:"See current user and team"},{command:buildCommandWithGlobalFlags(client.argv,"teams switch"),when:"Switch to a team that owns the project"}]})}let projectResult;try{projectResult=await getProjectByNameOrId(client,opts.project,team.id)}catch(err){if(isAPIError(err)){let msg=err.serverMessage||(err.status===403?`You do not have permission to access project "${opts.project}" in team "${team.slug}".`:`API error (${err.status}).`),reason=err.status===401?"not_authorized":err.status===403?"forbidden":AGENT_REASON.API_ERROR;return emitVcrScopeError(client,opts.jsonOutput,err.code||"API_ERROR",msg,{reason,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr ls --project <name_or_id>"),when:"Retry with a project you can access (replace <name_or_id>)"}]})}throw err}if(projectResult instanceof ProjectNotFound){let msg=`Project "${opts.project}" was not found in team "${team.slug}".`;return emitVcrScopeError(client,opts.jsonOutput,"PROJECT_NOT_FOUND",msg,{reason:AGENT_REASON.NOT_FOUND,next:[{command:buildCommandWithGlobalFlags(client.argv,"project ls"),when:"List projects in the current team to pick a name"}]})}return{teamId:team.id,teamSlug:team.slug,projectId:projectResult.id,projectName:projectResult.name}}let linkedProject=await getLinkedProject(client);if(linkedProject.status==="error")return linkedProject.exitCode;if(linkedProject.status==="not_linked"){let msg="No linked project found. Run `vercel link` to link a project, or pass --project <name>.";return emitVcrScopeError(client,opts.jsonOutput,"NOT_LINKED",msg,{reason:AGENT_REASON.NOT_LINKED,hint:"Agents should pass --project when no .vercel link exists in --cwd.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"Link this directory to a Vercel project"},{command:buildCommandWithGlobalFlags(client.argv,"vcr ls --project <name_or_id>"),when:"List repositories for a project without linking (replace <name_or_id>)"}]})}return{teamId:linkedProject.org.id,teamSlug:linkedProject.org.slug,projectId:linkedProject.project.id,projectName:linkedProject.project.name}}var import_ms=__toESM(require_ms(),1),import_bytes=__toESM(require_bytes(),1);function formatBytes(size){return typeof size!="number"||Number.isNaN(size)?"-":import_bytes.default.format(size,{decimalPlaces:1})??"-"}function formatRelativeTime(iso){let time=new Date(iso).getTime();return Number.isNaN(time)?"-":`${(0,import_ms.default)(Date.now()-time)} ago`}function formatDigest(digest){return digest?digest.replace(/^sha256:/,"").slice(0,12):"-"}function formatImageStatus(status){switch(status){case"ready":return"Ready";case"preparing":return"Preparing";case"unoptimized":return"Ready (unoptimized)";default:return"-"}}var VCR_REGISTRY="vcr.vercel.com";function formatImageReference(teamSlug,projectName,repositoryName,digest){return digest?`${VCR_REGISTRY}/${teamSlug}/${projectName}/${repositoryName}@${digest}`:"-"}function formatTagReference(teamSlug,projectName,repositoryName,tag){return tag?`${VCR_REGISTRY}/${teamSlug}/${projectName}/${repositoryName}:${tag}`:"-"}function validateVcrJsonOutput(client,flags){let fr=validateJsonOutput(flags);return fr.valid?{jsonOutput:fr.jsonOutput}:(outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:fr.error},2),output_manager_default.error(fr.error),2)}function validateVcrChoice(client,flag,value,choices,jsonOutput){if(value===void 0||choices.includes(value))return;let message=`Invalid value for ${flag}: "${value}". Must be one of: ${choices.join(", ")}.`;return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message},2),outputError(client,jsonOutput,"INVALID_ARGUMENTS",message)}function requireVcrRepository(client,repository,jsonOutput,usage){if(!repository)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing repository. Example: ${packageName} ${usage}`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr ls"),when:"List repositories to pick a name or id"}]},2),outputError(client,jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${usage}\``)}function requireVcrRepositoryAndTag(client,repository,tag,jsonOutput,usage){if(!(repository&&tag))return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing arguments. Example: ${packageName} ${usage}`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr tag ls <repository>"),when:"List tags to pick a tag (replace <repository>)"}]},2),outputError(client,jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${usage}\``)}function requireVcrRepositoryAndImageId(client,repository,imageId,jsonOutput,usage){if(!(repository&&imageId))return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing arguments. Example: ${packageName} ${usage}`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr image ls <repository>"),when:"List images to pick an image id (replace <repository>)"}]},2),outputError(client,jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${usage}\``)}var import_which=__toESM(require_lib(),1),import_execa=__toESM(require_execa(),1);var VCR_ENGINES=["docker","podman","buildah"],VCR_LOGIN_USERNAME="oidc";function resolveRegistry(){return process.env.VERCEL_VCR_REGISTRY||VCR_REGISTRY}function isEngineInstalled(engine){return import_which.default.sync(engine,{nothrow:!0})!==null}function splitPassthrough(argv){let idx=argv.indexOf("--");return idx===-1?{own:argv.slice(2),passthrough:[]}:{own:argv.slice(2,idx),passthrough:argv.slice(idx+1)}}async function isBuildxAvailable(){let result=await(0,import_execa.default)("docker",["buildx","version"],{reject:!1,stdio:"ignore"});return result instanceof Error?!1:result.exitCode===0}function pushCompressionArgs(engine){return engine==="docker"?[]:["--compression-format","zstd","--compression-level","3"]}var AUTH_FAILURE=/\b(?:unauthorized|denied|forbidden)\b\s*:|authentication required|access to the resource is denied|\b(?:401 unauthorized|403 forbidden)\b/i,CREDENTIAL_STORE_CONFLICT=/already exists in the keychain|errSecDuplicateItem/i;function stderrTail(stderr){return stderr.trim().split(`
8
+ `).slice(-5).join(`
9
+ `)}async function engineLogin(engine,registry,token){let result=await(0,import_execa.default)(engine,["login",registry,"--username",VCR_LOGIN_USERNAME,"--password-stdin"],{input:token,reject:!1});return result instanceof Error&&typeof result.exitCode!="number"?{exitCode:1,stderr:result.message}:{exitCode:typeof result.exitCode=="number"?result.exitCode:1,stderr:result.stderr??""}}async function engineLogout(engine,registry){await(0,import_execa.default)(engine,["logout",registry],{reject:!1,stdio:"ignore"})}async function runEngine(engine,args,opts){if(opts.captureStderr){let subprocess=(0,import_execa.default)(engine,args,{cwd:opts.cwd,stdio:["inherit","inherit","pipe"],reject:!1});subprocess.stderr?.pipe(process.stderr);let result2=await subprocess;return result2 instanceof Error&&typeof result2.exitCode!="number"?{exitCode:1,stderr:result2.message}:{exitCode:typeof result2.exitCode=="number"?result2.exitCode:1,stderr:result2.stderr??""}}let result=await(0,import_execa.default)(engine,args,{cwd:opts.cwd,stdio:"inherit",reject:!1});return result instanceof Error&&typeof result.exitCode!="number"?{exitCode:1,stderr:result.message}:{exitCode:typeof result.exitCode=="number"?result.exitCode:1,stderr:""}}var NOT_AUTHORIZED_MESSAGE="You do not have access to the container registry in this scope. Ensure your role can manage the project, or pass --token and --scope.",NOT_AUTHORIZED_HINT="Confirm team scope with whoami; use --scope <team-slug> if the repository lives under another team.",genericMessage=err=>err.serverMessage||`API error (${err.status}).`,STATUS_INFO={401:{reason:"not_authorized",message:()=>NOT_AUTHORIZED_MESSAGE,hint:NOT_AUTHORIZED_HINT,suggestWhoami:!0},403:{reason:"forbidden",message:()=>NOT_AUTHORIZED_MESSAGE,hint:NOT_AUTHORIZED_HINT,suggestWhoami:!0},404:{reason:AGENT_REASON.NOT_FOUND,message:genericMessage},409:{reason:"conflict",message:genericMessage},429:{reason:"rate_limited",message:genericMessage}};function resolveStatusInfo(err){return STATUS_INFO[err.status]?STATUS_INFO[err.status]:err.status>=500?{reason:AGENT_REASON.API_ERROR,message:()=>`The container registry endpoint failed (${err.status}). Re-run with --debug and share the x-vercel-id from the failed request.`}:{reason:AGENT_REASON.API_ERROR,message:genericMessage}}function handleVcrApiError(client,err,jsonOutput,opts={}){let info=resolveStatusInfo(err),message=info.message(err),next=[];return info.suggestWhoami&&next.push({command:buildCommandWithGlobalFlags(client.argv,"whoami"),when:"See current user and team"}),opts.retry&&next.push(opts.retry),outputAgentError(client,{status:"error",reason:info.reason,message,...info.hint?{hint:info.hint}:{},...next.length>0?{next}:{}},1),outputError(client,jsonOutput,err.code||"API_ERROR",message)}function reportEngineCommandFailure(client,engine,verb,result){let tail=stderrTail(result.stderr),message=`\`${engine} ${verb}\` failed (exit code ${result.exitCode}).${tail?`
10
+ ${tail}`:""}`;return outputAgentError(client,{status:"error",reason:"command_failed",message},1),outputError(client,!1,"COMMAND_FAILED",message)}function reportEnginePushFailure(client,engine,verb,result){if(AUTH_FAILURE.test(result.stderr)){let message=`Push to ${resolveRegistry()} was rejected. Your registry credentials may be missing or expired.`;return outputAgentError(client,{status:"error",reason:"not_authorized",message,next:[{command:buildCommandWithGlobalFlags(client.argv,`vcr login ${engine}`),when:"Refresh registry credentials (valid ~12 hours)"}]},1),outputError(client,!1,"NOT_AUTHORIZED",message)}return reportEngineCommandFailure(client,engine,verb,result)}function emitVcrArgParseError(client,err,recoverTemplate){let msg=err instanceof Error?err.message:String(err),projectFlagMissingArg=msg.includes("--project")&&msg.includes("requires argument");outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:projectFlagMissingArg?"`--project` requires a project name or id (for example `--project my-app`).":msg,next:[{command:buildCommandWithGlobalFlags(client.argv,recoverTemplate),when:projectFlagMissingArg?"Re-run with a project name or id (replace placeholder)":"See valid usage"}]},2)}export{resolveVcrScope,formatBytes,formatRelativeTime,formatDigest,formatImageStatus,formatImageReference,formatTagReference,validateVcrJsonOutput,validateVcrChoice,requireVcrRepository,requireVcrRepositoryAndTag,requireVcrRepositoryAndImageId,VCR_ENGINES,VCR_LOGIN_USERNAME,resolveRegistry,isEngineInstalled,splitPassthrough,isBuildxAvailable,pushCompressionArgs,AUTH_FAILURE,CREDENTIAL_STORE_CONFLICT,stderrTail,engineLogin,engineLogout,runEngine,handleVcrApiError,reportEngineCommandFailure,reportEnginePushFailure,emitVcrArgParseError};
@@ -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{ensureLink}from"./chunk-UCRMJMH6.js";import{argvHasNonInteractive}from"./chunk-5X635INY.js";import{getLinkedProject,getProjectByNameOrId,resolveProjectCwd}from"./chunk-2J35YKA2.js";import{LinkRequiredError,ProjectNotFound}from"./chunk-4DMKP6AO.js";async function getProjectByCwdOrLink({autoConfirm,nonInteractive,client,commandName,cwd,projectNameOrId,forReadOnlyCommand}){if(projectNameOrId){let project=await getProjectByNameOrId(client,projectNameOrId);if(project instanceof ProjectNotFound)throw project;return project}let effectiveNonInteractive=nonInteractive??client.nonInteractive??argvHasNonInteractive(client.argv);if(forReadOnlyCommand&&effectiveNonInteractive){let resolvedCwd=await resolveProjectCwd(cwd??client.cwd),link=await getLinkedProject(client,{cwd:resolvedCwd});if(link.status==="linked"&&link.project)return link.project;if(link.status==="error"){let err=new Error("Link project error");throw err.code="ERR_LINK_PROJECT",err}throw new LinkRequiredError}let linkedProject=await ensureLink(commandName,client,cwd??client.cwd,{autoConfirm,nonInteractive});if(typeof linkedProject=="number"){let err=new Error("Link project error");throw err.code="ERR_LINK_PROJECT",err}return linkedProject.project}export{getProjectByCwdOrLink};
7
+ import{ensureLink}from"./chunk-U7XX53IQ.js";import{argvHasNonInteractive}from"./chunk-GORL5DZC.js";import{getLinkedProject,getProjectByNameOrId,resolveProjectCwd}from"./chunk-TFTF3C3G.js";import{LinkRequiredError,ProjectNotFound}from"./chunk-GOI2VVI7.js";async function getProjectByCwdOrLink({autoConfirm,nonInteractive,client,commandName,cwd,projectNameOrId,forReadOnlyCommand}){if(projectNameOrId){let project=await getProjectByNameOrId(client,projectNameOrId);if(project instanceof ProjectNotFound)throw project;return project}let effectiveNonInteractive=nonInteractive??client.nonInteractive??argvHasNonInteractive(client.argv);if(forReadOnlyCommand&&effectiveNonInteractive){let resolvedCwd=await resolveProjectCwd(cwd??client.cwd),link=await getLinkedProject(client,{cwd:resolvedCwd});if(link.status==="linked"&&link.project)return link.project;if(link.status==="error"){let err=new Error("Link project error");throw err.code="ERR_LINK_PROJECT",err}throw new LinkRequiredError}let linkedProject=await ensureLink(commandName,client,cwd??client.cwd,{autoConfirm,nonInteractive});if(typeof linkedProject=="number"){let err=new Error("Link project error");throw err.code="ERR_LINK_PROJECT",err}return linkedProject.project}export{getProjectByCwdOrLink};
@@ -10,4 +10,4 @@ import{require_string_width}from"./chunk-BULSRTQE.js";import{__commonJS,__requir
10
10
  `)!=-1,nestedStyles=this._styles,i=nestedStyles.length;i--;){var code=ansiStyles[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close,newLinesPresent&&(str=str.replace(newLineRegex,function(match){return code.close+match+code.open}))}return str}colors.setTheme=function(theme){if(typeof theme=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var style in theme)(function(style2){colors[style2]=function(str){if(typeof theme[style2]=="object"){var out=str;for(var i in theme[style2])out=colors[theme[style2][i]](out);return out}return colors[theme[style2]](str)}})(style)};function init(){var ret={};return Object.keys(styles).forEach(function(name){ret[name]={get:function(){return build([name])}}}),ret}var sequencer=function(map2,str){var exploded=str.split("");return exploded=exploded.map(map2),exploded.join("")};colors.trap=require_trap();colors.zalgo=require_zalgo();colors.maps={};colors.maps.america=require_america()(colors);colors.maps.zebra=require_zebra()(colors);colors.maps.rainbow=require_rainbow()(colors);colors.maps.random=require_random()(colors);for(map in colors.maps)(function(map2){colors[map2]=function(str){return sequencer(colors.maps[map2],str)}})(map);var map;defineProps(colors,init())}});var require_safe=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js"(exports,module){var colors=require_colors();module.exports=colors}});var require_cell=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/cell.js"(exports,module){var{info,debug}=require_debug(),utils=require_utils(),Cell=class _Cell{constructor(options){this.setOptions(options),this.x=null,this.y=null}setOptions(options){["boolean","number","string"].indexOf(typeof options)!==-1&&(options={content:""+options}),options=options||{},this.options=options;let content=options.content;if(["boolean","number","string"].indexOf(typeof content)!==-1)this.content=String(content);else if(!content)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof content);this.colSpan=options.colSpan||1,this.rowSpan=options.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(tableOptions,cells){this.cells=cells;let optionsChars=this.options.chars||{},tableChars=tableOptions.chars,chars=this.chars={};CHAR_NAMES.forEach(function(name){setOption(optionsChars,tableChars,name,chars)}),this.truncate=this.options.truncate||tableOptions.truncate;let style=this.options.style=this.options.style||{},tableStyle=tableOptions.style;setOption(style,tableStyle,"padding-left",this),setOption(style,tableStyle,"padding-right",this),this.head=style.head||tableStyle.head,this.border=style.border||tableStyle.border,this.fixedWidth=tableOptions.colWidths[this.x],this.lines=this.computeLines(tableOptions),this.desiredWidth=utils.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(tableOptions){let tableWordWrap=tableOptions.wordWrap||tableOptions.textWrap,{wordWrap=tableWordWrap}=this.options;if(this.fixedWidth&&wordWrap){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let i=1;for(;i<this.colSpan;)this.fixedWidth+=tableOptions.colWidths[this.x+i],i++}let{wrapOnWordBoundary:tableWrapOnWordBoundary=!0}=tableOptions,{wrapOnWordBoundary=tableWrapOnWordBoundary}=this.options;return this.wrapLines(utils.wordWrap(this.fixedWidth,this.content,wrapOnWordBoundary))}return this.wrapLines(this.content.split(`
11
11
  `))}wrapLines(computedLines){let lines=utils.colorizeLines(computedLines);return this.href?lines.map(line=>utils.hyperlink(this.href,line)):lines}init(tableOptions){let x=this.x,y=this.y;this.widths=tableOptions.colWidths.slice(x,x+this.colSpan),this.heights=tableOptions.rowHeights.slice(y,y+this.rowSpan),this.width=this.widths.reduce(sumPlusOne,-1),this.height=this.heights.reduce(sumPlusOne,-1),this.hAlign=this.options.hAlign||tableOptions.colAligns[x],this.vAlign=this.options.vAlign||tableOptions.rowAligns[y],this.drawRight=x+this.colSpan==tableOptions.colWidths.length}draw(lineNum,spanningCell){if(lineNum=="top")return this.drawTop(this.drawRight);if(lineNum=="bottom")return this.drawBottom(this.drawRight);let content=utils.truncate(this.content,10,this.truncate);lineNum||info(`${this.y}-${this.x}: ${this.rowSpan-lineNum}x${this.colSpan} Cell ${content}`);let padLen=Math.max(this.height-this.lines.length,0),padTop;switch(this.vAlign){case"center":padTop=Math.ceil(padLen/2);break;case"bottom":padTop=padLen;break;default:padTop=0}if(lineNum<padTop||lineNum>=padTop+this.lines.length)return this.drawEmpty(this.drawRight,spanningCell);let forceTruncation=this.lines.length>this.height&&lineNum+1>=this.height;return this.drawLine(lineNum-padTop,this.drawRight,forceTruncation,spanningCell)}drawTop(drawRight){let content=[];return this.cells?this.widths.forEach(function(width,index){content.push(this._topLeftChar(index)),content.push(utils.repeat(this.chars[this.y==0?"top":"mid"],width))},this):(content.push(this._topLeftChar(0)),content.push(utils.repeat(this.chars[this.y==0?"top":"mid"],this.width))),drawRight&&content.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",content.join(""))}_topLeftChar(offset){let x=this.x+offset,leftChar;if(this.y==0)leftChar=x==0?"topLeft":offset==0?"topMid":"top";else if(x==0)leftChar="leftMid";else if(leftChar=offset==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][x]instanceof _Cell.ColSpanCell&&(leftChar=offset==0?"topMid":"mid"),offset==0)){let i=1;for(;this.cells[this.y][x-i]instanceof _Cell.ColSpanCell;)i++;this.cells[this.y][x-i]instanceof _Cell.RowSpanCell&&(leftChar="leftMid")}return this.chars[leftChar]}wrapWithStyleColors(styleProperty,content){if(this[styleProperty]&&this[styleProperty].length)try{let colors=require_safe();for(let i=this[styleProperty].length-1;i>=0;i--)colors=colors[this[styleProperty][i]];return colors(content)}catch{return content}else return content}drawLine(lineNum,drawRight,forceTruncationSymbol,spanningCell){let left=this.chars[this.x==0?"left":"middle"];if(this.x&&spanningCell&&this.cells){let cellLeft=this.cells[this.y+spanningCell][this.x-1];for(;cellLeft instanceof ColSpanCell;)cellLeft=this.cells[cellLeft.y][cellLeft.x-1];cellLeft instanceof RowSpanCell||(left=this.chars.rightMid)}let leftPadding=utils.repeat(" ",this.paddingLeft),right=drawRight?this.chars.right:"",rightPadding=utils.repeat(" ",this.paddingRight),line=this.lines[lineNum],len=this.width-(this.paddingLeft+this.paddingRight);forceTruncationSymbol&&(line+=this.truncate||"\u2026");let content=utils.truncate(line,len,this.truncate);return content=utils.pad(content,len," ",this.hAlign),content=leftPadding+content+rightPadding,this.stylizeLine(left,content,right)}stylizeLine(left,content,right){return left=this.wrapWithStyleColors("border",left),right=this.wrapWithStyleColors("border",right),this.y===0&&(content=this.wrapWithStyleColors("head",content)),left+content+right}drawBottom(drawRight){let left=this.chars[this.x==0?"bottomLeft":"bottomMid"],content=utils.repeat(this.chars.bottom,this.width),right=drawRight?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",left+content+right)}drawEmpty(drawRight,spanningCell){let left=this.chars[this.x==0?"left":"middle"];if(this.x&&spanningCell&&this.cells){let cellLeft=this.cells[this.y+spanningCell][this.x-1];for(;cellLeft instanceof ColSpanCell;)cellLeft=this.cells[cellLeft.y][cellLeft.x-1];cellLeft instanceof RowSpanCell||(left=this.chars.rightMid)}let right=drawRight?this.chars.right:"",content=utils.repeat(" ",this.width);return this.stylizeLine(left,content,right)}},ColSpanCell=class{constructor(){}draw(lineNum){return typeof lineNum=="number"&&debug(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},RowSpanCell=class{constructor(originalCell){this.originalCell=originalCell}init(tableOptions){let y=this.y,originalY=this.originalCell.y;this.cellOffset=y-originalY,this.offset=findDimension(tableOptions.rowHeights,originalY,this.cellOffset)}draw(lineNum){return lineNum=="top"?this.originalCell.draw(this.offset,this.cellOffset):lineNum=="bottom"?this.originalCell.draw("bottom"):(debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+lineNum))}mergeTableOptions(){}};function firstDefined(...args){return args.filter(v=>v!=null).shift()}function setOption(objA,objB,nameB,targetObj){let nameA=nameB.split("-");nameA.length>1?(nameA[1]=nameA[1].charAt(0).toUpperCase()+nameA[1].substr(1),nameA=nameA.join(""),targetObj[nameA]=firstDefined(objA[nameA],objA[nameB],objB[nameA],objB[nameB])):targetObj[nameB]=firstDefined(objA[nameB],objB[nameB])}function findDimension(dimensionTable,startingIndex,span){let ret=dimensionTable[startingIndex];for(let i=1;i<span;i++)ret+=1+dimensionTable[startingIndex+i];return ret}function sumPlusOne(a,b){return a+b+1}var CHAR_NAMES=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];module.exports=Cell;module.exports.ColSpanCell=ColSpanCell;module.exports.RowSpanCell=RowSpanCell}});var require_layout_manager=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/layout-manager.js"(exports,module){var{warn,debug}=require_debug(),Cell=require_cell(),{ColSpanCell,RowSpanCell}=Cell;(function(){function next(alloc,col){return alloc[col]>0?next(alloc,col+1):col}function layoutTable(table2){let alloc={};table2.forEach(function(row,rowIndex){let col=0;row.forEach(function(cell){cell.y=rowIndex,cell.x=rowIndex?next(alloc,col):col;let rowSpan=cell.rowSpan||1,colSpan=cell.colSpan||1;if(rowSpan>1)for(let cs=0;cs<colSpan;cs++)alloc[cell.x+cs]=rowSpan;col=cell.x+colSpan}),Object.keys(alloc).forEach(idx=>{alloc[idx]--,alloc[idx]<1&&delete alloc[idx]})})}function maxWidth(table2){let mw=0;return table2.forEach(function(row){row.forEach(function(cell){mw=Math.max(mw,cell.x+(cell.colSpan||1))})}),mw}function maxHeight(table2){return table2.length}function cellsConflict(cell1,cell2){let yMin1=cell1.y,yMax1=cell1.y-1+(cell1.rowSpan||1),yMin2=cell2.y,yMax2=cell2.y-1+(cell2.rowSpan||1),yConflict=!(yMin1>yMax2||yMin2>yMax1),xMin1=cell1.x,xMax1=cell1.x-1+(cell1.colSpan||1),xMin2=cell2.x,xMax2=cell2.x-1+(cell2.colSpan||1),xConflict=!(xMin1>xMax2||xMin2>xMax1);return yConflict&&xConflict}function conflictExists(rows,x,y){let i_max=Math.min(rows.length-1,y),cell={x,y};for(let i=0;i<=i_max;i++){let row=rows[i];for(let j=0;j<row.length;j++)if(cellsConflict(cell,row[j]))return!0}return!1}function allBlank(rows,y,xMin,xMax){for(let x=xMin;x<xMax;x++)if(conflictExists(rows,x,y))return!1;return!0}function addRowSpanCells(table2){table2.forEach(function(row,rowIndex){row.forEach(function(cell){for(let i=1;i<cell.rowSpan;i++){let rowSpanCell=new RowSpanCell(cell);rowSpanCell.x=cell.x,rowSpanCell.y=cell.y+i,rowSpanCell.colSpan=cell.colSpan,insertCell(rowSpanCell,table2[rowIndex+i])}})})}function addColSpanCells(cellRows){for(let rowIndex=cellRows.length-1;rowIndex>=0;rowIndex--){let cellColumns=cellRows[rowIndex];for(let columnIndex=0;columnIndex<cellColumns.length;columnIndex++){let cell=cellColumns[columnIndex];for(let k=1;k<cell.colSpan;k++){let colSpanCell=new ColSpanCell;colSpanCell.x=cell.x+k,colSpanCell.y=cell.y,cellColumns.splice(columnIndex+1,0,colSpanCell)}}}}function insertCell(cell,row){let x=0;for(;x<row.length&&row[x].x<cell.x;)x++;row.splice(x,0,cell)}function fillInTable(table2){let h_max=maxHeight(table2),w_max=maxWidth(table2);debug(`Max rows: ${h_max}; Max cols: ${w_max}`);for(let y=0;y<h_max;y++)for(let x=0;x<w_max;x++)if(!conflictExists(table2,x,y)){let opts={x,y,colSpan:1,rowSpan:1};for(x++;x<w_max&&!conflictExists(table2,x,y);)opts.colSpan++,x++;let y2=y+1;for(;y2<h_max&&allBlank(table2,y2,opts.x,opts.x+opts.colSpan);)opts.rowSpan++,y2++;let cell=new Cell(opts);cell.x=opts.x,cell.y=opts.y,warn(`Missing cell at ${cell.y}-${cell.x}.`),insertCell(cell,table2[y])}}function generateCells(rows){return rows.map(function(row){if(!Array.isArray(row)){let key=Object.keys(row)[0];row=row[key],Array.isArray(row)?(row=row.slice(),row.unshift(key)):row=[key,row]}return row.map(function(cell){return new Cell(cell)})})}function makeTableLayout(rows){let cellRows=generateCells(rows);return layoutTable(cellRows),fillInTable(cellRows),addRowSpanCells(cellRows),addColSpanCells(cellRows),cellRows}module.exports={makeTableLayout,layoutTable,addRowSpanCells,maxWidth,fillInTable,computeWidths:makeComputeWidths("colSpan","desiredWidth","x",1),computeHeights:makeComputeWidths("rowSpan","desiredHeight","y",1)}})();function makeComputeWidths(colSpan,desiredWidth,x,forcedMin){return function(vals,table2){let result=[],spanners=[],auto={};table2.forEach(function(row){row.forEach(function(cell){(cell[colSpan]||1)>1?spanners.push(cell):result[cell[x]]=Math.max(result[cell[x]]||0,cell[desiredWidth]||0,forcedMin)})}),vals.forEach(function(val,index){typeof val=="number"&&(result[index]=val)});for(let k=spanners.length-1;k>=0;k--){let cell=spanners[k],span=cell[colSpan],col=cell[x],existingWidth=result[col],editableCols=typeof vals[col]=="number"?0:1;if(typeof existingWidth=="number")for(let i=1;i<span;i++)existingWidth+=1+result[col+i],typeof vals[col+i]!="number"&&editableCols++;else existingWidth=desiredWidth==="desiredWidth"?cell.desiredWidth-1:1,(!auto[col]||auto[col]<existingWidth)&&(auto[col]=existingWidth);if(cell[desiredWidth]>existingWidth){let i=0;for(;editableCols>0&&cell[desiredWidth]>existingWidth;){if(typeof vals[col+i]!="number"){let dif=Math.round((cell[desiredWidth]-existingWidth)/editableCols);existingWidth+=dif,result[col+i]+=dif,editableCols--}i++}}}Object.assign(vals,result,auto);for(let j=0;j<vals.length;j++)vals[j]=Math.max(forcedMin,vals[j]||0)}}}});var require_table=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/table.js"(exports,module){var debug=require_debug(),utils=require_utils(),tableLayout=require_layout_manager(),Table2=class extends Array{constructor(opts){super();let options=utils.mergeOptions(opts);if(Object.defineProperty(this,"options",{value:options,enumerable:options.debug}),options.debug){switch(typeof options.debug){case"boolean":debug.setDebugLevel(debug.WARN);break;case"number":debug.setDebugLevel(options.debug);break;case"string":debug.setDebugLevel(parseInt(options.debug,10));break;default:debug.setDebugLevel(debug.WARN),debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`)}Object.defineProperty(this,"messages",{get(){return debug.debugMessages()}})}}toString(){let array=this,headersPresent=this.options.head&&this.options.head.length;headersPresent?(array=[this.options.head],this.length&&array.push.apply(array,this)):this.options.style.head=[];let cells=tableLayout.makeTableLayout(array);cells.forEach(function(row){row.forEach(function(cell){cell.mergeTableOptions(this.options,cells)},this)},this),tableLayout.computeWidths(this.options.colWidths,cells),tableLayout.computeHeights(this.options.rowHeights,cells),cells.forEach(function(row){row.forEach(function(cell){cell.init(this.options)},this)},this);let result=[];for(let rowIndex=0;rowIndex<cells.length;rowIndex++){let row=cells[rowIndex],heightOfRow=this.options.rowHeights[rowIndex];(rowIndex===0||!this.options.style.compact||rowIndex==1&&headersPresent)&&doDraw(row,"top",result);for(let lineNum=0;lineNum<heightOfRow;lineNum++)doDraw(row,lineNum,result);rowIndex+1==cells.length&&doDraw(row,"bottom",result)}return result.join(`
12
12
  `)}get width(){return this.toString().split(`
13
- `)[0].length}};Table2.reset=()=>debug.reset();function doDraw(row,lineNum,result){let line=[];row.forEach(function(cell){line.push(cell.draw(lineNum))});let str=line.join("");str.length&&result.push(str)}module.exports=Table2}});var require_cli_table3=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/index.js"(exports,module){module.exports=require_table()}});var import_cli_table3=__toESM(require_cli_table3(),1),defaultStyle={"padding-left":0,"padding-right":2},noBorderChars={top:"","top-mid":"","top-left":"","top-right":"",bottom:"","bottom-mid":"","bottom-left":"","bottom-right":"",left:"","left-mid":"",mid:"","mid-mid":"",right:"","right-mid":"",middle:""},alignMap={l:"left",c:"center",r:"right"};function table(rows,opts){let table2=new import_cli_table3.default({style:{...defaultStyle,"padding-right":opts?.hsep??defaultStyle["padding-right"]},chars:noBorderChars});return table2.push(...rows.map(row=>row.map((cell,i)=>({content:cell,hAlign:alignMap[opts?.align?.[i]??"l"]})))),table2.toString()}export{table};
13
+ `)[0].length}};Table2.reset=()=>debug.reset();function doDraw(row,lineNum,result){let line=[];row.forEach(function(cell){line.push(cell.draw(lineNum))});let str=line.join("");str.length&&result.push(str)}module.exports=Table2}});var require_cli_table3=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/index.js"(exports,module){module.exports=require_table()}});var import_cli_table3=__toESM(require_cli_table3(),1),defaultStyle={"padding-left":0,"padding-right":2},noBorderChars={top:"","top-mid":"","top-left":"","top-right":"",bottom:"","bottom-mid":"","bottom-left":"","bottom-right":"",left:"","left-mid":"",mid:"","mid-mid":"",right:"","right-mid":"",middle:""},alignMap={l:"left",c:"center",r:"right"};function table(rows,opts){let table2=new import_cli_table3.default({style:{...defaultStyle,"padding-right":opts?.hsep??defaultStyle["padding-right"]},chars:noBorderChars});return table2.push(...rows.map(row=>row.map((cell,i)=>({content:cell,hAlign:alignMap[opts?.align?.[i]??"l"]})))),table2.toString()}export{noBorderChars,table};
@@ -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{warnDeprecatedInput}from"./chunk-SDYCW5JM.js";import{output_manager_default}from"./chunk-GZLYNPNU.js";function parseTarget({flagName,flags}){let targetFlagName=`--${flagName}`,targetFlagValue=flags[targetFlagName],prodFlagValue=flags["--prod"];if(prodFlagValue&&targetFlagValue){let typedFlagName=flags["--target"]!==void 0?"--target":targetFlagName;output_manager_default.warning(`Ignoring --prod because ${typedFlagName} is also set. Pass only one of them.`)}if(typeof targetFlagValue=="string")return output_manager_default.debug(`Setting target to ${targetFlagValue}`),targetFlagValue;if(prodFlagValue)return output_manager_default.debug("Setting target to production"),"production"}function applyDeprecatedTargetFlag(client,flags){let target=flags["--target"];return target===void 0?!0:flags["--environment"]!==void 0?(output_manager_default.error("Can't use --target with --environment. Use --environment."),!1):(warnDeprecatedInput(client,"--target","--environment"),flags["--environment"]=target,!0)}function warnDeprecatedProdFlag(client,flags){flags["--prod"]&&warnDeprecatedInput(client,"--prod","--environment production")}export{parseTarget,applyDeprecatedTargetFlag,warnDeprecatedProdFlag};
7
+ import{warnDeprecatedInput}from"./chunk-JONZUKWX.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";function parseTarget({flagName,flags}){let targetFlagName=`--${flagName}`,targetFlagValue=flags[targetFlagName],prodFlagValue=flags["--prod"];if(prodFlagValue&&targetFlagValue){let typedFlagName=flags["--target"]!==void 0?"--target":targetFlagName;output_manager_default.warning(`Ignoring --prod because ${typedFlagName} is also set. Pass only one of them.`)}if(typeof targetFlagValue=="string")return output_manager_default.debug(`Setting target to ${targetFlagValue}`),targetFlagValue;if(prodFlagValue)return output_manager_default.debug("Setting target to production"),"production"}function applyDeprecatedTargetFlag(client,flags){let target=flags["--target"];return target===void 0?!0:flags["--environment"]!==void 0?(output_manager_default.error("Can't use --target with --environment. Use --environment."),!1):(warnDeprecatedInput(client,"--target","--environment"),flags["--environment"]=target,!0)}function warnDeprecatedProdFlag(client,flags){flags["--prod"]&&warnDeprecatedInput(client,"--prod","--environment production")}export{parseTarget,applyDeprecatedTargetFlag,warnDeprecatedProdFlag};
@@ -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-UNPK7LVC.js";function getProjectNameFromFlags(flags){return flags["--project"]}function getLinkedFlagsProject(client,projectName,options){return resolveProjectContext({client,projectNameOrId:projectName,projectNotFoundHandling:options?.projectNotFoundHandling})}export{getProjectNameFromFlags,getLinkedFlagsProject};
7
+ import{resolveProjectContext}from"./chunk-AUAV6LGZ.js";function getProjectNameFromFlags(flags){return flags["--project"]}function getLinkedFlagsProject(client,projectName,options){return resolveProjectContext({client,projectNameOrId:projectName,projectNotFoundHandling:options?.projectNotFoundHandling})}export{getProjectNameFromFlags,getLinkedFlagsProject};
@@ -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_dist}from"./chunk-RM3ZDRYE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_error_utils=__toESM(require_dist(),1);import{randomUUID}from"crypto";import{chmod,lstat,mkdir,readFile,readdir,realpath,rename,rm,writeFile}from"fs/promises";import{isAbsolute,join}from"path";var LOCAL_SCHEDULES_SESSION_HEADER="x-vercel-schedules-dev-session",uuidPattern=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function isLocalSchedulesOrigin(origin){if(typeof origin!="string")return!1;let match=/^http:\/\/127\.0\.0\.1:([1-9][0-9]{0,4})$/.exec(origin);return!!match&&match[0]===origin&&Number(match[1])<=65535}async function createLocalSchedulesSession(cwd,origin,projectId){if(!isLocalSchedulesOrigin(origin)||!projectId.trim())throw new Error("Cannot publish local Schedules: expected an HTTP 127.0.0.1 origin with a valid port and a project ID.");let canonicalCwd=await realpath(cwd),directory=join(canonicalCwd,".vercel","dev","schedules");await mkdir(directory,{recursive:!0,mode:448}),await chmod(directory,448);let session={version:1,id:randomUUID(),pid:process.pid,cwd:canonicalCwd,origin,projectId},filename=join(directory,`${session.id}.json`),temporary=join(directory,`${session.id}.tmp`);try{await writeFile(temporary,JSON.stringify(session),{flag:"wx",mode:384}),await rename(temporary,filename)}catch(error){throw await rm(temporary,{force:!0}),error}return{session,dispose:()=>rm(filename,{force:!0})}}async function readLocalSchedulesSessions(cwd){let canonicalCwd=await realpath(cwd),directory=join(canonicalCwd,".vercel","dev","schedules"),filenames;try{filenames=await readdir(directory)}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ENOENT")return[];throw error}let sessions=[];for(let filename of filenames.sort()){if(!filename.endsWith(".json"))continue;let path=join(directory,filename),session;try{if(filename.length!==41||!uuidPattern.test(filename.slice(0,-5)))throw new Error("expected a UUID filename");if(!(await lstat(path)).isFile())throw new Error("expected a regular session file");if(session=JSON.parse(await readFile(path,"utf8")),!session||session.version!==1)throw new Error("unsupported session version (expected version 1)");if(session.id!==filename.slice(0,-5)||!Number.isSafeInteger(session.pid)||session.pid<=0||typeof session.cwd!="string"||!isAbsolute(session.cwd)||!isLocalSchedulesOrigin(session.origin)||typeof session.projectId!="string"||!session.projectId.trim())throw new Error("invalid session descriptor");try{process.kill(session.pid,0)}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ESRCH")continue;if(!(0,import_error_utils.isErrnoException)(error)||error.code!=="EPERM")throw error}if(await realpath(session.cwd)!==canonicalCwd)throw new Error("session directory does not match the current directory")}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ENOENT")try{await lstat(path)}catch(missing){if((0,import_error_utils.isErrnoException)(missing)&&missing.code==="ENOENT")continue;throw missing}throw new Error(`Cannot read local Schedules session ${path}: ${error instanceof Error?error.message:String(error)}. Stop vercel dev, remove this descriptor, and restart vercel dev in the current directory.`)}sessions.push(session)}return sessions}export{LOCAL_SCHEDULES_SESSION_HEADER,isLocalSchedulesOrigin,createLocalSchedulesSession,readLocalSchedulesSessions};
7
+ import{require_dist}from"./chunk-MCYG7CCE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_error_utils=__toESM(require_dist(),1);import{randomUUID}from"crypto";import{chmod,lstat,mkdir,readFile,readdir,realpath,rename,rm,writeFile}from"fs/promises";import{isAbsolute,join}from"path";var LOCAL_SCHEDULES_SESSION_HEADER="x-vercel-schedules-dev-session",uuidPattern=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function isLocalSchedulesOrigin(origin){if(typeof origin!="string")return!1;let match=/^http:\/\/127\.0\.0\.1:([1-9][0-9]{0,4})$/.exec(origin);return!!match&&match[0]===origin&&Number(match[1])<=65535}async function createLocalSchedulesSession(cwd,origin,projectId){if(!isLocalSchedulesOrigin(origin)||!projectId.trim())throw new Error("Cannot publish local Schedules: expected an HTTP 127.0.0.1 origin with a valid port and a project ID.");let canonicalCwd=await realpath(cwd),directory=join(canonicalCwd,".vercel","dev","schedules");await mkdir(directory,{recursive:!0,mode:448}),await chmod(directory,448);let session={version:1,id:randomUUID(),pid:process.pid,cwd:canonicalCwd,origin,projectId},filename=join(directory,`${session.id}.json`),temporary=join(directory,`${session.id}.tmp`);try{await writeFile(temporary,JSON.stringify(session),{flag:"wx",mode:384}),await rename(temporary,filename)}catch(error){throw await rm(temporary,{force:!0}),error}return{session,dispose:()=>rm(filename,{force:!0})}}async function readLocalSchedulesSessions(cwd){let canonicalCwd=await realpath(cwd),directory=join(canonicalCwd,".vercel","dev","schedules"),filenames;try{filenames=await readdir(directory)}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ENOENT")return[];throw error}let sessions=[];for(let filename of filenames.sort()){if(!filename.endsWith(".json"))continue;let path=join(directory,filename),session;try{if(filename.length!==41||!uuidPattern.test(filename.slice(0,-5)))throw new Error("expected a UUID filename");if(!(await lstat(path)).isFile())throw new Error("expected a regular session file");if(session=JSON.parse(await readFile(path,"utf8")),!session||session.version!==1)throw new Error("unsupported session version (expected version 1)");if(session.id!==filename.slice(0,-5)||!Number.isSafeInteger(session.pid)||session.pid<=0||typeof session.cwd!="string"||!isAbsolute(session.cwd)||!isLocalSchedulesOrigin(session.origin)||typeof session.projectId!="string"||!session.projectId.trim())throw new Error("invalid session descriptor");try{process.kill(session.pid,0)}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ESRCH")continue;if(!(0,import_error_utils.isErrnoException)(error)||error.code!=="EPERM")throw error}if(await realpath(session.cwd)!==canonicalCwd)throw new Error("session directory does not match the current directory")}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ENOENT")try{await lstat(path)}catch(missing){if((0,import_error_utils.isErrnoException)(missing)&&missing.code==="ENOENT")continue;throw missing}throw new Error(`Cannot read local Schedules session ${path}: ${error instanceof Error?error.message:String(error)}. Stop vercel dev, remove this descriptor, and restart vercel dev in the current directory.`)}sessions.push(session)}return sessions}export{LOCAL_SCHEDULES_SESSION_HEADER,isLocalSchedulesOrigin,createLocalSchedulesSession,readLocalSchedulesSessions};