vercel 50.11.0 → 50.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +781 -941
- package/package.json +20 -20
package/dist/index.js
CHANGED
|
@@ -106,7 +106,7 @@ var require_dist2 = __commonJS2({
|
|
|
106
106
|
var src_exports2 = {};
|
|
107
107
|
__export4(src_exports2, {
|
|
108
108
|
errorToString: () => errorToString13,
|
|
109
|
-
isErrnoException: () =>
|
|
109
|
+
isErrnoException: () => isErrnoException21,
|
|
110
110
|
isError: () => isError14,
|
|
111
111
|
isErrorLike: () => isErrorLike2,
|
|
112
112
|
isObject: () => isObject2,
|
|
@@ -119,7 +119,7 @@ var require_dist2 = __commonJS2({
|
|
|
119
119
|
var isError14 = (error3) => {
|
|
120
120
|
return import_node_util.default.types.isNativeError(error3);
|
|
121
121
|
};
|
|
122
|
-
var
|
|
122
|
+
var isErrnoException21 = (error3) => {
|
|
123
123
|
return isError14(error3) && "code" in error3;
|
|
124
124
|
};
|
|
125
125
|
var isErrorLike2 = (error3) => isObject2(error3) && "message" in error3;
|
|
@@ -137,7 +137,7 @@ var require_dist2 = __commonJS2({
|
|
|
137
137
|
return isErrorLike2(error3) ? Object.assign(new Error(errorMessage), error3) : new Error(errorMessage);
|
|
138
138
|
};
|
|
139
139
|
function isSpawnError2(v) {
|
|
140
|
-
return
|
|
140
|
+
return isErrnoException21(v) && "spawnargs" in v;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
});
|
|
@@ -4083,14 +4083,14 @@ var require_templates = __commonJS2({
|
|
|
4083
4083
|
}
|
|
4084
4084
|
return results;
|
|
4085
4085
|
}
|
|
4086
|
-
function buildStyle(
|
|
4086
|
+
function buildStyle(chalk147, styles) {
|
|
4087
4087
|
const enabled = {};
|
|
4088
4088
|
for (const layer of styles) {
|
|
4089
4089
|
for (const style of layer.styles) {
|
|
4090
4090
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
4091
4091
|
}
|
|
4092
4092
|
}
|
|
4093
|
-
let current =
|
|
4093
|
+
let current = chalk147;
|
|
4094
4094
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
4095
4095
|
if (!Array.isArray(styles2)) {
|
|
4096
4096
|
continue;
|
|
@@ -4102,7 +4102,7 @@ var require_templates = __commonJS2({
|
|
|
4102
4102
|
}
|
|
4103
4103
|
return current;
|
|
4104
4104
|
}
|
|
4105
|
-
module2.exports = (
|
|
4105
|
+
module2.exports = (chalk147, temporary) => {
|
|
4106
4106
|
const styles = [];
|
|
4107
4107
|
const chunks = [];
|
|
4108
4108
|
let chunk = [];
|
|
@@ -4112,13 +4112,13 @@ var require_templates = __commonJS2({
|
|
|
4112
4112
|
} else if (style) {
|
|
4113
4113
|
const string = chunk.join("");
|
|
4114
4114
|
chunk = [];
|
|
4115
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
4115
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk147, styles)(string));
|
|
4116
4116
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
4117
4117
|
} else if (close2) {
|
|
4118
4118
|
if (styles.length === 0) {
|
|
4119
4119
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
4120
4120
|
}
|
|
4121
|
-
chunks.push(buildStyle(
|
|
4121
|
+
chunks.push(buildStyle(chalk147, styles)(chunk.join("")));
|
|
4122
4122
|
chunk = [];
|
|
4123
4123
|
styles.pop();
|
|
4124
4124
|
} else {
|
|
@@ -4166,16 +4166,16 @@ var require_source = __commonJS2({
|
|
|
4166
4166
|
}
|
|
4167
4167
|
};
|
|
4168
4168
|
var chalkFactory = (options) => {
|
|
4169
|
-
const
|
|
4170
|
-
applyOptions(
|
|
4171
|
-
|
|
4172
|
-
Object.setPrototypeOf(
|
|
4173
|
-
Object.setPrototypeOf(
|
|
4174
|
-
|
|
4169
|
+
const chalk148 = {};
|
|
4170
|
+
applyOptions(chalk148, options);
|
|
4171
|
+
chalk148.template = (...arguments_) => chalkTag(chalk148.template, ...arguments_);
|
|
4172
|
+
Object.setPrototypeOf(chalk148, Chalk.prototype);
|
|
4173
|
+
Object.setPrototypeOf(chalk148.template, chalk148);
|
|
4174
|
+
chalk148.template.constructor = () => {
|
|
4175
4175
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
4176
4176
|
};
|
|
4177
|
-
|
|
4178
|
-
return
|
|
4177
|
+
chalk148.template.Instance = ChalkClass;
|
|
4178
|
+
return chalk148.template;
|
|
4179
4179
|
};
|
|
4180
4180
|
function Chalk(options) {
|
|
4181
4181
|
return chalkFactory(options);
|
|
@@ -4286,7 +4286,7 @@ var require_source = __commonJS2({
|
|
|
4286
4286
|
return openAll + string + closeAll;
|
|
4287
4287
|
};
|
|
4288
4288
|
var template;
|
|
4289
|
-
var chalkTag = (
|
|
4289
|
+
var chalkTag = (chalk148, ...strings) => {
|
|
4290
4290
|
const [firstString] = strings;
|
|
4291
4291
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
4292
4292
|
return strings.join(" ");
|
|
@@ -4302,14 +4302,14 @@ var require_source = __commonJS2({
|
|
|
4302
4302
|
if (template === void 0) {
|
|
4303
4303
|
template = require_templates();
|
|
4304
4304
|
}
|
|
4305
|
-
return template(
|
|
4305
|
+
return template(chalk148, parts.join(""));
|
|
4306
4306
|
};
|
|
4307
4307
|
Object.defineProperties(Chalk.prototype, styles);
|
|
4308
|
-
var
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
module2.exports =
|
|
4308
|
+
var chalk147 = Chalk();
|
|
4309
|
+
chalk147.supportsColor = stdoutColor;
|
|
4310
|
+
chalk147.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
4311
|
+
chalk147.stderr.supportsColor = stderrColor;
|
|
4312
|
+
module2.exports = chalk147;
|
|
4313
4313
|
}
|
|
4314
4314
|
});
|
|
4315
4315
|
|
|
@@ -7220,14 +7220,14 @@ var require_templates2 = __commonJS2({
|
|
|
7220
7220
|
}
|
|
7221
7221
|
return results;
|
|
7222
7222
|
}
|
|
7223
|
-
function buildStyle(
|
|
7223
|
+
function buildStyle(chalk147, styles) {
|
|
7224
7224
|
const enabled = {};
|
|
7225
7225
|
for (const layer of styles) {
|
|
7226
7226
|
for (const style of layer.styles) {
|
|
7227
7227
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
7228
7228
|
}
|
|
7229
7229
|
}
|
|
7230
|
-
let current =
|
|
7230
|
+
let current = chalk147;
|
|
7231
7231
|
for (const styleName of Object.keys(enabled)) {
|
|
7232
7232
|
if (Array.isArray(enabled[styleName])) {
|
|
7233
7233
|
if (!(styleName in current)) {
|
|
@@ -7242,7 +7242,7 @@ var require_templates2 = __commonJS2({
|
|
|
7242
7242
|
}
|
|
7243
7243
|
return current;
|
|
7244
7244
|
}
|
|
7245
|
-
module2.exports = (
|
|
7245
|
+
module2.exports = (chalk147, tmp) => {
|
|
7246
7246
|
const styles = [];
|
|
7247
7247
|
const chunks = [];
|
|
7248
7248
|
let chunk = [];
|
|
@@ -7252,13 +7252,13 @@ var require_templates2 = __commonJS2({
|
|
|
7252
7252
|
} else if (style) {
|
|
7253
7253
|
const str = chunk.join("");
|
|
7254
7254
|
chunk = [];
|
|
7255
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
|
7255
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk147, styles)(str));
|
|
7256
7256
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
7257
7257
|
} else if (close2) {
|
|
7258
7258
|
if (styles.length === 0) {
|
|
7259
7259
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
7260
7260
|
}
|
|
7261
|
-
chunks.push(buildStyle(
|
|
7261
|
+
chunks.push(buildStyle(chalk147, styles)(chunk.join("")));
|
|
7262
7262
|
chunk = [];
|
|
7263
7263
|
styles.pop();
|
|
7264
7264
|
} else {
|
|
@@ -7295,16 +7295,16 @@ var require_chalk = __commonJS2({
|
|
|
7295
7295
|
}
|
|
7296
7296
|
function Chalk(options) {
|
|
7297
7297
|
if (!this || !(this instanceof Chalk) || this.template) {
|
|
7298
|
-
const
|
|
7299
|
-
applyOptions(
|
|
7300
|
-
|
|
7298
|
+
const chalk147 = {};
|
|
7299
|
+
applyOptions(chalk147, options);
|
|
7300
|
+
chalk147.template = function() {
|
|
7301
7301
|
const args2 = [].slice.call(arguments);
|
|
7302
|
-
return chalkTag.apply(null, [
|
|
7302
|
+
return chalkTag.apply(null, [chalk147.template].concat(args2));
|
|
7303
7303
|
};
|
|
7304
|
-
Object.setPrototypeOf(
|
|
7305
|
-
Object.setPrototypeOf(
|
|
7306
|
-
|
|
7307
|
-
return
|
|
7304
|
+
Object.setPrototypeOf(chalk147, Chalk.prototype);
|
|
7305
|
+
Object.setPrototypeOf(chalk147.template, chalk147);
|
|
7306
|
+
chalk147.template.constructor = Chalk;
|
|
7307
|
+
return chalk147.template;
|
|
7308
7308
|
}
|
|
7309
7309
|
applyOptions(this, options);
|
|
7310
7310
|
}
|
|
@@ -7423,7 +7423,7 @@ var require_chalk = __commonJS2({
|
|
|
7423
7423
|
ansiStyles.dim.open = originalDim;
|
|
7424
7424
|
return str;
|
|
7425
7425
|
}
|
|
7426
|
-
function chalkTag(
|
|
7426
|
+
function chalkTag(chalk147, strings) {
|
|
7427
7427
|
if (!Array.isArray(strings)) {
|
|
7428
7428
|
return [].slice.call(arguments, 1).join(" ");
|
|
7429
7429
|
}
|
|
@@ -7433,7 +7433,7 @@ var require_chalk = __commonJS2({
|
|
|
7433
7433
|
parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
|
7434
7434
|
parts.push(String(strings.raw[i]));
|
|
7435
7435
|
}
|
|
7436
|
-
return template(
|
|
7436
|
+
return template(chalk147, parts.join(""));
|
|
7437
7437
|
}
|
|
7438
7438
|
Object.defineProperties(Chalk.prototype, styles);
|
|
7439
7439
|
module2.exports = Chalk();
|
|
@@ -9384,19 +9384,19 @@ var require_cli_spinners = __commonJS2({
|
|
|
9384
9384
|
var require_log_symbols = __commonJS2({
|
|
9385
9385
|
"../../node_modules/.pnpm/log-symbols@2.2.0/node_modules/log-symbols/index.js"(exports2, module2) {
|
|
9386
9386
|
"use strict";
|
|
9387
|
-
var
|
|
9387
|
+
var chalk147 = require_chalk();
|
|
9388
9388
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
|
9389
9389
|
var main20 = {
|
|
9390
|
-
info:
|
|
9391
|
-
success:
|
|
9392
|
-
warning:
|
|
9393
|
-
error:
|
|
9390
|
+
info: chalk147.blue("\u2139"),
|
|
9391
|
+
success: chalk147.green("\u2714"),
|
|
9392
|
+
warning: chalk147.yellow("\u26A0"),
|
|
9393
|
+
error: chalk147.red("\u2716")
|
|
9394
9394
|
};
|
|
9395
9395
|
var fallbacks = {
|
|
9396
|
-
info:
|
|
9397
|
-
success:
|
|
9398
|
-
warning:
|
|
9399
|
-
error:
|
|
9396
|
+
info: chalk147.blue("i"),
|
|
9397
|
+
success: chalk147.green("\u221A"),
|
|
9398
|
+
warning: chalk147.yellow("\u203C"),
|
|
9399
|
+
error: chalk147.red("\xD7")
|
|
9400
9400
|
};
|
|
9401
9401
|
module2.exports = isSupported ? main20 : fallbacks;
|
|
9402
9402
|
}
|
|
@@ -9792,7 +9792,7 @@ var require_wcwidth = __commonJS2({
|
|
|
9792
9792
|
var require_ora = __commonJS2({
|
|
9793
9793
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
|
9794
9794
|
"use strict";
|
|
9795
|
-
var
|
|
9795
|
+
var chalk147 = require_chalk();
|
|
9796
9796
|
var cliCursor = require_cli_cursor();
|
|
9797
9797
|
var cliSpinners = require_cli_spinners();
|
|
9798
9798
|
var logSymbols = require_log_symbols();
|
|
@@ -9881,7 +9881,7 @@ var require_ora = __commonJS2({
|
|
|
9881
9881
|
const { frames } = this.spinner;
|
|
9882
9882
|
let frame = frames[this.frameIndex];
|
|
9883
9883
|
if (this.color) {
|
|
9884
|
-
frame =
|
|
9884
|
+
frame = chalk147[this.color](frame);
|
|
9885
9885
|
}
|
|
9886
9886
|
this.frameIndex = ++this.frameIndex % frames.length;
|
|
9887
9887
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
|
@@ -33479,7 +33479,7 @@ var init_command19 = __esm({
|
|
|
33479
33479
|
],
|
|
33480
33480
|
examples: [
|
|
33481
33481
|
{
|
|
33482
|
-
name: "Disconnect a resource from the current
|
|
33482
|
+
name: "Disconnect a resource from the current project",
|
|
33483
33483
|
value: [
|
|
33484
33484
|
`${packageName} integration-resource disconnect <resource>`,
|
|
33485
33485
|
`${packageName} integration-resource disconnect my-acme-resource`
|
|
@@ -33488,7 +33488,7 @@ var init_command19 = __esm({
|
|
|
33488
33488
|
{
|
|
33489
33489
|
name: "Disconnect all projects from a resource",
|
|
33490
33490
|
value: [
|
|
33491
|
-
`${packageName} integration-resource disconnect <resource> --
|
|
33491
|
+
`${packageName} integration-resource disconnect <resource> --all`,
|
|
33492
33492
|
`${packageName} integration-resource disconnect my-acme-resource --all`,
|
|
33493
33493
|
`${packageName} integration-resource disconnect my-acme-resource -a`
|
|
33494
33494
|
]
|
|
@@ -33692,7 +33692,7 @@ var init_command20 = __esm({
|
|
|
33692
33692
|
{
|
|
33693
33693
|
name: "Uninstall an integration",
|
|
33694
33694
|
value: [
|
|
33695
|
-
`${packageName} integration remove <
|
|
33695
|
+
`${packageName} integration remove <integration>`,
|
|
33696
33696
|
`${packageName} integration remove acme`
|
|
33697
33697
|
]
|
|
33698
33698
|
}
|
|
@@ -33936,82 +33936,12 @@ var CommandTimeout, logsCommand;
|
|
|
33936
33936
|
var init_command25 = __esm({
|
|
33937
33937
|
"src/commands/logs/command.ts"() {
|
|
33938
33938
|
"use strict";
|
|
33939
|
-
init_arg_common();
|
|
33940
33939
|
init_pkg_name();
|
|
33941
33940
|
CommandTimeout = "5 minutes";
|
|
33942
33941
|
logsCommand = {
|
|
33943
33942
|
name: "logs",
|
|
33944
33943
|
aliases: ["log"],
|
|
33945
|
-
description:
|
|
33946
|
-
arguments: [
|
|
33947
|
-
{
|
|
33948
|
-
name: "url|deploymentId",
|
|
33949
|
-
required: true
|
|
33950
|
-
}
|
|
33951
|
-
],
|
|
33952
|
-
options: [
|
|
33953
|
-
formatOption,
|
|
33954
|
-
jsonOption,
|
|
33955
|
-
{
|
|
33956
|
-
name: "follow",
|
|
33957
|
-
shorthand: "f",
|
|
33958
|
-
type: Boolean,
|
|
33959
|
-
deprecated: true
|
|
33960
|
-
},
|
|
33961
|
-
{
|
|
33962
|
-
name: "limit",
|
|
33963
|
-
shorthand: "n",
|
|
33964
|
-
type: Number,
|
|
33965
|
-
deprecated: true
|
|
33966
|
-
},
|
|
33967
|
-
{
|
|
33968
|
-
name: "since",
|
|
33969
|
-
shorthand: null,
|
|
33970
|
-
type: String,
|
|
33971
|
-
deprecated: true
|
|
33972
|
-
},
|
|
33973
|
-
{
|
|
33974
|
-
name: "until",
|
|
33975
|
-
shorthand: null,
|
|
33976
|
-
type: String,
|
|
33977
|
-
deprecated: true
|
|
33978
|
-
},
|
|
33979
|
-
{
|
|
33980
|
-
name: "output",
|
|
33981
|
-
shorthand: "o",
|
|
33982
|
-
type: String,
|
|
33983
|
-
deprecated: true
|
|
33984
|
-
}
|
|
33985
|
-
],
|
|
33986
|
-
examples: [
|
|
33987
|
-
{
|
|
33988
|
-
name: "Pretty print all the new runtime logs for the deployment DEPLOYMENT_URL from now on",
|
|
33989
|
-
value: `${packageName} logs DEPLOYMENT_URL`
|
|
33990
|
-
},
|
|
33991
|
-
{
|
|
33992
|
-
name: "Print all runtime logs for the deployment DEPLOYMENT_ID as json objects",
|
|
33993
|
-
value: `${packageName} logs DEPLOYMENT_ID --format=json`
|
|
33994
|
-
},
|
|
33995
|
-
{
|
|
33996
|
-
name: "Filter runtime logs for warning with JQ third party tool",
|
|
33997
|
-
value: `${packageName} logs DEPLOYMENT_ID --format=json | jq 'select(.level == "warning")'`
|
|
33998
|
-
}
|
|
33999
|
-
]
|
|
34000
|
-
};
|
|
34001
|
-
}
|
|
34002
|
-
});
|
|
34003
|
-
|
|
34004
|
-
// src/commands/logsv2/command.ts
|
|
34005
|
-
var logsv2Command;
|
|
34006
|
-
var init_command26 = __esm({
|
|
34007
|
-
"src/commands/logsv2/command.ts"() {
|
|
34008
|
-
"use strict";
|
|
34009
|
-
init_pkg_name();
|
|
34010
|
-
logsv2Command = {
|
|
34011
|
-
name: "logsv2",
|
|
34012
|
-
aliases: [],
|
|
34013
|
-
description: "Display request logs for a project using the new logs API.\n\nSource types: \u03BB = serverless, \u03B5 = edge/middleware, \u25C7 = static/external",
|
|
34014
|
-
hidden: true,
|
|
33944
|
+
description: "Display request logs for a project.\n\nSource types: \u03BB = serverless, \u03B5 = edge/middleware, \u25C7 = static/external",
|
|
34015
33945
|
arguments: [
|
|
34016
33946
|
{
|
|
34017
33947
|
name: "url|deploymentId",
|
|
@@ -34091,10 +34021,17 @@ var init_command26 = __esm({
|
|
|
34091
34021
|
},
|
|
34092
34022
|
{
|
|
34093
34023
|
name: "follow",
|
|
34024
|
+
shorthand: "f",
|
|
34025
|
+
type: Boolean,
|
|
34026
|
+
deprecated: false,
|
|
34027
|
+
description: "Stream live runtime logs (implicit when deployment URL/ID is specified)"
|
|
34028
|
+
},
|
|
34029
|
+
{
|
|
34030
|
+
name: "no-follow",
|
|
34094
34031
|
shorthand: null,
|
|
34095
34032
|
type: Boolean,
|
|
34096
34033
|
deprecated: false,
|
|
34097
|
-
description: "
|
|
34034
|
+
description: "Disable implicit --follow for deployment arguments"
|
|
34098
34035
|
},
|
|
34099
34036
|
{
|
|
34100
34037
|
name: "query",
|
|
@@ -34116,48 +34053,70 @@ var init_command26 = __esm({
|
|
|
34116
34053
|
type: Boolean,
|
|
34117
34054
|
deprecated: false,
|
|
34118
34055
|
description: "Show full log message below each request line"
|
|
34056
|
+
},
|
|
34057
|
+
{
|
|
34058
|
+
name: "branch",
|
|
34059
|
+
shorthand: "b",
|
|
34060
|
+
type: String,
|
|
34061
|
+
deprecated: false,
|
|
34062
|
+
description: "Filter by git branch (defaults to current branch when in a git repo)"
|
|
34063
|
+
},
|
|
34064
|
+
{
|
|
34065
|
+
name: "no-branch",
|
|
34066
|
+
shorthand: null,
|
|
34067
|
+
type: Boolean,
|
|
34068
|
+
deprecated: false,
|
|
34069
|
+
description: "Disable auto-detection of git branch"
|
|
34119
34070
|
}
|
|
34120
34071
|
],
|
|
34121
34072
|
examples: [
|
|
34122
34073
|
{
|
|
34123
34074
|
name: "Stream live logs for a deployment URL",
|
|
34124
|
-
value: `${packageName}
|
|
34075
|
+
value: `${packageName} logs https://my-app-xxxxx.vercel.app`
|
|
34125
34076
|
},
|
|
34126
34077
|
{
|
|
34127
34078
|
name: "Stream live logs for a deployment ID",
|
|
34128
|
-
value: `${packageName}
|
|
34079
|
+
value: `${packageName} logs dpl_xxxxx`
|
|
34129
34080
|
},
|
|
34130
34081
|
{
|
|
34131
34082
|
name: "Display recent logs for the linked project",
|
|
34132
|
-
value: `${packageName}
|
|
34083
|
+
value: `${packageName} logs`
|
|
34133
34084
|
},
|
|
34134
34085
|
{
|
|
34135
34086
|
name: "Display error logs from the last hour",
|
|
34136
|
-
value: `${packageName}
|
|
34087
|
+
value: `${packageName} logs --level error --since 1h`
|
|
34137
34088
|
},
|
|
34138
34089
|
{
|
|
34139
|
-
name: "Display logs for a specific deployment",
|
|
34140
|
-
value: `${packageName}
|
|
34090
|
+
name: "Display logs for a specific deployment (historical)",
|
|
34091
|
+
value: `${packageName} logs dpl_xxxxx --no-follow`
|
|
34141
34092
|
},
|
|
34142
34093
|
{
|
|
34143
34094
|
name: "Filter logs by status code and output as JSON",
|
|
34144
|
-
value: `${packageName}
|
|
34095
|
+
value: `${packageName} logs --status-code 500 --json`
|
|
34145
34096
|
},
|
|
34146
34097
|
{
|
|
34147
34098
|
name: "Search logs and pipe to jq",
|
|
34148
|
-
value: `${packageName}
|
|
34099
|
+
value: `${packageName} logs --query "timeout" --json | jq '.message'`
|
|
34149
34100
|
},
|
|
34150
34101
|
{
|
|
34151
34102
|
name: "Display production logs only",
|
|
34152
|
-
value: `${packageName}
|
|
34103
|
+
value: `${packageName} logs --environment production`
|
|
34153
34104
|
},
|
|
34154
34105
|
{
|
|
34155
34106
|
name: "Display logs for a specific request",
|
|
34156
|
-
value: `${packageName}
|
|
34107
|
+
value: `${packageName} logs --request-id req_xxxxx`
|
|
34157
34108
|
},
|
|
34158
34109
|
{
|
|
34159
34110
|
name: "Display logs with full message details",
|
|
34160
|
-
value: `${packageName}
|
|
34111
|
+
value: `${packageName} logs --expand`
|
|
34112
|
+
},
|
|
34113
|
+
{
|
|
34114
|
+
name: "Display logs for a specific branch",
|
|
34115
|
+
value: `${packageName} logs --branch feature-x`
|
|
34116
|
+
},
|
|
34117
|
+
{
|
|
34118
|
+
name: "Display logs for all branches (disable auto-detection)",
|
|
34119
|
+
value: `${packageName} logs --no-branch`
|
|
34161
34120
|
}
|
|
34162
34121
|
]
|
|
34163
34122
|
};
|
|
@@ -34166,7 +34125,7 @@ var init_command26 = __esm({
|
|
|
34166
34125
|
|
|
34167
34126
|
// src/commands/mcp/command.ts
|
|
34168
34127
|
var mcpCommand;
|
|
34169
|
-
var
|
|
34128
|
+
var init_command26 = __esm({
|
|
34170
34129
|
"src/commands/mcp/command.ts"() {
|
|
34171
34130
|
"use strict";
|
|
34172
34131
|
init_pkg_name();
|
|
@@ -34200,7 +34159,7 @@ var init_command27 = __esm({
|
|
|
34200
34159
|
|
|
34201
34160
|
// src/commands/microfrontends/command.ts
|
|
34202
34161
|
var pullSubcommand2, microfrontendsCommand;
|
|
34203
|
-
var
|
|
34162
|
+
var init_command27 = __esm({
|
|
34204
34163
|
"src/commands/microfrontends/command.ts"() {
|
|
34205
34164
|
"use strict";
|
|
34206
34165
|
init_pkg_name();
|
|
@@ -34243,7 +34202,7 @@ var init_command28 = __esm({
|
|
|
34243
34202
|
|
|
34244
34203
|
// src/commands/open/command.ts
|
|
34245
34204
|
var openCommand;
|
|
34246
|
-
var
|
|
34205
|
+
var init_command28 = __esm({
|
|
34247
34206
|
"src/commands/open/command.ts"() {
|
|
34248
34207
|
"use strict";
|
|
34249
34208
|
init_pkg_name();
|
|
@@ -34265,7 +34224,7 @@ var init_command29 = __esm({
|
|
|
34265
34224
|
|
|
34266
34225
|
// src/commands/project/command.ts
|
|
34267
34226
|
var addSubcommand6, inspectSubcommand2, listSubcommand8, removeSubcommand8, projectCommand;
|
|
34268
|
-
var
|
|
34227
|
+
var init_command29 = __esm({
|
|
34269
34228
|
"src/commands/project/command.ts"() {
|
|
34270
34229
|
"use strict";
|
|
34271
34230
|
init_pkg_name();
|
|
@@ -34371,7 +34330,7 @@ var init_command30 = __esm({
|
|
|
34371
34330
|
|
|
34372
34331
|
// src/commands/promote/command.ts
|
|
34373
34332
|
var statusSubcommand2, promoteCommand;
|
|
34374
|
-
var
|
|
34333
|
+
var init_command30 = __esm({
|
|
34375
34334
|
"src/commands/promote/command.ts"() {
|
|
34376
34335
|
"use strict";
|
|
34377
34336
|
init_pkg_name();
|
|
@@ -34440,7 +34399,7 @@ var init_command31 = __esm({
|
|
|
34440
34399
|
|
|
34441
34400
|
// src/commands/pull/command.ts
|
|
34442
34401
|
var pullCommand;
|
|
34443
|
-
var
|
|
34402
|
+
var init_command31 = __esm({
|
|
34444
34403
|
"src/commands/pull/command.ts"() {
|
|
34445
34404
|
"use strict";
|
|
34446
34405
|
init_pkg_name();
|
|
@@ -34512,7 +34471,7 @@ var init_command32 = __esm({
|
|
|
34512
34471
|
|
|
34513
34472
|
// src/commands/redeploy/command.ts
|
|
34514
34473
|
var redeployCommand;
|
|
34515
|
-
var
|
|
34474
|
+
var init_command32 = __esm({
|
|
34516
34475
|
"src/commands/redeploy/command.ts"() {
|
|
34517
34476
|
"use strict";
|
|
34518
34477
|
init_pkg_name();
|
|
@@ -34563,7 +34522,7 @@ var init_command33 = __esm({
|
|
|
34563
34522
|
|
|
34564
34523
|
// src/commands/redirects/command.ts
|
|
34565
34524
|
var listSubcommand9, listVersionsSubcommand, addSubcommand7, uploadSubcommand, removeSubcommand9, promoteSubcommand, restoreSubcommand, redirectsCommand;
|
|
34566
|
-
var
|
|
34525
|
+
var init_command33 = __esm({
|
|
34567
34526
|
"src/commands/redirects/command.ts"() {
|
|
34568
34527
|
"use strict";
|
|
34569
34528
|
init_pkg_name();
|
|
@@ -34848,7 +34807,7 @@ var init_command34 = __esm({
|
|
|
34848
34807
|
|
|
34849
34808
|
// src/commands/remove/command.ts
|
|
34850
34809
|
var removeCommand;
|
|
34851
|
-
var
|
|
34810
|
+
var init_command34 = __esm({
|
|
34852
34811
|
"src/commands/remove/command.ts"() {
|
|
34853
34812
|
"use strict";
|
|
34854
34813
|
init_pkg_name();
|
|
@@ -34898,7 +34857,7 @@ var init_command35 = __esm({
|
|
|
34898
34857
|
|
|
34899
34858
|
// src/commands/rollback/command.ts
|
|
34900
34859
|
var statusSubcommand3, rollbackCommand;
|
|
34901
|
-
var
|
|
34860
|
+
var init_command35 = __esm({
|
|
34902
34861
|
"src/commands/rollback/command.ts"() {
|
|
34903
34862
|
"use strict";
|
|
34904
34863
|
init_pkg_name();
|
|
@@ -34959,7 +34918,7 @@ var init_command36 = __esm({
|
|
|
34959
34918
|
|
|
34960
34919
|
// src/commands/rolling-release/command.ts
|
|
34961
34920
|
var configureSubcommand, startSubcommand, approveSubcommand, abortSubcommand, completeSubcommand, fetchSubcommand, rollingReleaseCommand;
|
|
34962
|
-
var
|
|
34921
|
+
var init_command36 = __esm({
|
|
34963
34922
|
"src/commands/rolling-release/command.ts"() {
|
|
34964
34923
|
"use strict";
|
|
34965
34924
|
init_arg_common();
|
|
@@ -35153,7 +35112,7 @@ var init_command37 = __esm({
|
|
|
35153
35112
|
|
|
35154
35113
|
// src/commands/target/command.ts
|
|
35155
35114
|
var listSubcommand10, targetCommand;
|
|
35156
|
-
var
|
|
35115
|
+
var init_command37 = __esm({
|
|
35157
35116
|
"src/commands/target/command.ts"() {
|
|
35158
35117
|
"use strict";
|
|
35159
35118
|
init_arg_common();
|
|
@@ -35185,7 +35144,7 @@ var init_command38 = __esm({
|
|
|
35185
35144
|
|
|
35186
35145
|
// src/commands/teams/command.ts
|
|
35187
35146
|
var addSubcommand8, listSubcommand11, switchSubcommand, inviteSubcommand, teamsCommand;
|
|
35188
|
-
var
|
|
35147
|
+
var init_command38 = __esm({
|
|
35189
35148
|
"src/commands/teams/command.ts"() {
|
|
35190
35149
|
"use strict";
|
|
35191
35150
|
init_pkg_name();
|
|
@@ -35277,7 +35236,7 @@ var init_command39 = __esm({
|
|
|
35277
35236
|
|
|
35278
35237
|
// src/commands/telemetry/command.ts
|
|
35279
35238
|
var statusSubcommand4, enableSubcommand2, flushSubcommand, disableSubcommand2, telemetryCommand;
|
|
35280
|
-
var
|
|
35239
|
+
var init_command39 = __esm({
|
|
35281
35240
|
"src/commands/telemetry/command.ts"() {
|
|
35282
35241
|
"use strict";
|
|
35283
35242
|
statusSubcommand4 = {
|
|
@@ -35332,7 +35291,7 @@ var init_command40 = __esm({
|
|
|
35332
35291
|
|
|
35333
35292
|
// src/commands/upgrade/command.ts
|
|
35334
35293
|
var upgradeCommand;
|
|
35335
|
-
var
|
|
35294
|
+
var init_command40 = __esm({
|
|
35336
35295
|
"src/commands/upgrade/command.ts"() {
|
|
35337
35296
|
"use strict";
|
|
35338
35297
|
init_arg_common();
|
|
@@ -35376,7 +35335,7 @@ var init_command41 = __esm({
|
|
|
35376
35335
|
|
|
35377
35336
|
// src/commands/whoami/command.ts
|
|
35378
35337
|
var whoamiCommand;
|
|
35379
|
-
var
|
|
35338
|
+
var init_command41 = __esm({
|
|
35380
35339
|
"src/commands/whoami/command.ts"() {
|
|
35381
35340
|
"use strict";
|
|
35382
35341
|
init_pkg_name();
|
|
@@ -35399,7 +35358,7 @@ var init_command42 = __esm({
|
|
|
35399
35358
|
|
|
35400
35359
|
// src/commands/blob/command.ts
|
|
35401
35360
|
var listSubcommand12, putSubcommand, delSubcommand, copySubcommand, addStoreSubcommand, removeStoreSubcommand, getStoreSubcommand, storeSubcommand, blobCommand;
|
|
35402
|
-
var
|
|
35361
|
+
var init_command42 = __esm({
|
|
35403
35362
|
"src/commands/blob/command.ts"() {
|
|
35404
35363
|
"use strict";
|
|
35405
35364
|
listSubcommand12 = {
|
|
@@ -35656,7 +35615,7 @@ var init_command43 = __esm({
|
|
|
35656
35615
|
|
|
35657
35616
|
// src/commands/webhooks/command.ts
|
|
35658
35617
|
var listSubcommand13, getSubcommand, createSubcommand, removeSubcommand10, webhooksCommand;
|
|
35659
|
-
var
|
|
35618
|
+
var init_command43 = __esm({
|
|
35660
35619
|
"src/commands/webhooks/command.ts"() {
|
|
35661
35620
|
"use strict";
|
|
35662
35621
|
init_pkg_name();
|
|
@@ -35809,7 +35768,6 @@ var init_commands = __esm({
|
|
|
35809
35768
|
init_command41();
|
|
35810
35769
|
init_command42();
|
|
35811
35770
|
init_command43();
|
|
35812
|
-
init_command44();
|
|
35813
35771
|
init_output_manager();
|
|
35814
35772
|
commandsStructs = [
|
|
35815
35773
|
aliasCommand,
|
|
@@ -35837,7 +35795,6 @@ var init_commands = __esm({
|
|
|
35837
35795
|
loginCommand,
|
|
35838
35796
|
logoutCommand,
|
|
35839
35797
|
logsCommand,
|
|
35840
|
-
logsv2Command,
|
|
35841
35798
|
mcpCommand,
|
|
35842
35799
|
microfrontendsCommand,
|
|
35843
35800
|
openCommand,
|
|
@@ -36158,7 +36115,7 @@ var require_bytes = __commonJS2({
|
|
|
36158
36115
|
"../../node_modules/.pnpm/bytes@3.0.0/node_modules/bytes/index.js"(exports2, module2) {
|
|
36159
36116
|
"use strict";
|
|
36160
36117
|
module2.exports = bytes9;
|
|
36161
|
-
module2.exports.format =
|
|
36118
|
+
module2.exports.format = format7;
|
|
36162
36119
|
module2.exports.parse = parse11;
|
|
36163
36120
|
var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
|
|
36164
36121
|
var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
|
|
@@ -36175,11 +36132,11 @@ var require_bytes = __commonJS2({
|
|
|
36175
36132
|
return parse11(value);
|
|
36176
36133
|
}
|
|
36177
36134
|
if (typeof value === "number") {
|
|
36178
|
-
return
|
|
36135
|
+
return format7(value, options);
|
|
36179
36136
|
}
|
|
36180
36137
|
return null;
|
|
36181
36138
|
}
|
|
36182
|
-
function
|
|
36139
|
+
function format7(value, options) {
|
|
36183
36140
|
if (!Number.isFinite(value)) {
|
|
36184
36141
|
return null;
|
|
36185
36142
|
}
|
|
@@ -37258,14 +37215,14 @@ var require_templates3 = __commonJS2({
|
|
|
37258
37215
|
}
|
|
37259
37216
|
return results;
|
|
37260
37217
|
}
|
|
37261
|
-
function buildStyle(
|
|
37218
|
+
function buildStyle(chalk147, styles) {
|
|
37262
37219
|
const enabled = {};
|
|
37263
37220
|
for (const layer of styles) {
|
|
37264
37221
|
for (const style of layer.styles) {
|
|
37265
37222
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
37266
37223
|
}
|
|
37267
37224
|
}
|
|
37268
|
-
let current =
|
|
37225
|
+
let current = chalk147;
|
|
37269
37226
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
37270
37227
|
if (!Array.isArray(styles2)) {
|
|
37271
37228
|
continue;
|
|
@@ -37277,7 +37234,7 @@ var require_templates3 = __commonJS2({
|
|
|
37277
37234
|
}
|
|
37278
37235
|
return current;
|
|
37279
37236
|
}
|
|
37280
|
-
module2.exports = (
|
|
37237
|
+
module2.exports = (chalk147, temporary) => {
|
|
37281
37238
|
const styles = [];
|
|
37282
37239
|
const chunks = [];
|
|
37283
37240
|
let chunk = [];
|
|
@@ -37287,13 +37244,13 @@ var require_templates3 = __commonJS2({
|
|
|
37287
37244
|
} else if (style) {
|
|
37288
37245
|
const string = chunk.join("");
|
|
37289
37246
|
chunk = [];
|
|
37290
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
37247
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk147, styles)(string));
|
|
37291
37248
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
37292
37249
|
} else if (close2) {
|
|
37293
37250
|
if (styles.length === 0) {
|
|
37294
37251
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
37295
37252
|
}
|
|
37296
|
-
chunks.push(buildStyle(
|
|
37253
|
+
chunks.push(buildStyle(chalk147, styles)(chunk.join("")));
|
|
37297
37254
|
chunk = [];
|
|
37298
37255
|
styles.pop();
|
|
37299
37256
|
} else {
|
|
@@ -37341,16 +37298,16 @@ var require_source2 = __commonJS2({
|
|
|
37341
37298
|
}
|
|
37342
37299
|
};
|
|
37343
37300
|
var chalkFactory = (options) => {
|
|
37344
|
-
const
|
|
37345
|
-
applyOptions(
|
|
37346
|
-
|
|
37347
|
-
Object.setPrototypeOf(
|
|
37348
|
-
Object.setPrototypeOf(
|
|
37349
|
-
|
|
37301
|
+
const chalk148 = {};
|
|
37302
|
+
applyOptions(chalk148, options);
|
|
37303
|
+
chalk148.template = (...arguments_) => chalkTag(chalk148.template, ...arguments_);
|
|
37304
|
+
Object.setPrototypeOf(chalk148, Chalk.prototype);
|
|
37305
|
+
Object.setPrototypeOf(chalk148.template, chalk148);
|
|
37306
|
+
chalk148.template.constructor = () => {
|
|
37350
37307
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
37351
37308
|
};
|
|
37352
|
-
|
|
37353
|
-
return
|
|
37309
|
+
chalk148.template.Instance = ChalkClass;
|
|
37310
|
+
return chalk148.template;
|
|
37354
37311
|
};
|
|
37355
37312
|
function Chalk(options) {
|
|
37356
37313
|
return chalkFactory(options);
|
|
@@ -37461,7 +37418,7 @@ var require_source2 = __commonJS2({
|
|
|
37461
37418
|
return openAll + string + closeAll;
|
|
37462
37419
|
};
|
|
37463
37420
|
var template;
|
|
37464
|
-
var chalkTag = (
|
|
37421
|
+
var chalkTag = (chalk148, ...strings) => {
|
|
37465
37422
|
const [firstString] = strings;
|
|
37466
37423
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
37467
37424
|
return strings.join(" ");
|
|
@@ -37477,14 +37434,14 @@ var require_source2 = __commonJS2({
|
|
|
37477
37434
|
if (template === void 0) {
|
|
37478
37435
|
template = require_templates3();
|
|
37479
37436
|
}
|
|
37480
|
-
return template(
|
|
37437
|
+
return template(chalk148, parts.join(""));
|
|
37481
37438
|
};
|
|
37482
37439
|
Object.defineProperties(Chalk.prototype, styles);
|
|
37483
|
-
var
|
|
37484
|
-
|
|
37485
|
-
|
|
37486
|
-
|
|
37487
|
-
module2.exports =
|
|
37440
|
+
var chalk147 = Chalk();
|
|
37441
|
+
chalk147.supportsColor = stdoutColor;
|
|
37442
|
+
chalk147.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
37443
|
+
chalk147.stderr.supportsColor = stderrColor;
|
|
37444
|
+
module2.exports = chalk147;
|
|
37488
37445
|
}
|
|
37489
37446
|
});
|
|
37490
37447
|
|
|
@@ -39701,7 +39658,7 @@ var require_yoctocolors_cjs = __commonJS2({
|
|
|
39701
39658
|
"../../node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js"(exports2, module2) {
|
|
39702
39659
|
var tty = __require("tty");
|
|
39703
39660
|
var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
39704
|
-
var
|
|
39661
|
+
var format7 = (open10, close2) => {
|
|
39705
39662
|
if (!hasColors) {
|
|
39706
39663
|
return (input) => input;
|
|
39707
39664
|
}
|
|
@@ -39727,47 +39684,47 @@ var require_yoctocolors_cjs = __commonJS2({
|
|
|
39727
39684
|
};
|
|
39728
39685
|
};
|
|
39729
39686
|
var colors4 = {};
|
|
39730
|
-
colors4.reset =
|
|
39731
|
-
colors4.bold =
|
|
39732
|
-
colors4.dim =
|
|
39733
|
-
colors4.italic =
|
|
39734
|
-
colors4.underline =
|
|
39735
|
-
colors4.overline =
|
|
39736
|
-
colors4.inverse =
|
|
39737
|
-
colors4.hidden =
|
|
39738
|
-
colors4.strikethrough =
|
|
39739
|
-
colors4.black =
|
|
39740
|
-
colors4.red =
|
|
39741
|
-
colors4.green =
|
|
39742
|
-
colors4.yellow =
|
|
39743
|
-
colors4.blue =
|
|
39744
|
-
colors4.magenta =
|
|
39745
|
-
colors4.cyan =
|
|
39746
|
-
colors4.white =
|
|
39747
|
-
colors4.gray =
|
|
39748
|
-
colors4.bgBlack =
|
|
39749
|
-
colors4.bgRed =
|
|
39750
|
-
colors4.bgGreen =
|
|
39751
|
-
colors4.bgYellow =
|
|
39752
|
-
colors4.bgBlue =
|
|
39753
|
-
colors4.bgMagenta =
|
|
39754
|
-
colors4.bgCyan =
|
|
39755
|
-
colors4.bgWhite =
|
|
39756
|
-
colors4.bgGray =
|
|
39757
|
-
colors4.redBright =
|
|
39758
|
-
colors4.greenBright =
|
|
39759
|
-
colors4.yellowBright =
|
|
39760
|
-
colors4.blueBright =
|
|
39761
|
-
colors4.magentaBright =
|
|
39762
|
-
colors4.cyanBright =
|
|
39763
|
-
colors4.whiteBright =
|
|
39764
|
-
colors4.bgRedBright =
|
|
39765
|
-
colors4.bgGreenBright =
|
|
39766
|
-
colors4.bgYellowBright =
|
|
39767
|
-
colors4.bgBlueBright =
|
|
39768
|
-
colors4.bgMagentaBright =
|
|
39769
|
-
colors4.bgCyanBright =
|
|
39770
|
-
colors4.bgWhiteBright =
|
|
39687
|
+
colors4.reset = format7(0, 0);
|
|
39688
|
+
colors4.bold = format7(1, 22);
|
|
39689
|
+
colors4.dim = format7(2, 22);
|
|
39690
|
+
colors4.italic = format7(3, 23);
|
|
39691
|
+
colors4.underline = format7(4, 24);
|
|
39692
|
+
colors4.overline = format7(53, 55);
|
|
39693
|
+
colors4.inverse = format7(7, 27);
|
|
39694
|
+
colors4.hidden = format7(8, 28);
|
|
39695
|
+
colors4.strikethrough = format7(9, 29);
|
|
39696
|
+
colors4.black = format7(30, 39);
|
|
39697
|
+
colors4.red = format7(31, 39);
|
|
39698
|
+
colors4.green = format7(32, 39);
|
|
39699
|
+
colors4.yellow = format7(33, 39);
|
|
39700
|
+
colors4.blue = format7(34, 39);
|
|
39701
|
+
colors4.magenta = format7(35, 39);
|
|
39702
|
+
colors4.cyan = format7(36, 39);
|
|
39703
|
+
colors4.white = format7(37, 39);
|
|
39704
|
+
colors4.gray = format7(90, 39);
|
|
39705
|
+
colors4.bgBlack = format7(40, 49);
|
|
39706
|
+
colors4.bgRed = format7(41, 49);
|
|
39707
|
+
colors4.bgGreen = format7(42, 49);
|
|
39708
|
+
colors4.bgYellow = format7(43, 49);
|
|
39709
|
+
colors4.bgBlue = format7(44, 49);
|
|
39710
|
+
colors4.bgMagenta = format7(45, 49);
|
|
39711
|
+
colors4.bgCyan = format7(46, 49);
|
|
39712
|
+
colors4.bgWhite = format7(47, 49);
|
|
39713
|
+
colors4.bgGray = format7(100, 49);
|
|
39714
|
+
colors4.redBright = format7(91, 39);
|
|
39715
|
+
colors4.greenBright = format7(92, 39);
|
|
39716
|
+
colors4.yellowBright = format7(93, 39);
|
|
39717
|
+
colors4.blueBright = format7(94, 39);
|
|
39718
|
+
colors4.magentaBright = format7(95, 39);
|
|
39719
|
+
colors4.cyanBright = format7(96, 39);
|
|
39720
|
+
colors4.whiteBright = format7(97, 39);
|
|
39721
|
+
colors4.bgRedBright = format7(101, 49);
|
|
39722
|
+
colors4.bgGreenBright = format7(102, 49);
|
|
39723
|
+
colors4.bgYellowBright = format7(103, 49);
|
|
39724
|
+
colors4.bgBlueBright = format7(104, 49);
|
|
39725
|
+
colors4.bgMagentaBright = format7(105, 49);
|
|
39726
|
+
colors4.bgCyanBright = format7(106, 49);
|
|
39727
|
+
colors4.bgWhiteBright = format7(107, 49);
|
|
39771
39728
|
module2.exports = colors4;
|
|
39772
39729
|
}
|
|
39773
39730
|
});
|
|
@@ -46065,9 +46022,9 @@ var init_telemetry = __esm({
|
|
|
46065
46022
|
* Tracks the --format option for JSON output.
|
|
46066
46023
|
* This is a common option across many commands, so it's defined in the base class.
|
|
46067
46024
|
*/
|
|
46068
|
-
trackCliOptionFormat(
|
|
46069
|
-
if (
|
|
46070
|
-
const allowedFormat = ["json"].includes(
|
|
46025
|
+
trackCliOptionFormat(format7) {
|
|
46026
|
+
if (format7) {
|
|
46027
|
+
const allowedFormat = ["json"].includes(format7) ? format7 : this.redactedValue;
|
|
46071
46028
|
this.trackCliOption({
|
|
46072
46029
|
option: "format",
|
|
46073
46030
|
value: allowedFormat
|
|
@@ -51733,7 +51690,7 @@ var require_package = __commonJS2({
|
|
|
51733
51690
|
"../client/package.json"(exports2, module2) {
|
|
51734
51691
|
module2.exports = {
|
|
51735
51692
|
name: "@vercel/client",
|
|
51736
|
-
version: "17.2.
|
|
51693
|
+
version: "17.2.34",
|
|
51737
51694
|
main: "dist/index.js",
|
|
51738
51695
|
typings: "dist/index.d.ts",
|
|
51739
51696
|
homepage: "https://vercel.com",
|
|
@@ -55120,7 +55077,7 @@ var require_fill_range = __commonJS2({
|
|
|
55120
55077
|
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
55121
55078
|
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
55122
55079
|
let toNumber = padded === false && stringify2(start, end, options) === false;
|
|
55123
|
-
let
|
|
55080
|
+
let format7 = options.transform || transform(toNumber);
|
|
55124
55081
|
if (options.toRegex && step === 1) {
|
|
55125
55082
|
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
55126
55083
|
}
|
|
@@ -55132,7 +55089,7 @@ var require_fill_range = __commonJS2({
|
|
|
55132
55089
|
if (options.toRegex === true && step > 1) {
|
|
55133
55090
|
push(a);
|
|
55134
55091
|
} else {
|
|
55135
|
-
range.push(pad(
|
|
55092
|
+
range.push(pad(format7(a, index), maxLen, toNumber));
|
|
55136
55093
|
}
|
|
55137
55094
|
a = descending ? a - step : a + step;
|
|
55138
55095
|
index++;
|
|
@@ -55146,7 +55103,7 @@ var require_fill_range = __commonJS2({
|
|
|
55146
55103
|
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
|
|
55147
55104
|
return invalidRange(start, end, options);
|
|
55148
55105
|
}
|
|
55149
|
-
let
|
|
55106
|
+
let format7 = options.transform || ((val) => String.fromCharCode(val));
|
|
55150
55107
|
let a = `${start}`.charCodeAt(0);
|
|
55151
55108
|
let b = `${end}`.charCodeAt(0);
|
|
55152
55109
|
let descending = a > b;
|
|
@@ -55158,7 +55115,7 @@ var require_fill_range = __commonJS2({
|
|
|
55158
55115
|
let range = [];
|
|
55159
55116
|
let index = 0;
|
|
55160
55117
|
while (descending ? a >= b : a <= b) {
|
|
55161
|
-
range.push(
|
|
55118
|
+
range.push(format7(a, index));
|
|
55162
55119
|
a = descending ? a - step : a + step;
|
|
55163
55120
|
index++;
|
|
55164
55121
|
}
|
|
@@ -57199,11 +57156,11 @@ var require_picomatch = __commonJS2({
|
|
|
57199
57156
|
return { isMatch: false, output: "" };
|
|
57200
57157
|
}
|
|
57201
57158
|
const opts = options || {};
|
|
57202
|
-
const
|
|
57159
|
+
const format7 = opts.format || (posix2 ? utils.toPosixSlashes : null);
|
|
57203
57160
|
let match = input === glob;
|
|
57204
|
-
let output2 = match &&
|
|
57161
|
+
let output2 = match && format7 ? format7(input) : input;
|
|
57205
57162
|
if (match === false) {
|
|
57206
|
-
output2 =
|
|
57163
|
+
output2 = format7 ? format7(input) : input;
|
|
57207
57164
|
match = output2 === glob;
|
|
57208
57165
|
}
|
|
57209
57166
|
if (match === false || opts.capture === true) {
|
|
@@ -65578,7 +65535,7 @@ var require_create_deployment = __commonJS2({
|
|
|
65578
65535
|
var import_upload2 = require_upload();
|
|
65579
65536
|
var import_utils9 = require_utils14();
|
|
65580
65537
|
var import_errors6 = require_errors2();
|
|
65581
|
-
var
|
|
65538
|
+
var import_error_utils38 = require_dist2();
|
|
65582
65539
|
var import_build_utils21 = __require("@vercel/build-utils");
|
|
65583
65540
|
var import_tar_fs2 = __toESM4(require_tar_fs());
|
|
65584
65541
|
var import_zlib = __require("zlib");
|
|
@@ -65660,7 +65617,7 @@ var require_create_deployment = __commonJS2({
|
|
|
65660
65617
|
files = await (0, import_hashes.hashes)(fileList);
|
|
65661
65618
|
}
|
|
65662
65619
|
} catch (err) {
|
|
65663
|
-
if (clientOptions.prebuilt && (0,
|
|
65620
|
+
if (clientOptions.prebuilt && (0, import_error_utils38.isErrnoException)(err) && err.code === "ENOENT" && err.path) {
|
|
65664
65621
|
const errPath = (0, import_path46.relative)(workPath, err.path);
|
|
65665
65622
|
err.message = `File does not exist: "${(0, import_path46.relative)(workPath, errPath)}"`;
|
|
65666
65623
|
if (errPath.split(import_path46.sep).includes("node_modules")) {
|
|
@@ -72085,10 +72042,10 @@ var require_ajv = __commonJS2({
|
|
|
72085
72042
|
}
|
|
72086
72043
|
return text.slice(0, -separator.length);
|
|
72087
72044
|
}
|
|
72088
|
-
function addFormat(name,
|
|
72089
|
-
if (typeof
|
|
72090
|
-
|
|
72091
|
-
this._formats[name] =
|
|
72045
|
+
function addFormat(name, format7) {
|
|
72046
|
+
if (typeof format7 == "string")
|
|
72047
|
+
format7 = new RegExp(format7);
|
|
72048
|
+
this._formats[name] = format7;
|
|
72092
72049
|
return this;
|
|
72093
72050
|
}
|
|
72094
72051
|
function addDefaultMetaSchema(self2) {
|
|
@@ -72117,8 +72074,8 @@ var require_ajv = __commonJS2({
|
|
|
72117
72074
|
}
|
|
72118
72075
|
function addInitialFormats(self2) {
|
|
72119
72076
|
for (var name in self2._opts.formats) {
|
|
72120
|
-
var
|
|
72121
|
-
self2.addFormat(name,
|
|
72077
|
+
var format7 = self2._opts.formats[name];
|
|
72078
|
+
self2.addFormat(name, format7);
|
|
72122
72079
|
}
|
|
72123
72080
|
}
|
|
72124
72081
|
function addInitialKeywords(self2) {
|
|
@@ -79084,14 +79041,14 @@ var require_read_config_file = __commonJS2({
|
|
|
79084
79041
|
var import_js_yaml = __toESM4(require_js_yaml2());
|
|
79085
79042
|
var import_toml = __toESM4(require_toml());
|
|
79086
79043
|
var import_fs11 = __require("fs");
|
|
79087
|
-
var
|
|
79044
|
+
var import_error_utils38 = require_dist2();
|
|
79088
79045
|
var { readFile: readFile8 } = import_fs11.promises;
|
|
79089
79046
|
async function readFileOrNull(file) {
|
|
79090
79047
|
try {
|
|
79091
79048
|
const data = await readFile8(file);
|
|
79092
79049
|
return data;
|
|
79093
79050
|
} catch (error3) {
|
|
79094
|
-
if (!(0,
|
|
79051
|
+
if (!(0, import_error_utils38.isErrnoException)(error3)) {
|
|
79095
79052
|
throw error3;
|
|
79096
79053
|
}
|
|
79097
79054
|
if (error3.code !== "ENOENT") {
|
|
@@ -86111,7 +86068,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
|
86111
86068
|
var import_promises7 = __toESM4(__require("fs/promises"));
|
|
86112
86069
|
var import_path46 = __require("path");
|
|
86113
86070
|
var import_filesystem = require_filesystem();
|
|
86114
|
-
var
|
|
86071
|
+
var import_error_utils38 = require_dist2();
|
|
86115
86072
|
var LocalFileSystemDetector6 = class _LocalFileSystemDetector extends import_filesystem.DetectorFilesystem {
|
|
86116
86073
|
constructor(rootPath) {
|
|
86117
86074
|
super();
|
|
@@ -86122,7 +86079,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
|
86122
86079
|
await import_promises7.default.stat(this.getFilePath(name));
|
|
86123
86080
|
return true;
|
|
86124
86081
|
} catch (err) {
|
|
86125
|
-
if ((0,
|
|
86082
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "ENOENT") {
|
|
86126
86083
|
return false;
|
|
86127
86084
|
}
|
|
86128
86085
|
throw err;
|
|
@@ -87133,7 +87090,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
87133
87090
|
});
|
|
87134
87091
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
|
87135
87092
|
var import_semver4 = __toESM4(require_semver2());
|
|
87136
|
-
var
|
|
87093
|
+
var import__113 = require_dist8();
|
|
87137
87094
|
async function detectFileSystemAPI2({
|
|
87138
87095
|
files,
|
|
87139
87096
|
projectSettings,
|
|
@@ -87199,7 +87156,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
87199
87156
|
};
|
|
87200
87157
|
}
|
|
87201
87158
|
const invalidBuilder = builders.find(({ use }) => {
|
|
87202
|
-
const valid = (0,
|
|
87159
|
+
const valid = (0, import__113.isOfficialRuntime)("go", use) || (0, import__113.isOfficialRuntime)("python", use) || (0, import__113.isOfficialRuntime)("ruby", use) || (0, import__113.isOfficialRuntime)("node", use) || (0, import__113.isOfficialRuntime)("next", use) || (0, import__113.isOfficialRuntime)("static", use) || (0, import__113.isOfficialRuntime)("static-build", use);
|
|
87203
87160
|
return !valid;
|
|
87204
87161
|
});
|
|
87205
87162
|
if (invalidBuilder) {
|
|
@@ -87212,7 +87169,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
87212
87169
|
for (const lang of ["go", "python", "ruby"]) {
|
|
87213
87170
|
for (const { use } of builders) {
|
|
87214
87171
|
const plugin = "vercel-plugin-" + lang;
|
|
87215
|
-
if ((0,
|
|
87172
|
+
if ((0, import__113.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
|
87216
87173
|
return {
|
|
87217
87174
|
metadata,
|
|
87218
87175
|
fsApiBuilder: null,
|
|
@@ -87269,7 +87226,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
87269
87226
|
}
|
|
87270
87227
|
}
|
|
87271
87228
|
const frontendBuilder = builders.find(
|
|
87272
|
-
({ use }) => (0,
|
|
87229
|
+
({ use }) => (0, import__113.isOfficialRuntime)("next", use) || (0, import__113.isOfficialRuntime)("static", use) || (0, import__113.isOfficialRuntime)("static-build", use)
|
|
87273
87230
|
);
|
|
87274
87231
|
const config2 = frontendBuilder?.config || {};
|
|
87275
87232
|
const withTag = tag ? `@${tag}` : "";
|
|
@@ -97756,12 +97713,12 @@ var require_common8 = __commonJS2({
|
|
|
97756
97713
|
args2.unshift("%O");
|
|
97757
97714
|
}
|
|
97758
97715
|
let index = 0;
|
|
97759
|
-
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match,
|
|
97716
|
+
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format7) => {
|
|
97760
97717
|
if (match === "%%") {
|
|
97761
97718
|
return "%";
|
|
97762
97719
|
}
|
|
97763
97720
|
index++;
|
|
97764
|
-
const formatter = createDebug.formatters[
|
|
97721
|
+
const formatter = createDebug.formatters[format7];
|
|
97765
97722
|
if (typeof formatter === "function") {
|
|
97766
97723
|
const val = args2[index];
|
|
97767
97724
|
match = formatter.call(self2, val);
|
|
@@ -98358,12 +98315,12 @@ var require_common9 = __commonJS2({
|
|
|
98358
98315
|
args2.unshift("%O");
|
|
98359
98316
|
}
|
|
98360
98317
|
let index = 0;
|
|
98361
|
-
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match,
|
|
98318
|
+
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format7) => {
|
|
98362
98319
|
if (match === "%%") {
|
|
98363
98320
|
return "%";
|
|
98364
98321
|
}
|
|
98365
98322
|
index++;
|
|
98366
|
-
const formatter = createDebug.formatters[
|
|
98323
|
+
const formatter = createDebug.formatters[format7];
|
|
98367
98324
|
if (typeof formatter === "function") {
|
|
98368
98325
|
const val = args2[index];
|
|
98369
98326
|
match = formatter.call(self2, val);
|
|
@@ -132379,10 +132336,10 @@ var init_api = __esm({
|
|
|
132379
132336
|
this.trackCliFlag("refresh");
|
|
132380
132337
|
}
|
|
132381
132338
|
}
|
|
132382
|
-
trackCliOptionGenerate(
|
|
132383
|
-
if (
|
|
132339
|
+
trackCliOptionGenerate(format7) {
|
|
132340
|
+
if (format7) {
|
|
132384
132341
|
const validFormats = ["curl"];
|
|
132385
|
-
const value = validFormats.includes(
|
|
132342
|
+
const value = validFormats.includes(format7) ? format7 : this.redactedValue;
|
|
132386
132343
|
this.trackCliOption({
|
|
132387
132344
|
option: "generate",
|
|
132388
132345
|
value
|
|
@@ -132397,10 +132354,10 @@ var init_api = __esm({
|
|
|
132397
132354
|
trackCliSubcommandList() {
|
|
132398
132355
|
this.trackCliSubcommand({ subcommand: "list", value: "list" });
|
|
132399
132356
|
}
|
|
132400
|
-
trackCliOptionFormat(
|
|
132401
|
-
if (
|
|
132357
|
+
trackCliOptionFormat(format7) {
|
|
132358
|
+
if (format7) {
|
|
132402
132359
|
const validFormats = ["table", "json"];
|
|
132403
|
-
const value = validFormats.includes(
|
|
132360
|
+
const value = validFormats.includes(format7) ? format7 : this.redactedValue;
|
|
132404
132361
|
this.trackCliOption({
|
|
132405
132362
|
option: "format",
|
|
132406
132363
|
value
|
|
@@ -133207,7 +133164,7 @@ async function promptForEndpoint(client2, endpoints) {
|
|
|
133207
133164
|
}
|
|
133208
133165
|
});
|
|
133209
133166
|
}
|
|
133210
|
-
async function listEndpoints(client2, forceRefresh,
|
|
133167
|
+
async function listEndpoints(client2, forceRefresh, format7) {
|
|
133211
133168
|
const openApi = new OpenApiCache();
|
|
133212
133169
|
const success = await openApi.loadWithSpinner(forceRefresh);
|
|
133213
133170
|
if (!success) {
|
|
@@ -133215,7 +133172,7 @@ async function listEndpoints(client2, forceRefresh, format8) {
|
|
|
133215
133172
|
return 1;
|
|
133216
133173
|
}
|
|
133217
133174
|
const endpoints = openApi.getEndpoints();
|
|
133218
|
-
if (
|
|
133175
|
+
if (format7 === "json") {
|
|
133219
133176
|
return outputEndpointsAsJson(client2, endpoints);
|
|
133220
133177
|
}
|
|
133221
133178
|
return outputEndpointsAsTable(endpoints);
|
|
@@ -134037,7 +133994,7 @@ var require_format2 = __commonJS2({
|
|
|
134037
133994
|
var parse11 = require_parse7();
|
|
134038
133995
|
var isValid = require_is_valid();
|
|
134039
133996
|
var enLocale = require_en();
|
|
134040
|
-
function
|
|
133997
|
+
function format7(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
134041
133998
|
var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : "YYYY-MM-DDTHH:mm:ss.SSSZ";
|
|
134042
133999
|
var options = dirtyOptions || {};
|
|
134043
134000
|
var locale = options.locale;
|
|
@@ -134231,7 +134188,7 @@ var require_format2 = __commonJS2({
|
|
|
134231
134188
|
}
|
|
134232
134189
|
return output2;
|
|
134233
134190
|
}
|
|
134234
|
-
module2.exports =
|
|
134191
|
+
module2.exports = format7;
|
|
134235
134192
|
}
|
|
134236
134193
|
});
|
|
134237
134194
|
|
|
@@ -134785,7 +134742,7 @@ var init_list4 = __esm({
|
|
|
134785
134742
|
init_get_command_flags();
|
|
134786
134743
|
init_get_args();
|
|
134787
134744
|
init_get_flags_specification();
|
|
134788
|
-
|
|
134745
|
+
init_command42();
|
|
134789
134746
|
init_pkg_name();
|
|
134790
134747
|
init_list3();
|
|
134791
134748
|
init_error2();
|
|
@@ -135026,7 +134983,7 @@ var init_put2 = __esm({
|
|
|
135026
134983
|
init_output_manager();
|
|
135027
134984
|
init_get_args();
|
|
135028
134985
|
init_get_flags_specification();
|
|
135029
|
-
|
|
134986
|
+
init_command42();
|
|
135030
134987
|
import_error_utils13 = __toESM3(require_dist2(), 1);
|
|
135031
134988
|
init_pkg_name();
|
|
135032
134989
|
import_chalk47 = __toESM3(require_source(), 1);
|
|
@@ -135096,7 +135053,7 @@ var init_del2 = __esm({
|
|
|
135096
135053
|
init_output_manager();
|
|
135097
135054
|
init_get_args();
|
|
135098
135055
|
init_get_flags_specification();
|
|
135099
|
-
|
|
135056
|
+
init_command42();
|
|
135100
135057
|
init_del();
|
|
135101
135058
|
init_error2();
|
|
135102
135059
|
init_pkg_name();
|
|
@@ -135214,7 +135171,7 @@ var init_copy2 = __esm({
|
|
|
135214
135171
|
init_output_manager();
|
|
135215
135172
|
init_get_args();
|
|
135216
135173
|
init_get_flags_specification();
|
|
135217
|
-
|
|
135174
|
+
init_command42();
|
|
135218
135175
|
init_copy();
|
|
135219
135176
|
init_pkg_name();
|
|
135220
135177
|
}
|
|
@@ -135372,7 +135329,7 @@ var init_store_add2 = __esm({
|
|
|
135372
135329
|
init_pkg_name();
|
|
135373
135330
|
init_get_flags_specification();
|
|
135374
135331
|
init_get_args();
|
|
135375
|
-
|
|
135332
|
+
init_command42();
|
|
135376
135333
|
init_store_add();
|
|
135377
135334
|
init_error2();
|
|
135378
135335
|
}
|
|
@@ -135448,7 +135405,7 @@ var init_store_remove = __esm({
|
|
|
135448
135405
|
init_error2();
|
|
135449
135406
|
init_output_manager();
|
|
135450
135407
|
init_get_flags_specification();
|
|
135451
|
-
|
|
135408
|
+
init_command42();
|
|
135452
135409
|
init_get_args();
|
|
135453
135410
|
init_link2();
|
|
135454
135411
|
}
|
|
@@ -137872,7 +137829,7 @@ var init_store_get2 = __esm({
|
|
|
137872
137829
|
init_get_args();
|
|
137873
137830
|
init_get_flags_specification();
|
|
137874
137831
|
init_link2();
|
|
137875
|
-
|
|
137832
|
+
init_command42();
|
|
137876
137833
|
import_date_fns = __toESM3(require_date_fns(), 1);
|
|
137877
137834
|
import_chalk49 = __toESM3(require_source(), 1);
|
|
137878
137835
|
init_store_get();
|
|
@@ -137951,7 +137908,7 @@ var init_store2 = __esm({
|
|
|
137951
137908
|
init_get_invalid_subcommand();
|
|
137952
137909
|
init_get_subcommand();
|
|
137953
137910
|
init_help();
|
|
137954
|
-
|
|
137911
|
+
init_command42();
|
|
137955
137912
|
init_get_flags_specification();
|
|
137956
137913
|
init_output_manager();
|
|
137957
137914
|
init_commands();
|
|
@@ -138024,7 +137981,7 @@ var init_token = __esm({
|
|
|
138024
137981
|
"use strict";
|
|
138025
137982
|
init_diff_env_files();
|
|
138026
137983
|
init_get_flags_specification();
|
|
138027
|
-
|
|
137984
|
+
init_command42();
|
|
138028
137985
|
init_get_args();
|
|
138029
137986
|
init_pkg_name();
|
|
138030
137987
|
init_cmd();
|
|
@@ -138142,7 +138099,7 @@ var init_blob2 = __esm({
|
|
|
138142
138099
|
init_get_subcommand();
|
|
138143
138100
|
init_help();
|
|
138144
138101
|
init_list4();
|
|
138145
|
-
|
|
138102
|
+
init_command42();
|
|
138146
138103
|
init_get_flags_specification();
|
|
138147
138104
|
init_output_manager();
|
|
138148
138105
|
init_commands();
|
|
@@ -154111,7 +154068,7 @@ var init_pull4 = __esm({
|
|
|
154111
154068
|
init_ensure_link();
|
|
154112
154069
|
init_humanize_path();
|
|
154113
154070
|
init_help();
|
|
154114
|
-
|
|
154071
|
+
init_command31();
|
|
154115
154072
|
init_parse_target();
|
|
154116
154073
|
init_get_flags_specification();
|
|
154117
154074
|
init_error2();
|
|
@@ -158502,12 +158459,12 @@ var init_deploy = __esm({
|
|
|
158502
158459
|
});
|
|
158503
158460
|
}
|
|
158504
158461
|
}
|
|
158505
|
-
trackCliOptionArchive(
|
|
158506
|
-
if (
|
|
158462
|
+
trackCliOptionArchive(format7) {
|
|
158463
|
+
if (format7) {
|
|
158507
158464
|
const allowedFormat = [
|
|
158508
158465
|
...import_client10.VALID_ARCHIVE_FORMATS,
|
|
158509
158466
|
deprecatedArchiveSplitTgz
|
|
158510
|
-
].includes(
|
|
158467
|
+
].includes(format7) ? format7 : this.redactedValue;
|
|
158511
158468
|
this.trackCliOption({
|
|
158512
158469
|
option: "archive",
|
|
158513
158470
|
value: allowedFormat
|
|
@@ -159267,7 +159224,7 @@ var require_bytes2 = __commonJS2({
|
|
|
159267
159224
|
"../../node_modules/.pnpm/bytes@3.1.0/node_modules/bytes/index.js"(exports2, module2) {
|
|
159268
159225
|
"use strict";
|
|
159269
159226
|
module2.exports = bytes9;
|
|
159270
|
-
module2.exports.format =
|
|
159227
|
+
module2.exports.format = format7;
|
|
159271
159228
|
module2.exports.parse = parse11;
|
|
159272
159229
|
var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
|
|
159273
159230
|
var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
|
|
@@ -159285,11 +159242,11 @@ var require_bytes2 = __commonJS2({
|
|
|
159285
159242
|
return parse11(value);
|
|
159286
159243
|
}
|
|
159287
159244
|
if (typeof value === "number") {
|
|
159288
|
-
return
|
|
159245
|
+
return format7(value, options);
|
|
159289
159246
|
}
|
|
159290
159247
|
return null;
|
|
159291
159248
|
}
|
|
159292
|
-
function
|
|
159249
|
+
function format7(value, options) {
|
|
159293
159250
|
if (!Number.isFinite(value)) {
|
|
159294
159251
|
return null;
|
|
159295
159252
|
}
|
|
@@ -159607,8 +159564,8 @@ var require_depd = __commonJS2({
|
|
|
159607
159564
|
process.emit("deprecation", err);
|
|
159608
159565
|
return;
|
|
159609
159566
|
}
|
|
159610
|
-
var
|
|
159611
|
-
var output2 =
|
|
159567
|
+
var format7 = process.stderr.isTTY ? formatColor : formatPlain;
|
|
159568
|
+
var output2 = format7.call(this, msg, caller, stack2.slice(i));
|
|
159612
159569
|
process.stderr.write(output2 + "\n", "utf8");
|
|
159613
159570
|
}
|
|
159614
159571
|
function callSiteLocation(callSite) {
|
|
@@ -164342,11 +164299,11 @@ var require_debug4 = __commonJS2({
|
|
|
164342
164299
|
args2.unshift("%O");
|
|
164343
164300
|
}
|
|
164344
164301
|
var index = 0;
|
|
164345
|
-
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, function(match,
|
|
164302
|
+
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, function(match, format7) {
|
|
164346
164303
|
if (match === "%%")
|
|
164347
164304
|
return match;
|
|
164348
164305
|
index++;
|
|
164349
|
-
var formatter = exports2.formatters[
|
|
164306
|
+
var formatter = exports2.formatters[format7];
|
|
164350
164307
|
if ("function" === typeof formatter) {
|
|
164351
164308
|
var val = args2[index];
|
|
164352
164309
|
match = formatter.call(self2, val);
|
|
@@ -174578,7 +174535,7 @@ var require_content_disposition = __commonJS2({
|
|
|
174578
174535
|
var opts = options || {};
|
|
174579
174536
|
var type = opts.type || "attachment";
|
|
174580
174537
|
var params2 = createparams(filename, opts.fallback);
|
|
174581
|
-
return
|
|
174538
|
+
return format7(new ContentDisposition(type, params2));
|
|
174582
174539
|
}
|
|
174583
174540
|
function createparams(filename, fallback) {
|
|
174584
174541
|
if (filename === void 0) {
|
|
@@ -174609,7 +174566,7 @@ var require_content_disposition = __commonJS2({
|
|
|
174609
174566
|
}
|
|
174610
174567
|
return params2;
|
|
174611
174568
|
}
|
|
174612
|
-
function
|
|
174569
|
+
function format7(obj) {
|
|
174613
174570
|
var parameters = obj.parameters;
|
|
174614
174571
|
var type = obj.type;
|
|
174615
174572
|
if (!type || typeof type !== "string" || !TOKEN_REGEXP.test(type)) {
|
|
@@ -176786,19 +176743,16 @@ var init_services_orchestrator = __esm({
|
|
|
176786
176743
|
this.managedServices = /* @__PURE__ */ new Map();
|
|
176787
176744
|
this.managedProcesses = /* @__PURE__ */ new Map();
|
|
176788
176745
|
this.stopping = false;
|
|
176789
|
-
this.
|
|
176746
|
+
this.services = options.services;
|
|
176790
176747
|
this.cwd = options.cwd;
|
|
176791
176748
|
this.repoRoot = options.repoRoot;
|
|
176792
176749
|
this.maxNameLength = Math.max(...options.services.map((s) => s.name.length));
|
|
176793
|
-
|
|
176794
|
-
|
|
176795
|
-
options.proxyOrigin
|
|
176796
|
-
);
|
|
176797
|
-
this.env = { ...options.env, ...serviceUrlEnvVars };
|
|
176750
|
+
this.proxyOrigin = options.proxyOrigin;
|
|
176751
|
+
this.env = options.env;
|
|
176798
176752
|
}
|
|
176799
176753
|
async startAll() {
|
|
176800
|
-
output_manager_default.debug(`Starting ${this.
|
|
176801
|
-
const startPromises = this.
|
|
176754
|
+
output_manager_default.debug(`Starting ${this.services.length} services`);
|
|
176755
|
+
const startPromises = this.services.map(
|
|
176802
176756
|
(service, index) => this.startService(service, index)
|
|
176803
176757
|
);
|
|
176804
176758
|
try {
|
|
@@ -176894,13 +176848,17 @@ var init_services_orchestrator = __esm({
|
|
|
176894
176848
|
colorIndex,
|
|
176895
176849
|
this.maxNameLength
|
|
176896
176850
|
);
|
|
176851
|
+
const serviceUrlEnvVars = this.generateServiceUrlEnvVars(
|
|
176852
|
+
framework?.envPrefix
|
|
176853
|
+
);
|
|
176897
176854
|
const env = cloneEnv2(
|
|
176898
176855
|
{
|
|
176899
176856
|
FORCE_COLOR: process.stdout.isTTY ? "1" : "0",
|
|
176900
176857
|
BROWSER: "none"
|
|
176901
176858
|
},
|
|
176902
176859
|
process.env,
|
|
176903
|
-
this.env
|
|
176860
|
+
this.env,
|
|
176861
|
+
serviceUrlEnvVars
|
|
176904
176862
|
);
|
|
176905
176863
|
if (service.routePrefix && service.routePrefix !== "/") {
|
|
176906
176864
|
env.VERCEL_SERVICE_BASE_PATH = service.routePrefix;
|
|
@@ -177043,15 +177001,16 @@ var init_services_orchestrator = __esm({
|
|
|
177043
177001
|
});
|
|
177044
177002
|
return Promise.race([checkForPort(port, STARTUP_TIMEOUT), processError]);
|
|
177045
177003
|
}
|
|
177046
|
-
generateServiceUrlEnvVars(
|
|
177004
|
+
generateServiceUrlEnvVars(envPrefix) {
|
|
177047
177005
|
const envVars = {};
|
|
177048
|
-
for (const service of services) {
|
|
177006
|
+
for (const service of this.services) {
|
|
177049
177007
|
const { name, routePrefix } = service;
|
|
177050
177008
|
if (!routePrefix)
|
|
177051
177009
|
continue;
|
|
177052
|
-
const
|
|
177053
|
-
const
|
|
177054
|
-
|
|
177010
|
+
const baseName = name.toUpperCase().replace(/-/g, "_");
|
|
177011
|
+
const key = envPrefix ? `${envPrefix}${baseName}_URL` : `${baseName}_URL`;
|
|
177012
|
+
const url3 = routePrefix === "/" ? this.proxyOrigin : `${this.proxyOrigin}${routePrefix.startsWith("/") ? "" : "/"}${routePrefix}`;
|
|
177013
|
+
envVars[key] = url3;
|
|
177055
177014
|
}
|
|
177056
177015
|
return envVars;
|
|
177057
177016
|
}
|
|
@@ -187135,7 +187094,7 @@ async function fetchInstallationPrepaymentInfo(client2, teamId, installationId)
|
|
|
187135
187094
|
const searchParams = new URLSearchParams();
|
|
187136
187095
|
searchParams.set("teamId", teamId);
|
|
187137
187096
|
return await client2.fetch(
|
|
187138
|
-
`/v1/integrations/installations/${installationId}/billing/balance
|
|
187097
|
+
`/v1/integrations/installations/${installationId}/billing/balance?${searchParams}`,
|
|
187139
187098
|
{
|
|
187140
187099
|
json: true
|
|
187141
187100
|
}
|
|
@@ -189451,219 +189410,6 @@ var init_list8 = __esm({
|
|
|
189451
189410
|
}
|
|
189452
189411
|
});
|
|
189453
189412
|
|
|
189454
|
-
// src/util/telemetry/commands/logs/index.ts
|
|
189455
|
-
var LogsTelemetryClient;
|
|
189456
|
-
var init_logs2 = __esm({
|
|
189457
|
-
"src/util/telemetry/commands/logs/index.ts"() {
|
|
189458
|
-
"use strict";
|
|
189459
|
-
init_telemetry();
|
|
189460
|
-
LogsTelemetryClient = class extends TelemetryClient {
|
|
189461
|
-
trackCliArgumentUrlOrDeploymentId(path12) {
|
|
189462
|
-
if (path12) {
|
|
189463
|
-
this.trackCliArgument({
|
|
189464
|
-
arg: "urlOrDeploymentId",
|
|
189465
|
-
value: this.redactedValue
|
|
189466
|
-
});
|
|
189467
|
-
}
|
|
189468
|
-
}
|
|
189469
|
-
trackCliFlagJson(v) {
|
|
189470
|
-
if (v) {
|
|
189471
|
-
this.trackCliFlag("json");
|
|
189472
|
-
}
|
|
189473
|
-
}
|
|
189474
|
-
trackCliFlagFollow(v) {
|
|
189475
|
-
if (v) {
|
|
189476
|
-
this.trackCliFlag("follow");
|
|
189477
|
-
}
|
|
189478
|
-
}
|
|
189479
|
-
trackCliOptionLimit(n) {
|
|
189480
|
-
if (typeof n === "number") {
|
|
189481
|
-
this.trackCliOption({
|
|
189482
|
-
option: "limit",
|
|
189483
|
-
value: this.redactedValue
|
|
189484
|
-
});
|
|
189485
|
-
}
|
|
189486
|
-
}
|
|
189487
|
-
trackCliOptionSince(n) {
|
|
189488
|
-
if (n) {
|
|
189489
|
-
this.trackCliOption({
|
|
189490
|
-
option: "since",
|
|
189491
|
-
value: this.redactedValue
|
|
189492
|
-
});
|
|
189493
|
-
}
|
|
189494
|
-
}
|
|
189495
|
-
trackCliOptionUntil(n) {
|
|
189496
|
-
if (n) {
|
|
189497
|
-
this.trackCliOption({
|
|
189498
|
-
option: "until",
|
|
189499
|
-
value: this.redactedValue
|
|
189500
|
-
});
|
|
189501
|
-
}
|
|
189502
|
-
}
|
|
189503
|
-
trackCliOptionOutput(outputMode) {
|
|
189504
|
-
if (outputMode) {
|
|
189505
|
-
const allowedOutputMode = ["raw", "short"].includes(outputMode) ? outputMode : this.redactedValue;
|
|
189506
|
-
this.trackCliOption({
|
|
189507
|
-
option: "output",
|
|
189508
|
-
value: allowedOutputMode
|
|
189509
|
-
});
|
|
189510
|
-
}
|
|
189511
|
-
}
|
|
189512
|
-
};
|
|
189513
|
-
}
|
|
189514
|
-
});
|
|
189515
|
-
|
|
189516
|
-
// src/commands/logs/index.ts
|
|
189517
|
-
var logs_exports = {};
|
|
189518
|
-
__export3(logs_exports, {
|
|
189519
|
-
default: () => logs
|
|
189520
|
-
});
|
|
189521
|
-
async function logs(client2) {
|
|
189522
|
-
let parsedArguments;
|
|
189523
|
-
const flagsSpecification = getFlagsSpecification(logsCommand.options);
|
|
189524
|
-
const { print, error: error3, spinner, stopSpinner } = output_manager_default;
|
|
189525
|
-
try {
|
|
189526
|
-
parsedArguments = parseArguments(client2.argv.slice(2), flagsSpecification);
|
|
189527
|
-
} catch (err) {
|
|
189528
|
-
printError(err);
|
|
189529
|
-
return 1;
|
|
189530
|
-
}
|
|
189531
|
-
for (const flag of Object.keys(parsedArguments.flags)) {
|
|
189532
|
-
if (deprecatedFlags.includes(flag)) {
|
|
189533
|
-
print(
|
|
189534
|
-
`${prependEmoji(
|
|
189535
|
-
`The ${param(
|
|
189536
|
-
flag
|
|
189537
|
-
)} option was ignored because it is now deprecated. Please remove it.`,
|
|
189538
|
-
emoji("warning")
|
|
189539
|
-
)}
|
|
189540
|
-
`
|
|
189541
|
-
);
|
|
189542
|
-
}
|
|
189543
|
-
}
|
|
189544
|
-
const telemetry2 = new LogsTelemetryClient({
|
|
189545
|
-
opts: {
|
|
189546
|
-
store: client2.telemetryEventStore
|
|
189547
|
-
}
|
|
189548
|
-
});
|
|
189549
|
-
if (parsedArguments.flags["--help"]) {
|
|
189550
|
-
telemetry2.trackCliFlagHelp("logs");
|
|
189551
|
-
print(help(logsCommand, { columns: client2.stderr.columns }));
|
|
189552
|
-
return 2;
|
|
189553
|
-
}
|
|
189554
|
-
if (parsedArguments.args[0] === logsCommand.name) {
|
|
189555
|
-
parsedArguments.args.shift();
|
|
189556
|
-
}
|
|
189557
|
-
const formatResult = validateJsonOutput(parsedArguments.flags);
|
|
189558
|
-
if (!formatResult.valid) {
|
|
189559
|
-
error3(formatResult.error);
|
|
189560
|
-
return 1;
|
|
189561
|
-
}
|
|
189562
|
-
const asJson = formatResult.jsonOutput;
|
|
189563
|
-
let [deploymentIdOrHost] = parsedArguments.args;
|
|
189564
|
-
if (!deploymentIdOrHost) {
|
|
189565
|
-
error3(
|
|
189566
|
-
`${getCommandName("logs <deployment>")} expects exactly one argument`
|
|
189567
|
-
);
|
|
189568
|
-
print(help(logsCommand, { columns: client2.stderr.columns }));
|
|
189569
|
-
return 1;
|
|
189570
|
-
}
|
|
189571
|
-
telemetry2.trackCliArgumentUrlOrDeploymentId(deploymentIdOrHost);
|
|
189572
|
-
telemetry2.trackCliOptionFormat(parsedArguments.flags["--format"]);
|
|
189573
|
-
telemetry2.trackCliFlagJson(parsedArguments.flags["--json"]);
|
|
189574
|
-
telemetry2.trackCliFlagFollow(parsedArguments.flags["--follow"]);
|
|
189575
|
-
telemetry2.trackCliOptionLimit(parsedArguments.flags["--limit"]);
|
|
189576
|
-
telemetry2.trackCliOptionSince(parsedArguments.flags["--since"]);
|
|
189577
|
-
telemetry2.trackCliOptionUntil(parsedArguments.flags["--until"]);
|
|
189578
|
-
telemetry2.trackCliOptionOutput(parsedArguments.flags["--output"]);
|
|
189579
|
-
let contextName = null;
|
|
189580
|
-
try {
|
|
189581
|
-
({ contextName } = await getScope(client2));
|
|
189582
|
-
} catch (err) {
|
|
189583
|
-
if ((0, import_error_utils29.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
|
189584
|
-
error3(err.message);
|
|
189585
|
-
return 1;
|
|
189586
|
-
}
|
|
189587
|
-
throw err;
|
|
189588
|
-
}
|
|
189589
|
-
try {
|
|
189590
|
-
deploymentIdOrHost = new URL(deploymentIdOrHost).hostname;
|
|
189591
|
-
} catch {
|
|
189592
|
-
}
|
|
189593
|
-
spinner(
|
|
189594
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk117.default.bold(contextName)}`
|
|
189595
|
-
);
|
|
189596
|
-
let deployment;
|
|
189597
|
-
try {
|
|
189598
|
-
deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
|
189599
|
-
} finally {
|
|
189600
|
-
stopSpinner();
|
|
189601
|
-
}
|
|
189602
|
-
if (!isReady(deployment)) {
|
|
189603
|
-
error3(
|
|
189604
|
-
`Deployment not ready. Currently: ${stateString2(deployment.readyState)}.`
|
|
189605
|
-
);
|
|
189606
|
-
if (isDeploying(deployment.readyState)) {
|
|
189607
|
-
print(
|
|
189608
|
-
`To follow build logs, run \`vercel inspect --logs --wait ${deploymentIdOrHost}\``
|
|
189609
|
-
);
|
|
189610
|
-
}
|
|
189611
|
-
return 1;
|
|
189612
|
-
}
|
|
189613
|
-
output_manager_default.print(
|
|
189614
|
-
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk117.default.dim(
|
|
189615
|
-
deployment.id
|
|
189616
|
-
)}) starting from ${import_chalk117.default.bold((0, import_format3.default)(Date.now(), DATE_TIME_FORMAT))}
|
|
189617
|
-
|
|
189618
|
-
`
|
|
189619
|
-
);
|
|
189620
|
-
const abortController = new AbortController();
|
|
189621
|
-
return await displayRuntimeLogs(
|
|
189622
|
-
client2,
|
|
189623
|
-
{
|
|
189624
|
-
deploymentId: deployment.id,
|
|
189625
|
-
projectId: deployment.projectId,
|
|
189626
|
-
parse: !asJson
|
|
189627
|
-
},
|
|
189628
|
-
abortController
|
|
189629
|
-
);
|
|
189630
|
-
}
|
|
189631
|
-
var import_error_utils29, import_chalk117, import_format3, deprecatedFlags, DATE_TIME_FORMAT;
|
|
189632
|
-
var init_logs3 = __esm({
|
|
189633
|
-
"src/commands/logs/index.ts"() {
|
|
189634
|
-
"use strict";
|
|
189635
|
-
import_error_utils29 = __toESM3(require_dist2(), 1);
|
|
189636
|
-
import_chalk117 = __toESM3(require_source(), 1);
|
|
189637
|
-
import_format3 = __toESM3(require_format2(), 1);
|
|
189638
|
-
init_build_state();
|
|
189639
|
-
init_is_deploying();
|
|
189640
|
-
init_emoji();
|
|
189641
|
-
init_error2();
|
|
189642
|
-
init_get_args();
|
|
189643
|
-
init_get_deployment();
|
|
189644
|
-
init_get_flags_specification();
|
|
189645
|
-
init_get_scope();
|
|
189646
|
-
init_logs();
|
|
189647
|
-
init_output_format();
|
|
189648
|
-
init_param();
|
|
189649
|
-
init_pkg_name();
|
|
189650
|
-
init_logs2();
|
|
189651
|
-
init_help();
|
|
189652
|
-
init_list8();
|
|
189653
|
-
init_command25();
|
|
189654
|
-
init_output_manager();
|
|
189655
|
-
deprecatedFlags = [
|
|
189656
|
-
"--follow",
|
|
189657
|
-
"--limit",
|
|
189658
|
-
"--since",
|
|
189659
|
-
"--until",
|
|
189660
|
-
"--output",
|
|
189661
|
-
"--json"
|
|
189662
|
-
];
|
|
189663
|
-
DATE_TIME_FORMAT = "MMM dd HH:mm:ss.SS";
|
|
189664
|
-
}
|
|
189665
|
-
});
|
|
189666
|
-
|
|
189667
189413
|
// src/util/logs-v2.ts
|
|
189668
189414
|
function parseRelativeTime(input) {
|
|
189669
189415
|
const now = Date.now();
|
|
@@ -189690,6 +189436,7 @@ async function fetchRequestLogs(client2, options) {
|
|
|
189690
189436
|
until,
|
|
189691
189437
|
search,
|
|
189692
189438
|
requestId,
|
|
189439
|
+
branch,
|
|
189693
189440
|
page = 0
|
|
189694
189441
|
} = options;
|
|
189695
189442
|
const now = Date.now();
|
|
@@ -189724,6 +189471,9 @@ async function fetchRequestLogs(client2, options) {
|
|
|
189724
189471
|
if (requestId) {
|
|
189725
189472
|
query.set("requestId", requestId);
|
|
189726
189473
|
}
|
|
189474
|
+
if (branch) {
|
|
189475
|
+
query.set("branch", branch);
|
|
189476
|
+
}
|
|
189727
189477
|
const baseUrl = client2.apiUrl === "https://api.vercel.com" ? "https://vercel.com" : client2.apiUrl;
|
|
189728
189478
|
const url3 = `${baseUrl}/api/logs/request-logs?${query.toString()}`;
|
|
189729
189479
|
const data = await client2.fetch(url3);
|
|
@@ -189787,13 +189537,13 @@ var init_logs_v2 = __esm({
|
|
|
189787
189537
|
}
|
|
189788
189538
|
});
|
|
189789
189539
|
|
|
189790
|
-
// src/util/telemetry/commands/
|
|
189791
|
-
var
|
|
189792
|
-
var
|
|
189793
|
-
"src/util/telemetry/commands/
|
|
189540
|
+
// src/util/telemetry/commands/logs/index.ts
|
|
189541
|
+
var LogsTelemetryClient;
|
|
189542
|
+
var init_logs2 = __esm({
|
|
189543
|
+
"src/util/telemetry/commands/logs/index.ts"() {
|
|
189794
189544
|
"use strict";
|
|
189795
189545
|
init_telemetry();
|
|
189796
|
-
|
|
189546
|
+
LogsTelemetryClient = class extends TelemetryClient {
|
|
189797
189547
|
trackCliArgumentUrlOrDeploymentId(v) {
|
|
189798
189548
|
if (v) {
|
|
189799
189549
|
this.trackCliArgument({
|
|
@@ -189894,6 +189644,11 @@ var init_logsv2 = __esm({
|
|
|
189894
189644
|
this.trackCliFlag("follow");
|
|
189895
189645
|
}
|
|
189896
189646
|
}
|
|
189647
|
+
trackCliFlagNoFollow(v) {
|
|
189648
|
+
if (v) {
|
|
189649
|
+
this.trackCliFlag("no-follow");
|
|
189650
|
+
}
|
|
189651
|
+
}
|
|
189897
189652
|
trackCliOptionQuery(v) {
|
|
189898
189653
|
if (v) {
|
|
189899
189654
|
this.trackCliOption({
|
|
@@ -189915,15 +189670,52 @@ var init_logsv2 = __esm({
|
|
|
189915
189670
|
this.trackCliFlag("expand");
|
|
189916
189671
|
}
|
|
189917
189672
|
}
|
|
189673
|
+
trackCliOptionBranch(v) {
|
|
189674
|
+
if (v) {
|
|
189675
|
+
this.trackCliOption({
|
|
189676
|
+
option: "branch",
|
|
189677
|
+
value: this.redactedValue
|
|
189678
|
+
});
|
|
189679
|
+
}
|
|
189680
|
+
}
|
|
189681
|
+
trackCliFlagNoBranch(v) {
|
|
189682
|
+
if (v) {
|
|
189683
|
+
this.trackCliFlag("no-branch");
|
|
189684
|
+
}
|
|
189685
|
+
}
|
|
189918
189686
|
};
|
|
189919
189687
|
}
|
|
189920
189688
|
});
|
|
189921
189689
|
|
|
189922
|
-
// src/commands/
|
|
189923
|
-
var
|
|
189924
|
-
__export3(
|
|
189925
|
-
default: () =>
|
|
189690
|
+
// src/commands/logs/index.ts
|
|
189691
|
+
var logs_exports = {};
|
|
189692
|
+
__export3(logs_exports, {
|
|
189693
|
+
default: () => logs
|
|
189926
189694
|
});
|
|
189695
|
+
async function getLatestDeploymentByBranch(client2, projectId, branch) {
|
|
189696
|
+
const branchMetaKeys = [
|
|
189697
|
+
"githubCommitRef",
|
|
189698
|
+
"gitlabCommitRef",
|
|
189699
|
+
"bitbucketCommitRef"
|
|
189700
|
+
];
|
|
189701
|
+
for (const metaKey of branchMetaKeys) {
|
|
189702
|
+
const query = new URLSearchParams();
|
|
189703
|
+
query.set("projectId", projectId);
|
|
189704
|
+
query.set("limit", "1");
|
|
189705
|
+
query.set("state", "READY");
|
|
189706
|
+
query.set(`meta-${metaKey}`, branch);
|
|
189707
|
+
const { deployments } = await client2.fetch(
|
|
189708
|
+
`/v6/deployments?${query}`
|
|
189709
|
+
);
|
|
189710
|
+
if (deployments.length > 0) {
|
|
189711
|
+
return {
|
|
189712
|
+
id: deployments[0].uid,
|
|
189713
|
+
url: deployments[0].url
|
|
189714
|
+
};
|
|
189715
|
+
}
|
|
189716
|
+
}
|
|
189717
|
+
return null;
|
|
189718
|
+
}
|
|
189927
189719
|
function table2({
|
|
189928
189720
|
columns,
|
|
189929
189721
|
rows,
|
|
@@ -190010,23 +189802,23 @@ function parseSources(sources) {
|
|
|
190010
189802
|
return [sources];
|
|
190011
189803
|
return sources;
|
|
190012
189804
|
}
|
|
190013
|
-
async function
|
|
189805
|
+
async function logs(client2) {
|
|
190014
189806
|
let parsedArguments;
|
|
190015
|
-
const flagsSpecification = getFlagsSpecification(
|
|
189807
|
+
const flagsSpecification = getFlagsSpecification(logsCommand.options);
|
|
190016
189808
|
try {
|
|
190017
189809
|
parsedArguments = parseArguments(client2.argv.slice(2), flagsSpecification);
|
|
190018
189810
|
} catch (err) {
|
|
190019
189811
|
printError(err);
|
|
190020
189812
|
return 1;
|
|
190021
189813
|
}
|
|
190022
|
-
const telemetry2 = new
|
|
189814
|
+
const telemetry2 = new LogsTelemetryClient({
|
|
190023
189815
|
opts: {
|
|
190024
189816
|
store: client2.telemetryEventStore
|
|
190025
189817
|
}
|
|
190026
189818
|
});
|
|
190027
189819
|
if (parsedArguments.flags["--help"]) {
|
|
190028
|
-
telemetry2.trackCliFlagHelp("
|
|
190029
|
-
output_manager_default.print(help(
|
|
189820
|
+
telemetry2.trackCliFlagHelp("logs");
|
|
189821
|
+
output_manager_default.print(help(logsCommand, { columns: client2.stderr.columns }));
|
|
190030
189822
|
return 2;
|
|
190031
189823
|
}
|
|
190032
189824
|
const subArgs = parsedArguments.args.slice(1);
|
|
@@ -190050,10 +189842,13 @@ async function logsv2(client2) {
|
|
|
190050
189842
|
const untilOption = parsedArguments.flags["--until"];
|
|
190051
189843
|
const limitOption2 = parsedArguments.flags["--limit"];
|
|
190052
189844
|
const jsonOption2 = parsedArguments.flags["--json"];
|
|
190053
|
-
const followOption = parsedArguments.flags["--follow"];
|
|
190054
189845
|
const queryOption = parsedArguments.flags["--query"];
|
|
190055
189846
|
const requestIdOption = parsedArguments.flags["--request-id"];
|
|
190056
189847
|
const expandOption = parsedArguments.flags["--expand"];
|
|
189848
|
+
const branchFlagValue = parsedArguments.flags["--branch"];
|
|
189849
|
+
const followFlagValue = parsedArguments.flags["--follow"];
|
|
189850
|
+
const noFollowFlagValue = parsedArguments.flags["--no-follow"];
|
|
189851
|
+
const followOption = deploymentOption && !noFollowFlagValue ? true : followFlagValue;
|
|
190057
189852
|
telemetry2.trackCliArgumentUrlOrDeploymentId(deploymentArgument);
|
|
190058
189853
|
telemetry2.trackCliOptionProject(projectOption);
|
|
190059
189854
|
telemetry2.trackCliOptionDeployment(deploymentFlag);
|
|
@@ -190069,13 +189864,8 @@ async function logsv2(client2) {
|
|
|
190069
189864
|
telemetry2.trackCliOptionQuery(queryOption);
|
|
190070
189865
|
telemetry2.trackCliOptionRequestId(requestIdOption);
|
|
190071
189866
|
telemetry2.trackCliFlagExpand(expandOption);
|
|
189867
|
+
telemetry2.trackCliOptionBranch(branchFlagValue);
|
|
190072
189868
|
if (followOption) {
|
|
190073
|
-
if (!deploymentOption) {
|
|
190074
|
-
output_manager_default.error(
|
|
190075
|
-
`The ${import_chalk118.default.bold("--follow")} flag requires a deployment URL or ID to be specified.`
|
|
190076
|
-
);
|
|
190077
|
-
return 1;
|
|
190078
|
-
}
|
|
190079
189869
|
const incompatibleFlags = [
|
|
190080
189870
|
{ flag: "--environment", value: environmentOption },
|
|
190081
189871
|
{ flag: "--level", value: levelOption },
|
|
@@ -190087,10 +189877,10 @@ async function logsv2(client2) {
|
|
|
190087
189877
|
{ flag: "--query", value: queryOption },
|
|
190088
189878
|
{ flag: "--request-id", value: requestIdOption }
|
|
190089
189879
|
];
|
|
190090
|
-
const usedIncompatible = incompatibleFlags.filter((f) => f.value !== void 0 && f.value !== null).map((f) =>
|
|
189880
|
+
const usedIncompatible = incompatibleFlags.filter((f) => f.value !== void 0 && f.value !== null).map((f) => import_chalk117.default.bold(f.flag));
|
|
190091
189881
|
if (usedIncompatible.length > 0) {
|
|
190092
189882
|
output_manager_default.error(
|
|
190093
|
-
`The ${
|
|
189883
|
+
`The ${import_chalk117.default.bold("--follow")} flag does not support filtering. Remove: ${usedIncompatible.join(", ")}`
|
|
190094
189884
|
);
|
|
190095
189885
|
return 1;
|
|
190096
189886
|
}
|
|
@@ -190099,7 +189889,7 @@ async function logsv2(client2) {
|
|
|
190099
189889
|
try {
|
|
190100
189890
|
({ contextName } = await getScope(client2));
|
|
190101
189891
|
} catch (err) {
|
|
190102
|
-
if ((0,
|
|
189892
|
+
if ((0, import_error_utils29.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
|
190103
189893
|
output_manager_default.error(err.message);
|
|
190104
189894
|
return 1;
|
|
190105
189895
|
}
|
|
@@ -190133,7 +189923,7 @@ async function logsv2(client2) {
|
|
|
190133
189923
|
output_manager_default.error(
|
|
190134
189924
|
`Your codebase isn't linked to a project on Vercel. Run ${getCommandName(
|
|
190135
189925
|
"link"
|
|
190136
|
-
)} to begin, or specify a project with ${
|
|
189926
|
+
)} to begin, or specify a project with ${import_chalk117.default.bold("--project")}.`
|
|
190137
189927
|
);
|
|
190138
189928
|
return 1;
|
|
190139
189929
|
}
|
|
@@ -190167,10 +189957,58 @@ async function logsv2(client2) {
|
|
|
190167
189957
|
throw err;
|
|
190168
189958
|
}
|
|
190169
189959
|
}
|
|
189960
|
+
const noBranchFlagValue = parsedArguments.flags["--no-branch"];
|
|
189961
|
+
let branchOption;
|
|
189962
|
+
if (typeof branchFlagValue === "string") {
|
|
189963
|
+
branchOption = branchFlagValue;
|
|
189964
|
+
} else if (!noBranchFlagValue && !deploymentId) {
|
|
189965
|
+
try {
|
|
189966
|
+
const gitMeta = await createGitMeta(client2.cwd);
|
|
189967
|
+
if (gitMeta?.commitRef) {
|
|
189968
|
+
branchOption = gitMeta.commitRef;
|
|
189969
|
+
output_manager_default.debug(`Detected git branch: ${branchOption}`);
|
|
189970
|
+
}
|
|
189971
|
+
} catch {
|
|
189972
|
+
}
|
|
189973
|
+
}
|
|
190170
189974
|
if (followOption) {
|
|
189975
|
+
if (!deploymentId) {
|
|
189976
|
+
if (noBranchFlagValue) {
|
|
189977
|
+
output_manager_default.error(
|
|
189978
|
+
`The ${import_chalk117.default.bold("--follow")} flag requires a deployment. Specify one with ${import_chalk117.default.bold("--deployment")} or remove ${import_chalk117.default.bold("--no-branch")} to auto-detect from the current git branch.`
|
|
189979
|
+
);
|
|
189980
|
+
return 1;
|
|
189981
|
+
}
|
|
189982
|
+
if (!branchOption) {
|
|
189983
|
+
output_manager_default.error(
|
|
189984
|
+
`The ${import_chalk117.default.bold("--follow")} flag requires a deployment. Specify one with ${import_chalk117.default.bold("--deployment")} or run from within a git repository.`
|
|
189985
|
+
);
|
|
189986
|
+
return 1;
|
|
189987
|
+
}
|
|
189988
|
+
output_manager_default.spinner(
|
|
189989
|
+
`Finding latest deployment for branch "${branchOption}"`,
|
|
189990
|
+
1e3
|
|
189991
|
+
);
|
|
189992
|
+
const branchDeployment = await getLatestDeploymentByBranch(
|
|
189993
|
+
client2,
|
|
189994
|
+
projectId,
|
|
189995
|
+
branchOption
|
|
189996
|
+
);
|
|
189997
|
+
output_manager_default.stopSpinner();
|
|
189998
|
+
if (!branchDeployment) {
|
|
189999
|
+
output_manager_default.error(
|
|
190000
|
+
`No deployments found for branch "${branchOption}". Deploy this branch first or specify a deployment with ${import_chalk117.default.bold("--deployment")}.`
|
|
190001
|
+
);
|
|
190002
|
+
return 1;
|
|
190003
|
+
}
|
|
190004
|
+
deploymentId = branchDeployment.id;
|
|
190005
|
+
output_manager_default.debug(
|
|
190006
|
+
`Found deployment ${deploymentId} for branch ${branchOption}`
|
|
190007
|
+
);
|
|
190008
|
+
}
|
|
190171
190009
|
if (!jsonOption2) {
|
|
190172
190010
|
output_manager_default.print(
|
|
190173
|
-
`Streaming logs for deployment ${
|
|
190011
|
+
`Streaming logs for deployment ${import_chalk117.default.bold(deploymentId)} starting from ${import_chalk117.default.bold((0, import_date_fns3.format)(Date.now(), TIME_ONLY_FORMAT))}
|
|
190174
190012
|
|
|
190175
190013
|
`
|
|
190176
190014
|
);
|
|
@@ -190234,7 +190072,8 @@ async function logsv2(client2) {
|
|
|
190234
190072
|
until: untilOption,
|
|
190235
190073
|
limit,
|
|
190236
190074
|
search: queryOption,
|
|
190237
|
-
requestId: requestIdOption
|
|
190075
|
+
requestId: requestIdOption,
|
|
190076
|
+
branch: branchOption
|
|
190238
190077
|
})) {
|
|
190239
190078
|
output_manager_default.stopSpinner();
|
|
190240
190079
|
if (jsonOption2) {
|
|
@@ -190250,18 +190089,22 @@ async function logsv2(client2) {
|
|
|
190250
190089
|
}
|
|
190251
190090
|
output_manager_default.stopSpinner();
|
|
190252
190091
|
if (!jsonOption2) {
|
|
190092
|
+
const branchSuffix = branchOption ? ` on branch ${import_chalk117.default.cyan(branchOption)}` : "";
|
|
190253
190093
|
if (logs2.length === 0) {
|
|
190254
190094
|
output_manager_default.print(
|
|
190255
|
-
|
|
190256
|
-
`)
|
|
190095
|
+
import_chalk117.default.dim(
|
|
190096
|
+
`No logs found for ${formatProject(orgSlug, projectSlug)}${branchSuffix}
|
|
190097
|
+
`
|
|
190098
|
+
)
|
|
190257
190099
|
);
|
|
190258
190100
|
} else {
|
|
190259
190101
|
const showDate = logsSpanMultipleDays(logs2);
|
|
190260
|
-
const timeFormat = showDate ?
|
|
190102
|
+
const timeFormat = showDate ? DATE_TIME_FORMAT : TIME_ONLY_FORMAT;
|
|
190261
190103
|
const rowData = logs2.map((log2) => {
|
|
190262
190104
|
const statusCode = log2.responseStatusCode;
|
|
190263
190105
|
return {
|
|
190264
190106
|
time: (0, import_date_fns3.format)(log2.timestamp, timeFormat),
|
|
190107
|
+
host: log2.domain || "",
|
|
190265
190108
|
level: log2.level,
|
|
190266
190109
|
path: `${getSourceIcon2(log2.source)} ${log2.requestMethod} ${log2.requestPath}`,
|
|
190267
190110
|
status: !statusCode || statusCode <= 0 ? "---" : String(statusCode),
|
|
@@ -190274,7 +190117,12 @@ async function logsv2(client2) {
|
|
|
190274
190117
|
{
|
|
190275
190118
|
label: "TIME",
|
|
190276
190119
|
getValue: (row) => row.time,
|
|
190277
|
-
format: (padded) =>
|
|
190120
|
+
format: (padded) => import_chalk117.default.dim(padded)
|
|
190121
|
+
},
|
|
190122
|
+
{
|
|
190123
|
+
label: "HOST",
|
|
190124
|
+
getValue: (row) => row.host,
|
|
190125
|
+
format: (padded) => import_chalk117.default.dim(padded)
|
|
190278
190126
|
},
|
|
190279
190127
|
{
|
|
190280
190128
|
label: "LEVEL",
|
|
@@ -190292,24 +190140,24 @@ async function logsv2(client2) {
|
|
|
190292
190140
|
{
|
|
190293
190141
|
label: "STATUS",
|
|
190294
190142
|
getValue: (row) => row.status,
|
|
190295
|
-
format: (padded, row) => row.statusCode <= 0 ?
|
|
190143
|
+
format: (padded, row) => row.statusCode <= 0 ? import_chalk117.default.gray(padded) : colorizeStatus(padded, row.statusCode)
|
|
190296
190144
|
},
|
|
190297
190145
|
{
|
|
190298
190146
|
label: "MESSAGE",
|
|
190299
190147
|
width: "stretch",
|
|
190300
190148
|
getValue: (row) => row.message || "(no message)",
|
|
190301
|
-
format: (padded, row) => row.message ? colorizeMessage(padded, row.level) :
|
|
190149
|
+
format: (padded, row) => row.message ? colorizeMessage(padded, row.level) : import_chalk117.default.dim(padded)
|
|
190302
190150
|
}
|
|
190303
190151
|
];
|
|
190304
190152
|
const formatted = table2({
|
|
190305
190153
|
columns,
|
|
190306
190154
|
rows: rowData,
|
|
190307
190155
|
tableWidth: terminalWidth,
|
|
190308
|
-
formatHeader: (header) =>
|
|
190156
|
+
formatHeader: (header) => import_chalk117.default.dim(header),
|
|
190309
190157
|
formatRow: expandOption ? (rowStr, row) => {
|
|
190310
190158
|
if (row.message) {
|
|
190311
190159
|
const coloredMessage = colorizeMessage(row.message, row.level);
|
|
190312
|
-
const truncatedIndicator = row.messageTruncated ?
|
|
190160
|
+
const truncatedIndicator = row.messageTruncated ? import_chalk117.default.gray("\u2026") : "";
|
|
190313
190161
|
return `${rowStr}
|
|
190314
190162
|
${coloredMessage}${truncatedIndicator}
|
|
190315
190163
|
`;
|
|
@@ -190322,8 +190170,8 @@ ${coloredMessage}${truncatedIndicator}
|
|
|
190322
190170
|
output_manager_default.print(row + "\n");
|
|
190323
190171
|
}
|
|
190324
190172
|
output_manager_default.print(
|
|
190325
|
-
|
|
190326
|
-
`Fetched ${logs2.length} logs for ${formatProject(orgSlug, projectSlug)}
|
|
190173
|
+
import_chalk117.default.gray(
|
|
190174
|
+
`Fetched ${logs2.length} logs for ${formatProject(orgSlug, projectSlug)}${branchSuffix}
|
|
190327
190175
|
`
|
|
190328
190176
|
)
|
|
190329
190177
|
);
|
|
@@ -190334,26 +190182,26 @@ ${coloredMessage}${truncatedIndicator}
|
|
|
190334
190182
|
function colorizeLevel(formatted, level) {
|
|
190335
190183
|
switch (level) {
|
|
190336
190184
|
case "fatal":
|
|
190337
|
-
return
|
|
190185
|
+
return import_chalk117.default.red.bold(formatted);
|
|
190338
190186
|
case "error":
|
|
190339
|
-
return
|
|
190187
|
+
return import_chalk117.default.red(formatted);
|
|
190340
190188
|
case "warning":
|
|
190341
|
-
return
|
|
190189
|
+
return import_chalk117.default.yellow(formatted);
|
|
190342
190190
|
default:
|
|
190343
|
-
return
|
|
190191
|
+
return import_chalk117.default.dim(formatted);
|
|
190344
190192
|
}
|
|
190345
190193
|
}
|
|
190346
190194
|
function colorizeStatus(formatted, statusCode) {
|
|
190347
190195
|
if (statusCode >= 500) {
|
|
190348
|
-
return
|
|
190196
|
+
return import_chalk117.default.red(formatted);
|
|
190349
190197
|
} else if (statusCode >= 400) {
|
|
190350
|
-
return
|
|
190198
|
+
return import_chalk117.default.yellow(formatted);
|
|
190351
190199
|
} else if (statusCode >= 300) {
|
|
190352
|
-
return
|
|
190200
|
+
return import_chalk117.default.cyan(formatted);
|
|
190353
190201
|
} else if (statusCode >= 200) {
|
|
190354
|
-
return
|
|
190202
|
+
return import_chalk117.default.green(formatted);
|
|
190355
190203
|
}
|
|
190356
|
-
return
|
|
190204
|
+
return import_chalk117.default.gray(formatted);
|
|
190357
190205
|
}
|
|
190358
190206
|
function getSourceIcon2(source) {
|
|
190359
190207
|
switch (source) {
|
|
@@ -190376,20 +190224,21 @@ function colorizeMessage(message2, level) {
|
|
|
190376
190224
|
switch (level) {
|
|
190377
190225
|
case "fatal":
|
|
190378
190226
|
case "error":
|
|
190379
|
-
return
|
|
190227
|
+
return import_chalk117.default.red(message2);
|
|
190380
190228
|
case "warning":
|
|
190381
|
-
return
|
|
190229
|
+
return import_chalk117.default.yellow(message2);
|
|
190382
190230
|
default:
|
|
190383
|
-
return
|
|
190231
|
+
return import_chalk117.default.dim(message2);
|
|
190384
190232
|
}
|
|
190385
190233
|
}
|
|
190386
|
-
var
|
|
190387
|
-
var
|
|
190388
|
-
"src/commands/
|
|
190234
|
+
var import_error_utils29, import_chalk117, import_date_fns3, TIME_ONLY_FORMAT, DATE_TIME_FORMAT;
|
|
190235
|
+
var init_logs3 = __esm({
|
|
190236
|
+
"src/commands/logs/index.ts"() {
|
|
190389
190237
|
"use strict";
|
|
190390
|
-
|
|
190391
|
-
|
|
190238
|
+
import_error_utils29 = __toESM3(require_dist2(), 1);
|
|
190239
|
+
import_chalk117 = __toESM3(require_source(), 1);
|
|
190392
190240
|
import_date_fns3 = __toESM3(require_date_fns(), 1);
|
|
190241
|
+
init_create_git_meta();
|
|
190393
190242
|
init_error2();
|
|
190394
190243
|
init_get_args();
|
|
190395
190244
|
init_get_flags_specification();
|
|
@@ -190402,12 +190251,12 @@ var init_logsv22 = __esm({
|
|
|
190402
190251
|
init_logs_v2();
|
|
190403
190252
|
init_get_deployment();
|
|
190404
190253
|
init_pkg_name();
|
|
190405
|
-
|
|
190254
|
+
init_logs2();
|
|
190406
190255
|
init_help();
|
|
190407
|
-
|
|
190256
|
+
init_command25();
|
|
190408
190257
|
init_output_manager();
|
|
190409
190258
|
TIME_ONLY_FORMAT = "HH:mm:ss.SS";
|
|
190410
|
-
|
|
190259
|
+
DATE_TIME_FORMAT = "MMM DD HH:mm:ss.SS";
|
|
190411
190260
|
}
|
|
190412
190261
|
});
|
|
190413
190262
|
|
|
@@ -190755,7 +190604,7 @@ var init_mcp2 = __esm({
|
|
|
190755
190604
|
init_get_args();
|
|
190756
190605
|
init_error2();
|
|
190757
190606
|
init_help();
|
|
190758
|
-
|
|
190607
|
+
init_command26();
|
|
190759
190608
|
init_get_flags_specification();
|
|
190760
190609
|
init_output_manager();
|
|
190761
190610
|
init_mcp();
|
|
@@ -190806,16 +190655,16 @@ async function logout(client2) {
|
|
|
190806
190655
|
return 0;
|
|
190807
190656
|
}
|
|
190808
190657
|
} catch (err) {
|
|
190809
|
-
output_manager_default.debug((0,
|
|
190658
|
+
output_manager_default.debug((0, import_error_utils30.errorToString)(err));
|
|
190810
190659
|
output_manager_default.error("Failed during logout");
|
|
190811
190660
|
}
|
|
190812
190661
|
return 1;
|
|
190813
190662
|
}
|
|
190814
|
-
var
|
|
190663
|
+
var import_error_utils30;
|
|
190815
190664
|
var init_future2 = __esm({
|
|
190816
190665
|
"src/commands/logout/future.ts"() {
|
|
190817
190666
|
"use strict";
|
|
190818
|
-
|
|
190667
|
+
import_error_utils30 = __toESM3(require_dist2(), 1);
|
|
190819
190668
|
init_pkg_name();
|
|
190820
190669
|
init_oauth();
|
|
190821
190670
|
init_output_manager();
|
|
@@ -190881,7 +190730,7 @@ async function logout2(client2) {
|
|
|
190881
190730
|
writeToAuthConfigFile(authConfig);
|
|
190882
190731
|
output_manager_default.debug("Configuration has been deleted");
|
|
190883
190732
|
} catch (err) {
|
|
190884
|
-
output_manager_default.debug((0,
|
|
190733
|
+
output_manager_default.debug((0, import_error_utils31.errorToString)(err));
|
|
190885
190734
|
exitCode2 = 1;
|
|
190886
190735
|
}
|
|
190887
190736
|
if (exitCode2 === 0) {
|
|
@@ -190891,7 +190740,7 @@ async function logout2(client2) {
|
|
|
190891
190740
|
}
|
|
190892
190741
|
return exitCode2;
|
|
190893
190742
|
}
|
|
190894
|
-
var
|
|
190743
|
+
var import_error_utils31;
|
|
190895
190744
|
var init_logout2 = __esm({
|
|
190896
190745
|
"src/commands/logout/index.ts"() {
|
|
190897
190746
|
"use strict";
|
|
@@ -190900,7 +190749,7 @@ var init_logout2 = __esm({
|
|
|
190900
190749
|
init_get_args();
|
|
190901
190750
|
init_pkg_name();
|
|
190902
190751
|
init_errors_ts();
|
|
190903
|
-
|
|
190752
|
+
import_error_utils31 = __toESM3(require_dist2(), 1);
|
|
190904
190753
|
init_help();
|
|
190905
190754
|
init_command24();
|
|
190906
190755
|
init_get_flags_specification();
|
|
@@ -190927,7 +190776,7 @@ async function pull2(client2) {
|
|
|
190927
190776
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
190928
190777
|
const { contextName } = await getScope(client2);
|
|
190929
190778
|
output_manager_default.spinner(
|
|
190930
|
-
`Fetching microfrontends configuration in ${
|
|
190779
|
+
`Fetching microfrontends configuration in ${import_chalk118.default.bold(contextName)}`
|
|
190931
190780
|
);
|
|
190932
190781
|
let parsedArgs;
|
|
190933
190782
|
const flagsSpecification = getFlagsSpecification(pullSubcommand2.options);
|
|
@@ -190975,11 +190824,11 @@ async function pull2(client2) {
|
|
|
190975
190824
|
const microfrontendsStamp = stamp_default();
|
|
190976
190825
|
output_manager_default.print(
|
|
190977
190826
|
`${prependEmoji(
|
|
190978
|
-
`Downloaded microfrontends configuration to ${
|
|
190827
|
+
`Downloaded microfrontends configuration to ${import_chalk118.default.bold(
|
|
190979
190828
|
humanizePath(
|
|
190980
190829
|
join24(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS)
|
|
190981
190830
|
)
|
|
190982
|
-
)} ${
|
|
190831
|
+
)} ${import_chalk118.default.gray(microfrontendsStamp())}`,
|
|
190983
190832
|
emoji("success")
|
|
190984
190833
|
)}
|
|
190985
190834
|
`
|
|
@@ -190991,11 +190840,11 @@ async function pull2(client2) {
|
|
|
190991
190840
|
return 1;
|
|
190992
190841
|
}
|
|
190993
190842
|
}
|
|
190994
|
-
var
|
|
190843
|
+
var import_chalk118, import_fs_extra23, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS;
|
|
190995
190844
|
var init_pull5 = __esm({
|
|
190996
190845
|
"src/commands/microfrontends/pull.ts"() {
|
|
190997
190846
|
"use strict";
|
|
190998
|
-
|
|
190847
|
+
import_chalk118 = __toESM3(require_source(), 1);
|
|
190999
190848
|
init_output_manager();
|
|
191000
190849
|
init_get_scope();
|
|
191001
190850
|
init_ensure_link();
|
|
@@ -191003,7 +190852,7 @@ var init_pull5 = __esm({
|
|
|
191003
190852
|
init_humanize_path();
|
|
191004
190853
|
init_stamp();
|
|
191005
190854
|
import_fs_extra23 = __toESM3(require_lib(), 1);
|
|
191006
|
-
|
|
190855
|
+
init_command27();
|
|
191007
190856
|
init_get_flags_specification();
|
|
191008
190857
|
init_get_args();
|
|
191009
190858
|
init_error2();
|
|
@@ -191098,7 +190947,7 @@ var init_microfrontends2 = __esm({
|
|
|
191098
190947
|
init_error2();
|
|
191099
190948
|
init_help();
|
|
191100
190949
|
init_pull5();
|
|
191101
|
-
|
|
190950
|
+
init_command27();
|
|
191102
190951
|
init_get_flags_specification();
|
|
191103
190952
|
init_output_manager();
|
|
191104
190953
|
init_commands();
|
|
@@ -191180,7 +191029,7 @@ var init_open3 = __esm({
|
|
|
191180
191029
|
"use strict";
|
|
191181
191030
|
import_open7 = __toESM3(require_open(), 1);
|
|
191182
191031
|
init_help();
|
|
191183
|
-
|
|
191032
|
+
init_command28();
|
|
191184
191033
|
init_get_args();
|
|
191185
191034
|
init_get_flags_specification();
|
|
191186
191035
|
init_error2();
|
|
@@ -191227,12 +191076,12 @@ async function add6(client2, argv) {
|
|
|
191227
191076
|
const { args: args2 } = parsedArgs;
|
|
191228
191077
|
if (args2.length !== 1) {
|
|
191229
191078
|
output_manager_default.error(
|
|
191230
|
-
`Invalid number of arguments. Usage: ${
|
|
191079
|
+
`Invalid number of arguments. Usage: ${import_chalk119.default.cyan(
|
|
191231
191080
|
`${getCommandName("project add <name>")}`
|
|
191232
191081
|
)}`
|
|
191233
191082
|
);
|
|
191234
191083
|
if (args2.length > 1) {
|
|
191235
|
-
const example =
|
|
191084
|
+
const example = import_chalk119.default.cyan(
|
|
191236
191085
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
|
191237
191086
|
);
|
|
191238
191087
|
output_manager_default.log(
|
|
@@ -191260,24 +191109,24 @@ async function add6(client2, argv) {
|
|
|
191260
191109
|
const elapsed2 = (0, import_ms23.default)(Date.now() - start);
|
|
191261
191110
|
const { contextName } = await getScope(client2);
|
|
191262
191111
|
output_manager_default.log(
|
|
191263
|
-
`${
|
|
191112
|
+
`${import_chalk119.default.cyan("Success!")} Project ${import_chalk119.default.bold(
|
|
191264
191113
|
name.toLowerCase()
|
|
191265
|
-
)} added (${
|
|
191114
|
+
)} added (${import_chalk119.default.bold(contextName)}) ${import_chalk119.default.gray(`[${elapsed2}]`)}`
|
|
191266
191115
|
);
|
|
191267
191116
|
return 0;
|
|
191268
191117
|
}
|
|
191269
|
-
var
|
|
191118
|
+
var import_chalk119, import_ms23;
|
|
191270
191119
|
var init_add12 = __esm({
|
|
191271
191120
|
"src/commands/project/add.ts"() {
|
|
191272
191121
|
"use strict";
|
|
191273
|
-
|
|
191122
|
+
import_chalk119 = __toESM3(require_source(), 1);
|
|
191274
191123
|
import_ms23 = __toESM3(require_ms(), 1);
|
|
191275
191124
|
init_errors_ts();
|
|
191276
191125
|
init_pkg_name();
|
|
191277
191126
|
init_create_project();
|
|
191278
191127
|
init_output_manager();
|
|
191279
191128
|
init_add11();
|
|
191280
|
-
|
|
191129
|
+
init_command29();
|
|
191281
191130
|
init_get_args();
|
|
191282
191131
|
init_get_flags_specification();
|
|
191283
191132
|
init_error2();
|
|
@@ -191369,7 +191218,7 @@ async function inspect4(client2, argv) {
|
|
|
191369
191218
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
191370
191219
|
if (args2.length !== 0 && args2.length !== 1) {
|
|
191371
191220
|
output_manager_default.error(
|
|
191372
|
-
`Invalid number of arguments. Usage: ${
|
|
191221
|
+
`Invalid number of arguments. Usage: ${import_chalk120.default.cyan(
|
|
191373
191222
|
`${getCommandName("project inspect <name>")}`
|
|
191374
191223
|
)}`
|
|
191375
191224
|
);
|
|
@@ -191384,57 +191233,57 @@ async function inspect4(client2, argv) {
|
|
|
191384
191233
|
});
|
|
191385
191234
|
const org = await getTeamById(client2, project.accountId);
|
|
191386
191235
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
191387
|
-
output_manager_default.log(`Found Project ${projectSlugLink} ${
|
|
191236
|
+
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk120.default.gray(inspectStamp())}`);
|
|
191388
191237
|
output_manager_default.print("\n");
|
|
191389
|
-
output_manager_default.print(
|
|
191390
|
-
output_manager_default.print(` ${
|
|
191238
|
+
output_manager_default.print(import_chalk120.default.bold(" General\n\n"));
|
|
191239
|
+
output_manager_default.print(` ${import_chalk120.default.cyan("ID")} ${project.id}
|
|
191391
191240
|
`);
|
|
191392
|
-
output_manager_default.print(` ${
|
|
191241
|
+
output_manager_default.print(` ${import_chalk120.default.cyan("Name")} ${project.name}
|
|
191393
191242
|
`);
|
|
191394
|
-
output_manager_default.print(` ${
|
|
191243
|
+
output_manager_default.print(` ${import_chalk120.default.cyan("Owner")} ${org.name}
|
|
191395
191244
|
`);
|
|
191396
191245
|
output_manager_default.print(
|
|
191397
|
-
` ${
|
|
191246
|
+
` ${import_chalk120.default.cyan("Created At")} ${formatDate(project.createdAt)}
|
|
191398
191247
|
`
|
|
191399
191248
|
);
|
|
191400
191249
|
output_manager_default.print(
|
|
191401
|
-
` ${
|
|
191250
|
+
` ${import_chalk120.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
|
|
191402
191251
|
`
|
|
191403
191252
|
);
|
|
191404
191253
|
output_manager_default.print(
|
|
191405
|
-
` ${
|
|
191254
|
+
` ${import_chalk120.default.cyan("Node.js Version")} ${project.nodeVersion}
|
|
191406
191255
|
`
|
|
191407
191256
|
);
|
|
191408
191257
|
const framework = import_frameworks10.frameworkList.find((f) => f.slug === project.framework);
|
|
191409
191258
|
output_manager_default.print("\n");
|
|
191410
|
-
output_manager_default.print(
|
|
191411
|
-
output_manager_default.print(` ${
|
|
191259
|
+
output_manager_default.print(import_chalk120.default.bold(" Framework Settings\n\n"));
|
|
191260
|
+
output_manager_default.print(` ${import_chalk120.default.cyan("Framework Preset")} ${framework?.name}
|
|
191412
191261
|
`);
|
|
191413
191262
|
output_manager_default.print(
|
|
191414
|
-
` ${
|
|
191263
|
+
` ${import_chalk120.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk120.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
|
|
191415
191264
|
`
|
|
191416
191265
|
);
|
|
191417
191266
|
output_manager_default.print(
|
|
191418
|
-
` ${
|
|
191267
|
+
` ${import_chalk120.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk120.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
|
|
191419
191268
|
`
|
|
191420
191269
|
);
|
|
191421
191270
|
output_manager_default.print(
|
|
191422
|
-
` ${
|
|
191271
|
+
` ${import_chalk120.default.cyan("Install Command")} ${project.installCommand ?? import_chalk120.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
|
|
191423
191272
|
`
|
|
191424
191273
|
);
|
|
191425
191274
|
output_manager_default.print("\n");
|
|
191426
191275
|
return 0;
|
|
191427
191276
|
}
|
|
191428
|
-
var
|
|
191277
|
+
var import_chalk120, import_frameworks10;
|
|
191429
191278
|
var init_inspect6 = __esm({
|
|
191430
191279
|
"src/commands/project/inspect.ts"() {
|
|
191431
191280
|
"use strict";
|
|
191432
|
-
|
|
191281
|
+
import_chalk120 = __toESM3(require_source(), 1);
|
|
191433
191282
|
import_frameworks10 = __toESM3(require_frameworks(), 1);
|
|
191434
191283
|
init_pkg_name();
|
|
191435
191284
|
init_inspect5();
|
|
191436
191285
|
init_output_manager();
|
|
191437
|
-
|
|
191286
|
+
init_command29();
|
|
191438
191287
|
init_get_args();
|
|
191439
191288
|
init_get_flags_specification();
|
|
191440
191289
|
init_error2();
|
|
@@ -191493,7 +191342,7 @@ async function list6(client2, argv) {
|
|
|
191493
191342
|
const { args: args2, flags: opts } = parsedArgs;
|
|
191494
191343
|
if (args2.length !== 0) {
|
|
191495
191344
|
output_manager_default.error(
|
|
191496
|
-
`Invalid number of arguments. Usage: ${
|
|
191345
|
+
`Invalid number of arguments. Usage: ${import_chalk121.default.cyan(
|
|
191497
191346
|
`${getCommandName("project ls")}`
|
|
191498
191347
|
)}`
|
|
191499
191348
|
);
|
|
@@ -191501,7 +191350,7 @@ async function list6(client2, argv) {
|
|
|
191501
191350
|
}
|
|
191502
191351
|
const start = Date.now();
|
|
191503
191352
|
const { contextName } = await getScope(client2);
|
|
191504
|
-
output_manager_default.spinner(`Fetching projects in ${
|
|
191353
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk121.default.bold(contextName)}`);
|
|
191505
191354
|
const flags = processFlags(opts, telemetryClient);
|
|
191506
191355
|
if ("error" in flags) {
|
|
191507
191356
|
output_manager_default.stopSpinner();
|
|
@@ -191584,7 +191433,7 @@ function outputJson(client2, projectList, metadata) {
|
|
|
191584
191433
|
function outputTable(projectList, options) {
|
|
191585
191434
|
const { contextName, elapsed: elapsed2, deprecated, opts, pagination } = options;
|
|
191586
191435
|
output_manager_default.log(
|
|
191587
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
|
191436
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk121.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk121.default.gray(`[${elapsed2}]`)}`
|
|
191588
191437
|
);
|
|
191589
191438
|
if (projectList.length > 0) {
|
|
191590
191439
|
printProjectsTable(projectList);
|
|
@@ -191594,12 +191443,12 @@ function outputTable(projectList, options) {
|
|
|
191594
191443
|
function printProjectsTable(projectList) {
|
|
191595
191444
|
const tablePrint = table(
|
|
191596
191445
|
[
|
|
191597
|
-
TABLE_HEADERS.map((header) =>
|
|
191446
|
+
TABLE_HEADERS.map((header) => import_chalk121.default.bold(import_chalk121.default.cyan(header))),
|
|
191598
191447
|
...projectList.flatMap((project) => [
|
|
191599
191448
|
[
|
|
191600
|
-
|
|
191449
|
+
import_chalk121.default.bold(project.name),
|
|
191601
191450
|
getLatestProdUrl(project),
|
|
191602
|
-
|
|
191451
|
+
import_chalk121.default.gray((0, import_ms24.default)(Date.now() - project.updatedAt)),
|
|
191603
191452
|
project.nodeVersion ?? ""
|
|
191604
191453
|
]
|
|
191605
191454
|
])
|
|
@@ -191624,19 +191473,19 @@ function getLatestProdUrl(project) {
|
|
|
191624
191473
|
return `https://${alias2}`;
|
|
191625
191474
|
return "--";
|
|
191626
191475
|
}
|
|
191627
|
-
var import_ms24,
|
|
191476
|
+
var import_ms24, import_chalk121, TABLE_HEADERS, PAGINATION_FLAGS_TO_EXCLUDE, BASE_PROJECTS_URL;
|
|
191628
191477
|
var init_list10 = __esm({
|
|
191629
191478
|
"src/commands/project/list.ts"() {
|
|
191630
191479
|
"use strict";
|
|
191631
191480
|
import_ms24 = __toESM3(require_ms(), 1);
|
|
191632
|
-
|
|
191481
|
+
import_chalk121 = __toESM3(require_source(), 1);
|
|
191633
191482
|
init_table();
|
|
191634
191483
|
init_get_command_flags();
|
|
191635
191484
|
init_pkg_name();
|
|
191636
191485
|
init_list9();
|
|
191637
191486
|
init_output_manager();
|
|
191638
191487
|
init_output_format();
|
|
191639
|
-
|
|
191488
|
+
init_command29();
|
|
191640
191489
|
init_get_args();
|
|
191641
191490
|
init_get_flags_specification();
|
|
191642
191491
|
init_error2();
|
|
@@ -191697,7 +191546,7 @@ async function rm6(client2, argv) {
|
|
|
191697
191546
|
const { args: args2 } = parsedArgs;
|
|
191698
191547
|
if (args2.length !== 1) {
|
|
191699
191548
|
output_manager_default.error(
|
|
191700
|
-
`Invalid number of arguments. Usage: ${
|
|
191549
|
+
`Invalid number of arguments. Usage: ${import_chalk122.default.cyan(
|
|
191701
191550
|
`${getCommandName("project rm <name>")}`
|
|
191702
191551
|
)}`
|
|
191703
191552
|
);
|
|
@@ -191727,7 +191576,7 @@ async function rm6(client2, argv) {
|
|
|
191727
191576
|
}
|
|
191728
191577
|
const elapsed2 = (0, import_ms25.default)(Date.now() - start);
|
|
191729
191578
|
output_manager_default.log(
|
|
191730
|
-
`${
|
|
191579
|
+
`${import_chalk122.default.cyan("Success!")} Project ${import_chalk122.default.bold(name)} removed ${import_chalk122.default.gray(
|
|
191731
191580
|
`[${elapsed2}]`
|
|
191732
191581
|
)}`
|
|
191733
191582
|
);
|
|
@@ -191736,22 +191585,22 @@ async function rm6(client2, argv) {
|
|
|
191736
191585
|
async function readConfirmation3(client2, projectName) {
|
|
191737
191586
|
output_manager_default.print(
|
|
191738
191587
|
prependEmoji(
|
|
191739
|
-
`The project ${
|
|
191588
|
+
`The project ${import_chalk122.default.bold(projectName)} will be removed permanently.
|
|
191740
191589
|
It will also delete everything under the project including deployments.
|
|
191741
191590
|
`,
|
|
191742
191591
|
emoji("warning")
|
|
191743
191592
|
)
|
|
191744
191593
|
);
|
|
191745
191594
|
return await client2.input.confirm(
|
|
191746
|
-
`${
|
|
191595
|
+
`${import_chalk122.default.bold.red("Are you sure?")}`,
|
|
191747
191596
|
false
|
|
191748
191597
|
);
|
|
191749
191598
|
}
|
|
191750
|
-
var
|
|
191599
|
+
var import_chalk122, import_ms25, e;
|
|
191751
191600
|
var init_rm10 = __esm({
|
|
191752
191601
|
"src/commands/project/rm.ts"() {
|
|
191753
191602
|
"use strict";
|
|
191754
|
-
|
|
191603
|
+
import_chalk122 = __toESM3(require_source(), 1);
|
|
191755
191604
|
import_ms25 = __toESM3(require_ms(), 1);
|
|
191756
191605
|
init_emoji();
|
|
191757
191606
|
init_errors_ts();
|
|
@@ -191761,7 +191610,7 @@ var init_rm10 = __esm({
|
|
|
191761
191610
|
init_get_args();
|
|
191762
191611
|
init_get_flags_specification();
|
|
191763
191612
|
init_error2();
|
|
191764
|
-
|
|
191613
|
+
init_command29();
|
|
191765
191614
|
e = encodeURIComponent;
|
|
191766
191615
|
}
|
|
191767
191616
|
});
|
|
@@ -191888,7 +191737,7 @@ var init_project2 = __esm({
|
|
|
191888
191737
|
init_inspect6();
|
|
191889
191738
|
init_list10();
|
|
191890
191739
|
init_rm10();
|
|
191891
|
-
|
|
191740
|
+
init_command29();
|
|
191892
191741
|
init_get_flags_specification();
|
|
191893
191742
|
init_project();
|
|
191894
191743
|
init_output_manager();
|
|
@@ -191919,7 +191768,7 @@ async function getProjectByDeployment({
|
|
|
191919
191768
|
let team;
|
|
191920
191769
|
try {
|
|
191921
191770
|
output_manager_default?.spinner(
|
|
191922
|
-
`Fetching deployment "${deployId}" in ${
|
|
191771
|
+
`Fetching deployment "${deployId}" in ${import_chalk123.default.bold(contextName)}\u2026`
|
|
191923
191772
|
);
|
|
191924
191773
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
191925
191774
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -191936,12 +191785,12 @@ async function getProjectByDeployment({
|
|
|
191936
191785
|
team = teamResult.value;
|
|
191937
191786
|
deployment = deploymentResult.value;
|
|
191938
191787
|
output_manager_default?.log(
|
|
191939
|
-
`Fetching deployment "${deployId}" in ${
|
|
191788
|
+
`Fetching deployment "${deployId}" in ${import_chalk123.default.bold(contextName)}\u2026`
|
|
191940
191789
|
);
|
|
191941
191790
|
if (deployment.team?.id) {
|
|
191942
191791
|
if (!team || deployment.team.id !== team.id) {
|
|
191943
191792
|
const err = new Error(
|
|
191944
|
-
team ? `Deployment doesn't belong to current team ${
|
|
191793
|
+
team ? `Deployment doesn't belong to current team ${import_chalk123.default.bold(
|
|
191945
191794
|
contextName
|
|
191946
191795
|
)}` : `Deployment belongs to a different team`
|
|
191947
191796
|
);
|
|
@@ -191950,7 +191799,7 @@ async function getProjectByDeployment({
|
|
|
191950
191799
|
}
|
|
191951
191800
|
} else if (team) {
|
|
191952
191801
|
const err = new Error(
|
|
191953
|
-
`Deployment doesn't belong to current team ${
|
|
191802
|
+
`Deployment doesn't belong to current team ${import_chalk123.default.bold(contextName)}`
|
|
191954
191803
|
);
|
|
191955
191804
|
err.code = "ERR_INVALID_TEAM";
|
|
191956
191805
|
throw err;
|
|
@@ -191971,11 +191820,11 @@ async function getProjectByDeployment({
|
|
|
191971
191820
|
output_manager_default?.stopSpinner();
|
|
191972
191821
|
}
|
|
191973
191822
|
}
|
|
191974
|
-
var
|
|
191823
|
+
var import_chalk123;
|
|
191975
191824
|
var init_get_project_by_deployment = __esm({
|
|
191976
191825
|
"src/util/projects/get-project-by-deployment.ts"() {
|
|
191977
191826
|
"use strict";
|
|
191978
|
-
|
|
191827
|
+
import_chalk123 = __toESM3(require_source(), 1);
|
|
191979
191828
|
init_get_deployment();
|
|
191980
191829
|
init_get_project_by_id_or_name();
|
|
191981
191830
|
init_get_scope();
|
|
@@ -191989,21 +191838,21 @@ var init_get_project_by_deployment = __esm({
|
|
|
191989
191838
|
// src/util/alias/render-alias-status.ts
|
|
191990
191839
|
function renderAliasStatus(status3) {
|
|
191991
191840
|
if (status3 === "completed") {
|
|
191992
|
-
return
|
|
191841
|
+
return import_chalk124.default.green(status3);
|
|
191993
191842
|
}
|
|
191994
191843
|
if (status3 === "failed") {
|
|
191995
|
-
return
|
|
191844
|
+
return import_chalk124.default.red(status3);
|
|
191996
191845
|
}
|
|
191997
191846
|
if (status3 === "skipped") {
|
|
191998
|
-
return
|
|
191847
|
+
return import_chalk124.default.gray(status3);
|
|
191999
191848
|
}
|
|
192000
|
-
return
|
|
191849
|
+
return import_chalk124.default.yellow(status3);
|
|
192001
191850
|
}
|
|
192002
|
-
var
|
|
191851
|
+
var import_chalk124;
|
|
192003
191852
|
var init_render_alias_status = __esm({
|
|
192004
191853
|
"src/util/alias/render-alias-status.ts"() {
|
|
192005
191854
|
"use strict";
|
|
192006
|
-
|
|
191855
|
+
import_chalk124 = __toESM3(require_source(), 1);
|
|
192007
191856
|
}
|
|
192008
191857
|
});
|
|
192009
191858
|
|
|
@@ -192110,7 +191959,7 @@ async function promoteStatus({
|
|
|
192110
191959
|
}
|
|
192111
191960
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
|
192112
191961
|
output_manager_default.log(
|
|
192113
|
-
`The promotion exceeded its deadline - rerun ${
|
|
191962
|
+
`The promotion exceeded its deadline - rerun ${import_chalk125.default.bold(
|
|
192114
191963
|
`${packageName} promote ${toDeploymentId}`
|
|
192115
191964
|
)} to try again`
|
|
192116
191965
|
);
|
|
@@ -192174,26 +192023,26 @@ async function renderJobSucceeded({
|
|
|
192174
192023
|
let deploymentInfo = "";
|
|
192175
192024
|
try {
|
|
192176
192025
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
192177
|
-
deploymentInfo = `${
|
|
192026
|
+
deploymentInfo = `${import_chalk125.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
192178
192027
|
} catch (err) {
|
|
192179
192028
|
output_manager_default.debug(
|
|
192180
192029
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
192181
192030
|
);
|
|
192182
|
-
deploymentInfo =
|
|
192031
|
+
deploymentInfo = import_chalk125.default.bold(toDeploymentId);
|
|
192183
192032
|
}
|
|
192184
192033
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
|
192185
192034
|
output_manager_default.log(
|
|
192186
|
-
`Success! ${
|
|
192035
|
+
`Success! ${import_chalk125.default.bold(
|
|
192187
192036
|
project.name
|
|
192188
192037
|
)} was promoted to ${deploymentInfo} ${duration}`
|
|
192189
192038
|
);
|
|
192190
192039
|
return 0;
|
|
192191
192040
|
}
|
|
192192
|
-
var
|
|
192041
|
+
var import_chalk125, import_ms26;
|
|
192193
192042
|
var init_status2 = __esm({
|
|
192194
192043
|
"src/commands/promote/status.ts"() {
|
|
192195
192044
|
"use strict";
|
|
192196
|
-
|
|
192045
|
+
import_chalk125 = __toESM3(require_source(), 1);
|
|
192197
192046
|
init_elapsed();
|
|
192198
192047
|
init_format_date();
|
|
192199
192048
|
init_get_deployment();
|
|
@@ -192250,7 +192099,7 @@ async function requestPromote({
|
|
|
192250
192099
|
}
|
|
192251
192100
|
);
|
|
192252
192101
|
output_manager_default.log(
|
|
192253
|
-
`Successfully created new deployment of ${
|
|
192102
|
+
`Successfully created new deployment of ${import_chalk126.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
|
192254
192103
|
);
|
|
192255
192104
|
return 0;
|
|
192256
192105
|
}
|
|
@@ -192271,7 +192120,7 @@ async function requestPromote({
|
|
|
192271
192120
|
}
|
|
192272
192121
|
if (timeout !== void 0 && (0, import_ms27.default)(timeout) === 0) {
|
|
192273
192122
|
output_manager_default.log(
|
|
192274
|
-
`Successfully requested promote of ${
|
|
192123
|
+
`Successfully requested promote of ${import_chalk126.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
192275
192124
|
);
|
|
192276
192125
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
|
192277
192126
|
return 0;
|
|
@@ -192284,11 +192133,11 @@ async function requestPromote({
|
|
|
192284
192133
|
timeout
|
|
192285
192134
|
});
|
|
192286
192135
|
}
|
|
192287
|
-
var
|
|
192136
|
+
var import_chalk126, import_ms27;
|
|
192288
192137
|
var init_request_promote = __esm({
|
|
192289
192138
|
"src/commands/promote/request-promote.ts"() {
|
|
192290
192139
|
"use strict";
|
|
192291
|
-
|
|
192140
|
+
import_chalk126 = __toESM3(require_source(), 1);
|
|
192292
192141
|
init_pkg_name();
|
|
192293
192142
|
init_get_project_by_deployment();
|
|
192294
192143
|
import_ms27 = __toESM3(require_ms(), 1);
|
|
@@ -192340,7 +192189,7 @@ var promote_exports = {};
|
|
|
192340
192189
|
__export3(promote_exports, {
|
|
192341
192190
|
default: () => promote_default
|
|
192342
192191
|
});
|
|
192343
|
-
var import_ms28,
|
|
192192
|
+
var import_ms28, import_error_utils32, promote_default;
|
|
192344
192193
|
var init_promote2 = __esm({
|
|
192345
192194
|
"src/commands/promote/index.ts"() {
|
|
192346
192195
|
"use strict";
|
|
@@ -192348,10 +192197,10 @@ var init_promote2 = __esm({
|
|
|
192348
192197
|
init_get_args();
|
|
192349
192198
|
init_get_project_by_cwd_or_link();
|
|
192350
192199
|
init_error2();
|
|
192351
|
-
|
|
192200
|
+
import_error_utils32 = __toESM3(require_dist2(), 1);
|
|
192352
192201
|
init_request_promote();
|
|
192353
192202
|
init_status2();
|
|
192354
|
-
|
|
192203
|
+
init_command30();
|
|
192355
192204
|
init_help();
|
|
192356
192205
|
init_get_flags_specification();
|
|
192357
192206
|
init_promote();
|
|
@@ -192418,7 +192267,7 @@ var init_promote2 = __esm({
|
|
|
192418
192267
|
yes
|
|
192419
192268
|
});
|
|
192420
192269
|
} catch (err) {
|
|
192421
|
-
if ((0,
|
|
192270
|
+
if ((0, import_error_utils32.isErrnoException)(err)) {
|
|
192422
192271
|
if (err.code === "ERR_CANCELED") {
|
|
192423
192272
|
return 0;
|
|
192424
192273
|
}
|
|
@@ -192449,7 +192298,7 @@ async function getDeploymentByIdOrURL({
|
|
|
192449
192298
|
let team;
|
|
192450
192299
|
try {
|
|
192451
192300
|
output_manager_default.spinner(
|
|
192452
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
192301
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk127.default.bold(contextName)}\u2026`
|
|
192453
192302
|
);
|
|
192454
192303
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
192455
192304
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -192466,7 +192315,7 @@ async function getDeploymentByIdOrURL({
|
|
|
192466
192315
|
team = teamResult.value;
|
|
192467
192316
|
deployment = deploymentResult.value;
|
|
192468
192317
|
output_manager_default.log(
|
|
192469
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
192318
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk127.default.bold(contextName)}\u2026`
|
|
192470
192319
|
);
|
|
192471
192320
|
} finally {
|
|
192472
192321
|
output_manager_default.stopSpinner();
|
|
@@ -192474,7 +192323,7 @@ async function getDeploymentByIdOrURL({
|
|
|
192474
192323
|
if (deployment.team?.id) {
|
|
192475
192324
|
if (!team || deployment.team.id !== team.id) {
|
|
192476
192325
|
const err = new Error(
|
|
192477
|
-
team ? `Deployment doesn't belong to current team ${
|
|
192326
|
+
team ? `Deployment doesn't belong to current team ${import_chalk127.default.bold(
|
|
192478
192327
|
contextName
|
|
192479
192328
|
)}` : `Deployment belongs to a different team`
|
|
192480
192329
|
);
|
|
@@ -192483,18 +192332,18 @@ async function getDeploymentByIdOrURL({
|
|
|
192483
192332
|
}
|
|
192484
192333
|
} else if (team) {
|
|
192485
192334
|
const err = new Error(
|
|
192486
|
-
`Deployment doesn't belong to current team ${
|
|
192335
|
+
`Deployment doesn't belong to current team ${import_chalk127.default.bold(contextName)}`
|
|
192487
192336
|
);
|
|
192488
192337
|
err.code = "ERR_INVALID_TEAM";
|
|
192489
192338
|
throw err;
|
|
192490
192339
|
}
|
|
192491
192340
|
return deployment;
|
|
192492
192341
|
}
|
|
192493
|
-
var
|
|
192342
|
+
var import_chalk127;
|
|
192494
192343
|
var init_get_deployment_by_id_or_url = __esm({
|
|
192495
192344
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
|
192496
192345
|
"use strict";
|
|
192497
|
-
|
|
192346
|
+
import_chalk127 = __toESM3(require_source(), 1);
|
|
192498
192347
|
init_get_deployment();
|
|
192499
192348
|
init_get_team_by_id();
|
|
192500
192349
|
init_is_valid_name();
|
|
@@ -192633,14 +192482,14 @@ async function redeploy(client2) {
|
|
|
192633
192482
|
}
|
|
192634
192483
|
output_manager_default.print(
|
|
192635
192484
|
`${prependEmoji(
|
|
192636
|
-
`Inspect: ${
|
|
192485
|
+
`Inspect: ${import_chalk128.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
|
192637
192486
|
emoji("inspect")
|
|
192638
192487
|
)}
|
|
192639
192488
|
`
|
|
192640
192489
|
);
|
|
192641
192490
|
output_manager_default.print(
|
|
192642
192491
|
prependEmoji(
|
|
192643
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
|
192492
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk128.default.bold(
|
|
192644
192493
|
previewUrl
|
|
192645
192494
|
)} ${deployStamp()}`,
|
|
192646
192495
|
emoji("success")
|
|
@@ -192697,7 +192546,7 @@ async function redeploy(client2) {
|
|
|
192697
192546
|
const prodUrl = `https://${primaryDomain}`;
|
|
192698
192547
|
output_manager_default.print(
|
|
192699
192548
|
prependEmoji(
|
|
192700
|
-
`Aliased: ${
|
|
192549
|
+
`Aliased: ${import_chalk128.default.bold(prodUrl)} ${deployStamp()}`,
|
|
192701
192550
|
emoji("link")
|
|
192702
192551
|
) + "\n"
|
|
192703
192552
|
);
|
|
@@ -192729,19 +192578,19 @@ async function redeploy(client2) {
|
|
|
192729
192578
|
return printDeploymentStatus(deployment, deployStamp, noWait, false);
|
|
192730
192579
|
} catch (err) {
|
|
192731
192580
|
output_manager_default.prettyError(err);
|
|
192732
|
-
if ((0,
|
|
192581
|
+
if ((0, import_error_utils33.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
|
192733
192582
|
output_manager_default.error(
|
|
192734
|
-
`Use ${
|
|
192583
|
+
`Use ${import_chalk128.default.bold("vc switch")} to change your current team`
|
|
192735
192584
|
);
|
|
192736
192585
|
}
|
|
192737
192586
|
return 1;
|
|
192738
192587
|
}
|
|
192739
192588
|
}
|
|
192740
|
-
var
|
|
192589
|
+
var import_chalk128, import_client13, import_error_utils33;
|
|
192741
192590
|
var init_redeploy2 = __esm({
|
|
192742
192591
|
"src/commands/redeploy/index.ts"() {
|
|
192743
192592
|
"use strict";
|
|
192744
|
-
|
|
192593
|
+
import_chalk128 = __toESM3(require_source(), 1);
|
|
192745
192594
|
import_client13 = __toESM3(require_dist7(), 1);
|
|
192746
192595
|
init_emoji();
|
|
192747
192596
|
init_get_args();
|
|
@@ -192749,13 +192598,13 @@ var init_redeploy2 = __esm({
|
|
|
192749
192598
|
init_get_deployment_by_id_or_url();
|
|
192750
192599
|
init_get_scope();
|
|
192751
192600
|
init_error2();
|
|
192752
|
-
|
|
192601
|
+
import_error_utils33 = __toESM3(require_dist2(), 1);
|
|
192753
192602
|
init_util();
|
|
192754
192603
|
init_print_deployment_status();
|
|
192755
192604
|
init_stamp();
|
|
192756
192605
|
init_ua();
|
|
192757
192606
|
init_help();
|
|
192758
|
-
|
|
192607
|
+
init_command32();
|
|
192759
192608
|
init_get_flags_specification();
|
|
192760
192609
|
init_output_manager();
|
|
192761
192610
|
init_redeploy();
|
|
@@ -192901,7 +192750,7 @@ async function list7(client2, argv) {
|
|
|
192901
192750
|
const stagingVersion = versions.find((v) => v.isStaging);
|
|
192902
192751
|
if (!stagingVersion) {
|
|
192903
192752
|
output_manager_default.error(
|
|
192904
|
-
`No staging version found for ${
|
|
192753
|
+
`No staging version found for ${import_chalk129.default.bold(project.name)}. Run ${import_chalk129.default.cyan(
|
|
192905
192754
|
"vercel redirects list-versions"
|
|
192906
192755
|
)} to see available versions.`
|
|
192907
192756
|
);
|
|
@@ -192925,7 +192774,7 @@ async function list7(client2, argv) {
|
|
|
192925
192774
|
);
|
|
192926
192775
|
if (!version2) {
|
|
192927
192776
|
output_manager_default.error(
|
|
192928
|
-
`Version "${versionIdFlag}" not found. Run ${
|
|
192777
|
+
`Version "${versionIdFlag}" not found. Run ${import_chalk129.default.cyan(
|
|
192929
192778
|
"vercel redirects list-versions"
|
|
192930
192779
|
)} to see available versions.`
|
|
192931
192780
|
);
|
|
@@ -192935,7 +192784,7 @@ async function list7(client2, argv) {
|
|
|
192935
192784
|
versionName = version2.name || version2.id;
|
|
192936
192785
|
}
|
|
192937
192786
|
const lsStamp = stamp_default();
|
|
192938
|
-
let spinnerMessage = `Fetching redirects for ${
|
|
192787
|
+
let spinnerMessage = `Fetching redirects for ${import_chalk129.default.bold(project.name)}`;
|
|
192939
192788
|
if (versionName) {
|
|
192940
192789
|
spinnerMessage += ` (version: ${versionName})`;
|
|
192941
192790
|
}
|
|
@@ -192956,46 +192805,46 @@ async function list7(client2, argv) {
|
|
|
192956
192805
|
const removed = redirects.filter((r) => r.action === "-");
|
|
192957
192806
|
const unchanged = redirects.filter((r) => !r.action);
|
|
192958
192807
|
output_manager_default.log(
|
|
192959
|
-
`Changes in staging version ${
|
|
192808
|
+
`Changes in staging version ${import_chalk129.default.bold(versionName || "")} ${import_chalk129.default.gray(lsStamp())}`
|
|
192960
192809
|
);
|
|
192961
192810
|
if (added.length === 0 && removed.length === 0) {
|
|
192962
192811
|
output_manager_default.log("\n No changes from production version\n");
|
|
192963
192812
|
} else {
|
|
192964
192813
|
if (added.length > 0) {
|
|
192965
192814
|
output_manager_default.print(`
|
|
192966
|
-
${
|
|
192815
|
+
${import_chalk129.default.bold(import_chalk129.default.green(`Added (${added.length}):`))}
|
|
192967
192816
|
`);
|
|
192968
192817
|
output_manager_default.print(formatRedirectsTable(added, "+"));
|
|
192969
192818
|
}
|
|
192970
192819
|
if (removed.length > 0) {
|
|
192971
192820
|
output_manager_default.print(`
|
|
192972
|
-
${
|
|
192821
|
+
${import_chalk129.default.bold(import_chalk129.default.red(`Removed (${removed.length}):`))}
|
|
192973
192822
|
`);
|
|
192974
192823
|
output_manager_default.print(formatRedirectsTable(removed, "-"));
|
|
192975
192824
|
}
|
|
192976
192825
|
if (unchanged.length > 0) {
|
|
192977
192826
|
output_manager_default.print(
|
|
192978
192827
|
`
|
|
192979
|
-
${
|
|
192828
|
+
${import_chalk129.default.gray(`${unchanged.length} redirect${unchanged.length === 1 ? "" : "s"} unchanged`)}
|
|
192980
192829
|
`
|
|
192981
192830
|
);
|
|
192982
192831
|
}
|
|
192983
192832
|
output_manager_default.print("\n");
|
|
192984
192833
|
}
|
|
192985
192834
|
} else {
|
|
192986
|
-
let resultMessage = `${(0, import_pluralize13.default)("Redirect", redirects.length, true)} found for ${
|
|
192835
|
+
let resultMessage = `${(0, import_pluralize13.default)("Redirect", redirects.length, true)} found for ${import_chalk129.default.bold(
|
|
192987
192836
|
project.name
|
|
192988
192837
|
)}`;
|
|
192989
192838
|
if (versionName) {
|
|
192990
|
-
resultMessage += ` ${
|
|
192839
|
+
resultMessage += ` ${import_chalk129.default.gray(`(version: ${versionName})`)}`;
|
|
192991
192840
|
}
|
|
192992
192841
|
if (search) {
|
|
192993
192842
|
resultMessage += ` matching "${search}"`;
|
|
192994
192843
|
}
|
|
192995
192844
|
if (pagination) {
|
|
192996
|
-
resultMessage += ` ${
|
|
192845
|
+
resultMessage += ` ${import_chalk129.default.gray(`(page ${pagination.page} of ${pagination.numPages})`)}`;
|
|
192997
192846
|
}
|
|
192998
|
-
resultMessage += ` ${
|
|
192847
|
+
resultMessage += ` ${import_chalk129.default.gray(lsStamp())}`;
|
|
192999
192848
|
output_manager_default.log(resultMessage);
|
|
193000
192849
|
if (redirects.length > 0) {
|
|
193001
192850
|
output_manager_default.print(formatRedirectsTable(redirects));
|
|
@@ -193019,7 +192868,7 @@ function formatRedirectsTable(redirects, actionSymbol) {
|
|
|
193019
192868
|
const rows = redirects.map((redirect2) => {
|
|
193020
192869
|
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
193021
192870
|
const prefix = actionSymbol || "";
|
|
193022
|
-
const colorFn = actionSymbol === "+" ?
|
|
192871
|
+
const colorFn = actionSymbol === "+" ? import_chalk129.default.green : actionSymbol === "-" ? import_chalk129.default.red : (s) => s;
|
|
193023
192872
|
return [
|
|
193024
192873
|
colorFn(`${prefix} ${redirect2.source}`),
|
|
193025
192874
|
colorFn(`${redirect2.destination}`),
|
|
@@ -193032,14 +192881,14 @@ function formatRedirectsTable(redirects, actionSymbol) {
|
|
|
193032
192881
|
[{ rows }]
|
|
193033
192882
|
);
|
|
193034
192883
|
}
|
|
193035
|
-
var
|
|
192884
|
+
var import_chalk129, import_pluralize13;
|
|
193036
192885
|
var init_list11 = __esm({
|
|
193037
192886
|
"src/commands/redirects/list.ts"() {
|
|
193038
192887
|
"use strict";
|
|
193039
|
-
|
|
192888
|
+
import_chalk129 = __toESM3(require_source(), 1);
|
|
193040
192889
|
import_pluralize13 = __toESM3(require_pluralize(), 1);
|
|
193041
192890
|
init_output_manager();
|
|
193042
|
-
|
|
192891
|
+
init_command33();
|
|
193043
192892
|
init_shared2();
|
|
193044
192893
|
init_get_redirects();
|
|
193045
192894
|
init_get_redirect_versions();
|
|
@@ -193060,13 +192909,13 @@ async function listVersions(client2, argv) {
|
|
|
193060
192909
|
const { project, org } = link4;
|
|
193061
192910
|
const teamId = org.type === "team" ? org.id : void 0;
|
|
193062
192911
|
const lsStamp = stamp_default();
|
|
193063
|
-
output_manager_default.spinner(`Fetching redirect versions for ${
|
|
192912
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk130.default.bold(project.name)}`);
|
|
193064
192913
|
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
193065
192914
|
const sortedVersions = sortVersions(versions).slice(0, 20);
|
|
193066
192915
|
output_manager_default.log(
|
|
193067
|
-
`${(0, import_pluralize14.default)("Version", sortedVersions.length, true)} found for ${
|
|
192916
|
+
`${(0, import_pluralize14.default)("Version", sortedVersions.length, true)} found for ${import_chalk130.default.bold(
|
|
193068
192917
|
project.name
|
|
193069
|
-
)} ${
|
|
192918
|
+
)} ${import_chalk130.default.gray(lsStamp())}`
|
|
193070
192919
|
);
|
|
193071
192920
|
if (sortedVersions.length > 0) {
|
|
193072
192921
|
output_manager_default.print(formatVersionsTable(sortedVersions));
|
|
@@ -193093,21 +192942,21 @@ function formatVersionsTable(versions) {
|
|
|
193093
192942
|
const age = (0, import_ms29.default)(now - version2.lastModified);
|
|
193094
192943
|
let status3 = "";
|
|
193095
192944
|
if (version2.isStaging) {
|
|
193096
|
-
status3 =
|
|
192945
|
+
status3 = import_chalk130.default.yellow("Staging");
|
|
193097
192946
|
} else if (version2.isLive) {
|
|
193098
|
-
status3 =
|
|
192947
|
+
status3 = import_chalk130.default.green("Live");
|
|
193099
192948
|
} else {
|
|
193100
|
-
status3 =
|
|
192949
|
+
status3 = import_chalk130.default.gray("Previous");
|
|
193101
192950
|
}
|
|
193102
|
-
const name = version2.name ||
|
|
193103
|
-
const redirectCountStr = version2.redirectCount !== void 0 && version2.redirectCount !== null ? version2.redirectCount.toString() :
|
|
192951
|
+
const name = version2.name || import_chalk130.default.gray("(unnamed)");
|
|
192952
|
+
const redirectCountStr = version2.redirectCount !== void 0 && version2.redirectCount !== null ? version2.redirectCount.toString() : import_chalk130.default.gray("-");
|
|
193104
192953
|
return [
|
|
193105
192954
|
status3,
|
|
193106
192955
|
name,
|
|
193107
192956
|
version2.id,
|
|
193108
192957
|
redirectCountStr,
|
|
193109
|
-
version2.createdBy ||
|
|
193110
|
-
|
|
192958
|
+
version2.createdBy || import_chalk130.default.gray("(unknown)"),
|
|
192959
|
+
import_chalk130.default.gray(age + " ago")
|
|
193111
192960
|
];
|
|
193112
192961
|
});
|
|
193113
192962
|
return formatTable(
|
|
@@ -193116,15 +192965,15 @@ function formatVersionsTable(versions) {
|
|
|
193116
192965
|
[{ rows }]
|
|
193117
192966
|
);
|
|
193118
192967
|
}
|
|
193119
|
-
var
|
|
192968
|
+
var import_chalk130, import_ms29, import_pluralize14;
|
|
193120
192969
|
var init_list_versions = __esm({
|
|
193121
192970
|
"src/commands/redirects/list-versions.ts"() {
|
|
193122
192971
|
"use strict";
|
|
193123
|
-
|
|
192972
|
+
import_chalk130 = __toESM3(require_source(), 1);
|
|
193124
192973
|
import_ms29 = __toESM3(require_ms(), 1);
|
|
193125
192974
|
import_pluralize14 = __toESM3(require_pluralize(), 1);
|
|
193126
192975
|
init_output_manager();
|
|
193127
|
-
|
|
192976
|
+
init_command33();
|
|
193128
192977
|
init_shared2();
|
|
193129
192978
|
init_get_redirect_versions();
|
|
193130
192979
|
init_stamp();
|
|
@@ -193360,11 +193209,11 @@ async function add7(client2, argv) {
|
|
|
193360
193209
|
teamId,
|
|
193361
193210
|
versionName
|
|
193362
193211
|
);
|
|
193363
|
-
output_manager_default.log(`${
|
|
193212
|
+
output_manager_default.log(`${import_chalk131.default.cyan("\u2713")} Redirect added ${import_chalk131.default.gray(addStamp())}`);
|
|
193364
193213
|
output_manager_default.print(`
|
|
193365
|
-
${
|
|
193214
|
+
${import_chalk131.default.bold("Redirect:")}
|
|
193366
193215
|
`);
|
|
193367
|
-
output_manager_default.print(` ${
|
|
193216
|
+
output_manager_default.print(` ${import_chalk131.default.cyan(source)} \u2192 ${import_chalk131.default.cyan(destination)}
|
|
193368
193217
|
`);
|
|
193369
193218
|
output_manager_default.print(` Status: ${statusCode}
|
|
193370
193219
|
`);
|
|
@@ -193378,12 +193227,12 @@ async function add7(client2, argv) {
|
|
|
193378
193227
|
const testUrl = source.startsWith("/") ? `https://${alias2}${source}` : `https://${alias2}`;
|
|
193379
193228
|
output_manager_default.print(
|
|
193380
193229
|
`
|
|
193381
|
-
${
|
|
193230
|
+
${import_chalk131.default.bold("Test your changes:")} ${import_chalk131.default.cyan(testUrl)}
|
|
193382
193231
|
`
|
|
193383
193232
|
);
|
|
193384
193233
|
}
|
|
193385
193234
|
const newVersionName = version2.name || version2.id;
|
|
193386
|
-
output_manager_default.print(` ${
|
|
193235
|
+
output_manager_default.print(` ${import_chalk131.default.bold("New staging version:")} ${newVersionName}
|
|
193387
193236
|
|
|
193388
193237
|
`);
|
|
193389
193238
|
if (!existingStagingVersion) {
|
|
@@ -193402,23 +193251,23 @@ async function add7(client2, argv) {
|
|
|
193402
193251
|
teamId
|
|
193403
193252
|
);
|
|
193404
193253
|
output_manager_default.log(
|
|
193405
|
-
`${
|
|
193254
|
+
`${import_chalk131.default.cyan("\u2713")} Version promoted to production ${import_chalk131.default.gray(promoteStamp())}`
|
|
193406
193255
|
);
|
|
193407
193256
|
}
|
|
193408
193257
|
} else {
|
|
193409
193258
|
output_manager_default.warn(
|
|
193410
|
-
`There are other staged changes. Please review all changes with ${
|
|
193259
|
+
`There are other staged changes. Please review all changes with ${import_chalk131.default.cyan("vercel redirects list --staging")} before promoting to production.`
|
|
193411
193260
|
);
|
|
193412
193261
|
}
|
|
193413
193262
|
return 0;
|
|
193414
193263
|
}
|
|
193415
|
-
var
|
|
193264
|
+
var import_chalk131;
|
|
193416
193265
|
var init_add13 = __esm({
|
|
193417
193266
|
"src/commands/redirects/add.ts"() {
|
|
193418
193267
|
"use strict";
|
|
193419
|
-
|
|
193268
|
+
import_chalk131 = __toESM3(require_source(), 1);
|
|
193420
193269
|
init_output_manager();
|
|
193421
|
-
|
|
193270
|
+
init_command33();
|
|
193422
193271
|
init_shared2();
|
|
193423
193272
|
init_put_redirects();
|
|
193424
193273
|
init_update_redirect_version();
|
|
@@ -193677,7 +193526,7 @@ async function upload(client2, argv) {
|
|
|
193677
193526
|
});
|
|
193678
193527
|
}
|
|
193679
193528
|
output_manager_default.log(
|
|
193680
|
-
`${
|
|
193529
|
+
`${import_chalk132.default.cyan("\u2713")} Redirects uploaded ${import_chalk132.default.gray(uploadStamp())}`
|
|
193681
193530
|
);
|
|
193682
193531
|
output_manager_default.spinner("Fetching diff");
|
|
193683
193532
|
const { redirects } = await getRedirects(client2, project.id, {
|
|
@@ -193687,7 +193536,7 @@ async function upload(client2, argv) {
|
|
|
193687
193536
|
});
|
|
193688
193537
|
const redirectCount = redirects.length;
|
|
193689
193538
|
output_manager_default.print(`
|
|
193690
|
-
${
|
|
193539
|
+
${import_chalk132.default.bold("Summary:")}
|
|
193691
193540
|
`);
|
|
193692
193541
|
output_manager_default.print(
|
|
193693
193542
|
` Uploaded ${redirectCount} redirect${redirectCount === 1 ? "" : "s"}
|
|
@@ -193698,22 +193547,22 @@ async function upload(client2, argv) {
|
|
|
193698
193547
|
const deleted = redirects.filter((r) => r.action === "-");
|
|
193699
193548
|
const edited = redirects.filter((r) => r.action === "~");
|
|
193700
193549
|
output_manager_default.print(`
|
|
193701
|
-
${
|
|
193550
|
+
${import_chalk132.default.bold("Changes:")}
|
|
193702
193551
|
`);
|
|
193703
193552
|
if (added.length > 0) {
|
|
193704
|
-
output_manager_default.print(` ${
|
|
193553
|
+
output_manager_default.print(` ${import_chalk132.default.green(`Added: ${added.length}`)}
|
|
193705
193554
|
`);
|
|
193706
193555
|
}
|
|
193707
193556
|
if (deleted.length > 0) {
|
|
193708
|
-
output_manager_default.print(` ${
|
|
193557
|
+
output_manager_default.print(` ${import_chalk132.default.red(`Deleted: ${deleted.length}`)}
|
|
193709
193558
|
`);
|
|
193710
193559
|
}
|
|
193711
193560
|
if (edited.length > 0) {
|
|
193712
|
-
output_manager_default.print(` ${
|
|
193561
|
+
output_manager_default.print(` ${import_chalk132.default.yellow(`Modified: ${edited.length}`)}
|
|
193713
193562
|
`);
|
|
193714
193563
|
}
|
|
193715
193564
|
output_manager_default.print(`
|
|
193716
|
-
${
|
|
193565
|
+
${import_chalk132.default.bold("Redirect changes:")}
|
|
193717
193566
|
`);
|
|
193718
193567
|
const displayRedirects = redirects.slice(0, 100);
|
|
193719
193568
|
const rows = displayRedirects.map((redirect2) => {
|
|
@@ -193723,15 +193572,15 @@ async function upload(client2, argv) {
|
|
|
193723
193572
|
let actionSymbol;
|
|
193724
193573
|
switch (action) {
|
|
193725
193574
|
case "+":
|
|
193726
|
-
colorFn =
|
|
193575
|
+
colorFn = import_chalk132.default.green;
|
|
193727
193576
|
actionSymbol = "+";
|
|
193728
193577
|
break;
|
|
193729
193578
|
case "-":
|
|
193730
|
-
colorFn =
|
|
193579
|
+
colorFn = import_chalk132.default.red;
|
|
193731
193580
|
actionSymbol = "-";
|
|
193732
193581
|
break;
|
|
193733
193582
|
case "~":
|
|
193734
|
-
colorFn =
|
|
193583
|
+
colorFn = import_chalk132.default.yellow;
|
|
193735
193584
|
actionSymbol = "~";
|
|
193736
193585
|
break;
|
|
193737
193586
|
default:
|
|
@@ -193754,7 +193603,7 @@ async function upload(client2, argv) {
|
|
|
193754
193603
|
if (redirectCount > 100) {
|
|
193755
193604
|
output_manager_default.print(
|
|
193756
193605
|
`
|
|
193757
|
-
${
|
|
193606
|
+
${import_chalk132.default.gray(`... and ${redirectCount - 100} more redirect${redirectCount - 100 === 1 ? "" : "s"}`)}
|
|
193758
193607
|
`
|
|
193759
193608
|
);
|
|
193760
193609
|
}
|
|
@@ -193763,19 +193612,19 @@ async function upload(client2, argv) {
|
|
|
193763
193612
|
const testUrl = `https://${result.alias}`;
|
|
193764
193613
|
output_manager_default.print(
|
|
193765
193614
|
`
|
|
193766
|
-
${
|
|
193615
|
+
${import_chalk132.default.bold("Test your changes:")} ${import_chalk132.default.cyan(testUrl)}
|
|
193767
193616
|
`
|
|
193768
193617
|
);
|
|
193769
193618
|
}
|
|
193770
193619
|
const newVersionName = result.version.name || result.version.id;
|
|
193771
193620
|
output_manager_default.print(
|
|
193772
|
-
` ${
|
|
193621
|
+
` ${import_chalk132.default.bold("New staging version:")} ${newVersionName}
|
|
193773
193622
|
|
|
193774
193623
|
`
|
|
193775
193624
|
);
|
|
193776
193625
|
if (existingStagingVersion) {
|
|
193777
193626
|
output_manager_default.warn(
|
|
193778
|
-
`There are other staged changes. Please review all changes with ${
|
|
193627
|
+
`There are other staged changes. Please review all changes with ${import_chalk132.default.cyan("vercel redirects list --staging")} before promoting to production.`
|
|
193779
193628
|
);
|
|
193780
193629
|
} else if (!skipPrompts) {
|
|
193781
193630
|
const shouldPromote = await client2.input.confirm(
|
|
@@ -193793,7 +193642,7 @@ async function upload(client2, argv) {
|
|
|
193793
193642
|
teamId
|
|
193794
193643
|
);
|
|
193795
193644
|
output_manager_default.log(
|
|
193796
|
-
`${
|
|
193645
|
+
`${import_chalk132.default.cyan("\u2713")} Version promoted to production ${import_chalk132.default.gray(promoteStamp())}`
|
|
193797
193646
|
);
|
|
193798
193647
|
}
|
|
193799
193648
|
}
|
|
@@ -193803,13 +193652,13 @@ async function upload(client2, argv) {
|
|
|
193803
193652
|
return 1;
|
|
193804
193653
|
}
|
|
193805
193654
|
}
|
|
193806
|
-
var
|
|
193655
|
+
var import_chalk132;
|
|
193807
193656
|
var init_upload = __esm({
|
|
193808
193657
|
"src/commands/redirects/upload.ts"() {
|
|
193809
193658
|
"use strict";
|
|
193810
|
-
|
|
193659
|
+
import_chalk132 = __toESM3(require_source(), 1);
|
|
193811
193660
|
init_output_manager();
|
|
193812
|
-
|
|
193661
|
+
init_command33();
|
|
193813
193662
|
init_shared2();
|
|
193814
193663
|
init_stamp();
|
|
193815
193664
|
init_get_redirect_versions();
|
|
@@ -193867,17 +193716,17 @@ async function remove5(client2, argv) {
|
|
|
193867
193716
|
const redirectToRemove = redirects.find((r) => r.source === source);
|
|
193868
193717
|
if (!redirectToRemove) {
|
|
193869
193718
|
output_manager_default.error(
|
|
193870
|
-
`Redirect with source "${source}" not found. Run ${
|
|
193719
|
+
`Redirect with source "${source}" not found. Run ${import_chalk133.default.cyan(
|
|
193871
193720
|
"vercel redirects list"
|
|
193872
193721
|
)} to see available redirects.`
|
|
193873
193722
|
);
|
|
193874
193723
|
return 1;
|
|
193875
193724
|
}
|
|
193876
193725
|
output_manager_default.print(`
|
|
193877
|
-
${
|
|
193726
|
+
${import_chalk133.default.bold("Removing redirect:")}
|
|
193878
193727
|
`);
|
|
193879
193728
|
output_manager_default.print(
|
|
193880
|
-
` ${
|
|
193729
|
+
` ${import_chalk133.default.cyan(redirectToRemove.source)} \u2192 ${import_chalk133.default.cyan(redirectToRemove.destination)}
|
|
193881
193730
|
`
|
|
193882
193731
|
);
|
|
193883
193732
|
const status3 = redirectToRemove.statusCode || (redirectToRemove.permanent ? 308 : 307);
|
|
@@ -193895,7 +193744,7 @@ async function remove5(client2, argv) {
|
|
|
193895
193744
|
return 0;
|
|
193896
193745
|
}
|
|
193897
193746
|
const removeStamp = stamp_default();
|
|
193898
|
-
output_manager_default.spinner(`Removing redirect for ${
|
|
193747
|
+
output_manager_default.spinner(`Removing redirect for ${import_chalk133.default.bold(source)}`);
|
|
193899
193748
|
const { alias: alias2, version: version2 } = await deleteRedirects(
|
|
193900
193749
|
client2,
|
|
193901
193750
|
project.id,
|
|
@@ -193903,13 +193752,13 @@ async function remove5(client2, argv) {
|
|
|
193903
193752
|
teamId
|
|
193904
193753
|
);
|
|
193905
193754
|
output_manager_default.log(
|
|
193906
|
-
`${
|
|
193755
|
+
`${import_chalk133.default.cyan("\u2713")} Redirect removed ${import_chalk133.default.gray(removeStamp())}`
|
|
193907
193756
|
);
|
|
193908
193757
|
if (alias2) {
|
|
193909
193758
|
const testUrl = source.startsWith("/") ? `https://${alias2}${source}` : `https://${alias2}`;
|
|
193910
193759
|
output_manager_default.print(
|
|
193911
193760
|
`
|
|
193912
|
-
${
|
|
193761
|
+
${import_chalk133.default.bold("Test your changes:")} ${import_chalk133.default.cyan(testUrl)}
|
|
193913
193762
|
`
|
|
193914
193763
|
);
|
|
193915
193764
|
output_manager_default.print(
|
|
@@ -193918,7 +193767,7 @@ async function remove5(client2, argv) {
|
|
|
193918
193767
|
);
|
|
193919
193768
|
}
|
|
193920
193769
|
const versionName = version2.name || version2.id;
|
|
193921
|
-
output_manager_default.print(` ${
|
|
193770
|
+
output_manager_default.print(` ${import_chalk133.default.bold("New staging version:")} ${versionName}
|
|
193922
193771
|
|
|
193923
193772
|
`);
|
|
193924
193773
|
if (!existingStagingVersion) {
|
|
@@ -193937,23 +193786,23 @@ async function remove5(client2, argv) {
|
|
|
193937
193786
|
teamId
|
|
193938
193787
|
);
|
|
193939
193788
|
output_manager_default.log(
|
|
193940
|
-
`${
|
|
193789
|
+
`${import_chalk133.default.cyan("\u2713")} Version promoted to production ${import_chalk133.default.gray(promoteStamp())}`
|
|
193941
193790
|
);
|
|
193942
193791
|
}
|
|
193943
193792
|
} else {
|
|
193944
193793
|
output_manager_default.warn(
|
|
193945
|
-
`There are other staged changes. Review them with ${
|
|
193794
|
+
`There are other staged changes. Review them with ${import_chalk133.default.cyan("vercel redirects list --staging")} before promoting to production.`
|
|
193946
193795
|
);
|
|
193947
193796
|
}
|
|
193948
193797
|
return 0;
|
|
193949
193798
|
}
|
|
193950
|
-
var
|
|
193799
|
+
var import_chalk133;
|
|
193951
193800
|
var init_remove5 = __esm({
|
|
193952
193801
|
"src/commands/redirects/remove.ts"() {
|
|
193953
193802
|
"use strict";
|
|
193954
|
-
|
|
193803
|
+
import_chalk133 = __toESM3(require_source(), 1);
|
|
193955
193804
|
init_output_manager();
|
|
193956
|
-
|
|
193805
|
+
init_command33();
|
|
193957
193806
|
init_shared2();
|
|
193958
193807
|
init_delete_redirects();
|
|
193959
193808
|
init_get_redirects();
|
|
@@ -193979,14 +193828,14 @@ async function promote(client2, argv) {
|
|
|
193979
193828
|
const { project, org } = link4;
|
|
193980
193829
|
const teamId = org.type === "team" ? org.id : void 0;
|
|
193981
193830
|
const [versionIdentifier] = parsed.args;
|
|
193982
|
-
output_manager_default.spinner(`Fetching redirect versions for ${
|
|
193831
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk134.default.bold(project.name)}`);
|
|
193983
193832
|
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
193984
193833
|
const version2 = versions.find(
|
|
193985
193834
|
(v) => v.id === versionIdentifier || v.name === versionIdentifier
|
|
193986
193835
|
);
|
|
193987
193836
|
if (!version2) {
|
|
193988
193837
|
output_manager_default.error(
|
|
193989
|
-
`Version with ID or name "${versionIdentifier}" not found. Run ${
|
|
193838
|
+
`Version with ID or name "${versionIdentifier}" not found. Run ${import_chalk134.default.cyan(
|
|
193990
193839
|
"vercel redirects list-versions"
|
|
193991
193840
|
)} to see available versions.`
|
|
193992
193841
|
);
|
|
@@ -193994,16 +193843,16 @@ async function promote(client2, argv) {
|
|
|
193994
193843
|
}
|
|
193995
193844
|
if (version2.isLive) {
|
|
193996
193845
|
output_manager_default.error(
|
|
193997
|
-
`Version ${
|
|
193846
|
+
`Version ${import_chalk134.default.bold(version2.name || version2.id)} is already live.`
|
|
193998
193847
|
);
|
|
193999
193848
|
return 1;
|
|
194000
193849
|
}
|
|
194001
193850
|
if (!version2.isStaging) {
|
|
194002
193851
|
output_manager_default.error(
|
|
194003
|
-
`Version ${
|
|
193852
|
+
`Version ${import_chalk134.default.bold(
|
|
194004
193853
|
version2.name || version2.id
|
|
194005
193854
|
)} is not staged. Only staging versions can be promoted to production.
|
|
194006
|
-
Run ${
|
|
193855
|
+
Run ${import_chalk134.default.cyan(
|
|
194007
193856
|
"vercel redirects list-versions"
|
|
194008
193857
|
)} to see which version is currently staged.`
|
|
194009
193858
|
);
|
|
@@ -194021,13 +193870,13 @@ Run ${import_chalk135.default.cyan(
|
|
|
194021
193870
|
);
|
|
194022
193871
|
if (changedRedirects.length > 0) {
|
|
194023
193872
|
output_manager_default.print(`
|
|
194024
|
-
${
|
|
193873
|
+
${import_chalk134.default.bold("Changes to be promoted:")}
|
|
194025
193874
|
|
|
194026
193875
|
`);
|
|
194027
193876
|
const displayRedirects = changedRedirects.slice(0, 20);
|
|
194028
193877
|
for (const redirect2 of displayRedirects) {
|
|
194029
193878
|
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
194030
|
-
const symbol = redirect2.action === "+" ?
|
|
193879
|
+
const symbol = redirect2.action === "+" ? import_chalk134.default.green("+") : import_chalk134.default.red("-");
|
|
194031
193880
|
output_manager_default.print(
|
|
194032
193881
|
` ${symbol} ${redirect2.source} \u2192 ${redirect2.destination} (${status3})
|
|
194033
193882
|
`
|
|
@@ -194035,7 +193884,7 @@ ${import_chalk135.default.bold("Changes to be promoted:")}
|
|
|
194035
193884
|
}
|
|
194036
193885
|
if (changedRedirects.length > 20) {
|
|
194037
193886
|
output_manager_default.print(
|
|
194038
|
-
|
|
193887
|
+
import_chalk134.default.gray(`
|
|
194039
193888
|
... and ${changedRedirects.length - 20} more changes
|
|
194040
193889
|
`)
|
|
194041
193890
|
);
|
|
@@ -194044,7 +193893,7 @@ ${import_chalk135.default.bold("Changes to be promoted:")}
|
|
|
194044
193893
|
} else {
|
|
194045
193894
|
output_manager_default.print(
|
|
194046
193895
|
`
|
|
194047
|
-
${
|
|
193896
|
+
${import_chalk134.default.gray("No changes detected from current production version.")}
|
|
194048
193897
|
|
|
194049
193898
|
`
|
|
194050
193899
|
);
|
|
@@ -194052,15 +193901,15 @@ ${import_chalk135.default.gray("No changes detected from current production vers
|
|
|
194052
193901
|
const confirmed = await confirmAction(
|
|
194053
193902
|
client2,
|
|
194054
193903
|
parsed.flags["--yes"],
|
|
194055
|
-
`Promote version ${
|
|
194056
|
-
`This will make it the live version for ${
|
|
193904
|
+
`Promote version ${import_chalk134.default.bold(versionName)} to production?`,
|
|
193905
|
+
`This will make it the live version for ${import_chalk134.default.bold(project.name)}.`
|
|
194057
193906
|
);
|
|
194058
193907
|
if (!confirmed) {
|
|
194059
193908
|
output_manager_default.log("Canceled");
|
|
194060
193909
|
return 0;
|
|
194061
193910
|
}
|
|
194062
193911
|
const updateStamp = stamp_default();
|
|
194063
|
-
output_manager_default.spinner(`Promoting version ${
|
|
193912
|
+
output_manager_default.spinner(`Promoting version ${import_chalk134.default.bold(versionName)} to production`);
|
|
194064
193913
|
const { version: newVersion } = await updateRedirectVersion(
|
|
194065
193914
|
client2,
|
|
194066
193915
|
project.id,
|
|
@@ -194069,19 +193918,19 @@ ${import_chalk135.default.gray("No changes detected from current production vers
|
|
|
194069
193918
|
teamId
|
|
194070
193919
|
);
|
|
194071
193920
|
output_manager_default.log(
|
|
194072
|
-
`${
|
|
193921
|
+
`${import_chalk134.default.cyan("\u2713")} Version ${import_chalk134.default.bold(
|
|
194073
193922
|
newVersion.name || newVersion.id
|
|
194074
|
-
)} promoted to production ${
|
|
193923
|
+
)} promoted to production ${import_chalk134.default.gray(updateStamp())}`
|
|
194075
193924
|
);
|
|
194076
193925
|
return 0;
|
|
194077
193926
|
}
|
|
194078
|
-
var
|
|
193927
|
+
var import_chalk134;
|
|
194079
193928
|
var init_promote3 = __esm({
|
|
194080
193929
|
"src/commands/redirects/promote.ts"() {
|
|
194081
193930
|
"use strict";
|
|
194082
|
-
|
|
193931
|
+
import_chalk134 = __toESM3(require_source(), 1);
|
|
194083
193932
|
init_output_manager();
|
|
194084
|
-
|
|
193933
|
+
init_command33();
|
|
194085
193934
|
init_shared2();
|
|
194086
193935
|
init_get_redirect_versions();
|
|
194087
193936
|
init_update_redirect_version();
|
|
@@ -194106,14 +193955,14 @@ async function restore(client2, argv) {
|
|
|
194106
193955
|
const { project, org } = link4;
|
|
194107
193956
|
const teamId = org.type === "team" ? org.id : void 0;
|
|
194108
193957
|
const [versionIdentifier] = parsed.args;
|
|
194109
|
-
output_manager_default.spinner(`Fetching redirect versions for ${
|
|
193958
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk135.default.bold(project.name)}`);
|
|
194110
193959
|
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
194111
193960
|
const version2 = versions.find(
|
|
194112
193961
|
(v) => v.id === versionIdentifier || v.name === versionIdentifier
|
|
194113
193962
|
);
|
|
194114
193963
|
if (!version2) {
|
|
194115
193964
|
output_manager_default.error(
|
|
194116
|
-
`Version with ID or name "${versionIdentifier}" not found. Run ${
|
|
193965
|
+
`Version with ID or name "${versionIdentifier}" not found. Run ${import_chalk135.default.cyan(
|
|
194117
193966
|
"vercel redirects list-versions"
|
|
194118
193967
|
)} to see available versions.`
|
|
194119
193968
|
);
|
|
@@ -194121,10 +193970,10 @@ async function restore(client2, argv) {
|
|
|
194121
193970
|
}
|
|
194122
193971
|
if (version2.isLive) {
|
|
194123
193972
|
output_manager_default.error(
|
|
194124
|
-
`Version ${
|
|
193973
|
+
`Version ${import_chalk135.default.bold(
|
|
194125
193974
|
version2.name || version2.id
|
|
194126
193975
|
)} is currently live. You cannot restore the live version.
|
|
194127
|
-
Run ${
|
|
193976
|
+
Run ${import_chalk135.default.cyan(
|
|
194128
193977
|
"vercel redirects list-versions"
|
|
194129
193978
|
)} to see previous versions you can restore.`
|
|
194130
193979
|
);
|
|
@@ -194132,7 +193981,7 @@ Run ${import_chalk136.default.cyan(
|
|
|
194132
193981
|
}
|
|
194133
193982
|
if (version2.isStaging) {
|
|
194134
193983
|
output_manager_default.error(
|
|
194135
|
-
`Version ${
|
|
193984
|
+
`Version ${import_chalk135.default.bold(
|
|
194136
193985
|
version2.name || version2.id
|
|
194137
193986
|
)} is staged. You can only restore previous versions.`
|
|
194138
193987
|
);
|
|
@@ -194150,13 +193999,13 @@ Run ${import_chalk136.default.cyan(
|
|
|
194150
193999
|
);
|
|
194151
194000
|
if (changedRedirects.length > 0) {
|
|
194152
194001
|
output_manager_default.print(`
|
|
194153
|
-
${
|
|
194002
|
+
${import_chalk135.default.bold("Changes to be restored:")}
|
|
194154
194003
|
|
|
194155
194004
|
`);
|
|
194156
194005
|
const displayRedirects = changedRedirects.slice(0, 20);
|
|
194157
194006
|
for (const redirect2 of displayRedirects) {
|
|
194158
194007
|
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
194159
|
-
const symbol = redirect2.action === "+" ?
|
|
194008
|
+
const symbol = redirect2.action === "+" ? import_chalk135.default.green("+") : import_chalk135.default.red("-");
|
|
194160
194009
|
output_manager_default.print(
|
|
194161
194010
|
` ${symbol} ${redirect2.source} \u2192 ${redirect2.destination} (${status3})
|
|
194162
194011
|
`
|
|
@@ -194164,7 +194013,7 @@ ${import_chalk136.default.bold("Changes to be restored:")}
|
|
|
194164
194013
|
}
|
|
194165
194014
|
if (changedRedirects.length > 20) {
|
|
194166
194015
|
output_manager_default.print(
|
|
194167
|
-
|
|
194016
|
+
import_chalk135.default.gray(`
|
|
194168
194017
|
... and ${changedRedirects.length - 20} more changes
|
|
194169
194018
|
`)
|
|
194170
194019
|
);
|
|
@@ -194173,7 +194022,7 @@ ${import_chalk136.default.bold("Changes to be restored:")}
|
|
|
194173
194022
|
} else {
|
|
194174
194023
|
output_manager_default.print(
|
|
194175
194024
|
`
|
|
194176
|
-
${
|
|
194025
|
+
${import_chalk135.default.gray("No changes detected from current production version.")}
|
|
194177
194026
|
|
|
194178
194027
|
`
|
|
194179
194028
|
);
|
|
@@ -194181,15 +194030,15 @@ ${import_chalk136.default.gray("No changes detected from current production vers
|
|
|
194181
194030
|
const confirmed = await confirmAction(
|
|
194182
194031
|
client2,
|
|
194183
194032
|
parsed.flags["--yes"],
|
|
194184
|
-
`Restore version ${
|
|
194185
|
-
`This will make it the live version for ${
|
|
194033
|
+
`Restore version ${import_chalk135.default.bold(versionName)}?`,
|
|
194034
|
+
`This will make it the live version for ${import_chalk135.default.bold(project.name)}.`
|
|
194186
194035
|
);
|
|
194187
194036
|
if (!confirmed) {
|
|
194188
194037
|
output_manager_default.log("Canceled");
|
|
194189
194038
|
return 0;
|
|
194190
194039
|
}
|
|
194191
194040
|
const updateStamp = stamp_default();
|
|
194192
|
-
output_manager_default.spinner(`Restoring version ${
|
|
194041
|
+
output_manager_default.spinner(`Restoring version ${import_chalk135.default.bold(versionName)}`);
|
|
194193
194042
|
const { version: newVersion } = await updateRedirectVersion(
|
|
194194
194043
|
client2,
|
|
194195
194044
|
project.id,
|
|
@@ -194198,19 +194047,19 @@ ${import_chalk136.default.gray("No changes detected from current production vers
|
|
|
194198
194047
|
teamId
|
|
194199
194048
|
);
|
|
194200
194049
|
output_manager_default.log(
|
|
194201
|
-
`${
|
|
194050
|
+
`${import_chalk135.default.cyan("\u2713")} Version ${import_chalk135.default.bold(
|
|
194202
194051
|
newVersion.name || newVersion.id
|
|
194203
|
-
)} restored to production ${
|
|
194052
|
+
)} restored to production ${import_chalk135.default.gray(updateStamp())}`
|
|
194204
194053
|
);
|
|
194205
194054
|
return 0;
|
|
194206
194055
|
}
|
|
194207
|
-
var
|
|
194056
|
+
var import_chalk135;
|
|
194208
194057
|
var init_restore = __esm({
|
|
194209
194058
|
"src/commands/redirects/restore.ts"() {
|
|
194210
194059
|
"use strict";
|
|
194211
|
-
|
|
194060
|
+
import_chalk135 = __toESM3(require_source(), 1);
|
|
194212
194061
|
init_output_manager();
|
|
194213
|
-
|
|
194062
|
+
init_command33();
|
|
194214
194063
|
init_shared2();
|
|
194215
194064
|
init_get_redirect_versions();
|
|
194216
194065
|
init_update_redirect_version();
|
|
@@ -194391,7 +194240,7 @@ var init_redirects2 = __esm({
|
|
|
194391
194240
|
init_remove5();
|
|
194392
194241
|
init_promote3();
|
|
194393
194242
|
init_restore();
|
|
194394
|
-
|
|
194243
|
+
init_command33();
|
|
194395
194244
|
init_get_flags_specification();
|
|
194396
194245
|
init_output_manager();
|
|
194397
194246
|
init_commands();
|
|
@@ -194592,7 +194441,7 @@ async function remove6(client2) {
|
|
|
194592
194441
|
}
|
|
194593
194442
|
const { contextName } = await getScope(client2);
|
|
194594
194443
|
output_manager_default.spinner(
|
|
194595
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
|
194444
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk136.default.bold(contextName)}`
|
|
194596
194445
|
);
|
|
194597
194446
|
let aliases;
|
|
194598
194447
|
let projects;
|
|
@@ -194658,7 +194507,7 @@ async function remove6(client2) {
|
|
|
194658
194507
|
});
|
|
194659
194508
|
if (deployments.length === 0 && projects.length === 0) {
|
|
194660
194509
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
|
194661
|
-
const stylizedIds = ids.map((id) =>
|
|
194510
|
+
const stylizedIds = ids.map((id) => import_chalk136.default.bold(`"${id}"`)).join(", ");
|
|
194662
194511
|
const commandName = getCommandName("projects ls");
|
|
194663
194512
|
log2(
|
|
194664
194513
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
|
@@ -194666,7 +194515,7 @@ async function remove6(client2) {
|
|
|
194666
194515
|
return 1;
|
|
194667
194516
|
}
|
|
194668
194517
|
log2(
|
|
194669
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
|
194518
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk136.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
|
194670
194519
|
);
|
|
194671
194520
|
if (deployments.length > 200) {
|
|
194672
194521
|
output_manager_default.warn(
|
|
@@ -194693,11 +194542,11 @@ async function remove6(client2) {
|
|
|
194693
194542
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
|
194694
194543
|
);
|
|
194695
194544
|
deployments.forEach((depl) => {
|
|
194696
|
-
output_manager_default.print(`${
|
|
194545
|
+
output_manager_default.print(`${import_chalk136.default.gray("-")} ${import_chalk136.default.bold(depl.url)}
|
|
194697
194546
|
`);
|
|
194698
194547
|
});
|
|
194699
194548
|
projects.forEach((project) => {
|
|
194700
|
-
output_manager_default.print(`${
|
|
194549
|
+
output_manager_default.print(`${import_chalk136.default.gray("-")} ${import_chalk136.default.bold(project.name)}
|
|
194701
194550
|
`);
|
|
194702
194551
|
});
|
|
194703
194552
|
return 0;
|
|
@@ -194714,8 +194563,8 @@ function readConfirmation4(deployments, projects) {
|
|
|
194714
194563
|
);
|
|
194715
194564
|
const deploymentTable = table(
|
|
194716
194565
|
deployments.map((depl) => {
|
|
194717
|
-
const time =
|
|
194718
|
-
const url3 = depl.url ?
|
|
194566
|
+
const time = import_chalk136.default.gray(`${(0, import_ms30.default)(Date.now() - depl.createdAt)} ago`);
|
|
194567
|
+
const url3 = depl.url ? import_chalk136.default.underline(`https://${depl.url}`) : "";
|
|
194719
194568
|
return [` ${depl.id}`, url3, time];
|
|
194720
194569
|
}),
|
|
194721
194570
|
{ align: ["l", "r", "l"], hsep: 6 }
|
|
@@ -194726,7 +194575,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
194726
194575
|
for (const depl of deployments) {
|
|
194727
194576
|
for (const { alias: alias2 } of depl.aliases) {
|
|
194728
194577
|
output_manager_default.warn(
|
|
194729
|
-
`${
|
|
194578
|
+
`${import_chalk136.default.underline(`https://${alias2}`)} is an alias for ${import_chalk136.default.bold(depl.url)} and will be removed`
|
|
194730
194579
|
);
|
|
194731
194580
|
}
|
|
194732
194581
|
}
|
|
@@ -194740,12 +194589,12 @@ function readConfirmation4(deployments, projects) {
|
|
|
194740
194589
|
`
|
|
194741
194590
|
);
|
|
194742
194591
|
for (const project of projects) {
|
|
194743
|
-
output_manager_default.print(`${
|
|
194592
|
+
output_manager_default.print(`${import_chalk136.default.gray("-")} ${import_chalk136.default.bold(project.name)}
|
|
194744
194593
|
`);
|
|
194745
194594
|
}
|
|
194746
194595
|
}
|
|
194747
194596
|
output_manager_default.print(
|
|
194748
|
-
`${
|
|
194597
|
+
`${import_chalk136.default.bold.red("> Are you sure?")} ${import_chalk136.default.gray("(y/N) ")}`
|
|
194749
194598
|
);
|
|
194750
194599
|
process.stdin.on("data", (d) => {
|
|
194751
194600
|
process.stdin.pause();
|
|
@@ -194762,11 +194611,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
|
194762
194611
|
}
|
|
194763
194612
|
return `${(0, import_pluralize15.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize15.default)("project", projects.length, true)}`;
|
|
194764
194613
|
}
|
|
194765
|
-
var
|
|
194614
|
+
var import_chalk136, import_ms30, import_pluralize15;
|
|
194766
194615
|
var init_remove7 = __esm({
|
|
194767
194616
|
"src/commands/remove/index.ts"() {
|
|
194768
194617
|
"use strict";
|
|
194769
|
-
|
|
194618
|
+
import_chalk136 = __toESM3(require_source(), 1);
|
|
194770
194619
|
import_ms30 = __toESM3(require_ms(), 1);
|
|
194771
194620
|
import_pluralize15 = __toESM3(require_pluralize(), 1);
|
|
194772
194621
|
init_table();
|
|
@@ -194785,7 +194634,7 @@ var init_remove7 = __esm({
|
|
|
194785
194634
|
init_error2();
|
|
194786
194635
|
init_now_error();
|
|
194787
194636
|
init_help();
|
|
194788
|
-
|
|
194637
|
+
init_command34();
|
|
194789
194638
|
init_get_flags_specification();
|
|
194790
194639
|
init_remove6();
|
|
194791
194640
|
init_output_manager();
|
|
@@ -194862,7 +194711,7 @@ async function rollbackStatus({
|
|
|
194862
194711
|
}
|
|
194863
194712
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
|
194864
194713
|
output_manager_default.log(
|
|
194865
|
-
`The rollback exceeded its deadline - rerun ${
|
|
194714
|
+
`The rollback exceeded its deadline - rerun ${import_chalk137.default.bold(
|
|
194866
194715
|
`${packageName} rollback ${toDeploymentId}`
|
|
194867
194716
|
)} to try again`
|
|
194868
194717
|
);
|
|
@@ -194926,26 +194775,26 @@ async function renderJobSucceeded2({
|
|
|
194926
194775
|
let deploymentInfo = "";
|
|
194927
194776
|
try {
|
|
194928
194777
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
194929
|
-
deploymentInfo = `${
|
|
194778
|
+
deploymentInfo = `${import_chalk137.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
194930
194779
|
} catch (err) {
|
|
194931
194780
|
output_manager_default.debug(
|
|
194932
194781
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
194933
194782
|
);
|
|
194934
|
-
deploymentInfo =
|
|
194783
|
+
deploymentInfo = import_chalk137.default.bold(toDeploymentId);
|
|
194935
194784
|
}
|
|
194936
194785
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
|
194937
194786
|
output_manager_default.log(
|
|
194938
|
-
`Success! ${
|
|
194787
|
+
`Success! ${import_chalk137.default.bold(
|
|
194939
194788
|
project.name
|
|
194940
194789
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
|
194941
194790
|
);
|
|
194942
194791
|
return 0;
|
|
194943
194792
|
}
|
|
194944
|
-
var
|
|
194793
|
+
var import_chalk137, import_ms31;
|
|
194945
194794
|
var init_status3 = __esm({
|
|
194946
194795
|
"src/commands/rollback/status.ts"() {
|
|
194947
194796
|
"use strict";
|
|
194948
|
-
|
|
194797
|
+
import_chalk137 = __toESM3(require_source(), 1);
|
|
194949
194798
|
init_elapsed();
|
|
194950
194799
|
init_format_date();
|
|
194951
194800
|
init_get_deployment();
|
|
@@ -194977,7 +194826,7 @@ async function requestRollback({
|
|
|
194977
194826
|
});
|
|
194978
194827
|
if (timeout !== void 0 && (0, import_ms32.default)(timeout) === 0) {
|
|
194979
194828
|
output_manager_default.log(
|
|
194980
|
-
`Successfully requested rollback of ${
|
|
194829
|
+
`Successfully requested rollback of ${import_chalk138.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
194981
194830
|
);
|
|
194982
194831
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
|
194983
194832
|
return 0;
|
|
@@ -194990,11 +194839,11 @@ async function requestRollback({
|
|
|
194990
194839
|
timeout
|
|
194991
194840
|
});
|
|
194992
194841
|
}
|
|
194993
|
-
var
|
|
194842
|
+
var import_chalk138, import_ms32;
|
|
194994
194843
|
var init_request_rollback = __esm({
|
|
194995
194844
|
"src/commands/rollback/request-rollback.ts"() {
|
|
194996
194845
|
"use strict";
|
|
194997
|
-
|
|
194846
|
+
import_chalk138 = __toESM3(require_source(), 1);
|
|
194998
194847
|
init_pkg_name();
|
|
194999
194848
|
init_get_project_by_deployment();
|
|
195000
194849
|
import_ms32 = __toESM3(require_ms(), 1);
|
|
@@ -195046,19 +194895,19 @@ var rollback_exports = {};
|
|
|
195046
194895
|
__export3(rollback_exports, {
|
|
195047
194896
|
default: () => rollback_default
|
|
195048
194897
|
});
|
|
195049
|
-
var
|
|
194898
|
+
var import_error_utils34, import_ms33, rollback_default;
|
|
195050
194899
|
var init_rollback2 = __esm({
|
|
195051
194900
|
"src/commands/rollback/index.ts"() {
|
|
195052
194901
|
"use strict";
|
|
195053
194902
|
init_get_args();
|
|
195054
194903
|
init_get_project_by_cwd_or_link();
|
|
195055
194904
|
init_error2();
|
|
195056
|
-
|
|
194905
|
+
import_error_utils34 = __toESM3(require_dist2(), 1);
|
|
195057
194906
|
import_ms33 = __toESM3(require_ms(), 1);
|
|
195058
194907
|
init_request_rollback();
|
|
195059
194908
|
init_status3();
|
|
195060
194909
|
init_help();
|
|
195061
|
-
|
|
194910
|
+
init_command35();
|
|
195062
194911
|
init_get_flags_specification();
|
|
195063
194912
|
init_rollback();
|
|
195064
194913
|
init_output_manager();
|
|
@@ -195121,7 +194970,7 @@ var init_rollback2 = __esm({
|
|
|
195121
194970
|
timeout
|
|
195122
194971
|
});
|
|
195123
194972
|
} catch (err) {
|
|
195124
|
-
if ((0,
|
|
194973
|
+
if ((0, import_error_utils34.isErrnoException)(err)) {
|
|
195125
194974
|
if (err.code === "ERR_CANCELED") {
|
|
195126
194975
|
return 0;
|
|
195127
194976
|
}
|
|
@@ -195634,7 +195483,7 @@ var init_rolling_release2 = __esm({
|
|
|
195634
195483
|
init_get_args();
|
|
195635
195484
|
init_get_flags_specification();
|
|
195636
195485
|
init_help();
|
|
195637
|
-
|
|
195486
|
+
init_command36();
|
|
195638
195487
|
init_request_rolling_release();
|
|
195639
195488
|
init_start_rolling_release();
|
|
195640
195489
|
init_configure_rolling_release();
|
|
@@ -195664,11 +195513,11 @@ function formatBranchMatcher(branchMatcher) {
|
|
|
195664
195513
|
if (branchMatcher?.type === "equals") {
|
|
195665
195514
|
return branchMatcher.pattern;
|
|
195666
195515
|
} else if (branchMatcher?.type === "startsWith") {
|
|
195667
|
-
return `${branchMatcher.pattern}${
|
|
195516
|
+
return `${branchMatcher.pattern}${import_chalk139.default.dim("*")}`;
|
|
195668
195517
|
} else if (branchMatcher?.type === "endsWith") {
|
|
195669
|
-
return `${
|
|
195518
|
+
return `${import_chalk139.default.dim("*")}${branchMatcher.pattern}`;
|
|
195670
195519
|
}
|
|
195671
|
-
return
|
|
195520
|
+
return import_chalk139.default.dim("No branch configuration");
|
|
195672
195521
|
}
|
|
195673
195522
|
async function list8(client2, argv) {
|
|
195674
195523
|
const { cwd } = client2;
|
|
@@ -195734,12 +195583,12 @@ async function list8(client2, argv) {
|
|
|
195734
195583
|
`);
|
|
195735
195584
|
} else {
|
|
195736
195585
|
output_manager_default.log(
|
|
195737
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
|
195586
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk139.default.gray(`[${elapsed2}]`)}`
|
|
195738
195587
|
);
|
|
195739
195588
|
const tablePrint = table(
|
|
195740
195589
|
[
|
|
195741
195590
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
|
195742
|
-
(header) =>
|
|
195591
|
+
(header) => import_chalk139.default.bold(import_chalk139.default.cyan(header))
|
|
195743
195592
|
),
|
|
195744
195593
|
...result.flatMap((target) => {
|
|
195745
195594
|
return [
|
|
@@ -195747,7 +195596,7 @@ async function list8(client2, argv) {
|
|
|
195747
195596
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
|
195748
195597
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
|
195749
195598
|
TYPE_MAP[target.type],
|
|
195750
|
-
|
|
195599
|
+
import_chalk139.default.gray(
|
|
195751
195600
|
target.updatedAt > 0 ? (0, import_ms34.default)(Date.now() - target.updatedAt) : "-"
|
|
195752
195601
|
)
|
|
195753
195602
|
]
|
|
@@ -195795,15 +195644,15 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
|
195795
195644
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
|
195796
195645
|
];
|
|
195797
195646
|
}
|
|
195798
|
-
var import_ms34,
|
|
195647
|
+
var import_ms34, import_chalk139, TYPE_MAP, BRANCH_TRACKING_MAP;
|
|
195799
195648
|
var init_list12 = __esm({
|
|
195800
195649
|
"src/commands/target/list.ts"() {
|
|
195801
195650
|
"use strict";
|
|
195802
195651
|
import_ms34 = __toESM3(require_ms(), 1);
|
|
195803
|
-
|
|
195652
|
+
import_chalk139 = __toESM3(require_source(), 1);
|
|
195804
195653
|
init_table();
|
|
195805
195654
|
init_output_manager();
|
|
195806
|
-
|
|
195655
|
+
init_command37();
|
|
195807
195656
|
init_validate_ls_args();
|
|
195808
195657
|
init_ensure_link();
|
|
195809
195658
|
init_format_project();
|
|
@@ -195820,8 +195669,8 @@ var init_list12 = __esm({
|
|
|
195820
195669
|
};
|
|
195821
195670
|
BRANCH_TRACKING_MAP = {
|
|
195822
195671
|
production: (project) => project.link?.productionBranch ?? "main",
|
|
195823
|
-
preview: (_, env) => env.slug === "preview" ?
|
|
195824
|
-
development: () =>
|
|
195672
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk139.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
|
195673
|
+
development: () => import_chalk139.default.dim("Accessible via CLI")
|
|
195825
195674
|
};
|
|
195826
195675
|
}
|
|
195827
195676
|
});
|
|
@@ -195903,7 +195752,7 @@ var init_target2 = __esm({
|
|
|
195903
195752
|
init_get_invalid_subcommand();
|
|
195904
195753
|
init_help();
|
|
195905
195754
|
init_list12();
|
|
195906
|
-
|
|
195755
|
+
init_command37();
|
|
195907
195756
|
init_get_flags_specification();
|
|
195908
195757
|
init_error2();
|
|
195909
195758
|
init_output_manager();
|
|
@@ -196047,7 +195896,7 @@ async function list9(client2, argv) {
|
|
|
196047
195896
|
client2.stdout.write("\n");
|
|
196048
195897
|
const teamTable = table(
|
|
196049
195898
|
[
|
|
196050
|
-
["id", "Team name"].map((str) => (0,
|
|
195899
|
+
["id", "Team name"].map((str) => (0, import_chalk140.gray)(str)),
|
|
196051
195900
|
...teamList.map((team) => [team.value, team.name])
|
|
196052
195901
|
],
|
|
196053
195902
|
{ hsep: 5 }
|
|
@@ -196073,13 +195922,13 @@ async function list9(client2, argv) {
|
|
|
196073
195922
|
}
|
|
196074
195923
|
return 0;
|
|
196075
195924
|
}
|
|
196076
|
-
var
|
|
195925
|
+
var import_chalk140;
|
|
196077
195926
|
var init_list14 = __esm({
|
|
196078
195927
|
"src/commands/teams/list.ts"() {
|
|
196079
195928
|
"use strict";
|
|
196080
195929
|
init_chars();
|
|
196081
195930
|
init_table();
|
|
196082
|
-
|
|
195931
|
+
import_chalk140 = __toESM3(require_source(), 1);
|
|
196083
195932
|
init_get_user();
|
|
196084
195933
|
init_get_teams();
|
|
196085
195934
|
init_pkg_name();
|
|
@@ -196088,7 +195937,7 @@ var init_list14 = __esm({
|
|
|
196088
195937
|
init_get_args();
|
|
196089
195938
|
init_error2();
|
|
196090
195939
|
init_get_flags_specification();
|
|
196091
|
-
|
|
195940
|
+
init_command38();
|
|
196092
195941
|
init_output_format();
|
|
196093
195942
|
init_output_manager();
|
|
196094
195943
|
init_list13();
|
|
@@ -196176,7 +196025,7 @@ Please select a team scope using ${getCommandName(
|
|
|
196176
196025
|
return 1;
|
|
196177
196026
|
}
|
|
196178
196027
|
output_manager_default.log(
|
|
196179
|
-
introMsg || `Inviting team members to ${
|
|
196028
|
+
introMsg || `Inviting team members to ${import_chalk141.default.bold(currentTeam.name)}`
|
|
196180
196029
|
);
|
|
196181
196030
|
telemetry2.trackCliArgumentEmail(emails);
|
|
196182
196031
|
if (emails.length > 0) {
|
|
@@ -196196,10 +196045,10 @@ Please select a team scope using ${getCommandName(
|
|
|
196196
196045
|
throw err;
|
|
196197
196046
|
}
|
|
196198
196047
|
output_manager_default.log(
|
|
196199
|
-
`${
|
|
196048
|
+
`${import_chalk141.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
|
196200
196049
|
);
|
|
196201
196050
|
} else {
|
|
196202
|
-
output_manager_default.log(`${
|
|
196051
|
+
output_manager_default.log(`${import_chalk141.default.red(`\u2716 ${email3}`)} ${import_chalk141.default.gray("[invalid]")}`);
|
|
196203
196052
|
}
|
|
196204
196053
|
}
|
|
196205
196054
|
return 0;
|
|
@@ -196216,7 +196065,7 @@ Please select a team scope using ${getCommandName(
|
|
|
196216
196065
|
validate: validateEmail
|
|
196217
196066
|
});
|
|
196218
196067
|
} catch (err) {
|
|
196219
|
-
if (!(0,
|
|
196068
|
+
if (!(0, import_error_utils35.isError)(err) || err.message !== "USER_ABORT") {
|
|
196220
196069
|
throw err;
|
|
196221
196070
|
}
|
|
196222
196071
|
}
|
|
@@ -196232,24 +196081,24 @@ Please select a team scope using ${getCommandName(
|
|
|
196232
196081
|
);
|
|
196233
196082
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
|
196234
196083
|
emails.push(email2);
|
|
196235
|
-
output_manager_default.log(`${
|
|
196084
|
+
output_manager_default.log(`${import_chalk141.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
|
196236
196085
|
if (hasError) {
|
|
196237
196086
|
hasError = false;
|
|
196238
196087
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
196239
196088
|
output_manager_default.log(
|
|
196240
|
-
introMsg || `Inviting team members to ${
|
|
196089
|
+
introMsg || `Inviting team members to ${import_chalk141.default.bold(currentTeam.name)}`
|
|
196241
196090
|
);
|
|
196242
196091
|
for (const email3 of emails) {
|
|
196243
|
-
output_manager_default.log(`${
|
|
196092
|
+
output_manager_default.log(`${import_chalk141.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
196244
196093
|
}
|
|
196245
196094
|
}
|
|
196246
196095
|
} catch (err) {
|
|
196247
196096
|
output_manager_default.stopSpinner();
|
|
196248
196097
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
196249
|
-
output_manager_default.error((0,
|
|
196098
|
+
output_manager_default.error((0, import_error_utils35.errorToString)(err));
|
|
196250
196099
|
hasError = true;
|
|
196251
196100
|
for (const email3 of emails) {
|
|
196252
|
-
output_manager_default.log(`${
|
|
196101
|
+
output_manager_default.log(`${import_chalk141.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
|
196253
196102
|
}
|
|
196254
196103
|
}
|
|
196255
196104
|
}
|
|
@@ -196262,16 +196111,16 @@ Please select a team scope using ${getCommandName(
|
|
|
196262
196111
|
} else {
|
|
196263
196112
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
|
196264
196113
|
for (const email3 of emails) {
|
|
196265
|
-
output_manager_default.log(`${
|
|
196114
|
+
output_manager_default.log(`${import_chalk141.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
196266
196115
|
}
|
|
196267
196116
|
}
|
|
196268
196117
|
return 0;
|
|
196269
196118
|
}
|
|
196270
|
-
var
|
|
196119
|
+
var import_chalk141, import_error_utils35, validateEmail, domains;
|
|
196271
196120
|
var init_invite2 = __esm({
|
|
196272
196121
|
"src/commands/teams/invite.ts"() {
|
|
196273
196122
|
"use strict";
|
|
196274
|
-
|
|
196123
|
+
import_chalk141 = __toESM3(require_source(), 1);
|
|
196275
196124
|
init_cmd();
|
|
196276
196125
|
init_stamp();
|
|
196277
196126
|
init_param();
|
|
@@ -196283,13 +196132,13 @@ var init_invite2 = __esm({
|
|
|
196283
196132
|
init_get_teams();
|
|
196284
196133
|
init_invite_user_to_team();
|
|
196285
196134
|
init_errors_ts();
|
|
196286
|
-
|
|
196135
|
+
import_error_utils35 = __toESM3(require_dist2(), 1);
|
|
196287
196136
|
init_invite();
|
|
196288
196137
|
init_output_manager();
|
|
196289
196138
|
init_get_args();
|
|
196290
196139
|
init_get_flags_specification();
|
|
196291
196140
|
init_error2();
|
|
196292
|
-
|
|
196141
|
+
init_command38();
|
|
196293
196142
|
validateEmail = (data) => email.test(data.trim()) || data.length === 0;
|
|
196294
196143
|
domains = Array.from(
|
|
196295
196144
|
/* @__PURE__ */ new Set([
|
|
@@ -196347,7 +196196,7 @@ async function add8(client2) {
|
|
|
196347
196196
|
let team;
|
|
196348
196197
|
let elapsed2;
|
|
196349
196198
|
output_manager_default.log(
|
|
196350
|
-
`Pick a team identifier for its URL (e.g.: ${
|
|
196199
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk142.default.cyan(
|
|
196351
196200
|
"`vercel.com/acme`"
|
|
196352
196201
|
)})`
|
|
196353
196202
|
);
|
|
@@ -196359,7 +196208,7 @@ async function add8(client2) {
|
|
|
196359
196208
|
default: slug
|
|
196360
196209
|
});
|
|
196361
196210
|
} catch (err) {
|
|
196362
|
-
if ((0,
|
|
196211
|
+
if ((0, import_error_utils36.isError)(err) && err.message === "USER_ABORT") {
|
|
196363
196212
|
output_manager_default.log("Canceled");
|
|
196364
196213
|
return 0;
|
|
196365
196214
|
}
|
|
@@ -196372,13 +196221,13 @@ async function add8(client2) {
|
|
|
196372
196221
|
} catch (err) {
|
|
196373
196222
|
output_manager_default.stopSpinner();
|
|
196374
196223
|
output_manager_default.print(eraseLines(2));
|
|
196375
|
-
output_manager_default.error((0,
|
|
196224
|
+
output_manager_default.error((0, import_error_utils36.errorToString)(err));
|
|
196376
196225
|
}
|
|
196377
196226
|
} while (!team);
|
|
196378
196227
|
output_manager_default.stopSpinner();
|
|
196379
196228
|
process.stdout.write(eraseLines(2));
|
|
196380
196229
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
|
196381
|
-
output_manager_default.log(`${
|
|
196230
|
+
output_manager_default.log(`${import_chalk142.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
|
196382
196231
|
`);
|
|
196383
196232
|
output_manager_default.log("Pick a display name for your team");
|
|
196384
196233
|
let name;
|
|
@@ -196388,7 +196237,7 @@ async function add8(client2) {
|
|
|
196388
196237
|
validate: validateName
|
|
196389
196238
|
});
|
|
196390
196239
|
} catch (err) {
|
|
196391
|
-
if ((0,
|
|
196240
|
+
if ((0, import_error_utils36.isError)(err) && err.message === "USER_ABORT") {
|
|
196392
196241
|
output_manager_default.log("No name specified");
|
|
196393
196242
|
return 2;
|
|
196394
196243
|
}
|
|
@@ -196401,7 +196250,7 @@ async function add8(client2) {
|
|
|
196401
196250
|
process.stdout.write(eraseLines(2));
|
|
196402
196251
|
team = Object.assign(team, res);
|
|
196403
196252
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
|
196404
|
-
output_manager_default.log(`${
|
|
196253
|
+
output_manager_default.log(`${import_chalk142.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
|
196405
196254
|
`);
|
|
196406
196255
|
output_manager_default.spinner("Saving");
|
|
196407
196256
|
client2.config.currentTeam = team.id;
|
|
@@ -196415,11 +196264,11 @@ async function add8(client2) {
|
|
|
196415
196264
|
});
|
|
196416
196265
|
return 0;
|
|
196417
196266
|
}
|
|
196418
|
-
var
|
|
196267
|
+
var import_chalk142, import_error_utils36, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
|
196419
196268
|
var init_add14 = __esm({
|
|
196420
196269
|
"src/commands/teams/add.ts"() {
|
|
196421
196270
|
"use strict";
|
|
196422
|
-
|
|
196271
|
+
import_chalk142 = __toESM3(require_source(), 1);
|
|
196423
196272
|
init_stamp();
|
|
196424
196273
|
init_erase_lines();
|
|
196425
196274
|
init_chars();
|
|
@@ -196428,11 +196277,11 @@ var init_add14 = __esm({
|
|
|
196428
196277
|
init_pkg_name();
|
|
196429
196278
|
init_create_team();
|
|
196430
196279
|
init_patch_team();
|
|
196431
|
-
|
|
196280
|
+
import_error_utils36 = __toESM3(require_dist2(), 1);
|
|
196432
196281
|
init_output_manager();
|
|
196433
196282
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
|
196434
196283
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
|
196435
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
|
196284
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk142.default.gray("vercel.com/");
|
|
196436
196285
|
teamNamePrefix = "Team Name".padEnd(14);
|
|
196437
196286
|
}
|
|
196438
196287
|
});
|
|
@@ -196491,7 +196340,7 @@ async function change(client2, argv) {
|
|
|
196491
196340
|
let title9 = `${team.name} (${team.slug})`;
|
|
196492
196341
|
const selected = team.id === currentTeam?.id;
|
|
196493
196342
|
if (selected) {
|
|
196494
|
-
title9 += ` ${
|
|
196343
|
+
title9 += ` ${import_chalk143.default.bold("(current)")}`;
|
|
196495
196344
|
}
|
|
196496
196345
|
if (team.limited) {
|
|
196497
196346
|
title9 += ` ${emoji("locked")}`;
|
|
@@ -196503,7 +196352,7 @@ async function change(client2, argv) {
|
|
|
196503
196352
|
selected
|
|
196504
196353
|
};
|
|
196505
196354
|
});
|
|
196506
|
-
let suffix = personalScopeSelected ? ` ${
|
|
196355
|
+
let suffix = personalScopeSelected ? ` ${import_chalk143.default.bold("(current)")}` : "";
|
|
196507
196356
|
if (user.limited) {
|
|
196508
196357
|
suffix += ` ${emoji("locked")}`;
|
|
196509
196358
|
}
|
|
@@ -196549,14 +196398,14 @@ async function change(client2, argv) {
|
|
|
196549
196398
|
}
|
|
196550
196399
|
updateCurrentTeam(config2);
|
|
196551
196400
|
output_manager_default.success(
|
|
196552
|
-
`Your account (${
|
|
196401
|
+
`Your account (${import_chalk143.default.bold(user.username)}) is now active!`
|
|
196553
196402
|
);
|
|
196554
196403
|
return 0;
|
|
196555
196404
|
}
|
|
196556
196405
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
|
196557
196406
|
if (!newTeam) {
|
|
196558
196407
|
output_manager_default.error(
|
|
196559
|
-
`You do not have permission to access scope ${
|
|
196408
|
+
`You do not have permission to access scope ${import_chalk143.default.bold(desiredSlug)}.`
|
|
196560
196409
|
);
|
|
196561
196410
|
return 1;
|
|
196562
196411
|
}
|
|
@@ -196574,15 +196423,15 @@ async function change(client2, argv) {
|
|
|
196574
196423
|
}
|
|
196575
196424
|
updateCurrentTeam(config2, newTeam);
|
|
196576
196425
|
output_manager_default.success(
|
|
196577
|
-
`The team ${
|
|
196426
|
+
`The team ${import_chalk143.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
|
196578
196427
|
);
|
|
196579
196428
|
return 0;
|
|
196580
196429
|
}
|
|
196581
|
-
var
|
|
196430
|
+
var import_chalk143, updateCurrentTeam;
|
|
196582
196431
|
var init_switch2 = __esm({
|
|
196583
196432
|
"src/commands/teams/switch.ts"() {
|
|
196584
196433
|
"use strict";
|
|
196585
|
-
|
|
196434
|
+
import_chalk143 = __toESM3(require_source(), 1);
|
|
196586
196435
|
init_emoji();
|
|
196587
196436
|
init_get_user();
|
|
196588
196437
|
init_get_teams();
|
|
@@ -196590,7 +196439,7 @@ var init_switch2 = __esm({
|
|
|
196590
196439
|
init_files();
|
|
196591
196440
|
init_output_manager();
|
|
196592
196441
|
init_switch();
|
|
196593
|
-
|
|
196442
|
+
init_command38();
|
|
196594
196443
|
init_get_args();
|
|
196595
196444
|
init_get_flags_specification();
|
|
196596
196445
|
init_error2();
|
|
@@ -196742,7 +196591,7 @@ var init_teams2 = __esm({
|
|
|
196742
196591
|
init_switch2();
|
|
196743
196592
|
init_invite2();
|
|
196744
196593
|
init_get_args();
|
|
196745
|
-
|
|
196594
|
+
init_command38();
|
|
196746
196595
|
init_help();
|
|
196747
196596
|
init_get_flags_specification();
|
|
196748
196597
|
init_error2();
|
|
@@ -196761,13 +196610,13 @@ var init_teams2 = __esm({
|
|
|
196761
196610
|
// src/commands/telemetry/status.ts
|
|
196762
196611
|
async function status2(client2) {
|
|
196763
196612
|
const enabled = client2.config.telemetry?.enabled !== false;
|
|
196764
|
-
const status3 = enabled ?
|
|
196613
|
+
const status3 = enabled ? import_chalk144.default.green("Enabled") : import_chalk144.default.red("Disabled");
|
|
196765
196614
|
output_manager_default.print("\n");
|
|
196766
|
-
output_manager_default.log(`${
|
|
196615
|
+
output_manager_default.log(`${import_chalk144.default.bold("Telemetry status")}: ${status3}
|
|
196767
196616
|
`);
|
|
196768
196617
|
const learnMoreMessage = `
|
|
196769
196618
|
|
|
196770
|
-
Learn more: ${
|
|
196619
|
+
Learn more: ${import_chalk144.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
|
196771
196620
|
if (enabled) {
|
|
196772
196621
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
|
196773
196622
|
} else {
|
|
@@ -196778,11 +196627,11 @@ Learn more: ${import_chalk145.default.cyan("https://vercel.com/docs/cli/about-te
|
|
|
196778
196627
|
}
|
|
196779
196628
|
return 0;
|
|
196780
196629
|
}
|
|
196781
|
-
var
|
|
196630
|
+
var import_chalk144;
|
|
196782
196631
|
var init_status4 = __esm({
|
|
196783
196632
|
"src/commands/telemetry/status.ts"() {
|
|
196784
196633
|
"use strict";
|
|
196785
|
-
|
|
196634
|
+
import_chalk144 = __toESM3(require_source(), 1);
|
|
196786
196635
|
init_output_manager();
|
|
196787
196636
|
}
|
|
196788
196637
|
});
|
|
@@ -196963,7 +196812,7 @@ async function telemetry(client2) {
|
|
|
196963
196812
|
default: {
|
|
196964
196813
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
|
196965
196814
|
output_manager_default.print(
|
|
196966
|
-
`${
|
|
196815
|
+
`${import_chalk145.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
|
196967
196816
|
`
|
|
196968
196817
|
);
|
|
196969
196818
|
output_manager_default.print(help(telemetryCommand, { columns: client2.stderr.columns }));
|
|
@@ -196971,7 +196820,7 @@ async function telemetry(client2) {
|
|
|
196971
196820
|
}
|
|
196972
196821
|
}
|
|
196973
196822
|
}
|
|
196974
|
-
var
|
|
196823
|
+
var import_chalk145, COMMAND_CONFIG21;
|
|
196975
196824
|
var init_telemetry3 = __esm({
|
|
196976
196825
|
"src/commands/telemetry/index.ts"() {
|
|
196977
196826
|
"use strict";
|
|
@@ -196983,10 +196832,10 @@ var init_telemetry3 = __esm({
|
|
|
196983
196832
|
init_enable2();
|
|
196984
196833
|
init_disable2();
|
|
196985
196834
|
init_flush();
|
|
196986
|
-
|
|
196835
|
+
init_command39();
|
|
196987
196836
|
init_get_flags_specification();
|
|
196988
196837
|
init_telemetry2();
|
|
196989
|
-
|
|
196838
|
+
import_chalk145 = __toESM3(require_source(), 1);
|
|
196990
196839
|
init_output_manager();
|
|
196991
196840
|
init_commands();
|
|
196992
196841
|
COMMAND_CONFIG21 = {
|
|
@@ -197080,7 +196929,7 @@ var init_upgrade3 = __esm({
|
|
|
197080
196929
|
"src/commands/upgrade/index.ts"() {
|
|
197081
196930
|
"use strict";
|
|
197082
196931
|
init_help();
|
|
197083
|
-
|
|
196932
|
+
init_command40();
|
|
197084
196933
|
init_get_args();
|
|
197085
196934
|
init_get_flags_specification();
|
|
197086
196935
|
init_upgrade();
|
|
@@ -197114,11 +196963,11 @@ var init_ls10 = __esm({
|
|
|
197114
196963
|
"use strict";
|
|
197115
196964
|
init_telemetry();
|
|
197116
196965
|
WebhooksLsTelemetryClient = class extends TelemetryClient {
|
|
197117
|
-
trackCliOptionFormat(
|
|
197118
|
-
if (
|
|
196966
|
+
trackCliOptionFormat(format7) {
|
|
196967
|
+
if (format7) {
|
|
197119
196968
|
this.trackCliOption({
|
|
197120
196969
|
option: "format",
|
|
197121
|
-
value:
|
|
196970
|
+
value: format7
|
|
197122
196971
|
});
|
|
197123
196972
|
}
|
|
197124
196973
|
}
|
|
@@ -197160,7 +197009,7 @@ async function ls6(client2, argv) {
|
|
|
197160
197009
|
const asJson = formatResult.jsonOutput;
|
|
197161
197010
|
const { contextName } = await getScope(client2);
|
|
197162
197011
|
const lsStamp = stamp_default();
|
|
197163
|
-
output_manager_default.spinner(`Fetching Webhooks under ${
|
|
197012
|
+
output_manager_default.spinner(`Fetching Webhooks under ${import_chalk146.default.bold(contextName)}`);
|
|
197164
197013
|
const { webhooks } = await getWebhooks(client2);
|
|
197165
197014
|
if (asJson) {
|
|
197166
197015
|
output_manager_default.stopSpinner();
|
|
@@ -197178,9 +197027,9 @@ async function ls6(client2, argv) {
|
|
|
197178
197027
|
`);
|
|
197179
197028
|
} else {
|
|
197180
197029
|
output_manager_default.log(
|
|
197181
|
-
`${(0, import_pluralize16.default)("Webhook", webhooks.length, true)} found under ${
|
|
197030
|
+
`${(0, import_pluralize16.default)("Webhook", webhooks.length, true)} found under ${import_chalk146.default.bold(
|
|
197182
197031
|
contextName
|
|
197183
|
-
)} ${
|
|
197032
|
+
)} ${import_chalk146.default.gray(lsStamp())}`
|
|
197184
197033
|
);
|
|
197185
197034
|
if (webhooks.length > 0) {
|
|
197186
197035
|
output_manager_default.print(
|
|
@@ -197196,7 +197045,7 @@ function formatWebhooksTable(webhooks) {
|
|
|
197196
197045
|
const rows = webhooks.map((webhook) => {
|
|
197197
197046
|
const age = webhook.createdAt ? (0, import_ms35.default)(current - webhook.createdAt) : "-";
|
|
197198
197047
|
const eventsDisplay = webhook.events.length > 2 ? `${webhook.events.slice(0, 2).join(", ")} +${webhook.events.length - 2}` : webhook.events.join(", ");
|
|
197199
|
-
return [webhook.id, webhook.url, eventsDisplay,
|
|
197048
|
+
return [webhook.id, webhook.url, eventsDisplay, import_chalk146.default.gray(age)];
|
|
197200
197049
|
});
|
|
197201
197050
|
return formatTable(
|
|
197202
197051
|
["ID", "URL", "Events", "Age"],
|
|
@@ -197204,12 +197053,12 @@ function formatWebhooksTable(webhooks) {
|
|
|
197204
197053
|
[{ rows }]
|
|
197205
197054
|
);
|
|
197206
197055
|
}
|
|
197207
|
-
var import_ms35,
|
|
197056
|
+
var import_ms35, import_chalk146, import_pluralize16;
|
|
197208
197057
|
var init_ls11 = __esm({
|
|
197209
197058
|
"src/commands/webhooks/ls.ts"() {
|
|
197210
197059
|
"use strict";
|
|
197211
197060
|
import_ms35 = __toESM3(require_ms(), 1);
|
|
197212
|
-
|
|
197061
|
+
import_chalk146 = __toESM3(require_source(), 1);
|
|
197213
197062
|
import_pluralize16 = __toESM3(require_pluralize(), 1);
|
|
197214
197063
|
init_get_webhooks();
|
|
197215
197064
|
init_get_scope();
|
|
@@ -197218,7 +197067,7 @@ var init_ls11 = __esm({
|
|
|
197218
197067
|
init_output_format();
|
|
197219
197068
|
init_output_manager();
|
|
197220
197069
|
init_ls10();
|
|
197221
|
-
|
|
197070
|
+
init_command43();
|
|
197222
197071
|
init_get_args();
|
|
197223
197072
|
init_get_flags_specification();
|
|
197224
197073
|
init_error2();
|
|
@@ -197253,11 +197102,11 @@ var init_get = __esm({
|
|
|
197253
197102
|
});
|
|
197254
197103
|
}
|
|
197255
197104
|
}
|
|
197256
|
-
trackCliOptionFormat(
|
|
197257
|
-
if (
|
|
197105
|
+
trackCliOptionFormat(format7) {
|
|
197106
|
+
if (format7) {
|
|
197258
197107
|
this.trackCliOption({
|
|
197259
197108
|
option: "format",
|
|
197260
|
-
value:
|
|
197109
|
+
value: format7
|
|
197261
197110
|
});
|
|
197262
197111
|
}
|
|
197263
197112
|
}
|
|
@@ -197297,7 +197146,7 @@ async function get(client2, argv) {
|
|
|
197297
197146
|
const asJson = formatResult.jsonOutput;
|
|
197298
197147
|
if (args2.length !== 1) {
|
|
197299
197148
|
output_manager_default.error(
|
|
197300
|
-
`Invalid number of arguments. Usage: ${
|
|
197149
|
+
`Invalid number of arguments. Usage: ${import_chalk147.default.cyan(
|
|
197301
197150
|
`${getCommandName("webhooks get <id>")}`
|
|
197302
197151
|
)}`
|
|
197303
197152
|
);
|
|
@@ -197306,7 +197155,7 @@ async function get(client2, argv) {
|
|
|
197306
197155
|
output_manager_default.debug(`Fetching webhook info`);
|
|
197307
197156
|
const { contextName } = await getScope(client2);
|
|
197308
197157
|
output_manager_default.spinner(
|
|
197309
|
-
`Fetching Webhook ${webhookId} under ${
|
|
197158
|
+
`Fetching Webhook ${webhookId} under ${import_chalk147.default.bold(contextName)}`
|
|
197310
197159
|
);
|
|
197311
197160
|
let webhook;
|
|
197312
197161
|
try {
|
|
@@ -197325,33 +197174,33 @@ async function get(client2, argv) {
|
|
|
197325
197174
|
`);
|
|
197326
197175
|
} else {
|
|
197327
197176
|
output_manager_default.log(
|
|
197328
|
-
`Webhook ${webhookId} found under ${
|
|
197177
|
+
`Webhook ${webhookId} found under ${import_chalk147.default.bold(contextName)} ${import_chalk147.default.gray(
|
|
197329
197178
|
getStamp()
|
|
197330
197179
|
)}`
|
|
197331
197180
|
);
|
|
197332
197181
|
output_manager_default.print("\n");
|
|
197333
|
-
output_manager_default.print(
|
|
197334
|
-
output_manager_default.print(` ${
|
|
197182
|
+
output_manager_default.print(import_chalk147.default.bold(" General\n\n"));
|
|
197183
|
+
output_manager_default.print(` ${import_chalk147.default.cyan("ID")} ${webhook.id}
|
|
197335
197184
|
`);
|
|
197336
|
-
output_manager_default.print(` ${
|
|
197185
|
+
output_manager_default.print(` ${import_chalk147.default.cyan("URL")} ${webhook.url}
|
|
197337
197186
|
`);
|
|
197338
197187
|
output_manager_default.print(
|
|
197339
|
-
` ${
|
|
197188
|
+
` ${import_chalk147.default.cyan("Created At")} ${formatDate(webhook.createdAt)}
|
|
197340
197189
|
`
|
|
197341
197190
|
);
|
|
197342
197191
|
output_manager_default.print(
|
|
197343
|
-
` ${
|
|
197192
|
+
` ${import_chalk147.default.cyan("Updated At")} ${formatDate(webhook.updatedAt)}
|
|
197344
197193
|
`
|
|
197345
197194
|
);
|
|
197346
197195
|
output_manager_default.print("\n");
|
|
197347
|
-
output_manager_default.print(
|
|
197196
|
+
output_manager_default.print(import_chalk147.default.bold(" Events\n\n"));
|
|
197348
197197
|
for (const event of webhook.events) {
|
|
197349
197198
|
output_manager_default.print(` - ${event}
|
|
197350
197199
|
`);
|
|
197351
197200
|
}
|
|
197352
197201
|
if (webhook.projectIds && webhook.projectIds.length > 0) {
|
|
197353
197202
|
output_manager_default.print("\n");
|
|
197354
|
-
output_manager_default.print(
|
|
197203
|
+
output_manager_default.print(import_chalk147.default.bold(" Projects\n\n"));
|
|
197355
197204
|
if (webhook.projectsMetadata && webhook.projectsMetadata.length > 0) {
|
|
197356
197205
|
for (const project of webhook.projectsMetadata) {
|
|
197357
197206
|
output_manager_default.print(` - ${project.name} (${project.id})
|
|
@@ -197368,11 +197217,11 @@ async function get(client2, argv) {
|
|
|
197368
197217
|
}
|
|
197369
197218
|
return 0;
|
|
197370
197219
|
}
|
|
197371
|
-
var
|
|
197220
|
+
var import_chalk147;
|
|
197372
197221
|
var init_get2 = __esm({
|
|
197373
197222
|
"src/commands/webhooks/get.ts"() {
|
|
197374
197223
|
"use strict";
|
|
197375
|
-
|
|
197224
|
+
import_chalk147 = __toESM3(require_source(), 1);
|
|
197376
197225
|
init_stamp();
|
|
197377
197226
|
init_format_date();
|
|
197378
197227
|
init_get_webhook();
|
|
@@ -197381,7 +197230,7 @@ var init_get2 = __esm({
|
|
|
197381
197230
|
init_output_format();
|
|
197382
197231
|
init_get();
|
|
197383
197232
|
init_output_manager();
|
|
197384
|
-
|
|
197233
|
+
init_command43();
|
|
197385
197234
|
init_get_args();
|
|
197386
197235
|
init_get_flags_specification();
|
|
197387
197236
|
init_error2();
|
|
@@ -197523,7 +197372,7 @@ async function create(client2, argv) {
|
|
|
197523
197372
|
const projectIds = opts["--project"];
|
|
197524
197373
|
if (!events || events.length === 0) {
|
|
197525
197374
|
output_manager_default.error(
|
|
197526
|
-
`At least one event is required. Use ${
|
|
197375
|
+
`At least one event is required. Use ${import_chalk148.default.cyan("--event <event>")} to specify events.`
|
|
197527
197376
|
);
|
|
197528
197377
|
output_manager_default.log(
|
|
197529
197378
|
`Example: ${getCommandName(
|
|
@@ -197543,7 +197392,7 @@ async function create(client2, argv) {
|
|
|
197543
197392
|
telemetry2.trackCliOptionProject(projectIds);
|
|
197544
197393
|
const { contextName } = await getScope(client2);
|
|
197545
197394
|
const createStamp = stamp_default();
|
|
197546
|
-
output_manager_default.spinner(`Creating webhook under ${
|
|
197395
|
+
output_manager_default.spinner(`Creating webhook under ${import_chalk148.default.bold(contextName)}`);
|
|
197547
197396
|
try {
|
|
197548
197397
|
const webhook = await createWebhook(client2, {
|
|
197549
197398
|
url: url3,
|
|
@@ -197551,27 +197400,27 @@ async function create(client2, argv) {
|
|
|
197551
197400
|
projectIds
|
|
197552
197401
|
});
|
|
197553
197402
|
output_manager_default.success(
|
|
197554
|
-
`Webhook created: ${
|
|
197403
|
+
`Webhook created: ${import_chalk148.default.bold(webhook.id)} ${createStamp()}`
|
|
197555
197404
|
);
|
|
197556
197405
|
output_manager_default.print("\n");
|
|
197557
|
-
output_manager_default.print(
|
|
197558
|
-
output_manager_default.print(` ${
|
|
197406
|
+
output_manager_default.print(import_chalk148.default.bold(" Webhook Details\n\n"));
|
|
197407
|
+
output_manager_default.print(` ${import_chalk148.default.cyan("ID")} ${webhook.id}
|
|
197559
197408
|
`);
|
|
197560
|
-
output_manager_default.print(` ${
|
|
197409
|
+
output_manager_default.print(` ${import_chalk148.default.cyan("URL")} ${webhook.url}
|
|
197561
197410
|
`);
|
|
197562
197411
|
output_manager_default.print(
|
|
197563
|
-
` ${
|
|
197412
|
+
` ${import_chalk148.default.cyan("Events")} ${webhook.events.join(", ")}
|
|
197564
197413
|
`
|
|
197565
197414
|
);
|
|
197566
197415
|
if (webhook.projectIds && webhook.projectIds.length > 0) {
|
|
197567
197416
|
output_manager_default.print(
|
|
197568
|
-
` ${
|
|
197417
|
+
` ${import_chalk148.default.cyan("Projects")} ${webhook.projectIds.join(", ")}
|
|
197569
197418
|
`
|
|
197570
197419
|
);
|
|
197571
197420
|
}
|
|
197572
197421
|
output_manager_default.print("\n");
|
|
197573
197422
|
output_manager_default.warn(
|
|
197574
|
-
`Save this secret - it will not be shown again: ${
|
|
197423
|
+
`Save this secret - it will not be shown again: ${import_chalk148.default.bold(webhook.secret)}`
|
|
197575
197424
|
);
|
|
197576
197425
|
output_manager_default.print("\n");
|
|
197577
197426
|
return 0;
|
|
@@ -197591,18 +197440,18 @@ async function create(client2, argv) {
|
|
|
197591
197440
|
throw err;
|
|
197592
197441
|
}
|
|
197593
197442
|
}
|
|
197594
|
-
var
|
|
197443
|
+
var import_chalk148;
|
|
197595
197444
|
var init_create2 = __esm({
|
|
197596
197445
|
"src/commands/webhooks/create.ts"() {
|
|
197597
197446
|
"use strict";
|
|
197598
|
-
|
|
197447
|
+
import_chalk148 = __toESM3(require_source(), 1);
|
|
197599
197448
|
init_create_webhook();
|
|
197600
197449
|
init_get_scope();
|
|
197601
197450
|
init_stamp();
|
|
197602
197451
|
init_pkg_name();
|
|
197603
197452
|
init_output_manager();
|
|
197604
197453
|
init_create();
|
|
197605
|
-
|
|
197454
|
+
init_command43();
|
|
197606
197455
|
init_get_args();
|
|
197607
197456
|
init_get_flags_specification();
|
|
197608
197457
|
init_error2();
|
|
@@ -197673,7 +197522,7 @@ async function rm7(client2, argv) {
|
|
|
197673
197522
|
const { contextName } = await getScope(client2);
|
|
197674
197523
|
if (args2.length !== 1) {
|
|
197675
197524
|
output_manager_default.error(
|
|
197676
|
-
`Invalid number of arguments. Usage: ${
|
|
197525
|
+
`Invalid number of arguments. Usage: ${import_chalk149.default.cyan(
|
|
197677
197526
|
`${getCommandName("webhooks rm <id>")}`
|
|
197678
197527
|
)}`
|
|
197679
197528
|
);
|
|
@@ -197701,10 +197550,10 @@ async function rm7(client2, argv) {
|
|
|
197701
197550
|
return 0;
|
|
197702
197551
|
}
|
|
197703
197552
|
const removeStamp = stamp_default();
|
|
197704
|
-
output_manager_default.spinner(`Removing webhook under ${
|
|
197553
|
+
output_manager_default.spinner(`Removing webhook under ${import_chalk149.default.bold(contextName)}`);
|
|
197705
197554
|
try {
|
|
197706
197555
|
await deleteWebhook(client2, webhookId);
|
|
197707
|
-
output_manager_default.success(`Webhook ${
|
|
197556
|
+
output_manager_default.success(`Webhook ${import_chalk149.default.bold(webhookId)} removed ${removeStamp()}`);
|
|
197708
197557
|
return 0;
|
|
197709
197558
|
} catch (err) {
|
|
197710
197559
|
if (isAPIError(err) && err.status === 404) {
|
|
@@ -197714,11 +197563,11 @@ async function rm7(client2, argv) {
|
|
|
197714
197563
|
throw err;
|
|
197715
197564
|
}
|
|
197716
197565
|
}
|
|
197717
|
-
var
|
|
197566
|
+
var import_chalk149;
|
|
197718
197567
|
var init_rm12 = __esm({
|
|
197719
197568
|
"src/commands/webhooks/rm.ts"() {
|
|
197720
197569
|
"use strict";
|
|
197721
|
-
|
|
197570
|
+
import_chalk149 = __toESM3(require_source(), 1);
|
|
197722
197571
|
init_delete_webhook();
|
|
197723
197572
|
init_get_webhook();
|
|
197724
197573
|
init_get_scope();
|
|
@@ -197727,7 +197576,7 @@ var init_rm12 = __esm({
|
|
|
197727
197576
|
init_pkg_name();
|
|
197728
197577
|
init_output_manager();
|
|
197729
197578
|
init_rm11();
|
|
197730
|
-
|
|
197579
|
+
init_command43();
|
|
197731
197580
|
init_get_args();
|
|
197732
197581
|
init_get_flags_specification();
|
|
197733
197582
|
init_error2();
|
|
@@ -197849,7 +197698,7 @@ var init_webhooks2 = __esm({
|
|
|
197849
197698
|
init_get2();
|
|
197850
197699
|
init_create2();
|
|
197851
197700
|
init_rm12();
|
|
197852
|
-
|
|
197701
|
+
init_command43();
|
|
197853
197702
|
init_help();
|
|
197854
197703
|
init_get_flags_specification();
|
|
197855
197704
|
init_webhooks();
|
|
@@ -197926,7 +197775,7 @@ var init_whoami2 = __esm({
|
|
|
197926
197775
|
"src/commands/whoami/index.ts"() {
|
|
197927
197776
|
"use strict";
|
|
197928
197777
|
init_help();
|
|
197929
|
-
|
|
197778
|
+
init_command41();
|
|
197930
197779
|
init_get_scope();
|
|
197931
197780
|
init_get_args();
|
|
197932
197781
|
init_get_flags_specification();
|
|
@@ -197938,9 +197787,9 @@ var init_whoami2 = __esm({
|
|
|
197938
197787
|
});
|
|
197939
197788
|
|
|
197940
197789
|
// src/index.ts
|
|
197941
|
-
var
|
|
197790
|
+
var import_error_utils37 = __toESM3(require_dist2(), 1);
|
|
197942
197791
|
var import_fs_extra24 = __toESM3(require_lib(), 1);
|
|
197943
|
-
var
|
|
197792
|
+
var import_chalk150 = __toESM3(require_source(), 1);
|
|
197944
197793
|
var import_epipebomb = __toESM3(require_epipebomb(), 1);
|
|
197945
197794
|
import { join as join25 } from "path";
|
|
197946
197795
|
import { existsSync as existsSync5 } from "fs";
|
|
@@ -198553,12 +198402,6 @@ var RootTelemetryClient = class extends TelemetryClient {
|
|
|
198553
198402
|
value: actual
|
|
198554
198403
|
});
|
|
198555
198404
|
}
|
|
198556
|
-
trackCliCommandLogsv2(actual) {
|
|
198557
|
-
this.trackCliCommand({
|
|
198558
|
-
command: "logsv2",
|
|
198559
|
-
value: actual
|
|
198560
|
-
});
|
|
198561
|
-
}
|
|
198562
198405
|
trackCliCommandMicrofrontends(actual) {
|
|
198563
198406
|
this.trackCliCommand({
|
|
198564
198407
|
command: "microfrontends",
|
|
@@ -198777,6 +198620,7 @@ var help2 = () => `
|
|
|
198777
198620
|
${import_chalk29.default.dim("Advanced")}
|
|
198778
198621
|
|
|
198779
198622
|
alias [cmd] Manages your domain aliases
|
|
198623
|
+
api [endpoint] Make authenticated HTTP requests to the Vercel API [beta]
|
|
198780
198624
|
bisect Use binary search to find the deployment that introduced a bug
|
|
198781
198625
|
certs [cmd] Manages your SSL certificates
|
|
198782
198626
|
curl [path] cURL requests to your linked project's deployment [beta]
|
|
@@ -198895,7 +198739,7 @@ import { determineAgent as determineAgent4 } from "@vercel/detect-agent";
|
|
|
198895
198739
|
try {
|
|
198896
198740
|
process.cwd();
|
|
198897
198741
|
} catch (err) {
|
|
198898
|
-
if ((0,
|
|
198742
|
+
if ((0, import_error_utils37.isError)(err) && err.message.includes("uv_cwd")) {
|
|
198899
198743
|
console.error("Error: The current working directory does not exist.");
|
|
198900
198744
|
process.exit(1);
|
|
198901
198745
|
}
|
|
@@ -199001,13 +198845,13 @@ var main19 = async () => {
|
|
|
199001
198845
|
const betaCommands = ["api", "curl", "webhooks"];
|
|
199002
198846
|
if (betaCommands.includes(targetOrSubcommand)) {
|
|
199003
198847
|
output_manager_default.print(
|
|
199004
|
-
`${
|
|
199005
|
-
`${getTitleName()} CLI ${pkg_default.version} | ${
|
|
198848
|
+
`${import_chalk150.default.grey(
|
|
198849
|
+
`${getTitleName()} CLI ${pkg_default.version} | ${import_chalk150.default.bold(targetOrSubcommand)} is in beta \u2014 https://vercel.com/feedback`
|
|
199006
198850
|
)}
|
|
199007
198851
|
`
|
|
199008
198852
|
);
|
|
199009
198853
|
} else {
|
|
199010
|
-
output_manager_default.print(`${
|
|
198854
|
+
output_manager_default.print(`${import_chalk150.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
|
199011
198855
|
`);
|
|
199012
198856
|
}
|
|
199013
198857
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
|
@@ -199026,7 +198870,7 @@ var main19 = async () => {
|
|
|
199026
198870
|
output_manager_default.error(
|
|
199027
198871
|
`An unexpected error occurred while trying to create the global directory "${humanizePath(
|
|
199028
198872
|
VERCEL_DIR4
|
|
199029
|
-
)}" ${(0,
|
|
198873
|
+
)}" ${(0, import_error_utils37.errorToString)(err)}`
|
|
199030
198874
|
);
|
|
199031
198875
|
return 1;
|
|
199032
198876
|
}
|
|
@@ -199034,7 +198878,7 @@ var main19 = async () => {
|
|
|
199034
198878
|
try {
|
|
199035
198879
|
config2 = readConfigFile();
|
|
199036
198880
|
} catch (err) {
|
|
199037
|
-
if ((0,
|
|
198881
|
+
if ((0, import_error_utils37.isErrnoException)(err) && err.code === "ENOENT") {
|
|
199038
198882
|
config2 = defaultGlobalConfig;
|
|
199039
198883
|
try {
|
|
199040
198884
|
writeToConfigFile(config2);
|
|
@@ -199042,7 +198886,7 @@ var main19 = async () => {
|
|
|
199042
198886
|
output_manager_default.error(
|
|
199043
198887
|
`An unexpected error occurred while trying to save the config to "${humanizePath(
|
|
199044
198888
|
VERCEL_CONFIG_PATH
|
|
199045
|
-
)}" ${(0,
|
|
198889
|
+
)}" ${(0, import_error_utils37.errorToString)(err2)}`
|
|
199046
198890
|
);
|
|
199047
198891
|
return 1;
|
|
199048
198892
|
}
|
|
@@ -199050,7 +198894,7 @@ var main19 = async () => {
|
|
|
199050
198894
|
output_manager_default.error(
|
|
199051
198895
|
`An unexpected error occurred while trying to read the config in "${humanizePath(
|
|
199052
198896
|
VERCEL_CONFIG_PATH
|
|
199053
|
-
)}" ${(0,
|
|
198897
|
+
)}" ${(0, import_error_utils37.errorToString)(err)}`
|
|
199054
198898
|
);
|
|
199055
198899
|
return 1;
|
|
199056
198900
|
}
|
|
@@ -199059,7 +198903,7 @@ var main19 = async () => {
|
|
|
199059
198903
|
try {
|
|
199060
198904
|
authConfig = readAuthConfigFile();
|
|
199061
198905
|
} catch (err) {
|
|
199062
|
-
if ((0,
|
|
198906
|
+
if ((0, import_error_utils37.isErrnoException)(err) && err.code === "ENOENT") {
|
|
199063
198907
|
authConfig = defaultAuthConfig;
|
|
199064
198908
|
try {
|
|
199065
198909
|
writeToAuthConfigFile(authConfig);
|
|
@@ -199067,7 +198911,7 @@ var main19 = async () => {
|
|
|
199067
198911
|
output_manager_default.error(
|
|
199068
198912
|
`An unexpected error occurred while trying to write the auth config to "${humanizePath(
|
|
199069
198913
|
VERCEL_AUTH_CONFIG_PATH
|
|
199070
|
-
)}" ${(0,
|
|
198914
|
+
)}" ${(0, import_error_utils37.errorToString)(err2)}`
|
|
199071
198915
|
);
|
|
199072
198916
|
return 1;
|
|
199073
198917
|
}
|
|
@@ -199075,7 +198919,7 @@ var main19 = async () => {
|
|
|
199075
198919
|
output_manager_default.error(
|
|
199076
198920
|
`An unexpected error occurred while trying to read the auth config in "${humanizePath(
|
|
199077
198921
|
VERCEL_AUTH_CONFIG_PATH
|
|
199078
|
-
)}" ${(0,
|
|
198922
|
+
)}" ${(0, import_error_utils37.errorToString)(err)}`
|
|
199079
198923
|
);
|
|
199080
198924
|
return 1;
|
|
199081
198925
|
}
|
|
@@ -199257,7 +199101,7 @@ var main19 = async () => {
|
|
|
199257
199101
|
if (err instanceof Error) {
|
|
199258
199102
|
output_manager_default.debug(err.stack || err.toString());
|
|
199259
199103
|
}
|
|
199260
|
-
if ((0,
|
|
199104
|
+
if ((0, import_error_utils37.isErrnoException)(err) && err.code === "NOT_AUTHORIZED") {
|
|
199261
199105
|
output_manager_default.prettyError({
|
|
199262
199106
|
message: `You do not have access to the specified account`,
|
|
199263
199107
|
link: "https://err.sh/vercel/scope-not-accessible"
|
|
@@ -199265,7 +199109,7 @@ var main19 = async () => {
|
|
|
199265
199109
|
return 1;
|
|
199266
199110
|
}
|
|
199267
199111
|
output_manager_default.error(
|
|
199268
|
-
`Not able to load user because of unexpected error: ${(0,
|
|
199112
|
+
`Not able to load user because of unexpected error: ${(0, import_error_utils37.errorToString)(err)}`
|
|
199269
199113
|
);
|
|
199270
199114
|
return 1;
|
|
199271
199115
|
}
|
|
@@ -199280,14 +199124,14 @@ var main19 = async () => {
|
|
|
199280
199124
|
try {
|
|
199281
199125
|
teams2 = await getTeams(client);
|
|
199282
199126
|
} catch (err) {
|
|
199283
|
-
if ((0,
|
|
199127
|
+
if ((0, import_error_utils37.isErrnoException)(err) && err.code === "not_authorized") {
|
|
199284
199128
|
output_manager_default.prettyError({
|
|
199285
199129
|
message: `You do not have access to the specified team`,
|
|
199286
199130
|
link: "https://err.sh/vercel/scope-not-accessible"
|
|
199287
199131
|
});
|
|
199288
199132
|
return 1;
|
|
199289
199133
|
}
|
|
199290
|
-
if ((0,
|
|
199134
|
+
if ((0, import_error_utils37.isErrnoException)(err) && err.code === "rate_limited") {
|
|
199291
199135
|
output_manager_default.prettyError({
|
|
199292
199136
|
message: "Rate limited. Too many requests to the same endpoint: /teams"
|
|
199293
199137
|
});
|
|
@@ -199320,7 +199164,7 @@ var main19 = async () => {
|
|
|
199320
199164
|
);
|
|
199321
199165
|
telemetry2.trackCliExtension();
|
|
199322
199166
|
} catch (err) {
|
|
199323
|
-
if ((0,
|
|
199167
|
+
if ((0, import_error_utils37.isErrnoException)(err) && err.code === "ENOENT") {
|
|
199324
199168
|
if (handleCommandTypo({
|
|
199325
199169
|
command: targetCommand2,
|
|
199326
199170
|
availableCommands: commandNames
|
|
@@ -199438,10 +199282,6 @@ var main19 = async () => {
|
|
|
199438
199282
|
telemetry2.trackCliCommandLogs(userSuppliedSubCommand);
|
|
199439
199283
|
func = (init_logs3(), __toCommonJS3(logs_exports)).default;
|
|
199440
199284
|
break;
|
|
199441
|
-
case "logsv2":
|
|
199442
|
-
telemetry2.trackCliCommandLogsv2(userSuppliedSubCommand);
|
|
199443
|
-
func = (init_logsv22(), __toCommonJS3(logsv2_exports)).default;
|
|
199444
|
-
break;
|
|
199445
199285
|
case "mcp":
|
|
199446
199286
|
func = (init_mcp2(), __toCommonJS3(mcp_exports)).default;
|
|
199447
199287
|
break;
|
|
@@ -199538,7 +199378,7 @@ var main19 = async () => {
|
|
|
199538
199378
|
exitCode2 = await func(client);
|
|
199539
199379
|
}
|
|
199540
199380
|
} catch (err) {
|
|
199541
|
-
if ((0,
|
|
199381
|
+
if ((0, import_error_utils37.isErrnoException)(err) && err.code === "ENOTFOUND") {
|
|
199542
199382
|
const matches = /getaddrinfo ENOTFOUND (.*)$/.exec(err.message || "");
|
|
199543
199383
|
if (matches && matches[1]) {
|
|
199544
199384
|
const hostname3 = matches[1];
|
|
@@ -199553,7 +199393,7 @@ var main19 = async () => {
|
|
|
199553
199393
|
}
|
|
199554
199394
|
return 1;
|
|
199555
199395
|
}
|
|
199556
|
-
if ((0,
|
|
199396
|
+
if ((0, import_error_utils37.isErrnoException)(err) && err.code === "ECONNRESET") {
|
|
199557
199397
|
const matches = /request to https:\/\/(.*?)\//.exec(err.message || "");
|
|
199558
199398
|
const hostname3 = matches?.[1];
|
|
199559
199399
|
if (hostname3) {
|
|
@@ -199565,7 +199405,7 @@ var main19 = async () => {
|
|
|
199565
199405
|
}
|
|
199566
199406
|
return 1;
|
|
199567
199407
|
}
|
|
199568
|
-
if ((0,
|
|
199408
|
+
if ((0, import_error_utils37.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
|
199569
199409
|
output_manager_default.prettyError(err);
|
|
199570
199410
|
return 1;
|
|
199571
199411
|
}
|
|
@@ -199574,7 +199414,7 @@ var main19 = async () => {
|
|
|
199574
199414
|
output_manager_default.prettyError(err);
|
|
199575
199415
|
return 1;
|
|
199576
199416
|
}
|
|
199577
|
-
if ((0,
|
|
199417
|
+
if ((0, import_error_utils37.isErrnoException)(err)) {
|
|
199578
199418
|
if (typeof err.stack === "string") {
|
|
199579
199419
|
output_manager_default.debug(err.stack);
|
|
199580
199420
|
}
|
|
@@ -199598,16 +199438,16 @@ main19().then(async (exitCode2) => {
|
|
|
199598
199438
|
if (latest) {
|
|
199599
199439
|
const changelog = `https://github.com/vercel/vercel/releases/tag/vercel%40${latest}`;
|
|
199600
199440
|
if (isTTY2) {
|
|
199601
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
199602
|
-
` The latest update ${
|
|
199441
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk150.default.magenta(
|
|
199442
|
+
` The latest update ${import_chalk150.default.italic(
|
|
199603
199443
|
"may"
|
|
199604
199444
|
)} fix any errors that occurred.`
|
|
199605
199445
|
) : "";
|
|
199606
199446
|
output_manager_default.print(
|
|
199607
199447
|
`
|
|
199608
|
-
Update available for Vercel CLI (${
|
|
199448
|
+
Update available for Vercel CLI (${import_chalk150.default.gray(
|
|
199609
199449
|
`v${pkg_default.version}`
|
|
199610
|
-
)} \u2192 ${
|
|
199450
|
+
)} \u2192 ${import_chalk150.default.green(`v${latest}`)})${errorMsg}
|
|
199611
199451
|
`
|
|
199612
199452
|
);
|
|
199613
199453
|
const action = await client.input.expand({
|
|
@@ -199627,20 +199467,20 @@ Update available for Vercel CLI (${import_chalk151.default.gray(
|
|
|
199627
199467
|
await (0, import_open9.default)(changelog);
|
|
199628
199468
|
}
|
|
199629
199469
|
} else {
|
|
199630
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
199470
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk150.default.magenta(
|
|
199631
199471
|
`
|
|
199632
199472
|
|
|
199633
|
-
The latest update ${
|
|
199473
|
+
The latest update ${import_chalk150.default.italic(
|
|
199634
199474
|
"may"
|
|
199635
199475
|
)} fix any errors that occurred.`
|
|
199636
199476
|
) : "";
|
|
199637
199477
|
output_manager_default.print(
|
|
199638
199478
|
box(
|
|
199639
|
-
`Update available! ${
|
|
199479
|
+
`Update available! ${import_chalk150.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk150.default.green(
|
|
199640
199480
|
`v${latest}`
|
|
199641
199481
|
)}
|
|
199642
199482
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
199643
|
-
Run ${
|
|
199483
|
+
Run ${import_chalk150.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
|
199644
199484
|
)
|
|
199645
199485
|
);
|
|
199646
199486
|
output_manager_default.print("\n");
|