@depup/vercel 59.11.7-depup.0 → 59.23.2-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (466) hide show
  1. package/README.md +4 -4
  2. package/changes.json +3 -3
  3. package/dist/chunks/add-JVSHQKWC.js +8 -0
  4. package/dist/chunks/add-UKFIETLE.js +8 -0
  5. package/dist/chunks/add-Z3CJT63N.js +8 -0
  6. package/dist/chunks/build-SMQYQX23.js +7 -0
  7. package/dist/chunks/chunk-2H77IRPI.js +9 -0
  8. package/dist/chunks/chunk-2HEC5TDU.js +9 -0
  9. package/dist/chunks/chunk-2I64AYHG.js +7 -0
  10. package/dist/chunks/chunk-2S6PE6GB.js +7 -0
  11. package/dist/chunks/chunk-2SLHYWMC.js +7 -0
  12. package/dist/chunks/chunk-32QBGZ2Z.js +7 -0
  13. package/dist/chunks/chunk-3GUBYJN6.js +20 -0
  14. package/dist/chunks/chunk-3QHJYVCY.js +7 -0
  15. package/dist/chunks/chunk-4MZK6JT6.js +7 -0
  16. package/dist/chunks/chunk-4WSAOLBH.js +15 -0
  17. package/dist/chunks/chunk-4YVA7TSY.js +25 -0
  18. package/dist/chunks/chunk-5XJNPXQK.js +7 -0
  19. package/dist/chunks/chunk-5YA32S6K.js +7 -0
  20. package/dist/chunks/chunk-64NJHVA3.js +44 -0
  21. package/dist/chunks/chunk-65JYSI26.js +7 -0
  22. package/dist/chunks/chunk-66RYR2GI.js +7 -0
  23. package/dist/chunks/chunk-6BZCSVH6.js +7 -0
  24. package/dist/chunks/chunk-6C7LA5RA.js +9 -0
  25. package/dist/chunks/chunk-6L236MNA.js +7 -0
  26. package/dist/chunks/chunk-6LE3FU2P.js +7 -0
  27. package/dist/chunks/chunk-6LE44WCK.js +8 -0
  28. package/dist/chunks/chunk-6OI6SRHZ.js +7 -0
  29. package/dist/chunks/chunk-6PFC3KWQ.js +7 -0
  30. package/dist/chunks/chunk-6QKS6QK7.js +7 -0
  31. package/dist/chunks/chunk-6SA6SOHU.js +7 -0
  32. package/dist/chunks/chunk-6TAQ6OWD.js +13 -0
  33. package/dist/chunks/chunk-73G2MHUX.js +14 -0
  34. package/dist/chunks/chunk-7B5NNJ2P.js +28 -0
  35. package/dist/chunks/chunk-7HL2RPUO.js +7 -0
  36. package/dist/chunks/chunk-7PNYOSDU.js +9 -0
  37. package/dist/chunks/chunk-7RR7MIMT.js +7 -0
  38. package/dist/chunks/chunk-7T6TL3GQ.js +7 -0
  39. package/dist/chunks/chunk-A5VLP25I.js +25 -0
  40. package/dist/chunks/chunk-ABSRS5KC.js +9 -0
  41. package/dist/chunks/chunk-AM46JVVN.js +7 -0
  42. package/dist/chunks/chunk-AVSPFBLM.js +7 -0
  43. package/dist/chunks/chunk-AZ6NRDHG.js +7 -0
  44. package/dist/chunks/chunk-B4ATVYZW.js +7 -0
  45. package/dist/chunks/{chunk-A3NYPUKZ.js → chunk-BRK4OB4B.js} +1 -11
  46. package/dist/chunks/chunk-BVH2AEFE.js +7 -0
  47. package/dist/chunks/chunk-BX5KDMLT.js +10 -0
  48. package/dist/chunks/chunk-CJPM2DXZ.js +7 -0
  49. package/dist/chunks/chunk-COQGD2EI.js +8 -0
  50. package/dist/chunks/chunk-CVKB54WW.js +7 -0
  51. package/dist/chunks/{chunk-O26N2UPI.js → chunk-CZSOZKHX.js} +1 -9
  52. package/dist/chunks/chunk-D4MW3RDW.js +7 -0
  53. package/dist/chunks/chunk-DFVNL5ML.js +7 -0
  54. package/dist/chunks/chunk-DL665Q3Z.js +7 -0
  55. package/dist/chunks/chunk-DQ2KI6FO.js +9 -0
  56. package/dist/chunks/chunk-E4X2DH4K.js +18 -0
  57. package/dist/chunks/{chunk-KJBZ5ZST.js → chunk-EHTHHCNG.js} +11 -32
  58. package/dist/chunks/chunk-EIXOJUNN.js +7 -0
  59. package/dist/chunks/chunk-EQ52F4LH.js +7 -0
  60. package/dist/chunks/chunk-EQP3SW72.js +7 -0
  61. package/dist/chunks/chunk-ETV3C2CV.js +7 -0
  62. package/dist/chunks/chunk-EWWFNMPZ.js +24 -0
  63. package/dist/chunks/chunk-F2ZWW2IO.js +8 -0
  64. package/dist/chunks/chunk-FA6O7FPC.js +8 -0
  65. package/dist/chunks/chunk-FAW6NBLQ.js +7 -0
  66. package/dist/chunks/chunk-FB5TMOLQ.js +7 -0
  67. package/dist/chunks/chunk-FI772UVH.js +7 -0
  68. package/dist/chunks/chunk-FZH7RIRX.js +18 -0
  69. package/dist/chunks/chunk-GGNZLN4R.js +9 -0
  70. package/dist/chunks/chunk-GHAY4PSD.js +7 -0
  71. package/dist/chunks/chunk-GHM7V3GG.js +7 -0
  72. package/dist/chunks/chunk-GHULCYAR.js +7 -0
  73. package/dist/chunks/chunk-GL2AUBAI.js +10 -0
  74. package/dist/chunks/chunk-GR3DLKYP.js +13 -0
  75. package/dist/chunks/chunk-GRDPI246.js +29 -0
  76. package/dist/chunks/chunk-GTJ2OLYI.js +11 -0
  77. package/dist/chunks/chunk-GU6VIFR5.js +7 -0
  78. package/dist/chunks/{constants-WEQVJSYS.js → chunk-GZNDA6SV.js} +2 -9
  79. package/dist/chunks/chunk-HEGJZJO7.js +7 -0
  80. package/dist/chunks/chunk-HOYHUMBD.js +16 -0
  81. package/dist/chunks/chunk-HWWHR7H3.js +10 -0
  82. package/dist/chunks/chunk-IVSSTHB6.js +7 -0
  83. package/dist/chunks/chunk-IVWPQYIH.js +7 -0
  84. package/dist/chunks/{chunk-64IF634X.js → chunk-J3U3L45Y.js} +1 -12
  85. package/dist/chunks/chunk-J5X5YRBH.js +16 -0
  86. package/dist/chunks/chunk-JAJW3P42.js +7 -0
  87. package/dist/chunks/chunk-JGPECEYY.js +23 -0
  88. package/dist/chunks/chunk-JKTQV2QJ.js +7 -0
  89. package/dist/chunks/chunk-JZRMH5UA.js +7 -0
  90. package/dist/chunks/chunk-KBKN7EI7.js +7 -0
  91. package/dist/chunks/chunk-KK4AJES5.js +36 -0
  92. package/dist/chunks/chunk-KKS7XWEX.js +7 -0
  93. package/dist/chunks/chunk-KUVMCIR4.js +7 -0
  94. package/dist/chunks/chunk-KXYR43H5.js +86 -0
  95. package/dist/chunks/chunk-L3JDEHCQ.js +7 -0
  96. package/dist/chunks/chunk-LKI6FRNM.js +19 -0
  97. package/dist/chunks/chunk-LQBC5QPO.js +7 -0
  98. package/dist/chunks/chunk-M2W3HKV3.js +23 -0
  99. package/dist/chunks/chunk-M5AV545M.js +7 -0
  100. package/dist/chunks/chunk-M6A7UH4U.js +27 -0
  101. package/dist/chunks/chunk-MBL6TXEJ.js +7 -0
  102. package/dist/chunks/chunk-MEAY2K5Z.js +11 -0
  103. package/dist/chunks/chunk-MY4MONOH.js +7 -0
  104. package/dist/chunks/chunk-N3N5UHIL.js +7 -0
  105. package/dist/chunks/chunk-N3ZZ7FHQ.js +7 -0
  106. package/dist/chunks/chunk-N6CNMMSZ.js +7 -0
  107. package/dist/chunks/chunk-NBVY237X.js +7 -0
  108. package/dist/chunks/chunk-NYOQMU3P.js +20 -0
  109. package/dist/chunks/chunk-NZKBBY2A.js +24 -0
  110. package/dist/chunks/chunk-O7G3CZ42.js +7 -0
  111. package/dist/chunks/chunk-OAKO6LVS.js +7 -0
  112. package/dist/chunks/chunk-OHDEHZLX.js +7 -0
  113. package/dist/chunks/chunk-OI263FBO.js +21 -0
  114. package/dist/chunks/chunk-OSCCYU74.js +7 -0
  115. package/dist/chunks/chunk-OUHPDA7Q.js +7 -0
  116. package/dist/chunks/chunk-P2O5DOYE.js +7 -0
  117. package/dist/chunks/chunk-PHW54NU5.js +13 -0
  118. package/dist/chunks/chunk-PPCFQQSU.js +7 -0
  119. package/dist/chunks/chunk-PS645CWM.js +32 -0
  120. package/dist/chunks/chunk-QGIQK47P.js +7 -0
  121. package/dist/chunks/chunk-QHJLRTVY.js +7 -0
  122. package/dist/chunks/chunk-QI3JSWD6.js +12 -0
  123. package/dist/chunks/chunk-QR7QPUFN.js +7 -0
  124. package/dist/chunks/chunk-QTKJC2O5.js +7 -0
  125. package/dist/chunks/chunk-R3B67TKQ.js +7 -0
  126. package/dist/chunks/chunk-RCTYVKM5.js +16 -0
  127. package/dist/chunks/chunk-RRQTVE2P.js +31 -0
  128. package/dist/chunks/chunk-S5CEIACD.js +7 -0
  129. package/dist/chunks/chunk-SFTXBTMI.js +7 -0
  130. package/dist/chunks/chunk-SOJCELXH.js +7 -0
  131. package/dist/chunks/chunk-SOQ5DE44.js +39 -0
  132. package/dist/chunks/chunk-SXUEGVWB.js +7 -0
  133. package/dist/chunks/{pkg-56KRLZ5K.js → chunk-T3GQAMBJ.js} +1 -7
  134. package/dist/chunks/chunk-T4AZ3U7O.js +7 -0
  135. package/dist/chunks/chunk-T52FMXWC.js +7 -0
  136. package/dist/chunks/chunk-TBBU37TD.js +9 -0
  137. package/dist/chunks/{chunk-2473DUBR.js → chunk-TG2RCYTH.js} +1 -9
  138. package/dist/chunks/chunk-TJKM3345.js +7 -0
  139. package/dist/chunks/chunk-TOGR3HUB.js +8 -0
  140. package/dist/chunks/chunk-TRTEXGVN.js +7 -0
  141. package/dist/chunks/chunk-U56NHYAH.js +7 -0
  142. package/dist/chunks/chunk-U6N2RNDI.js +7 -0
  143. package/dist/chunks/chunk-U7KCDTCH.js +12 -0
  144. package/dist/chunks/chunk-UED2PPFP.js +11 -0
  145. package/dist/chunks/chunk-UGXNE4YE.js +7 -0
  146. package/dist/chunks/chunk-ULLWCOYC.js +7 -0
  147. package/dist/chunks/chunk-UUM2N6IG.js +21 -0
  148. package/dist/chunks/chunk-UWZ5VIIQ.js +7 -0
  149. package/dist/chunks/chunk-UXCTETFN.js +7 -0
  150. package/dist/chunks/chunk-V5DCSHYJ.js +7 -0
  151. package/dist/chunks/chunk-V6IKQCOT.js +8 -0
  152. package/dist/chunks/chunk-V6MR45PD.js +15 -0
  153. package/dist/chunks/chunk-VIR3KDCQ.js +7 -0
  154. package/dist/chunks/chunk-VOZEB6PD.js +7 -0
  155. package/dist/chunks/chunk-WDVSYGZS.js +7 -0
  156. package/dist/chunks/chunk-WHYH7DVI.js +20 -0
  157. package/dist/chunks/chunk-WKZ6JSGZ.js +7 -0
  158. package/dist/chunks/chunk-WPS6JZF6.js +7 -0
  159. package/dist/chunks/chunk-WRILLB46.js +7 -0
  160. package/dist/chunks/chunk-WUZD4KBL.js +7 -0
  161. package/dist/chunks/chunk-X4X5RB2V.js +7 -0
  162. package/dist/chunks/chunk-XCJDGQO7.js +7 -0
  163. package/dist/chunks/{update-route-version-E3V47KNI.js → chunk-XD2LZRBS.js} +1 -7
  164. package/dist/chunks/chunk-XPXOV5UO.js +7 -0
  165. package/dist/chunks/chunk-YGJO25LP.js +45 -0
  166. package/dist/chunks/chunk-YMM3VY3J.js +8 -0
  167. package/dist/chunks/chunk-YMVDWVMO.js +7 -0
  168. package/dist/chunks/chunk-YPTLSODC.js +7 -0
  169. package/dist/chunks/chunk-Z4VR6CQ2.js +7 -0
  170. package/dist/chunks/chunk-Z6LKARXP.js +8 -0
  171. package/dist/chunks/chunk-Z7PBDQNR.js +65 -0
  172. package/dist/chunks/chunk-ZDORSGCG.js +8 -0
  173. package/dist/chunks/chunk-ZDX75YNZ.js +7 -0
  174. package/dist/chunks/chunk-ZKWM4JBE.js +7 -0
  175. package/dist/chunks/chunk-ZKYS7EAB.js +7 -0
  176. package/dist/chunks/chunk-ZXE4XYIV.js +7 -0
  177. package/dist/chunks/cjs-GOQHXIHX.js +54 -0
  178. package/dist/chunks/clear-6IXTTZO6.js +8 -0
  179. package/dist/chunks/compile-vercel-config-ZFMPTU47.js +7 -0
  180. package/dist/chunks/config-HLVJQKP7.js +7 -0
  181. package/dist/chunks/config-XXHMPW46.js +8 -0
  182. package/dist/chunks/config-validator.mjs +1 -1
  183. package/dist/chunks/connect-git-provider-P3SGOW6X.js +7 -0
  184. package/dist/chunks/constants-G4UYVLOF.js +7 -0
  185. package/dist/chunks/create-project-SRQGD4JY.js +7 -0
  186. package/dist/chunks/delete-52QKO73X.js +10 -0
  187. package/dist/chunks/delete-6VOUZDIR.js +9 -0
  188. package/dist/chunks/detect-projects-WLAFT5HC.js +7 -0
  189. package/dist/chunks/detect-services-YYT3LUUX.js +7 -0
  190. package/dist/chunks/disable-7FGR2S56.js +7 -0
  191. package/dist/chunks/discard-XKPTY3DC.js +14 -0
  192. package/dist/chunks/edit-A3HJCNPW.js +8 -0
  193. package/dist/chunks/edit-A7WGTO6K.js +9 -0
  194. package/dist/chunks/enable-NGKLGHJ2.js +7 -0
  195. package/dist/chunks/esm-7HVUFWMN.js +7 -0
  196. package/dist/chunks/esm-BZBEM7YA.js +7 -0
  197. package/dist/chunks/esm-CXICLFA3.js +9 -0
  198. package/dist/chunks/esm-HDEHVK7I.js +9 -0
  199. package/dist/chunks/esm-NQRLKALI.js +20 -0
  200. package/dist/chunks/esm-SZZI53W7.js +7 -0
  201. package/dist/chunks/esm-WGJFGCLK.js +7 -0
  202. package/dist/chunks/exec-YH5WUJ4C.js +16372 -0
  203. package/dist/chunks/export-QCBAQNTT.js +19 -0
  204. package/dist/chunks/fetch-proxy-AEAWC6MD.js +7 -0
  205. package/dist/chunks/future-BB7OE645.js +7 -0
  206. package/dist/chunks/generate-cert-for-deploy-U7JF3HF3.js +7 -0
  207. package/dist/chunks/image-DU7GJZR2.js +7 -0
  208. package/dist/chunks/import-builders-IFZM44NL.js +7 -0
  209. package/dist/chunks/inspect-CPOFKE4X.js +19 -0
  210. package/dist/chunks/inspect-EMWJLBAW.js +15 -0
  211. package/dist/chunks/inspect-IVJOEZC4.js +20 -0
  212. package/dist/chunks/inspect-PHUMEO4A.js +9 -0
  213. package/dist/chunks/inspect-Q7OVSWFO.js +13 -0
  214. package/dist/chunks/list-G4JM2TYX.js +11 -0
  215. package/dist/chunks/list-KYZNCXBM.js +16 -0
  216. package/dist/chunks/list-ZE2VPPXI.js +10 -0
  217. package/dist/chunks/login-AVVJFLSC.js +9 -0
  218. package/dist/chunks/login-RMAISH4F.js +7 -0
  219. package/dist/chunks/logs-3LTU2N25.js +7 -0
  220. package/dist/chunks/ls-4M2OBNG6.js +8 -0
  221. package/dist/chunks/ls-7O63WIES.js +12 -0
  222. package/dist/chunks/ls-AKGRKWHM.js +12 -0
  223. package/dist/chunks/ls-DU5QTKKA.js +12 -0
  224. package/dist/chunks/ls-HWUYP3XY.js +8 -0
  225. package/dist/chunks/ls-P6LKMT33.js +12 -0
  226. package/dist/chunks/ls-Y4QR3I6O.js +11 -0
  227. package/dist/chunks/mutate-KOAALPIL.js +9 -0
  228. package/dist/chunks/notifications-3RDFNJSD.js +7 -0
  229. package/dist/chunks/open-VD4F6MAO.js +7 -0
  230. package/dist/chunks/openapi-DKMCRF2V.js +7 -0
  231. package/dist/chunks/permissions-AE5JO26V.js +7 -0
  232. package/dist/chunks/pkg-YFU67U7I.js +7 -0
  233. package/dist/chunks/prompt-missing-credentials-QY4MZDT6.js +7 -0
  234. package/dist/chunks/publish-YXVJXBQT.js +15 -0
  235. package/dist/chunks/pull-QLC2CV4J.js +7 -0
  236. package/dist/chunks/purchase-domain-if-available-74ZYVVBE.js +7 -0
  237. package/dist/chunks/push-TMPPU5NU.js +7 -0
  238. package/dist/chunks/query-PHAGR43V.js +12 -0
  239. package/dist/chunks/reauthenticate-O6C2AW3J.js +7 -0
  240. package/dist/chunks/reorder-OAJ3NXQQ.js +10 -0
  241. package/dist/chunks/reply-Q3JFRFA3.js +9 -0
  242. package/dist/chunks/repo-info-to-url-SK3VX6UL.js +7 -0
  243. package/dist/chunks/resolve-XXJVOXNE.js +12 -0
  244. package/dist/chunks/resolve-deployment-framework-preset-XF3NJIDS.js +7 -0
  245. package/dist/chunks/restore-MO4B2EQV.js +16 -0
  246. package/dist/chunks/rm-63LFH6NA.js +8 -0
  247. package/dist/chunks/rm-F2XD2XKB.js +8 -0
  248. package/dist/chunks/rm-GMG2DZOV.js +8 -0
  249. package/dist/chunks/rm-P6KA5RSP.js +8 -0
  250. package/dist/chunks/rm-SZ4HWA4R.js +8 -0
  251. package/dist/chunks/routes-IPGKJ2E4.js +7 -0
  252. package/dist/chunks/rule-inspect-JKAXOBII.js +8 -0
  253. package/dist/chunks/rules-6TZ6GSKT.js +7 -0
  254. package/dist/chunks/schema-5CZLK6NI.js +44 -0
  255. package/dist/chunks/schema-S2ZAREKF.js +14 -0
  256. package/dist/chunks/select-org-F2A5JJFH.js +7 -0
  257. package/dist/chunks/set-PIKLGKT6.js +7 -0
  258. package/dist/chunks/setup-and-link-O5QSQ5K2.js +7 -0
  259. package/dist/chunks/slugify-O5DBATYT.js +7 -0
  260. package/dist/chunks/stamp-OX4YO3KY.js +7 -0
  261. package/dist/chunks/tags-C3HWJLJ4.js +7 -0
  262. package/dist/chunks/types-H3B56MH6.js +14 -0
  263. package/dist/chunks/update-5HE4X45O.js +8 -0
  264. package/dist/chunks/update-route-version-XZAFPQJC.js +7 -0
  265. package/dist/chunks/utils-5BFO5HC4.js +86 -0
  266. package/dist/chunks/vlt-builder-graph-B4DFIUS6.js +7 -0
  267. package/dist/chunks/vlt-builder-importer-YVCYYRVV.js +11 -0
  268. package/dist/commands/build/index.js +24 -4918
  269. package/dist/commands/deploy/index.js +43 -2875
  270. package/dist/commands/dev/index.js +58 -23857
  271. package/dist/commands/env/index.js +26 -3411
  272. package/dist/commands/link/index.js +4 -284
  273. package/dist/commands/list/index.js +6 -566
  274. package/dist/commands-bulk.js +1358 -79710
  275. package/dist/help.js +1 -8
  276. package/dist/index.js +19 -2581
  277. package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +6 -0
  278. package/dist/version.mjs +1 -1
  279. package/package.json +66 -60
  280. package/dist/chunks/add-KSJQYR5C.js +0 -196
  281. package/dist/chunks/add-PERLOALD.js +0 -233
  282. package/dist/chunks/add-WU2QYHYL.js +0 -145
  283. package/dist/chunks/build-F3J6FLPD.js +0 -251
  284. package/dist/chunks/chunk-26CU4Q3C.js +0 -598
  285. package/dist/chunks/chunk-2HSQ7YUK.js +0 -93
  286. package/dist/chunks/chunk-2JIX6UMI.js +0 -4626
  287. package/dist/chunks/chunk-2TSBB22D.js +0 -14059
  288. package/dist/chunks/chunk-332LMJLZ.js +0 -16014
  289. package/dist/chunks/chunk-3HZLXCVL.js +0 -137
  290. package/dist/chunks/chunk-3VM7HWF6.js +0 -104
  291. package/dist/chunks/chunk-3ZE5CFVM.js +0 -346
  292. package/dist/chunks/chunk-4IALDGB7.js +0 -22
  293. package/dist/chunks/chunk-4IVSM24H.js +0 -522
  294. package/dist/chunks/chunk-4KD5BYHB.js +0 -127
  295. package/dist/chunks/chunk-57RHXXXG.js +0 -150
  296. package/dist/chunks/chunk-5AJPMLDV.js +0 -28
  297. package/dist/chunks/chunk-5GGUB4EO.js +0 -31
  298. package/dist/chunks/chunk-5NF5HOBJ.js +0 -1854
  299. package/dist/chunks/chunk-6E6KPBXY.js +0 -43
  300. package/dist/chunks/chunk-7KROIXQM.js +0 -59
  301. package/dist/chunks/chunk-7MRDIPJY.js +0 -107
  302. package/dist/chunks/chunk-7Q45OKWR.js +0 -149
  303. package/dist/chunks/chunk-A5JZS6ZN.js +0 -92
  304. package/dist/chunks/chunk-AHU7WNL2.js +0 -24
  305. package/dist/chunks/chunk-AINIBIP4.js +0 -39
  306. package/dist/chunks/chunk-AKLTIZCU.js +0 -46
  307. package/dist/chunks/chunk-ARU7VBKR.js +0 -144
  308. package/dist/chunks/chunk-B5XLQKHI.js +0 -849
  309. package/dist/chunks/chunk-BEQV3X2L.js +0 -86
  310. package/dist/chunks/chunk-C762AAVU.js +0 -137
  311. package/dist/chunks/chunk-CEDN47PH.js +0 -233
  312. package/dist/chunks/chunk-CJV7J7B5.js +0 -314
  313. package/dist/chunks/chunk-CNDPIHY5.js +0 -3490
  314. package/dist/chunks/chunk-CV5YC2EN.js +0 -867
  315. package/dist/chunks/chunk-DBYHS3CK.js +0 -257
  316. package/dist/chunks/chunk-DSTNNQVV.js +0 -253
  317. package/dist/chunks/chunk-DWIC7MRV.js +0 -152
  318. package/dist/chunks/chunk-E336ZXPP.js +0 -43
  319. package/dist/chunks/chunk-EFYMIIER.js +0 -40
  320. package/dist/chunks/chunk-EKPSCRJZ.js +0 -26
  321. package/dist/chunks/chunk-EOZFDJSY.js +0 -18
  322. package/dist/chunks/chunk-EPOLDWRA.js +0 -90
  323. package/dist/chunks/chunk-EZKW5YJ2.js +0 -177
  324. package/dist/chunks/chunk-EZQDYIVB.js +0 -506
  325. package/dist/chunks/chunk-FGDKMNEN.js +0 -21
  326. package/dist/chunks/chunk-FL4JLNT2.js +0 -559
  327. package/dist/chunks/chunk-FRVG4OW3.js +0 -7438
  328. package/dist/chunks/chunk-FVNJTRCE.js +0 -577
  329. package/dist/chunks/chunk-FVT74RZ5.js +0 -1536
  330. package/dist/chunks/chunk-G3PXSXIB.js +0 -18188
  331. package/dist/chunks/chunk-G5FBSUL4.js +0 -822
  332. package/dist/chunks/chunk-GCVXKRR5.js +0 -817
  333. package/dist/chunks/chunk-GGP5R3FU.js +0 -129
  334. package/dist/chunks/chunk-GHKJAK5V.js +0 -1288
  335. package/dist/chunks/chunk-GUU4Z2AQ.js +0 -2099
  336. package/dist/chunks/chunk-GVNCVKCI.js +0 -68
  337. package/dist/chunks/chunk-GY5I4AYD.js +0 -122
  338. package/dist/chunks/chunk-GZLPFESR.js +0 -48
  339. package/dist/chunks/chunk-HB4UKFDO.js +0 -1295
  340. package/dist/chunks/chunk-HRXRELD3.js +0 -338
  341. package/dist/chunks/chunk-IB5L4LKZ.js +0 -1082
  342. package/dist/chunks/chunk-IIMSID24.js +0 -104
  343. package/dist/chunks/chunk-JSD4EZL3.js +0 -34
  344. package/dist/chunks/chunk-K3RED3VO.js +0 -566
  345. package/dist/chunks/chunk-KEKR7OCB.js +0 -140
  346. package/dist/chunks/chunk-KFWQ3EFH.js +0 -151
  347. package/dist/chunks/chunk-KW7BS25T.js +0 -466
  348. package/dist/chunks/chunk-KXDWXXJH.js +0 -70
  349. package/dist/chunks/chunk-MXLA3VQS.js +0 -20
  350. package/dist/chunks/chunk-N4QHMXOO.js +0 -162
  351. package/dist/chunks/chunk-ND5CF2H3.js +0 -53
  352. package/dist/chunks/chunk-NFU4XJIR.js +0 -120
  353. package/dist/chunks/chunk-NSOYO6JQ.js +0 -2399
  354. package/dist/chunks/chunk-NW34PW6V.js +0 -1772
  355. package/dist/chunks/chunk-OAMU5QO6.js +0 -18
  356. package/dist/chunks/chunk-OIH6FP5Y.js +0 -231
  357. package/dist/chunks/chunk-P3SKP5WM.js +0 -27
  358. package/dist/chunks/chunk-P4QNYOFB.js +0 -96
  359. package/dist/chunks/chunk-P7VSBDR4.js +0 -827
  360. package/dist/chunks/chunk-PEC3CQSK.js +0 -90
  361. package/dist/chunks/chunk-PFM75KY3.js +0 -255
  362. package/dist/chunks/chunk-PJXMXMCO.js +0 -81
  363. package/dist/chunks/chunk-PMSMUMUO.js +0 -30
  364. package/dist/chunks/chunk-PNGVSHR3.js +0 -40
  365. package/dist/chunks/chunk-POOO7W47.js +0 -916
  366. package/dist/chunks/chunk-PRWJUY5U.js +0 -848
  367. package/dist/chunks/chunk-Q2DGFCO7.js +0 -579
  368. package/dist/chunks/chunk-QHS645AZ.js +0 -11441
  369. package/dist/chunks/chunk-QKX7WKIN.js +0 -98
  370. package/dist/chunks/chunk-QOPTXV4G.js +0 -417
  371. package/dist/chunks/chunk-RBIFXFZX.js +0 -52
  372. package/dist/chunks/chunk-RN6V5ODW.js +0 -114
  373. package/dist/chunks/chunk-RVBZ64EQ.js +0 -52
  374. package/dist/chunks/chunk-S7KYDPEM.js +0 -1564
  375. package/dist/chunks/chunk-SHFNEZVI.js +0 -49
  376. package/dist/chunks/chunk-SLPSPYVR.js +0 -334
  377. package/dist/chunks/chunk-TGNEG57M.js +0 -1612
  378. package/dist/chunks/chunk-TO7QZGYK.js +0 -105
  379. package/dist/chunks/chunk-TZ2YI2VH.js +0 -87
  380. package/dist/chunks/chunk-UARGTFCT.js +0 -875
  381. package/dist/chunks/chunk-UG2WOB5L.js +0 -150
  382. package/dist/chunks/chunk-V4RMJKQP.js +0 -36
  383. package/dist/chunks/chunk-VGIMO3ZK.js +0 -17
  384. package/dist/chunks/chunk-VP5Y3SZG.js +0 -106
  385. package/dist/chunks/chunk-VT3Z7HF6.js +0 -233
  386. package/dist/chunks/chunk-VUS2JQB2.js +0 -121
  387. package/dist/chunks/chunk-VXYGCOKL.js +0 -28
  388. package/dist/chunks/chunk-VYC45Q4Z.js +0 -1892
  389. package/dist/chunks/chunk-WGGABYO5.js +0 -31
  390. package/dist/chunks/chunk-WL6QYSGD.js +0 -12868
  391. package/dist/chunks/chunk-X7DBBZQD.js +0 -242
  392. package/dist/chunks/chunk-XD4DCYMX.js +0 -61
  393. package/dist/chunks/chunk-XDGOOW3K.js +0 -60
  394. package/dist/chunks/chunk-XFF5TGRA.js +0 -303
  395. package/dist/chunks/chunk-XIFATBH5.js +0 -2914
  396. package/dist/chunks/chunk-XM3LOQIX.js +0 -262
  397. package/dist/chunks/chunk-XNIZGCN5.js +0 -58
  398. package/dist/chunks/chunk-XPJLPUKO.js +0 -117
  399. package/dist/chunks/chunk-XUAWTW4W.js +0 -467
  400. package/dist/chunks/chunk-YPQSDAEW.js +0 -29
  401. package/dist/chunks/chunk-YS76T533.js +0 -270
  402. package/dist/chunks/chunk-Z7JWYFOY.js +0 -58
  403. package/dist/chunks/chunk-ZBEECGFD.js +0 -174
  404. package/dist/chunks/chunk-ZDU2NODC.js +0 -104
  405. package/dist/chunks/chunk-ZW6HETRE.js +0 -97
  406. package/dist/chunks/cjs-DV4RM7XU.js +0 -20743
  407. package/dist/chunks/clear-XUQO4ZTK.js +0 -141
  408. package/dist/chunks/compile-vercel-config-D3ARNHTN.js +0 -33
  409. package/dist/chunks/config-37OAE7QJ.js +0 -127
  410. package/dist/chunks/config-MEDLXUVM.js +0 -168
  411. package/dist/chunks/delete-3N3YZZOF.js +0 -159
  412. package/dist/chunks/delete-VSWDZ2SW.js +0 -226
  413. package/dist/chunks/detect-projects-ODNU4PK2.js +0 -18
  414. package/dist/chunks/detect-services-TESZCQWG.js +0 -40
  415. package/dist/chunks/disable-A4FLFMC7.js +0 -198
  416. package/dist/chunks/discard-CHGFULBZ.js +0 -145
  417. package/dist/chunks/edit-JZ63AJYQ.js +0 -162
  418. package/dist/chunks/edit-MHSYAPDR.js +0 -647
  419. package/dist/chunks/enable-KD46SEC5.js +0 -204
  420. package/dist/chunks/exec-4IPHZ55G.js +0 -1291
  421. package/dist/chunks/export-42QZLBSN.js +0 -177
  422. package/dist/chunks/fetch-proxy-R3JZNXBZ.js +0 -99
  423. package/dist/chunks/image-GP4H73A2.js +0 -75
  424. package/dist/chunks/import-builders-6TBLMPL2.js +0 -39
  425. package/dist/chunks/inspect-5FMWMY3C.js +0 -596
  426. package/dist/chunks/inspect-MUVK6MMT.js +0 -145
  427. package/dist/chunks/inspect-Q3DWW7MC.js +0 -216
  428. package/dist/chunks/inspect-QFXAOUL4.js +0 -175
  429. package/dist/chunks/inspect-RNTSYM6O.js +0 -171
  430. package/dist/chunks/list-IHHIPXEC.js +0 -387
  431. package/dist/chunks/list-JRNWLSO5.js +0 -426
  432. package/dist/chunks/list-XHD5DLEX.js +0 -404
  433. package/dist/chunks/login-PCT6KFWY.js +0 -233
  434. package/dist/chunks/ls-GPEHEFCF.js +0 -210
  435. package/dist/chunks/ls-PF7F4PP4.js +0 -197
  436. package/dist/chunks/ls-PQZ2RIDX.js +0 -188
  437. package/dist/chunks/ls-SVOHC3XW.js +0 -223
  438. package/dist/chunks/ls-TGHCCARZ.js +0 -175
  439. package/dist/chunks/ls-VRIH5WA3.js +0 -183
  440. package/dist/chunks/open-E7DEKYDU.js +0 -116
  441. package/dist/chunks/permissions-JKOONWVL.js +0 -99
  442. package/dist/chunks/publish-EDDELDE5.js +0 -155
  443. package/dist/chunks/pull-646WEVDE.js +0 -45
  444. package/dist/chunks/push-LTNW5OVD.js +0 -191
  445. package/dist/chunks/query-LU4N6KPO.js +0 -725
  446. package/dist/chunks/reorder-22PKJMZP.js +0 -412
  447. package/dist/chunks/reply-SF2EZMVZ.js +0 -176
  448. package/dist/chunks/resolve-ZCZGXTOT.js +0 -237
  449. package/dist/chunks/resolve-deployment-framework-preset-NPE6RLV3.js +0 -36
  450. package/dist/chunks/restore-VJAWZXB4.js +0 -252
  451. package/dist/chunks/rm-KN2QFCKO.js +0 -195
  452. package/dist/chunks/rm-KVEAJPRE.js +0 -147
  453. package/dist/chunks/rm-OSZ5FZUM.js +0 -322
  454. package/dist/chunks/rm-W722Q2AO.js +0 -173
  455. package/dist/chunks/rm-WNPGTUBH.js +0 -148
  456. package/dist/chunks/routes-QVMBXOSX.js +0 -24
  457. package/dist/chunks/rule-inspect-25Z6SNX3.js +0 -285
  458. package/dist/chunks/rules-65LKAQ35.js +0 -89
  459. package/dist/chunks/schema-7D6IGJEJ.js +0 -429
  460. package/dist/chunks/schema-NXCW4M75.js +0 -237
  461. package/dist/chunks/set-FYJVKMPV.js +0 -250
  462. package/dist/chunks/setup-and-link-KXPZE32P.js +0 -65
  463. package/dist/chunks/stamp-AA7R3MZS.js +0 -16
  464. package/dist/chunks/tags-ANIRP5E3.js +0 -69
  465. package/dist/chunks/types-4GAJ7XQQ.js +0 -116
  466. package/dist/chunks/update-UT6CTKVG.js +0 -246
@@ -0,0 +1,44 @@
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_graceful_fs}from"./chunk-F2ZWW2IO.js";import{require_lib}from"./chunk-B4ATVYZW.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{printAlignedLabel}from"./chunk-YMM3VY3J.js";import{getUser}from"./chunk-V5DCSHYJ.js";import{getTeamByIdOrSlug}from"./chunk-VOZEB6PD.js";import{InvalidToken,ProjectNotFound,code,isAPIError}from"./chunk-LKI6FRNM.js";import{emoji,link_default,output_manager_default,prependEmoji,require_build_utils}from"./chunk-EWWFNMPZ.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;
8
+
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
+
11
+ see https://github.com/jprichardson/node-fs-extra/issues/269`),stat2.checkPaths(src,dest,"copy",opts,(err,stats)=>{if(err)return cb(err);let{srcStat,destStat}=stats;stat2.checkParentPaths(src,srcStat,dest,"copy",err2=>err2?cb(err2):opts.filter?handleFilter(checkParentDir,destStat,src,dest,opts,cb):checkParentDir(destStat,src,dest,opts,cb))})}function checkParentDir(destStat,src,dest,opts,cb){let destParent=path.dirname(dest);pathExists2(destParent,(err,dirExists)=>{if(err)return cb(err);if(dirExists)return getStats(destStat,src,dest,opts,cb);mkdirs(destParent,err2=>err2?cb(err2):getStats(destStat,src,dest,opts,cb))})}function handleFilter(onInclude,destStat,src,dest,opts,cb){Promise.resolve(opts.filter(src,dest)).then(include=>include?onInclude(destStat,src,dest,opts,cb):cb(),error=>cb(error))}function startCopy(destStat,src,dest,opts,cb){return opts.filter?handleFilter(getStats,destStat,src,dest,opts,cb):getStats(destStat,src,dest,opts,cb)}function getStats(destStat,src,dest,opts,cb){(opts.dereference?fs4.stat:fs4.lstat)(src,(err,srcStat)=>err?cb(err):srcStat.isDirectory()?onDir(srcStat,destStat,src,dest,opts,cb):srcStat.isFile()||srcStat.isCharacterDevice()||srcStat.isBlockDevice()?onFile(srcStat,destStat,src,dest,opts,cb):srcStat.isSymbolicLink()?onLink(destStat,src,dest,opts,cb):srcStat.isSocket()?cb(new Error(`Cannot copy a socket file: ${src}`)):srcStat.isFIFO()?cb(new Error(`Cannot copy a FIFO pipe: ${src}`)):cb(new Error(`Unknown file: ${src}`)))}function onFile(srcStat,destStat,src,dest,opts,cb){return destStat?mayCopyFile(srcStat,src,dest,opts,cb):copyFile(srcStat,src,dest,opts,cb)}function mayCopyFile(srcStat,src,dest,opts,cb){if(opts.overwrite)fs4.unlink(dest,err=>err?cb(err):copyFile(srcStat,src,dest,opts,cb));else return opts.errorOnExist?cb(new Error(`'${dest}' already exists`)):cb()}function copyFile(srcStat,src,dest,opts,cb){fs4.copyFile(src,dest,err=>err?cb(err):opts.preserveTimestamps?handleTimestampsAndMode(srcStat.mode,src,dest,cb):setDestMode(dest,srcStat.mode,cb))}function handleTimestampsAndMode(srcMode,src,dest,cb){return fileIsNotWritable(srcMode)?makeFileWritable(dest,srcMode,err=>err?cb(err):setDestTimestampsAndMode(srcMode,src,dest,cb)):setDestTimestampsAndMode(srcMode,src,dest,cb)}function fileIsNotWritable(srcMode){return(srcMode&128)===0}function makeFileWritable(dest,srcMode,cb){return setDestMode(dest,srcMode|128,cb)}function setDestTimestampsAndMode(srcMode,src,dest,cb){setDestTimestamps(src,dest,err=>err?cb(err):setDestMode(dest,srcMode,cb))}function setDestMode(dest,srcMode,cb){return fs4.chmod(dest,srcMode,cb)}function setDestTimestamps(src,dest,cb){fs4.stat(src,(err,updatedSrcStat)=>err?cb(err):utimesMillis(dest,updatedSrcStat.atime,updatedSrcStat.mtime,cb))}function onDir(srcStat,destStat,src,dest,opts,cb){return destStat?copyDir(src,dest,opts,cb):mkDirAndCopy(srcStat.mode,src,dest,opts,cb)}function mkDirAndCopy(srcMode,src,dest,opts,cb){fs4.mkdir(dest,err=>{if(err)return cb(err);copyDir(src,dest,opts,err2=>err2?cb(err2):setDestMode(dest,srcMode,cb))})}function copyDir(src,dest,opts,cb){fs4.readdir(src,(err,items)=>err?cb(err):copyDirItems(items,src,dest,opts,cb))}function copyDirItems(items,src,dest,opts,cb){let item=items.pop();return item?copyDirItem(items,item,src,dest,opts,cb):cb()}function copyDirItem(items,item,src,dest,opts,cb){let srcItem=path.join(src,item),destItem=path.join(dest,item);stat2.checkPaths(srcItem,destItem,"copy",opts,(err,stats)=>{if(err)return cb(err);let{destStat}=stats;startCopy(destStat,srcItem,destItem,opts,err2=>err2?cb(err2):copyDirItems(items,src,dest,opts,cb))})}function onLink(destStat,src,dest,opts,cb){fs4.readlink(src,(err,resolvedSrc)=>{if(err)return cb(err);if(opts.dereference&&(resolvedSrc=path.resolve(process.cwd(),resolvedSrc)),destStat)fs4.readlink(dest,(err2,resolvedDest)=>err2?err2.code==="EINVAL"||err2.code==="UNKNOWN"?fs4.symlink(resolvedSrc,dest,cb):cb(err2):(opts.dereference&&(resolvedDest=path.resolve(process.cwd(),resolvedDest)),stat2.isSrcSubdir(resolvedSrc,resolvedDest)?cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)):destStat.isDirectory()&&stat2.isSrcSubdir(resolvedDest,resolvedSrc)?cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)):copyLink(resolvedSrc,dest,cb)));else return fs4.symlink(resolvedSrc,dest,cb)})}function copyLink(resolvedSrc,dest,cb){fs4.unlink(dest,err=>err?cb(err):fs4.symlink(resolvedSrc,dest,cb))}module.exports=copy}});var require_copy2=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback;module.exports={copy:u(require_copy())}}});var require_rimraf=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/remove/rimraf.js"(exports,module){"use strict";var fs4=require_graceful_fs(),path=__require("path"),assert=__require("assert"),isWindows=process.platform==="win32";function defaults(options){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(m=>{options[m]=options[m]||fs4[m],m=m+"Sync",options[m]=options[m]||fs4[m]}),options.maxBusyTries=options.maxBusyTries||3}function rimraf(p,options,cb){let busyTries=0;typeof options=="function"&&(cb=options,options={}),assert(p,"rimraf: missing path"),assert.strictEqual(typeof p,"string","rimraf: path should be a string"),assert.strictEqual(typeof cb,"function","rimraf: callback function required"),assert(options,"rimraf: invalid options argument provided"),assert.strictEqual(typeof options,"object","rimraf: options should be object"),defaults(options),rimraf_(p,options,function CB(er){if(er){if((er.code==="EBUSY"||er.code==="ENOTEMPTY"||er.code==="EPERM")&&busyTries<options.maxBusyTries){busyTries++;let time=busyTries*100;return setTimeout(()=>rimraf_(p,options,CB),time)}er.code==="ENOENT"&&(er=null)}cb(er)})}function rimraf_(p,options,cb){assert(p),assert(options),assert(typeof cb=="function"),options.lstat(p,(er,st)=>{if(er&&er.code==="ENOENT")return cb(null);if(er&&er.code==="EPERM"&&isWindows)return fixWinEPERM(p,options,er,cb);if(st&&st.isDirectory())return rmdir(p,options,er,cb);options.unlink(p,er2=>{if(er2){if(er2.code==="ENOENT")return cb(null);if(er2.code==="EPERM")return isWindows?fixWinEPERM(p,options,er2,cb):rmdir(p,options,er2,cb);if(er2.code==="EISDIR")return rmdir(p,options,er2,cb)}return cb(er2)})})}function fixWinEPERM(p,options,er,cb){assert(p),assert(options),assert(typeof cb=="function"),options.chmod(p,438,er2=>{er2?cb(er2.code==="ENOENT"?null:er):options.stat(p,(er3,stats)=>{er3?cb(er3.code==="ENOENT"?null:er):stats.isDirectory()?rmdir(p,options,er,cb):options.unlink(p,cb)})})}function fixWinEPERMSync(p,options,er){let stats;assert(p),assert(options);try{options.chmodSync(p,438)}catch(er2){if(er2.code==="ENOENT")return;throw er}try{stats=options.statSync(p)}catch(er3){if(er3.code==="ENOENT")return;throw er}stats.isDirectory()?rmdirSync(p,options,er):options.unlinkSync(p)}function rmdir(p,options,originalEr,cb){assert(p),assert(options),assert(typeof cb=="function"),options.rmdir(p,er=>{er&&(er.code==="ENOTEMPTY"||er.code==="EEXIST"||er.code==="EPERM")?rmkids(p,options,cb):er&&er.code==="ENOTDIR"?cb(originalEr):cb(er)})}function rmkids(p,options,cb){assert(p),assert(options),assert(typeof cb=="function"),options.readdir(p,(er,files)=>{if(er)return cb(er);let n=files.length,errState;if(n===0)return options.rmdir(p,cb);files.forEach(f=>{rimraf(path.join(p,f),options,er2=>{if(!errState){if(er2)return cb(errState=er2);--n===0&&options.rmdir(p,cb)}})})})}function rimrafSync(p,options){let st;options=options||{},defaults(options),assert(p,"rimraf: missing path"),assert.strictEqual(typeof p,"string","rimraf: path should be a string"),assert(options,"rimraf: missing options"),assert.strictEqual(typeof options,"object","rimraf: options should be object");try{st=options.lstatSync(p)}catch(er){if(er.code==="ENOENT")return;er.code==="EPERM"&&isWindows&&fixWinEPERMSync(p,options,er)}try{st&&st.isDirectory()?rmdirSync(p,options,null):options.unlinkSync(p)}catch(er){if(er.code==="ENOENT")return;if(er.code==="EPERM")return isWindows?fixWinEPERMSync(p,options,er):rmdirSync(p,options,er);if(er.code!=="EISDIR")throw er;rmdirSync(p,options,er)}}function rmdirSync(p,options,originalEr){assert(p),assert(options);try{options.rmdirSync(p)}catch(er){if(er.code==="ENOTDIR")throw originalEr;if(er.code==="ENOTEMPTY"||er.code==="EEXIST"||er.code==="EPERM")rmkidsSync(p,options);else if(er.code!=="ENOENT")throw er}}function rmkidsSync(p,options){if(assert(p),assert(options),options.readdirSync(p).forEach(f=>rimrafSync(path.join(p,f),options)),isWindows){let startTime=Date.now();do try{return options.rmdirSync(p,options)}catch{}while(Date.now()-startTime<500)}else return options.rmdirSync(p,options)}module.exports=rimraf;rimraf.sync=rimrafSync}});var require_remove=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/remove/index.js"(exports,module){"use strict";var fs4=require_graceful_fs(),u=require_universalify().fromCallback,rimraf=require_rimraf();function remove(path,callback){if(fs4.rm)return fs4.rm(path,{recursive:!0,force:!0},callback);rimraf(path,callback)}function removeSync(path){if(fs4.rmSync)return fs4.rmSync(path,{recursive:!0,force:!0});rimraf.sync(path)}module.exports={remove:u(remove),removeSync}}});var require_empty=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/empty/index.js"(exports,module){"use strict";var u=require_universalify().fromPromise,fs4=require_fs(),path=__require("path"),mkdir=require_mkdirs(),remove=require_remove(),emptyDir=u(async function(dir){let items;try{items=await fs4.readdir(dir)}catch{return mkdir.mkdirs(dir)}return Promise.all(items.map(item=>remove.remove(path.join(dir,item))))});function emptyDirSync(dir){let items;try{items=fs4.readdirSync(dir)}catch{return mkdir.mkdirsSync(dir)}items.forEach(item=>{item=path.join(dir,item),remove.removeSync(item)})}module.exports={emptyDirSync,emptydirSync:emptyDirSync,emptyDir,emptydir:emptyDir}}});var require_file=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/file.js"(exports,module){"use strict";var u=require_universalify().fromCallback,path=__require("path"),fs4=require_graceful_fs(),mkdir=require_mkdirs();function createFile(file,callback){function makeFile(){fs4.writeFile(file,"",err=>{if(err)return callback(err);callback()})}fs4.stat(file,(err,stats)=>{if(!err&&stats.isFile())return callback();let dir=path.dirname(file);fs4.stat(dir,(err2,stats2)=>{if(err2)return err2.code==="ENOENT"?mkdir.mkdirs(dir,err3=>{if(err3)return callback(err3);makeFile()}):callback(err2);stats2.isDirectory()?makeFile():fs4.readdir(dir,err3=>{if(err3)return callback(err3)})})})}function createFileSync(file){let stats;try{stats=fs4.statSync(file)}catch{}if(stats&&stats.isFile())return;let dir=path.dirname(file);try{fs4.statSync(dir).isDirectory()||fs4.readdirSync(dir)}catch(err){if(err&&err.code==="ENOENT")mkdir.mkdirsSync(dir);else throw err}fs4.writeFileSync(file,"")}module.exports={createFile:u(createFile),createFileSync}}});var require_link=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/link.js"(exports,module){"use strict";var u=require_universalify().fromCallback,path=__require("path"),fs4=require_graceful_fs(),mkdir=require_mkdirs(),pathExists2=require_path_exists().pathExists,{areIdentical}=require_stat();function createLink(srcpath,dstpath,callback){function makeLink(srcpath2,dstpath2){fs4.link(srcpath2,dstpath2,err=>{if(err)return callback(err);callback(null)})}fs4.lstat(dstpath,(_,dstStat)=>{fs4.lstat(srcpath,(err,srcStat)=>{if(err)return err.message=err.message.replace("lstat","ensureLink"),callback(err);if(dstStat&&areIdentical(srcStat,dstStat))return callback(null);let dir=path.dirname(dstpath);pathExists2(dir,(err2,dirExists)=>{if(err2)return callback(err2);if(dirExists)return makeLink(srcpath,dstpath);mkdir.mkdirs(dir,err3=>{if(err3)return callback(err3);makeLink(srcpath,dstpath)})})})})}function createLinkSync(srcpath,dstpath){let dstStat;try{dstStat=fs4.lstatSync(dstpath)}catch{}try{let srcStat=fs4.lstatSync(srcpath);if(dstStat&&areIdentical(srcStat,dstStat))return}catch(err){throw err.message=err.message.replace("lstat","ensureLink"),err}let dir=path.dirname(dstpath);return fs4.existsSync(dir)||mkdir.mkdirsSync(dir),fs4.linkSync(srcpath,dstpath)}module.exports={createLink:u(createLink),createLinkSync}}});var require_symlink_paths=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports,module){"use strict";var path=__require("path"),fs4=require_graceful_fs(),pathExists2=require_path_exists().pathExists;function symlinkPaths(srcpath,dstpath,callback){if(path.isAbsolute(srcpath))return fs4.lstat(srcpath,err=>err?(err.message=err.message.replace("lstat","ensureSymlink"),callback(err)):callback(null,{toCwd:srcpath,toDst:srcpath}));{let dstdir=path.dirname(dstpath),relativeToDst=path.join(dstdir,srcpath);return pathExists2(relativeToDst,(err,exists)=>err?callback(err):exists?callback(null,{toCwd:relativeToDst,toDst:srcpath}):fs4.lstat(srcpath,err2=>err2?(err2.message=err2.message.replace("lstat","ensureSymlink"),callback(err2)):callback(null,{toCwd:srcpath,toDst:path.relative(dstdir,srcpath)})))}}function symlinkPathsSync(srcpath,dstpath){let exists;if(path.isAbsolute(srcpath)){if(exists=fs4.existsSync(srcpath),!exists)throw new Error("absolute srcpath does not exist");return{toCwd:srcpath,toDst:srcpath}}else{let dstdir=path.dirname(dstpath),relativeToDst=path.join(dstdir,srcpath);if(exists=fs4.existsSync(relativeToDst),exists)return{toCwd:relativeToDst,toDst:srcpath};if(exists=fs4.existsSync(srcpath),!exists)throw new Error("relative srcpath does not exist");return{toCwd:srcpath,toDst:path.relative(dstdir,srcpath)}}}module.exports={symlinkPaths,symlinkPathsSync}}});var require_symlink_type=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports,module){"use strict";var fs4=require_graceful_fs();function symlinkType(srcpath,type,callback){if(callback=typeof type=="function"?type:callback,type=typeof type=="function"?!1:type,type)return callback(null,type);fs4.lstat(srcpath,(err,stats)=>{if(err)return callback(null,"file");type=stats&&stats.isDirectory()?"dir":"file",callback(null,type)})}function symlinkTypeSync(srcpath,type){let stats;if(type)return type;try{stats=fs4.lstatSync(srcpath)}catch{return"file"}return stats&&stats.isDirectory()?"dir":"file"}module.exports={symlinkType,symlinkTypeSync}}});var require_symlink=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports,module){"use strict";var u=require_universalify().fromCallback,path=__require("path"),fs4=require_fs(),_mkdirs=require_mkdirs(),mkdirs=_mkdirs.mkdirs,mkdirsSync=_mkdirs.mkdirsSync,_symlinkPaths=require_symlink_paths(),symlinkPaths=_symlinkPaths.symlinkPaths,symlinkPathsSync=_symlinkPaths.symlinkPathsSync,_symlinkType=require_symlink_type(),symlinkType=_symlinkType.symlinkType,symlinkTypeSync=_symlinkType.symlinkTypeSync,pathExists2=require_path_exists().pathExists,{areIdentical}=require_stat();function createSymlink(srcpath,dstpath,type,callback){callback=typeof type=="function"?type:callback,type=typeof type=="function"?!1:type,fs4.lstat(dstpath,(err,stats)=>{!err&&stats.isSymbolicLink()?Promise.all([fs4.stat(srcpath),fs4.stat(dstpath)]).then(([srcStat,dstStat])=>{if(areIdentical(srcStat,dstStat))return callback(null);_createSymlink(srcpath,dstpath,type,callback)}):_createSymlink(srcpath,dstpath,type,callback)})}function _createSymlink(srcpath,dstpath,type,callback){symlinkPaths(srcpath,dstpath,(err,relative3)=>{if(err)return callback(err);srcpath=relative3.toDst,symlinkType(relative3.toCwd,type,(err2,type2)=>{if(err2)return callback(err2);let dir=path.dirname(dstpath);pathExists2(dir,(err3,dirExists)=>{if(err3)return callback(err3);if(dirExists)return fs4.symlink(srcpath,dstpath,type2,callback);mkdirs(dir,err4=>{if(err4)return callback(err4);fs4.symlink(srcpath,dstpath,type2,callback)})})})})}function createSymlinkSync(srcpath,dstpath,type){let stats;try{stats=fs4.lstatSync(dstpath)}catch{}if(stats&&stats.isSymbolicLink()){let srcStat=fs4.statSync(srcpath),dstStat=fs4.statSync(dstpath);if(areIdentical(srcStat,dstStat))return}let relative3=symlinkPathsSync(srcpath,dstpath);srcpath=relative3.toDst,type=symlinkTypeSync(relative3.toCwd,type);let dir=path.dirname(dstpath);return fs4.existsSync(dir)||mkdirsSync(dir),fs4.symlinkSync(srcpath,dstpath,type)}module.exports={createSymlink:u(createSymlink),createSymlinkSync}}});var require_ensure=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/index.js"(exports,module){"use strict";var file=require_file(),link=require_link(),symlink=require_symlink();module.exports={createFile:file.createFile,createFileSync:file.createFileSync,ensureFile:file.createFile,ensureFileSync:file.createFileSync,createLink:link.createLink,createLinkSync:link.createLinkSync,ensureLink:link.createLink,ensureLinkSync:link.createLinkSync,createSymlink:symlink.createSymlink,createSymlinkSync:symlink.createSymlinkSync,ensureSymlink:symlink.createSymlink,ensureSymlinkSync:symlink.createSymlinkSync}}});var require_utils2=__commonJS({"../../node_modules/.pnpm/jsonfile@6.2.1/node_modules/jsonfile/utils.js"(exports,module){function stringify(obj,{EOL=`
12
+ `,finalEOL=!0,replacer=null,spaces}={}){let EOF=finalEOL?EOL:"",str=JSON.stringify(obj,replacer,spaces);if(str===void 0)throw new TypeError(`Converting ${typeof obj} value to JSON is not supported`);return str.replace(/\n/g,EOL)+EOF}function stripBom(content){return Buffer.isBuffer(content)&&(content=content.toString("utf8")),content.replace(/^\uFEFF/,"")}module.exports={stringify,stripBom}}});var require_jsonfile=__commonJS({"../../node_modules/.pnpm/jsonfile@6.2.1/node_modules/jsonfile/index.js"(exports,module){var _fs;try{_fs=require_graceful_fs()}catch{_fs=__require("fs")}var universalify=require_universalify(),{stringify,stripBom}=require_utils2();async function _readFile(file,options={}){typeof options=="string"&&(options={encoding:options});let fs4=options.fs||_fs,shouldThrow="throws"in options?options.throws:!0,data=await universalify.fromCallback(fs4.readFile)(file,options);data=stripBom(data);let obj;try{obj=JSON.parse(data,options?options.reviver:null)}catch(err){if(shouldThrow)throw err.message=`${file}: ${err.message}`,err;return null}return obj}var readFile3=universalify.fromPromise(_readFile);function readFileSync(file,options={}){typeof options=="string"&&(options={encoding:options});let fs4=options.fs||_fs,shouldThrow="throws"in options?options.throws:!0;try{let content=fs4.readFileSync(file,options);return content=stripBom(content),JSON.parse(content,options.reviver)}catch(err){if(shouldThrow)throw err.message=`${file}: ${err.message}`,err;return null}}async function _writeFile(file,obj,options={}){let fs4=options.fs||_fs,str=stringify(obj,options);await universalify.fromCallback(fs4.writeFile)(file,str,options)}var writeFile3=universalify.fromPromise(_writeFile);function writeFileSync(file,obj,options={}){let fs4=options.fs||_fs,str=stringify(obj,options);return fs4.writeFileSync(file,str,options)}module.exports={readFile:readFile3,readFileSync,writeFile:writeFile3,writeFileSync}}});var require_jsonfile2=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports,module){"use strict";var jsonFile=require_jsonfile();module.exports={readJson:jsonFile.readFile,readJsonSync:jsonFile.readFileSync,writeJson:jsonFile.writeFile,writeJsonSync:jsonFile.writeFileSync}}});var require_output=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/output/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback,fs4=require_graceful_fs(),path=__require("path"),mkdir=require_mkdirs(),pathExists2=require_path_exists().pathExists;function outputFile(file,data,encoding,callback){typeof encoding=="function"&&(callback=encoding,encoding="utf8");let dir=path.dirname(file);pathExists2(dir,(err,itDoes)=>{if(err)return callback(err);if(itDoes)return fs4.writeFile(file,data,encoding,callback);mkdir.mkdirs(dir,err2=>{if(err2)return callback(err2);fs4.writeFile(file,data,encoding,callback)})})}function outputFileSync(file,...args){let dir=path.dirname(file);if(fs4.existsSync(dir))return fs4.writeFileSync(file,...args);mkdir.mkdirsSync(dir),fs4.writeFileSync(file,...args)}module.exports={outputFile:u(outputFile),outputFileSync}}});var require_output_json=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/json/output-json.js"(exports,module){"use strict";var{stringify}=require_utils2(),{outputFile}=require_output();async function outputJson(file,data,options={}){let str=stringify(data,options);await outputFile(file,str,options)}module.exports=outputJson}});var require_output_json_sync=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports,module){"use strict";var{stringify}=require_utils2(),{outputFileSync}=require_output();function outputJsonSync(file,data,options){let str=stringify(data,options);outputFileSync(file,str,options)}module.exports=outputJsonSync}});var require_json=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/json/index.js"(exports,module){"use strict";var u=require_universalify().fromPromise,jsonFile=require_jsonfile2();jsonFile.outputJson=u(require_output_json());jsonFile.outputJsonSync=require_output_json_sync();jsonFile.outputJSON=jsonFile.outputJson;jsonFile.outputJSONSync=jsonFile.outputJsonSync;jsonFile.writeJSON=jsonFile.writeJson;jsonFile.writeJSONSync=jsonFile.writeJsonSync;jsonFile.readJSON=jsonFile.readJson;jsonFile.readJSONSync=jsonFile.readJsonSync;module.exports=jsonFile}});var require_move_sync=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move-sync/move-sync.js"(exports,module){"use strict";var fs4=require_graceful_fs(),path=__require("path"),copySync=require_copy_sync2().copySync,removeSync=require_remove().removeSync,mkdirpSync=require_mkdirs().mkdirpSync,stat2=require_stat();function moveSync(src,dest,opts){opts=opts||{};let overwrite=opts.overwrite||opts.clobber||!1,{srcStat,isChangingCase=!1}=stat2.checkPathsSync(src,dest,"move",opts);return stat2.checkParentPathsSync(src,srcStat,dest,"move"),isParentRoot(dest)||mkdirpSync(path.dirname(dest)),doRename(src,dest,overwrite,isChangingCase)}function isParentRoot(dest){let parent=path.dirname(dest);return path.parse(parent).root===parent}function doRename(src,dest,overwrite,isChangingCase){if(isChangingCase)return rename(src,dest,overwrite);if(overwrite)return removeSync(dest),rename(src,dest,overwrite);if(fs4.existsSync(dest))throw new Error("dest already exists.");return rename(src,dest,overwrite)}function rename(src,dest,overwrite){try{fs4.renameSync(src,dest)}catch(err){if(err.code!=="EXDEV")throw err;return moveAcrossDevice(src,dest,overwrite)}}function moveAcrossDevice(src,dest,overwrite){return copySync(src,dest,{overwrite,errorOnExist:!0}),removeSync(src)}module.exports=moveSync}});var require_move_sync2=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move-sync/index.js"(exports,module){"use strict";module.exports={moveSync:require_move_sync()}}});var require_move=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move/move.js"(exports,module){"use strict";var fs4=require_graceful_fs(),path=__require("path"),copy=require_copy2().copy,remove=require_remove().remove,mkdirp=require_mkdirs().mkdirp,pathExists2=require_path_exists().pathExists,stat2=require_stat();function move(src,dest,opts,cb){typeof opts=="function"&&(cb=opts,opts={});let overwrite=opts.overwrite||opts.clobber||!1;stat2.checkPaths(src,dest,"move",opts,(err,stats)=>{if(err)return cb(err);let{srcStat,isChangingCase=!1}=stats;stat2.checkParentPaths(src,srcStat,dest,"move",err2=>{if(err2)return cb(err2);if(isParentRoot(dest))return doRename(src,dest,overwrite,isChangingCase,cb);mkdirp(path.dirname(dest),err3=>err3?cb(err3):doRename(src,dest,overwrite,isChangingCase,cb))})})}function isParentRoot(dest){let parent=path.dirname(dest);return path.parse(parent).root===parent}function doRename(src,dest,overwrite,isChangingCase,cb){if(isChangingCase)return rename(src,dest,overwrite,cb);if(overwrite)return remove(dest,err=>err?cb(err):rename(src,dest,overwrite,cb));pathExists2(dest,(err,destExists)=>err?cb(err):destExists?cb(new Error("dest already exists.")):rename(src,dest,overwrite,cb))}function rename(src,dest,overwrite,cb){fs4.rename(src,dest,err=>err?err.code!=="EXDEV"?cb(err):moveAcrossDevice(src,dest,overwrite,cb):cb())}function moveAcrossDevice(src,dest,overwrite,cb){copy(src,dest,{overwrite,errorOnExist:!0},err=>err?cb(err):remove(src,cb))}module.exports=move}});var require_move2=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback;module.exports={move:u(require_move())}}});var require_lib2=__commonJS({"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/index.js"(exports,module){"use strict";module.exports={...require_fs(),...require_copy_sync2(),...require_copy2(),...require_empty(),...require_ensure(),...require_json(),...require_mkdirs(),...require_move_sync2(),...require_move2(),...require_output(),...require_path_exists(),...require_remove()}}});var require_pluralize=__commonJS({"../../node_modules/.pnpm/pluralize@7.0.0/node_modules/pluralize/pluralize.js"(exports,module){(function(root,pluralize2){typeof __require=="function"&&typeof exports=="object"&&typeof module=="object"?module.exports=pluralize2():typeof define=="function"&&define.amd?define(function(){return pluralize2()}):root.pluralize=pluralize2()})(exports,function(){var pluralRules=[],singularRules=[],uncountables={},irregularPlurals={},irregularSingles={};function sanitizeRule(rule){return typeof rule=="string"?new RegExp("^"+rule+"$","i"):rule}function restoreCase(word,token){return word===token?token:word===word.toUpperCase()?token.toUpperCase():word[0]===word[0].toUpperCase()?token.charAt(0).toUpperCase()+token.substr(1).toLowerCase():token.toLowerCase()}function interpolate(str,args){return str.replace(/\$(\d{1,2})/g,function(match,index){return args[index]||""})}function replace(word,rule){return word.replace(rule[0],function(match,index){var result=interpolate(rule[1],arguments);return restoreCase(match===""?word[index-1]:match,result)})}function sanitizeWord(token,word,rules){if(!token.length||uncountables.hasOwnProperty(token))return word;for(var len=rules.length;len--;){var rule=rules[len];if(rule[0].test(word))return replace(word,rule)}return word}function replaceWord(replaceMap,keepMap,rules){return function(word){var token=word.toLowerCase();return keepMap.hasOwnProperty(token)?restoreCase(word,token):replaceMap.hasOwnProperty(token)?restoreCase(word,replaceMap[token]):sanitizeWord(token,word,rules)}}function checkWord(replaceMap,keepMap,rules,bool){return function(word){var token=word.toLowerCase();return keepMap.hasOwnProperty(token)?!0:replaceMap.hasOwnProperty(token)?!1:sanitizeWord(token,token,rules)===token}}function pluralize2(word,count,inclusive){var pluralized=count===1?pluralize2.singular(word):pluralize2.plural(word);return(inclusive?count+" ":"")+pluralized}return pluralize2.plural=replaceWord(irregularSingles,irregularPlurals,pluralRules),pluralize2.isPlural=checkWord(irregularSingles,irregularPlurals,pluralRules),pluralize2.singular=replaceWord(irregularPlurals,irregularSingles,singularRules),pluralize2.isSingular=checkWord(irregularPlurals,irregularSingles,singularRules),pluralize2.addPluralRule=function(rule,replacement){pluralRules.push([sanitizeRule(rule),replacement])},pluralize2.addSingularRule=function(rule,replacement){singularRules.push([sanitizeRule(rule),replacement])},pluralize2.addUncountableRule=function(word){if(typeof word=="string"){uncountables[word.toLowerCase()]=!0;return}pluralize2.addPluralRule(word,"$0"),pluralize2.addSingularRule(word,"$0")},pluralize2.addIrregularRule=function(single,plural){plural=plural.toLowerCase(),single=single.toLowerCase(),irregularSingles[single]=plural,irregularPlurals[plural]=single},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["whiskey","whiskies"]].forEach(function(rule){return pluralize2.addIrregularRule(rule[0],rule[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|tlas|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/(m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(rule){return pluralize2.addPluralRule(rule[0],rule[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/(m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i,"$1"],[/(analy|ba|diagno|parenthe|progno|synop|the|empha|cri)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(rule){return pluralize2.addSingularRule(rule[0],rule[1])}),["adulthood","advice","agenda","aid","alcohol","ammo","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","flounder","fun","gallows","garbage","graffiti","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","manga","news","pike","plankton","pliers","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","species","staff","swine","tennis","traffic","transporation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(pluralize2.addUncountableRule),pluralize2})}});var require_ini=__commonJS({"../../node_modules/.pnpm/ini@3.0.0/node_modules/ini/lib/ini.js"(exports,module){var{hasOwnProperty}=Object.prototype,eol=typeof process<"u"&&process.platform==="win32"?`\r
13
+ `:`
14
+ `,encode=(obj,opt)=>{let children=[],out="";typeof opt=="string"?opt={section:opt,whitespace:!1}:(opt=opt||Object.create(null),opt.whitespace=opt.whitespace===!0);let separator=opt.whitespace?" = ":"=";for(let k of Object.keys(obj)){let val=obj[k];if(val&&Array.isArray(val))for(let item of val)out+=safe(k+"[]")+separator+safe(item)+eol;else val&&typeof val=="object"?children.push(k):out+=safe(k)+separator+safe(val)+eol}opt.section&&out.length&&(out="["+safe(opt.section)+"]"+eol+out);for(let k of children){let nk=dotSplit(k).join("\\."),section=(opt.section?opt.section+".":"")+nk,{whitespace}=opt,child=encode(obj[k],{section,whitespace});out.length&&child.length&&(out+=eol),out+=child}return out},dotSplit=str=>str.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(part=>part.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),decode=str=>{let out=Object.create(null),p=out,section=null,re=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,lines=str.split(/[\r\n]+/g);for(let line of lines){if(!line||line.match(/^\s*[;#]/))continue;let match=line.match(re);if(!match)continue;if(match[1]!==void 0){if(section=unsafe(match[1]),section==="__proto__"){p=Object.create(null);continue}p=out[section]=out[section]||Object.create(null);continue}let keyRaw=unsafe(match[2]),isArray=keyRaw.length>2&&keyRaw.slice(-2)==="[]",key=isArray?keyRaw.slice(0,-2):keyRaw;if(key==="__proto__")continue;let valueRaw=match[3]?unsafe(match[4]):!0,value=valueRaw==="true"||valueRaw==="false"||valueRaw==="null"?JSON.parse(valueRaw):valueRaw;isArray&&(hasOwnProperty.call(p,key)?Array.isArray(p[key])||(p[key]=[p[key]]):p[key]=[]),Array.isArray(p[key])?p[key].push(value):p[key]=value}let remove=[];for(let k of Object.keys(out)){if(!hasOwnProperty.call(out,k)||typeof out[k]!="object"||Array.isArray(out[k]))continue;let parts=dotSplit(k);p=out;let l=parts.pop(),nl=l.replace(/\\\./g,".");for(let part of parts)part!=="__proto__"&&((!hasOwnProperty.call(p,part)||typeof p[part]!="object")&&(p[part]=Object.create(null)),p=p[part]);p===out&&nl===l||(p[nl]=out[k],remove.push(k))}for(let del of remove)delete out[del];return out},isQuoted=val=>val.startsWith('"')&&val.endsWith('"')||val.startsWith("'")&&val.endsWith("'"),safe=val=>typeof val!="string"||val.match(/[=\r\n]/)||val.match(/^\[/)||val.length>1&&isQuoted(val)||val!==val.trim()?JSON.stringify(val):val.split(";").join("\\;").split("#").join("\\#"),unsafe=(val,doUnesc)=>{if(val=(val||"").trim(),isQuoted(val)){val.charAt(0)==="'"&&(val=val.slice(1,-1));try{val=JSON.parse(val)}catch{}}else{let esc=!1,unesc="";for(let i=0,l=val.length;i<l;i++){let c=val.charAt(i);if(esc)"\\;#".indexOf(c)!==-1?unesc+=c:unesc+="\\"+c,esc=!1;else{if(";#".indexOf(c)!==-1)break;c==="\\"?esc=!0:unesc+=c}}return esc&&(unesc+="\\"),unesc.trim()}return val};module.exports={parse:decode,decode,stringify:encode,encode,safe,unsafe}}});async function getProjectByNameOrId(client,projectNameOrId,accountId,includeRollbackInfo){try{let qs=includeRollbackInfo?"?rollbackInfo=true":"";return await client.fetch(`/v9/projects/${encodeURIComponent(projectNameOrId)}${qs}`,{accountId})}catch(err){if(isAPIError(err)&&err.status===404)return new ProjectNotFound(projectNameOrId);throw err}}import fs from"node:fs";function isDirectory(targetPath){try{return fs.lstatSync(targetPath).isDirectory()}catch{return!1}}var import_which=__toESM(require_lib(),1);import{accessSync,constants}from"node:fs";import{platform}from"node:os";import{delimiter,isAbsolute,resolve}from"node:path";import{execFile}from"node:child_process";function execFileAsync(file,args,options={}){return new Promise((resolve4,reject)=>{execFile(file,args,{...options,encoding:"utf8"},(error,stdout,stderr)=>{error?reject(Object.assign(error,{stdout,stderr})):resolve4({stdout,stderr})})})}var executables=new Map;function getGitExecutable(cwd){if(platform()!=="darwin")return Promise.resolve("git");let searchPath=(process.env.PATH??"/usr/bin:/bin").split(delimiter).map(directory=>resolve(cwd,directory)).join(delimiter),key=JSON.stringify([searchPath,cwd,process.env.DEVELOPER_DIR,process.env.SDKROOT,process.env.TOOLCHAINS]),executable=executables.get(key);return executable||(executable=resolveExecutable(searchPath,cwd),executables.set(key,executable)),executable}async function resolveExecutable(searchPath,cwd){try{if(import_which.default.sync("git",{path:searchPath,nothrow:!0})!=="/usr/bin/git")return"git";let{stdout}=await execFileAsync("/usr/bin/xcrun",["--find","git"],{cwd}),executable=stdout.trim();if(isAbsolute(executable)&&executable!=="/usr/bin/git")return accessSync(executable,constants.X_OK),executable}catch{}return"git"}import{execFileSync}from"node:child_process";import{join,resolve as resolve2}from"node:path";var DEFAULT_GIT_EXEC_OPTS={unsafe:!1};function getGitRootDirectory(opts){let{cwd,unsafe}={...DEFAULT_GIT_EXEC_OPTS,...opts};try{return execFileSync("git",["rev-parse","--show-toplevel"],{cwd,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch(error){if(unsafe)throw error;return null}}function getGitCommonDirectory(opts){let{cwd,unsafe}={...DEFAULT_GIT_EXEC_OPTS,...opts};try{return execFileSync("git",["rev-parse","--git-common-dir"],{cwd,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch(error){if(unsafe)throw error;return null}}function getGitConfigPath(opts){let{cwd}={...DEFAULT_GIT_EXEC_OPTS,...opts},gitCommonDir=getGitCommonDirectory(opts);if(gitCommonDir===null)return null;let absoluteGitCommonDir=resolve2(cwd,gitCommonDir);return join(absoluteGitCommonDir,"config")}var import_fs_extra=__toESM(require_lib2(),1),import_ini=__toESM(require_ini(),1),import_error_utils=__toESM(require_dist(),1);import{join as join2,relative,resolve as resolve3}from"path";import{execFile as execFile2}from"child_process";async function createGitMeta(directory,project){let git=await getGitExecutable(directory),metadata=Promise.allSettled([getLastCommit(directory,git),isDirty(directory)]),gitRoot,branch;try{let{stdout,stderr}=await execFileAsync(git,["rev-parse","--show-toplevel","--abbrev-ref","HEAD"],{cwd:directory});if(stderr.trim())throw new Error(stderr);let lines=stdout.trim().split(/\r?\n/);branch=lines.pop(),gitRoot=lines.join(`
15
+ `)}catch(error){await metadata,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.
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
+ ${commitResult.reason}`);return}if(dirtyResult.status==="rejected"){output_manager_default.debug(`Failed to determine if Git repo has been modified:
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-F2A5JJFH.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-P3SGOW6X.js"),detectedProjectsPromise=import("./detect-projects-WLAFT5HC.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
+ `);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
+ `):output_manager_default.print(` Found ${(0,import_pluralize.default)("Project",projects.length,!0)} linked to ${repoUrlLink} under ${import_chalk.default.bold(org.slug)}
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
+ `);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
+ `);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
+ `)}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-YYT3LUUX.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}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;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
+ `),{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([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
+ `),{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
+ `,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?
30
+ The ".vercel" folder is created when you link a directory to a Vercel project.
31
+
32
+ > What does the "project.json" file contain?
33
+ The "project.json" file contains:
34
+ - The ID of the Vercel project that you linked ("projectId")
35
+ - The ID of the user or team your Vercel project is owned by ("orgId")
36
+
37
+ > Should I commit the ".vercel" folder?
38
+ No, you should not share the ".vercel" folder with anyone.
39
+ Upon creation, it will be automatically added to your ".gitignore" file.
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
+ `),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-QLC2CV4J.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
+ `)?`\r
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}export{require_lib2 as require_lib,getProjectByNameOrId,getOrgById,isDirectory,require_pluralize,getGitExecutable,getGitConfigPath,createGitMeta,parseGitConfig,pluckRemoteUrls,getRemoteUrls,addToGitIgnore,getRepoLink,resolveGitRemote,fetchProjectsForRepoUrl,linkRepoProject,ensureRepoLink,addRepoLink,findRepoRoot,findProjectsFromPath,resolveProjectCwd,VERCEL_DIR,VERCEL_DIR_README,VERCEL_DIR_PROJECT,isOwnerLookupUnavailableLink,isRemoteLookupSkippedLink,getVercelDirectory,getProjectLink,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{permissionsAggregateCommand}from"./chunk-YMVDWVMO.js";import{tagsAggregateCommand}from"./chunk-O7G3CZ42.js";import{imageAggregateCommand}from"./chunk-N3N5UHIL.js";import{formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-JAJW3P42.js";import{packageName}from"./chunk-FI772UVH.js";var projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (defaults to the linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Continue from a previous response",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},platformOption={name:"platform",shorthand:null,type:String,deprecated:!1,description:"Target platform for the build (defaults to linux/amd64).",argument:"PLATFORM"},pushOption={name:"push",shorthand:null,type:Boolean,deprecated:!1,description:"Push the image after building. With Docker this builds and pushes in one step (Buildx enables zstd compression); Podman and Buildah build, then push with zstd compression."},publicOption={name:"public",shorthand:null,type:String,deprecated:!1,description:"Set the repository visibility: `true` for public, `false` for private.",argument:"BOOLEAN",choices:["true","false"]},listSubcommand={name:"ls",aliases:["list"],description:"List container registry repositories for a project",arguments:[],options:[projectScopeOption,limitOption,nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"List repositories for a specific project as JSON",value:`${packageName} vcr ls --project my-app --json`}]},inspectSubcommand={name:"inspect",aliases:["get"],description:"Show details for a single repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Inspect a repository by name",value:`${packageName} vcr inspect my-repository`}]},addSubcommand={name:"add",aliases:["create"],description:"Create a container registry repository",arguments:[{name:"name",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Create a repository",value:`${packageName} vcr add my-repository`}]},configSubcommand={name:"config",aliases:[],description:"Configure a container registry repository, such as the repository's visibility",arguments:[{name:"repository",required:!0}],options:[publicOption,projectScopeOption,formatOption,jsonOption],examples:[{name:"Make a repository public",value:`${packageName} vcr config my-repository --public true`},{name:"Make a repository private",value:`${packageName} vcr config my-repository --public false`}]},removeSubcommand={name:"rm",aliases:["remove","delete"],description:"Delete a container registry repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,yesOption,formatOption,jsonOption],examples:[{name:"Delete a repository",value:`${packageName} vcr rm my-repository`},{name:"Delete a repository without the confirmation prompt",value:`${packageName} vcr rm my-repository --yes`}]},loginSubcommand={name:"login",aliases:[],description:"Authenticate a container tool (docker, podman, or buildah) with the Vercel Container Registry",arguments:[{name:"engine",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Log in with Docker",value:`${packageName} vcr login docker`},{name:"Log in with Podman",value:`${packageName} vcr login podman`},{name:"Log in with Buildah",value:`${packageName} vcr login buildah`},{name:"Log in for a specific project",value:`${packageName} vcr login docker --project my-app`}]},buildSubcommand={name:"build",aliases:[],description:"Build a container image tagged for the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"path",required:!1},{name:"name",required:!1}],options:[projectScopeOption,platformOption,pushOption],examples:[{name:"Build the current directory into the linked project (repository defaults to the project name, tag to latest)",value:`${packageName} vcr build docker`},{name:"Build and push in one step (Docker Buildx enables zstd compression)",value:`${packageName} vcr build docker --push`},{name:"Build a specific context path with a repository and tag",value:`${packageName} vcr build docker ./app my-api:1.2.3`},{name:"Pass extra flags through to the container tool",value:`${packageName} vcr build docker . -- --no-cache --build-arg KEY=value`}]},pushSubcommand={name:"push",aliases:[],description:"Push a container image to the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"name",required:!1}],options:[projectScopeOption],examples:[{name:"Push the linked project image (repository defaults to the project name, tag to latest)",value:`${packageName} vcr push docker`},{name:"Push a specific repository and tag",value:`${packageName} vcr push docker my-api:1.2.3`}]},vcrCommand={name:"vcr",aliases:[],description:"Manage Vercel Container Registry repositories and images (see `vcr image`).",arguments:[],subcommands:[listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,tagsAggregateCommand,imageAggregateCommand,permissionsAggregateCommand],options:[],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"Create a repository",value:`${packageName} vcr add my-app`},{name:"List images in a repository",value:`${packageName} vcr image ls my-app`}]};export{listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,vcrCommand};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{printProjectNotFoundError}from"./chunk-GR3DLKYP.js";import{detectExplicitScope}from"./chunk-32QBGZ2Z.js";import{getLinkedProject}from"./chunk-64NJHVA3.js";import{omitGlobalFlagsFromArgs}from"./chunk-BX5KDMLT.js";function getInvokingCommandFromArgv(argv){let args=omitGlobalFlagsFromArgs(argv.slice(2)),positionals=[];for(let arg of args){if(arg.startsWith("-"))break;positionals.push(arg)}return positionals.join(" ")}async function resolveProjectContext({client,cwd=client.cwd,projectNameOrId,commandName="",projectNotFoundHandling="report"}){let context=await getLinkedProject(client,{cwd,projectName:projectNameOrId,projectNameIsExplicit:!!projectNameOrId,scopeIsExplicit:detectExplicitScope(client)});return context.status==="not_linked"&&projectNameOrId&&projectNotFoundHandling==="report"?(await printProjectNotFoundError(client,projectNameOrId,commandName||getInvokingCommandFromArgv(client.argv),context.orgId),{status:"error",exitCode:1,orgId:context.orgId}):context}export{resolveProjectContext};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function formatProject(orgSlug,projectSlug,options){let orgProjectSlug=`${orgSlug}/${projectSlug}`,projectUrl=`https://vercel.com/${orgProjectSlug}`;return output_manager_default.link(import_chalk.default.bold(orgProjectSlug),projectUrl,{fallback:()=>import_chalk.default.bold(orgProjectSlug),color:!1,...options})}var STANDARD_ENVIRONMENTS=["production","preview","development"];export{formatProject,STANDARD_ENVIRONMENTS};
@@ -0,0 +1,9 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{MISSING_BOTH_MESSAGE}from"./chunk-X4X5RB2V.js";import{RULE_ENVIRONMENTS}from"./chunk-IVWPQYIH.js";import{resolveProjectContext}from"./chunk-66RYR2GI.js";import{AGENT_REASON,AGENT_STATUS}from"./chunk-EQP3SW72.js";import{detectExplicitScope}from"./chunk-32QBGZ2Z.js";import{printError}from"./chunk-TBBU37TD.js";import{outputAgentError}from"./chunk-BX5KDMLT.js";import{isAPIError}from"./chunk-LKI6FRNM.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";function messageFor(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function handleTracingApiError(client,err){if(client.nonInteractive){let status=isAPIError(err)?err.status:void 0;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:AGENT_REASON.API_ERROR,message:messageFor(err)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(messageFor(err)),1):(printError(err),1)}function configError(client,reason,message){return client.nonInteractive&&outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),1}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function ruleNotFound(client,message){return configError(client,AGENT_REASON.NOT_FOUND,message)}function confirmationRequired(client,message,next){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message,userActionRequired:!0,next}),output_manager_default.error(message),1}function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
8
+ `);return}client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,projectId:project.id,projectName:project.name,...envelope,message,next},null,2)}
9
+ `)}var RULE_LIMIT=10,MIN_SAMPLE_RATE=1,MAX_SAMPLE_RATE=100;function isRuleEnvironment(value){return RULE_ENVIRONMENTS.includes(value)}var ENVIRONMENT_ERROR=`\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`,RATE_ERROR=`\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`,EMPTY_PATH_ERROR="`requestPath` cannot be empty.";function parseSampleRate(value){if(!/^\d+$/.test(value.trim()))return;let rate=Number(value);return rate>=MIN_SAMPLE_RATE&&rate<=MAX_SAMPLE_RATE?rate:void 0}function toRow(rule){return{environment:rule.env??"any",requestPath:rule.requestPath??null,sampleRate:Math.round(rule.rate*100)}}function toApiRate(sampleRate){return sampleRate/100}function toRule(row){return{rate:toApiRate(row.sampleRate),...row.environment==="any"?{}:{env:row.environment},...row.requestPath===null?{}:{requestPath:row.requestPath}}}var ALL_PATHS_LABEL="(all paths)";function formatPath(requestPath){return requestPath??ALL_PATHS_LABEL}function formatRate(sampleRate){return`${sampleRate}%`}function formatRuleTarget(environment,requestPath){return`${environment} ${formatPath(requestPath)}`}function formatRuleLine(row){return`${formatRuleTarget(row.environment,row.requestPath)} ${formatRate(row.sampleRate)}`}var COMMAND_WORD_COUNT=3;function subcommandArguments(positional){return positional.slice(COMMAND_WORD_COUNT)}function hasSameKey(a,b){return a.environment===b.environment&&a.requestPath===b.requestPath}async function readProjectTracing({client,teamId,projectId}){let project=await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:teamId}),tracing=project.tracing??null;return{project,tracing,entries:(tracing?.samplingRules??[]).map(rule=>({rule,row:toRow(rule)}))}}async function writeSamplingRules({client,teamId,projectId,tracing,rules}){let body={tracing:{...tracing??{},samplingRules:rules}};await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:teamId,method:"PATCH",body})}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?(output_manager_default.error(`The linked project ${link.project.name} belongs to ${link.org.slug||link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`),{exitCode:1}):{teamId:link.org.id,projectId:link.project.id}}export{handleTracingApiError,invalidArguments,ruleNotFound,confirmationRequired,writeConfigJson,RULE_LIMIT,isRuleEnvironment,ENVIRONMENT_ERROR,RATE_ERROR,EMPTY_PATH_ERROR,parseSampleRate,toApiRate,toRule,formatPath,formatRate,formatRuleTarget,formatRuleLine,subcommandArguments,hasSameKey,readProjectTracing,writeSamplingRules,resolveConfigScope};
@@ -0,0 +1,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
+ var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __require=(x=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(a,b)=>(typeof require<"u"?require:a)[b]}):x)(function(x){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});var __esm=(fn,res)=>function(){return fn&&(res=(0,fn[__getOwnPropNames(fn)[0]])(fn=0)),res};var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __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};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));export{__require,__esm,__commonJS,__export,__toESM};
@@ -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{getEnvTargetPlaceholder}from"./chunk-KUVMCIR4.js";import{projectOption,yesOption}from"./chunk-JAJW3P42.js";import{packageName}from"./chunk-FI772UVH.js";var buildCommand={name:"build",aliases:[],description:"Build the project.",arguments:[],options:[{name:"prod",description:"Build a production deployment",shorthand:null,type:Boolean,deprecated:!1},{name:"target",shorthand:null,type:String,argument:"TARGET",deprecated:!1,description:"Specify the target environment"},{name:"output",description:"Directory where built assets will be written to",shorthand:null,argument:"DIR",type:String,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt about pulling environment variables and project settings when not found locally"},{name:"standalone",description:"Create a standalone build with all dependencies inlined into function output folders",shorthand:null,type:Boolean,deprecated:!1},{name:"id",description:"Deployment ID to pull environment variables from (e.g. dpl_xxx)",shorthand:null,type:String,argument:"ID",deprecated:!1},projectOption],examples:[{name:"Build the project",value:`${packageName} build`},{name:"Build the project in a specific directory",value:`${packageName} build --cwd ./path-to-project`},{name:"Build with deployment-scoped environment variables",value:`${packageName} build --id dpl_xxx`}]};var pullCommand={name:"pull",aliases:[],description:"Pull latest environment variables and project settings from Vercel. ",arguments:[{name:"project-path",required:!1}],options:[{name:"environment",description:"Deployment environment [development]",argument:"TARGET",shorthand:null,type:String,deprecated:!1},{name:"git-branch",description:"Specify the Git branch to pull specific Environment Variables for",argument:"NAME",shorthand:null,type:String,deprecated:!1},{name:"prod",shorthand:null,type:Boolean,deprecated:!1},{...yesOption,description:"Skip questions when setting up new project using default scope and settings"},projectOption],examples:[{name:"Pull the latest Environment Variables and Project Settings from the cloud",value:`${packageName} pull`},{name:"Pull the latest Environment Variables and Project Settings from the cloud targeting a directory",value:`${packageName} pull ./path-to-project`},{name:"Pull for a specific environment",value:`${packageName} pull --environment=${getEnvTargetPlaceholder()}`},{name:"Pull for a preview feature branch",value:`${packageName} pull --environment=preview --git-branch=feature-branch`},{name:"If you want to download environment variables to a specific file, use `vercel env pull` instead",value:`${packageName} env pull`}]};export{buildCommand,pullCommand};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{getTeams}from"./chunk-VIR3KDCQ.js";import{param}from"./chunk-SXUEGVWB.js";import{outputActionRequired}from"./chunk-BX5KDMLT.js";import{printAlignedLabel}from"./chunk-YMM3VY3J.js";import{getUser}from"./chunk-V5DCSHYJ.js";import{getCommandName,packageName}from"./chunk-FI772UVH.js";import{emoji,output_manager_default,require_build_utils}from"./chunk-EWWFNMPZ.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?`
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};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{TelemetryClient}from"./chunk-A5VLP25I.js";var RoutesTelemetryClient=class extends TelemetryClient{trackCliSubcommandList(actual){this.trackCliSubcommand({subcommand:"list",value:actual})}trackCliSubcommandListVersions(actual){this.trackCliSubcommand({subcommand:"list-versions",value:actual})}trackCliSubcommandInspect(actual){this.trackCliSubcommand({subcommand:"inspect",value:actual})}trackCliSubcommandAdd(actual){this.trackCliSubcommand({subcommand:"add",value:actual})}trackCliSubcommandPublish(actual){this.trackCliSubcommand({subcommand:"publish",value:actual})}trackCliSubcommandRestore(actual){this.trackCliSubcommand({subcommand:"restore",value:actual})}trackCliSubcommandDiscardStaging(actual){this.trackCliSubcommand({subcommand:"discard-staging",value:actual})}trackCliSubcommandDelete(actual){this.trackCliSubcommand({subcommand:"delete",value:actual})}trackCliSubcommandExport(actual){this.trackCliSubcommand({subcommand:"export",value:actual})}trackCliSubcommandEnable(actual){this.trackCliSubcommand({subcommand:"enable",value:actual})}trackCliSubcommandDisable(actual){this.trackCliSubcommand({subcommand:"disable",value:actual})}trackCliSubcommandReorder(actual){this.trackCliSubcommand({subcommand:"reorder",value:actual})}trackCliSubcommandEdit(actual){this.trackCliSubcommand({subcommand:"edit",value:actual})}},RoutesAddTelemetryClient=class extends TelemetryClient{trackCliArgumentName(name){name&&this.trackCliArgument({arg:"name",value:this.redactedValue})}trackCliFlagYes(flag){flag&&this.trackCliFlag("yes")}trackCliFlagDisabled(flag){flag&&this.trackCliFlag("disabled")}trackCliOptionSrc(src){src&&this.trackCliOption({option:"src",value:this.redactedValue})}trackCliOptionSrcSyntax(syntax){syntax&&this.trackCliOption({option:"src-syntax",value:syntax})}trackCliOptionAction(action){action&&this.trackCliOption({option:"action",value:action})}trackCliOptionDest(dest){dest&&this.trackCliOption({option:"dest",value:this.redactedValue})}trackCliOptionStatus(status){status!==void 0&&this.trackCliOption({option:"status",value:String(status)})}trackCliOptionPosition(position){if(position){let placement=position.split(":")[0];this.trackCliOption({option:"position",value:placement})}}trackCliOptionDescription(description){description&&this.trackCliOption({option:"description",value:this.redactedValue})}trackCliOptionSetResponseHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"set-response-header",value:this.redactedValue})}trackCliOptionAppendResponseHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"append-response-header",value:this.redactedValue})}trackCliOptionDeleteResponseHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"delete-response-header",value:this.redactedValue})}trackCliOptionSetRequestHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"set-request-header",value:this.redactedValue})}trackCliOptionAppendRequestHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"append-request-header",value:this.redactedValue})}trackCliOptionDeleteRequestHeader(headers){headers&&headers.length>0&&this.trackCliOption({option:"delete-request-header",value:this.redactedValue})}trackCliOptionSetRequestQuery(params){params&&params.length>0&&this.trackCliOption({option:"set-request-query",value:this.redactedValue})}trackCliOptionAppendRequestQuery(params){params&&params.length>0&&this.trackCliOption({option:"append-request-query",value:this.redactedValue})}trackCliOptionDeleteRequestQuery(params){params&&params.length>0&&this.trackCliOption({option:"delete-request-query",value:this.redactedValue})}trackCliOptionHas(conditions){conditions&&conditions.length>0&&this.trackCliOption({option:"has",value:this.redactedValue})}trackCliOptionMissing(conditions){conditions&&conditions.length>0&&this.trackCliOption({option:"missing",value:this.redactedValue})}trackCliOptionAi(prompt){prompt&&this.trackCliOption({option:"ai",value:this.redactedValue})}trackCliActionType(actionType){this.trackCliOption({option:"action-type",value:actionType})}trackCliFlagHasConditions(hasConditions){hasConditions&&this.trackCliFlag("has-conditions")}trackCliFlagMissingConditions(hasMissingConditions){hasMissingConditions&&this.trackCliFlag("missing-conditions")}trackCliFlagResponseHeaders(hasResponseHeaders){hasResponseHeaders&&this.trackCliFlag("response-headers")}trackCliFlagRequestTransforms(hasRequestTransforms){hasRequestTransforms&&this.trackCliFlag("request-transforms")}},RoutesEditTelemetryClient=class extends TelemetryClient{trackCliArgumentNameOrId(id){id&&this.trackCliArgument({arg:"name-or-id",value:this.redactedValue})}trackCliFlagYes(flag){flag&&this.trackCliFlag("yes")}trackCliFlagNoDest(flag){flag&&this.trackCliFlag("no-dest")}trackCliFlagNoStatus(flag){flag&&this.trackCliFlag("no-status")}trackCliFlagClearConditions(flag){flag&&this.trackCliFlag("clear-conditions")}trackCliFlagClearHeaders(flag){flag&&this.trackCliFlag("clear-headers")}trackCliFlagClearTransforms(flag){flag&&this.trackCliFlag("clear-transforms")}trackCliOptionName(name){name&&this.trackCliOption({option:"name",value:this.redactedValue})}trackCliOptionDescription(desc){desc&&this.trackCliOption({option:"description",value:this.redactedValue})}trackCliOptionSrc(src){src&&this.trackCliOption({option:"src",value:this.redactedValue})}trackCliOptionSrcSyntax(syntax){syntax&&this.trackCliOption({option:"src-syntax",value:syntax})}trackCliOptionAction(action){action&&this.trackCliOption({option:"action",value:action})}trackCliOptionDest(dest){dest&&this.trackCliOption({option:"dest",value:this.redactedValue})}trackCliOptionStatus(status){status!==void 0&&this.trackCliOption({option:"status",value:String(status)})}trackCliOptionSetResponseHeader(h){h&&h.length>0&&this.trackCliOption({option:"set-response-header",value:this.redactedValue})}trackCliOptionAppendResponseHeader(h){h&&h.length>0&&this.trackCliOption({option:"append-response-header",value:this.redactedValue})}trackCliOptionDeleteResponseHeader(h){h&&h.length>0&&this.trackCliOption({option:"delete-response-header",value:this.redactedValue})}trackCliOptionSetRequestHeader(h){h&&h.length>0&&this.trackCliOption({option:"set-request-header",value:this.redactedValue})}trackCliOptionAppendRequestHeader(h){h&&h.length>0&&this.trackCliOption({option:"append-request-header",value:this.redactedValue})}trackCliOptionDeleteRequestHeader(h){h&&h.length>0&&this.trackCliOption({option:"delete-request-header",value:this.redactedValue})}trackCliOptionSetRequestQuery(p){p&&p.length>0&&this.trackCliOption({option:"set-request-query",value:this.redactedValue})}trackCliOptionAppendRequestQuery(p){p&&p.length>0&&this.trackCliOption({option:"append-request-query",value:this.redactedValue})}trackCliOptionDeleteRequestQuery(p){p&&p.length>0&&this.trackCliOption({option:"delete-request-query",value:this.redactedValue})}trackCliOptionHas(conditions){conditions&&conditions.length>0&&this.trackCliOption({option:"has",value:this.redactedValue})}trackCliOptionMissing(conditions){conditions&&conditions.length>0&&this.trackCliOption({option:"missing",value:this.redactedValue})}trackCliOptionAi(prompt){prompt&&this.trackCliOption({option:"ai",value:this.redactedValue})}};export{RoutesTelemetryClient,RoutesAddTelemetryClient,RoutesEditTelemetryClient};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{require_format}from"./chunk-WRILLB46.js";import{require_ms}from"./chunk-QTKJC2O5.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_ms=__toESM(require_ms(),1),import_chalk=__toESM(require_source(),1),import_format=__toESM(require_format(),1);function formatDate(dateStrOrNumber){if(!dateStrOrNumber)return import_chalk.default.gray("-");let date=new Date(dateStrOrNumber),diff=date.getTime()-Date.now();return diff<0?`${(0,import_format.default)(date,"DD MMMM YYYY HH:mm:ss")} ${import_chalk.default.gray(`[${(0,import_ms.default)(-diff)} ago]`)}`:`${(0,import_format.default)(date,"DD MMMM YYYY HH:mm:ss")} ${import_chalk.default.gray(`[in ${(0,import_ms.default)(diff)}]`)}`}function formatDateWithoutTime(dateStrOrNumber){if(!dateStrOrNumber)return import_chalk.default.gray("-");let date=new Date(dateStrOrNumber),diff=date.getTime()-Date.now();return diff<0?`${(0,import_format.default)(date,"MMM DD YYYY")} ${import_chalk.default.gray(`[${(0,import_ms.default)(-diff)} ago]`)}`:`${(0,import_format.default)(date,"MMM DD YYYY")} ${import_chalk.default.gray(`[in ${(0,import_ms.default)(diff)}]`)}`}export{formatDate,formatDateWithoutTime};
@@ -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
+ async function updateRouteVersion(client,projectId,versionId,action,options={}){let{teamId}=options,query=new URLSearchParams;teamId&&query.set("teamId",teamId);let queryString=query.toString(),url=`/v1/projects/${projectId}/routes/versions${queryString?`?${queryString}`:""}`;return await client.fetch(url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:versionId,action})})}export{updateRouteVersion};
@@ -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{sleep}from"./chunk-T3GQAMBJ.js";import{stamp_default}from"./chunk-XPXOV5UO.js";import{param}from"./chunk-SXUEGVWB.js";import{getScope}from"./chunk-32QBGZ2Z.js";import{require_pluralize}from"./chunk-64NJHVA3.js";import{APIError,DomainNotAvailable,DomainNotFound,DomainPaymentError,InvalidDomain,TLDNotSupportedViaCLI,UnexpectedDomainPurchaseError,UnsupportedTLD,UserAborted,isAPIError}from"./chunk-LKI6FRNM.js";import{eraseLines,output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk2=__toESM(require_source(),1),import_pluralize=__toESM(require_pluralize(),1);async function getDomainPrice(client,name){try{return await client.fetch(`/v1/registrar/domains/${name}/price`)}catch(err){if(isAPIError(err)){if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.status<500)return err}throw err}}async function getDomainStatus(client,domain){return client.fetch(`/v1/registrar/domains/${encodeURIComponent(domain)}/availability`)}async function getOrder(client,orderId){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"";try{return await client.fetch(`/v1/registrar/orders/${orderId}${teamParam}`)}catch(err){if(isAPIError(err)){if(err.code==="not_found")return null;if(err.status<500)return err}throw err}}var pollForOrder=async(client,orderId,timeoutMs=1e4)=>{let startTime=Date.now();for(;Date.now()-startTime<timeoutMs;){let order=await getOrder(client,orderId);if(order!==null&&(order.status==="completed"||order.status==="failed"))return order;await sleep(500)}return null};var import_chalk=__toESM(require_source(),1);async function getDomain(client,contextName,domainName){output_manager_default.spinner(`Fetching domain ${domainName} under ${import_chalk.default.bold(contextName)}`);try{let{domain}=await client.fetch(`/v5/domains/${domainName}`);return domain}catch(err){if(isAPIError(err)&&err.status<500)return err;throw err}}async function purchaseDomain(client,name,expectedPrice,years,autoRenew=!0,contactInformation){let{team,contextName}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"";try{let{orderId}=await client.fetch(`/v1/registrar/domains/${name}/buy${teamParam}`,{body:{expectedPrice,autoRenew,years,contactInformation},method:"POST"}),order=await pollForOrder(client,orderId);if(order===null)return new UnexpectedDomainPurchaseError(name);if(order.status==="completed"&&order.domains.find(domain2=>domain2.domainName===name)?.status==="completed"){let domain2=await getDomain(client,contextName,name);if(domain2 instanceof APIError)throw domain2;return domain2}return order.error?.code==="payment-failed"?new DomainPaymentError:new UnexpectedDomainPurchaseError(name)}catch(err){if(isAPIError(err)){if(err.code==="invalid_domain")return new InvalidDomain(name);if(err.code==="domain_not_available")return new DomainNotAvailable(name);if(err.code==="internal_server_error")return new UnexpectedDomainPurchaseError(name);if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.code==="additional_contact_info_required")return new TLDNotSupportedViaCLI(name)}throw err}}async function collectContactInformation(client){output_manager_default.log(""),output_manager_default.log("Please provide contact information for domain registration:");let firstName=await client.input.text({message:"First name:",validate:val=>val.length>0||"First name is required"}),lastName=await client.input.text({message:"Last name:",validate:val=>val.length>0||"Last name is required"}),email=await client.input.text({message:"Email:",validate:val=>val.length===0?"Email is required":/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val)?!0:"Invalid email format"}),phone=await client.input.text({message:"Phone (include country code, e.g., +15551234567):",validate:val=>val.length===0?"Phone is required":/^\+\d{10,15}$/.test(val)?!0:"Phone must start with + and contain 10-15 digits"}),address1=await client.input.text({message:"Address:",validate:val=>val.length>0||"Address is required"}),city=await client.input.text({message:"City:",validate:val=>val.length>0||"City is required"}),state=await client.input.text({message:"State/Province:",validate:val=>val.length>0||"State/Province is required"}),zip=await client.input.text({message:"Postal/ZIP code:",validate:val=>val.length>0||"Postal/ZIP code is required"}),country=await client.input.text({message:"Country code (2 letters, e.g., US):",validate:val=>val.length===0?"Country code is required":/^[A-Z]{2}$/i.test(val)?!0:"Country code must be 2 letters"}),companyName=await client.input.text({message:"Company name (optional):"});return{firstName,lastName,email,phone,address1,city,state,zip,country:country.toUpperCase(),companyName:companyName||void 0}}var isTTY=process.stdout.isTTY;async function purchaseDomainIfAvailable(client,domain,contextName){output_manager_default.spinner(`Checking status of ${import_chalk2.default.bold(domain)}`);let buyDomainStamp=stamp_default(),{available}=await getDomainStatus(client,domain);if(available){if(!isTTY)return new DomainNotFound(domain);output_manager_default.debug(`Domain ${domain} is available to be purchased`);let domainPrice=await getDomainPrice(client,domain).finally(()=>{output_manager_default.stopSpinner()});if(domainPrice instanceof UnsupportedTLD)return domainPrice;if(domainPrice instanceof Error)throw domainPrice;let{purchasePrice,years}=domainPrice;if(purchasePrice===null)return output_manager_default.error(`The domain ${param(domain)} is ${import_chalk2.default.underline("unavailable")}! ${buyDomainStamp()}`),new DomainNotAvailable(domain);if(output_manager_default.log(`Domain not found, but you can buy it under ${import_chalk2.default.bold(contextName)}! ${buyDomainStamp()}`),!await client.input.confirm(`Buy ${import_chalk2.default.underline(domain)} for ${import_chalk2.default.bold(`$${purchasePrice}`)} (${(0,import_pluralize.default)("yr",years,!0)})?`,!1))return output_manager_default.print(eraseLines(1)),new UserAborted;output_manager_default.print(eraseLines(1));let contactInformation=await collectContactInformation(client),result=await purchaseDomain(client,domain,purchasePrice,years,!0,contactInformation);return result instanceof Error?result:!0}return output_manager_default.debug(`Domain ${domain} is not available to be purchased`),!1}export{getDomainPrice,getDomainStatus,pollForOrder,purchaseDomain,collectContactInformation,purchaseDomainIfAvailable};
@@ -0,0 +1,13 @@
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_string_width}from"./chunk-WPS6JZF6.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_debug=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/debug.js"(exports,module){var messages=[],level=0,debug=(msg,min)=>{level>=min&&messages.push(msg)};debug.WARN=1;debug.INFO=2;debug.DEBUG=3;debug.reset=()=>{messages=[]};debug.setDebugLevel=v=>{level=v};debug.warn=msg=>debug(msg,debug.WARN);debug.info=msg=>debug(msg,debug.INFO);debug.debug=msg=>debug(msg,debug.DEBUG);debug.debugMessages=()=>messages;module.exports=debug}});var require_utils=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/utils.js"(exports,module){var stringWidth=require_string_width();function codeRegex(capture){return capture?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function strlen(str){let code=codeRegex();return(""+str).replace(code,"").split(`
8
+ `).reduce(function(memo,s){return stringWidth(s)>memo?stringWidth(s):memo},0)}function repeat(str,times){return Array(times+1).join(str)}function pad(str,len,pad2,dir){let length=strlen(str);if(len+1>=length){let padlen=len-length;switch(dir){case"right":{str=repeat(pad2,padlen)+str;break}case"center":{let right=Math.ceil(padlen/2),left=padlen-right;str=repeat(pad2,left)+str+repeat(pad2,right);break}default:{str=str+repeat(pad2,padlen);break}}}return str}var codeCache={};function addToCodeCache(name,on,off){on="\x1B["+on+"m",off="\x1B["+off+"m",codeCache[on]={set:name,to:!0},codeCache[off]={set:name,to:!1},codeCache[name]={on,off}}addToCodeCache("bold",1,22);addToCodeCache("italics",3,23);addToCodeCache("underline",4,24);addToCodeCache("inverse",7,27);addToCodeCache("strikethrough",9,29);function updateState(state,controlChars){let controlCode=controlChars[1]?parseInt(controlChars[1].split(";")[0]):0;if(controlCode>=30&&controlCode<=39||controlCode>=90&&controlCode<=97){state.lastForegroundAdded=controlChars[0];return}if(controlCode>=40&&controlCode<=49||controlCode>=100&&controlCode<=107){state.lastBackgroundAdded=controlChars[0];return}if(controlCode===0){for(let i in state)Object.prototype.hasOwnProperty.call(state,i)&&delete state[i];return}let info=codeCache[controlChars[0]];info&&(state[info.set]=info.to)}function readState(line){let code=codeRegex(!0),controlChars=code.exec(line),state={};for(;controlChars!==null;)updateState(state,controlChars),controlChars=code.exec(line);return state}function unwindState(state,ret){let lastBackgroundAdded=state.lastBackgroundAdded,lastForegroundAdded=state.lastForegroundAdded;return delete state.lastBackgroundAdded,delete state.lastForegroundAdded,Object.keys(state).forEach(function(key){state[key]&&(ret+=codeCache[key].off)}),lastBackgroundAdded&&lastBackgroundAdded!="\x1B[49m"&&(ret+="\x1B[49m"),lastForegroundAdded&&lastForegroundAdded!="\x1B[39m"&&(ret+="\x1B[39m"),ret}function rewindState(state,ret){let lastBackgroundAdded=state.lastBackgroundAdded,lastForegroundAdded=state.lastForegroundAdded;return delete state.lastBackgroundAdded,delete state.lastForegroundAdded,Object.keys(state).forEach(function(key){state[key]&&(ret=codeCache[key].on+ret)}),lastBackgroundAdded&&lastBackgroundAdded!="\x1B[49m"&&(ret=lastBackgroundAdded+ret),lastForegroundAdded&&lastForegroundAdded!="\x1B[39m"&&(ret=lastForegroundAdded+ret),ret}function truncateWidth(str,desiredLength){if(str.length===strlen(str))return str.substr(0,desiredLength);for(;strlen(str)>desiredLength;)str=str.slice(0,-1);return str}function truncateWidthWithAnsi(str,desiredLength){let code=codeRegex(!0),split=str.split(codeRegex()),splitIndex=0,retLen=0,ret="",myArray,state={};for(;retLen<desiredLength;){myArray=code.exec(str);let toAdd=split[splitIndex];if(splitIndex++,retLen+strlen(toAdd)>desiredLength&&(toAdd=truncateWidth(toAdd,desiredLength-retLen)),ret+=toAdd,retLen+=strlen(toAdd),retLen<desiredLength){if(!myArray)break;ret+=myArray[0],updateState(state,myArray)}}return unwindState(state,ret)}function truncate(str,desiredLength,truncateChar){return truncateChar=truncateChar||"\u2026",strlen(str)<=desiredLength?str:(desiredLength-=strlen(truncateChar),truncateWidthWithAnsi(str,desiredLength)+truncateChar)}function defaultOptions(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function mergeOptions(options,defaults){options=options||{},defaults=defaults||defaultOptions();let ret=Object.assign({},defaults,options);return ret.chars=Object.assign({},defaults.chars,options.chars),ret.style=Object.assign({},defaults.style,options.style),ret}function wordWrap(maxLength,input){let lines=[],split=input.split(/(\s+)/g),line=[],lineLength=0,whitespace;for(let i=0;i<split.length;i+=2){let word=split[i],newLength=lineLength+strlen(word);lineLength>0&&whitespace&&(newLength+=whitespace.length),newLength>maxLength?(lineLength!==0&&lines.push(line.join("")),line=[word],lineLength=strlen(word)):(line.push(whitespace||"",word),lineLength=newLength),whitespace=split[i+1]}return lineLength&&lines.push(line.join("")),lines}function textWrap(maxLength,input){let lines=[],line="";function pushLine(str,ws){for(line.length&&ws&&(line+=ws),line+=str;line.length>maxLength;)lines.push(line.slice(0,maxLength)),line=line.slice(maxLength)}let split=input.split(/(\s+)/g);for(let i=0;i<split.length;i+=2)pushLine(split[i],i&&split[i-1]);return line.length&&lines.push(line),lines}function multiLineWordWrap(maxLength,input,wrapOnWordBoundary=!0){let output=[];input=input.split(`
9
+ `);let handler=wrapOnWordBoundary?wordWrap:textWrap;for(let i=0;i<input.length;i++)output.push.apply(output,handler(maxLength,input[i]));return output}function colorizeLines(input){let state={},output=[];for(let i=0;i<input.length;i++){let line=rewindState(state,input[i]);state=readState(line);let temp=Object.assign({},state);output.push(unwindState(temp,line))}return output}function hyperlink(url,text){let OSC="\x1B]",BEL="\x07",SEP=";";return[OSC,"8",SEP,SEP,url||text,BEL,text,OSC,"8",SEP,SEP,BEL].join("")}module.exports={strlen,repeat,pad,truncate,mergeOptions,wordWrap:multiLineWordWrap,colorizeLines,hyperlink}}});var require_styles=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js"(exports,module){var styles={};module.exports=styles;var codes={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(codes).forEach(function(key){var val=codes[key],style=styles[key]=[];style.open="\x1B["+val[0]+"m",style.close="\x1B["+val[1]+"m"})}});var require_has_flag=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js"(exports,module){"use strict";module.exports=function(flag,argv){argv=argv||process.argv;var terminatorPos=argv.indexOf("--"),prefix=/^-{1,2}/.test(flag)?"":"--",pos=argv.indexOf(prefix+flag);return pos!==-1&&(terminatorPos===-1?!0:pos<terminatorPos)}}});var require_supports_colors=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js"(exports,module){"use strict";var os=__require("os"),hasFlag=require_has_flag(),env=process.env,forceColor=void 0;hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")?forceColor=!1:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(forceColor=!0);"FORCE_COLOR"in env&&(forceColor=env.FORCE_COLOR.length===0||parseInt(env.FORCE_COLOR,10)!==0);function translateLevel(level){return level===0?!1:{level,hasBasic:!0,has256:level>=2,has16m:level>=3}}function supportsColor(stream){if(forceColor===!1)return 0;if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2;if(stream&&!stream.isTTY&&forceColor!==!0)return 0;var min=forceColor?1:0;if(process.platform==="win32"){var osRelease=os.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(osRelease[0])>=10&&Number(osRelease[2])>=10586?Number(osRelease[2])>=14931?3:2:1}if("CI"in env)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(sign){return sign in env})||env.CI_NAME==="codeship"?1:min;if("TEAMCITY_VERSION"in env)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in env){var version=parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(env.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)||"COLORTERM"in env?1:(env.TERM==="dumb",min)}function getSupportLevel(stream){var level=supportsColor(stream);return translateLevel(level)}module.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}}});var require_trap=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js"(exports,module){module.exports=function(text,options){var result="";text=text||"Run the trap, drop the bass",text=text.split("");var trap={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return text.forEach(function(c){c=c.toLowerCase();var chars=trap[c]||[" "],rand=Math.floor(Math.random()*chars.length);typeof trap[c]<"u"?result+=trap[c][rand]:result+=c}),result}}});var require_zalgo=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js"(exports,module){module.exports=function(text,options){text=text||" he is here ";var soul={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},all=[].concat(soul.up,soul.down,soul.mid);function randomNumber(range){var r=Math.floor(Math.random()*range);return r}function isChar(character){var bool=!1;return all.filter(function(i){bool=i===character}),bool}function heComes(text2,options2){var result="",counts,l;options2=options2||{},options2.up=typeof options2.up<"u"?options2.up:!0,options2.mid=typeof options2.mid<"u"?options2.mid:!0,options2.down=typeof options2.down<"u"?options2.down:!0,options2.size=typeof options2.size<"u"?options2.size:"maxi",text2=text2.split("");for(l in text2)if(!isChar(l)){switch(result=result+text2[l],counts={up:0,down:0,mid:0},options2.size){case"mini":counts.up=randomNumber(8),counts.mid=randomNumber(2),counts.down=randomNumber(8);break;case"maxi":counts.up=randomNumber(16)+3,counts.mid=randomNumber(4)+1,counts.down=randomNumber(64)+3;break;default:counts.up=randomNumber(8)+1,counts.mid=randomNumber(6)/2,counts.down=randomNumber(8)+1;break}var arr=["up","mid","down"];for(var d in arr)for(var index=arr[d],i=0;i<=counts[index];i++)options2[index]&&(result=result+soul[index][randomNumber(soul[index].length)])}return result}return heComes(text,options)}}});var require_america=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js"(exports,module){module.exports=function(colors){return function(letter,i,exploded){if(letter===" ")return letter;switch(i%3){case 0:return colors.red(letter);case 1:return colors.white(letter);case 2:return colors.blue(letter)}}}}});var require_zebra=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js"(exports,module){module.exports=function(colors){return function(letter,i,exploded){return i%2===0?letter:colors.inverse(letter)}}}});var require_rainbow=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js"(exports,module){module.exports=function(colors){var rainbowColors=["red","yellow","green","blue","magenta"];return function(letter,i,exploded){return letter===" "?letter:colors[rainbowColors[i++%rainbowColors.length]](letter)}}}});var require_random=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js"(exports,module){module.exports=function(colors){var available=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(letter,i,exploded){return letter===" "?letter:colors[available[Math.round(Math.random()*(available.length-2))]](letter)}}}});var require_colors=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js"(exports,module){var colors={};module.exports=colors;colors.themes={};var util=__require("util"),ansiStyles=colors.styles=require_styles(),defineProps=Object.defineProperties,newLineRegex=new RegExp(/[\r\n]+/g);colors.supportsColor=require_supports_colors().supportsColor;typeof colors.enabled>"u"&&(colors.enabled=colors.supportsColor()!==!1);colors.enable=function(){colors.enabled=!0};colors.disable=function(){colors.enabled=!1};colors.stripColors=colors.strip=function(str){return(""+str).replace(/\x1B\[\d+m/g,"")};var stylize=colors.stylize=function(str,style){if(!colors.enabled)return str+"";var styleMap=ansiStyles[style];return!styleMap&&style in colors?colors[style](str):styleMap.open+str+styleMap.close},matchOperatorsRe=/[|\\{}()[\]^$+*?.]/g,escapeStringRegexp=function(str){if(typeof str!="string")throw new TypeError("Expected a string");return str.replace(matchOperatorsRe,"\\$&")};function build(_styles){var builder=function builder2(){return applyStyle.apply(builder2,arguments)};return builder._styles=_styles,builder.__proto__=proto,builder}var styles=function(){var ret={};return ansiStyles.grey=ansiStyles.gray,Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g"),ret[key]={get:function(){return build(this._styles.concat(key))}}}),ret}(),proto=defineProps(function(){},styles);function applyStyle(){var args=Array.prototype.slice.call(arguments),str=args.map(function(arg){return arg!=null&&arg.constructor===String?arg:util.inspect(arg)}).join(" ");if(!colors.enabled||!str)return str;for(var newLinesPresent=str.indexOf(`
10
+ `)!=-1,nestedStyles=this._styles,i=nestedStyles.length;i--;){var code=ansiStyles[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close,newLinesPresent&&(str=str.replace(newLineRegex,function(match){return code.close+match+code.open}))}return str}colors.setTheme=function(theme){if(typeof theme=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var style in theme)(function(style2){colors[style2]=function(str){if(typeof theme[style2]=="object"){var out=str;for(var i in theme[style2])out=colors[theme[style2][i]](out);return out}return colors[theme[style2]](str)}})(style)};function init(){var ret={};return Object.keys(styles).forEach(function(name){ret[name]={get:function(){return build([name])}}}),ret}var sequencer=function(map2,str){var exploded=str.split("");return exploded=exploded.map(map2),exploded.join("")};colors.trap=require_trap();colors.zalgo=require_zalgo();colors.maps={};colors.maps.america=require_america()(colors);colors.maps.zebra=require_zebra()(colors);colors.maps.rainbow=require_rainbow()(colors);colors.maps.random=require_random()(colors);for(map in colors.maps)(function(map2){colors[map2]=function(str){return sequencer(colors.maps[map2],str)}})(map);var map;defineProps(colors,init())}});var require_safe=__commonJS({"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js"(exports,module){var colors=require_colors();module.exports=colors}});var require_cell=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/cell.js"(exports,module){var{info,debug}=require_debug(),utils=require_utils(),Cell=class _Cell{constructor(options){this.setOptions(options),this.x=null,this.y=null}setOptions(options){["boolean","number","string"].indexOf(typeof options)!==-1&&(options={content:""+options}),options=options||{},this.options=options;let content=options.content;if(["boolean","number","string"].indexOf(typeof content)!==-1)this.content=String(content);else if(!content)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof content);this.colSpan=options.colSpan||1,this.rowSpan=options.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(tableOptions,cells){this.cells=cells;let optionsChars=this.options.chars||{},tableChars=tableOptions.chars,chars=this.chars={};CHAR_NAMES.forEach(function(name){setOption(optionsChars,tableChars,name,chars)}),this.truncate=this.options.truncate||tableOptions.truncate;let style=this.options.style=this.options.style||{},tableStyle=tableOptions.style;setOption(style,tableStyle,"padding-left",this),setOption(style,tableStyle,"padding-right",this),this.head=style.head||tableStyle.head,this.border=style.border||tableStyle.border,this.fixedWidth=tableOptions.colWidths[this.x],this.lines=this.computeLines(tableOptions),this.desiredWidth=utils.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(tableOptions){let tableWordWrap=tableOptions.wordWrap||tableOptions.textWrap,{wordWrap=tableWordWrap}=this.options;if(this.fixedWidth&&wordWrap){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let i=1;for(;i<this.colSpan;)this.fixedWidth+=tableOptions.colWidths[this.x+i],i++}let{wrapOnWordBoundary:tableWrapOnWordBoundary=!0}=tableOptions,{wrapOnWordBoundary=tableWrapOnWordBoundary}=this.options;return this.wrapLines(utils.wordWrap(this.fixedWidth,this.content,wrapOnWordBoundary))}return this.wrapLines(this.content.split(`
11
+ `))}wrapLines(computedLines){let lines=utils.colorizeLines(computedLines);return this.href?lines.map(line=>utils.hyperlink(this.href,line)):lines}init(tableOptions){let x=this.x,y=this.y;this.widths=tableOptions.colWidths.slice(x,x+this.colSpan),this.heights=tableOptions.rowHeights.slice(y,y+this.rowSpan),this.width=this.widths.reduce(sumPlusOne,-1),this.height=this.heights.reduce(sumPlusOne,-1),this.hAlign=this.options.hAlign||tableOptions.colAligns[x],this.vAlign=this.options.vAlign||tableOptions.rowAligns[y],this.drawRight=x+this.colSpan==tableOptions.colWidths.length}draw(lineNum,spanningCell){if(lineNum=="top")return this.drawTop(this.drawRight);if(lineNum=="bottom")return this.drawBottom(this.drawRight);let content=utils.truncate(this.content,10,this.truncate);lineNum||info(`${this.y}-${this.x}: ${this.rowSpan-lineNum}x${this.colSpan} Cell ${content}`);let padLen=Math.max(this.height-this.lines.length,0),padTop;switch(this.vAlign){case"center":padTop=Math.ceil(padLen/2);break;case"bottom":padTop=padLen;break;default:padTop=0}if(lineNum<padTop||lineNum>=padTop+this.lines.length)return this.drawEmpty(this.drawRight,spanningCell);let forceTruncation=this.lines.length>this.height&&lineNum+1>=this.height;return this.drawLine(lineNum-padTop,this.drawRight,forceTruncation,spanningCell)}drawTop(drawRight){let content=[];return this.cells?this.widths.forEach(function(width,index){content.push(this._topLeftChar(index)),content.push(utils.repeat(this.chars[this.y==0?"top":"mid"],width))},this):(content.push(this._topLeftChar(0)),content.push(utils.repeat(this.chars[this.y==0?"top":"mid"],this.width))),drawRight&&content.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",content.join(""))}_topLeftChar(offset){let x=this.x+offset,leftChar;if(this.y==0)leftChar=x==0?"topLeft":offset==0?"topMid":"top";else if(x==0)leftChar="leftMid";else if(leftChar=offset==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][x]instanceof _Cell.ColSpanCell&&(leftChar=offset==0?"topMid":"mid"),offset==0)){let i=1;for(;this.cells[this.y][x-i]instanceof _Cell.ColSpanCell;)i++;this.cells[this.y][x-i]instanceof _Cell.RowSpanCell&&(leftChar="leftMid")}return this.chars[leftChar]}wrapWithStyleColors(styleProperty,content){if(this[styleProperty]&&this[styleProperty].length)try{let colors=require_safe();for(let i=this[styleProperty].length-1;i>=0;i--)colors=colors[this[styleProperty][i]];return colors(content)}catch{return content}else return content}drawLine(lineNum,drawRight,forceTruncationSymbol,spanningCell){let left=this.chars[this.x==0?"left":"middle"];if(this.x&&spanningCell&&this.cells){let cellLeft=this.cells[this.y+spanningCell][this.x-1];for(;cellLeft instanceof ColSpanCell;)cellLeft=this.cells[cellLeft.y][cellLeft.x-1];cellLeft instanceof RowSpanCell||(left=this.chars.rightMid)}let leftPadding=utils.repeat(" ",this.paddingLeft),right=drawRight?this.chars.right:"",rightPadding=utils.repeat(" ",this.paddingRight),line=this.lines[lineNum],len=this.width-(this.paddingLeft+this.paddingRight);forceTruncationSymbol&&(line+=this.truncate||"\u2026");let content=utils.truncate(line,len,this.truncate);return content=utils.pad(content,len," ",this.hAlign),content=leftPadding+content+rightPadding,this.stylizeLine(left,content,right)}stylizeLine(left,content,right){return left=this.wrapWithStyleColors("border",left),right=this.wrapWithStyleColors("border",right),this.y===0&&(content=this.wrapWithStyleColors("head",content)),left+content+right}drawBottom(drawRight){let left=this.chars[this.x==0?"bottomLeft":"bottomMid"],content=utils.repeat(this.chars.bottom,this.width),right=drawRight?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",left+content+right)}drawEmpty(drawRight,spanningCell){let left=this.chars[this.x==0?"left":"middle"];if(this.x&&spanningCell&&this.cells){let cellLeft=this.cells[this.y+spanningCell][this.x-1];for(;cellLeft instanceof ColSpanCell;)cellLeft=this.cells[cellLeft.y][cellLeft.x-1];cellLeft instanceof RowSpanCell||(left=this.chars.rightMid)}let right=drawRight?this.chars.right:"",content=utils.repeat(" ",this.width);return this.stylizeLine(left,content,right)}},ColSpanCell=class{constructor(){}draw(lineNum){return typeof lineNum=="number"&&debug(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},RowSpanCell=class{constructor(originalCell){this.originalCell=originalCell}init(tableOptions){let y=this.y,originalY=this.originalCell.y;this.cellOffset=y-originalY,this.offset=findDimension(tableOptions.rowHeights,originalY,this.cellOffset)}draw(lineNum){return lineNum=="top"?this.originalCell.draw(this.offset,this.cellOffset):lineNum=="bottom"?this.originalCell.draw("bottom"):(debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+lineNum))}mergeTableOptions(){}};function firstDefined(...args){return args.filter(v=>v!=null).shift()}function setOption(objA,objB,nameB,targetObj){let nameA=nameB.split("-");nameA.length>1?(nameA[1]=nameA[1].charAt(0).toUpperCase()+nameA[1].substr(1),nameA=nameA.join(""),targetObj[nameA]=firstDefined(objA[nameA],objA[nameB],objB[nameA],objB[nameB])):targetObj[nameB]=firstDefined(objA[nameB],objB[nameB])}function findDimension(dimensionTable,startingIndex,span){let ret=dimensionTable[startingIndex];for(let i=1;i<span;i++)ret+=1+dimensionTable[startingIndex+i];return ret}function sumPlusOne(a,b){return a+b+1}var CHAR_NAMES=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];module.exports=Cell;module.exports.ColSpanCell=ColSpanCell;module.exports.RowSpanCell=RowSpanCell}});var require_layout_manager=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/layout-manager.js"(exports,module){var{warn,debug}=require_debug(),Cell=require_cell(),{ColSpanCell,RowSpanCell}=Cell;(function(){function next(alloc,col){return alloc[col]>0?next(alloc,col+1):col}function layoutTable(table2){let alloc={};table2.forEach(function(row,rowIndex){let col=0;row.forEach(function(cell){cell.y=rowIndex,cell.x=rowIndex?next(alloc,col):col;let rowSpan=cell.rowSpan||1,colSpan=cell.colSpan||1;if(rowSpan>1)for(let cs=0;cs<colSpan;cs++)alloc[cell.x+cs]=rowSpan;col=cell.x+colSpan}),Object.keys(alloc).forEach(idx=>{alloc[idx]--,alloc[idx]<1&&delete alloc[idx]})})}function maxWidth(table2){let mw=0;return table2.forEach(function(row){row.forEach(function(cell){mw=Math.max(mw,cell.x+(cell.colSpan||1))})}),mw}function maxHeight(table2){return table2.length}function cellsConflict(cell1,cell2){let yMin1=cell1.y,yMax1=cell1.y-1+(cell1.rowSpan||1),yMin2=cell2.y,yMax2=cell2.y-1+(cell2.rowSpan||1),yConflict=!(yMin1>yMax2||yMin2>yMax1),xMin1=cell1.x,xMax1=cell1.x-1+(cell1.colSpan||1),xMin2=cell2.x,xMax2=cell2.x-1+(cell2.colSpan||1),xConflict=!(xMin1>xMax2||xMin2>xMax1);return yConflict&&xConflict}function conflictExists(rows,x,y){let i_max=Math.min(rows.length-1,y),cell={x,y};for(let i=0;i<=i_max;i++){let row=rows[i];for(let j=0;j<row.length;j++)if(cellsConflict(cell,row[j]))return!0}return!1}function allBlank(rows,y,xMin,xMax){for(let x=xMin;x<xMax;x++)if(conflictExists(rows,x,y))return!1;return!0}function addRowSpanCells(table2){table2.forEach(function(row,rowIndex){row.forEach(function(cell){for(let i=1;i<cell.rowSpan;i++){let rowSpanCell=new RowSpanCell(cell);rowSpanCell.x=cell.x,rowSpanCell.y=cell.y+i,rowSpanCell.colSpan=cell.colSpan,insertCell(rowSpanCell,table2[rowIndex+i])}})})}function addColSpanCells(cellRows){for(let rowIndex=cellRows.length-1;rowIndex>=0;rowIndex--){let cellColumns=cellRows[rowIndex];for(let columnIndex=0;columnIndex<cellColumns.length;columnIndex++){let cell=cellColumns[columnIndex];for(let k=1;k<cell.colSpan;k++){let colSpanCell=new ColSpanCell;colSpanCell.x=cell.x+k,colSpanCell.y=cell.y,cellColumns.splice(columnIndex+1,0,colSpanCell)}}}}function insertCell(cell,row){let x=0;for(;x<row.length&&row[x].x<cell.x;)x++;row.splice(x,0,cell)}function fillInTable(table2){let h_max=maxHeight(table2),w_max=maxWidth(table2);debug(`Max rows: ${h_max}; Max cols: ${w_max}`);for(let y=0;y<h_max;y++)for(let x=0;x<w_max;x++)if(!conflictExists(table2,x,y)){let opts={x,y,colSpan:1,rowSpan:1};for(x++;x<w_max&&!conflictExists(table2,x,y);)opts.colSpan++,x++;let y2=y+1;for(;y2<h_max&&allBlank(table2,y2,opts.x,opts.x+opts.colSpan);)opts.rowSpan++,y2++;let cell=new Cell(opts);cell.x=opts.x,cell.y=opts.y,warn(`Missing cell at ${cell.y}-${cell.x}.`),insertCell(cell,table2[y])}}function generateCells(rows){return rows.map(function(row){if(!Array.isArray(row)){let key=Object.keys(row)[0];row=row[key],Array.isArray(row)?(row=row.slice(),row.unshift(key)):row=[key,row]}return row.map(function(cell){return new Cell(cell)})})}function makeTableLayout(rows){let cellRows=generateCells(rows);return layoutTable(cellRows),fillInTable(cellRows),addRowSpanCells(cellRows),addColSpanCells(cellRows),cellRows}module.exports={makeTableLayout,layoutTable,addRowSpanCells,maxWidth,fillInTable,computeWidths:makeComputeWidths("colSpan","desiredWidth","x",1),computeHeights:makeComputeWidths("rowSpan","desiredHeight","y",1)}})();function makeComputeWidths(colSpan,desiredWidth,x,forcedMin){return function(vals,table2){let result=[],spanners=[],auto={};table2.forEach(function(row){row.forEach(function(cell){(cell[colSpan]||1)>1?spanners.push(cell):result[cell[x]]=Math.max(result[cell[x]]||0,cell[desiredWidth]||0,forcedMin)})}),vals.forEach(function(val,index){typeof val=="number"&&(result[index]=val)});for(let k=spanners.length-1;k>=0;k--){let cell=spanners[k],span=cell[colSpan],col=cell[x],existingWidth=result[col],editableCols=typeof vals[col]=="number"?0:1;if(typeof existingWidth=="number")for(let i=1;i<span;i++)existingWidth+=1+result[col+i],typeof vals[col+i]!="number"&&editableCols++;else existingWidth=desiredWidth==="desiredWidth"?cell.desiredWidth-1:1,(!auto[col]||auto[col]<existingWidth)&&(auto[col]=existingWidth);if(cell[desiredWidth]>existingWidth){let i=0;for(;editableCols>0&&cell[desiredWidth]>existingWidth;){if(typeof vals[col+i]!="number"){let dif=Math.round((cell[desiredWidth]-existingWidth)/editableCols);existingWidth+=dif,result[col+i]+=dif,editableCols--}i++}}}Object.assign(vals,result,auto);for(let j=0;j<vals.length;j++)vals[j]=Math.max(forcedMin,vals[j]||0)}}}});var require_table=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/table.js"(exports,module){var debug=require_debug(),utils=require_utils(),tableLayout=require_layout_manager(),Table2=class extends Array{constructor(opts){super();let options=utils.mergeOptions(opts);if(Object.defineProperty(this,"options",{value:options,enumerable:options.debug}),options.debug){switch(typeof options.debug){case"boolean":debug.setDebugLevel(debug.WARN);break;case"number":debug.setDebugLevel(options.debug);break;case"string":debug.setDebugLevel(parseInt(options.debug,10));break;default:debug.setDebugLevel(debug.WARN),debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`)}Object.defineProperty(this,"messages",{get(){return debug.debugMessages()}})}}toString(){let array=this,headersPresent=this.options.head&&this.options.head.length;headersPresent?(array=[this.options.head],this.length&&array.push.apply(array,this)):this.options.style.head=[];let cells=tableLayout.makeTableLayout(array);cells.forEach(function(row){row.forEach(function(cell){cell.mergeTableOptions(this.options,cells)},this)},this),tableLayout.computeWidths(this.options.colWidths,cells),tableLayout.computeHeights(this.options.rowHeights,cells),cells.forEach(function(row){row.forEach(function(cell){cell.init(this.options)},this)},this);let result=[];for(let rowIndex=0;rowIndex<cells.length;rowIndex++){let row=cells[rowIndex],heightOfRow=this.options.rowHeights[rowIndex];(rowIndex===0||!this.options.style.compact||rowIndex==1&&headersPresent)&&doDraw(row,"top",result);for(let lineNum=0;lineNum<heightOfRow;lineNum++)doDraw(row,lineNum,result);rowIndex+1==cells.length&&doDraw(row,"bottom",result)}return result.join(`
12
+ `)}get width(){return this.toString().split(`
13
+ `)[0].length}};Table2.reset=()=>debug.reset();function doDraw(row,lineNum,result){let line=[];row.forEach(function(cell){line.push(cell.draw(lineNum))});let str=line.join("");str.length&&result.push(str)}module.exports=Table2}});var require_cli_table3=__commonJS({"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/index.js"(exports,module){module.exports=require_table()}});var import_cli_table3=__toESM(require_cli_table3(),1),defaultStyle={"padding-left":0,"padding-right":2},noBorderChars={top:"","top-mid":"","top-left":"","top-right":"",bottom:"","bottom-mid":"","bottom-left":"","bottom-right":"",left:"","left-mid":"",mid:"","mid-mid":"",right:"","right-mid":"",middle:""},alignMap={l:"left",c:"center",r:"right"};function table(rows,opts){let table2=new import_cli_table3.default({style:{...defaultStyle,"padding-right":opts?.hsep??defaultStyle["padding-right"]},chars:noBorderChars});return table2.push(...rows.map(row=>row.map((cell,i)=>({content:cell,hAlign:alignMap[opts?.align?.[i]??"l"]})))),table2.toString()}export{require_cli_table3,noBorderChars,table};
@@ -0,0 +1,14 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{VERCEL_CONFIG_EXTENSIONS}from"./chunk-QR7QPUFN.js";import{VERCEL_DIR}from"./chunk-64NJHVA3.js";import{ConflictingConfigFiles,DeprecatedNowJson}from"./chunk-LKI6FRNM.js";import{output_manager_default,require_build_utils}from"./chunk-EWWFNMPZ.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_main=__commonJS({"../../node_modules/.pnpm/dotenv@4.0.0/node_modules/dotenv/lib/main.js"(exports,module){"use strict";var fs=__require("fs");function parse(src){var obj={};return src.toString().split(`
8
+ `).forEach(function(line){var keyValueArr=line.match(/^\s*([\w\.\-]+)\s*=\s*(.*)?\s*$/);if(keyValueArr!=null){var key=keyValueArr[1],value=keyValueArr[2]?keyValueArr[2]:"",len=value?value.length:0;len>0&&value.charAt(0)==='"'&&value.charAt(len-1)==='"'&&(value=value.replace(/\\n/gm,`
9
+ `)),value=value.replace(/(^['"]|['"]$)/g,"").trim(),obj[key]=value}}),obj}function config(options){var path=".env",encoding="utf8";options&&(options.path&&(path=options.path),options.encoding&&(encoding=options.encoding));try{var parsedObj=parse(fs.readFileSync(path,{encoding}));return Object.keys(parsedObj).forEach(function(key){process.env[key]=process.env[key]||parsedObj[key]}),{parsed:parsedObj}}catch(e){return{error:e}}}module.exports.config=config;module.exports.load=config;module.exports.parse=parse}});var import_dotenv=__toESM(require_main(),1);import{mkdir,readFile,writeFile,unlink,access}from"fs/promises";import{join,basename}from"path";import{fork}from"child_process";async function loadEsbuild(){let nativeLoader=Reflect.get(globalThis,Symbol.for("vercel.cli.loadEsbuild"));return typeof nativeLoader=="function"?nativeLoader():import("esbuild")}var import_build_utils=__toESM(require_build_utils(),1);function toRouteFormat(item){if("src"in item)return item;let{source,destination,headers,statusCode,permanent,...rest}=item,route={src:source,...rest};return destination&&(route.dest=destination),headers&&(route.headers=Object.fromEntries(headers.map(h=>[h.key,h.value]))),statusCode!==void 0?route.status=statusCode:permanent!==void 0&&(route.status=permanent?308:307),route}function normalizeConfig(config){let normalized={...config},{rewrites,redirects,headers}=normalized,allRoutes=normalized.routes||[],hasRoutes=allRoutes.length>0,hasRewrites=(rewrites?.length??0)>0,hasRedirects=(redirects?.length??0)>0,hasHeaders=(headers?.length??0)>0;function hasRouteFormat(items){return items?.some(item=>"src"in item)??!1}if(hasRoutes&&(hasRewrites||hasRedirects||hasHeaders))return normalized;let shouldConvertRewrites=hasRewrites&&hasRouteFormat(rewrites),shouldConvertRedirects=hasRedirects&&hasRouteFormat(redirects),shouldConvertHeaders=hasHeaders&&hasRouteFormat(headers);if((shouldConvertRewrites||shouldConvertRedirects||shouldConvertHeaders)&&(hasRewrites&&!shouldConvertRewrites||hasRedirects&&!shouldConvertRedirects||hasHeaders&&!shouldConvertHeaders))throw new import_build_utils.NowBuildError({code:"INVALID_VERCEL_CONFIG",message:"Transforms (e.g., requestHeaders) require the `routes` format, which cannot be used alongside `rewrites`, `redirects`, or `headers`. Move everything into the `routes` array instead.",link:"https://vercel.com/docs/projects/project-configuration#routes"});return rewrites&&shouldConvertRewrites&&(allRoutes=[...allRoutes,...rewrites.map(toRouteFormat)],delete normalized.rewrites),redirects&&shouldConvertRedirects&&(allRoutes=[...allRoutes,...redirects.map(toRouteFormat)],delete normalized.redirects),headers&&shouldConvertHeaders&&(allRoutes=[...allRoutes,...headers.map(toRouteFormat)],delete normalized.headers),allRoutes.length>0&&(normalized.routes=allRoutes.map(toRouteFormat)),normalized}async function fileExists(filePath){try{return await access(filePath),!0}catch{return!1}}async function findAllVercelConfigFiles(workPath){let foundFiles=[];for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);await fileExists(configPath)&&foundFiles.push(configPath)}return foundFiles}async function findSourceVercelConfigFile(workPath){for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);if(await fileExists(configPath))return basename(configPath)}let tomlPath=join(workPath,"vercel.toml");return await fileExists(tomlPath)?"vercel.toml":null}async function findVercelConfigFile(workPath){let foundFiles=await findAllVercelConfigFiles(workPath);if(foundFiles.length>1)throw new ConflictingConfigFiles(foundFiles,"Multiple vercel config files found. Please use only one configuration file.","https://vercel.com/docs/projects/project-configuration");return foundFiles[0]||null}function parseConfigLoaderError(stderr){if(!stderr.trim())return"";let moduleNotFoundMatch=stderr.match(/Error \[ERR_MODULE_NOT_FOUND\]: Cannot find package '([^']+)'/);if(moduleNotFoundMatch)return`Cannot find package '${moduleNotFoundMatch[1]}'. Make sure it's installed in your project dependencies.`;let syntaxErrorMatch=stderr.match(/SyntaxError: (.+?)(?:\n|$)/);if(syntaxErrorMatch)return`Syntax error: ${syntaxErrorMatch[1]}`;let errorMatch=stderr.match(/^(?:Error|TypeError|ReferenceError): (.+?)(?:\n|$)/m);return errorMatch?errorMatch[1]:stderr.trim()}async function compileVercelConfig(workPath){let vercelJsonPath=join(workPath,"vercel.json"),nowJsonPath=join(workPath,"now.json"),vercelTomlPath=join(workPath,"vercel.toml"),hasVercelJson=await fileExists(vercelJsonPath),hasNowJson=await fileExists(nowJsonPath),hasVercelToml=await fileExists(vercelTomlPath),vercelConfigPath=await findVercelConfigFile(workPath),vercelDir=join(workPath,VERCEL_DIR),compiledConfigPath=join(vercelDir,"vercel.json");if(hasNowJson)throw new DeprecatedNowJson(nowJsonPath);let foundConfigs=[];if(hasVercelJson&&foundConfigs.push(vercelJsonPath),hasVercelToml&&foundConfigs.push(vercelTomlPath),vercelConfigPath&&foundConfigs.push(vercelConfigPath),foundConfigs.length>1)throw new ConflictingConfigFiles(foundConfigs,`Multiple config files found: ${foundConfigs.map(f=>basename(f)).join(", ")}. Please use only one configuration method.`,"https://vercel.com/docs/projects/project-configuration");if(!vercelConfigPath&&!hasVercelToml)return hasVercelJson?{configPath:vercelJsonPath,wasCompiled:!1}:await fileExists(compiledConfigPath)?{configPath:compiledConfigPath,wasCompiled:!0,sourceFile:await findSourceVercelConfigFile(workPath)??void 0}:{configPath:null,wasCompiled:!1};if(hasVercelToml)try{let{parse:tomlParse}=await import("smol-toml"),tomlContent=await readFile(vercelTomlPath,"utf8"),config=tomlParse(tomlContent),normalizedConfig=normalizeConfig(config);return await mkdir(vercelDir,{recursive:!0}),await writeFile(compiledConfigPath,JSON.stringify(normalizedConfig,null,2),"utf-8"),output_manager_default.debug(`Compiled ${vercelTomlPath} -> ${compiledConfigPath}`),{configPath:compiledConfigPath,wasCompiled:!0,sourceFile:"vercel.toml"}}catch(error){throw new import_build_utils.NowBuildError({code:error.code??"vercel_toml_parse_failed",message:`Failed to parse vercel.toml: ${error.message}`,link:error.link??"https://vercel.com/docs/projects/project-configuration"})}let sourceConfigPath=vercelConfigPath;(0,import_dotenv.config)({path:join(workPath,".env")}),(0,import_dotenv.config)({path:join(workPath,".env.local")});let tempOutPath=join(vercelDir,"vercel-temp.mjs"),loaderPath=join(vercelDir,"vercel-loader.mjs");try{let{build}=await loadEsbuild();await mkdir(vercelDir,{recursive:!0}),await build({entryPoints:[sourceConfigPath],bundle:!0,platform:"node",format:"esm",outfile:tempOutPath,packages:"external",target:"node20",sourcemap:"inline"}),await writeFile(loaderPath,`
10
+ import { pathToFileURL } from 'url';
11
+ const configModule = await import(pathToFileURL(process.argv[2]).href);
12
+ const config = ('default' in configModule) ? configModule.default : ('config' in configModule) ? configModule.config : configModule;
13
+ process.send(config);
14
+ `,"utf-8");let config=await new Promise((resolve,reject)=>{let child=fork(loaderPath,[tempOutPath],{execPath:(0,import_build_utils.getNodeExecPath)(),stdio:["pipe","pipe","pipe","ipc"]}),stderrOutput="",stdoutOutput="";child.stderr&&child.stderr.on("data",data=>{stderrOutput+=data.toString()}),child.stdout&&child.stdout.on("data",data=>{stdoutOutput+=data.toString()});let timeout=setTimeout(()=>{child.kill(),reject(new Error("Config loader timed out after 10 seconds"))},1e4);child.on("message",message=>{clearTimeout(timeout),child.kill(),resolve(message)}),child.on("error",err=>{clearTimeout(timeout),reject(err)}),child.on("exit",code=>{if(clearTimeout(timeout),code!==0){stderrOutput.trim()&&output_manager_default.log(stderrOutput),stdoutOutput.trim()&&output_manager_default.log(stdoutOutput);let parsedError=parseConfigLoaderError(stderrOutput);parsedError?reject(new Error(parsedError)):stdoutOutput.trim()?reject(new Error(stdoutOutput.trim())):reject(new Error(`Config loader exited with code ${code}`))}})}),normalizedConfig=normalizeConfig(config);return await writeFile(compiledConfigPath,JSON.stringify(normalizedConfig,null,2),"utf-8"),output_manager_default.debug(`Compiled ${sourceConfigPath} -> ${compiledConfigPath}`),{configPath:compiledConfigPath,wasCompiled:!0,sourceFile:await findSourceVercelConfigFile(workPath)??void 0}}catch(error){throw new import_build_utils.NowBuildError({code:error.code??"vercel_ts_compilation_failed",message:`Failed to compile ${basename(sourceConfigPath)}: ${error.message}`,link:error.link??"https://vercel.com/docs/projects/project-configuration"})}finally{await Promise.all([unlink(tempOutPath).catch(err=>{err.code!=="ENOENT"&&output_manager_default.debug(`Failed to cleanup temp file: ${err}`)}),unlink(loaderPath).catch(err=>{err.code!=="ENOENT"&&output_manager_default.debug(`Failed to cleanup loader file: ${err}`)})])}}async function getVercelConfigPath(workPath){let vercelJsonPath=join(workPath,"vercel.json"),vercelTomlPath=join(workPath,"vercel.toml"),compiledConfigPath=join(workPath,VERCEL_DIR,"vercel.json");return await fileExists(vercelJsonPath)?vercelJsonPath:await fileExists(vercelTomlPath)?vercelTomlPath:await fileExists(compiledConfigPath)?compiledConfigPath:vercelJsonPath}export{require_main,normalizeConfig,findSourceVercelConfigFile,compileVercelConfig,getVercelConfigPath};