@vercel/cli-support 68.2.0 → 68.3.0-snapshot-4bb5562899c1

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 (207) hide show
  1. package/dist/chunks/{add-S7U4ZFBS.js → add-JGXB7TKO.js} +1 -1
  2. package/dist/chunks/{add-4BFJ2SAR.js → add-OVCKUCKJ.js} +1 -1
  3. package/dist/chunks/{add-5BQ3RSZQ.js → add-WXYF62BV.js} +1 -1
  4. package/dist/chunks/{alerts-GIT77GJG.js → alerts-XC3HSFNS.js} +1 -1
  5. package/dist/chunks/{build-RQ4ABN6Z.js → build-EOC2F5EB.js} +1 -1
  6. package/dist/chunks/{chunk-R5KBPWWS.js → chunk-237WN2MK.js} +1 -1
  7. package/dist/chunks/{chunk-42RUDD27.js → chunk-2YE7HO7L.js} +1 -1
  8. package/dist/chunks/{chunk-E6VQXHBD.js → chunk-3QTP26QS.js} +1 -1
  9. package/dist/chunks/{chunk-GPVXJI6X.js → chunk-46DSHEHL.js} +1 -1
  10. package/dist/chunks/chunk-4IJ6MNTE.js +27 -0
  11. package/dist/chunks/{chunk-HDKEES7E.js → chunk-4YGSXM2T.js} +6 -6
  12. package/dist/chunks/{chunk-4KHVAEGO.js → chunk-577HHXC7.js} +1 -1
  13. package/dist/chunks/{chunk-B7LM2BNN.js → chunk-62IAZJKT.js} +1 -1
  14. package/dist/chunks/{chunk-V2J5U5KQ.js → chunk-6E6TYIDT.js} +1 -1
  15. package/dist/chunks/{chunk-IZOKMWU5.js → chunk-6SK6TOSJ.js} +1 -1
  16. package/dist/chunks/{chunk-YIKXLWSR.js → chunk-75GXMKCF.js} +1 -1
  17. package/dist/chunks/{chunk-WRTBYD4I.js → chunk-7KWH24QW.js} +1 -1
  18. package/dist/chunks/{chunk-V7VHLSYL.js → chunk-A5JWEPUR.js} +1 -1
  19. package/dist/chunks/{chunk-ZWPASRC2.js → chunk-B6G3V7C7.js} +1 -1
  20. package/dist/chunks/{chunk-WWEUGL6W.js → chunk-BV456GI7.js} +1 -1
  21. package/dist/chunks/{chunk-TL4AEZXF.js → chunk-CVGKZ2YC.js} +1 -1
  22. package/dist/chunks/{chunk-RXHW3T4H.js → chunk-CYEMSHQ4.js} +1 -1
  23. package/dist/chunks/{chunk-N4FZIVIS.js → chunk-CZC5QGI5.js} +1 -1
  24. package/dist/chunks/{chunk-IKVQLMEI.js → chunk-DKDYIUCY.js} +1 -1
  25. package/dist/chunks/{chunk-Y45NZT7C.js → chunk-DWE2A6BG.js} +1 -1
  26. package/dist/chunks/{chunk-6O2LDFGJ.js → chunk-DXFQOBXB.js} +1 -1
  27. package/dist/chunks/{chunk-LA3VRJX7.js → chunk-DXG5ITSX.js} +1 -1
  28. package/dist/chunks/{chunk-MEF5BUJ5.js → chunk-EHA24PIE.js} +1 -1
  29. package/dist/chunks/{chunk-FSM7YM4W.js → chunk-EQQJB7MI.js} +2 -2
  30. package/dist/chunks/{chunk-76XUBFXI.js → chunk-F5HOZBY3.js} +1 -1
  31. package/dist/chunks/{chunk-EGXRQ73P.js → chunk-FA7WAHGX.js} +1 -1
  32. package/dist/chunks/{chunk-XPWLEGWA.js → chunk-FKX3DSV3.js} +1 -1
  33. package/dist/chunks/{chunk-WQBNOQUT.js → chunk-FSKAAYPW.js} +1 -1
  34. package/dist/chunks/{chunk-CRPZYLIL.js → chunk-GTZ6ASHD.js} +1 -1
  35. package/dist/chunks/{chunk-UFE4RBZV.js → chunk-HFX56MAE.js} +1 -1
  36. package/dist/chunks/{chunk-JRUL67UC.js → chunk-HPAGXT6E.js} +2 -2
  37. package/dist/chunks/{chunk-GILTW5RJ.js → chunk-HPXRESOF.js} +1 -1
  38. package/dist/chunks/{chunk-MMMX3KE2.js → chunk-I3QZSYRK.js} +1 -1
  39. package/dist/chunks/{chunk-2TUJJIYU.js → chunk-IGUBYNVC.js} +1 -1
  40. package/dist/chunks/{chunk-EPCRR72R.js → chunk-IZL4EP7R.js} +1 -1
  41. package/dist/chunks/{chunk-FMLRVSWK.js → chunk-JATIYY4H.js} +1 -1
  42. package/dist/chunks/{chunk-KNKGJD5J.js → chunk-JOKL5GT4.js} +1 -1
  43. package/dist/chunks/{chunk-LHK6B4ER.js → chunk-JOV747QS.js} +1 -1
  44. package/dist/chunks/{chunk-KDIICSD5.js → chunk-JW522BFH.js} +1 -1
  45. package/dist/chunks/{chunk-TXROE436.js → chunk-JZIVQAEF.js} +1 -1
  46. package/dist/chunks/{chunk-IKOVY76G.js → chunk-KI2DDO2M.js} +1 -1
  47. package/dist/chunks/{chunk-IMZD7QEB.js → chunk-KW7G66ZY.js} +2 -2
  48. package/dist/chunks/{chunk-Z3Z5GBKO.js → chunk-L52TWK6B.js} +1 -1
  49. package/dist/chunks/{chunk-BCOUDSOR.js → chunk-L6QX3T3V.js} +1 -1
  50. package/dist/chunks/{chunk-Q3R4HAAA.js → chunk-LM3VCTGL.js} +1 -1
  51. package/dist/chunks/chunk-LUK3POIP.js +7 -0
  52. package/dist/chunks/{chunk-3JYREVOI.js → chunk-LYWMEQRT.js} +1 -1
  53. package/dist/chunks/{chunk-XY2GGCHC.js → chunk-MECG6WLF.js} +1 -1
  54. package/dist/chunks/{chunk-ZG7A4P5U.js → chunk-MQAI6NJ5.js} +1 -1
  55. package/dist/chunks/{chunk-AGFG7WHE.js → chunk-MX66ZGZL.js} +1 -1
  56. package/dist/chunks/{chunk-Z62G57GC.js → chunk-NKACWBO3.js} +1 -1
  57. package/dist/chunks/{chunk-WA4CPW3H.js → chunk-NX4KI56H.js} +1 -1
  58. package/dist/chunks/{chunk-2XQO6C7Q.js → chunk-O2CAD56C.js} +1 -1
  59. package/dist/chunks/{chunk-Q4W3R6U2.js → chunk-O45CPVEL.js} +1 -1
  60. package/dist/chunks/{chunk-H43XHICL.js → chunk-O5SIUXE6.js} +1 -1
  61. package/dist/chunks/{chunk-4R7ICESH.js → chunk-OIHLZ4IA.js} +1 -1
  62. package/dist/chunks/chunk-OWO23BQ5.js +7 -0
  63. package/dist/chunks/{chunk-JM7KUCBM.js → chunk-OZLK3WML.js} +1 -1
  64. package/dist/chunks/{chunk-Y3ETQZSK.js → chunk-P5TIDWPF.js} +1 -1
  65. package/dist/chunks/{chunk-JK3NTR7T.js → chunk-P7QYBTLJ.js} +1 -1
  66. package/dist/chunks/{chunk-USCJFJD4.js → chunk-PB6T5FH2.js} +1 -1
  67. package/dist/chunks/{chunk-RJB5Y7M4.js → chunk-PIK7YTVD.js} +1 -1
  68. package/dist/chunks/{chunk-PG5BHJVH.js → chunk-PL2KOT4Q.js} +1 -1
  69. package/dist/chunks/{chunk-XL6PE4AA.js → chunk-Q4B2ICJM.js} +1 -1
  70. package/dist/chunks/{chunk-7EI554V5.js → chunk-QI7BWXRV.js} +1 -1
  71. package/dist/chunks/{chunk-FVMRKUWL.js → chunk-QIVM5MTP.js} +1 -1
  72. package/dist/chunks/{chunk-54W7S4EV.js → chunk-QUE6QJJL.js} +1 -1
  73. package/dist/chunks/{chunk-K4J43D5J.js → chunk-QV2PDKZY.js} +1 -1
  74. package/dist/chunks/{chunk-DRNUHJ6I.js → chunk-R2UVL57S.js} +1 -1
  75. package/dist/chunks/{chunk-YU33PPKX.js → chunk-R5GFF2NL.js} +1 -1
  76. package/dist/chunks/{chunk-Z2NPMUPM.js → chunk-RRRXKACI.js} +1 -1
  77. package/dist/chunks/{chunk-VTAH7VMY.js → chunk-S3HHQBZN.js} +1 -1
  78. package/dist/chunks/{chunk-7CLATJZX.js → chunk-S5IZAQDU.js} +1 -1
  79. package/dist/chunks/{chunk-4HHDAGMC.js → chunk-STMC2M6P.js} +1 -1
  80. package/dist/chunks/{chunk-HT3CQEAF.js → chunk-UGHEH4LA.js} +1 -1
  81. package/dist/chunks/{chunk-MTPHHAPR.js → chunk-UNAQQ5DF.js} +1 -1
  82. package/dist/chunks/{chunk-6KI5LJIB.js → chunk-USTT3CON.js} +1 -1
  83. package/dist/chunks/chunk-VL2DQ4JF.js +7 -0
  84. package/dist/chunks/{chunk-UGVOMXYR.js → chunk-VO5M6G7M.js} +1 -1
  85. package/dist/chunks/chunk-VSWANERN.js +7 -0
  86. package/dist/chunks/{chunk-SWABNAKZ.js → chunk-VSXHIE2L.js} +1 -1
  87. package/dist/chunks/chunk-X24LA5TL.js +13 -0
  88. package/dist/chunks/{chunk-A7XRIU6Z.js → chunk-XBMLLP4J.js} +1 -1
  89. package/dist/chunks/{chunk-PIGJVJNM.js → chunk-Y3VTP4NX.js} +1 -1
  90. package/dist/chunks/{chunk-EDXNAXEZ.js → chunk-YM52B2ZV.js} +1 -1
  91. package/dist/chunks/{chunk-QYAXCGZA.js → chunk-ZD3CDFPZ.js} +1 -1
  92. package/dist/chunks/{chunk-BB27VKHS.js → chunk-ZJNJZSJA.js} +1 -1
  93. package/dist/chunks/{chunk-33ETNP4M.js → chunk-ZNKDVMRD.js} +1 -1
  94. package/dist/chunks/{chunk-HJPZOKEB.js → chunk-ZTTGEYEE.js} +1 -1
  95. package/dist/chunks/{chunk-HAAKXJ4V.js → chunk-ZUCLG4ML.js} +1 -1
  96. package/dist/chunks/{chunk-KDCLHZYL.js → chunk-ZUWIJMH2.js} +1 -1
  97. package/dist/chunks/{clear-PQBUHQMO.js → clear-XM6U2LZG.js} +1 -1
  98. package/dist/chunks/{compile-vercel-config-A2DMFB2R.js → compile-vercel-config-7HTV3XDT.js} +1 -1
  99. package/dist/chunks/{config-6CSTGEZQ.js → config-H7B62N7P.js} +1 -1
  100. package/dist/chunks/{config-QQY3G5PG.js → config-WAYNH5FH.js} +1 -1
  101. package/dist/chunks/config-validator.mjs +1 -1
  102. package/dist/chunks/{connect-git-provider-MPYSAOTH.js → connect-git-provider-JZ6PATUW.js} +1 -1
  103. package/dist/chunks/{delete-CELW3NLN.js → delete-3GLZUBWG.js} +1 -1
  104. package/dist/chunks/{delete-YRATGP5Y.js → delete-HNJEM6SL.js} +1 -1
  105. package/dist/chunks/describe-L7HZBSWX.js +25 -0
  106. package/dist/chunks/{detect-projects-DHS2E3N4.js → detect-projects-FIGBZP42.js} +1 -1
  107. package/dist/chunks/{detect-services-VBKVN4A2.js → detect-services-QQWDDXR4.js} +1 -1
  108. package/dist/chunks/{disable-CG3R2VAL.js → disable-7NRBTCQH.js} +1 -1
  109. package/dist/chunks/{discard-REGFZXFU.js → discard-F7N2DAVD.js} +1 -1
  110. package/dist/chunks/{edit-YAYZEQRX.js → edit-ILM7AU2K.js} +1 -1
  111. package/dist/chunks/{edit-HHLQDVOP.js → edit-WTJMNCAV.js} +1 -1
  112. package/dist/chunks/{enable-BV3N6GEL.js → enable-3QT356KG.js} +1 -1
  113. package/dist/chunks/{export-WUPMMHSX.js → export-EUDVMKNC.js} +1 -1
  114. package/dist/chunks/{future-DJOUGRV4.js → future-VI6GFQ5S.js} +1 -1
  115. package/dist/chunks/{generate-cert-for-deploy-PZHDFX3W.js → generate-cert-for-deploy-B5SEDLVP.js} +1 -1
  116. package/dist/chunks/{group-actions-UOMO2WB2.js → group-actions-RKKQ4N3U.js} +1 -1
  117. package/dist/chunks/{image-DXZ4FKTV.js → image-4LT5EYSE.js} +1 -1
  118. package/dist/chunks/{import-builders-IUEC2WN2.js → import-builders-6RQ33NP7.js} +1 -1
  119. package/dist/chunks/{inspect-TDDHNNQS.js → inspect-4KPVCIE6.js} +1 -1
  120. package/dist/chunks/{inspect-YBEV7TZS.js → inspect-6QOQ34XR.js} +1 -1
  121. package/dist/chunks/{inspect-TAR6RBRU.js → inspect-FK3DKMSD.js} +1 -1
  122. package/dist/chunks/{inspect-YPATSOEP.js → inspect-IFCFRG5Q.js} +1 -1
  123. package/dist/chunks/{inspect-BZKFXH45.js → inspect-O7ACMOY7.js} +1 -1
  124. package/dist/chunks/{inspect-YGVXE4HR.js → inspect-YQHS73JH.js} +1 -1
  125. package/dist/chunks/{list-27R4USBV.js → list-CXRL7UNF.js} +1 -1
  126. package/dist/chunks/{list-6JXV7U6T.js → list-USYKOYNK.js} +1 -1
  127. package/dist/chunks/{list-KJGICUN5.js → list-XP5PWPPV.js} +1 -1
  128. package/dist/chunks/{list-JB32VTAB.js → list-YFYMW3PF.js} +1 -1
  129. package/dist/chunks/{login-NXBKDSGN.js → login-N6NXJVOY.js} +1 -1
  130. package/dist/chunks/{login-YCOZROC2.js → login-WJMEDLYY.js} +1 -1
  131. package/dist/chunks/{logs-W4GZLDHE.js → logs-K224ET3X.js} +1 -1
  132. package/dist/chunks/{ls-TBZHWZVO.js → ls-CZQQSAWN.js} +1 -1
  133. package/dist/chunks/{ls-KSFP2X45.js → ls-D5BBVUGJ.js} +1 -1
  134. package/dist/chunks/{ls-BPD6GAEF.js → ls-DTQQXLRH.js} +1 -1
  135. package/dist/chunks/{ls-A576SCRN.js → ls-IVDRION6.js} +1 -1
  136. package/dist/chunks/{ls-TDYTE4HM.js → ls-N7WA56X3.js} +1 -1
  137. package/dist/chunks/{ls-SSLCXR4A.js → ls-UJYVIGPU.js} +1 -1
  138. package/dist/chunks/{ls-5UEICZHX.js → ls-V5NG5442.js} +1 -1
  139. package/dist/chunks/{migrate-experimental-services-556MHJWK.js → migrate-experimental-services-NVNIIL5I.js} +1 -1
  140. package/dist/chunks/{mutate-IQQTYNNF.js → mutate-F35S2QC7.js} +1 -1
  141. package/dist/chunks/{notifications-BC2UCLDC.js → notifications-VIH6IT6O.js} +1 -1
  142. package/dist/chunks/{open-JS5WAG77.js → open-XCUBKH5P.js} +1 -1
  143. package/dist/chunks/{openapi-S6F32ZQD.js → openapi-GW2NXVYL.js} +1 -1
  144. package/dist/chunks/{permissions-3CD6EL4U.js → permissions-3JSUIIVW.js} +1 -1
  145. package/dist/chunks/{plugin-offer-RZADKNYF.js → plugin-offer-IGID5HXG.js} +1 -1
  146. package/dist/chunks/{prompt-missing-credentials-OSAV5B7N.js → prompt-missing-credentials-6XVEA3P5.js} +1 -1
  147. package/dist/chunks/{publish-ZB2Q2YSB.js → publish-GWDTWIM6.js} +1 -1
  148. package/dist/chunks/{pull-WUFIVXEG.js → pull-4TPB2B5E.js} +1 -1
  149. package/dist/chunks/{purchase-domain-if-available-YVVGT7MZ.js → purchase-domain-if-available-2A5QEP5U.js} +1 -1
  150. package/dist/chunks/{push-TO7G2R7N.js → push-OKQJWOA5.js} +1 -1
  151. package/dist/chunks/{query-EVW5T2PI.js → query-7XT3JVXP.js} +1 -1
  152. package/dist/chunks/{raw-query-7GAKEK2P.js → raw-query-K3NOPCB2.js} +1 -1
  153. package/dist/chunks/{reauthenticate-WQZ5HISG.js → reauthenticate-UNE3JLFT.js} +1 -1
  154. package/dist/chunks/{remove-AAFJR4EN.js → remove-3ZHQO7AX.js} +1 -1
  155. package/dist/chunks/{reorder-QVSTUVEQ.js → reorder-YLJYY5ZS.js} +1 -1
  156. package/dist/chunks/{reply-QSTMHPP5.js → reply-2MPQ4RQW.js} +1 -1
  157. package/dist/chunks/{resolve-MITWQMP7.js → resolve-MKHP5X4E.js} +1 -1
  158. package/dist/chunks/{resolve-agent-team-NQCRA6ER.js → resolve-agent-team-JCV6SHFD.js} +1 -1
  159. package/dist/chunks/{restore-5RLBSVYQ.js → restore-OYFENAAK.js} +1 -1
  160. package/dist/chunks/{rm-6KTCXHBG.js → rm-2QUJ4MTD.js} +1 -1
  161. package/dist/chunks/{rm-M7QVN2N6.js → rm-4YDKARD4.js} +1 -1
  162. package/dist/chunks/{rm-GXDLM3SA.js → rm-63TJ62IW.js} +1 -1
  163. package/dist/chunks/{rm-HXJWSOE4.js → rm-HBL4R7OM.js} +1 -1
  164. package/dist/chunks/{rm-P6AGSBXP.js → rm-VKTDKTBV.js} +1 -1
  165. package/dist/chunks/{rule-inspect-D3BVZZRN.js → rule-inspect-ZD4EP6N4.js} +1 -1
  166. package/dist/chunks/{schema-AJAHECZG.js → schema-6FBKE5HK.js} +1 -1
  167. package/dist/chunks/{schema-T5BO3RBL.js → schema-XS3JIJUY.js} +1 -1
  168. package/dist/chunks/{select-org-JBKKKZSN.js → select-org-33F2CJEO.js} +1 -1
  169. package/dist/chunks/{set-774P7GEL.js → set-D5IT5H2E.js} +1 -1
  170. package/dist/chunks/{set-OWNTI5SM.js → set-ZSJYTLHB.js} +1 -1
  171. package/dist/chunks/{setup-and-link-3LD4LQGE.js → setup-and-link-JACRSC6H.js} +1 -1
  172. package/dist/chunks/{skills-W45E2EWS.js → skills-VLGGLIV3.js} +1 -1
  173. package/dist/chunks/{tags-KBCTII3M.js → tags-IYGDEHIO.js} +1 -1
  174. package/dist/chunks/{types-SYUZH46V.js → types-Z5UQ5OMJ.js} +1 -1
  175. package/dist/chunks/{update-FZESOZEW.js → update-GBXFXO7R.js} +1 -1
  176. package/dist/chunks/{usage-NF6S3DAZ.js → usage-P3LBOYE7.js} +1 -1
  177. package/dist/chunks/{validate-config-MJQI5EMD.js → validate-config-CKVP2P4B.js} +1 -1
  178. package/dist/chunks/{views-YXAMSKLM.js → views-HCN2WBW7.js} +1 -1
  179. package/dist/commands/build/index.js +1 -1
  180. package/dist/commands/deploy/index.js +5 -5
  181. package/dist/commands/dev/index.js +2 -2
  182. package/dist/commands/env/index.js +1 -1
  183. package/dist/commands/link/index.js +1 -1
  184. package/dist/commands/list/index.js +4 -4
  185. package/dist/commands/project/index.js +1 -1
  186. package/dist/commands/tunnel/index.js +1 -1
  187. package/dist/commands-account.js +2 -2
  188. package/dist/commands-ai.js +98 -98
  189. package/dist/commands-blob.js +1 -1
  190. package/dist/commands-core.js +30 -24
  191. package/dist/commands-deployments.js +1 -1
  192. package/dist/commands-flags.js +7 -7
  193. package/dist/commands-integrations.js +69 -56
  194. package/dist/commands-observability.js +8 -8
  195. package/dist/commands-routing.js +5 -7
  196. package/dist/index.js +4 -4
  197. package/dist/internal-build.js +1 -1
  198. package/dist/package.json +40 -40
  199. package/dist/version.mjs +1 -1
  200. package/package.json +42 -42
  201. package/dist/chunks/chunk-ECQW2R5M.js +0 -7
  202. package/dist/chunks/chunk-JJTAADC5.js +0 -7
  203. package/dist/chunks/chunk-NFBFXM6X.js +0 -7
  204. package/dist/chunks/chunk-R6LM3MBK.js +0 -13
  205. package/dist/chunks/chunk-RBM4KOQ2.js +0 -27
  206. package/dist/chunks/chunk-ZSJU5MJP.js +0 -7
  207. package/dist/chunks/describe-Q5D5GYVG.js +0 -25
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{getCommandName}from"./chunk-EFGZK6OY.js";import{require_build_utils}from"./chunk-BVFFSUG3.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__commonJS,__toESM}from"./chunk-NBPLUP7C.js";var require_bytes=__commonJS({"../../node_modules/.pnpm/bytes@3.0.0/node_modules/bytes/index.js"(exports,module){"use strict";module.exports=bytes2;module.exports.format=format;module.exports.parse=parse;var formatThousandsRegExp=/\B(?=(\d{3})+(?!\d))/g,formatDecimalsRegExp=/(?:\.0*|(\.[^0]+)0+)$/,map={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:(1<<30)*1024},parseRegExp=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;function bytes2(value,options){return typeof value=="string"?parse(value):typeof value=="number"?format(value,options):null}function format(value,options){if(!Number.isFinite(value))return null;var mag=Math.abs(value),thousandsSeparator=options&&options.thousandsSeparator||"",unitSeparator=options&&options.unitSeparator||"",decimalPlaces=options&&options.decimalPlaces!==void 0?options.decimalPlaces:2,fixedDecimals=!!(options&&options.fixedDecimals),unit=options&&options.unit||"";(!unit||!map[unit.toLowerCase()])&&(mag>=map.tb?unit="TB":mag>=map.gb?unit="GB":mag>=map.mb?unit="MB":mag>=map.kb?unit="KB":unit="B");var val=value/map[unit.toLowerCase()],str=val.toFixed(decimalPlaces);return fixedDecimals||(str=str.replace(formatDecimalsRegExp,"$1")),thousandsSeparator&&(str=str.replace(formatThousandsRegExp,thousandsSeparator)),str+unitSeparator+unit}function parse(val){if(typeof val=="number"&&!isNaN(val))return val;if(typeof val!="string")return null;var results=parseRegExp.exec(val),floatValue,unit="b";return results?(floatValue=parseFloat(results[1]),unit=results[4].toLowerCase()):(floatValue=parseInt(val,10),unit="b"),Math.floor(map[unit]*floatValue)}}});import{homedir}from"os";import{resolve}from"path";function humanizePath(path){let resolved=resolve(path),_homedir=homedir();return resolved.indexOf(_homedir)===0?`~${resolved.slice(_homedir.length)}`:resolved}var NowError=class extends Error{constructor({code:code2,message,meta}){super(message);this.code=code2,this.meta=meta}};var import_chalk=__toESM(require_source(),1);function code(cmd,{backticks=!0}={}){let tick=backticks?import_chalk.default.gray("`"):"";return`${tick}${import_chalk.default.bold(cmd)}${tick}`}var import_bytes=__toESM(require_bytes(),1),import_build_utils=__toESM(require_build_utils(),1);var import_chalk2=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1),APIError=class extends Error{constructor(message,response,body){super();if(this.message=`${message} (${response.status})`,this.status=response.status,this.serverMessage=message,this.wwwAuthenticate=response.headers.get("WWW-Authenticate")??void 0,body)for(let field of Object.keys(body))field!=="message"&&(this[field]=body[field]);if(response.status===429||response.status===503){let parsed=parseRetryAfterHeaderAsMillis(response.headers.get("Retry-After"));this.retryAfterMs=parsed??(response.status===429?0:void 0)}}};function parseRetryAfterHeaderAsMillis(header){if(!header)return;let retryAfterMs=Number(header)*1e3;if(Number.isNaN(retryAfterMs)){if(retryAfterMs=Date.parse(header),Number.isNaN(retryAfterMs))return;retryAfterMs=retryAfterMs-Date.now()}return Math.max(retryAfterMs,0)}function isAPIError(v){return(0,import_error_utils.isError)(v)&&"status"in v}var TeamDeleted=class extends NowError{constructor(){super({code:"TEAM_DELETED",message:`Your team was deleted or you were removed from the team. You can switch to a different one using ${getCommandName("switch")}.`,meta:{}})}},InvalidToken=class extends NowError{constructor(tokenSource){let message;tokenSource==="flag"?message="The token provided via the `--token` option is not valid. Please provide a valid token.":tokenSource==="env"?message="The token provided via VERCEL_TOKEN environment variable is not valid. Please provide a valid token.":message=`The specified token is not valid. Use ${getCommandName("login")} to generate a new token.`,super({code:"NOT_AUTHORIZED",message,meta:{}})}},MissingUser=class extends NowError{constructor(){super({code:"MISSING_USER",message:"Not able to load user, missing from response",meta:{}})}},DomainAlreadyExists=class extends NowError{constructor(domain){super({code:"DOMAIN_ALREADY_EXISTS",meta:{domain},message:`The domain ${domain} already exists under a different context.`})}},DomainPermissionDenied=class extends NowError{constructor(domain,context){super({code:"DOMAIN_PERMISSION_DENIED",meta:{domain,context},message:`You don't have access to the domain ${domain} under ${context}.`})}},DomainExternal=class extends NowError{constructor(domain){super({code:"DOMAIN_EXTERNAL",meta:{domain},message:`The domain ${domain} must point to zeit.world.`})}},SourceNotFound=class extends NowError{constructor(){super({code:"SOURCE_NOT_FOUND",meta:{},message:"Not able to purchase. Please add a payment method using the dashboard."})}};var DomainNotFound=class extends NowError{constructor(domain,contextName){super({code:"DOMAIN_NOT_FOUND",meta:{domain},message:`Domain not found by "${domain}"${contextName?` under ${import_chalk2.default.bold(contextName)}`:""}.`})}},DomainNotVerified=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_VERIFIED",meta:{domain},message:`The domain ${domain} is not verified.`})}},DomainVerificationFailed=class extends NowError{constructor({domain,nsVerification,txtVerification,purchased=!1}){super({code:"DOMAIN_VERIFICATION_FAILED",meta:{domain,nsVerification,txtVerification,purchased},message:`We can't verify the domain ${domain}. Both Name Servers and DNS TXT verifications failed.`})}},InvalidDomain=class extends NowError{constructor(domain,message){super({code:"INVALID_DOMAIN",meta:{domain},message:message||`The domain ${domain} is not valid.`})}},NotDomainOwner=class extends NowError{constructor(message){super({code:"NOT_DOMAIN_OWNER",meta:{},message})}},InvalidDeploymentId=class extends NowError{constructor(id,message){super({code:"INVALID_DEPLOYMENT_ID",meta:{id},message:message||`The deployment id "${id}" is not valid.`})}},UnsupportedTLD=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD",meta:{domain},message:`The TLD for domain name ${domain} is not supported.`})}},TLDNotSupportedViaCLI=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD_VIA_CLI",meta:{domain},message:`Purchases for the TLD of ${domain} are not supported via the CLI. Use the REST API or the dashboard to buy it.`})}},DomainNotAvailable=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_AVAILABLE",meta:{domain},message:`The domain ${domain} is not available to be purchased.`})}};var UnexpectedDomainPurchaseError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_PURCHASE_ERROR",meta:{domain},message:`The order for ${domain} failed.`})}},UnexpectedDomainTransferError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_TRANSFER_ERROR",meta:{domain},message:"An unexpected error happened while transferring."})}},DomainPaymentError=class extends NowError{constructor(){super({code:"DOMAIN_PAYMENT_ERROR",meta:{},message:"Your card was declined. Nothing was charged."})}},DomainPaymentAuthenticationRequired=class extends NowError{constructor(domain,teamSlug){let url=`https://vercel.com/domains/search?${new URLSearchParams({q:domain,...teamSlug&&{teamSlug}})}`;super({code:"DOMAIN_PAYMENT_AUTHENTICATION_REQUIRED",meta:{domain,url},message:`Your bank requires 3-D Secure verification, which can't be completed from the CLI. Nothing was charged. Buy ${domain} in your browser instead: ${url}`})}},DomainChargeOutcomeUnknown=class extends NowError{constructor(domain,verb,orderId){super({code:"DOMAIN_CHARGE_OUTCOME_UNKNOWN",meta:{domain,verb,...orderId&&{orderId}},message:`Can't confirm whether ${domain} was ${verb==="buy"?"bought":"renewed"}.${orderId?` Order ${orderId} finished without confirming ${domain}.`:""} Run ${getCommandName(`domains inspect ${domain}`)} before trying again, or you may be charged twice.`})}},DomainOrderPending=class extends NowError{constructor(domain,orderId,checkCommand){super({code:"DOMAIN_ORDER_PENDING",meta:{domain,orderId},message:`Order ${orderId} for ${domain} is still processing, so the domain can't be used yet. Check the order with ${checkCommand} instead of buying again, or you may be charged twice.`})}},DomainPurchaseInProgress=class extends NowError{constructor(domain,orderId,checkCommand){super({code:"DOMAIN_PURCHASE_IN_PROGRESS",meta:{domain,...orderId&&{orderId}},message:`Can't buy ${domain}: another purchase of it${orderId?` (order ${orderId})`:""} is still in progress, with different details. This run sent no new order. ${checkCommand?`Check that order with ${checkCommand}`:`Run ${getCommandName(`domains inspect ${domain}`)}`} instead of buying again, or you may be charged twice.`})}},DomainPurchaseRefunded=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_REFUNDED",meta:{domain},message:`The purchase of ${domain} failed, and the charge was refunded.`})}},DomainPurchaseRefundFailed=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_REFUND_FAILED",meta:{domain},message:`The purchase of ${domain} failed, and refunding the charge also failed. Contact Vercel support about the charge.`})}},DomainPriceChanged=class extends NowError{constructor(domain){super({code:"DOMAIN_PRICE_CHANGED",meta:{domain},message:`The price of ${domain} changed. Nothing was charged.`})}},DomainPurchasePending=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_PENDING",meta:{domain},message:`The domain purchase for ${domain} is pending.`})}},UserAborted=class extends NowError{constructor(){super({code:"USER_ABORTED",meta:{},message:"The user canceled the operation."})}},CertNotFound=class extends NowError{constructor(id){super({code:"CERT_NOT_FOUND",meta:{id},message:`The cert ${id} can't be found.`})}},CertsPermissionDenied=class extends NowError{constructor(context,domain){super({code:"CERTS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to ${domain}'s certs under ${context}.`})}},CertOrderNotFound=class extends NowError{constructor(cns){super({code:"CERT_ORDER_NOT_FOUND",meta:{cns},message:`No cert order could be found for cns ${cns.join(" ,")}`})}},TooManyRequests=class extends NowError{constructor(api,retryAfterMs){super({code:"TOO_MANY_REQUESTS",meta:{api,retryAfterMs},message:"Rate limited. Too many requests to the same endpoint."})}},CertError=class extends NowError{constructor({cns,code:code2,message,helpUrl}){super({code:"CERT_ERROR",meta:{cns,code:code2,helpUrl},message})}},CertConfigurationError=class extends NowError{constructor({cns,message,external,type,helpUrl}){super({code:"CERT_CONFIGURATION_ERROR",meta:{cns,helpUrl,external,type},message})}},DeploymentNotFound=class extends NowError{constructor({context,id=""}){super({code:"DEPLOYMENT_NOT_FOUND",meta:{id,context},message:`Can't find the deployment "${id}" under the context "${context}"`})}},DeploymentNotReady=class extends NowError{constructor({url=""}){super({code:"DEPLOYMENT_NOT_READY",meta:{url},message:`The deployment https://${url} is not ready.`})}},DeploymentFailedAliasImpossible=class extends NowError{constructor(){super({code:"DEPLOYMENT_FAILED_ALIAS_IMPOSSIBLE",meta:{},message:"The deployment build has failed and cannot be aliased"})}},DeploymentPermissionDenied=class extends NowError{constructor(id,context){super({code:"DEPLOYMENT_PERMISSION_DENIED",meta:{id,context},message:`You don't have access to the deployment ${id} under ${context}.`})}},InvalidAlias=class extends NowError{constructor(alias){super({code:"INVALID_ALIAS",meta:{alias},message:`The given alias ${alias} is not valid`})}},AliasInUse=class extends NowError{constructor(alias){super({code:"ALIAS_IN_USE",meta:{alias},message:"The alias is already in use"})}},CertMissing=class extends NowError{constructor(domain){super({code:"CERT_MISSING",meta:{domain},message:`The certificate for domain ${domain} is missing`})}},CantParseJSONFile=class extends NowError{constructor(file,parseErrorLocation){let message=`Can't parse json file ${file}: ${parseErrorLocation}`;super({code:"CANT_PARSE_JSON_FILE",meta:{file,parseErrorLocation},message})}},ConflictingConfigFiles=class extends import_build_utils.NowBuildError{constructor(files,message,link){super({code:"CONFLICTING_CONFIG_FILES",message:message||"Multiple config files found. Please use only one configuration file.",link:link||"https://vercel.link/combining-old-and-new-config"});this.files=files}},DeprecatedNowJson=class extends import_build_utils.NowBuildError{constructor(_file){super({code:"DEPRECATED_NOW_JSON",message:"The `now.json` file is deprecated and no longer supported. Please rename it to `vercel.json`.",link:"https://vercel.com/docs/projects/project-configuration"})}},CantFindConfig=class extends NowError{constructor(paths){super({code:"CANT_FIND_CONFIG",meta:{paths},message:"Can't find a configuration file in the given locations."})}},WorkingDirectoryDoesNotExist=class extends NowError{constructor(){super({code:"CWD_DOES_NOT_EXIST",meta:{},message:"The current working directory does not exist."})}};var UNSAFE_WRITE_PATH_STATES={symlink:"a symbolic link",not_directory:"not a directory",not_regular_file:"not a regular file"},UnsafeWritePathError=class extends NowError{constructor(destination,path,problem){let subject=path===destination?"It's":`${humanizePath(path)} is`;super({code:"UNSAFE_WRITE_PATH",meta:{destination,path,problem},message:`Can't write ${humanizePath(destination)}. ${subject} ${UNSAFE_WRITE_PATH_STATES[problem]}.`})}},EnvFileSymlinkError=class extends NowError{constructor(file,path,kind="file"){super({code:"ENV_FILE_SYMLINK",meta:{file,path,kind},message:kind==="file"?`Can't write ${file}. It's a symbolic link.`:`Can't write ${file}. A directory in its path is a symbolic link.`})}},NoAliasInConfig=class extends NowError{constructor(){super({code:"NO_ALIAS_IN_CONFIG",meta:{},message:"There is no alias set up in config file."})}},InvalidAliasInConfig=class extends NowError{constructor(value){super({code:"INVALID_ALIAS_IN_CONFIG",meta:{value},message:"Invalid alias option in configuration."})}};var DNSPermissionDenied=class extends NowError{constructor(domain){super({code:"DNS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to the DNS records of ${domain}.`})}},DNSInvalidPort=class extends NowError{constructor(){super({code:"DNS_INVALID_PORT",meta:{},message:"Invalid <port> parameter. A number was expected"})}},DNSInvalidType=class extends NowError{constructor(type){super({code:"DNS_INVALID_TYPE",meta:{type},message:`Invalid <type> parameter "${type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT`})}},DNSConflictingRecord=class extends NowError{constructor(record){super({code:"DNS_CONFLICTING_RECORD",meta:{record},message:` A conflicting record exists "${record}".`})}},DomainRemovalConflict=class extends NowError{constructor({aliases,certs,message,pendingAsyncPurchase,resolvable,suffix,transferring}){super({code:"domain_removal_conflict",meta:{aliases,certs,pendingAsyncPurchase,suffix,transferring,resolvable},message})}},DomainMoveConflict=class extends NowError{constructor({message,pendingAsyncPurchase,resolvable,suffix}){super({code:"domain_move_conflict",meta:{pendingAsyncPurchase,resolvable,suffix},message})}};var InvalidMoveDestination=class extends NowError{constructor(destination){super({code:"INVALID_MOVE_DESTINATION",message:`Invalid move destination "${destination}"`,meta:{destination}})}};var LambdaSizeExceededError=class extends NowError{constructor(size,maxLambdaSize){super({code:"MAX_LAMBDA_SIZE_EXCEEDED",message:`The lambda function size (${(0,import_bytes.default)(size).toLowerCase()}) exceeds the maximum size limit (${(0,import_bytes.default)(maxLambdaSize).toLowerCase()}).`,meta:{size,maxLambdaSize}})}},MissingDotenvVarsError=class extends NowError{constructor(type,missing){let message;missing.length===1?message=`Env var ${JSON.stringify(missing[0])} is not defined in ${code(type)} file`:message=[`The following env vars are not defined in ${code(type)} file:`,...missing.map(name=>` - ${JSON.stringify(name)}`)].join(`
7
+ import{getCommandName}from"./chunk-EFGZK6OY.js";import{require_build_utils}from"./chunk-BVFFSUG3.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__commonJS,__toESM}from"./chunk-NBPLUP7C.js";var require_bytes=__commonJS({"../../node_modules/.pnpm/bytes@3.0.0/node_modules/bytes/index.js"(exports,module){"use strict";module.exports=bytes2;module.exports.format=format;module.exports.parse=parse;var formatThousandsRegExp=/\B(?=(\d{3})+(?!\d))/g,formatDecimalsRegExp=/(?:\.0*|(\.[^0]+)0+)$/,map={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:(1<<30)*1024},parseRegExp=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;function bytes2(value,options){return typeof value=="string"?parse(value):typeof value=="number"?format(value,options):null}function format(value,options){if(!Number.isFinite(value))return null;var mag=Math.abs(value),thousandsSeparator=options&&options.thousandsSeparator||"",unitSeparator=options&&options.unitSeparator||"",decimalPlaces=options&&options.decimalPlaces!==void 0?options.decimalPlaces:2,fixedDecimals=!!(options&&options.fixedDecimals),unit=options&&options.unit||"";(!unit||!map[unit.toLowerCase()])&&(mag>=map.tb?unit="TB":mag>=map.gb?unit="GB":mag>=map.mb?unit="MB":mag>=map.kb?unit="KB":unit="B");var val=value/map[unit.toLowerCase()],str=val.toFixed(decimalPlaces);return fixedDecimals||(str=str.replace(formatDecimalsRegExp,"$1")),thousandsSeparator&&(str=str.replace(formatThousandsRegExp,thousandsSeparator)),str+unitSeparator+unit}function parse(val){if(typeof val=="number"&&!isNaN(val))return val;if(typeof val!="string")return null;var results=parseRegExp.exec(val),floatValue,unit="b";return results?(floatValue=parseFloat(results[1]),unit=results[4].toLowerCase()):(floatValue=parseInt(val,10),unit="b"),Math.floor(map[unit]*floatValue)}}});import{homedir}from"os";import{resolve}from"path";function humanizePath(path){let resolved=resolve(path),_homedir=homedir();return resolved.indexOf(_homedir)===0?`~${resolved.slice(_homedir.length)}`:resolved}var NowError=class extends Error{constructor({code:code2,message,meta}){super(message);this.code=code2,this.meta=meta}};var import_chalk=__toESM(require_source(),1);function code(cmd,{backticks=!0}={}){let tick=backticks?import_chalk.default.gray("`"):"";return`${tick}${import_chalk.default.bold(cmd)}${tick}`}var import_bytes=__toESM(require_bytes(),1),import_build_utils=__toESM(require_build_utils(),1);var import_chalk2=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1),APIError=class extends Error{constructor(message,response,body){super();if(this.message=`${message} (${response.status})`,this.status=response.status,this.serverMessage=message,this.wwwAuthenticate=response.headers.get("WWW-Authenticate")??void 0,body)for(let field of Object.keys(body))field!=="message"&&(this[field]=body[field]);if(response.status===429||response.status===503){let parsed=parseRetryAfterHeaderAsMillis(response.headers.get("Retry-After"));this.retryAfterMs=parsed??(response.status===429?0:void 0)}}};function parseRetryAfterHeaderAsMillis(header){if(!header)return;let retryAfterMs=Number(header)*1e3;if(Number.isNaN(retryAfterMs)){if(retryAfterMs=Date.parse(header),Number.isNaN(retryAfterMs))return;retryAfterMs=retryAfterMs-Date.now()}return Math.max(retryAfterMs,0)}function isAPIError(v){return(0,import_error_utils.isError)(v)&&"status"in v}var TeamDeleted=class extends NowError{constructor(){super({code:"TEAM_DELETED",message:`Your team was deleted or you were removed from the team. You can switch to a different one using ${getCommandName("switch")}.`,meta:{}})}},InvalidToken=class extends NowError{constructor(tokenSource){let message;tokenSource==="flag"?message="The token provided via the `--token` option is not valid. Please provide a valid token.":tokenSource==="env"?message="The token provided via VERCEL_TOKEN environment variable is not valid. Please provide a valid token.":message=`The specified token is not valid. Use ${getCommandName("login")} to generate a new token.`,super({code:"NOT_AUTHORIZED",message,meta:{}})}},MissingUser=class extends NowError{constructor(){super({code:"MISSING_USER",message:"Not able to load user, missing from response",meta:{}})}},DomainAlreadyExists=class extends NowError{constructor(domain){super({code:"DOMAIN_ALREADY_EXISTS",meta:{domain},message:`The domain ${domain} already exists under a different context.`})}},DomainPermissionDenied=class extends NowError{constructor(domain,context){super({code:"DOMAIN_PERMISSION_DENIED",meta:{domain,context},message:`You don't have access to the domain ${domain} under ${context}.`})}},DomainExternal=class extends NowError{constructor(domain){super({code:"DOMAIN_EXTERNAL",meta:{domain},message:`The domain ${domain} must point to zeit.world.`})}},SourceNotFound=class extends NowError{constructor(){super({code:"SOURCE_NOT_FOUND",meta:{},message:"Not able to purchase. Please add a payment method using the dashboard."})}};var DomainNotFound=class extends NowError{constructor(domain,contextName){super({code:"DOMAIN_NOT_FOUND",meta:{domain},message:`Domain not found by "${domain}"${contextName?` under ${import_chalk2.default.bold(contextName)}`:""}.`})}},DomainNotVerified=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_VERIFIED",meta:{domain},message:`The domain ${domain} is not verified.`})}},DomainVerificationFailed=class extends NowError{constructor({domain,nsVerification,txtVerification,purchased=!1}){super({code:"DOMAIN_VERIFICATION_FAILED",meta:{domain,nsVerification,txtVerification,purchased},message:`We can't verify the domain ${domain}. Both Name Servers and DNS TXT verifications failed.`})}},InvalidDomain=class extends NowError{constructor(domain,message){super({code:"INVALID_DOMAIN",meta:{domain},message:message||`The domain ${domain} is not valid.`})}},NotDomainOwner=class extends NowError{constructor(message){super({code:"NOT_DOMAIN_OWNER",meta:{},message})}},InvalidDeploymentId=class extends NowError{constructor(id,message){super({code:"INVALID_DEPLOYMENT_ID",meta:{id},message:message||`The deployment id "${id}" is not valid.`})}},UnsupportedTLD=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD",meta:{domain},message:`The TLD for domain name ${domain} is not supported.`})}},TLDNotSupportedViaCLI=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD_VIA_CLI",meta:{domain},message:`Purchases for the TLD of ${domain} are not supported via the CLI. Use the REST API or the dashboard to buy it.`})}},DomainNotAvailable=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_AVAILABLE",meta:{domain},message:`The domain ${domain} is not available to be purchased.`})}};var UnexpectedDomainPurchaseError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_PURCHASE_ERROR",meta:{domain},message:`The order for ${domain} failed.`})}},UnexpectedDomainTransferError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_TRANSFER_ERROR",meta:{domain},message:"An unexpected error happened while transferring."})}},DomainPaymentError=class extends NowError{constructor(){super({code:"DOMAIN_PAYMENT_ERROR",meta:{},message:"Your card was declined. Nothing was charged."})}},DomainPaymentAuthenticationRequired=class extends NowError{constructor(domain,teamSlug){let url=`https://vercel.com/domains/search?${new URLSearchParams({q:domain,...teamSlug&&{teamSlug}})}`;super({code:"DOMAIN_PAYMENT_AUTHENTICATION_REQUIRED",meta:{domain,url},message:`Your bank requires 3-D Secure verification, which can't be completed from the CLI. Nothing was charged. Buy ${domain} in your browser instead: ${url}`})}},DomainChargeOutcomeUnknown=class extends NowError{constructor(domain,verb,cause,orderId){super({code:"DOMAIN_CHARGE_OUTCOME_UNKNOWN",meta:{domain,verb,cause,...orderId&&{orderId}},message:`Can't confirm whether ${domain} was ${verb==="buy"?"bought":"renewed"}.${orderId?` Order ${orderId} finished without confirming ${domain}.`:""} Run ${getCommandName(`domains inspect ${domain}`)} before trying again, or you may be charged twice.`})}},DomainOrderPending=class extends NowError{constructor(domain,orderId,checkCommand){super({code:"DOMAIN_ORDER_PENDING",meta:{domain,orderId},message:`Order ${orderId} for ${domain} is still processing, so the domain can't be used yet. Check the order with ${checkCommand} instead of buying again, or you may be charged twice.`})}},DomainPurchaseInProgress=class extends NowError{constructor(domain,orderId,checkCommand){super({code:"DOMAIN_PURCHASE_IN_PROGRESS",meta:{domain,...orderId&&{orderId}},message:`Can't buy ${domain}: another purchase of it${orderId?` (order ${orderId})`:""} is still in progress, with different details. This run sent no new order. ${checkCommand?`Check that order with ${checkCommand}`:`Run ${getCommandName(`domains inspect ${domain}`)}`} instead of buying again, or you may be charged twice.`})}},DomainPurchaseRefunded=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_REFUNDED",meta:{domain},message:`The purchase of ${domain} failed, and the charge was refunded.`})}},DomainPurchaseRefundFailed=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_REFUND_FAILED",meta:{domain},message:`The purchase of ${domain} failed, and refunding the charge also failed. Contact Vercel support about the charge.`})}},DomainPriceChanged=class extends NowError{constructor(domain){super({code:"DOMAIN_PRICE_CHANGED",meta:{domain},message:`The price of ${domain} changed. Nothing was charged.`})}},DomainPurchasePending=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_PENDING",meta:{domain},message:`The domain purchase for ${domain} is pending.`})}},UserAborted=class extends NowError{constructor(){super({code:"USER_ABORTED",meta:{},message:"The user canceled the operation."})}},CertNotFound=class extends NowError{constructor(id){super({code:"CERT_NOT_FOUND",meta:{id},message:`The cert ${id} can't be found.`})}},CertsPermissionDenied=class extends NowError{constructor(context,domain){super({code:"CERTS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to ${domain}'s certs under ${context}.`})}},CertOrderNotFound=class extends NowError{constructor(cns){super({code:"CERT_ORDER_NOT_FOUND",meta:{cns},message:`No cert order could be found for cns ${cns.join(" ,")}`})}},TooManyRequests=class extends NowError{constructor(api,retryAfterMs){super({code:"TOO_MANY_REQUESTS",meta:{api,retryAfterMs},message:"Rate limited. Too many requests to the same endpoint."})}},CertError=class extends NowError{constructor({cns,code:code2,message,helpUrl}){super({code:"CERT_ERROR",meta:{cns,code:code2,helpUrl},message})}},CertConfigurationError=class extends NowError{constructor({cns,message,external,type,helpUrl}){super({code:"CERT_CONFIGURATION_ERROR",meta:{cns,helpUrl,external,type},message})}},DeploymentNotFound=class extends NowError{constructor({context,id=""}){super({code:"DEPLOYMENT_NOT_FOUND",meta:{id,context},message:`Can't find the deployment "${id}" under the context "${context}"`})}},DeploymentNotReady=class extends NowError{constructor({url=""}){super({code:"DEPLOYMENT_NOT_READY",meta:{url},message:`The deployment https://${url} is not ready.`})}},DeploymentFailedAliasImpossible=class extends NowError{constructor(){super({code:"DEPLOYMENT_FAILED_ALIAS_IMPOSSIBLE",meta:{},message:"The deployment build has failed and cannot be aliased"})}},DeploymentPermissionDenied=class extends NowError{constructor(id,context){super({code:"DEPLOYMENT_PERMISSION_DENIED",meta:{id,context},message:`You don't have access to the deployment ${id} under ${context}.`})}},InvalidAlias=class extends NowError{constructor(alias){super({code:"INVALID_ALIAS",meta:{alias},message:`The given alias ${alias} is not valid`})}},AliasInUse=class extends NowError{constructor(alias){super({code:"ALIAS_IN_USE",meta:{alias},message:"The alias is already in use"})}},CertMissing=class extends NowError{constructor(domain){super({code:"CERT_MISSING",meta:{domain},message:`The certificate for domain ${domain} is missing`})}},CantParseJSONFile=class extends NowError{constructor(file,parseErrorLocation){let message=`Can't parse json file ${file}: ${parseErrorLocation}`;super({code:"CANT_PARSE_JSON_FILE",meta:{file,parseErrorLocation},message})}},ConflictingConfigFiles=class extends import_build_utils.NowBuildError{constructor(files,message,link){super({code:"CONFLICTING_CONFIG_FILES",message:message||"Multiple config files found. Please use only one configuration file.",link:link||"https://vercel.link/combining-old-and-new-config"});this.files=files}},DeprecatedNowJson=class extends import_build_utils.NowBuildError{constructor(_file){super({code:"DEPRECATED_NOW_JSON",message:"The `now.json` file is deprecated and no longer supported. Please rename it to `vercel.json`.",link:"https://vercel.com/docs/projects/project-configuration"})}},CantFindConfig=class extends NowError{constructor(paths){super({code:"CANT_FIND_CONFIG",meta:{paths},message:"Can't find a configuration file in the given locations."})}},WorkingDirectoryDoesNotExist=class extends NowError{constructor(){super({code:"CWD_DOES_NOT_EXIST",meta:{},message:"The current working directory does not exist."})}};var UNSAFE_WRITE_PATH_STATES={symlink:"a symbolic link",not_directory:"not a directory",not_regular_file:"not a regular file"},UnsafeWritePathError=class extends NowError{constructor(destination,path,problem){let subject=path===destination?"It's":`${humanizePath(path)} is`;super({code:"UNSAFE_WRITE_PATH",meta:{destination,path,problem},message:`Can't write ${humanizePath(destination)}. ${subject} ${UNSAFE_WRITE_PATH_STATES[problem]}.`})}},EnvFileSymlinkError=class extends NowError{constructor(file,path,kind="file"){super({code:"ENV_FILE_SYMLINK",meta:{file,path,kind},message:kind==="file"?`Can't write ${file}. It's a symbolic link.`:`Can't write ${file}. A directory in its path is a symbolic link.`})}},NoAliasInConfig=class extends NowError{constructor(){super({code:"NO_ALIAS_IN_CONFIG",meta:{},message:"There is no alias set up in config file."})}},InvalidAliasInConfig=class extends NowError{constructor(value){super({code:"INVALID_ALIAS_IN_CONFIG",meta:{value},message:"Invalid alias option in configuration."})}};var DNSPermissionDenied=class extends NowError{constructor(domain){super({code:"DNS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to the DNS records of ${domain}.`})}},DNSInvalidPort=class extends NowError{constructor(){super({code:"DNS_INVALID_PORT",meta:{},message:"Invalid <port> parameter. A number was expected"})}},DNSInvalidType=class extends NowError{constructor(type){super({code:"DNS_INVALID_TYPE",meta:{type},message:`Invalid <type> parameter "${type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT`})}},DNSConflictingRecord=class extends NowError{constructor(record){super({code:"DNS_CONFLICTING_RECORD",meta:{record},message:` A conflicting record exists "${record}".`})}},DomainRemovalConflict=class extends NowError{constructor({aliases,certs,message,pendingAsyncPurchase,resolvable,suffix,transferring}){super({code:"domain_removal_conflict",meta:{aliases,certs,pendingAsyncPurchase,suffix,transferring,resolvable},message})}},DomainMoveConflict=class extends NowError{constructor({message,pendingAsyncPurchase,resolvable,suffix}){super({code:"domain_move_conflict",meta:{pendingAsyncPurchase,resolvable,suffix},message})}};var InvalidMoveDestination=class extends NowError{constructor(destination){super({code:"INVALID_MOVE_DESTINATION",message:`Invalid move destination "${destination}"`,meta:{destination}})}};var LambdaSizeExceededError=class extends NowError{constructor(size,maxLambdaSize){super({code:"MAX_LAMBDA_SIZE_EXCEEDED",message:`The lambda function size (${(0,import_bytes.default)(size).toLowerCase()}) exceeds the maximum size limit (${(0,import_bytes.default)(maxLambdaSize).toLowerCase()}).`,meta:{size,maxLambdaSize}})}},MissingDotenvVarsError=class extends NowError{constructor(type,missing){let message;missing.length===1?message=`Env var ${JSON.stringify(missing[0])} is not defined in ${code(type)} file`:message=[`The following env vars are not defined in ${code(type)} file:`,...missing.map(name=>` - ${JSON.stringify(name)}`)].join(`
8
8
  `),message+=`
