@vercel/cli-support 68.0.0 → 68.1.0-snapshot-3c48721091f5

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 (494) hide show
  1. package/dist/chunks/add-57EE2LQO.js +8 -0
  2. package/dist/chunks/{add-4ZXS4RRN.js → add-DNRNPUU7.js} +1 -1
  3. package/dist/chunks/{add-G2LGF4HL.js → add-FLVE2M3L.js} +1 -1
  4. package/dist/chunks/{alerts-3352VWDL.js → alerts-26PDHRBL.js} +1 -1
  5. package/dist/chunks/{api-endpoints-2IYXPLEG.js → api-endpoints-EY2DO75S.js} +1 -1
  6. package/dist/chunks/auth-4A5CXZOA.js +7 -0
  7. package/dist/chunks/auth-ZJV6OHMS.js +7 -0
  8. package/dist/chunks/{build-3UFKTTS5.js → build-6WTRWW2M.js} +1 -1
  9. package/dist/chunks/{chunk-D6REP5QQ.js → chunk-2GXP676X.js} +1 -1
  10. package/dist/chunks/{chunk-MXTC4ZAQ.js → chunk-2ILZM77F.js} +1 -1
  11. package/dist/chunks/{chunk-OFDTADPQ.js → chunk-2K7U64CN.js} +1 -1
  12. package/dist/chunks/{chunk-Y4YBQUQM.js → chunk-2STLJAXZ.js} +1 -1
  13. package/dist/chunks/{chunk-PAHYNO73.js → chunk-2TUJJIYU.js} +1 -1
  14. package/dist/chunks/chunk-2XQO6C7Q.js +7 -0
  15. package/dist/chunks/{chunk-DH4A4QMD.js → chunk-33ETNP4M.js} +1 -1
  16. package/dist/chunks/{chunk-L46V6VL3.js → chunk-37SWAKIV.js} +1 -1
  17. package/dist/chunks/{chunk-23FY4PR3.js → chunk-3F3WNT5K.js} +1 -1
  18. package/dist/chunks/{chunk-ZXSZH7N5.js → chunk-3GKXXGSO.js} +1 -1
  19. package/dist/chunks/{chunk-QSL6AG2B.js → chunk-3HP6FOOL.js} +1 -1
  20. package/dist/chunks/{chunk-M32HBBPK.js → chunk-3WXQHKSS.js} +1 -1
  21. package/dist/chunks/{chunk-JELLVPCM.js → chunk-3XMKTJ5T.js} +1 -1
  22. package/dist/chunks/{chunk-YLXXGQQQ.js → chunk-42D3CPWB.js} +1 -1
  23. package/dist/chunks/{chunk-5A3DDLQR.js → chunk-42RUDD27.js} +1 -1
  24. package/dist/chunks/{chunk-HRR57QNP.js → chunk-46R47IE5.js} +1 -1
  25. package/dist/chunks/{chunk-OOPF73RV.js → chunk-4FPYV37P.js} +1 -1
  26. package/dist/chunks/{chunk-CAJ2OUSR.js → chunk-4L7AKIX7.js} +1 -1
  27. package/dist/chunks/{chunk-SGNDE4YS.js → chunk-4MAA4BQD.js} +1 -1
  28. package/dist/chunks/{chunk-FTNLCQC6.js → chunk-4OOHXEKI.js} +1 -1
  29. package/dist/chunks/{chunk-NMIB4JYP.js → chunk-4R7ICESH.js} +1 -1
  30. package/dist/chunks/{chunk-MCYG7CCE.js → chunk-4SIQE2W4.js} +1 -1
  31. package/dist/chunks/chunk-4WEKKDOL.js +8 -0
  32. package/dist/chunks/{chunk-TU54LHNW.js → chunk-54W7S4EV.js} +1 -1
  33. package/dist/chunks/{chunk-NWGBDBZI.js → chunk-5F4RJ32E.js} +1 -1
  34. package/dist/chunks/{chunk-KRPY5FHJ.js → chunk-5QC4IKRZ.js} +1 -1
  35. package/dist/chunks/{chunk-2AMO2VMV.js → chunk-64GNDWWX.js} +1 -1
  36. package/dist/chunks/{chunk-J24BABG4.js → chunk-6G2AZBW5.js} +1 -1
  37. package/dist/chunks/{chunk-DY643UZ7.js → chunk-6JBKQ5LR.js} +2 -3
  38. package/dist/chunks/{chunk-AVCLYJNC.js → chunk-6KI5LJIB.js} +1 -1
  39. package/dist/chunks/{chunk-X755TPX6.js → chunk-6O2LDFGJ.js} +1 -1
  40. package/dist/chunks/chunk-6OOJFAF5.js +20 -0
  41. package/dist/chunks/{chunk-E7IN2DGU.js → chunk-6XXXPJBV.js} +1 -1
  42. package/dist/chunks/chunk-732HWE3P.js +181 -0
  43. package/dist/chunks/chunk-75TGTOZQ.js +8 -0
  44. package/dist/chunks/{chunk-4FBOQLPZ.js → chunk-76AOTUM2.js} +1 -1
  45. package/dist/chunks/{chunk-KXMFGDO4.js → chunk-76XUBFXI.js} +1 -1
  46. package/dist/chunks/{chunk-VBANKZWM.js → chunk-7CLATJZX.js} +1 -1
  47. package/dist/chunks/{chunk-UPDIZCP3.js → chunk-7EI554V5.js} +1 -1
  48. package/dist/chunks/{chunk-IVZNPSHU.js → chunk-7IHVCKUV.js} +1 -1
  49. package/dist/chunks/{chunk-PSOVLGHP.js → chunk-7O3D3XED.js} +1 -1
  50. package/dist/chunks/{chunk-YTSUDTAK.js → chunk-7OOCSVWT.js} +1 -1
  51. package/dist/chunks/{chunk-FXLZM6Q7.js → chunk-7PK2JFEH.js} +1 -1
  52. package/dist/chunks/chunk-7Q5I3L37.js +68 -0
  53. package/dist/chunks/{chunk-24SIHFEW.js → chunk-7QHUMMBA.js} +1 -1
  54. package/dist/chunks/{chunk-5727HGA6.js → chunk-7TREJIPV.js} +1 -1
  55. package/dist/chunks/{chunk-4HR3I3ML.js → chunk-7TRHPXCG.js} +1 -1
  56. package/dist/chunks/{chunk-BLUPZPAS.js → chunk-7Y572CPZ.js} +1 -1
  57. package/dist/chunks/chunk-7ZCM4LWL.js +15 -0
  58. package/dist/chunks/{chunk-H3ZSF2P3.js → chunk-A7XRIU6Z.js} +1 -1
  59. package/dist/chunks/chunk-AASXSNBW.js +17 -0
  60. package/dist/chunks/{chunk-6DBLXAJI.js → chunk-AGFG7WHE.js} +1 -1
  61. package/dist/chunks/{chunk-Z73UJVGD.js → chunk-AU54JBLF.js} +1 -1
  62. package/dist/chunks/{chunk-SQ62IODX.js → chunk-AUCQKYL2.js} +1 -1
  63. package/dist/chunks/{chunk-SCV7XEEO.js → chunk-AX6UCTOC.js} +1 -1
  64. package/dist/chunks/{chunk-QHGPFYWQ.js → chunk-B7LM2BNN.js} +1 -1
  65. package/dist/chunks/{chunk-E3AML3VR.js → chunk-BB27VKHS.js} +1 -1
  66. package/dist/chunks/{chunk-YBAGKQXC.js → chunk-BCD4TRQF.js} +1 -1
  67. package/dist/chunks/{chunk-OQXHBPPS.js → chunk-BCRZI5IM.js} +1 -1
  68. package/dist/chunks/{chunk-KA2KG3SY.js → chunk-BDLZ6WL2.js} +1 -1
  69. package/dist/chunks/chunk-BFS4K2RF.js +7 -0
  70. package/dist/chunks/chunk-BKJ4H6KK.js +8 -0
  71. package/dist/chunks/{chunk-COD3WAUI.js → chunk-BNWEJZAC.js} +1 -1
  72. package/dist/chunks/{chunk-5MDNVAE6.js → chunk-BVFFSUG3.js} +1 -1
  73. package/dist/chunks/{chunk-LDDXXDN5.js → chunk-C2R5IEN6.js} +1 -1
  74. package/dist/chunks/{chunk-F7L5SXJM.js → chunk-CDO5IECP.js} +1 -1
  75. package/dist/chunks/{chunk-YN3HZJXW.js → chunk-CHTFRAXA.js} +1 -1
  76. package/dist/chunks/{chunk-XOETL6DB.js → chunk-CHY2NJU4.js} +1 -1
  77. package/dist/chunks/{chunk-MYVALJ4D.js → chunk-CNGI6Z2G.js} +1 -1
  78. package/dist/chunks/{chunk-4SWS7RKX.js → chunk-CRPZYLIL.js} +1 -1
  79. package/dist/chunks/{chunk-PVASGBEF.js → chunk-CSU46B7Q.js} +1 -1
  80. package/dist/chunks/{chunk-DORCX7UB.js → chunk-CUO3CYU3.js} +1 -1
  81. package/dist/chunks/{chunk-4SAVH3H7.js → chunk-DCFCPAFQ.js} +1 -1
  82. package/dist/chunks/{chunk-2DH6LTUI.js → chunk-DRDY2UZX.js} +1 -1
  83. package/dist/chunks/{chunk-D2JNI6UB.js → chunk-DWA7B7TB.js} +1 -1
  84. package/dist/chunks/chunk-DXFFWNK4.js +8 -0
  85. package/dist/chunks/chunk-E6VQXHBD.js +11 -0
  86. package/dist/chunks/chunk-E7ICSU45.js +7 -0
  87. package/dist/chunks/{chunk-F4KY2TOK.js → chunk-EAQLOKZX.js} +1 -1
  88. package/dist/chunks/{chunk-ZGM4K3B5.js → chunk-ECQW2R5M.js} +1 -1
  89. package/dist/chunks/{chunk-VJNTVPUV.js → chunk-EDXNAXEZ.js} +1 -1
  90. package/dist/chunks/{chunk-B4KA3ZH2.js → chunk-EFGZK6OY.js} +1 -1
  91. package/dist/chunks/{chunk-MWFHS4HV.js → chunk-EGXRQ73P.js} +1 -1
  92. package/dist/chunks/chunk-EK7U42I4.js +9 -0
  93. package/dist/chunks/{chunk-ID663OJ7.js → chunk-EL65DTVZ.js} +1 -1
  94. package/dist/chunks/{chunk-KNNIA3PS.js → chunk-EPCRR72R.js} +1 -1
  95. package/dist/chunks/{chunk-3G3FQYMW.js → chunk-ERMHTPO4.js} +1 -1
  96. package/dist/chunks/chunk-EV2VKG2V.js +8 -0
  97. package/dist/chunks/{chunk-E5A7E7X6.js → chunk-EZ3HXFLB.js} +1 -1
  98. package/dist/chunks/{chunk-NMY2YZ6M.js → chunk-F5FBLRH3.js} +1 -1
  99. package/dist/chunks/{chunk-VWKA6RKB.js → chunk-FHNHVEOX.js} +1 -1
  100. package/dist/chunks/{chunk-D3M2JG5C.js → chunk-FIICEEXO.js} +1 -1
  101. package/dist/chunks/{chunk-ZBOTJT5S.js → chunk-FMLRVSWK.js} +1 -1
  102. package/dist/chunks/chunk-FO7OSSLI.js +13 -0
  103. package/dist/chunks/{chunk-XC25DYA7.js → chunk-FSM7YM4W.js} +2 -2
  104. package/dist/chunks/chunk-FSMZPHAA.js +33 -0
  105. package/dist/chunks/chunk-FUH5PBGR.js +7 -0
  106. package/dist/chunks/{chunk-QPNTR3PA.js → chunk-FVMRKUWL.js} +1 -1
  107. package/dist/chunks/chunk-GB77JTTX.js +8 -0
  108. package/dist/chunks/{chunk-BIABM3FB.js → chunk-GILTW5RJ.js} +1 -1
  109. package/dist/chunks/{chunk-AW5KOUD7.js → chunk-GNQ7KLCN.js} +1 -1
  110. package/dist/chunks/{chunk-KLBSCTLL.js → chunk-GO64LSUW.js} +1 -1
  111. package/dist/chunks/{chunk-4NTBYNFR.js → chunk-GOXGA37R.js} +1 -1
  112. package/dist/chunks/{chunk-DGLE44KA.js → chunk-GPVXJI6X.js} +1 -1
  113. package/dist/chunks/{chunk-YTSGFU5T.js → chunk-GUFRGEM5.js} +1 -1
  114. package/dist/chunks/{chunk-WHEA5VLX.js → chunk-H43XHICL.js} +1 -1
  115. package/dist/chunks/{chunk-U43WXZBP.js → chunk-HAAKXJ4V.js} +1 -1
  116. package/dist/chunks/chunk-HAM7ZPEC.js +7 -0
  117. package/dist/chunks/{chunk-ZHGKJCQ2.js → chunk-HDKEES7E.js} +5 -5
  118. package/dist/chunks/{chunk-BTI5TG6Q.js → chunk-HGXM4UBQ.js} +1 -1
  119. package/dist/chunks/chunk-HIEFNLLO.js +7 -0
  120. package/dist/chunks/{chunk-2KXLL3DX.js → chunk-HSQPQ5RV.js} +1 -1
  121. package/dist/chunks/{chunk-DDZEKNQR.js → chunk-HT3CQEAF.js} +1 -1
  122. package/dist/chunks/{chunk-7JU5RJ3H.js → chunk-HT5EXCYX.js} +1 -1
  123. package/dist/chunks/{chunk-Z3YQZSU4.js → chunk-HXIOR7P6.js} +1 -1
  124. package/dist/chunks/{chunk-6NC2JFUQ.js → chunk-I254SHTL.js} +1 -1
  125. package/dist/chunks/{chunk-OPORM35X.js → chunk-IFMPBA4K.js} +1 -1
  126. package/dist/chunks/{chunk-EHAS6SQB.js → chunk-IKOVY76G.js} +1 -1
  127. package/dist/chunks/{chunk-BUBVZ6SQ.js → chunk-ILNTOWHG.js} +1 -1
  128. package/dist/chunks/chunk-ILUU3SGP.js +13 -0
  129. package/dist/chunks/{chunk-MCRKBVZA.js → chunk-IMLHRJ4K.js} +1 -1
  130. package/dist/chunks/{chunk-DTCQWGHE.js → chunk-IMZD7QEB.js} +2 -2
  131. package/dist/chunks/chunk-IVJEYHF5.js +8 -0
  132. package/dist/chunks/{chunk-Q6YPC3GK.js → chunk-IZOKMWU5.js} +1 -1
  133. package/dist/chunks/{chunk-BPUANOGW.js → chunk-IZV6K7RR.js} +1 -1
  134. package/dist/chunks/chunk-J5MGMWRV.js +9 -0
  135. package/dist/chunks/{chunk-BOJDM3O7.js → chunk-JCDPMWKO.js} +1 -1
  136. package/dist/chunks/{chunk-Y3V4JYK6.js → chunk-JGEJY7AC.js} +1 -1
  137. package/dist/chunks/chunk-JJTAADC5.js +7 -0
  138. package/dist/chunks/{chunk-OZKP3WKT.js → chunk-JK3NTR7T.js} +1 -1
  139. package/dist/chunks/{chunk-76NL3ZRJ.js → chunk-JM7KUCBM.js} +1 -1
  140. package/dist/chunks/chunk-JPJ6HGAN.js +7 -0
  141. package/dist/chunks/{chunk-O3YZLVC6.js → chunk-JRUL67UC.js} +3 -3
  142. package/dist/chunks/{chunk-J5SINMVO.js → chunk-K4J43D5J.js} +1 -1
  143. package/dist/chunks/{chunk-LUX4PBJL.js → chunk-K5GE24PG.js} +1 -1
  144. package/dist/chunks/{chunk-25565AGS.js → chunk-K7YK4PZP.js} +1 -1
  145. package/dist/chunks/{chunk-CTBSRTJW.js → chunk-KDCLHZYL.js} +1 -1
  146. package/dist/chunks/{chunk-GXWBL6YV.js → chunk-KDIICSD5.js} +1 -1
  147. package/dist/chunks/{chunk-FBYA6LLM.js → chunk-KHJWQ4WP.js} +1 -1
  148. package/dist/chunks/{chunk-2FUGD6J7.js → chunk-KNKGJD5J.js} +1 -1
  149. package/dist/chunks/{chunk-BRQUZ5NC.js → chunk-L4CSJDG7.js} +1 -1
  150. package/dist/chunks/{chunk-ISWW3DKF.js → chunk-L6MWUMWZ.js} +1 -1
  151. package/dist/chunks/{chunk-A6CMQOL7.js → chunk-LBJ7EOZM.js} +1 -1
  152. package/dist/chunks/{chunk-22ZRVWYP.js → chunk-LHK6B4ER.js} +2 -2
  153. package/dist/chunks/{chunk-ZBZQEDZY.js → chunk-LKFQMY5V.js} +1 -1
  154. package/dist/chunks/{chunk-KKYNEEM7.js → chunk-LKXPJLOP.js} +1 -1
  155. package/dist/chunks/{chunk-Q7D7RGXM.js → chunk-LLHXL3SV.js} +1 -1
  156. package/dist/chunks/{chunk-BS32OUOC.js → chunk-LPYHYTYI.js} +1 -1
  157. package/dist/chunks/{chunk-6WBEU34Y.js → chunk-LVPY2RTU.js} +1 -1
  158. package/dist/chunks/{chunk-A2RZZQEP.js → chunk-LY3EY2VG.js} +1 -1
  159. package/dist/chunks/chunk-M2XLLWK7.js +7 -0
  160. package/dist/chunks/chunk-M3LYYAQ6.js +7 -0
  161. package/dist/chunks/{chunk-7WDSOKOY.js → chunk-MAAJGMXM.js} +1 -1
  162. package/dist/chunks/{chunk-DWZBL4NK.js → chunk-MAIZY5BV.js} +1 -1
  163. package/dist/chunks/{chunk-5U2YLD56.js → chunk-MEF5BUJ5.js} +1 -1
  164. package/dist/chunks/{chunk-YHPPP3SF.js → chunk-MF43WTDT.js} +1 -1
  165. package/dist/chunks/{chunk-YFOBGEOW.js → chunk-MJKDKZ2J.js} +1 -1
  166. package/dist/chunks/{chunk-6Z5REGCM.js → chunk-MMMX3KE2.js} +1 -1
  167. package/dist/chunks/{chunk-ISSNEDG5.js → chunk-MN2F4NPH.js} +1 -1
  168. package/dist/chunks/{chunk-QFE3RPMA.js → chunk-MTPHHAPR.js} +1 -1
  169. package/dist/chunks/{slugify-NMMUASYK.js → chunk-N3COHC7T.js} +1 -1
  170. package/dist/chunks/{chunk-5WYJSLCF.js → chunk-N4FZIVIS.js} +1 -1
  171. package/dist/chunks/{chunk-27FVSW45.js → chunk-N7IBUNFY.js} +1 -1
  172. package/dist/chunks/{chunk-BZENIQ7N.js → chunk-NBPLUP7C.js} +1 -1
  173. package/dist/chunks/chunk-NE5RTEMC.js +7 -0
  174. package/dist/chunks/{chunk-DXFP22OK.js → chunk-NFBFXM6X.js} +1 -1
  175. package/dist/chunks/chunk-NXUDP37D.js +7 -0
  176. package/dist/chunks/{chunk-FB37TFVF.js → chunk-O256QMQM.js} +1 -1
  177. package/dist/chunks/{chunk-D6O5O3CW.js → chunk-OICSITNU.js} +1 -1
  178. package/dist/chunks/{chunk-PFD7LETF.js → chunk-OM6NML7C.js} +1 -1
  179. package/dist/chunks/chunk-OTIERMC7.js +7 -0
  180. package/dist/chunks/chunk-OVVHONX7.js +8 -0
  181. package/dist/chunks/{chunk-T44RB754.js → chunk-OXQKWOLS.js} +1 -1
  182. package/dist/chunks/chunk-P7GA2C6N.js +7 -0
  183. package/dist/chunks/{chunk-XE4SLG5H.js → chunk-PG5BHJVH.js} +1 -1
  184. package/dist/chunks/{chunk-AW33SRYY.js → chunk-PH2MLBQO.js} +1 -1
  185. package/dist/chunks/{chunk-DNONVY2L.js → chunk-PIGJVJNM.js} +2 -2
  186. package/dist/chunks/chunk-PP7BNCIG.js +7 -0
  187. package/dist/chunks/{chunk-BKFRN6C2.js → chunk-PR4NNS3O.js} +1 -1
  188. package/dist/chunks/chunk-PSMKLDLV.js +18 -0
  189. package/dist/chunks/chunk-PW67ZNDU.js +8 -0
  190. package/dist/chunks/{chunk-O3GQG2ML.js → chunk-Q3R4HAAA.js} +2 -2
  191. package/dist/chunks/chunk-Q4W3R6U2.js +12 -0
  192. package/dist/chunks/{chunk-A4LOQ3UK.js → chunk-QAVUE3TR.js} +1 -1
  193. package/dist/chunks/{chunk-U5SZQUYO.js → chunk-QCYCLWNG.js} +1 -1
  194. package/dist/chunks/{chunk-MGKNSTU4.js → chunk-QMI7GTT2.js} +1 -1
  195. package/dist/chunks/{chunk-S3L2OHPO.js → chunk-QNMWYJQW.js} +1 -1
  196. package/dist/chunks/{chunk-MMMJO2M3.js → chunk-QOIG2FJP.js} +1 -1
  197. package/dist/chunks/{chunk-BYBELFCP.js → chunk-QPNYOR6O.js} +1 -1
  198. package/dist/chunks/{chunk-6KNWKZR4.js → chunk-QPPFQREO.js} +1 -1
  199. package/dist/chunks/{chunk-EYRBV6RM.js → chunk-QROPMCL2.js} +2 -2
  200. package/dist/chunks/{chunk-MTZYPCZ7.js → chunk-QRPBDCDH.js} +1 -1
  201. package/dist/chunks/{chunk-R43H4T4L.js → chunk-QYAXCGZA.js} +1 -1
  202. package/dist/chunks/{chunk-7OZ7OKPS.js → chunk-R3ZPLQDI.js} +1 -1
  203. package/dist/chunks/{chunk-6TEYSBCT.js → chunk-R5KBPWWS.js} +1 -1
  204. package/dist/chunks/{chunk-X6JQI64G.js → chunk-RACUGILV.js} +1 -1
  205. package/dist/chunks/{chunk-GD7AV7BO.js → chunk-RFD7CEL6.js} +1 -1
  206. package/dist/chunks/{chunk-RYSO5U3E.js → chunk-RIXTYUYN.js} +1 -1
  207. package/dist/chunks/{chunk-XHBZITV4.js → chunk-RJB5Y7M4.js} +1 -1
  208. package/dist/chunks/{chunk-7HQZRU25.js → chunk-RRX2AMWY.js} +1 -1
  209. package/dist/chunks/chunk-S4ARHJGW.js +9 -0
  210. package/dist/chunks/chunk-S7FMMAST.js +7 -0
  211. package/dist/chunks/chunk-SIWT2MBT.js +8 -0
  212. package/dist/chunks/{chunk-AZVSMIPP.js → chunk-STDRVWDW.js} +1 -1
  213. package/dist/chunks/{chunk-M2Q2DUHO.js → chunk-SUD5V67L.js} +1 -1
  214. package/dist/chunks/{chunk-7EJQLVWX.js → chunk-SUT2PTL3.js} +1 -1
  215. package/dist/chunks/{chunk-Q4R34AVE.js → chunk-SWABNAKZ.js} +1 -1
  216. package/dist/chunks/chunk-SX2JJDHM.js +17 -0
  217. package/dist/chunks/{chunk-JDDPCL3K.js → chunk-T2IZUTGY.js} +1 -1
  218. package/dist/chunks/{chunk-3RFQ2NXZ.js → chunk-T4257EDB.js} +1 -1
  219. package/dist/chunks/chunk-TASNZYJU.js +14 -0
  220. package/dist/chunks/chunk-TIU3WJH7.js +8 -0
  221. package/dist/chunks/{chunk-KIDGOY4F.js → chunk-TL4AEZXF.js} +1 -1
  222. package/dist/chunks/chunk-TTM4VQ4T.js +7 -0
  223. package/dist/chunks/chunk-TUPVVZ4I.js +7 -0
  224. package/dist/chunks/{chunk-MDXG7T7M.js → chunk-U3IPJYB6.js} +1 -1
  225. package/dist/chunks/{chunk-AMZ7AUYX.js → chunk-UFE4RBZV.js} +1 -1
  226. package/dist/chunks/chunk-UGJRAFRA.js +8 -0
  227. package/dist/chunks/{chunk-3AFEVHHY.js → chunk-UGVOMXYR.js} +1 -1
  228. package/dist/chunks/{chunk-NB2WLB3J.js → chunk-UJ7YUIEJ.js} +1 -1
  229. package/dist/chunks/chunk-UK3VTHT5.js +7 -0
  230. package/dist/chunks/{chunk-S6TAO4MD.js → chunk-V2J5U5KQ.js} +1 -1
  231. package/dist/chunks/{chunk-J3U2QD2L.js → chunk-V7VHLSYL.js} +1 -1
  232. package/dist/chunks/chunk-VB6SQWSB.js +9 -0
  233. package/dist/chunks/{chunk-DOOBZO4W.js → chunk-VJM3WCEC.js} +1 -1
  234. package/dist/chunks/{chunk-BYYNR34Q.js → chunk-VNS4Z72T.js} +1 -1
  235. package/dist/chunks/{chunk-CTMTO2W4.js → chunk-VQAIH2X5.js} +1 -1
  236. package/dist/chunks/{chunk-ATSAMHUZ.js → chunk-VTAH7VMY.js} +1 -1
  237. package/dist/chunks/chunk-W2YAOE3Z.js +7 -0
  238. package/dist/chunks/{chunk-3SF3ILIT.js → chunk-WA4CPW3H.js} +1 -1
  239. package/dist/chunks/chunk-WKEDN5SX.js +9 -0
  240. package/dist/chunks/{chunk-JALVF3C2.js → chunk-WMIZ6Y4E.js} +1 -1
  241. package/dist/chunks/{chunk-Z436ZYLV.js → chunk-WQBNOQUT.js} +1 -1
  242. package/dist/chunks/{chunk-YOKTRWQX.js → chunk-WRTBYD4I.js} +1 -1
  243. package/dist/chunks/{chunk-7RABG6HV.js → chunk-WS6UOPMS.js} +1 -1
  244. package/dist/chunks/{chunk-TLKBGAOL.js → chunk-WWEUGL6W.js} +1 -1
  245. package/dist/chunks/chunk-X2UJGCIC.js +9 -0
  246. package/dist/chunks/{chunk-JUAHDOL6.js → chunk-X5YKQ2RJ.js} +1 -1
  247. package/dist/chunks/{chunk-D5JQZXL7.js → chunk-XHWA436J.js} +1 -1
  248. package/dist/chunks/chunk-XHXWUAJE.js +32 -0
  249. package/dist/chunks/{chunk-U4Z2MMOF.js → chunk-XKVKG7CW.js} +1 -1
  250. package/dist/chunks/{chunk-HYAIA5YC.js → chunk-XL6PE4AA.js} +2 -2
  251. package/dist/chunks/{chunk-E3WP42P2.js → chunk-XPEWDJV6.js} +1 -1
  252. package/dist/chunks/{chunk-TGIIE2L3.js → chunk-XPWLEGWA.js} +1 -1
  253. package/dist/chunks/{chunk-7SLMNM55.js → chunk-XY2GGCHC.js} +1 -1
  254. package/dist/chunks/{chunk-G24EKATW.js → chunk-XZYVBYUY.js} +1 -1
  255. package/dist/chunks/chunk-Y2KAVMM4.js +10 -0
  256. package/dist/chunks/{chunk-46ISU3XI.js → chunk-Y3ETQZSK.js} +2 -2
  257. package/dist/chunks/{chunk-GRRVPFSB.js → chunk-Y45NZT7C.js} +1 -1
  258. package/dist/chunks/{chunk-5RMIM4S2.js → chunk-Y7SZI3JV.js} +1 -1
  259. package/dist/chunks/{chunk-ZRFDZO7Y.js → chunk-YATYCZQJ.js} +1 -1
  260. package/dist/chunks/chunk-YBWLW6SW.js +7 -0
  261. package/dist/chunks/{chunk-B7IUFV5P.js → chunk-YDCILYRC.js} +1 -1
  262. package/dist/chunks/{chunk-67GZ5REA.js → chunk-YHZXIBS7.js} +1 -1
  263. package/dist/chunks/{chunk-H24KFNPB.js → chunk-YIKXLWSR.js} +1 -1
  264. package/dist/chunks/{chunk-5CVEW3HD.js → chunk-YLQCB6XY.js} +1 -1
  265. package/dist/chunks/{chunk-WAOS5OCB.js → chunk-YU33PPKX.js} +1 -1
  266. package/dist/chunks/{chunk-V3YNYCRV.js → chunk-YVWIDLY4.js} +6 -6
  267. package/dist/chunks/{chunk-CEA5NDJC.js → chunk-Z2NPMUPM.js} +1 -1
  268. package/dist/chunks/{chunk-N3ZNAMGR.js → chunk-Z62G57GC.js} +1 -1
  269. package/dist/chunks/{chunk-D6NVKMRP.js → chunk-ZG7A4P5U.js} +1 -1
  270. package/dist/chunks/{chunk-NZ2TFADV.js → chunk-ZOJI7HYA.js} +1 -1
  271. package/dist/chunks/{chunk-TSIKSHYG.js → chunk-ZSJU5MJP.js} +1 -1
  272. package/dist/chunks/{chunk-47E5IB3C.js → chunk-ZWPASRC2.js} +1 -1
  273. package/dist/chunks/{clear-GL4SZ2XR.js → clear-4MDTHLLE.js} +1 -1
  274. package/dist/chunks/{cli-embedded-NR5F35LW.js → cli-embedded-OYBJM5SA.js} +2 -2
  275. package/dist/chunks/cli-truncate-CylqKOGj-WE5OLB6Q.js +7 -0
  276. package/dist/chunks/commands-Bx-lrmie-W7FCFL4P.js +10 -0
  277. package/dist/chunks/compile-vercel-config-A2DMFB2R.js +7 -0
  278. package/dist/chunks/{config-KSQQQMQQ.js → config-4R62ATWJ.js} +1 -1
  279. package/dist/chunks/{config-U4GLPYDY.js → config-A7DCP25J.js} +1 -1
  280. package/dist/chunks/config-HiWLfXRQ-D7JA4E3D.js +43 -0
  281. package/dist/chunks/connect-U3yG4EtI-XYHDJQT7.js +7 -0
  282. package/dist/chunks/connect-git-provider-MPYSAOTH.js +7 -0
  283. package/dist/chunks/cp-aFe-HVrK-UAGAR2BC.js +12 -0
  284. package/dist/chunks/create-ilHWvzSk-7KWZXBE2.js +7 -0
  285. package/dist/chunks/create-project-OA7KBPVU.js +7 -0
  286. package/dist/chunks/{delete-O2VWRQC3.js → delete-DN53BRH7.js} +1 -1
  287. package/dist/chunks/{delete-D2WLQHVB.js → delete-G4MAUBXZ.js} +1 -1
  288. package/dist/chunks/{describe-N36SISDN.js → describe-Q5D5GYVG.js} +1 -1
  289. package/dist/chunks/detect-projects-DHS2E3N4.js +7 -0
  290. package/dist/chunks/detect-services-VBKVN4A2.js +7 -0
  291. package/dist/chunks/{disable-EHRVY24G.js → disable-CG3R2VAL.js} +1 -1
  292. package/dist/chunks/{discard-QW5TMTXX.js → discard-REGFZXFU.js} +1 -1
  293. package/dist/chunks/dist-4F3LAB5Z.js +7 -0
  294. package/dist/chunks/{dist-RXYNZPEA.js → dist-S7GEJ656.js} +1 -1
  295. package/dist/chunks/{dist-33WTJLVQ.js → dist-T2AURD3P.js} +1 -1
  296. package/dist/chunks/domain-DGvr_U55-PNXSOVDO.js +8 -0
  297. package/dist/chunks/drives-Bi-Mnt2z-Z4T2YY4P.js +14 -0
  298. package/dist/chunks/{edit-IZR537PS.js → edit-7AUE6GXE.js} +1 -1
  299. package/dist/chunks/{edit-WM6KJPSI.js → edit-HHLQDVOP.js} +1 -1
  300. package/dist/chunks/{enable-5Z72O3NI.js → enable-BV3N6GEL.js} +1 -1
  301. package/dist/chunks/{engine-C8wCzkw--PYVABGU4.js → engine-C8wCzkw--72P7UD6T.js} +1 -1
  302. package/dist/chunks/{esm-IYH32MTQ.js → esm-B3P7PUFJ.js} +1 -1
  303. package/dist/chunks/{esm-5GQXHN7C.js → esm-CMSQLK7G.js} +1 -1
  304. package/dist/chunks/{esm-LEQXRLFV.js → esm-KWMRMP74.js} +1 -1
  305. package/dist/chunks/{esm-NHCCFW7Z.js → esm-LRBNA4QO.js} +1 -1
  306. package/dist/chunks/{esm-FJCIOBBV.js → esm-NVIK2MSG.js} +1 -1
  307. package/dist/chunks/{esm-T655CG6O.js → esm-RAS56M3I.js} +1 -1
  308. package/dist/chunks/{esm-QQ3MUOW4.js → esm-WU2ZS2IW.js} +1 -1
  309. package/dist/chunks/exec-Bwv4MDyN-7YUAVBB2.js +7 -0
  310. package/dist/chunks/{exec-PCSP64LR.js → exec-NYLXYXB5.js} +3 -3
  311. package/dist/chunks/{export-IWVMWM2H.js → export-WUPMMHSX.js} +1 -1
  312. package/dist/chunks/extend-D9tq9Cot-QT72AXGH.js +8 -0
  313. package/dist/chunks/{fetch-proxy-MOKBS56A.js → fetch-proxy-ZIHXTNFP.js} +1 -1
  314. package/dist/chunks/fork-DQ6qfKqB-XXTHHUMZ.js +9 -0
  315. package/dist/chunks/future-DJOUGRV4.js +7 -0
  316. package/dist/chunks/generate-cert-for-deploy-PZHDFX3W.js +7 -0
  317. package/dist/chunks/groups-B8JVEeKk-K57VTXSS.js +10 -0
  318. package/dist/chunks/image-DX2IAUKJ.js +7 -0
  319. package/dist/chunks/import-builders-IUEC2WN2.js +7 -0
  320. package/dist/chunks/{inspect-QT3QEFBW.js → inspect-BS5UPI6W.js} +1 -1
  321. package/dist/chunks/{inspect-6J5DGZZ4.js → inspect-GJXLYJC7.js} +1 -1
  322. package/dist/chunks/{inspect-6Y672OQ3.js → inspect-IHVP2M4H.js} +1 -1
  323. package/dist/chunks/{inspect-47FM3OWG.js → inspect-PBSKPN4W.js} +1 -1
  324. package/dist/chunks/{inspect-SW2I7D6E.js → inspect-Y7VXJEI2.js} +1 -1
  325. package/dist/chunks/{inspect-ALC2J4BF.js → inspect-YGVXE4HR.js} +1 -1
  326. package/dist/chunks/{list-TGDHJKDT.js → list-27R4USBV.js} +1 -1
  327. package/dist/chunks/{list-BIFH4KO5.js → list-2ZCNO6DY.js} +1 -1
  328. package/dist/chunks/{list-CXXDI5UV.js → list-TUST62E6.js} +1 -1
  329. package/dist/chunks/{list-2CMCXXP4.js → list-ZSQVIQXC.js} +1 -1
  330. package/dist/chunks/list-iqQFvOHx-PNAUIUQL.js +7 -0
  331. package/dist/chunks/log-update-DsqoChS1-DG7F5XJ4.js +11 -0
  332. package/dist/chunks/{login-IUQDG334.js → login-CUEQHDT5.js} +1 -1
  333. package/dist/chunks/login-DGxA9ez--ZRIJ24TS.js +13 -0
  334. package/dist/chunks/login-YCOZROC2.js +7 -0
  335. package/dist/chunks/logout-OEbPJLu2-7NPM6ALK.js +8 -0
  336. package/dist/chunks/logs-W4GZLDHE.js +7 -0
  337. package/dist/chunks/ls-27K5BB7Z.js +11 -0
  338. package/dist/chunks/{ls-C75Z5FBX.js → ls-EEJQIKNI.js} +1 -1
  339. package/dist/chunks/ls-PAL6FQB6.js +8 -0
  340. package/dist/chunks/{ls-GC5MX2HZ.js → ls-TDYTE4HM.js} +1 -1
  341. package/dist/chunks/{ls-7D73WVOF.js → ls-UMSUUQCG.js} +1 -1
  342. package/dist/chunks/{ls-ERDQLUT2.js → ls-W7C5I555.js} +1 -1
  343. package/dist/chunks/{ls-4DNFF35I.js → ls-XYEJ5MR6.js} +1 -1
  344. package/dist/chunks/migrate-experimental-services-556MHJWK.js +7 -0
  345. package/dist/chunks/mutate-IELSY6ED.js +9 -0
  346. package/dist/chunks/{native-self-update-Q3EN6NZK.js → native-self-update-T75AUBHJ.js} +1 -1
  347. package/dist/chunks/{notifications-2HU4L7WA.js → notifications-GZH7CFZY.js} +1 -1
  348. package/dist/chunks/{open-MA7QGJKO.js → open-EVYPUPNZ.js} +1 -1
  349. package/dist/chunks/{openapi-POBVCXS3.js → openapi-S6F32ZQD.js} +1 -1
  350. package/dist/chunks/{permissions-AU5M5A6G.js → permissions-EHF5MNZP.js} +1 -1
  351. package/dist/chunks/{plugin-offer-E53UQXXX.js → plugin-offer-RZADKNYF.js} +1 -1
  352. package/dist/chunks/prompt-missing-credentials-OSAV5B7N.js +7 -0
  353. package/dist/chunks/{publish-G7NQESCE.js → publish-ZB2Q2YSB.js} +1 -1
  354. package/dist/chunks/pull-WUFIVXEG.js +7 -0
  355. package/dist/chunks/purchase-domain-if-available-YVVGT7MZ.js +7 -0
  356. package/dist/chunks/{push-BG7UEIKY.js → push-YWKZ6SOO.js} +1 -1
  357. package/dist/chunks/query-G62G25HV.js +7 -0
  358. package/dist/chunks/{raw-query-QHFSKN55.js → raw-query-WTKAOYCP.js} +1 -1
  359. package/dist/chunks/read-BTA5slYO-IJLWMNSS.js +8 -0
  360. package/dist/chunks/{reauthenticate-U2LOFDFP.js → reauthenticate-WQZ5HISG.js} +1 -1
  361. package/dist/chunks/remove-7PSNAEDY.js +9 -0
  362. package/dist/chunks/remove-CCa99nz9-LCSNBDLT.js +7 -0
  363. package/dist/chunks/{reorder-E5UYNMML.js → reorder-OLCKSATY.js} +1 -1
  364. package/dist/chunks/{reply-DSDFBUAX.js → reply-OVHQNEBO.js} +1 -1
  365. package/dist/chunks/{repo-info-to-url-XQSULSEO.js → repo-info-to-url-S2YOQIRM.js} +1 -1
  366. package/dist/chunks/{repo-root-DZ6WFHMP.js → repo-root-STNOAHCH.js} +1 -1
  367. package/dist/chunks/{resolve-VK5QTUII.js → resolve-TUHO4FHT.js} +1 -1
  368. package/dist/chunks/{resolve-agent-team-D7RFR6WL.js → resolve-agent-team-NQCRA6ER.js} +1 -1
  369. package/dist/chunks/{resolve-deployment-framework-preset-BLMQLCIN.js → resolve-deployment-framework-preset-SCQCWANF.js} +1 -1
  370. package/dist/chunks/{restore-IVNZOVU3.js → restore-5RLBSVYQ.js} +1 -1
  371. package/dist/chunks/{rm-PAI3WZXJ.js → rm-5RGN33Y5.js} +1 -1
  372. package/dist/chunks/rm-D7CWGBTV.js +8 -0
  373. package/dist/chunks/{rm-L2KCHMLS.js → rm-FYU3GBLC.js} +1 -1
  374. package/dist/chunks/rm-HA752TW6.js +8 -0
  375. package/dist/chunks/{rm-LWEITUDD.js → rm-P6AGSBXP.js} +1 -1
  376. package/dist/chunks/routes-7VLRHXT4.js +7 -0
  377. package/dist/chunks/rule-inspect-Y2MX7LQN.js +8 -0
  378. package/dist/chunks/run-D8obqfKw-D2EGHTU2.js +7 -0
  379. package/dist/chunks/{schema-ZOPJJLJC.js → schema-AJAHECZG.js} +1 -1
  380. package/dist/chunks/{schema-ZIK2W4AX.js → schema-UVTYLX6L.js} +2 -2
  381. package/dist/chunks/select-org-JBKKKZSN.js +7 -0
  382. package/dist/chunks/{serving-C1mhZQqH-73TMEGEB.js → serving-C1mhZQqH-XEQUVQZK.js} +1 -1
  383. package/dist/chunks/sessions-cvWvPgzc-FBOQQPU5.js +7 -0
  384. package/dist/chunks/{set-MC2CLSA2.js → set-774P7GEL.js} +1 -1
  385. package/dist/chunks/{set-B5MPNYXG.js → set-OWNTI5SM.js} +1 -1
  386. package/dist/chunks/setup-and-link-3LD4LQGE.js +7 -0
  387. package/dist/chunks/sh-7olsIyJh-NFO2QYTK.js +7 -0
  388. package/dist/chunks/{skills-X5MN3OH2.js → skills-W45E2EWS.js} +1 -1
  389. package/dist/chunks/slugify-OEOEYGDL.js +7 -0
  390. package/dist/chunks/snapshot-D9MAspub-UAVA2YSK.js +9 -0
  391. package/dist/chunks/snapshots-DQjvm6St-DBG4H2HS.js +9 -0
  392. package/dist/chunks/stamp-THWCZ5IQ.js +7 -0
  393. package/dist/chunks/{statuspage-K5SC7KAQ.js → statuspage-NCYXH7DR.js} +1 -1
  394. package/dist/chunks/stop-SQX-uC-Q-CRDQOA5M.js +10 -0
  395. package/dist/chunks/table-3DCL552W.js +7 -0
  396. package/dist/chunks/{tags-WRVKKRN7.js → tags-DEIOW5MM.js} +1 -1
  397. package/dist/chunks/telemetry-KLbte3YE-OAFHJTWE.js +13 -0
  398. package/dist/chunks/token-DGNBXqnR-37H4S563.js +7 -0
  399. package/dist/chunks/token-EYEJQ7AP.js +7 -0
  400. package/dist/chunks/token-LNLX4V5J.js +7 -0
  401. package/dist/chunks/token-MZBD3R2S.js +7 -0
  402. package/dist/chunks/token-util-4P4GUSTT.js +7 -0
  403. package/dist/chunks/token-util-DAhLJ1X4-NJBLJROT.js +7 -0
  404. package/dist/chunks/token-util-XC5K3DNT.js +7 -0
  405. package/dist/chunks/token-util-XO4H5VLL.js +7 -0
  406. package/dist/chunks/{types-PC3JIYPX.js → types-SYUZH46V.js} +1 -1
  407. package/dist/chunks/update-VG2LHBRV.js +8 -0
  408. package/dist/chunks/{update-route-version-KWK5S4UW.js → update-route-version-MKFTZPKQ.js} +1 -1
  409. package/dist/chunks/usage-NF6S3DAZ.js +17 -0
  410. package/dist/chunks/users-CGEsQ4G8-POYTVZJV.js +9 -0
  411. package/dist/chunks/{utils-IQZEE4DT.js → utils-XXR7KIRB.js} +1 -1
  412. package/dist/chunks/validate-config-MJQI5EMD.js +7 -0
  413. package/dist/chunks/{vercel-cli-3UQLDU2S.js → vercel-cli-RW4WHHOS.js} +1 -1
  414. package/dist/chunks/{vlt-builder-graph-XL2XRO4V.js → vlt-builder-graph-EU5EX7KY.js} +1 -1
  415. package/dist/chunks/{vlt-builder-importer-RBUPAB6J.js → vlt-builder-importer-2YSRGPFC.js} +1 -1
  416. package/dist/chunks/wrap-ansi-CaN_P_HT-MAPHF26X.js +7 -0
  417. package/dist/chunks/write-DixEhGqz-YYDLLSJE.js +10 -0
  418. package/dist/chunks/{zod-Y3ZBY67C.js → zod-H7KW2D5Z.js} +1 -1
  419. package/dist/commands/build/index.js +1 -1
  420. package/dist/commands/deploy/index.js +11 -11
  421. package/dist/commands/dev/index.js +5 -9
  422. package/dist/commands/env/index.js +1 -1
  423. package/dist/commands/link/index.js +1 -1
  424. package/dist/commands/list/index.js +1 -1
  425. package/dist/commands/project/index.js +102 -80
  426. package/dist/commands/tunnel/index.js +1 -1
  427. package/dist/commands-account.js +101 -67
  428. package/dist/commands-ai.js +15 -15
  429. package/dist/commands-blob.js +3 -3
  430. package/dist/commands-core.js +9 -9
  431. package/dist/commands-deployments.js +1 -1
  432. package/dist/commands-flags.js +7 -7
  433. package/dist/commands-integrations.js +11 -11
  434. package/dist/commands-observability.js +2 -2
  435. package/dist/commands-routing.js +9 -9
  436. package/dist/help.js +1 -1
  437. package/dist/index.js +10 -8
  438. package/dist/internal-build-worker.js +1 -1
  439. package/dist/internal-build.js +2 -2
  440. package/dist/package.json +9 -9
  441. package/dist/root-help-commands.mjs +1 -1
  442. package/dist/version.mjs +1 -1
  443. package/package.json +16 -16
  444. package/dist/chunks/add-RH3RQPGP.js +0 -8
  445. package/dist/chunks/chunk-37P7O3AQ.js +0 -9
  446. package/dist/chunks/chunk-3ARTWVQV.js +0 -11
  447. package/dist/chunks/chunk-4F73GVJZ.js +0 -7
  448. package/dist/chunks/chunk-6FEMU5YF.js +0 -7
  449. package/dist/chunks/chunk-6UJIJLQC.js +0 -13
  450. package/dist/chunks/chunk-CDJ25IKC.js +0 -7
  451. package/dist/chunks/chunk-EMTZZXMH.js +0 -13
  452. package/dist/chunks/chunk-HR4ID3MU.js +0 -7
  453. package/dist/chunks/chunk-INIZJZ3O.js +0 -7
  454. package/dist/chunks/chunk-JCHZRW4N.js +0 -7
  455. package/dist/chunks/chunk-MDRI27KN.js +0 -9
  456. package/dist/chunks/chunk-OAM5NJCU.js +0 -9
  457. package/dist/chunks/chunk-PX3V7X3Q.js +0 -12
  458. package/dist/chunks/chunk-RHFNVIFD.js +0 -7
  459. package/dist/chunks/chunk-T4DOV5S4.js +0 -7
  460. package/dist/chunks/chunk-XKPB27SC.js +0 -8
  461. package/dist/chunks/chunk-Z3XKNZDP.js +0 -9
  462. package/dist/chunks/compile-vercel-config-HMKEDWC4.js +0 -7
  463. package/dist/chunks/connect-git-provider-WGKVFXW2.js +0 -7
  464. package/dist/chunks/create-project-BTOHPKZB.js +0 -7
  465. package/dist/chunks/detect-projects-I7NEHWSM.js +0 -7
  466. package/dist/chunks/detect-services-4ONC2DH3.js +0 -7
  467. package/dist/chunks/future-3AUPMPY7.js +0 -7
  468. package/dist/chunks/generate-cert-for-deploy-OZWVIWOO.js +0 -7
  469. package/dist/chunks/image-EFBQXTAP.js +0 -7
  470. package/dist/chunks/import-builders-2G4KVI4T.js +0 -7
  471. package/dist/chunks/login-WYDX5KZN.js +0 -7
  472. package/dist/chunks/logs-E3RZLAT2.js +0 -7
  473. package/dist/chunks/ls-IQUZ6GWG.js +0 -11
  474. package/dist/chunks/ls-YTKJRKD3.js +0 -8
  475. package/dist/chunks/migrate-experimental-services-GPGYPN66.js +0 -7
  476. package/dist/chunks/mutate-YJNE2733.js +0 -9
  477. package/dist/chunks/prompt-missing-credentials-7F7MUAWK.js +0 -7
  478. package/dist/chunks/pull-4LISUHDN.js +0 -7
  479. package/dist/chunks/purchase-domain-if-available-QH2OHRLZ.js +0 -7
  480. package/dist/chunks/query-QCIU5IB4.js +0 -7
  481. package/dist/chunks/remove-IB7C6LII.js +0 -9
  482. package/dist/chunks/rm-GYS4DS2Z.js +0 -8
  483. package/dist/chunks/rm-PDJE63VV.js +0 -8
  484. package/dist/chunks/routes-SBMN6SDF.js +0 -7
  485. package/dist/chunks/rule-inspect-LQISNCBT.js +0 -8
  486. package/dist/chunks/select-org-EKDOS2CQ.js +0 -7
  487. package/dist/chunks/setup-and-link-FHHZAU65.js +0 -7
  488. package/dist/chunks/stamp-TKONNIJ5.js +0 -7
  489. package/dist/chunks/table-SCLK33K7.js +0 -7
  490. package/dist/chunks/token-MYYNOUIT.js +0 -7
  491. package/dist/chunks/token-util-OJHS52JP.js +0 -7
  492. package/dist/chunks/update-QDIZFM4T.js +0 -8
  493. package/dist/chunks/usage-JUP36KHN.js +0 -15
  494. package/dist/chunks/validate-config-K42CVRCZ.js +0 -7
