vercel 53.2.0 → 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.
- package/dist/chunks/{add-C7TQF4LB.js → add-PGPQCMJK.js} +9 -9
- package/dist/chunks/{chunk-HQU26P3O.js → chunk-25WI74GM.js} +7 -7
- package/dist/chunks/{chunk-TPBMA2WF.js → chunk-2TNGZL25.js} +2 -2
- package/dist/chunks/{chunk-FFKXMQXF.js → chunk-3GJFG6GX.js} +4 -4
- package/dist/chunks/{chunk-4Q5VS23S.js → chunk-3NSIZGHP.js} +3 -3
- package/dist/chunks/{chunk-3GBASY24.js → chunk-3YDXZRSZ.js} +2 -2
- package/dist/chunks/{chunk-QT4W4DLL.js → chunk-4L73BR7G.js} +11 -12
- package/dist/chunks/{chunk-HMM7V4AU.js → chunk-4LDQIDKG.js} +2 -2
- package/dist/chunks/{chunk-4Z7KJQGN.js → chunk-4OEA5ILS.js} +0 -1
- package/dist/chunks/{chunk-7FQIXP2G.js → chunk-4VJ3GTBX.js} +1 -1
- package/dist/chunks/{chunk-4M7OEHTY.js → chunk-7EJTBI6M.js} +11 -11
- package/dist/chunks/{chunk-YEGTCAP6.js → chunk-7Z5XFBB4.js} +140 -86
- package/dist/chunks/{chunk-6N4RFT24.js → chunk-AAPG3P4D.js} +9 -11
- package/dist/chunks/{chunk-RJWHOSUL.js → chunk-AORK3I3E.js} +1 -1
- package/dist/chunks/{chunk-IABMY4Q3.js → chunk-AXQNAI65.js} +1 -1
- package/dist/chunks/{chunk-XZ7CVBQ4.js → chunk-EBEBY45K.js} +11 -1
- package/dist/chunks/{chunk-LN5ZMLBU.js → chunk-GCKUEAUE.js} +2 -2
- package/dist/chunks/{chunk-JNOMOD7R.js → chunk-GQLARSTH.js} +1 -1
- package/dist/chunks/{chunk-AMXEAJTC.js → chunk-H57DZL5B.js} +3 -3
- package/dist/chunks/{chunk-NCUOSZ6X.js → chunk-HAJ2XRTQ.js} +2 -2
- package/dist/chunks/{chunk-2STWVKG7.js → chunk-HJVSVCAZ.js} +28 -13
- package/dist/chunks/{chunk-3LRN4Q7G.js → chunk-IS56OO2J.js} +3 -3
- package/dist/chunks/{chunk-AB7YF6KM.js → chunk-JJ36CB7A.js} +719 -923
- package/dist/chunks/{chunk-P3H4MP5H.js → chunk-JZLADLMF.js} +2 -2
- package/dist/chunks/{chunk-ABDTA3V2.js → chunk-KSIISCB2.js} +1 -1
- package/dist/chunks/{chunk-VS4O4MKY.js → chunk-MUBKPS2Z.js} +1 -1
- package/dist/chunks/{chunk-DFUTSURK.js → chunk-NF7HK5MP.js} +2 -2
- package/dist/chunks/{chunk-77JGNI4Z.js → chunk-NIOGCTVR.js} +2 -2
- package/dist/chunks/{chunk-5EDL2IVB.js → chunk-ONYQGA2O.js} +2 -2
- package/dist/chunks/{chunk-FLZW555J.js → chunk-PR72OE3G.js} +2 -2
- package/dist/chunks/{chunk-IEKDY4FP.js → chunk-QGLS47RE.js} +1 -1
- package/dist/chunks/{chunk-MAPNH6ND.js → chunk-QV34LTI7.js} +403 -101
- package/dist/chunks/{chunk-2TJ5Y674.js → chunk-RI23R2QO.js} +4 -4
- package/dist/chunks/{chunk-MZVW2VM7.js → chunk-RYUPBGRO.js} +34 -45
- package/dist/chunks/{chunk-4DLW7XLJ.js → chunk-SOSCFYOT.js} +2 -2
- package/dist/chunks/{chunk-X6H25N2H.js → chunk-TR6DYQV6.js} +1 -1
- package/dist/chunks/{chunk-JCLLQ23G.js → chunk-WOWCXMTU.js} +1 -1
- package/dist/chunks/{chunk-MSJX3VKI.js → chunk-X7KU44KR.js} +1 -1
- package/dist/chunks/{chunk-FK7LDWAI.js → chunk-XYYGNWMQ.js} +4 -4
- package/dist/chunks/{compile-vercel-config-QKQSM6VM.js → compile-vercel-config-H4BUE5BZ.js} +5 -5
- package/dist/chunks/{delete-LUW77HWU.js → delete-HVWVDBQF.js} +7 -7
- package/dist/chunks/{disable-ITW6P3R3.js → disable-CMBQPZ7L.js} +7 -7
- package/dist/chunks/{discard-GDFQ4V4V.js → discard-ZDNWUYLY.js} +7 -7
- package/dist/chunks/{edit-ZN7PQWZH.js → edit-YJYM3EKS.js} +9 -9
- package/dist/chunks/{enable-VTJNEZ5Q.js → enable-ITE7U5C4.js} +7 -7
- package/dist/chunks/{export-54A2LINR.js → export-VVN33IBK.js} +7 -7
- package/dist/chunks/{inspect-UMXWXZMZ.js → inspect-I7ILS3E2.js} +9 -9
- package/dist/chunks/{list-OJCLL4JA.js → list-6PZO3UIZ.js} +7 -7
- package/dist/chunks/{list-JZMV62KB.js → list-BWIEHOTA.js} +10 -10
- package/dist/chunks/{ls-B677IDAB.js → ls-LZZFID76.js} +9 -9
- package/dist/chunks/{publish-SI4H6WPL.js → publish-NULVZ7RB.js} +7 -7
- package/dist/chunks/{query-2CL2LAOA.js → query-BGI3AVJA.js} +9 -9
- package/dist/chunks/{reorder-E6R3ZL6W.js → reorder-G66QSKTR.js} +7 -7
- package/dist/chunks/{restore-ZVC2USSZ.js → restore-LHDVXFOH.js} +7 -7
- package/dist/chunks/{rm-F3ESGYZE.js → rm-DTAOTWXD.js} +9 -9
- package/dist/chunks/{routes-KDWN24QA.js → routes-2YVMQEPC.js} +2 -2
- package/dist/chunks/{rule-inspect-AWORVTNG.js → rule-inspect-AOITFBTB.js} +9 -9
- package/dist/chunks/{rules-KSDPKR6Z.js → rules-IW3XGCNA.js} +8 -8
- package/dist/chunks/{schema-UGF5QQ3K.js → schema-2VCQ2MAA.js} +10 -10
- package/dist/chunks/{types-FAFL42RV.js → types-7VDI75PV.js} +4 -4
- package/dist/chunks/{update-GXZVHW4O.js → update-L3DZ5STE.js} +9 -9
- package/dist/commands/build/index.js +21 -26
- package/dist/commands/deploy/index.js +64 -33
- package/dist/commands/dev/index.js +15 -15
- package/dist/commands/env/index.js +19 -19
- package/dist/commands/link/index.js +20 -20
- package/dist/commands/list/index.js +11 -11
- package/dist/commands-bulk.js +378 -210
- package/dist/index.js +298 -48
- package/dist/version.mjs +1 -1
- package/package.json +21 -19
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-V5P25P7F.js";
|
|
10
10
|
import {
|
|
11
11
|
ua_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WOWCXMTU.js";
|
|
13
13
|
import {
|
|
14
14
|
getLocalPathConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4L73BR7G.js";
|
|
16
16
|
import {
|
|
17
17
|
autoInstallVercelPlugin
|
|
18
|
-
} from "./chunk-
|
|
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-
|
|
43
|
+
} from "./chunk-JJ36CB7A.js";
|
|
45
44
|
import {
|
|
46
|
-
require_load_json_file
|
|
47
|
-
|
|
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-
|
|
51
|
+
} from "./chunk-GQLARSTH.js";
|
|
53
52
|
import {
|
|
54
53
|
APIError,
|
|
55
54
|
NowError,
|
|
56
55
|
getCommandName
|
|
57
|
-
} from "./chunk-
|
|
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(
|
|
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(
|
|
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
|
|
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 =
|
|
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((
|
|
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
|
-
|
|
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 =
|
|
730
|
-
var CONFIG_FILE_PATH =
|
|
731
|
-
var AUTH_CONFIG_FILE_PATH =
|
|
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
|
-
|
|
734
|
-
return config;
|
|
745
|
+
return config2.readGlobalConfigFile(CONFIG_FILE_PATH);
|
|
735
746
|
};
|
|
736
747
|
var writeToConfigFile = (stuff) => {
|
|
737
748
|
try {
|
|
738
|
-
|
|
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
|
|
761
|
-
|
|
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
|
|
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
|
|
798
|
+
function getConfigFilePath2() {
|
|
795
799
|
return CONFIG_FILE_PATH;
|
|
796
800
|
}
|
|
797
|
-
function
|
|
801
|
+
function getAuthConfigFilePath2() {
|
|
798
802
|
return AUTH_CONFIG_FILE_PATH;
|
|
799
803
|
}
|
|
800
804
|
function readLocalConfig(prefix = process.cwd()) {
|
|
801
|
-
let
|
|
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
|
-
|
|
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 (!
|
|
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
|
-
|
|
861
|
+
config3[import_client.fileNameSymbol] = sourceFile || DEFAULT_VERCEL_CONFIG_FILENAME;
|
|
858
862
|
} else {
|
|
859
|
-
|
|
863
|
+
config3[import_client.fileNameSymbol] = basename(target);
|
|
860
864
|
}
|
|
861
|
-
return
|
|
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((
|
|
869
|
-
const { transformer = (answer) => answer ? "yes" : "no" } =
|
|
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(
|
|
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 =
|
|
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(
|
|
897
|
+
defaultValue = ` ${theme.style.defaultAnswer(config3.default === false ? "y/N" : "Y/n")}`;
|
|
894
898
|
}
|
|
895
|
-
const message = theme.style.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((
|
|
917
|
-
const { choices, default: defaultKey = "h", expanded: defaultExpandState = false } =
|
|
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(
|
|
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(
|
|
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((
|
|
987
|
-
const { validate = () => true } =
|
|
988
|
-
const theme = makeTheme(
|
|
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(
|
|
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(
|
|
1028
|
+
const message = theme.style.message(config3.message);
|
|
1025
1029
|
let formattedValue = value;
|
|
1026
|
-
if (typeof
|
|
1027
|
-
formattedValue =
|
|
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((
|
|
1048
|
-
const { validate = () => true } =
|
|
1049
|
-
const theme = makeTheme(
|
|
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(
|
|
1081
|
+
const message = theme.style.message(config3.message);
|
|
1078
1082
|
let formattedValue = "";
|
|
1079
1083
|
let helpTip;
|
|
1080
|
-
if (
|
|
1081
|
-
const maskChar = typeof
|
|
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
|
|
1570
|
+
let resolve2;
|
|
1567
1571
|
let reject;
|
|
1568
1572
|
const promise = new Promise((res, rej) => {
|
|
1569
|
-
|
|
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 = (
|
|
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(
|
|
1613
|
-
setImmediate(() =>
|
|
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((
|
|
1690
|
-
const { pageSize = 7, validate = () => true } =
|
|
1691
|
-
const theme = makeTheme2(searchTheme,
|
|
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
|
|
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(
|
|
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(
|
|
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((
|
|
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((
|
|
2332
|
-
setTimeout(
|
|
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.
|
|
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
|
-
|
|
2481
|
-
|
|
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-
|
|
9
|
+
} from "./chunk-3YDXZRSZ.js";
|
|
10
10
|
import {
|
|
11
|
+
getGlobalPathConfig,
|
|
11
12
|
login
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7Z5XFBB4.js";
|
|
13
14
|
import {
|
|
14
15
|
apiCommand,
|
|
15
16
|
listSubcommand2 as listSubcommand,
|
|
16
17
|
loginCommand
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HJVSVCAZ.js";
|
|
18
19
|
import {
|
|
19
20
|
help
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
global_path_default
|
|
23
|
-
} from "./chunk-AB7YF6KM.js";
|
|
21
|
+
} from "./chunk-IS56OO2J.js";
|
|
24
22
|
import {
|
|
25
23
|
TelemetryClient
|
|
26
|
-
} from "./chunk-
|
|
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-
|
|
33
|
+
} from "./chunk-GQLARSTH.js";
|
|
36
34
|
import {
|
|
37
35
|
packageName
|
|
38
|
-
} from "./chunk-
|
|
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(
|
|
147
|
+
this.cachePath = join(getGlobalPathConfig(), CACHE_FILE);
|
|
150
148
|
}
|
|
151
149
|
/**
|
|
152
150
|
* Check if the spec has been loaded
|
|
@@ -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 || "
|
|
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-
|
|
11
|
+
} from "./chunk-GQLARSTH.js";
|
|
12
12
|
import {
|
|
13
13
|
packageName
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EBEBY45K.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/activity/command.ts
|
|
17
17
|
var typesSubcommand = {
|