9
9
  Read more: https://err.sh/vercel/missing-env-file`,super({code:"MISSING_DOTENV_VARS",message,meta:{type,missing}})}},DeploymentsRateLimited=class extends NowError{constructor(message){super({code:"DEPLOYMENTS_RATE_LIMITED",meta:{},message})}},BuildsRateLimited=class extends NowError{constructor(message,meta={}){super({code:"BUILDS_RATE_LIMITED",meta,message})}},ProjectNotFound=class extends NowError{constructor(nameOrId){super({code:"PROJECT_NOT_FOUND",meta:{},message:`There is no project for "${nameOrId}"`})}},LinkRequiredError=class extends NowError{constructor(message="No project is linked in this directory. Run `vercel link` or pass a project name."){super({code:"LINK_REQUIRED",meta:{},message})}},AliasDomainConfigured=class extends NowError{constructor({message}){super({code:"DOMAIN_CONFIGURED",meta:{},message})}},MissingBuildScript=class extends NowError{constructor({message}){super({code:"MISSING_BUILD_SCRIPT",meta:{},message})}},ConflictingFilePath=class extends NowError{constructor({message}){super({code:"CONFLICTING_FILE_PATH",meta:{},message})}},ConflictingPathSegment=class extends NowError{constructor({message}){super({code:"CONFLICTING_PATH_SEGMENT",meta:{},message})}},BuildError=class extends NowError{constructor({message,meta}){super({code:"BUILD_ERROR",meta,message})}},SchemaValidationFailed=class extends NowError{constructor(message,keyword,dataPath,params){super({code:"SCHEMA_VALIDATION_FAILED",meta:{message,keyword,dataPath,params},message:"Schema verification failed"})}},InvalidLocalConfig=class extends NowError{constructor(value){super({code:"INVALID_LOCAL_CONFIG",meta:{value},message:`Invalid local config parameter [${value.map(localConfig=>`"${localConfig}"`).join(", ")}]. A string was expected.`})}};export{humanizePath,require_bytes,NowError,code,APIError,parseRetryAfterHeaderAsMillis,isAPIError,TeamDeleted,InvalidToken,MissingUser,DomainAlreadyExists,DomainPermissionDenied,DomainExternal,SourceNotFound,DomainNotFound,DomainNotVerified,DomainVerificationFailed,InvalidDomain,NotDomainOwner,InvalidDeploymentId,UnsupportedTLD,TLDNotSupportedViaCLI,DomainNotAvailable,UnexpectedDomainPurchaseError,UnexpectedDomainTransferError,DomainPaymentError,DomainPaymentAuthenticationRequired,DomainChargeOutcomeUnknown,DomainOrderPending,DomainPurchaseInProgress,DomainPurchaseRefunded,DomainPurchaseRefundFailed,DomainPriceChanged,DomainPurchasePending,UserAborted,CertNotFound,CertsPermissionDenied,CertOrderNotFound,TooManyRequests,CertError,CertConfigurationError,DeploymentNotFound,DeploymentNotReady,DeploymentFailedAliasImpossible,DeploymentPermissionDenied,InvalidAlias,AliasInUse,CertMissing,CantParseJSONFile,ConflictingConfigFiles,DeprecatedNowJson,CantFindConfig,WorkingDirectoryDoesNotExist,UnsafeWritePathError,EnvFileSymlinkError,NoAliasInConfig,InvalidAliasInConfig,DNSPermissionDenied,DNSInvalidPort,DNSInvalidType,DNSConflictingRecord,DomainRemovalConflict,DomainMoveConflict,InvalidMoveDestination,LambdaSizeExceededError,MissingDotenvVarsError,DeploymentsRateLimited,BuildsRateLimited,ProjectNotFound,LinkRequiredError,AliasDomainConfigured,MissingBuildScript,ConflictingFilePath,ConflictingPathSegment,BuildError,SchemaValidationFailed,InvalidLocalConfig};