@@ -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-B4KA3ZH2.js";import{environmentOption,formatOption,jsonOption,projectOption}from"./chunk-DORCX7UB.js";var RULE_ENVIRONMENTS=["any","preview","production"],ruleEnvironmentOption={...environmentOption,description:"Environment the rule applies to (required): production, preview, or any"},lsSubcommand={name:"ls",aliases:["list"],description:"List the Vercel tracing sampling rules for a project",arguments:[],options:[formatOption,jsonOption,projectOption],examples:[{name:"List the sampling rules for the linked project",value:`${packageName} traces config ls`},{name:"List the sampling rules as JSON",value:`${packageName} traces config ls --json`}]},setSubcommand={name:"set",aliases:[],description:"Enable Vercel tracing and add or replace one sampling rule. The rate is a whole percentage from 1 to 100.",arguments:[{name:"rate",required:!0},{name:"requestPath",required:!1}],options:[ruleEnvironmentOption,formatOption,jsonOption,projectOption],examples:[{name:"Trace a quarter of production traffic",value:`${packageName} traces config set 25 --environment production`},{name:"Trace every preview request to one path prefix",value:`${packageName} traces config set 100 /api --environment preview`},{name:"Trace one percent of traffic in every environment",value:`${packageName} traces config set 1 --environment any`}]},rmSubcommand={descriptionTone:"normal",name:"remove",aliases:["rm","delete"],description:"Remove Vercel tracing sampling rules. Without a path prefix, every rule for the environment is removed. Removing the final rule disables tracing.",arguments:[{name:"requestPath",required:!1}],options:[ruleEnvironmentOption,{name:"default",shorthand:null,type:Boolean,deprecated:!1,description:"Remove only the rule that has no path prefix, keeping the per-path rules"},formatOption,jsonOption,projectOption],examples:[{name:"Remove one rule by environment and path prefix",value:`${packageName} traces config remove /api --environment production`},{name:"Remove every rule for production",value:`${packageName} traces config remove --environment production`},{name:"Remove only the production rule that covers all paths",value:`${packageName} traces config remove --environment production --default`}]},tracesConfigCommand={name:"config",aliases:[],description:"Manage Vercel tracing sampling rules for a project.",arguments:[],subcommands:[lsSubcommand,setSubcommand,rmSubcommand],options:[],examples:[{name:"List the sampling rules for the linked project",value:`${packageName} traces config ls`},{name:"Trace a quarter of production traffic",value:`${packageName} traces config set 25 --environment production`},{name:"Remove every rule for production",value:`${packageName} traces config remove --environment production`}]};export{RULE_ENVIRONMENTS,lsSubcommand,setSubcommand,rmSubcommand,tracesConfigCommand};
7
+ import{packageName}from"./chunk-EFGZK6OY.js";import{environmentOption,formatOption,jsonOption,projectOption}from"./chunk-CUO3CYU3.js";var RULE_ENVIRONMENTS=["any","preview","production"],ruleEnvironmentOption={...environmentOption,description:"Environment the rule applies to (required): production, preview, or any"},lsSubcommand={name:"ls",aliases:["list"],description:"List the Vercel tracing sampling rules for a project",arguments:[],options:[formatOption,jsonOption,projectOption],examples:[{name:"List the sampling rules for the linked project",value:`${packageName} traces config ls`},{name:"List the sampling rules as JSON",value:`${packageName} traces config ls --json`}]},setSubcommand={name:"set",aliases:[],description:"Enable Vercel tracing and add or replace one sampling rule. The rate is a whole percentage from 1 to 100.",arguments:[{name:"rate",required:!0},{name:"requestPath",required:!1}],options:[ruleEnvironmentOption,formatOption,jsonOption,projectOption],examples:[{name:"Trace a quarter of production traffic",value:`${packageName} traces config set 25 --environment production`},{name:"Trace every preview request to one path prefix",value:`${packageName} traces config set 100 /api --environment preview`},{name:"Trace one percent of traffic in every environment",value:`${packageName} traces config set 1 --environment any`}]},rmSubcommand={descriptionTone:"normal",name:"remove",aliases:["rm","delete"],description:"Remove Vercel tracing sampling rules. Without a path prefix, every rule for the environment is removed. Removing the final rule disables tracing.",arguments:[{name:"requestPath",required:!1}],options:[ruleEnvironmentOption,{name:"default",shorthand:null,type:Boolean,deprecated:!1,description:"Remove only the rule that has no path prefix, keeping the per-path rules"},formatOption,jsonOption,projectOption],examples:[{name:"Remove one rule by environment and path prefix",value:`${packageName} traces config remove /api --environment production`},{name:"Remove every rule for production",value:`${packageName} traces config remove --environment production`},{name:"Remove only the production rule that covers all paths",value:`${packageName} traces config remove --environment production --default`}]},tracesConfigCommand={name:"config",aliases:[],description:"Manage Vercel tracing sampling rules for a project.",arguments:[],subcommands:[lsSubcommand,setSubcommand,rmSubcommand],options:[],examples:[{name:"List the sampling rules for the linked project",value:`${packageName} traces config ls`},{name:"Trace a quarter of production traffic",value:`${packageName} traces config set 25 --environment production`},{name:"Remove every rule for production",value:`${packageName} traces config remove --environment production`}]};export{RULE_ENVIRONMENTS,lsSubcommand,setSubcommand,rmSubcommand,tracesConfigCommand};
@@ -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{packageName}from"./chunk-EFGZK6OY.js";import{confirmNameOption,formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-CUO3CYU3.js";var projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (default: linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Show the next page using the cursor from the previous output",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},imageLsSubcommand={name:"ls",aliases:["list"],description:"List images in a container registry repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,{name:"untagged",shorthand:null,type:Boolean,deprecated:!1,description:"Only list images that have no tags"},limitOption,nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List images in a repository",value:`${packageName} vcr image ls my-app`},{name:"List untagged images as JSON",value:`${packageName} vcr image ls my-app --untagged --json`}]},imageInspectSubcommand={name:"inspect",aliases:["get"],description:"Show details for a single image, including its layer history",arguments:[{name:"repository",required:!0},{name:"imageId",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Inspect an image by id",value:`${packageName} vcr image inspect my-app img_abc123`}]},imageRmSubcommand={name:"delete",aliases:["rm","del","remove"],description:"Delete an image from a repository",arguments:[{name:"repository",required:!0},{name:"imageId",required:!0}],options:[projectScopeOption,{...confirmNameOption,description:"Approve the deletion by naming the image ID"},{...yesOption,description:"Deprecated: use --confirm-name. Agents can't approve with --yes"},formatOption,jsonOption],examples:[{name:"Delete an image by id",value:`${packageName} vcr image delete my-app img_abc123`},{name:"Delete an image without a prompt, once a person approves",value:`${packageName} vcr image delete my-app img_abc123 --confirm-name img_abc123`}],consequence:"destructive"},imageAggregateCommand={name:"image",aliases:["images"],description:"List, inspect, or delete images in a repository",arguments:[],subcommands:[imageLsSubcommand,imageInspectSubcommand,imageRmSubcommand],options:[],examples:[]};export{imageLsSubcommand,imageInspectSubcommand,imageRmSubcommand,imageAggregateCommand};
@@ -4,6 +4,6 @@ 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{decodeListCursor}from"./chunk-ZBZQEDZY.js";import{external_exports}from"./chunk-2AMO2VMV.js";import{parseListLimit}from"./chunk-7RABG6HV.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-3ARTWVQV.js";import{validateJsonOutput}from"./chunk-KA2KG3SY.js";import{isAPIError}from"./chunk-QFE3RPMA.js";import{getCommandName,getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{getGlobalFlagsFromArgs}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var OrganizationResponseError=class extends Error{};function handleOrganizationApiError(client,err,failed){if(!isAPIError(err)){output_manager_default.debug(`Organization request failed: ${err}`);let cause=err instanceof OrganizationResponseError?err.message:"";return report(client,{reason:AGENT_REASON.API_ERROR,message:`Failed to ${failed.action}.${cause?` ${cause}`:""}`})}let remote=stripControlCharacters(err.serverMessage||"");if(err.status===404)return report(client,{reason:AGENT_REASON.NOT_FOUND,message:failed.notFound??`Couldn't ${failed.action}. It wasn't found.`});if(err.status===403)return report(client,{reason:AGENT_REASON.PERMISSION_DENIED,message:`You can't ${failed.action}.`,remote,action:err.action,resource:typeof err.resource=="string"?err.resource:void 0});let plan=typeof err.code=="string"&&PLAN_CAUSES[err.code];if(plan)return report(client,{reason:AGENT_REASON.PLAN_LIMIT,message:`Can't ${failed.action}. ${plan}.`,remote});if(err.status===409){let conflict=typeof err.code=="string"&&CONFLICT_CAUSES[err.code];return report(client,{reason:AGENT_REASON.CONFLICT,message:`Can't ${failed.action}. ${conflict||"It conflicts with the current state of the organization or team"}.`,remote})}return err.status===429?report(client,{reason:AGENT_REASON.RATE_LIMITED,message:"Too many requests to the Vercel API. Try again later."}):report(client,{reason:AGENT_REASON.API_ERROR,message:`Failed to ${failed.action}.`,remote})}var CONFLICT_CAUSES={already_exists:"Another organization uses this slug",slug_conflict:"Another team uses this slug",team_already_in_organization:"The team already belongs to an organization",team_organization_transfer_in_progress:"The team is already moving to an organization"},PLAN_CAUSES={invalid_billing_plan:"The team's billing plan doesn't allow it",child_team_limit_reached:"The organization has reached its limit of enterprise child teams",team_already_enterprise:"An existing Enterprise team can't become an enterprise child team"};function stripControlCharacters(text){return text.replace(/[\u0000-\u001f\u007f-\u009f]/g," ").trim()}function report(client,failure){let payload={status:AGENT_STATUS.ERROR,reason:failure.reason,message:failure.message};return failure.remote&&(payload.data={remoteMessage:failure.remote}),failure.action&&(payload.action=failure.action),failure.resource&&(payload.resource=failure.resource),outputAgentError(client,payload,1),output_manager_default.error(failure.message),failure.remote&&output_manager_default.log(` Vercel API: ${failure.remote}`),1}var organizationSchema=external_exports.looseObject({organizationId:external_exports.string(),slug:external_exports.string(),name:external_exports.string().optional(),teamId:external_exports.string(),teamCount:external_exports.number(),createdAt:external_exports.string(),updatedAt:external_exports.string()}),teamSchema=external_exports.looseObject({organizationId:external_exports.string(),teamId:external_exports.string(),ssoMode:external_exports.string(),billingPlan:external_exports.string().optional(),createdAt:external_exports.string(),updatedAt:external_exports.string()}),teamsSchema=external_exports.object({teams:external_exports.array(teamSchema.extend({slug:external_exports.string(),name:external_exports.string().nullable(),avatar:external_exports.string().nullable()})),cursor:external_exports.string().nullable().optional()});async function request(client,path,schema,options={}){let fetchOptions={...options,useCurrentTeam:!1};options.method&&options.method!=="GET"&&(fetchOptions.retry={retries:0},fetchOptions.bailOn429=!0);let data=await client.fetch(`/v1/organizations${path}`,fetchOptions),result=schema.safeParse(data);if(!result.success){let paths=[...new Set(result.error.issues.map(issue=>issue.path.length?issue.path.join("."):"<root>"))].slice(0,5);throw new OrganizationResponseError(`The Organizations API returned an invalid response at ${paths.join(", ")}.`)}return result.data}function listOrganizations(client){return request(client,"",external_exports.object({organizations:external_exports.array(organizationSchema)}))}function getOrganization(client,id){return request(client,`/${encodeURIComponent(id)}`,organizationSchema)}function createOrganization(client,rootTeamId,body){let query=new URLSearchParams({teamId:rootTeamId});return request(client,`?${query}`,organizationSchema,{method:"POST",body})}function updateOrganization(client,id,slug){return request(client,`/${encodeURIComponent(id)}`,organizationSchema,{method:"PATCH",body:{slug}})}function listOrganizationTeams(client,id,cursor){let query=cursor===void 0?"":`?${new URLSearchParams({cursor})}`;return request(client,`/${encodeURIComponent(id)}/teams${query}`,teamsSchema)}function addOrganizationTeam(client,id,body){return request(client,`/${encodeURIComponent(id)}/teams`,teamSchema,{method:"POST",body})}var import_chalk=__toESM(require_source(),1);var idSchema=external_exports.string().max(256).regex(/^[a-zA-Z0-9_-]+$/),slugSchema=external_exports.string().min(1).max(48).regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/),nameSchema=external_exports.string().min(1).max(256).refine(value=>value.trim().length>0&&!/[\x00-\x1f\x7f]/.test(value)),billingPlanSchema=external_exports.enum(["platform","enterprise"]),ORGANIZATION_ID_PREFIX="org_",TEAM_ID_PREFIX="team_";function isPrefixedId(value,prefix){return value.startsWith(prefix)&&value.length>prefix.length&&idSchema.safeParse(value).success}var SLUG_MESSAGE="Provide --slug with 1-48 lowercase letters, numbers, or hyphens, beginning and ending with a letter or number.",NAME_MESSAGE="Provide --name with 1-256 characters and no control characters.",PLAN_MESSAGE="Use --billing-plan platform or --billing-plan enterprise.";function organizationsSuggestion(subcommand,argv){let globalFlags=getGlobalFlagsFromArgs(argv.slice(2)),full=globalFlags.length?`${subcommand} ${globalFlags.join(" ")}`:subcommand;return getCommandNamePlain(full)}function missingArgument(client,options){let next=[];return options.suggestList&&next.push({command:organizationsSuggestion("organizations list",client.argv),when:"List organizations to find an ID"}),next.push({command:organizationsSuggestion(options.usage,client.argv)}),outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,action:AGENT_ACTION.MISSING_ARGUMENTS,reason:options.reason,message:options.message,next}),output_manager_default.error(options.message),output_manager_default.log(`Usage: ${import_chalk.default.cyan(getCommandName(options.usage))}`),getExitCodeForReason(options.reason)}function invalidArgument(client,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}),output_manager_default.error(message),2}function invalidArgumentCount(client,usage){let message=`Too many arguments. Usage: ${getCommandNamePlain(usage)}`;return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}),output_manager_default.error(`Invalid number of arguments. Usage: ${import_chalk.default.cyan(getCommandName(usage))}`),2}function validate(client,schema,value,options){if(value===void 0)return{status:"error",exitCode:missingArgument(client,{...options,reason:AGENT_REASON.MISSING_ARGUMENTS})};let parsed=schema.safeParse(value);return parsed.success?{status:"ok",value:parsed.data}:{status:"error",exitCode:invalidArgument(client,options.message)}}function validateOptional(client,schema,value,message){if(value===void 0)return{status:"ok",value:void 0};let parsed=schema.safeParse(value);return parsed.success?{status:"ok",value:parsed.data}:{status:"error",exitCode:invalidArgument(client,message)}}function outputFormat(client,flags){let format=validateJsonOutput(flags);return format.valid?{status:"ok",value:format.jsonOutput}:{status:"error",exitCode:invalidArgument(client,format.error)}}function noArguments(client,args,usage){return args.length?{status:"error",exitCode:invalidArgumentCount(client,usage)}:{status:"ok",value:void 0}}function unknownCommand(client,group,segment){let path=getCommandNamePlain(group),message=segment?`Unknown command ${segment} for ${path}.`:`Missing command for ${path}.`;return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:segment?"unknown_command":"missing_command",message,next:[{command:`${path} --help`,when:"See all commands"}]}),output_manager_default.error(message),output_manager_default.log(`
7
+ import{decodeListCursor}from"./chunk-LKFQMY5V.js";import{external_exports}from"./chunk-64GNDWWX.js";import{parseListLimit}from"./chunk-WS6UOPMS.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-E6VQXHBD.js";import{validateJsonOutput}from"./chunk-BDLZ6WL2.js";import{isAPIError}from"./chunk-MTPHHAPR.js";import{getCommandName,getCommandNamePlain}from"./chunk-EFGZK6OY.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{getGlobalFlagsFromArgs}from"./chunk-CUO3CYU3.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var OrganizationResponseError=class extends Error{};function handleOrganizationApiError(client,err,failed){if(!isAPIError(err)){output_manager_default.debug(`Organization request failed: ${err}`);let cause=err instanceof OrganizationResponseError?err.message:"";return report(client,{reason:AGENT_REASON.API_ERROR,message:`Failed to ${failed.action}.${cause?` ${cause}`:""}`})}let remote=stripControlCharacters(err.serverMessage||"");if(err.status===404)return report(client,{reason:AGENT_REASON.NOT_FOUND,message:failed.notFound??`Couldn't ${failed.action}. It wasn't found.`});if(err.status===403)return report(client,{reason:AGENT_REASON.PERMISSION_DENIED,message:`You can't ${failed.action}.`,remote,action:err.action,resource:typeof err.resource=="string"?err.resource:void 0});let plan=typeof err.code=="string"&&PLAN_CAUSES[err.code];if(plan)return report(client,{reason:AGENT_REASON.PLAN_LIMIT,message:`Can't ${failed.action}. ${plan}.`,remote});if(err.status===409){let conflict=typeof err.code=="string"&&CONFLICT_CAUSES[err.code];return report(client,{reason:AGENT_REASON.CONFLICT,message:`Can't ${failed.action}. ${conflict||"It conflicts with the current state of the organization or team"}.`,remote})}return err.status===429?report(client,{reason:AGENT_REASON.RATE_LIMITED,message:"Too many requests to the Vercel API. Try again later."}):report(client,{reason:AGENT_REASON.API_ERROR,message:`Failed to ${failed.action}.`,remote})}var CONFLICT_CAUSES={already_exists:"Another organization uses this slug",slug_conflict:"Another team uses this slug",team_already_in_organization:"The team already belongs to an organization",team_organization_transfer_in_progress:"The team is already moving to an organization"},PLAN_CAUSES={invalid_billing_plan:"The team's billing plan doesn't allow it",child_team_limit_reached:"The organization has reached its limit of enterprise child teams",team_already_enterprise:"An existing Enterprise team can't become an enterprise child team"};function stripControlCharacters(text){return text.replace(/[\u0000-\u001f\u007f-\u009f]/g," ").trim()}function report(client,failure){let payload={status:AGENT_STATUS.ERROR,reason:failure.reason,message:failure.message};return failure.remote&&(payload.data={remoteMessage:failure.remote}),failure.action&&(payload.action=failure.action),failure.resource&&(payload.resource=failure.resource),outputAgentError(client,payload,1),output_manager_default.error(failure.message),failure.remote&&output_manager_default.log(` Vercel API: ${failure.remote}`),1}var organizationSchema=external_exports.looseObject({organizationId:external_exports.string(),slug:external_exports.string(),name:external_exports.string().optional(),teamId:external_exports.string(),teamCount:external_exports.number(),createdAt:external_exports.string(),updatedAt:external_exports.string()}),teamSchema=external_exports.looseObject({organizationId:external_exports.string(),teamId:external_exports.string(),ssoMode:external_exports.string(),billingPlan:external_exports.string().optional(),createdAt:external_exports.string(),updatedAt:external_exports.string()}),teamsSchema=external_exports.object({teams:external_exports.array(teamSchema.extend({slug:external_exports.string(),name:external_exports.string().nullable(),avatar:external_exports.string().nullable()})),cursor:external_exports.string().nullable().optional()});async function request(client,path,schema,options={}){let fetchOptions={...options,useCurrentTeam:!1};options.method&&options.method!=="GET"&&(fetchOptions.retry={retries:0},fetchOptions.bailOn429=!0);let data=await client.fetch(`/v1/organizations${path}`,fetchOptions),result=schema.safeParse(data);if(!result.success){let paths=[...new Set(result.error.issues.map(issue=>issue.path.length?issue.path.join("."):"<root>"))].slice(0,5);throw new OrganizationResponseError(`The Organizations API returned an invalid response at ${paths.join(", ")}.`)}return result.data}function listOrganizations(client){return request(client,"",external_exports.object({organizations:external_exports.array(organizationSchema)}))}function getOrganization(client,id){return request(client,`/${encodeURIComponent(id)}`,organizationSchema)}function createOrganization(client,rootTeamId,body){let query=new URLSearchParams({teamId:rootTeamId});return request(client,`?${query}`,organizationSchema,{method:"POST",body})}function updateOrganization(client,id,slug){return request(client,`/${encodeURIComponent(id)}`,organizationSchema,{method:"PATCH",body:{slug}})}function listOrganizationTeams(client,id,cursor){let query=cursor===void 0?"":`?${new URLSearchParams({cursor})}`;return request(client,`/${encodeURIComponent(id)}/teams${query}`,teamsSchema)}function addOrganizationTeam(client,id,body){return request(client,`/${encodeURIComponent(id)}/teams`,teamSchema,{method:"POST",body})}var import_chalk=__toESM(require_source(),1);var idSchema=external_exports.string().max(256).regex(/^[a-zA-Z0-9_-]+$/),slugSchema=external_exports.string().min(1).max(48).regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/),nameSchema=external_exports.string().min(1).max(256).refine(value=>value.trim().length>0&&!/[\x00-\x1f\x7f]/.test(value)),billingPlanSchema=external_exports.enum(["platform","enterprise"]),ORGANIZATION_ID_PREFIX="org_",TEAM_ID_PREFIX="team_";function isPrefixedId(value,prefix){return value.startsWith(prefix)&&value.length>prefix.length&&idSchema.safeParse(value).success}var SLUG_MESSAGE="Provide --slug with 1-48 lowercase letters, numbers, or hyphens, beginning and ending with a letter or number.",NAME_MESSAGE="Provide --name with 1-256 characters and no control characters.",PLAN_MESSAGE="Use --billing-plan platform or --billing-plan enterprise.";function organizationsSuggestion(subcommand,argv){let globalFlags=getGlobalFlagsFromArgs(argv.slice(2)),full=globalFlags.length?`${subcommand} ${globalFlags.join(" ")}`:subcommand;return getCommandNamePlain(full)}function missingArgument(client,options){let next=[];return options.suggestList&&next.push({command:organizationsSuggestion("organizations list",client.argv),when:"List organizations to find an ID"}),next.push({command:organizationsSuggestion(options.usage,client.argv)}),outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,action:AGENT_ACTION.MISSING_ARGUMENTS,reason:options.reason,message:options.message,next}),output_manager_default.error(options.message),output_manager_default.log(`Usage: ${import_chalk.default.cyan(getCommandName(options.usage))}`),getExitCodeForReason(options.reason)}function invalidArgument(client,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}),output_manager_default.error(message),2}function invalidArgumentCount(client,usage){let message=`Too many arguments. Usage: ${getCommandNamePlain(usage)}`;return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}),output_manager_default.error(`Invalid number of arguments. Usage: ${import_chalk.default.cyan(getCommandName(usage))}`),2}function validate(client,schema,value,options){if(value===void 0)return{status:"error",exitCode:missingArgument(client,{...options,reason:AGENT_REASON.MISSING_ARGUMENTS})};let parsed=schema.safeParse(value);return parsed.success?{status:"ok",value:parsed.data}:{status:"error",exitCode:invalidArgument(client,options.message)}}function validateOptional(client,schema,value,message){if(value===void 0)return{status:"ok",value:void 0};let parsed=schema.safeParse(value);return parsed.success?{status:"ok",value:parsed.data}:{status:"error",exitCode:invalidArgument(client,message)}}function outputFormat(client,flags){let format=validateJsonOutput(flags);return format.valid?{status:"ok",value:format.jsonOutput}:{status:"error",exitCode:invalidArgument(client,format.error)}}function noArguments(client,args,usage){return args.length?{status:"error",exitCode:invalidArgumentCount(client,usage)}:{status:"ok",value:void 0}}function unknownCommand(client,group,segment){let path=getCommandNamePlain(group),message=segment?`Unknown command ${segment} for ${path}.`:`Missing command for ${path}.`;return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:segment?"unknown_command":"missing_command",message,next:[{command:`${path} --help`,when:"See all commands"}]}),output_manager_default.error(message),output_manager_default.log(`
8
8
  See all commands:
9
9
  ${path} --help`),2}function listWindow(client,flags){let limit;try{limit=parseListLimit(flags["--limit"])}catch(err){let message=err instanceof Error?err.message:String(err);return{status:"error",exitCode:invalidArgument(client,message)}}let next=flags["--next"];if(next===void 0)return{status:"ok",value:{limit,start:{offset:0}}};let start=decodeListCursor(next);return start?{status:"ok",value:{limit,start}}:{status:"error",exitCode:invalidArgument(client,"Provide --next with the cursor from the previous page.")}}export{OrganizationResponseError,handleOrganizationApiError,listOrganizations,getOrganization,createOrganization,updateOrganization,listOrganizationTeams,addOrganizationTeam,slugSchema,nameSchema,billingPlanSchema,ORGANIZATION_ID_PREFIX,TEAM_ID_PREFIX,isPrefixedId,SLUG_MESSAGE,NAME_MESSAGE,PLAN_MESSAGE,missingArgument,invalidArgument,invalidArgumentCount,validate,validateOptional,outputFormat,noArguments,unknownCommand,listWindow};
@@ -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{__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};
7
+ import{__commonJS}from"./chunk-NBPLUP7C.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};
@@ -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{getNativePackageName}from"./chunk-FXLZM6Q7.js";import{HOMEBREW_UPGRADE_COMMAND,execPackageManager,findTrustedExecutable,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,packageManagerInvocation,requireTrustedUpgradeDirectory,trustedUpgradeEnvironment,withEnvironmentOverrides}from"./chunk-AVCLYJNC.js";import{withDirectoryLock}from"./chunk-TABMJZVW.js";import{progress}from"./chunk-U56NHYAH.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_semver}from"./chunk-BPUANOGW.js";import{require_ci_info}from"./chunk-EYRBV6RM.js";import{getCachedUsername,require_lib}from"./chunk-ZHGKJCQ2.js";import{pkg_default}from"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_lib2=__commonJS({"../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js"(exports,module){"use strict";var os=__require("os"),paths=__require("path"),isWinOS=/^win/i.test(process.platform);function normalize_path(path){return paths.normalize(paths.join(path,"."))}var base=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TMPDIR||env.TEMP||env.TMP),object},windows=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.USERPROFILE||paths.join(env.HOMEDRIVE,env.HOMEPATH)||env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TEMP||env.TMP||paths.join(env.LOCALAPPDATA||env.SystemRoot||env.windir,"Temp")),object},_OSPaths=class __OSPaths{constructor(){let OSPaths=function(){return new __OSPaths};this._fn=OSPaths;let extension=isWinOS?windows():base();return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _OSPaths}});var require_lib3=__commonJS({"../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js"(exports,module){"use strict";var path=__require("path"),osPaths=require_lib2(),linux=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(osPaths.home()||osPaths.temp(),".cache"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(osPaths.home()||osPaths.temp(),".config"),object.data=()=>process.env.XDG_DATA_HOME||path.join(osPaths.home()||osPaths.temp(),".local","share"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(osPaths.home()||osPaths.temp(),".local","state"),object},macos=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Caches"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Preferences"),object.data=()=>process.env.XDG_DATA_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Application Support"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"State"),object},windows=()=>{let object={};return object.cache=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_CACHE_HOME||path.join(localAppData,"xdg.cache")},object.config=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_CONFIG_HOME||path.join(appData,"xdg.config")},object.data=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_DATA_HOME||path.join(appData,"xdg.data")},object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_STATE_HOME||path.join(localAppData,"xdg.state")},object},_XDGPortable=()=>{let XDGPortable=function(){return _XDGPortable()},extension={};return/^darwin$/i.test(process.platform)?extension=macos():/^win/i.test(process.platform)?extension=windows():extension=linux(),extension.configDirs=()=>{let dirs=[];return dirs.push(extension.config()),process.env.XDG_CONFIG_DIRS&&dirs.push(...process.env.XDG_CONFIG_DIRS.split(path.delimiter)),dirs},extension.dataDirs=()=>{let dirs=[];return dirs.push(extension.data()),process.env.XDG_DATA_DIRS&&dirs.push(...process.env.XDG_DATA_DIRS.split(path.delimiter)),dirs},Object.keys(extension).forEach(key=>{XDGPortable[key]=extension[key]}),XDGPortable};module.exports=_XDGPortable()}});var require_xdg_app_paths=__commonJS({"../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js"(exports,module){"use strict";var path=__require("path"),os=__require("os"),xdg=require_lib3(),isWinOS=/^win/i.test(process.platform);function _normalizeOptions(options,isolated){if(options=options||{},typeof options!="object"&&(options={isolated:options}),options.isolated=options.isolated===void 0||options.isolated===null?isolated:options.isolated,typeof options.isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof options.isolated}`);return options}var base=(name,isolated)=>{let object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.cache(),options.isolated?name:"")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.config(),options.isolated?name:"")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.data(),options.isolated?name:"")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.state(),options.isolated?name:"")),object.configDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.configDirs().map(s=>path.join(s,options.isolated?name:""))),object.dataDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.dataDirs().map(s=>path.join(s,options.isolated?name:""))),object},windows=(name,isolated)=>{let{env}=process,homedir=os.homedir(),tmpdir=os.tmpdir(),appData=env.APPDATA||path.join(homedir||tmpdir,"AppData","Roaming"),localAppData=env.LOCALAPPDATA||path.join(homedir||tmpdir,"AppData","Local"),object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CACHE_HOME?path.join(xdg.cache(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","Cache")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CONFIG_HOME?path.join(xdg.config(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Config")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_DATA_HOME?path.join(xdg.data(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Data")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_STATE_HOME?path.join(xdg.state(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","State")),object.configDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.config(options)];return env.XDG_CONFIG_DIRS&&dirs.push(...env.XDG_CONFIG_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object.dataDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.data(options)];return env.XDG_DATA_DIRS&&dirs.push(...env.XDG_DATA_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object},_XDGAppPaths=class __XDGAppPaths{constructor(options={name:null,suffix:null,isolated:!0}){let XDGAppPaths2=function(options2={name:null,suffix:null,isolated:!0}){return new __XDGAppPaths(options2)};this._fn=XDGAppPaths2,options=options||{},typeof options!="object"&&(options={name:options});let name=options.name||"";if(typeof name!="string")throw new TypeError(`Expected string for "name" argument, got ${typeof name}`);let suffix=options.suffix||"";if(typeof suffix!="string")throw new TypeError(`Expected string for "suffix" argument, got ${typeof suffix}`);let isolated=options.isolated===void 0||options.isolated===null?!0:options.isolated;if(typeof isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof isolated}`);name||(name=path.parse(process.pkg?process.execPath:__require.main?__require.main.filename:process.argv[0]).name),suffix&&(name+=suffix),this._fn.$name=()=>name,this._fn.$isolated=()=>isolated;let extension=isWinOS?windows(name,isolated):base(name,isolated);return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _XDGAppPaths}});var require_fetch_dist_tags=__commonJS({"src/util/get-latest-version/fetch-dist-tags.cjs"(exports,module){"use strict";var https=__require("https");function fetchDistTags(name,options){let timeout=options&&options.timeout||3e3,agent=new https.Agent({keepAlive:!0,maxSockets:15}),headers={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},url=`https://registry.npmjs.org/-/package/${name}/dist-tags`;return new Promise(resolve2=>{let timer=setTimeout(()=>{req.destroy(),resolve2(void 0)},timeout),req=https.get(url,{agent,headers},res=>{let buf="";res.on("data",chunk=>{buf+=chunk}),res.on("end",()=>{clearTimeout(timer);try{if(res.statusCode&&res.statusCode>=400){resolve2(void 0);return}resolve2(JSON.parse(buf))}catch{resolve2(void 0)}})});req.on("error",()=>{clearTimeout(timer),resolve2(void 0)})})}module.exports={fetchDistTags}}});function getWhoamiCachedAnswer(args,authConfig){return args.includes("--cached")?getCachedUsername(authConfig):void 0}var import_semver=__toESM(require_semver(),1);import{spawn}from"child_process";function renderUpgradeProgress(current,total,phase){let bar=progress(current,total);output_manager_default.spinner(bar?`Upgrading Vercel CLI [${bar}] (${current}/${total})${phase?` ${phase}`:""}`:phase||"Upgrading Vercel CLI\u2026",0)}function packageManagerEnvironment(packageManager,env){return withEnvironmentOverrides(env,getUpgradePackageManager(packageManager).env)}async function requireExecutable(name,env){let executable=await findTrustedExecutable(name,env);if(!executable)throw new Error(`${name} is not in a directory that PATH names in full`);return executable}async function execFileStdout(packageManager,args,cwd,env=trustedUpgradeEnvironment){return execPackageManager(await requireExecutable(packageManager,env),args,{cwd,env:packageManagerEnvironment(packageManager,env),timeout:15e3})}function parseVersionOutput(stdout){for(let line of[stdout.trim(),...stdout.trim().split(`
7
+ import{require_xdg_app_paths}from"./chunk-BFS4K2RF.js";import{getNativePackageName}from"./chunk-7PK2JFEH.js";import{HOMEBREW_UPGRADE_COMMAND,execPackageManager,findTrustedExecutable,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,packageManagerInvocation,requireTrustedUpgradeDirectory,trustedUpgradeEnvironment,withEnvironmentOverrides}from"./chunk-6KI5LJIB.js";import{withDirectoryLock}from"./chunk-TABMJZVW.js";import{progress}from"./chunk-U56NHYAH.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-5F4RJ32E.js";import{require_semver}from"./chunk-IZV6K7RR.js";import{require_ci_info}from"./chunk-QROPMCL2.js";import{getCachedUsername,require_lib}from"./chunk-HDKEES7E.js";import{pkg_default}from"./chunk-JCDPMWKO.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{__commonJS,__require,__toESM}from"./chunk-NBPLUP7C.js";var require_fetch_dist_tags=__commonJS({"src/util/get-latest-version/fetch-dist-tags.cjs"(exports,module){"use strict";var https=__require("https");function fetchDistTags(name,options){let timeout=options&&options.timeout||3e3,agent=new https.Agent({keepAlive:!0,maxSockets:15}),headers={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},url=`https://registry.npmjs.org/-/package/${name}/dist-tags`;return new Promise(resolve2=>{let timer=setTimeout(()=>{req.destroy(),resolve2(void 0)},timeout),req=https.get(url,{agent,headers},res=>{let buf="";res.on("data",chunk=>{buf+=chunk}),res.on("end",()=>{clearTimeout(timer);try{if(res.statusCode&&res.statusCode>=400){resolve2(void 0);return}resolve2(JSON.parse(buf))}catch{resolve2(void 0)}})});req.on("error",()=>{clearTimeout(timer),resolve2(void 0)})})}module.exports={fetchDistTags}}});function getWhoamiCachedAnswer(args,authConfig){return args.includes("--cached")?getCachedUsername(authConfig):void 0}var import_semver=__toESM(require_semver(),1);import{spawn}from"child_process";function renderUpgradeProgress(current,total,phase){let bar=progress(current,total);output_manager_default.spinner(bar?`Upgrading Vercel CLI [${bar}] (${current}/${total})${phase?` ${phase}`:""}`:phase||"Upgrading Vercel CLI\u2026",0)}function packageManagerEnvironment(packageManager,env){return withEnvironmentOverrides(env,getUpgradePackageManager(packageManager).env)}async function requireExecutable(name,env){let executable=await findTrustedExecutable(name,env);if(!executable)throw new Error(`${name} is not in a directory that PATH names in full`);return executable}async function execFileStdout(packageManager,args,cwd,env=trustedUpgradeEnvironment){return execPackageManager(await requireExecutable(packageManager,env),args,{cwd,env:packageManagerEnvironment(packageManager,env),timeout:15e3})}function parseVersionOutput(stdout){for(let line of[stdout.trim(),...stdout.trim().split(`
8
8
  `).reverse()])try{let value=JSON.parse(line),parsed=Array.isArray(value)&&value.length===1?value[0]:value,version=typeof parsed=="string"?parsed:typeof parsed?.data=="string"?parsed.data:void 0;if(version&&import_semver.default.valid(version))return version}catch{let version=line.trim();if(import_semver.default.valid(version))return version}}async function getLatestPackageVersion(packageManager,installArgs,cwd,global,env,bypassMinReleaseAge=!0){let packageSpecifier=installArgs.find(arg=>arg.endsWith("@latest"));if(!packageSpecifier)return;let manager=getUpgradePackageManager(packageManager),queryArgs=[...manager.metadataArgs(packageSpecifier),...bypassMinReleaseAge?manager.releaseAgeBypassArgs:[]];try{let stdout=await execFileStdout(packageManager,queryArgs,cwd,env);return parseVersionOutput(stdout)}catch(error){output_manager_default.debug(`Failed to resolve the latest Vercel CLI version: ${error instanceof Error?error.message:String(error)}`);return}}async function getInstalledPackageVersion(packageManager,installArgs,cwd,global){let packageSpecifier=installArgs.find(arg=>arg.endsWith("@latest"));if(!packageSpecifier)return;let packageName=packageSpecifier.slice(0,-7);try{let stdout=await execFileStdout(packageManager,["list",packageName,"--depth=0","--json",...global?["--global"]:[]],cwd),parsed=JSON.parse(stdout),projects=Array.isArray(parsed)?parsed:[parsed];for(let project of projects){let version=project?.dependencies?.[packageName]?.version??project?.devDependencies?.[packageName]?.version??project?.optionalDependencies?.[packageName]?.version;if(typeof version=="string"&&import_semver.default.valid(version))return version}}catch(error){output_manager_default.debug(`Failed to read the installed Vercel CLI version: ${error instanceof Error?error.message:String(error)}`)}}function isVersionCurrent(current,latest){return import_semver.default.valid(current)&&import_semver.default.valid(latest)?import_semver.default.gte(current,latest):current===latest}function pinPackageVersion(args,version){return args.map(arg=>arg.endsWith("@latest")?`${arg.slice(0,-6)}${version}`:arg)}async function getMinReleaseAgeContext(packageManager,cwd,global){let setting=packageManager==="pnpm"?"minimumReleaseAge":"min-release-age";try{let raw=(await execFileStdout(packageManager,["config","get",setting,"--json",...global?["--global"]:[]],cwd)).trim(),value=raw===""||raw==="undefined"?void 0:JSON.parse(raw);if(!(value==null||value===""||value==="undefined")){let age=typeof value=="number"||typeof value=="string"&&value.trim()!==""?Number(value):NaN;if(!Number.isFinite(age)||age<0)return`Could not determine ${packageManager}'s configured minimum release age.`;let minutes=packageManager==="pnpm"?age:age*1440,duration=minutes>0&&minutes%60===0?`${minutes/60} ${minutes===60?"hour":"hours"}`:`${minutes} ${minutes===1?"minute":"minutes"}`;return`${packageManager} ${setting} is configured to ${duration}.`}if(packageManager==="pnpm"){let version=parseVersionOutput(await execFileStdout(packageManager,["--version"],cwd));if(version&&!import_semver.default.prerelease(version)&&import_semver.default.gte(version,"11.0.0"))return`pnpm ${version} defaults to a minimum release age of 24 hours (1440 minutes); no explicit minimumReleaseAge setting was reported.`}return`${packageManager} did not report a configured minimum release age.`}catch{return`Could not determine ${packageManager}'s configured minimum release age.`}}function isMinReleaseAgeError(packageManager,stdout,stderr){let installerOutput=`${stdout}
9
9
  ${stderr}`;return packageManager==="pnpm"?installerOutput.includes("ERR_PNPM_NO_MATURE_MATCHING_VERSION")||installerOutput.includes("ERR_PNPM_NO_MATCHING_VERSION")&&installerOutput.includes("satisfies the specs but was released at"):packageManager==="npm"?/\bETARGET\b/.test(installerOutput)&&installerOutput.includes("with a date before")||/min-release-age cannot be provided/i.test(installerOutput):!1}function setMinReleaseAgeBypass(client,enabled){client.config={...client.config,updates:{...client.config.updates,bypassMinReleaseAge:enabled}},client.writeToConfigFile()}async function executeHomebrewUpgrade(env=trustedUpgradeEnvironment){let[brew,...args]=HOMEBREW_UPGRADE_COMMAND.split(" "),cwd=requireTrustedUpgradeDirectory();output_manager_default.debug(`Executing: ${HOMEBREW_UPGRADE_COMMAND}`);let executable=await requireExecutable(brew,env).catch(error=>error),result=await new Promise(resolve2=>{if(typeof executable!="string"){resolve2({code:1,spawnError:executable});return}let settled=!1,brewProcess=spawn(executable,args,{cwd,env:{...env},stdio:"inherit",shell:!1});brewProcess.on("error",spawnError=>{settled||(settled=!0,resolve2({code:1,spawnError}))}),brewProcess.on("close",code=>{settled||(settled=!0,resolve2({code:code??1}))})});return result.spawnError?(output_manager_default.error(`Failed to run Homebrew: ${result.spawnError.message}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`),1):(result.code!==0&&(output_manager_default.error(`Homebrew upgrade failed with exit code ${result.code}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`)),result.code)}function executeAutomaticUpgrade(client,env=trustedUpgradeEnvironment){return executeUpgrade("latest",client,!1,!0,env,"package-manager")}async function executeUpgrade(targetVersion,client,bypassMinReleaseAge=!1,explicitTarget=!1,env=trustedUpgradeEnvironment,releaseAgePolicy="newest",outcome){let totalSteps=targetVersion?2:3;renderUpgradeProgress(0,totalSteps,"Resolving installer\u2026");let{command:updateCommand,global,packageManager}=await getUpdateCommandInfo(env).catch(error=>{throw output_manager_default.stopSpinner(),error}),[command,...args]=updateCommand.split(" "),cwd=global?requireTrustedUpgradeDirectory():process.cwd(),executable=await requireExecutable(command,env).catch(error=>error),bypassArgs=getUpgradePackageManager(packageManager).releaseAgeBypassArgs;if(bypassMinReleaseAge&&bypassArgs.length===0)return output_manager_default.stopSpinner(),output_manager_default.error(`Minimum release-age bypass is not supported for ${packageManager}. Run the upgrade without --bypass-min-release-age, or configure release-age settings in ${packageManager} directly.`),1;bypassMinReleaseAge&&client&&client.config.updates?.bypassMinReleaseAge!==!0&&setMinReleaseAgeBypass(client,!0);let versionBefore=pkg_default.version,installLatestTag=explicitTarget&&targetVersion==="latest",resolvedTargetVersion=installLatestTag?void 0:targetVersion;if(targetVersion||(renderUpgradeProgress(1,totalSteps,"Checking for updates\u2026"),resolvedTargetVersion=await getLatestPackageVersion(packageManager,args,cwd,global,env,releaseAgePolicy==="newest")),!resolvedTargetVersion&&!installLatestTag)return output_manager_default.stopSpinner(),output_manager_default.error("Failed to resolve the latest Vercel CLI version."),1;if(!explicitTarget&&resolvedTargetVersion&&isVersionCurrent(versionBefore,resolvedTargetVersion))return renderUpgradeProgress(totalSteps,totalSteps),output_manager_default.stopSpinner(),output_manager_default.log(`No upgrade available. Vercel CLI is already up to date (v${versionBefore}).`),0;let installArgs=resolvedTargetVersion?pinPackageVersion(args,resolvedTargetVersion):args,shouldBypass=releaseAgePolicy==="newest"&&bypassArgs.length>0&&(bypassMinReleaseAge||client?.config.updates?.bypassMinReleaseAge===!0);shouldBypass&&(installArgs=[...installArgs,...bypassArgs]);let runInstall=currentArgs=>{let installCommand=[command,...currentArgs].join(" ");return output_manager_default.debug(`Executing: ${installCommand} (cwd: ${cwd})`),new Promise(resolve2=>{let stdout=[],stderr=[],invocation;try{if(typeof executable!="string")throw executable;invocation=packageManagerInvocation(executable,currentArgs,env)}catch(spawnError){resolve2({code:1,stdout:"",stderr:"",spawnError});return}let upgradeProcess=spawn(invocation.file,invocation.args,{cwd,env:packageManagerEnvironment(packageManager,env),stdio:["inherit","pipe","pipe"],shell:!1,windowsVerbatimArguments:invocation.windowsVerbatimArguments});upgradeProcess.stdout?.on("data",data=>{stdout.push(Uint8Array.from(data)),output_manager_default.debug(`[upgrade stdout] ${data.toString().trimEnd()}`)}),upgradeProcess.stderr?.on("data",data=>{stderr.push(Uint8Array.from(data)),output_manager_default.debug(`[upgrade stderr] ${data.toString().trimEnd()}`)});let settled=!1;upgradeProcess.on("error",spawnError=>{settled||(settled=!0,resolve2({code:1,stdout:"",stderr:"",spawnError}))}),upgradeProcess.on("close",code=>{settled||(settled=!0,resolve2({code:code??1,stdout:Buffer.concat(stdout).toString(),stderr:Buffer.concat(stderr).toString()}))})})};renderUpgradeProgress(targetVersion?1:2,totalSteps,"Installing\u2026");let result=await runInstall(installArgs),usedAllowedRelease=!1;if(result.code!==0&&!result.spawnError&&releaseAgePolicy==="newest"&&!shouldBypass&&bypassArgs.length>0&&isMinReleaseAgeError(packageManager,result.stdout,result.stderr)){let context=await getMinReleaseAgeContext(packageManager,cwd,global);output_manager_default.stopSpinner();let blockedMessage=`The package manager blocked this Vercel CLI release because of its minimum release-age setting. ${context}`;if(!client||client.nonInteractive||!client.stdin.isTTY)return output_manager_default.error(`${blockedMessage}
10
10
  To install the newest release allowed by your settings:
@@ -12,4 +12,4 @@ To install the newest release allowed by your settings:
12
12
  To bypass the minimum release age for this and future foreground upgrades:
13
13
  vc upgrade --bypass-min-release-age`),outcome&&(outcome.releaseAgeBlocked=!0),1;output_manager_default.print(`! ${blockedMessage}
14
14
  `);let action=await client.input.select({message:"Which upgrade option?",choices:[{name:"Install the newest release allowed by my settings",value:"allowed"},{name:"Bypass the minimum release age for this and future foreground upgrades",value:"bypass"},{name:"Cancel",value:"cancel"}],default:"allowed"});if(action==="allowed")resolvedTargetVersion=void 0,installArgs=args,usedAllowedRelease=!0;else if(action==="bypass")setMinReleaseAgeBypass(client,!0),output_manager_default.log("To restore release-age checks, run `vc upgrade --no-bypass-min-release-age`."),installArgs=[...installArgs,...bypassArgs];else return output_manager_default.log("Upgrade canceled."),0;renderUpgradeProgress(targetVersion?1:2,totalSteps,"Installing\u2026"),result=await runInstall(installArgs)}return result.spawnError?(output_manager_default.stopSpinner(),output_manager_default.error(`Failed to execute upgrade command: ${result.spawnError.message}`),output_manager_default.log(`You can try running the command manually: ${[command,...installArgs].join(" ")}`),1):result.code!==0?(output_manager_default.stopSpinner(),result.stdout&&output_manager_default.print(result.stdout),result.stderr&&output_manager_default.print(result.stderr),output_manager_default.error(`Upgrade failed with exit code ${result.code}`),output_manager_default.log(`You can try running the command manually: ${[command,...installArgs].join(" ")}`),result.code):usedAllowedRelease&&(resolvedTargetVersion=await getInstalledPackageVersion(packageManager,args,cwd,global),resolvedTargetVersion===versionBefore)?(output_manager_default.stopSpinner(),output_manager_default.log(`Vercel CLI remains at v${versionBefore} under your package manager settings.`),0):(renderUpgradeProgress(totalSteps,totalSteps),output_manager_default.stopSpinner(),output_manager_default.success(resolvedTargetVersion?`Upgraded Vercel CLI to v${resolvedTargetVersion}.`:"Upgraded Vercel CLI."),0)}var import_semver2=__toESM(require_semver(),1),import_ci_info=__toESM(require_ci_info(),1),import_xdg_app_paths=__toESM(require_xdg_app_paths(),1),import_fs_extra=__toESM(require_lib(),1);import{randomUUID}from"node:crypto";import{mkdir,rename,rm,writeFile}from"node:fs/promises";import{dirname,isAbsolute,relative,resolve}from"node:path";import{spawn as spawn2}from"node:child_process";var NATIVE_UPDATE_CHILD_ENV="VERCEL_NATIVE_UPDATE_CHILD",NATIVE_UPDATE_VERSION_ENV="VERCEL_NATIVE_UPDATE_VERSION",NATIVE_UPDATE_SELECT_PRODUCTION_ENV="VERCEL_NATIVE_UPDATE_SELECT_PRODUCTION";function isNativeUpdateChild(){return process.env[NATIVE_UPDATE_CHILD_ENV]==="1"}function spawnDetachedUpdate(env){let child=spawn2(process.execPath,["version","check"],{detached:!0,stdio:"ignore",windowsHide:!0,env});child.on("error",()=>{}),child.unref()}function spawnNativeUpdateCheck(){let env={...process.env,[NATIVE_UPDATE_CHILD_ENV]:"1",[NATIVE_UPDATE_SELECT_PRODUCTION_ENV]:"0"};delete env[NATIVE_UPDATE_VERSION_ENV],spawnDetachedUpdate(env)}function spawnNativeUpdateChild(version,selectProduction){spawnDetachedUpdate({...process.env,[NATIVE_UPDATE_CHILD_ENV]:"1",[NATIVE_UPDATE_VERSION_ENV]:version,[NATIVE_UPDATE_SELECT_PRODUCTION_ENV]:selectProduction?"1":"0"})}var NATIVE_UPDATE_CHECK_INTERVAL=1e3*60*60*24,NATIVE_UPDATE_DISCOVERY_LEASE=1e3*60;function isNativeAutoUpdateEnabled(config){return config.updates?.auto!==!1}var CACHE_LOCK_RETRY_MS=10,CACHE_LOCK_ABANDONED_MS=1e4;function getNativeUpdateCacheFile(cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache()){let packageName=getNativePackageName().replaceAll("/","-");return resolve(cacheDir,"package-updates",`${packageName}-latest.json`)}function readNativeUpdateCache(cacheDir){try{let cache=(0,import_fs_extra.readJSONSync)(getNativeUpdateCacheFile(cacheDir));if(typeof cache?.expireAt=="number"&&(cache.version===void 0||typeof cache.version=="string"&&import_semver2.default.valid(cache.version)))return cache}catch{}}async function atomicWriteCache(cacheDir,cache){let cacheFile=getNativeUpdateCacheFile(cacheDir);await mkdir(dirname(cacheFile),{recursive:!0});let temporary=`${cacheFile}.tmp-${randomUUID()}`;await writeFile(temporary,`${JSON.stringify(cache)}
15
- `);try{await rename(temporary,cacheFile)}catch(error){throw await rm(temporary,{force:!0}),error}}async function withNativeUpdateCacheLock(cacheDir,action,{waitMs=5e3}={}){let lock=`${getNativeUpdateCacheFile(cacheDir)}.lock`;await withDirectoryLock(lock,action,{waitMs,retryMs:CACHE_LOCK_RETRY_MS,abandonedAfterMs:CACHE_LOCK_ABANDONED_MS,busyMessage:path=>`Timed out waiting for the native update cache. If no Vercel update is running, remove the lock at ${path} and retry.`})}async function cacheNativeUpdateVersion(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now(),selectProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir),keepNewerExisting=!!(existing?.version&&import_semver2.default.gt(existing.version,version)),nextVersion=keepNewerExisting?existing?.version:version,shouldSelectProduction=selectProduction||existing?.selectProduction===!0,staged=shouldSelectProduction?!1:keepNewerExisting||existing?.version===version?existing?.staged===!0:!1;await atomicWriteCache(cacheDir,{expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,selectProduction:shouldSelectProduction,staged,version:nextVersion})})}async function cacheNativeUpdateDiscoveryAttempt({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir);await atomicWriteCache(cacheDir,{...existing,discoveryStartedAt:now,expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,staged:existing?.selectProduction===!0?existing.staged===!0:!0})})}async function restoreNativeUpdateAfterDiscoveryFailure({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,staged:!1})})}async function markNativeUpdateStaged(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),selectedProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version===version&&(cache.selectProduction!==!0||selectedProduction)&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,selectProduction:!1,staged:!0})})}function isWithinInstallRoot(executablePath,installRoot){let pathFromRoot=relative(resolve(installRoot),resolve(executablePath));return pathFromRoot!==""&&pathFromRoot!==".."&&!pathFromRoot.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!isAbsolute(pathFromRoot)}function scheduleNativeAutoUpdate(client,exitCode,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),executablePath=process.execPath,installRoot=getInstallRoot(),now=Date.now()}={}){if(exitCode!==0||import_ci_info.default.isCI||client.isAgent||client.nonInteractive||isNativeUpdateChild()||!isNativeBinaryInstall()||!isWithinInstallRoot(executablePath,installRoot))return;let cache=readNativeUpdateCache(cacheDir);if(!isNativeAutoUpdateEnabled(client.config)&&cache?.selectProduction!==!0)return;if(!cache?.expireAt||cache.expireAt<=now){spawnNativeUpdateCheck();return}let abandonedDiscovery=!!(cache.version&&cache.staged===!0&&cache.discoveryStartedAt&&cache.discoveryStartedAt+NATIVE_UPDATE_DISCOVERY_LEASE<=now);cache.version&&(cache.staged!==!0||abandonedDiscovery)&&spawnNativeUpdateChild(cache.version,cache.selectProduction===!0)}var import_ci_info2=__toESM(require_ci_info(),1);function isAutoUpdateEnabled(config){return config.updates?.auto===!0}function hasAutoUpdatePreference(config){return typeof config.updates?.auto=="boolean"}function setAutoUpdate(client,enabled){client.config={...client.config,updates:{...client.config.updates,auto:enabled}},client.writeToConfigFile()}async function canAutoUpdate(client,exitCode,command){return isNativeBinaryInstall()||!isAutoUpdateEnabled(client.config)||exitCode!==0||import_ci_info2.default.isCI||client.nonInteractive||client.isAgent||command==="upgrade"?!1:isGlobal()}export{require_xdg_app_paths,require_fetch_dist_tags,getWhoamiCachedAnswer,pinPackageVersion,setMinReleaseAgeBypass,executeHomebrewUpgrade,executeAutomaticUpgrade,executeUpgrade,NATIVE_UPDATE_VERSION_ENV,NATIVE_UPDATE_SELECT_PRODUCTION_ENV,isNativeUpdateChild,spawnNativeUpdateChild,isNativeAutoUpdateEnabled,cacheNativeUpdateVersion,cacheNativeUpdateDiscoveryAttempt,restoreNativeUpdateAfterDiscoveryFailure,markNativeUpdateStaged,scheduleNativeAutoUpdate,isAutoUpdateEnabled,hasAutoUpdatePreference,setAutoUpdate,canAutoUpdate};
15
+ `);try{await rename(temporary,cacheFile)}catch(error){throw await rm(temporary,{force:!0}),error}}async function withNativeUpdateCacheLock(cacheDir,action,{waitMs=5e3}={}){let lock=`${getNativeUpdateCacheFile(cacheDir)}.lock`;await withDirectoryLock(lock,action,{waitMs,retryMs:CACHE_LOCK_RETRY_MS,abandonedAfterMs:CACHE_LOCK_ABANDONED_MS,busyMessage:path=>`Timed out waiting for the native update cache. If no Vercel update is running, remove the lock at ${path} and retry.`})}async function cacheNativeUpdateVersion(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now(),selectProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir),keepNewerExisting=!!(existing?.version&&import_semver2.default.gt(existing.version,version)),nextVersion=keepNewerExisting?existing?.version:version,shouldSelectProduction=selectProduction||existing?.selectProduction===!0,staged=shouldSelectProduction?!1:keepNewerExisting||existing?.version===version?existing?.staged===!0:!1;await atomicWriteCache(cacheDir,{expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,selectProduction:shouldSelectProduction,staged,version:nextVersion})})}async function cacheNativeUpdateDiscoveryAttempt({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir);await atomicWriteCache(cacheDir,{...existing,discoveryStartedAt:now,expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,staged:existing?.selectProduction===!0?existing.staged===!0:!0})})}async function restoreNativeUpdateAfterDiscoveryFailure({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,staged:!1})})}async function markNativeUpdateStaged(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),selectedProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version===version&&(cache.selectProduction!==!0||selectedProduction)&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,selectProduction:!1,staged:!0})})}function isWithinInstallRoot(executablePath,installRoot){let pathFromRoot=relative(resolve(installRoot),resolve(executablePath));return pathFromRoot!==""&&pathFromRoot!==".."&&!pathFromRoot.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!isAbsolute(pathFromRoot)}function scheduleNativeAutoUpdate(client,exitCode,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),executablePath=process.execPath,installRoot=getInstallRoot(),now=Date.now()}={}){if(exitCode!==0||import_ci_info.default.isCI||client.isAgent||client.nonInteractive||isNativeUpdateChild()||!isNativeBinaryInstall()||!isWithinInstallRoot(executablePath,installRoot))return;let cache=readNativeUpdateCache(cacheDir);if(!isNativeAutoUpdateEnabled(client.config)&&cache?.selectProduction!==!0)return;if(!cache?.expireAt||cache.expireAt<=now){spawnNativeUpdateCheck();return}let abandonedDiscovery=!!(cache.version&&cache.staged===!0&&cache.discoveryStartedAt&&cache.discoveryStartedAt+NATIVE_UPDATE_DISCOVERY_LEASE<=now);cache.version&&(cache.staged!==!0||abandonedDiscovery)&&spawnNativeUpdateChild(cache.version,cache.selectProduction===!0)}var import_ci_info2=__toESM(require_ci_info(),1);function isAutoUpdateEnabled(config){return config.updates?.auto===!0}function hasAutoUpdatePreference(config){return typeof config.updates?.auto=="boolean"}function setAutoUpdate(client,enabled){client.config={...client.config,updates:{...client.config.updates,auto:enabled}},client.writeToConfigFile()}async function canAutoUpdate(client,exitCode,command){return isNativeBinaryInstall()||!isAutoUpdateEnabled(client.config)||exitCode!==0||import_ci_info2.default.isCI||client.nonInteractive||client.isAgent||command==="upgrade"?!1:isGlobal()}function getFlagSpecValue(flagsSpecification,flag){let value=flagsSpecification[flag];return typeof value=="string"?flagsSpecification[value]:value}function flagConsumesValue(rawArg,flagsSpecification){if(!rawArg.startsWith("-")||rawArg==="-"||rawArg.includes("="))return!1;let value=getFlagSpecValue(flagsSpecification,rawArg);return value===String||value===Number||Array.isArray(value)}function findCommandIndex(rawArgs,commandName,flagsSpecification){if(!commandName)return-1;for(let index=0;index<rawArgs.length;index++){let rawArg=rawArgs[index];if(rawArg==="--")return rawArgs.indexOf(commandName,index+1);if(rawArg.startsWith("-")){flagConsumesValue(rawArg,flagsSpecification)&&index++;continue}if(rawArg===commandName)return index}return-1}function normalizeHelpAlias(rawArgs){return rawArgs.map(arg=>arg==="-help"?"--help":arg)}export{require_fetch_dist_tags,flagConsumesValue,findCommandIndex,normalizeHelpAlias,getWhoamiCachedAnswer,pinPackageVersion,setMinReleaseAgeBypass,executeHomebrewUpgrade,executeAutomaticUpgrade,executeUpgrade,NATIVE_UPDATE_VERSION_ENV,NATIVE_UPDATE_SELECT_PRODUCTION_ENV,isNativeUpdateChild,spawnNativeUpdateChild,isNativeAutoUpdateEnabled,cacheNativeUpdateVersion,cacheNativeUpdateDiscoveryAttempt,restoreNativeUpdateAfterDiscoveryFailure,markNativeUpdateStaged,scheduleNativeAutoUpdate,isAutoUpdateEnabled,hasAutoUpdatePreference,setAutoUpdate,canAutoUpdate};
@@ -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{getSubcommand}from"./chunk-ETV3C2CV.js";import{monitorsCommand,monitorsNotificationsAggregateCommand}from"./chunk-X2UJGCIC.js";import{TelemetryClient}from"./chunk-QROPMCL2.js";import{takeCommand}from"./chunk-E7ICSU45.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-E6VQXHBD.js";import{warnDeprecatedSubcommand}from"./chunk-BDLZ6WL2.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{getFlagsSpecification}from"./chunk-CUO3CYU3.js";var MonitorsTelemetryClient=class extends TelemetryClient{trackCliSubcommandLs(actual){this.trackCliSubcommand({subcommand:"ls",value:actual})}trackCliSubcommandSchema(actual){this.trackCliSubcommand({subcommand:"schema",value:actual})}trackCliSubcommandAdd(actual){this.trackCliSubcommand({subcommand:"add",value:actual})}trackCliSubcommandInspect(actual){this.trackCliSubcommand({subcommand:"inspect",value:actual})}trackCliSubcommandRemove(actual){this.trackCliSubcommand({subcommand:"remove",value:actual})}trackCliSubcommandUpdate(actual){this.trackCliSubcommand({subcommand:"update",value:actual})}trackCliSubcommandNotifications(actual){this.trackCliSubcommand({subcommand:"notifications",value:actual})}trackCliOptionType(v){v&&v.length>0&&this.trackCliOption({option:"type",value:v.join(",")})}trackCliFlagAll(v){v&&this.trackCliFlag("all")}trackCliFlagJson(v){v&&this.trackCliFlag("json")}trackCliOptionFile(v){v&&this.trackCliOption({option:"file",value:this.redactedValue})}trackCliOptionData(v){v&&this.trackCliOption({option:"data",value:this.redactedValue})}trackCliOptionBody(v){v&&this.trackCliOption({option:"body",value:this.redactedValue})}};var MONITORS_CONFIG={ls:["ls","list"],schema:["schema"],add:["add","create"],inspect:["inspect","get"],remove:["remove","rm","delete"],update:["update","patch"],notifications:["notifications"]},monitorsRoutingFlags=getFlagsSpecification([...monitorsCommand.subcommands,...monitorsNotificationsAggregateCommand.subcommands].flatMap(command=>[...command.options]));async function runMonitors(client,argv,api){let{command,args:argsWithoutCommand}=takeCommand(argv,monitorsRoutingFlags),found=command?getSubcommand([command],MONITORS_CONFIG):void 0;if(command&&found?.subcommand==null)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:`Unknown "monitors" subcommand "${command}".`,next:[{command:buildCommandWithGlobalFlags(client.argv,"monitors --help"),when:"Show valid monitors subcommands"}]},2),output_manager_default.error(`Unknown "monitors" subcommand "${command}". Run \`vercel monitors --help\`.`),2;let resolved=found?.subcommand??"ls",original=found?.subcommandOriginal??"ls",args=found?argsWithoutCommand:argv,telemetry=new MonitorsTelemetryClient({opts:{store:client.telemetryEventStore}});switch(resolved){case"ls":return telemetry.trackCliSubcommandLs(original),(await import("./ls-PAL6FQB6.js")).default(client,args,api,telemetry);case"schema":return telemetry.trackCliSubcommandSchema(original),(await import("./schema-UVTYLX6L.js")).default(client,args,api);case"add":return telemetry.trackCliSubcommandAdd(original),original==="create"&&warnDeprecatedSubcommand(client,"monitors create","monitors add"),(await import("./add-57EE2LQO.js")).default(client,args,api,telemetry);case"inspect":return telemetry.trackCliSubcommandInspect(original),original==="get"&&warnDeprecatedSubcommand(client,"monitors get","monitors inspect"),(await import("./rule-inspect-Y2MX7LQN.js")).default(client,args,api);case"remove":return telemetry.trackCliSubcommandRemove(original),original==="delete"&&warnDeprecatedSubcommand(client,"monitors delete","monitors remove"),(await import("./rm-D7CWGBTV.js")).default(client,args,api);case"update":return telemetry.trackCliSubcommandUpdate(original),original==="patch"&&warnDeprecatedSubcommand(client,"monitors patch","monitors update"),(await import("./update-VG2LHBRV.js")).default(client,args,api,telemetry);case"notifications":return(await import("./notifications-GZH7CFZY.js")).default(client,args,api,telemetry);default:return output_manager_default.error(`Unhandled monitors subcommand: ${String(resolved)}`),1}}export{monitorsRoutingFlags,runMonitors};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{table}from"./chunk-U5SZQUYO.js";import{require_source}from"./chunk-NB2WLB3J.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1);function strlen(str){return(0,import_strip_ansi.default)(str).length}function formatTable(header,align,blocks){let nrCols=header.length,padding=[],out=`
7
+ import{table}from"./chunk-QCYCLWNG.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{require_strip_ansi}from"./chunk-LPYHYTYI.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1);function strlen(str){return(0,import_strip_ansi.default)(str).length}function formatTable(header,align,blocks){let nrCols=header.length,padding=[],out=`
8
8
  `;for(let i=0;i<nrCols;i++)padding[i]=blocks.reduce((acc,block)=>{let maxLen=Math.max(...block.rows.map(row=>strlen(`${row[i]}`)));return Math.max(acc,Math.ceil(maxLen/8))},1);for(let block of blocks){block.name&&(out+=`${block.name}
9
9
  `);let rows=[header.map(s=>import_chalk.default.dim(s))].concat(block.rows);if(rows.length>0){rows[0][0]=` ${rows[0][0]}`;for(let i=1;i<rows.length;i++){let row=rows[i].slice(0);row[0]=` ${row[0]}`;for(let j=0;j<nrCols;j++){let col=`${row[j]}`,al=align[j]||"l",repeat=padding[j]>1?padding[j]*8-strlen(col):0,pad=repeat>0?" ".repeat(repeat):"";rows[i][j]=al==="l"?col+pad:pad+col}}out+=table(rows,{align,hsep:4})}out+=`
10
10
 
@@ -0,0 +1,18 @@
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{a as a2,o as o2}from"./chunk-IVJEYHF5.js";import{a}from"./chunk-GB77JTTX.js";import{o}from"./chunk-OVVHONX7.js";import{Bt,Vt}from"./chunk-732HWE3P.js";import{i,n,r,t}from"./chunk-HAM7ZPEC.js";import{Q}from"./chunk-Y2KAVMM4.js";import{e}from"./chunk-S7FMMAST.js";import{N,X,Z}from"./chunk-6OOJFAF5.js";import{d}from"./chunk-YBWLW6SW.js";import{require_lib}from"./chunk-M2XLLWK7.js";import{__commonJS,__require,__toESM}from"./chunk-NBPLUP7C.js";var require_constants=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js"(exports,module){"use strict";var BINARY_TYPES=["nodebuffer","arraybuffer","fragments"],hasBlob=typeof Blob<"u";hasBlob&&BINARY_TYPES.push("blob");module.exports={BINARY_TYPES,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}}});var require_buffer_util=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js"(exports,module){"use strict";var{EMPTY_BUFFER}=require_constants(),FastBuffer=Buffer[Symbol.species];function concat(list,totalLength){if(list.length===0)return EMPTY_BUFFER;if(list.length===1)return list[0];let target=Buffer.allocUnsafe(totalLength),offset=0;for(let i2=0;i2<list.length;i2++){let buf=list[i2];target.set(buf,offset),offset+=buf.length}return offset<totalLength?new FastBuffer(target.buffer,target.byteOffset,offset):target}function _mask(source,mask,output,offset,length){for(let i2=0;i2<length;i2++)output[offset+i2]=source[i2]^mask[i2&3]}function _unmask(buffer,mask){for(let i2=0;i2<buffer.length;i2++)buffer[i2]^=mask[i2&3]}function toArrayBuffer(buf){return buf.length===buf.buffer.byteLength?buf.buffer:buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.length)}function toBuffer(data){if(toBuffer.readOnly=!0,Buffer.isBuffer(data))return data;let buf;return data instanceof ArrayBuffer?buf=new FastBuffer(data):ArrayBuffer.isView(data)?buf=new FastBuffer(data.buffer,data.byteOffset,data.byteLength):(buf=Buffer.from(data),toBuffer.readOnly=!1),buf}module.exports={concat,mask:_mask,toArrayBuffer,toBuffer,unmask:_unmask};if(!process.env.WS_NO_BUFFER_UTIL)try{let bufferUtil=__require("bufferutil");module.exports.mask=function(source,mask,output,offset,length){length<48?_mask(source,mask,output,offset,length):bufferUtil.mask(source,mask,output,offset,length)},module.exports.unmask=function(buffer,mask){buffer.length<32?_unmask(buffer,mask):bufferUtil.unmask(buffer,mask)}}catch{}}});var require_limiter=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js"(exports,module){"use strict";var kDone=Symbol("kDone"),kRun=Symbol("kRun"),Limiter=class{constructor(concurrency){this[kDone]=()=>{this.pending--,this[kRun]()},this.concurrency=concurrency||1/0,this.jobs=[],this.pending=0}add(job){this.jobs.push(job),this[kRun]()}[kRun](){if(this.pending!==this.concurrency&&this.jobs.length){let job=this.jobs.shift();this.pending++,job(this[kDone])}}};module.exports=Limiter}});var require_permessage_deflate=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js"(exports,module){"use strict";var zlib=__require("zlib"),bufferUtil=require_buffer_util(),Limiter=require_limiter(),{kStatusCode}=require_constants(),FastBuffer=Buffer[Symbol.species],TRAILER=Buffer.from([0,0,255,255]),kPerMessageDeflate=Symbol("permessage-deflate"),kTotalLength=Symbol("total-length"),kCallback=Symbol("callback"),kBuffers=Symbol("buffers"),kError=Symbol("error"),zlibLimiter,PerMessageDeflate2=class{constructor(options){if(this._options=options||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!zlibLimiter){let concurrency=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;zlibLimiter=new Limiter(concurrency)}}static get extensionName(){return"permessage-deflate"}offer(){let params={};return this._options.serverNoContextTakeover&&(params.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(params.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(params.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?params.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(params.client_max_window_bits=!0),params}accept(configurations){return configurations=this.normalizeParams(configurations),this.params=this._isServer?this.acceptAsServer(configurations):this.acceptAsClient(configurations),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let callback=this._deflate[kCallback];this._deflate.close(),this._deflate=null,callback&&callback(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(offers){let opts=this._options,accepted=offers.find(params=>!(opts.serverNoContextTakeover===!1&&params.server_no_context_takeover||params.server_max_window_bits&&(opts.serverMaxWindowBits===!1||typeof opts.serverMaxWindowBits=="number"&&opts.serverMaxWindowBits>params.server_max_window_bits)||typeof opts.clientMaxWindowBits=="number"&&!params.client_max_window_bits));if(!accepted)throw new Error("None of the extension offers can be accepted");return opts.serverNoContextTakeover&&(accepted.server_no_context_takeover=!0),opts.clientNoContextTakeover&&(accepted.client_no_context_takeover=!0),typeof opts.serverMaxWindowBits=="number"&&(accepted.server_max_window_bits=opts.serverMaxWindowBits),typeof opts.clientMaxWindowBits=="number"?accepted.client_max_window_bits=opts.clientMaxWindowBits:(accepted.client_max_window_bits===!0||opts.clientMaxWindowBits===!1)&&delete accepted.client_max_window_bits,accepted}acceptAsClient(response){let params=response[0];if(this._options.clientNoContextTakeover===!1&&params.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!params.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(params.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&params.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return params}normalizeParams(configurations){return configurations.forEach(params=>{Object.keys(params).forEach(key=>{let value=params[key];if(value.length>1)throw new Error(`Parameter "${key}" must have only a single value`);if(value=value[0],key==="client_max_window_bits"){if(value!==!0){let num=+value;if(!Number.isInteger(num)||num<8||num>15)throw new TypeError(`Invalid value for parameter "${key}": ${value}`);value=num}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${key}": ${value}`)}else if(key==="server_max_window_bits"){let num=+value;if(!Number.isInteger(num)||num<8||num>15)throw new TypeError(`Invalid value for parameter "${key}": ${value}`);value=num}else if(key==="client_no_context_takeover"||key==="server_no_context_takeover"){if(value!==!0)throw new TypeError(`Invalid value for parameter "${key}": ${value}`)}else throw new Error(`Unknown parameter "${key}"`);params[key]=value})}),configurations}decompress(data,fin,callback){zlibLimiter.add(done=>{this._decompress(data,fin,(err,result)=>{done(),callback(err,result)})})}compress(data,fin,callback){zlibLimiter.add(done=>{this._compress(data,fin,(err,result)=>{done(),callback(err,result)})})}_decompress(data,fin,callback){let endpoint=this._isServer?"client":"server";if(!this._inflate){let key=`${endpoint}_max_window_bits`,windowBits=typeof this.params[key]!="number"?zlib.Z_DEFAULT_WINDOWBITS:this.params[key];this._inflate=zlib.createInflateRaw({...this._options.zlibInflateOptions,windowBits}),this._inflate[kPerMessageDeflate]=this,this._inflate[kTotalLength]=0,this._inflate[kBuffers]=[],this._inflate.on("error",inflateOnError),this._inflate.on("data",inflateOnData)}this._inflate[kCallback]=callback,this._inflate.write(data),fin&&this._inflate.write(TRAILER),this._inflate.flush(()=>{let err=this._inflate[kError];if(err){this._inflate.close(),this._inflate=null,callback(err);return}let data2=bufferUtil.concat(this._inflate[kBuffers],this._inflate[kTotalLength]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[kTotalLength]=0,this._inflate[kBuffers]=[],fin&&this.params[`${endpoint}_no_context_takeover`]&&this._inflate.reset()),callback(null,data2)})}_compress(data,fin,callback){let endpoint=this._isServer?"server":"client";if(!this._deflate){let key=`${endpoint}_max_window_bits`,windowBits=typeof this.params[key]!="number"?zlib.Z_DEFAULT_WINDOWBITS:this.params[key];this._deflate=zlib.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits}),this._deflate[kTotalLength]=0,this._deflate[kBuffers]=[],this._deflate.on("data",deflateOnData)}this._deflate[kCallback]=callback,this._deflate.write(data),this._deflate.flush(zlib.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let data2=bufferUtil.concat(this._deflate[kBuffers],this._deflate[kTotalLength]);fin&&(data2=new FastBuffer(data2.buffer,data2.byteOffset,data2.length-4)),this._deflate[kCallback]=null,this._deflate[kTotalLength]=0,this._deflate[kBuffers]=[],fin&&this.params[`${endpoint}_no_context_takeover`]&&this._deflate.reset(),callback(null,data2)})}};module.exports=PerMessageDeflate2;function deflateOnData(chunk){this[kBuffers].push(chunk),this[kTotalLength]+=chunk.length}function inflateOnData(chunk){if(this[kTotalLength]+=chunk.length,this[kPerMessageDeflate]._maxPayload<1||this[kTotalLength]<=this[kPerMessageDeflate]._maxPayload){this[kBuffers].push(chunk);return}this[kError]=new RangeError("Max payload size exceeded"),this[kError].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[kError][kStatusCode]=1009,this.removeListener("data",inflateOnData),this.reset()}function inflateOnError(err){if(this[kPerMessageDeflate]._inflate=null,this[kError]){this[kCallback](this[kError]);return}err[kStatusCode]=1007,this[kCallback](err)}}});var require_validation=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js"(exports,module){"use strict";var{isUtf8}=__require("buffer"),{hasBlob}=require_constants(),tokenChars=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function isValidStatusCode(code){return code>=1e3&&code<=1014&&code!==1004&&code!==1005&&code!==1006||code>=3e3&&code<=4999}function _isValidUTF8(buf){let len=buf.length,i2=0;for(;i2<len;)if(!(buf[i2]&128))i2++;else if((buf[i2]&224)===192){if(i2+1===len||(buf[i2+1]&192)!==128||(buf[i2]&254)===192)return!1;i2+=2}else if((buf[i2]&240)===224){if(i2+2>=len||(buf[i2+1]&192)!==128||(buf[i2+2]&192)!==128||buf[i2]===224&&(buf[i2+1]&224)===128||buf[i2]===237&&(buf[i2+1]&224)===160)return!1;i2+=3}else if((buf[i2]&248)===240){if(i2+3>=len||(buf[i2+1]&192)!==128||(buf[i2+2]&192)!==128||(buf[i2+3]&192)!==128||buf[i2]===240&&(buf[i2+1]&240)===128||buf[i2]===244&&buf[i2+1]>143||buf[i2]>244)return!1;i2+=4}else return!1;return!0}function isBlob(value){return hasBlob&&typeof value=="object"&&typeof value.arrayBuffer=="function"&&typeof value.type=="string"&&typeof value.stream=="function"&&(value[Symbol.toStringTag]==="Blob"||value[Symbol.toStringTag]==="File")}module.exports={isBlob,isValidStatusCode,isValidUTF8:_isValidUTF8,tokenChars};if(isUtf8)module.exports.isValidUTF8=function(buf){return buf.length<24?_isValidUTF8(buf):isUtf8(buf)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let isValidUTF8=__require("utf-8-validate");module.exports.isValidUTF8=function(buf){return buf.length<32?_isValidUTF8(buf):isValidUTF8(buf)}}catch{}}});var require_receiver=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js"(exports,module){"use strict";var{Writable}=__require("stream"),PerMessageDeflate2=require_permessage_deflate(),{BINARY_TYPES,EMPTY_BUFFER,kStatusCode,kWebSocket}=require_constants(),{concat,toArrayBuffer,unmask}=require_buffer_util(),{isValidStatusCode,isValidUTF8}=require_validation(),FastBuffer=Buffer[Symbol.species],GET_INFO=0,GET_PAYLOAD_LENGTH_16=1,GET_PAYLOAD_LENGTH_64=2,GET_MASK=3,GET_DATA=4,INFLATING=5,DEFER_EVENT=6,Receiver2=class extends Writable{constructor(options={}){super(),this._allowSynchronousEvents=options.allowSynchronousEvents!==void 0?options.allowSynchronousEvents:!0,this._binaryType=options.binaryType||BINARY_TYPES[0],this._extensions=options.extensions||{},this._isServer=!!options.isServer,this._maxBufferedChunks=options.maxBufferedChunks|0,this._maxFragments=options.maxFragments|0,this._maxPayload=options.maxPayload|0,this._skipUTF8Validation=!!options.skipUTF8Validation,this[kWebSocket]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=GET_INFO}_write(chunk,encoding,cb){if(this._opcode===8&&this._state==GET_INFO)return cb();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){cb(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=chunk.length,this._buffers.push(chunk),this.startLoop(cb)}consume(n2){if(this._bufferedBytes-=n2,n2===this._buffers[0].length)return this._buffers.shift();if(n2<this._buffers[0].length){let buf=this._buffers[0];return this._buffers[0]=new FastBuffer(buf.buffer,buf.byteOffset+n2,buf.length-n2),new FastBuffer(buf.buffer,buf.byteOffset,n2)}let dst=Buffer.allocUnsafe(n2);do{let buf=this._buffers[0],offset=dst.length-n2;n2>=buf.length?dst.set(this._buffers.shift(),offset):(dst.set(new Uint8Array(buf.buffer,buf.byteOffset,n2),offset),this._buffers[0]=new FastBuffer(buf.buffer,buf.byteOffset+n2,buf.length-n2)),n2-=buf.length}while(n2>0);return dst}startLoop(cb){this._loop=!0;do switch(this._state){case GET_INFO:this.getInfo(cb);break;case GET_PAYLOAD_LENGTH_16:this.getPayloadLength16(cb);break;case GET_PAYLOAD_LENGTH_64:this.getPayloadLength64(cb);break;case GET_MASK:this.getMask();break;case GET_DATA:this.getData(cb);break;case INFLATING:case DEFER_EVENT:this._loop=!1;return}while(this._loop);this._errored||cb()}getInfo(cb){if(this._bufferedBytes<2){this._loop=!1;return}let buf=this.consume(2);if(buf[0]&48){let error=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");cb(error);return}let compressed=(buf[0]&64)===64;if(compressed&&!this._extensions[PerMessageDeflate2.extensionName]){let error=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");cb(error);return}if(this._fin=(buf[0]&128)===128,this._opcode=buf[0]&15,this._payloadLength=buf[1]&127,this._opcode===0){if(compressed){let error=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");cb(error);return}if(!this._fragmented){let error=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");cb(error);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let error=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");cb(error);return}this._compressed=compressed}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let error=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");cb(error);return}if(compressed){let error=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");cb(error);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let error=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");cb(error);return}}else{let error=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");cb(error);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(buf[1]&128)===128,this._isServer){if(!this._masked){let error=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");cb(error);return}}else if(this._masked){let error=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");cb(error);return}this._payloadLength===126?this._state=GET_PAYLOAD_LENGTH_16:this._payloadLength===127?this._state=GET_PAYLOAD_LENGTH_64:this.haveLength(cb)}getPayloadLength16(cb){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(cb)}getPayloadLength64(cb){if(this._bufferedBytes<8){this._loop=!1;return}let buf=this.consume(8),num=buf.readUInt32BE(0);if(num>Math.pow(2,53-32)-1){let error=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");cb(error);return}this._payloadLength=num*Math.pow(2,32)+buf.readUInt32BE(4),this.haveLength(cb)}haveLength(cb){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let error=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");cb(error);return}this._masked?this._state=GET_MASK:this._state=GET_DATA}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=GET_DATA}getData(cb){let data=EMPTY_BUFFER;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}data=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&unmask(data,this._mask)}if(this._opcode>7){this.controlMessage(data,cb);return}if(this._compressed){this._state=INFLATING,this.decompress(data,cb);return}if(data.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let error=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");cb(error);return}this._messageLength=this._totalPayloadLength,this._fragments.push(data)}this.dataMessage(cb)}decompress(data,cb){this._extensions[PerMessageDeflate2.extensionName].decompress(data,this._fin,(err,buf)=>{if(err)return cb(err);if(buf.length){if(this._messageLength+=buf.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let error=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");cb(error);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let error=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");cb(error);return}this._fragments.push(buf)}this.dataMessage(cb),this._state===GET_INFO&&this.startLoop(cb)})}dataMessage(cb){if(!this._fin){this._state=GET_INFO;return}let messageLength=this._messageLength,fragments=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let data;this._binaryType==="nodebuffer"?data=concat(fragments,messageLength):this._binaryType==="arraybuffer"?data=toArrayBuffer(concat(fragments,messageLength)):this._binaryType==="blob"?data=new Blob(fragments):data=fragments,this._allowSynchronousEvents?(this.emit("message",data,!0),this._state=GET_INFO):(this._state=DEFER_EVENT,setImmediate(()=>{this.emit("message",data,!0),this._state=GET_INFO,this.startLoop(cb)}))}else{let buf=concat(fragments,messageLength);if(!this._skipUTF8Validation&&!isValidUTF8(buf)){let error=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");cb(error);return}this._state===INFLATING||this._allowSynchronousEvents?(this.emit("message",buf,!1),this._state=GET_INFO):(this._state=DEFER_EVENT,setImmediate(()=>{this.emit("message",buf,!1),this._state=GET_INFO,this.startLoop(cb)}))}}controlMessage(data,cb){if(this._opcode===8){if(data.length===0)this._loop=!1,this.emit("conclude",1005,EMPTY_BUFFER),this.end();else{let code=data.readUInt16BE(0);if(!isValidStatusCode(code)){let error=this.createError(RangeError,`invalid status code ${code}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");cb(error);return}let buf=new FastBuffer(data.buffer,data.byteOffset+2,data.length-2);if(!this._skipUTF8Validation&&!isValidUTF8(buf)){let error=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");cb(error);return}this._loop=!1,this.emit("conclude",code,buf),this.end()}this._state=GET_INFO;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",data),this._state=GET_INFO):(this._state=DEFER_EVENT,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",data),this._state=GET_INFO,this.startLoop(cb)}))}createError(ErrorCtor,message,prefix,statusCode,errorCode){this._loop=!1,this._errored=!0;let err=new ErrorCtor(prefix?`Invalid WebSocket frame: ${message}`:message);return Error.captureStackTrace(err,this.createError),err.code=errorCode,err[kStatusCode]=statusCode,err}};module.exports=Receiver2}});var require_sender=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js"(exports,module){"use strict";var{Duplex}=__require("stream"),{randomFillSync}=__require("crypto"),{types:{isUint8Array}}=__require("util"),PerMessageDeflate2=require_permessage_deflate(),{EMPTY_BUFFER,kWebSocket,NOOP}=require_constants(),{isBlob,isValidStatusCode}=require_validation(),{mask:applyMask,toBuffer}=require_buffer_util(),kByteLength=Symbol("kByteLength"),maskBuffer=Buffer.alloc(4),RANDOM_POOL_SIZE=8*1024,randomPool,randomPoolPointer=RANDOM_POOL_SIZE,DEFAULT=0,DEFLATING=1,GET_BLOB_DATA=2,Sender2=class _Sender{constructor(socket,extensions,generateMask){this._extensions=extensions||{},generateMask&&(this._generateMask=generateMask,this._maskBuffer=Buffer.alloc(4)),this._socket=socket,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=DEFAULT,this.onerror=NOOP,this[kWebSocket]=void 0}static frame(data,options){let mask,merge=!1,offset=2,skipMasking=!1;options.mask&&(mask=options.maskBuffer||maskBuffer,options.generateMask?options.generateMask(mask):(randomPoolPointer===RANDOM_POOL_SIZE&&(randomPool===void 0&&(randomPool=Buffer.alloc(RANDOM_POOL_SIZE)),randomFillSync(randomPool,0,RANDOM_POOL_SIZE),randomPoolPointer=0),mask[0]=randomPool[randomPoolPointer++],mask[1]=randomPool[randomPoolPointer++],mask[2]=randomPool[randomPoolPointer++],mask[3]=randomPool[randomPoolPointer++]),skipMasking=(mask[0]|mask[1]|mask[2]|mask[3])===0,offset=6);let dataLength;typeof data=="string"?(!options.mask||skipMasking)&&options[kByteLength]!==void 0?dataLength=options[kByteLength]:(data=Buffer.from(data),dataLength=data.length):(dataLength=data.length,merge=options.mask&&options.readOnly&&!skipMasking);let payloadLength=dataLength;dataLength>=65536?(offset+=8,payloadLength=127):dataLength>125&&(offset+=2,payloadLength=126);let target=Buffer.allocUnsafe(merge?dataLength+offset:offset);return target[0]=options.fin?options.opcode|128:options.opcode,options.rsv1&&(target[0]|=64),target[1]=payloadLength,payloadLength===126?target.writeUInt16BE(dataLength,2):payloadLength===127&&(target[2]=target[3]=0,target.writeUIntBE(dataLength,4,6)),options.mask?(target[1]|=128,target[offset-4]=mask[0],target[offset-3]=mask[1],target[offset-2]=mask[2],target[offset-1]=mask[3],skipMasking?[target,data]:merge?(applyMask(data,mask,target,offset,dataLength),[target]):(applyMask(data,mask,data,0,dataLength),[target,data])):[target,data]}close(code,data,mask,cb){let buf;if(code===void 0)buf=EMPTY_BUFFER;else{if(typeof code!="number"||!isValidStatusCode(code))throw new TypeError("First argument must be a valid error code number");if(data===void 0||!data.length)buf=Buffer.allocUnsafe(2),buf.writeUInt16BE(code,0);else{let length=Buffer.byteLength(data);if(length>123)throw new RangeError("The message must not be greater than 123 bytes");if(buf=Buffer.allocUnsafe(2+length),buf.writeUInt16BE(code,0),typeof data=="string")buf.write(data,2);else if(isUint8Array(data))buf.set(data,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let options={[kByteLength]:buf.length,fin:!0,generateMask:this._generateMask,mask,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==DEFAULT?this.enqueue([this.dispatch,buf,!1,options,cb]):this.sendFrame(_Sender.frame(buf,options),cb)}ping(data,mask,cb){let byteLength,readOnly;if(typeof data=="string"?(byteLength=Buffer.byteLength(data),readOnly=!1):isBlob(data)?(byteLength=data.size,readOnly=!1):(data=toBuffer(data),byteLength=data.length,readOnly=toBuffer.readOnly),byteLength>125)throw new RangeError("The data size must not be greater than 125 bytes");let options={[kByteLength]:byteLength,fin:!0,generateMask:this._generateMask,mask,maskBuffer:this._maskBuffer,opcode:9,readOnly,rsv1:!1};isBlob(data)?this._state!==DEFAULT?this.enqueue([this.getBlobData,data,!1,options,cb]):this.getBlobData(data,!1,options,cb):this._state!==DEFAULT?this.enqueue([this.dispatch,data,!1,options,cb]):this.sendFrame(_Sender.frame(data,options),cb)}pong(data,mask,cb){let byteLength,readOnly;if(typeof data=="string"?(byteLength=Buffer.byteLength(data),readOnly=!1):isBlob(data)?(byteLength=data.size,readOnly=!1):(data=toBuffer(data),byteLength=data.length,readOnly=toBuffer.readOnly),byteLength>125)throw new RangeError("The data size must not be greater than 125 bytes");let options={[kByteLength]:byteLength,fin:!0,generateMask:this._generateMask,mask,maskBuffer:this._maskBuffer,opcode:10,readOnly,rsv1:!1};isBlob(data)?this._state!==DEFAULT?this.enqueue([this.getBlobData,data,!1,options,cb]):this.getBlobData(data,!1,options,cb):this._state!==DEFAULT?this.enqueue([this.dispatch,data,!1,options,cb]):this.sendFrame(_Sender.frame(data,options),cb)}send(data,options,cb){let perMessageDeflate=this._extensions[PerMessageDeflate2.extensionName],opcode=options.binary?2:1,rsv1=options.compress,byteLength,readOnly;typeof data=="string"?(byteLength=Buffer.byteLength(data),readOnly=!1):isBlob(data)?(byteLength=data.size,readOnly=!1):(data=toBuffer(data),byteLength=data.length,readOnly=toBuffer.readOnly),this._firstFragment?(this._firstFragment=!1,rsv1&&perMessageDeflate&&perMessageDeflate.params[perMessageDeflate._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(rsv1=byteLength>=perMessageDeflate._threshold),this._compress=rsv1):(rsv1=!1,opcode=0),options.fin&&(this._firstFragment=!0);let opts={[kByteLength]:byteLength,fin:options.fin,generateMask:this._generateMask,mask:options.mask,maskBuffer:this._maskBuffer,opcode,readOnly,rsv1};isBlob(data)?this._state!==DEFAULT?this.enqueue([this.getBlobData,data,this._compress,opts,cb]):this.getBlobData(data,this._compress,opts,cb):this._state!==DEFAULT?this.enqueue([this.dispatch,data,this._compress,opts,cb]):this.dispatch(data,this._compress,opts,cb)}getBlobData(blob,compress,options,cb){this._bufferedBytes+=options[kByteLength],this._state=GET_BLOB_DATA,blob.arrayBuffer().then(arrayBuffer=>{if(this._socket.destroyed){let err=new Error("The socket was closed while the blob was being read");process.nextTick(callCallbacks,this,err,cb);return}this._bufferedBytes-=options[kByteLength];let data=toBuffer(arrayBuffer);compress?this.dispatch(data,compress,options,cb):(this._state=DEFAULT,this.sendFrame(_Sender.frame(data,options),cb),this.dequeue())}).catch(err=>{process.nextTick(onError,this,err,cb)})}dispatch(data,compress,options,cb){if(!compress){this.sendFrame(_Sender.frame(data,options),cb);return}let perMessageDeflate=this._extensions[PerMessageDeflate2.extensionName];this._bufferedBytes+=options[kByteLength],this._state=DEFLATING,perMessageDeflate.compress(data,options.fin,(_2,buf)=>{if(this._socket.destroyed){let err=new Error("The socket was closed while data was being compressed");callCallbacks(this,err,cb);return}this._bufferedBytes-=options[kByteLength],this._state=DEFAULT,options.readOnly=!1,this.sendFrame(_Sender.frame(buf,options),cb),this.dequeue()})}dequeue(){for(;this._state===DEFAULT&&this._queue.length;){let params=this._queue.shift();this._bufferedBytes-=params[3][kByteLength],Reflect.apply(params[0],this,params.slice(1))}}enqueue(params){this._bufferedBytes+=params[3][kByteLength],this._queue.push(params)}sendFrame(list,cb){list.length===2?(this._socket.cork(),this._socket.write(list[0]),this._socket.write(list[1],cb),this._socket.uncork()):this._socket.write(list[0],cb)}};module.exports=Sender2;function callCallbacks(sender,err,cb){typeof cb=="function"&&cb(err);for(let i2=0;i2<sender._queue.length;i2++){let params=sender._queue[i2],callback=params[params.length-1];typeof callback=="function"&&callback(err)}}function onError(sender,err,cb){callCallbacks(sender,err,cb),sender.onerror(err)}}});var require_event_target=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js"(exports,module){"use strict";var{kForOnEventAttribute,kListener}=require_constants(),kCode=Symbol("kCode"),kData=Symbol("kData"),kError=Symbol("kError"),kMessage=Symbol("kMessage"),kReason=Symbol("kReason"),kTarget=Symbol("kTarget"),kType=Symbol("kType"),kWasClean=Symbol("kWasClean"),Event=class{constructor(type){this[kTarget]=null,this[kType]=type}get target(){return this[kTarget]}get type(){return this[kType]}};Object.defineProperty(Event.prototype,"target",{enumerable:!0});Object.defineProperty(Event.prototype,"type",{enumerable:!0});var CloseEvent=class extends Event{constructor(type,options={}){super(type),this[kCode]=options.code===void 0?0:options.code,this[kReason]=options.reason===void 0?"":options.reason,this[kWasClean]=options.wasClean===void 0?!1:options.wasClean}get code(){return this[kCode]}get reason(){return this[kReason]}get wasClean(){return this[kWasClean]}};Object.defineProperty(CloseEvent.prototype,"code",{enumerable:!0});Object.defineProperty(CloseEvent.prototype,"reason",{enumerable:!0});Object.defineProperty(CloseEvent.prototype,"wasClean",{enumerable:!0});var ErrorEvent=class extends Event{constructor(type,options={}){super(type),this[kError]=options.error===void 0?null:options.error,this[kMessage]=options.message===void 0?"":options.message}get error(){return this[kError]}get message(){return this[kMessage]}};Object.defineProperty(ErrorEvent.prototype,"error",{enumerable:!0});Object.defineProperty(ErrorEvent.prototype,"message",{enumerable:!0});var MessageEvent=class extends Event{constructor(type,options={}){super(type),this[kData]=options.data===void 0?null:options.data}get data(){return this[kData]}};Object.defineProperty(MessageEvent.prototype,"data",{enumerable:!0});var EventTarget={addEventListener(type,handler,options={}){for(let listener of this.listeners(type))if(!options[kForOnEventAttribute]&&listener[kListener]===handler&&!listener[kForOnEventAttribute])return;let wrapper;if(type==="message")wrapper=function(data,isBinary){let event=new MessageEvent("message",{data:isBinary?data:data.toString()});event[kTarget]=this,callListener(handler,this,event)};else if(type==="close")wrapper=function(code,message){let event=new CloseEvent("close",{code,reason:message.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});event[kTarget]=this,callListener(handler,this,event)};else if(type==="error")wrapper=function(error){let event=new ErrorEvent("error",{error,message:error.message});event[kTarget]=this,callListener(handler,this,event)};else if(type==="open")wrapper=function(){let event=new Event("open");event[kTarget]=this,callListener(handler,this,event)};else return;wrapper[kForOnEventAttribute]=!!options[kForOnEventAttribute],wrapper[kListener]=handler,options.once?this.once(type,wrapper):this.on(type,wrapper)},removeEventListener(type,handler){for(let listener of this.listeners(type))if(listener[kListener]===handler&&!listener[kForOnEventAttribute]){this.removeListener(type,listener);break}}};module.exports={CloseEvent,ErrorEvent,Event,EventTarget,MessageEvent};function callListener(listener,thisArg,event){typeof listener=="object"&&listener.handleEvent?listener.handleEvent.call(listener,event):listener.call(thisArg,event)}}});var require_extension=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js"(exports,module){"use strict";var{tokenChars}=require_validation();function push(dest,name,elem){dest[name]===void 0?dest[name]=[elem]:dest[name].push(elem)}function parse(header){let offers=Object.create(null),params=Object.create(null),mustUnescape=!1,isEscaping=!1,inQuotes=!1,extensionName,paramName,start=-1,code=-1,end=-1,i2=0;for(;i2<header.length;i2++)if(code=header.charCodeAt(i2),extensionName===void 0)if(end===-1&&tokenChars[code]===1)start===-1&&(start=i2);else if(i2!==0&&(code===32||code===9))end===-1&&start!==-1&&(end=i2);else if(code===59||code===44){if(start===-1)throw new SyntaxError(`Unexpected character at index ${i2}`);end===-1&&(end=i2);let name=header.slice(start,end);code===44?(push(offers,name,params),params=Object.create(null)):extensionName=name,start=end=-1}else throw new SyntaxError(`Unexpected character at index ${i2}`);else if(paramName===void 0)if(end===-1&&tokenChars[code]===1)start===-1&&(start=i2);else if(code===32||code===9)end===-1&&start!==-1&&(end=i2);else if(code===59||code===44){if(start===-1)throw new SyntaxError(`Unexpected character at index ${i2}`);end===-1&&(end=i2),push(params,header.slice(start,end),!0),code===44&&(push(offers,extensionName,params),params=Object.create(null),extensionName=void 0),start=end=-1}else if(code===61&&start!==-1&&end===-1)paramName=header.slice(start,i2),start=end=-1;else throw new SyntaxError(`Unexpected character at index ${i2}`);else if(isEscaping){if(tokenChars[code]!==1)throw new SyntaxError(`Unexpected character at index ${i2}`);start===-1?start=i2:mustUnescape||(mustUnescape=!0),isEscaping=!1}else if(inQuotes)if(tokenChars[code]===1)start===-1&&(start=i2);else if(code===34&&start!==-1)inQuotes=!1,end=i2;else if(code===92)isEscaping=!0;else throw new SyntaxError(`Unexpected character at index ${i2}`);else if(code===34&&header.charCodeAt(i2-1)===61)inQuotes=!0;else if(end===-1&&tokenChars[code]===1)start===-1&&(start=i2);else if(start!==-1&&(code===32||code===9))end===-1&&(end=i2);else if(code===59||code===44){if(start===-1)throw new SyntaxError(`Unexpected character at index ${i2}`);end===-1&&(end=i2);let value=header.slice(start,end);mustUnescape&&(value=value.replace(/\\/g,""),mustUnescape=!1),push(params,paramName,value),code===44&&(push(offers,extensionName,params),params=Object.create(null),extensionName=void 0),paramName=void 0,start=end=-1}else throw new SyntaxError(`Unexpected character at index ${i2}`);if(start===-1||inQuotes||code===32||code===9)throw new SyntaxError("Unexpected end of input");end===-1&&(end=i2);let token=header.slice(start,end);return extensionName===void 0?push(offers,token,params):(paramName===void 0?push(params,token,!0):mustUnescape?push(params,paramName,token.replace(/\\/g,"")):push(params,paramName,token),push(offers,extensionName,params)),offers}function format(extensions){return Object.keys(extensions).map(extension2=>{let configurations=extensions[extension2];return Array.isArray(configurations)||(configurations=[configurations]),configurations.map(params=>[extension2].concat(Object.keys(params).map(k2=>{let values=params[k2];return Array.isArray(values)||(values=[values]),values.map(v2=>v2===!0?k2:`${k2}=${v2}`).join("; ")})).join("; ")).join(", ")}).join(", ")}module.exports={format,parse}}});var require_websocket=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js"(exports,module){"use strict";var EventEmitter=__require("events"),https=__require("https"),http=__require("http"),net=__require("net"),tls=__require("tls"),{randomBytes,createHash}=__require("crypto"),{Duplex,Readable}=__require("stream"),{URL:URL2}=__require("url"),PerMessageDeflate2=require_permessage_deflate(),Receiver2=require_receiver(),Sender2=require_sender(),{isBlob}=require_validation(),{BINARY_TYPES,CLOSE_TIMEOUT,EMPTY_BUFFER,GUID,kForOnEventAttribute,kListener,kStatusCode,kWebSocket,NOOP}=require_constants(),{EventTarget:{addEventListener,removeEventListener}}=require_event_target(),{format,parse}=require_extension(),{toBuffer}=require_buffer_util(),kAborted=Symbol("kAborted"),protocolVersions=[8,13],readyStates=["CONNECTING","OPEN","CLOSING","CLOSED"],subprotocolRegex=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,WebSocket2=class _WebSocket extends EventEmitter{constructor(address,protocols,options){super(),this._binaryType=BINARY_TYPES[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=EMPTY_BUFFER,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=_WebSocket.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,address!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,protocols===void 0?protocols=[]:Array.isArray(protocols)||(typeof protocols=="object"&&protocols!==null?(options=protocols,protocols=[]):protocols=[protocols]),initAsClient(this,address,protocols,options)):(this._autoPong=options.autoPong,this._closeTimeout=options.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(type){BINARY_TYPES.includes(type)&&(this._binaryType=type,this._receiver&&(this._receiver._binaryType=type))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(socket,head,options){let receiver=new Receiver2({allowSynchronousEvents:options.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:options.maxBufferedChunks,maxFragments:options.maxFragments,maxPayload:options.maxPayload,skipUTF8Validation:options.skipUTF8Validation}),sender=new Sender2(socket,this._extensions,options.generateMask);this._receiver=receiver,this._sender=sender,this._socket=socket,receiver[kWebSocket]=this,sender[kWebSocket]=this,socket[kWebSocket]=this,receiver.on("conclude",receiverOnConclude),receiver.on("drain",receiverOnDrain),receiver.on("error",receiverOnError),receiver.on("message",receiverOnMessage),receiver.on("ping",receiverOnPing),receiver.on("pong",receiverOnPong),sender.onerror=senderOnError,socket.setTimeout&&socket.setTimeout(0),socket.setNoDelay&&socket.setNoDelay(),head.length>0&&socket.unshift(head),socket.on("close",socketOnClose),socket.on("data",socketOnData),socket.on("end",socketOnEnd),socket.on("error",socketOnError),this._readyState=_WebSocket.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=_WebSocket.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[PerMessageDeflate2.extensionName]&&this._extensions[PerMessageDeflate2.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=_WebSocket.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(code,data){if(this.readyState!==_WebSocket.CLOSED){if(this.readyState===_WebSocket.CONNECTING){let msg="WebSocket was closed before the connection was established";abortHandshake(this,this._req,msg);return}if(this.readyState===_WebSocket.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=_WebSocket.CLOSING,this._sender.close(code,data,!this._isServer,err=>{err||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),setCloseTimer(this)}}pause(){this.readyState===_WebSocket.CONNECTING||this.readyState===_WebSocket.CLOSED||(this._paused=!0,this._socket.pause())}ping(data,mask,cb){if(this.readyState===_WebSocket.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof data=="function"?(cb=data,data=mask=void 0):typeof mask=="function"&&(cb=mask,mask=void 0),typeof data=="number"&&(data=data.toString()),this.readyState!==_WebSocket.OPEN){sendAfterClose(this,data,cb);return}mask===void 0&&(mask=!this._isServer),this._sender.ping(data||EMPTY_BUFFER,mask,cb)}pong(data,mask,cb){if(this.readyState===_WebSocket.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof data=="function"?(cb=data,data=mask=void 0):typeof mask=="function"&&(cb=mask,mask=void 0),typeof data=="number"&&(data=data.toString()),this.readyState!==_WebSocket.OPEN){sendAfterClose(this,data,cb);return}mask===void 0&&(mask=!this._isServer),this._sender.pong(data||EMPTY_BUFFER,mask,cb)}resume(){this.readyState===_WebSocket.CONNECTING||this.readyState===_WebSocket.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(data,options,cb){if(this.readyState===_WebSocket.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof options=="function"&&(cb=options,options={}),typeof data=="number"&&(data=data.toString()),this.readyState!==_WebSocket.OPEN){sendAfterClose(this,data,cb);return}let opts={binary:typeof data!="string",mask:!this._isServer,compress:!0,fin:!0,...options};this._extensions[PerMessageDeflate2.extensionName]||(opts.compress=!1),this._sender.send(data||EMPTY_BUFFER,opts,cb)}terminate(){if(this.readyState!==_WebSocket.CLOSED){if(this.readyState===_WebSocket.CONNECTING){let msg="WebSocket was closed before the connection was established";abortHandshake(this,this._req,msg);return}this._socket&&(this._readyState=_WebSocket.CLOSING,this._socket.destroy())}}};Object.defineProperty(WebSocket2,"CONNECTING",{enumerable:!0,value:readyStates.indexOf("CONNECTING")});Object.defineProperty(WebSocket2.prototype,"CONNECTING",{enumerable:!0,value:readyStates.indexOf("CONNECTING")});Object.defineProperty(WebSocket2,"OPEN",{enumerable:!0,value:readyStates.indexOf("OPEN")});Object.defineProperty(WebSocket2.prototype,"OPEN",{enumerable:!0,value:readyStates.indexOf("OPEN")});Object.defineProperty(WebSocket2,"CLOSING",{enumerable:!0,value:readyStates.indexOf("CLOSING")});Object.defineProperty(WebSocket2.prototype,"CLOSING",{enumerable:!0,value:readyStates.indexOf("CLOSING")});Object.defineProperty(WebSocket2,"CLOSED",{enumerable:!0,value:readyStates.indexOf("CLOSED")});Object.defineProperty(WebSocket2.prototype,"CLOSED",{enumerable:!0,value:readyStates.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(property=>{Object.defineProperty(WebSocket2.prototype,property,{enumerable:!0})});["open","error","close","message"].forEach(method=>{Object.defineProperty(WebSocket2.prototype,`on${method}`,{enumerable:!0,get(){for(let listener of this.listeners(method))if(listener[kForOnEventAttribute])return listener[kListener];return null},set(handler){for(let listener of this.listeners(method))if(listener[kForOnEventAttribute]){this.removeListener(method,listener);break}typeof handler=="function"&&this.addEventListener(method,handler,{[kForOnEventAttribute]:!0})}})});WebSocket2.prototype.addEventListener=addEventListener;WebSocket2.prototype.removeEventListener=removeEventListener;module.exports=WebSocket2;function initAsClient(websocket,address,protocols,options){let opts={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:CLOSE_TIMEOUT,protocolVersion:protocolVersions[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...options,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(websocket._autoPong=opts.autoPong,websocket._closeTimeout=opts.closeTimeout,!protocolVersions.includes(opts.protocolVersion))throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`);let parsedUrl;if(address instanceof URL2)parsedUrl=address;else try{parsedUrl=new URL2(address)}catch{throw new SyntaxError(`Invalid URL: ${address}`)}parsedUrl.protocol==="http:"?parsedUrl.protocol="ws:":parsedUrl.protocol==="https:"&&(parsedUrl.protocol="wss:"),websocket._url=parsedUrl.href;let isSecure=parsedUrl.protocol==="wss:",isIpcUrl=parsedUrl.protocol==="ws+unix:",invalidUrlMessage;if(parsedUrl.protocol!=="ws:"&&!isSecure&&!isIpcUrl?invalidUrlMessage=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:isIpcUrl&&!parsedUrl.pathname?invalidUrlMessage="The URL's pathname is empty":parsedUrl.hash&&(invalidUrlMessage="The URL contains a fragment identifier"),invalidUrlMessage){let err=new SyntaxError(invalidUrlMessage);if(websocket._redirects===0)throw err;emitErrorAndClose(websocket,err);return}let defaultPort=isSecure?443:80,key=randomBytes(16).toString("base64"),request=isSecure?https.request:http.request,protocolSet=new Set,perMessageDeflate;if(opts.createConnection=opts.createConnection||(isSecure?tlsConnect:netConnect),opts.defaultPort=opts.defaultPort||defaultPort,opts.port=parsedUrl.port||defaultPort,opts.host=parsedUrl.hostname.startsWith("[")?parsedUrl.hostname.slice(1,-1):parsedUrl.hostname,opts.headers={...opts.headers,"Sec-WebSocket-Version":opts.protocolVersion,"Sec-WebSocket-Key":key,Connection:"Upgrade",Upgrade:"websocket"},opts.path=parsedUrl.pathname+parsedUrl.search,opts.timeout=opts.handshakeTimeout,opts.perMessageDeflate&&(perMessageDeflate=new PerMessageDeflate2({...opts.perMessageDeflate,isServer:!1,maxPayload:opts.maxPayload}),opts.headers["Sec-WebSocket-Extensions"]=format({[PerMessageDeflate2.extensionName]:perMessageDeflate.offer()})),protocols.length){for(let protocol of protocols){if(typeof protocol!="string"||!subprotocolRegex.test(protocol)||protocolSet.has(protocol))throw new SyntaxError("An invalid or duplicated subprotocol was specified");protocolSet.add(protocol)}opts.headers["Sec-WebSocket-Protocol"]=protocols.join(",")}if(opts.origin&&(opts.protocolVersion<13?opts.headers["Sec-WebSocket-Origin"]=opts.origin:opts.headers.Origin=opts.origin),(parsedUrl.username||parsedUrl.password)&&(opts.auth=`${parsedUrl.username}:${parsedUrl.password}`),isIpcUrl){let parts=opts.path.split(":");opts.socketPath=parts[0],opts.path=parts[1]}let req;if(opts.followRedirects){if(websocket._redirects===0){websocket._originalIpc=isIpcUrl,websocket._originalSecure=isSecure,websocket._originalHostOrSocketPath=isIpcUrl?opts.socketPath:parsedUrl.host;let headers=options&&options.headers;if(options={...options,headers:{}},headers)for(let[key2,value]of Object.entries(headers))options.headers[key2.toLowerCase()]=value}else if(websocket.listenerCount("redirect")===0){let isSameHost=isIpcUrl?websocket._originalIpc?opts.socketPath===websocket._originalHostOrSocketPath:!1:websocket._originalIpc?!1:parsedUrl.host===websocket._originalHostOrSocketPath;(!isSameHost||websocket._originalSecure&&!isSecure)&&(delete opts.headers.authorization,delete opts.headers.cookie,isSameHost||delete opts.headers.host,opts.auth=void 0)}opts.auth&&!options.headers.authorization&&(options.headers.authorization="Basic "+Buffer.from(opts.auth).toString("base64")),req=websocket._req=request(opts),websocket._redirects&&websocket.emit("redirect",websocket.url,req)}else req=websocket._req=request(opts);opts.timeout&&req.on("timeout",()=>{abortHandshake(websocket,req,"Opening handshake has timed out")}),req.on("error",err=>{req===null||req[kAborted]||(req=websocket._req=null,emitErrorAndClose(websocket,err))}),req.on("response",res=>{let location=res.headers.location,statusCode=res.statusCode;if(location&&opts.followRedirects&&statusCode>=300&&statusCode<400){if(++websocket._redirects>opts.maxRedirects){abortHandshake(websocket,req,"Maximum redirects exceeded");return}req.abort();let addr;try{addr=new URL2(location,address)}catch{let err=new SyntaxError(`Invalid URL: ${location}`);emitErrorAndClose(websocket,err);return}initAsClient(websocket,addr,protocols,options)}else websocket.emit("unexpected-response",req,res)||abortHandshake(websocket,req,`Unexpected server response: ${res.statusCode}`)}),req.on("upgrade",(res,socket,head)=>{if(websocket.emit("upgrade",res),websocket.readyState!==WebSocket2.CONNECTING)return;req=websocket._req=null;let upgrade=res.headers.upgrade;if(upgrade===void 0||upgrade.toLowerCase()!=="websocket"){abortHandshake(websocket,socket,"Invalid Upgrade header");return}let digest=createHash("sha1").update(key+GUID).digest("base64");if(res.headers["sec-websocket-accept"]!==digest){abortHandshake(websocket,socket,"Invalid Sec-WebSocket-Accept header");return}let serverProt=res.headers["sec-websocket-protocol"],protError;if(serverProt!==void 0?protocolSet.size?protocolSet.has(serverProt)||(protError="Server sent an invalid subprotocol"):protError="Server sent a subprotocol but none was requested":protocolSet.size&&(protError="Server sent no subprotocol"),protError){abortHandshake(websocket,socket,protError);return}serverProt&&(websocket._protocol=serverProt);let secWebSocketExtensions=res.headers["sec-websocket-extensions"];if(secWebSocketExtensions!==void 0){if(!perMessageDeflate){abortHandshake(websocket,socket,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let extensions;try{extensions=parse(secWebSocketExtensions)}catch{abortHandshake(websocket,socket,"Invalid Sec-WebSocket-Extensions header");return}let extensionNames=Object.keys(extensions);if(extensionNames.length!==1||extensionNames[0]!==PerMessageDeflate2.extensionName){abortHandshake(websocket,socket,"Server indicated an extension that was not requested");return}try{perMessageDeflate.accept(extensions[PerMessageDeflate2.extensionName])}catch{abortHandshake(websocket,socket,"Invalid Sec-WebSocket-Extensions header");return}websocket._extensions[PerMessageDeflate2.extensionName]=perMessageDeflate}websocket.setSocket(socket,head,{allowSynchronousEvents:opts.allowSynchronousEvents,generateMask:opts.generateMask,maxBufferedChunks:opts.maxBufferedChunks,maxFragments:opts.maxFragments,maxPayload:opts.maxPayload,skipUTF8Validation:opts.skipUTF8Validation})}),opts.finishRequest?opts.finishRequest(req,websocket):req.end()}function emitErrorAndClose(websocket,err){websocket._readyState=WebSocket2.CLOSING,websocket._errorEmitted=!0,websocket.emit("error",err),websocket.emitClose()}function netConnect(options){return options.path=options.socketPath,net.connect(options)}function tlsConnect(options){return options.path=void 0,!options.servername&&options.servername!==""&&(options.servername=net.isIP(options.host)?"":options.host),tls.connect(options)}function abortHandshake(websocket,stream,message){websocket._readyState=WebSocket2.CLOSING;let err=new Error(message);Error.captureStackTrace(err,abortHandshake),stream.setHeader?(stream[kAborted]=!0,stream.abort(),stream.socket&&!stream.socket.destroyed&&stream.socket.destroy(),process.nextTick(emitErrorAndClose,websocket,err)):(stream.destroy(err),stream.once("error",websocket.emit.bind(websocket,"error")),stream.once("close",websocket.emitClose.bind(websocket)))}function sendAfterClose(websocket,data,cb){if(data){let length=isBlob(data)?data.size:toBuffer(data).length;websocket._socket?websocket._sender._bufferedBytes+=length:websocket._bufferedAmount+=length}if(cb){let err=new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);process.nextTick(cb,err)}}function receiverOnConclude(code,reason){let websocket=this[kWebSocket];websocket._closeFrameReceived=!0,websocket._closeMessage=reason,websocket._closeCode=code,websocket._socket[kWebSocket]!==void 0&&(websocket._socket.removeListener("data",socketOnData),process.nextTick(resume,websocket._socket),code===1005?websocket.close():websocket.close(code,reason))}function receiverOnDrain(){let websocket=this[kWebSocket];websocket.isPaused||websocket._socket.resume()}function receiverOnError(err){let websocket=this[kWebSocket];websocket._socket[kWebSocket]!==void 0&&(websocket._socket.removeListener("data",socketOnData),process.nextTick(resume,websocket._socket),websocket.close(err[kStatusCode])),websocket._errorEmitted||(websocket._errorEmitted=!0,websocket.emit("error",err))}function receiverOnFinish(){this[kWebSocket].emitClose()}function receiverOnMessage(data,isBinary){this[kWebSocket].emit("message",data,isBinary)}function receiverOnPing(data){let websocket=this[kWebSocket];websocket._autoPong&&websocket.pong(data,!this._isServer,NOOP),websocket.emit("ping",data)}function receiverOnPong(data){this[kWebSocket].emit("pong",data)}function resume(stream){stream.resume()}function senderOnError(err){let websocket=this[kWebSocket];websocket.readyState!==WebSocket2.CLOSED&&(websocket.readyState===WebSocket2.OPEN&&(websocket._readyState=WebSocket2.CLOSING,setCloseTimer(websocket)),this._socket.end(),websocket._errorEmitted||(websocket._errorEmitted=!0,websocket.emit("error",err)))}function setCloseTimer(websocket){websocket._closeTimer=setTimeout(websocket._socket.destroy.bind(websocket._socket),websocket._closeTimeout)}function socketOnClose(){let websocket=this[kWebSocket];if(this.removeListener("close",socketOnClose),this.removeListener("data",socketOnData),this.removeListener("end",socketOnEnd),websocket._readyState=WebSocket2.CLOSING,!this._readableState.endEmitted&&!websocket._closeFrameReceived&&!websocket._receiver._writableState.errorEmitted&&this._readableState.length!==0){let chunk=this.read(this._readableState.length);websocket._receiver.write(chunk)}websocket._receiver.end(),this[kWebSocket]=void 0,clearTimeout(websocket._closeTimer),websocket._receiver._writableState.finished||websocket._receiver._writableState.errorEmitted?websocket.emitClose():(websocket._receiver.on("error",receiverOnFinish),websocket._receiver.on("finish",receiverOnFinish))}function socketOnData(chunk){this[kWebSocket]._receiver.write(chunk)||this.pause()}function socketOnEnd(){let websocket=this[kWebSocket];websocket._readyState=WebSocket2.CLOSING,websocket._receiver.end(),this.end()}function socketOnError(){let websocket=this[kWebSocket];this.removeListener("error",socketOnError),this.on("error",NOOP),websocket&&(websocket._readyState=WebSocket2.CLOSING,this.destroy())}}});var require_stream=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js"(exports,module){"use strict";var WebSocket2=require_websocket(),{Duplex}=__require("stream");function emitClose(stream){stream.emit("close")}function duplexOnEnd(){!this.destroyed&&this._writableState.finished&&this.destroy()}function duplexOnError(err){this.removeListener("error",duplexOnError),this.destroy(),this.listenerCount("error")===0&&this.emit("error",err)}function createWebSocketStream2(ws,options){let terminateOnDestroy=!0,duplex=new Duplex({...options,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return ws.on("message",function(msg,isBinary){let data=!isBinary&&duplex._readableState.objectMode?msg.toString():msg;duplex.push(data)||ws.pause()}),ws.once("error",function(err){duplex.destroyed||(terminateOnDestroy=!1,duplex.destroy(err))}),ws.once("close",function(){duplex.destroyed||duplex.push(null)}),duplex._destroy=function(err,callback){if(ws.readyState===ws.CLOSED){callback(err),process.nextTick(emitClose,duplex);return}let called=!1;ws.once("error",function(err2){called=!0,callback(err2)}),ws.once("close",function(){called||callback(err),process.nextTick(emitClose,duplex)}),terminateOnDestroy&&ws.terminate()},duplex._final=function(callback){if(ws.readyState===ws.CONNECTING){ws.once("open",function(){duplex._final(callback)});return}ws._socket!==null&&(ws._socket._writableState.finished?(callback(),duplex._readableState.endEmitted&&duplex.destroy()):(ws._socket.once("finish",function(){callback()}),ws.close()))},duplex._read=function(){ws.isPaused&&ws.resume()},duplex._write=function(chunk,encoding,callback){if(ws.readyState===ws.CONNECTING){ws.once("open",function(){duplex._write(chunk,encoding,callback)});return}ws.send(chunk,callback)},duplex.on("end",duplexOnEnd),duplex.on("error",duplexOnError),duplex}module.exports=createWebSocketStream2}});var require_subprotocol=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"(exports,module){"use strict";var{tokenChars}=require_validation();function parse(header){let protocols=new Set,start=-1,end=-1,i2=0;for(i2;i2<header.length;i2++){let code=header.charCodeAt(i2);if(end===-1&&tokenChars[code]===1)start===-1&&(start=i2);else if(i2!==0&&(code===32||code===9))end===-1&&start!==-1&&(end=i2);else if(code===44){if(start===-1)throw new SyntaxError(`Unexpected character at index ${i2}`);end===-1&&(end=i2);let protocol2=header.slice(start,end);if(protocols.has(protocol2))throw new SyntaxError(`The "${protocol2}" subprotocol is duplicated`);protocols.add(protocol2),start=end=-1}else throw new SyntaxError(`Unexpected character at index ${i2}`)}if(start===-1||end!==-1)throw new SyntaxError("Unexpected end of input");let protocol=header.slice(start,i2);if(protocols.has(protocol))throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);return protocols.add(protocol),protocols}module.exports={parse}}});var require_websocket_server=__commonJS({"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js"(exports,module){"use strict";var EventEmitter=__require("events"),http=__require("http"),{Duplex}=__require("stream"),{createHash}=__require("crypto"),extension2=require_extension(),PerMessageDeflate2=require_permessage_deflate(),subprotocol2=require_subprotocol(),WebSocket2=require_websocket(),{CLOSE_TIMEOUT,GUID,kWebSocket}=require_constants(),keyRegex=/^[+/0-9A-Za-z]{22}==$/,RUNNING=0,CLOSING=1,CLOSED=2,WebSocketServer2=class extends EventEmitter{constructor(options,callback){if(super(),options={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:CLOSE_TIMEOUT,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:WebSocket2,...options},options.port==null&&!options.server&&!options.noServer||options.port!=null&&(options.server||options.noServer)||options.server&&options.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(options.port!=null?(this._server=http.createServer((req,res)=>{let body=http.STATUS_CODES[426];res.writeHead(426,{"Content-Length":body.length,"Content-Type":"text/plain"}),res.end(body)}),this._server.listen(options.port,options.host,options.backlog,callback)):options.server&&(this._server=options.server),this._server){let emitConnection=this.emit.bind(this,"connection");this._removeListeners=addListeners(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(req,socket,head)=>{this.handleUpgrade(req,socket,head,emitConnection)}})}options.perMessageDeflate===!0&&(options.perMessageDeflate={}),options.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=options,this._state=RUNNING}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(cb){if(this._state===CLOSED){cb&&this.once("close",()=>{cb(new Error("The server is not running"))}),process.nextTick(emitClose,this);return}if(cb&&this.once("close",cb),this._state!==CLOSING)if(this._state=CLOSING,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(emitClose,this):process.nextTick(emitClose,this);else{let server=this._server;this._removeListeners(),this._removeListeners=this._server=null,server.close(()=>{emitClose(this)})}}shouldHandle(req){if(this.options.path){let index=req.url.indexOf("?");if((index!==-1?req.url.slice(0,index):req.url)!==this.options.path)return!1}return!0}handleUpgrade(req,socket,head,cb){socket.on("error",socketOnError);let key=req.headers["sec-websocket-key"],upgrade=req.headers.upgrade,version=+req.headers["sec-websocket-version"];if(req.method!=="GET"){abortHandshakeOrEmitwsClientError(this,req,socket,405,"Invalid HTTP method");return}if(upgrade===void 0||upgrade.toLowerCase()!=="websocket"){abortHandshakeOrEmitwsClientError(this,req,socket,400,"Invalid Upgrade header");return}if(key===void 0||!keyRegex.test(key)){abortHandshakeOrEmitwsClientError(this,req,socket,400,"Missing or invalid Sec-WebSocket-Key header");return}if(version!==13&&version!==8){abortHandshakeOrEmitwsClientError(this,req,socket,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(req)){abortHandshake(socket,400);return}let secWebSocketProtocol=req.headers["sec-websocket-protocol"],protocols=new Set;if(secWebSocketProtocol!==void 0)try{protocols=subprotocol2.parse(secWebSocketProtocol)}catch{abortHandshakeOrEmitwsClientError(this,req,socket,400,"Invalid Sec-WebSocket-Protocol header");return}let secWebSocketExtensions=req.headers["sec-websocket-extensions"],extensions={};if(this.options.perMessageDeflate&&secWebSocketExtensions!==void 0){let perMessageDeflate=new PerMessageDeflate2({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let offers=extension2.parse(secWebSocketExtensions);offers[PerMessageDeflate2.extensionName]&&(perMessageDeflate.accept(offers[PerMessageDeflate2.extensionName]),extensions[PerMessageDeflate2.extensionName]=perMessageDeflate)}catch{abortHandshakeOrEmitwsClientError(this,req,socket,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let info={origin:req.headers[`${version===8?"sec-websocket-origin":"origin"}`],secure:!!(req.socket.authorized||req.socket.encrypted),req};if(this.options.verifyClient.length===2){this.options.verifyClient(info,(verified,code,message,headers)=>{if(!verified)return abortHandshake(socket,code||401,message,headers);this.completeUpgrade(extensions,key,protocols,req,socket,head,cb)});return}if(!this.options.verifyClient(info))return abortHandshake(socket,401)}this.completeUpgrade(extensions,key,protocols,req,socket,head,cb)}completeUpgrade(extensions,key,protocols,req,socket,head,cb){if(!socket.readable||!socket.writable)return socket.destroy();if(socket[kWebSocket])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>RUNNING)return abortHandshake(socket,503);let headers=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${createHash("sha1").update(key+GUID).digest("base64")}`],ws=new this.options.WebSocket(null,void 0,this.options);if(protocols.size){let protocol=this.options.handleProtocols?this.options.handleProtocols(protocols,req):protocols.values().next().value;protocol&&(headers.push(`Sec-WebSocket-Protocol: ${protocol}`),ws._protocol=protocol)}if(extensions[PerMessageDeflate2.extensionName]){let params=extensions[PerMessageDeflate2.extensionName].params,value=extension2.format({[PerMessageDeflate2.extensionName]:[params]});headers.push(`Sec-WebSocket-Extensions: ${value}`),ws._extensions=extensions}this.emit("headers",headers,req),socket.write(headers.concat(`\r
8
+ `).join(`\r
9
+ `)),socket.removeListener("error",socketOnError),ws.setSocket(socket,head,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(ws),ws.on("close",()=>{this.clients.delete(ws),this._shouldEmitClose&&!this.clients.size&&process.nextTick(emitClose,this)})),cb(ws,req)}};module.exports=WebSocketServer2;function addListeners(server,map){for(let event of Object.keys(map))server.on(event,map[event]);return function(){for(let event of Object.keys(map))server.removeListener(event,map[event])}}function emitClose(server){server._state=CLOSED,server.emit("close")}function socketOnError(){this.destroy()}function abortHandshake(socket,code,message,headers){message=message||http.STATUS_CODES[code],headers={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(message),...headers},socket.once("finish",socket.destroy),socket.end(`HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r
10
+ `+Object.keys(headers).map(h=>`${h}: ${headers[h]}`).join(`\r
11
+ `)+`\r
12
+ \r
13
+ `+message)}function abortHandshakeOrEmitwsClientError(server,req,socket,code,message,headers){if(server.listenerCount("wsClientError")){let err=new Error(message);Error.captureStackTrace(err,abortHandshakeOrEmitwsClientError),server.emit("wsClientError",err,socket,req)}else abortHandshake(socket,code,message,headers)}}});var import_async_retry=__toESM(require_lib(),1);import{isatty as g}from"node:tty";import _ from"debug";var import_stream=__toESM(require_stream(),1),import_extension=__toESM(require_extension(),1),import_permessage_deflate=__toESM(require_permessage_deflate(),1),import_receiver=__toESM(require_receiver(),1),import_sender=__toESM(require_sender(),1),import_subprotocol=__toESM(require_subprotocol(),1),import_websocket=__toESM(require_websocket(),1),import_websocket_server=__toESM(require_websocket_server(),1);import{setTimeout as b}from"node:timers/promises";var x=d(o2()),S=_("sandbox:timeout"),C=(0,x.default)("10 seconds");async function w(e2,t2){let n2=e2.currentSession(),r2=n2.timeout;if(r2==null)return;let i2=n2.createdAt.getTime()+r2;for(S(`next tick: ${new Date(i2).toISOString()}`);!t2.aborted;){let r3=n2.timeout;if(r3==null)return;let i3=n2.createdAt.getTime()+r3-Date.now()-C;i3>2e3&&(S(`sleeping for ${i3}ms until next timeout extension`),await b(i3,null,{signal:t2})),await e2.extendTimeout((0,x.default)("5 minutes"));let a3=n2.timeout;if(a3==null)return;let o3=n2.createdAt.getTime()+a3;S(`extended sandbox timeout by 5 minutes. next tick: ${new Date(o3).toISOString()}`)}}Z();var T=_("sandbox:interactive-shell");async function E(e2){try{var n2=i();let r2=!1,i2=()=>{if(!r2){process.stdin.removeAllListeners();try{process.stdin.setRawMode(!1),process.stdin.pause(),process.stdin.unref()}catch{}r2=!0}};process.once("beforeExit",i2),n2.u(n(i2));let a3=n2.u(t(()=>Q({discardStdin:!1}).start(),e3=>e3.stop()));T("Opening interactive session..."),a3.text="Opening interactive session...";let{url:o3,token:s}=await e2.sandbox.openInteractive(),[c,...l]=e2.execution,u=e2.sudo?["sudo",c,...l]:[c,...l];T("Connecting..."),a3.text="Connecting...";let g2;try{let{hostname:e3}=new URL(o3);await(0,import_async_retry.default)(async(t2,n3)=>{T("Validating server health... (attempt %d)",n3);let r3=await fetch(`https://${e3}/health`);if(!r3.ok)throw Error(`Server health check failed: ${r3.statusText}`)},{onRetry:(e4,t2)=>{T("Server health check failed: %s (attempt %d)",e4.message,t2)},retries:5,minTimeout:100,randomize:!0}),g2=new import_websocket.default(`${o3}?token=${encodeURIComponent(s)}`)}catch{console.error(X.dim(`
14
+ \u2570\u25B6 connection to \u25B2 ${e2.sandbox.name} failed.`)),process.exitCode=1;return}n2.u(n(()=>{try{g2.close()}catch{}})),await new Promise((e3,t2)=>{g2.once("open",()=>e3()),g2.once("error",e4=>t2(e4))}),T("connected to %s",o3),a3.text="Connected successfully.",g2.send(JSON.stringify({type:"start",command:u[0],args:u.slice(1),env:D({TERM:"xterm-256color",PS1:"\u25B2 \x1B[2m$PWD/\x1B[0m ",...e2.envVars}),cwd:e2.cwd??e2.sandbox.cwd,cols:process.stdout.columns,rows:process.stdout.rows})),a3.stop();let _2=n2.u(r("stopped extensions"));e2.skipExtendingTimeout||w(e2.sandbox,_2.signal).catch(_2.ignoreInterruptions),g2.on("message",(e3,t2)=>{if(t2){process.stdout.write(e3);return}try{let t3=JSON.parse(e3.toString());t3.type==="exit"&&(process.exitCode=typeof t3.code=="number"?t3.code:void 0)}catch{process.stdout.write(e3)}}),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume();let b2=e3=>{g2.readyState===import_websocket.default.OPEN&&g2.send(e3)};process.stdin.on("data",b2);let x2=()=>{g2.readyState===import_websocket.default.OPEN&&g2.send(JSON.stringify({type:"resize",cols:process.stdout.columns,rows:process.stdout.rows}))};process.on("SIGWINCH",x2),await new Promise((e3,t2)=>{g2.once("close",()=>e3()),g2.once("error",e4=>t2(e4))}),_2.abort("client disconnected"),process.removeListener("SIGWINCH",x2),process.stdin.removeListener("data",b2),console.error(X.dim(`
15
+ \u2570\u25B6 connection to \u25B2 ${e2.sandbox.name} closed.`))}catch(e3){n2.e=e3}finally{n2.d()}}function D(e2){return Object.entries(e2).map(([e3,t2])=>`${e3}=${t2}`)}Z();function O(e2,n2){return X.gray(X.dim("$ ")+[e2,...n2].join(" "))}var k=d(N()),A=d(o2());Z();var j={sandbox:k.positional({type:a}),command:k.positional({displayName:"command",description:"The executable to invoke"}),args:k.rest({displayName:"args",description:"arguments to pass to the command"}),asSudo:k.flag({long:"sudo",description:"Give extended privileges to the command."}),interactive:k.flag({long:"interactive",short:"i",description:"Run the command in a secure interactive shell",type:k.extendType(k.boolean,{defaultValue(){return!1},async from(e2){if(e2&&!g(1))throw Error(["The --interactive flag requires a terminal (TTY).",`${X.bold("hint:")} Run this command in an interactive terminal, or remove --interactive to run non-interactively.`].join(`
16
+ `));return e2}})}),skipExtendingTimeout:k.flag({long:"no-extend-timeout",description:"Do not extend the sandbox timeout while running an interactive command. Only affects interactive executions."}),detached:k.flag({long:"detach",description:"Start the command and print its ID without waiting for it to finish."}),stdin:k.flag({long:"stdin",description:"Forward local stdin, or keep detached stdin open for later writes."}),tty:k.flag({long:"tty",short:"t",description:"Allocate a tty for an interactive command. This is a no-op."}),cwd:k.option({long:"workdir",short:"w",description:"The working directory to run the command in",type:k.optional(k.string)}),envVars:k.multioption({long:"env",short:"e",type:o,description:"Environment variables to set for the command"}),timeout:k.option({long:"timeout",type:k.optional(a2),description:"Maximum duration to wait for the command (e.g. 30s, 5m). On expiry the process is killed with SIGKILL. Cannot be combined with --interactive."}),scope:Bt},M=k.command({...e.exec,args:j,async handler({command:e2,cwd:n2,args:r2,asSudo:i2,sandbox:a3,scope:{token:o3,team:c,project:l},interactive:u,detached:d2,stdin:f,envVars:p,skipExtendingTimeout:m,timeout:h}){if(u&&f)throw Error("--stdin cannot be combined with --interactive.");if(u&&d2)throw Error("--detach cannot be combined with --interactive.");if(u&&h)throw Error(["--timeout cannot be combined with --interactive.",`${X.bold("hint:")} Remove one of the two flags. Interactive sessions do not enforce a command timeout.`].join(`
17
+ `));let g2=typeof a3=="string"?await Vt.get({name:a3,projectId:l,teamId:c,token:o3,resume:!0,__includeSystemRoutes:!0}):a3;if(u)await E({sandbox:g2,cwd:n2,execution:[e2,...r2],envVars:p,sudo:i2,skipExtendingTimeout:m});else{if(d2){let t2=await g2.runCommand({cmd:e2,args:r2,sudo:i2,cwd:n2,env:p,timeoutMs:h?(0,A.default)(h):void 0,detached:!0,stdin:f?!0:void 0});process.stdout.write(`${t2.cmdId}
18
+ `);return}console.error(O(e2,r2));let a4=await g2.runCommand({cmd:e2,args:r2,stderr:process.stderr,stdout:process.stdout,stdin:f?process.stdin:void 0,sudo:i2,cwd:n2,env:p,timeoutMs:h?(0,A.default)(h):void 0});h&&a4.exitCode===137&&console.error(`${X.yellow("Command was killed (SIGKILL, exit code 137)")}.`),process.exitCode=a4.exitCode}}});export{j,M};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import e from"node:process";var t=(e2,t2,r2,i2)=>{if(r2==="length"||r2==="prototype"||r2==="arguments"||r2==="caller")return;let a2=Object.getOwnPropertyDescriptor(e2,r2),o2=Object.getOwnPropertyDescriptor(t2,r2);!n(a2,o2)&&i2||Object.defineProperty(e2,r2,o2)},n=function(e2,t2){return e2===void 0||e2.configurable||e2.writable===t2.writable&&e2.enumerable===t2.enumerable&&e2.configurable===t2.configurable&&(e2.writable||e2.value===t2.value)},r=(e2,t2)=>{let n2=Object.getPrototypeOf(t2);n2!==Object.getPrototypeOf(e2)&&Object.setPrototypeOf(e2,n2)},i=(e2,t2)=>`/* Wrapped ${e2}*/
8
+ ${t2}`,a=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),o=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),s=(e2,t2,n2)=>{let r2=n2===""?"":`with ${n2.trim()}() `,s2=i.bind(null,r2,t2.toString());Object.defineProperty(s2,"name",o);let{writable:c2,enumerable:l2,configurable:u2}=a;Object.defineProperty(e2,"toString",{value:s2,writable:c2,enumerable:l2,configurable:u2})};function c(e2,n2,{ignoreNonConfigurable:i2=!1}={}){let{name:a2}=e2;for(let r2 of Reflect.ownKeys(n2))t(e2,n2,r2,i2);return r(e2,n2),s(e2,n2,a2),e2}var l=new WeakMap,u=(e2,t2={})=>{if(typeof e2!="function")throw TypeError("Expected a function");let n2,r2=0,i2=e2.displayName||e2.name||"<anonymous>",a2=function(...o2){if(l.set(a2,++r2),r2===1)n2=e2.apply(this,o2),e2=void 0;else if(t2.throw===!0)throw Error(`Function \`${i2}\` can only be called once`);return n2};return c(a2,e2),l.set(a2,r2),a2};u.callCount=e2=>{if(!l.has(e2))throw Error(`The given function \`${e2.name}\` is not wrapped by the \`onetime\` package`);return l.get(e2)};var d=u,f=[];f.push("SIGHUP","SIGINT","SIGTERM"),process.platform!=="win32"&&f.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&f.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");function p(e2,t2){if(t2.has(e2))throw TypeError("Cannot initialize the same private elements twice on an object")}function m(e2,t2){p(e2,t2),t2.add(e2)}function h(e2,t2,n2){p(e2,t2),t2.set(e2,n2)}function g(e2,t2,n2){if(typeof e2=="function"?e2===t2:e2.has(t2))return arguments.length<3?t2:n2;throw TypeError("Private element is not present on this object")}function _(e2,t2,n2){return e2.set(g(e2,t2),n2),n2}function v(e2,t2){return e2.get(g(e2,t2))}var y=e2=>!!e2&&typeof e2=="object"&&typeof e2.removeListener=="function"&&typeof e2.emit=="function"&&typeof e2.reallyExit=="function"&&typeof e2.listeners=="function"&&typeof e2.kill=="function"&&typeof e2.pid=="number"&&typeof e2.on=="function",b=Symbol.for("signal-exit emitter"),x=globalThis,S=Object.defineProperty.bind(Object),C=class{constructor(){if(this.emitted={afterExit:!1,exit:!1},this.listeners={afterExit:[],exit:[]},this.count=0,this.id=Math.random(),x[b])return x[b];S(x,b,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e2,t2){this.listeners[e2].push(t2)}removeListener(e2,t2){let n2=this.listeners[e2],r2=n2.indexOf(t2);r2!==-1&&(r2===0&&n2.length===1?n2.length=0:n2.splice(r2,1))}emit(e2,t2,n2){if(this.emitted[e2])return!1;this.emitted[e2]=!0;let r2=!1;for(let i2 of this.listeners[e2])r2=i2(t2,n2)===!0||r2;return e2==="exit"&&(r2=this.emit("afterExit",t2,n2)||r2),r2}},w=class{},T=e2=>({onExit(t2,n2){return e2.onExit(t2,n2)},load(){return e2.load()},unload(){return e2.unload()}}),E=class extends w{onExit(){return()=>{}}load(){}unload(){}},D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakMap,P=new WeakSet,F=class extends w{constructor(e2){super(),m(this,P),h(this,D,R.platform==="win32"?"SIGINT":"SIGHUP"),h(this,O,new C),h(this,k,void 0),h(this,A,void 0),h(this,j,void 0),h(this,M,{}),h(this,N,!1),_(k,this,e2),_(M,this,{});for(let t2 of f)v(M,this)[t2]=()=>{let n2=v(k,this).listeners(t2),{count:r2}=v(O,this),i2=e2;if(typeof i2.__signal_exit_emitter__=="object"&&typeof i2.__signal_exit_emitter__.count=="number"&&(r2+=i2.__signal_exit_emitter__.count),n2.length===r2){this.unload();let n3=v(O,this).emit("exit",null,t2),r3=t2==="SIGHUP"?v(D,this):t2;n3||e2.kill(e2.pid,r3)}};_(j,this,e2.reallyExit),_(A,this,e2.emit)}onExit(e2,t2){if(!y(v(k,this)))return()=>{};v(N,this)===!1&&this.load();let n2=t2?.alwaysLast?"afterExit":"exit";return v(O,this).on(n2,e2),()=>{v(O,this).removeListener(n2,e2),v(O,this).listeners.exit.length===0&&v(O,this).listeners.afterExit.length===0&&this.unload()}}load(){if(!v(N,this)){_(N,this,!0),v(O,this).count+=1;for(let e2 of f)try{let t2=v(M,this)[e2];t2&&v(k,this).on(e2,t2)}catch{}v(k,this).emit=(e2,...t2)=>g(P,this,L).call(this,e2,...t2),v(k,this).reallyExit=e2=>g(P,this,I).call(this,e2)}}unload(){v(N,this)&&(_(N,this,!1),f.forEach(e2=>{let t2=v(M,this)[e2];if(!t2)throw Error("Listener not defined for signal: "+e2);try{v(k,this).removeListener(e2,t2)}catch{}}),v(k,this).emit=v(A,this),v(k,this).reallyExit=v(j,this),--v(O,this).count)}};function I(e2){return y(v(k,this))?(v(k,this).exitCode=e2||0,v(O,this).emit("exit",v(k,this).exitCode,null),v(j,this).call(v(k,this),v(k,this).exitCode)):0}function L(e2,...t2){let n2=v(A,this);if(e2==="exit"&&y(v(k,this))){typeof t2[0]=="number"&&(v(k,this).exitCode=t2[0]);let r2=n2.call(v(k,this),e2,...t2);return v(O,this).emit("exit",v(k,this).exitCode,null),r2}else return n2.call(v(k,this),e2,...t2)}var R=globalThis.process,{onExit:z,load:B,unload:V}=T(y(R)?new F(R):new E),H=e.stderr.isTTY?e.stderr:e.stdout.isTTY?e.stdout:void 0,U=H?d(()=>{z(()=>{H.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},W=!1,G={};G.show=(t2=e.stderr)=>{t2.isTTY&&(W=!1,t2.write("\x1B[?25h"))},G.hide=(t2=e.stderr)=>{t2.isTTY&&(U(),W=!0,t2.write("\x1B[?25l"))},G.toggle=(e2,t2)=>{e2!==void 0&&(W=e2),W?G.show(t2):G.hide(t2)};var K=G;export{m,h,g,_,v,K};