vercel 53.1.1 → 53.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/chunks/{add-UAZIKU22.js → add-PGPQCMJK.js} +9 -9
  2. package/dist/chunks/{chunk-5B27ZNJB.js → chunk-25WI74GM.js} +7 -7
  3. package/dist/chunks/{chunk-C7FXVPAA.js → chunk-2TNGZL25.js} +2 -2
  4. package/dist/chunks/{chunk-T2DVW5BM.js → chunk-3GJFG6GX.js} +4 -4
  5. package/dist/chunks/{chunk-4Q5VS23S.js → chunk-3NSIZGHP.js} +3 -3
  6. package/dist/chunks/{chunk-QIHIANBF.js → chunk-3XU5UGVN.js} +1 -0
  7. package/dist/chunks/{chunk-NFAQ5Q3Z.js → chunk-3YDXZRSZ.js} +2 -2
  8. package/dist/chunks/{chunk-KFFW6MSL.js → chunk-4L73BR7G.js} +11 -12
  9. package/dist/chunks/{chunk-HMM7V4AU.js → chunk-4LDQIDKG.js} +2 -2
  10. package/dist/chunks/{chunk-4Z7KJQGN.js → chunk-4OEA5ILS.js} +0 -1
  11. package/dist/chunks/{chunk-WMD7Y6HT.js → chunk-4VJ3GTBX.js} +1 -1
  12. package/dist/chunks/{chunk-KOCX7HWE.js → chunk-7EJTBI6M.js} +11 -11
  13. package/dist/chunks/{chunk-VQSAZO3U.js → chunk-7Z5XFBB4.js} +140 -86
  14. package/dist/chunks/{chunk-5GMV7WTU.js → chunk-AAPG3P4D.js} +9 -11
  15. package/dist/chunks/{chunk-WS4HI35O.js → chunk-AORK3I3E.js} +1 -1
  16. package/dist/chunks/{chunk-IABMY4Q3.js → chunk-AXQNAI65.js} +1 -1
  17. package/dist/chunks/{chunk-XZ7CVBQ4.js → chunk-EBEBY45K.js} +11 -1
  18. package/dist/chunks/{chunk-LN5ZMLBU.js → chunk-GCKUEAUE.js} +2 -2
  19. package/dist/chunks/{chunk-JNOMOD7R.js → chunk-GQLARSTH.js} +1 -1
  20. package/dist/chunks/{chunk-JDKASMB2.js → chunk-H57DZL5B.js} +3 -3
  21. package/dist/chunks/{chunk-NCUOSZ6X.js → chunk-HAJ2XRTQ.js} +2 -2
  22. package/dist/chunks/{chunk-AES77UB7.js → chunk-HJVSVCAZ.js} +59 -14
  23. package/dist/chunks/{chunk-3LRN4Q7G.js → chunk-IS56OO2J.js} +3 -3
  24. package/dist/chunks/{chunk-SPXTKMOV.js → chunk-JJ36CB7A.js} +722 -938
  25. package/dist/chunks/{chunk-P3H4MP5H.js → chunk-JZLADLMF.js} +2 -2
  26. package/dist/chunks/{chunk-ABDTA3V2.js → chunk-KSIISCB2.js} +1 -1
  27. package/dist/chunks/{chunk-VS4O4MKY.js → chunk-MUBKPS2Z.js} +1 -1
  28. package/dist/chunks/{chunk-DFUTSURK.js → chunk-NF7HK5MP.js} +2 -2
  29. package/dist/chunks/{chunk-77JGNI4Z.js → chunk-NIOGCTVR.js} +2 -2
  30. package/dist/chunks/{chunk-5EDL2IVB.js → chunk-ONYQGA2O.js} +2 -2
  31. package/dist/chunks/{chunk-EYQEF55O.js → chunk-PR72OE3G.js} +4 -3
  32. package/dist/chunks/{chunk-IEKDY4FP.js → chunk-QGLS47RE.js} +1 -1
  33. package/dist/chunks/{chunk-BAAZFRLH.js → chunk-QV34LTI7.js} +420 -108
  34. package/dist/chunks/{chunk-YIK5Y7MI.js → chunk-RI23R2QO.js} +4 -4
  35. package/dist/chunks/{chunk-LDFOVKJS.js → chunk-RYUPBGRO.js} +34 -45
  36. package/dist/chunks/{chunk-3P3YBOCQ.js → chunk-SOSCFYOT.js} +2 -2
  37. package/dist/chunks/{chunk-JPVQD2PJ.js → chunk-TR6DYQV6.js} +1 -1
  38. package/dist/chunks/{chunk-JCLLQ23G.js → chunk-WOWCXMTU.js} +1 -1
  39. package/dist/chunks/{chunk-MSJX3VKI.js → chunk-X7KU44KR.js} +1 -1
  40. package/dist/chunks/{chunk-GDOCMDCB.js → chunk-XYYGNWMQ.js} +4 -4
  41. package/dist/chunks/{compile-vercel-config-BUURMPDD.js → compile-vercel-config-H4BUE5BZ.js} +5 -5
  42. package/dist/chunks/{delete-GBLJYO3T.js → delete-HVWVDBQF.js} +7 -7
  43. package/dist/chunks/{disable-QFE5TGWG.js → disable-CMBQPZ7L.js} +7 -7
  44. package/dist/chunks/{discard-IPPO7M2N.js → discard-ZDNWUYLY.js} +7 -7
  45. package/dist/chunks/{edit-KQD3MEZA.js → edit-YJYM3EKS.js} +9 -9
  46. package/dist/chunks/{enable-JBL4DMGJ.js → enable-ITE7U5C4.js} +7 -7
  47. package/dist/chunks/{export-KLWZUAYD.js → export-VVN33IBK.js} +7 -7
  48. package/dist/chunks/{inspect-TWW2XBDE.js → inspect-I7ILS3E2.js} +9 -9
  49. package/dist/chunks/{list-WJGLZ5ES.js → list-6PZO3UIZ.js} +7 -7
  50. package/dist/chunks/{list-UM77B7WK.js → list-BWIEHOTA.js} +10 -10
  51. package/dist/chunks/{ls-WVHDFPT3.js → ls-LZZFID76.js} +9 -9
  52. package/dist/chunks/{publish-45SAIZE4.js → publish-NULVZ7RB.js} +7 -7
  53. package/dist/chunks/{query-VH2TS6IS.js → query-BGI3AVJA.js} +9 -9
  54. package/dist/chunks/{reorder-NYENR2XY.js → reorder-G66QSKTR.js} +7 -7
  55. package/dist/chunks/{restore-H2VIG7KZ.js → restore-LHDVXFOH.js} +7 -7
  56. package/dist/chunks/{rm-RQEP4KMK.js → rm-DTAOTWXD.js} +9 -9
  57. package/dist/chunks/{routes-KDWN24QA.js → routes-2YVMQEPC.js} +2 -2
  58. package/dist/chunks/{rule-inspect-GR3RMO2J.js → rule-inspect-AOITFBTB.js} +9 -9
  59. package/dist/chunks/{rules-EOBQZE3T.js → rules-IW3XGCNA.js} +8 -8
  60. package/dist/chunks/{schema-OOGMY2SS.js → schema-2VCQ2MAA.js} +10 -10
  61. package/dist/chunks/{types-FAFL42RV.js → types-7VDI75PV.js} +4 -4
  62. package/dist/chunks/{update-VLOWX7UQ.js → update-L3DZ5STE.js} +9 -9
  63. package/dist/commands/build/index.js +21 -26
  64. package/dist/commands/deploy/index.js +87 -34
  65. package/dist/commands/dev/index.js +15 -15
  66. package/dist/commands/env/index.js +19 -19
  67. package/dist/commands/link/index.js +26 -22
  68. package/dist/commands/list/index.js +11 -11
  69. package/dist/commands-bulk.js +397 -214
  70. package/dist/help.js +1 -1
  71. package/dist/index.js +299 -49
  72. package/dist/version.mjs +1 -1
  73. package/package.json +27 -30