10
10
  /*! Bundled license information:
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{isNativeBinaryInstall}from"./chunk-5F4RJ32E.js";import{require_lib}from"./chunk-HDKEES7E.js";import{packageName}from"./chunk-EFGZK6OY.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_fs_extra=__toESM(require_lib(),1);import{access as access2}from"fs/promises";import{basename,dirname as dirname2,join as join2,sep}from"path";import{execFile,spawnSync}from"child_process";import{win32}from"path";var SAFE_ARGUMENT=/^[\w@./:=+-]+$/,UNSAFE_EXECUTABLE_PATH=/["%!^&|<>\x00-\x1f]/;function envValue(env,name){let key=Object.keys(env).find(key2=>key2.toLowerCase()===name.toLowerCase());return key?env[key]:void 0}function packageManagerInvocation(command,args,env=process.env,platform=process.platform){if(platform!=="win32")return{file:command,args};let absolute=win32.isAbsolute(command);for(let arg of[command,...args])if(!(absolute&&arg===command?!UNSAFE_EXECUTABLE_PATH.test(arg):SAFE_ARGUMENT.test(arg)))throw new Error(`Refusing to pass ${JSON.stringify(arg)} to cmd.exe for ${command}`);let systemRoot=envValue(env,"SystemRoot");return{file:envValue(env,"ComSpec")||(systemRoot?`${systemRoot}\\System32\\cmd.exe`:"cmd.exe"),args:["/d","/s","/c",`"${[absolute?`"${command}"`:command,...args].join(" ")}"`],windowsVerbatimArguments:!0}}function execPackageManager(command,args,{cwd,env,timeout,signal},platform=process.platform){return new Promise((resolve,reject)=>{let invocation=packageManagerInvocation(command,args,env,platform),windows=platform==="win32",timer,stop=()=>stopProcessTree(child,env),child=execFile(invocation.file,invocation.args,{encoding:"utf8",windowsHide:!0,windowsVerbatimArguments:invocation.windowsVerbatimArguments,cwd,env:{...env},...windows?{}:{timeout,signal}},(error,stdout)=>{clearTimeout(timer),signal?.removeEventListener("abort",stop),error?reject(error):resolve(String(stdout))});windows&&(timer=setTimeout(stop,timeout),signal?.aborted?stop():signal?.addEventListener("abort",stop,{once:!0}))})}function stopProcessTree(child,env){if(!child?.pid)return;let systemRoot=envValue(env,"SystemRoot");spawnSync(systemRoot?`${systemRoot}\\System32\\taskkill.exe`:"taskkill.exe",["/pid",String(child.pid),"/T","/F"],{stdio:"ignore",windowsHide:!0})}import{constants}from"node:fs";import{access,stat}from"node:fs/promises";import path from"node:path";var DEFAULT_WINDOWS_EXTENSIONS=".COM;.EXE;.BAT;.CMD",WINDOWS_ABSOLUTE=/^(?:[a-zA-Z]:[\\/]|[\\/]{2}[^\\/])/;async function isExecutableFile(file){try{return(await stat(file)).isFile()?(process.platform!=="win32"&&await access(file,constants.X_OK),!0):!1}catch{return!1}}function envValue2(env,name,platform){if(platform!=="win32")return env[name];let key=Object.keys(env).find(key2=>key2.toLowerCase()===name.toLowerCase());return key?env[key]:void 0}async function findTrustedExecutable(name,env,platform=process.platform,isExecutable=isExecutableFile){let windows=platform==="win32",{delimiter,join:join3}=windows?path.win32:path.posix,isAbsolute=windows?directory=>WINDOWS_ABSOLUTE.test(directory):path.posix.isAbsolute,extensions=windows?(envValue2(env,"PATHEXT",platform)||DEFAULT_WINDOWS_EXTENSIONS).split(";").filter(Boolean):[""];for(let directory of(envValue2(env,"PATH",platform)??"").split(delimiter))if(isAbsolute(directory))for(let extension of extensions){let file=join3(directory,`${name}${extension}`);if(await isExecutable(file))return file}return null}import{lstatSync,realpathSync}from"node:fs";import{homedir,tmpdir,userInfo}from"node:os";import path2 from"node:path";var temporaryDirectories=resolveTemporaryDirectories(),fallbackPath=["/usr/local/bin","/usr/bin","/bin"].join(path2.delimiter),trustedUpgradeEnvironment=Object.freeze(withTrustedPath({...process.env}));function trustedUpgradePath(searchPath){let entries=(searchPath??"").split(path2.delimiter).filter(entry=>path2.isAbsolute(entry)&&!entry.split(path2.sep).includes("node_modules")&&!temporaryDirectories.some(base=>isWithin(base,entry)));return entries.length>0?entries.join(path2.delimiter):fallbackPath}function resolveTemporaryDirectories(){let directory=path2.resolve(tmpdir());try{return[directory,realpathSync.native(tmpdir())]}catch{return[directory]}}function isWithin(base,entry){let inside=path2.relative(base,path2.resolve(entry));return inside===""||!inside.startsWith("..")&&!path2.isAbsolute(inside)}function withTrustedPath(env){for(let key of Object.keys(env))key.toLowerCase()==="path"&&(env[key]=trustedUpgradePath(env[key]));return env}function read(directory){try{return directory()}catch{return}}var startupDirectories={temporary:read(tmpdir),runtime:process.env.XDG_RUNTIME_DIR,home:read(homedir),accountHome:()=>read(()=>userInfo().homedir)},fileSystem={realpath:realpathSync.native,stat:lstatSync},SHARED_WRITE=18;function isPrivateDirectory(directory,uid,stat2){let own=stat2(directory);if(!own.isDirectory()||own.uid!==uid)return!1;for(let current=directory;;){let{uid:owner,mode}=stat2(current);if(owner!==uid&&owner!==0||mode&SHARED_WRITE)return!1;let parent=path2.dirname(current);if(parent===current)return!0;current=parent}}function findPrivateDirectory(candidates,uid,{realpath:realpath2,stat:stat2}=fileSystem){for(let candidate of candidates)if(!(!candidate||!path2.isAbsolute(candidate)))try{let directory=realpath2(candidate);if(isPrivateDirectory(directory,uid,stat2))return directory}catch{}}function findWindowsDirectory({temporary,home},{realpath:realpath2}){let{isAbsolute,relative}=path2.win32;if(!(!home||!isAbsolute(home))){try{if(temporary&&isAbsolute(temporary)){let inside=relative(realpath2(home),realpath2(temporary));if(inside&&!inside.startsWith("..")&&!isAbsolute(inside))return temporary}}catch{}return home}}function resolveTrustedUpgradeDirectory(candidates,uid,reader=fileSystem){if(uid===void 0)return findWindowsDirectory(candidates,reader);let{temporary,runtime,home,accountHome}=candidates;return findPrivateDirectory([temporary,runtime,home],uid,reader)??findPrivateDirectory([accountHome?.()],uid,reader)}var trustedUpgradeDirectory;function getTrustedUpgradeDirectory(){return trustedUpgradeDirectory??={path:resolveTrustedUpgradeDirectory(startupDirectories,process.getuid?.())},trustedUpgradeDirectory.path}function withEnvironmentOverrides(env,overrides){let names=new Set(Object.keys(overrides).map(name=>name.toLowerCase())),result={};for(let[name,value]of Object.entries(env))names.has(name.toLowerCase())||(result[name]=value);return Object.assign(result,overrides)}import{dirname,join}from"path";var sharedEnv={COREPACK_ENABLE_PROJECT_SPEC:"0",NODE_DISABLE_COMPILE_CACHE:"1",DISABLE_V8_COMPILE_CACHE:"1"},packageManagers={npm:{metadataArgs:specifier=>["view",specifier,"version","--json","--global"],installArgs:specifier=>["i","-g",specifier],releaseAgeBypassArgs:["--min-release-age=0"],env:sharedEnv,globalDetection:{args:["root","-g"],packageDir:(root,pkg)=>join(root,pkg),installMarkers:nodeModules=>[join(nodeModules,".package-lock.json")]}},pnpm:{metadataArgs:specifier=>["view",specifier,"version","--json"],installArgs:specifier=>["i","-g",specifier],releaseAgeBypassArgs:["--config.minimumReleaseAge=0"],env:{...sharedEnv,npm_config_manage_package_manager_versions:"false",pnpm_config_pm_on_fail:"ignore"},globalDetection:{args:pkg=>["list","-g",pkg,"--depth=0","--json"],packageDir:(output,pkg)=>{try{let projects=JSON.parse(output),path3=(Array.isArray(projects)?projects[0]:projects)?.dependencies?.[pkg]?.path;return typeof path3=="string"?path3:void 0}catch{return}},installMarkers:nodeModules=>[join(nodeModules,".modules.yaml")]}},yarn:{metadataArgs:specifier=>["info",specifier.endsWith("@latest")?specifier.slice(0,-7):specifier,"version","--json"],installArgs:specifier=>["global","add",specifier],releaseAgeBypassArgs:[],env:{...sharedEnv,YARN_IGNORE_PATH:"1",SKIP_YARN_COREPACK_CHECK:"1"},globalDetection:{args:["--silent","global","dir"],packageDir:(root,pkg)=>join(root,"node_modules",pkg),installMarkers:nodeModules=>[join(nodeModules,".yarn-integrity")]}},bun:{metadataArgs:specifier=>["info",specifier,"version","--json","--global"],installArgs:specifier=>["add","-g",specifier],releaseAgeBypassArgs:[],env:sharedEnv,globalDetection:{args:["pm","bin","-g"],binaryNames:["vercel","vc"],installMarkers:nodeModules=>[join(dirname(nodeModules),"bun.lock"),join(dirname(nodeModules),"bun.lockb")]}}};function getUpgradePackageManager(name){return packageManagers[name]}var UnsupportedUpgradeInstallError=class extends Error{constructor(){super(...arguments);this.code="unsupported_install"}},HOMEBREW_UPGRADE_COMMAND="brew upgrade vercel",HomebrewInstallError=class extends UnsupportedUpgradeInstallError{constructor(){super(`This Vercel CLI was installed with Homebrew. Update it with \`${HOMEBREW_UPGRADE_COMMAND}\`.`);this.code="homebrew_install"}};async function isHomebrewInstall(){return isNativeBinaryInstall()?(await(0,import_fs_extra.realpath)(process.execPath).catch(()=>process.execPath)).includes(`${sep}Caskroom${sep}vercel${sep}`):!1}var globalCliTypes=["npm","pnpm","yarn","bun"];function requireTrustedUpgradeDirectory(){let directory=getTrustedUpgradeDirectory();if(!directory)throw new UnsupportedUpgradeInstallError("Can't run a package manager to check or update Vercel CLI. Other users can write to the temporary directory and to your home directory. Update Vercel CLI with the package manager that installed it.");return directory}async function exists(file){try{return await access2(file),!0}catch{return!1}}async function findInstallMarkers(installPaths,cliTypes=globalCliTypes){let found=[];for(let installPath of new Set(installPaths))for(let dir=dirname2(installPath);;){if(basename(dir)==="node_modules")for(let cliType of cliTypes){let{installMarkers}=getUpgradePackageManager(cliType).globalDetection;if(!found.includes(cliType)){for(let marker of installMarkers(dir))if(await exists(marker)){found.push(cliType);break}}}let parent=dirname2(dir);if(parent===dir)break;dir=parent}return found}function throwIfAborted(signal){if(signal?.aborted)throw signal.reason instanceof Error?signal.reason:new Error("Package manager detection was aborted")}async function getPackageManagerGlobalRoot(cliType,pkg,env=trustedUpgradeEnvironment,signal){try{let manager=getUpgradePackageManager(cliType),detection=manager.globalDetection,cwd=getTrustedUpgradeDirectory(),executable=await findTrustedExecutable(cliType,env);return!cwd||!executable?null:(await execPackageManager(executable,typeof detection.args=="function"?detection.args(pkg):detection.args,{cwd,env:withEnvironmentOverrides(env,manager.env),timeout:15e3,signal})).trim()||null}catch{return throwIfAborted(signal),null}}async function detectGlobalPackageManager(installPath,pkg,cliTypes=globalCliTypes,env=trustedUpgradeEnvironment,signal){for(let cliType of cliTypes){throwIfAborted(signal);let root=await getPackageManagerGlobalRoot(cliType,pkg,env,signal);if(!root)continue;let detection=getUpgradePackageManager(cliType).globalDetection;if(detection.packageDir)try{let packageDir=detection.packageDir(root,pkg);if(!packageDir)continue;let resolvedPackageDir=await(0,import_fs_extra.realpath)(packageDir);if(installPath===resolvedPackageDir||installPath.startsWith(resolvedPackageDir+sep))return cliType}catch{}for(let binary of detection.binaryNames||[])try{let target=await(0,import_fs_extra.realpath)(join2(root,binary));if(target===installPath||target.startsWith(installPath+sep)||installPath.startsWith(target+sep))return cliType;let entrypoint=await(0,import_fs_extra.realpath)(process.argv[1]);if(!isNativeBinaryInstall()&&target===entrypoint)return cliType}catch{}}return null}async function resolveInstall(env=trustedUpgradeEnvironment,signal){if(throwIfAborted(signal),await isHomebrewInstall())throw new HomebrewInstallError;let nativeExecutable=isNativeBinaryInstall()&&env.VERCEL_CLI_PACKAGE_EXECUTABLE,resolvedNativeExecutable=nativeExecutable&&await(0,import_fs_extra.realpath)(nativeExecutable).catch(()=>null),entrypoint=resolvedNativeExecutable&&resolvedNativeExecutable===await(0,import_fs_extra.realpath)(process.execPath).catch(()=>null)?env.VERCEL_CLI_PACKAGE_ENTRYPOINT:process.argv[1],installPath=entrypoint&&await(0,import_fs_extra.realpath)(entrypoint).catch(()=>null);if(!installPath)throw new UnsupportedUpgradeInstallError("Could not resolve this Vercel CLI installation. Update it with the package manager that installed it.");requireTrustedUpgradeDirectory();let marked=await findInstallMarkers([entrypoint,installPath]),packageManager=await detectGlobalPackageManager(installPath,packageName,marked.length>0?marked:globalCliTypes,env,signal);if(!packageManager)throw new UnsupportedUpgradeInstallError("Could not detect a supported global npm, pnpm, Yarn, or Bun installation of Vercel CLI. Update it with the package manager that installed it.");return{packageManager,global:!0,assumed:!1}}async function isGlobal(){if(await isHomebrewInstall())return!0;try{return await resolveInstall(),!0}catch{return!1}}async function getUpdateCommandInfo(env=trustedUpgradeEnvironment,signal){let{packageManager}=await resolveInstall(env,signal),args=getUpgradePackageManager(packageManager).installArgs(`${packageName}@latest`),allowBuild=pnpmAllowBuildFlag(packageManager,"esbuild");return{command:`${packageManager} ${args.join(" ")}${allowBuild}`,global:!0,packageManager,assumed:!1}}function pnpmAllowBuildFlag(cliType,pkg){return cliType==="pnpm"?` --allow-build=${pkg}`:""}async function getUpdateCommand(){return await isHomebrewInstall()?HOMEBREW_UPGRADE_COMMAND:(await getUpdateCommandInfo()).command}export{packageManagerInvocation,execPackageManager,findTrustedExecutable,trustedUpgradeEnvironment,withEnvironmentOverrides,getUpgradePackageManager,HOMEBREW_UPGRADE_COMMAND,isHomebrewInstall,requireTrustedUpgradeDirectory,isGlobal,getUpdateCommandInfo,getUpdateCommand};
7
+ import{isNativeBinaryInstall}from"./chunk-5F4RJ32E.js";import{require_lib}from"./chunk-4YGSXM2T.js";import{packageName}from"./chunk-EFGZK6OY.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_fs_extra=__toESM(require_lib(),1);import{access as access2}from"fs/promises";import{basename,dirname as dirname2,join as join2,sep}from"path";import{execFile,spawnSync}from"child_process";import{win32}from"path";var SAFE_ARGUMENT=/^[\w@./:=+-]+$/,UNSAFE_EXECUTABLE_PATH=/["%!^&|<>\x00-\x1f]/;function envValue(env,name){let key=Object.keys(env).find(key2=>key2.toLowerCase()===name.toLowerCase());return key?env[key]:void 0}function packageManagerInvocation(command,args,env=process.env,platform=process.platform){if(platform!=="win32")return{file:command,args};let absolute=win32.isAbsolute(command);for(let arg of[command,...args])if(!(absolute&&arg===command?!UNSAFE_EXECUTABLE_PATH.test(arg):SAFE_ARGUMENT.test(arg)))throw new Error(`Refusing to pass ${JSON.stringify(arg)} to cmd.exe for ${command}`);let systemRoot=envValue(env,"SystemRoot");return{file:envValue(env,"ComSpec")||(systemRoot?`${systemRoot}\\System32\\cmd.exe`:"cmd.exe"),args:["/d","/s","/c",`"${[absolute?`"${command}"`:command,...args].join(" ")}"`],windowsVerbatimArguments:!0}}function execPackageManager(command,args,{cwd,env,timeout,signal},platform=process.platform){return new Promise((resolve,reject)=>{let invocation=packageManagerInvocation(command,args,env,platform),windows=platform==="win32",timer,stop=()=>stopProcessTree(child,env),child=execFile(invocation.file,invocation.args,{encoding:"utf8",windowsHide:!0,windowsVerbatimArguments:invocation.windowsVerbatimArguments,cwd,env:{...env},...windows?{}:{timeout,signal}},(error,stdout)=>{clearTimeout(timer),signal?.removeEventListener("abort",stop),error?reject(error):resolve(String(stdout))});windows&&(timer=setTimeout(stop,timeout),signal?.aborted?stop():signal?.addEventListener("abort",stop,{once:!0}))})}function stopProcessTree(child,env){if(!child?.pid)return;let systemRoot=envValue(env,"SystemRoot");spawnSync(systemRoot?`${systemRoot}\\System32\\taskkill.exe`:"taskkill.exe",["/pid",String(child.pid),"/T","/F"],{stdio:"ignore",windowsHide:!0})}import{constants}from"node:fs";import{access,stat}from"node:fs/promises";import path from"node:path";var DEFAULT_WINDOWS_EXTENSIONS=".COM;.EXE;.BAT;.CMD",WINDOWS_ABSOLUTE=/^(?:[a-zA-Z]:[\\/]|[\\/]{2}[^\\/])/;async function isExecutableFile(file){try{return(await stat(file)).isFile()?(process.platform!=="win32"&&await access(file,constants.X_OK),!0):!1}catch{return!1}}function envValue2(env,name,platform){if(platform!=="win32")return env[name];let key=Object.keys(env).find(key2=>key2.toLowerCase()===name.toLowerCase());return key?env[key]:void 0}async function findTrustedExecutable(name,env,platform=process.platform,isExecutable=isExecutableFile){let windows=platform==="win32",{delimiter,join:join3}=windows?path.win32:path.posix,isAbsolute=windows?directory=>WINDOWS_ABSOLUTE.test(directory):path.posix.isAbsolute,extensions=windows?(envValue2(env,"PATHEXT",platform)||DEFAULT_WINDOWS_EXTENSIONS).split(";").filter(Boolean):[""];for(let directory of(envValue2(env,"PATH",platform)??"").split(delimiter))if(isAbsolute(directory))for(let extension of extensions){let file=join3(directory,`${name}${extension}`);if(await isExecutable(file))return file}return null}import{lstatSync,realpathSync}from"node:fs";import{homedir,tmpdir,userInfo}from"node:os";import path2 from"node:path";var temporaryDirectories=resolveTemporaryDirectories(),fallbackPath=["/usr/local/bin","/usr/bin","/bin"].join(path2.delimiter),trustedUpgradeEnvironment=Object.freeze(withTrustedPath({...process.env}));function trustedUpgradePath(searchPath){let entries=(searchPath??"").split(path2.delimiter).filter(entry=>path2.isAbsolute(entry)&&!entry.split(path2.sep).includes("node_modules")&&!temporaryDirectories.some(base=>isWithin(base,entry)));return entries.length>0?entries.join(path2.delimiter):fallbackPath}function resolveTemporaryDirectories(){let directory=path2.resolve(tmpdir());try{return[directory,realpathSync.native(tmpdir())]}catch{return[directory]}}function isWithin(base,entry){let inside=path2.relative(base,path2.resolve(entry));return inside===""||!inside.startsWith("..")&&!path2.isAbsolute(inside)}function withTrustedPath(env){for(let key of Object.keys(env))key.toLowerCase()==="path"&&(env[key]=trustedUpgradePath(env[key]));return env}function read(directory){try{return directory()}catch{return}}var startupDirectories={temporary:read(tmpdir),runtime:process.env.XDG_RUNTIME_DIR,home:read(homedir),accountHome:()=>read(()=>userInfo().homedir)},fileSystem={realpath:realpathSync.native,stat:lstatSync},SHARED_WRITE=18;function isPrivateDirectory(directory,uid,stat2){let own=stat2(directory);if(!own.isDirectory()||own.uid!==uid)return!1;for(let current=directory;;){let{uid:owner,mode}=stat2(current);if(owner!==uid&&owner!==0||mode&SHARED_WRITE)return!1;let parent=path2.dirname(current);if(parent===current)return!0;current=parent}}function findPrivateDirectory(candidates,uid,{realpath:realpath2,stat:stat2}=fileSystem){for(let candidate of candidates)if(!(!candidate||!path2.isAbsolute(candidate)))try{let directory=realpath2(candidate);if(isPrivateDirectory(directory,uid,stat2))return directory}catch{}}function findWindowsDirectory({temporary,home},{realpath:realpath2}){let{isAbsolute,relative}=path2.win32;if(!(!home||!isAbsolute(home))){try{if(temporary&&isAbsolute(temporary)){let inside=relative(realpath2(home),realpath2(temporary));if(inside&&!inside.startsWith("..")&&!isAbsolute(inside))return temporary}}catch{}return home}}function resolveTrustedUpgradeDirectory(candidates,uid,reader=fileSystem){if(uid===void 0)return findWindowsDirectory(candidates,reader);let{temporary,runtime,home,accountHome}=candidates;return findPrivateDirectory([temporary,runtime,home],uid,reader)??findPrivateDirectory([accountHome?.()],uid,reader)}var trustedUpgradeDirectory;function getTrustedUpgradeDirectory(){return trustedUpgradeDirectory??={path:resolveTrustedUpgradeDirectory(startupDirectories,process.getuid?.())},trustedUpgradeDirectory.path}function withEnvironmentOverrides(env,overrides){let names=new Set(Object.keys(overrides).map(name=>name.toLowerCase())),result={};for(let[name,value]of Object.entries(env))names.has(name.toLowerCase())||(result[name]=value);return Object.assign(result,overrides)}import{dirname,join}from"path";var sharedEnv={COREPACK_ENABLE_PROJECT_SPEC:"0",NODE_DISABLE_COMPILE_CACHE:"1",DISABLE_V8_COMPILE_CACHE:"1"},packageManagers={npm:{metadataArgs:specifier=>["view",specifier,"version","--json","--global"],installArgs:specifier=>["i","-g",specifier],releaseAgeBypassArgs:["--min-release-age=0"],env:sharedEnv,globalDetection:{args:["root","-g"],packageDir:(root,pkg)=>join(root,pkg),installMarkers:nodeModules=>[join(nodeModules,".package-lock.json")]}},pnpm:{metadataArgs:specifier=>["view",specifier,"version","--json"],installArgs:specifier=>["i","-g",specifier],releaseAgeBypassArgs:["--config.minimumReleaseAge=0"],env:{...sharedEnv,npm_config_manage_package_manager_versions:"false",pnpm_config_pm_on_fail:"ignore"},globalDetection:{args:pkg=>["list","-g",pkg,"--depth=0","--json"],packageDir:(output,pkg)=>{try{let projects=JSON.parse(output),path3=(Array.isArray(projects)?projects[0]:projects)?.dependencies?.[pkg]?.path;return typeof path3=="string"?path3:void 0}catch{return}},installMarkers:nodeModules=>[join(nodeModules,".modules.yaml")]}},yarn:{metadataArgs:specifier=>["info",specifier.endsWith("@latest")?specifier.slice(0,-7):specifier,"version","--json"],installArgs:specifier=>["global","add",specifier],releaseAgeBypassArgs:[],env:{...sharedEnv,YARN_IGNORE_PATH:"1",SKIP_YARN_COREPACK_CHECK:"1"},globalDetection:{args:["--silent","global","dir"],packageDir:(root,pkg)=>join(root,"node_modules",pkg),installMarkers:nodeModules=>[join(nodeModules,".yarn-integrity")]}},bun:{metadataArgs:specifier=>["info",specifier,"version","--json","--global"],installArgs:specifier=>["add","-g",specifier],releaseAgeBypassArgs:[],env:sharedEnv,globalDetection:{args:["pm","bin","-g"],binaryNames:["vercel","vc"],installMarkers:nodeModules=>[join(dirname(nodeModules),"bun.lock"),join(dirname(nodeModules),"bun.lockb")]}}};function getUpgradePackageManager(name){return packageManagers[name]}var UnsupportedUpgradeInstallError=class extends Error{constructor(){super(...arguments);this.code="unsupported_install"}},HOMEBREW_UPGRADE_COMMAND="brew upgrade vercel",HomebrewInstallError=class extends UnsupportedUpgradeInstallError{constructor(){super(`This Vercel CLI was installed with Homebrew. Update it with \`${HOMEBREW_UPGRADE_COMMAND}\`.`);this.code="homebrew_install"}};async function isHomebrewInstall(){return isNativeBinaryInstall()?(await(0,import_fs_extra.realpath)(process.execPath).catch(()=>process.execPath)).includes(`${sep}Caskroom${sep}vercel${sep}`):!1}var globalCliTypes=["npm","pnpm","yarn","bun"];function requireTrustedUpgradeDirectory(){let directory=getTrustedUpgradeDirectory();if(!directory)throw new UnsupportedUpgradeInstallError("Can't run a package manager to check or update Vercel CLI. Other users can write to the temporary directory and to your home directory. Update Vercel CLI with the package manager that installed it.");return directory}async function exists(file){try{return await access2(file),!0}catch{return!1}}async function findInstallMarkers(installPaths,cliTypes=globalCliTypes){let found=[];for(let installPath of new Set(installPaths))for(let dir=dirname2(installPath);;){if(basename(dir)==="node_modules")for(let cliType of cliTypes){let{installMarkers}=getUpgradePackageManager(cliType).globalDetection;if(!found.includes(cliType)){for(let marker of installMarkers(dir))if(await exists(marker)){found.push(cliType);break}}}let parent=dirname2(dir);if(parent===dir)break;dir=parent}return found}function throwIfAborted(signal){if(signal?.aborted)throw signal.reason instanceof Error?signal.reason:new Error("Package manager detection was aborted")}async function getPackageManagerGlobalRoot(cliType,pkg,env=trustedUpgradeEnvironment,signal){try{let manager=getUpgradePackageManager(cliType),detection=manager.globalDetection,cwd=getTrustedUpgradeDirectory(),executable=await findTrustedExecutable(cliType,env);return!cwd||!executable?null:(await execPackageManager(executable,typeof detection.args=="function"?detection.args(pkg):detection.args,{cwd,env:withEnvironmentOverrides(env,manager.env),timeout:15e3,signal})).trim()||null}catch{return throwIfAborted(signal),null}}async function detectGlobalPackageManager(installPath,pkg,cliTypes=globalCliTypes,env=trustedUpgradeEnvironment,signal){for(let cliType of cliTypes){throwIfAborted(signal);let root=await getPackageManagerGlobalRoot(cliType,pkg,env,signal);if(!root)continue;let detection=getUpgradePackageManager(cliType).globalDetection;if(detection.packageDir)try{let packageDir=detection.packageDir(root,pkg);if(!packageDir)continue;let resolvedPackageDir=await(0,import_fs_extra.realpath)(packageDir);if(installPath===resolvedPackageDir||installPath.startsWith(resolvedPackageDir+sep))return cliType}catch{}for(let binary of detection.binaryNames||[])try{let target=await(0,import_fs_extra.realpath)(join2(root,binary));if(target===installPath||target.startsWith(installPath+sep)||installPath.startsWith(target+sep))return cliType;let entrypoint=await(0,import_fs_extra.realpath)(process.argv[1]);if(!isNativeBinaryInstall()&&target===entrypoint)return cliType}catch{}}return null}async function resolveInstall(env=trustedUpgradeEnvironment,signal){if(throwIfAborted(signal),await isHomebrewInstall())throw new HomebrewInstallError;let nativeExecutable=isNativeBinaryInstall()&&env.VERCEL_CLI_PACKAGE_EXECUTABLE,resolvedNativeExecutable=nativeExecutable&&await(0,import_fs_extra.realpath)(nativeExecutable).catch(()=>null),entrypoint=resolvedNativeExecutable&&resolvedNativeExecutable===await(0,import_fs_extra.realpath)(process.execPath).catch(()=>null)?env.VERCEL_CLI_PACKAGE_ENTRYPOINT:process.argv[1],installPath=entrypoint&&await(0,import_fs_extra.realpath)(entrypoint).catch(()=>null);if(!installPath)throw new UnsupportedUpgradeInstallError("Could not resolve this Vercel CLI installation. Update it with the package manager that installed it.");requireTrustedUpgradeDirectory();let marked=await findInstallMarkers([entrypoint,installPath]),packageManager=await detectGlobalPackageManager(installPath,packageName,marked.length>0?marked:globalCliTypes,env,signal);if(!packageManager)throw new UnsupportedUpgradeInstallError("Could not detect a supported global npm, pnpm, Yarn, or Bun installation of Vercel CLI. Update it with the package manager that installed it.");return{packageManager,global:!0,assumed:!1}}async function isGlobal(){if(await isHomebrewInstall())return!0;try{return await resolveInstall(),!0}catch{return!1}}async function getUpdateCommandInfo(env=trustedUpgradeEnvironment,signal){let{packageManager}=await resolveInstall(env,signal),args=getUpgradePackageManager(packageManager).installArgs(`${packageName}@latest`),allowBuild=pnpmAllowBuildFlag(packageManager,"esbuild");return{command:`${packageManager} ${args.join(" ")}${allowBuild}`,global:!0,packageManager,assumed:!1}}function pnpmAllowBuildFlag(cliType,pkg){return cliType==="pnpm"?` --allow-build=${pkg}`:""}async function getUpdateCommand(){return await isHomebrewInstall()?HOMEBREW_UPGRADE_COMMAND:(await getUpdateCommandInfo()).command}export{packageManagerInvocation,execPackageManager,findTrustedExecutable,trustedUpgradeEnvironment,withEnvironmentOverrides,getUpgradePackageManager,HOMEBREW_UPGRADE_COMMAND,isHomebrewInstall,requireTrustedUpgradeDirectory,isGlobal,getUpdateCommandInfo,getUpdateCommand};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{getScope}from"./chunk-GTZ6ASHD.js";import{sleep}from"./chunk-4YGSXM2T.js";import{require_ms}from"./chunk-2ILZM77F.js";import{isAPIError}from"./chunk-UNAQQ5DF.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_ms=__toESM(require_ms(),1);var DEFAULT_ORDER_WAIT="1m",DEFAULT_ORDER_WAIT_MS=(0,import_ms.default)(DEFAULT_ORDER_WAIT);function chargeRequestCause(err){if(isAPIError(err))return{code:typeof err.code=="string"?err.code:String(err.status),status:err.status};let code=err?.code;return typeof code=="string"?{code}:{code:err instanceof Error&&err.name!=="Error"?err.name:"no_response"}}function orderOutcomeCause(order,domain){let item=order.domains.find(d=>d.domainName===domain);return{code:[`order_${order.status}`,order.error?.code,`item_${item?.status??"missing"}`].filter(Boolean).join(":")}}function getOrderOutcome(order,domain){let item=order.domains.find(d=>d.domainName===domain);return order.status==="completed"&&item?.status==="completed"?"completed":order.error?.code==="payment-failed"?order.error.details?.reason==="authentication-required"?"payment_authentication_required":"payment_failed":item?.status==="refund-failed"?"refund_failed":item?.status==="refunded"?"refunded":item?.status==="failed"?"failed":"unknown"}async function getOrder(client,orderId,{signal}={}){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"";try{return await client.fetch(`/v1/registrar/orders/${orderId}${teamParam}`,{retry:{retries:0},bailOn429:!0,signal})}catch(err){if(isAPIError(err)){if(err.status===404)return null;if(err.status<500)return err}throw err}}function remainingWait(waitMs,sentAt){return Math.max(waitMs-(Date.now()-sentAt),0)}var ORDER_READ_TIMING={minReadMs:5*1e3},pollForOrder=async(client,orderId,timeoutMs)=>{let intervalMs=500,lastStatus=null,startTime=Date.now();for(;;){let sleepMs=intervalMs,order;try{let leftMs2=timeoutMs-(Date.now()-startTime);order=await getOrder(client,orderId,{signal:AbortSignal.timeout(Math.max(leftMs2,ORDER_READ_TIMING.minReadMs))})}catch{order=null}if(order instanceof Error)if(order.status===429)typeof order.retryAfterMs=="number"&&(sleepMs=Math.max(sleepMs,order.retryAfterMs));else return{order:null,lastStatus,readError:{status:order.status,code:order.code}};else if(order!==null){let pending=order.domains.some(d=>d.status==="pending");if(order.status==="failed"||order.status==="completed"&&!pending)return{order};order.status!=="completed"&&(lastStatus=order.status)}let leftMs=timeoutMs-(Date.now()-startTime);if(leftMs<=0)break;await sleep(Math.min(sleepMs,leftMs)),intervalMs=Math.min(intervalMs*2,5e3)}return{order:null,lastStatus}};export{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS,chargeRequestCause,orderOutcomeCause,getOrderOutcome,remainingWait,ORDER_READ_TIMING,pollForOrder};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{ProjectNotFound,isAPIError}from"./chunk-MTPHHAPR.js";async function getProjectByNameOrId(client,projectNameOrId,accountId,includeRollbackInfo,fetchOptions){try{let qs=includeRollbackInfo?"?rollbackInfo=true":"";return await client.fetch(`/v9/projects/${encodeURIComponent(projectNameOrId)}${qs}`,{...fetchOptions,accountId})}catch(err){if(isAPIError(err)&&err.status===404)return new ProjectNotFound(projectNameOrId);throw err}}export{getProjectByNameOrId};
7
+ import{ProjectNotFound,isAPIError}from"./chunk-UNAQQ5DF.js";async function getProjectByNameOrId(client,projectNameOrId,accountId,includeRollbackInfo,fetchOptions){try{let qs=includeRollbackInfo?"?rollbackInfo=true":"";return await client.fetch(`/v9/projects/${encodeURIComponent(projectNameOrId)}${qs}`,{...fetchOptions,accountId})}catch(err){if(isAPIError(err)&&err.status===404)return new ProjectNotFound(projectNameOrId);throw err}}export{getProjectByNameOrId};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{require_dist as require_dist2}from"./chunk-P5TIDWPF.js";import{require_dist}from"./chunk-MN2F4NPH.js";import{require_types}from"./chunk-PH2MLBQO.js";import{require_build_utils}from"./chunk-BVFFSUG3.js";import{__commonJS,__require,__toESM}from"./chunk-NBPLUP7C.js";var require_constants=__commonJS({"../runtimes/dist/constants.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),constants_exports={};__export(constants_exports,{BUILDER_RUNTIMES:()=>BUILDER_RUNTIMES,CONTAINER_ENTRYPOINT_CANDIDATES:()=>CONTAINER_ENTRYPOINT_CANDIDATES,ENTRYPOINT_EXTENSIONS:()=>ENTRYPOINT_EXTENSIONS,ROUTE_OWNING_BUILDERS:()=>ROUTE_OWNING_BUILDERS,RUNTIME_BUILDERS:()=>RUNTIME_BUILDERS,RUNTIME_MANIFESTS:()=>RUNTIME_MANIFESTS,STATIC_BUILDERS:()=>STATIC_BUILDERS});module.exports=__toCommonJS(constants_exports);var RUNTIME_BUILDERS={node:"@vercel/backends",python:"@vercel/python",go:"@vercel/go",rust:"@vercel/rust",ruby:"@vercel/ruby",container:"@vercel/container"},RUNTIME_MANIFESTS={node:["package.json"],python:["pyproject.toml","requirements.txt","Pipfile","pylock.yml","uv.lock","setup.py"],go:["go.mod"],ruby:["Gemfile"],rust:["Cargo.toml"]},ENTRYPOINT_EXTENSIONS={".ts":"node",".mts":"node",".js":"node",".mjs":"node",".cjs":"node",".py":"python",".go":"go",".rs":"rust",".rb":"ruby",".ru":"ruby"},BUILDER_RUNTIMES={...Object.fromEntries(Object.entries(RUNTIME_BUILDERS).map(([runtime,builder])=>[builder,runtime])),"@vercel/node":"node","@vercel/next":"node","@vercel/remix-builder":"node","@vercel/redwood":"node","@vercel/hydrogen":"node","@vercel/express":"node","@vercel/hono":"node","@vercel/h3":"node","@vercel/koa":"node","@vercel/nestjs":"node","@vercel/fastify":"node","@vercel/elysia":"node"},STATIC_BUILDERS=new Set(["@vercel/static-build","@vercel/static"]),ROUTE_OWNING_BUILDERS=new Set(["@vercel/next","@vercel/backends"]),CONTAINER_ENTRYPOINT_CANDIDATES=["Dockerfile.vercel","Containerfile.vercel","Dockerfile","Containerfile"]}});var require_entrypoint=__commonJS({"../runtimes/dist/entrypoint.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),entrypoint_exports={};__export(entrypoint_exports,{isDockerfileEntrypoint:()=>isDockerfileEntrypoint,isNodeScheduleEntrypoint:()=>isNodeScheduleEntrypoint2,parsePyModuleAttrEntrypoint:()=>parsePyModuleAttrEntrypoint,parsePythonScheduleModule:()=>parsePythonScheduleModule2,stripTrailingSlash:()=>stripTrailingSlash});module.exports=__toCommonJS(entrypoint_exports);var import_path=__require("path"),import_constants=require_constants(),PYTHON_MODULE_ATTR_RE=/^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/,PYTHON_MODULE_RE=/^[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*$/,SOURCE_FILE_RE=/\.(?:py|[cm]?[jt]s)$/,NODE_SOURCE_FILE_RE=/\.(?:m?js|[cm]?ts)$/;function parsePyModuleAttrEntrypoint(entrypoint){let match=PYTHON_MODULE_ATTR_RE.exec(entrypoint);if(!match)return null;let[,modulePart,attrName]=match;return!modulePart||!attrName?null:{attrName,filePath:modulePart.replace(/\./g,"/")+".py",moduleName:modulePart}}function parsePythonScheduleModule2(entrypoint){if(!PYTHON_MODULE_RE.test(entrypoint)||SOURCE_FILE_RE.test(entrypoint))return null;let path=entrypoint.replace(/\./g,"/");return{moduleName:entrypoint,sourceFiles:[`${path}/__init__.py`,`${path}.py`]}}function isNodeScheduleEntrypoint2(entrypoint){return NODE_SOURCE_FILE_RE.test(entrypoint)}var CONTAINER_ENTRYPOINT_BASENAMES=new Set(import_constants.CONTAINER_ENTRYPOINT_CANDIDATES.map(name=>name.toLowerCase()));function isDockerfileEntrypoint(entrypoint){return CONTAINER_ENTRYPOINT_BASENAMES.has(import_path.posix.basename(entrypoint).toLowerCase())}function stripTrailingSlash(p){let stripped=p.replace(/\/+$/,"");return stripped===""?".":stripped}}});var import_routing_utils=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1),import_types=__toESM(require_types(),1),import_fs_detectors=__toESM(require_dist2(),1),import_entrypoint=__toESM(require_entrypoint(),1);import{getConfigValidator}from"./config-validator.mjs";var imagesSchema={type:"object",additionalProperties:!1,required:["sizes"],properties:{contentDispositionType:{enum:["inline","attachment"]},contentSecurityPolicy:{type:"string",minLength:1,maxLength:256},dangerouslyAllowSVG:{type:"boolean"},domains:{type:"array",minItems:0,maxItems:50,items:{type:"string",minLength:1,maxLength:256}},formats:{type:"array",minItems:1,maxItems:4,items:{enum:["image/avif","image/webp","image/jpeg","image/png"]}},localPatterns:{type:"array",minItems:0,maxItems:25,items:{type:"object",additionalProperties:!1,properties:{pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},minimumCacheTTL:{type:"integer",minimum:1,maximum:31536e4},qualities:{type:"array",minItems:1,maxItems:20,items:{type:"integer",minimum:1,maximum:100}},remotePatterns:{type:"array",minItems:0,maxItems:50,items:{type:"object",additionalProperties:!1,required:["hostname"],properties:{protocol:{enum:["http","https"]},hostname:{type:"string",minLength:1,maxLength:256},port:{type:"string",minLength:0,maxLength:5},pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},sizes:{type:"array",minItems:1,maxItems:50,items:{type:"number"}}}},cronsSchema={type:"array",minItems:0,items:{type:"object",additionalProperties:!1,required:["path","schedule"],properties:{path:{type:"string",minLength:1,maxLength:512,pattern:"^/.*"},schedule:{type:"string",minLength:9,maxLength:256}}}},envVarNamesSchema={pattern:"^[A-Za-z_][A-Za-z0-9_]*$",maxLength:256},servicesBindingSchema={type:"object",additionalProperties:!1,required:["service","format","env"],properties:{type:{description:"Optional binding type marker. Currently the only supported type is `service`. When present this must be `service`.",const:"service"},service:{type:"string",minLength:1,maxLength:64,pattern:import_build_utils.SERVICE_NAME_PATTERN},format:{const:"url"},env:{type:"string",...envVarNamesSchema}}},servicesBindingsSchema={type:"array",maxItems:100,items:servicesBindingSchema},typedBindingsSchema={...servicesBindingsSchema,items:{...servicesBindingSchema,required:["type",...servicesBindingSchema.required]}},scheduleNameSchema={type:"string",minLength:1,maxLength:256,pattern:"^[0-9A-Za-z][0-9A-Za-z._-]*$"},scheduleDefinitionSchema={type:"object",additionalProperties:!1,properties:{schedule:{type:"string",minLength:9,maxLength:256},timezone:{type:"string",minLength:1,maxLength:50,description:"IANA timezone for cron evaluation. Defaults to UTC."},jitter:{type:"integer",minimum:1,maximum:15},path:{description:"Deployment path to invoke over HTTP, like `crons[].path`. Must start with `/`.",type:"string",maxLength:512,pattern:"^/"},requestMethod:{description:"HTTP method used to invoke `path`. Only valid with `path`. Defaults to `POST`.",enum:["GET","POST"]},function:{type:"string",minLength:1},service:{description:"Service that owns `function`, from `services`. When set, `function` is the path within that service. Only valid with `function`.",type:"string",minLength:1,maxLength:64,pattern:"^[a-z]([a-z_-]*[a-z])?$"},topic:{type:"string",minLength:1,maxLength:256,pattern:"^[A-Za-z0-9_-]+$"},run:{description:"Command to run for each firing. Only valid with a Dockerfile or Containerfile entrypoint.",type:"array",minItems:1,items:[{type:"string",pattern:"\\S"}],additionalItems:{type:"string"}},root:{description:"Directory of the service that runs the schedule's `entrypoint`, which is relative to it. Required with `entrypoint`.",type:"string",minLength:1,maxLength:512},entrypoint:{type:"string",minLength:1,maxLength:512},runtime:{description:"Runtime of an `entrypoint` without `run`: `python` for a module path like `jobs.tasks`, or `node` for a JavaScript or TypeScript file.",enum:["python","node"]},bindings:typedBindingsSchema,publishContainerImages:{type:"boolean"}},dependencies:{requestMethod:["path"],service:["function"],run:["entrypoint"],entrypoint:["root"],root:["entrypoint"],bindings:["entrypoint"]},oneOf:[{required:["path"]},{required:["function"]},{required:["topic"]},{required:["entrypoint"]}]},maxSchedules=500,schedulesSchema={type:"object",maxProperties:maxSchedules,propertyNames:scheduleNameSchema,additionalProperties:scheduleDefinitionSchema},experimentalServicesMountSchema={oneOf:[{type:"string",minLength:1,maxLength:512},{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},anyOf:[{required:["path"]},{required:["subdomain"]}]}]},staticExperimentalServiceScheduleSchema={type:"string",minLength:9,maxLength:256,not:{const:"<dynamic>"}},experimentalServiceScheduleSchema={oneOf:[{type:"string",minLength:9,maxLength:256},{type:"array",minItems:1,items:staticExperimentalServiceScheduleSchema}]},experimentalServiceQueueTopicSchema={type:"object",additionalProperties:!1,required:["topic"],properties:{topic:{type:"string",minLength:1,maxLength:256},retryAfterSeconds:{type:"integer",minimum:1,maximum:86400},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400}}},experimentalServiceTopicsSchema={oneOf:[{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:256}},{type:"array",minItems:1,items:experimentalServiceQueueTopicSchema}]},getExperimentalServicesCommonProperties=()=>({entrypoint:{type:"string",minLength:1,maxLength:512},root:{type:"string",minLength:1,maxLength:512},workspace:{type:"string",minLength:1,maxLength:512},framework:{type:"string",minLength:1,maxLength:256},builder:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},buildCommand:{type:"string",minLength:1,maxLength:2048},installCommand:{type:"string",minLength:1,maxLength:2048},preDeployCommand:{type:"string",minLength:1,maxLength:2048},command:{oneOf:[{type:"string",minLength:1,maxLength:2048},{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:2048}}]},memory:{type:"integer",minimum:128,maximum:10240},maxDuration:(0,import_build_utils.getMaxDurationSchema)(),includeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]},excludeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]}}),experimentalServicesRoutableProperties={mount:experimentalServicesMountSchema,routePrefix:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},getExperimentalServicesServiceConfigSchema=()=>({oneOf:[{type:"object",additionalProperties:!1,properties:{...getExperimentalServicesCommonProperties(),...experimentalServicesRoutableProperties,type:{enum:["web"]}}},{type:"object",additionalProperties:!1,required:["type","trigger","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"schedule"},schedule:experimentalServiceScheduleSchema}},{type:"object",additionalProperties:!1,required:["type","trigger","topics"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"queue"},topics:experimentalServiceTopicsSchema,consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","trigger","entrypoint"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"workflow"}}},{type:"object",additionalProperties:!1,required:["type"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"worker"},topics:{type:"array",items:{type:"string",minLength:1,maxLength:256},minItems:1},consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"cron"},schedule:experimentalServiceScheduleSchema}}]}),getExperimentalServicesSchema=()=>({type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:getExperimentalServicesServiceConfigSchema()}),experimentalServiceGroupsSchema={type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:{type:"array",items:{type:"string",minLength:1,maxLength:256}}},servicesPathSchema={type:"string",minLength:1,maxLength:512},servicesCommandSchema={type:"string",minLength:1,maxLength:2048},containerImageSchema={type:"string",minLength:1,maxLength:1024},getServicesServiceConfigSchema=()=>({type:"object",additionalProperties:!1,anyOf:[{required:["root"]},{required:["image"]}],properties:{root:servicesPathSchema,framework:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},entrypoint:servicesPathSchema,image:containerImageSchema,command:{oneOf:[{type:"string",minLength:1,maxLength:4096},{type:"array",minItems:1,maxItems:128,items:{type:"string",minLength:1,maxLength:4096}}]},publishContainerImages:{type:"boolean"},installCommand:servicesCommandSchema,buildCommand:servicesCommandSchema,devCommand:servicesCommandSchema,ignoreCommand:servicesCommandSchema,outputDirectory:servicesPathSchema,bindings:servicesBindingsSchema,functions:(0,import_build_utils.getFunctionsSchema)(),proxy:proxySchema,headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,trailingSlash:import_routing_utils.trailingSlashSchema}}),daemonConfigSchema={type:"object",additionalProperties:!1,anyOf:[{required:["instances"]},{required:["replicas"]}],properties:{root:servicesPathSchema,entrypoint:servicesPathSchema,image:containerImageSchema,command:{type:"array",minItems:1,maxItems:128,items:{type:"string",minLength:1,maxLength:4096}},instances:{type:"object",additionalProperties:{type:"integer",minimum:0}},replicas:{description:"Deprecated. Use `instances`. Ignored when `instances` is set.",deprecated:!0,type:"object",additionalProperties:{type:"integer",minimum:0}},resources:{type:"object",additionalProperties:!1,required:["requests"],properties:{requests:{type:"object",additionalProperties:!1,required:["memory"],properties:{memory:{enum:["1Gi","2Gi","4Gi","8Gi"]}}}}},terminationGracePeriodSeconds:{type:"integer",minimum:0},livenessProbe:{type:"object",additionalProperties:!1,required:["httpGet"],properties:{httpGet:{type:"object",additionalProperties:!1,required:["port"],properties:{path:{type:"string",minLength:1},port:{type:"integer",minimum:1,maximum:65535},host:{type:"string",minLength:1},scheme:{enum:["HTTP","HTTPS"]},httpHeaders:{type:"array",items:{type:"object",additionalProperties:!1,required:["name","value"],properties:{name:{type:"string",minLength:1},value:{type:"string"}}}}}},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400},periodSeconds:{type:"integer",minimum:1,maximum:86400},timeoutSeconds:{type:"integer",minimum:1,maximum:86400},successThreshold:{type:"integer",minimum:1,maximum:10},failureThreshold:{type:"integer",minimum:1,maximum:10}}},bindings:typedBindingsSchema}},getServicesSchema=()=>({type:"object",propertyNames:{pattern:import_build_utils.SERVICE_NAME_PATTERN,maxLength:64},additionalProperties:getServicesServiceConfigSchema()}),maxDaemons=100,daemonsSchema={type:"object",maxProperties:maxDaemons,propertyNames:{pattern:import_build_utils.DAEMON_NAME_PATTERN,maxLength:64},additionalProperties:daemonConfigSchema},proxySchema={type:"object",additionalProperties:!1,required:["entrypoint"],properties:{entrypoint:{type:"string",minLength:1},matcher:{oneOf:[{type:"string",minLength:1},{type:"array",minItems:1,items:{type:"string",minLength:1}}]}}};function buildVercelConfigSchema(){return{type:"object",additionalProperties:!0,properties:{builds:import_build_utils.buildsSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,trailingSlash:import_routing_utils.trailingSlashSchema,functions:(0,import_build_utils.getFunctionsSchema)(),images:imagesSchema,crons:cronsSchema,schedules:schedulesSchema,bunVersion:{type:"string"},publishContainerImages:{type:"boolean"},proxy:proxySchema,experimentalServices:getExperimentalServicesSchema(),experimentalServiceGroups:experimentalServiceGroupsSchema,services:getServicesSchema(),experimentalServicesV2:getServicesSchema(),daemons:daemonsSchema}}}var isDockerfilePath=entrypoint=>/(docker|container)file/i.test((0,import_build_utils.splitDockerfileEntrypoint)(entrypoint).path.split(/[\\/]/).pop()??""),toPythonModulePath=entrypoint=>entrypoint.replace(/\.py$/,"").replace(/[\\/]+/g,".").replace(/(^|\.)__init__$/,""),hasInvalidDockerfileStage=entrypoint=>{let{buildTarget}=(0,import_build_utils.splitDockerfileEntrypoint)(entrypoint);return buildTarget!==void 0&&!(0,import_build_utils.isValidDockerfileStage)(buildTarget)};function validateConfig(config){let validate=getConfigValidator(buildVercelConfigSchema);if(!validate(config)&&validate.errors&&validate.errors[0]){let error=validate.errors[0],fileName=config[import_types.fileNameSymbol]||"vercel.json",niceError=(0,import_build_utils.getPrettyError)(error);return niceError.message=`Invalid ${fileName} - ${niceError.message}`,niceError}let serviceNames=new Set([...Object.keys(config.services??{}),...Object.keys(config.daemons??{})]),scheduleServices=getScheduleServiceNames(config),destinationServices=new Set(getDestinationServices(config)),invalidSchedule=(code,message)=>new import_build_utils.NowBuildError({code,message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - ${message}`}),invalidCommand=message=>invalidSchedule("INVALID_SCHEDULE_COMMAND",message),invalidEntrypoint=message=>invalidSchedule("INVALID_SCHEDULE_ENTRYPOINT",message);for(let[name,schedule]of Object.entries(config.schedules??{})){let path=`schedules.${name}`;if("runtime"in schedule&&("run"in schedule||!("entrypoint"in schedule)))return invalidEntrypoint(`\`${path}.runtime\` is only valid with an \`entrypoint\` and without \`run\`.`);if("entrypoint"in schedule&&!("run"in schedule)){let{entrypoint,runtime}=schedule;if(!runtime)return isDockerfilePath(entrypoint)?invalidEntrypoint(`\`${path}.entrypoint\` names a Dockerfile, so \`${path}\` must set \`run\`.`):invalidEntrypoint(`\`${path}\` must set \`runtime\` to run its \`entrypoint\`: "python" for a module path like "jobs.tasks", or "node" for a .js, .mjs, .ts, .mts or .cts file.`);if(runtime==="python"&&!(0,import_entrypoint.parsePythonScheduleModule)(entrypoint)){let suggestion=entrypoint.endsWith(".py")?toPythonModulePath(entrypoint):"";return invalidEntrypoint(`\`${path}.entrypoint\` "${entrypoint}" must be a Python module path like "${(0,import_entrypoint.parsePythonScheduleModule)(suggestion)?suggestion:"jobs.tasks"}", since \`${path}.runtime\` is "python".`)}if(runtime==="node"&&!(0,import_entrypoint.isNodeScheduleEntrypoint)(entrypoint))return invalidEntrypoint(`\`${path}.entrypoint\` "${entrypoint}" must be a .js, .mjs, .ts, .mts or .cts file, since \`${path}.runtime\` is "node".`);let configured=["schedule","timezone","jitter"].find(key=>key in schedule);if(configured)return invalidEntrypoint(runtime==="node"?`\`${path}\` runs "${entrypoint}", whose \`export const config\` sets its cron, timezone and jitter. Remove \`${path}.${configured}\`.`:`\`${path}\` runs the Python module "${entrypoint}", whose \`@schedule\` handlers set their own cron, timezone and jitter. Remove \`${path}.${configured}\`.`)}else if(!("schedule"in schedule))return invalidSchedule("INVALID_SCHEDULE_EXPRESSION",`\`${path}\` is missing required property \`schedule\`.`);if("publishContainerImages"in schedule&&!("run"in schedule))return invalidCommand(`\`${path}.publishContainerImages\` is only valid with \`run\`, because only a schedule with \`run\` builds an image from a Dockerfile. Remove \`${path}.publishContainerImages\`.`);if("run"in schedule){if(!isDockerfilePath(schedule.entrypoint))return invalidCommand(`\`${path}.run\` requires a Dockerfile or Containerfile \`entrypoint\`.`);if(hasInvalidDockerfileStage(schedule.entrypoint))return invalidCommand(`\`${path}.entrypoint\` "${schedule.entrypoint}" is invalid. ${import_build_utils.DOCKERFILE_STAGE_HINT}`)}if(scheduleServices.has(name)){if(name.length>64||!new RegExp(import_build_utils.SERVICE_NAME_PATTERN).test(name))return invalidScheduleService(config,`\`${path}\` runs as a service, so its name must be a valid service name: lowercase letters, \`-\` and \`_\`, at most 64 characters.`);if(serviceNames.has(name))return invalidScheduleService(config,`\`${path}\` runs as service "${name}", which is already the name of a service or daemon.`);if(destinationServices.has(name))return invalidScheduleService(config,`Rewrites and routes cannot target schedule "${name}" because schedules do not receive traffic.`)}if(!(!("timezone"in schedule)||schedule.timezone===void 0))try{if(!/^[A-Za-z][A-Za-z0-9_+/-]*$/.test(schedule.timezone))throw new RangeError("Expected a named timezone");new Intl.DateTimeFormat("en-US",{timeZone:schedule.timezone})}catch{return new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_TIMEZONE",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - \`schedules.${name}.timezone\` must be a valid IANA timezone, such as "America/New_York". Omit it to use UTC.`})}}let functionMaps=[config.functions,...Object.values(config.services??{}).map(service=>service.functions),...Object.values(config.experimentalServicesV2??{}).map(service=>service.functions)];for(let functions of functionMaps)for(let[pattern,fn]of Object.entries(functions??{})){let regions=[...new Set(fn.regions)];if(fn.affinity?.mode==="strict"&&(regions.includes("all")||regions.length>1))return new import_build_utils.NowBuildError({code:"INVALID_FUNCTION_AFFINITY_REGIONS",message:`Function affinity mode "strict" requires at most one statically configured region. Update \`functions[${JSON.stringify(pattern)}].regions\` to contain a single region.`,link:"https://vercel.com/docs/concepts/projects/project-configuration#functions"})}if(config.proxy){let proxyError=(0,import_fs_detectors.validateProxyConfig)(config.proxy,{field:"proxy",level:"project"});if(proxyError)return new import_build_utils.NowBuildError({code:proxyError.code.toUpperCase(),message:proxyError.message})}if(config.functions&&config.builds)return new import_build_utils.NowBuildError({code:"FUNCTIONS_AND_BUILDS",message:"The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.",link:"https://vercel.link/functions-and-builds"});if(config.proxy&&config.builds)return new import_build_utils.NowBuildError({code:"PROXY_AND_BUILDS",message:"The `proxy` property cannot be used with the `builds` property. Remove `builds` to use an explicit proxy entrypoint."});let hasExperimentalServices=!!config.experimentalServices;if(hasExperimentalServices&&config.builds)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_BUILDS",message:"The `experimentalServices` property cannot be used in conjunction with the `builds` property. Please remove one of them."});if(hasExperimentalServices&&config.functions)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_FUNCTIONS",message:"The `experimentalServices` property cannot be used in conjunction with the `functions` property. Please remove one of them."});if(config.experimentalServiceGroups&&!config.experimentalServices)return new import_build_utils.NowBuildError({code:"SERVICE_GROUPS_WITHOUT_SERVICES",message:"The `experimentalServiceGroups` property requires `experimentalServices` to be defined. Service groups reference services by name."});let hasServices=config.services!=null,hasExperimentalServicesV2=config.experimentalServicesV2!=null;if(hasServices&&hasExperimentalServicesV2)return new import_build_utils.NowBuildError({code:"SERVICES_AND_EXPERIMENTAL_SERVICES_V2",message:"The `services` property cannot be used in conjunction with its deprecated alias `experimentalServicesV2`. Please use only `services`."});let servicesConfig=config.services??config.experimentalServicesV2,servicesConfigKey=hasServices?"services":"experimentalServicesV2",servicesErrorCodePrefix=hasServices?"SERVICES":"EXPERIMENTAL_SERVICES_V2";if(servicesConfig&&hasExperimentalServices)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_EXPERIMENTAL_SERVICES`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`experimentalServices\` property. Please use only one services configuration.`});if(servicesConfig&&config.builds)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_BUILDS`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`builds\` property. Please remove one of them.`});if(servicesConfig){let ambiguousTopLevel=[];if(config.functions!=null&&ambiguousTopLevel.push("functions"),config.installCommand!=null&&ambiguousTopLevel.push("installCommand"),config.buildCommand!=null&&ambiguousTopLevel.push("buildCommand"),config.devCommand!=null&&ambiguousTopLevel.push("devCommand"),config.ignoreCommand!=null&&ambiguousTopLevel.push("ignoreCommand"),config.outputDirectory!=null&&ambiguousTopLevel.push("outputDirectory"),config.framework!=null&&ambiguousTopLevel.push("framework"),ambiguousTopLevel.length>0){let count=ambiguousTopLevel.length,fields=ambiguousTopLevel.map(field=>`\`${field}\``).join(", ");return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_TOP_LEVEL_BUILD_SETTINGS`,message:`The top-level ${count>1?"properties":"property"} ${fields} cannot be used with \`${servicesConfigKey}\` because the owning service is ambiguous. Move ${count>1?"them":"it"} under the relevant service in \`${servicesConfigKey}\`.`})}}if(config.daemons){let daemonError=validateDaemons(config,config.daemons);if(daemonError)return daemonError}for(let[name,schedule]of Object.entries(config.schedules??{})){if(!("entrypoint"in schedule))continue;let bindingError=validateCallerBindings(config,`Schedule "${name}"`,schedule.bindings,message=>invalidScheduleService(config,message));if(bindingError)return bindingError}if(servicesConfig){let imageError=validateImageServices(config,servicesConfig,servicesConfigKey);if(imageError)return imageError;let serviceNames2=new Set(Object.keys(servicesConfig));for(let[serviceName,serviceConfig]of Object.entries(servicesConfig))for(let binding of serviceConfig.bindings??[])if(!serviceNames2.has(binding.service))return scheduleServices.has(binding.service)?scheduleBindingError(config,`Service "${serviceName}"`,binding.service):new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_BINDING_UNKNOWN_SERVICE`,message:`Service "${serviceName}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`${servicesConfigKey}\` or fix the binding.`})}return null}function validateDaemons(config,daemons){let invalid=message=>new import_build_utils.NowBuildError({code:"INVALID_DAEMON",message}),daemonNames=new Set(Object.keys(daemons));for(let[name,daemon]of Object.entries(daemons)){if(daemon.image!==void 0){let imageProblem=(0,import_build_utils.getVcrImageProblem)(daemon.image);if(imageProblem)return invalidImage(config,`daemons.${name}.image`,imageProblem);if(daemon.entrypoint!==void 0)return invalid(`Daemon "${name}" can set \`image\` or \`entrypoint\`, not both.`);continue}if(daemon.root===void 0||daemon.entrypoint===void 0)return invalid(`Daemon "${name}" must set \`image\`, or \`root\` and \`entrypoint\` to build one.`);if(!isDockerfilePath(daemon.entrypoint))return invalid(`Daemon "${name}" must set \`entrypoint\` to a Dockerfile or Containerfile.`);if(hasInvalidDockerfileStage(daemon.entrypoint))return invalid(`Daemon "${name}" has invalid \`entrypoint\` "${daemon.entrypoint}". ${import_build_utils.DOCKERFILE_STAGE_HINT}`)}let services={...config.experimentalServicesV2,...config.services},isDaemonTarget=name=>daemonNames.has(name)&&!Object.prototype.hasOwnProperty.call(services,name);for(let[name,service]of Object.entries(services)){let binding=service.bindings?.find(binding2=>isDaemonTarget(binding2.service));if(binding)return invalid(`Service "${name}" cannot bind to daemon "${binding.service}" because daemons do not receive traffic.`)}for(let[name,daemon]of Object.entries(daemons)){let bindingError=validateCallerBindings(config,`Daemon "${name}"`,daemon.bindings,invalid);if(bindingError)return bindingError}let daemonTarget=getDestinationServices(config).find(isDaemonTarget);return daemonTarget?invalid(`Rewrites and routes cannot target daemon "${daemonTarget}" because daemons do not receive traffic.`):null}function validateCallerBindings(config,caller,bindings,invalid){let services={...config.experimentalServicesV2,...config.services},scheduleServices=getScheduleServiceNames(config),envs=new Set;for(let binding of bindings??[]){if(!Object.prototype.hasOwnProperty.call(services,binding.service))return scheduleServices.has(binding.service)?scheduleBindingError(config,caller,binding.service):invalid(`${caller} declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`services\` or fix the binding.`);if(envs.has(binding.env))return invalid(`${caller} declares more than one binding for the environment variable "${binding.env}".`);envs.add(binding.env)}return null}function invalidImage(config,path,problem){return new import_build_utils.NowBuildError({code:"INVALID_CONTAINER_IMAGE",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - \`${path}\` ${problem}`})}function validateImageServices(config,services,servicesConfigKey){let fileName=config[import_types.fileNameSymbol]||"vercel.json";for(let[name,service]of Object.entries(services)){if(service.image===void 0)continue;let path=`${servicesConfigKey}.${name}`,imageProblem=(0,import_build_utils.getVcrImageProblem)(service.image);if(imageProblem)return invalidImage(config,`${path}.image`,imageProblem);let invalid=(code,problem)=>new import_build_utils.NowBuildError({code,message:`Invalid ${fileName} - \`${path}\` sets \`image\`, so ${problem}`}),buildSettings=import_build_utils.SERVICE_IMAGE_BUILD_SETTINGS.filter(field=>service[field]!==void 0);if(buildSettings.length>0){let fields=buildSettings.map(field=>`\`${field}\``).join(", ");return invalid("SERVICE_IMAGE_WITH_BUILD_SETTINGS",`it isn't built and can't set ${fields}.`)}if(service.runtime!==void 0&&service.runtime!=="container")return invalid("SERVICE_IMAGE_WITH_RUNTIME",'its `runtime` can only be "container".');if(service.functions!==void 0)return invalid("SERVICE_IMAGE_WITH_FUNCTIONS","it can't set `functions`. The functions configuration isn't supported for image services.")}return null}function getScheduleServiceNames(config){return new Set(Object.entries(config.schedules??{}).filter(([,schedule])=>"entrypoint"in schedule||"run"in schedule).map(([name])=>name))}function invalidScheduleService(config,message){return new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_SERVICE",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - ${message}`})}function scheduleBindingError(config,binder,schedule){return invalidScheduleService(config,`${binder} cannot bind to schedule "${schedule}" because schedules do not receive traffic.`)}function getDestinationServices(config){let services={...config.experimentalServicesV2,...config.services};return[...config.rewrites??[],...config.routes??[],...Object.values(services).flatMap(service=>[...service.rewrites??[],...service.routes??[]])].flatMap(entry=>{let destination="destination"in entry?entry.destination:void 0;return typeof destination=="object"&&destination!==null?[destination.service]:[]})}export{require_constants,require_entrypoint,buildVercelConfigSchema,validateConfig};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{isGuidanceEnabled}from"./chunk-TAAWMNNL.js";import{jsonNextStep,writeJsonFailure}from"./chunk-HDKEES7E.js";import{ua_default}from"./chunk-QRPBDCDH.js";import{fetch}from"./chunk-MY4MONOH.js";import{AGENT_REASON,AGENT_STATUS,getExitCodeForReason,omitGlobalFlagsFromArgs}from"./chunk-E6VQXHBD.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{remoteText}from"./chunk-AUCQKYL2.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);function styledCommand(step){return step.template?step.command:import_chalk.default.cyan(step.command)}function formatNextSteps(steps){if(steps.length===0)return"";if(steps.length===1)return`
7
+ import{isGuidanceEnabled}from"./chunk-TAAWMNNL.js";import{jsonNextStep,writeJsonFailure}from"./chunk-4YGSXM2T.js";import{ua_default}from"./chunk-QRPBDCDH.js";import{fetch}from"./chunk-MY4MONOH.js";import{AGENT_REASON,AGENT_STATUS,getExitCodeForReason,omitGlobalFlagsFromArgs}from"./chunk-3QTP26QS.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{remoteText}from"./chunk-AUCQKYL2.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);function styledCommand(step){return step.template?step.command:import_chalk.default.cyan(step.command)}function formatNextSteps(steps){if(steps.length===0)return"";if(steps.length===1)return`
8
8
  ${steps[0].label}:
9
9
  ${styledCommand(steps[0])}
10
10
  `;let list=steps.map(step=>` ${step.label}: