vercel 35.2.2 → 35.2.4
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/index.js +848 -846
- package/package.json +9 -7
package/dist/index.js
CHANGED
@@ -98,20 +98,20 @@ var require_dist2 = __commonJS2({
|
|
98
98
|
isErrnoException: () => isErrnoException21,
|
99
99
|
isError: () => isError15,
|
100
100
|
isErrorLike: () => isErrorLike,
|
101
|
-
isObject: () =>
|
101
|
+
isObject: () => isObject2,
|
102
102
|
isSpawnError: () => isSpawnError2,
|
103
103
|
normalizeError: () => normalizeError3
|
104
104
|
});
|
105
105
|
module2.exports = __toCommonJS4(src_exports2);
|
106
106
|
var import_node_util = __toESM4(require("util"));
|
107
|
-
var
|
107
|
+
var isObject2 = (obj) => typeof obj === "object" && obj !== null;
|
108
108
|
var isError15 = (error4) => {
|
109
109
|
return import_node_util.default.types.isNativeError(error4);
|
110
110
|
};
|
111
111
|
var isErrnoException21 = (error4) => {
|
112
112
|
return isError15(error4) && "code" in error4;
|
113
113
|
};
|
114
|
-
var isErrorLike = (error4) =>
|
114
|
+
var isErrorLike = (error4) => isObject2(error4) && "message" in error4;
|
115
115
|
var errorToString13 = (error4, fallback) => {
|
116
116
|
if (isError15(error4) || isErrorLike(error4))
|
117
117
|
return error4.message;
|
@@ -30921,10 +30921,10 @@ var require_util2 = __commonJS2({
|
|
30921
30921
|
return objectToString(re) === "[object RegExp]";
|
30922
30922
|
}
|
30923
30923
|
exports2.isRegExp = isRegExp;
|
30924
|
-
function
|
30924
|
+
function isObject2(arg2) {
|
30925
30925
|
return typeof arg2 === "object" && arg2 !== null;
|
30926
30926
|
}
|
30927
|
-
exports2.isObject =
|
30927
|
+
exports2.isObject = isObject2;
|
30928
30928
|
function isDate(d) {
|
30929
30929
|
return objectToString(d) === "[object Date]";
|
30930
30930
|
}
|
@@ -52260,19 +52260,19 @@ var require_lib9 = __commonJS2({
|
|
52260
52260
|
this._persistentParams = this._persistentParams || {};
|
52261
52261
|
this._persistentParams[key] = value;
|
52262
52262
|
},
|
52263
|
-
pageview: function(path11, hostname2,
|
52263
|
+
pageview: function(path11, hostname2, title8, params2, fn2) {
|
52264
52264
|
if (typeof path11 === "object" && path11 != null) {
|
52265
52265
|
params2 = path11;
|
52266
52266
|
if (typeof hostname2 === "function") {
|
52267
52267
|
fn2 = hostname2;
|
52268
52268
|
}
|
52269
|
-
path11 = hostname2 =
|
52269
|
+
path11 = hostname2 = title8 = null;
|
52270
52270
|
} else if (typeof hostname2 === "function") {
|
52271
52271
|
fn2 = hostname2;
|
52272
|
-
hostname2 =
|
52273
|
-
} else if (typeof
|
52274
|
-
fn2 =
|
52275
|
-
|
52272
|
+
hostname2 = title8 = null;
|
52273
|
+
} else if (typeof title8 === "function") {
|
52274
|
+
fn2 = title8;
|
52275
|
+
title8 = null;
|
52276
52276
|
} else if (typeof params2 === "function") {
|
52277
52277
|
fn2 = params2;
|
52278
52278
|
params2 = null;
|
@@ -52281,7 +52281,7 @@ var require_lib9 = __commonJS2({
|
|
52281
52281
|
params2 = Object.assign({}, this._persistentParams || {}, params2);
|
52282
52282
|
params2.dp = path11 || params2.dp || this._context.dp;
|
52283
52283
|
params2.dh = hostname2 || params2.dh || this._context.dh;
|
52284
|
-
params2.dt =
|
52284
|
+
params2.dt = title8 || params2.dt || this._context.dt;
|
52285
52285
|
this._tidyParameters(params2);
|
52286
52286
|
if (!params2.dp && !params2.dl) {
|
52287
52287
|
return this._handleError("Please provide either a page path (dp) or a document location (dl)", fn2);
|
@@ -62540,7 +62540,7 @@ var require_package = __commonJS2({
|
|
62540
62540
|
"../client/package.json"(exports2, module2) {
|
62541
62541
|
module2.exports = {
|
62542
62542
|
name: "@vercel/client",
|
62543
|
-
version: "13.3.
|
62543
|
+
version: "13.3.4",
|
62544
62544
|
main: "dist/index.js",
|
62545
62545
|
typings: "dist/index.d.ts",
|
62546
62546
|
homepage: "https://vercel.com",
|
@@ -62577,7 +62577,7 @@ var require_package = __commonJS2({
|
|
62577
62577
|
typescript: "4.9.5"
|
62578
62578
|
},
|
62579
62579
|
dependencies: {
|
62580
|
-
"@vercel/build-utils": "8.3.
|
62580
|
+
"@vercel/build-utils": "8.3.6",
|
62581
62581
|
"@vercel/error-utils": "2.0.2",
|
62582
62582
|
"@vercel/routing-utils": "3.1.0",
|
62583
62583
|
"@zeit/fetch": "5.2.0",
|
@@ -64820,10 +64820,10 @@ var require_util4 = __commonJS2({
|
|
64820
64820
|
return objectToString(re) === "[object RegExp]";
|
64821
64821
|
}
|
64822
64822
|
exports2.isRegExp = isRegExp;
|
64823
|
-
function
|
64823
|
+
function isObject2(arg2) {
|
64824
64824
|
return typeof arg2 === "object" && arg2 !== null;
|
64825
64825
|
}
|
64826
|
-
exports2.isObject =
|
64826
|
+
exports2.isObject = isObject2;
|
64827
64827
|
function isDate(d) {
|
64828
64828
|
return objectToString(d) === "[object Date]";
|
64829
64829
|
}
|
@@ -68649,7 +68649,7 @@ var require_create_deployment = __commonJS2({
|
|
68649
68649
|
var import_upload = require_upload();
|
68650
68650
|
var import_utils4 = require_utils8();
|
68651
68651
|
var import_errors6 = require_errors3();
|
68652
|
-
var
|
68652
|
+
var import_error_utils36 = require_dist2();
|
68653
68653
|
var import_build_utils19 = require("@vercel/build-utils");
|
68654
68654
|
var import_tar_fs2 = __toESM4(require_tar_fs());
|
68655
68655
|
var import_zlib = require("zlib");
|
@@ -68731,7 +68731,7 @@ var require_create_deployment = __commonJS2({
|
|
68731
68731
|
files = await (0, import_hashes.hashes)(fileList);
|
68732
68732
|
}
|
68733
68733
|
} catch (err) {
|
68734
|
-
if (clientOptions.prebuilt && (0,
|
68734
|
+
if (clientOptions.prebuilt && (0, import_error_utils36.isErrnoException)(err) && err.code === "ENOENT" && err.path) {
|
68735
68735
|
const errPath = (0, import_path44.relative)(workPath, err.path);
|
68736
68736
|
err.message = `File does not exist: "${(0, import_path44.relative)(workPath, errPath)}"`;
|
68737
68737
|
if (errPath.split(import_path44.sep).includes("node_modules")) {
|
@@ -68957,31 +68957,133 @@ var require_arg = __commonJS2({
|
|
68957
68957
|
}
|
68958
68958
|
});
|
68959
68959
|
|
68960
|
+
// src/util/get-flags-specification.ts
|
68961
|
+
function getFlagsSpecification(options) {
|
68962
|
+
const flagsSpecification = {};
|
68963
|
+
for (const option of options) {
|
68964
|
+
flagsSpecification[`--${option.name}`] = option.type;
|
68965
|
+
if (option.shorthand) {
|
68966
|
+
flagsSpecification[`-${option.shorthand}`] = `--${option.name}`;
|
68967
|
+
}
|
68968
|
+
}
|
68969
|
+
return flagsSpecification;
|
68970
|
+
}
|
68971
|
+
var init_get_flags_specification = __esm({
|
68972
|
+
"src/util/get-flags-specification.ts"() {
|
68973
|
+
"use strict";
|
68974
|
+
}
|
68975
|
+
});
|
68976
|
+
|
68960
68977
|
// src/util/arg-common.ts
|
68961
|
-
var
|
68978
|
+
var globalCommandOptions, GLOBAL_OPTIONS, arg_common_default, yesOption, nextOption, confirmOption, limitOption, forceOption;
|
68962
68979
|
var init_arg_common = __esm({
|
68963
68980
|
"src/util/arg-common.ts"() {
|
68964
68981
|
"use strict";
|
68965
|
-
|
68966
|
-
|
68967
|
-
|
68968
|
-
|
68969
|
-
|
68970
|
-
|
68971
|
-
|
68972
|
-
|
68973
|
-
|
68974
|
-
|
68975
|
-
|
68976
|
-
|
68977
|
-
|
68978
|
-
|
68979
|
-
|
68980
|
-
|
68981
|
-
|
68982
|
-
|
68983
|
-
|
68984
|
-
|
68982
|
+
init_get_flags_specification();
|
68983
|
+
globalCommandOptions = [
|
68984
|
+
{
|
68985
|
+
name: "help",
|
68986
|
+
shorthand: "h",
|
68987
|
+
type: Boolean,
|
68988
|
+
description: "Output usage information",
|
68989
|
+
deprecated: false
|
68990
|
+
},
|
68991
|
+
{
|
68992
|
+
name: "version",
|
68993
|
+
shorthand: "v",
|
68994
|
+
type: Boolean,
|
68995
|
+
description: "Output the version number",
|
68996
|
+
deprecated: false
|
68997
|
+
},
|
68998
|
+
{
|
68999
|
+
name: "cwd",
|
69000
|
+
shorthand: null,
|
69001
|
+
type: String,
|
69002
|
+
argument: "DIR",
|
69003
|
+
description: "Sets the current working directory for a single run of a command",
|
69004
|
+
deprecated: false
|
69005
|
+
},
|
69006
|
+
{
|
69007
|
+
name: "local-config",
|
69008
|
+
shorthand: "A",
|
69009
|
+
type: String,
|
69010
|
+
argument: "FILE",
|
69011
|
+
description: "Path to the local `vercel.json` file",
|
69012
|
+
deprecated: false
|
69013
|
+
},
|
69014
|
+
{
|
69015
|
+
name: "global-config",
|
69016
|
+
shorthand: "Q",
|
69017
|
+
type: String,
|
69018
|
+
argument: "DIR",
|
69019
|
+
description: "Path to the global `.vercel` directory",
|
69020
|
+
deprecated: false
|
69021
|
+
},
|
69022
|
+
{
|
69023
|
+
name: "debug",
|
69024
|
+
shorthand: "d",
|
69025
|
+
type: Boolean,
|
69026
|
+
description: "Debug mode (default off)",
|
69027
|
+
deprecated: false
|
69028
|
+
},
|
69029
|
+
{
|
69030
|
+
name: "no-color",
|
69031
|
+
shorthand: null,
|
69032
|
+
type: Boolean,
|
69033
|
+
description: "No color mode (default off)",
|
69034
|
+
deprecated: false
|
69035
|
+
},
|
69036
|
+
{
|
69037
|
+
name: "scope",
|
69038
|
+
shorthand: "S",
|
69039
|
+
type: String,
|
69040
|
+
description: "Set a custom scope",
|
69041
|
+
deprecated: false
|
69042
|
+
},
|
69043
|
+
{
|
69044
|
+
name: "token",
|
69045
|
+
shorthand: "t",
|
69046
|
+
type: String,
|
69047
|
+
argument: "TOKEN",
|
69048
|
+
description: "Login token",
|
69049
|
+
deprecated: false
|
69050
|
+
},
|
69051
|
+
{ name: "team", shorthand: "T", type: String, deprecated: false },
|
69052
|
+
{ name: "api", shorthand: null, type: String, deprecated: false },
|
69053
|
+
{ name: "cwd", shorthand: null, type: String, deprecated: false }
|
69054
|
+
];
|
69055
|
+
GLOBAL_OPTIONS = getFlagsSpecification(globalCommandOptions);
|
69056
|
+
arg_common_default = () => GLOBAL_OPTIONS;
|
69057
|
+
yesOption = {
|
69058
|
+
name: "yes",
|
69059
|
+
shorthand: "y",
|
69060
|
+
type: Boolean,
|
69061
|
+
deprecated: false
|
69062
|
+
};
|
69063
|
+
nextOption = {
|
69064
|
+
name: "next",
|
69065
|
+
shorthand: "N",
|
69066
|
+
type: Number,
|
69067
|
+
deprecated: false
|
69068
|
+
};
|
69069
|
+
confirmOption = {
|
69070
|
+
name: "confirm",
|
69071
|
+
shorthand: "c",
|
69072
|
+
type: Boolean,
|
69073
|
+
deprecated: true
|
69074
|
+
};
|
69075
|
+
limitOption = {
|
69076
|
+
name: "limit",
|
69077
|
+
shorthand: null,
|
69078
|
+
type: Number,
|
69079
|
+
deprecated: false
|
69080
|
+
};
|
69081
|
+
forceOption = {
|
69082
|
+
name: "force",
|
69083
|
+
shorthand: "f",
|
69084
|
+
type: Boolean,
|
69085
|
+
deprecated: false
|
69086
|
+
};
|
68985
69087
|
}
|
68986
69088
|
});
|
68987
69089
|
|
@@ -75647,13 +75749,16 @@ ${error4.stack}`);
|
|
75647
75749
|
body = opts.body;
|
75648
75750
|
}
|
75649
75751
|
const requestId = this.requestIdCounter++;
|
75650
|
-
return this.output.time(
|
75651
|
-
|
75652
|
-
|
75653
|
-
|
75654
|
-
|
75655
|
-
|
75656
|
-
|
75752
|
+
return this.output.time(
|
75753
|
+
(res) => {
|
75754
|
+
if (res) {
|
75755
|
+
return `#${requestId} \u2190 ${res.status} ${res.statusText}: ${res.headers.get("x-vercel-id")}`;
|
75756
|
+
} else {
|
75757
|
+
return `#${requestId} \u2192 ${opts.method || "GET"} ${url3.href}`;
|
75758
|
+
}
|
75759
|
+
},
|
75760
|
+
(0, import_node_fetch.default)(url3, { agent: this.agent, ...opts, headers, body })
|
75761
|
+
);
|
75657
75762
|
}
|
75658
75763
|
fetch(url3, opts = {}) {
|
75659
75764
|
return this.retry(async (bail) => {
|
@@ -97306,7 +97411,7 @@ var require_types3 = __commonJS2({
|
|
97306
97411
|
}
|
97307
97412
|
return new ArrayType(Type.from(value[0]));
|
97308
97413
|
}
|
97309
|
-
if (
|
97414
|
+
if (isObject2.check(value)) {
|
97310
97415
|
return new ObjectType(Object.keys(value).map(function(name2) {
|
97311
97416
|
return new Field(name2, Type.from(value[name2], name2));
|
97312
97417
|
}));
|
@@ -97352,7 +97457,7 @@ var require_types3 = __commonJS2({
|
|
97352
97457
|
var isFunction = defBuiltInType("function", function() {
|
97353
97458
|
});
|
97354
97459
|
var isArray = defBuiltInType("array", []);
|
97355
|
-
var
|
97460
|
+
var isObject2 = defBuiltInType("object", {});
|
97356
97461
|
var isRegExp = defBuiltInType("RegExp", /./);
|
97357
97462
|
var isDate = defBuiltInType("Date", /* @__PURE__ */ new Date());
|
97358
97463
|
var isNumber = defBuiltInType("number", 3);
|
@@ -97363,7 +97468,7 @@ var require_types3 = __commonJS2({
|
|
97363
97468
|
string: isString,
|
97364
97469
|
function: isFunction,
|
97365
97470
|
array: isArray,
|
97366
|
-
object:
|
97471
|
+
object: isObject2,
|
97367
97472
|
RegExp: isRegExp,
|
97368
97473
|
Date: isDate,
|
97369
97474
|
number: isNumber,
|
@@ -98657,7 +98762,7 @@ var require_path_visitor = __commonJS2({
|
|
98657
98762
|
var types = fork2.use(types_1.default);
|
98658
98763
|
var NodePath = fork2.use(node_path_1.default);
|
98659
98764
|
var isArray = types.builtInTypes.array;
|
98660
|
-
var
|
98765
|
+
var isObject2 = types.builtInTypes.object;
|
98661
98766
|
var isFunction = types.builtInTypes.function;
|
98662
98767
|
var undefined2;
|
98663
98768
|
var PathVisitor = function PathVisitor2() {
|
@@ -98695,7 +98800,7 @@ var require_path_visitor = __commonJS2({
|
|
98695
98800
|
if (methods instanceof PathVisitor) {
|
98696
98801
|
return methods;
|
98697
98802
|
}
|
98698
|
-
if (!
|
98803
|
+
if (!isObject2.check(methods)) {
|
98699
98804
|
return new PathVisitor();
|
98700
98805
|
}
|
98701
98806
|
var Visitor = function Visitor2() {
|
@@ -98795,7 +98900,7 @@ var require_path_visitor = __commonJS2({
|
|
98795
98900
|
var value = path11.value;
|
98796
98901
|
if (isArray.check(value)) {
|
98797
98902
|
path11.each(visitor.visitWithoutReset, visitor);
|
98798
|
-
} else if (!
|
98903
|
+
} else if (!isObject2.check(value)) {
|
98799
98904
|
} else {
|
98800
98905
|
var childNames = types.getFieldNames(value);
|
98801
98906
|
if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
|
@@ -98950,7 +99055,7 @@ var require_equiv = __commonJS2({
|
|
98950
99055
|
var getFieldNames = types.getFieldNames;
|
98951
99056
|
var getFieldValue = types.getFieldValue;
|
98952
99057
|
var isArray = types.builtInTypes.array;
|
98953
|
-
var
|
99058
|
+
var isObject2 = types.builtInTypes.object;
|
98954
99059
|
var isDate = types.builtInTypes.Date;
|
98955
99060
|
var isRegExp = types.builtInTypes.RegExp;
|
98956
99061
|
var hasOwn = Object.prototype.hasOwnProperty;
|
@@ -98987,7 +99092,7 @@ var require_equiv = __commonJS2({
|
|
98987
99092
|
if (isArray.check(a)) {
|
98988
99093
|
return arraysAreEquivalent(a, b, problemPath);
|
98989
99094
|
}
|
98990
|
-
if (
|
99095
|
+
if (isObject2.check(a)) {
|
98991
99096
|
return objectsAreEquivalent(a, b, problemPath);
|
98992
99097
|
}
|
98993
99098
|
if (isDate.check(a)) {
|
@@ -99027,8 +99132,8 @@ var require_equiv = __commonJS2({
|
|
99027
99132
|
return true;
|
99028
99133
|
}
|
99029
99134
|
function objectsAreEquivalent(a, b, problemPath) {
|
99030
|
-
|
99031
|
-
if (!
|
99135
|
+
isObject2.assert(a);
|
99136
|
+
if (!isObject2.check(b)) {
|
99032
99137
|
return false;
|
99033
99138
|
}
|
99034
99139
|
if (a.type !== b.type) {
|
@@ -109672,7 +109777,7 @@ function help2(command, options) {
|
|
109672
109777
|
columns: options.columns ?? 80
|
109673
109778
|
});
|
109674
109779
|
}
|
109675
|
-
var import_chalk21, import_constants2, import_cli_table32, INDENT, NEWLINE, tableOptions
|
109780
|
+
var import_chalk21, import_constants2, import_cli_table32, INDENT, NEWLINE, tableOptions;
|
109676
109781
|
var init_help = __esm({
|
109677
109782
|
"src/commands/help.ts"() {
|
109678
109783
|
"use strict";
|
@@ -109680,6 +109785,7 @@ var init_help = __esm({
|
|
109680
109785
|
import_constants2 = __toESM3(require_dist26());
|
109681
109786
|
import_cli_table32 = __toESM3(require_cli_table3());
|
109682
109787
|
init_table();
|
109788
|
+
init_arg_common();
|
109683
109789
|
INDENT = " ".repeat(2);
|
109684
109790
|
NEWLINE = "\n";
|
109685
109791
|
tableOptions = {
|
@@ -109689,75 +109795,6 @@ var init_help = __esm({
|
|
109689
109795
|
"padding-right": 0
|
109690
109796
|
}
|
109691
109797
|
};
|
109692
|
-
globalCommandOptions = [
|
109693
|
-
{
|
109694
|
-
name: "help",
|
109695
|
-
shorthand: "h",
|
109696
|
-
type: String,
|
109697
|
-
description: "Output usage information",
|
109698
|
-
deprecated: false
|
109699
|
-
},
|
109700
|
-
{
|
109701
|
-
name: "version",
|
109702
|
-
shorthand: "v",
|
109703
|
-
type: String,
|
109704
|
-
description: "Output the version number",
|
109705
|
-
deprecated: false
|
109706
|
-
},
|
109707
|
-
{
|
109708
|
-
name: "cwd",
|
109709
|
-
shorthand: null,
|
109710
|
-
type: String,
|
109711
|
-
argument: "DIR",
|
109712
|
-
description: "Sets the current working directory for a single run of a command",
|
109713
|
-
deprecated: false
|
109714
|
-
},
|
109715
|
-
{
|
109716
|
-
name: "local-config",
|
109717
|
-
shorthand: "A",
|
109718
|
-
type: String,
|
109719
|
-
argument: "FILE",
|
109720
|
-
description: "Path to the local `vercel.json` file",
|
109721
|
-
deprecated: false
|
109722
|
-
},
|
109723
|
-
{
|
109724
|
-
name: "global-config",
|
109725
|
-
shorthand: "Q",
|
109726
|
-
type: String,
|
109727
|
-
argument: "DIR",
|
109728
|
-
description: "Path to the global `.vercel` directory",
|
109729
|
-
deprecated: false
|
109730
|
-
},
|
109731
|
-
{
|
109732
|
-
name: "debug",
|
109733
|
-
shorthand: "d",
|
109734
|
-
type: String,
|
109735
|
-
description: "Debug mode (default off)",
|
109736
|
-
deprecated: false
|
109737
|
-
},
|
109738
|
-
{
|
109739
|
-
name: "no-color",
|
109740
|
-
shorthand: null,
|
109741
|
-
type: String,
|
109742
|
-
description: "No color mode (default off)",
|
109743
|
-
deprecated: false
|
109744
|
-
},
|
109745
|
-
{
|
109746
|
-
name: "scope",
|
109747
|
-
shorthand: "S",
|
109748
|
-
type: String,
|
109749
|
-
description: "Set a custom scope",
|
109750
|
-
deprecated: false
|
109751
|
-
},
|
109752
|
-
{
|
109753
|
-
name: "token",
|
109754
|
-
shorthand: "t",
|
109755
|
-
type: String,
|
109756
|
-
argument: "TOKEN",
|
109757
|
-
description: "Login token",
|
109758
|
-
deprecated: false
|
109759
|
-
}
|
109760
|
-
];
|
109761
109798
|
}
|
109762
109799
|
});
|
109763
109800
|
|
@@ -111495,6 +111532,7 @@ var init_command = __esm({
|
|
111495
111532
|
"src/commands/alias/command.ts"() {
|
111496
111533
|
"use strict";
|
111497
111534
|
init_pkg_name();
|
111535
|
+
init_arg_common();
|
111498
111536
|
aliasCommand = {
|
111499
111537
|
name: "alias",
|
111500
111538
|
description: "Interact with deployment aliases.",
|
@@ -111543,27 +111581,18 @@ var init_command = __esm({
|
|
111543
111581
|
],
|
111544
111582
|
options: [
|
111545
111583
|
{
|
111546
|
-
|
111584
|
+
...nextOption,
|
111547
111585
|
description: "Show next page of results",
|
111548
|
-
argument: "MS"
|
111549
|
-
shorthand: "N",
|
111550
|
-
type: String,
|
111551
|
-
deprecated: false
|
111586
|
+
argument: "MS"
|
111552
111587
|
},
|
111553
111588
|
{
|
111554
|
-
|
111555
|
-
description: "Skip the confirmation prompt when removing an alias"
|
111556
|
-
shorthand: "y",
|
111557
|
-
type: Boolean,
|
111558
|
-
deprecated: false
|
111589
|
+
...yesOption,
|
111590
|
+
description: "Skip the confirmation prompt when removing an alias"
|
111559
111591
|
},
|
111560
111592
|
{
|
111561
|
-
|
111562
|
-
shorthand: null,
|
111593
|
+
...limitOption,
|
111563
111594
|
description: "Number of results to return per page (default: 20, max: 100)",
|
111564
|
-
argument: "NUMBER"
|
111565
|
-
type: String,
|
111566
|
-
deprecated: false
|
111595
|
+
argument: "NUMBER"
|
111567
111596
|
},
|
111568
111597
|
{ name: "json", shorthand: null, type: Boolean, deprecated: false }
|
111569
111598
|
],
|
@@ -111585,23 +111614,6 @@ var init_command = __esm({
|
|
111585
111614
|
}
|
111586
111615
|
});
|
111587
111616
|
|
111588
|
-
// src/util/get-flags-specification.ts
|
111589
|
-
function getFlagsSpecification(options) {
|
111590
|
-
const flagsSpecification = {};
|
111591
|
-
for (const option of options) {
|
111592
|
-
flagsSpecification[`--${option.name}`] = option.type;
|
111593
|
-
if (option.shorthand) {
|
111594
|
-
flagsSpecification[`-${option.shorthand}`] = `--${option.name}`;
|
111595
|
-
}
|
111596
|
-
}
|
111597
|
-
return flagsSpecification;
|
111598
|
-
}
|
111599
|
-
var init_get_flags_specification = __esm({
|
111600
|
-
"src/util/get-flags-specification.ts"() {
|
111601
|
-
"use strict";
|
111602
|
-
}
|
111603
|
-
});
|
111604
|
-
|
111605
111617
|
// src/commands/alias/index.ts
|
111606
111618
|
var alias_exports = {};
|
111607
111619
|
__export3(alias_exports, {
|
@@ -113700,7 +113712,7 @@ var require_common3 = __commonJS2({
|
|
113700
113712
|
function isNothing(subject) {
|
113701
113713
|
return typeof subject === "undefined" || subject === null;
|
113702
113714
|
}
|
113703
|
-
function
|
113715
|
+
function isObject2(subject) {
|
113704
113716
|
return typeof subject === "object" && subject !== null;
|
113705
113717
|
}
|
113706
113718
|
function toArray(sequence) {
|
@@ -113732,7 +113744,7 @@ var require_common3 = __commonJS2({
|
|
113732
113744
|
return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
|
113733
113745
|
}
|
113734
113746
|
module2.exports.isNothing = isNothing;
|
113735
|
-
module2.exports.isObject =
|
113747
|
+
module2.exports.isObject = isObject2;
|
113736
113748
|
module2.exports.toArray = toArray;
|
113737
113749
|
module2.exports.repeat = repeat;
|
113738
113750
|
module2.exports.isNegativeZero = isNegativeZero;
|
@@ -118626,14 +118638,14 @@ var require_read_config_file = __commonJS2({
|
|
118626
118638
|
var import_js_yaml = __toESM4(require_js_yaml2());
|
118627
118639
|
var import_toml = __toESM4(require_toml());
|
118628
118640
|
var import_fs10 = require("fs");
|
118629
|
-
var
|
118641
|
+
var import_error_utils36 = require_dist2();
|
118630
118642
|
var { readFile: readFile6 } = import_fs10.promises;
|
118631
118643
|
async function readFileOrNull(file) {
|
118632
118644
|
try {
|
118633
118645
|
const data = await readFile6(file);
|
118634
118646
|
return data;
|
118635
118647
|
} catch (error4) {
|
118636
|
-
if (!(0,
|
118648
|
+
if (!(0, import_error_utils36.isErrnoException)(error4)) {
|
118637
118649
|
throw error4;
|
118638
118650
|
}
|
118639
118651
|
if (error4.code !== "ENOENT") {
|
@@ -123319,7 +123331,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
123319
123331
|
var import_promises = __toESM4(require("fs/promises"));
|
123320
123332
|
var import_path44 = require("path");
|
123321
123333
|
var import_filesystem = require_filesystem();
|
123322
|
-
var
|
123334
|
+
var import_error_utils36 = require_dist2();
|
123323
123335
|
var LocalFileSystemDetector5 = class _LocalFileSystemDetector extends import_filesystem.DetectorFilesystem {
|
123324
123336
|
constructor(rootPath) {
|
123325
123337
|
super();
|
@@ -123330,7 +123342,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
123330
123342
|
await import_promises.default.stat(this.getFilePath(name));
|
123331
123343
|
return true;
|
123332
123344
|
} catch (err) {
|
123333
|
-
if ((0,
|
123345
|
+
if ((0, import_error_utils36.isErrnoException)(err) && err.code === "ENOENT") {
|
123334
123346
|
return false;
|
123335
123347
|
}
|
123336
123348
|
throw err;
|
@@ -123569,7 +123581,7 @@ var require_common4 = __commonJS2({
|
|
123569
123581
|
function isNothing(subject) {
|
123570
123582
|
return typeof subject === "undefined" || subject === null;
|
123571
123583
|
}
|
123572
|
-
function
|
123584
|
+
function isObject2(subject) {
|
123573
123585
|
return typeof subject === "object" && subject !== null;
|
123574
123586
|
}
|
123575
123587
|
function toArray(sequence) {
|
@@ -123601,7 +123613,7 @@ var require_common4 = __commonJS2({
|
|
123601
123613
|
return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
|
123602
123614
|
}
|
123603
123615
|
module2.exports.isNothing = isNothing;
|
123604
|
-
module2.exports.isObject =
|
123616
|
+
module2.exports.isObject = isObject2;
|
123605
123617
|
module2.exports.toArray = toArray;
|
123606
123618
|
module2.exports.repeat = repeat;
|
123607
123619
|
module2.exports.isNegativeZero = isNegativeZero;
|
@@ -140002,12 +140014,15 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
140002
140014
|
if (autoConfirm || !await confirm(client2, "Want to modify these settings?", false)) {
|
140003
140015
|
return settings;
|
140004
140016
|
}
|
140005
|
-
const choices = settingKeys.reduce(
|
140006
|
-
|
140007
|
-
|
140008
|
-
|
140009
|
-
|
140010
|
-
|
140017
|
+
const choices = settingKeys.reduce(
|
140018
|
+
(acc, setting) => {
|
140019
|
+
const skip = setting === "framework" || setting === "commandForIgnoringBuildStep" || setting === "installCommand" || localConfigurationOverrides?.[setting];
|
140020
|
+
if (skip)
|
140021
|
+
return acc;
|
140022
|
+
return [...acc, { name: settingMap[setting], value: setting }];
|
140023
|
+
},
|
140024
|
+
[]
|
140025
|
+
);
|
140011
140026
|
const settingFields = await client2.input.checkbox({
|
140012
140027
|
message: "Which settings would you like to overwrite (select multiple)?",
|
140013
140028
|
choices
|
@@ -144035,6 +144050,7 @@ var init_command4 = __esm({
|
|
144035
144050
|
"use strict";
|
144036
144051
|
init_pkg_name();
|
144037
144052
|
init_env_target();
|
144053
|
+
init_arg_common();
|
144038
144054
|
pullCommand = {
|
144039
144055
|
name: "pull",
|
144040
144056
|
description: "Pull latest environment variables and project settings from Vercel. ",
|
@@ -144062,11 +144078,8 @@ var init_command4 = __esm({
|
|
144062
144078
|
deprecated: false
|
144063
144079
|
},
|
144064
144080
|
{
|
144065
|
-
|
144066
|
-
description: "Skip questions when setting up new project using default scope and settings"
|
144067
|
-
shorthand: "y",
|
144068
|
-
type: String,
|
144069
|
-
deprecated: false
|
144081
|
+
...yesOption,
|
144082
|
+
description: "Skip questions when setting up new project using default scope and settings"
|
144070
144083
|
}
|
144071
144084
|
],
|
144072
144085
|
examples: [
|
@@ -144130,24 +144143,6 @@ __export3(pull_exports, {
|
|
144130
144143
|
default: () => main,
|
144131
144144
|
parseEnvironment: () => parseEnvironment
|
144132
144145
|
});
|
144133
|
-
function processArgs(client2) {
|
144134
|
-
return getArgs(client2.argv.slice(2), {
|
144135
|
-
"--yes": Boolean,
|
144136
|
-
"--environment": String,
|
144137
|
-
"--git-branch": String,
|
144138
|
-
"--debug": Boolean,
|
144139
|
-
"-d": "--debug",
|
144140
|
-
"-y": "--yes"
|
144141
|
-
});
|
144142
|
-
}
|
144143
|
-
function parseArgs(client2) {
|
144144
|
-
const argv2 = processArgs(client2);
|
144145
|
-
if (argv2["--help"]) {
|
144146
|
-
client2.output.print(help2(pullCommand, { columns: client2.stderr.columns }));
|
144147
|
-
return 2;
|
144148
|
-
}
|
144149
|
-
return argv2;
|
144150
|
-
}
|
144151
144146
|
async function pullAllEnvFiles(environment, client2, link4, project, argv2, cwd) {
|
144152
144147
|
const environmentFile = `.env.${environment}.local`;
|
144153
144148
|
return pull(
|
@@ -144155,7 +144150,7 @@ async function pullAllEnvFiles(environment, client2, link4, project, argv2, cwd)
|
|
144155
144150
|
link4,
|
144156
144151
|
project,
|
144157
144152
|
environment,
|
144158
|
-
argv2,
|
144153
|
+
argv2.flags,
|
144159
144154
|
[(0, import_path20.join)(".vercel", environmentFile)],
|
144160
144155
|
client2.output,
|
144161
144156
|
cwd,
|
@@ -144171,16 +144166,25 @@ function parseEnvironment(environment = "development") {
|
|
144171
144166
|
return environment;
|
144172
144167
|
}
|
144173
144168
|
async function main(client2) {
|
144174
|
-
|
144175
|
-
|
144176
|
-
|
144169
|
+
let parsedArgs = null;
|
144170
|
+
const flagsSpecification = getFlagsSpecification(pullCommand.options);
|
144171
|
+
try {
|
144172
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
144173
|
+
} catch (error4) {
|
144174
|
+
handleError(error4);
|
144175
|
+
return 1;
|
144176
|
+
}
|
144177
|
+
const { output: output2 } = client2;
|
144178
|
+
if (parsedArgs.flags["--help"]) {
|
144179
|
+
output2.print(help2(pullCommand, { columns: client2.stderr.columns }));
|
144180
|
+
return 2;
|
144177
144181
|
}
|
144178
|
-
let cwd =
|
144179
|
-
const autoConfirm = Boolean(
|
144182
|
+
let cwd = parsedArgs.args[1] || client2.cwd;
|
144183
|
+
const autoConfirm = Boolean(parsedArgs.flags["--yes"]);
|
144180
144184
|
const environment = parseTarget({
|
144181
144185
|
output: client2.output,
|
144182
144186
|
targetFlagName: "environment",
|
144183
|
-
targetFlagValue:
|
144187
|
+
targetFlagValue: parsedArgs.flags["--environment"]
|
144184
144188
|
}) || "development";
|
144185
144189
|
const link4 = await ensureLink("pull", client2, cwd, { autoConfirm });
|
144186
144190
|
if (typeof link4 === "number") {
|
@@ -144196,7 +144200,7 @@ async function main(client2) {
|
|
144196
144200
|
client2,
|
144197
144201
|
link4,
|
144198
144202
|
project,
|
144199
|
-
|
144203
|
+
parsedArgs,
|
144200
144204
|
cwd
|
144201
144205
|
);
|
144202
144206
|
if (pullResultCode !== 0) {
|
@@ -144236,6 +144240,8 @@ var init_pull2 = __esm({
|
|
144236
144240
|
init_help();
|
144237
144241
|
init_command4();
|
144238
144242
|
init_parse_target();
|
144243
|
+
init_get_flags_specification();
|
144244
|
+
init_handle_error();
|
144239
144245
|
}
|
144240
144246
|
});
|
144241
144247
|
|
@@ -148242,6 +148248,7 @@ var init_command5 = __esm({
|
|
148242
148248
|
"src/commands/build/command.ts"() {
|
148243
148249
|
"use strict";
|
148244
148250
|
init_pkg_name();
|
148251
|
+
init_arg_common();
|
148245
148252
|
buildCommand = {
|
148246
148253
|
name: "build",
|
148247
148254
|
description: "Build the project.",
|
@@ -148270,11 +148277,8 @@ var init_command5 = __esm({
|
|
148270
148277
|
deprecated: false
|
148271
148278
|
},
|
148272
148279
|
{
|
148273
|
-
|
148274
|
-
description: "Skip the confirmation prompt about pulling environment variables and project settings when not found locally"
|
148275
|
-
shorthand: "y",
|
148276
|
-
type: Boolean,
|
148277
|
-
deprecated: false
|
148280
|
+
...yesOption,
|
148281
|
+
description: "Skip the confirmation prompt about pulling environment variables and project settings when not found locally"
|
148278
148282
|
}
|
148279
148283
|
],
|
148280
148284
|
examples: [
|
@@ -148722,9 +148726,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
|
|
148722
148726
|
};
|
148723
148727
|
needBuildsJsonOverride = true;
|
148724
148728
|
}
|
148725
|
-
const webAnalyticsVersion = await (0, import_build_utils13.getInstalledPackageVersion)(
|
148726
|
-
"@vercel/analytics"
|
148727
|
-
);
|
148729
|
+
const webAnalyticsVersion = await (0, import_build_utils13.getInstalledPackageVersion)("@vercel/analytics");
|
148728
148730
|
if (webAnalyticsVersion) {
|
148729
148731
|
buildsJson.features = {
|
148730
148732
|
...buildsJson.features ?? {},
|
@@ -149623,6 +149625,7 @@ var init_command6 = __esm({
|
|
149623
149625
|
"src/commands/certs/command.ts"() {
|
149624
149626
|
"use strict";
|
149625
149627
|
init_pkg_name();
|
149628
|
+
init_arg_common();
|
149626
149629
|
certsCommand = {
|
149627
149630
|
name: "certs",
|
149628
149631
|
description: "Interact with SSL certificates. This command is intended for advanced use only. By default, Vercel manages your certificates automatically.",
|
@@ -149698,20 +149701,16 @@ var init_command6 = __esm({
|
|
149698
149701
|
deprecated: false
|
149699
149702
|
},
|
149700
149703
|
{
|
149701
|
-
|
149704
|
+
...limitOption,
|
149702
149705
|
description: "Number of results to return per page (default: 20, max: 100)",
|
149703
|
-
argument: "VALUE"
|
149704
|
-
shorthand: null,
|
149705
|
-
type: String,
|
149706
|
-
deprecated: false
|
149706
|
+
argument: "VALUE"
|
149707
149707
|
},
|
149708
149708
|
{
|
149709
|
-
|
149710
|
-
description: "Show next page of results"
|
149711
|
-
|
149712
|
-
|
149713
|
-
|
149714
|
-
}
|
149709
|
+
...nextOption,
|
149710
|
+
description: "Show next page of results"
|
149711
|
+
},
|
149712
|
+
{ name: "overwrite", shorthand: null, type: Boolean, deprecated: false },
|
149713
|
+
{ name: "output", shorthand: null, type: String, deprecated: false }
|
149715
149714
|
],
|
149716
149715
|
examples: [
|
149717
149716
|
{
|
@@ -149737,38 +149736,32 @@ __export3(certs_exports, {
|
|
149737
149736
|
default: () => main3
|
149738
149737
|
});
|
149739
149738
|
async function main3(client2) {
|
149740
|
-
|
149739
|
+
const { output: output2 } = client2;
|
149740
|
+
let parsedArgs = null;
|
149741
|
+
const flagsSpecification = getFlagsSpecification(certsCommand.options);
|
149741
149742
|
try {
|
149742
|
-
|
149743
|
-
|
149744
|
-
|
149745
|
-
"--output": String,
|
149746
|
-
"--crt": String,
|
149747
|
-
"--key": String,
|
149748
|
-
"--ca": String,
|
149749
|
-
"--next": Number,
|
149750
|
-
"-N": "--next",
|
149751
|
-
"--limit": Number
|
149752
|
-
});
|
149753
|
-
} catch (err) {
|
149754
|
-
handleError(err);
|
149743
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
149744
|
+
} catch (error4) {
|
149745
|
+
handleError(error4);
|
149755
149746
|
return 1;
|
149756
149747
|
}
|
149757
|
-
if (
|
149758
|
-
|
149748
|
+
if (parsedArgs.flags["--help"]) {
|
149749
|
+
output2.print(help2(certsCommand, { columns: client2.stderr.columns }));
|
149759
149750
|
return 2;
|
149760
149751
|
}
|
149761
|
-
const {
|
149762
|
-
|
149752
|
+
const { subcommand: subcommand2, args: args2 } = getSubcommand(
|
149753
|
+
parsedArgs.args.slice(1),
|
149754
|
+
COMMAND_CONFIG2
|
149755
|
+
);
|
149763
149756
|
switch (subcommand2) {
|
149764
149757
|
case "issue":
|
149765
|
-
return issue(client2,
|
149758
|
+
return issue(client2, parsedArgs.flags, args2);
|
149766
149759
|
case "ls":
|
149767
|
-
return ls_default(client2,
|
149760
|
+
return ls_default(client2, parsedArgs.flags, args2);
|
149768
149761
|
case "rm":
|
149769
|
-
return rm_default(client2,
|
149762
|
+
return rm_default(client2, parsedArgs.flags, args2);
|
149770
149763
|
case "add":
|
149771
|
-
return add_default(client2,
|
149764
|
+
return add_default(client2, parsedArgs.flags, args2);
|
149772
149765
|
case "renew":
|
149773
149766
|
output2.error("Renewing certificates is deprecated, issue a new one.");
|
149774
149767
|
return 1;
|
@@ -149793,6 +149786,7 @@ var init_certs = __esm({
|
|
149793
149786
|
init_rm2();
|
149794
149787
|
init_command6();
|
149795
149788
|
init_help();
|
149789
|
+
init_get_flags_specification();
|
149796
149790
|
COMMAND_CONFIG2 = {
|
149797
149791
|
add: ["add"],
|
149798
149792
|
issue: ["issue"],
|
@@ -149974,6 +149968,7 @@ var deployCommand;
|
|
149974
149968
|
var init_command7 = __esm({
|
149975
149969
|
"src/commands/deploy/command.ts"() {
|
149976
149970
|
"use strict";
|
149971
|
+
init_arg_common();
|
149977
149972
|
deployCommand = {
|
149978
149973
|
name: "deploy",
|
149979
149974
|
description: "Deploy your project to Vercel. The `deploy` command is the default command for the Vercel CLI, and can be omitted (`vc deploy my-app` equals `vc my-app`).",
|
@@ -149985,10 +149980,7 @@ var init_command7 = __esm({
|
|
149985
149980
|
],
|
149986
149981
|
options: [
|
149987
149982
|
{
|
149988
|
-
|
149989
|
-
shorthand: "f",
|
149990
|
-
type: Boolean,
|
149991
|
-
deprecated: false,
|
149983
|
+
...forceOption,
|
149992
149984
|
description: "Force a new deployment even if nothing has changed"
|
149993
149985
|
},
|
149994
149986
|
{
|
@@ -150072,10 +150064,7 @@ var init_command7 = __esm({
|
|
150072
150064
|
description: "Disable the automatic promotion (aliasing) of the relevant domains to a new production deployment. You can use `vc promote` to complete the domain-assignment process later"
|
150073
150065
|
},
|
150074
150066
|
{
|
150075
|
-
|
150076
|
-
shorthand: "y",
|
150077
|
-
type: Boolean,
|
150078
|
-
deprecated: false,
|
150067
|
+
...yesOption,
|
150079
150068
|
description: "Use default options to skip all prompts"
|
150080
150069
|
},
|
150081
150070
|
{
|
@@ -150107,9 +150096,7 @@ var init_command7 = __esm({
|
|
150107
150096
|
description: "Specify the target deployment environment"
|
150108
150097
|
},
|
150109
150098
|
{
|
150110
|
-
|
150111
|
-
shorthand: "c",
|
150112
|
-
type: Boolean,
|
150099
|
+
...confirmOption,
|
150113
150100
|
deprecated: true,
|
150114
150101
|
description: "Use default options to skip all prompts"
|
150115
150102
|
}
|
@@ -150496,8 +150483,8 @@ var init_deploy = __esm({
|
|
150496
150483
|
`
|
150497
150484
|
);
|
150498
150485
|
}
|
150499
|
-
const
|
150500
|
-
if (typeof localConfig.env !== "undefined" && !
|
150486
|
+
const isObject2 = (item) => Object.prototype.toString.call(item) === "[object Object]";
|
150487
|
+
if (typeof localConfig.env !== "undefined" && !isObject2(localConfig.env)) {
|
150501
150488
|
error4(
|
150502
150489
|
`The ${code("env")} property in ${highlight(
|
150503
150490
|
localConfig[import_client10.fileNameSymbol]
|
@@ -150506,7 +150493,7 @@ var init_deploy = __esm({
|
|
150506
150493
|
return 1;
|
150507
150494
|
}
|
150508
150495
|
if (typeof localConfig.build !== "undefined") {
|
150509
|
-
if (!
|
150496
|
+
if (!isObject2(localConfig.build)) {
|
150510
150497
|
error4(
|
150511
150498
|
`The ${code("build")} property in ${highlight(
|
150512
150499
|
localConfig[import_client10.fileNameSymbol]
|
@@ -150514,7 +150501,7 @@ var init_deploy = __esm({
|
|
150514
150501
|
);
|
150515
150502
|
return 1;
|
150516
150503
|
}
|
150517
|
-
if (typeof localConfig.build.env !== "undefined" && !
|
150504
|
+
if (typeof localConfig.build.env !== "undefined" && !isObject2(localConfig.build.env)) {
|
150518
150505
|
error4(
|
150519
150506
|
`The ${code("build.env")} property in ${highlight(
|
150520
150507
|
localConfig[import_client10.fileNameSymbol]
|
@@ -169643,6 +169630,7 @@ var init_command8 = __esm({
|
|
169643
169630
|
"src/commands/dev/command.ts"() {
|
169644
169631
|
"use strict";
|
169645
169632
|
init_pkg_name();
|
169633
|
+
init_arg_common();
|
169646
169634
|
devCommand = {
|
169647
169635
|
name: "dev",
|
169648
169636
|
description: `Starts the \`${packageName} dev\` server.`,
|
@@ -169657,10 +169645,13 @@ var init_command8 = __esm({
|
|
169657
169645
|
name: "listen",
|
169658
169646
|
description: "Specify a URI endpoint on which to listen [0.0.0.0:3000]",
|
169659
169647
|
argument: "uri",
|
169660
|
-
shorthand:
|
169648
|
+
shorthand: "l",
|
169661
169649
|
type: String,
|
169662
169650
|
deprecated: false
|
169663
|
-
}
|
169651
|
+
},
|
169652
|
+
yesOption,
|
169653
|
+
{ name: "port", shorthand: "p", type: String, deprecated: true },
|
169654
|
+
{ ...confirmOption, deprecated: true }
|
169664
169655
|
],
|
169665
169656
|
examples: [
|
169666
169657
|
{
|
@@ -169697,38 +169688,29 @@ async function main4(client2) {
|
|
169697
169688
|
} else {
|
169698
169689
|
process.env.__VERCEL_DEV_RUNNING = "1";
|
169699
169690
|
}
|
169700
|
-
let argv2;
|
169701
169691
|
let args2;
|
169702
169692
|
const { output: output2 } = client2;
|
169693
|
+
let parsedArgs = null;
|
169694
|
+
const flagsSpecification = getFlagsSpecification(devCommand.options);
|
169703
169695
|
try {
|
169704
|
-
|
169705
|
-
|
169706
|
-
|
169707
|
-
"--yes": Boolean,
|
169708
|
-
"-y": "--yes",
|
169709
|
-
// Deprecated
|
169710
|
-
"--port": Number,
|
169711
|
-
"-p": "--port",
|
169712
|
-
"--confirm": Boolean,
|
169713
|
-
"-c": "--confirm"
|
169714
|
-
});
|
169715
|
-
args2 = getSubcommand(argv2._.slice(1), COMMAND_CONFIG3).args;
|
169716
|
-
if ("--confirm" in argv2) {
|
169717
|
-
output2.warn("`--confirm` is deprecated, please use `--yes` instead");
|
169718
|
-
argv2["--yes"] = argv2["--confirm"];
|
169719
|
-
}
|
169720
|
-
if ("--port" in argv2) {
|
169721
|
-
output2.warn("`--port` is deprecated, please use `--listen` instead");
|
169722
|
-
argv2["--listen"] = String(argv2["--port"]);
|
169723
|
-
}
|
169724
|
-
} catch (err) {
|
169725
|
-
handleError(err);
|
169696
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
169697
|
+
} catch (error4) {
|
169698
|
+
handleError(error4);
|
169726
169699
|
return 1;
|
169727
169700
|
}
|
169728
|
-
if (
|
169729
|
-
|
169701
|
+
if (parsedArgs.flags["--help"]) {
|
169702
|
+
output2.print(help2(devCommand, { columns: client2.stderr.columns }));
|
169730
169703
|
return 2;
|
169731
169704
|
}
|
169705
|
+
args2 = getSubcommand(parsedArgs.args.slice(1), COMMAND_CONFIG3).args;
|
169706
|
+
if ("--confirm" in parsedArgs.flags) {
|
169707
|
+
output2.warn("`--confirm` is deprecated, please use `--yes` instead");
|
169708
|
+
parsedArgs.flags["--yes"] = parsedArgs.flags["--confirm"];
|
169709
|
+
}
|
169710
|
+
if ("--port" in parsedArgs.flags) {
|
169711
|
+
output2.warn("`--port` is deprecated, please use `--listen` instead");
|
169712
|
+
parsedArgs.flags["--listen"] = parsedArgs.flags["--port"];
|
169713
|
+
}
|
169732
169714
|
const [dir = "."] = args2;
|
169733
169715
|
const vercelConfig = await readConfig(dir);
|
169734
169716
|
const hasBuilds = vercelConfig && "builds" in vercelConfig && vercelConfig.builds && vercelConfig.builds.length > 0;
|
@@ -169752,12 +169734,12 @@ async function main4(client2) {
|
|
169752
169734
|
return 1;
|
169753
169735
|
}
|
169754
169736
|
}
|
169755
|
-
if (
|
169737
|
+
if (parsedArgs.args.length > 2) {
|
169756
169738
|
output2.error(`${getCommandName(`dev [dir]`)} accepts at most one argument`);
|
169757
169739
|
return 1;
|
169758
169740
|
}
|
169759
169741
|
try {
|
169760
|
-
return await dev(client2,
|
169742
|
+
return await dev(client2, parsedArgs.flags, args2);
|
169761
169743
|
} catch (err) {
|
169762
169744
|
if ((0, import_error_utils20.isErrnoException)(err) && err.code === "ENOTFOUND") {
|
169763
169745
|
const matches = /getaddrinfo ENOTFOUND (.*)$/.exec(err.message || "");
|
@@ -169807,6 +169789,7 @@ var init_dev2 = __esm({
|
|
169807
169789
|
import_error_utils20 = __toESM3(require_dist2());
|
169808
169790
|
init_help();
|
169809
169791
|
init_command8();
|
169792
|
+
init_get_flags_specification();
|
169810
169793
|
COMMAND_CONFIG3 = {
|
169811
169794
|
dev: ["dev"]
|
169812
169795
|
};
|
@@ -170802,6 +170785,7 @@ var init_command9 = __esm({
|
|
170802
170785
|
"src/commands/dns/command.ts"() {
|
170803
170786
|
"use strict";
|
170804
170787
|
init_pkg_name();
|
170788
|
+
init_arg_common();
|
170805
170789
|
dnsCommand = {
|
170806
170790
|
name: "dns",
|
170807
170791
|
description: "Interact with DNS entries for a project.",
|
@@ -170871,20 +170855,14 @@ var init_command9 = __esm({
|
|
170871
170855
|
],
|
170872
170856
|
options: [
|
170873
170857
|
{
|
170874
|
-
|
170858
|
+
...nextOption,
|
170875
170859
|
description: "Show next page of results",
|
170876
|
-
argument: "MS"
|
170877
|
-
shorthand: "n",
|
170878
|
-
type: String,
|
170879
|
-
deprecated: false
|
170860
|
+
argument: "MS"
|
170880
170861
|
},
|
170881
170862
|
{
|
170882
|
-
|
170883
|
-
shorthand: "n",
|
170863
|
+
...limitOption,
|
170884
170864
|
description: "Number of results to return per page (default: 20, max: 100)",
|
170885
|
-
argument: "NUMBER"
|
170886
|
-
type: String,
|
170887
|
-
deprecated: false
|
170865
|
+
argument: "NUMBER"
|
170888
170866
|
}
|
170889
170867
|
],
|
170890
170868
|
examples: [
|
@@ -170941,31 +170919,32 @@ __export3(dns_exports, {
|
|
170941
170919
|
default: () => dns
|
170942
170920
|
});
|
170943
170921
|
async function dns(client2) {
|
170944
|
-
|
170922
|
+
const { output: output2 } = client2;
|
170923
|
+
let parsedArgs = null;
|
170924
|
+
const flagsSpecification = getFlagsSpecification(dnsCommand.options);
|
170945
170925
|
try {
|
170946
|
-
|
170947
|
-
"--next": Number,
|
170948
|
-
"-N": "--next",
|
170949
|
-
"--limit": Number
|
170950
|
-
});
|
170926
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
170951
170927
|
} catch (error4) {
|
170952
170928
|
handleError(error4);
|
170953
170929
|
return 1;
|
170954
170930
|
}
|
170955
|
-
if (
|
170956
|
-
|
170931
|
+
if (parsedArgs.flags["--help"]) {
|
170932
|
+
output2.print(help2(dnsCommand, { columns: client2.stderr.columns }));
|
170957
170933
|
return 2;
|
170958
170934
|
}
|
170959
|
-
const { subcommand: subcommand2, args: args2 } = getSubcommand(
|
170935
|
+
const { subcommand: subcommand2, args: args2 } = getSubcommand(
|
170936
|
+
parsedArgs.args.slice(1),
|
170937
|
+
COMMAND_CONFIG4
|
170938
|
+
);
|
170960
170939
|
switch (subcommand2) {
|
170961
170940
|
case "add":
|
170962
|
-
return add2(client2,
|
170941
|
+
return add2(client2, parsedArgs.flags, args2);
|
170963
170942
|
case "import":
|
170964
|
-
return add3(client2,
|
170943
|
+
return add3(client2, parsedArgs.flags, args2);
|
170965
170944
|
case "rm":
|
170966
|
-
return rm3(client2,
|
170945
|
+
return rm3(client2, parsedArgs.flags, args2);
|
170967
170946
|
default:
|
170968
|
-
return ls3(client2,
|
170947
|
+
return ls3(client2, parsedArgs.flags, args2);
|
170969
170948
|
}
|
170970
170949
|
}
|
170971
170950
|
var COMMAND_CONFIG4;
|
@@ -170981,6 +170960,7 @@ var init_dns = __esm({
|
|
170981
170960
|
init_rm3();
|
170982
170961
|
init_command9();
|
170983
170962
|
init_help();
|
170963
|
+
init_get_flags_specification();
|
170984
170964
|
COMMAND_CONFIG4 = {
|
170985
170965
|
add: ["add"],
|
170986
170966
|
import: ["import"],
|
@@ -172506,6 +172486,7 @@ var init_command10 = __esm({
|
|
172506
172486
|
"src/commands/domains/command.ts"() {
|
172507
172487
|
"use strict";
|
172508
172488
|
init_pkg_name();
|
172489
|
+
init_arg_common();
|
172509
172490
|
domainsCommand = {
|
172510
172491
|
name: "domains",
|
172511
172492
|
description: "Manage domains",
|
@@ -172606,34 +172587,24 @@ var init_command10 = __esm({
|
|
172606
172587
|
],
|
172607
172588
|
options: [
|
172608
172589
|
{
|
172609
|
-
|
172610
|
-
description: "Show next page of results"
|
172611
|
-
shorthand: "N",
|
172612
|
-
type: String,
|
172613
|
-
deprecated: false
|
172590
|
+
...nextOption,
|
172591
|
+
description: "Show next page of results"
|
172614
172592
|
},
|
172615
172593
|
{
|
172616
|
-
|
172617
|
-
description: "Skip the confirmation prompt when removing a domain"
|
172618
|
-
shorthand: "y",
|
172619
|
-
type: Boolean,
|
172620
|
-
deprecated: false
|
172594
|
+
...yesOption,
|
172595
|
+
description: "Skip the confirmation prompt when removing a domain"
|
172621
172596
|
},
|
172622
172597
|
{
|
172623
|
-
|
172624
|
-
shorthand: "n",
|
172598
|
+
...limitOption,
|
172625
172599
|
description: "Number of results to return per page (default: 20, max: 100)",
|
172626
|
-
argument: "NUMBER"
|
172627
|
-
type: String,
|
172628
|
-
deprecated: false
|
172600
|
+
argument: "NUMBER"
|
172629
172601
|
},
|
172630
172602
|
{
|
172631
|
-
|
172632
|
-
shorthand:
|
172633
|
-
type: Boolean,
|
172634
|
-
deprecated: false,
|
172603
|
+
...forceOption,
|
172604
|
+
shorthand: null,
|
172635
172605
|
description: "Force a domain on a project and remove it from an existing one"
|
172636
|
-
}
|
172606
|
+
},
|
172607
|
+
{ name: "code", shorthand: null, type: String, deprecated: false }
|
172637
172608
|
],
|
172638
172609
|
examples: [
|
172639
172610
|
{
|
@@ -172659,43 +172630,38 @@ __export3(domains_exports, {
|
|
172659
172630
|
default: () => main5
|
172660
172631
|
});
|
172661
172632
|
async function main5(client2) {
|
172662
|
-
let
|
172633
|
+
let parsedArgs = null;
|
172634
|
+
const flagsSpecification = getFlagsSpecification(domainsCommand.options);
|
172663
172635
|
try {
|
172664
|
-
|
172665
|
-
"--code": String,
|
172666
|
-
"--yes": Boolean,
|
172667
|
-
"--force": Boolean,
|
172668
|
-
"--next": Number,
|
172669
|
-
"-N": "--next",
|
172670
|
-
"-y": "--yes",
|
172671
|
-
"--limit": Number
|
172672
|
-
});
|
172636
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
172673
172637
|
} catch (error4) {
|
172674
172638
|
handleError(error4);
|
172675
172639
|
return 1;
|
172676
172640
|
}
|
172677
|
-
|
172678
|
-
|
172679
|
-
|
172680
|
-
);
|
172641
|
+
const { output: output2 } = client2;
|
172642
|
+
if (parsedArgs.flags["--help"]) {
|
172643
|
+
output2.print(help2(domainsCommand, { columns: client2.stderr.columns }));
|
172681
172644
|
return 2;
|
172682
172645
|
}
|
172683
|
-
const { subcommand: subcommand2, args: args2 } = getSubcommand(
|
172646
|
+
const { subcommand: subcommand2, args: args2 } = getSubcommand(
|
172647
|
+
parsedArgs.args.slice(1),
|
172648
|
+
COMMAND_CONFIG5
|
172649
|
+
);
|
172684
172650
|
switch (subcommand2) {
|
172685
172651
|
case "add":
|
172686
|
-
return add4(client2,
|
172652
|
+
return add4(client2, parsedArgs.flags, args2);
|
172687
172653
|
case "inspect":
|
172688
|
-
return inspect2(client2,
|
172654
|
+
return inspect2(client2, parsedArgs.flags, args2);
|
172689
172655
|
case "move":
|
172690
|
-
return move2(client2,
|
172656
|
+
return move2(client2, parsedArgs.flags, args2);
|
172691
172657
|
case "buy":
|
172692
|
-
return buy(client2,
|
172658
|
+
return buy(client2, parsedArgs.flags, args2);
|
172693
172659
|
case "rm":
|
172694
|
-
return rm4(client2,
|
172660
|
+
return rm4(client2, parsedArgs.flags, args2);
|
172695
172661
|
case "transferIn":
|
172696
|
-
return transferIn(client2,
|
172662
|
+
return transferIn(client2, parsedArgs.flags, args2);
|
172697
172663
|
default:
|
172698
|
-
return ls4(client2,
|
172664
|
+
return ls4(client2, parsedArgs.flags, args2);
|
172699
172665
|
}
|
172700
172666
|
}
|
172701
172667
|
var COMMAND_CONFIG5;
|
@@ -172714,6 +172680,7 @@ var init_domains = __esm({
|
|
172714
172680
|
init_move();
|
172715
172681
|
init_command10();
|
172716
172682
|
init_help();
|
172683
|
+
init_get_flags_specification();
|
172717
172684
|
COMMAND_CONFIG5 = {
|
172718
172685
|
add: ["add"],
|
172719
172686
|
buy: ["buy"],
|
@@ -172959,19 +172926,6 @@ var init_add4 = __esm({
|
|
172959
172926
|
}
|
172960
172927
|
});
|
172961
172928
|
|
172962
|
-
// src/util/env/format-env-target.ts
|
172963
|
-
function formatEnvTarget(env) {
|
172964
|
-
const target = (Array.isArray(env.target) ? env.target : [env.target || ""]).map((t) => (0, import_title4.default)(t)).join(", ");
|
172965
|
-
return env.gitBranch ? `${target} (${env.gitBranch})` : target;
|
172966
|
-
}
|
172967
|
-
var import_title4;
|
172968
|
-
var init_format_env_target = __esm({
|
172969
|
-
"src/util/env/format-env-target.ts"() {
|
172970
|
-
"use strict";
|
172971
|
-
import_title4 = __toESM3(require_lib17());
|
172972
|
-
}
|
172973
|
-
});
|
172974
|
-
|
172975
172929
|
// src/util/output/ellipsis.ts
|
172976
172930
|
function ellipsis(str, length) {
|
172977
172931
|
return str.length > length ? `${str.slice(0, length - 1)}\u2026` : str;
|
@@ -173002,16 +172956,14 @@ async function ls5(client2, project, opts, args2, output2) {
|
|
173002
172956
|
return 1;
|
173003
172957
|
}
|
173004
172958
|
const lsStamp = stamp_default();
|
173005
|
-
const
|
173006
|
-
output2,
|
173007
|
-
client2,
|
173008
|
-
project.id,
|
173009
|
-
"vercel-cli:env:ls",
|
173010
|
-
{
|
172959
|
+
const [envsResult, customEnvs] = await Promise.all([
|
172960
|
+
getEnvRecords(output2, client2, project.id, "vercel-cli:env:ls", {
|
173011
172961
|
target: envTarget,
|
173012
172962
|
gitBranch: envGitBranch
|
173013
|
-
}
|
173014
|
-
|
172963
|
+
}),
|
172964
|
+
getCustomEnvironments(client2, project.id)
|
172965
|
+
]);
|
172966
|
+
const { envs } = envsResult;
|
173015
172967
|
if (envs.length === 0) {
|
173016
172968
|
output2.log(
|
173017
172969
|
`No Environment Variables found in Project ${import_chalk81.default.bold(
|
@@ -173024,11 +172976,26 @@ async function ls5(client2, project, opts, args2, output2) {
|
|
173024
172976
|
project.name
|
173025
172977
|
)} ${import_chalk81.default.gray(lsStamp())}`
|
173026
172978
|
);
|
173027
|
-
|
172979
|
+
client2.stdout.write(`${getTable(envs, customEnvs)}
|
172980
|
+
`);
|
173028
172981
|
}
|
173029
172982
|
return 0;
|
173030
172983
|
}
|
173031
|
-
function
|
172984
|
+
async function getCustomEnvironments(client2, projectId) {
|
172985
|
+
try {
|
172986
|
+
const res = await client2.fetch(
|
172987
|
+
`/projects/${encodeURIComponent(projectId)}/custom-environments`,
|
172988
|
+
{ method: "GET" }
|
172989
|
+
);
|
172990
|
+
return res.environments;
|
172991
|
+
} catch (error4) {
|
172992
|
+
if ((0, import_error_utils23.isObject)(error4) && error4.status === 404) {
|
172993
|
+
return [];
|
172994
|
+
}
|
172995
|
+
throw error4;
|
172996
|
+
}
|
172997
|
+
}
|
172998
|
+
function getTable(records, customEnvironments) {
|
173032
172999
|
const label = records.some((env) => env.gitBranch) ? "environments (git branch)" : "environments";
|
173033
173000
|
return formatTable(
|
173034
173001
|
["name", "value", label, "created"],
|
@@ -173036,12 +173003,12 @@ function getTable(records) {
|
|
173036
173003
|
[
|
173037
173004
|
{
|
173038
173005
|
name: "",
|
173039
|
-
rows: records.map(getRow)
|
173006
|
+
rows: records.map((row) => getRow(row, customEnvironments))
|
173040
173007
|
}
|
173041
173008
|
]
|
173042
173009
|
);
|
173043
173010
|
}
|
173044
|
-
function getRow(env) {
|
173011
|
+
function getRow(env, customEnvironments) {
|
173045
173012
|
let value;
|
173046
173013
|
if (env.type === "plain") {
|
173047
173014
|
const singleLineValue = env.value.replace(/\s/g, " ");
|
@@ -173055,24 +173022,31 @@ function getRow(env) {
|
|
173055
173022
|
return [
|
173056
173023
|
import_chalk81.default.bold(env.key),
|
173057
173024
|
value,
|
173058
|
-
formatEnvTarget(env),
|
173025
|
+
formatEnvTarget(env, customEnvironments),
|
173059
173026
|
env.createdAt ? `${(0, import_ms16.default)(now - env.createdAt)} ago` : ""
|
173060
173027
|
];
|
173061
173028
|
}
|
173062
|
-
|
173029
|
+
function formatEnvTarget(env, customEnvironments) {
|
173030
|
+
const defaultTargets = (Array.isArray(env.target) ? env.target : [env.target || ""]).map((t) => (0, import_title4.default)(t));
|
173031
|
+
const customTargets = env.customEnvironmentIds ? env.customEnvironmentIds.map((id) => customEnvironments.find((e2) => e2.id === id)?.name).filter(Boolean) : [];
|
173032
|
+
const targetsString = [...defaultTargets, ...customTargets].join(", ");
|
173033
|
+
return env.gitBranch ? `${targetsString} (${env.gitBranch})` : targetsString;
|
173034
|
+
}
|
173035
|
+
var import_chalk81, import_ms16, import_title4, import_error_utils23;
|
173063
173036
|
var init_ls5 = __esm({
|
173064
173037
|
"src/commands/env/ls.ts"() {
|
173065
173038
|
"use strict";
|
173066
173039
|
import_chalk81 = __toESM3(require_source());
|
173067
173040
|
import_ms16 = __toESM3(require_ms2());
|
173041
|
+
import_title4 = __toESM3(require_lib17());
|
173068
173042
|
init_format_table();
|
173069
173043
|
init_get_env_records();
|
173070
|
-
init_format_env_target();
|
173071
173044
|
init_env_target();
|
173072
173045
|
init_stamp();
|
173073
173046
|
init_param();
|
173074
173047
|
init_pkg_name();
|
173075
173048
|
init_ellipsis();
|
173049
|
+
import_error_utils23 = __toESM3(require_dist2());
|
173076
173050
|
}
|
173077
173051
|
});
|
173078
173052
|
|
@@ -173090,6 +173064,19 @@ var init_remove_env_record = __esm({
|
|
173090
173064
|
}
|
173091
173065
|
});
|
173092
173066
|
|
173067
|
+
// src/util/env/format-env-target.ts
|
173068
|
+
function formatEnvTarget2(env) {
|
173069
|
+
const target = (Array.isArray(env.target) ? env.target : [env.target || ""]).map((t) => (0, import_title5.default)(t)).join(", ");
|
173070
|
+
return env.gitBranch ? `${target} (${env.gitBranch})` : target;
|
173071
|
+
}
|
173072
|
+
var import_title5;
|
173073
|
+
var init_format_env_target = __esm({
|
173074
|
+
"src/util/env/format-env-target.ts"() {
|
173075
|
+
"use strict";
|
173076
|
+
import_title5 = __toESM3(require_lib17());
|
173077
|
+
}
|
173078
|
+
});
|
173079
|
+
|
173093
173080
|
// src/commands/env/rm.ts
|
173094
173081
|
async function rm5(client2, project, opts, args2, output2) {
|
173095
173082
|
if (args2.length > 3) {
|
@@ -173134,7 +173121,12 @@ async function rm5(client2, project, opts, args2, output2) {
|
|
173134
173121
|
while (envs.length > 1) {
|
173135
173122
|
const id = await client2.input.select({
|
173136
173123
|
message: `Remove ${envName} from which Environments?`,
|
173137
|
-
choices: envs.map((env2) => ({
|
173124
|
+
choices: envs.map((env2) => ({
|
173125
|
+
value: env2.id,
|
173126
|
+
// TODO: once supporting custom environments,
|
173127
|
+
// use new `formatEnvTarget` from `vc env ls`
|
173128
|
+
name: formatEnvTarget2(env2)
|
173129
|
+
}))
|
173138
173130
|
});
|
173139
173131
|
if (!id) {
|
173140
173132
|
output2.error("Please select at least one Environment Variable to remove");
|
@@ -173145,7 +173137,7 @@ async function rm5(client2, project, opts, args2, output2) {
|
|
173145
173137
|
const skipConfirmation = opts["--yes"];
|
173146
173138
|
if (!skipConfirmation && !await confirm(
|
173147
173139
|
client2,
|
173148
|
-
`Removing Environment Variable ${param(env.key)} from ${
|
173140
|
+
`Removing Environment Variable ${param(env.key)} from ${formatEnvTarget2(
|
173149
173141
|
env
|
173150
173142
|
)} in Project ${import_chalk82.default.bold(project.name)}. Are you sure?`,
|
173151
173143
|
false
|
@@ -173199,6 +173191,7 @@ var init_command11 = __esm({
|
|
173199
173191
|
"use strict";
|
173200
173192
|
init_pkg_name();
|
173201
173193
|
init_env_target();
|
173194
|
+
init_arg_common();
|
173202
173195
|
targetPlaceholder = getEnvTargetPlaceholder();
|
173203
173196
|
envCommand = {
|
173204
173197
|
name: "env",
|
@@ -173239,11 +173232,9 @@ var init_command11 = __esm({
|
|
173239
173232
|
deprecated: false
|
173240
173233
|
},
|
173241
173234
|
{
|
173242
|
-
|
173235
|
+
...forceOption,
|
173243
173236
|
description: "Force overwrites when a command would normally fail",
|
173244
|
-
shorthand: null
|
173245
|
-
type: Boolean,
|
173246
|
-
deprecated: false
|
173237
|
+
shorthand: null
|
173247
173238
|
}
|
173248
173239
|
],
|
173249
173240
|
examples: []
|
@@ -173282,7 +173273,7 @@ var init_command11 = __esm({
|
|
173282
173273
|
name: "environment",
|
173283
173274
|
description: "Set the Environment (development, preview, production) when pulling Environment Variables",
|
173284
173275
|
shorthand: null,
|
173285
|
-
type:
|
173276
|
+
type: String,
|
173286
173277
|
deprecated: false
|
173287
173278
|
},
|
173288
173279
|
{
|
@@ -173293,12 +173284,11 @@ var init_command11 = __esm({
|
|
173293
173284
|
deprecated: false
|
173294
173285
|
},
|
173295
173286
|
{
|
173296
|
-
|
173297
|
-
description: "Skip the confirmation prompt when removing an alias"
|
173298
|
-
|
173299
|
-
|
173300
|
-
|
173301
|
-
}
|
173287
|
+
...yesOption,
|
173288
|
+
description: "Skip the confirmation prompt when removing an alias"
|
173289
|
+
},
|
173290
|
+
{ name: "sensitive", shorthand: null, type: Boolean, deprecated: false },
|
173291
|
+
{ name: "force", shorthand: null, type: Boolean, deprecated: false }
|
173302
173292
|
],
|
173303
173293
|
examples: [
|
173304
173294
|
{
|
@@ -173377,31 +173367,26 @@ __export3(env_exports, {
|
|
173377
173367
|
default: () => main6
|
173378
173368
|
});
|
173379
173369
|
async function main6(client2) {
|
173380
|
-
let
|
173370
|
+
let parsedArgs = null;
|
173371
|
+
const flagsSpecification = getFlagsSpecification(envCommand.options);
|
173381
173372
|
try {
|
173382
|
-
|
173383
|
-
"--yes": Boolean,
|
173384
|
-
"-y": "--yes",
|
173385
|
-
"--environment": String,
|
173386
|
-
"--git-branch": String,
|
173387
|
-
"--sensitive": Boolean,
|
173388
|
-
"--force": Boolean
|
173389
|
-
});
|
173373
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
173390
173374
|
} catch (error4) {
|
173391
173375
|
handleError(error4);
|
173392
173376
|
return 1;
|
173393
173377
|
}
|
173394
|
-
|
173395
|
-
|
173378
|
+
const { output: output2 } = client2;
|
173379
|
+
if (parsedArgs.flags["--help"]) {
|
173380
|
+
output2.print(help2(envCommand, { columns: client2.stderr.columns }));
|
173396
173381
|
return 2;
|
173397
173382
|
}
|
173398
|
-
const subArgs =
|
173383
|
+
const subArgs = parsedArgs.args.slice(1);
|
173399
173384
|
const { subcommand: subcommand2, args: args2 } = getSubcommand(subArgs, COMMAND_CONFIG6);
|
173400
|
-
const { cwd,
|
173385
|
+
const { cwd, config: config3 } = client2;
|
173401
173386
|
const target = parseTarget({
|
173402
173387
|
output: output2,
|
173403
173388
|
targetFlagName: "environment",
|
173404
|
-
targetFlagValue:
|
173389
|
+
targetFlagValue: parsedArgs.flags["--environment"]
|
173405
173390
|
}) || "development";
|
173406
173391
|
const link4 = await getLinkedProject(client2, cwd);
|
173407
173392
|
if (link4.status === "error") {
|
@@ -173418,18 +173403,18 @@ async function main6(client2) {
|
|
173418
173403
|
config3.currentTeam = org.type === "team" ? org.id : void 0;
|
173419
173404
|
switch (subcommand2) {
|
173420
173405
|
case "ls":
|
173421
|
-
return ls5(client2, project,
|
173406
|
+
return ls5(client2, project, parsedArgs.flags, args2, output2);
|
173422
173407
|
case "add":
|
173423
|
-
return add5(client2, project,
|
173408
|
+
return add5(client2, project, parsedArgs.flags, args2, output2);
|
173424
173409
|
case "rm":
|
173425
|
-
return rm5(client2, project,
|
173410
|
+
return rm5(client2, project, parsedArgs.flags, args2, output2);
|
173426
173411
|
case "pull":
|
173427
173412
|
return pull(
|
173428
173413
|
client2,
|
173429
173414
|
link4,
|
173430
173415
|
project,
|
173431
173416
|
target,
|
173432
|
-
|
173417
|
+
parsedArgs.flags,
|
173433
173418
|
args2,
|
173434
173419
|
output2,
|
173435
173420
|
cwd,
|
@@ -173461,6 +173446,7 @@ var init_env = __esm({
|
|
173461
173446
|
init_rm5();
|
173462
173447
|
init_command11();
|
173463
173448
|
init_parse_target();
|
173449
|
+
init_get_flags_specification();
|
173464
173450
|
COMMAND_CONFIG6 = {
|
173465
173451
|
ls: ["ls", "list"],
|
173466
173452
|
add: ["add"],
|
@@ -173474,7 +173460,7 @@ var init_env = __esm({
|
|
173474
173460
|
async function connect(client2, argv2, args2, project, org) {
|
173475
173461
|
const { cwd, output: output2 } = client2;
|
173476
173462
|
const confirm2 = Boolean(argv2["--yes"]);
|
173477
|
-
const repoArg =
|
173463
|
+
const repoArg = args2[0];
|
173478
173464
|
if (args2.length > 1) {
|
173479
173465
|
output2.error(
|
173480
173466
|
`Invalid number of arguments. Usage: ${import_chalk83.default.cyan(
|
@@ -173871,6 +173857,7 @@ var init_command12 = __esm({
|
|
173871
173857
|
"src/commands/git/command.ts"() {
|
173872
173858
|
"use strict";
|
173873
173859
|
init_pkg_name();
|
173860
|
+
init_arg_common();
|
173874
173861
|
gitCommand = {
|
173875
173862
|
name: "git",
|
173876
173863
|
description: "Manage your Git provider connections.",
|
@@ -173901,7 +173888,7 @@ var init_command12 = __esm({
|
|
173901
173888
|
examples: []
|
173902
173889
|
}
|
173903
173890
|
],
|
173904
|
-
options: [],
|
173891
|
+
options: [yesOption, { ...confirmOption, deprecated: true }],
|
173905
173892
|
examples: [
|
173906
173893
|
{
|
173907
173894
|
name: "Connect your Vercel Project to your Git repository defined in your local .git config",
|
@@ -173926,29 +173913,29 @@ __export3(git_exports, {
|
|
173926
173913
|
default: () => main7
|
173927
173914
|
});
|
173928
173915
|
async function main7(client2) {
|
173929
|
-
let argv2;
|
173930
173916
|
let subcommand2;
|
173917
|
+
let parsedArgs = null;
|
173918
|
+
const flagsSpecification = getFlagsSpecification(gitCommand.options);
|
173931
173919
|
try {
|
173932
|
-
|
173933
|
-
"--yes": Boolean,
|
173934
|
-
"-y": "--yes",
|
173935
|
-
// deprecated
|
173936
|
-
"-c": "--yes",
|
173937
|
-
"--confirm": "--yes"
|
173938
|
-
});
|
173920
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
173939
173921
|
} catch (error4) {
|
173940
173922
|
handleError(error4);
|
173941
173923
|
return 1;
|
173942
173924
|
}
|
173943
|
-
|
173944
|
-
|
173925
|
+
const { output: output2 } = client2;
|
173926
|
+
if (parsedArgs.flags["--help"]) {
|
173927
|
+
output2.print(help2(gitCommand, { columns: client2.stderr.columns }));
|
173945
173928
|
return 2;
|
173946
173929
|
}
|
173947
|
-
|
173948
|
-
|
173949
|
-
|
173950
|
-
|
173951
|
-
|
173930
|
+
if ("--confirm" in parsedArgs.flags) {
|
173931
|
+
output2.warn("`--confirm` is deprecated, please use `--yes` instead");
|
173932
|
+
parsedArgs.flags["--yes"] = parsedArgs.flags["--confirm"];
|
173933
|
+
}
|
173934
|
+
parsedArgs.args = parsedArgs.args.slice(1);
|
173935
|
+
subcommand2 = parsedArgs.args[0];
|
173936
|
+
const args2 = parsedArgs.args.slice(1);
|
173937
|
+
const autoConfirm = Boolean(parsedArgs.flags["--yes"]);
|
173938
|
+
const { cwd } = client2;
|
173952
173939
|
const linkedProject = await ensureLink("git", client2, cwd, { autoConfirm });
|
173953
173940
|
if (typeof linkedProject === "number") {
|
173954
173941
|
return linkedProject;
|
@@ -173957,12 +173944,12 @@ async function main7(client2) {
|
|
173957
173944
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
173958
173945
|
switch (subcommand2) {
|
173959
173946
|
case "connect":
|
173960
|
-
return await connect(client2,
|
173947
|
+
return await connect(client2, parsedArgs.flags, args2, project, org);
|
173961
173948
|
case "disconnect":
|
173962
173949
|
return await disconnect(client2, args2, project, org);
|
173963
173950
|
default:
|
173964
173951
|
output2.error(getInvalidSubcommand(COMMAND_CONFIG7));
|
173965
|
-
|
173952
|
+
output2.print(help2(gitCommand, { columns: client2.stderr.columns }));
|
173966
173953
|
return 2;
|
173967
173954
|
}
|
173968
173955
|
}
|
@@ -173978,6 +173965,7 @@ var init_git = __esm({
|
|
173978
173965
|
init_disconnect();
|
173979
173966
|
init_help();
|
173980
173967
|
init_command12();
|
173968
|
+
init_get_flags_specification();
|
173981
173969
|
COMMAND_CONFIG7 = {
|
173982
173970
|
connect: ["connect"],
|
173983
173971
|
disconnect: ["disconnect"]
|
@@ -174279,6 +174267,7 @@ var init_command13 = __esm({
|
|
174279
174267
|
"src/commands/init/command.ts"() {
|
174280
174268
|
"use strict";
|
174281
174269
|
init_pkg_name();
|
174270
|
+
init_arg_common();
|
174282
174271
|
initCommand = {
|
174283
174272
|
name: "init",
|
174284
174273
|
description: "Initialize example Vercel Projects",
|
@@ -174295,12 +174284,9 @@ var init_command13 = __esm({
|
|
174295
174284
|
subcommands: void 0,
|
174296
174285
|
options: [
|
174297
174286
|
{
|
174298
|
-
|
174287
|
+
...forceOption,
|
174299
174288
|
description: "Overwrite destination directory if exists [off]",
|
174300
|
-
argument: void 0
|
174301
|
-
shorthand: "f",
|
174302
|
-
type: Boolean,
|
174303
|
-
deprecated: false
|
174289
|
+
argument: void 0
|
174304
174290
|
}
|
174305
174291
|
],
|
174306
174292
|
examples: [
|
@@ -174332,37 +174318,35 @@ __export3(init_exports, {
|
|
174332
174318
|
});
|
174333
174319
|
async function main8(client2) {
|
174334
174320
|
const { output: output2 } = client2;
|
174335
|
-
let argv2;
|
174336
174321
|
let args2;
|
174322
|
+
let parsedArgs = null;
|
174323
|
+
const flagsSpecification = getFlagsSpecification(initCommand.options);
|
174337
174324
|
try {
|
174338
|
-
|
174339
|
-
|
174340
|
-
|
174341
|
-
});
|
174342
|
-
args2 = getSubcommand(argv2._.slice(1), COMMAND_CONFIG8).args;
|
174343
|
-
} catch (err) {
|
174344
|
-
handleError(err);
|
174325
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
174326
|
+
} catch (error4) {
|
174327
|
+
handleError(error4);
|
174345
174328
|
return 1;
|
174346
174329
|
}
|
174347
|
-
if (
|
174348
|
-
|
174330
|
+
if (parsedArgs.flags["--help"]) {
|
174331
|
+
output2.print(help2(initCommand, { columns: client2.stderr.columns }));
|
174349
174332
|
return 2;
|
174350
174333
|
}
|
174351
|
-
|
174334
|
+
args2 = getSubcommand(parsedArgs.args.slice(1), COMMAND_CONFIG8).args;
|
174335
|
+
if (parsedArgs.args.length > 3) {
|
174352
174336
|
output2.error("Too much arguments.");
|
174353
174337
|
return 1;
|
174354
174338
|
}
|
174355
174339
|
try {
|
174356
|
-
return await init(client2,
|
174340
|
+
return await init(client2, parsedArgs.flags, args2);
|
174357
174341
|
} catch (err) {
|
174358
174342
|
output2.prettyError(err);
|
174359
|
-
if ((0,
|
174343
|
+
if ((0, import_error_utils24.isError)(err) && typeof err.stack === "string") {
|
174360
174344
|
output2.debug(err.stack);
|
174361
174345
|
}
|
174362
174346
|
return 1;
|
174363
174347
|
}
|
174364
174348
|
}
|
174365
|
-
var
|
174349
|
+
var import_error_utils24, COMMAND_CONFIG8;
|
174366
174350
|
var init_init2 = __esm({
|
174367
174351
|
"src/commands/init/index.ts"() {
|
174368
174352
|
"use strict";
|
@@ -174370,9 +174354,10 @@ var init_init2 = __esm({
|
|
174370
174354
|
init_get_subcommand();
|
174371
174355
|
init_handle_error();
|
174372
174356
|
init_init();
|
174373
|
-
|
174357
|
+
import_error_utils24 = __toESM3(require_dist2());
|
174374
174358
|
init_help();
|
174375
174359
|
init_command13();
|
174360
|
+
init_get_flags_specification();
|
174376
174361
|
COMMAND_CONFIG8 = {
|
174377
174362
|
init: ["init"]
|
174378
174363
|
};
|
@@ -174804,7 +174789,7 @@ async function inspect3(client2) {
|
|
174804
174789
|
try {
|
174805
174790
|
({ contextName } = await getScope(client2));
|
174806
174791
|
} catch (err) {
|
174807
|
-
if ((0,
|
174792
|
+
if ((0, import_error_utils25.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
174808
174793
|
error4(err.message);
|
174809
174794
|
return 1;
|
174810
174795
|
}
|
@@ -174855,7 +174840,7 @@ async function inspect3(client2) {
|
|
174855
174840
|
}
|
174856
174841
|
function stateString(s) {
|
174857
174842
|
const CIRCLE = "\u25CF ";
|
174858
|
-
const sTitle = s && (0,
|
174843
|
+
const sTitle = s && (0, import_title6.default)(s);
|
174859
174844
|
switch (s) {
|
174860
174845
|
case "INITIALIZING":
|
174861
174846
|
case "BUILDING":
|
@@ -174960,14 +174945,14 @@ function exitCode(state) {
|
|
174960
174945
|
}
|
174961
174946
|
return 0;
|
174962
174947
|
}
|
174963
|
-
var
|
174948
|
+
var import_error_utils25, import_chalk89, import_ms17, import_title6, import_url20;
|
174964
174949
|
var init_inspect2 = __esm({
|
174965
174950
|
"src/commands/inspect/index.ts"() {
|
174966
174951
|
"use strict";
|
174967
|
-
|
174952
|
+
import_error_utils25 = __toESM3(require_dist2());
|
174968
174953
|
import_chalk89 = __toESM3(require_source());
|
174969
174954
|
import_ms17 = __toESM3(require_ms2());
|
174970
|
-
|
174955
|
+
import_title6 = __toESM3(require_lib17());
|
174971
174956
|
import_url20 = require("url");
|
174972
174957
|
init_is_deploying();
|
174973
174958
|
init_logs();
|
@@ -174994,6 +174979,7 @@ var init_command15 = __esm({
|
|
174994
174979
|
"src/commands/link/command.ts"() {
|
174995
174980
|
"use strict";
|
174996
174981
|
init_pkg_name();
|
174982
|
+
init_arg_common();
|
174997
174983
|
linkCommand = {
|
174998
174984
|
name: "link",
|
174999
174985
|
description: "Link a local directory to a Vercel Project.",
|
@@ -175003,7 +174989,7 @@ var init_command15 = __esm({
|
|
175003
174989
|
name: "repo",
|
175004
174990
|
description: "Link multiple projects based on Git repository (alpha)",
|
175005
174991
|
shorthand: "r",
|
175006
|
-
type:
|
174992
|
+
type: Boolean,
|
175007
174993
|
deprecated: false
|
175008
174994
|
},
|
175009
174995
|
{
|
@@ -175015,12 +175001,10 @@ var init_command15 = __esm({
|
|
175015
175001
|
deprecated: false
|
175016
175002
|
},
|
175017
175003
|
{
|
175018
|
-
|
175019
|
-
description: "Skip questions when setting up new project using default scope and settings"
|
175020
|
-
|
175021
|
-
|
175022
|
-
deprecated: false
|
175023
|
-
}
|
175004
|
+
...yesOption,
|
175005
|
+
description: "Skip questions when setting up new project using default scope and settings"
|
175006
|
+
},
|
175007
|
+
{ ...confirmOption, deprecated: true }
|
175024
175008
|
],
|
175025
175009
|
examples: [
|
175026
175010
|
{
|
@@ -175050,27 +175034,25 @@ __export3(link_exports, {
|
|
175050
175034
|
default: () => link3
|
175051
175035
|
});
|
175052
175036
|
async function link3(client2) {
|
175053
|
-
|
175054
|
-
|
175055
|
-
|
175056
|
-
|
175057
|
-
|
175058
|
-
|
175059
|
-
|
175060
|
-
|
175061
|
-
|
175062
|
-
|
175063
|
-
|
175064
|
-
if (argv2["--help"]) {
|
175065
|
-
client2.output.print(help2(linkCommand, { columns: client2.stderr.columns }));
|
175037
|
+
let parsedArgs = null;
|
175038
|
+
const flagsSpecification = getFlagsSpecification(linkCommand.options);
|
175039
|
+
try {
|
175040
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
175041
|
+
} catch (error4) {
|
175042
|
+
handleError(error4);
|
175043
|
+
return 1;
|
175044
|
+
}
|
175045
|
+
const { output: output2 } = client2;
|
175046
|
+
if (parsedArgs.flags["--help"]) {
|
175047
|
+
output2.print(help2(linkCommand, { columns: client2.stderr.columns }));
|
175066
175048
|
return 2;
|
175067
175049
|
}
|
175068
|
-
if ("--confirm" in
|
175050
|
+
if ("--confirm" in parsedArgs.flags) {
|
175069
175051
|
client2.output.warn("`--confirm` is deprecated, please use `--yes` instead");
|
175070
|
-
|
175052
|
+
parsedArgs.flags["--yes"] = parsedArgs.flags["--confirm"];
|
175071
175053
|
}
|
175072
|
-
const yes = !!
|
175073
|
-
let cwd =
|
175054
|
+
const yes = !!parsedArgs.flags["--yes"];
|
175055
|
+
let cwd = parsedArgs.args[1];
|
175074
175056
|
if (cwd) {
|
175075
175057
|
client2.output.warn(
|
175076
175058
|
`The ${cmd("vc link <directory>")} syntax is deprecated, please use ${cmd(
|
@@ -175080,7 +175062,7 @@ async function link3(client2) {
|
|
175080
175062
|
} else {
|
175081
175063
|
cwd = client2.cwd;
|
175082
175064
|
}
|
175083
|
-
if (
|
175065
|
+
if (parsedArgs.flags["--repo"]) {
|
175084
175066
|
client2.output.warn(
|
175085
175067
|
`The ${cmd("--repo")} flag is in alpha, please report issues`
|
175086
175068
|
);
|
@@ -175089,7 +175071,7 @@ async function link3(client2) {
|
|
175089
175071
|
const link4 = await ensureLink("link", client2, cwd, {
|
175090
175072
|
autoConfirm: yes,
|
175091
175073
|
forceDelete: true,
|
175092
|
-
projectName:
|
175074
|
+
projectName: parsedArgs.flags["--project"],
|
175093
175075
|
successEmoji: "success"
|
175094
175076
|
});
|
175095
175077
|
if (typeof link4 === "number") {
|
@@ -175107,6 +175089,8 @@ var init_link3 = __esm({
|
|
175107
175089
|
init_repo();
|
175108
175090
|
init_help();
|
175109
175091
|
init_command15();
|
175092
|
+
init_get_flags_specification();
|
175093
|
+
init_handle_error();
|
175110
175094
|
}
|
175111
175095
|
});
|
175112
175096
|
|
@@ -175116,6 +175100,7 @@ var init_command16 = __esm({
|
|
175116
175100
|
"src/commands/list/command.ts"() {
|
175117
175101
|
"use strict";
|
175118
175102
|
init_pkg_name();
|
175103
|
+
init_arg_common();
|
175119
175104
|
listCommand = {
|
175120
175105
|
name: "list",
|
175121
175106
|
description: "List app deployments for an app.",
|
@@ -175130,7 +175115,7 @@ var init_command16 = __esm({
|
|
175130
175115
|
name: "meta",
|
175131
175116
|
description: "Filter deployments by metadata (e.g.: `-m KEY=value`). Can appear many times.",
|
175132
175117
|
argument: "KEY=value",
|
175133
|
-
shorthand:
|
175118
|
+
shorthand: "m",
|
175134
175119
|
type: [String],
|
175135
175120
|
deprecated: false
|
175136
175121
|
},
|
@@ -175143,13 +175128,14 @@ var init_command16 = __esm({
|
|
175143
175128
|
deprecated: false
|
175144
175129
|
},
|
175145
175130
|
{
|
175146
|
-
|
175131
|
+
...nextOption,
|
175147
175132
|
description: "Show next page of results",
|
175148
|
-
argument: "MS"
|
175149
|
-
|
175150
|
-
|
175151
|
-
|
175152
|
-
|
175133
|
+
argument: "MS"
|
175134
|
+
},
|
175135
|
+
// this can be deprecated someday
|
175136
|
+
{ name: "prod", shorthand: null, type: Boolean, deprecated: false },
|
175137
|
+
yesOption,
|
175138
|
+
{ ...confirmOption, deprecated: true }
|
175153
175139
|
],
|
175154
175140
|
examples: [
|
175155
175141
|
{
|
@@ -175181,54 +175167,42 @@ __export3(list_exports, {
|
|
175181
175167
|
stateString: () => stateString2
|
175182
175168
|
});
|
175183
175169
|
async function list2(client2) {
|
175184
|
-
|
175170
|
+
const { cwd, output: output2, config: config3 } = client2;
|
175171
|
+
let parsedArgs = null;
|
175172
|
+
const flagsSpecification = getFlagsSpecification(listCommand.options);
|
175185
175173
|
try {
|
175186
|
-
|
175187
|
-
|
175188
|
-
|
175189
|
-
"-m": "--meta",
|
175190
|
-
"--next": Number,
|
175191
|
-
"-N": "--next",
|
175192
|
-
"--prod": Boolean,
|
175193
|
-
// this can be deprecated someday
|
175194
|
-
"--yes": Boolean,
|
175195
|
-
"-y": "--yes",
|
175196
|
-
// deprecated
|
175197
|
-
"--confirm": Boolean,
|
175198
|
-
"-c": "--confirm"
|
175199
|
-
});
|
175200
|
-
} catch (err) {
|
175201
|
-
handleError(err);
|
175174
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
175175
|
+
} catch (error5) {
|
175176
|
+
handleError(error5);
|
175202
175177
|
return 1;
|
175203
175178
|
}
|
175204
|
-
|
175205
|
-
|
175179
|
+
if (parsedArgs.flags["--help"]) {
|
175180
|
+
output2.print(help2(listCommand, { columns: client2.stderr.columns }));
|
175181
|
+
return 2;
|
175182
|
+
}
|
175183
|
+
if ("--confirm" in parsedArgs.flags) {
|
175206
175184
|
output2.warn("`--confirm` is deprecated, please use `--yes` instead");
|
175207
|
-
|
175185
|
+
parsedArgs.flags["--yes"] = parsedArgs.flags["--confirm"];
|
175208
175186
|
}
|
175209
175187
|
const { print, log: log2, error: error4, note, debug: debug3, spinner } = output2;
|
175210
|
-
if (
|
175188
|
+
if (parsedArgs.args.length > 2) {
|
175211
175189
|
error4(`${getCommandName("ls [app]")} accepts at most one argument`);
|
175212
175190
|
return 1;
|
175213
175191
|
}
|
175214
|
-
|
175215
|
-
|
175216
|
-
return 2;
|
175217
|
-
}
|
175218
|
-
const autoConfirm = !!argv2["--yes"];
|
175219
|
-
const meta = parseMeta(argv2["--meta"]);
|
175192
|
+
const autoConfirm = !!parsedArgs.flags["--yes"];
|
175193
|
+
const meta = parseMeta(parsedArgs.flags["--meta"]);
|
175220
175194
|
const target = parseTarget({
|
175221
175195
|
output: output2,
|
175222
175196
|
targetFlagName: "environment",
|
175223
|
-
targetFlagValue:
|
175224
|
-
prodFlagValue:
|
175197
|
+
targetFlagValue: parsedArgs.flags["--environment"],
|
175198
|
+
prodFlagValue: parsedArgs.flags["--prod"]
|
175225
175199
|
});
|
175226
175200
|
let link4 = await getLinkedProject(client2, cwd);
|
175227
175201
|
if (link4.status === "error") {
|
175228
175202
|
return link4.exitCode;
|
175229
175203
|
}
|
175230
175204
|
let { org, project, status } = link4;
|
175231
|
-
const appArg =
|
175205
|
+
const appArg = parsedArgs.args[1];
|
175232
175206
|
let app = appArg || project?.name;
|
175233
175207
|
let host = void 0;
|
175234
175208
|
if (app && !isValidName(app)) {
|
@@ -175252,12 +175226,12 @@ async function list2(client2) {
|
|
175252
175226
|
try {
|
175253
175227
|
({ contextName, team } = await getScope(client2));
|
175254
175228
|
} catch (err) {
|
175255
|
-
if ((0,
|
175229
|
+
if ((0, import_error_utils26.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
175256
175230
|
error4(err.message);
|
175257
175231
|
return 1;
|
175258
175232
|
}
|
175259
175233
|
}
|
175260
|
-
if (
|
175234
|
+
if (parsedArgs.flags["--scope"]) {
|
175261
175235
|
client2.config.currentTeam = team?.id || void 0;
|
175262
175236
|
if (team?.slug)
|
175263
175237
|
contextName = team.slug;
|
@@ -175268,7 +175242,7 @@ async function list2(client2) {
|
|
175268
175242
|
}
|
175269
175243
|
const { currentTeam } = config3;
|
175270
175244
|
({ contextName } = await getScope(client2));
|
175271
|
-
const nextTimestamp2 =
|
175245
|
+
const nextTimestamp2 = parsedArgs.flags["--next"];
|
175272
175246
|
if (typeof nextTimestamp2 !== void 0 && Number.isNaN(nextTimestamp2)) {
|
175273
175247
|
error4("Please provide a number for flag `--next`");
|
175274
175248
|
return 1;
|
@@ -175388,7 +175362,7 @@ async function list2(client2) {
|
|
175388
175362
|
client2.stdout.write("\n");
|
175389
175363
|
}
|
175390
175364
|
if (pagination && pagination.count === 20) {
|
175391
|
-
const flags = getCommandFlags(
|
175365
|
+
const flags = getCommandFlags(parsedArgs.flags, ["--next"]);
|
175392
175366
|
log2(
|
175393
175367
|
`To display the next page, run ${getCommandName(
|
175394
175368
|
`ls${app ? " " + app : ""}${flags} --next ${pagination.next}`
|
@@ -175408,7 +175382,7 @@ function getDeploymentDuration(dep) {
|
|
175408
175382
|
}
|
175409
175383
|
function stateString2(s) {
|
175410
175384
|
const CIRCLE = "\u25CF ";
|
175411
|
-
const sTitle = (0,
|
175385
|
+
const sTitle = (0, import_title7.default)(s);
|
175412
175386
|
switch (s) {
|
175413
175387
|
case "INITIALIZING":
|
175414
175388
|
case "BUILDING":
|
@@ -175442,14 +175416,14 @@ function filterUniqueApps() {
|
|
175442
175416
|
return true;
|
175443
175417
|
};
|
175444
175418
|
}
|
175445
|
-
var import_chalk90, import_ms18,
|
175419
|
+
var import_chalk90, import_ms18, import_title7, import_error_utils26;
|
175446
175420
|
var init_list2 = __esm({
|
175447
175421
|
"src/commands/list/index.ts"() {
|
175448
175422
|
"use strict";
|
175449
175423
|
import_chalk90 = __toESM3(require_source());
|
175450
175424
|
import_ms18 = __toESM3(require_ms2());
|
175451
175425
|
init_table();
|
175452
|
-
|
175426
|
+
import_title7 = __toESM3(require_lib17());
|
175453
175427
|
init_util();
|
175454
175428
|
init_get_args();
|
175455
175429
|
init_error2();
|
@@ -175463,10 +175437,11 @@ var init_list2 = __esm({
|
|
175463
175437
|
init_ensure_link();
|
175464
175438
|
init_get_scope();
|
175465
175439
|
init_errors_ts();
|
175466
|
-
|
175440
|
+
import_error_utils26 = __toESM3(require_dist2());
|
175467
175441
|
init_help();
|
175468
175442
|
init_command16();
|
175469
175443
|
init_parse_target();
|
175444
|
+
init_get_flags_specification();
|
175470
175445
|
}
|
175471
175446
|
});
|
175472
175447
|
|
@@ -175518,7 +175493,7 @@ async function logs(client2) {
|
|
175518
175493
|
try {
|
175519
175494
|
({ contextName } = await getScope(client2));
|
175520
175495
|
} catch (err) {
|
175521
|
-
if ((0,
|
175496
|
+
if ((0, import_error_utils27.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
175522
175497
|
error4(err.message);
|
175523
175498
|
return 1;
|
175524
175499
|
}
|
@@ -175572,11 +175547,11 @@ function printDisclaimer(deployment, { print, warn }) {
|
|
175572
175547
|
`
|
175573
175548
|
);
|
175574
175549
|
}
|
175575
|
-
var
|
175550
|
+
var import_error_utils27, import_chalk91, import_format2, deprecatedFlags, dateTimeFormat2;
|
175576
175551
|
var init_logs2 = __esm({
|
175577
175552
|
"src/commands/logs/index.ts"() {
|
175578
175553
|
"use strict";
|
175579
|
-
|
175554
|
+
import_error_utils27 = __toESM3(require_dist2());
|
175580
175555
|
import_chalk91 = __toESM3(require_source());
|
175581
175556
|
import_format2 = __toESM3(require_format2());
|
175582
175557
|
init_build_state();
|
@@ -175650,16 +175625,18 @@ var init_command17 = __esm({
|
|
175650
175625
|
name: "github",
|
175651
175626
|
description: "Log in with GitHub",
|
175652
175627
|
shorthand: null,
|
175653
|
-
type:
|
175628
|
+
type: Boolean,
|
175654
175629
|
deprecated: false
|
175655
175630
|
},
|
175656
175631
|
{
|
175657
175632
|
name: "oob",
|
175658
175633
|
description: 'Log in with "out of band" authentication',
|
175659
175634
|
shorthand: null,
|
175660
|
-
type:
|
175635
|
+
type: Boolean,
|
175661
175636
|
deprecated: false
|
175662
|
-
}
|
175637
|
+
},
|
175638
|
+
{ name: "gitlab", shorthand: null, type: Boolean, deprecated: false },
|
175639
|
+
{ name: "bitbucket", shorthand: null, type: Boolean, deprecated: false }
|
175663
175640
|
],
|
175664
175641
|
examples: [
|
175665
175642
|
{
|
@@ -175691,36 +175668,38 @@ __export3(login_exports, {
|
|
175691
175668
|
async function login2(client2) {
|
175692
175669
|
const { output: output2 } = client2;
|
175693
175670
|
const isInitialLogin = !client2.authConfig.token;
|
175694
|
-
|
175695
|
-
|
175696
|
-
|
175697
|
-
|
175698
|
-
|
175699
|
-
|
175700
|
-
|
175671
|
+
let parsedArgs = null;
|
175672
|
+
const flagsSpecification = getFlagsSpecification(loginCommand.options);
|
175673
|
+
try {
|
175674
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
175675
|
+
} catch (error4) {
|
175676
|
+
handleError(error4);
|
175677
|
+
return 1;
|
175678
|
+
}
|
175679
|
+
if (parsedArgs.flags["--help"]) {
|
175701
175680
|
output2.print(help2(loginCommand, { columns: client2.stderr.columns }));
|
175702
175681
|
return 2;
|
175703
175682
|
}
|
175704
|
-
if (
|
175683
|
+
if (parsedArgs.flags["--token"]) {
|
175705
175684
|
output2.error('`--token` may not be used with the "login" command');
|
175706
175685
|
return 2;
|
175707
175686
|
}
|
175708
|
-
const input =
|
175687
|
+
const input = parsedArgs.args[1];
|
175709
175688
|
let result = 1;
|
175710
175689
|
if (input) {
|
175711
175690
|
if ((0, import_email_validator.validate)(input)) {
|
175712
175691
|
result = await doEmailLogin(client2, input);
|
175713
175692
|
} else {
|
175714
|
-
result = await doSamlLogin(client2, input,
|
175715
|
-
}
|
175716
|
-
} else if (
|
175717
|
-
result = await doGithubLogin(client2,
|
175718
|
-
} else if (
|
175719
|
-
result = await doGitlabLogin(client2,
|
175720
|
-
} else if (
|
175721
|
-
result = await doBitbucketLogin(client2,
|
175693
|
+
result = await doSamlLogin(client2, input, parsedArgs.flags["--oob"]);
|
175694
|
+
}
|
175695
|
+
} else if (parsedArgs.flags["--github"]) {
|
175696
|
+
result = await doGithubLogin(client2, parsedArgs.flags["--oob"]);
|
175697
|
+
} else if (parsedArgs.flags["--gitlab"]) {
|
175698
|
+
result = await doGitlabLogin(client2, parsedArgs.flags["--oob"]);
|
175699
|
+
} else if (parsedArgs.flags["--bitbucket"]) {
|
175700
|
+
result = await doBitbucketLogin(client2, parsedArgs.flags["--oob"]);
|
175722
175701
|
} else {
|
175723
|
-
result = await prompt(client2, void 0,
|
175702
|
+
result = await prompt(client2, void 0, parsedArgs.flags["--oob"]);
|
175724
175703
|
}
|
175725
175704
|
if (typeof result === "number") {
|
175726
175705
|
return result;
|
@@ -175775,6 +175754,8 @@ var init_login2 = __esm({
|
|
175775
175754
|
init_help();
|
175776
175755
|
init_command17();
|
175777
175756
|
init_update_current_team_after_login();
|
175757
|
+
init_get_flags_specification();
|
175758
|
+
init_handle_error();
|
175778
175759
|
}
|
175779
175760
|
});
|
175780
175761
|
|
@@ -175805,18 +175786,16 @@ __export3(logout_exports, {
|
|
175805
175786
|
default: () => main9
|
175806
175787
|
});
|
175807
175788
|
async function main9(client2) {
|
175808
|
-
let argv2;
|
175809
175789
|
const { authConfig, config: config3, output: output2 } = client2;
|
175790
|
+
let parsedArgs = null;
|
175791
|
+
const flagsSpecification = getFlagsSpecification(logoutCommand.options);
|
175810
175792
|
try {
|
175811
|
-
|
175812
|
-
|
175813
|
-
|
175814
|
-
});
|
175815
|
-
} catch (err) {
|
175816
|
-
handleError(err);
|
175793
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
175794
|
+
} catch (error4) {
|
175795
|
+
handleError(error4);
|
175817
175796
|
return 1;
|
175818
175797
|
}
|
175819
|
-
if (
|
175798
|
+
if (parsedArgs.flags["--help"]) {
|
175820
175799
|
output2.print(help2(logoutCommand, { columns: client2.stderr.columns }));
|
175821
175800
|
return 2;
|
175822
175801
|
}
|
@@ -175853,7 +175832,7 @@ async function main9(client2) {
|
|
175853
175832
|
writeToAuthConfigFile(authConfig);
|
175854
175833
|
output2.debug("Configuration has been deleted");
|
175855
175834
|
} catch (err) {
|
175856
|
-
output2.debug((0,
|
175835
|
+
output2.debug((0, import_error_utils28.errorToString)(err));
|
175857
175836
|
exitCode2 = 1;
|
175858
175837
|
}
|
175859
175838
|
if (exitCode2 === 0) {
|
@@ -175863,7 +175842,7 @@ async function main9(client2) {
|
|
175863
175842
|
}
|
175864
175843
|
return exitCode2;
|
175865
175844
|
}
|
175866
|
-
var
|
175845
|
+
var import_error_utils28;
|
175867
175846
|
var init_logout = __esm({
|
175868
175847
|
"src/commands/logout/index.ts"() {
|
175869
175848
|
"use strict";
|
@@ -175872,9 +175851,10 @@ var init_logout = __esm({
|
|
175872
175851
|
init_get_args();
|
175873
175852
|
init_pkg_name();
|
175874
175853
|
init_errors_ts();
|
175875
|
-
|
175854
|
+
import_error_utils28 = __toESM3(require_dist2());
|
175876
175855
|
init_help();
|
175877
175856
|
init_command18();
|
175857
|
+
init_get_flags_specification();
|
175878
175858
|
}
|
175879
175859
|
});
|
175880
175860
|
|
@@ -176098,6 +176078,7 @@ var init_command19 = __esm({
|
|
176098
176078
|
"src/commands/project/command.ts"() {
|
176099
176079
|
"use strict";
|
176100
176080
|
init_pkg_name();
|
176081
|
+
init_arg_common();
|
176101
176082
|
projectCommand = {
|
176102
176083
|
name: "project",
|
176103
176084
|
description: "Manage your Vercel Projects.",
|
@@ -176151,11 +176132,14 @@ var init_command19 = __esm({
|
|
176151
176132
|
],
|
176152
176133
|
options: [
|
176153
176134
|
{
|
176154
|
-
|
176135
|
+
...nextOption,
|
176155
176136
|
description: "Show next page of results",
|
176156
|
-
argument: "MS"
|
176157
|
-
|
176158
|
-
|
176137
|
+
argument: "MS"
|
176138
|
+
},
|
176139
|
+
{
|
176140
|
+
name: "update-required",
|
176141
|
+
shorthand: null,
|
176142
|
+
type: Boolean,
|
176159
176143
|
deprecated: false
|
176160
176144
|
}
|
176161
176145
|
],
|
@@ -176179,33 +176163,28 @@ __export3(project_exports, {
|
|
176179
176163
|
default: () => main10
|
176180
176164
|
});
|
176181
176165
|
async function main10(client2) {
|
176182
|
-
let argv2;
|
176183
176166
|
let subcommand2;
|
176167
|
+
let parsedArgs = null;
|
176168
|
+
const flagsSpecification = getFlagsSpecification(projectCommand.options);
|
176184
176169
|
try {
|
176185
|
-
|
176186
|
-
"--next": Number,
|
176187
|
-
"-N": "--next",
|
176188
|
-
"--update-required": Boolean
|
176189
|
-
});
|
176170
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
176190
176171
|
} catch (error4) {
|
176191
176172
|
handleError(error4);
|
176192
176173
|
return 1;
|
176193
176174
|
}
|
176194
|
-
|
176195
|
-
|
176196
|
-
|
176197
|
-
);
|
176175
|
+
const { output: output2 } = client2;
|
176176
|
+
if (parsedArgs.flags["--help"]) {
|
176177
|
+
output2.print(help2(projectCommand, { columns: client2.stderr.columns }));
|
176198
176178
|
return 2;
|
176199
176179
|
}
|
176200
|
-
|
176201
|
-
subcommand2 =
|
176202
|
-
const args2 =
|
176203
|
-
const { output: output2 } = client2;
|
176180
|
+
parsedArgs.args = parsedArgs.args.slice(1);
|
176181
|
+
subcommand2 = parsedArgs.args[0] || "list";
|
176182
|
+
const args2 = parsedArgs.args.slice(1);
|
176204
176183
|
const { contextName } = await getScope(client2);
|
176205
176184
|
switch (subcommand2) {
|
176206
176185
|
case "ls":
|
176207
176186
|
case "list":
|
176208
|
-
return await list3(client2,
|
176187
|
+
return await list3(client2, parsedArgs.flags, args2, contextName);
|
176209
176188
|
case "add":
|
176210
176189
|
return await add6(client2, args2, contextName);
|
176211
176190
|
case "rm":
|
@@ -176232,6 +176211,7 @@ var init_project = __esm({
|
|
176232
176211
|
init_list3();
|
176233
176212
|
init_rm6();
|
176234
176213
|
init_command19();
|
176214
|
+
init_get_flags_specification();
|
176235
176215
|
COMMAND_CONFIG9 = {
|
176236
176216
|
ls: ["ls", "list"],
|
176237
176217
|
add: ["add"],
|
@@ -176609,6 +176589,7 @@ var init_command20 = __esm({
|
|
176609
176589
|
"src/commands/promote/command.ts"() {
|
176610
176590
|
"use strict";
|
176611
176591
|
init_pkg_name();
|
176592
|
+
init_arg_common();
|
176612
176593
|
promoteCommand = {
|
176613
176594
|
name: "promote",
|
176614
176595
|
description: "Promote an existing deployment to current.",
|
@@ -176640,7 +176621,8 @@ var init_command20 = __esm({
|
|
176640
176621
|
shorthand: null,
|
176641
176622
|
type: String,
|
176642
176623
|
deprecated: false
|
176643
|
-
}
|
176624
|
+
},
|
176625
|
+
yesOption
|
176644
176626
|
],
|
176645
176627
|
examples: [
|
176646
176628
|
{
|
@@ -176666,52 +176648,49 @@ var promote_exports = {};
|
|
176666
176648
|
__export3(promote_exports, {
|
176667
176649
|
default: () => promote_default
|
176668
176650
|
});
|
176669
|
-
var
|
176651
|
+
var import_error_utils29, import_ms24, promote_default;
|
176670
176652
|
var init_promote = __esm({
|
176671
176653
|
"src/commands/promote/index.ts"() {
|
176672
176654
|
"use strict";
|
176673
176655
|
init_get_args();
|
176674
176656
|
init_get_project_by_cwd_or_link();
|
176675
176657
|
init_handle_error();
|
176676
|
-
|
176658
|
+
import_error_utils29 = __toESM3(require_dist2());
|
176677
176659
|
import_ms24 = __toESM3(require_ms2());
|
176678
176660
|
init_request_promote();
|
176679
176661
|
init_status();
|
176680
176662
|
init_command20();
|
176681
176663
|
init_help();
|
176664
|
+
init_get_flags_specification();
|
176682
176665
|
promote_default = async (client2) => {
|
176683
|
-
let
|
176666
|
+
let parsedArgs = null;
|
176667
|
+
const flagsSpecification = getFlagsSpecification(promoteCommand.options);
|
176684
176668
|
try {
|
176685
|
-
|
176686
|
-
|
176687
|
-
|
176688
|
-
"-y": "--yes"
|
176689
|
-
});
|
176690
|
-
} catch (err) {
|
176691
|
-
handleError(err);
|
176669
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
176670
|
+
} catch (error4) {
|
176671
|
+
handleError(error4);
|
176692
176672
|
return 1;
|
176693
176673
|
}
|
176694
|
-
|
176695
|
-
|
176696
|
-
|
176697
|
-
);
|
176674
|
+
const { output: output2 } = client2;
|
176675
|
+
if (parsedArgs.flags["--help"]) {
|
176676
|
+
output2.print(help2(promoteCommand, { columns: client2.stderr.columns }));
|
176698
176677
|
return 2;
|
176699
176678
|
}
|
176700
|
-
const yes =
|
176701
|
-
let timeout =
|
176679
|
+
const yes = parsedArgs.flags["--yes"] ?? false;
|
176680
|
+
let timeout = parsedArgs.flags["--timeout"];
|
176702
176681
|
if (timeout && (0, import_ms24.default)(timeout) === void 0) {
|
176703
176682
|
client2.output.error(`Invalid timeout "${timeout}"`);
|
176704
176683
|
return 1;
|
176705
176684
|
}
|
176706
|
-
const actionOrDeployId =
|
176685
|
+
const actionOrDeployId = parsedArgs.args[1] || "status";
|
176707
176686
|
try {
|
176708
176687
|
if (actionOrDeployId === "status") {
|
176709
176688
|
const project = await getProjectByCwdOrLink({
|
176710
|
-
autoConfirm: Boolean(
|
176689
|
+
autoConfirm: Boolean(parsedArgs.flags["--yes"]),
|
176711
176690
|
client: client2,
|
176712
176691
|
commandName: "promote",
|
176713
176692
|
cwd: client2.cwd,
|
176714
|
-
projectNameOrId:
|
176693
|
+
projectNameOrId: parsedArgs.args[2]
|
176715
176694
|
});
|
176716
176695
|
return await promoteStatus({
|
176717
176696
|
client: client2,
|
@@ -176726,7 +176705,7 @@ var init_promote = __esm({
|
|
176726
176705
|
yes
|
176727
176706
|
});
|
176728
176707
|
} catch (err) {
|
176729
|
-
if ((0,
|
176708
|
+
if ((0, import_error_utils29.isErrnoException)(err)) {
|
176730
176709
|
if (err.code === "ERR_CANCELED") {
|
176731
176710
|
return 0;
|
176732
176711
|
}
|
@@ -176815,6 +176794,7 @@ var init_command21 = __esm({
|
|
176815
176794
|
"src/commands/redeploy/command.ts"() {
|
176816
176795
|
"use strict";
|
176817
176796
|
init_pkg_name();
|
176797
|
+
init_arg_common();
|
176818
176798
|
redeployCommand = {
|
176819
176799
|
name: "redeploy",
|
176820
176800
|
description: "Rebuild and deploy a previous deployment.",
|
@@ -176831,7 +176811,8 @@ var init_command21 = __esm({
|
|
176831
176811
|
description: "Don't wait for the redeploy to finish",
|
176832
176812
|
type: Boolean,
|
176833
176813
|
deprecated: false
|
176834
|
-
}
|
176814
|
+
},
|
176815
|
+
yesOption
|
176835
176816
|
],
|
176836
176817
|
examples: [
|
176837
176818
|
{
|
@@ -176853,23 +176834,20 @@ __export3(redeploy_exports, {
|
|
176853
176834
|
default: () => redeploy
|
176854
176835
|
});
|
176855
176836
|
async function redeploy(client2) {
|
176856
|
-
let argv2;
|
176857
176837
|
const { output: output2 } = client2;
|
176838
|
+
let parsedArgs = null;
|
176839
|
+
const flagsSpecification = getFlagsSpecification(redeployCommand.options);
|
176858
176840
|
try {
|
176859
|
-
|
176860
|
-
|
176861
|
-
|
176862
|
-
"-y": "--yes"
|
176863
|
-
});
|
176864
|
-
} catch (err) {
|
176865
|
-
handleError(err);
|
176841
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
176842
|
+
} catch (error4) {
|
176843
|
+
handleError(error4);
|
176866
176844
|
return 1;
|
176867
176845
|
}
|
176868
|
-
if (
|
176846
|
+
if (parsedArgs.flags["--help"]) {
|
176869
176847
|
output2.print(help2(redeployCommand, { columns: client2.stderr.columns }));
|
176870
176848
|
return 2;
|
176871
176849
|
}
|
176872
|
-
const deployIdOrUrl =
|
176850
|
+
const deployIdOrUrl = parsedArgs.args[1];
|
176873
176851
|
if (!deployIdOrUrl) {
|
176874
176852
|
output2.error(
|
176875
176853
|
`Missing required deployment id or url: ${getCommandName(
|
@@ -176879,7 +176857,7 @@ async function redeploy(client2) {
|
|
176879
176857
|
return 1;
|
176880
176858
|
}
|
176881
176859
|
const { contextName } = await getScope(client2);
|
176882
|
-
const noWait = !!
|
176860
|
+
const noWait = !!parsedArgs.flags["--no-wait"];
|
176883
176861
|
try {
|
176884
176862
|
const fromDeployment = await getDeploymentByIdOrURL({
|
176885
176863
|
client: client2,
|
@@ -176979,7 +176957,7 @@ async function redeploy(client2) {
|
|
176979
176957
|
return printDeploymentStatus(client2, deployment, deployStamp, noWait);
|
176980
176958
|
} catch (err) {
|
176981
176959
|
output2.prettyError(err);
|
176982
|
-
if ((0,
|
176960
|
+
if ((0, import_error_utils30.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
176983
176961
|
output2.error(
|
176984
176962
|
`Use ${import_chalk101.default.bold("vc switch")} to change your current team`
|
176985
176963
|
);
|
@@ -176987,7 +176965,7 @@ async function redeploy(client2) {
|
|
176987
176965
|
return 1;
|
176988
176966
|
}
|
176989
176967
|
}
|
176990
|
-
var import_chalk101, import_client12,
|
176968
|
+
var import_chalk101, import_client12, import_error_utils30;
|
176991
176969
|
var init_redeploy = __esm({
|
176992
176970
|
"src/commands/redeploy/index.ts"() {
|
176993
176971
|
"use strict";
|
@@ -176999,13 +176977,14 @@ var init_redeploy = __esm({
|
|
176999
176977
|
init_get_deployment_by_id_or_url();
|
177000
176978
|
init_get_scope();
|
177001
176979
|
init_handle_error();
|
177002
|
-
|
176980
|
+
import_error_utils30 = __toESM3(require_dist2());
|
177003
176981
|
init_util();
|
177004
176982
|
init_print_deployment_status();
|
177005
176983
|
init_stamp();
|
177006
176984
|
init_ua();
|
177007
176985
|
init_help();
|
177008
176986
|
init_command21();
|
176987
|
+
init_get_flags_specification();
|
177009
176988
|
}
|
177010
176989
|
});
|
177011
176990
|
|
@@ -177116,6 +177095,7 @@ var init_command22 = __esm({
|
|
177116
177095
|
"src/commands/remove/command.ts"() {
|
177117
177096
|
"use strict";
|
177118
177097
|
init_pkg_name();
|
177098
|
+
init_arg_common();
|
177119
177099
|
removeCommand = {
|
177120
177100
|
name: "remove",
|
177121
177101
|
description: "Remove a deployment by name or id.",
|
@@ -177127,10 +177107,7 @@ var init_command22 = __esm({
|
|
177127
177107
|
],
|
177128
177108
|
options: [
|
177129
177109
|
{
|
177130
|
-
|
177131
|
-
shorthand: "y",
|
177132
|
-
type: Boolean,
|
177133
|
-
deprecated: false,
|
177110
|
+
...yesOption,
|
177134
177111
|
description: "Skip confirmation"
|
177135
177112
|
},
|
177136
177113
|
{
|
@@ -177139,7 +177116,8 @@ var init_command22 = __esm({
|
|
177139
177116
|
type: Boolean,
|
177140
177117
|
deprecated: false,
|
177141
177118
|
description: "Skip deployments with an active alias"
|
177142
|
-
}
|
177119
|
+
},
|
177120
|
+
{ name: "hard", shorthand: null, type: Boolean, deprecated: false }
|
177143
177121
|
],
|
177144
177122
|
examples: [
|
177145
177123
|
{
|
@@ -177165,33 +177143,28 @@ __export3(remove_exports, {
|
|
177165
177143
|
default: () => remove3
|
177166
177144
|
});
|
177167
177145
|
async function remove3(client2) {
|
177168
|
-
let
|
177146
|
+
let parsedArgs = null;
|
177147
|
+
const flagsSpecification = getFlagsSpecification(removeCommand.options);
|
177169
177148
|
try {
|
177170
|
-
|
177171
|
-
"--hard": Boolean,
|
177172
|
-
"--yes": Boolean,
|
177173
|
-
"--safe": Boolean,
|
177174
|
-
"-y": "--yes",
|
177175
|
-
"-s": "--safe"
|
177176
|
-
});
|
177149
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
177177
177150
|
} catch (error5) {
|
177178
177151
|
handleError(error5);
|
177179
177152
|
return 1;
|
177180
177153
|
}
|
177181
|
-
|
177154
|
+
const { output: output2 } = client2;
|
177155
|
+
if (parsedArgs.flags["--help"]) {
|
177156
|
+
output2.print(help2(removeCommand, { columns: client2.stderr.columns }));
|
177157
|
+
return 2;
|
177158
|
+
}
|
177159
|
+
parsedArgs.args = parsedArgs.args.slice(1);
|
177182
177160
|
const {
|
177183
|
-
output: output2,
|
177184
177161
|
config: { currentTeam }
|
177185
177162
|
} = client2;
|
177186
|
-
const hard =
|
177187
|
-
const skipConfirmation =
|
177188
|
-
const safe =
|
177189
|
-
const ids =
|
177163
|
+
const hard = parsedArgs.flags["--hard"];
|
177164
|
+
const skipConfirmation = parsedArgs.flags["--yes"];
|
177165
|
+
const safe = parsedArgs.flags["--safe"];
|
177166
|
+
const ids = parsedArgs.args;
|
177190
177167
|
const { success, error: error4, log: log2 } = output2;
|
177191
|
-
if (argv2["--help"] || ids[0] === "help") {
|
177192
|
-
output2.print(help2(removeCommand, { columns: client2.stderr.columns }));
|
177193
|
-
return 2;
|
177194
|
-
}
|
177195
177168
|
if (ids.length < 1) {
|
177196
177169
|
error4(`${getCommandName("rm")} expects at least one argument`);
|
177197
177170
|
output2.print(help2(removeCommand, { columns: client2.stderr.columns }));
|
@@ -177272,7 +177245,7 @@ async function remove3(client2) {
|
|
177272
177245
|
});
|
177273
177246
|
if (deployments.length === 0 && projects.length === 0) {
|
177274
177247
|
log2(
|
177275
|
-
`Could not find ${
|
177248
|
+
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) => import_chalk102.default.bold(`"${id}"`)).join(", ")}. Run ${getCommandName("projects ls")} to list.`
|
177276
177249
|
);
|
177277
177250
|
return 1;
|
177278
177251
|
}
|
@@ -177397,6 +177370,7 @@ var init_remove = __esm({
|
|
177397
177370
|
init_now_error();
|
177398
177371
|
init_help();
|
177399
177372
|
init_command22();
|
177373
|
+
init_get_flags_specification();
|
177400
177374
|
}
|
177401
177375
|
});
|
177402
177376
|
|
@@ -177511,9 +177485,7 @@ async function renderJobFailed2({
|
|
177511
177485
|
if (nextTimestamp2) {
|
177512
177486
|
url3 += `&until=${nextTimestamp2}`;
|
177513
177487
|
}
|
177514
|
-
const { aliases, pagination } = await client2.fetch(
|
177515
|
-
url3
|
177516
|
-
);
|
177488
|
+
const { aliases, pagination } = await client2.fetch(url3);
|
177517
177489
|
for (const { alias: alias2, status } of aliases) {
|
177518
177490
|
output2.log(
|
177519
177491
|
` ${renderAliasStatus(status).padEnd(11)} ${alias2.alias} (${alias2.deploymentId})`
|
@@ -177622,6 +177594,7 @@ var init_command23 = __esm({
|
|
177622
177594
|
"src/commands/rollback/command.ts"() {
|
177623
177595
|
"use strict";
|
177624
177596
|
init_pkg_name();
|
177597
|
+
init_arg_common();
|
177625
177598
|
rollbackCommand = {
|
177626
177599
|
name: "rollback",
|
177627
177600
|
description: "Quickly revert back to a previous deployment.",
|
@@ -177653,7 +177626,8 @@ var init_command23 = __esm({
|
|
177653
177626
|
shorthand: null,
|
177654
177627
|
type: String,
|
177655
177628
|
deprecated: false
|
177656
|
-
}
|
177629
|
+
},
|
177630
|
+
yesOption
|
177657
177631
|
],
|
177658
177632
|
examples: [
|
177659
177633
|
{
|
@@ -177679,51 +177653,48 @@ var rollback_exports = {};
|
|
177679
177653
|
__export3(rollback_exports, {
|
177680
177654
|
default: () => rollback_default
|
177681
177655
|
});
|
177682
|
-
var
|
177656
|
+
var import_error_utils31, import_ms28, rollback_default;
|
177683
177657
|
var init_rollback = __esm({
|
177684
177658
|
"src/commands/rollback/index.ts"() {
|
177685
177659
|
"use strict";
|
177686
177660
|
init_get_args();
|
177687
177661
|
init_get_project_by_cwd_or_link();
|
177688
177662
|
init_handle_error();
|
177689
|
-
|
177663
|
+
import_error_utils31 = __toESM3(require_dist2());
|
177690
177664
|
import_ms28 = __toESM3(require_ms2());
|
177691
177665
|
init_request_rollback();
|
177692
177666
|
init_status2();
|
177693
177667
|
init_help();
|
177694
177668
|
init_command23();
|
177669
|
+
init_get_flags_specification();
|
177695
177670
|
rollback_default = async (client2) => {
|
177696
|
-
let
|
177671
|
+
let parsedArgs = null;
|
177672
|
+
const flagsSpecification = getFlagsSpecification(rollbackCommand.options);
|
177697
177673
|
try {
|
177698
|
-
|
177699
|
-
|
177700
|
-
|
177701
|
-
"-y": "--yes"
|
177702
|
-
});
|
177703
|
-
} catch (err) {
|
177704
|
-
handleError(err);
|
177674
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
177675
|
+
} catch (error4) {
|
177676
|
+
handleError(error4);
|
177705
177677
|
return 1;
|
177706
177678
|
}
|
177707
|
-
|
177708
|
-
|
177709
|
-
|
177710
|
-
);
|
177679
|
+
const { output: output2 } = client2;
|
177680
|
+
if (parsedArgs.flags["--help"]) {
|
177681
|
+
output2.print(help2(rollbackCommand, { columns: client2.stderr.columns }));
|
177711
177682
|
return 2;
|
177712
177683
|
}
|
177713
|
-
let timeout =
|
177684
|
+
let timeout = parsedArgs.flags["--timeout"];
|
177714
177685
|
if (timeout && (0, import_ms28.default)(timeout) === void 0) {
|
177715
177686
|
client2.output.error(`Invalid timeout "${timeout}"`);
|
177716
177687
|
return 1;
|
177717
177688
|
}
|
177718
|
-
const actionOrDeployId =
|
177689
|
+
const actionOrDeployId = parsedArgs.args[1] || "status";
|
177719
177690
|
try {
|
177720
177691
|
if (actionOrDeployId === "status") {
|
177721
177692
|
const project = await getProjectByCwdOrLink({
|
177722
|
-
autoConfirm: Boolean(
|
177693
|
+
autoConfirm: Boolean(parsedArgs.flags["--yes"]),
|
177723
177694
|
client: client2,
|
177724
177695
|
commandName: "promote",
|
177725
177696
|
cwd: client2.cwd,
|
177726
|
-
projectNameOrId:
|
177697
|
+
projectNameOrId: parsedArgs.args[2]
|
177727
177698
|
});
|
177728
177699
|
return await rollbackStatus({
|
177729
177700
|
client: client2,
|
@@ -177737,7 +177708,7 @@ var init_rollback = __esm({
|
|
177737
177708
|
timeout
|
177738
177709
|
});
|
177739
177710
|
} catch (err) {
|
177740
|
-
if ((0,
|
177711
|
+
if ((0, import_error_utils31.isErrnoException)(err)) {
|
177741
177712
|
if (err.code === "ERR_CANCELED") {
|
177742
177713
|
return 0;
|
177743
177714
|
}
|
@@ -178179,11 +178150,11 @@ async function readConfirmation5(client2, output2, secret, contextName) {
|
|
178179
178150
|
`);
|
178180
178151
|
return confirm(client2, `${import_chalk105.default.bold.red("Are you sure?")}`, false);
|
178181
178152
|
}
|
178182
|
-
var
|
178153
|
+
var import_error_utils32, import_chalk105, import_ms29, argv, subcommand, nextTimestamp, main11, secrets_default;
|
178183
178154
|
var init_secrets2 = __esm({
|
178184
178155
|
"src/commands/secrets/index.js"() {
|
178185
178156
|
"use strict";
|
178186
|
-
|
178157
|
+
import_error_utils32 = __toESM3(require_dist2());
|
178187
178158
|
import_chalk105 = __toESM3(require_source());
|
178188
178159
|
init_table();
|
178189
178160
|
import_ms29 = __toESM3(require_ms2());
|
@@ -178221,7 +178192,7 @@ var init_secrets2 = __esm({
|
|
178221
178192
|
try {
|
178222
178193
|
({ contextName } = await getScope(client2));
|
178223
178194
|
} catch (err) {
|
178224
|
-
if ((0,
|
178195
|
+
if ((0, import_error_utils32.default)(err)) {
|
178225
178196
|
if (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED") {
|
178226
178197
|
output2.error(err.message);
|
178227
178198
|
return 1;
|
@@ -178362,6 +178333,7 @@ var init_command25 = __esm({
|
|
178362
178333
|
"src/commands/target/command.ts"() {
|
178363
178334
|
"use strict";
|
178364
178335
|
init_pkg_name();
|
178336
|
+
init_arg_common();
|
178365
178337
|
targetCommand = {
|
178366
178338
|
name: "target",
|
178367
178339
|
description: `Manage your Vercel Project's "targets" (custom environments).`,
|
@@ -178380,7 +178352,7 @@ var init_command25 = __esm({
|
|
178380
178352
|
examples: []
|
178381
178353
|
}
|
178382
178354
|
],
|
178383
|
-
options: [],
|
178355
|
+
options: [nextOption],
|
178384
178356
|
examples: [
|
178385
178357
|
{
|
178386
178358
|
name: "List all targets for the current project",
|
@@ -178398,20 +178370,23 @@ __export3(target_exports, {
|
|
178398
178370
|
});
|
178399
178371
|
async function main12(client2) {
|
178400
178372
|
let subcommand2;
|
178401
|
-
|
178402
|
-
|
178403
|
-
|
178404
|
-
|
178405
|
-
|
178406
|
-
|
178407
|
-
|
178408
|
-
|
178373
|
+
let parsedArgs = null;
|
178374
|
+
const flagsSpecification = getFlagsSpecification(targetCommand.options);
|
178375
|
+
try {
|
178376
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
178377
|
+
} catch (error4) {
|
178378
|
+
handleError(error4);
|
178379
|
+
return 1;
|
178380
|
+
}
|
178381
|
+
const { output: output2 } = client2;
|
178382
|
+
if (parsedArgs.flags["--help"]) {
|
178383
|
+
output2.print(help2(targetCommand, { columns: client2.stderr.columns }));
|
178409
178384
|
return 2;
|
178410
178385
|
}
|
178411
|
-
|
178412
|
-
subcommand2 =
|
178413
|
-
const args2 =
|
178414
|
-
const { cwd
|
178386
|
+
parsedArgs.args = parsedArgs.args.slice(1);
|
178387
|
+
subcommand2 = parsedArgs.args[0] || "list";
|
178388
|
+
const args2 = parsedArgs.args.slice(1);
|
178389
|
+
const { cwd } = client2;
|
178415
178390
|
const linkedProject = await ensureLink(targetCommand.name, client2, cwd);
|
178416
178391
|
if (typeof linkedProject === "number") {
|
178417
178392
|
return linkedProject;
|
@@ -178419,7 +178394,7 @@ async function main12(client2) {
|
|
178419
178394
|
switch (subcommand2) {
|
178420
178395
|
case "ls":
|
178421
178396
|
case "list":
|
178422
|
-
return await list4(client2,
|
178397
|
+
return await list4(client2, parsedArgs.flags, args2, linkedProject);
|
178423
178398
|
default:
|
178424
178399
|
output2.error(getInvalidSubcommand(COMMAND_CONFIG10));
|
178425
178400
|
client2.output.print(
|
@@ -178438,25 +178413,116 @@ var init_target = __esm({
|
|
178438
178413
|
init_list4();
|
178439
178414
|
init_command25();
|
178440
178415
|
init_ensure_link();
|
178416
|
+
init_get_flags_specification();
|
178417
|
+
init_handle_error();
|
178441
178418
|
COMMAND_CONFIG10 = {
|
178442
178419
|
ls: ["ls", "list"]
|
178443
178420
|
};
|
178444
178421
|
}
|
178445
178422
|
});
|
178446
178423
|
|
178424
|
+
// src/commands/teams/command.ts
|
178425
|
+
var listSubcommand, teamsCommand;
|
178426
|
+
var init_command26 = __esm({
|
178427
|
+
"src/commands/teams/command.ts"() {
|
178428
|
+
"use strict";
|
178429
|
+
init_pkg_name();
|
178430
|
+
init_arg_common();
|
178431
|
+
listSubcommand = {
|
178432
|
+
name: "ls",
|
178433
|
+
description: "Show all teams you're a part of",
|
178434
|
+
arguments: [],
|
178435
|
+
options: [
|
178436
|
+
nextOption,
|
178437
|
+
{ name: "since", shorthand: null, type: String, deprecated: false },
|
178438
|
+
{ name: "until", shorthand: null, type: String, deprecated: false },
|
178439
|
+
{ name: "count", shorthand: "C", type: Number, deprecated: false }
|
178440
|
+
],
|
178441
|
+
examples: []
|
178442
|
+
};
|
178443
|
+
teamsCommand = {
|
178444
|
+
name: "teams",
|
178445
|
+
description: "Manage teams under your Vercel account",
|
178446
|
+
arguments: [],
|
178447
|
+
subcommands: [
|
178448
|
+
{
|
178449
|
+
name: "add",
|
178450
|
+
description: "Create a new team",
|
178451
|
+
arguments: [],
|
178452
|
+
options: [],
|
178453
|
+
examples: []
|
178454
|
+
},
|
178455
|
+
listSubcommand,
|
178456
|
+
{
|
178457
|
+
name: "switch",
|
178458
|
+
description: "Switch to a different team",
|
178459
|
+
arguments: [
|
178460
|
+
{
|
178461
|
+
name: "name",
|
178462
|
+
required: false
|
178463
|
+
}
|
178464
|
+
],
|
178465
|
+
options: [],
|
178466
|
+
examples: []
|
178467
|
+
},
|
178468
|
+
{
|
178469
|
+
name: "invite",
|
178470
|
+
description: "Invite a new member to a team",
|
178471
|
+
arguments: [
|
178472
|
+
{
|
178473
|
+
name: "emails",
|
178474
|
+
required: true
|
178475
|
+
}
|
178476
|
+
],
|
178477
|
+
options: [],
|
178478
|
+
examples: []
|
178479
|
+
}
|
178480
|
+
],
|
178481
|
+
options: [
|
178482
|
+
// {
|
178483
|
+
// name: 'next',
|
178484
|
+
// shorthand: 'N',
|
178485
|
+
// type: String,
|
178486
|
+
// argument: 'MS',
|
178487
|
+
// deprecated: false,
|
178488
|
+
// description: 'Show next page of results',
|
178489
|
+
// },
|
178490
|
+
],
|
178491
|
+
examples: [
|
178492
|
+
{
|
178493
|
+
name: "Switch to a team. If your team's url is 'vercel.com/name', then 'name' is the slug. If the slug is omitted, you can choose interactively.",
|
178494
|
+
value: `${packageName} teams switch <slug>`
|
178495
|
+
},
|
178496
|
+
{
|
178497
|
+
name: "Invite new members (interactively)",
|
178498
|
+
value: `${packageName} teams invite`
|
178499
|
+
},
|
178500
|
+
{
|
178501
|
+
name: "Invite multiple members simultaneously",
|
178502
|
+
value: `${packageName} teams invite abc@vercel.com xyz@vercel.com`
|
178503
|
+
},
|
178504
|
+
{
|
178505
|
+
name: "Paginate results, where `1584722256178` is the time in milliseconds since the UNIX epoch.",
|
178506
|
+
value: `${packageName} teams ls --next 1584722256178`
|
178507
|
+
}
|
178508
|
+
]
|
178509
|
+
};
|
178510
|
+
}
|
178511
|
+
});
|
178512
|
+
|
178447
178513
|
// src/commands/teams/list.ts
|
178448
178514
|
async function list5(client2) {
|
178449
178515
|
const { config: config3, output: output2 } = client2;
|
178450
|
-
|
178451
|
-
|
178452
|
-
|
178453
|
-
|
178454
|
-
|
178455
|
-
|
178456
|
-
|
178457
|
-
}
|
178458
|
-
const next =
|
178459
|
-
const count =
|
178516
|
+
let parsedArgs = null;
|
178517
|
+
const flagsSpecification = getFlagsSpecification(listSubcommand.options);
|
178518
|
+
try {
|
178519
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
178520
|
+
} catch (error4) {
|
178521
|
+
handleError(error4);
|
178522
|
+
return 1;
|
178523
|
+
}
|
178524
|
+
const next = parsedArgs.flags["--next"];
|
178525
|
+
const count = parsedArgs.flags["--count"];
|
178460
178526
|
if (typeof next !== "undefined" && !Number.isInteger(next)) {
|
178461
178527
|
output2.error("Please provide a number for flag `--next`");
|
178462
178528
|
return 1;
|
@@ -178510,7 +178576,7 @@ async function list5(client2) {
|
|
178510
178576
|
);
|
178511
178577
|
client2.stderr.write("\n");
|
178512
178578
|
if (pagination?.count === 20) {
|
178513
|
-
const flags = getCommandFlags(
|
178579
|
+
const flags = getCommandFlags(parsedArgs.flags, ["--next", "-N", "-d"]);
|
178514
178580
|
const nextCmd = `${packageName} teams ls${flags} --next ${pagination.next}`;
|
178515
178581
|
client2.stdout.write("\n");
|
178516
178582
|
output2.log(`To display the next page run ${cmd(nextCmd)}`);
|
@@ -178530,6 +178596,9 @@ var init_list5 = __esm({
|
|
178530
178596
|
init_get_command_flags();
|
178531
178597
|
init_cmd();
|
178532
178598
|
init_get_args();
|
178599
|
+
init_handle_error();
|
178600
|
+
init_get_flags_specification();
|
178601
|
+
init_command26();
|
178533
178602
|
}
|
178534
178603
|
});
|
178535
178604
|
|
@@ -178620,7 +178689,7 @@ Please select a team scope using ${getCommandName(
|
|
178620
178689
|
autoComplete: (value) => emailAutoComplete(value, currentTeam.slug)
|
178621
178690
|
});
|
178622
178691
|
} catch (err) {
|
178623
|
-
if (!(0,
|
178692
|
+
if (!(0, import_error_utils33.isError)(err) || err.message !== "USER_ABORT") {
|
178624
178693
|
throw err;
|
178625
178694
|
}
|
178626
178695
|
}
|
@@ -178650,7 +178719,7 @@ Please select a team scope using ${getCommandName(
|
|
178650
178719
|
} catch (err) {
|
178651
178720
|
output2.stopSpinner();
|
178652
178721
|
process.stderr.write(eraseLines(emails.length + 2));
|
178653
|
-
output2.error((0,
|
178722
|
+
output2.error((0, import_error_utils33.errorToString)(err));
|
178654
178723
|
hasError = true;
|
178655
178724
|
for (const email3 of emails) {
|
178656
178725
|
output2.log(`${import_chalk108.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
@@ -178671,7 +178740,7 @@ Please select a team scope using ${getCommandName(
|
|
178671
178740
|
}
|
178672
178741
|
return 0;
|
178673
178742
|
}
|
178674
|
-
var import_chalk108,
|
178743
|
+
var import_chalk108, import_error_utils33, validateEmail2, domains, emailAutoComplete;
|
178675
178744
|
var init_invite = __esm({
|
178676
178745
|
"src/commands/teams/invite.ts"() {
|
178677
178746
|
"use strict";
|
@@ -178688,7 +178757,7 @@ var init_invite = __esm({
|
|
178688
178757
|
init_get_teams();
|
178689
178758
|
init_invite_user_to_team();
|
178690
178759
|
init_errors_ts();
|
178691
|
-
|
178760
|
+
import_error_utils33 = __toESM3(require_dist2());
|
178692
178761
|
validateEmail2 = (data) => email.test(data.trim()) || data.length === 0;
|
178693
178762
|
domains = Array.from(
|
178694
178763
|
/* @__PURE__ */ new Set([
|
@@ -178778,7 +178847,7 @@ async function add7(client2) {
|
|
178778
178847
|
forceLowerCase: true
|
178779
178848
|
});
|
178780
178849
|
} catch (err) {
|
178781
|
-
if ((0,
|
178850
|
+
if ((0, import_error_utils34.isError)(err) && err.message === "USER_ABORT") {
|
178782
178851
|
output2.log("Canceled");
|
178783
178852
|
return 0;
|
178784
178853
|
}
|
@@ -178791,7 +178860,7 @@ async function add7(client2) {
|
|
178791
178860
|
} catch (err) {
|
178792
178861
|
output2.stopSpinner();
|
178793
178862
|
output2.print(eraseLines(2));
|
178794
|
-
output2.error((0,
|
178863
|
+
output2.error((0, import_error_utils34.errorToString)(err));
|
178795
178864
|
}
|
178796
178865
|
} while (!team);
|
178797
178866
|
output2.stopSpinner();
|
@@ -178807,7 +178876,7 @@ async function add7(client2) {
|
|
178807
178876
|
validateKeypress: validateNameKeypress
|
178808
178877
|
});
|
178809
178878
|
} catch (err) {
|
178810
|
-
if ((0,
|
178879
|
+
if ((0, import_error_utils34.isError)(err) && err.message === "USER_ABORT") {
|
178811
178880
|
output2.log("No name specified");
|
178812
178881
|
return 2;
|
178813
178882
|
}
|
@@ -178834,7 +178903,7 @@ async function add7(client2) {
|
|
178834
178903
|
});
|
178835
178904
|
return 0;
|
178836
178905
|
}
|
178837
|
-
var import_chalk109,
|
178906
|
+
var import_chalk109, import_error_utils34, validateSlugKeypress, validateNameKeypress, teamUrlPrefix, teamNamePrefix;
|
178838
178907
|
var init_add6 = __esm({
|
178839
178908
|
"src/commands/teams/add.ts"() {
|
178840
178909
|
"use strict";
|
@@ -178848,7 +178917,7 @@ var init_add6 = __esm({
|
|
178848
178917
|
init_pkg_name();
|
178849
178918
|
init_create_team();
|
178850
178919
|
init_patch_team();
|
178851
|
-
|
178920
|
+
import_error_utils34 = __toESM3(require_dist2());
|
178852
178921
|
validateSlugKeypress = (data, value) => (
|
178853
178922
|
// TODO: the `value` here should contain the current value + the keypress
|
178854
178923
|
// should be fixed on utils/input/text.js
|
@@ -178879,16 +178948,16 @@ async function main13(client2, desiredSlug) {
|
|
178879
178948
|
const teamChoices = teams.slice(0).sort((a, b) => {
|
178880
178949
|
return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
|
178881
178950
|
}).map((team) => {
|
178882
|
-
let
|
178951
|
+
let title8 = `${team.name} (${team.slug})`;
|
178883
178952
|
const selected = team.id === currentTeam?.id;
|
178884
178953
|
if (selected) {
|
178885
|
-
|
178954
|
+
title8 += ` ${import_chalk110.default.bold("(current)")}`;
|
178886
178955
|
}
|
178887
178956
|
if (team.limited) {
|
178888
|
-
|
178957
|
+
title8 += ` ${emoji("locked")}`;
|
178889
178958
|
}
|
178890
178959
|
return {
|
178891
|
-
name:
|
178960
|
+
name: title8,
|
178892
178961
|
value: team.slug,
|
178893
178962
|
short: team.slug,
|
178894
178963
|
selected
|
@@ -178990,88 +179059,6 @@ var init_switch = __esm({
|
|
178990
179059
|
}
|
178991
179060
|
});
|
178992
179061
|
|
178993
|
-
// src/commands/teams/command.ts
|
178994
|
-
var teamsCommand;
|
178995
|
-
var init_command26 = __esm({
|
178996
|
-
"src/commands/teams/command.ts"() {
|
178997
|
-
"use strict";
|
178998
|
-
init_pkg_name();
|
178999
|
-
teamsCommand = {
|
179000
|
-
name: "teams",
|
179001
|
-
description: "Manage teams under your Vercel account",
|
179002
|
-
arguments: [],
|
179003
|
-
subcommands: [
|
179004
|
-
{
|
179005
|
-
name: "add",
|
179006
|
-
description: "Create a new team",
|
179007
|
-
arguments: [],
|
179008
|
-
options: [],
|
179009
|
-
examples: []
|
179010
|
-
},
|
179011
|
-
{
|
179012
|
-
name: "ls",
|
179013
|
-
description: "Show all teams you're a part of",
|
179014
|
-
arguments: [],
|
179015
|
-
options: [],
|
179016
|
-
examples: []
|
179017
|
-
},
|
179018
|
-
{
|
179019
|
-
name: "switch",
|
179020
|
-
description: "Switch to a different team",
|
179021
|
-
arguments: [
|
179022
|
-
{
|
179023
|
-
name: "name",
|
179024
|
-
required: false
|
179025
|
-
}
|
179026
|
-
],
|
179027
|
-
options: [],
|
179028
|
-
examples: []
|
179029
|
-
},
|
179030
|
-
{
|
179031
|
-
name: "invite",
|
179032
|
-
description: "Invite a new member to a team",
|
179033
|
-
arguments: [
|
179034
|
-
{
|
179035
|
-
name: "emails",
|
179036
|
-
required: true
|
179037
|
-
}
|
179038
|
-
],
|
179039
|
-
options: [],
|
179040
|
-
examples: []
|
179041
|
-
}
|
179042
|
-
],
|
179043
|
-
options: [
|
179044
|
-
{
|
179045
|
-
name: "next",
|
179046
|
-
shorthand: "N",
|
179047
|
-
type: String,
|
179048
|
-
argument: "MS",
|
179049
|
-
deprecated: false,
|
179050
|
-
description: "Show next page of results"
|
179051
|
-
}
|
179052
|
-
],
|
179053
|
-
examples: [
|
179054
|
-
{
|
179055
|
-
name: "Switch to a team. If your team's url is 'vercel.com/name', then 'name' is the slug. If the slug is omitted, you can choose interactively.",
|
179056
|
-
value: `${packageName} teams switch <slug>`
|
179057
|
-
},
|
179058
|
-
{
|
179059
|
-
name: "Invite new members (interactively)",
|
179060
|
-
value: `${packageName} teams invite`
|
179061
|
-
},
|
179062
|
-
{
|
179063
|
-
name: "Invite multiple members simultaneously",
|
179064
|
-
value: `${packageName} teams invite abc@vercel.com xyz@vercel.com`
|
179065
|
-
},
|
179066
|
-
{
|
179067
|
-
name: "Paginate results, where `1584722256178` is the time in milliseconds since the UNIX epoch.",
|
179068
|
-
value: `${packageName} teams ls --next 1584722256178`
|
179069
|
-
}
|
179070
|
-
]
|
179071
|
-
};
|
179072
|
-
}
|
179073
|
-
});
|
179074
|
-
|
179075
179062
|
// src/commands/teams/index.ts
|
179076
179063
|
var teams_exports = {};
|
179077
179064
|
__export3(teams_exports, {
|
@@ -179089,19 +179076,31 @@ var init_teams = __esm({
|
|
179089
179076
|
init_get_args();
|
179090
179077
|
init_command26();
|
179091
179078
|
init_help();
|
179079
|
+
init_get_flags_specification();
|
179080
|
+
init_handle_error();
|
179092
179081
|
teams_default = async (client2) => {
|
179093
179082
|
let subcommand2;
|
179094
|
-
|
179095
|
-
const
|
179096
|
-
|
179083
|
+
let parsedArgs = null;
|
179084
|
+
const flagsSpecification = getFlagsSpecification(teamsCommand.options);
|
179085
|
+
try {
|
179086
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification, {
|
179087
|
+
permissive: true
|
179088
|
+
});
|
179089
|
+
} catch (error4) {
|
179090
|
+
handleError(error4);
|
179091
|
+
return 1;
|
179092
|
+
}
|
179093
|
+
const { output: output2 } = client2;
|
179094
|
+
if (parsedArgs.flags["--help"]) {
|
179095
|
+
output2.print(help2(teamsCommand, { columns: client2.stderr.columns }));
|
179096
|
+
return 2;
|
179097
|
+
}
|
179098
|
+
const isSwitch = parsedArgs.args[0] === "switch";
|
179099
|
+
parsedArgs.args = parsedArgs.args.slice(1);
|
179097
179100
|
if (isSwitch) {
|
179098
179101
|
subcommand2 = "switch";
|
179099
179102
|
} else {
|
179100
|
-
subcommand2 =
|
179101
|
-
}
|
179102
|
-
if (argv2["--help"] || !subcommand2) {
|
179103
|
-
client2.output.print(help2(teamsCommand, { columns: client2.stderr.columns }));
|
179104
|
-
return 2;
|
179103
|
+
subcommand2 = parsedArgs.args.shift();
|
179105
179104
|
}
|
179106
179105
|
let exitCode2 = 0;
|
179107
179106
|
switch (subcommand2) {
|
@@ -179112,7 +179111,7 @@ var init_teams = __esm({
|
|
179112
179111
|
}
|
179113
179112
|
case "switch":
|
179114
179113
|
case "change": {
|
179115
|
-
exitCode2 = await main13(client2,
|
179114
|
+
exitCode2 = await main13(client2, parsedArgs.args[0]);
|
179116
179115
|
break;
|
179117
179116
|
}
|
179118
179117
|
case "add":
|
@@ -179121,7 +179120,7 @@ var init_teams = __esm({
|
|
179121
179120
|
break;
|
179122
179121
|
}
|
179123
179122
|
case "invite": {
|
179124
|
-
exitCode2 = await invite(client2,
|
179123
|
+
exitCode2 = await invite(client2, parsedArgs.args);
|
179125
179124
|
break;
|
179126
179125
|
}
|
179127
179126
|
default: {
|
@@ -179169,9 +179168,15 @@ __export3(whoami_exports, {
|
|
179169
179168
|
});
|
179170
179169
|
async function whoami(client2) {
|
179171
179170
|
const { output: output2 } = client2;
|
179172
|
-
|
179173
|
-
|
179174
|
-
|
179171
|
+
let parsedArgs = null;
|
179172
|
+
const flagsSpecification = getFlagsSpecification(whoamiCommand.options);
|
179173
|
+
try {
|
179174
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
179175
|
+
} catch (error4) {
|
179176
|
+
handleError(error4);
|
179177
|
+
return 1;
|
179178
|
+
}
|
179179
|
+
if (parsedArgs.flags["--help"]) {
|
179175
179180
|
output2.print(help2(whoamiCommand, { columns: client2.stderr.columns }));
|
179176
179181
|
return 2;
|
179177
179182
|
}
|
@@ -179191,11 +179196,13 @@ var init_whoami = __esm({
|
|
179191
179196
|
init_command27();
|
179192
179197
|
init_get_scope();
|
179193
179198
|
init_get_args();
|
179199
|
+
init_get_flags_specification();
|
179200
|
+
init_handle_error();
|
179194
179201
|
}
|
179195
179202
|
});
|
179196
179203
|
|
179197
179204
|
// src/index.ts
|
179198
|
-
var
|
179205
|
+
var import_error_utils35 = __toESM3(require_dist2());
|
179199
179206
|
var import_path43 = require("path");
|
179200
179207
|
var import_fs9 = require("fs");
|
179201
179208
|
var import_fs_extra23 = __toESM3(require_lib());
|
@@ -179919,7 +179926,7 @@ init_update_current_team_after_login();
|
|
179919
179926
|
try {
|
179920
179927
|
process.cwd();
|
179921
179928
|
} catch (err) {
|
179922
|
-
if ((0,
|
179929
|
+
if ((0, import_error_utils35.isError)(err) && err.message.includes("uv_cwd")) {
|
179923
179930
|
console.error("Error: The current working directory does not exist.");
|
179924
179931
|
process.exit(1);
|
179925
179932
|
}
|
@@ -179946,30 +179953,25 @@ var main14 = async () => {
|
|
179946
179953
|
process.stdout.isTTY = true;
|
179947
179954
|
process.stdin.isTTY = true;
|
179948
179955
|
}
|
179949
|
-
let
|
179956
|
+
let parsedArgs;
|
179950
179957
|
try {
|
179951
|
-
|
179958
|
+
parsedArgs = parseArguments(
|
179952
179959
|
process.argv,
|
179953
|
-
{
|
179954
|
-
"--version": Boolean,
|
179955
|
-
"-v": "--version",
|
179956
|
-
"--debug": Boolean,
|
179957
|
-
"-d": "--debug"
|
179958
|
-
},
|
179960
|
+
{ "--version": Boolean, "-v": "--version" },
|
179959
179961
|
{ permissive: true }
|
179960
179962
|
);
|
179961
179963
|
} catch (err) {
|
179962
179964
|
handleError(err);
|
179963
179965
|
return 1;
|
179964
179966
|
}
|
179965
|
-
const isDebugging =
|
179966
|
-
const isNoColor =
|
179967
|
+
const isDebugging = parsedArgs.flags["--debug"];
|
179968
|
+
const isNoColor = parsedArgs.flags["--no-color"];
|
179967
179969
|
output = new Output(process.stderr, {
|
179968
179970
|
debug: isDebugging,
|
179969
179971
|
noColor: isNoColor
|
179970
179972
|
});
|
179971
179973
|
debug2 = output.debug;
|
179972
|
-
const localConfigPath =
|
179974
|
+
const localConfigPath = parsedArgs.flags["--local-config"];
|
179973
179975
|
let localConfig = await getConfig(
|
179974
179976
|
output,
|
179975
179977
|
localConfigPath
|
@@ -179995,8 +179997,8 @@ var main14 = async () => {
|
|
179995
179997
|
output.prettyError(localConfig);
|
179996
179998
|
return 1;
|
179997
179999
|
}
|
179998
|
-
const targetOrSubcommand =
|
179999
|
-
const subSubCommand =
|
180000
|
+
const targetOrSubcommand = parsedArgs.args[2];
|
180001
|
+
const subSubCommand = parsedArgs.args[3];
|
180000
180002
|
const betaCommands = [];
|
180001
180003
|
if (betaCommands.includes(targetOrSubcommand)) {
|
180002
180004
|
output.print(
|
@@ -180009,11 +180011,11 @@ var main14 = async () => {
|
|
180009
180011
|
output.print(`${import_chalk111.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
180010
180012
|
`);
|
180011
180013
|
}
|
180012
|
-
if (!targetOrSubcommand &&
|
180014
|
+
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
180013
180015
|
console.log(pkg_default.version);
|
180014
180016
|
return 0;
|
180015
180017
|
}
|
180016
|
-
const bareHelpOption = !targetOrSubcommand &&
|
180018
|
+
const bareHelpOption = !targetOrSubcommand && parsedArgs.flags["--help"];
|
180017
180019
|
const bareHelpSubcommand = targetOrSubcommand === "help" && !subSubCommand;
|
180018
180020
|
if (bareHelpOption || bareHelpSubcommand) {
|
180019
180021
|
output.print(help());
|
@@ -180025,7 +180027,7 @@ var main14 = async () => {
|
|
180025
180027
|
output.error(
|
180026
180028
|
`An unexpected error occurred while trying to create the global directory "${humanizePath(
|
180027
180029
|
VERCEL_DIR3
|
180028
|
-
)}" ${(0,
|
180030
|
+
)}" ${(0, import_error_utils35.errorToString)(err)}`
|
180029
180031
|
);
|
180030
180032
|
return 1;
|
180031
180033
|
}
|
@@ -180033,7 +180035,7 @@ var main14 = async () => {
|
|
180033
180035
|
try {
|
180034
180036
|
config3 = readConfigFile();
|
180035
180037
|
} catch (err) {
|
180036
|
-
if ((0,
|
180038
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ENOENT") {
|
180037
180039
|
config3 = defaultGlobalConfig;
|
180038
180040
|
try {
|
180039
180041
|
writeToConfigFile(config3);
|
@@ -180041,7 +180043,7 @@ var main14 = async () => {
|
|
180041
180043
|
output.error(
|
180042
180044
|
`An unexpected error occurred while trying to save the config to "${humanizePath(
|
180043
180045
|
VERCEL_CONFIG_PATH
|
180044
|
-
)}" ${(0,
|
180046
|
+
)}" ${(0, import_error_utils35.errorToString)(err2)}`
|
180045
180047
|
);
|
180046
180048
|
return 1;
|
180047
180049
|
}
|
@@ -180049,7 +180051,7 @@ var main14 = async () => {
|
|
180049
180051
|
output.error(
|
180050
180052
|
`An unexpected error occurred while trying to read the config in "${humanizePath(
|
180051
180053
|
VERCEL_CONFIG_PATH
|
180052
|
-
)}" ${(0,
|
180054
|
+
)}" ${(0, import_error_utils35.errorToString)(err)}`
|
180053
180055
|
);
|
180054
180056
|
return 1;
|
180055
180057
|
}
|
@@ -180058,7 +180060,7 @@ var main14 = async () => {
|
|
180058
180060
|
try {
|
180059
180061
|
authConfig = readAuthConfigFile();
|
180060
180062
|
} catch (err) {
|
180061
|
-
if ((0,
|
180063
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ENOENT") {
|
180062
180064
|
authConfig = defaultAuthConfig;
|
180063
180065
|
try {
|
180064
180066
|
writeToAuthConfigFile(authConfig);
|
@@ -180066,7 +180068,7 @@ var main14 = async () => {
|
|
180066
180068
|
output.error(
|
180067
180069
|
`An unexpected error occurred while trying to write the auth config to "${humanizePath(
|
180068
180070
|
VERCEL_AUTH_CONFIG_PATH
|
180069
|
-
)}" ${(0,
|
180071
|
+
)}" ${(0, import_error_utils35.errorToString)(err2)}`
|
180070
180072
|
);
|
180071
180073
|
return 1;
|
180072
180074
|
}
|
@@ -180074,13 +180076,13 @@ var main14 = async () => {
|
|
180074
180076
|
output.error(
|
180075
180077
|
`An unexpected error occurred while trying to read the auth config in "${humanizePath(
|
180076
180078
|
VERCEL_AUTH_CONFIG_PATH
|
180077
|
-
)}" ${(0,
|
180079
|
+
)}" ${(0, import_error_utils35.errorToString)(err)}`
|
180078
180080
|
);
|
180079
180081
|
return 1;
|
180080
180082
|
}
|
180081
180083
|
}
|
180082
|
-
if (typeof
|
180083
|
-
apiUrl =
|
180084
|
+
if (typeof parsedArgs.flags["--api"] === "string") {
|
180085
|
+
apiUrl = parsedArgs.flags["--api"];
|
180084
180086
|
} else if (config3 && config3.api) {
|
180085
180087
|
apiUrl = config3.api;
|
180086
180088
|
}
|
@@ -180103,8 +180105,8 @@ var main14 = async () => {
|
|
180103
180105
|
localConfigPath,
|
180104
180106
|
argv: process.argv
|
180105
180107
|
});
|
180106
|
-
if (
|
180107
|
-
client.cwd =
|
180108
|
+
if (parsedArgs.flags["--cwd"]) {
|
180109
|
+
client.cwd = parsedArgs.flags["--cwd"];
|
180108
180110
|
}
|
180109
180111
|
const { cwd } = client;
|
180110
180112
|
let subcommand2 = void 0;
|
@@ -180112,7 +180114,7 @@ var main14 = async () => {
|
|
180112
180114
|
const targetPath = (0, import_path43.join)(cwd, targetOrSubcommand);
|
180113
180115
|
const targetPathExists = (0, import_fs9.existsSync)(targetPath);
|
180114
180116
|
const subcommandExists = GLOBAL_COMMANDS.has(targetOrSubcommand) || commands_default.has(targetOrSubcommand);
|
180115
|
-
if (targetPathExists && subcommandExists && !
|
180117
|
+
if (targetPathExists && subcommandExists && !parsedArgs.flags["--cwd"] && !process.env.NOW_BUILDER) {
|
180116
180118
|
output.warn(
|
180117
180119
|
`Did you mean to deploy the subdirectory "${targetOrSubcommand}"? Use \`vc --cwd ${targetOrSubcommand}\` instead.`
|
180118
180120
|
);
|
@@ -180132,7 +180134,7 @@ var main14 = async () => {
|
|
180132
180134
|
client.argv.push("-h");
|
180133
180135
|
}
|
180134
180136
|
const subcommandsWithoutToken = ["login", "logout", "help", "init", "build"];
|
180135
|
-
if ((!authConfig || !authConfig.token) && !client.argv.includes("-h") && !client.argv.includes("--help") && !
|
180137
|
+
if ((!authConfig || !authConfig.token) && !client.argv.includes("-h") && !client.argv.includes("--help") && !parsedArgs.flags["--token"] && subcommand2 && !subcommandsWithoutToken.includes(subcommand2)) {
|
180136
180138
|
if (isTTY2) {
|
180137
180139
|
output.log(info(`No existing credentials found. Please log in:`));
|
180138
180140
|
const result = await prompt(client);
|
@@ -180152,7 +180154,7 @@ var main14 = async () => {
|
|
180152
180154
|
return 1;
|
180153
180155
|
}
|
180154
180156
|
}
|
180155
|
-
if (typeof
|
180157
|
+
if (typeof parsedArgs.flags["--token"] === "string" && subcommand2 === "switch") {
|
180156
180158
|
output.prettyError({
|
180157
180159
|
message: `This command doesn't work with ${param(
|
180158
180160
|
"--token"
|
@@ -180161,8 +180163,8 @@ var main14 = async () => {
|
|
180161
180163
|
});
|
180162
180164
|
return 1;
|
180163
180165
|
}
|
180164
|
-
if (typeof
|
180165
|
-
const token =
|
180166
|
+
if (typeof parsedArgs.flags["--token"] === "string") {
|
180167
|
+
const token = parsedArgs.flags["--token"];
|
180166
180168
|
if (token.length === 0) {
|
180167
180169
|
output.prettyError({
|
180168
180170
|
message: `You defined ${param("--token")}, but it's missing a value`,
|
@@ -180186,7 +180188,7 @@ var main14 = async () => {
|
|
180186
180188
|
delete client.config.currentTeam;
|
180187
180189
|
}
|
180188
180190
|
}
|
180189
|
-
if (
|
180191
|
+
if (parsedArgs.flags["--team"]) {
|
180190
180192
|
output.warn(
|
180191
180193
|
`The ${param("--team")} option is deprecated. Please use ${param(
|
180192
180194
|
"--scope"
|
@@ -180194,7 +180196,7 @@ var main14 = async () => {
|
|
180194
180196
|
);
|
180195
180197
|
}
|
180196
180198
|
let targetCommand2 = typeof subcommand2 === "string" ? commands_default.get(subcommand2) : void 0;
|
180197
|
-
const scope =
|
180199
|
+
const scope = parsedArgs.flags["--scope"] || parsedArgs.flags["--team"] || localConfig?.scope;
|
180198
180200
|
if (typeof scope === "string" && targetCommand2 !== "login" && targetCommand2 !== "build" && !(targetCommand2 === "teams" && subSubCommand !== "invite")) {
|
180199
180201
|
let user = null;
|
180200
180202
|
try {
|
@@ -180203,7 +180205,7 @@ var main14 = async () => {
|
|
180203
180205
|
if (err instanceof Error) {
|
180204
180206
|
output.debug(err.stack || err.toString());
|
180205
180207
|
}
|
180206
|
-
if ((0,
|
180208
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "NOT_AUTHORIZED") {
|
180207
180209
|
output.prettyError({
|
180208
180210
|
message: `You do not have access to the specified account`,
|
180209
180211
|
link: "https://err.sh/vercel/scope-not-accessible"
|
@@ -180224,14 +180226,14 @@ var main14 = async () => {
|
|
180224
180226
|
try {
|
180225
180227
|
teams = await getTeams(client);
|
180226
180228
|
} catch (err) {
|
180227
|
-
if ((0,
|
180229
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "not_authorized") {
|
180228
180230
|
output.prettyError({
|
180229
180231
|
message: `You do not have access to the specified team`,
|
180230
180232
|
link: "https://err.sh/vercel/scope-not-accessible"
|
180231
180233
|
});
|
180232
180234
|
return 1;
|
180233
180235
|
}
|
180234
|
-
if ((0,
|
180236
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "rate_limited") {
|
180235
180237
|
output.prettyError({
|
180236
180238
|
message: "Rate limited. Too many requests to the same endpoint: /teams"
|
180237
180239
|
});
|
@@ -180257,16 +180259,16 @@ var main14 = async () => {
|
|
180257
180259
|
try {
|
180258
180260
|
const start = Date.now();
|
180259
180261
|
if (!targetCommand2) {
|
180260
|
-
targetCommand2 =
|
180262
|
+
targetCommand2 = parsedArgs.args[2];
|
180261
180263
|
try {
|
180262
180264
|
exitCode2 = await execExtension(
|
180263
180265
|
client,
|
180264
180266
|
targetCommand2,
|
180265
|
-
|
180267
|
+
parsedArgs.args.slice(3),
|
180266
180268
|
cwd
|
180267
180269
|
);
|
180268
180270
|
} catch (err) {
|
180269
|
-
if ((0,
|
180271
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ENOENT") {
|
180270
180272
|
targetCommand2 = subcommand2 = "deploy";
|
180271
180273
|
} else {
|
180272
180274
|
throw err;
|
@@ -180379,7 +180381,7 @@ var main14 = async () => {
|
|
180379
180381
|
metric2.timing(category, targetCommand2, end, pkg_default.version).event(category, targetCommand2, pkg_default.version).send();
|
180380
180382
|
}
|
180381
180383
|
} catch (err) {
|
180382
|
-
if ((0,
|
180384
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ENOTFOUND") {
|
180383
180385
|
const matches = /getaddrinfo ENOTFOUND (.*)$/.exec(err.message || "");
|
180384
180386
|
if (matches && matches[1]) {
|
180385
180387
|
const hostname2 = matches[1];
|
@@ -180394,7 +180396,7 @@ var main14 = async () => {
|
|
180394
180396
|
}
|
180395
180397
|
return 1;
|
180396
180398
|
}
|
180397
|
-
if ((0,
|
180399
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ECONNRESET") {
|
180398
180400
|
const matches = /request to https:\/\/(.*?)\//.exec(err.message || "");
|
180399
180401
|
const hostname2 = matches?.[1];
|
180400
180402
|
if (hostname2) {
|
@@ -180406,7 +180408,7 @@ var main14 = async () => {
|
|
180406
180408
|
}
|
180407
180409
|
return 1;
|
180408
180410
|
}
|
180409
|
-
if ((0,
|
180411
|
+
if ((0, import_error_utils35.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
180410
180412
|
output.prettyError(err);
|
180411
180413
|
return 1;
|
180412
180414
|
}
|
@@ -180418,9 +180420,9 @@ var main14 = async () => {
|
|
180418
180420
|
if (shouldCollectMetrics) {
|
180419
180421
|
if (!metric2)
|
180420
180422
|
metric2 = metrics();
|
180421
|
-
metric2.event(eventCategory, "1", pkg_default.version).exception((0,
|
180423
|
+
metric2.event(eventCategory, "1", pkg_default.version).exception((0, import_error_utils35.errorToString)(err)).send();
|
180422
180424
|
}
|
180423
|
-
if ((0,
|
180425
|
+
if ((0, import_error_utils35.isErrnoException)(err)) {
|
180424
180426
|
if (typeof err.stack === "string") {
|
180425
180427
|
output.debug(err.stack);
|
180426
180428
|
}
|