@@ -9,13 +9,13 @@ import {
9
9
  } from "./chunk-V5P25P7F.js";
10
10
  import {
11
11
  ua_default
12
- } from "./chunk-JCLLQ23G.js";
12
+ } from "./chunk-WOWCXMTU.js";
13
13
  import {
14
14
  getLocalPathConfig
15
- } from "./chunk-KFFW6MSL.js";
15
+ } from "./chunk-4L73BR7G.js";
16
16
  import {
17
17
  autoInstallVercelPlugin
18
- } from "./chunk-LDFOVKJS.js";
18
+ } from "./chunk-RYUPBGRO.js";
19
19
  import {
20
20
  DEFAULT_VERCEL_CONFIG_FILENAME,
21
21
  VERCEL_CONFIG_EXTENSIONS,
@@ -25,7 +25,6 @@ import {
25
25
  esm_default2,
26
26
  esm_default3,
27
27
  getUser,
28
- global_path_default,
29
28
  humanizePath,
30
29
  isBackspaceKey,
31
30
  isEnterKey,
@@ -41,20 +40,20 @@ import {
41
40
  useKeypress,
42
41
  usePrefix,
43
42
  useState
44
- } from "./chunk-SPXTKMOV.js";
43
+ } from "./chunk-JJ36CB7A.js";
45
44
  import {
46
- require_load_json_file,
47
- require_write_json_file
48
- } from "./chunk-4Z7KJQGN.js";
45
+ require_load_json_file
46
+ } from "./chunk-4OEA5ILS.js";
49
47
  import {
48
+ parseArguments,
50
49
  printError,
51
50
  require_strip_ansi
52
- } from "./chunk-JNOMOD7R.js";
51
+ } from "./chunk-GQLARSTH.js";
53
52
  import {
54
53
  APIError,
55
54
  NowError,
56
55
  getCommandName
57
- } from "./chunk-XZ7CVBQ4.js";
56
+ } from "./chunk-EBEBY45K.js";
58
57
  import {
59
58
  emoji,
60
59
  link_default,
@@ -366,7 +365,7 @@ var require_dist3 = __commonJS({
366
365
  var retrier = require_retry2();
367
366
  module.exports = function(fn, opts) {
368
367
  opts = opts || {};
369
- return new Promise(function(resolve, reject) {
368
+ return new Promise(function(resolve2, reject) {
370
369
  var op = retrier.operation(opts);
371
370
  var bail = function bail2(err) {
372
371
  return reject(err || new Error("Aborted"));
@@ -388,7 +387,7 @@ var require_dist3 = __commonJS({
388
387
  } catch (err) {
389
388
  return onError(err);
390
389
  }
391
- Promise.resolve(val).then(resolve, onError);
390
+ Promise.resolve(val).then(resolve2, onError);
392
391
  });
393
392
  });
394
393
  };
@@ -482,13 +481,13 @@ var require_define_lazy_prop = __commonJS({
482
481
  // ../../node_modules/.pnpm/open@8.4.0/node_modules/open/index.js
483
482
  var require_open = __commonJS({
484
483
  "../../node_modules/.pnpm/open@8.4.0/node_modules/open/index.js"(exports, module) {
485
- var path = __require("path");
484
+ var path2 = __require("path");
486
485
  var childProcess = __require("child_process");
487
486
  var { promises: fs, constants: fsConstants } = __require("fs");
488
487
  var isWsl = require_is_wsl();
489
488
  var isDocker = require_is_docker();
490
489
  var defineLazyProperty = require_define_lazy_prop();
491
- var localXdgOpenPath = path.join(__dirname, "xdg-open");
490
+ var localXdgOpenPath = path2.join(__dirname, "xdg-open");
492
491
  var { platform, arch } = process;
493
492
  var getWslDrivesMountPoint = (() => {
494
493
  const defaultMountPoint = "/mnt/";
@@ -630,14 +629,14 @@ var require_open = __commonJS({
630
629
  }
631
630
  const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
632
631
  if (options.wait) {
633
- return new Promise((resolve, reject) => {
632
+ return new Promise((resolve2, reject) => {
634
633
  subprocess.once("error", reject);
635
634
  subprocess.once("close", (exitCode) => {
636
635
  if (options.allowNonzeroExitCode && exitCode > 0) {
637
636
  reject(new Error(`Exited with code ${exitCode}`));
638
637
  return;
639
638
  }
640
- resolve(subprocess);
639
+ resolve2(subprocess);
641
640
  });
642
641
  });
643
642
  }
@@ -719,23 +718,35 @@ var require_open = __commonJS({
719
718
  }
720
719
  });
721
720
 
721
+ // src/util/config/global-path.ts
722
+ import path from "path";
723
+ import * as config from "@vercel/cli-config";
724
+ function getGlobalPathConfig2(argvSlice = process.argv.slice(2), cwd = process.cwd()) {
725
+ const args = parseArguments(argvSlice, {}, { permissive: true });
726
+ const confFlag = args.flags["--global-config"];
727
+ if (confFlag) {
728
+ return path.resolve(cwd, confFlag);
729
+ } else {
730
+ return config.getGlobalPathConfig();
731
+ }
732
+ }
733
+
722
734
  // src/util/config/files.ts
723
735
  var import_load_json_file = __toESM(require_load_json_file(), 1);
724
- var import_write_json_file = __toESM(require_write_json_file(), 1);
725
736
  var import_client = __toESM(require_dist2(), 1);
726
737
  import { join, basename, dirname } from "path";
727
738
  import { accessSync, constants } from "fs";
739
+ import * as config2 from "@vercel/cli-config";
728
740
  var import_error_utils = __toESM(require_dist(), 1);
729
- var VERCEL_DIR2 = global_path_default();
730
- var CONFIG_FILE_PATH = join(VERCEL_DIR2, "config.json");
731
- var AUTH_CONFIG_FILE_PATH = join(VERCEL_DIR2, "auth.json");
741
+ var VERCEL_DIR2 = getGlobalPathConfig2();
742
+ var CONFIG_FILE_PATH = config2.getConfigFilePath(VERCEL_DIR2);
743
+ var AUTH_CONFIG_FILE_PATH = config2.getAuthConfigFilePath(VERCEL_DIR2);
732
744
  var readConfigFile = () => {
733
- const config = import_load_json_file.default.sync(CONFIG_FILE_PATH);
734
- return config;
745
+ return config2.readGlobalConfigFile(CONFIG_FILE_PATH);
735
746
  };
736
747
  var writeToConfigFile = (stuff) => {
737
748
  try {
738
- import_write_json_file.default.sync(CONFIG_FILE_PATH, stuff, { indent: 2 });
749
+ config2.writeGlobalConfigFile(CONFIG_FILE_PATH, stuff);
739
750
  } catch (err) {
740
751
  if ((0, import_error_utils.isErrnoException)(err)) {
741
752
  if ((0, import_error_utils.isErrnoException)(err) && err.code === "EPERM") {
@@ -757,19 +768,12 @@ var writeToConfigFile = (stuff) => {
757
768
  throw err;
758
769
  }
759
770
  };
760
- var readAuthConfigFile = () => {
761
- const config = import_load_json_file.default.sync(AUTH_CONFIG_FILE_PATH);
762
- return config;
771
+ var readAuthConfigFile2 = () => {
772
+ return config2.readAuthConfigFile(AUTH_CONFIG_FILE_PATH);
763
773
  };
764
774
  var writeToAuthConfigFile = (authConfig) => {
765
- if (authConfig.skipWrite) {
766
- return;
767
- }
768
775
  try {
769
- return import_write_json_file.default.sync(AUTH_CONFIG_FILE_PATH, authConfig, {
770
- indent: 2,
771
- mode: 384
772
- });
776
+ return config2.writeAuthConfigFile(AUTH_CONFIG_FILE_PATH, authConfig);
773
777
  } catch (err) {
774
778
  if ((0, import_error_utils.isErrnoException)(err)) {
775
779
  if (err.code === "EPERM") {
@@ -791,14 +795,14 @@ var writeToAuthConfigFile = (authConfig) => {
791
795
  throw err;
792
796
  }
793
797
  };
794
- function getConfigFilePath() {
798
+ function getConfigFilePath2() {
795
799
  return CONFIG_FILE_PATH;
796
800
  }
797
- function getAuthConfigFilePath() {
801
+ function getAuthConfigFilePath2() {
798
802
  return AUTH_CONFIG_FILE_PATH;
799
803
  }
800
804
  function readLocalConfig(prefix = process.cwd()) {
801
- let config = void 0;
805
+ let config3 = void 0;
802
806
  let target = "";
803
807
  try {
804
808
  target = getLocalPathConfig(prefix);
@@ -815,7 +819,7 @@ function readLocalConfig(prefix = process.cwd()) {
815
819
  }
816
820
  try {
817
821
  accessSync(target, constants.F_OK);
818
- config = import_load_json_file.default.sync(target);
822
+ config3 = import_load_json_file.default.sync(target);
819
823
  } catch (err) {
820
824
  if ((0, import_error_utils.isErrnoException)(err) && err.code === "ENOENT") {
821
825
  } else if ((0, import_error_utils.isError)(err) && err.name === "JSONError") {
@@ -830,7 +834,7 @@ function readLocalConfig(prefix = process.cwd()) {
830
834
  process.exit(1);
831
835
  }
832
836
  }
833
- if (!config) {
837
+ if (!config3) {
834
838
  return;
835
839
  }
836
840
  const isCompiledConfig = basename(target) === "vercel.json" && basename(dirname(target)) === VERCEL_DIR;
@@ -854,26 +858,26 @@ function readLocalConfig(prefix = process.cwd()) {
854
858
  } catch {
855
859
  }
856
860
  }
857
- config[import_client.fileNameSymbol] = sourceFile || DEFAULT_VERCEL_CONFIG_FILENAME;
861
+ config3[import_client.fileNameSymbol] = sourceFile || DEFAULT_VERCEL_CONFIG_FILENAME;
858
862
  } else {
859
- config[import_client.fileNameSymbol] = basename(target);
863
+ config3[import_client.fileNameSymbol] = basename(target);
860
864
  }
861
- return config;
865
+ return config3;
862
866
  }
863
867
 
864
868
  // src/util/client.ts
865
869
  var import_chalk5 = __toESM(require_source(), 1);
866
870
 
867
871
  // ../../node_modules/.pnpm/@inquirer+confirm@3.1.2/node_modules/@inquirer/confirm/dist/esm/index.mjs
868
- var esm_default4 = createPrompt((config, done) => {
869
- const { transformer = (answer) => answer ? "yes" : "no" } = config;
872
+ var esm_default4 = createPrompt((config3, done) => {
873
+ const { transformer = (answer) => answer ? "yes" : "no" } = config3;
870
874
  const [status, setStatus] = useState("pending");
871
875
  const [value, setValue] = useState("");
872
- const theme = makeTheme(config.theme);
876
+ const theme = makeTheme(config3.theme);
873
877
  const prefix = usePrefix({ theme });
874
878
  useKeypress((key, rl) => {
875
879
  if (isEnterKey(key)) {
876
- let answer = config.default !== false;
880
+ let answer = config3.default !== false;
877
881
  if (/^(y|yes)/i.test(value))
878
882
  answer = true;
879
883
  else if (/^(n|no)/i.test(value))
@@ -890,9 +894,9 @@ var esm_default4 = createPrompt((config, done) => {
890
894
  if (status === "done") {
891
895
  formattedValue = theme.style.answer(value);
892
896
  } else {
893
- defaultValue = ` ${theme.style.defaultAnswer(config.default === false ? "y/N" : "Y/n")}`;
897
+ defaultValue = ` ${theme.style.defaultAnswer(config3.default === false ? "y/N" : "Y/n")}`;
894
898
  }
895
- const message = theme.style.message(config.message);
899
+ const message = theme.style.message(config3.message);
896
900
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
897
901
  });
898
902
 
@@ -913,13 +917,13 @@ function getChoiceKey(choice, key) {
913
917
  return choice.value;
914
918
  return choice.name;
915
919
  }
916
- var esm_default5 = createPrompt((config, done) => {
917
- const { choices, default: defaultKey = "h", expanded: defaultExpandState = false } = config;
920
+ var esm_default5 = createPrompt((config3, done) => {
921
+ const { choices, default: defaultKey = "h", expanded: defaultExpandState = false } = config3;
918
922
  const [status, setStatus] = useState("pending");
919
923
  const [value, setValue] = useState("");
920
924
  const [expanded, setExpanded] = useState(defaultExpandState);
921
925
  const [errorMsg, setError] = useState(void 0);
922
- const theme = makeTheme(config.theme);
926
+ const theme = makeTheme(config3.theme);
923
927
  const prefix = usePrefix({ theme });
924
928
  useKeypress((event, rl) => {
925
929
  if (isEnterKey(event)) {
@@ -944,7 +948,7 @@ var esm_default5 = createPrompt((config, done) => {
944
948
  setError(void 0);
945
949
  }
946
950
  });
947
- const message = theme.style.message(config.message);
951
+ const message = theme.style.message(config3.message);
948
952
  if (status === "done") {
949
953
  return `${prefix} ${message} ${theme.style.answer(value)}`;
950
954
  }
@@ -983,11 +987,11 @@ var esm_default5 = createPrompt((config, done) => {
983
987
  });
984
988
 
985
989
  // ../../node_modules/.pnpm/@inquirer+input@2.1.2/node_modules/@inquirer/input/dist/esm/index.mjs
986
- var esm_default6 = createPrompt((config, done) => {
987
- const { validate = () => true } = config;
988
- const theme = makeTheme(config.theme);
990
+ var esm_default6 = createPrompt((config3, done) => {
991
+ const { validate = () => true } = config3;
992
+ const theme = makeTheme(config3.theme);
989
993
  const [status, setStatus] = useState("pending");
990
- const [defaultValue = "", setDefaultValue] = useState(config.default);
994
+ const [defaultValue = "", setDefaultValue] = useState(config3.default);
991
995
  const [errorMsg, setError] = useState(void 0);
992
996
  const [value, setValue] = useState("");
993
997
  const isLoading = status === "loading";
@@ -1021,10 +1025,10 @@ var esm_default6 = createPrompt((config, done) => {
1021
1025
  setError(void 0);
1022
1026
  }
1023
1027
  });
1024
- const message = theme.style.message(config.message);
1028
+ const message = theme.style.message(config3.message);
1025
1029
  let formattedValue = value;
1026
- if (typeof config.transformer === "function") {
1027
- formattedValue = config.transformer(value, { isFinal: status === "done" });
1030
+ if (typeof config3.transformer === "function") {
1031
+ formattedValue = config3.transformer(value, { isFinal: status === "done" });
1028
1032
  } else if (status === "done") {
1029
1033
  formattedValue = theme.style.answer(value);
1030
1034
  }
@@ -1044,9 +1048,9 @@ var esm_default6 = createPrompt((config, done) => {
1044
1048
 
1045
1049
  // ../../node_modules/.pnpm/@inquirer+password@2.1.2/node_modules/@inquirer/password/dist/esm/index.mjs
1046
1050
  var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
1047
- var esm_default7 = createPrompt((config, done) => {
1048
- const { validate = () => true } = config;
1049
- const theme = makeTheme(config.theme);
1051
+ var esm_default7 = createPrompt((config3, done) => {
1052
+ const { validate = () => true } = config3;
1053
+ const theme = makeTheme(config3.theme);
1050
1054
  const [status, setStatus] = useState("pending");
1051
1055
  const [errorMsg, setError] = useState(void 0);
1052
1056
  const [value, setValue] = useState("");
@@ -1074,11 +1078,11 @@ var esm_default7 = createPrompt((config, done) => {
1074
1078
  setError(void 0);
1075
1079
  }
1076
1080
  });
1077
- const message = theme.style.message(config.message);
1081
+ const message = theme.style.message(config3.message);
1078
1082
  let formattedValue = "";
1079
1083
  let helpTip;
1080
- if (config.mask) {
1081
- const maskChar = typeof config.mask === "string" ? config.mask : "*";
1084
+ if (config3.mask) {
1085
+ const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
1082
1086
  formattedValue = maskChar.repeat(value.length);
1083
1087
  } else if (status !== "done") {
1084
1088
  helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes.default.cursorHide}`;
@@ -1563,19 +1567,19 @@ var PromisePolyfill = class extends Promise {
1563
1567
  // Available starting from Node 22
1564
1568
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
1565
1569
  static withResolver() {
1566
- let resolve;
1570
+ let resolve2;
1567
1571
  let reject;
1568
1572
  const promise = new Promise((res, rej) => {
1569
- resolve = res;
1573
+ resolve2 = res;
1570
1574
  reject = rej;
1571
1575
  });
1572
- return { promise, resolve, reject };
1576
+ return { promise, resolve: resolve2, reject };
1573
1577
  }
1574
1578
  };
1575
1579
 
1576
1580
  // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/create-prompt.mjs
1577
1581
  function createPrompt2(view) {
1578
- const prompt = (config, context = {}) => {
1582
+ const prompt = (config3, context = {}) => {
1579
1583
  const { input = process.stdin, signal } = context;
1580
1584
  const cleanups = /* @__PURE__ */ new Set();
1581
1585
  const output = new import_mute_stream.default();
@@ -1586,7 +1590,7 @@ function createPrompt2(view) {
1586
1590
  output
1587
1591
  });
1588
1592
  const screen = new ScreenManager(rl);
1589
- const { promise, resolve, reject } = PromisePolyfill.withResolver();
1593
+ const { promise, resolve: resolve2, reject } = PromisePolyfill.withResolver();
1590
1594
  const cancel = () => reject(new CancelPromptError());
1591
1595
  if (signal) {
1592
1596
  const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
@@ -1609,8 +1613,8 @@ function createPrompt2(view) {
1609
1613
  cleanups.add(() => rl.removeListener("close", hooksCleanup));
1610
1614
  cycle(() => {
1611
1615
  try {
1612
- const nextView = view(config, (value) => {
1613
- setImmediate(() => resolve(value));
1616
+ const nextView = view(config3, (value) => {
1617
+ setImmediate(() => resolve2(value));
1614
1618
  });
1615
1619
  const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
1616
1620
  screen.render(content, bottomContent);
@@ -1686,9 +1690,9 @@ function normalizeChoices(choices) {
1686
1690
  };
1687
1691
  });
1688
1692
  }
1689
- var esm_default8 = createPrompt2((config, done) => {
1690
- const { pageSize = 7, validate = () => true } = config;
1691
- const theme = makeTheme2(searchTheme, config.theme);
1693
+ var esm_default8 = createPrompt2((config3, done) => {
1694
+ const { pageSize = 7, validate = () => true } = config3;
1695
+ const theme = makeTheme2(searchTheme, config3.theme);
1692
1696
  const firstRender = useRef(true);
1693
1697
  const [status, setStatus] = useState2("loading");
1694
1698
  const [searchTerm, setSearchTerm] = useState2("");
@@ -1707,7 +1711,7 @@ var esm_default8 = createPrompt2((config, done) => {
1707
1711
  setSearchError(void 0);
1708
1712
  const fetchResults = async () => {
1709
1713
  try {
1710
- const results = await config.source(searchTerm || void 0, {
1714
+ const results = await config3.source(searchTerm || void 0, {
1711
1715
  signal: controller.signal
1712
1716
  });
1713
1717
  if (!controller.signal.aborted) {
@@ -1764,7 +1768,7 @@ var esm_default8 = createPrompt2((config, done) => {
1764
1768
  setSearchTerm(rl.line);
1765
1769
  }
1766
1770
  });
1767
- const message = theme.style.message(config.message, status);
1771
+ const message = theme.style.message(config3.message, status);
1768
1772
  if (active > 0) {
1769
1773
  firstRender.current = false;
1770
1774
  }
@@ -1816,8 +1820,14 @@ ${theme.style.description(selectedChoice.description)}` : ``;
1816
1820
  // src/util/client.ts
1817
1821
  var import_async_retry = __toESM(require_dist3(), 1);
1818
1822
  var import_node_fetch2 = __toESM(require_lib2(), 1);
1823
+ import { join as join2, resolve } from "path";
1819
1824
  import { EventEmitter } from "events";
1820
1825
  import { URL as URL2 } from "url";
1826
+ import {
1827
+ getGlobalPathConfig as getSharedGlobalPathConfig,
1828
+ readConfigFile as readSharedConfigFile,
1829
+ writeConfigFile as writeSharedConfigFile
1830
+ } from "@vercel/cli-config";
1821
1831
 
1822
1832
  // src/util/response-error.ts
1823
1833
  async function responseError(res, fallbackMessage = null, parsedBody = {}) {
@@ -2249,7 +2259,7 @@ async function login(client, telemetry) {
2249
2259
  }
2250
2260
  client.writeToAuthConfigFile();
2251
2261
  client.writeToConfigFile();
2252
- output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
2262
+ output_manager_default.debug(`Saved credentials in "${humanizePath(client.getGlobalPathConfig())}"`);
2253
2263
  output_manager_default.print(`
2254
2264
  ${import_chalk3.default.cyan("Congratulations!")} You are now signed in.
2255
2265
 
@@ -2263,7 +2273,7 @@ async function login(client, telemetry) {
2263
2273
  return 0;
2264
2274
  }
2265
2275
  async function wait(intervalMs) {
2266
- await new Promise((resolve) => setTimeout(resolve, intervalMs));
2276
+ await new Promise((resolve2) => setTimeout(resolve2, intervalMs));
2267
2277
  }
2268
2278
 
2269
2279
  // src/util/login/reauthenticate.ts
@@ -2328,8 +2338,8 @@ var import_error_utils2 = __toESM(require_dist(), 1);
2328
2338
 
2329
2339
  // src/util/sleep.ts
2330
2340
  function sleep(ms) {
2331
- return new Promise((resolve) => {
2332
- setTimeout(resolve, ms);
2341
+ return new Promise((resolve2) => {
2342
+ setTimeout(resolve2, ms);
2333
2343
  });
2334
2344
  }
2335
2345
 
@@ -2354,6 +2364,7 @@ function hasRefreshToken(authConfig) {
2354
2364
  var Client = class extends EventEmitter {
2355
2365
  constructor(opts) {
2356
2366
  super();
2367
+ this._argv = [];
2357
2368
  /** Track if we've already logged the token source debug message */
2358
2369
  this._loggedTokenSource = false;
2359
2370
  this.reauthenticate = sharedPromise(async function(error) {
@@ -2374,7 +2385,7 @@ var Client = class extends EventEmitter {
2374
2385
  ${error.stack}`);
2375
2386
  };
2376
2387
  this.agent = opts.agent;
2377
- this.argv = opts.argv;
2388
+ this.setArgv(opts.argv);
2378
2389
  this.apiUrl = opts.apiUrl;
2379
2390
  this.authConfig = opts.authConfig;
2380
2391
  this.stdin = opts.stdin;
@@ -2418,6 +2429,26 @@ ${error.stack}`);
2418
2429
  )
2419
2430
  };
2420
2431
  }
2432
+ get argv() {
2433
+ return this._argv;
2434
+ }
2435
+ setArgv(argvOrFirst, ...rest) {
2436
+ const argv = Array.isArray(argvOrFirst) ? argvOrFirst : [argvOrFirst, ...rest];
2437
+ this._argv = argv;
2438
+ this._parsedArgsCache = void 0;
2439
+ }
2440
+ getParsedArgs() {
2441
+ if (!this._parsedArgsCache) {
2442
+ this._parsedArgsCache = parseArguments(
2443
+ this.argv.slice(2),
2444
+ {},
2445
+ {
2446
+ permissive: true
2447
+ }
2448
+ );
2449
+ }
2450
+ return this._parsedArgsCache;
2451
+ }
2421
2452
  retry(fn, { retries = 3, maxTimeout = Infinity } = {}) {
2422
2453
  return (0, import_async_retry.default)(fn, {
2423
2454
  retries,
@@ -2477,8 +2508,30 @@ ${error.stack}`);
2477
2508
  this.writeToConfigFile();
2478
2509
  output_manager_default.debug("Tokens refreshed successfully.");
2479
2510
  }
2480
- updateConfig(config) {
2481
- this.config = { ...this.config, ...config };
2511
+ getGlobalPathConfig() {
2512
+ const confFlag = this.getParsedArgs().flags["--global-config"];
2513
+ if (typeof confFlag === "string") {
2514
+ return resolve(this.cwd, confFlag);
2515
+ }
2516
+ return getSharedGlobalPathConfig();
2517
+ }
2518
+ async readConfig(fileName, schema) {
2519
+ const filePath = join2(this.getGlobalPathConfig(), fileName);
2520
+ return readSharedConfigFile(filePath, schema);
2521
+ }
2522
+ async maybeReadConfig(fileName, schema) {
2523
+ try {
2524
+ return await this.readConfig(fileName, schema);
2525
+ } catch {
2526
+ return null;
2527
+ }
2528
+ }
2529
+ async writeConfig(fileName, schema, value) {
2530
+ const filePath = join2(this.getGlobalPathConfig(), fileName);
2531
+ writeSharedConfigFile(filePath, schema, value);
2532
+ }
2533
+ updateConfig(config3) {
2534
+ this.config = { ...this.config, ...config3 };
2482
2535
  }
2483
2536
  writeToConfigFile() {
2484
2537
  writeToConfigFile(this.config);
@@ -2654,6 +2707,7 @@ Are you sure you want to proceed?`;
2654
2707
  };
2655
2708
 
2656
2709
  export {
2710
+ getGlobalPathConfig2 as getGlobalPathConfig,
2657
2711
  require_dist3 as require_dist,
2658
2712
  printIndications,
2659
2713
  require_open,
@@ -2662,10 +2716,10 @@ export {
2662
2716
  login,
2663
2717
  readConfigFile,
2664
2718
  writeToConfigFile,
2665
- readAuthConfigFile,
2719
+ readAuthConfigFile2 as readAuthConfigFile,
2666
2720
  writeToAuthConfigFile,
2667
- getConfigFilePath,
2668
- getAuthConfigFilePath,
2721
+ getConfigFilePath2 as getConfigFilePath,
2722
+ getAuthConfigFilePath2 as getAuthConfigFilePath,
2669
2723
  readLocalConfig,
2670
2724
  sleep,
2671
2725
  isJSONObject,
@@ -6,24 +6,22 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getUpdateCommand
9
- } from "./chunk-NFAQ5Q3Z.js";
9
+ } from "./chunk-3YDXZRSZ.js";
10
10
  import {
11
+ getGlobalPathConfig,
11
12
  login
12
- } from "./chunk-VQSAZO3U.js";
13
+ } from "./chunk-7Z5XFBB4.js";
13
14
  import {
14
15
  apiCommand,
15
16
  listSubcommand2 as listSubcommand,
16
17
  loginCommand
17
- } from "./chunk-AES77UB7.js";
18
+ } from "./chunk-HJVSVCAZ.js";
18
19
  import {
19
20
  help
20
- } from "./chunk-3LRN4Q7G.js";
21
- import {
22
- global_path_default
23
- } from "./chunk-SPXTKMOV.js";
21
+ } from "./chunk-IS56OO2J.js";
24
22
  import {
25
23
  TelemetryClient
26
- } from "./chunk-4Z7KJQGN.js";
24
+ } from "./chunk-4OEA5ILS.js";
27
25
  import {
28
26
  require_ms
29
27
  } from "./chunk-CO5D46AG.js";
@@ -32,10 +30,10 @@ import {
32
30
  parseArguments,
33
31
  printError,
34
32
  require_strip_ansi
35
- } from "./chunk-JNOMOD7R.js";
33
+ } from "./chunk-GQLARSTH.js";
36
34
  import {
37
35
  packageName
38
- } from "./chunk-XZ7CVBQ4.js";
36
+ } from "./chunk-EBEBY45K.js";
39
37
  import {
40
38
  output_manager_default
41
39
  } from "./chunk-ZQKJVHXY.js";
@@ -146,7 +144,7 @@ var FETCH_TIMEOUT_MS = 10 * 1e3;
146
144
  var OpenApiCache = class {
147
145
  constructor() {
148
146
  this.spec = null;
149
- this.cachePath = join(global_path_default(), CACHE_FILE);
147
+ this.cachePath = join(getGlobalPathConfig(), CACHE_FILE);
150
148
  }
151
149
  /**
152
150
  * Check if the spec has been loaded
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  formatCondition,
9
9
  formatTransform
10
- } from "./chunk-GDOCMDCB.js";
10
+ } from "./chunk-XYYGNWMQ.js";
11
11
  import {
12
12
  output_manager_default
13
13
  } from "./chunk-ZQKJVHXY.js";
@@ -10,7 +10,7 @@ import {
10
10
  isAPIError,
11
11
  packageName,
12
12
  stripSensitiveAuthArgs
13
- } from "./chunk-XZ7CVBQ4.js";
13
+ } from "./chunk-EBEBY45K.js";
14
14
  import {
15
15
  require_dist
16
16
  } from "./chunk-ZQKJVHXY.js";
@@ -795,12 +795,21 @@ var ConflictingConfigFiles = class extends NowBuildError {
795
795
  constructor(files, message, link) {
796
796
  super({
797
797
  code: "CONFLICTING_CONFIG_FILES",
798
- message: message || "Cannot use both a `vercel.json` and `now.json` file. Please delete the `now.json` file.",
798
+ message: message || "Multiple config files found. Please use only one configuration file.",
799
799
  link: link || "https://vercel.link/combining-old-and-new-config"
800
800
  });
801
801
  this.files = files;
802
802
  }
803
803
  };
804
+ var DeprecatedNowJson = class extends NowBuildError {
805
+ constructor(_file) {
806
+ super({
807
+ code: "DEPRECATED_NOW_JSON",
808
+ message: "The `now.json` file is deprecated and no longer supported. Please rename it to `vercel.json`.",
809
+ link: "https://vercel.com/docs/projects/project-configuration"
810
+ });
811
+ }
812
+ };
804
813
  var CantFindConfig = class extends NowError {
805
814
  constructor(paths) {
806
815
  super({
@@ -1139,6 +1148,7 @@ export {
1139
1148
  CertMissing,
1140
1149
  CantParseJSONFile,
1141
1150
  ConflictingConfigFiles,
1151
+ DeprecatedNowJson,
1142
1152
  CantFindConfig,
1143
1153
  WorkingDirectoryDoesNotExist,
1144
1154
  NoAliasInConfig,
@@ -8,10 +8,10 @@ import {
8
8
  formatOption,
9
9
  limitOption,
10
10
  nextOption
11
- } from "./chunk-JNOMOD7R.js";
11
+ } from "./chunk-GQLARSTH.js";
12
12
  import {
13
13
  packageName
14
- } from "./chunk-XZ7CVBQ4.js";
14
+ } from "./chunk-EBEBY45K.js";
15
15
 
16
16
  // src/commands/activity/command.ts
17
17
  var typesSubcommand = {
@@ -11,7 +11,7 @@ import {
11
11
  parseRetryAfterHeaderAsMillis,
12
12
  require_bytes,
13
13
  stripSensitiveAuthArgs
14
- } from "./chunk-XZ7CVBQ4.js";
14
+ } from "./chunk-EBEBY45K.js";
15
15
  import {
16
16
  output_manager_default
17
17
  } from "./chunk-ZQKJVHXY.js";