vercel 62.7.0 → 63.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/dist/chunks/{add-P3FNSVMN.js → add-BODUK747.js} +1 -1
  2. package/dist/chunks/{add-OXHI3PVM.js → add-QKGWNVQS.js} +1 -1
  3. package/dist/chunks/{add-WUT6QU2J.js → add-ZLY3DE35.js} +1 -1
  4. package/dist/chunks/{build-J6VW3KHT.js → build-SD6SLRK7.js} +1 -1
  5. package/dist/chunks/{chunk-N6CNMMSZ.js → chunk-25565AGS.js} +1 -1
  6. package/dist/chunks/{chunk-M4IVLSNQ.js → chunk-25S4PQNK.js} +1 -1
  7. package/dist/chunks/{chunk-T52FMXWC.js → chunk-2EYYB6YN.js} +1 -1
  8. package/dist/chunks/{chunk-YPTLSODC.js → chunk-2GHZGOWT.js} +1 -1
  9. package/dist/chunks/{chunk-MIG67KZ2.js → chunk-2H243SJV.js} +1 -1
  10. package/dist/chunks/{chunk-YW5R6XQI.js → chunk-2JBVMF2Y.js} +1 -1
  11. package/dist/chunks/{chunk-YUDKK2QJ.js → chunk-2LGNEOKV.js} +1 -1
  12. package/dist/chunks/{chunk-CR2ZQBDU.js → chunk-2WYDLP7X.js} +1 -1
  13. package/dist/chunks/{chunk-M3HO5CTQ.js → chunk-3AF3TTCR.js} +1 -1
  14. package/dist/chunks/{chunk-6EW4BCMR.js → chunk-3DMY3OJR.js} +1 -1
  15. package/dist/chunks/{chunk-NNP5NITU.js → chunk-3E364MJE.js} +1 -1
  16. package/dist/chunks/{chunk-M5NWE7EO.js → chunk-3EYOQC4R.js} +1 -1
  17. package/dist/chunks/{chunk-SXUEGVWB.js → chunk-3G3FQYMW.js} +1 -1
  18. package/dist/chunks/{chunk-IEKUTNKT.js → chunk-4A5SGLIH.js} +1 -1
  19. package/dist/chunks/{chunk-BRK4OB4B.js → chunk-4SAVH3H7.js} +1 -1
  20. package/dist/chunks/chunk-5RR3435W.js +10 -0
  21. package/dist/chunks/{chunk-CRITS7IX.js → chunk-64U5W6GU.js} +1 -1
  22. package/dist/chunks/{chunk-WPS6JZF6.js → chunk-67GZ5REA.js} +1 -1
  23. package/dist/chunks/{chunk-COQGD2EI.js → chunk-6JGC4YDH.js} +1 -1
  24. package/dist/chunks/{chunk-YZBYL3SH.js → chunk-6LRVRPYO.js} +1 -1
  25. package/dist/chunks/chunk-6ZMFJA5X.js +7 -0
  26. package/dist/chunks/chunk-75IAMKGV.js +27 -0
  27. package/dist/chunks/{chunk-6TAQ6OWD.js → chunk-773GOZIR.js} +1 -1
  28. package/dist/chunks/{chunk-NYFB3EYC.js → chunk-7D2HVBVP.js} +1 -1
  29. package/dist/chunks/{chunk-L3JDEHCQ.js → chunk-7EJQLVWX.js} +1 -1
  30. package/dist/chunks/{chunk-U4C2LU7H.js → chunk-7V2F5IUY.js} +1 -1
  31. package/dist/chunks/{chunk-XPXOV5UO.js → chunk-A2RZZQEP.js} +1 -1
  32. package/dist/chunks/{chunk-FEEG5UU2.js → chunk-A5R2HHNK.js} +1 -1
  33. package/dist/chunks/{chunk-EDDOQXEI.js → chunk-AG5QQNJ3.js} +1 -1
  34. package/dist/chunks/{chunk-WOTPEBSH.js → chunk-AMDHTZDV.js} +1 -1
  35. package/dist/chunks/{chunk-5XJNPXQK.js → chunk-AOWWC6WZ.js} +1 -1
  36. package/dist/chunks/{chunk-35QK5NDD.js → chunk-AU42HSQ3.js} +1 -1
  37. package/dist/chunks/{chunk-FB3U3RAM.js → chunk-AUZEOUZU.js} +1 -1
  38. package/dist/chunks/{chunk-46UCIIJN.js → chunk-AZ76R3LW.js} +1 -1
  39. package/dist/chunks/{chunk-NM67DIPQ.js → chunk-AZULOP7M.js} +1 -1
  40. package/dist/chunks/{chunk-5JN3FWV2.js → chunk-B3K6GM2W.js} +1 -1
  41. package/dist/chunks/{chunk-ULHETT7U.js → chunk-B3PZ3I4Z.js} +1 -1
  42. package/dist/chunks/{chunk-JKTQV2QJ.js → chunk-B4YYOSPY.js} +1 -1
  43. package/dist/chunks/{chunk-KKS7XWEX.js → chunk-BPUANOGW.js} +1 -1
  44. package/dist/chunks/{chunk-GU6VIFR5.js → chunk-BRQUZ5NC.js} +1 -1
  45. package/dist/chunks/{chunk-RMZJP32R.js → chunk-BRUTDRAQ.js} +1 -1
  46. package/dist/chunks/{chunk-OSCCYU74.js → chunk-BS32OUOC.js} +1 -1
  47. package/dist/chunks/{chunk-5M45EBVX.js → chunk-BWY67LI6.js} +1 -1
  48. package/dist/chunks/{chunk-6L236MNA.js → chunk-BZENIQ7N.js} +1 -1
  49. package/dist/chunks/{chunk-UKMRJIIZ.js → chunk-BZYQ6RFV.js} +1 -1
  50. package/dist/chunks/{chunk-DZZFEAM6.js → chunk-CNU4T7FO.js} +1 -1
  51. package/dist/chunks/{chunk-7RR7MIMT.js → chunk-COD3WAUI.js} +1 -1
  52. package/dist/chunks/{chunk-4H5LPD3T.js → chunk-CRO7VQWK.js} +1 -1
  53. package/dist/chunks/{chunk-XCJDGQO7.js → chunk-D3AHZ5LI.js} +1 -1
  54. package/dist/chunks/{chunk-THB7KY2N.js → chunk-DZ6GORJ7.js} +1 -1
  55. package/dist/chunks/{chunk-2H77IRPI.js → chunk-EAUDC24V.js} +1 -1
  56. package/dist/chunks/{chunk-5AXNGQJC.js → chunk-EO7GUARB.js} +1 -1
  57. package/dist/chunks/{chunk-GUTZ45DE.js → chunk-ESMQCFCX.js} +1 -1
  58. package/dist/chunks/{chunk-ZDX75YNZ.js → chunk-F4KY2TOK.js} +1 -1
  59. package/dist/chunks/{chunk-2I64AYHG.js → chunk-FBYA6LLM.js} +1 -1
  60. package/dist/chunks/{chunk-ZN37NQM4.js → chunk-FMAF3AKI.js} +2 -2
  61. package/dist/chunks/{chunk-JNLWD6DK.js → chunk-GRTIWUV2.js} +1 -1
  62. package/dist/chunks/{chunk-A73N3QKT.js → chunk-GSOPJJO5.js} +1 -1
  63. package/dist/chunks/{chunk-J6OPPI3A.js → chunk-GWB27IAS.js} +1 -1
  64. package/dist/chunks/{chunk-DGH5CD6D.js → chunk-H7LHZZKU.js} +1 -1
  65. package/dist/chunks/{chunk-LWQVT6YW.js → chunk-HJ3NY4UA.js} +1 -1
  66. package/dist/chunks/{chunk-AEEEEOYS.js → chunk-HMS3UIQ2.js} +1 -1
  67. package/dist/chunks/{chunk-W26LLGQV.js → chunk-HRR57QNP.js} +1 -1
  68. package/dist/chunks/{chunk-MCBO6LL7.js → chunk-HUJPGK7W.js} +3 -3
  69. package/dist/chunks/{chunk-VWBJWUYQ.js → chunk-IAUAFUO2.js} +1 -1
  70. package/dist/chunks/{chunk-MBL6TXEJ.js → chunk-ID663OJ7.js} +1 -1
  71. package/dist/chunks/{chunk-N3ZZ7FHQ.js → chunk-ISWW3DKF.js} +1 -1
  72. package/dist/chunks/{chunk-OI263FBO.js → chunk-J24BABG4.js} +1 -1
  73. package/dist/chunks/{chunk-FAW6NBLQ.js → chunk-JALVF3C2.js} +1 -1
  74. package/dist/chunks/{chunk-FI772UVH.js → chunk-JESNVRVR.js} +1 -1
  75. package/dist/chunks/{chunk-ZTUQEA2X.js → chunk-JLXG2XWW.js} +1 -1
  76. package/dist/chunks/{chunk-TAT5WGDZ.js → chunk-JSBEAHKA.js} +1 -1
  77. package/dist/chunks/{chunk-GMTLVRN7.js → chunk-JTAAWOJS.js} +2 -2
  78. package/dist/chunks/{chunk-3ZMD36SU.js → chunk-KNBEUC4P.js} +1 -1
  79. package/dist/chunks/{chunk-FQJCWZ4C.js → chunk-KTNRWBHM.js} +1 -1
  80. package/dist/chunks/{chunk-M4IWOZEG.js → chunk-L5FUUGYX.js} +1 -1
  81. package/dist/chunks/{chunk-UED2PPFP.js → chunk-LSQREJXO.js} +1 -1
  82. package/dist/chunks/{chunk-S54ISKGR.js → chunk-LU5O3NH7.js} +1 -1
  83. package/dist/chunks/{chunk-XQQ7DTQG.js → chunk-MA4K5IWW.js} +2 -2
  84. package/dist/chunks/{chunk-4MZK6JT6.js → chunk-MCRKBVZA.js} +1 -1
  85. package/dist/chunks/{chunk-CF2PIWRO.js → chunk-MEJTHWZB.js} +1 -1
  86. package/dist/chunks/{chunk-23NBYS6R.js → chunk-MVCAUS4F.js} +1 -1
  87. package/dist/chunks/{chunk-M2W3HKV3.js → chunk-MVGTMPMI.js} +1 -1
  88. package/dist/chunks/{chunk-QTKJC2O5.js → chunk-MXTC4ZAQ.js} +1 -1
  89. package/dist/chunks/{chunk-6C4RPAG7.js → chunk-MYCQIZU6.js} +1 -1
  90. package/dist/chunks/{chunk-3XLK5ZPD.js → chunk-MYMM34ZH.js} +4 -4
  91. package/dist/chunks/chunk-MZ6DNAVL.js +7 -0
  92. package/dist/chunks/{chunk-UKVEXM5O.js → chunk-N7L3XLWC.js} +1 -1
  93. package/dist/chunks/{chunk-4QSVBLAS.js → chunk-N7Q2IESO.js} +1 -1
  94. package/dist/chunks/{chunk-U7KCDTCH.js → chunk-NB2WLB3J.js} +1 -1
  95. package/dist/chunks/{chunk-LG4JQAY7.js → chunk-NZ2TFADV.js} +1 -1
  96. package/dist/chunks/{chunk-2KSNNB4B.js → chunk-NZBUIMZG.js} +1 -1
  97. package/dist/chunks/{chunk-TRTEXGVN.js → chunk-O4FDRZ22.js} +1 -1
  98. package/dist/chunks/{chunk-WNTA7DCC.js → chunk-OA446564.js} +1 -1
  99. package/dist/chunks/{chunk-O5A7CNRV.js → chunk-OH2RT2GN.js} +1 -1
  100. package/dist/chunks/{chunk-AVSPFBLM.js → chunk-OO572JUC.js} +1 -1
  101. package/dist/chunks/{chunk-WRILLB46.js → chunk-PFD7LETF.js} +1 -1
  102. package/dist/chunks/{chunk-ORJGSUQT.js → chunk-PSBBSY46.js} +1 -1
  103. package/dist/chunks/{chunk-ULLWCOYC.js → chunk-PVASGBEF.js} +1 -1
  104. package/dist/chunks/{chunk-JZRMH5UA.js → chunk-Q7D7RGXM.js} +1 -1
  105. package/dist/chunks/{chunk-OQVE2WXX.js → chunk-QC47UKDR.js} +1 -1
  106. package/dist/chunks/{chunk-7SNMU7U7.js → chunk-QJKJBD2M.js} +1 -1
  107. package/dist/chunks/{chunk-KXMVFT2K.js → chunk-QW2UP4W4.js} +1 -1
  108. package/dist/chunks/{chunk-BHBNTQRT.js → chunk-QZRZ6ECD.js} +1 -1
  109. package/dist/chunks/{chunk-LYKPLTZ7.js → chunk-R4VVQRLX.js} +1 -1
  110. package/dist/chunks/{chunk-QGIQK47P.js → chunk-RM3ZDRYE.js} +1 -1
  111. package/dist/chunks/{chunk-B4ATVYZW.js → chunk-ROPQIBWJ.js} +1 -1
  112. package/dist/chunks/{chunk-OHDEHZLX.js → chunk-RRDNKB2X.js} +1 -1
  113. package/dist/chunks/{chunk-7PNYOSDU.js → chunk-RRWEIG6B.js} +1 -1
  114. package/dist/chunks/{chunk-MOLEXKVC.js → chunk-RZGWCQP7.js} +1 -1
  115. package/dist/chunks/{chunk-H3QRCTIJ.js → chunk-S7XZC23O.js} +1 -1
  116. package/dist/chunks/{chunk-PHW54NU5.js → chunk-SACGQMVQ.js} +1 -1
  117. package/dist/chunks/{chunk-SOJCELXH.js → chunk-SCV7XEEO.js} +1 -1
  118. package/dist/chunks/{chunk-O3UY73UQ.js → chunk-SF4E3AQ3.js} +1 -1
  119. package/dist/chunks/{chunk-QZ2G3AMY.js → chunk-SSEVYTJ7.js} +1 -1
  120. package/dist/chunks/{chunk-ECMWDZTJ.js → chunk-SY4EANZH.js} +3 -3
  121. package/dist/chunks/{chunk-4KQBTIMZ.js → chunk-T6SFC3IH.js} +1 -1
  122. package/dist/chunks/{chunk-YGMOJBSP.js → chunk-T76ITV65.js} +2 -2
  123. package/dist/chunks/{chunk-YKOIVWZI.js → chunk-TBLIJ2PS.js} +1 -1
  124. package/dist/chunks/{chunk-UOZHC2ZG.js → chunk-TKA7PPGY.js} +1 -1
  125. package/dist/chunks/{chunk-V426AGVC.js → chunk-U5C6XOLA.js} +2 -2
  126. package/dist/chunks/{chunk-774D3BGN.js → chunk-UFXKCETS.js} +1 -1
  127. package/dist/chunks/{chunk-RSLPLRVK.js → chunk-UTW2FDSC.js} +1 -1
  128. package/dist/chunks/{chunk-6DJ6PMEK.js → chunk-V2BKSCXI.js} +1 -1
  129. package/dist/chunks/{chunk-LXNMVWYO.js → chunk-V336CYEI.js} +1 -1
  130. package/dist/chunks/{chunk-YEWZFZ2O.js → chunk-VIBUYIZ3.js} +1 -1
  131. package/dist/chunks/chunk-VJEQAITW.js +24 -0
  132. package/dist/chunks/{chunk-F2ZWW2IO.js → chunk-VKPZP4LC.js} +1 -1
  133. package/dist/chunks/{chunk-RCTYVKM5.js → chunk-VKXEOL4K.js} +1 -1
  134. package/dist/chunks/chunk-VNSQCAVT.js +11 -0
  135. package/dist/chunks/{chunk-FAJB3JV5.js → chunk-VOB4W7DO.js} +1 -1
  136. package/dist/chunks/{chunk-PE7QZUY7.js → chunk-VSE5BAPP.js} +1 -1
  137. package/dist/chunks/{chunk-ZNQI6M3S.js → chunk-W6LNIG5O.js} +1 -1
  138. package/dist/chunks/{chunk-5ZQF5WIO.js → chunk-WF5YVWWY.js} +1 -1
  139. package/dist/chunks/{chunk-Q7AYTXUR.js → chunk-WH3SHWVK.js} +1 -1
  140. package/dist/chunks/{chunk-G3NHWIPJ.js → chunk-WJ4VNTE3.js} +1 -1
  141. package/dist/chunks/{chunk-LCH3SUJ7.js → chunk-X3JK3SQ2.js} +1 -1
  142. package/dist/chunks/{chunk-B2L2QTXT.js → chunk-XEQT373M.js} +1 -1
  143. package/dist/chunks/{chunk-I5JR7PIO.js → chunk-XJOOPPSQ.js} +1 -1
  144. package/dist/chunks/{chunk-RYMRVMGD.js → chunk-YAPHSZJ7.js} +6 -7
  145. package/dist/chunks/{chunk-7HL2RPUO.js → chunk-YHPPP3SF.js} +1 -1
  146. package/dist/chunks/{chunk-SR5XEF7L.js → chunk-YLTCVZOL.js} +1 -1
  147. package/dist/chunks/{chunk-7T6TL3GQ.js → chunk-YYPNUQDI.js} +1 -1
  148. package/dist/chunks/{chunk-GHM7V3GG.js → chunk-ZS2WS4AM.js} +1 -1
  149. package/dist/chunks/{chunk-K2RQEX7N.js → chunk-ZUCSA4IW.js} +1 -1
  150. package/dist/chunks/{cjs-GOQHXIHX.js → cjs-2SMN43VH.js} +1 -1
  151. package/dist/chunks/{clear-VMJVLPVR.js → clear-PYDGQBSS.js} +1 -1
  152. package/dist/chunks/{compile-vercel-config-YCLXPL5H.js → compile-vercel-config-KWSIFONF.js} +1 -1
  153. package/dist/chunks/{config-JPX6NJMJ.js → config-6TQFY5DN.js} +1 -1
  154. package/dist/chunks/{config-YMUUPO3R.js → config-Y3JEZPVK.js} +1 -1
  155. package/dist/chunks/config-validator.mjs +1 -1
  156. package/dist/chunks/{connect-git-provider-KLSBCSD2.js → connect-git-provider-HW23GK35.js} +1 -1
  157. package/dist/chunks/{constants-G4UYVLOF.js → constants-JAB7MRSK.js} +1 -1
  158. package/dist/chunks/{create-project-SRQGD4JY.js → create-project-IKCB6MB2.js} +1 -1
  159. package/dist/chunks/{delete-EEY7M6XT.js → delete-HAOLSE35.js} +1 -1
  160. package/dist/chunks/{delete-E7J4B5E5.js → delete-ZISJ7HIW.js} +1 -1
  161. package/dist/chunks/detect-projects-3CQ6ANGU.js +7 -0
  162. package/dist/chunks/detect-services-22KZAGH2.js +7 -0
  163. package/dist/chunks/{disable-5TKY6JK2.js → disable-ZCEEK2BD.js} +1 -1
  164. package/dist/chunks/{discard-ALSOF66H.js → discard-VHO5BXYN.js} +1 -1
  165. package/dist/chunks/{edit-ISUCMYNW.js → edit-JRYFZ5N5.js} +1 -1
  166. package/dist/chunks/{edit-2M3KEE3H.js → edit-ZPNWEZWU.js} +1 -1
  167. package/dist/chunks/{enable-2QTTTYQD.js → enable-USQVAN4K.js} +1 -1
  168. package/dist/chunks/{esm-SZZI53W7.js → esm-33752ISR.js} +1 -1
  169. package/dist/chunks/esm-4JKEE7PC.js +7 -0
  170. package/dist/chunks/{esm-CXICLFA3.js → esm-BYG5BWYH.js} +1 -1
  171. package/dist/chunks/{esm-NQRLKALI.js → esm-DFFBNKNU.js} +1 -1
  172. package/dist/chunks/{esm-7HVUFWMN.js → esm-IF453UWS.js} +1 -1
  173. package/dist/chunks/{esm-BZBEM7YA.js → esm-LABWDJ72.js} +1 -1
  174. package/dist/chunks/{esm-HDEHVK7I.js → esm-TG37FXTU.js} +1 -1
  175. package/dist/chunks/{exec-XIQJ2A3J.js → exec-QZXH5RXR.js} +1 -1
  176. package/dist/chunks/{export-PV2NDS7C.js → export-H7YV6NVF.js} +1 -1
  177. package/dist/chunks/{fetch-proxy-AEAWC6MD.js → fetch-proxy-OC6B22AW.js} +1 -1
  178. package/dist/chunks/future-PHRPWAVY.js +7 -0
  179. package/dist/chunks/generate-cert-for-deploy-WLYVWTBG.js +7 -0
  180. package/dist/chunks/{image-6GL2UOA2.js → image-6KIQRC65.js} +1 -1
  181. package/dist/chunks/import-builders-YAC6UE33.js +7 -0
  182. package/dist/chunks/{inspect-FK6GC5JZ.js → inspect-BQELJ5EI.js} +1 -1
  183. package/dist/chunks/{inspect-UNL54246.js → inspect-DWOQ6566.js} +1 -1
  184. package/dist/chunks/{inspect-ORVORGUM.js → inspect-HJQWRFHR.js} +1 -1
  185. package/dist/chunks/{inspect-LZMU7RIU.js → inspect-MRJ6JO7M.js} +1 -1
  186. package/dist/chunks/{inspect-3HGROSZO.js → inspect-SEGNEPGI.js} +1 -1
  187. package/dist/chunks/{list-FVUIZPC7.js → list-HS54LLJ5.js} +1 -1
  188. package/dist/chunks/{list-WOUJM4WR.js → list-OCU47YHP.js} +1 -1
  189. package/dist/chunks/{list-EWJI2WSQ.js → list-S2XKQMNX.js} +1 -1
  190. package/dist/chunks/{login-JREQ7SLY.js → login-K6VYVJPS.js} +1 -1
  191. package/dist/chunks/login-SKAMFH7S.js +7 -0
  192. package/dist/chunks/logs-KZSKOQUN.js +7 -0
  193. package/dist/chunks/{ls-4COX4SMJ.js → ls-DTEGGHQA.js} +1 -1
  194. package/dist/chunks/{ls-W5SJUIHD.js → ls-G5NTVYUB.js} +1 -1
  195. package/dist/chunks/{ls-LXBUE4LZ.js → ls-LBBI45ZT.js} +1 -1
  196. package/dist/chunks/{ls-6DOYSBQM.js → ls-LCY7BHOP.js} +1 -1
  197. package/dist/chunks/{ls-RBWPVJ5G.js → ls-NUM6IQL6.js} +1 -1
  198. package/dist/chunks/{ls-6CD2OQGA.js → ls-TE7BAMHR.js} +1 -1
  199. package/dist/chunks/{ls-AHT2FRGM.js → ls-ZYM3DQXI.js} +1 -1
  200. package/dist/chunks/{mutate-TVUHBRBK.js → mutate-BAFVNNRU.js} +1 -1
  201. package/dist/chunks/{notifications-OXOSD6UK.js → notifications-3EB3ZEU3.js} +1 -1
  202. package/dist/chunks/{open-SWPHB54M.js → open-J4X5KJ6A.js} +1 -1
  203. package/dist/chunks/{openapi-32XHDVJL.js → openapi-C5BHMHWS.js} +1 -1
  204. package/dist/chunks/{permissions-A4WMGETJ.js → permissions-JMFKPIO4.js} +1 -1
  205. package/dist/chunks/{pkg-YFU67U7I.js → pkg-EDJQLCNP.js} +1 -1
  206. package/dist/chunks/prompt-missing-credentials-VS3ZJSCQ.js +7 -0
  207. package/dist/chunks/{publish-2CS4RYJW.js → publish-WWI5HOAL.js} +1 -1
  208. package/dist/chunks/pull-MTQAMT4L.js +7 -0
  209. package/dist/chunks/purchase-domain-if-available-ZIIAF7CC.js +7 -0
  210. package/dist/chunks/{push-OPRW7M4I.js → push-PBKUSKXQ.js} +1 -1
  211. package/dist/chunks/{query-22PGP7BC.js → query-5VGUVE2A.js} +2 -2
  212. package/dist/chunks/{reauthenticate-LMR25CIE.js → reauthenticate-UGBXSWZE.js} +1 -1
  213. package/dist/chunks/{reorder-Y3NMEA2S.js → reorder-S2ZJML5K.js} +1 -1
  214. package/dist/chunks/{reply-YEZHST2Q.js → reply-3GFULOMZ.js} +1 -1
  215. package/dist/chunks/{repo-info-to-url-SK3VX6UL.js → repo-info-to-url-XQSULSEO.js} +1 -1
  216. package/dist/chunks/{resolve-QC37E2EB.js → resolve-USEBSFUT.js} +1 -1
  217. package/dist/chunks/{resolve-deployment-framework-preset-QEPJNWVF.js → resolve-deployment-framework-preset-JPT2MRPA.js} +1 -1
  218. package/dist/chunks/{restore-RMQVGYQB.js → restore-JD7IGDTY.js} +1 -1
  219. package/dist/chunks/{rm-42U6SPVV.js → rm-3V47KPK6.js} +1 -1
  220. package/dist/chunks/{rm-4MSUYUEP.js → rm-ARMNSPGQ.js} +1 -1
  221. package/dist/chunks/{rm-DPHE34CD.js → rm-BYOBKSWY.js} +1 -1
  222. package/dist/chunks/{rm-43MPIHP3.js → rm-EQYVIFNX.js} +1 -1
  223. package/dist/chunks/{rm-JHWXYHJY.js → rm-RHRKS7XG.js} +1 -1
  224. package/dist/chunks/{routes-2GTCE542.js → routes-NID5V7EJ.js} +1 -1
  225. package/dist/chunks/rule-inspect-5DZ7OXGE.js +8 -0
  226. package/dist/chunks/{rules-6KWBVUF2.js → rules-CM2ARIWZ.js} +1 -1
  227. package/dist/chunks/{schema-OUFU5V7Z.js → schema-SZUKDSY2.js} +1 -1
  228. package/dist/chunks/{schema-S2DE7S5N.js → schema-V75RRXXF.js} +1 -1
  229. package/dist/chunks/select-org-SH4JT6RI.js +7 -0
  230. package/dist/chunks/{set-VXSNREF4.js → set-LY4YI5FZ.js} +1 -1
  231. package/dist/chunks/setup-and-link-MWLALWAS.js +7 -0
  232. package/dist/chunks/{slugify-O5DBATYT.js → slugify-NMMUASYK.js} +1 -1
  233. package/dist/chunks/stamp-TKONNIJ5.js +7 -0
  234. package/dist/chunks/{tags-AGLQDT3Z.js → tags-P5GB7HTF.js} +1 -1
  235. package/dist/chunks/{types-GQNKYZJH.js → types-OC7OTQNK.js} +1 -1
  236. package/dist/chunks/{update-TI3YRVQT.js → update-SOD622HT.js} +1 -1
  237. package/dist/chunks/{update-route-version-XZAFPQJC.js → update-route-version-KWK5S4UW.js} +1 -1
  238. package/dist/chunks/{utils-5BFO5HC4.js → utils-IQZEE4DT.js} +1 -1
  239. package/dist/chunks/{vlt-builder-graph-S4YJ5UTQ.js → vlt-builder-graph-XL2XRO4V.js} +1 -1
  240. package/dist/chunks/{vlt-builder-importer-2ITR3DMQ.js → vlt-builder-importer-RBUPAB6J.js} +1 -1
  241. package/dist/commands/build/index.js +3 -3
  242. package/dist/commands/deploy/index.js +6 -6
  243. package/dist/commands/dev/index.js +7 -7
  244. package/dist/commands/env/index.js +1 -1
  245. package/dist/commands/link/index.js +1 -1
  246. package/dist/commands/list/index.js +1 -1
  247. package/dist/commands-bulk.js +441 -428
  248. package/dist/help.js +1 -1
  249. package/dist/index.js +2 -2
  250. package/dist/internal-build-worker.js +1 -1
  251. package/dist/internal-build.js +2 -2
  252. package/dist/vc.js +60 -2
  253. package/dist/version.mjs +1 -1
  254. package/package.json +53 -53
  255. package/dist/chunks/chunk-APSIFBD4.js +0 -7
  256. package/dist/chunks/chunk-EQ24OC5G.js +0 -24
  257. package/dist/chunks/chunk-ONPJXQQ6.js +0 -10
  258. package/dist/chunks/chunk-Q2YQSMIB.js +0 -26
  259. package/dist/chunks/chunk-SMC4MGY5.js +0 -7
  260. package/dist/chunks/chunk-YTIANIL7.js +0 -11
  261. package/dist/chunks/detect-projects-AWDCPVLE.js +0 -7
  262. package/dist/chunks/detect-services-E2TWAKQS.js +0 -7
  263. package/dist/chunks/esm-WGJFGCLK.js +0 -7
  264. package/dist/chunks/future-SQS5POAL.js +0 -7
  265. package/dist/chunks/generate-cert-for-deploy-4EJRA7MS.js +0 -7
  266. package/dist/chunks/import-builders-KAZMYQCR.js +0 -7
  267. package/dist/chunks/login-IJLY5XTT.js +0 -7
  268. package/dist/chunks/logs-Z7IMGFO2.js +0 -7
  269. package/dist/chunks/prompt-missing-credentials-6IXO6VND.js +0 -7
  270. package/dist/chunks/pull-WWUH4M5V.js +0 -7
  271. package/dist/chunks/purchase-domain-if-available-TAXCYIV7.js +0 -7
  272. package/dist/chunks/rule-inspect-7LIPL5YY.js +0 -8
  273. package/dist/chunks/select-org-EL66MG67.js +0 -7
  274. package/dist/chunks/setup-and-link-I7SGZNGO.js +0 -7
  275. package/dist/chunks/stamp-OX4YO3KY.js +0 -7
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{require_lib}from"./chunk-B4ATVYZW.js";import{require_graceful_fs}from"./chunk-F2ZWW2IO.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{printAlignedLabel}from"./chunk-4QSVBLAS.js";import{getUser}from"./chunk-PE7QZUY7.js";import{getTeamByIdOrSlug}from"./chunk-VOZEB6PD.js";import{InvalidToken,ProjectNotFound,code,isAPIError}from"./chunk-NM67DIPQ.js";import{emoji,link_default,output_manager_default,prependEmoji,require_build_utils}from"./chunk-Q2YQSMIB.js";import{require_dist}from"./chunk-QGIQK47P.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_universalify=__commonJS({"../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports){"use strict";exports.fromCallback=function(fn){return Object.defineProperty(function(...args){if(typeof args[args.length-1]=="function")fn.apply(this,args);else return new Promise((resolve4,reject)=>{args.push((err,res)=>err!=null?reject(err):resolve4(res)),fn.apply(this,args)})},"name",{value:fn.name})};exports.fromPromise=function(fn){return Object.defineProperty(function(...args){let cb=args[args.length-1];if(typeof cb!="function")return fn.apply(this,args);args.pop(),fn.apply(this,args).then(r=>cb(null,r),cb)},"name",{value:fn.name})}}});var require_fs=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/fs/index.js"(exports){"use strict";var u=require_universalify().fromCallback,fs4=require_graceful_fs(),api=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(key=>typeof fs4[key]=="function");Object.assign(exports,fs4);api.forEach(method=>{exports[method]=u(fs4[method])});exports.realpath.native=u(fs4.realpath.native);exports.exists=function(filename,callback){return typeof callback=="function"?fs4.exists(filename,callback):new Promise(resolve4=>fs4.exists(filename,resolve4))};exports.read=function(fd,buffer,offset,length,position,callback){return typeof callback=="function"?fs4.read(fd,buffer,offset,length,position,callback):new Promise((resolve4,reject)=>{fs4.read(fd,buffer,offset,length,position,(err,bytesRead,buffer2)=>{if(err)return reject(err);resolve4({bytesRead,buffer:buffer2})})})};exports.write=function(fd,buffer,...args){return typeof args[args.length-1]=="function"?fs4.write(fd,buffer,...args):new Promise((resolve4,reject)=>{fs4.write(fd,buffer,...args,(err,bytesWritten,buffer2)=>{if(err)return reject(err);resolve4({bytesWritten,buffer:buffer2})})})};typeof fs4.writev=="function"&&(exports.writev=function(fd,buffers,...args){return typeof args[args.length-1]=="function"?fs4.writev(fd,buffers,...args):new Promise((resolve4,reject)=>{fs4.writev(fd,buffers,...args,(err,bytesWritten,buffers2)=>{if(err)return reject(err);resolve4({bytesWritten,buffers:buffers2})})})})}});var require_utils=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports,module){"use strict";var path=__require("path");module.exports.checkPath=function(pth){if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let error=new Error(`Path contains invalid characters: ${pth}`);throw error.code="EINVAL",error}}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports,module){"use strict";var fs4=require_fs(),{checkPath}=require_utils(),getMode=options=>{let defaults={mode:511};return typeof options=="number"?options:{...defaults,...options}.mode};module.exports.makeDir=async(dir,options)=>(checkPath(dir),fs4.mkdir(dir,{mode:getMode(options),recursive:!0}));module.exports.makeDirSync=(dir,options)=>(checkPath(dir),fs4.mkdirSync(dir,{mode:getMode(options),recursive:!0}))}});var require_mkdirs=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports,module){"use strict";var u=require_universalify().fromPromise,{makeDir:_makeDir,makeDirSync}=require_make_dir(),makeDir=u(_makeDir);module.exports={mkdirs:makeDir,mkdirsSync:makeDirSync,mkdirp:makeDir,mkdirpSync:makeDirSync,ensureDir:makeDir,ensureDirSync:makeDirSync}}});var require_utimes=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/utimes.js"(exports,module){"use strict";var fs4=require_graceful_fs();function utimesMillis(path,atime,mtime,callback){fs4.open(path,"r+",(err,fd)=>{if(err)return callback(err);fs4.futimes(fd,atime,mtime,futimesErr=>{fs4.close(fd,closeErr=>{callback&&callback(futimesErr||closeErr)})})})}function utimesMillisSync(path,atime,mtime){let fd=fs4.openSync(path,"r+");return fs4.futimesSync(fd,atime,mtime),fs4.closeSync(fd)}module.exports={utimesMillis,utimesMillisSync}}});var require_stat=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/stat.js"(exports,module){"use strict";var fs4=require_fs(),path=__require("path"),util=__require("util");function getStats(src,dest,opts){let statFunc=opts.dereference?file=>fs4.stat(file,{bigint:!0}):file=>fs4.lstat(file,{bigint:!0});return Promise.all([statFunc(src),statFunc(dest).catch(err=>{if(err.code==="ENOENT")return null;throw err})]).then(([srcStat,destStat])=>({srcStat,destStat}))}function getStatsSync(src,dest,opts){let destStat,statFunc=opts.dereference?file=>fs4.statSync(file,{bigint:!0}):file=>fs4.lstatSync(file,{bigint:!0}),srcStat=statFunc(src);try{destStat=statFunc(dest)}catch(err){if(err.code==="ENOENT")return{srcStat,destStat:null};throw err}return{srcStat,destStat}}function checkPaths(src,dest,funcName,opts,cb){util.callbackify(getStats)(src,dest,opts,(err,stats)=>{if(err)return cb(err);let{srcStat,destStat}=stats;if(destStat){if(areIdentical(srcStat,destStat)){let srcBaseName=path.basename(src),destBaseName=path.basename(dest);return funcName==="move"&&srcBaseName!==destBaseName&&srcBaseName.toLowerCase()===destBaseName.toLowerCase()?cb(null,{srcStat,destStat,isChangingCase:!0}):cb(new Error("Source and destination must not be the same."))}if(srcStat.isDirectory()&&!destStat.isDirectory())return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));if(!srcStat.isDirectory()&&destStat.isDirectory())return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))}return srcStat.isDirectory()&&isSrcSubdir(src,dest)?cb(new Error(errMsg(src,dest,funcName))):cb(null,{srcStat,destStat})})}function checkPathsSync(src,dest,funcName,opts){let{srcStat,destStat}=getStatsSync(src,dest,opts);if(destStat){if(areIdentical(srcStat,destStat)){let srcBaseName=path.basename(src),destBaseName=path.basename(dest);if(funcName==="move"&&srcBaseName!==destBaseName&&srcBaseName.toLowerCase()===destBaseName.toLowerCase())return{srcStat,destStat,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(srcStat.isDirectory()&&!destStat.isDirectory())throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);if(!srcStat.isDirectory()&&destStat.isDirectory())throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)}if(srcStat.isDirectory()&&isSrcSubdir(src,dest))throw new Error(errMsg(src,dest,funcName));return{srcStat,destStat}}function checkParentPaths(src,srcStat,dest,funcName,cb){let srcParent=path.resolve(path.dirname(src)),destParent=path.resolve(path.dirname(dest));if(destParent===srcParent||destParent===path.parse(destParent).root)return cb();fs4.stat(destParent,{bigint:!0},(err,destStat)=>err?err.code==="ENOENT"?cb():cb(err):areIdentical(srcStat,destStat)?cb(new Error(errMsg(src,dest,funcName))):checkParentPaths(src,srcStat,destParent,funcName,cb))}function checkParentPathsSync(src,srcStat,dest,funcName){let srcParent=path.resolve(path.dirname(src)),destParent=path.resolve(path.dirname(dest));if(destParent===srcParent||destParent===path.parse(destParent).root)return;let destStat;try{destStat=fs4.statSync(destParent,{bigint:!0})}catch(err){if(err.code==="ENOENT")return;throw err}if(areIdentical(srcStat,destStat))throw new Error(errMsg(src,dest,funcName));return checkParentPathsSync(src,srcStat,destParent,funcName)}function areIdentical(srcStat,destStat){return destStat.ino&&destStat.dev&&destStat.ino===srcStat.ino&&destStat.dev===srcStat.dev}function isSrcSubdir(src,dest){let srcArr=path.resolve(src).split(path.sep).filter(i=>i),destArr=path.resolve(dest).split(path.sep).filter(i=>i);return srcArr.reduce((acc,cur,i)=>acc&&destArr[i]===cur,!0)}function errMsg(src,dest,funcName){return`Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`}module.exports={checkPaths,checkPathsSync,checkParentPaths,checkParentPathsSync,isSrcSubdir,areIdentical}}});var require_copy_sync=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports,module){"use strict";var fs4=require_graceful_fs(),path=__require("path"),mkdirsSync=require_mkdirs().mkdirsSync,utimesMillisSync=require_utimes().utimesMillisSync,stat2=require_stat();function copySync(src,dest,opts){typeof opts=="function"&&(opts={filter:opts}),opts=opts||{},opts.clobber="clobber"in opts?!!opts.clobber:!0,opts.overwrite="overwrite"in opts?!!opts.overwrite:opts.clobber,opts.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
7
+ import{require_lib}from"./chunk-ROPQIBWJ.js";import{require_graceful_fs}from"./chunk-VKPZP4LC.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{printAlignedLabel}from"./chunk-N7Q2IESO.js";import{getUser}from"./chunk-VSE5BAPP.js";import{getTeamByIdOrSlug}from"./chunk-VOZEB6PD.js";import{InvalidToken,ProjectNotFound,code,isAPIError}from"./chunk-AZULOP7M.js";import{emoji,link_default,output_manager_default,prependEmoji,require_build_utils}from"./chunk-75IAMKGV.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_universalify=__commonJS({"../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports){"use strict";exports.fromCallback=function(fn){return Object.defineProperty(function(...args){if(typeof args[args.length-1]=="function")fn.apply(this,args);else return new Promise((resolve4,reject)=>{args.push((err,res)=>err!=null?reject(err):resolve4(res)),fn.apply(this,args)})},"name",{value:fn.name})};exports.fromPromise=function(fn){return Object.defineProperty(function(...args){let cb=args[args.length-1];if(typeof cb!="function")return fn.apply(this,args);args.pop(),fn.apply(this,args).then(r=>cb(null,r),cb)},"name",{value:fn.name})}}});var require_fs=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/fs/index.js"(exports){"use strict";var u=require_universalify().fromCallback,fs4=require_graceful_fs(),api=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(key=>typeof fs4[key]=="function");Object.assign(exports,fs4);api.forEach(method=>{exports[method]=u(fs4[method])});exports.realpath.native=u(fs4.realpath.native);exports.exists=function(filename,callback){return typeof callback=="function"?fs4.exists(filename,callback):new Promise(resolve4=>fs4.exists(filename,resolve4))};exports.read=function(fd,buffer,offset,length,position,callback){return typeof callback=="function"?fs4.read(fd,buffer,offset,length,position,callback):new Promise((resolve4,reject)=>{fs4.read(fd,buffer,offset,length,position,(err,bytesRead,buffer2)=>{if(err)return reject(err);resolve4({bytesRead,buffer:buffer2})})})};exports.write=function(fd,buffer,...args){return typeof args[args.length-1]=="function"?fs4.write(fd,buffer,...args):new Promise((resolve4,reject)=>{fs4.write(fd,buffer,...args,(err,bytesWritten,buffer2)=>{if(err)return reject(err);resolve4({bytesWritten,buffer:buffer2})})})};typeof fs4.writev=="function"&&(exports.writev=function(fd,buffers,...args){return typeof args[args.length-1]=="function"?fs4.writev(fd,buffers,...args):new Promise((resolve4,reject)=>{fs4.writev(fd,buffers,...args,(err,bytesWritten,buffers2)=>{if(err)return reject(err);resolve4({bytesWritten,buffers:buffers2})})})})}});var require_utils=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports,module){"use strict";var path=__require("path");module.exports.checkPath=function(pth){if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let error=new Error(`Path contains invalid characters: ${pth}`);throw error.code="EINVAL",error}}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports,module){"use strict";var fs4=require_fs(),{checkPath}=require_utils(),getMode=options=>{let defaults={mode:511};return typeof options=="number"?options:{...defaults,...options}.mode};module.exports.makeDir=async(dir,options)=>(checkPath(dir),fs4.mkdir(dir,{mode:getMode(options),recursive:!0}));module.exports.makeDirSync=(dir,options)=>(checkPath(dir),fs4.mkdirSync(dir,{mode:getMode(options),recursive:!0}))}});var require_mkdirs=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports,module){"use strict";var u=require_universalify().fromPromise,{makeDir:_makeDir,makeDirSync}=require_make_dir(),makeDir=u(_makeDir);module.exports={mkdirs:makeDir,mkdirsSync:makeDirSync,mkdirp:makeDir,mkdirpSync:makeDirSync,ensureDir:makeDir,ensureDirSync:makeDirSync}}});var require_utimes=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/utimes.js"(exports,module){"use strict";var fs4=require_graceful_fs();function utimesMillis(path,atime,mtime,callback){fs4.open(path,"r+",(err,fd)=>{if(err)return callback(err);fs4.futimes(fd,atime,mtime,futimesErr=>{fs4.close(fd,closeErr=>{callback&&callback(futimesErr||closeErr)})})})}function utimesMillisSync(path,atime,mtime){let fd=fs4.openSync(path,"r+");return fs4.futimesSync(fd,atime,mtime),fs4.closeSync(fd)}module.exports={utimesMillis,utimesMillisSync}}});var require_stat=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/stat.js"(exports,module){"use strict";var fs4=require_fs(),path=__require("path"),util=__require("util");function getStats(src,dest,opts){let statFunc=opts.dereference?file=>fs4.stat(file,{bigint:!0}):file=>fs4.lstat(file,{bigint:!0});return Promise.all([statFunc(src),statFunc(dest).catch(err=>{if(err.code==="ENOENT")return null;throw err})]).then(([srcStat,destStat])=>({srcStat,destStat}))}function getStatsSync(src,dest,opts){let destStat,statFunc=opts.dereference?file=>fs4.statSync(file,{bigint:!0}):file=>fs4.lstatSync(file,{bigint:!0}),srcStat=statFunc(src);try{destStat=statFunc(dest)}catch(err){if(err.code==="ENOENT")return{srcStat,destStat:null};throw err}return{srcStat,destStat}}function checkPaths(src,dest,funcName,opts,cb){util.callbackify(getStats)(src,dest,opts,(err,stats)=>{if(err)return cb(err);let{srcStat,destStat}=stats;if(destStat){if(areIdentical(srcStat,destStat)){let srcBaseName=path.basename(src),destBaseName=path.basename(dest);return funcName==="move"&&srcBaseName!==destBaseName&&srcBaseName.toLowerCase()===destBaseName.toLowerCase()?cb(null,{srcStat,destStat,isChangingCase:!0}):cb(new Error("Source and destination must not be the same."))}if(srcStat.isDirectory()&&!destStat.isDirectory())return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));if(!srcStat.isDirectory()&&destStat.isDirectory())return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))}return srcStat.isDirectory()&&isSrcSubdir(src,dest)?cb(new Error(errMsg(src,dest,funcName))):cb(null,{srcStat,destStat})})}function checkPathsSync(src,dest,funcName,opts){let{srcStat,destStat}=getStatsSync(src,dest,opts);if(destStat){if(areIdentical(srcStat,destStat)){let srcBaseName=path.basename(src),destBaseName=path.basename(dest);if(funcName==="move"&&srcBaseName!==destBaseName&&srcBaseName.toLowerCase()===destBaseName.toLowerCase())return{srcStat,destStat,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(srcStat.isDirectory()&&!destStat.isDirectory())throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);if(!srcStat.isDirectory()&&destStat.isDirectory())throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)}if(srcStat.isDirectory()&&isSrcSubdir(src,dest))throw new Error(errMsg(src,dest,funcName));return{srcStat,destStat}}function checkParentPaths(src,srcStat,dest,funcName,cb){let srcParent=path.resolve(path.dirname(src)),destParent=path.resolve(path.dirname(dest));if(destParent===srcParent||destParent===path.parse(destParent).root)return cb();fs4.stat(destParent,{bigint:!0},(err,destStat)=>err?err.code==="ENOENT"?cb():cb(err):areIdentical(srcStat,destStat)?cb(new Error(errMsg(src,dest,funcName))):checkParentPaths(src,srcStat,destParent,funcName,cb))}function checkParentPathsSync(src,srcStat,dest,funcName){let srcParent=path.resolve(path.dirname(src)),destParent=path.resolve(path.dirname(dest));if(destParent===srcParent||destParent===path.parse(destParent).root)return;let destStat;try{destStat=fs4.statSync(destParent,{bigint:!0})}catch(err){if(err.code==="ENOENT")return;throw err}if(areIdentical(srcStat,destStat))throw new Error(errMsg(src,dest,funcName));return checkParentPathsSync(src,srcStat,destParent,funcName)}function areIdentical(srcStat,destStat){return destStat.ino&&destStat.dev&&destStat.ino===srcStat.ino&&destStat.dev===srcStat.dev}function isSrcSubdir(src,dest){let srcArr=path.resolve(src).split(path.sep).filter(i=>i),destArr=path.resolve(dest).split(path.sep).filter(i=>i);return srcArr.reduce((acc,cur,i)=>acc&&destArr[i]===cur,!0)}function errMsg(src,dest,funcName){return`Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`}module.exports={checkPaths,checkPathsSync,checkParentPaths,checkParentPathsSync,isSrcSubdir,areIdentical}}});var require_copy_sync=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports,module){"use strict";var fs4=require_graceful_fs(),path=__require("path"),mkdirsSync=require_mkdirs().mkdirsSync,utimesMillisSync=require_utimes().utimesMillisSync,stat2=require_stat();function copySync(src,dest,opts){typeof opts=="function"&&(opts={filter:opts}),opts=opts||{},opts.clobber="clobber"in opts?!!opts.clobber:!0,opts.overwrite="overwrite"in opts?!!opts.overwrite:opts.clobber,opts.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
8
8
 
9
9
  see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat,destStat}=stat2.checkPathsSync(src,dest,"copy",opts);return stat2.checkParentPathsSync(src,srcStat,dest,"copy"),handleFilterAndCopy(destStat,src,dest,opts)}function handleFilterAndCopy(destStat,src,dest,opts){if(opts.filter&&!opts.filter(src,dest))return;let destParent=path.dirname(dest);return fs4.existsSync(destParent)||mkdirsSync(destParent),getStats(destStat,src,dest,opts)}function startCopy(destStat,src,dest,opts){if(!(opts.filter&&!opts.filter(src,dest)))return getStats(destStat,src,dest,opts)}function getStats(destStat,src,dest,opts){let srcStat=(opts.dereference?fs4.statSync:fs4.lstatSync)(src);if(srcStat.isDirectory())return onDir(srcStat,destStat,src,dest,opts);if(srcStat.isFile()||srcStat.isCharacterDevice()||srcStat.isBlockDevice())return onFile(srcStat,destStat,src,dest,opts);if(srcStat.isSymbolicLink())return onLink(destStat,src,dest,opts);throw srcStat.isSocket()?new Error(`Cannot copy a socket file: ${src}`):srcStat.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${src}`):new Error(`Unknown file: ${src}`)}function onFile(srcStat,destStat,src,dest,opts){return destStat?mayCopyFile(srcStat,src,dest,opts):copyFile(srcStat,src,dest,opts)}function mayCopyFile(srcStat,src,dest,opts){if(opts.overwrite)return fs4.unlinkSync(dest),copyFile(srcStat,src,dest,opts);if(opts.errorOnExist)throw new Error(`'${dest}' already exists`)}function copyFile(srcStat,src,dest,opts){return fs4.copyFileSync(src,dest),opts.preserveTimestamps&&handleTimestamps(srcStat.mode,src,dest),setDestMode(dest,srcStat.mode)}function handleTimestamps(srcMode,src,dest){return fileIsNotWritable(srcMode)&&makeFileWritable(dest,srcMode),setDestTimestamps(src,dest)}function fileIsNotWritable(srcMode){return(srcMode&128)===0}function makeFileWritable(dest,srcMode){return setDestMode(dest,srcMode|128)}function setDestMode(dest,srcMode){return fs4.chmodSync(dest,srcMode)}function setDestTimestamps(src,dest){let updatedSrcStat=fs4.statSync(src);return utimesMillisSync(dest,updatedSrcStat.atime,updatedSrcStat.mtime)}function onDir(srcStat,destStat,src,dest,opts){return destStat?copyDir(src,dest,opts):mkDirAndCopy(srcStat.mode,src,dest,opts)}function mkDirAndCopy(srcMode,src,dest,opts){return fs4.mkdirSync(dest),copyDir(src,dest,opts),setDestMode(dest,srcMode)}function copyDir(src,dest,opts){fs4.readdirSync(src).forEach(item=>copyDirItem(item,src,dest,opts))}function copyDirItem(item,src,dest,opts){let srcItem=path.join(src,item),destItem=path.join(dest,item),{destStat}=stat2.checkPathsSync(srcItem,destItem,"copy",opts);return startCopy(destStat,srcItem,destItem,opts)}function onLink(destStat,src,dest,opts){let resolvedSrc=fs4.readlinkSync(src);if(opts.dereference&&(resolvedSrc=path.resolve(process.cwd(),resolvedSrc)),destStat){let resolvedDest;try{resolvedDest=fs4.readlinkSync(dest)}catch(err){if(err.code==="EINVAL"||err.code==="UNKNOWN")return fs4.symlinkSync(resolvedSrc,dest);throw err}if(opts.dereference&&(resolvedDest=path.resolve(process.cwd(),resolvedDest)),stat2.isSrcSubdir(resolvedSrc,resolvedDest))throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);if(fs4.statSync(dest).isDirectory()&&stat2.isSrcSubdir(resolvedDest,resolvedSrc))throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);return copyLink(resolvedSrc,dest)}else return fs4.symlinkSync(resolvedSrc,dest)}function copyLink(resolvedSrc,dest){return fs4.unlinkSync(dest),fs4.symlinkSync(resolvedSrc,dest)}module.exports=copySync}});var require_copy_sync2=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy-sync/index.js"(exports,module){"use strict";module.exports={copySync:require_copy_sync()}}});var require_path_exists=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/path-exists/index.js"(exports,module){"use strict";var u=require_universalify().fromPromise,fs4=require_fs();function pathExists2(path){return fs4.access(path).then(()=>!0).catch(()=>!1)}module.exports={pathExists:u(pathExists2),pathExistsSync:fs4.existsSync}}});var require_copy=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy/copy.js"(exports,module){"use strict";var fs4=require_graceful_fs(),path=__require("path"),mkdirs=require_mkdirs().mkdirs,pathExists2=require_path_exists().pathExists,utimesMillis=require_utimes().utimesMillis,stat2=require_stat();function copy(src,dest,opts,cb){typeof opts=="function"&&!cb?(cb=opts,opts={}):typeof opts=="function"&&(opts={filter:opts}),cb=cb||function(){},opts=opts||{},opts.clobber="clobber"in opts?!!opts.clobber:!0,opts.overwrite="overwrite"in opts?!!opts.overwrite:opts.clobber,opts.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
10
10
 
@@ -16,14 +16,14 @@ import{require_lib}from"./chunk-B4ATVYZW.js";import{require_graceful_fs}from"./c
16
16
  ${(0,import_error_utils.errorToString)(error)}`);return}let gitConfigPath=join2(gitRoot||directory,".git/config"),remoteUrl;if(project?.link){let{repo}=project.link,remoteUrls=await getRemoteUrls(gitConfigPath);if(remoteUrls)for(let urlValue of Object.values(remoteUrls))urlValue.includes(repo)&&(remoteUrl=urlValue)}remoteUrl||(remoteUrl=await getOriginUrl(gitConfigPath));let[commitResult,dirtyResult]=await metadata;if(commitResult.status==="rejected"){output_manager_default.debug(`Failed to get last commit. The directory is likely not a Git repo, there are no latest commits, or it is corrupted.
17
17
  ${commitResult.reason}`);return}if(dirtyResult.status==="rejected"){output_manager_default.debug(`Failed to determine if Git repo has been modified:
18
18
  ${dirtyResult.reason}`);return}let dirty=dirtyResult.value,commit=commitResult.value;return{remoteUrl:remoteUrl||void 0,commitAuthorName:commit.author.name,commitAuthorEmail:commit.author.email,commitMessage:commit.subject,commitRef:branch,commitSha:commit.hash,dirty,rootDirectory:getRootDirectory(directory,gitRoot)}}function getRootDirectory(directory,gitRoot=getGitRootDirectory({cwd:directory})){if(!gitRoot)return;let rootDirectory=relative(gitRoot,resolve3(directory)).replace(/\\/g,"/");if(!(rootDirectory===".."||rootDirectory.startsWith("../")))return rootDirectory==="."?"":rootDirectory}async function getLastCommit(directory,git){let commit=await execFileAsync(git,["log","-1","--format=%H%x00%s%x00%an%x00%ae"],{cwd:directory});if(commit.stderr)throw new Error(commit.stderr);let[hash,subject,name,email]=commit.stdout.replace(/\r?\n$/,"").split("\0");return{hash,subject,author:{name,email}}}async function isDirty(directory){let git=await getGitExecutable(directory);return new Promise((resolve4,reject)=>{execFile2(git,["--no-optional-locks","status","-s"],{cwd:directory},function(err,stdout,stderr){if(err)return reject(err);if(stderr!==void 0&&stderr.trim().length>0)return reject(new Error(stderr));resolve4(stdout.trim().length>0)})})}async function parseGitConfig(configPath){try{return import_ini.default.parse(await import_fs_extra.default.readFile(configPath,"utf-8"))}catch(err){output_manager_default.debug(`Error while parsing repo data: ${(0,import_error_utils.errorToString)(err)}`)}}function pluckRemoteUrls(gitConfig){let remoteUrls={};for(let key of Object.keys(gitConfig))if(key.includes("remote")){let remoteName=key.match(/(?<=").*(?=")/g)?.[0],remoteUrl=gitConfig[key]?.url;remoteName&&remoteUrl&&(remoteUrls[remoteName]=remoteUrl)}if(Object.keys(remoteUrls).length!==0)return remoteUrls}async function getRemoteUrls(configPath){let config=await parseGitConfig(configPath);return config?pluckRemoteUrls(config):void 0}function pluckOriginUrl(gitConfig){return gitConfig['remote "origin"']?.url}async function getOriginUrl(configPath){let gitConfig=await parseGitConfig(configPath);if(!gitConfig)return null;let originUrl=pluckOriginUrl(gitConfig);return originUrl||null}var import_fs_extra5=__toESM(require_lib2(),1);import os from"os";import{join as join6}from"path";var import_fs_extra4=__toESM(require_lib2(),1);import fs3 from"fs";import{join as join5,relative as relative2}from"path";import{promisify}from"util";async function getOrgById(client,orgId){if(orgId.startsWith("team_"))try{let team=await getTeamByIdOrSlug(client,orgId);return team?{type:"team",id:team.id,slug:team.slug}:null}catch(err){if(isAPIError(err)&&(err.status===404||err.code==="not_found"||err.code==="mock_unimplemented"))return null;throw err}let user=await getUser(client);return user.id!==orgId?null:{type:"user",id:orgId,slug:user.username}}var import_build_utils2=__toESM(require_build_utils(),1);var import_error_utils2=__toESM(require_dist(),1);var import_chalk=__toESM(require_source(),1),import_pluralize=__toESM(require_pluralize(),1),import_build_utils=__toESM(require_build_utils(),1),import_fs_extra2=__toESM(require_lib2(),1);import{homedir}from"os";import{basename,join as join3}from"path";var home=homedir();async function getRepoLink(client,cwd){let rootPath=await findRepoRoot(cwd);if(!rootPath)return;let repoConfigPath=join3(rootPath,VERCEL_DIR,VERCEL_DIR_REPO),repoConfig=await(0,import_fs_extra2.readJSON)(repoConfigPath).catch(err=>{if(err.code!=="ENOENT")throw err});return{rootPath,repoConfig,repoConfigPath}}async function resolveGitRemote(client,rootPath,{yes,existingRemoteName}){let gitConfigPath=getGitConfigPath({cwd:rootPath})??join3(rootPath,".git/config"),remoteUrls=await getRemoteUrls(gitConfigPath);if(!remoteUrls)return;let remoteName;if(existingRemoteName){if(remoteName=existingRemoteName,!remoteUrls[remoteName])throw new Error(`Git remote "${remoteName}" from repo.json no longer exists`)}else{let remoteNames=Object.keys(remoteUrls).sort();if(remoteNames.length===1)remoteName=remoteNames[0];else{let defaultRemote=remoteNames.includes("origin")?"origin":remoteNames[0];yes?remoteName=defaultRemote:remoteName=await client.input.select({message:"Which Git remote should be used?",choices:remoteNames.map(name=>({name,value:name})),default:defaultRemote})}}return{rootPath,remoteName,repoUrl:remoteUrls[remoteName]}}async function fetchProjectsForRepoUrl(client,repoUrl,orgId){let query=new URLSearchParams({repoUrl}),projectsIterator=client.fetchPaginated(`/v9/projects?${query}`,{accountId:orgId}),projects=[];for await(let chunk of projectsIterator)projects=projects.concat(chunk.projects);return projects}async function linkRepoProject(client,cwd,{project,orgId,orgSlug,remoteName,successEmoji="link"}){let repoLink=await getRepoLink(client,cwd);if(!repoLink)throw new Error("Could not determine Git repository root directory");let directory=(0,import_build_utils.normalizePath)(project.rootDirectory||"."),projectConfig={id:project.id,name:project.name,directory,orgId},filteredProjects=(repoLink.repoConfig?.projects??[]).filter(p=>p.id!==project.id&&(0,import_build_utils.normalizePath)(p.directory)!==directory),repoConfig={remoteName,projects:[...filteredProjects,projectConfig]};return await(0,import_fs_extra2.outputJSON)(repoLink.repoConfigPath,repoConfig,{spaces:2}),await writeReadme(repoLink.rootPath),await addToGitIgnore(repoLink.rootPath),output_manager_default.print(`
19
- `),printAlignedLabel("Linked",`${orgSlug}/${project.name}`,{gutter:"\u2713"}),{repoConfig,repoConfigPath:repoLink.repoConfigPath,rootPath:repoLink.rootPath}}async function discoverRepoProjects(client,rootPath,{yes,existingProjectIds,existingDirectories,existingRemoteName}){let{Separator}=await import("./esm-CXICLFA3.js"),{default:slugify}=await import("./slugify-O5DBATYT.js"),{default:selectOrg}=await import("./select-org-EL66MG67.js"),{default:createProject}=await import("./create-project-SRQGD4JY.js"),{repoInfoToUrl}=await import("./repo-info-to-url-SK3VX6UL.js"),{connectGitProvider,parseRepoUrl}=await import("./connect-git-provider-KLSBCSD2.js"),detectedProjectsPromise=import("./detect-projects-AWDCPVLE.js").then(({detectProjects})=>detectProjects(rootPath)).catch(err=>(output_manager_default.debug(`Failed to detect local projects: ${err}`),new Map)),confirmMessage=(existingRemoteName?"add":"link")==="add"?`Add Project(s) for Git repository at ${import_chalk.default.dim(`"${humanizePath(rootPath)}"`)}?`:`Link Git repository at ${import_chalk.default.dim(`"${humanizePath(rootPath)}"`)} to your Project(s)?`;if(!(yes||await client.input.confirm(confirmMessage,!0))){output_manager_default.print(` Canceled. Repository not linked.
19
+ `),printAlignedLabel("Linked",`${orgSlug}/${project.name}`,{gutter:"\u2713"}),{repoConfig,repoConfigPath:repoLink.repoConfigPath,rootPath:repoLink.rootPath}}async function discoverRepoProjects(client,rootPath,{yes,existingProjectIds,existingDirectories,existingRemoteName}){let{Separator}=await import("./esm-BYG5BWYH.js"),{default:slugify}=await import("./slugify-NMMUASYK.js"),{default:selectOrg}=await import("./select-org-SH4JT6RI.js"),{default:createProject}=await import("./create-project-IKCB6MB2.js"),{repoInfoToUrl}=await import("./repo-info-to-url-XQSULSEO.js"),{connectGitProvider,parseRepoUrl}=await import("./connect-git-provider-HW23GK35.js"),detectedProjectsPromise=import("./detect-projects-3CQ6ANGU.js").then(({detectProjects})=>detectProjects(rootPath)).catch(err=>(output_manager_default.debug(`Failed to detect local projects: ${err}`),new Map)),confirmMessage=(existingRemoteName?"add":"link")==="add"?`Add Project(s) for Git repository at ${import_chalk.default.dim(`"${humanizePath(rootPath)}"`)}?`:`Link Git repository at ${import_chalk.default.dim(`"${humanizePath(rootPath)}"`)} to your Project(s)?`;if(!(yes||await client.input.confirm(confirmMessage,!0))){output_manager_default.print(` Canceled. Repository not linked.
20
20
  `);return}let org=await selectOrg(client,"Which team?",yes);client.config.currentTeam=org.type==="team"?org.id:void 0;let remote=await resolveGitRemote(client,rootPath,{yes,existingRemoteName});if(!remote)throw new Error("Could not determine Git remote URLs");let{remoteName,repoUrl}=remote,parsedRepoUrl=parseRepoUrl(repoUrl);if(!parsedRepoUrl)throw new Error(`Failed to parse Git URL: ${repoUrl}`);let repoUrlLink=output_manager_default.link(repoUrl,repoInfoToUrl(parsedRepoUrl),{fallback:()=>link_default(repoUrl)});output_manager_default.spinner(`Fetching Projects for ${repoUrlLink} under ${import_chalk.default.bold(org.slug)}\u2026`);let detectedProjects=await detectedProjectsPromise,projects=await fetchProjectsForRepoUrl(client,repoUrl,org.id);(existingProjectIds||existingDirectories)&&(projects=projects.filter(p=>!(existingProjectIds?.has(p.id)||existingDirectories?.has((0,import_build_utils.normalizePath)(p.rootDirectory||"."))))),projects.length===0?output_manager_default.print(` No Projects are linked to ${repoUrlLink} under ${import_chalk.default.bold(org.slug)}.
21
21
  `):output_manager_default.print(` Found ${(0,import_pluralize.default)("Project",projects.length,!0)} linked to ${repoUrlLink} under ${import_chalk.default.bold(org.slug)}
22
22
  `);for(let project of projects)detectedProjects.delete(project.rootDirectory??"");if(existingDirectories)for(let dir of existingDirectories)detectedProjects.delete(dir==="."?"":dir);let detectedProjectsCount=Array.from(detectedProjects.values()).reduce((o,f)=>o+f.length,0);detectedProjectsCount>0&&output_manager_default.print(` Detected ${(0,import_pluralize.default)("new Project",detectedProjectsCount,!0)} that may be created.
23
23
  `);let selected;if(yes)selected=projects;else{let addSeparators=projects.length>0&&detectedProjectsCount>0;selected=await client.input.checkbox({message:`Which Projects should be ${projects.length?"linked to":"created"}?`,choices:[...addSeparators?[new Separator("----- Existing Projects -----")]:[],...projects.map(project=>{let dir=project.rootDirectory||".";return{name:`${org.slug}/${project.name} ${import_chalk.default.gray(`(${dir})`)}`,value:project,checked:!0}}),...addSeparators?[new Separator("----- New Projects to be created -----")]:[],...Array.from(detectedProjects.entries()).flatMap(([rootDirectory,frameworks])=>frameworks.map((framework,i)=>{let name=slugify([basename(rootDirectory)||basename(rootPath),i>0?framework.slug:""].filter(Boolean).join("-"));return{name:`${org.slug}/${name} ${import_chalk.default.gray(`(${rootDirectory||"."} \xB7 ${framework.name})`)}`,value:{newProject:!0,rootDirectory,name,framework},checked:projects.length===0}}))]})}if(selected.length===0){output_manager_default.print(` No Projects were selected. Repository not linked.
24
24
  `);return}for(let i=0;i<selected.length;i++){let selection=selected[i];if(!("newProject"in selection&&selection.newProject))continue;let orgAndName=`${org.slug}/${selection.name}`;output_manager_default.spinner(`Creating new Project: ${orgAndName}`),delete selection.newProject,selection.rootDirectory||delete selection.rootDirectory;let project=selected[i]=await createProject(client,{...selection,framework:selection.framework.slug});await connectGitProvider(client,project.id,parsedRepoUrl.provider,`${parsedRepoUrl.org}/${parsedRepoUrl.repo}`),output_manager_default.print(` Created new Project: ${output_manager_default.link(orgAndName,`https://vercel.com/${orgAndName}`,{fallback:!1})}
25
25
  `)}let repoProjects=selected.map(project=>{if(!("id"in project))throw new TypeError(`Not a Project: ${JSON.stringify(project)}`);return{id:project.id,name:project.name,directory:(0,import_build_utils.normalizePath)(project.rootDirectory||"."),orgId:org.id}});return{remoteName,projects:repoProjects,orgSlug:org.slug}}async function ensureRepoLink(client,cwd,{yes,overwrite}){let repoLink=await getRepoLink(client,cwd);if(repoLink)output_manager_default.debug(`Found Git repository root directory: ${repoLink.rootPath}`);else throw new Error("Could not determine Git repository root directory");let{rootPath,repoConfig,repoConfigPath}=repoLink;if(overwrite||!repoConfig){let result=await discoverRepoProjects(client,rootPath,{yes});if(!result)return;repoConfig={remoteName:result.remoteName,projects:result.projects},await(0,import_fs_extra2.outputJSON)(repoConfigPath,repoConfig,{spaces:2}),await writeReadme(rootPath),await addToGitIgnore(rootPath),printAlignedLabel("Linked",`${(0,import_pluralize.default)("Project",result.projects.length,!0)} under ${result.orgSlug}`,{gutter:"\u2713"})}return{repoConfig,repoConfigPath,rootPath}}async function addRepoLink(client,cwd,{yes}){let repoLink=await getRepoLink(client,cwd);if(!repoLink)throw new Error("Could not determine Git repository root directory");let{rootPath,repoConfig,repoConfigPath}=repoLink;if(!repoConfig)throw new Error("No existing repository link found. Run `vc link --repo` first to link the repository.");output_manager_default.debug(`Found Git repository root directory: ${rootPath}`);let existingProjectIds=new Set(repoConfig.projects.map(p=>p.id)),existingDirectories=new Set(repoConfig.projects.map(p=>p.directory)),result=await discoverRepoProjects(client,rootPath,{yes,existingProjectIds,existingDirectories,existingRemoteName:repoConfig.remoteName});if(!result)return;if(result.projects.length===0)return output_manager_default.print(` No new Projects were added.
26
- `),{repoConfig,repoConfigPath,rootPath};let mergedProjects=[...repoConfig.projects];for(let project of result.projects)existingProjectIds.has(project.id)||mergedProjects.push(project);let updatedConfig={...repoConfig,projects:mergedProjects};return await(0,import_fs_extra2.outputJSON)(repoConfigPath,updatedConfig,{spaces:2}),printAlignedLabel("Added",`${(0,import_pluralize.default)("Project",result.projects.length,!0)} under ${result.orgSlug}`,{gutter:"\u2713"}),{repoConfig:updatedConfig,repoConfigPath,rootPath}}async function findRepoRoot(start){let{debug}=output_manager_default,REPO_JSON_PATH=join3(VERCEL_DIR,VERCEL_DIR_REPO);for(let current of(0,import_build_utils.traverseUpDirectories)({start})){if(current===home){debug("Arrived at home directory");break}let repoConfigPath=join3(current,REPO_JSON_PATH);if(await(0,import_fs_extra2.lstat)(repoConfigPath).catch(err=>{if(err.code!=="ENOENT")throw err}))return debug(`Found "${REPO_JSON_PATH}" - detected "${current}" as repo root`),current}let gitRoot=getGitRootDirectory({cwd:start});if(gitRoot)return debug(`Found git root via "git rev-parse --show-toplevel" - detected "${gitRoot}" as repo root`),gitRoot;for(let current of(0,import_build_utils.traverseUpDirectories)({start})){if(current===home){debug("Arrived at home directory");break}let gitPath=join3(current,".git");if(await(0,import_fs_extra2.lstat)(gitPath).catch(err=>{if(err.code!=="ENOENT")throw err}))return debug(`Found ".git" - detected "${current}" as repo root`),current}debug("Aborting search for repo root")}function sortByDirectory(a,b){let aParts=a.directory.split("/");return b.directory.split("/").length-aParts.length}function findProjectsFromPath(projects,path){let normalizedPath=(0,import_build_utils.normalizePath)(path),matches=projects.slice().sort(sortByDirectory).filter(project=>project.directory==="."?!0:normalizedPath===project.directory||normalizedPath.startsWith(`${project.directory}/`)),firstMatch=matches[0];return firstMatch?matches.filter(match=>match.directory===firstMatch.directory):[]}var import_chalk2=__toESM(require_source(),1),import_fs_extra3=__toESM(require_lib2(),1);import{stat}from"fs/promises";import{join as join4,dirname}from"path";async function findProjectRoot(startDir){let cwdDev;try{cwdDev=(await stat(startDir)).dev}catch{return null}let dir=dirname(startDir);for(;dirname(dir)!==dir;){try{if((await stat(dir)).dev!==cwdDev)return null}catch{return null}let hasVercelDir=await(0,import_fs_extra3.pathExists)(join4(dir,".vercel")),hasVercelJson=await(0,import_fs_extra3.pathExists)(join4(dir,"vercel.json")),hasVercelToml=await(0,import_fs_extra3.pathExists)(join4(dir,"vercel.toml")),hasGit=await(0,import_fs_extra3.pathExists)(join4(dir,".git"));if(hasVercelDir||hasVercelJson||hasVercelToml||hasGit)return dir;dir=dirname(dir)}return null}async function resolveProjectCwd(cwd){let projectRoot=await findProjectRoot(cwd);if(!projectRoot||projectRoot===cwd)return cwd;let{isExperimentalServicesEnabled,tryDetectServices}=await import("./detect-services-E2TWAKQS.js");if(!await isExperimentalServicesEnabled(projectRoot))return cwd;let result=await tryDetectServices(projectRoot);return result&&(result.services?.length??0)>0?(output_manager_default.debug(`Running from project root: ${import_chalk2.default.cyan(projectRoot)}`),projectRoot):cwd}var readFile=promisify(fs3.readFile),writeFile=promisify(fs3.writeFile),VERCEL_DIR=".vercel",VERCEL_DIR_FALLBACK=".now",VERCEL_DIR_README="README.txt",VERCEL_DIR_PROJECT="project.json",VERCEL_DIR_REPO="repo.json";function isOwnerLookupUnavailableLink(link){return"ownerLookupUnavailable"in link&&link.ownerLookupUnavailable===!0}function isRemoteLookupSkippedLink(link){return"remoteLookupSkipped"in link&&link.remoteLookupSkipped===!0}function isOwnerLookupUnavailableError(error){return isAPIError(error)&&error.status===403&&error.code==="team_unauthorized"}function isValidProjectLink(value){if(!value||typeof value!="object"||Array.isArray(value))return!1;let link=value;return typeof link.projectId=="string"&&link.projectId.length>0&&typeof link.orgId=="string"&&link.orgId.length>0&&(link.projectName===void 0||typeof link.projectName=="string"&&link.projectName.length>0)}function getVercelDirectory(cwd){let possibleDirs=[join5(cwd,VERCEL_DIR),join5(cwd,VERCEL_DIR_FALLBACK)],existingDirs=possibleDirs.filter(d=>isDirectory(d));if(existingDirs.length>1)throw new import_build_utils2.NowBuildError({code:"CONFLICTING_CONFIG_DIRECTORIES",message:"Both `.vercel` and `.now` directories exist. Please remove the `.now` directory.",link:"https://vercel.link/combining-old-and-new-config"});return existingDirs[0]||possibleDirs[0]}async function getProjectLink(client,path,projectName,projectNameIsExplicit){let dirLink=await getLinkFromDir(getVercelDirectory(path));return dirLink&&(!projectNameIsExplicit||!projectName||dirLink.projectId===projectName||dirLink.projectName===projectName)?dirLink:await getProjectLinkFromRepoLink(client,path,projectName,projectNameIsExplicit)}async function getProjectLinkFromRepoLink(client,path,projectName,projectNameIsExplicit){let repoLink=await getRepoLink(client,path);if(!repoLink?.repoConfig)return null;let projects=findProjectsFromPath(repoLink.repoConfig.projects,relative2(repoLink.rootPath,path)),project;if(projectName&&projectNameIsExplicit)project=repoLink.repoConfig.projects.find(p=>p.id===projectName||p.name===projectName);else if(projects.length===1)project=projects[0];else{let selectableProjects=projects.length>0?projects:repoLink.repoConfig.projects;if(projectName&&(project=selectableProjects.find(p=>p.id===projectName||p.name===projectName)),!project)if(client.nonInteractive)if(selectableProjects.length===1)project=selectableProjects[0];else return null;else project=await client.input.select({message:"Please select a Project:",choices:selectableProjects.map(p=>({value:p,name:p.name}))})}if(project){let orgId=project.orgId??repoLink.repoConfig.orgId;if(!orgId){let projectInfo=[project.name?`name: "${project.name}"`:"",project.directory?`directory: "${project.directory}"`:""].filter(Boolean).join(", "),details=projectInfo?` Project: { ${projectInfo} }.`:"";throw new Error(`Could not determine org ID from repo.json config at "${repoLink.repoConfigPath}".${details} Please re-link the repository.`)}return{repoRoot:repoLink.rootPath,orgId,projectId:project.id,projectName:project.name,projectRootDirectory:project.directory}}return null}function getLinkedProjectIdSync(dir){try{let link=JSON.parse(fs3.readFileSync(join5(dir,VERCEL_DIR_PROJECT),"utf8"));return isValidProjectLink(link)?link.projectId:void 0}catch{return}}async function getLinkFromDir(dir){try{let json=await readFile(join5(dir,VERCEL_DIR_PROJECT),"utf8"),link=JSON.parse(json);if(!isValidProjectLink(link)){let raw=link,projectId=raw.projectId,orgId=raw.orgId;if(!(typeof projectId=="string"&&projectId.length>0&&typeof orgId=="string"&&orgId.length>0))return null;throw new Error(`Project Settings are invalid. To link your project again, remove the ${dir} directory.`)}return link}catch(err){if((0,import_error_utils2.isErrnoException)(err)&&err.code&&["ENOENT","ENOTDIR"].includes(err.code))return null;throw(0,import_error_utils2.isError)(err)&&err.name==="SyntaxError"?new Error(`Project Settings could not be retrieved. To link your project again, remove the ${dir} directory.`):err}}async function hasLocalProjectLink(client,cwd){try{if(await getLinkFromDir(getVercelDirectory(cwd)))return!0}catch{}try{let repoLink=await getRepoLink(client,cwd);return repoLink?.repoConfig?findProjectsFromPath(repoLink.repoConfig.projects,relative2(repoLink.rootPath,cwd)).length>0:!1}catch{return!1}}async function hasProjectLink(client,projectLink,path){let VERCEL_ORG_ID=(0,import_build_utils2.getPlatformEnv)("ORG_ID"),VERCEL_PROJECT_ID=(0,import_build_utils2.getPlatformEnv)("PROJECT_ID");if(VERCEL_ORG_ID===projectLink.orgId&&VERCEL_PROJECT_ID===projectLink.projectId)return!0;let repoLink=await getRepoLink(client,path);if(repoLink?.repoConfig){let matchingProject=repoLink.repoConfig.projects.find(p=>p.id===projectLink.projectId);if(matchingProject){let orgId=matchingProject.orgId??repoLink.repoConfig.orgId;if(!orgId)throw new Error(`Invalid "repo.json": missing "orgId" for project "${matchingProject.id}" and no top-level "orgId" is defined.`);if(orgId===projectLink.orgId)return!0}}let link=await getLinkFromDir(getVercelDirectory(path));return!!(link&&link.orgId===projectLink.orgId&&link.projectId===projectLink.projectId)}async function getLinkedProject(client,options={}){let path=options.cwd??client.cwd;options.skipProjectRootResolution||(path=await resolveProjectCwd(path));let VERCEL_ORG_ID=(0,import_build_utils2.getPlatformEnv)("ORG_ID"),VERCEL_PROJECT_ID=(0,import_build_utils2.getPlatformEnv)("PROJECT_ID"),shouldUseEnv=!!(VERCEL_ORG_ID&&VERCEL_PROJECT_ID),projectName=options.projectName,projectNameIsExplicit=options.projectNameIsExplicit===!0,explicitProjectName=projectNameIsExplicit?projectName:void 0,hasExplicitProject=!!explicitProjectName,shouldUseEnvContext=shouldUseEnv&&!hasExplicitProject;if(!hasExplicitProject&&(VERCEL_ORG_ID||VERCEL_PROJECT_ID)&&!shouldUseEnv)return output_manager_default.error(`You specified ${VERCEL_ORG_ID?"`VERCEL_ORG_ID`":"`VERCEL_PROJECT_ID`"} but you forgot to specify ${VERCEL_ORG_ID?"`VERCEL_PROJECT_ID`":"`VERCEL_ORG_ID`"}. You need to specify both to deploy to a custom project.
26
+ `),{repoConfig,repoConfigPath,rootPath};let mergedProjects=[...repoConfig.projects];for(let project of result.projects)existingProjectIds.has(project.id)||mergedProjects.push(project);let updatedConfig={...repoConfig,projects:mergedProjects};return await(0,import_fs_extra2.outputJSON)(repoConfigPath,updatedConfig,{spaces:2}),printAlignedLabel("Added",`${(0,import_pluralize.default)("Project",result.projects.length,!0)} under ${result.orgSlug}`,{gutter:"\u2713"}),{repoConfig:updatedConfig,repoConfigPath,rootPath}}async function findRepoRoot(start){let{debug}=output_manager_default,REPO_JSON_PATH=join3(VERCEL_DIR,VERCEL_DIR_REPO);for(let current of(0,import_build_utils.traverseUpDirectories)({start})){if(current===home){debug("Arrived at home directory");break}let repoConfigPath=join3(current,REPO_JSON_PATH);if(await(0,import_fs_extra2.lstat)(repoConfigPath).catch(err=>{if(err.code!=="ENOENT")throw err}))return debug(`Found "${REPO_JSON_PATH}" - detected "${current}" as repo root`),current}let gitRoot=getGitRootDirectory({cwd:start});if(gitRoot)return debug(`Found git root via "git rev-parse --show-toplevel" - detected "${gitRoot}" as repo root`),gitRoot;for(let current of(0,import_build_utils.traverseUpDirectories)({start})){if(current===home){debug("Arrived at home directory");break}let gitPath=join3(current,".git");if(await(0,import_fs_extra2.lstat)(gitPath).catch(err=>{if(err.code!=="ENOENT")throw err}))return debug(`Found ".git" - detected "${current}" as repo root`),current}debug("Aborting search for repo root")}function sortByDirectory(a,b){let aParts=a.directory.split("/");return b.directory.split("/").length-aParts.length}function findProjectsFromPath(projects,path){let normalizedPath=(0,import_build_utils.normalizePath)(path),matches=projects.slice().sort(sortByDirectory).filter(project=>project.directory==="."?!0:normalizedPath===project.directory||normalizedPath.startsWith(`${project.directory}/`)),firstMatch=matches[0];return firstMatch?matches.filter(match=>match.directory===firstMatch.directory):[]}var import_chalk2=__toESM(require_source(),1),import_fs_extra3=__toESM(require_lib2(),1);import{stat}from"fs/promises";import{join as join4,dirname}from"path";async function findProjectRoot(startDir){let cwdDev;try{cwdDev=(await stat(startDir)).dev}catch{return null}let dir=dirname(startDir);for(;dirname(dir)!==dir;){try{if((await stat(dir)).dev!==cwdDev)return null}catch{return null}let hasVercelDir=await(0,import_fs_extra3.pathExists)(join4(dir,".vercel")),hasVercelJson=await(0,import_fs_extra3.pathExists)(join4(dir,"vercel.json")),hasVercelToml=await(0,import_fs_extra3.pathExists)(join4(dir,"vercel.toml")),hasGit=await(0,import_fs_extra3.pathExists)(join4(dir,".git"));if(hasVercelDir||hasVercelJson||hasVercelToml||hasGit)return dir;dir=dirname(dir)}return null}async function resolveProjectCwd(cwd){let projectRoot=await findProjectRoot(cwd);if(!projectRoot||projectRoot===cwd)return cwd;let{isExperimentalServicesEnabled,tryDetectServices}=await import("./detect-services-22KZAGH2.js");if(!await isExperimentalServicesEnabled(projectRoot))return cwd;let result=await tryDetectServices(projectRoot);return result&&(result.services?.length??0)>0?(output_manager_default.debug(`Running from project root: ${import_chalk2.default.cyan(projectRoot)}`),projectRoot):cwd}var readFile=promisify(fs3.readFile),writeFile=promisify(fs3.writeFile),VERCEL_DIR=".vercel",VERCEL_DIR_FALLBACK=".now",VERCEL_DIR_README="README.txt",VERCEL_DIR_PROJECT="project.json",VERCEL_DIR_REPO="repo.json";function isOwnerLookupUnavailableLink(link){return"ownerLookupUnavailable"in link&&link.ownerLookupUnavailable===!0}function isRemoteLookupSkippedLink(link){return"remoteLookupSkipped"in link&&link.remoteLookupSkipped===!0}function isOwnerLookupUnavailableError(error){return isAPIError(error)&&error.status===403&&error.code==="team_unauthorized"}function isValidProjectLink(value){if(!value||typeof value!="object"||Array.isArray(value))return!1;let link=value;return typeof link.projectId=="string"&&link.projectId.length>0&&typeof link.orgId=="string"&&link.orgId.length>0&&(link.projectName===void 0||typeof link.projectName=="string"&&link.projectName.length>0)}function getVercelDirectory(cwd){let possibleDirs=[join5(cwd,VERCEL_DIR),join5(cwd,VERCEL_DIR_FALLBACK)],existingDirs=possibleDirs.filter(d=>isDirectory(d));if(existingDirs.length>1)throw new import_build_utils2.NowBuildError({code:"CONFLICTING_CONFIG_DIRECTORIES",message:"Both `.vercel` and `.now` directories exist. Please remove the `.now` directory.",link:"https://vercel.link/combining-old-and-new-config"});return existingDirs[0]||possibleDirs[0]}async function getProjectLink(client,path,projectName,projectNameIsExplicit){let dirLink=await getLinkFromDir(getVercelDirectory(path));return dirLink&&(!projectNameIsExplicit||!projectName||dirLink.projectId===projectName||dirLink.projectName===projectName)?dirLink:await getProjectLinkFromRepoLink(client,path,projectName,projectNameIsExplicit)}async function getProjectLinkFromRepoLink(client,path,projectName,projectNameIsExplicit){let repoLink=await getRepoLink(client,path);if(!repoLink?.repoConfig)return null;let projects=findProjectsFromPath(repoLink.repoConfig.projects,relative2(repoLink.rootPath,path)),project;if(projectName&&projectNameIsExplicit)project=repoLink.repoConfig.projects.find(p=>p.id===projectName||p.name===projectName);else if(projects.length===1)project=projects[0];else{let selectableProjects=projects.length>0?projects:repoLink.repoConfig.projects;if(projectName&&(project=selectableProjects.find(p=>p.id===projectName||p.name===projectName)),!project)if(client.nonInteractive)if(selectableProjects.length===1)project=selectableProjects[0];else return null;else project=await client.input.select({message:"Please select a Project:",choices:selectableProjects.map(p=>({value:p,name:p.name}))})}if(project){let orgId=project.orgId??repoLink.repoConfig.orgId;if(!orgId){let projectInfo=[project.name?`name: "${project.name}"`:"",project.directory?`directory: "${project.directory}"`:""].filter(Boolean).join(", "),details=projectInfo?` Project: { ${projectInfo} }.`:"";throw new Error(`Could not determine org ID from repo.json config at "${repoLink.repoConfigPath}".${details} Please re-link the repository.`)}return{repoRoot:repoLink.rootPath,orgId,projectId:project.id,projectName:project.name,projectRootDirectory:project.directory}}return null}function getLinkedProjectIdSync(dir){try{let link=JSON.parse(fs3.readFileSync(join5(dir,VERCEL_DIR_PROJECT),"utf8"));return isValidProjectLink(link)?link.projectId:void 0}catch{return}}async function getLinkFromDir(dir){try{let json=await readFile(join5(dir,VERCEL_DIR_PROJECT),"utf8"),link=JSON.parse(json);if(!isValidProjectLink(link)){let raw=link,projectId=raw.projectId,orgId=raw.orgId;if(!(typeof projectId=="string"&&projectId.length>0&&typeof orgId=="string"&&orgId.length>0))return null;throw new Error(`Project Settings are invalid. To link your project again, remove the ${dir} directory.`)}return link}catch(err){if((0,import_error_utils2.isErrnoException)(err)&&err.code&&["ENOENT","ENOTDIR"].includes(err.code))return null;throw(0,import_error_utils2.isError)(err)&&err.name==="SyntaxError"?new Error(`Project Settings could not be retrieved. To link your project again, remove the ${dir} directory.`):err}}async function hasLocalProjectLink(client,cwd){try{if(await getLinkFromDir(getVercelDirectory(cwd)))return!0}catch{}try{let repoLink=await getRepoLink(client,cwd);return repoLink?.repoConfig?findProjectsFromPath(repoLink.repoConfig.projects,relative2(repoLink.rootPath,cwd)).length>0:!1}catch{return!1}}async function hasProjectLink(client,projectLink,path){let VERCEL_ORG_ID=(0,import_build_utils2.getPlatformEnv)("ORG_ID"),VERCEL_PROJECT_ID=(0,import_build_utils2.getPlatformEnv)("PROJECT_ID");if(VERCEL_ORG_ID===projectLink.orgId&&VERCEL_PROJECT_ID===projectLink.projectId)return!0;let repoLink=await getRepoLink(client,path);if(repoLink?.repoConfig){let matchingProject=repoLink.repoConfig.projects.find(p=>p.id===projectLink.projectId);if(matchingProject){let orgId=matchingProject.orgId??repoLink.repoConfig.orgId;if(!orgId)throw new Error(`Invalid "repo.json": missing "orgId" for project "${matchingProject.id}" and no top-level "orgId" is defined.`);if(orgId===projectLink.orgId)return!0}}let link=await getLinkFromDir(getVercelDirectory(path));return!!(link&&link.orgId===projectLink.orgId&&link.projectId===projectLink.projectId)}async function getLinkedProject(client,options={}){let path=options.cwd??client.cwd;options.skipProjectRootResolution||(path=await resolveProjectCwd(path));let VERCEL_ORG_ID=(0,import_build_utils2.getPlatformEnv)("ORG_ID"),VERCEL_PROJECT_ID=(0,import_build_utils2.getPlatformEnv)("PROJECT_ID"),shouldUseEnv=!!(VERCEL_ORG_ID&&VERCEL_PROJECT_ID),projectName=options.projectName,projectNameIsExplicit=options.projectNameIsExplicit===!0,explicitProjectName=projectNameIsExplicit?projectName:void 0,hasExplicitProject=!!explicitProjectName,shouldUseEnvContext=shouldUseEnv&&!hasExplicitProject;if(!hasExplicitProject&&(VERCEL_ORG_ID||VERCEL_PROJECT_ID)&&!shouldUseEnv)return output_manager_default.error(`You specified ${VERCEL_ORG_ID?"`VERCEL_ORG_ID`":"`VERCEL_PROJECT_ID`"} but you forgot to specify ${VERCEL_ORG_ID?"`VERCEL_PROJECT_ID`":"`VERCEL_ORG_ID`"}. You need to specify both to deploy to a custom project.
27
27
  `),{status:"error",exitCode:1};let link,explicitlyResolvedProject=null,orgId;if(explicitProjectName){let hasExplicitScope=options.scopeIsExplicit===!0,matchingLocalLink=hasExplicitScope||shouldUseEnv?null:await getProjectLink(client,path,explicitProjectName,!0),fallbackOrgId=shouldUseEnv?VERCEL_ORG_ID:matchingLocalLink?.orgId??client.config.currentTeam,lookupOrgId=hasExplicitScope?client.config.currentTeam:fallbackOrgId;orgId=lookupOrgId;let apiProject=await getProjectByNameOrId(client,explicitProjectName,lookupOrgId);if(explicitlyResolvedProject=apiProject instanceof ProjectNotFound?null:apiProject,explicitlyResolvedProject===null)link=null;else{let resolvedOrgId=explicitlyResolvedProject.accountId??lookupOrgId??matchingLocalLink?.orgId,localLink=matchingLocalLink?.projectId===explicitlyResolvedProject.id?matchingLocalLink:null;if(!localLink)try{localLink=await getProjectLink(client,path,explicitlyResolvedProject.id,!0)}catch(err){output_manager_default.debug(`Ignoring local project metadata after explicit project resolution: ${err}`)}link=resolvedOrgId?{...localLink?.projectId===explicitlyResolvedProject.id&&localLink.orgId===resolvedOrgId?localLink:{},projectId:explicitlyResolvedProject.id,orgId:resolvedOrgId}:null}}else link=shouldUseEnvContext?{orgId:VERCEL_ORG_ID,projectId:VERCEL_PROJECT_ID}:await getProjectLink(client,path,projectName,projectNameIsExplicit),link&&(orgId=link.orgId);if(!link)return{status:"not_linked",org:null,project:null,orgId};if(options.skipRemoteLookup&&link.projectName){let settings=link.settings,localRootDirectory=link.projectRootDirectory??settings?.rootDirectory??null,rootDirectory=localRootDirectory==="."?null:localRootDirectory,project2={...settings,id:link.projectId,accountId:link.orgId,name:link.projectName,createdAt:settings?.createdAt??0,updatedAt:settings?.updatedAt??settings?.createdAt??0,rootDirectory};return{...{status:"linked",org:{type:link.orgId.startsWith("team_")?"team":"user",id:link.orgId,slug:""},project:project2,repoRoot:link.repoRoot,remoteLookupSkipped:!0},projectRootDirectory:link.projectRootDirectory,orgId:link.orgId}}output_manager_default.spinner("Retrieving project\u2026",1e3);let org=null,project=null,ownerLookupUnavailable=!1;try{let[orgResult,projectResult]=await Promise.allSettled([options.skipOwnerLookup?Promise.resolve({type:link.orgId.startsWith("team_")?"team":"user",id:link.orgId,slug:""}):getOrgById(client,link.orgId),explicitlyResolvedProject?Promise.resolve(explicitlyResolvedProject):getProjectByNameOrId(client,link.projectId,link.orgId)]);if(orgResult.status==="fulfilled")org=orgResult.value;else if(isAPIError(orgResult.reason)&&(orgResult.reason.status===404||orgResult.reason.code==="not_found"||orgResult.reason.code==="mock_unimplemented"))org=null;else if(options.allowOwnerLookupFallback&&isOwnerLookupUnavailableError(orgResult.reason))ownerLookupUnavailable=!0;else throw orgResult.reason;if(projectResult.status==="fulfilled")project=projectResult.value;else if(isAPIError(projectResult.reason)&&(projectResult.reason.status===404||projectResult.reason.code==="not_found"||projectResult.reason.code==="mock_unimplemented"))project=new ProjectNotFound(link.projectId);else throw projectResult.reason}catch(err){if(isAPIError(err)&&err.status===403){if(output_manager_default.stopSpinner(),err.missingToken||err.invalidToken)throw new InvalidToken(client.authConfig.tokenSource);if(err.code==="forbidden"||err.code==="team_unauthorized")throw new import_build_utils2.NowBuildError({message:`Could not retrieve Project Settings. To link your Project, remove the ${code(VERCEL_DIR)} directory and deploy again.`,code:"PROJECT_UNAUTHORIZED",link:"https://vercel.link/cannot-load-project-settings"})}throw err}finally{output_manager_default.stopSpinner()}if(ownerLookupUnavailable&&project&&!(project instanceof ProjectNotFound)){let ownerId=project.accountId||link.orgId;return{status:"linked",org:{type:ownerId.startsWith("team_")?"team":"user",id:ownerId,slug:ownerId},project,repoRoot:link.repoRoot,projectRootDirectory:link.projectRootDirectory,orgId:link.orgId,ownerLookupUnavailable:!0}}return!org||!project||project instanceof ProjectNotFound?shouldUseEnvContext?(output_manager_default.error(`Project not found (${JSON.stringify({VERCEL_PROJECT_ID,VERCEL_ORG_ID})})
28
28
  `),{status:"error",exitCode:1,orgId}):(output_manager_default.print(prependEmoji(`Your Project was either deleted, transferred to a new Team, or you don\u2019t have access to it anymore.
29
29
  `,emoji("warning"))),{status:"not_linked",org:null,project:null,orgId:link.orgId}):{status:"linked",org,project,repoRoot:link.repoRoot,projectRootDirectory:link.projectRootDirectory,orgId:link.orgId}}var VERCEL_DIR_README_CONTENT=`> Why do I have a folder named ".vercel" in my project?
@@ -39,6 +39,6 @@ No, you should not share the ".vercel" folder with anyone.
39
39
  Upon creation, it will be automatically added to your ".gitignore" file.
40
40
  `;async function writeReadme(path){await writeFile(join5(path,VERCEL_DIR,VERCEL_DIR_README),VERCEL_DIR_README_CONTENT)}async function linkFolderToProject(client,path,projectLink,projectName,orgSlug,successEmoji="link",autoConfirm=!1,pullEnv=!0,resultLabel="Linked"){if(await hasProjectLink(client,projectLink,path))return;try{await(0,import_fs_extra4.ensureDir)(join5(path,VERCEL_DIR))}catch(err){if((0,import_error_utils2.isErrnoException)(err)&&err.code==="ENOTDIR")return;throw err}if(await writeFile(join5(path,VERCEL_DIR,VERCEL_DIR_PROJECT),JSON.stringify({...projectLink,projectName})),await writeReadme(path),await addToGitIgnore(path),output_manager_default.print(`
41
41
  `),printAlignedLabel(resultLabel,`${orgSlug}/${projectName}`,{gutter:"\u2713"}),!pullEnv||!client.stdin.isTTY||client.nonInteractive)return;if(output_manager_default.print(`
42
- `),autoConfirm||await client.input.confirm("Pull development environment variables into .env.local?",!0)){let originalCwd=client.cwd;try{client.cwd=path;let args=autoConfirm?["--yes"]:[],{default:pull}=await import("./pull-WWUH4M5V.js");await pull(client,args,"vercel-cli:link")!==0&&output_manager_default.error("Failed to pull environment variables. You can run `vc env pull` manually.")}catch{output_manager_default.error("Failed to pull environment variables. You can run `vc env pull` manually.")}finally{client.cwd=originalCwd}}}async function addToGitIgnore(path,ignore=VERCEL_DIR){let isGitIgnoreUpdated=!1;try{let gitIgnorePath=join6(path,".gitignore"),gitIgnore=await(0,import_fs_extra5.readFile)(gitIgnorePath,"utf8").catch(()=>null)??"",EOL=gitIgnore.includes(`\r
42
+ `),autoConfirm||await client.input.confirm("Pull development environment variables into .env.local?",!0)){let originalCwd=client.cwd;try{client.cwd=path;let args=autoConfirm?["--yes"]:[],{default:pull}=await import("./pull-MTQAMT4L.js");await pull(client,args,"vercel-cli:link")!==0&&output_manager_default.error("Failed to pull environment variables. You can run `vc env pull` manually.")}catch{output_manager_default.error("Failed to pull environment variables. You can run `vc env pull` manually.")}finally{client.cwd=originalCwd}}}async function addToGitIgnore(path,ignore=VERCEL_DIR){let isGitIgnoreUpdated=!1;try{let gitIgnorePath=join6(path,".gitignore"),gitIgnore=await(0,import_fs_extra5.readFile)(gitIgnorePath,"utf8").catch(()=>null)??"",EOL=gitIgnore.includes(`\r
43
43
  `)?`\r
44
44
  `:os.EOL,contentModified=!1;gitIgnore.split(EOL).includes(ignore)||(gitIgnore+=`${gitIgnore.endsWith(EOL)||gitIgnore.length===0?"":EOL}${ignore}${EOL}`,contentModified=!0),contentModified&&(await(0,import_fs_extra5.writeFile)(gitIgnorePath,gitIgnore),isGitIgnoreUpdated=!0)}catch{}return isGitIgnoreUpdated}var VERCEL_CONFIG_EXTENSIONS=["ts","mts","js","mjs","cjs"],DEFAULT_VERCEL_CONFIG_FILENAME="Vercel config";export{require_lib2 as require_lib,getProjectByNameOrId,getOrgById,isDirectory,require_pluralize,execFileAsync,getGitExecutable,getGitConfigPath,createGitMeta,parseGitConfig,pluckRemoteUrls,getRemoteUrls,addToGitIgnore,getRepoLink,resolveGitRemote,fetchProjectsForRepoUrl,linkRepoProject,ensureRepoLink,addRepoLink,findRepoRoot,findProjectsFromPath,VERCEL_CONFIG_EXTENSIONS,DEFAULT_VERCEL_CONFIG_FILENAME,resolveProjectCwd,VERCEL_DIR,VERCEL_DIR_README,VERCEL_DIR_PROJECT,isOwnerLookupUnavailableLink,isRemoteLookupSkippedLink,getVercelDirectory,getProjectLink,getLinkedProjectIdSync,getLinkFromDir,hasLocalProjectLink,getLinkedProject,linkFolderToProject};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{require_dist,require_dist2}from"./chunk-WJ4VNTE3.js";import{require_types}from"./chunk-ZS2WS4AM.js";import{require_build_utils}from"./chunk-75IAMKGV.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_dist3=__commonJS({"../../internals/service-topology/dist/index.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),src_exports={};__export(src_exports,{INTERNAL_SERVICE_PREFIX:()=>import_fs_detectors2.INTERNAL_SERVICE_PREFIX,autoDetectServices:()=>import_fs_detectors2.autoDetectServices,detectServices:()=>import_fs_detectors2.detectServices,generateServiceRewrites:()=>import_fs_detectors2.generateServiceRewrites,generateServicesRoutes:()=>import_fs_detectors2.generateServicesRoutes,getInternalServiceCronPath:()=>import_fs_detectors2.getInternalServiceCronPath,getInternalServiceCronPathPrefix:()=>import_fs_detectors2.getInternalServiceCronPathPrefix,getInternalServiceFunctionPath:()=>import_fs_detectors2.getInternalServiceFunctionPath,getInternalServiceWorkerPath:()=>import_fs_detectors2.getInternalServiceWorkerPath,getInternalServiceWorkerPathPrefix:()=>import_fs_detectors2.getInternalServiceWorkerPathPrefix,hasLegacyServicesConfig:()=>import_fs_detectors2.hasLegacyServicesConfig,isExperimentalService:()=>import_fs_detectors2.isExperimentalService,isExperimentalServiceV2:()=>import_fs_detectors2.isExperimentalServiceV2,isRouteOwningBuilder:()=>import_fs_detectors2.isRouteOwningBuilder,isStaticBuild:()=>import_fs_detectors2.isStaticBuild,migrateExperimentalServices:()=>import_fs_detectors2.migrateExperimentalServices,planExperimentalServicesMigration:()=>import_fs_detectors2.planExperimentalServicesMigration,resolveAllConfiguredServices:()=>import_fs_detectors2.resolveAllConfiguredServices,resolveAllConfiguredServicesV2:()=>import_fs_detectors2.resolveAllConfiguredServicesV2,resolveConfiguredServiceV2:()=>import_fs_detectors2.resolveConfiguredServiceV2,validateServiceConfigV2:()=>import_fs_detectors2.validateServiceConfigV2});module.exports=__toCommonJS(src_exports);var import_fs_detectors2=require_dist2()}});var import_routing_utils=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1),import_types=__toESM(require_types(),1),import_fs_detectors=__toESM(require_dist2(),1);import{getConfigValidator}from"./config-validator.mjs";var imagesSchema={type:"object",additionalProperties:!1,required:["sizes"],properties:{contentDispositionType:{enum:["inline","attachment"]},contentSecurityPolicy:{type:"string",minLength:1,maxLength:256},dangerouslyAllowSVG:{type:"boolean"},domains:{type:"array",minItems:0,maxItems:50,items:{type:"string",minLength:1,maxLength:256}},formats:{type:"array",minItems:1,maxItems:4,items:{enum:["image/avif","image/webp","image/jpeg","image/png"]}},localPatterns:{type:"array",minItems:0,maxItems:25,items:{type:"object",additionalProperties:!1,properties:{pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},minimumCacheTTL:{type:"integer",minimum:1,maximum:31536e4},qualities:{type:"array",minItems:1,maxItems:20,items:{type:"integer",minimum:1,maximum:100}},remotePatterns:{type:"array",minItems:0,maxItems:50,items:{type:"object",additionalProperties:!1,required:["hostname"],properties:{protocol:{enum:["http","https"]},hostname:{type:"string",minLength:1,maxLength:256},port:{type:"string",minLength:0,maxLength:5},pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},sizes:{type:"array",minItems:1,maxItems:50,items:{type:"number"}}}},cronsSchema={type:"array",minItems:0,items:{type:"object",additionalProperties:!1,required:["path","schedule"],properties:{path:{type:"string",minLength:1,maxLength:512,pattern:"^/.*"},schedule:{type:"string",minLength:9,maxLength:256}}}},schedulesSchema={type:"array",minItems:0,maxItems:100,items:{type:"object",additionalProperties:!1,required:["schedule"],properties:{name:{type:"string",minLength:1,maxLength:256,pattern:"^[0-9A-Za-z][0-9A-Za-z._-]*$"},schedule:{type:"string",minLength:9,maxLength:256},timezone:{type:"string",minLength:1,maxLength:50,description:"IANA timezone for cron evaluation. Defaults to UTC."},jitter:{type:"integer",minimum:1,maximum:15},path:{description:"Deployment path to invoke over HTTP, like `crons[].path`. Must start with `/`.",type:"string",maxLength:512,pattern:"^/"},requestMethod:{description:"HTTP method used to invoke `path`. Only valid with `path`. Defaults to `POST`.",enum:["GET","POST"]},function:{type:"string",minLength:1},service:{description:"Service that owns `function`, from `services`. When set, `function` is the path within that service. Only valid with `function`.",type:"string",minLength:1,maxLength:64,pattern:"^[a-z]([a-z_-]*[a-z])?$"},topic:{type:"string",minLength:1,maxLength:256,pattern:"^[A-Za-z0-9_-]+$"},entrypoint:{type:"string",minLength:1,maxLength:512}},dependencies:{requestMethod:["path"],service:["function"]},oneOf:[{required:["path"]},{required:["function"]},{required:["topic"]},{required:["entrypoint"]}]}},experimentalServicesMountSchema={oneOf:[{type:"string",minLength:1,maxLength:512},{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},anyOf:[{required:["path"]},{required:["subdomain"]}]}]},staticExperimentalServiceScheduleSchema={type:"string",minLength:9,maxLength:256,not:{const:"<dynamic>"}},experimentalServiceScheduleSchema={oneOf:[{type:"string",minLength:9,maxLength:256},{type:"array",minItems:1,items:staticExperimentalServiceScheduleSchema}]},experimentalServiceQueueTopicSchema={type:"object",additionalProperties:!1,required:["topic"],properties:{topic:{type:"string",minLength:1,maxLength:256},retryAfterSeconds:{type:"integer",minimum:1,maximum:86400},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400}}},experimentalServiceTopicsSchema={oneOf:[{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:256}},{type:"array",minItems:1,items:experimentalServiceQueueTopicSchema}]},envVarNamesSchema={pattern:"^[A-Za-z_][A-Za-z0-9_]*$",maxLength:256},getExperimentalServicesCommonProperties=()=>({entrypoint:{type:"string",minLength:1,maxLength:512},root:{type:"string",minLength:1,maxLength:512},workspace:{type:"string",minLength:1,maxLength:512},framework:{type:"string",minLength:1,maxLength:256},builder:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},buildCommand:{type:"string",minLength:1,maxLength:2048},installCommand:{type:"string",minLength:1,maxLength:2048},preDeployCommand:{type:"string",minLength:1,maxLength:2048},command:{oneOf:[{type:"string",minLength:1,maxLength:2048},{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:2048}}]},memory:{type:"integer",minimum:128,maximum:10240},maxDuration:(0,import_build_utils.getMaxDurationSchema)(),includeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]},excludeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]}}),experimentalServicesRoutableProperties={mount:experimentalServicesMountSchema,routePrefix:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},getExperimentalServicesServiceConfigSchema=()=>({oneOf:[{type:"object",additionalProperties:!1,properties:{...getExperimentalServicesCommonProperties(),...experimentalServicesRoutableProperties,type:{enum:["web"]}}},{type:"object",additionalProperties:!1,required:["type","trigger","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"schedule"},schedule:experimentalServiceScheduleSchema}},{type:"object",additionalProperties:!1,required:["type","trigger","topics"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"queue"},topics:experimentalServiceTopicsSchema,consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","trigger","entrypoint"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"workflow"}}},{type:"object",additionalProperties:!1,required:["type"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"worker"},topics:{type:"array",items:{type:"string",minLength:1,maxLength:256},minItems:1},consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"cron"},schedule:experimentalServiceScheduleSchema}}]}),getExperimentalServicesSchema=()=>({type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:getExperimentalServicesServiceConfigSchema()}),experimentalServiceGroupsSchema={type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:{type:"array",items:{type:"string",minLength:1,maxLength:256}}},servicesPathSchema={type:"string",minLength:1,maxLength:512},servicesCommandSchema={type:"string",minLength:1,maxLength:2048},servicesBindingSchema={type:"object",additionalProperties:!1,required:["service","format","env"],properties:{type:{description:"Optional binding type marker. Currently the only supported type is `service`. When present this must be `service`.",const:"service"},service:{type:"string",minLength:1,maxLength:64,pattern:import_build_utils.SERVICE_NAME_PATTERN},format:{const:"url"},env:{type:"string",...envVarNamesSchema}}},servicesBindingsSchema={type:"array",maxItems:100,items:servicesBindingSchema},getServicesServiceConfigSchema=()=>({type:"object",additionalProperties:!1,required:["root"],properties:{root:servicesPathSchema,framework:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},entrypoint:servicesPathSchema,command:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},installCommand:servicesCommandSchema,buildCommand:servicesCommandSchema,devCommand:servicesCommandSchema,ignoreCommand:servicesCommandSchema,outputDirectory:servicesPathSchema,bindings:servicesBindingsSchema,functions:(0,import_build_utils.getFunctionsSchema)(),headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,trailingSlash:import_routing_utils.trailingSlashSchema}}),daemonConfigSchema={type:"object",additionalProperties:!1,required:["root","entrypoint","replicas"],properties:{root:servicesPathSchema,entrypoint:servicesPathSchema,command:{type:"array",minItems:1,maxItems:128,items:{type:"string",minLength:1,maxLength:4096}},replicas:{type:"object",additionalProperties:{type:"integer",minimum:0}},resources:{type:"object",additionalProperties:!1,required:["requests"],properties:{requests:{type:"object",additionalProperties:!1,required:["memory"],properties:{memory:{enum:["1Gi","2Gi","4Gi","8Gi"]}}}}}}},getServicesSchema=()=>({type:"object",propertyNames:{pattern:import_build_utils.SERVICE_NAME_PATTERN,maxLength:64},additionalProperties:getServicesServiceConfigSchema()}),maxDaemons=100,daemonsSchema={type:"object",maxProperties:maxDaemons,propertyNames:{pattern:import_build_utils.DAEMON_NAME_PATTERN,maxLength:64},additionalProperties:daemonConfigSchema},proxySchema={type:"object",additionalProperties:!1,required:["entrypoint"],properties:{entrypoint:{type:"string",minLength:1},matcher:{oneOf:[{type:"string",minLength:1},{type:"array",minItems:1,items:{type:"string",minLength:1}}]}}};function buildVercelConfigSchema(){return{type:"object",additionalProperties:!0,properties:{builds:import_build_utils.buildsSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,trailingSlash:import_routing_utils.trailingSlashSchema,functions:(0,import_build_utils.getFunctionsSchema)(),images:imagesSchema,crons:cronsSchema,schedules:schedulesSchema,bunVersion:{type:"string"},proxy:proxySchema,experimentalServices:getExperimentalServicesSchema(),experimentalServiceGroups:experimentalServiceGroupsSchema,services:getServicesSchema(),experimentalServicesV2:getServicesSchema(),daemons:daemonsSchema}}}function validateConfig(config){let validate=getConfigValidator(buildVercelConfigSchema);if(!validate(config)&&validate.errors&&validate.errors[0]){let error=validate.errors[0],fileName=config[import_types.fileNameSymbol]||"vercel.json",niceError=(0,import_build_utils.getPrettyError)(error);return niceError.message=`Invalid ${fileName} - ${niceError.message}`,niceError}for(let[index,schedule]of(config.schedules??[]).entries())if(schedule.timezone!==void 0)try{if(!/^[A-Za-z][A-Za-z0-9_+/-]*$/.test(schedule.timezone))throw new RangeError("Expected a named timezone");new Intl.DateTimeFormat("en-US",{timeZone:schedule.timezone})}catch{return new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_TIMEZONE",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - \`schedules[${index}].timezone\` must be a valid IANA timezone, such as "America/New_York". Omit it to use UTC.`})}let functionMaps=[config.functions,...Object.values(config.services??{}).map(service=>service.functions),...Object.values(config.experimentalServicesV2??{}).map(service=>service.functions)];for(let functions of functionMaps)for(let[pattern,fn]of Object.entries(functions??{})){let regions=[...new Set(fn.regions)];if(fn.affinity?.mode==="strict"&&(regions.includes("all")||regions.length>1))return new import_build_utils.NowBuildError({code:"INVALID_FUNCTION_AFFINITY_REGIONS",message:`Function affinity mode "strict" requires at most one statically configured region. Update \`functions[${JSON.stringify(pattern)}].regions\` to contain a single region.`,link:"https://vercel.com/docs/concepts/projects/project-configuration#functions"})}if(config.proxy){let proxyError=(0,import_fs_detectors.validateProxyConfig)(config.proxy);if(proxyError)return new import_build_utils.NowBuildError({code:proxyError.code.toUpperCase(),message:proxyError.message})}if(config.functions&&config.builds)return new import_build_utils.NowBuildError({code:"FUNCTIONS_AND_BUILDS",message:"The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.",link:"https://vercel.link/functions-and-builds"});if(config.proxy&&config.builds)return new import_build_utils.NowBuildError({code:"PROXY_AND_BUILDS",message:"The `proxy` property cannot be used with the `builds` property. Remove `builds` to use an explicit proxy entrypoint."});let hasExperimentalServices=!!config.experimentalServices;if(hasExperimentalServices&&config.builds)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_BUILDS",message:"The `experimentalServices` property cannot be used in conjunction with the `builds` property. Please remove one of them."});if(hasExperimentalServices&&config.functions)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_FUNCTIONS",message:"The `experimentalServices` property cannot be used in conjunction with the `functions` property. Please remove one of them."});if(config.experimentalServiceGroups&&!config.experimentalServices)return new import_build_utils.NowBuildError({code:"SERVICE_GROUPS_WITHOUT_SERVICES",message:"The `experimentalServiceGroups` property requires `experimentalServices` to be defined. Service groups reference services by name."});let hasServices=config.services!=null,hasExperimentalServicesV2=config.experimentalServicesV2!=null;if(hasServices&&hasExperimentalServicesV2)return new import_build_utils.NowBuildError({code:"SERVICES_AND_EXPERIMENTAL_SERVICES_V2",message:"The `services` property cannot be used in conjunction with its deprecated alias `experimentalServicesV2`. Please use only `services`."});let servicesConfig=config.services??config.experimentalServicesV2,servicesConfigKey=hasServices?"services":"experimentalServicesV2",servicesErrorCodePrefix=hasServices?"SERVICES":"EXPERIMENTAL_SERVICES_V2";if(servicesConfig&&hasExperimentalServices)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_EXPERIMENTAL_SERVICES`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`experimentalServices\` property. Please use only one services configuration.`});if(servicesConfig&&config.builds)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_BUILDS`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`builds\` property. Please remove one of them.`});if(servicesConfig){let ambiguousTopLevel=[];if(config.functions!=null&&ambiguousTopLevel.push("functions"),config.installCommand!=null&&ambiguousTopLevel.push("installCommand"),config.buildCommand!=null&&ambiguousTopLevel.push("buildCommand"),config.devCommand!=null&&ambiguousTopLevel.push("devCommand"),config.ignoreCommand!=null&&ambiguousTopLevel.push("ignoreCommand"),config.outputDirectory!=null&&ambiguousTopLevel.push("outputDirectory"),config.framework!=null&&ambiguousTopLevel.push("framework"),ambiguousTopLevel.length>0){let count=ambiguousTopLevel.length,fields=ambiguousTopLevel.map(field=>`\`${field}\``).join(", ");return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_TOP_LEVEL_BUILD_SETTINGS`,message:`The top-level ${count>1?"properties":"property"} ${fields} cannot be used with \`${servicesConfigKey}\` because the owning service is ambiguous. Move ${count>1?"them":"it"} under the relevant service in \`${servicesConfigKey}\`.`})}}if(config.daemons){let daemonError=validateDaemons(config,config.daemons);if(daemonError)return daemonError}if(servicesConfig){let serviceNames=new Set(Object.keys(servicesConfig));for(let[serviceName,serviceConfig]of Object.entries(servicesConfig))for(let binding of serviceConfig.bindings??[])if(!serviceNames.has(binding.service))return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_BINDING_UNKNOWN_SERVICE`,message:`Service "${serviceName}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`${servicesConfigKey}\` or fix the binding.`})}return null}function validateDaemons(config,daemons){let invalid=message=>new import_build_utils.NowBuildError({code:"INVALID_DAEMON",message}),daemonNames=new Set(Object.keys(daemons));for(let[name,daemon]of Object.entries(daemons))if(!/^(docker|container)file(\.vercel)?$/i.test(daemon.entrypoint.split(/[\\/]/).pop()??""))return invalid(`Daemon "${name}" must set \`entrypoint\` to a Dockerfile or Containerfile.`);let services={...config.experimentalServicesV2,...config.services},isDaemonTarget=name=>daemonNames.has(name)&&!Object.prototype.hasOwnProperty.call(services,name);for(let[name,service]of Object.entries(services)){let binding=service.bindings?.find(binding2=>isDaemonTarget(binding2.service));if(binding)return invalid(`Service "${name}" cannot bind to daemon "${binding.service}" because daemons do not receive traffic.`)}let destinations=[...config.rewrites??[],...config.routes??[],...Object.values(services).flatMap(service=>[...service.rewrites??[],...service.routes??[]])].map(entry=>"destination"in entry?entry.destination:void 0);for(let destination of destinations)if(typeof destination=="object"&&destination!==null&&isDaemonTarget(destination.service))return invalid(`Rewrites and routes cannot target daemon "${destination.service}" because daemons do not receive traffic.`);return null}export{require_dist3 as require_dist,validateConfig};
@@ -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{applyEdits,init_main,modify,parse,printParseErrorCode}from"./chunk-OI263FBO.js";import{output_manager_default}from"./chunk-Q2YQSMIB.js";import{readFile as readFile3,writeFile as writeFile3}from"node:fs/promises";import{access as access2}from"node:fs/promises";import{dirname as dirname3,join as join3,resolve}from"node:path";import{homedir}from"node:os";import{spawn}from"node:child_process";import{KNOWN_AGENTS}from"@vercel/detect-agent";import{z}from"zod";import{join as join2}from"node:path";init_main();import{readFile,writeFile,mkdir,copyFile,access,chmod,lstat,stat,link,unlink}from"node:fs/promises";import{isDeepStrictEqual}from"node:util";import{dirname}from"node:path";import{parse as tomlParse,stringify as tomlStringify}from"smol-toml";async function pathExists(path){try{return await access(path),!0}catch{return!1}}async function isFile(path){try{return(await stat(path)).isFile()}catch{return!1}}async function isSymlink(path){try{return(await lstat(path)).isSymbolicLink()}catch{return!1}}async function readFileOrNull(path){try{return await readFile(path,"utf8")}catch(err){if(err.code==="ENOENT")return null;throw err}}function isPlainObject(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)&&Object.getPrototypeOf(value)===Object.prototype}function deepMerge(base,patch){let out={...base};for(let[key,patchValue]of Object.entries(patch)){let baseValue=out[key];isPlainObject(baseValue)&&isPlainObject(patchValue)?out[key]=deepMerge(baseValue,patchValue):out[key]=patchValue}return out}function detectJsonFormatting(text){let eol=text.includes(`\r
7
+ import{applyEdits,init_main,modify,parse,printParseErrorCode}from"./chunk-J24BABG4.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import{readFile as readFile3,writeFile as writeFile3}from"node:fs/promises";import{access as access2}from"node:fs/promises";import{dirname as dirname3,join as join3,resolve}from"node:path";import{homedir}from"node:os";import{spawn}from"node:child_process";import{KNOWN_AGENTS}from"@vercel/detect-agent";import{z}from"zod";import{join as join2}from"node:path";init_main();import{readFile,writeFile,mkdir,copyFile,access,chmod,lstat,stat,link,unlink}from"node:fs/promises";import{isDeepStrictEqual}from"node:util";import{dirname}from"node:path";import{parse as tomlParse,stringify as tomlStringify}from"smol-toml";async function pathExists(path){try{return await access(path),!0}catch{return!1}}async function isFile(path){try{return(await stat(path)).isFile()}catch{return!1}}async function isSymlink(path){try{return(await lstat(path)).isSymbolicLink()}catch{return!1}}async function readFileOrNull(path){try{return await readFile(path,"utf8")}catch(err){if(err.code==="ENOENT")return null;throw err}}function isPlainObject(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)&&Object.getPrototypeOf(value)===Object.prototype}function deepMerge(base,patch){let out={...base};for(let[key,patchValue]of Object.entries(patch)){let baseValue=out[key];isPlainObject(baseValue)&&isPlainObject(patchValue)?out[key]=deepMerge(baseValue,patchValue):out[key]=patchValue}return out}function detectJsonFormatting(text){let eol=text.includes(`\r
8
8
  `)?`\r
9
9
  `:`
10
10
  `,indent=text.match(/^([ \t]+)\S/m)?.[1];return indent?.startsWith(" ")?{eol,insertSpaces:!1,tabSize:1}:{eol,insertSpaces:!0,tabSize:indent?.length||2}}function parseJsonObjectOrNull(current,parse2=JSON.parse){if(!current||!current.trim())return null;let raw;try{raw=parse2(current)}catch(err){throw new Error(`existing file is not valid JSON (${err.message})`)}if(!isPlainObject(raw))throw new Error("existing file is not a JSON object");return raw}function mergeJson(current,patch,parse2=JSON.parse){let raw=parseJsonObjectOrNull(current,parse2);if(!current||raw===null)return`${JSON.stringify(deepMerge({},patch),null,2)}
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{output_manager_default}from"./chunk-Q2YQSMIB.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var ALIGNED_LABEL_WIDTH=16;function formatAlignedLabel(label,value,options={}){let gutter=options.gutter==="\u2713"?import_chalk.default.green("\u2713"):options.gutter,prefix=gutter?`${gutter} `:" ",labelWidth=Math.max(ALIGNED_LABEL_WIDTH,options.labelWidth??ALIGNED_LABEL_WIDTH),paddedLabel=label.length<labelWidth?label.padEnd(labelWidth):`${label} `,format=options.emphasis==="subtle"?import_chalk.default.dim:import_chalk.default.bold;return`${prefix}${format(paddedLabel)}${format(value)}`}function printAlignedLabel(label,value,options={}){output_manager_default.print(`${formatAlignedLabel(label,value,options)}
7
+ import{output_manager_default}from"./chunk-75IAMKGV.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var ALIGNED_LABEL_WIDTH=16;function formatAlignedLabel(label,value,options={}){let gutter=options.gutter==="\u2713"?import_chalk.default.green("\u2713"):options.gutter,prefix=gutter?`${gutter} `:" ",labelWidth=Math.max(ALIGNED_LABEL_WIDTH,options.labelWidth??ALIGNED_LABEL_WIDTH),paddedLabel=label.length<labelWidth?label.padEnd(labelWidth):`${label} `,format=options.emphasis==="subtle"?import_chalk.default.dim:import_chalk.default.bold;return`${prefix}${format(paddedLabel)}${format(value)}`}function printAlignedLabel(label,value,options={}){output_manager_default.print(`${formatAlignedLabel(label,value,options)}
8
8
  `)}export{ALIGNED_LABEL_WIDTH,formatAlignedLabel,printAlignedLabel};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{require_supports_color}from"./chunk-N3ZZ7FHQ.js";import{require_ansi_styles}from"./chunk-GU6VIFR5.js";import{__commonJS}from"./chunk-6L236MNA.js";var require_util=__commonJS({"../../node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/util.js"(exports,module){"use strict";var stringReplaceAll=(string,substring,replacer)=>{let index=string.indexOf(substring);if(index===-1)return string;let substringLength=substring.length,endIndex=0,returnValue="";do returnValue+=string.substr(endIndex,index-endIndex)+substring+replacer,endIndex=index+substringLength,index=string.indexOf(substring,endIndex);while(index!==-1);return returnValue+=string.substr(endIndex),returnValue},stringEncaseCRLFWithFirstIndex=(string,prefix,postfix,index)=>{let endIndex=0,returnValue="";do{let gotCR=string[index-1]==="\r";returnValue+=string.substr(endIndex,(gotCR?index-1:index)-endIndex)+prefix+(gotCR?`\r
7
+ import{require_supports_color}from"./chunk-ISWW3DKF.js";import{require_ansi_styles}from"./chunk-BRQUZ5NC.js";import{__commonJS}from"./chunk-BZENIQ7N.js";var require_util=__commonJS({"../../node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/util.js"(exports,module){"use strict";var stringReplaceAll=(string,substring,replacer)=>{let index=string.indexOf(substring);if(index===-1)return string;let substringLength=substring.length,endIndex=0,returnValue="";do returnValue+=string.substr(endIndex,index-endIndex)+substring+replacer,endIndex=index+substringLength,index=string.indexOf(substring,endIndex);while(index!==-1);return returnValue+=string.substr(endIndex),returnValue},stringEncaseCRLFWithFirstIndex=(string,prefix,postfix,index)=>{let endIndex=0,returnValue="";do{let gotCR=string[index-1]==="\r";returnValue+=string.substr(endIndex,(gotCR?index-1:index)-endIndex)+prefix+(gotCR?`\r
8
8
  `:`
9
9
  `)+postfix,endIndex=index+1,index=string.indexOf(`
10
10
  `,endIndex)}while(index!==-1);return returnValue+=string.substr(endIndex),returnValue};module.exports={stringReplaceAll,stringEncaseCRLFWithFirstIndex}}});var require_templates=__commonJS({"../../node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/templates.js"(exports,module){"use strict";var TEMPLATE_REGEX=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,STYLE_REGEX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,STRING_REGEX=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ESCAPE_REGEX=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,ESCAPES=new Map([["n",`
@@ -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,__require}from"./chunk-6L236MNA.js";var require_deque=__commonJS({"../../node_modules/.pnpm/double-ended-queue@2.1.0-0/node_modules/double-ended-queue/js/deque.js"(exports,module){"use strict";function Deque(capacity){if(this._capacity=getCapacity(capacity),this._length=0,this._front=0,isArray(capacity)){for(var len=capacity.length,i=0;i<len;++i)this[i]=capacity[i];this._length=len}}Deque.prototype.toArray=function(){for(var len=this._length,ret=new Array(len),front=this._front,capacity=this._capacity,j=0;j<len;++j)ret[j]=this[front+j&capacity-1];return ret};Deque.prototype.push=function(item){var argsLength=arguments.length,length=this._length;if(argsLength>1){var capacity=this._capacity;if(length+argsLength>capacity){for(var i=0;i<argsLength;++i){this._checkCapacity(length+1);var j=this._front+length&this._capacity-1;this[j]=arguments[i],length++,this._length=length}return length}else{for(var j=this._front,i=0;i<argsLength;++i)this[j+length&capacity-1]=arguments[i],j++;return this._length=length+argsLength,length+argsLength}}if(argsLength===0)return length;this._checkCapacity(length+1);var i=this._front+length&this._capacity-1;return this[i]=item,this._length=length+1,length+1};Deque.prototype.pop=function(){var length=this._length;if(length!==0){var i=this._front+length-1&this._capacity-1,ret=this[i];return this[i]=void 0,this._length=length-1,ret}};Deque.prototype.shift=function(){var length=this._length;if(length!==0){var front=this._front,ret=this[front];return this[front]=void 0,this._front=front+1&this._capacity-1,this._length=length-1,ret}};Deque.prototype.unshift=function(item){var length=this._length,argsLength=arguments.length;if(argsLength>1){var capacity=this._capacity;if(length+argsLength>capacity){for(var i=argsLength-1;i>=0;i--){this._checkCapacity(length+1);var capacity=this._capacity,j=(this._front-1&capacity-1^capacity)-capacity;this[j]=arguments[i],length++,this._length=length,this._front=j}return length}else{for(var front=this._front,i=argsLength-1;i>=0;i--){var j=(front-1&capacity-1^capacity)-capacity;this[j]=arguments[i],front=j}return this._front=front,this._length=length+argsLength,length+argsLength}}if(argsLength===0)return length;this._checkCapacity(length+1);var capacity=this._capacity,i=(this._front-1&capacity-1^capacity)-capacity;return this[i]=item,this._length=length+1,this._front=i,length+1};Deque.prototype.peekBack=function(){var length=this._length;if(length!==0){var index=this._front+length-1&this._capacity-1;return this[index]}};Deque.prototype.peekFront=function(){if(this._length!==0)return this[this._front]};Deque.prototype.get=function(index){var i=index;if(i===(i|0)){var len=this._length;if(i<0&&(i=i+len),!(i<0||i>=len))return this[this._front+i&this._capacity-1]}};Deque.prototype.isEmpty=function(){return this._length===0};Deque.prototype.clear=function(){for(var len=this._length,front=this._front,capacity=this._capacity,j=0;j<len;++j)this[front+j&capacity-1]=void 0;this._length=0,this._front=0};Deque.prototype.toString=function(){return this.toArray().toString()};Deque.prototype.valueOf=Deque.prototype.toString;Deque.prototype.removeFront=Deque.prototype.shift;Deque.prototype.removeBack=Deque.prototype.pop;Deque.prototype.insertFront=Deque.prototype.unshift;Deque.prototype.insertBack=Deque.prototype.push;Deque.prototype.enqueue=Deque.prototype.push;Deque.prototype.dequeue=Deque.prototype.shift;Deque.prototype.toJSON=Deque.prototype.toArray;Object.defineProperty(Deque.prototype,"length",{get:function(){return this._length},set:function(){throw new RangeError("")}});Deque.prototype._checkCapacity=function(size){this._capacity<size&&this._resizeTo(getCapacity(this._capacity*1.5+16))};Deque.prototype._resizeTo=function(capacity){var oldCapacity=this._capacity;this._capacity=capacity;var front=this._front,length=this._length;if(front+length>oldCapacity){var moveItemsCount=front+length&oldCapacity-1;arrayMove(this,0,this,oldCapacity,moveItemsCount)}};var isArray=Array.isArray;function arrayMove(src,srcIndex,dst,dstIndex,len){for(var j=0;j<len;++j)dst[j+dstIndex]=src[j+srcIndex],src[j+srcIndex]=void 0}function pow2AtLeast(n){return n=n>>>0,n=n-1,n=n|n>>1,n=n|n>>2,n=n|n>>4,n=n|n>>8,n=n|n>>16,n+1}function getCapacity(capacity){if(typeof capacity!="number")if(isArray(capacity))capacity=capacity.length;else return 16;return pow2AtLeast(Math.min(Math.max(16,capacity),1073741824))}module.exports=Deque}});var require_async_sema=__commonJS({"../../node_modules/.pnpm/async-sema@2.1.4/node_modules/async-sema/index.js"(exports,module){var EventEmitter=__require("events"),util=__require("util"),Deque=require_deque(),ReleaseEmitter=class extends EventEmitter{};function isFn(x){return typeof x=="function"}function defaultInit(){return"1"}var Sema=class{constructor(nr,{initFn=defaultInit,pauseFn,resumeFn,capacity=10}={}){if(isFn(pauseFn)^isFn(resumeFn))throw new Error("pauseFn and resumeFn must be both set for pausing");this.nrTokens=nr,this.free=new Deque(nr),this.waiting=new Deque(capacity),this.releaseEmitter=new ReleaseEmitter,this.noTokens=initFn===defaultInit,this.pauseFn=pauseFn,this.resumeFn=resumeFn,this.releaseEmitter.on("release",token=>{let p=this.waiting.shift();p?p.resolve(token):(this.resumeFn&&this.paused&&(this.paused=!1,this.resumeFn()),this.free.push(token))});for(let i=0;i<nr;i++)this.free.push(initFn())}async acquire(){let token=this.free.pop();return token||new Promise((resolve,reject)=>{this.pauseFn&&!this.paused&&(this.paused=!0,this.pauseFn()),this.waiting.push({resolve,reject})})}async v(){return this.acquire()}release(token){this.releaseEmitter.emit("release",this.noTokens?"1":token)}p(token){return this.release(token)}drain(){let a=new Array(this.nrTokens);for(let i=0;i<this.nrTokens;i++)a[i]=this.acquire();return Promise.all(a)}nrWaiting(){return this.waiting.length}};Sema.prototype.v=util.deprecate(Sema.prototype.v,"`v()` is deperecated; use `acquire()` instead");Sema.prototype.p=util.deprecate(Sema.prototype.p,"`p()` is deprecated; use `release()` instead");module.exports=Sema}});export{require_async_sema};
7
+ import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_deque=__commonJS({"../../node_modules/.pnpm/double-ended-queue@2.1.0-0/node_modules/double-ended-queue/js/deque.js"(exports,module){"use strict";function Deque(capacity){if(this._capacity=getCapacity(capacity),this._length=0,this._front=0,isArray(capacity)){for(var len=capacity.length,i=0;i<len;++i)this[i]=capacity[i];this._length=len}}Deque.prototype.toArray=function(){for(var len=this._length,ret=new Array(len),front=this._front,capacity=this._capacity,j=0;j<len;++j)ret[j]=this[front+j&capacity-1];return ret};Deque.prototype.push=function(item){var argsLength=arguments.length,length=this._length;if(argsLength>1){var capacity=this._capacity;if(length+argsLength>capacity){for(var i=0;i<argsLength;++i){this._checkCapacity(length+1);var j=this._front+length&this._capacity-1;this[j]=arguments[i],length++,this._length=length}return length}else{for(var j=this._front,i=0;i<argsLength;++i)this[j+length&capacity-1]=arguments[i],j++;return this._length=length+argsLength,length+argsLength}}if(argsLength===0)return length;this._checkCapacity(length+1);var i=this._front+length&this._capacity-1;return this[i]=item,this._length=length+1,length+1};Deque.prototype.pop=function(){var length=this._length;if(length!==0){var i=this._front+length-1&this._capacity-1,ret=this[i];return this[i]=void 0,this._length=length-1,ret}};Deque.prototype.shift=function(){var length=this._length;if(length!==0){var front=this._front,ret=this[front];return this[front]=void 0,this._front=front+1&this._capacity-1,this._length=length-1,ret}};Deque.prototype.unshift=function(item){var length=this._length,argsLength=arguments.length;if(argsLength>1){var capacity=this._capacity;if(length+argsLength>capacity){for(var i=argsLength-1;i>=0;i--){this._checkCapacity(length+1);var capacity=this._capacity,j=(this._front-1&capacity-1^capacity)-capacity;this[j]=arguments[i],length++,this._length=length,this._front=j}return length}else{for(var front=this._front,i=argsLength-1;i>=0;i--){var j=(front-1&capacity-1^capacity)-capacity;this[j]=arguments[i],front=j}return this._front=front,this._length=length+argsLength,length+argsLength}}if(argsLength===0)return length;this._checkCapacity(length+1);var capacity=this._capacity,i=(this._front-1&capacity-1^capacity)-capacity;return this[i]=item,this._length=length+1,this._front=i,length+1};Deque.prototype.peekBack=function(){var length=this._length;if(length!==0){var index=this._front+length-1&this._capacity-1;return this[index]}};Deque.prototype.peekFront=function(){if(this._length!==0)return this[this._front]};Deque.prototype.get=function(index){var i=index;if(i===(i|0)){var len=this._length;if(i<0&&(i=i+len),!(i<0||i>=len))return this[this._front+i&this._capacity-1]}};Deque.prototype.isEmpty=function(){return this._length===0};Deque.prototype.clear=function(){for(var len=this._length,front=this._front,capacity=this._capacity,j=0;j<len;++j)this[front+j&capacity-1]=void 0;this._length=0,this._front=0};Deque.prototype.toString=function(){return this.toArray().toString()};Deque.prototype.valueOf=Deque.prototype.toString;Deque.prototype.removeFront=Deque.prototype.shift;Deque.prototype.removeBack=Deque.prototype.pop;Deque.prototype.insertFront=Deque.prototype.unshift;Deque.prototype.insertBack=Deque.prototype.push;Deque.prototype.enqueue=Deque.prototype.push;Deque.prototype.dequeue=Deque.prototype.shift;Deque.prototype.toJSON=Deque.prototype.toArray;Object.defineProperty(Deque.prototype,"length",{get:function(){return this._length},set:function(){throw new RangeError("")}});Deque.prototype._checkCapacity=function(size){this._capacity<size&&this._resizeTo(getCapacity(this._capacity*1.5+16))};Deque.prototype._resizeTo=function(capacity){var oldCapacity=this._capacity;this._capacity=capacity;var front=this._front,length=this._length;if(front+length>oldCapacity){var moveItemsCount=front+length&oldCapacity-1;arrayMove(this,0,this,oldCapacity,moveItemsCount)}};var isArray=Array.isArray;function arrayMove(src,srcIndex,dst,dstIndex,len){for(var j=0;j<len;++j)dst[j+dstIndex]=src[j+srcIndex],src[j+srcIndex]=void 0}function pow2AtLeast(n){return n=n>>>0,n=n-1,n=n|n>>1,n=n|n>>2,n=n|n>>4,n=n|n>>8,n=n|n>>16,n+1}function getCapacity(capacity){if(typeof capacity!="number")if(isArray(capacity))capacity=capacity.length;else return 16;return pow2AtLeast(Math.min(Math.max(16,capacity),1073741824))}module.exports=Deque}});var require_async_sema=__commonJS({"../../node_modules/.pnpm/async-sema@2.1.4/node_modules/async-sema/index.js"(exports,module){var EventEmitter=__require("events"),util=__require("util"),Deque=require_deque(),ReleaseEmitter=class extends EventEmitter{};function isFn(x){return typeof x=="function"}function defaultInit(){return"1"}var Sema=class{constructor(nr,{initFn=defaultInit,pauseFn,resumeFn,capacity=10}={}){if(isFn(pauseFn)^isFn(resumeFn))throw new Error("pauseFn and resumeFn must be both set for pausing");this.nrTokens=nr,this.free=new Deque(nr),this.waiting=new Deque(capacity),this.releaseEmitter=new ReleaseEmitter,this.noTokens=initFn===defaultInit,this.pauseFn=pauseFn,this.resumeFn=resumeFn,this.releaseEmitter.on("release",token=>{let p=this.waiting.shift();p?p.resolve(token):(this.resumeFn&&this.paused&&(this.paused=!1,this.resumeFn()),this.free.push(token))});for(let i=0;i<nr;i++)this.free.push(initFn())}async acquire(){let token=this.free.pop();return token||new Promise((resolve,reject)=>{this.pauseFn&&!this.paused&&(this.paused=!0,this.pauseFn()),this.waiting.push({resolve,reject})})}async v(){return this.acquire()}release(token){this.releaseEmitter.emit("release",this.noTokens?"1":token)}p(token){return this.release(token)}drain(){let a=new Array(this.nrTokens);for(let i=0;i<this.nrTokens;i++)a[i]=this.acquire();return Promise.all(a)}nrWaiting(){return this.waiting.length}};Sema.prototype.v=util.deprecate(Sema.prototype.v,"`v()` is deperecated; use `acquire()` instead");Sema.prototype.p=util.deprecate(Sema.prototype.p,"`p()` is deprecated; use `release()` instead");module.exports=Sema}});export{require_async_sema};
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{getTeams}from"./chunk-MIG67KZ2.js";import{param}from"./chunk-SXUEGVWB.js";import{outputActionRequired}from"./chunk-ONPJXQQ6.js";import{printAlignedLabel}from"./chunk-4QSVBLAS.js";import{getUser}from"./chunk-PE7QZUY7.js";import{getCommandName,packageName}from"./chunk-FI772UVH.js";import{emoji,output_manager_default,require_build_utils}from"./chunk-Q2YQSMIB.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var import_build_utils=__toESM(require_build_utils(),1);function getScopeOrTeamFromArgv(argv){let args=argv.slice(2);for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--scope"||arg==="--team"||arg==="-S"||arg==="-T"){let next=args[i+1];if(typeof next=="string"&&!next.startsWith("-"))return next;continue}if(arg.startsWith("--scope="))return arg.slice(8);if(arg.startsWith("--team="))return arg.slice(7)}return null}async function selectOrg(client,question,autoConfirm,searchable=!1,meta,description){let{config:{currentTeam}}=client;output_manager_default.spinner("Loading teams\u2026",1e3);let user,teams;try{[user,teams]=await Promise.all([getUser(client),getTeams(client)])}finally{output_manager_default.stopSpinner()}let formatChoiceName=(name,slug,isCurrent,limited)=>{let title=`${name} (${slug})`;return isCurrent&&(title+=` ${import_chalk.default.bold("(current)")}`),limited&&(title+=` ${emoji("locked")}`),title},choices=[...user.version==="northstar"?[]:[{name:formatChoiceName(user.name||user.username,user.username,!currentTeam,user.limited),value:{type:"user",id:user.id,slug:user.username}}],...teams.sort(a=>a.id===user.defaultTeamId?-1:1).map(team=>({name:formatChoiceName(team.name||team.slug,team.slug,team.id===currentTeam,team.limited),value:{type:"team",id:team.id,slug:team.slug}}))],defaultChoiceIndex=Math.max(choices.findIndex(choice=>choice.value.id===currentTeam),0);meta&&(meta.choiceCount=choices.length);let localConfigScope=client.localConfig?.scope,explicitScope=getScopeOrTeamFromArgv(client.argv)??(typeof localConfigScope=="string"?localConfigScope:null)??(0,import_build_utils.getPlatformEnv)("ORG_ID")??null,matchExplicitScope=()=>{if(!explicitScope)return;let match=choices.find(c=>c.value.id===explicitScope||c.value.slug===explicitScope);if(match)return match.value;if(user.id===explicitScope||user.email===explicitScope||user.username===explicitScope)return choices.find(c=>c.value.type==="user")?.value};if(client.nonInteractive||!client.stdin.isTTY){let match=matchExplicitScope();if(match)return match;if(choices.length===1)return choices[0].value;let actionRequired={status:"action_required",reason:"missing_scope",message:choices.length>0?"Provide --team or --scope explicitly. No default is applied in non-interactive mode.":"No teams available.",choices:choices.map(c=>({id:c.value.id,name:c.value.slug})),next:choices.map(c=>({command:`${packageName} link --team ${c.value.slug}`}))};outputActionRequired(client,actionRequired),output_manager_default.error(choices.length>0?`Multiple teams found. Teams are never auto-selected when the CLI runs without an interactive terminal. Re-run this command with ${param("--team <slug>")}, or run ${getCommandName("teams ls")} to list your teams.`:"No teams available."),process.exit(1)}let explicitOrg=matchExplicitScope();if(explicitOrg)return explicitOrg;if(choices.length===1)return printAlignedLabel("Team",choices[0].value.slug),choices[0].value;let descriptionLine=description?`
7
+ import{getTeams}from"./chunk-2H243SJV.js";import{param}from"./chunk-3G3FQYMW.js";import{outputActionRequired}from"./chunk-5RR3435W.js";import{printAlignedLabel}from"./chunk-N7Q2IESO.js";import{getUser}from"./chunk-VSE5BAPP.js";import{getCommandName,packageName}from"./chunk-JESNVRVR.js";import{emoji,output_manager_default,require_build_utils}from"./chunk-75IAMKGV.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_build_utils=__toESM(require_build_utils(),1);function getScopeOrTeamFromArgv(argv){let args=argv.slice(2);for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--scope"||arg==="--team"||arg==="-S"||arg==="-T"){let next=args[i+1];if(typeof next=="string"&&!next.startsWith("-"))return next;continue}if(arg.startsWith("--scope="))return arg.slice(8);if(arg.startsWith("--team="))return arg.slice(7)}return null}async function selectOrg(client,question,autoConfirm,searchable=!1,meta,description){let{config:{currentTeam}}=client;output_manager_default.spinner("Loading teams\u2026",1e3);let user,teams;try{[user,teams]=await Promise.all([getUser(client),getTeams(client)])}finally{output_manager_default.stopSpinner()}let formatChoiceName=(name,slug,isCurrent,limited)=>{let title=`${name} (${slug})`;return isCurrent&&(title+=` ${import_chalk.default.bold("(current)")}`),limited&&(title+=` ${emoji("locked")}`),title},choices=[...user.version==="northstar"?[]:[{name:formatChoiceName(user.name||user.username,user.username,!currentTeam,user.limited),value:{type:"user",id:user.id,slug:user.username}}],...teams.sort(a=>a.id===user.defaultTeamId?-1:1).map(team=>({name:formatChoiceName(team.name||team.slug,team.slug,team.id===currentTeam,team.limited),value:{type:"team",id:team.id,slug:team.slug}}))],defaultChoiceIndex=Math.max(choices.findIndex(choice=>choice.value.id===currentTeam),0);meta&&(meta.choiceCount=choices.length);let localConfigScope=client.localConfig?.scope,explicitScope=getScopeOrTeamFromArgv(client.argv)??(typeof localConfigScope=="string"?localConfigScope:null)??(0,import_build_utils.getPlatformEnv)("ORG_ID")??null,matchExplicitScope=()=>{if(!explicitScope)return;let match=choices.find(c=>c.value.id===explicitScope||c.value.slug===explicitScope);if(match)return match.value;if(user.id===explicitScope||user.email===explicitScope||user.username===explicitScope)return choices.find(c=>c.value.type==="user")?.value};if(client.nonInteractive||!client.stdin.isTTY){let match=matchExplicitScope();if(match)return match;if(choices.length===1)return choices[0].value;let actionRequired={status:"action_required",reason:"missing_scope",message:choices.length>0?"Provide --team or --scope explicitly. No default is applied in non-interactive mode.":"No teams available.",choices:choices.map(c=>({id:c.value.id,name:c.value.slug})),next:choices.map(c=>({command:`${packageName} link --team ${c.value.slug}`}))};outputActionRequired(client,actionRequired),output_manager_default.error(choices.length>0?`Multiple teams found. Teams are never auto-selected when the CLI runs without an interactive terminal. Re-run this command with ${param("--team <slug>")}, or run ${getCommandName("teams ls")} to list your teams.`:"No teams available."),process.exit(1)}let explicitOrg=matchExplicitScope();if(explicitOrg)return explicitOrg;if(choices.length===1)return printAlignedLabel("Team",choices[0].value.slug),choices[0].value;let descriptionLine=description?`
8
8
  ${import_chalk.default.dim(` ${description}`)}`:"";if(!searchable)return await client.input.select({message:`${question}${descriptionLine}`,choices,default:choices[defaultChoiceIndex].value});let defaultChoice=choices[defaultChoiceIndex],initialChoices=defaultChoice?[defaultChoice,...choices.filter(choice=>choice!==defaultChoice)]:choices,pageSize=15,countHint=choices.length>pageSize?` ${import_chalk.default.dim(`(${choices.length} teams)`)}`:"";return await client.input.search({message:`${question}${countHint}${descriptionLine}`,pageSize,source:term=>{let searchTerm=term?.trim().toLowerCase();return searchTerm?choices.filter(choice=>choice.name.toLowerCase().includes(searchTerm)||choice.value.slug.toLowerCase().includes(searchTerm)):initialChoices}})}export{selectOrg};
@@ -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-6L236MNA.js";var require_retry_operation=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry_operation.js"(exports,module){function RetryOperation(timeouts,options){typeof options=="boolean"&&(options={forever:options}),this._timeouts=timeouts,this._options=options||{},this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}module.exports=RetryOperation;RetryOperation.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};RetryOperation.prototype.retry=function(err){if(this._timeout&&clearTimeout(this._timeout),!err)return!1;this._errors.push(err);var timeout=this._timeouts.shift();if(timeout===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),timeout=this._timeouts.shift();else return!1;var self=this,timer=setTimeout(function(){self._attempts++,self._operationTimeoutCb&&(self._timeout=setTimeout(function(){self._operationTimeoutCb(self._attempts)},self._operationTimeout),this._options.unref&&self._timeout.unref()),self._fn(self._attempts)},timeout);return this._options.unref&&timer.unref(),!0};RetryOperation.prototype.attempt=function(fn,timeoutOps){this._fn=fn,timeoutOps&&(timeoutOps.timeout&&(this._operationTimeout=timeoutOps.timeout),timeoutOps.cb&&(this._operationTimeoutCb=timeoutOps.cb));var self=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){self._operationTimeoutCb()},self._operationTimeout)),this._fn(this._attempts)};RetryOperation.prototype.try=function(fn){console.log("Using RetryOperation.try() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=function(fn){console.log("Using RetryOperation.start() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0)return null;for(var counts={},mainError=null,mainErrorCount=0,i=0;i<this._errors.length;i++){var error=this._errors[i],message=error.message,count=(counts[message]||0)+1;counts[message]=count,count>=mainErrorCount&&(mainError=error,mainErrorCount=count)}return mainError}}});var require_retry=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry.js"(exports){var RetryOperation=require_retry_operation();exports.operation=function(options){var timeouts=exports.timeouts(options);return new RetryOperation(timeouts,{forever:options&&options.forever,unref:options&&options.unref})};exports.timeouts=function(options){if(options instanceof Array)return[].concat(options);var opts={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var key in options)opts[key]=options[key];if(opts.minTimeout>opts.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var timeouts=[],i=0;i<opts.retries;i++)timeouts.push(this.createTimeout(i,opts));return options&&options.forever&&!timeouts.length&&timeouts.push(this.createTimeout(i,opts)),timeouts.sort(function(a,b){return a-b}),timeouts};exports.createTimeout=function(attempt,opts){var random=opts.randomize?Math.random()+1:1,timeout=Math.round(random*opts.minTimeout*Math.pow(opts.factor,attempt));return timeout=Math.min(timeout,opts.maxTimeout),timeout};exports.wrap=function(obj,options,methods){if(options instanceof Array&&(methods=options,options=null),!methods){methods=[];for(var key in obj)typeof obj[key]=="function"&&methods.push(key)}for(var i=0;i<methods.length;i++){var method=methods[i],original=obj[method];obj[method]=function(){var op=exports.operation(options),args=Array.prototype.slice.call(arguments),callback=args.pop();args.push(function(err){op.retry(err)||(err&&(arguments[0]=op.mainError()),callback.apply(this,arguments))}),op.attempt(function(){original.apply(obj,args)})},obj[method].options=options}}}});var require_retry2=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/index.js"(exports,module){module.exports=require_retry()}});var require_dist=__commonJS({"../../node_modules/.pnpm/async-retry@1.1.3/node_modules/async-retry/dist/index.js"(exports,module){"use strict";var retrier=require_retry2();module.exports=function(fn,opts){return opts=opts||{},new Promise(function(resolve,reject){var op=retrier.operation(opts),bail=function(err){return reject(err||new Error("Aborted"))},onError=function(err){if(err.bail)return bail(err);op.retry(err)?opts.onRetry&&opts.onRetry(err):reject(op.mainError())};op.attempt(function(num){var val=void 0;try{val=fn(bail,num)}catch(err){return onError(err)}Promise.resolve(val).then(resolve,onError)})})}}});export{require_dist};
7
+ import{__commonJS}from"./chunk-BZENIQ7N.js";var require_retry_operation=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry_operation.js"(exports,module){function RetryOperation(timeouts,options){typeof options=="boolean"&&(options={forever:options}),this._timeouts=timeouts,this._options=options||{},this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}module.exports=RetryOperation;RetryOperation.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};RetryOperation.prototype.retry=function(err){if(this._timeout&&clearTimeout(this._timeout),!err)return!1;this._errors.push(err);var timeout=this._timeouts.shift();if(timeout===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),timeout=this._timeouts.shift();else return!1;var self=this,timer=setTimeout(function(){self._attempts++,self._operationTimeoutCb&&(self._timeout=setTimeout(function(){self._operationTimeoutCb(self._attempts)},self._operationTimeout),this._options.unref&&self._timeout.unref()),self._fn(self._attempts)},timeout);return this._options.unref&&timer.unref(),!0};RetryOperation.prototype.attempt=function(fn,timeoutOps){this._fn=fn,timeoutOps&&(timeoutOps.timeout&&(this._operationTimeout=timeoutOps.timeout),timeoutOps.cb&&(this._operationTimeoutCb=timeoutOps.cb));var self=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){self._operationTimeoutCb()},self._operationTimeout)),this._fn(this._attempts)};RetryOperation.prototype.try=function(fn){console.log("Using RetryOperation.try() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=function(fn){console.log("Using RetryOperation.start() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0)return null;for(var counts={},mainError=null,mainErrorCount=0,i=0;i<this._errors.length;i++){var error=this._errors[i],message=error.message,count=(counts[message]||0)+1;counts[message]=count,count>=mainErrorCount&&(mainError=error,mainErrorCount=count)}return mainError}}});var require_retry=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry.js"(exports){var RetryOperation=require_retry_operation();exports.operation=function(options){var timeouts=exports.timeouts(options);return new RetryOperation(timeouts,{forever:options&&options.forever,unref:options&&options.unref})};exports.timeouts=function(options){if(options instanceof Array)return[].concat(options);var opts={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var key in options)opts[key]=options[key];if(opts.minTimeout>opts.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var timeouts=[],i=0;i<opts.retries;i++)timeouts.push(this.createTimeout(i,opts));return options&&options.forever&&!timeouts.length&&timeouts.push(this.createTimeout(i,opts)),timeouts.sort(function(a,b){return a-b}),timeouts};exports.createTimeout=function(attempt,opts){var random=opts.randomize?Math.random()+1:1,timeout=Math.round(random*opts.minTimeout*Math.pow(opts.factor,attempt));return timeout=Math.min(timeout,opts.maxTimeout),timeout};exports.wrap=function(obj,options,methods){if(options instanceof Array&&(methods=options,options=null),!methods){methods=[];for(var key in obj)typeof obj[key]=="function"&&methods.push(key)}for(var i=0;i<methods.length;i++){var method=methods[i],original=obj[method];obj[method]=function(){var op=exports.operation(options),args=Array.prototype.slice.call(arguments),callback=args.pop();args.push(function(err){op.retry(err)||(err&&(arguments[0]=op.mainError()),callback.apply(this,arguments))}),op.attempt(function(){original.apply(obj,args)})},obj[method].options=options}}}});var require_retry2=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/index.js"(exports,module){module.exports=require_retry()}});var require_dist=__commonJS({"../../node_modules/.pnpm/async-retry@1.1.3/node_modules/async-retry/dist/index.js"(exports,module){"use strict";var retrier=require_retry2();module.exports=function(fn,opts){return opts=opts||{},new Promise(function(resolve,reject){var op=retrier.operation(opts),bail=function(err){return reject(err||new Error("Aborted"))},onError=function(err){if(err.bail)return bail(err);op.retry(err)?opts.onRetry&&opts.onRetry(err):reject(op.mainError())};op.attempt(function(num){var val=void 0;try{val=fn(bail,num)}catch(err){return onError(err)}Promise.resolve(val).then(resolve,onError)})})}}});export{require_dist};
@@ -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{canPrompt}from"./chunk-XD2LZRBS.js";import{outputError}from"./chunk-Q7AYTXUR.js";import{readFileSync}from"node:fs";function readAllStandardInput(stdin){return stdin.isTTY?Promise.resolve(""):new Promise(resolve=>{let chunks=[],timer=setTimeout(()=>{chunks.length===0&&(cleanup(),resolve(""))},500),onData=chunk=>{chunks.push(String(chunk))},onEnd=()=>{cleanup(),resolve(chunks.join(""))};function cleanup(){clearTimeout(timer),stdin.off("data",onData),stdin.off("end",onEnd)}stdin.setEncoding("utf8"),stdin.on("data",onData),stdin.on("end",onEnd)})}async function resolveMessageContent(client,flags,jsonOutput){if(flags.message!==void 0&&flags.file!==void 0)return outputError(client,jsonOutput,"CONFLICTING_CONTENT","Use either --message or --file, not both.");if(flags.message!==void 0)return flags.message;if(flags.file!==void 0){if(flags.file==="-"){let piped2=await readAllStandardInput(client.stdin);return piped2||outputError(client,jsonOutput,"MISSING_CONTENT","No content received on stdin for `--file -`.")}try{return readFileSync(flags.file,"utf8")}catch(err){return outputError(client,jsonOutput,"FILE_READ_ERROR",`Could not read ${flags.file}: ${err instanceof Error?err.message:String(err)}`)}}let piped=await readAllStandardInput(client.stdin);if(piped)return piped;if(!flags.hasAttachments){if(canPrompt(client)&&!jsonOutput){let text=await client.input.text({message:"Comment message:"});if(text)return text}return outputError(client,jsonOutput,"MISSING_CONTENT",'No content provided. Pass -m <text>, --file <path>, or pipe stdin (e.g. `echo "LGTM" | vercel comments reply <thread>`).')}}export{resolveMessageContent};
7
+ import{canPrompt}from"./chunk-XD2LZRBS.js";import{outputError}from"./chunk-WH3SHWVK.js";import{readFileSync}from"node:fs";function readAllStandardInput(stdin){return stdin.isTTY?Promise.resolve(""):new Promise(resolve=>{let chunks=[],timer=setTimeout(()=>{chunks.length===0&&(cleanup(),resolve(""))},500),onData=chunk=>{chunks.push(String(chunk))},onEnd=()=>{cleanup(),resolve(chunks.join(""))};function cleanup(){clearTimeout(timer),stdin.off("data",onData),stdin.off("end",onEnd)}stdin.setEncoding("utf8"),stdin.on("data",onData),stdin.on("end",onEnd)})}async function resolveMessageContent(client,flags,jsonOutput){if(flags.message!==void 0&&flags.file!==void 0)return outputError(client,jsonOutput,"CONFLICTING_CONTENT","Use either --message or --file, not both.");if(flags.message!==void 0)return flags.message;if(flags.file!==void 0){if(flags.file==="-"){let piped2=await readAllStandardInput(client.stdin);return piped2||outputError(client,jsonOutput,"MISSING_CONTENT","No content received on stdin for `--file -`.")}try{return readFileSync(flags.file,"utf8")}catch(err){return outputError(client,jsonOutput,"FILE_READ_ERROR",`Could not read ${flags.file}: ${err instanceof Error?err.message:String(err)}`)}}let piped=await readAllStandardInput(client.stdin);if(piped)return piped;if(!flags.hasAttachments){if(canPrompt(client)&&!jsonOutput){let text=await client.input.text({message:"Comment message:"});if(text)return text}return outputError(client,jsonOutput,"MISSING_CONTENT",'No content provided. Pass -m <text>, --file <path>, or pipe stdin (e.g. `echo "LGTM" | vercel comments reply <thread>`).')}}export{resolveMessageContent};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{tracesConfigCommand}from"./chunk-774D3BGN.js";import{deploymentOption,projectOption,protectionBypassOption,sinceOption,untilOption,yesOption}from"./chunk-5IPBCD7K.js";import{packageName}from"./chunk-FI772UVH.js";var spanQueryOptions=[{...projectOption,shorthand:"p",description:"Filter spans to one project (default: all team projects)"},{name:"environment",shorthand:null,type:String,deprecated:!1,description:"Environment: production or preview (case-insensitive)"},{name:"service",shorthand:null,type:String,deprecated:!1,description:"Filter by service name"},{name:"name",shorthand:null,type:String,deprecated:!1,description:"Filter by span name"},{name:"kind",shorthand:null,type:String,deprecated:!1,description:"Filter by span kind: unspecified (0), internal (1), server (2), client (3), producer (4), consumer (5)"},{name:"status",shorthand:null,type:String,deprecated:!1,description:"Status: error, ok, or unset (case-insensitive)"},{name:"deployment-id",shorthand:null,type:String,deprecated:!1,description:"Filter by deployment ID"},{name:"request-id",shorthand:null,type:String,deprecated:!1,description:"Filter by request ID. Some IDs return 404 in traces inspect. Reuse --scope and --project. See traces inspect --help."},{name:"trace-id",shorthand:null,type:String,deprecated:!1,description:"Filter by trace ID"},{name:"span-id",shorthand:null,type:String,deprecated:!1,description:"Filter by span ID"},{name:"root",shorthand:null,type:Boolean,deprecated:!1,description:"Show root spans only"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption];var requestIdLookupHelp={title:"Request-ID lookup",body:["A request ID in search results does not guarantee traces inspect can retrieve the trace. Lookup requires a matching root span in the same project within 30 minutes after the request-ID timestamp.","","If no matching root is found, lookup returns 404. Use the same --scope and --project for search and inspect."]},getSubcommand={name:"inspect",aliases:["get"],default:!0,description:"Fetch a captured trace by trace ID or request ID",helpSections:[{title:"Trace-ID lookup",body:["A 32-character hexadecimal ID selects trace-ID lookup. Other IDs select request-ID lookup.","Trace-ID lookup retrieves the trace directly within the trace retention window. Use the same --scope and --project as search."]},requestIdLookupHelp],arguments:[{name:"id",required:!0}],options:[{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Print the raw trace JSON to stdout"},{name:"project",shorthand:null,type:String,argument:"NAME|ID",deprecated:!1,description:"Project name or id to fetch the trace from (overrides the linked project)."},{name:"open",shorthand:null,type:Boolean,deprecated:!1,description:"Open the trace in the Vercel Dashboard instead of printing it."},{name:"view",shorthand:null,type:String,argument:"timeline|tree|waterfall",deprecated:!1,description:"Dashboard view to open. Only valid with --open. Defaults to timeline."}],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Fetch a trace without the default inspect subcommand",value:`${packageName} traces e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace from a specific team and project",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --scope my-team --project my-app`},{name:"Open the trace in the Vercel Dashboard",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open`},{name:"Open the trace in the Vercel Dashboard with the waterfall view",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open --view waterfall`}]},createSubcommand={name:"create",aliases:[],description:"Capture a session trace for a request (alias for `vercel curl --trace`).",arguments:[{name:"path",required:!0}],options:[deploymentOption,protectionBypassOption,{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Emit { response, requestId } as JSON on stdout"},{...yesOption,description:"Skip the production confirmation prompt (e.g. in non-interactive mode)"}],examples:[{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Target a specific deployment",value:`${packageName} traces create /api/status --deployment https://your-project-abc123.vercel.app`},{name:"Pass curl flags after the separator",value:`${packageName} traces create /api/test -- --request POST --data '{"name": "John"}'`}]},searchSubcommand={name:"search",aliases:[],description:"Search team spans. Use --project to filter one project. Results are newest first. Duration filters do not sort results.",helpSections:[{title:"Table columns",body:["Available: span.startTime, span.duration, span.name, span.status.code, service.name, environment, request.id, trace.id, span.id, parent.id, span.kind","Default: all except environment, request.id, and span.kind."]},{title:"KQL filters",body:["Fields: project.id, environment, service.name, deployment.id, request.id, user.id, session.id","Span fields: span.name, span.kind, span.id, parent.id, span.isRoot, span.status.code, span.duration","Trace fields: trace.id, trace.state","","Other fields search span attributes first, then resource attributes.","","span.duration uses milliseconds.","span.kind uses the numeric values shown under --kind.","span.status.code uses Error, Ok, or Unset.","Use field:value filters. Plain text search is not supported.","Use NOT to exclude values. End a value with * to match a prefix.","Wrap values with spaces in double quotes. Keep the full query in single quotes."]}],arguments:[],options:[...spanQueryOptions,{name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Maximum number of spans (default: 100)"},{name:"query",shorthand:"q",type:String,deprecated:!1,description:"Filter spans using KQL"},{name:"columns",shorthand:null,argument:"LIST",type:String,deprecated:!1,description:"Columns to show, in order. Separate names with commas. Cannot be used with --json or --non-interactive."},{name:"json",shorthand:"j",type:Boolean,deprecated:!1,description:"Output one JSON object per line"}],examples:[{name:"Find production errors for one service",value:`${packageName} traces search --environment production --service checkout-api --status error --since 1h`},{name:"Use KQL and output JSON Lines",value:`${packageName} traces search --query 'http.route:"/api/checkout"' --kind server --json`},{name:"Exclude span names starting with app/lib/fetch-api",value:`${packageName} traces search --query 'NOT span.name:app/lib/fetch-api*'`},{name:"Exclude exact span names",value:`${packageName} traces search --query 'NOT span.name:("GET /screenshot/v2" OR "middleware GET")'`},{name:"Find spans longer than 2 seconds",value:`${packageName} traces search --query 'span.duration > 2000' --columns span.startTime,span.duration,span.name,span.kind,span.status.code`}]},tracesCommand={name:"traces",aliases:[],description:"Fetch project traces and search spans across a Vercel team.",arguments:[{name:"id",required:!1}],subcommands:[getSubcommand,searchSubcommand,createSubcommand,tracesConfigCommand],options:[],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Search recent spans",value:`${packageName} traces search --status error`},{name:"List the trace sampling rules for a project",value:`${packageName} traces config ls`}]};export{getSubcommand,createSubcommand,searchSubcommand,tracesCommand};
7
+ import{tracesConfigCommand}from"./chunk-UFXKCETS.js";import{deploymentOption,projectOption,protectionBypassOption,sinceOption,untilOption,yesOption}from"./chunk-5IPBCD7K.js";import{packageName}from"./chunk-JESNVRVR.js";var spanQueryOptions=[{...projectOption,shorthand:"p",description:"Filter spans to one project (default: all team projects)"},{name:"environment",shorthand:null,type:String,deprecated:!1,description:"Environment: production or preview (case-insensitive)"},{name:"service",shorthand:null,type:String,deprecated:!1,description:"Filter by service name"},{name:"name",shorthand:null,type:String,deprecated:!1,description:"Filter by span name"},{name:"kind",shorthand:null,type:String,deprecated:!1,description:"Filter by span kind: unspecified (0), internal (1), server (2), client (3), producer (4), consumer (5)"},{name:"status",shorthand:null,type:String,deprecated:!1,description:"Status: error, ok, or unset (case-insensitive)"},{name:"deployment-id",shorthand:null,type:String,deprecated:!1,description:"Filter by deployment ID"},{name:"request-id",shorthand:null,type:String,deprecated:!1,description:"Filter by request ID. Some IDs return 404 in traces inspect. Reuse --scope and --project. See traces inspect --help."},{name:"trace-id",shorthand:null,type:String,deprecated:!1,description:"Filter by trace ID"},{name:"span-id",shorthand:null,type:String,deprecated:!1,description:"Filter by span ID"},{name:"root",shorthand:null,type:Boolean,deprecated:!1,description:"Show root spans only"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption];var requestIdLookupHelp={title:"Request-ID lookup",body:["A request ID in search results does not guarantee traces inspect can retrieve the trace. Lookup requires a matching root span in the same project within 30 minutes after the request-ID timestamp.","","If no matching root is found, lookup returns 404. Use the same --scope and --project for search and inspect."]},getSubcommand={name:"inspect",aliases:["get"],default:!0,description:"Fetch a captured trace by trace ID or request ID",helpSections:[{title:"Trace-ID lookup",body:["A 32-character hexadecimal ID selects trace-ID lookup. Other IDs select request-ID lookup.","Trace-ID lookup retrieves the trace directly within the trace retention window. Use the same --scope and --project as search."]},requestIdLookupHelp],arguments:[{name:"id",required:!0}],options:[{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Print the raw trace JSON to stdout"},{name:"project",shorthand:null,type:String,argument:"NAME|ID",deprecated:!1,description:"Project name or id to fetch the trace from (overrides the linked project)."},{name:"open",shorthand:null,type:Boolean,deprecated:!1,description:"Open the trace in the Vercel Dashboard instead of printing it."},{name:"view",shorthand:null,type:String,argument:"timeline|tree|waterfall",deprecated:!1,description:"Dashboard view to open. Only valid with --open. Defaults to timeline."}],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Fetch a trace without the default inspect subcommand",value:`${packageName} traces e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace from a specific team and project",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --scope my-team --project my-app`},{name:"Open the trace in the Vercel Dashboard",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open`},{name:"Open the trace in the Vercel Dashboard with the waterfall view",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open --view waterfall`}]},createSubcommand={name:"create",aliases:[],description:"Capture a session trace for a request (alias for `vercel curl --trace`).",arguments:[{name:"path",required:!0}],options:[deploymentOption,protectionBypassOption,{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Emit { response, requestId } as JSON on stdout"},{...yesOption,description:"Skip the production confirmation prompt (e.g. in non-interactive mode)"}],examples:[{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Target a specific deployment",value:`${packageName} traces create /api/status --deployment https://your-project-abc123.vercel.app`},{name:"Pass curl flags after the separator",value:`${packageName} traces create /api/test -- --request POST --data '{"name": "John"}'`}]},searchSubcommand={name:"search",aliases:[],description:"Search team spans. Use --project to filter one project. Results are newest first. Duration filters do not sort results.",helpSections:[{title:"Table columns",body:["Available: span.startTime, span.duration, span.name, span.status.code, service.name, environment, request.id, trace.id, span.id, parent.id, span.kind","Default: all except environment, request.id, and span.kind."]},{title:"KQL filters",body:["Fields: project.id, environment, service.name, deployment.id, request.id, user.id, session.id","Span fields: span.name, span.kind, span.id, parent.id, span.isRoot, span.status.code, span.duration","Trace fields: trace.id, trace.state","","Other fields search span attributes first, then resource attributes.","","span.duration uses milliseconds.","span.kind uses the numeric values shown under --kind.","span.status.code uses Error, Ok, or Unset.","Use field:value filters. Plain text search is not supported.","Use NOT to exclude values. End a value with * to match a prefix.","Wrap values with spaces in double quotes. Keep the full query in single quotes."]}],arguments:[],options:[...spanQueryOptions,{name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Maximum number of spans (default: 100)"},{name:"query",shorthand:"q",type:String,deprecated:!1,description:"Filter spans using KQL"},{name:"columns",shorthand:null,argument:"LIST",type:String,deprecated:!1,description:"Columns to show, in order. Separate names with commas. Cannot be used with --json or --non-interactive."},{name:"json",shorthand:"j",type:Boolean,deprecated:!1,description:"Output one JSON object per line"}],examples:[{name:"Find production errors for one service",value:`${packageName} traces search --environment production --service checkout-api --status error --since 1h`},{name:"Use KQL and output JSON Lines",value:`${packageName} traces search --query 'http.route:"/api/checkout"' --kind server --json`},{name:"Exclude span names starting with app/lib/fetch-api",value:`${packageName} traces search --query 'NOT span.name:app/lib/fetch-api*'`},{name:"Exclude exact span names",value:`${packageName} traces search --query 'NOT span.name:("GET /screenshot/v2" OR "middleware GET")'`},{name:"Find spans longer than 2 seconds",value:`${packageName} traces search --query 'span.duration > 2000' --columns span.startTime,span.duration,span.name,span.kind,span.status.code`}]},tracesCommand={name:"traces",aliases:[],description:"Fetch project traces and search spans across a Vercel team.",arguments:[{name:"id",required:!1}],subcommands:[getSubcommand,searchSubcommand,createSubcommand,tracesConfigCommand],options:[],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Search recent spans",value:`${packageName} traces search --status error`},{name:"List the trace sampling rules for a project",value:`${packageName} traces config ls`}]};export{getSubcommand,createSubcommand,searchSubcommand,tracesCommand};
@@ -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,__require,__toESM}from"./chunk-6L236MNA.js";var require_dist=__commonJS({"../../internals/get-package-json/dist/index.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{getPackageJSON:()=>getPackageJSON2});module.exports=__toCommonJS(src_exports);var import_fs=__toESM2(__require("fs")),import_path=__toESM2(__require("path")),import_url=__require("url"),cache=new Map;function getPackageJSONPath(dir){return import_path.default.join(dir,"package.json")}function captureCallerCallSite(){let _prepareStackTrace=Error.prepareStackTrace,callSite;try{Error.prepareStackTrace=(_,stack)=>stack,callSite=new Error().stack[2]}finally{Error.prepareStackTrace=_prepareStackTrace}return callSite}function getPackageJSON2(){let callSite=captureCallerCallSite(),filePath=callSite.getFileName()||callSite.getEvalOrigin();filePath.startsWith("file://")&&(filePath=(0,import_url.fileURLToPath)(filePath));let rootDir=import_path.default.dirname(filePath),packageJSONPath=getPackageJSONPath(rootDir);for(;!import_fs.default.existsSync(packageJSONPath);)rootDir=import_path.default.join(rootDir,".."),packageJSONPath=getPackageJSONPath(rootDir);let packageJSON=cache.get(packageJSONPath);return packageJSON||(packageJSON=JSON.parse(import_fs.default.readFileSync(packageJSONPath,"utf-8")),cache.set(packageJSONPath,packageJSON)),packageJSON}}});var import_get_package_json=__toESM(require_dist(),1),pkg_default=(0,import_get_package_json.getPackageJSON)();export{pkg_default};
7
+ import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_dist=__commonJS({"../../internals/get-package-json/dist/index.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{getPackageJSON:()=>getPackageJSON2});module.exports=__toCommonJS(src_exports);var import_fs=__toESM2(__require("fs")),import_path=__toESM2(__require("path")),import_url=__require("url"),cache=new Map;function getPackageJSONPath(dir){return import_path.default.join(dir,"package.json")}function captureCallerCallSite(){let _prepareStackTrace=Error.prepareStackTrace,callSite;try{Error.prepareStackTrace=(_,stack)=>stack,callSite=new Error().stack[2]}finally{Error.prepareStackTrace=_prepareStackTrace}return callSite}function getPackageJSON2(){let callSite=captureCallerCallSite(),filePath=callSite.getFileName()||callSite.getEvalOrigin();filePath.startsWith("file://")&&(filePath=(0,import_url.fileURLToPath)(filePath));let rootDir=import_path.default.dirname(filePath),packageJSONPath=getPackageJSONPath(rootDir);for(;!import_fs.default.existsSync(packageJSONPath);)rootDir=import_path.default.join(rootDir,".."),packageJSONPath=getPackageJSONPath(rootDir);let packageJSON=cache.get(packageJSONPath);return packageJSON||(packageJSON=JSON.parse(import_fs.default.readFileSync(packageJSONPath,"utf-8")),cache.set(packageJSONPath,packageJSON)),packageJSON}}});var import_get_package_json=__toESM(require_dist(),1),pkg_default=(0,import_get_package_json.getPackageJSON)();export{pkg_default};
@@ -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-6L236MNA.js";var require_is_date=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/is_date/index.js"(exports,module){function isDate(argument){return argument instanceof Date}module.exports=isDate}});var require_parse=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/parse/index.js"(exports,module){var isDate=require_is_date(),MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,DEFAULT_ADDITIONAL_DIGITS=2,parseTokenDateTimeDelimeter=/[T ]/,parseTokenPlainTime=/:/,parseTokenYY=/^(\d{2})$/,parseTokensYYY=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],parseTokenYYYY=/^(\d{4})/,parseTokensYYYYY=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],parseTokenMM=/^-(\d{2})$/,parseTokenDDD=/^-?(\d{3})$/,parseTokenMMDD=/^-?(\d{2})-?(\d{2})$/,parseTokenWww=/^-?W(\d{2})$/,parseTokenWwwD=/^-?W(\d{2})-?(\d{1})$/,parseTokenHH=/^(\d{2}([.,]\d*)?)$/,parseTokenHHMM=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenHHMMSS=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenTimezone=/([Z+-].*)$/,parseTokenTimezoneZ=/^(Z)$/,parseTokenTimezoneHH=/^([+-])(\d{2})$/,parseTokenTimezoneHHMM=/^([+-])(\d{2}):?(\d{2})$/;function parse(argument,dirtyOptions){if(isDate(argument))return new Date(argument.getTime());if(typeof argument!="string")return new Date(argument);var options=dirtyOptions||{},additionalDigits=options.additionalDigits;additionalDigits==null?additionalDigits=DEFAULT_ADDITIONAL_DIGITS:additionalDigits=Number(additionalDigits);var dateStrings=splitDateString(argument),parseYearResult=parseYear(dateStrings.date,additionalDigits),year=parseYearResult.year,restDateString=parseYearResult.restDateString,date=parseDate(restDateString,year);if(date){var timestamp=date.getTime(),time=0,offset;return dateStrings.time&&(time=parseTime(dateStrings.time)),dateStrings.timezone?offset=parseTimezone(dateStrings.timezone):(offset=new Date(timestamp+time).getTimezoneOffset(),offset=new Date(timestamp+time+offset*MILLISECONDS_IN_MINUTE).getTimezoneOffset()),new Date(timestamp+time+offset*MILLISECONDS_IN_MINUTE)}else return new Date(argument)}function splitDateString(dateString){var dateStrings={},array=dateString.split(parseTokenDateTimeDelimeter),timeString;if(parseTokenPlainTime.test(array[0])?(dateStrings.date=null,timeString=array[0]):(dateStrings.date=array[0],timeString=array[1]),timeString){var token=parseTokenTimezone.exec(timeString);token?(dateStrings.time=timeString.replace(token[1],""),dateStrings.timezone=token[1]):dateStrings.time=timeString}return dateStrings}function parseYear(dateString,additionalDigits){var parseTokenYYY=parseTokensYYY[additionalDigits],parseTokenYYYYY=parseTokensYYYYY[additionalDigits],token;if(token=parseTokenYYYY.exec(dateString)||parseTokenYYYYY.exec(dateString),token){var yearString=token[1];return{year:parseInt(yearString,10),restDateString:dateString.slice(yearString.length)}}if(token=parseTokenYY.exec(dateString)||parseTokenYYY.exec(dateString),token){var centuryString=token[1];return{year:parseInt(centuryString,10)*100,restDateString:dateString.slice(centuryString.length)}}return{year:null}}function parseDate(dateString,year){if(year===null)return null;var token,date,month,week;if(dateString.length===0)return date=new Date(0),date.setUTCFullYear(year),date;if(token=parseTokenMM.exec(dateString),token)return date=new Date(0),month=parseInt(token[1],10)-1,date.setUTCFullYear(year,month),date;if(token=parseTokenDDD.exec(dateString),token){date=new Date(0);var dayOfYear=parseInt(token[1],10);return date.setUTCFullYear(year,0,dayOfYear),date}if(token=parseTokenMMDD.exec(dateString),token){date=new Date(0),month=parseInt(token[1],10)-1;var day=parseInt(token[2],10);return date.setUTCFullYear(year,month,day),date}if(token=parseTokenWww.exec(dateString),token)return week=parseInt(token[1],10)-1,dayOfISOYear(year,week);if(token=parseTokenWwwD.exec(dateString),token){week=parseInt(token[1],10)-1;var dayOfWeek=parseInt(token[2],10)-1;return dayOfISOYear(year,week,dayOfWeek)}return null}function parseTime(timeString){var token,hours,minutes;if(token=parseTokenHH.exec(timeString),token)return hours=parseFloat(token[1].replace(",",".")),hours%24*MILLISECONDS_IN_HOUR;if(token=parseTokenHHMM.exec(timeString),token)return hours=parseInt(token[1],10),minutes=parseFloat(token[2].replace(",",".")),hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE;if(token=parseTokenHHMMSS.exec(timeString),token){hours=parseInt(token[1],10),minutes=parseInt(token[2],10);var seconds=parseFloat(token[3].replace(",","."));return hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE+seconds*1e3}return null}function parseTimezone(timezoneString){var token,absoluteOffset;return token=parseTokenTimezoneZ.exec(timezoneString),token?0:(token=parseTokenTimezoneHH.exec(timezoneString),token?(absoluteOffset=parseInt(token[2],10)*60,token[1]==="+"?-absoluteOffset:absoluteOffset):(token=parseTokenTimezoneHHMM.exec(timezoneString),token?(absoluteOffset=parseInt(token[2],10)*60+parseInt(token[3],10),token[1]==="+"?-absoluteOffset:absoluteOffset):0))}function dayOfISOYear(isoYear,week,day){week=week||0,day=day||0;var date=new Date(0);date.setUTCFullYear(isoYear,0,4);var fourthOfJanuaryDay=date.getUTCDay()||7,diff=week*7+day+1-fourthOfJanuaryDay;return date.setUTCDate(date.getUTCDate()+diff),date}module.exports=parse}});var require_start_of_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_year/index.js"(exports,module){var parse=require_parse();function startOfYear(dirtyDate){var cleanDate=parse(dirtyDate),date=new Date(0);return date.setFullYear(cleanDate.getFullYear(),0,1),date.setHours(0,0,0,0),date}module.exports=startOfYear}});var require_start_of_day=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_day/index.js"(exports,module){var parse=require_parse();function startOfDay(dirtyDate){var date=parse(dirtyDate);return date.setHours(0,0,0,0),date}module.exports=startOfDay}});var require_difference_in_calendar_days=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/difference_in_calendar_days/index.js"(exports,module){var startOfDay=require_start_of_day(),MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_DAY=864e5;function differenceInCalendarDays(dirtyDateLeft,dirtyDateRight){var startOfDayLeft=startOfDay(dirtyDateLeft),startOfDayRight=startOfDay(dirtyDateRight),timestampLeft=startOfDayLeft.getTime()-startOfDayLeft.getTimezoneOffset()*MILLISECONDS_IN_MINUTE,timestampRight=startOfDayRight.getTime()-startOfDayRight.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;return Math.round((timestampLeft-timestampRight)/MILLISECONDS_IN_DAY)}module.exports=differenceInCalendarDays}});var require_get_day_of_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_day_of_year/index.js"(exports,module){var parse=require_parse(),startOfYear=require_start_of_year(),differenceInCalendarDays=require_difference_in_calendar_days();function getDayOfYear(dirtyDate){var date=parse(dirtyDate),diff=differenceInCalendarDays(date,startOfYear(date)),dayOfYear=diff+1;return dayOfYear}module.exports=getDayOfYear}});var require_start_of_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_week/index.js"(exports,module){var parse=require_parse();function startOfWeek(dirtyDate,dirtyOptions){var weekStartsOn=dirtyOptions&&Number(dirtyOptions.weekStartsOn)||0,date=parse(dirtyDate),day=date.getDay(),diff=(day<weekStartsOn?7:0)+day-weekStartsOn;return date.setDate(date.getDate()-diff),date.setHours(0,0,0,0),date}module.exports=startOfWeek}});var require_start_of_iso_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_iso_week/index.js"(exports,module){var startOfWeek=require_start_of_week();function startOfISOWeek(dirtyDate){return startOfWeek(dirtyDate,{weekStartsOn:1})}module.exports=startOfISOWeek}});var require_get_iso_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_iso_year/index.js"(exports,module){var parse=require_parse(),startOfISOWeek=require_start_of_iso_week();function getISOYear(dirtyDate){var date=parse(dirtyDate),year=date.getFullYear(),fourthOfJanuaryOfNextYear=new Date(0);fourthOfJanuaryOfNextYear.setFullYear(year+1,0,4),fourthOfJanuaryOfNextYear.setHours(0,0,0,0);var startOfNextYear=startOfISOWeek(fourthOfJanuaryOfNextYear),fourthOfJanuaryOfThisYear=new Date(0);fourthOfJanuaryOfThisYear.setFullYear(year,0,4),fourthOfJanuaryOfThisYear.setHours(0,0,0,0);var startOfThisYear=startOfISOWeek(fourthOfJanuaryOfThisYear);return date.getTime()>=startOfNextYear.getTime()?year+1:date.getTime()>=startOfThisYear.getTime()?year:year-1}module.exports=getISOYear}});var require_start_of_iso_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_iso_year/index.js"(exports,module){var getISOYear=require_get_iso_year(),startOfISOWeek=require_start_of_iso_week();function startOfISOYear(dirtyDate){var year=getISOYear(dirtyDate),fourthOfJanuary=new Date(0);fourthOfJanuary.setFullYear(year,0,4),fourthOfJanuary.setHours(0,0,0,0);var date=startOfISOWeek(fourthOfJanuary);return date}module.exports=startOfISOYear}});var require_get_iso_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_iso_week/index.js"(exports,module){var parse=require_parse(),startOfISOWeek=require_start_of_iso_week(),startOfISOYear=require_start_of_iso_year(),MILLISECONDS_IN_WEEK=6048e5;function getISOWeek(dirtyDate){var date=parse(dirtyDate),diff=startOfISOWeek(date).getTime()-startOfISOYear(date).getTime();return Math.round(diff/MILLISECONDS_IN_WEEK)+1}module.exports=getISOWeek}});var require_is_valid=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/is_valid/index.js"(exports,module){var isDate=require_is_date();function isValid(dirtyDate){if(isDate(dirtyDate))return!isNaN(dirtyDate);throw new TypeError(toString.call(dirtyDate)+" is not an instance of Date")}module.exports=isValid}});var require_build_distance_in_words_locale=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js"(exports,module){function buildDistanceInWordsLocale(){var distanceInWordsLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function localize(token,count,options){options=options||{};var result;return typeof distanceInWordsLocale[token]=="string"?result=distanceInWordsLocale[token]:count===1?result=distanceInWordsLocale[token].one:result=distanceInWordsLocale[token].other.replace("{{count}}",count),options.addSuffix?options.comparison>0?"in "+result:result+" ago":result}return{localize}}module.exports=buildDistanceInWordsLocale}});var require_build_formatting_tokens_reg_exp=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js"(exports,module){var commonFormatterKeys=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];function buildFormattingTokensRegExp(formatters){var formatterKeys=[];for(var key in formatters)formatters.hasOwnProperty(key)&&formatterKeys.push(key);var formattingTokens=commonFormatterKeys.concat(formatterKeys).sort().reverse(),formattingTokensRegExp=new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+formattingTokens.join("|")+"|.)","g");return formattingTokensRegExp}module.exports=buildFormattingTokensRegExp}});var require_build_format_locale=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/build_format_locale/index.js"(exports,module){var buildFormattingTokensRegExp=require_build_formatting_tokens_reg_exp();function buildFormatLocale(){var months3char=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsFull=["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays2char=["Su","Mo","Tu","We","Th","Fr","Sa"],weekdays3char=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysFull=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],meridiemUppercase=["AM","PM"],meridiemLowercase=["am","pm"],meridiemFull=["a.m.","p.m."],formatters={MMM:function(date){return months3char[date.getMonth()]},MMMM:function(date){return monthsFull[date.getMonth()]},dd:function(date){return weekdays2char[date.getDay()]},ddd:function(date){return weekdays3char[date.getDay()]},dddd:function(date){return weekdaysFull[date.getDay()]},A:function(date){return date.getHours()/12>=1?meridiemUppercase[1]:meridiemUppercase[0]},a:function(date){return date.getHours()/12>=1?meridiemLowercase[1]:meridiemLowercase[0]},aa:function(date){return date.getHours()/12>=1?meridiemFull[1]:meridiemFull[0]}},ordinalFormatters=["M","D","DDD","d","Q","W"];return ordinalFormatters.forEach(function(formatterToken){formatters[formatterToken+"o"]=function(date,formatters2){return ordinal(formatters2[formatterToken](date))}}),{formatters,formattingTokensRegExp:buildFormattingTokensRegExp(formatters)}}function ordinal(number){var rem100=number%100;if(rem100>20||rem100<10)switch(rem100%10){case 1:return number+"st";case 2:return number+"nd";case 3:return number+"rd"}return number+"th"}module.exports=buildFormatLocale}});var require_en=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/index.js"(exports,module){var buildDistanceInWordsLocale=require_build_distance_in_words_locale(),buildFormatLocale=require_build_format_locale();module.exports={distanceInWords:buildDistanceInWordsLocale(),format:buildFormatLocale()}}});var require_format=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/format/index.js"(exports,module){var getDayOfYear=require_get_day_of_year(),getISOWeek=require_get_iso_week(),getISOYear=require_get_iso_year(),parse=require_parse(),isValid=require_is_valid(),enLocale=require_en();function format(dirtyDate,dirtyFormatStr,dirtyOptions){var formatStr=dirtyFormatStr?String(dirtyFormatStr):"YYYY-MM-DDTHH:mm:ss.SSSZ",options=dirtyOptions||{},locale=options.locale,localeFormatters=enLocale.format.formatters,formattingTokensRegExp=enLocale.format.formattingTokensRegExp;locale&&locale.format&&locale.format.formatters&&(localeFormatters=locale.format.formatters,locale.format.formattingTokensRegExp&&(formattingTokensRegExp=locale.format.formattingTokensRegExp));var date=parse(dirtyDate);if(!isValid(date))return"Invalid Date";var formatFn=buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp);return formatFn(date)}var formatters={M:function(date){return date.getMonth()+1},MM:function(date){return addLeadingZeros(date.getMonth()+1,2)},Q:function(date){return Math.ceil((date.getMonth()+1)/3)},D:function(date){return date.getDate()},DD:function(date){return addLeadingZeros(date.getDate(),2)},DDD:function(date){return getDayOfYear(date)},DDDD:function(date){return addLeadingZeros(getDayOfYear(date),3)},d:function(date){return date.getDay()},E:function(date){return date.getDay()||7},W:function(date){return getISOWeek(date)},WW:function(date){return addLeadingZeros(getISOWeek(date),2)},YY:function(date){return addLeadingZeros(date.getFullYear(),4).substr(2)},YYYY:function(date){return addLeadingZeros(date.getFullYear(),4)},GG:function(date){return String(getISOYear(date)).substr(2)},GGGG:function(date){return getISOYear(date)},H:function(date){return date.getHours()},HH:function(date){return addLeadingZeros(date.getHours(),2)},h:function(date){var hours=date.getHours();return hours===0?12:hours>12?hours%12:hours},hh:function(date){return addLeadingZeros(formatters.h(date),2)},m:function(date){return date.getMinutes()},mm:function(date){return addLeadingZeros(date.getMinutes(),2)},s:function(date){return date.getSeconds()},ss:function(date){return addLeadingZeros(date.getSeconds(),2)},S:function(date){return Math.floor(date.getMilliseconds()/100)},SS:function(date){return addLeadingZeros(Math.floor(date.getMilliseconds()/10),2)},SSS:function(date){return addLeadingZeros(date.getMilliseconds(),3)},Z:function(date){return formatTimezone(date.getTimezoneOffset(),":")},ZZ:function(date){return formatTimezone(date.getTimezoneOffset())},X:function(date){return Math.floor(date.getTime()/1e3)},x:function(date){return date.getTime()}};function buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp){var array=formatStr.match(formattingTokensRegExp),length=array.length,i,formatter;for(i=0;i<length;i++)formatter=localeFormatters[array[i]]||formatters[array[i]],formatter?array[i]=formatter:array[i]=removeFormattingTokens(array[i]);return function(date){for(var output="",i2=0;i2<length;i2++)array[i2]instanceof Function?output+=array[i2](date,formatters):output+=array[i2];return output}}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|]$/g,""):input.replace(/\\/g,"")}function formatTimezone(offset,delimeter){delimeter=delimeter||"";var sign=offset>0?"-":"+",absOffset=Math.abs(offset),hours=Math.floor(absOffset/60),minutes=absOffset%60;return sign+addLeadingZeros(hours,2)+delimeter+addLeadingZeros(minutes,2)}function addLeadingZeros(number,targetLength){for(var output=Math.abs(number).toString();output.length<targetLength;)output="0"+output;return output}module.exports=format}});export{require_format};
7
+ import{__commonJS}from"./chunk-BZENIQ7N.js";var require_is_date=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/is_date/index.js"(exports,module){function isDate(argument){return argument instanceof Date}module.exports=isDate}});var require_parse=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/parse/index.js"(exports,module){var isDate=require_is_date(),MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,DEFAULT_ADDITIONAL_DIGITS=2,parseTokenDateTimeDelimeter=/[T ]/,parseTokenPlainTime=/:/,parseTokenYY=/^(\d{2})$/,parseTokensYYY=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],parseTokenYYYY=/^(\d{4})/,parseTokensYYYYY=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],parseTokenMM=/^-(\d{2})$/,parseTokenDDD=/^-?(\d{3})$/,parseTokenMMDD=/^-?(\d{2})-?(\d{2})$/,parseTokenWww=/^-?W(\d{2})$/,parseTokenWwwD=/^-?W(\d{2})-?(\d{1})$/,parseTokenHH=/^(\d{2}([.,]\d*)?)$/,parseTokenHHMM=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenHHMMSS=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenTimezone=/([Z+-].*)$/,parseTokenTimezoneZ=/^(Z)$/,parseTokenTimezoneHH=/^([+-])(\d{2})$/,parseTokenTimezoneHHMM=/^([+-])(\d{2}):?(\d{2})$/;function parse(argument,dirtyOptions){if(isDate(argument))return new Date(argument.getTime());if(typeof argument!="string")return new Date(argument);var options=dirtyOptions||{},additionalDigits=options.additionalDigits;additionalDigits==null?additionalDigits=DEFAULT_ADDITIONAL_DIGITS:additionalDigits=Number(additionalDigits);var dateStrings=splitDateString(argument),parseYearResult=parseYear(dateStrings.date,additionalDigits),year=parseYearResult.year,restDateString=parseYearResult.restDateString,date=parseDate(restDateString,year);if(date){var timestamp=date.getTime(),time=0,offset;return dateStrings.time&&(time=parseTime(dateStrings.time)),dateStrings.timezone?offset=parseTimezone(dateStrings.timezone):(offset=new Date(timestamp+time).getTimezoneOffset(),offset=new Date(timestamp+time+offset*MILLISECONDS_IN_MINUTE).getTimezoneOffset()),new Date(timestamp+time+offset*MILLISECONDS_IN_MINUTE)}else return new Date(argument)}function splitDateString(dateString){var dateStrings={},array=dateString.split(parseTokenDateTimeDelimeter),timeString;if(parseTokenPlainTime.test(array[0])?(dateStrings.date=null,timeString=array[0]):(dateStrings.date=array[0],timeString=array[1]),timeString){var token=parseTokenTimezone.exec(timeString);token?(dateStrings.time=timeString.replace(token[1],""),dateStrings.timezone=token[1]):dateStrings.time=timeString}return dateStrings}function parseYear(dateString,additionalDigits){var parseTokenYYY=parseTokensYYY[additionalDigits],parseTokenYYYYY=parseTokensYYYYY[additionalDigits],token;if(token=parseTokenYYYY.exec(dateString)||parseTokenYYYYY.exec(dateString),token){var yearString=token[1];return{year:parseInt(yearString,10),restDateString:dateString.slice(yearString.length)}}if(token=parseTokenYY.exec(dateString)||parseTokenYYY.exec(dateString),token){var centuryString=token[1];return{year:parseInt(centuryString,10)*100,restDateString:dateString.slice(centuryString.length)}}return{year:null}}function parseDate(dateString,year){if(year===null)return null;var token,date,month,week;if(dateString.length===0)return date=new Date(0),date.setUTCFullYear(year),date;if(token=parseTokenMM.exec(dateString),token)return date=new Date(0),month=parseInt(token[1],10)-1,date.setUTCFullYear(year,month),date;if(token=parseTokenDDD.exec(dateString),token){date=new Date(0);var dayOfYear=parseInt(token[1],10);return date.setUTCFullYear(year,0,dayOfYear),date}if(token=parseTokenMMDD.exec(dateString),token){date=new Date(0),month=parseInt(token[1],10)-1;var day=parseInt(token[2],10);return date.setUTCFullYear(year,month,day),date}if(token=parseTokenWww.exec(dateString),token)return week=parseInt(token[1],10)-1,dayOfISOYear(year,week);if(token=parseTokenWwwD.exec(dateString),token){week=parseInt(token[1],10)-1;var dayOfWeek=parseInt(token[2],10)-1;return dayOfISOYear(year,week,dayOfWeek)}return null}function parseTime(timeString){var token,hours,minutes;if(token=parseTokenHH.exec(timeString),token)return hours=parseFloat(token[1].replace(",",".")),hours%24*MILLISECONDS_IN_HOUR;if(token=parseTokenHHMM.exec(timeString),token)return hours=parseInt(token[1],10),minutes=parseFloat(token[2].replace(",",".")),hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE;if(token=parseTokenHHMMSS.exec(timeString),token){hours=parseInt(token[1],10),minutes=parseInt(token[2],10);var seconds=parseFloat(token[3].replace(",","."));return hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE+seconds*1e3}return null}function parseTimezone(timezoneString){var token,absoluteOffset;return token=parseTokenTimezoneZ.exec(timezoneString),token?0:(token=parseTokenTimezoneHH.exec(timezoneString),token?(absoluteOffset=parseInt(token[2],10)*60,token[1]==="+"?-absoluteOffset:absoluteOffset):(token=parseTokenTimezoneHHMM.exec(timezoneString),token?(absoluteOffset=parseInt(token[2],10)*60+parseInt(token[3],10),token[1]==="+"?-absoluteOffset:absoluteOffset):0))}function dayOfISOYear(isoYear,week,day){week=week||0,day=day||0;var date=new Date(0);date.setUTCFullYear(isoYear,0,4);var fourthOfJanuaryDay=date.getUTCDay()||7,diff=week*7+day+1-fourthOfJanuaryDay;return date.setUTCDate(date.getUTCDate()+diff),date}module.exports=parse}});var require_start_of_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_year/index.js"(exports,module){var parse=require_parse();function startOfYear(dirtyDate){var cleanDate=parse(dirtyDate),date=new Date(0);return date.setFullYear(cleanDate.getFullYear(),0,1),date.setHours(0,0,0,0),date}module.exports=startOfYear}});var require_start_of_day=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_day/index.js"(exports,module){var parse=require_parse();function startOfDay(dirtyDate){var date=parse(dirtyDate);return date.setHours(0,0,0,0),date}module.exports=startOfDay}});var require_difference_in_calendar_days=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/difference_in_calendar_days/index.js"(exports,module){var startOfDay=require_start_of_day(),MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_DAY=864e5;function differenceInCalendarDays(dirtyDateLeft,dirtyDateRight){var startOfDayLeft=startOfDay(dirtyDateLeft),startOfDayRight=startOfDay(dirtyDateRight),timestampLeft=startOfDayLeft.getTime()-startOfDayLeft.getTimezoneOffset()*MILLISECONDS_IN_MINUTE,timestampRight=startOfDayRight.getTime()-startOfDayRight.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;return Math.round((timestampLeft-timestampRight)/MILLISECONDS_IN_DAY)}module.exports=differenceInCalendarDays}});var require_get_day_of_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_day_of_year/index.js"(exports,module){var parse=require_parse(),startOfYear=require_start_of_year(),differenceInCalendarDays=require_difference_in_calendar_days();function getDayOfYear(dirtyDate){var date=parse(dirtyDate),diff=differenceInCalendarDays(date,startOfYear(date)),dayOfYear=diff+1;return dayOfYear}module.exports=getDayOfYear}});var require_start_of_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_week/index.js"(exports,module){var parse=require_parse();function startOfWeek(dirtyDate,dirtyOptions){var weekStartsOn=dirtyOptions&&Number(dirtyOptions.weekStartsOn)||0,date=parse(dirtyDate),day=date.getDay(),diff=(day<weekStartsOn?7:0)+day-weekStartsOn;return date.setDate(date.getDate()-diff),date.setHours(0,0,0,0),date}module.exports=startOfWeek}});var require_start_of_iso_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_iso_week/index.js"(exports,module){var startOfWeek=require_start_of_week();function startOfISOWeek(dirtyDate){return startOfWeek(dirtyDate,{weekStartsOn:1})}module.exports=startOfISOWeek}});var require_get_iso_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_iso_year/index.js"(exports,module){var parse=require_parse(),startOfISOWeek=require_start_of_iso_week();function getISOYear(dirtyDate){var date=parse(dirtyDate),year=date.getFullYear(),fourthOfJanuaryOfNextYear=new Date(0);fourthOfJanuaryOfNextYear.setFullYear(year+1,0,4),fourthOfJanuaryOfNextYear.setHours(0,0,0,0);var startOfNextYear=startOfISOWeek(fourthOfJanuaryOfNextYear),fourthOfJanuaryOfThisYear=new Date(0);fourthOfJanuaryOfThisYear.setFullYear(year,0,4),fourthOfJanuaryOfThisYear.setHours(0,0,0,0);var startOfThisYear=startOfISOWeek(fourthOfJanuaryOfThisYear);return date.getTime()>=startOfNextYear.getTime()?year+1:date.getTime()>=startOfThisYear.getTime()?year:year-1}module.exports=getISOYear}});var require_start_of_iso_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_iso_year/index.js"(exports,module){var getISOYear=require_get_iso_year(),startOfISOWeek=require_start_of_iso_week();function startOfISOYear(dirtyDate){var year=getISOYear(dirtyDate),fourthOfJanuary=new Date(0);fourthOfJanuary.setFullYear(year,0,4),fourthOfJanuary.setHours(0,0,0,0);var date=startOfISOWeek(fourthOfJanuary);return date}module.exports=startOfISOYear}});var require_get_iso_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_iso_week/index.js"(exports,module){var parse=require_parse(),startOfISOWeek=require_start_of_iso_week(),startOfISOYear=require_start_of_iso_year(),MILLISECONDS_IN_WEEK=6048e5;function getISOWeek(dirtyDate){var date=parse(dirtyDate),diff=startOfISOWeek(date).getTime()-startOfISOYear(date).getTime();return Math.round(diff/MILLISECONDS_IN_WEEK)+1}module.exports=getISOWeek}});var require_is_valid=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/is_valid/index.js"(exports,module){var isDate=require_is_date();function isValid(dirtyDate){if(isDate(dirtyDate))return!isNaN(dirtyDate);throw new TypeError(toString.call(dirtyDate)+" is not an instance of Date")}module.exports=isValid}});var require_build_distance_in_words_locale=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js"(exports,module){function buildDistanceInWordsLocale(){var distanceInWordsLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function localize(token,count,options){options=options||{};var result;return typeof distanceInWordsLocale[token]=="string"?result=distanceInWordsLocale[token]:count===1?result=distanceInWordsLocale[token].one:result=distanceInWordsLocale[token].other.replace("{{count}}",count),options.addSuffix?options.comparison>0?"in "+result:result+" ago":result}return{localize}}module.exports=buildDistanceInWordsLocale}});var require_build_formatting_tokens_reg_exp=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js"(exports,module){var commonFormatterKeys=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];function buildFormattingTokensRegExp(formatters){var formatterKeys=[];for(var key in formatters)formatters.hasOwnProperty(key)&&formatterKeys.push(key);var formattingTokens=commonFormatterKeys.concat(formatterKeys).sort().reverse(),formattingTokensRegExp=new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+formattingTokens.join("|")+"|.)","g");return formattingTokensRegExp}module.exports=buildFormattingTokensRegExp}});var require_build_format_locale=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/build_format_locale/index.js"(exports,module){var buildFormattingTokensRegExp=require_build_formatting_tokens_reg_exp();function buildFormatLocale(){var months3char=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsFull=["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays2char=["Su","Mo","Tu","We","Th","Fr","Sa"],weekdays3char=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysFull=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],meridiemUppercase=["AM","PM"],meridiemLowercase=["am","pm"],meridiemFull=["a.m.","p.m."],formatters={MMM:function(date){return months3char[date.getMonth()]},MMMM:function(date){return monthsFull[date.getMonth()]},dd:function(date){return weekdays2char[date.getDay()]},ddd:function(date){return weekdays3char[date.getDay()]},dddd:function(date){return weekdaysFull[date.getDay()]},A:function(date){return date.getHours()/12>=1?meridiemUppercase[1]:meridiemUppercase[0]},a:function(date){return date.getHours()/12>=1?meridiemLowercase[1]:meridiemLowercase[0]},aa:function(date){return date.getHours()/12>=1?meridiemFull[1]:meridiemFull[0]}},ordinalFormatters=["M","D","DDD","d","Q","W"];return ordinalFormatters.forEach(function(formatterToken){formatters[formatterToken+"o"]=function(date,formatters2){return ordinal(formatters2[formatterToken](date))}}),{formatters,formattingTokensRegExp:buildFormattingTokensRegExp(formatters)}}function ordinal(number){var rem100=number%100;if(rem100>20||rem100<10)switch(rem100%10){case 1:return number+"st";case 2:return number+"nd";case 3:return number+"rd"}return number+"th"}module.exports=buildFormatLocale}});var require_en=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/index.js"(exports,module){var buildDistanceInWordsLocale=require_build_distance_in_words_locale(),buildFormatLocale=require_build_format_locale();module.exports={distanceInWords:buildDistanceInWordsLocale(),format:buildFormatLocale()}}});var require_format=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/format/index.js"(exports,module){var getDayOfYear=require_get_day_of_year(),getISOWeek=require_get_iso_week(),getISOYear=require_get_iso_year(),parse=require_parse(),isValid=require_is_valid(),enLocale=require_en();function format(dirtyDate,dirtyFormatStr,dirtyOptions){var formatStr=dirtyFormatStr?String(dirtyFormatStr):"YYYY-MM-DDTHH:mm:ss.SSSZ",options=dirtyOptions||{},locale=options.locale,localeFormatters=enLocale.format.formatters,formattingTokensRegExp=enLocale.format.formattingTokensRegExp;locale&&locale.format&&locale.format.formatters&&(localeFormatters=locale.format.formatters,locale.format.formattingTokensRegExp&&(formattingTokensRegExp=locale.format.formattingTokensRegExp));var date=parse(dirtyDate);if(!isValid(date))return"Invalid Date";var formatFn=buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp);return formatFn(date)}var formatters={M:function(date){return date.getMonth()+1},MM:function(date){return addLeadingZeros(date.getMonth()+1,2)},Q:function(date){return Math.ceil((date.getMonth()+1)/3)},D:function(date){return date.getDate()},DD:function(date){return addLeadingZeros(date.getDate(),2)},DDD:function(date){return getDayOfYear(date)},DDDD:function(date){return addLeadingZeros(getDayOfYear(date),3)},d:function(date){return date.getDay()},E:function(date){return date.getDay()||7},W:function(date){return getISOWeek(date)},WW:function(date){return addLeadingZeros(getISOWeek(date),2)},YY:function(date){return addLeadingZeros(date.getFullYear(),4).substr(2)},YYYY:function(date){return addLeadingZeros(date.getFullYear(),4)},GG:function(date){return String(getISOYear(date)).substr(2)},GGGG:function(date){return getISOYear(date)},H:function(date){return date.getHours()},HH:function(date){return addLeadingZeros(date.getHours(),2)},h:function(date){var hours=date.getHours();return hours===0?12:hours>12?hours%12:hours},hh:function(date){return addLeadingZeros(formatters.h(date),2)},m:function(date){return date.getMinutes()},mm:function(date){return addLeadingZeros(date.getMinutes(),2)},s:function(date){return date.getSeconds()},ss:function(date){return addLeadingZeros(date.getSeconds(),2)},S:function(date){return Math.floor(date.getMilliseconds()/100)},SS:function(date){return addLeadingZeros(Math.floor(date.getMilliseconds()/10),2)},SSS:function(date){return addLeadingZeros(date.getMilliseconds(),3)},Z:function(date){return formatTimezone(date.getTimezoneOffset(),":")},ZZ:function(date){return formatTimezone(date.getTimezoneOffset())},X:function(date){return Math.floor(date.getTime()/1e3)},x:function(date){return date.getTime()}};function buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp){var array=formatStr.match(formattingTokensRegExp),length=array.length,i,formatter;for(i=0;i<length;i++)formatter=localeFormatters[array[i]]||formatters[array[i]],formatter?array[i]=formatter:array[i]=removeFormattingTokens(array[i]);return function(date){for(var output="",i2=0;i2<length;i2++)array[i2]instanceof Function?output+=array[i2](date,formatters):output+=array[i2];return output}}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|]$/g,""):input.replace(/\\/g,"")}function formatTimezone(offset,delimeter){delimeter=delimeter||"";var sign=offset>0?"-":"+",absOffset=Math.abs(offset),hours=Math.floor(absOffset/60),minutes=absOffset%60;return sign+addLeadingZeros(hours,2)+delimeter+addLeadingZeros(minutes,2)}function addLeadingZeros(number,targetLength){for(var output=Math.abs(number).toString();output.length<targetLength;)output="0"+output;return output}module.exports=format}});export{require_format};