vercel 50.4.10 → 50.4.11
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 +1210 -546
- package/package.json +6 -6
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: () => isErrnoException22,
|
|
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 isErrnoException22 = (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 isErrnoException22(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(chalk139, 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 = chalk139;
|
|
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 = (chalk139, 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(chalk139, 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(chalk139, 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 chalk140 = {};
|
|
4170
|
+
applyOptions(chalk140, options);
|
|
4171
|
+
chalk140.template = (...arguments_) => chalkTag(chalk140.template, ...arguments_);
|
|
4172
|
+
Object.setPrototypeOf(chalk140, Chalk.prototype);
|
|
4173
|
+
Object.setPrototypeOf(chalk140.template, chalk140);
|
|
4174
|
+
chalk140.template.constructor = () => {
|
|
4175
4175
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
4176
4176
|
};
|
|
4177
|
-
|
|
4178
|
-
return
|
|
4177
|
+
chalk140.template.Instance = ChalkClass;
|
|
4178
|
+
return chalk140.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 = (chalk140, ...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(chalk140, parts.join(""));
|
|
4306
4306
|
};
|
|
4307
4307
|
Object.defineProperties(Chalk.prototype, styles);
|
|
4308
|
-
var
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
module2.exports =
|
|
4308
|
+
var chalk139 = Chalk();
|
|
4309
|
+
chalk139.supportsColor = stdoutColor;
|
|
4310
|
+
chalk139.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
4311
|
+
chalk139.stderr.supportsColor = stderrColor;
|
|
4312
|
+
module2.exports = chalk139;
|
|
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(chalk139, 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 = chalk139;
|
|
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 = (chalk139, 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(chalk139, 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(chalk139, 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 chalk139 = {};
|
|
7299
|
+
applyOptions(chalk139, options);
|
|
7300
|
+
chalk139.template = function() {
|
|
7301
7301
|
const args2 = [].slice.call(arguments);
|
|
7302
|
-
return chalkTag.apply(null, [
|
|
7302
|
+
return chalkTag.apply(null, [chalk139.template].concat(args2));
|
|
7303
7303
|
};
|
|
7304
|
-
Object.setPrototypeOf(
|
|
7305
|
-
Object.setPrototypeOf(
|
|
7306
|
-
|
|
7307
|
-
return
|
|
7304
|
+
Object.setPrototypeOf(chalk139, Chalk.prototype);
|
|
7305
|
+
Object.setPrototypeOf(chalk139.template, chalk139);
|
|
7306
|
+
chalk139.template.constructor = Chalk;
|
|
7307
|
+
return chalk139.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(chalk139, 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(chalk139, 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 chalk139 = require_chalk();
|
|
9388
9388
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
|
9389
9389
|
var main19 = {
|
|
9390
|
-
info:
|
|
9391
|
-
success:
|
|
9392
|
-
warning:
|
|
9393
|
-
error:
|
|
9390
|
+
info: chalk139.blue("\u2139"),
|
|
9391
|
+
success: chalk139.green("\u2714"),
|
|
9392
|
+
warning: chalk139.yellow("\u26A0"),
|
|
9393
|
+
error: chalk139.red("\u2716")
|
|
9394
9394
|
};
|
|
9395
9395
|
var fallbacks = {
|
|
9396
|
-
info:
|
|
9397
|
-
success:
|
|
9398
|
-
warning:
|
|
9399
|
-
error:
|
|
9396
|
+
info: chalk139.blue("i"),
|
|
9397
|
+
success: chalk139.green("\u221A"),
|
|
9398
|
+
warning: chalk139.yellow("\u203C"),
|
|
9399
|
+
error: chalk139.red("\xD7")
|
|
9400
9400
|
};
|
|
9401
9401
|
module2.exports = isSupported ? main19 : 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 chalk139 = 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 = chalk139[this.color](frame);
|
|
9885
9885
|
}
|
|
9886
9886
|
this.frameIndex = ++this.frameIndex % frames.length;
|
|
9887
9887
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
|
@@ -33811,9 +33811,141 @@ var init_command24 = __esm({
|
|
|
33811
33811
|
}
|
|
33812
33812
|
});
|
|
33813
33813
|
|
|
33814
|
+
// src/commands/logsv2/command.ts
|
|
33815
|
+
var logsv2Command;
|
|
33816
|
+
var init_command25 = __esm({
|
|
33817
|
+
"src/commands/logsv2/command.ts"() {
|
|
33818
|
+
"use strict";
|
|
33819
|
+
init_pkg_name();
|
|
33820
|
+
logsv2Command = {
|
|
33821
|
+
name: "logsv2",
|
|
33822
|
+
aliases: [],
|
|
33823
|
+
description: "Display request logs for a project using the new logs API.",
|
|
33824
|
+
hidden: true,
|
|
33825
|
+
arguments: [],
|
|
33826
|
+
options: [
|
|
33827
|
+
{
|
|
33828
|
+
name: "project",
|
|
33829
|
+
shorthand: "p",
|
|
33830
|
+
type: String,
|
|
33831
|
+
deprecated: false,
|
|
33832
|
+
description: "Project ID or name (defaults to linked project)"
|
|
33833
|
+
},
|
|
33834
|
+
{
|
|
33835
|
+
name: "deployment",
|
|
33836
|
+
shorthand: "d",
|
|
33837
|
+
type: String,
|
|
33838
|
+
deprecated: false,
|
|
33839
|
+
description: "Filter logs to a specific deployment ID or URL"
|
|
33840
|
+
},
|
|
33841
|
+
{
|
|
33842
|
+
name: "environment",
|
|
33843
|
+
shorthand: null,
|
|
33844
|
+
type: String,
|
|
33845
|
+
deprecated: false,
|
|
33846
|
+
description: "Filter by environment: production or preview"
|
|
33847
|
+
},
|
|
33848
|
+
{
|
|
33849
|
+
name: "level",
|
|
33850
|
+
shorthand: null,
|
|
33851
|
+
type: [String],
|
|
33852
|
+
deprecated: false,
|
|
33853
|
+
description: "Filter by log level: error, warning, info, fatal"
|
|
33854
|
+
},
|
|
33855
|
+
{
|
|
33856
|
+
name: "status-code",
|
|
33857
|
+
shorthand: null,
|
|
33858
|
+
type: String,
|
|
33859
|
+
deprecated: false,
|
|
33860
|
+
description: "Filter by HTTP status code (e.g., 500, 4xx)"
|
|
33861
|
+
},
|
|
33862
|
+
{
|
|
33863
|
+
name: "source",
|
|
33864
|
+
shorthand: null,
|
|
33865
|
+
type: [String],
|
|
33866
|
+
deprecated: false,
|
|
33867
|
+
description: "Filter by source: serverless, edge-function, edge-middleware, static"
|
|
33868
|
+
},
|
|
33869
|
+
{
|
|
33870
|
+
name: "since",
|
|
33871
|
+
shorthand: null,
|
|
33872
|
+
type: String,
|
|
33873
|
+
deprecated: false,
|
|
33874
|
+
description: "Start time (ISO format or relative: 1h, 30m)"
|
|
33875
|
+
},
|
|
33876
|
+
{
|
|
33877
|
+
name: "until",
|
|
33878
|
+
shorthand: null,
|
|
33879
|
+
type: String,
|
|
33880
|
+
deprecated: false,
|
|
33881
|
+
description: "End time (ISO format or relative, default: now)"
|
|
33882
|
+
},
|
|
33883
|
+
{
|
|
33884
|
+
name: "limit",
|
|
33885
|
+
shorthand: "n",
|
|
33886
|
+
type: Number,
|
|
33887
|
+
deprecated: false,
|
|
33888
|
+
description: "Maximum number of results (default: 100)"
|
|
33889
|
+
},
|
|
33890
|
+
{
|
|
33891
|
+
name: "json",
|
|
33892
|
+
shorthand: "j",
|
|
33893
|
+
type: Boolean,
|
|
33894
|
+
deprecated: false,
|
|
33895
|
+
description: "Output logs as JSON Lines for piping to other tools"
|
|
33896
|
+
},
|
|
33897
|
+
{
|
|
33898
|
+
name: "query",
|
|
33899
|
+
shorthand: "q",
|
|
33900
|
+
type: String,
|
|
33901
|
+
deprecated: false,
|
|
33902
|
+
description: "Full-text search query"
|
|
33903
|
+
},
|
|
33904
|
+
{
|
|
33905
|
+
name: "request-id",
|
|
33906
|
+
shorthand: null,
|
|
33907
|
+
type: String,
|
|
33908
|
+
deprecated: false,
|
|
33909
|
+
description: "Filter by request ID"
|
|
33910
|
+
}
|
|
33911
|
+
],
|
|
33912
|
+
examples: [
|
|
33913
|
+
{
|
|
33914
|
+
name: "Display recent logs for the linked project",
|
|
33915
|
+
value: `${packageName} logsv2`
|
|
33916
|
+
},
|
|
33917
|
+
{
|
|
33918
|
+
name: "Display error logs from the last hour",
|
|
33919
|
+
value: `${packageName} logsv2 --level error --since 1h`
|
|
33920
|
+
},
|
|
33921
|
+
{
|
|
33922
|
+
name: "Display logs for a specific deployment",
|
|
33923
|
+
value: `${packageName} logsv2 --deployment dpl_xxxxx`
|
|
33924
|
+
},
|
|
33925
|
+
{
|
|
33926
|
+
name: "Filter logs by status code and output as JSON",
|
|
33927
|
+
value: `${packageName} logsv2 --status-code 500 --json`
|
|
33928
|
+
},
|
|
33929
|
+
{
|
|
33930
|
+
name: "Search logs and pipe to jq",
|
|
33931
|
+
value: `${packageName} logsv2 --query "timeout" --json | jq '.message'`
|
|
33932
|
+
},
|
|
33933
|
+
{
|
|
33934
|
+
name: "Display production logs only",
|
|
33935
|
+
value: `${packageName} logsv2 --environment production`
|
|
33936
|
+
},
|
|
33937
|
+
{
|
|
33938
|
+
name: "Display logs for a specific request",
|
|
33939
|
+
value: `${packageName} logsv2 --request-id req_xxxxx`
|
|
33940
|
+
}
|
|
33941
|
+
]
|
|
33942
|
+
};
|
|
33943
|
+
}
|
|
33944
|
+
});
|
|
33945
|
+
|
|
33814
33946
|
// src/commands/mcp/command.ts
|
|
33815
33947
|
var mcpCommand;
|
|
33816
|
-
var
|
|
33948
|
+
var init_command26 = __esm({
|
|
33817
33949
|
"src/commands/mcp/command.ts"() {
|
|
33818
33950
|
"use strict";
|
|
33819
33951
|
init_pkg_name();
|
|
@@ -33847,7 +33979,7 @@ var init_command25 = __esm({
|
|
|
33847
33979
|
|
|
33848
33980
|
// src/commands/microfrontends/command.ts
|
|
33849
33981
|
var pullSubcommand2, microfrontendsCommand;
|
|
33850
|
-
var
|
|
33982
|
+
var init_command27 = __esm({
|
|
33851
33983
|
"src/commands/microfrontends/command.ts"() {
|
|
33852
33984
|
"use strict";
|
|
33853
33985
|
init_pkg_name();
|
|
@@ -33890,7 +34022,7 @@ var init_command26 = __esm({
|
|
|
33890
34022
|
|
|
33891
34023
|
// src/commands/open/command.ts
|
|
33892
34024
|
var openCommand;
|
|
33893
|
-
var
|
|
34025
|
+
var init_command28 = __esm({
|
|
33894
34026
|
"src/commands/open/command.ts"() {
|
|
33895
34027
|
"use strict";
|
|
33896
34028
|
init_pkg_name();
|
|
@@ -33912,7 +34044,7 @@ var init_command27 = __esm({
|
|
|
33912
34044
|
|
|
33913
34045
|
// src/commands/project/command.ts
|
|
33914
34046
|
var addSubcommand6, inspectSubcommand2, listSubcommand7, removeSubcommand8, projectCommand;
|
|
33915
|
-
var
|
|
34047
|
+
var init_command29 = __esm({
|
|
33916
34048
|
"src/commands/project/command.ts"() {
|
|
33917
34049
|
"use strict";
|
|
33918
34050
|
init_pkg_name();
|
|
@@ -34023,7 +34155,7 @@ var init_command28 = __esm({
|
|
|
34023
34155
|
|
|
34024
34156
|
// src/commands/promote/command.ts
|
|
34025
34157
|
var statusSubcommand2, promoteCommand;
|
|
34026
|
-
var
|
|
34158
|
+
var init_command30 = __esm({
|
|
34027
34159
|
"src/commands/promote/command.ts"() {
|
|
34028
34160
|
"use strict";
|
|
34029
34161
|
init_pkg_name();
|
|
@@ -34092,7 +34224,7 @@ var init_command29 = __esm({
|
|
|
34092
34224
|
|
|
34093
34225
|
// src/commands/pull/command.ts
|
|
34094
34226
|
var pullCommand;
|
|
34095
|
-
var
|
|
34227
|
+
var init_command31 = __esm({
|
|
34096
34228
|
"src/commands/pull/command.ts"() {
|
|
34097
34229
|
"use strict";
|
|
34098
34230
|
init_pkg_name();
|
|
@@ -34164,7 +34296,7 @@ var init_command30 = __esm({
|
|
|
34164
34296
|
|
|
34165
34297
|
// src/commands/redeploy/command.ts
|
|
34166
34298
|
var redeployCommand;
|
|
34167
|
-
var
|
|
34299
|
+
var init_command32 = __esm({
|
|
34168
34300
|
"src/commands/redeploy/command.ts"() {
|
|
34169
34301
|
"use strict";
|
|
34170
34302
|
init_pkg_name();
|
|
@@ -34215,7 +34347,7 @@ var init_command31 = __esm({
|
|
|
34215
34347
|
|
|
34216
34348
|
// src/commands/redirects/command.ts
|
|
34217
34349
|
var listSubcommand8, listVersionsSubcommand, addSubcommand7, uploadSubcommand, removeSubcommand9, promoteSubcommand, restoreSubcommand, redirectsCommand;
|
|
34218
|
-
var
|
|
34350
|
+
var init_command33 = __esm({
|
|
34219
34351
|
"src/commands/redirects/command.ts"() {
|
|
34220
34352
|
"use strict";
|
|
34221
34353
|
init_pkg_name();
|
|
@@ -34500,7 +34632,7 @@ var init_command32 = __esm({
|
|
|
34500
34632
|
|
|
34501
34633
|
// src/commands/remove/command.ts
|
|
34502
34634
|
var removeCommand;
|
|
34503
|
-
var
|
|
34635
|
+
var init_command34 = __esm({
|
|
34504
34636
|
"src/commands/remove/command.ts"() {
|
|
34505
34637
|
"use strict";
|
|
34506
34638
|
init_pkg_name();
|
|
@@ -34550,7 +34682,7 @@ var init_command33 = __esm({
|
|
|
34550
34682
|
|
|
34551
34683
|
// src/commands/rollback/command.ts
|
|
34552
34684
|
var statusSubcommand3, rollbackCommand;
|
|
34553
|
-
var
|
|
34685
|
+
var init_command35 = __esm({
|
|
34554
34686
|
"src/commands/rollback/command.ts"() {
|
|
34555
34687
|
"use strict";
|
|
34556
34688
|
init_pkg_name();
|
|
@@ -34611,7 +34743,7 @@ var init_command34 = __esm({
|
|
|
34611
34743
|
|
|
34612
34744
|
// src/commands/rolling-release/command.ts
|
|
34613
34745
|
var configureSubcommand, startSubcommand, approveSubcommand, abortSubcommand, completeSubcommand, fetchSubcommand, rollingReleaseCommand;
|
|
34614
|
-
var
|
|
34746
|
+
var init_command36 = __esm({
|
|
34615
34747
|
"src/commands/rolling-release/command.ts"() {
|
|
34616
34748
|
"use strict";
|
|
34617
34749
|
init_arg_common();
|
|
@@ -34805,7 +34937,7 @@ var init_command35 = __esm({
|
|
|
34805
34937
|
|
|
34806
34938
|
// src/commands/target/command.ts
|
|
34807
34939
|
var listSubcommand9, targetCommand;
|
|
34808
|
-
var
|
|
34940
|
+
var init_command37 = __esm({
|
|
34809
34941
|
"src/commands/target/command.ts"() {
|
|
34810
34942
|
"use strict";
|
|
34811
34943
|
init_pkg_name();
|
|
@@ -34836,7 +34968,7 @@ var init_command36 = __esm({
|
|
|
34836
34968
|
|
|
34837
34969
|
// src/commands/teams/command.ts
|
|
34838
34970
|
var addSubcommand8, listSubcommand10, switchSubcommand, inviteSubcommand, teamsCommand;
|
|
34839
|
-
var
|
|
34971
|
+
var init_command38 = __esm({
|
|
34840
34972
|
"src/commands/teams/command.ts"() {
|
|
34841
34973
|
"use strict";
|
|
34842
34974
|
init_pkg_name();
|
|
@@ -34927,7 +35059,7 @@ var init_command37 = __esm({
|
|
|
34927
35059
|
|
|
34928
35060
|
// src/commands/telemetry/command.ts
|
|
34929
35061
|
var statusSubcommand4, enableSubcommand2, flushSubcommand, disableSubcommand2, telemetryCommand;
|
|
34930
|
-
var
|
|
35062
|
+
var init_command39 = __esm({
|
|
34931
35063
|
"src/commands/telemetry/command.ts"() {
|
|
34932
35064
|
"use strict";
|
|
34933
35065
|
statusSubcommand4 = {
|
|
@@ -34982,7 +35114,7 @@ var init_command38 = __esm({
|
|
|
34982
35114
|
|
|
34983
35115
|
// src/commands/upgrade/command.ts
|
|
34984
35116
|
var upgradeCommand;
|
|
34985
|
-
var
|
|
35117
|
+
var init_command40 = __esm({
|
|
34986
35118
|
"src/commands/upgrade/command.ts"() {
|
|
34987
35119
|
"use strict";
|
|
34988
35120
|
init_pkg_name();
|
|
@@ -35027,7 +35159,7 @@ var init_command39 = __esm({
|
|
|
35027
35159
|
|
|
35028
35160
|
// src/commands/whoami/command.ts
|
|
35029
35161
|
var whoamiCommand;
|
|
35030
|
-
var
|
|
35162
|
+
var init_command41 = __esm({
|
|
35031
35163
|
"src/commands/whoami/command.ts"() {
|
|
35032
35164
|
"use strict";
|
|
35033
35165
|
init_pkg_name();
|
|
@@ -35049,7 +35181,7 @@ var init_command40 = __esm({
|
|
|
35049
35181
|
|
|
35050
35182
|
// src/commands/blob/command.ts
|
|
35051
35183
|
var listSubcommand11, putSubcommand, delSubcommand, copySubcommand, addStoreSubcommand, removeStoreSubcommand, getStoreSubcommand, storeSubcommand, blobCommand;
|
|
35052
|
-
var
|
|
35184
|
+
var init_command42 = __esm({
|
|
35053
35185
|
"src/commands/blob/command.ts"() {
|
|
35054
35186
|
"use strict";
|
|
35055
35187
|
listSubcommand11 = {
|
|
@@ -35353,6 +35485,7 @@ var init_commands = __esm({
|
|
|
35353
35485
|
init_command39();
|
|
35354
35486
|
init_command40();
|
|
35355
35487
|
init_command41();
|
|
35488
|
+
init_command42();
|
|
35356
35489
|
init_output_manager();
|
|
35357
35490
|
commandsStructs = [
|
|
35358
35491
|
aliasCommand,
|
|
@@ -35379,6 +35512,7 @@ var init_commands = __esm({
|
|
|
35379
35512
|
loginCommand,
|
|
35380
35513
|
logoutCommand,
|
|
35381
35514
|
logsCommand,
|
|
35515
|
+
logsv2Command,
|
|
35382
35516
|
mcpCommand,
|
|
35383
35517
|
microfrontendsCommand,
|
|
35384
35518
|
openCommand,
|
|
@@ -35698,7 +35832,7 @@ var require_bytes = __commonJS2({
|
|
|
35698
35832
|
"../../node_modules/.pnpm/bytes@3.0.0/node_modules/bytes/index.js"(exports2, module2) {
|
|
35699
35833
|
"use strict";
|
|
35700
35834
|
module2.exports = bytes9;
|
|
35701
|
-
module2.exports.format =
|
|
35835
|
+
module2.exports.format = format8;
|
|
35702
35836
|
module2.exports.parse = parse11;
|
|
35703
35837
|
var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
|
|
35704
35838
|
var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
|
|
@@ -35715,11 +35849,11 @@ var require_bytes = __commonJS2({
|
|
|
35715
35849
|
return parse11(value);
|
|
35716
35850
|
}
|
|
35717
35851
|
if (typeof value === "number") {
|
|
35718
|
-
return
|
|
35852
|
+
return format8(value, options);
|
|
35719
35853
|
}
|
|
35720
35854
|
return null;
|
|
35721
35855
|
}
|
|
35722
|
-
function
|
|
35856
|
+
function format8(value, options) {
|
|
35723
35857
|
if (!Number.isFinite(value)) {
|
|
35724
35858
|
return null;
|
|
35725
35859
|
}
|
|
@@ -36798,14 +36932,14 @@ var require_templates3 = __commonJS2({
|
|
|
36798
36932
|
}
|
|
36799
36933
|
return results;
|
|
36800
36934
|
}
|
|
36801
|
-
function buildStyle(
|
|
36935
|
+
function buildStyle(chalk139, styles) {
|
|
36802
36936
|
const enabled = {};
|
|
36803
36937
|
for (const layer of styles) {
|
|
36804
36938
|
for (const style of layer.styles) {
|
|
36805
36939
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
36806
36940
|
}
|
|
36807
36941
|
}
|
|
36808
|
-
let current =
|
|
36942
|
+
let current = chalk139;
|
|
36809
36943
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
36810
36944
|
if (!Array.isArray(styles2)) {
|
|
36811
36945
|
continue;
|
|
@@ -36817,7 +36951,7 @@ var require_templates3 = __commonJS2({
|
|
|
36817
36951
|
}
|
|
36818
36952
|
return current;
|
|
36819
36953
|
}
|
|
36820
|
-
module2.exports = (
|
|
36954
|
+
module2.exports = (chalk139, temporary) => {
|
|
36821
36955
|
const styles = [];
|
|
36822
36956
|
const chunks = [];
|
|
36823
36957
|
let chunk = [];
|
|
@@ -36827,13 +36961,13 @@ var require_templates3 = __commonJS2({
|
|
|
36827
36961
|
} else if (style) {
|
|
36828
36962
|
const string = chunk.join("");
|
|
36829
36963
|
chunk = [];
|
|
36830
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
36964
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk139, styles)(string));
|
|
36831
36965
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
36832
36966
|
} else if (close2) {
|
|
36833
36967
|
if (styles.length === 0) {
|
|
36834
36968
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
36835
36969
|
}
|
|
36836
|
-
chunks.push(buildStyle(
|
|
36970
|
+
chunks.push(buildStyle(chalk139, styles)(chunk.join("")));
|
|
36837
36971
|
chunk = [];
|
|
36838
36972
|
styles.pop();
|
|
36839
36973
|
} else {
|
|
@@ -36881,16 +37015,16 @@ var require_source2 = __commonJS2({
|
|
|
36881
37015
|
}
|
|
36882
37016
|
};
|
|
36883
37017
|
var chalkFactory = (options) => {
|
|
36884
|
-
const
|
|
36885
|
-
applyOptions(
|
|
36886
|
-
|
|
36887
|
-
Object.setPrototypeOf(
|
|
36888
|
-
Object.setPrototypeOf(
|
|
36889
|
-
|
|
37018
|
+
const chalk140 = {};
|
|
37019
|
+
applyOptions(chalk140, options);
|
|
37020
|
+
chalk140.template = (...arguments_) => chalkTag(chalk140.template, ...arguments_);
|
|
37021
|
+
Object.setPrototypeOf(chalk140, Chalk.prototype);
|
|
37022
|
+
Object.setPrototypeOf(chalk140.template, chalk140);
|
|
37023
|
+
chalk140.template.constructor = () => {
|
|
36890
37024
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
36891
37025
|
};
|
|
36892
|
-
|
|
36893
|
-
return
|
|
37026
|
+
chalk140.template.Instance = ChalkClass;
|
|
37027
|
+
return chalk140.template;
|
|
36894
37028
|
};
|
|
36895
37029
|
function Chalk(options) {
|
|
36896
37030
|
return chalkFactory(options);
|
|
@@ -37001,7 +37135,7 @@ var require_source2 = __commonJS2({
|
|
|
37001
37135
|
return openAll + string + closeAll;
|
|
37002
37136
|
};
|
|
37003
37137
|
var template;
|
|
37004
|
-
var chalkTag = (
|
|
37138
|
+
var chalkTag = (chalk140, ...strings) => {
|
|
37005
37139
|
const [firstString] = strings;
|
|
37006
37140
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
37007
37141
|
return strings.join(" ");
|
|
@@ -37017,14 +37151,14 @@ var require_source2 = __commonJS2({
|
|
|
37017
37151
|
if (template === void 0) {
|
|
37018
37152
|
template = require_templates3();
|
|
37019
37153
|
}
|
|
37020
|
-
return template(
|
|
37154
|
+
return template(chalk140, parts.join(""));
|
|
37021
37155
|
};
|
|
37022
37156
|
Object.defineProperties(Chalk.prototype, styles);
|
|
37023
|
-
var
|
|
37024
|
-
|
|
37025
|
-
|
|
37026
|
-
|
|
37027
|
-
module2.exports =
|
|
37157
|
+
var chalk139 = Chalk();
|
|
37158
|
+
chalk139.supportsColor = stdoutColor;
|
|
37159
|
+
chalk139.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
37160
|
+
chalk139.stderr.supportsColor = stderrColor;
|
|
37161
|
+
module2.exports = chalk139;
|
|
37028
37162
|
}
|
|
37029
37163
|
});
|
|
37030
37164
|
|
|
@@ -53719,7 +53853,7 @@ var require_fill_range = __commonJS2({
|
|
|
53719
53853
|
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
53720
53854
|
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
53721
53855
|
let toNumber = padded === false && stringify2(start, end, options) === false;
|
|
53722
|
-
let
|
|
53856
|
+
let format8 = options.transform || transform(toNumber);
|
|
53723
53857
|
if (options.toRegex && step === 1) {
|
|
53724
53858
|
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
53725
53859
|
}
|
|
@@ -53731,7 +53865,7 @@ var require_fill_range = __commonJS2({
|
|
|
53731
53865
|
if (options.toRegex === true && step > 1) {
|
|
53732
53866
|
push(a);
|
|
53733
53867
|
} else {
|
|
53734
|
-
range.push(pad(
|
|
53868
|
+
range.push(pad(format8(a, index), maxLen, toNumber));
|
|
53735
53869
|
}
|
|
53736
53870
|
a = descending ? a - step : a + step;
|
|
53737
53871
|
index++;
|
|
@@ -53745,7 +53879,7 @@ var require_fill_range = __commonJS2({
|
|
|
53745
53879
|
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
|
|
53746
53880
|
return invalidRange(start, end, options);
|
|
53747
53881
|
}
|
|
53748
|
-
let
|
|
53882
|
+
let format8 = options.transform || ((val) => String.fromCharCode(val));
|
|
53749
53883
|
let a = `${start}`.charCodeAt(0);
|
|
53750
53884
|
let b = `${end}`.charCodeAt(0);
|
|
53751
53885
|
let descending = a > b;
|
|
@@ -53757,7 +53891,7 @@ var require_fill_range = __commonJS2({
|
|
|
53757
53891
|
let range = [];
|
|
53758
53892
|
let index = 0;
|
|
53759
53893
|
while (descending ? a >= b : a <= b) {
|
|
53760
|
-
range.push(
|
|
53894
|
+
range.push(format8(a, index));
|
|
53761
53895
|
a = descending ? a - step : a + step;
|
|
53762
53896
|
index++;
|
|
53763
53897
|
}
|
|
@@ -55798,11 +55932,11 @@ var require_picomatch = __commonJS2({
|
|
|
55798
55932
|
return { isMatch: false, output: "" };
|
|
55799
55933
|
}
|
|
55800
55934
|
const opts = options || {};
|
|
55801
|
-
const
|
|
55935
|
+
const format8 = opts.format || (posix2 ? utils.toPosixSlashes : null);
|
|
55802
55936
|
let match = input === glob;
|
|
55803
|
-
let output2 = match &&
|
|
55937
|
+
let output2 = match && format8 ? format8(input) : input;
|
|
55804
55938
|
if (match === false) {
|
|
55805
|
-
output2 =
|
|
55939
|
+
output2 = format8 ? format8(input) : input;
|
|
55806
55940
|
match = output2 === glob;
|
|
55807
55941
|
}
|
|
55808
55942
|
if (match === false || opts.capture === true) {
|
|
@@ -59281,41 +59415,41 @@ var require_ms = __commonJS2({
|
|
|
59281
59415
|
return void 0;
|
|
59282
59416
|
}
|
|
59283
59417
|
}
|
|
59284
|
-
function fmtShort(
|
|
59285
|
-
var msAbs = Math.abs(
|
|
59418
|
+
function fmtShort(ms34) {
|
|
59419
|
+
var msAbs = Math.abs(ms34);
|
|
59286
59420
|
if (msAbs >= d) {
|
|
59287
|
-
return Math.round(
|
|
59421
|
+
return Math.round(ms34 / d) + "d";
|
|
59288
59422
|
}
|
|
59289
59423
|
if (msAbs >= h) {
|
|
59290
|
-
return Math.round(
|
|
59424
|
+
return Math.round(ms34 / h) + "h";
|
|
59291
59425
|
}
|
|
59292
59426
|
if (msAbs >= m) {
|
|
59293
|
-
return Math.round(
|
|
59427
|
+
return Math.round(ms34 / m) + "m";
|
|
59294
59428
|
}
|
|
59295
59429
|
if (msAbs >= s) {
|
|
59296
|
-
return Math.round(
|
|
59430
|
+
return Math.round(ms34 / s) + "s";
|
|
59297
59431
|
}
|
|
59298
|
-
return
|
|
59432
|
+
return ms34 + "ms";
|
|
59299
59433
|
}
|
|
59300
|
-
function fmtLong(
|
|
59301
|
-
var msAbs = Math.abs(
|
|
59434
|
+
function fmtLong(ms34) {
|
|
59435
|
+
var msAbs = Math.abs(ms34);
|
|
59302
59436
|
if (msAbs >= d) {
|
|
59303
|
-
return plural15(
|
|
59437
|
+
return plural15(ms34, msAbs, d, "day");
|
|
59304
59438
|
}
|
|
59305
59439
|
if (msAbs >= h) {
|
|
59306
|
-
return plural15(
|
|
59440
|
+
return plural15(ms34, msAbs, h, "hour");
|
|
59307
59441
|
}
|
|
59308
59442
|
if (msAbs >= m) {
|
|
59309
|
-
return plural15(
|
|
59443
|
+
return plural15(ms34, msAbs, m, "minute");
|
|
59310
59444
|
}
|
|
59311
59445
|
if (msAbs >= s) {
|
|
59312
|
-
return plural15(
|
|
59446
|
+
return plural15(ms34, msAbs, s, "second");
|
|
59313
59447
|
}
|
|
59314
|
-
return
|
|
59448
|
+
return ms34 + " ms";
|
|
59315
59449
|
}
|
|
59316
|
-
function plural15(
|
|
59450
|
+
function plural15(ms34, msAbs, n, name) {
|
|
59317
59451
|
var isPlural = msAbs >= n * 1.5;
|
|
59318
|
-
return Math.round(
|
|
59452
|
+
return Math.round(ms34 / n) + " " + name + (isPlural ? "s" : "");
|
|
59319
59453
|
}
|
|
59320
59454
|
}
|
|
59321
59455
|
});
|
|
@@ -59356,18 +59490,18 @@ var require_get_polling_delay = __commonJS2({
|
|
|
59356
59490
|
getPollingDelay: () => getPollingDelay
|
|
59357
59491
|
});
|
|
59358
59492
|
module2.exports = __toCommonJS4(get_polling_delay_exports);
|
|
59359
|
-
var
|
|
59493
|
+
var import_ms34 = __toESM4(require_ms());
|
|
59360
59494
|
function getPollingDelay(elapsed2) {
|
|
59361
|
-
if (elapsed2 <= (0,
|
|
59362
|
-
return (0,
|
|
59495
|
+
if (elapsed2 <= (0, import_ms34.default)("15s")) {
|
|
59496
|
+
return (0, import_ms34.default)("1s");
|
|
59363
59497
|
}
|
|
59364
|
-
if (elapsed2 <= (0,
|
|
59365
|
-
return (0,
|
|
59498
|
+
if (elapsed2 <= (0, import_ms34.default)("1m")) {
|
|
59499
|
+
return (0, import_ms34.default)("5s");
|
|
59366
59500
|
}
|
|
59367
|
-
if (elapsed2 <= (0,
|
|
59368
|
-
return (0,
|
|
59501
|
+
if (elapsed2 <= (0, import_ms34.default)("5m")) {
|
|
59502
|
+
return (0, import_ms34.default)("15s");
|
|
59369
59503
|
}
|
|
59370
|
-
return (0,
|
|
59504
|
+
return (0, import_ms34.default)("30s");
|
|
59371
59505
|
}
|
|
59372
59506
|
}
|
|
59373
59507
|
});
|
|
@@ -64143,7 +64277,7 @@ var require_create_deployment = __commonJS2({
|
|
|
64143
64277
|
var import_upload2 = require_upload();
|
|
64144
64278
|
var import_utils6 = require_utils14();
|
|
64145
64279
|
var import_errors4 = require_errors2();
|
|
64146
|
-
var
|
|
64280
|
+
var import_error_utils39 = require_dist2();
|
|
64147
64281
|
var import_build_utils20 = __require("@vercel/build-utils");
|
|
64148
64282
|
var import_tar_fs2 = __toESM4(require_tar_fs());
|
|
64149
64283
|
var import_zlib = __require("zlib");
|
|
@@ -64225,7 +64359,7 @@ var require_create_deployment = __commonJS2({
|
|
|
64225
64359
|
files = await (0, import_hashes.hashes)(fileList);
|
|
64226
64360
|
}
|
|
64227
64361
|
} catch (err) {
|
|
64228
|
-
if (clientOptions.prebuilt && (0,
|
|
64362
|
+
if (clientOptions.prebuilt && (0, import_error_utils39.isErrnoException)(err) && err.code === "ENOENT" && err.path) {
|
|
64229
64363
|
const errPath = (0, import_path43.relative)(workPath, err.path);
|
|
64230
64364
|
err.message = `File does not exist: "${(0, import_path43.relative)(workPath, errPath)}"`;
|
|
64231
64365
|
if (errPath.split(import_path43.sep).includes("node_modules")) {
|
|
@@ -70650,10 +70784,10 @@ var require_ajv = __commonJS2({
|
|
|
70650
70784
|
}
|
|
70651
70785
|
return text.slice(0, -separator.length);
|
|
70652
70786
|
}
|
|
70653
|
-
function addFormat(name,
|
|
70654
|
-
if (typeof
|
|
70655
|
-
|
|
70656
|
-
this._formats[name] =
|
|
70787
|
+
function addFormat(name, format8) {
|
|
70788
|
+
if (typeof format8 == "string")
|
|
70789
|
+
format8 = new RegExp(format8);
|
|
70790
|
+
this._formats[name] = format8;
|
|
70657
70791
|
return this;
|
|
70658
70792
|
}
|
|
70659
70793
|
function addDefaultMetaSchema(self2) {
|
|
@@ -70682,8 +70816,8 @@ var require_ajv = __commonJS2({
|
|
|
70682
70816
|
}
|
|
70683
70817
|
function addInitialFormats(self2) {
|
|
70684
70818
|
for (var name in self2._opts.formats) {
|
|
70685
|
-
var
|
|
70686
|
-
self2.addFormat(name,
|
|
70819
|
+
var format8 = self2._opts.formats[name];
|
|
70820
|
+
self2.addFormat(name, format8);
|
|
70687
70821
|
}
|
|
70688
70822
|
}
|
|
70689
70823
|
function addInitialKeywords(self2) {
|
|
@@ -77649,14 +77783,14 @@ var require_read_config_file = __commonJS2({
|
|
|
77649
77783
|
var import_js_yaml = __toESM4(require_js_yaml2());
|
|
77650
77784
|
var import_toml = __toESM4(require_toml());
|
|
77651
77785
|
var import_fs11 = __require("fs");
|
|
77652
|
-
var
|
|
77786
|
+
var import_error_utils39 = require_dist2();
|
|
77653
77787
|
var { readFile: readFile6 } = import_fs11.promises;
|
|
77654
77788
|
async function readFileOrNull(file) {
|
|
77655
77789
|
try {
|
|
77656
77790
|
const data = await readFile6(file);
|
|
77657
77791
|
return data;
|
|
77658
77792
|
} catch (error3) {
|
|
77659
|
-
if (!(0,
|
|
77793
|
+
if (!(0, import_error_utils39.isErrnoException)(error3)) {
|
|
77660
77794
|
throw error3;
|
|
77661
77795
|
}
|
|
77662
77796
|
if (error3.code !== "ENOENT") {
|
|
@@ -84465,7 +84599,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
84465
84599
|
});
|
|
84466
84600
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
|
84467
84601
|
var import_semver4 = __toESM4(require_semver2());
|
|
84468
|
-
var
|
|
84602
|
+
var import__108 = require_dist8();
|
|
84469
84603
|
async function detectFileSystemAPI2({
|
|
84470
84604
|
files,
|
|
84471
84605
|
projectSettings,
|
|
@@ -84531,7 +84665,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
84531
84665
|
};
|
|
84532
84666
|
}
|
|
84533
84667
|
const invalidBuilder = builders.find(({ use }) => {
|
|
84534
|
-
const valid = (0,
|
|
84668
|
+
const valid = (0, import__108.isOfficialRuntime)("go", use) || (0, import__108.isOfficialRuntime)("python", use) || (0, import__108.isOfficialRuntime)("ruby", use) || (0, import__108.isOfficialRuntime)("node", use) || (0, import__108.isOfficialRuntime)("next", use) || (0, import__108.isOfficialRuntime)("static", use) || (0, import__108.isOfficialRuntime)("static-build", use);
|
|
84535
84669
|
return !valid;
|
|
84536
84670
|
});
|
|
84537
84671
|
if (invalidBuilder) {
|
|
@@ -84544,7 +84678,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
84544
84678
|
for (const lang of ["go", "python", "ruby"]) {
|
|
84545
84679
|
for (const { use } of builders) {
|
|
84546
84680
|
const plugin = "vercel-plugin-" + lang;
|
|
84547
|
-
if ((0,
|
|
84681
|
+
if ((0, import__108.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
|
84548
84682
|
return {
|
|
84549
84683
|
metadata,
|
|
84550
84684
|
fsApiBuilder: null,
|
|
@@ -84601,7 +84735,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
84601
84735
|
}
|
|
84602
84736
|
}
|
|
84603
84737
|
const frontendBuilder = builders.find(
|
|
84604
|
-
({ use }) => (0,
|
|
84738
|
+
({ use }) => (0, import__108.isOfficialRuntime)("next", use) || (0, import__108.isOfficialRuntime)("static", use) || (0, import__108.isOfficialRuntime)("static-build", use)
|
|
84605
84739
|
);
|
|
84606
84740
|
const config2 = frontendBuilder?.config || {};
|
|
84607
84741
|
const withTag = tag ? `@${tag}` : "";
|
|
@@ -85093,7 +85227,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
|
85093
85227
|
var import_promises5 = __toESM4(__require("fs/promises"));
|
|
85094
85228
|
var import_path43 = __require("path");
|
|
85095
85229
|
var import_filesystem = require_filesystem();
|
|
85096
|
-
var
|
|
85230
|
+
var import_error_utils39 = require_dist2();
|
|
85097
85231
|
var LocalFileSystemDetector5 = class _LocalFileSystemDetector extends import_filesystem.DetectorFilesystem {
|
|
85098
85232
|
constructor(rootPath) {
|
|
85099
85233
|
super();
|
|
@@ -85104,7 +85238,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
|
85104
85238
|
await import_promises5.default.stat(this.getFilePath(name));
|
|
85105
85239
|
return true;
|
|
85106
85240
|
} catch (err) {
|
|
85107
|
-
if ((0,
|
|
85241
|
+
if ((0, import_error_utils39.isErrnoException)(err) && err.code === "ENOENT") {
|
|
85108
85242
|
return false;
|
|
85109
85243
|
}
|
|
85110
85244
|
throw err;
|
|
@@ -93591,9 +93725,9 @@ var init_promise = __esm({
|
|
|
93591
93725
|
});
|
|
93592
93726
|
|
|
93593
93727
|
// src/util/sleep.ts
|
|
93594
|
-
function sleep(
|
|
93728
|
+
function sleep(ms34) {
|
|
93595
93729
|
return new Promise((resolve13) => {
|
|
93596
|
-
setTimeout(resolve13,
|
|
93730
|
+
setTimeout(resolve13, ms34);
|
|
93597
93731
|
});
|
|
93598
93732
|
}
|
|
93599
93733
|
var init_sleep = __esm({
|
|
@@ -95359,41 +95493,41 @@ var require_ms2 = __commonJS2({
|
|
|
95359
95493
|
return void 0;
|
|
95360
95494
|
}
|
|
95361
95495
|
}
|
|
95362
|
-
function fmtShort(
|
|
95363
|
-
var msAbs = Math.abs(
|
|
95496
|
+
function fmtShort(ms34) {
|
|
95497
|
+
var msAbs = Math.abs(ms34);
|
|
95364
95498
|
if (msAbs >= d) {
|
|
95365
|
-
return Math.round(
|
|
95499
|
+
return Math.round(ms34 / d) + "d";
|
|
95366
95500
|
}
|
|
95367
95501
|
if (msAbs >= h) {
|
|
95368
|
-
return Math.round(
|
|
95502
|
+
return Math.round(ms34 / h) + "h";
|
|
95369
95503
|
}
|
|
95370
95504
|
if (msAbs >= m) {
|
|
95371
|
-
return Math.round(
|
|
95505
|
+
return Math.round(ms34 / m) + "m";
|
|
95372
95506
|
}
|
|
95373
95507
|
if (msAbs >= s) {
|
|
95374
|
-
return Math.round(
|
|
95508
|
+
return Math.round(ms34 / s) + "s";
|
|
95375
95509
|
}
|
|
95376
|
-
return
|
|
95510
|
+
return ms34 + "ms";
|
|
95377
95511
|
}
|
|
95378
|
-
function fmtLong(
|
|
95379
|
-
var msAbs = Math.abs(
|
|
95512
|
+
function fmtLong(ms34) {
|
|
95513
|
+
var msAbs = Math.abs(ms34);
|
|
95380
95514
|
if (msAbs >= d) {
|
|
95381
|
-
return plural15(
|
|
95515
|
+
return plural15(ms34, msAbs, d, "day");
|
|
95382
95516
|
}
|
|
95383
95517
|
if (msAbs >= h) {
|
|
95384
|
-
return plural15(
|
|
95518
|
+
return plural15(ms34, msAbs, h, "hour");
|
|
95385
95519
|
}
|
|
95386
95520
|
if (msAbs >= m) {
|
|
95387
|
-
return plural15(
|
|
95521
|
+
return plural15(ms34, msAbs, m, "minute");
|
|
95388
95522
|
}
|
|
95389
95523
|
if (msAbs >= s) {
|
|
95390
|
-
return plural15(
|
|
95524
|
+
return plural15(ms34, msAbs, s, "second");
|
|
95391
95525
|
}
|
|
95392
|
-
return
|
|
95526
|
+
return ms34 + " ms";
|
|
95393
95527
|
}
|
|
95394
|
-
function plural15(
|
|
95528
|
+
function plural15(ms34, msAbs, n, name) {
|
|
95395
95529
|
var isPlural = msAbs >= n * 1.5;
|
|
95396
|
-
return Math.round(
|
|
95530
|
+
return Math.round(ms34 / n) + " " + name + (isPlural ? "s" : "");
|
|
95397
95531
|
}
|
|
95398
95532
|
}
|
|
95399
95533
|
});
|
|
@@ -95436,8 +95570,8 @@ var require_common8 = __commonJS2({
|
|
|
95436
95570
|
}
|
|
95437
95571
|
const self2 = debug2;
|
|
95438
95572
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
95439
|
-
const
|
|
95440
|
-
self2.diff =
|
|
95573
|
+
const ms34 = curr - (prevTime || curr);
|
|
95574
|
+
self2.diff = ms34;
|
|
95441
95575
|
self2.prev = prevTime;
|
|
95442
95576
|
self2.curr = curr;
|
|
95443
95577
|
prevTime = curr;
|
|
@@ -95446,12 +95580,12 @@ var require_common8 = __commonJS2({
|
|
|
95446
95580
|
args2.unshift("%O");
|
|
95447
95581
|
}
|
|
95448
95582
|
let index = 0;
|
|
95449
|
-
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match,
|
|
95583
|
+
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format8) => {
|
|
95450
95584
|
if (match === "%%") {
|
|
95451
95585
|
return "%";
|
|
95452
95586
|
}
|
|
95453
95587
|
index++;
|
|
95454
|
-
const formatter = createDebug.formatters[
|
|
95588
|
+
const formatter = createDebug.formatters[format8];
|
|
95455
95589
|
if (typeof formatter === "function") {
|
|
95456
95590
|
const val = args2[index];
|
|
95457
95591
|
match = formatter.call(self2, val);
|
|
@@ -96038,8 +96172,8 @@ var require_common9 = __commonJS2({
|
|
|
96038
96172
|
}
|
|
96039
96173
|
const self2 = debug2;
|
|
96040
96174
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
96041
|
-
const
|
|
96042
|
-
self2.diff =
|
|
96175
|
+
const ms34 = curr - (prevTime || curr);
|
|
96176
|
+
self2.diff = ms34;
|
|
96043
96177
|
self2.prev = prevTime;
|
|
96044
96178
|
self2.curr = curr;
|
|
96045
96179
|
prevTime = curr;
|
|
@@ -96048,12 +96182,12 @@ var require_common9 = __commonJS2({
|
|
|
96048
96182
|
args2.unshift("%O");
|
|
96049
96183
|
}
|
|
96050
96184
|
let index = 0;
|
|
96051
|
-
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match,
|
|
96185
|
+
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format8) => {
|
|
96052
96186
|
if (match === "%%") {
|
|
96053
96187
|
return "%";
|
|
96054
96188
|
}
|
|
96055
96189
|
index++;
|
|
96056
|
-
const formatter = createDebug.formatters[
|
|
96190
|
+
const formatter = createDebug.formatters[format8];
|
|
96057
96191
|
if (typeof formatter === "function") {
|
|
96058
96192
|
const val = args2[index];
|
|
96059
96193
|
match = formatter.call(self2, val);
|
|
@@ -119550,7 +119684,7 @@ var require_jsbn = __commonJS2({
|
|
|
119550
119684
|
}
|
|
119551
119685
|
if (r == null)
|
|
119552
119686
|
r = nbi();
|
|
119553
|
-
var y = nbi(), ts = this.s,
|
|
119687
|
+
var y = nbi(), ts = this.s, ms34 = m.s;
|
|
119554
119688
|
var nsh = this.DB - nbits(pm[pm.t - 1]);
|
|
119555
119689
|
if (nsh > 0) {
|
|
119556
119690
|
pm.lShiftTo(nsh, y);
|
|
@@ -119586,7 +119720,7 @@ var require_jsbn = __commonJS2({
|
|
|
119586
119720
|
}
|
|
119587
119721
|
if (q != null) {
|
|
119588
119722
|
r.drShiftTo(ys, q);
|
|
119589
|
-
if (ts !=
|
|
119723
|
+
if (ts != ms34)
|
|
119590
119724
|
BigInteger.ZERO.subTo(q, q);
|
|
119591
119725
|
}
|
|
119592
119726
|
r.t = ys;
|
|
@@ -130553,7 +130687,7 @@ var require_format2 = __commonJS2({
|
|
|
130553
130687
|
var parse11 = require_parse7();
|
|
130554
130688
|
var isValid = require_is_valid();
|
|
130555
130689
|
var enLocale = require_en();
|
|
130556
|
-
function
|
|
130690
|
+
function format8(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
130557
130691
|
var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : "YYYY-MM-DDTHH:mm:ss.SSSZ";
|
|
130558
130692
|
var options = dirtyOptions || {};
|
|
130559
130693
|
var locale = options.locale;
|
|
@@ -130747,7 +130881,7 @@ var require_format2 = __commonJS2({
|
|
|
130747
130881
|
}
|
|
130748
130882
|
return output2;
|
|
130749
130883
|
}
|
|
130750
|
-
module2.exports =
|
|
130884
|
+
module2.exports = format8;
|
|
130751
130885
|
}
|
|
130752
130886
|
});
|
|
130753
130887
|
|
|
@@ -131301,7 +131435,7 @@ var init_list4 = __esm({
|
|
|
131301
131435
|
init_get_command_flags();
|
|
131302
131436
|
init_get_args();
|
|
131303
131437
|
init_get_flags_specification();
|
|
131304
|
-
|
|
131438
|
+
init_command42();
|
|
131305
131439
|
init_pkg_name();
|
|
131306
131440
|
init_list3();
|
|
131307
131441
|
init_error2();
|
|
@@ -131542,7 +131676,7 @@ var init_put2 = __esm({
|
|
|
131542
131676
|
init_output_manager();
|
|
131543
131677
|
init_get_args();
|
|
131544
131678
|
init_get_flags_specification();
|
|
131545
|
-
|
|
131679
|
+
init_command42();
|
|
131546
131680
|
import_error_utils13 = __toESM3(require_dist2(), 1);
|
|
131547
131681
|
init_pkg_name();
|
|
131548
131682
|
import_chalk45 = __toESM3(require_source(), 1);
|
|
@@ -131612,7 +131746,7 @@ var init_del2 = __esm({
|
|
|
131612
131746
|
init_output_manager();
|
|
131613
131747
|
init_get_args();
|
|
131614
131748
|
init_get_flags_specification();
|
|
131615
|
-
|
|
131749
|
+
init_command42();
|
|
131616
131750
|
init_del();
|
|
131617
131751
|
init_error2();
|
|
131618
131752
|
init_pkg_name();
|
|
@@ -131730,7 +131864,7 @@ var init_copy2 = __esm({
|
|
|
131730
131864
|
init_output_manager();
|
|
131731
131865
|
init_get_args();
|
|
131732
131866
|
init_get_flags_specification();
|
|
131733
|
-
|
|
131867
|
+
init_command42();
|
|
131734
131868
|
init_copy();
|
|
131735
131869
|
init_pkg_name();
|
|
131736
131870
|
}
|
|
@@ -131888,7 +132022,7 @@ var init_store_add2 = __esm({
|
|
|
131888
132022
|
init_pkg_name();
|
|
131889
132023
|
init_get_flags_specification();
|
|
131890
132024
|
init_get_args();
|
|
131891
|
-
|
|
132025
|
+
init_command42();
|
|
131892
132026
|
init_store_add();
|
|
131893
132027
|
init_error2();
|
|
131894
132028
|
}
|
|
@@ -131964,7 +132098,7 @@ var init_store_remove = __esm({
|
|
|
131964
132098
|
init_error2();
|
|
131965
132099
|
init_output_manager();
|
|
131966
132100
|
init_get_flags_specification();
|
|
131967
|
-
|
|
132101
|
+
init_command42();
|
|
131968
132102
|
init_get_args();
|
|
131969
132103
|
init_link2();
|
|
131970
132104
|
}
|
|
@@ -134388,7 +134522,7 @@ var init_store_get2 = __esm({
|
|
|
134388
134522
|
init_get_args();
|
|
134389
134523
|
init_get_flags_specification();
|
|
134390
134524
|
init_link2();
|
|
134391
|
-
|
|
134525
|
+
init_command42();
|
|
134392
134526
|
import_date_fns = __toESM3(require_date_fns(), 1);
|
|
134393
134527
|
import_chalk47 = __toESM3(require_source(), 1);
|
|
134394
134528
|
init_store_get();
|
|
@@ -134467,7 +134601,7 @@ var init_store2 = __esm({
|
|
|
134467
134601
|
init_get_invalid_subcommand();
|
|
134468
134602
|
init_get_subcommand();
|
|
134469
134603
|
init_help();
|
|
134470
|
-
|
|
134604
|
+
init_command42();
|
|
134471
134605
|
init_get_flags_specification();
|
|
134472
134606
|
init_output_manager();
|
|
134473
134607
|
init_commands();
|
|
@@ -134540,7 +134674,7 @@ var init_token = __esm({
|
|
|
134540
134674
|
"use strict";
|
|
134541
134675
|
init_diff_env_files();
|
|
134542
134676
|
init_get_flags_specification();
|
|
134543
|
-
|
|
134677
|
+
init_command42();
|
|
134544
134678
|
init_get_args();
|
|
134545
134679
|
init_pkg_name();
|
|
134546
134680
|
init_cmd();
|
|
@@ -134658,7 +134792,7 @@ var init_blob2 = __esm({
|
|
|
134658
134792
|
init_get_subcommand();
|
|
134659
134793
|
init_help();
|
|
134660
134794
|
init_list4();
|
|
134661
|
-
|
|
134795
|
+
init_command42();
|
|
134662
134796
|
init_get_flags_specification();
|
|
134663
134797
|
init_output_manager();
|
|
134664
134798
|
init_commands();
|
|
@@ -150478,7 +150612,7 @@ var init_pull4 = __esm({
|
|
|
150478
150612
|
init_ensure_link();
|
|
150479
150613
|
init_humanize_path();
|
|
150480
150614
|
init_help();
|
|
150481
|
-
|
|
150615
|
+
init_command31();
|
|
150482
150616
|
init_parse_target();
|
|
150483
150617
|
init_get_flags_specification();
|
|
150484
150618
|
init_error2();
|
|
@@ -154868,12 +155002,12 @@ var init_deploy = __esm({
|
|
|
154868
155002
|
});
|
|
154869
155003
|
}
|
|
154870
155004
|
}
|
|
154871
|
-
trackCliOptionArchive(
|
|
154872
|
-
if (
|
|
155005
|
+
trackCliOptionArchive(format8) {
|
|
155006
|
+
if (format8) {
|
|
154873
155007
|
const allowedFormat = [
|
|
154874
155008
|
...import_client10.VALID_ARCHIVE_FORMATS,
|
|
154875
155009
|
deprecatedArchiveSplitTgz
|
|
154876
|
-
].includes(
|
|
155010
|
+
].includes(format8) ? format8 : this.redactedValue;
|
|
154877
155011
|
this.trackCliOption({
|
|
154878
155012
|
option: "archive",
|
|
154879
155013
|
value: allowedFormat
|
|
@@ -155633,7 +155767,7 @@ var require_bytes2 = __commonJS2({
|
|
|
155633
155767
|
"../../node_modules/.pnpm/bytes@3.1.0/node_modules/bytes/index.js"(exports2, module2) {
|
|
155634
155768
|
"use strict";
|
|
155635
155769
|
module2.exports = bytes9;
|
|
155636
|
-
module2.exports.format =
|
|
155770
|
+
module2.exports.format = format8;
|
|
155637
155771
|
module2.exports.parse = parse11;
|
|
155638
155772
|
var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
|
|
155639
155773
|
var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
|
|
@@ -155651,11 +155785,11 @@ var require_bytes2 = __commonJS2({
|
|
|
155651
155785
|
return parse11(value);
|
|
155652
155786
|
}
|
|
155653
155787
|
if (typeof value === "number") {
|
|
155654
|
-
return
|
|
155788
|
+
return format8(value, options);
|
|
155655
155789
|
}
|
|
155656
155790
|
return null;
|
|
155657
155791
|
}
|
|
155658
|
-
function
|
|
155792
|
+
function format8(value, options) {
|
|
155659
155793
|
if (!Number.isFinite(value)) {
|
|
155660
155794
|
return null;
|
|
155661
155795
|
}
|
|
@@ -155973,8 +156107,8 @@ var require_depd = __commonJS2({
|
|
|
155973
156107
|
process.emit("deprecation", err);
|
|
155974
156108
|
return;
|
|
155975
156109
|
}
|
|
155976
|
-
var
|
|
155977
|
-
var output2 =
|
|
156110
|
+
var format8 = process.stderr.isTTY ? formatColor : formatPlain;
|
|
156111
|
+
var output2 = format8.call(this, msg, caller, stack2.slice(i));
|
|
155978
156112
|
process.stderr.write(output2 + "\n", "utf8");
|
|
155979
156113
|
}
|
|
155980
156114
|
function callSiteLocation(callSite) {
|
|
@@ -160636,32 +160770,32 @@ var require_ms3 = __commonJS2({
|
|
|
160636
160770
|
return void 0;
|
|
160637
160771
|
}
|
|
160638
160772
|
}
|
|
160639
|
-
function fmtShort(
|
|
160640
|
-
if (
|
|
160641
|
-
return Math.round(
|
|
160773
|
+
function fmtShort(ms34) {
|
|
160774
|
+
if (ms34 >= d) {
|
|
160775
|
+
return Math.round(ms34 / d) + "d";
|
|
160642
160776
|
}
|
|
160643
|
-
if (
|
|
160644
|
-
return Math.round(
|
|
160777
|
+
if (ms34 >= h) {
|
|
160778
|
+
return Math.round(ms34 / h) + "h";
|
|
160645
160779
|
}
|
|
160646
|
-
if (
|
|
160647
|
-
return Math.round(
|
|
160780
|
+
if (ms34 >= m) {
|
|
160781
|
+
return Math.round(ms34 / m) + "m";
|
|
160648
160782
|
}
|
|
160649
|
-
if (
|
|
160650
|
-
return Math.round(
|
|
160783
|
+
if (ms34 >= s) {
|
|
160784
|
+
return Math.round(ms34 / s) + "s";
|
|
160651
160785
|
}
|
|
160652
|
-
return
|
|
160786
|
+
return ms34 + "ms";
|
|
160653
160787
|
}
|
|
160654
|
-
function fmtLong(
|
|
160655
|
-
return plural15(
|
|
160788
|
+
function fmtLong(ms34) {
|
|
160789
|
+
return plural15(ms34, d, "day") || plural15(ms34, h, "hour") || plural15(ms34, m, "minute") || plural15(ms34, s, "second") || ms34 + " ms";
|
|
160656
160790
|
}
|
|
160657
|
-
function plural15(
|
|
160658
|
-
if (
|
|
160791
|
+
function plural15(ms34, n, name) {
|
|
160792
|
+
if (ms34 < n) {
|
|
160659
160793
|
return;
|
|
160660
160794
|
}
|
|
160661
|
-
if (
|
|
160662
|
-
return Math.floor(
|
|
160795
|
+
if (ms34 < n * 1.5) {
|
|
160796
|
+
return Math.floor(ms34 / n) + " " + name;
|
|
160663
160797
|
}
|
|
160664
|
-
return Math.ceil(
|
|
160798
|
+
return Math.ceil(ms34 / n) + " " + name + "s";
|
|
160665
160799
|
}
|
|
160666
160800
|
}
|
|
160667
160801
|
});
|
|
@@ -160694,8 +160828,8 @@ var require_debug4 = __commonJS2({
|
|
|
160694
160828
|
return;
|
|
160695
160829
|
var self2 = debug2;
|
|
160696
160830
|
var curr = +/* @__PURE__ */ new Date();
|
|
160697
|
-
var
|
|
160698
|
-
self2.diff =
|
|
160831
|
+
var ms34 = curr - (prevTime || curr);
|
|
160832
|
+
self2.diff = ms34;
|
|
160699
160833
|
self2.prev = prevTime;
|
|
160700
160834
|
self2.curr = curr;
|
|
160701
160835
|
prevTime = curr;
|
|
@@ -160708,11 +160842,11 @@ var require_debug4 = __commonJS2({
|
|
|
160708
160842
|
args2.unshift("%O");
|
|
160709
160843
|
}
|
|
160710
160844
|
var index = 0;
|
|
160711
|
-
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, function(match,
|
|
160845
|
+
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, function(match, format8) {
|
|
160712
160846
|
if (match === "%%")
|
|
160713
160847
|
return match;
|
|
160714
160848
|
index++;
|
|
160715
|
-
var formatter = exports2.formatters[
|
|
160849
|
+
var formatter = exports2.formatters[format8];
|
|
160716
160850
|
if ("function" === typeof formatter) {
|
|
160717
160851
|
var val = args2[index];
|
|
160718
160852
|
match = formatter.call(self2, val);
|
|
@@ -170944,7 +171078,7 @@ var require_content_disposition = __commonJS2({
|
|
|
170944
171078
|
var opts = options || {};
|
|
170945
171079
|
var type = opts.type || "attachment";
|
|
170946
171080
|
var params2 = createparams(filename, opts.fallback);
|
|
170947
|
-
return
|
|
171081
|
+
return format8(new ContentDisposition(type, params2));
|
|
170948
171082
|
}
|
|
170949
171083
|
function createparams(filename, fallback) {
|
|
170950
171084
|
if (filename === void 0) {
|
|
@@ -170975,7 +171109,7 @@ var require_content_disposition = __commonJS2({
|
|
|
170975
171109
|
}
|
|
170976
171110
|
return params2;
|
|
170977
171111
|
}
|
|
170978
|
-
function
|
|
171112
|
+
function format8(obj) {
|
|
170979
171113
|
var parameters = obj.parameters;
|
|
170980
171114
|
var type = obj.type;
|
|
170981
171115
|
if (!type || typeof type !== "string" || !TOKEN_REGEXP.test(type)) {
|
|
@@ -185219,6 +185353,526 @@ var init_logs3 = __esm({
|
|
|
185219
185353
|
}
|
|
185220
185354
|
});
|
|
185221
185355
|
|
|
185356
|
+
// src/util/logs-v2.ts
|
|
185357
|
+
function parseRelativeTime(input) {
|
|
185358
|
+
const now = Date.now();
|
|
185359
|
+
const msValue = (0, import_ms21.default)(input);
|
|
185360
|
+
if (typeof msValue === "number") {
|
|
185361
|
+
return now - msValue;
|
|
185362
|
+
}
|
|
185363
|
+
const date = new Date(input);
|
|
185364
|
+
if (!isNaN(date.getTime())) {
|
|
185365
|
+
return date.getTime();
|
|
185366
|
+
}
|
|
185367
|
+
throw new Error(`Invalid time format: ${input}`);
|
|
185368
|
+
}
|
|
185369
|
+
async function fetchRequestLogs(client2, options) {
|
|
185370
|
+
const {
|
|
185371
|
+
projectId,
|
|
185372
|
+
ownerId,
|
|
185373
|
+
deploymentId,
|
|
185374
|
+
environment,
|
|
185375
|
+
level,
|
|
185376
|
+
statusCode,
|
|
185377
|
+
source,
|
|
185378
|
+
since,
|
|
185379
|
+
until,
|
|
185380
|
+
search,
|
|
185381
|
+
requestId,
|
|
185382
|
+
page = 0
|
|
185383
|
+
} = options;
|
|
185384
|
+
const now = Date.now();
|
|
185385
|
+
const defaultStartDate = now - 24 * 60 * 60 * 1e3;
|
|
185386
|
+
const query = new URLSearchParams();
|
|
185387
|
+
query.set("projectId", projectId);
|
|
185388
|
+
query.set("ownerId", ownerId);
|
|
185389
|
+
query.set("page", String(page));
|
|
185390
|
+
query.set(
|
|
185391
|
+
"startDate",
|
|
185392
|
+
String(since ? parseRelativeTime(since) : defaultStartDate)
|
|
185393
|
+
);
|
|
185394
|
+
query.set("endDate", String(until ? parseRelativeTime(until) : now));
|
|
185395
|
+
if (deploymentId) {
|
|
185396
|
+
query.set("deploymentId", deploymentId);
|
|
185397
|
+
}
|
|
185398
|
+
if (environment) {
|
|
185399
|
+
query.set("environment", environment);
|
|
185400
|
+
}
|
|
185401
|
+
if (level && level.length > 0) {
|
|
185402
|
+
query.set("level", level.join(","));
|
|
185403
|
+
}
|
|
185404
|
+
if (statusCode) {
|
|
185405
|
+
query.set("statusCode", statusCode);
|
|
185406
|
+
}
|
|
185407
|
+
if (source && source.length > 0) {
|
|
185408
|
+
query.set("source", source.join(","));
|
|
185409
|
+
}
|
|
185410
|
+
if (search) {
|
|
185411
|
+
query.set("search", search);
|
|
185412
|
+
}
|
|
185413
|
+
if (requestId) {
|
|
185414
|
+
query.set("requestId", requestId);
|
|
185415
|
+
}
|
|
185416
|
+
const baseUrl = client2.apiUrl === "https://api.vercel.com" ? "https://vercel.com" : client2.apiUrl;
|
|
185417
|
+
const url3 = `${baseUrl}/api/logs/request-logs?${query.toString()}`;
|
|
185418
|
+
const data = await client2.fetch(url3);
|
|
185419
|
+
return {
|
|
185420
|
+
logs: data.rows || [],
|
|
185421
|
+
pagination: {
|
|
185422
|
+
hasMore: data.hasMoreRows ?? false
|
|
185423
|
+
}
|
|
185424
|
+
};
|
|
185425
|
+
}
|
|
185426
|
+
async function* fetchAllRequestLogs(client2, options) {
|
|
185427
|
+
let page = 0;
|
|
185428
|
+
let remaining = options.limit ?? 100;
|
|
185429
|
+
let hasMore = true;
|
|
185430
|
+
while (hasMore && remaining > 0) {
|
|
185431
|
+
const response = await fetchRequestLogs(client2, {
|
|
185432
|
+
...options,
|
|
185433
|
+
page
|
|
185434
|
+
});
|
|
185435
|
+
if (!response.logs || response.logs.length === 0) {
|
|
185436
|
+
break;
|
|
185437
|
+
}
|
|
185438
|
+
for (const log2 of response.logs) {
|
|
185439
|
+
yield log2;
|
|
185440
|
+
remaining--;
|
|
185441
|
+
if (remaining <= 0) {
|
|
185442
|
+
return;
|
|
185443
|
+
}
|
|
185444
|
+
}
|
|
185445
|
+
hasMore = response.pagination?.hasMore ?? false;
|
|
185446
|
+
page++;
|
|
185447
|
+
}
|
|
185448
|
+
}
|
|
185449
|
+
var import_ms21;
|
|
185450
|
+
var init_logs_v2 = __esm({
|
|
185451
|
+
"src/util/logs-v2.ts"() {
|
|
185452
|
+
"use strict";
|
|
185453
|
+
import_ms21 = __toESM3(require_ms(), 1);
|
|
185454
|
+
}
|
|
185455
|
+
});
|
|
185456
|
+
|
|
185457
|
+
// src/util/telemetry/commands/logsv2/index.ts
|
|
185458
|
+
var Logsv2TelemetryClient;
|
|
185459
|
+
var init_logsv2 = __esm({
|
|
185460
|
+
"src/util/telemetry/commands/logsv2/index.ts"() {
|
|
185461
|
+
"use strict";
|
|
185462
|
+
init_telemetry();
|
|
185463
|
+
Logsv2TelemetryClient = class extends TelemetryClient {
|
|
185464
|
+
trackCliOptionProject(v) {
|
|
185465
|
+
if (v) {
|
|
185466
|
+
this.trackCliOption({
|
|
185467
|
+
option: "project",
|
|
185468
|
+
value: this.redactedValue
|
|
185469
|
+
});
|
|
185470
|
+
}
|
|
185471
|
+
}
|
|
185472
|
+
trackCliOptionDeployment(v) {
|
|
185473
|
+
if (v) {
|
|
185474
|
+
this.trackCliOption({
|
|
185475
|
+
option: "deployment",
|
|
185476
|
+
value: this.redactedValue
|
|
185477
|
+
});
|
|
185478
|
+
}
|
|
185479
|
+
}
|
|
185480
|
+
trackCliOptionEnvironment(v) {
|
|
185481
|
+
if (v) {
|
|
185482
|
+
const allowed = ["production", "preview"].includes(v) ? v : this.redactedValue;
|
|
185483
|
+
this.trackCliOption({
|
|
185484
|
+
option: "environment",
|
|
185485
|
+
value: allowed
|
|
185486
|
+
});
|
|
185487
|
+
}
|
|
185488
|
+
}
|
|
185489
|
+
trackCliOptionLevel(v) {
|
|
185490
|
+
if (v && v.length > 0) {
|
|
185491
|
+
const allowedLevels = ["error", "warning", "info", "fatal"];
|
|
185492
|
+
const sanitized = v.every((l) => allowedLevels.includes(l)) ? v.join(",") : this.redactedValue;
|
|
185493
|
+
this.trackCliOption({
|
|
185494
|
+
option: "level",
|
|
185495
|
+
value: sanitized
|
|
185496
|
+
});
|
|
185497
|
+
}
|
|
185498
|
+
}
|
|
185499
|
+
trackCliOptionStatusCode(v) {
|
|
185500
|
+
if (v) {
|
|
185501
|
+
this.trackCliOption({
|
|
185502
|
+
option: "status-code",
|
|
185503
|
+
value: this.redactedValue
|
|
185504
|
+
});
|
|
185505
|
+
}
|
|
185506
|
+
}
|
|
185507
|
+
trackCliOptionSource(v) {
|
|
185508
|
+
if (v && v.length > 0) {
|
|
185509
|
+
const allowedSources = [
|
|
185510
|
+
"serverless",
|
|
185511
|
+
"edge-function",
|
|
185512
|
+
"edge-middleware",
|
|
185513
|
+
"static"
|
|
185514
|
+
];
|
|
185515
|
+
const sanitized = v.every((s) => allowedSources.includes(s)) ? v.join(",") : this.redactedValue;
|
|
185516
|
+
this.trackCliOption({
|
|
185517
|
+
option: "source",
|
|
185518
|
+
value: sanitized
|
|
185519
|
+
});
|
|
185520
|
+
}
|
|
185521
|
+
}
|
|
185522
|
+
trackCliOptionSince(v) {
|
|
185523
|
+
if (v) {
|
|
185524
|
+
this.trackCliOption({
|
|
185525
|
+
option: "since",
|
|
185526
|
+
value: this.redactedValue
|
|
185527
|
+
});
|
|
185528
|
+
}
|
|
185529
|
+
}
|
|
185530
|
+
trackCliOptionUntil(v) {
|
|
185531
|
+
if (v) {
|
|
185532
|
+
this.trackCliOption({
|
|
185533
|
+
option: "until",
|
|
185534
|
+
value: this.redactedValue
|
|
185535
|
+
});
|
|
185536
|
+
}
|
|
185537
|
+
}
|
|
185538
|
+
trackCliOptionLimit(v) {
|
|
185539
|
+
if (typeof v === "number") {
|
|
185540
|
+
this.trackCliOption({
|
|
185541
|
+
option: "limit",
|
|
185542
|
+
value: this.redactedValue
|
|
185543
|
+
});
|
|
185544
|
+
}
|
|
185545
|
+
}
|
|
185546
|
+
trackCliFlagJson(v) {
|
|
185547
|
+
if (v) {
|
|
185548
|
+
this.trackCliFlag("json");
|
|
185549
|
+
}
|
|
185550
|
+
}
|
|
185551
|
+
trackCliOptionQuery(v) {
|
|
185552
|
+
if (v) {
|
|
185553
|
+
this.trackCliOption({
|
|
185554
|
+
option: "query",
|
|
185555
|
+
value: this.redactedValue
|
|
185556
|
+
});
|
|
185557
|
+
}
|
|
185558
|
+
}
|
|
185559
|
+
trackCliOptionRequestId(v) {
|
|
185560
|
+
if (v) {
|
|
185561
|
+
this.trackCliOption({
|
|
185562
|
+
option: "request-id",
|
|
185563
|
+
value: this.redactedValue
|
|
185564
|
+
});
|
|
185565
|
+
}
|
|
185566
|
+
}
|
|
185567
|
+
};
|
|
185568
|
+
}
|
|
185569
|
+
});
|
|
185570
|
+
|
|
185571
|
+
// src/commands/logsv2/index.ts
|
|
185572
|
+
var logsv2_exports = {};
|
|
185573
|
+
__export3(logsv2_exports, {
|
|
185574
|
+
default: () => logsv2
|
|
185575
|
+
});
|
|
185576
|
+
function parseLevels(levels) {
|
|
185577
|
+
if (!levels)
|
|
185578
|
+
return [];
|
|
185579
|
+
if (typeof levels === "string")
|
|
185580
|
+
return [levels];
|
|
185581
|
+
return levels;
|
|
185582
|
+
}
|
|
185583
|
+
function parseSources(sources) {
|
|
185584
|
+
if (!sources)
|
|
185585
|
+
return [];
|
|
185586
|
+
if (typeof sources === "string")
|
|
185587
|
+
return [sources];
|
|
185588
|
+
return sources;
|
|
185589
|
+
}
|
|
185590
|
+
async function logsv2(client2) {
|
|
185591
|
+
let parsedArguments;
|
|
185592
|
+
const flagsSpecification = getFlagsSpecification(logsv2Command.options);
|
|
185593
|
+
try {
|
|
185594
|
+
parsedArguments = parseArguments(client2.argv.slice(2), flagsSpecification);
|
|
185595
|
+
} catch (err) {
|
|
185596
|
+
printError(err);
|
|
185597
|
+
return 1;
|
|
185598
|
+
}
|
|
185599
|
+
const telemetry2 = new Logsv2TelemetryClient({
|
|
185600
|
+
opts: {
|
|
185601
|
+
store: client2.telemetryEventStore
|
|
185602
|
+
}
|
|
185603
|
+
});
|
|
185604
|
+
if (parsedArguments.flags["--help"]) {
|
|
185605
|
+
telemetry2.trackCliFlagHelp("logsv2");
|
|
185606
|
+
output_manager_default.print(help(logsv2Command, { columns: client2.stderr.columns }));
|
|
185607
|
+
return 2;
|
|
185608
|
+
}
|
|
185609
|
+
const projectOption = parsedArguments.flags["--project"];
|
|
185610
|
+
const deploymentOption = parsedArguments.flags["--deployment"];
|
|
185611
|
+
const environmentOption = parsedArguments.flags["--environment"];
|
|
185612
|
+
const levelOption = parsedArguments.flags["--level"];
|
|
185613
|
+
const statusCodeOption = parsedArguments.flags["--status-code"];
|
|
185614
|
+
const sourceOption = parsedArguments.flags["--source"];
|
|
185615
|
+
const sinceOption = parsedArguments.flags["--since"];
|
|
185616
|
+
const untilOption = parsedArguments.flags["--until"];
|
|
185617
|
+
const limitOption2 = parsedArguments.flags["--limit"];
|
|
185618
|
+
const jsonOption = parsedArguments.flags["--json"];
|
|
185619
|
+
const queryOption = parsedArguments.flags["--query"];
|
|
185620
|
+
const requestIdOption = parsedArguments.flags["--request-id"];
|
|
185621
|
+
telemetry2.trackCliOptionProject(projectOption);
|
|
185622
|
+
telemetry2.trackCliOptionDeployment(deploymentOption);
|
|
185623
|
+
telemetry2.trackCliOptionEnvironment(environmentOption);
|
|
185624
|
+
telemetry2.trackCliOptionLevel(levelOption);
|
|
185625
|
+
telemetry2.trackCliOptionStatusCode(statusCodeOption);
|
|
185626
|
+
telemetry2.trackCliOptionSource(sourceOption);
|
|
185627
|
+
telemetry2.trackCliOptionSince(sinceOption);
|
|
185628
|
+
telemetry2.trackCliOptionUntil(untilOption);
|
|
185629
|
+
telemetry2.trackCliOptionLimit(limitOption2);
|
|
185630
|
+
telemetry2.trackCliFlagJson(jsonOption);
|
|
185631
|
+
telemetry2.trackCliOptionQuery(queryOption);
|
|
185632
|
+
telemetry2.trackCliOptionRequestId(requestIdOption);
|
|
185633
|
+
let contextName = null;
|
|
185634
|
+
try {
|
|
185635
|
+
({ contextName } = await getScope(client2));
|
|
185636
|
+
} catch (err) {
|
|
185637
|
+
if ((0, import_error_utils30.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
|
185638
|
+
output_manager_default.error(err.message);
|
|
185639
|
+
return 1;
|
|
185640
|
+
}
|
|
185641
|
+
throw err;
|
|
185642
|
+
}
|
|
185643
|
+
let projectId;
|
|
185644
|
+
let ownerId;
|
|
185645
|
+
if (projectOption) {
|
|
185646
|
+
output_manager_default.spinner(`Fetching project "${projectOption}"`, 1e3);
|
|
185647
|
+
const project = await getProjectByNameOrId(
|
|
185648
|
+
client2,
|
|
185649
|
+
projectOption,
|
|
185650
|
+
client2.config.currentTeam
|
|
185651
|
+
);
|
|
185652
|
+
output_manager_default.stopSpinner();
|
|
185653
|
+
if (project instanceof ProjectNotFound) {
|
|
185654
|
+
output_manager_default.error(`Project not found: ${projectOption}`);
|
|
185655
|
+
return 1;
|
|
185656
|
+
}
|
|
185657
|
+
projectId = project.id;
|
|
185658
|
+
ownerId = project.accountId;
|
|
185659
|
+
} else {
|
|
185660
|
+
const link4 = await getLinkedProject(client2);
|
|
185661
|
+
if (link4.status === "error") {
|
|
185662
|
+
return link4.exitCode;
|
|
185663
|
+
} else if (link4.status === "not_linked") {
|
|
185664
|
+
output_manager_default.error(
|
|
185665
|
+
`Your codebase isn't linked to a project on Vercel. Run ${getCommandName(
|
|
185666
|
+
"link"
|
|
185667
|
+
)} to begin, or specify a project with ${import_chalk114.default.bold("--project")}.`
|
|
185668
|
+
);
|
|
185669
|
+
return 1;
|
|
185670
|
+
}
|
|
185671
|
+
client2.config.currentTeam = link4.org.type === "team" ? link4.org.id : void 0;
|
|
185672
|
+
projectId = link4.project.id;
|
|
185673
|
+
ownerId = link4.org.id;
|
|
185674
|
+
}
|
|
185675
|
+
let deploymentId;
|
|
185676
|
+
if (deploymentOption) {
|
|
185677
|
+
output_manager_default.spinner(`Resolving deployment "${deploymentOption}"`, 1e3);
|
|
185678
|
+
try {
|
|
185679
|
+
const deployment = await getDeployment(
|
|
185680
|
+
client2,
|
|
185681
|
+
contextName,
|
|
185682
|
+
deploymentOption
|
|
185683
|
+
);
|
|
185684
|
+
deploymentId = deployment.id;
|
|
185685
|
+
output_manager_default.stopSpinner();
|
|
185686
|
+
} catch (err) {
|
|
185687
|
+
output_manager_default.stopSpinner();
|
|
185688
|
+
if (err instanceof DeploymentNotFound) {
|
|
185689
|
+
output_manager_default.error(`Deployment not found: ${deploymentOption}`);
|
|
185690
|
+
return 1;
|
|
185691
|
+
}
|
|
185692
|
+
if (err instanceof InvalidDeploymentId) {
|
|
185693
|
+
output_manager_default.error(`Invalid deployment ID: ${deploymentOption}`);
|
|
185694
|
+
return 1;
|
|
185695
|
+
}
|
|
185696
|
+
throw err;
|
|
185697
|
+
}
|
|
185698
|
+
}
|
|
185699
|
+
if (environmentOption && !["production", "preview"].includes(environmentOption)) {
|
|
185700
|
+
output_manager_default.error(
|
|
185701
|
+
`Invalid environment: ${environmentOption}. Must be "production" or "preview".`
|
|
185702
|
+
);
|
|
185703
|
+
return 1;
|
|
185704
|
+
}
|
|
185705
|
+
const validLevels = ["error", "warning", "info", "fatal"];
|
|
185706
|
+
const levels = parseLevels(levelOption);
|
|
185707
|
+
for (const level of levels) {
|
|
185708
|
+
if (!validLevels.includes(level)) {
|
|
185709
|
+
output_manager_default.error(
|
|
185710
|
+
`Invalid log level: ${level}. Must be one of: ${validLevels.join(", ")}.`
|
|
185711
|
+
);
|
|
185712
|
+
return 1;
|
|
185713
|
+
}
|
|
185714
|
+
}
|
|
185715
|
+
const validSources = [
|
|
185716
|
+
"serverless",
|
|
185717
|
+
"edge-function",
|
|
185718
|
+
"edge-middleware",
|
|
185719
|
+
"static"
|
|
185720
|
+
];
|
|
185721
|
+
const sources = parseSources(sourceOption);
|
|
185722
|
+
for (const source of sources) {
|
|
185723
|
+
if (!validSources.includes(source)) {
|
|
185724
|
+
output_manager_default.error(
|
|
185725
|
+
`Invalid source: ${source}. Must be one of: ${validSources.join(", ")}.`
|
|
185726
|
+
);
|
|
185727
|
+
return 1;
|
|
185728
|
+
}
|
|
185729
|
+
}
|
|
185730
|
+
const limit = limitOption2 ?? 100;
|
|
185731
|
+
if (!jsonOption) {
|
|
185732
|
+
output_manager_default.print(
|
|
185733
|
+
`Fetching logs for project ${import_chalk114.default.bold(projectId)} in ${import_chalk114.default.bold(contextName)}...
|
|
185734
|
+
|
|
185735
|
+
`
|
|
185736
|
+
);
|
|
185737
|
+
}
|
|
185738
|
+
output_manager_default.spinner("Fetching logs...", 1e3);
|
|
185739
|
+
let count = 0;
|
|
185740
|
+
try {
|
|
185741
|
+
for await (const log2 of fetchAllRequestLogs(client2, {
|
|
185742
|
+
projectId,
|
|
185743
|
+
ownerId,
|
|
185744
|
+
deploymentId,
|
|
185745
|
+
environment: environmentOption,
|
|
185746
|
+
level: levels.length > 0 ? levels : void 0,
|
|
185747
|
+
statusCode: statusCodeOption,
|
|
185748
|
+
source: sources.length > 0 ? sources : void 0,
|
|
185749
|
+
since: sinceOption,
|
|
185750
|
+
until: untilOption,
|
|
185751
|
+
limit,
|
|
185752
|
+
search: queryOption,
|
|
185753
|
+
requestId: requestIdOption
|
|
185754
|
+
})) {
|
|
185755
|
+
output_manager_default.stopSpinner();
|
|
185756
|
+
if (jsonOption) {
|
|
185757
|
+
client2.stdout.write(JSON.stringify(log2) + "\n");
|
|
185758
|
+
} else {
|
|
185759
|
+
prettyPrintLogEntry(log2);
|
|
185760
|
+
}
|
|
185761
|
+
count++;
|
|
185762
|
+
}
|
|
185763
|
+
} catch (err) {
|
|
185764
|
+
output_manager_default.stopSpinner();
|
|
185765
|
+
printError(err);
|
|
185766
|
+
return 1;
|
|
185767
|
+
}
|
|
185768
|
+
output_manager_default.stopSpinner();
|
|
185769
|
+
if (!jsonOption) {
|
|
185770
|
+
if (count === 0) {
|
|
185771
|
+
output_manager_default.print(
|
|
185772
|
+
import_chalk114.default.gray("No logs found matching the specified filters.\n")
|
|
185773
|
+
);
|
|
185774
|
+
} else {
|
|
185775
|
+
output_manager_default.print(import_chalk114.default.gray(`
|
|
185776
|
+
Displayed ${count} log entries.
|
|
185777
|
+
`));
|
|
185778
|
+
}
|
|
185779
|
+
}
|
|
185780
|
+
return 0;
|
|
185781
|
+
}
|
|
185782
|
+
function prettyPrintLogEntry(log2) {
|
|
185783
|
+
const date = (0, import_date_fns3.format)(log2.timestamp, DATE_TIME_FORMAT2);
|
|
185784
|
+
const levelIcon = getLevelIcon2(log2.level);
|
|
185785
|
+
const sourceIcon = getSourceIcon2(log2.source);
|
|
185786
|
+
const status3 = log2.responseStatusCode <= 0 ? import_chalk114.default.gray("---") : getStatusColor(log2.responseStatusCode);
|
|
185787
|
+
const headerLine = `${import_chalk114.default.dim(date)} ${levelIcon} ${import_chalk114.default.bold(
|
|
185788
|
+
log2.requestMethod.padEnd(6)
|
|
185789
|
+
)} ${status3} ${import_chalk114.default.dim(log2.domain)} ${sourceIcon} ${log2.requestPath}`;
|
|
185790
|
+
output_manager_default.print(`${headerLine}
|
|
185791
|
+
`);
|
|
185792
|
+
if (log2.message) {
|
|
185793
|
+
const message2 = log2.message.replace(/\n$/, "");
|
|
185794
|
+
const truncatedIndicator = log2.messageTruncated ? import_chalk114.default.gray("\u2026") : "";
|
|
185795
|
+
output_manager_default.print(
|
|
185796
|
+
`${colorizeMessage(message2, log2.level)}${truncatedIndicator}
|
|
185797
|
+
|
|
185798
|
+
`
|
|
185799
|
+
);
|
|
185800
|
+
} else {
|
|
185801
|
+
output_manager_default.print("\n");
|
|
185802
|
+
}
|
|
185803
|
+
}
|
|
185804
|
+
function getLevelIcon2(level) {
|
|
185805
|
+
switch (level) {
|
|
185806
|
+
case "fatal":
|
|
185807
|
+
case "error":
|
|
185808
|
+
return "\u{1F6AB}";
|
|
185809
|
+
case "warning":
|
|
185810
|
+
return "\u26A0\uFE0F";
|
|
185811
|
+
default:
|
|
185812
|
+
return "\u2139\uFE0F";
|
|
185813
|
+
}
|
|
185814
|
+
}
|
|
185815
|
+
function getSourceIcon2(source) {
|
|
185816
|
+
switch (source) {
|
|
185817
|
+
case "edge-function":
|
|
185818
|
+
return "\u0D28";
|
|
185819
|
+
case "edge-middleware":
|
|
185820
|
+
return "\u025B";
|
|
185821
|
+
case "serverless":
|
|
185822
|
+
return "\u0192";
|
|
185823
|
+
default:
|
|
185824
|
+
return " ";
|
|
185825
|
+
}
|
|
185826
|
+
}
|
|
185827
|
+
function getStatusColor(status3) {
|
|
185828
|
+
const statusStr = String(status3);
|
|
185829
|
+
if (status3 >= 500) {
|
|
185830
|
+
return import_chalk114.default.red(statusStr);
|
|
185831
|
+
} else if (status3 >= 400) {
|
|
185832
|
+
return import_chalk114.default.yellow(statusStr);
|
|
185833
|
+
} else if (status3 >= 300) {
|
|
185834
|
+
return import_chalk114.default.cyan(statusStr);
|
|
185835
|
+
} else if (status3 >= 200) {
|
|
185836
|
+
return import_chalk114.default.green(statusStr);
|
|
185837
|
+
}
|
|
185838
|
+
return import_chalk114.default.gray(statusStr);
|
|
185839
|
+
}
|
|
185840
|
+
function colorizeMessage(message2, level) {
|
|
185841
|
+
switch (level) {
|
|
185842
|
+
case "fatal":
|
|
185843
|
+
case "error":
|
|
185844
|
+
return import_chalk114.default.red(message2);
|
|
185845
|
+
case "warning":
|
|
185846
|
+
return import_chalk114.default.yellow(message2);
|
|
185847
|
+
default:
|
|
185848
|
+
return message2;
|
|
185849
|
+
}
|
|
185850
|
+
}
|
|
185851
|
+
var import_error_utils30, import_chalk114, import_date_fns3, DATE_TIME_FORMAT2;
|
|
185852
|
+
var init_logsv22 = __esm({
|
|
185853
|
+
"src/commands/logsv2/index.ts"() {
|
|
185854
|
+
"use strict";
|
|
185855
|
+
import_error_utils30 = __toESM3(require_dist2(), 1);
|
|
185856
|
+
import_chalk114 = __toESM3(require_source(), 1);
|
|
185857
|
+
import_date_fns3 = __toESM3(require_date_fns(), 1);
|
|
185858
|
+
init_error2();
|
|
185859
|
+
init_get_args();
|
|
185860
|
+
init_get_flags_specification();
|
|
185861
|
+
init_get_scope();
|
|
185862
|
+
init_get_project_by_id_or_name();
|
|
185863
|
+
init_link2();
|
|
185864
|
+
init_errors_ts();
|
|
185865
|
+
init_logs_v2();
|
|
185866
|
+
init_get_deployment();
|
|
185867
|
+
init_pkg_name();
|
|
185868
|
+
init_logsv2();
|
|
185869
|
+
init_help();
|
|
185870
|
+
init_command25();
|
|
185871
|
+
init_output_manager();
|
|
185872
|
+
DATE_TIME_FORMAT2 = "MMM dd HH:mm:ss.SS";
|
|
185873
|
+
}
|
|
185874
|
+
});
|
|
185875
|
+
|
|
185222
185876
|
// src/commands/mcp/mcp.ts
|
|
185223
185877
|
import { execSync as execSync2 } from "child_process";
|
|
185224
185878
|
function getAvailableClients() {
|
|
@@ -185563,7 +186217,7 @@ var init_mcp2 = __esm({
|
|
|
185563
186217
|
init_get_args();
|
|
185564
186218
|
init_error2();
|
|
185565
186219
|
init_help();
|
|
185566
|
-
|
|
186220
|
+
init_command26();
|
|
185567
186221
|
init_get_flags_specification();
|
|
185568
186222
|
init_output_manager();
|
|
185569
186223
|
init_mcp();
|
|
@@ -185614,16 +186268,16 @@ async function logout(client2) {
|
|
|
185614
186268
|
return 0;
|
|
185615
186269
|
}
|
|
185616
186270
|
} catch (err) {
|
|
185617
|
-
output_manager_default.debug((0,
|
|
186271
|
+
output_manager_default.debug((0, import_error_utils31.errorToString)(err));
|
|
185618
186272
|
output_manager_default.error("Failed during logout");
|
|
185619
186273
|
}
|
|
185620
186274
|
return 1;
|
|
185621
186275
|
}
|
|
185622
|
-
var
|
|
186276
|
+
var import_error_utils31;
|
|
185623
186277
|
var init_future2 = __esm({
|
|
185624
186278
|
"src/commands/logout/future.ts"() {
|
|
185625
186279
|
"use strict";
|
|
185626
|
-
|
|
186280
|
+
import_error_utils31 = __toESM3(require_dist2(), 1);
|
|
185627
186281
|
init_pkg_name();
|
|
185628
186282
|
init_oauth();
|
|
185629
186283
|
init_output_manager();
|
|
@@ -185689,7 +186343,7 @@ async function logout2(client2) {
|
|
|
185689
186343
|
writeToAuthConfigFile(authConfig);
|
|
185690
186344
|
output_manager_default.debug("Configuration has been deleted");
|
|
185691
186345
|
} catch (err) {
|
|
185692
|
-
output_manager_default.debug((0,
|
|
186346
|
+
output_manager_default.debug((0, import_error_utils32.errorToString)(err));
|
|
185693
186347
|
exitCode2 = 1;
|
|
185694
186348
|
}
|
|
185695
186349
|
if (exitCode2 === 0) {
|
|
@@ -185699,7 +186353,7 @@ async function logout2(client2) {
|
|
|
185699
186353
|
}
|
|
185700
186354
|
return exitCode2;
|
|
185701
186355
|
}
|
|
185702
|
-
var
|
|
186356
|
+
var import_error_utils32;
|
|
185703
186357
|
var init_logout2 = __esm({
|
|
185704
186358
|
"src/commands/logout/index.ts"() {
|
|
185705
186359
|
"use strict";
|
|
@@ -185708,7 +186362,7 @@ var init_logout2 = __esm({
|
|
|
185708
186362
|
init_get_args();
|
|
185709
186363
|
init_pkg_name();
|
|
185710
186364
|
init_errors_ts();
|
|
185711
|
-
|
|
186365
|
+
import_error_utils32 = __toESM3(require_dist2(), 1);
|
|
185712
186366
|
init_help();
|
|
185713
186367
|
init_command23();
|
|
185714
186368
|
init_get_flags_specification();
|
|
@@ -185735,7 +186389,7 @@ async function pull2(client2) {
|
|
|
185735
186389
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
185736
186390
|
const { contextName } = await getScope(client2);
|
|
185737
186391
|
output_manager_default.spinner(
|
|
185738
|
-
`Fetching microfrontends configuration in ${
|
|
186392
|
+
`Fetching microfrontends configuration in ${import_chalk115.default.bold(contextName)}`
|
|
185739
186393
|
);
|
|
185740
186394
|
let parsedArgs;
|
|
185741
186395
|
const flagsSpecification = getFlagsSpecification(pullSubcommand2.options);
|
|
@@ -185783,11 +186437,11 @@ async function pull2(client2) {
|
|
|
185783
186437
|
const microfrontendsStamp = stamp_default();
|
|
185784
186438
|
output_manager_default.print(
|
|
185785
186439
|
`${prependEmoji(
|
|
185786
|
-
`Downloaded microfrontends configuration to ${
|
|
186440
|
+
`Downloaded microfrontends configuration to ${import_chalk115.default.bold(
|
|
185787
186441
|
humanizePath(
|
|
185788
186442
|
join23(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS)
|
|
185789
186443
|
)
|
|
185790
|
-
)} ${
|
|
186444
|
+
)} ${import_chalk115.default.gray(microfrontendsStamp())}`,
|
|
185791
186445
|
emoji("success")
|
|
185792
186446
|
)}
|
|
185793
186447
|
`
|
|
@@ -185799,11 +186453,11 @@ async function pull2(client2) {
|
|
|
185799
186453
|
return 1;
|
|
185800
186454
|
}
|
|
185801
186455
|
}
|
|
185802
|
-
var
|
|
186456
|
+
var import_chalk115, import_fs_extra23, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS;
|
|
185803
186457
|
var init_pull5 = __esm({
|
|
185804
186458
|
"src/commands/microfrontends/pull.ts"() {
|
|
185805
186459
|
"use strict";
|
|
185806
|
-
|
|
186460
|
+
import_chalk115 = __toESM3(require_source(), 1);
|
|
185807
186461
|
init_output_manager();
|
|
185808
186462
|
init_get_scope();
|
|
185809
186463
|
init_ensure_link();
|
|
@@ -185811,7 +186465,7 @@ var init_pull5 = __esm({
|
|
|
185811
186465
|
init_humanize_path();
|
|
185812
186466
|
init_stamp();
|
|
185813
186467
|
import_fs_extra23 = __toESM3(require_lib(), 1);
|
|
185814
|
-
|
|
186468
|
+
init_command27();
|
|
185815
186469
|
init_get_flags_specification();
|
|
185816
186470
|
init_get_args();
|
|
185817
186471
|
init_error2();
|
|
@@ -185906,7 +186560,7 @@ var init_microfrontends2 = __esm({
|
|
|
185906
186560
|
init_error2();
|
|
185907
186561
|
init_help();
|
|
185908
186562
|
init_pull5();
|
|
185909
|
-
|
|
186563
|
+
init_command27();
|
|
185910
186564
|
init_get_flags_specification();
|
|
185911
186565
|
init_output_manager();
|
|
185912
186566
|
init_commands();
|
|
@@ -185988,7 +186642,7 @@ var init_open3 = __esm({
|
|
|
185988
186642
|
"use strict";
|
|
185989
186643
|
import_open6 = __toESM3(require_open(), 1);
|
|
185990
186644
|
init_help();
|
|
185991
|
-
|
|
186645
|
+
init_command28();
|
|
185992
186646
|
init_get_args();
|
|
185993
186647
|
init_get_flags_specification();
|
|
185994
186648
|
init_error2();
|
|
@@ -186035,12 +186689,12 @@ async function add6(client2, argv) {
|
|
|
186035
186689
|
const { args: args2 } = parsedArgs;
|
|
186036
186690
|
if (args2.length !== 1) {
|
|
186037
186691
|
output_manager_default.error(
|
|
186038
|
-
`Invalid number of arguments. Usage: ${
|
|
186692
|
+
`Invalid number of arguments. Usage: ${import_chalk116.default.cyan(
|
|
186039
186693
|
`${getCommandName("project add <name>")}`
|
|
186040
186694
|
)}`
|
|
186041
186695
|
);
|
|
186042
186696
|
if (args2.length > 1) {
|
|
186043
|
-
const example =
|
|
186697
|
+
const example = import_chalk116.default.cyan(
|
|
186044
186698
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
|
186045
186699
|
);
|
|
186046
186700
|
output_manager_default.log(
|
|
@@ -186065,27 +186719,27 @@ async function add6(client2, argv) {
|
|
|
186065
186719
|
throw err;
|
|
186066
186720
|
}
|
|
186067
186721
|
}
|
|
186068
|
-
const elapsed2 = (0,
|
|
186722
|
+
const elapsed2 = (0, import_ms22.default)(Date.now() - start);
|
|
186069
186723
|
const { contextName } = await getScope(client2);
|
|
186070
186724
|
output_manager_default.log(
|
|
186071
|
-
`${
|
|
186725
|
+
`${import_chalk116.default.cyan("Success!")} Project ${import_chalk116.default.bold(
|
|
186072
186726
|
name.toLowerCase()
|
|
186073
|
-
)} added (${
|
|
186727
|
+
)} added (${import_chalk116.default.bold(contextName)}) ${import_chalk116.default.gray(`[${elapsed2}]`)}`
|
|
186074
186728
|
);
|
|
186075
186729
|
return 0;
|
|
186076
186730
|
}
|
|
186077
|
-
var
|
|
186731
|
+
var import_chalk116, import_ms22;
|
|
186078
186732
|
var init_add12 = __esm({
|
|
186079
186733
|
"src/commands/project/add.ts"() {
|
|
186080
186734
|
"use strict";
|
|
186081
|
-
|
|
186082
|
-
|
|
186735
|
+
import_chalk116 = __toESM3(require_source(), 1);
|
|
186736
|
+
import_ms22 = __toESM3(require_ms(), 1);
|
|
186083
186737
|
init_errors_ts();
|
|
186084
186738
|
init_pkg_name();
|
|
186085
186739
|
init_create_project();
|
|
186086
186740
|
init_output_manager();
|
|
186087
186741
|
init_add11();
|
|
186088
|
-
|
|
186742
|
+
init_command29();
|
|
186089
186743
|
init_get_args();
|
|
186090
186744
|
init_get_flags_specification();
|
|
186091
186745
|
init_error2();
|
|
@@ -186177,7 +186831,7 @@ async function inspect4(client2, argv) {
|
|
|
186177
186831
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
186178
186832
|
if (args2.length !== 0 && args2.length !== 1) {
|
|
186179
186833
|
output_manager_default.error(
|
|
186180
|
-
`Invalid number of arguments. Usage: ${
|
|
186834
|
+
`Invalid number of arguments. Usage: ${import_chalk117.default.cyan(
|
|
186181
186835
|
`${getCommandName("project inspect <name>")}`
|
|
186182
186836
|
)}`
|
|
186183
186837
|
);
|
|
@@ -186192,57 +186846,57 @@ async function inspect4(client2, argv) {
|
|
|
186192
186846
|
});
|
|
186193
186847
|
const org = await getTeamById(client2, project.accountId);
|
|
186194
186848
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
186195
|
-
output_manager_default.log(`Found Project ${projectSlugLink} ${
|
|
186849
|
+
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk117.default.gray(inspectStamp())}`);
|
|
186196
186850
|
output_manager_default.print("\n");
|
|
186197
|
-
output_manager_default.print(
|
|
186198
|
-
output_manager_default.print(` ${
|
|
186851
|
+
output_manager_default.print(import_chalk117.default.bold(" General\n\n"));
|
|
186852
|
+
output_manager_default.print(` ${import_chalk117.default.cyan("ID")} ${project.id}
|
|
186199
186853
|
`);
|
|
186200
|
-
output_manager_default.print(` ${
|
|
186854
|
+
output_manager_default.print(` ${import_chalk117.default.cyan("Name")} ${project.name}
|
|
186201
186855
|
`);
|
|
186202
|
-
output_manager_default.print(` ${
|
|
186856
|
+
output_manager_default.print(` ${import_chalk117.default.cyan("Owner")} ${org.name}
|
|
186203
186857
|
`);
|
|
186204
186858
|
output_manager_default.print(
|
|
186205
|
-
` ${
|
|
186859
|
+
` ${import_chalk117.default.cyan("Created At")} ${formatDate(project.createdAt)}
|
|
186206
186860
|
`
|
|
186207
186861
|
);
|
|
186208
186862
|
output_manager_default.print(
|
|
186209
|
-
` ${
|
|
186863
|
+
` ${import_chalk117.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
|
|
186210
186864
|
`
|
|
186211
186865
|
);
|
|
186212
186866
|
output_manager_default.print(
|
|
186213
|
-
` ${
|
|
186867
|
+
` ${import_chalk117.default.cyan("Node.js Version")} ${project.nodeVersion}
|
|
186214
186868
|
`
|
|
186215
186869
|
);
|
|
186216
186870
|
const framework = import_frameworks8.frameworkList.find((f) => f.slug === project.framework);
|
|
186217
186871
|
output_manager_default.print("\n");
|
|
186218
|
-
output_manager_default.print(
|
|
186219
|
-
output_manager_default.print(` ${
|
|
186872
|
+
output_manager_default.print(import_chalk117.default.bold(" Framework Settings\n\n"));
|
|
186873
|
+
output_manager_default.print(` ${import_chalk117.default.cyan("Framework Preset")} ${framework?.name}
|
|
186220
186874
|
`);
|
|
186221
186875
|
output_manager_default.print(
|
|
186222
|
-
` ${
|
|
186876
|
+
` ${import_chalk117.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk117.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
|
|
186223
186877
|
`
|
|
186224
186878
|
);
|
|
186225
186879
|
output_manager_default.print(
|
|
186226
|
-
` ${
|
|
186880
|
+
` ${import_chalk117.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk117.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
|
|
186227
186881
|
`
|
|
186228
186882
|
);
|
|
186229
186883
|
output_manager_default.print(
|
|
186230
|
-
` ${
|
|
186884
|
+
` ${import_chalk117.default.cyan("Install Command")} ${project.installCommand ?? import_chalk117.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
|
|
186231
186885
|
`
|
|
186232
186886
|
);
|
|
186233
186887
|
output_manager_default.print("\n");
|
|
186234
186888
|
return 0;
|
|
186235
186889
|
}
|
|
186236
|
-
var
|
|
186890
|
+
var import_chalk117, import_frameworks8;
|
|
186237
186891
|
var init_inspect6 = __esm({
|
|
186238
186892
|
"src/commands/project/inspect.ts"() {
|
|
186239
186893
|
"use strict";
|
|
186240
|
-
|
|
186894
|
+
import_chalk117 = __toESM3(require_source(), 1);
|
|
186241
186895
|
import_frameworks8 = __toESM3(require_frameworks(), 1);
|
|
186242
186896
|
init_pkg_name();
|
|
186243
186897
|
init_inspect5();
|
|
186244
186898
|
init_output_manager();
|
|
186245
|
-
|
|
186899
|
+
init_command29();
|
|
186246
186900
|
init_get_args();
|
|
186247
186901
|
init_get_flags_specification();
|
|
186248
186902
|
init_error2();
|
|
@@ -186301,7 +186955,7 @@ async function list6(client2, argv) {
|
|
|
186301
186955
|
const { args: args2, flags: opts } = parsedArgs;
|
|
186302
186956
|
if (args2.length !== 0) {
|
|
186303
186957
|
output_manager_default.error(
|
|
186304
|
-
`Invalid number of arguments. Usage: ${
|
|
186958
|
+
`Invalid number of arguments. Usage: ${import_chalk118.default.cyan(
|
|
186305
186959
|
`${getCommandName("project ls")}`
|
|
186306
186960
|
)}`
|
|
186307
186961
|
);
|
|
@@ -186309,7 +186963,7 @@ async function list6(client2, argv) {
|
|
|
186309
186963
|
}
|
|
186310
186964
|
const start = Date.now();
|
|
186311
186965
|
const { contextName } = await getScope(client2);
|
|
186312
|
-
output_manager_default.spinner(`Fetching projects in ${
|
|
186966
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk118.default.bold(contextName)}`);
|
|
186313
186967
|
const flags = processFlags(opts, telemetryClient);
|
|
186314
186968
|
const projectsUrl = buildProjectsUrl(flags);
|
|
186315
186969
|
const {
|
|
@@ -186319,7 +186973,7 @@ async function list6(client2, argv) {
|
|
|
186319
186973
|
method: "GET"
|
|
186320
186974
|
});
|
|
186321
186975
|
output_manager_default.stopSpinner();
|
|
186322
|
-
const elapsed2 = (0,
|
|
186976
|
+
const elapsed2 = (0, import_ms23.default)(Date.now() - start);
|
|
186323
186977
|
if (flags.json) {
|
|
186324
186978
|
outputJson(client2, projectList, {
|
|
186325
186979
|
pagination,
|
|
@@ -186382,7 +187036,7 @@ function outputJson(client2, projectList, metadata) {
|
|
|
186382
187036
|
function outputTable(projectList, options) {
|
|
186383
187037
|
const { contextName, elapsed: elapsed2, deprecated, opts, pagination } = options;
|
|
186384
187038
|
output_manager_default.log(
|
|
186385
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
|
187039
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk118.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk118.default.gray(`[${elapsed2}]`)}`
|
|
186386
187040
|
);
|
|
186387
187041
|
if (projectList.length > 0) {
|
|
186388
187042
|
printProjectsTable(projectList);
|
|
@@ -186392,12 +187046,12 @@ function outputTable(projectList, options) {
|
|
|
186392
187046
|
function printProjectsTable(projectList) {
|
|
186393
187047
|
const tablePrint = table(
|
|
186394
187048
|
[
|
|
186395
|
-
TABLE_HEADERS.map((header) =>
|
|
187049
|
+
TABLE_HEADERS.map((header) => import_chalk118.default.bold(import_chalk118.default.cyan(header))),
|
|
186396
187050
|
...projectList.flatMap((project) => [
|
|
186397
187051
|
[
|
|
186398
|
-
|
|
187052
|
+
import_chalk118.default.bold(project.name),
|
|
186399
187053
|
getLatestProdUrl(project),
|
|
186400
|
-
|
|
187054
|
+
import_chalk118.default.gray((0, import_ms23.default)(Date.now() - project.updatedAt)),
|
|
186401
187055
|
project.nodeVersion ?? ""
|
|
186402
187056
|
]
|
|
186403
187057
|
])
|
|
@@ -186422,18 +187076,18 @@ function getLatestProdUrl(project) {
|
|
|
186422
187076
|
return `https://${alias2}`;
|
|
186423
187077
|
return "--";
|
|
186424
187078
|
}
|
|
186425
|
-
var
|
|
187079
|
+
var import_ms23, import_chalk118, TABLE_HEADERS, PAGINATION_FLAGS_TO_EXCLUDE, BASE_PROJECTS_URL;
|
|
186426
187080
|
var init_list10 = __esm({
|
|
186427
187081
|
"src/commands/project/list.ts"() {
|
|
186428
187082
|
"use strict";
|
|
186429
|
-
|
|
186430
|
-
|
|
187083
|
+
import_ms23 = __toESM3(require_ms(), 1);
|
|
187084
|
+
import_chalk118 = __toESM3(require_source(), 1);
|
|
186431
187085
|
init_table();
|
|
186432
187086
|
init_get_command_flags();
|
|
186433
187087
|
init_pkg_name();
|
|
186434
187088
|
init_list9();
|
|
186435
187089
|
init_output_manager();
|
|
186436
|
-
|
|
187090
|
+
init_command29();
|
|
186437
187091
|
init_get_args();
|
|
186438
187092
|
init_get_flags_specification();
|
|
186439
187093
|
init_error2();
|
|
@@ -186486,7 +187140,7 @@ async function rm6(client2, argv) {
|
|
|
186486
187140
|
const { args: args2 } = parsedArgs;
|
|
186487
187141
|
if (args2.length !== 1) {
|
|
186488
187142
|
output_manager_default.error(
|
|
186489
|
-
`Invalid number of arguments. Usage: ${
|
|
187143
|
+
`Invalid number of arguments. Usage: ${import_chalk119.default.cyan(
|
|
186490
187144
|
`${getCommandName("project rm <name>")}`
|
|
186491
187145
|
)}`
|
|
186492
187146
|
);
|
|
@@ -186514,9 +187168,9 @@ async function rm6(client2, argv) {
|
|
|
186514
187168
|
return 1;
|
|
186515
187169
|
}
|
|
186516
187170
|
}
|
|
186517
|
-
const elapsed2 = (0,
|
|
187171
|
+
const elapsed2 = (0, import_ms24.default)(Date.now() - start);
|
|
186518
187172
|
output_manager_default.log(
|
|
186519
|
-
`${
|
|
187173
|
+
`${import_chalk119.default.cyan("Success!")} Project ${import_chalk119.default.bold(name)} removed ${import_chalk119.default.gray(
|
|
186520
187174
|
`[${elapsed2}]`
|
|
186521
187175
|
)}`
|
|
186522
187176
|
);
|
|
@@ -186525,23 +187179,23 @@ async function rm6(client2, argv) {
|
|
|
186525
187179
|
async function readConfirmation3(client2, projectName) {
|
|
186526
187180
|
output_manager_default.print(
|
|
186527
187181
|
prependEmoji(
|
|
186528
|
-
`The project ${
|
|
187182
|
+
`The project ${import_chalk119.default.bold(projectName)} will be removed permanently.
|
|
186529
187183
|
It will also delete everything under the project including deployments.
|
|
186530
187184
|
`,
|
|
186531
187185
|
emoji("warning")
|
|
186532
187186
|
)
|
|
186533
187187
|
);
|
|
186534
187188
|
return await client2.input.confirm(
|
|
186535
|
-
`${
|
|
187189
|
+
`${import_chalk119.default.bold.red("Are you sure?")}`,
|
|
186536
187190
|
false
|
|
186537
187191
|
);
|
|
186538
187192
|
}
|
|
186539
|
-
var
|
|
187193
|
+
var import_chalk119, import_ms24, e;
|
|
186540
187194
|
var init_rm10 = __esm({
|
|
186541
187195
|
"src/commands/project/rm.ts"() {
|
|
186542
187196
|
"use strict";
|
|
186543
|
-
|
|
186544
|
-
|
|
187197
|
+
import_chalk119 = __toESM3(require_source(), 1);
|
|
187198
|
+
import_ms24 = __toESM3(require_ms(), 1);
|
|
186545
187199
|
init_emoji();
|
|
186546
187200
|
init_errors_ts();
|
|
186547
187201
|
init_pkg_name();
|
|
@@ -186550,7 +187204,7 @@ var init_rm10 = __esm({
|
|
|
186550
187204
|
init_get_args();
|
|
186551
187205
|
init_get_flags_specification();
|
|
186552
187206
|
init_error2();
|
|
186553
|
-
|
|
187207
|
+
init_command29();
|
|
186554
187208
|
e = encodeURIComponent;
|
|
186555
187209
|
}
|
|
186556
187210
|
});
|
|
@@ -186677,7 +187331,7 @@ var init_project2 = __esm({
|
|
|
186677
187331
|
init_inspect6();
|
|
186678
187332
|
init_list10();
|
|
186679
187333
|
init_rm10();
|
|
186680
|
-
|
|
187334
|
+
init_command29();
|
|
186681
187335
|
init_get_flags_specification();
|
|
186682
187336
|
init_project();
|
|
186683
187337
|
init_output_manager();
|
|
@@ -186708,7 +187362,7 @@ async function getProjectByDeployment({
|
|
|
186708
187362
|
let team;
|
|
186709
187363
|
try {
|
|
186710
187364
|
output_manager_default?.spinner(
|
|
186711
|
-
`Fetching deployment "${deployId}" in ${
|
|
187365
|
+
`Fetching deployment "${deployId}" in ${import_chalk120.default.bold(contextName)}\u2026`
|
|
186712
187366
|
);
|
|
186713
187367
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
186714
187368
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -186725,12 +187379,12 @@ async function getProjectByDeployment({
|
|
|
186725
187379
|
team = teamResult.value;
|
|
186726
187380
|
deployment = deploymentResult.value;
|
|
186727
187381
|
output_manager_default?.log(
|
|
186728
|
-
`Fetching deployment "${deployId}" in ${
|
|
187382
|
+
`Fetching deployment "${deployId}" in ${import_chalk120.default.bold(contextName)}\u2026`
|
|
186729
187383
|
);
|
|
186730
187384
|
if (deployment.team?.id) {
|
|
186731
187385
|
if (!team || deployment.team.id !== team.id) {
|
|
186732
187386
|
const err = new Error(
|
|
186733
|
-
team ? `Deployment doesn't belong to current team ${
|
|
187387
|
+
team ? `Deployment doesn't belong to current team ${import_chalk120.default.bold(
|
|
186734
187388
|
contextName
|
|
186735
187389
|
)}` : `Deployment belongs to a different team`
|
|
186736
187390
|
);
|
|
@@ -186739,7 +187393,7 @@ async function getProjectByDeployment({
|
|
|
186739
187393
|
}
|
|
186740
187394
|
} else if (team) {
|
|
186741
187395
|
const err = new Error(
|
|
186742
|
-
`Deployment doesn't belong to current team ${
|
|
187396
|
+
`Deployment doesn't belong to current team ${import_chalk120.default.bold(contextName)}`
|
|
186743
187397
|
);
|
|
186744
187398
|
err.code = "ERR_INVALID_TEAM";
|
|
186745
187399
|
throw err;
|
|
@@ -186760,11 +187414,11 @@ async function getProjectByDeployment({
|
|
|
186760
187414
|
output_manager_default?.stopSpinner();
|
|
186761
187415
|
}
|
|
186762
187416
|
}
|
|
186763
|
-
var
|
|
187417
|
+
var import_chalk120;
|
|
186764
187418
|
var init_get_project_by_deployment = __esm({
|
|
186765
187419
|
"src/util/projects/get-project-by-deployment.ts"() {
|
|
186766
187420
|
"use strict";
|
|
186767
|
-
|
|
187421
|
+
import_chalk120 = __toESM3(require_source(), 1);
|
|
186768
187422
|
init_get_deployment();
|
|
186769
187423
|
init_get_project_by_id_or_name();
|
|
186770
187424
|
init_get_scope();
|
|
@@ -186778,21 +187432,21 @@ var init_get_project_by_deployment = __esm({
|
|
|
186778
187432
|
// src/util/alias/render-alias-status.ts
|
|
186779
187433
|
function renderAliasStatus(status3) {
|
|
186780
187434
|
if (status3 === "completed") {
|
|
186781
|
-
return
|
|
187435
|
+
return import_chalk121.default.green(status3);
|
|
186782
187436
|
}
|
|
186783
187437
|
if (status3 === "failed") {
|
|
186784
|
-
return
|
|
187438
|
+
return import_chalk121.default.red(status3);
|
|
186785
187439
|
}
|
|
186786
187440
|
if (status3 === "skipped") {
|
|
186787
|
-
return
|
|
187441
|
+
return import_chalk121.default.gray(status3);
|
|
186788
187442
|
}
|
|
186789
|
-
return
|
|
187443
|
+
return import_chalk121.default.yellow(status3);
|
|
186790
187444
|
}
|
|
186791
|
-
var
|
|
187445
|
+
var import_chalk121;
|
|
186792
187446
|
var init_render_alias_status = __esm({
|
|
186793
187447
|
"src/util/alias/render-alias-status.ts"() {
|
|
186794
187448
|
"use strict";
|
|
186795
|
-
|
|
187449
|
+
import_chalk121 = __toESM3(require_source(), 1);
|
|
186796
187450
|
}
|
|
186797
187451
|
});
|
|
186798
187452
|
|
|
@@ -186821,8 +187475,8 @@ async function promoteStatus({
|
|
|
186821
187475
|
project,
|
|
186822
187476
|
timeout = "3m"
|
|
186823
187477
|
}) {
|
|
186824
|
-
const recentThreshold = Date.now() - (0,
|
|
186825
|
-
const promoteTimeout = Date.now() + (0,
|
|
187478
|
+
const recentThreshold = Date.now() - (0, import_ms25.default)("3m");
|
|
187479
|
+
const promoteTimeout = Date.now() + (0, import_ms25.default)(timeout);
|
|
186826
187480
|
let counter = 0;
|
|
186827
187481
|
let spinnerMessage = deployment ? "Promote in progress" : `Checking promotion status of ${project.name}`;
|
|
186828
187482
|
if (!contextName) {
|
|
@@ -186899,7 +187553,7 @@ async function promoteStatus({
|
|
|
186899
187553
|
}
|
|
186900
187554
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
|
186901
187555
|
output_manager_default.log(
|
|
186902
|
-
`The promotion exceeded its deadline - rerun ${
|
|
187556
|
+
`The promotion exceeded its deadline - rerun ${import_chalk122.default.bold(
|
|
186903
187557
|
`${packageName} promote ${toDeploymentId}`
|
|
186904
187558
|
)} to try again`
|
|
186905
187559
|
);
|
|
@@ -186963,33 +187617,33 @@ async function renderJobSucceeded({
|
|
|
186963
187617
|
let deploymentInfo = "";
|
|
186964
187618
|
try {
|
|
186965
187619
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
186966
|
-
deploymentInfo = `${
|
|
187620
|
+
deploymentInfo = `${import_chalk122.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
186967
187621
|
} catch (err) {
|
|
186968
187622
|
output_manager_default.debug(
|
|
186969
187623
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
186970
187624
|
);
|
|
186971
|
-
deploymentInfo =
|
|
187625
|
+
deploymentInfo = import_chalk122.default.bold(toDeploymentId);
|
|
186972
187626
|
}
|
|
186973
187627
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
|
186974
187628
|
output_manager_default.log(
|
|
186975
|
-
`Success! ${
|
|
187629
|
+
`Success! ${import_chalk122.default.bold(
|
|
186976
187630
|
project.name
|
|
186977
187631
|
)} was promoted to ${deploymentInfo} ${duration}`
|
|
186978
187632
|
);
|
|
186979
187633
|
return 0;
|
|
186980
187634
|
}
|
|
186981
|
-
var
|
|
187635
|
+
var import_chalk122, import_ms25;
|
|
186982
187636
|
var init_status2 = __esm({
|
|
186983
187637
|
"src/commands/promote/status.ts"() {
|
|
186984
187638
|
"use strict";
|
|
186985
|
-
|
|
187639
|
+
import_chalk122 = __toESM3(require_source(), 1);
|
|
186986
187640
|
init_elapsed();
|
|
186987
187641
|
init_format_date();
|
|
186988
187642
|
init_get_deployment();
|
|
186989
187643
|
init_pkg_name();
|
|
186990
187644
|
init_get_project_by_id_or_name();
|
|
186991
187645
|
init_get_scope();
|
|
186992
|
-
|
|
187646
|
+
import_ms25 = __toESM3(require_ms(), 1);
|
|
186993
187647
|
init_errors_ts();
|
|
186994
187648
|
init_render_alias_status();
|
|
186995
187649
|
init_sleep();
|
|
@@ -187039,7 +187693,7 @@ async function requestPromote({
|
|
|
187039
187693
|
}
|
|
187040
187694
|
);
|
|
187041
187695
|
output_manager_default.log(
|
|
187042
|
-
`Successfully created new deployment of ${
|
|
187696
|
+
`Successfully created new deployment of ${import_chalk123.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
|
187043
187697
|
);
|
|
187044
187698
|
return 0;
|
|
187045
187699
|
}
|
|
@@ -187058,9 +187712,9 @@ async function requestPromote({
|
|
|
187058
187712
|
);
|
|
187059
187713
|
return 0;
|
|
187060
187714
|
}
|
|
187061
|
-
if (timeout !== void 0 && (0,
|
|
187715
|
+
if (timeout !== void 0 && (0, import_ms26.default)(timeout) === 0) {
|
|
187062
187716
|
output_manager_default.log(
|
|
187063
|
-
`Successfully requested promote of ${
|
|
187717
|
+
`Successfully requested promote of ${import_chalk123.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
187064
187718
|
);
|
|
187065
187719
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
|
187066
187720
|
return 0;
|
|
@@ -187073,14 +187727,14 @@ async function requestPromote({
|
|
|
187073
187727
|
timeout
|
|
187074
187728
|
});
|
|
187075
187729
|
}
|
|
187076
|
-
var
|
|
187730
|
+
var import_chalk123, import_ms26;
|
|
187077
187731
|
var init_request_promote = __esm({
|
|
187078
187732
|
"src/commands/promote/request-promote.ts"() {
|
|
187079
187733
|
"use strict";
|
|
187080
|
-
|
|
187734
|
+
import_chalk123 = __toESM3(require_source(), 1);
|
|
187081
187735
|
init_pkg_name();
|
|
187082
187736
|
init_get_project_by_deployment();
|
|
187083
|
-
|
|
187737
|
+
import_ms26 = __toESM3(require_ms(), 1);
|
|
187084
187738
|
init_status2();
|
|
187085
187739
|
init_output_manager();
|
|
187086
187740
|
}
|
|
@@ -187129,18 +187783,18 @@ var promote_exports = {};
|
|
|
187129
187783
|
__export3(promote_exports, {
|
|
187130
187784
|
default: () => promote_default
|
|
187131
187785
|
});
|
|
187132
|
-
var
|
|
187786
|
+
var import_ms27, import_error_utils33, promote_default;
|
|
187133
187787
|
var init_promote2 = __esm({
|
|
187134
187788
|
"src/commands/promote/index.ts"() {
|
|
187135
187789
|
"use strict";
|
|
187136
|
-
|
|
187790
|
+
import_ms27 = __toESM3(require_ms(), 1);
|
|
187137
187791
|
init_get_args();
|
|
187138
187792
|
init_get_project_by_cwd_or_link();
|
|
187139
187793
|
init_error2();
|
|
187140
|
-
|
|
187794
|
+
import_error_utils33 = __toESM3(require_dist2(), 1);
|
|
187141
187795
|
init_request_promote();
|
|
187142
187796
|
init_status2();
|
|
187143
|
-
|
|
187797
|
+
init_command30();
|
|
187144
187798
|
init_help();
|
|
187145
187799
|
init_get_flags_specification();
|
|
187146
187800
|
init_promote();
|
|
@@ -187168,7 +187822,7 @@ var init_promote2 = __esm({
|
|
|
187168
187822
|
const yes = parsedArgs.flags["--yes"] ?? false;
|
|
187169
187823
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
187170
187824
|
const timeout = parsedArgs.flags["--timeout"];
|
|
187171
|
-
if (timeout && (0,
|
|
187825
|
+
if (timeout && (0, import_ms27.default)(timeout) === void 0) {
|
|
187172
187826
|
output_manager_default.error(`Invalid timeout "${timeout}"`);
|
|
187173
187827
|
return 1;
|
|
187174
187828
|
}
|
|
@@ -187207,7 +187861,7 @@ var init_promote2 = __esm({
|
|
|
187207
187861
|
yes
|
|
187208
187862
|
});
|
|
187209
187863
|
} catch (err) {
|
|
187210
|
-
if ((0,
|
|
187864
|
+
if ((0, import_error_utils33.isErrnoException)(err)) {
|
|
187211
187865
|
if (err.code === "ERR_CANCELED") {
|
|
187212
187866
|
return 0;
|
|
187213
187867
|
}
|
|
@@ -187238,7 +187892,7 @@ async function getDeploymentByIdOrURL({
|
|
|
187238
187892
|
let team;
|
|
187239
187893
|
try {
|
|
187240
187894
|
output_manager_default.spinner(
|
|
187241
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
187895
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk124.default.bold(contextName)}\u2026`
|
|
187242
187896
|
);
|
|
187243
187897
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
187244
187898
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -187255,7 +187909,7 @@ async function getDeploymentByIdOrURL({
|
|
|
187255
187909
|
team = teamResult.value;
|
|
187256
187910
|
deployment = deploymentResult.value;
|
|
187257
187911
|
output_manager_default.log(
|
|
187258
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
187912
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk124.default.bold(contextName)}\u2026`
|
|
187259
187913
|
);
|
|
187260
187914
|
} finally {
|
|
187261
187915
|
output_manager_default.stopSpinner();
|
|
@@ -187263,7 +187917,7 @@ async function getDeploymentByIdOrURL({
|
|
|
187263
187917
|
if (deployment.team?.id) {
|
|
187264
187918
|
if (!team || deployment.team.id !== team.id) {
|
|
187265
187919
|
const err = new Error(
|
|
187266
|
-
team ? `Deployment doesn't belong to current team ${
|
|
187920
|
+
team ? `Deployment doesn't belong to current team ${import_chalk124.default.bold(
|
|
187267
187921
|
contextName
|
|
187268
187922
|
)}` : `Deployment belongs to a different team`
|
|
187269
187923
|
);
|
|
@@ -187272,18 +187926,18 @@ async function getDeploymentByIdOrURL({
|
|
|
187272
187926
|
}
|
|
187273
187927
|
} else if (team) {
|
|
187274
187928
|
const err = new Error(
|
|
187275
|
-
`Deployment doesn't belong to current team ${
|
|
187929
|
+
`Deployment doesn't belong to current team ${import_chalk124.default.bold(contextName)}`
|
|
187276
187930
|
);
|
|
187277
187931
|
err.code = "ERR_INVALID_TEAM";
|
|
187278
187932
|
throw err;
|
|
187279
187933
|
}
|
|
187280
187934
|
return deployment;
|
|
187281
187935
|
}
|
|
187282
|
-
var
|
|
187936
|
+
var import_chalk124;
|
|
187283
187937
|
var init_get_deployment_by_id_or_url = __esm({
|
|
187284
187938
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
|
187285
187939
|
"use strict";
|
|
187286
|
-
|
|
187940
|
+
import_chalk124 = __toESM3(require_source(), 1);
|
|
187287
187941
|
init_get_deployment();
|
|
187288
187942
|
init_get_team_by_id();
|
|
187289
187943
|
init_is_valid_name();
|
|
@@ -187422,14 +188076,14 @@ async function redeploy(client2) {
|
|
|
187422
188076
|
}
|
|
187423
188077
|
output_manager_default.print(
|
|
187424
188078
|
`${prependEmoji(
|
|
187425
|
-
`Inspect: ${
|
|
188079
|
+
`Inspect: ${import_chalk125.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
|
187426
188080
|
emoji("inspect")
|
|
187427
188081
|
)}
|
|
187428
188082
|
`
|
|
187429
188083
|
);
|
|
187430
188084
|
output_manager_default.print(
|
|
187431
188085
|
prependEmoji(
|
|
187432
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
|
188086
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk125.default.bold(
|
|
187433
188087
|
previewUrl
|
|
187434
188088
|
)} ${deployStamp()}`,
|
|
187435
188089
|
emoji("success")
|
|
@@ -187486,7 +188140,7 @@ async function redeploy(client2) {
|
|
|
187486
188140
|
const prodUrl = `https://${primaryDomain}`;
|
|
187487
188141
|
output_manager_default.print(
|
|
187488
188142
|
prependEmoji(
|
|
187489
|
-
`Aliased: ${
|
|
188143
|
+
`Aliased: ${import_chalk125.default.bold(prodUrl)} ${deployStamp()}`,
|
|
187490
188144
|
emoji("link")
|
|
187491
188145
|
) + "\n"
|
|
187492
188146
|
);
|
|
@@ -187518,19 +188172,19 @@ async function redeploy(client2) {
|
|
|
187518
188172
|
return printDeploymentStatus(deployment, deployStamp, noWait, false);
|
|
187519
188173
|
} catch (err) {
|
|
187520
188174
|
output_manager_default.prettyError(err);
|
|
187521
|
-
if ((0,
|
|
188175
|
+
if ((0, import_error_utils34.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
|
187522
188176
|
output_manager_default.error(
|
|
187523
|
-
`Use ${
|
|
188177
|
+
`Use ${import_chalk125.default.bold("vc switch")} to change your current team`
|
|
187524
188178
|
);
|
|
187525
188179
|
}
|
|
187526
188180
|
return 1;
|
|
187527
188181
|
}
|
|
187528
188182
|
}
|
|
187529
|
-
var
|
|
188183
|
+
var import_chalk125, import_client13, import_error_utils34;
|
|
187530
188184
|
var init_redeploy2 = __esm({
|
|
187531
188185
|
"src/commands/redeploy/index.ts"() {
|
|
187532
188186
|
"use strict";
|
|
187533
|
-
|
|
188187
|
+
import_chalk125 = __toESM3(require_source(), 1);
|
|
187534
188188
|
import_client13 = __toESM3(require_dist7(), 1);
|
|
187535
188189
|
init_emoji();
|
|
187536
188190
|
init_get_args();
|
|
@@ -187538,13 +188192,13 @@ var init_redeploy2 = __esm({
|
|
|
187538
188192
|
init_get_deployment_by_id_or_url();
|
|
187539
188193
|
init_get_scope();
|
|
187540
188194
|
init_error2();
|
|
187541
|
-
|
|
188195
|
+
import_error_utils34 = __toESM3(require_dist2(), 1);
|
|
187542
188196
|
init_util();
|
|
187543
188197
|
init_print_deployment_status();
|
|
187544
188198
|
init_stamp();
|
|
187545
188199
|
init_ua();
|
|
187546
188200
|
init_help();
|
|
187547
|
-
|
|
188201
|
+
init_command32();
|
|
187548
188202
|
init_get_flags_specification();
|
|
187549
188203
|
init_output_manager();
|
|
187550
188204
|
init_redeploy();
|
|
@@ -187690,7 +188344,7 @@ async function list7(client2, argv) {
|
|
|
187690
188344
|
const stagingVersion = versions.find((v) => v.isStaging);
|
|
187691
188345
|
if (!stagingVersion) {
|
|
187692
188346
|
output_manager_default.error(
|
|
187693
|
-
`No staging version found for ${
|
|
188347
|
+
`No staging version found for ${import_chalk126.default.bold(project.name)}. Run ${import_chalk126.default.cyan(
|
|
187694
188348
|
"vercel redirects list-versions"
|
|
187695
188349
|
)} to see available versions.`
|
|
187696
188350
|
);
|
|
@@ -187714,7 +188368,7 @@ async function list7(client2, argv) {
|
|
|
187714
188368
|
);
|
|
187715
188369
|
if (!version2) {
|
|
187716
188370
|
output_manager_default.error(
|
|
187717
|
-
`Version "${versionIdFlag}" not found. Run ${
|
|
188371
|
+
`Version "${versionIdFlag}" not found. Run ${import_chalk126.default.cyan(
|
|
187718
188372
|
"vercel redirects list-versions"
|
|
187719
188373
|
)} to see available versions.`
|
|
187720
188374
|
);
|
|
@@ -187724,7 +188378,7 @@ async function list7(client2, argv) {
|
|
|
187724
188378
|
versionName = version2.name || version2.id;
|
|
187725
188379
|
}
|
|
187726
188380
|
const lsStamp = stamp_default();
|
|
187727
|
-
let spinnerMessage = `Fetching redirects for ${
|
|
188381
|
+
let spinnerMessage = `Fetching redirects for ${import_chalk126.default.bold(project.name)}`;
|
|
187728
188382
|
if (versionName) {
|
|
187729
188383
|
spinnerMessage += ` (version: ${versionName})`;
|
|
187730
188384
|
}
|
|
@@ -187745,46 +188399,46 @@ async function list7(client2, argv) {
|
|
|
187745
188399
|
const removed = redirects.filter((r) => r.action === "-");
|
|
187746
188400
|
const unchanged = redirects.filter((r) => !r.action);
|
|
187747
188401
|
output_manager_default.log(
|
|
187748
|
-
`Changes in staging version ${
|
|
188402
|
+
`Changes in staging version ${import_chalk126.default.bold(versionName || "")} ${import_chalk126.default.gray(lsStamp())}`
|
|
187749
188403
|
);
|
|
187750
188404
|
if (added.length === 0 && removed.length === 0) {
|
|
187751
188405
|
output_manager_default.log("\n No changes from production version\n");
|
|
187752
188406
|
} else {
|
|
187753
188407
|
if (added.length > 0) {
|
|
187754
188408
|
output_manager_default.print(`
|
|
187755
|
-
${
|
|
188409
|
+
${import_chalk126.default.bold(import_chalk126.default.green(`Added (${added.length}):`))}
|
|
187756
188410
|
`);
|
|
187757
188411
|
output_manager_default.print(formatRedirectsTable(added, "+"));
|
|
187758
188412
|
}
|
|
187759
188413
|
if (removed.length > 0) {
|
|
187760
188414
|
output_manager_default.print(`
|
|
187761
|
-
${
|
|
188415
|
+
${import_chalk126.default.bold(import_chalk126.default.red(`Removed (${removed.length}):`))}
|
|
187762
188416
|
`);
|
|
187763
188417
|
output_manager_default.print(formatRedirectsTable(removed, "-"));
|
|
187764
188418
|
}
|
|
187765
188419
|
if (unchanged.length > 0) {
|
|
187766
188420
|
output_manager_default.print(
|
|
187767
188421
|
`
|
|
187768
|
-
${
|
|
188422
|
+
${import_chalk126.default.gray(`${unchanged.length} redirect${unchanged.length === 1 ? "" : "s"} unchanged`)}
|
|
187769
188423
|
`
|
|
187770
188424
|
);
|
|
187771
188425
|
}
|
|
187772
188426
|
output_manager_default.print("\n");
|
|
187773
188427
|
}
|
|
187774
188428
|
} else {
|
|
187775
|
-
let resultMessage = `${(0, import_pluralize13.default)("Redirect", redirects.length, true)} found for ${
|
|
188429
|
+
let resultMessage = `${(0, import_pluralize13.default)("Redirect", redirects.length, true)} found for ${import_chalk126.default.bold(
|
|
187776
188430
|
project.name
|
|
187777
188431
|
)}`;
|
|
187778
188432
|
if (versionName) {
|
|
187779
|
-
resultMessage += ` ${
|
|
188433
|
+
resultMessage += ` ${import_chalk126.default.gray(`(version: ${versionName})`)}`;
|
|
187780
188434
|
}
|
|
187781
188435
|
if (search) {
|
|
187782
188436
|
resultMessage += ` matching "${search}"`;
|
|
187783
188437
|
}
|
|
187784
188438
|
if (pagination) {
|
|
187785
|
-
resultMessage += ` ${
|
|
188439
|
+
resultMessage += ` ${import_chalk126.default.gray(`(page ${pagination.page} of ${pagination.numPages})`)}`;
|
|
187786
188440
|
}
|
|
187787
|
-
resultMessage += ` ${
|
|
188441
|
+
resultMessage += ` ${import_chalk126.default.gray(lsStamp())}`;
|
|
187788
188442
|
output_manager_default.log(resultMessage);
|
|
187789
188443
|
if (redirects.length > 0) {
|
|
187790
188444
|
output_manager_default.print(formatRedirectsTable(redirects));
|
|
@@ -187808,7 +188462,7 @@ function formatRedirectsTable(redirects, actionSymbol) {
|
|
|
187808
188462
|
const rows = redirects.map((redirect2) => {
|
|
187809
188463
|
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
187810
188464
|
const prefix = actionSymbol || "";
|
|
187811
|
-
const colorFn = actionSymbol === "+" ?
|
|
188465
|
+
const colorFn = actionSymbol === "+" ? import_chalk126.default.green : actionSymbol === "-" ? import_chalk126.default.red : (s) => s;
|
|
187812
188466
|
return [
|
|
187813
188467
|
colorFn(`${prefix} ${redirect2.source}`),
|
|
187814
188468
|
colorFn(`${redirect2.destination}`),
|
|
@@ -187821,14 +188475,14 @@ function formatRedirectsTable(redirects, actionSymbol) {
|
|
|
187821
188475
|
[{ rows }]
|
|
187822
188476
|
);
|
|
187823
188477
|
}
|
|
187824
|
-
var
|
|
188478
|
+
var import_chalk126, import_pluralize13;
|
|
187825
188479
|
var init_list11 = __esm({
|
|
187826
188480
|
"src/commands/redirects/list.ts"() {
|
|
187827
188481
|
"use strict";
|
|
187828
|
-
|
|
188482
|
+
import_chalk126 = __toESM3(require_source(), 1);
|
|
187829
188483
|
import_pluralize13 = __toESM3(require_pluralize(), 1);
|
|
187830
188484
|
init_output_manager();
|
|
187831
|
-
|
|
188485
|
+
init_command33();
|
|
187832
188486
|
init_shared2();
|
|
187833
188487
|
init_get_redirects();
|
|
187834
188488
|
init_get_redirect_versions();
|
|
@@ -187849,13 +188503,13 @@ async function listVersions(client2, argv) {
|
|
|
187849
188503
|
const { project, org } = link4;
|
|
187850
188504
|
const teamId = org.type === "team" ? org.id : void 0;
|
|
187851
188505
|
const lsStamp = stamp_default();
|
|
187852
|
-
output_manager_default.spinner(`Fetching redirect versions for ${
|
|
188506
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk127.default.bold(project.name)}`);
|
|
187853
188507
|
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
187854
188508
|
const sortedVersions = sortVersions(versions).slice(0, 20);
|
|
187855
188509
|
output_manager_default.log(
|
|
187856
|
-
`${(0, import_pluralize14.default)("Version", sortedVersions.length, true)} found for ${
|
|
188510
|
+
`${(0, import_pluralize14.default)("Version", sortedVersions.length, true)} found for ${import_chalk127.default.bold(
|
|
187857
188511
|
project.name
|
|
187858
|
-
)} ${
|
|
188512
|
+
)} ${import_chalk127.default.gray(lsStamp())}`
|
|
187859
188513
|
);
|
|
187860
188514
|
if (sortedVersions.length > 0) {
|
|
187861
188515
|
output_manager_default.print(formatVersionsTable(sortedVersions));
|
|
@@ -187879,24 +188533,24 @@ function sortVersions(versions) {
|
|
|
187879
188533
|
function formatVersionsTable(versions) {
|
|
187880
188534
|
const now = Date.now();
|
|
187881
188535
|
const rows = versions.map((version2) => {
|
|
187882
|
-
const age = (0,
|
|
188536
|
+
const age = (0, import_ms28.default)(now - version2.lastModified);
|
|
187883
188537
|
let status3 = "";
|
|
187884
188538
|
if (version2.isStaging) {
|
|
187885
|
-
status3 =
|
|
188539
|
+
status3 = import_chalk127.default.yellow("Staging");
|
|
187886
188540
|
} else if (version2.isLive) {
|
|
187887
|
-
status3 =
|
|
188541
|
+
status3 = import_chalk127.default.green("Live");
|
|
187888
188542
|
} else {
|
|
187889
|
-
status3 =
|
|
188543
|
+
status3 = import_chalk127.default.gray("Previous");
|
|
187890
188544
|
}
|
|
187891
|
-
const name = version2.name ||
|
|
187892
|
-
const redirectCountStr = version2.redirectCount !== void 0 && version2.redirectCount !== null ? version2.redirectCount.toString() :
|
|
188545
|
+
const name = version2.name || import_chalk127.default.gray("(unnamed)");
|
|
188546
|
+
const redirectCountStr = version2.redirectCount !== void 0 && version2.redirectCount !== null ? version2.redirectCount.toString() : import_chalk127.default.gray("-");
|
|
187893
188547
|
return [
|
|
187894
188548
|
status3,
|
|
187895
188549
|
name,
|
|
187896
188550
|
version2.id,
|
|
187897
188551
|
redirectCountStr,
|
|
187898
|
-
version2.createdBy ||
|
|
187899
|
-
|
|
188552
|
+
version2.createdBy || import_chalk127.default.gray("(unknown)"),
|
|
188553
|
+
import_chalk127.default.gray(age + " ago")
|
|
187900
188554
|
];
|
|
187901
188555
|
});
|
|
187902
188556
|
return formatTable(
|
|
@@ -187905,15 +188559,15 @@ function formatVersionsTable(versions) {
|
|
|
187905
188559
|
[{ rows }]
|
|
187906
188560
|
);
|
|
187907
188561
|
}
|
|
187908
|
-
var
|
|
188562
|
+
var import_chalk127, import_ms28, import_pluralize14;
|
|
187909
188563
|
var init_list_versions = __esm({
|
|
187910
188564
|
"src/commands/redirects/list-versions.ts"() {
|
|
187911
188565
|
"use strict";
|
|
187912
|
-
|
|
187913
|
-
|
|
188566
|
+
import_chalk127 = __toESM3(require_source(), 1);
|
|
188567
|
+
import_ms28 = __toESM3(require_ms(), 1);
|
|
187914
188568
|
import_pluralize14 = __toESM3(require_pluralize(), 1);
|
|
187915
188569
|
init_output_manager();
|
|
187916
|
-
|
|
188570
|
+
init_command33();
|
|
187917
188571
|
init_shared2();
|
|
187918
188572
|
init_get_redirect_versions();
|
|
187919
188573
|
init_stamp();
|
|
@@ -188149,11 +188803,11 @@ async function add7(client2, argv) {
|
|
|
188149
188803
|
teamId,
|
|
188150
188804
|
versionName
|
|
188151
188805
|
);
|
|
188152
|
-
output_manager_default.log(`${
|
|
188806
|
+
output_manager_default.log(`${import_chalk128.default.cyan("\u2713")} Redirect added ${import_chalk128.default.gray(addStamp())}`);
|
|
188153
188807
|
output_manager_default.print(`
|
|
188154
|
-
${
|
|
188808
|
+
${import_chalk128.default.bold("Redirect:")}
|
|
188155
188809
|
`);
|
|
188156
|
-
output_manager_default.print(` ${
|
|
188810
|
+
output_manager_default.print(` ${import_chalk128.default.cyan(source)} \u2192 ${import_chalk128.default.cyan(destination)}
|
|
188157
188811
|
`);
|
|
188158
188812
|
output_manager_default.print(` Status: ${statusCode}
|
|
188159
188813
|
`);
|
|
@@ -188167,12 +188821,12 @@ async function add7(client2, argv) {
|
|
|
188167
188821
|
const testUrl = source.startsWith("/") ? `https://${alias2}${source}` : `https://${alias2}`;
|
|
188168
188822
|
output_manager_default.print(
|
|
188169
188823
|
`
|
|
188170
|
-
${
|
|
188824
|
+
${import_chalk128.default.bold("Test your changes:")} ${import_chalk128.default.cyan(testUrl)}
|
|
188171
188825
|
`
|
|
188172
188826
|
);
|
|
188173
188827
|
}
|
|
188174
188828
|
const newVersionName = version2.name || version2.id;
|
|
188175
|
-
output_manager_default.print(` ${
|
|
188829
|
+
output_manager_default.print(` ${import_chalk128.default.bold("New staging version:")} ${newVersionName}
|
|
188176
188830
|
|
|
188177
188831
|
`);
|
|
188178
188832
|
if (!existingStagingVersion) {
|
|
@@ -188191,23 +188845,23 @@ async function add7(client2, argv) {
|
|
|
188191
188845
|
teamId
|
|
188192
188846
|
);
|
|
188193
188847
|
output_manager_default.log(
|
|
188194
|
-
`${
|
|
188848
|
+
`${import_chalk128.default.cyan("\u2713")} Version promoted to production ${import_chalk128.default.gray(promoteStamp())}`
|
|
188195
188849
|
);
|
|
188196
188850
|
}
|
|
188197
188851
|
} else {
|
|
188198
188852
|
output_manager_default.warn(
|
|
188199
|
-
`There are other staged changes. Please review all changes with ${
|
|
188853
|
+
`There are other staged changes. Please review all changes with ${import_chalk128.default.cyan("vercel redirects list --staging")} before promoting to production.`
|
|
188200
188854
|
);
|
|
188201
188855
|
}
|
|
188202
188856
|
return 0;
|
|
188203
188857
|
}
|
|
188204
|
-
var
|
|
188858
|
+
var import_chalk128;
|
|
188205
188859
|
var init_add13 = __esm({
|
|
188206
188860
|
"src/commands/redirects/add.ts"() {
|
|
188207
188861
|
"use strict";
|
|
188208
|
-
|
|
188862
|
+
import_chalk128 = __toESM3(require_source(), 1);
|
|
188209
188863
|
init_output_manager();
|
|
188210
|
-
|
|
188864
|
+
init_command33();
|
|
188211
188865
|
init_shared2();
|
|
188212
188866
|
init_put_redirects();
|
|
188213
188867
|
init_update_redirect_version();
|
|
@@ -188466,7 +189120,7 @@ async function upload(client2, argv) {
|
|
|
188466
189120
|
});
|
|
188467
189121
|
}
|
|
188468
189122
|
output_manager_default.log(
|
|
188469
|
-
`${
|
|
189123
|
+
`${import_chalk129.default.cyan("\u2713")} Redirects uploaded ${import_chalk129.default.gray(uploadStamp())}`
|
|
188470
189124
|
);
|
|
188471
189125
|
output_manager_default.spinner("Fetching diff");
|
|
188472
189126
|
const { redirects } = await getRedirects(client2, project.id, {
|
|
@@ -188476,7 +189130,7 @@ async function upload(client2, argv) {
|
|
|
188476
189130
|
});
|
|
188477
189131
|
const redirectCount = redirects.length;
|
|
188478
189132
|
output_manager_default.print(`
|
|
188479
|
-
${
|
|
189133
|
+
${import_chalk129.default.bold("Summary:")}
|
|
188480
189134
|
`);
|
|
188481
189135
|
output_manager_default.print(
|
|
188482
189136
|
` Uploaded ${redirectCount} redirect${redirectCount === 1 ? "" : "s"}
|
|
@@ -188487,22 +189141,22 @@ async function upload(client2, argv) {
|
|
|
188487
189141
|
const deleted = redirects.filter((r) => r.action === "-");
|
|
188488
189142
|
const edited = redirects.filter((r) => r.action === "~");
|
|
188489
189143
|
output_manager_default.print(`
|
|
188490
|
-
${
|
|
189144
|
+
${import_chalk129.default.bold("Changes:")}
|
|
188491
189145
|
`);
|
|
188492
189146
|
if (added.length > 0) {
|
|
188493
|
-
output_manager_default.print(` ${
|
|
189147
|
+
output_manager_default.print(` ${import_chalk129.default.green(`Added: ${added.length}`)}
|
|
188494
189148
|
`);
|
|
188495
189149
|
}
|
|
188496
189150
|
if (deleted.length > 0) {
|
|
188497
|
-
output_manager_default.print(` ${
|
|
189151
|
+
output_manager_default.print(` ${import_chalk129.default.red(`Deleted: ${deleted.length}`)}
|
|
188498
189152
|
`);
|
|
188499
189153
|
}
|
|
188500
189154
|
if (edited.length > 0) {
|
|
188501
|
-
output_manager_default.print(` ${
|
|
189155
|
+
output_manager_default.print(` ${import_chalk129.default.yellow(`Modified: ${edited.length}`)}
|
|
188502
189156
|
`);
|
|
188503
189157
|
}
|
|
188504
189158
|
output_manager_default.print(`
|
|
188505
|
-
${
|
|
189159
|
+
${import_chalk129.default.bold("Redirect changes:")}
|
|
188506
189160
|
`);
|
|
188507
189161
|
const displayRedirects = redirects.slice(0, 100);
|
|
188508
189162
|
const rows = displayRedirects.map((redirect2) => {
|
|
@@ -188512,15 +189166,15 @@ async function upload(client2, argv) {
|
|
|
188512
189166
|
let actionSymbol;
|
|
188513
189167
|
switch (action) {
|
|
188514
189168
|
case "+":
|
|
188515
|
-
colorFn =
|
|
189169
|
+
colorFn = import_chalk129.default.green;
|
|
188516
189170
|
actionSymbol = "+";
|
|
188517
189171
|
break;
|
|
188518
189172
|
case "-":
|
|
188519
|
-
colorFn =
|
|
189173
|
+
colorFn = import_chalk129.default.red;
|
|
188520
189174
|
actionSymbol = "-";
|
|
188521
189175
|
break;
|
|
188522
189176
|
case "~":
|
|
188523
|
-
colorFn =
|
|
189177
|
+
colorFn = import_chalk129.default.yellow;
|
|
188524
189178
|
actionSymbol = "~";
|
|
188525
189179
|
break;
|
|
188526
189180
|
default:
|
|
@@ -188543,7 +189197,7 @@ async function upload(client2, argv) {
|
|
|
188543
189197
|
if (redirectCount > 100) {
|
|
188544
189198
|
output_manager_default.print(
|
|
188545
189199
|
`
|
|
188546
|
-
${
|
|
189200
|
+
${import_chalk129.default.gray(`... and ${redirectCount - 100} more redirect${redirectCount - 100 === 1 ? "" : "s"}`)}
|
|
188547
189201
|
`
|
|
188548
189202
|
);
|
|
188549
189203
|
}
|
|
@@ -188552,19 +189206,19 @@ async function upload(client2, argv) {
|
|
|
188552
189206
|
const testUrl = `https://${result.alias}`;
|
|
188553
189207
|
output_manager_default.print(
|
|
188554
189208
|
`
|
|
188555
|
-
${
|
|
189209
|
+
${import_chalk129.default.bold("Test your changes:")} ${import_chalk129.default.cyan(testUrl)}
|
|
188556
189210
|
`
|
|
188557
189211
|
);
|
|
188558
189212
|
}
|
|
188559
189213
|
const newVersionName = result.version.name || result.version.id;
|
|
188560
189214
|
output_manager_default.print(
|
|
188561
|
-
` ${
|
|
189215
|
+
` ${import_chalk129.default.bold("New staging version:")} ${newVersionName}
|
|
188562
189216
|
|
|
188563
189217
|
`
|
|
188564
189218
|
);
|
|
188565
189219
|
if (existingStagingVersion) {
|
|
188566
189220
|
output_manager_default.warn(
|
|
188567
|
-
`There are other staged changes. Please review all changes with ${
|
|
189221
|
+
`There are other staged changes. Please review all changes with ${import_chalk129.default.cyan("vercel redirects list --staging")} before promoting to production.`
|
|
188568
189222
|
);
|
|
188569
189223
|
} else if (!skipPrompts) {
|
|
188570
189224
|
const shouldPromote = await client2.input.confirm(
|
|
@@ -188582,7 +189236,7 @@ async function upload(client2, argv) {
|
|
|
188582
189236
|
teamId
|
|
188583
189237
|
);
|
|
188584
189238
|
output_manager_default.log(
|
|
188585
|
-
`${
|
|
189239
|
+
`${import_chalk129.default.cyan("\u2713")} Version promoted to production ${import_chalk129.default.gray(promoteStamp())}`
|
|
188586
189240
|
);
|
|
188587
189241
|
}
|
|
188588
189242
|
}
|
|
@@ -188592,13 +189246,13 @@ async function upload(client2, argv) {
|
|
|
188592
189246
|
return 1;
|
|
188593
189247
|
}
|
|
188594
189248
|
}
|
|
188595
|
-
var
|
|
189249
|
+
var import_chalk129;
|
|
188596
189250
|
var init_upload = __esm({
|
|
188597
189251
|
"src/commands/redirects/upload.ts"() {
|
|
188598
189252
|
"use strict";
|
|
188599
|
-
|
|
189253
|
+
import_chalk129 = __toESM3(require_source(), 1);
|
|
188600
189254
|
init_output_manager();
|
|
188601
|
-
|
|
189255
|
+
init_command33();
|
|
188602
189256
|
init_shared2();
|
|
188603
189257
|
init_stamp();
|
|
188604
189258
|
init_get_redirect_versions();
|
|
@@ -188656,17 +189310,17 @@ async function remove5(client2, argv) {
|
|
|
188656
189310
|
const redirectToRemove = redirects.find((r) => r.source === source);
|
|
188657
189311
|
if (!redirectToRemove) {
|
|
188658
189312
|
output_manager_default.error(
|
|
188659
|
-
`Redirect with source "${source}" not found. Run ${
|
|
189313
|
+
`Redirect with source "${source}" not found. Run ${import_chalk130.default.cyan(
|
|
188660
189314
|
"vercel redirects list"
|
|
188661
189315
|
)} to see available redirects.`
|
|
188662
189316
|
);
|
|
188663
189317
|
return 1;
|
|
188664
189318
|
}
|
|
188665
189319
|
output_manager_default.print(`
|
|
188666
|
-
${
|
|
189320
|
+
${import_chalk130.default.bold("Removing redirect:")}
|
|
188667
189321
|
`);
|
|
188668
189322
|
output_manager_default.print(
|
|
188669
|
-
` ${
|
|
189323
|
+
` ${import_chalk130.default.cyan(redirectToRemove.source)} \u2192 ${import_chalk130.default.cyan(redirectToRemove.destination)}
|
|
188670
189324
|
`
|
|
188671
189325
|
);
|
|
188672
189326
|
const status3 = redirectToRemove.statusCode || (redirectToRemove.permanent ? 308 : 307);
|
|
@@ -188684,7 +189338,7 @@ async function remove5(client2, argv) {
|
|
|
188684
189338
|
return 0;
|
|
188685
189339
|
}
|
|
188686
189340
|
const removeStamp = stamp_default();
|
|
188687
|
-
output_manager_default.spinner(`Removing redirect for ${
|
|
189341
|
+
output_manager_default.spinner(`Removing redirect for ${import_chalk130.default.bold(source)}`);
|
|
188688
189342
|
const { alias: alias2, version: version2 } = await deleteRedirects(
|
|
188689
189343
|
client2,
|
|
188690
189344
|
project.id,
|
|
@@ -188692,13 +189346,13 @@ async function remove5(client2, argv) {
|
|
|
188692
189346
|
teamId
|
|
188693
189347
|
);
|
|
188694
189348
|
output_manager_default.log(
|
|
188695
|
-
`${
|
|
189349
|
+
`${import_chalk130.default.cyan("\u2713")} Redirect removed ${import_chalk130.default.gray(removeStamp())}`
|
|
188696
189350
|
);
|
|
188697
189351
|
if (alias2) {
|
|
188698
189352
|
const testUrl = source.startsWith("/") ? `https://${alias2}${source}` : `https://${alias2}`;
|
|
188699
189353
|
output_manager_default.print(
|
|
188700
189354
|
`
|
|
188701
|
-
${
|
|
189355
|
+
${import_chalk130.default.bold("Test your changes:")} ${import_chalk130.default.cyan(testUrl)}
|
|
188702
189356
|
`
|
|
188703
189357
|
);
|
|
188704
189358
|
output_manager_default.print(
|
|
@@ -188707,7 +189361,7 @@ async function remove5(client2, argv) {
|
|
|
188707
189361
|
);
|
|
188708
189362
|
}
|
|
188709
189363
|
const versionName = version2.name || version2.id;
|
|
188710
|
-
output_manager_default.print(` ${
|
|
189364
|
+
output_manager_default.print(` ${import_chalk130.default.bold("New staging version:")} ${versionName}
|
|
188711
189365
|
|
|
188712
189366
|
`);
|
|
188713
189367
|
if (!existingStagingVersion) {
|
|
@@ -188726,23 +189380,23 @@ async function remove5(client2, argv) {
|
|
|
188726
189380
|
teamId
|
|
188727
189381
|
);
|
|
188728
189382
|
output_manager_default.log(
|
|
188729
|
-
`${
|
|
189383
|
+
`${import_chalk130.default.cyan("\u2713")} Version promoted to production ${import_chalk130.default.gray(promoteStamp())}`
|
|
188730
189384
|
);
|
|
188731
189385
|
}
|
|
188732
189386
|
} else {
|
|
188733
189387
|
output_manager_default.warn(
|
|
188734
|
-
`There are other staged changes. Review them with ${
|
|
189388
|
+
`There are other staged changes. Review them with ${import_chalk130.default.cyan("vercel redirects list --staging")} before promoting to production.`
|
|
188735
189389
|
);
|
|
188736
189390
|
}
|
|
188737
189391
|
return 0;
|
|
188738
189392
|
}
|
|
188739
|
-
var
|
|
189393
|
+
var import_chalk130;
|
|
188740
189394
|
var init_remove5 = __esm({
|
|
188741
189395
|
"src/commands/redirects/remove.ts"() {
|
|
188742
189396
|
"use strict";
|
|
188743
|
-
|
|
189397
|
+
import_chalk130 = __toESM3(require_source(), 1);
|
|
188744
189398
|
init_output_manager();
|
|
188745
|
-
|
|
189399
|
+
init_command33();
|
|
188746
189400
|
init_shared2();
|
|
188747
189401
|
init_delete_redirects();
|
|
188748
189402
|
init_get_redirects();
|
|
@@ -188768,14 +189422,14 @@ async function promote(client2, argv) {
|
|
|
188768
189422
|
const { project, org } = link4;
|
|
188769
189423
|
const teamId = org.type === "team" ? org.id : void 0;
|
|
188770
189424
|
const [versionIdentifier] = parsed.args;
|
|
188771
|
-
output_manager_default.spinner(`Fetching redirect versions for ${
|
|
189425
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk131.default.bold(project.name)}`);
|
|
188772
189426
|
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
188773
189427
|
const version2 = versions.find(
|
|
188774
189428
|
(v) => v.id === versionIdentifier || v.name === versionIdentifier
|
|
188775
189429
|
);
|
|
188776
189430
|
if (!version2) {
|
|
188777
189431
|
output_manager_default.error(
|
|
188778
|
-
`Version with ID or name "${versionIdentifier}" not found. Run ${
|
|
189432
|
+
`Version with ID or name "${versionIdentifier}" not found. Run ${import_chalk131.default.cyan(
|
|
188779
189433
|
"vercel redirects list-versions"
|
|
188780
189434
|
)} to see available versions.`
|
|
188781
189435
|
);
|
|
@@ -188783,16 +189437,16 @@ async function promote(client2, argv) {
|
|
|
188783
189437
|
}
|
|
188784
189438
|
if (version2.isLive) {
|
|
188785
189439
|
output_manager_default.error(
|
|
188786
|
-
`Version ${
|
|
189440
|
+
`Version ${import_chalk131.default.bold(version2.name || version2.id)} is already live.`
|
|
188787
189441
|
);
|
|
188788
189442
|
return 1;
|
|
188789
189443
|
}
|
|
188790
189444
|
if (!version2.isStaging) {
|
|
188791
189445
|
output_manager_default.error(
|
|
188792
|
-
`Version ${
|
|
189446
|
+
`Version ${import_chalk131.default.bold(
|
|
188793
189447
|
version2.name || version2.id
|
|
188794
189448
|
)} is not staged. Only staging versions can be promoted to production.
|
|
188795
|
-
Run ${
|
|
189449
|
+
Run ${import_chalk131.default.cyan(
|
|
188796
189450
|
"vercel redirects list-versions"
|
|
188797
189451
|
)} to see which version is currently staged.`
|
|
188798
189452
|
);
|
|
@@ -188810,13 +189464,13 @@ Run ${import_chalk130.default.cyan(
|
|
|
188810
189464
|
);
|
|
188811
189465
|
if (changedRedirects.length > 0) {
|
|
188812
189466
|
output_manager_default.print(`
|
|
188813
|
-
${
|
|
189467
|
+
${import_chalk131.default.bold("Changes to be promoted:")}
|
|
188814
189468
|
|
|
188815
189469
|
`);
|
|
188816
189470
|
const displayRedirects = changedRedirects.slice(0, 20);
|
|
188817
189471
|
for (const redirect2 of displayRedirects) {
|
|
188818
189472
|
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
188819
|
-
const symbol = redirect2.action === "+" ?
|
|
189473
|
+
const symbol = redirect2.action === "+" ? import_chalk131.default.green("+") : import_chalk131.default.red("-");
|
|
188820
189474
|
output_manager_default.print(
|
|
188821
189475
|
` ${symbol} ${redirect2.source} \u2192 ${redirect2.destination} (${status3})
|
|
188822
189476
|
`
|
|
@@ -188824,7 +189478,7 @@ ${import_chalk130.default.bold("Changes to be promoted:")}
|
|
|
188824
189478
|
}
|
|
188825
189479
|
if (changedRedirects.length > 20) {
|
|
188826
189480
|
output_manager_default.print(
|
|
188827
|
-
|
|
189481
|
+
import_chalk131.default.gray(`
|
|
188828
189482
|
... and ${changedRedirects.length - 20} more changes
|
|
188829
189483
|
`)
|
|
188830
189484
|
);
|
|
@@ -188833,7 +189487,7 @@ ${import_chalk130.default.bold("Changes to be promoted:")}
|
|
|
188833
189487
|
} else {
|
|
188834
189488
|
output_manager_default.print(
|
|
188835
189489
|
`
|
|
188836
|
-
${
|
|
189490
|
+
${import_chalk131.default.gray("No changes detected from current production version.")}
|
|
188837
189491
|
|
|
188838
189492
|
`
|
|
188839
189493
|
);
|
|
@@ -188841,15 +189495,15 @@ ${import_chalk130.default.gray("No changes detected from current production vers
|
|
|
188841
189495
|
const confirmed = await confirmAction(
|
|
188842
189496
|
client2,
|
|
188843
189497
|
parsed.flags["--yes"],
|
|
188844
|
-
`Promote version ${
|
|
188845
|
-
`This will make it the live version for ${
|
|
189498
|
+
`Promote version ${import_chalk131.default.bold(versionName)} to production?`,
|
|
189499
|
+
`This will make it the live version for ${import_chalk131.default.bold(project.name)}.`
|
|
188846
189500
|
);
|
|
188847
189501
|
if (!confirmed) {
|
|
188848
189502
|
output_manager_default.log("Canceled");
|
|
188849
189503
|
return 0;
|
|
188850
189504
|
}
|
|
188851
189505
|
const updateStamp = stamp_default();
|
|
188852
|
-
output_manager_default.spinner(`Promoting version ${
|
|
189506
|
+
output_manager_default.spinner(`Promoting version ${import_chalk131.default.bold(versionName)} to production`);
|
|
188853
189507
|
const { version: newVersion } = await updateRedirectVersion(
|
|
188854
189508
|
client2,
|
|
188855
189509
|
project.id,
|
|
@@ -188858,19 +189512,19 @@ ${import_chalk130.default.gray("No changes detected from current production vers
|
|
|
188858
189512
|
teamId
|
|
188859
189513
|
);
|
|
188860
189514
|
output_manager_default.log(
|
|
188861
|
-
`${
|
|
189515
|
+
`${import_chalk131.default.cyan("\u2713")} Version ${import_chalk131.default.bold(
|
|
188862
189516
|
newVersion.name || newVersion.id
|
|
188863
|
-
)} promoted to production ${
|
|
189517
|
+
)} promoted to production ${import_chalk131.default.gray(updateStamp())}`
|
|
188864
189518
|
);
|
|
188865
189519
|
return 0;
|
|
188866
189520
|
}
|
|
188867
|
-
var
|
|
189521
|
+
var import_chalk131;
|
|
188868
189522
|
var init_promote3 = __esm({
|
|
188869
189523
|
"src/commands/redirects/promote.ts"() {
|
|
188870
189524
|
"use strict";
|
|
188871
|
-
|
|
189525
|
+
import_chalk131 = __toESM3(require_source(), 1);
|
|
188872
189526
|
init_output_manager();
|
|
188873
|
-
|
|
189527
|
+
init_command33();
|
|
188874
189528
|
init_shared2();
|
|
188875
189529
|
init_get_redirect_versions();
|
|
188876
189530
|
init_update_redirect_version();
|
|
@@ -188895,14 +189549,14 @@ async function restore(client2, argv) {
|
|
|
188895
189549
|
const { project, org } = link4;
|
|
188896
189550
|
const teamId = org.type === "team" ? org.id : void 0;
|
|
188897
189551
|
const [versionIdentifier] = parsed.args;
|
|
188898
|
-
output_manager_default.spinner(`Fetching redirect versions for ${
|
|
189552
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk132.default.bold(project.name)}`);
|
|
188899
189553
|
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
188900
189554
|
const version2 = versions.find(
|
|
188901
189555
|
(v) => v.id === versionIdentifier || v.name === versionIdentifier
|
|
188902
189556
|
);
|
|
188903
189557
|
if (!version2) {
|
|
188904
189558
|
output_manager_default.error(
|
|
188905
|
-
`Version with ID or name "${versionIdentifier}" not found. Run ${
|
|
189559
|
+
`Version with ID or name "${versionIdentifier}" not found. Run ${import_chalk132.default.cyan(
|
|
188906
189560
|
"vercel redirects list-versions"
|
|
188907
189561
|
)} to see available versions.`
|
|
188908
189562
|
);
|
|
@@ -188910,10 +189564,10 @@ async function restore(client2, argv) {
|
|
|
188910
189564
|
}
|
|
188911
189565
|
if (version2.isLive) {
|
|
188912
189566
|
output_manager_default.error(
|
|
188913
|
-
`Version ${
|
|
189567
|
+
`Version ${import_chalk132.default.bold(
|
|
188914
189568
|
version2.name || version2.id
|
|
188915
189569
|
)} is currently live. You cannot restore the live version.
|
|
188916
|
-
Run ${
|
|
189570
|
+
Run ${import_chalk132.default.cyan(
|
|
188917
189571
|
"vercel redirects list-versions"
|
|
188918
189572
|
)} to see previous versions you can restore.`
|
|
188919
189573
|
);
|
|
@@ -188921,7 +189575,7 @@ Run ${import_chalk131.default.cyan(
|
|
|
188921
189575
|
}
|
|
188922
189576
|
if (version2.isStaging) {
|
|
188923
189577
|
output_manager_default.error(
|
|
188924
|
-
`Version ${
|
|
189578
|
+
`Version ${import_chalk132.default.bold(
|
|
188925
189579
|
version2.name || version2.id
|
|
188926
189580
|
)} is staged. You can only restore previous versions.`
|
|
188927
189581
|
);
|
|
@@ -188939,13 +189593,13 @@ Run ${import_chalk131.default.cyan(
|
|
|
188939
189593
|
);
|
|
188940
189594
|
if (changedRedirects.length > 0) {
|
|
188941
189595
|
output_manager_default.print(`
|
|
188942
|
-
${
|
|
189596
|
+
${import_chalk132.default.bold("Changes to be restored:")}
|
|
188943
189597
|
|
|
188944
189598
|
`);
|
|
188945
189599
|
const displayRedirects = changedRedirects.slice(0, 20);
|
|
188946
189600
|
for (const redirect2 of displayRedirects) {
|
|
188947
189601
|
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
188948
|
-
const symbol = redirect2.action === "+" ?
|
|
189602
|
+
const symbol = redirect2.action === "+" ? import_chalk132.default.green("+") : import_chalk132.default.red("-");
|
|
188949
189603
|
output_manager_default.print(
|
|
188950
189604
|
` ${symbol} ${redirect2.source} \u2192 ${redirect2.destination} (${status3})
|
|
188951
189605
|
`
|
|
@@ -188953,7 +189607,7 @@ ${import_chalk131.default.bold("Changes to be restored:")}
|
|
|
188953
189607
|
}
|
|
188954
189608
|
if (changedRedirects.length > 20) {
|
|
188955
189609
|
output_manager_default.print(
|
|
188956
|
-
|
|
189610
|
+
import_chalk132.default.gray(`
|
|
188957
189611
|
... and ${changedRedirects.length - 20} more changes
|
|
188958
189612
|
`)
|
|
188959
189613
|
);
|
|
@@ -188962,7 +189616,7 @@ ${import_chalk131.default.bold("Changes to be restored:")}
|
|
|
188962
189616
|
} else {
|
|
188963
189617
|
output_manager_default.print(
|
|
188964
189618
|
`
|
|
188965
|
-
${
|
|
189619
|
+
${import_chalk132.default.gray("No changes detected from current production version.")}
|
|
188966
189620
|
|
|
188967
189621
|
`
|
|
188968
189622
|
);
|
|
@@ -188970,15 +189624,15 @@ ${import_chalk131.default.gray("No changes detected from current production vers
|
|
|
188970
189624
|
const confirmed = await confirmAction(
|
|
188971
189625
|
client2,
|
|
188972
189626
|
parsed.flags["--yes"],
|
|
188973
|
-
`Restore version ${
|
|
188974
|
-
`This will make it the live version for ${
|
|
189627
|
+
`Restore version ${import_chalk132.default.bold(versionName)}?`,
|
|
189628
|
+
`This will make it the live version for ${import_chalk132.default.bold(project.name)}.`
|
|
188975
189629
|
);
|
|
188976
189630
|
if (!confirmed) {
|
|
188977
189631
|
output_manager_default.log("Canceled");
|
|
188978
189632
|
return 0;
|
|
188979
189633
|
}
|
|
188980
189634
|
const updateStamp = stamp_default();
|
|
188981
|
-
output_manager_default.spinner(`Restoring version ${
|
|
189635
|
+
output_manager_default.spinner(`Restoring version ${import_chalk132.default.bold(versionName)}`);
|
|
188982
189636
|
const { version: newVersion } = await updateRedirectVersion(
|
|
188983
189637
|
client2,
|
|
188984
189638
|
project.id,
|
|
@@ -188987,19 +189641,19 @@ ${import_chalk131.default.gray("No changes detected from current production vers
|
|
|
188987
189641
|
teamId
|
|
188988
189642
|
);
|
|
188989
189643
|
output_manager_default.log(
|
|
188990
|
-
`${
|
|
189644
|
+
`${import_chalk132.default.cyan("\u2713")} Version ${import_chalk132.default.bold(
|
|
188991
189645
|
newVersion.name || newVersion.id
|
|
188992
|
-
)} restored to production ${
|
|
189646
|
+
)} restored to production ${import_chalk132.default.gray(updateStamp())}`
|
|
188993
189647
|
);
|
|
188994
189648
|
return 0;
|
|
188995
189649
|
}
|
|
188996
|
-
var
|
|
189650
|
+
var import_chalk132;
|
|
188997
189651
|
var init_restore = __esm({
|
|
188998
189652
|
"src/commands/redirects/restore.ts"() {
|
|
188999
189653
|
"use strict";
|
|
189000
|
-
|
|
189654
|
+
import_chalk132 = __toESM3(require_source(), 1);
|
|
189001
189655
|
init_output_manager();
|
|
189002
|
-
|
|
189656
|
+
init_command33();
|
|
189003
189657
|
init_shared2();
|
|
189004
189658
|
init_get_redirect_versions();
|
|
189005
189659
|
init_update_redirect_version();
|
|
@@ -189180,7 +189834,7 @@ var init_redirects2 = __esm({
|
|
|
189180
189834
|
init_remove5();
|
|
189181
189835
|
init_promote3();
|
|
189182
189836
|
init_restore();
|
|
189183
|
-
|
|
189837
|
+
init_command33();
|
|
189184
189838
|
init_get_flags_specification();
|
|
189185
189839
|
init_output_manager();
|
|
189186
189840
|
init_commands();
|
|
@@ -189381,7 +190035,7 @@ async function remove6(client2) {
|
|
|
189381
190035
|
}
|
|
189382
190036
|
const { contextName } = await getScope(client2);
|
|
189383
190037
|
output_manager_default.spinner(
|
|
189384
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
|
190038
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk133.default.bold(contextName)}`
|
|
189385
190039
|
);
|
|
189386
190040
|
let aliases;
|
|
189387
190041
|
let projects;
|
|
@@ -189447,7 +190101,7 @@ async function remove6(client2) {
|
|
|
189447
190101
|
});
|
|
189448
190102
|
if (deployments.length === 0 && projects.length === 0) {
|
|
189449
190103
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
|
189450
|
-
const stylizedIds = ids.map((id) =>
|
|
190104
|
+
const stylizedIds = ids.map((id) => import_chalk133.default.bold(`"${id}"`)).join(", ");
|
|
189451
190105
|
const commandName = getCommandName("projects ls");
|
|
189452
190106
|
log2(
|
|
189453
190107
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
|
@@ -189455,7 +190109,7 @@ async function remove6(client2) {
|
|
|
189455
190109
|
return 1;
|
|
189456
190110
|
}
|
|
189457
190111
|
log2(
|
|
189458
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
|
190112
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk133.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
|
189459
190113
|
);
|
|
189460
190114
|
if (deployments.length > 200) {
|
|
189461
190115
|
output_manager_default.warn(
|
|
@@ -189482,11 +190136,11 @@ async function remove6(client2) {
|
|
|
189482
190136
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
|
189483
190137
|
);
|
|
189484
190138
|
deployments.forEach((depl) => {
|
|
189485
|
-
output_manager_default.print(`${
|
|
190139
|
+
output_manager_default.print(`${import_chalk133.default.gray("-")} ${import_chalk133.default.bold(depl.url)}
|
|
189486
190140
|
`);
|
|
189487
190141
|
});
|
|
189488
190142
|
projects.forEach((project) => {
|
|
189489
|
-
output_manager_default.print(`${
|
|
190143
|
+
output_manager_default.print(`${import_chalk133.default.gray("-")} ${import_chalk133.default.bold(project.name)}
|
|
189490
190144
|
`);
|
|
189491
190145
|
});
|
|
189492
190146
|
return 0;
|
|
@@ -189503,8 +190157,8 @@ function readConfirmation4(deployments, projects) {
|
|
|
189503
190157
|
);
|
|
189504
190158
|
const deploymentTable = table(
|
|
189505
190159
|
deployments.map((depl) => {
|
|
189506
|
-
const time =
|
|
189507
|
-
const url3 = depl.url ?
|
|
190160
|
+
const time = import_chalk133.default.gray(`${(0, import_ms29.default)(Date.now() - depl.createdAt)} ago`);
|
|
190161
|
+
const url3 = depl.url ? import_chalk133.default.underline(`https://${depl.url}`) : "";
|
|
189508
190162
|
return [` ${depl.id}`, url3, time];
|
|
189509
190163
|
}),
|
|
189510
190164
|
{ align: ["l", "r", "l"], hsep: 6 }
|
|
@@ -189515,7 +190169,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
189515
190169
|
for (const depl of deployments) {
|
|
189516
190170
|
for (const { alias: alias2 } of depl.aliases) {
|
|
189517
190171
|
output_manager_default.warn(
|
|
189518
|
-
`${
|
|
190172
|
+
`${import_chalk133.default.underline(`https://${alias2}`)} is an alias for ${import_chalk133.default.bold(depl.url)} and will be removed`
|
|
189519
190173
|
);
|
|
189520
190174
|
}
|
|
189521
190175
|
}
|
|
@@ -189529,12 +190183,12 @@ function readConfirmation4(deployments, projects) {
|
|
|
189529
190183
|
`
|
|
189530
190184
|
);
|
|
189531
190185
|
for (const project of projects) {
|
|
189532
|
-
output_manager_default.print(`${
|
|
190186
|
+
output_manager_default.print(`${import_chalk133.default.gray("-")} ${import_chalk133.default.bold(project.name)}
|
|
189533
190187
|
`);
|
|
189534
190188
|
}
|
|
189535
190189
|
}
|
|
189536
190190
|
output_manager_default.print(
|
|
189537
|
-
`${
|
|
190191
|
+
`${import_chalk133.default.bold.red("> Are you sure?")} ${import_chalk133.default.gray("(y/N) ")}`
|
|
189538
190192
|
);
|
|
189539
190193
|
process.stdin.on("data", (d) => {
|
|
189540
190194
|
process.stdin.pause();
|
|
@@ -189551,12 +190205,12 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
|
189551
190205
|
}
|
|
189552
190206
|
return `${(0, import_pluralize15.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize15.default)("project", projects.length, true)}`;
|
|
189553
190207
|
}
|
|
189554
|
-
var
|
|
190208
|
+
var import_chalk133, import_ms29, import_pluralize15;
|
|
189555
190209
|
var init_remove7 = __esm({
|
|
189556
190210
|
"src/commands/remove/index.ts"() {
|
|
189557
190211
|
"use strict";
|
|
189558
|
-
|
|
189559
|
-
|
|
190212
|
+
import_chalk133 = __toESM3(require_source(), 1);
|
|
190213
|
+
import_ms29 = __toESM3(require_ms(), 1);
|
|
189560
190214
|
import_pluralize15 = __toESM3(require_pluralize(), 1);
|
|
189561
190215
|
init_table();
|
|
189562
190216
|
init_util();
|
|
@@ -189574,7 +190228,7 @@ var init_remove7 = __esm({
|
|
|
189574
190228
|
init_error2();
|
|
189575
190229
|
init_now_error();
|
|
189576
190230
|
init_help();
|
|
189577
|
-
|
|
190231
|
+
init_command34();
|
|
189578
190232
|
init_get_flags_specification();
|
|
189579
190233
|
init_remove6();
|
|
189580
190234
|
init_output_manager();
|
|
@@ -189589,8 +190243,8 @@ async function rollbackStatus({
|
|
|
189589
190243
|
project,
|
|
189590
190244
|
timeout = "3m"
|
|
189591
190245
|
}) {
|
|
189592
|
-
const recentThreshold = Date.now() - (0,
|
|
189593
|
-
const rollbackTimeout = Date.now() + (0,
|
|
190246
|
+
const recentThreshold = Date.now() - (0, import_ms30.default)("3m");
|
|
190247
|
+
const rollbackTimeout = Date.now() + (0, import_ms30.default)(timeout);
|
|
189594
190248
|
let counter = 0;
|
|
189595
190249
|
let spinnerMessage = deployment ? "Rollback in progress" : `Checking rollback status of ${project.name}`;
|
|
189596
190250
|
if (!contextName) {
|
|
@@ -189651,7 +190305,7 @@ async function rollbackStatus({
|
|
|
189651
190305
|
}
|
|
189652
190306
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
|
189653
190307
|
output_manager_default.log(
|
|
189654
|
-
`The rollback exceeded its deadline - rerun ${
|
|
190308
|
+
`The rollback exceeded its deadline - rerun ${import_chalk134.default.bold(
|
|
189655
190309
|
`${packageName} rollback ${toDeploymentId}`
|
|
189656
190310
|
)} to try again`
|
|
189657
190311
|
);
|
|
@@ -189715,33 +190369,33 @@ async function renderJobSucceeded2({
|
|
|
189715
190369
|
let deploymentInfo = "";
|
|
189716
190370
|
try {
|
|
189717
190371
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
189718
|
-
deploymentInfo = `${
|
|
190372
|
+
deploymentInfo = `${import_chalk134.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
189719
190373
|
} catch (err) {
|
|
189720
190374
|
output_manager_default.debug(
|
|
189721
190375
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
189722
190376
|
);
|
|
189723
|
-
deploymentInfo =
|
|
190377
|
+
deploymentInfo = import_chalk134.default.bold(toDeploymentId);
|
|
189724
190378
|
}
|
|
189725
190379
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
|
189726
190380
|
output_manager_default.log(
|
|
189727
|
-
`Success! ${
|
|
190381
|
+
`Success! ${import_chalk134.default.bold(
|
|
189728
190382
|
project.name
|
|
189729
190383
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
|
189730
190384
|
);
|
|
189731
190385
|
return 0;
|
|
189732
190386
|
}
|
|
189733
|
-
var
|
|
190387
|
+
var import_chalk134, import_ms30;
|
|
189734
190388
|
var init_status3 = __esm({
|
|
189735
190389
|
"src/commands/rollback/status.ts"() {
|
|
189736
190390
|
"use strict";
|
|
189737
|
-
|
|
190391
|
+
import_chalk134 = __toESM3(require_source(), 1);
|
|
189738
190392
|
init_elapsed();
|
|
189739
190393
|
init_format_date();
|
|
189740
190394
|
init_get_deployment();
|
|
189741
190395
|
init_pkg_name();
|
|
189742
190396
|
init_get_project_by_id_or_name();
|
|
189743
190397
|
init_get_scope();
|
|
189744
|
-
|
|
190398
|
+
import_ms30 = __toESM3(require_ms(), 1);
|
|
189745
190399
|
init_errors_ts();
|
|
189746
190400
|
init_render_alias_status();
|
|
189747
190401
|
init_sleep();
|
|
@@ -189764,9 +190418,9 @@ async function requestRollback({
|
|
|
189764
190418
|
// required
|
|
189765
190419
|
method: "POST"
|
|
189766
190420
|
});
|
|
189767
|
-
if (timeout !== void 0 && (0,
|
|
190421
|
+
if (timeout !== void 0 && (0, import_ms31.default)(timeout) === 0) {
|
|
189768
190422
|
output_manager_default.log(
|
|
189769
|
-
`Successfully requested rollback of ${
|
|
190423
|
+
`Successfully requested rollback of ${import_chalk135.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
189770
190424
|
);
|
|
189771
190425
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
|
189772
190426
|
return 0;
|
|
@@ -189779,14 +190433,14 @@ async function requestRollback({
|
|
|
189779
190433
|
timeout
|
|
189780
190434
|
});
|
|
189781
190435
|
}
|
|
189782
|
-
var
|
|
190436
|
+
var import_chalk135, import_ms31;
|
|
189783
190437
|
var init_request_rollback = __esm({
|
|
189784
190438
|
"src/commands/rollback/request-rollback.ts"() {
|
|
189785
190439
|
"use strict";
|
|
189786
|
-
|
|
190440
|
+
import_chalk135 = __toESM3(require_source(), 1);
|
|
189787
190441
|
init_pkg_name();
|
|
189788
190442
|
init_get_project_by_deployment();
|
|
189789
|
-
|
|
190443
|
+
import_ms31 = __toESM3(require_ms(), 1);
|
|
189790
190444
|
init_status3();
|
|
189791
190445
|
init_output_manager();
|
|
189792
190446
|
}
|
|
@@ -189835,19 +190489,19 @@ var rollback_exports = {};
|
|
|
189835
190489
|
__export3(rollback_exports, {
|
|
189836
190490
|
default: () => rollback_default
|
|
189837
190491
|
});
|
|
189838
|
-
var
|
|
190492
|
+
var import_error_utils35, import_ms32, rollback_default;
|
|
189839
190493
|
var init_rollback2 = __esm({
|
|
189840
190494
|
"src/commands/rollback/index.ts"() {
|
|
189841
190495
|
"use strict";
|
|
189842
190496
|
init_get_args();
|
|
189843
190497
|
init_get_project_by_cwd_or_link();
|
|
189844
190498
|
init_error2();
|
|
189845
|
-
|
|
189846
|
-
|
|
190499
|
+
import_error_utils35 = __toESM3(require_dist2(), 1);
|
|
190500
|
+
import_ms32 = __toESM3(require_ms(), 1);
|
|
189847
190501
|
init_request_rollback();
|
|
189848
190502
|
init_status3();
|
|
189849
190503
|
init_help();
|
|
189850
|
-
|
|
190504
|
+
init_command35();
|
|
189851
190505
|
init_get_flags_specification();
|
|
189852
190506
|
init_rollback();
|
|
189853
190507
|
init_output_manager();
|
|
@@ -189874,7 +190528,7 @@ var init_rollback2 = __esm({
|
|
|
189874
190528
|
return 2;
|
|
189875
190529
|
}
|
|
189876
190530
|
const timeout = parsedArgs.flags["--timeout"];
|
|
189877
|
-
if (timeout && (0,
|
|
190531
|
+
if (timeout && (0, import_ms32.default)(timeout) === void 0) {
|
|
189878
190532
|
output_manager_default.error(`Invalid timeout "${timeout}"`);
|
|
189879
190533
|
return 1;
|
|
189880
190534
|
}
|
|
@@ -189910,7 +190564,7 @@ var init_rollback2 = __esm({
|
|
|
189910
190564
|
timeout
|
|
189911
190565
|
});
|
|
189912
190566
|
} catch (err) {
|
|
189913
|
-
if ((0,
|
|
190567
|
+
if ((0, import_error_utils35.isErrnoException)(err)) {
|
|
189914
190568
|
if (err.code === "ERR_CANCELED") {
|
|
189915
190569
|
return 0;
|
|
189916
190570
|
}
|
|
@@ -190423,7 +191077,7 @@ var init_rolling_release2 = __esm({
|
|
|
190423
191077
|
init_get_args();
|
|
190424
191078
|
init_get_flags_specification();
|
|
190425
191079
|
init_help();
|
|
190426
|
-
|
|
191080
|
+
init_command36();
|
|
190427
191081
|
init_request_rolling_release();
|
|
190428
191082
|
init_start_rolling_release();
|
|
190429
191083
|
init_configure_rolling_release();
|
|
@@ -190453,11 +191107,11 @@ function formatBranchMatcher(branchMatcher) {
|
|
|
190453
191107
|
if (branchMatcher?.type === "equals") {
|
|
190454
191108
|
return branchMatcher.pattern;
|
|
190455
191109
|
} else if (branchMatcher?.type === "startsWith") {
|
|
190456
|
-
return `${branchMatcher.pattern}${
|
|
191110
|
+
return `${branchMatcher.pattern}${import_chalk136.default.dim("*")}`;
|
|
190457
191111
|
} else if (branchMatcher?.type === "endsWith") {
|
|
190458
|
-
return `${
|
|
191112
|
+
return `${import_chalk136.default.dim("*")}${branchMatcher.pattern}`;
|
|
190459
191113
|
}
|
|
190460
|
-
return
|
|
191114
|
+
return import_chalk136.default.dim("No branch configuration");
|
|
190461
191115
|
}
|
|
190462
191116
|
async function list8(client2, argv) {
|
|
190463
191117
|
const { cwd } = client2;
|
|
@@ -190485,15 +191139,15 @@ async function list8(client2, argv) {
|
|
|
190485
191139
|
accountId: link4.org.id
|
|
190486
191140
|
});
|
|
190487
191141
|
output_manager_default.stopSpinner();
|
|
190488
|
-
const elapsed2 = (0,
|
|
191142
|
+
const elapsed2 = (0, import_ms33.default)(Date.now() - start);
|
|
190489
191143
|
result = withDefaultEnvironmentsIncluded(result);
|
|
190490
191144
|
output_manager_default.log(
|
|
190491
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
|
191145
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk136.default.gray(`[${elapsed2}]`)}`
|
|
190492
191146
|
);
|
|
190493
191147
|
const tablePrint = table(
|
|
190494
191148
|
[
|
|
190495
191149
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
|
190496
|
-
(header) =>
|
|
191150
|
+
(header) => import_chalk136.default.bold(import_chalk136.default.cyan(header))
|
|
190497
191151
|
),
|
|
190498
191152
|
...result.flatMap((target) => {
|
|
190499
191153
|
return [
|
|
@@ -190501,8 +191155,8 @@ async function list8(client2, argv) {
|
|
|
190501
191155
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
|
190502
191156
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
|
190503
191157
|
TYPE_MAP[target.type],
|
|
190504
|
-
|
|
190505
|
-
target.updatedAt > 0 ? (0,
|
|
191158
|
+
import_chalk136.default.gray(
|
|
191159
|
+
target.updatedAt > 0 ? (0, import_ms33.default)(Date.now() - target.updatedAt) : "-"
|
|
190506
191160
|
)
|
|
190507
191161
|
]
|
|
190508
191162
|
];
|
|
@@ -190548,15 +191202,15 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
|
190548
191202
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
|
190549
191203
|
];
|
|
190550
191204
|
}
|
|
190551
|
-
var
|
|
191205
|
+
var import_ms33, import_chalk136, TYPE_MAP, BRANCH_TRACKING_MAP;
|
|
190552
191206
|
var init_list12 = __esm({
|
|
190553
191207
|
"src/commands/target/list.ts"() {
|
|
190554
191208
|
"use strict";
|
|
190555
|
-
|
|
190556
|
-
|
|
191209
|
+
import_ms33 = __toESM3(require_ms(), 1);
|
|
191210
|
+
import_chalk136 = __toESM3(require_source(), 1);
|
|
190557
191211
|
init_table();
|
|
190558
191212
|
init_output_manager();
|
|
190559
|
-
|
|
191213
|
+
init_command37();
|
|
190560
191214
|
init_validate_ls_args();
|
|
190561
191215
|
init_ensure_link();
|
|
190562
191216
|
init_format_project();
|
|
@@ -190568,8 +191222,8 @@ var init_list12 = __esm({
|
|
|
190568
191222
|
};
|
|
190569
191223
|
BRANCH_TRACKING_MAP = {
|
|
190570
191224
|
production: (project) => project.link?.productionBranch ?? "main",
|
|
190571
|
-
preview: (_, env) => env.slug === "preview" ?
|
|
190572
|
-
development: () =>
|
|
191225
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk136.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
|
191226
|
+
development: () => import_chalk136.default.dim("Accessible via CLI")
|
|
190573
191227
|
};
|
|
190574
191228
|
}
|
|
190575
191229
|
});
|
|
@@ -190649,7 +191303,7 @@ var init_target2 = __esm({
|
|
|
190649
191303
|
init_get_invalid_subcommand();
|
|
190650
191304
|
init_help();
|
|
190651
191305
|
init_list12();
|
|
190652
|
-
|
|
191306
|
+
init_command37();
|
|
190653
191307
|
init_get_flags_specification();
|
|
190654
191308
|
init_error2();
|
|
190655
191309
|
init_output_manager();
|
|
@@ -190773,7 +191427,7 @@ async function list9(client2, argv) {
|
|
|
190773
191427
|
client2.stdout.write("\n");
|
|
190774
191428
|
const teamTable = table(
|
|
190775
191429
|
[
|
|
190776
|
-
["id", "Team name"].map((str) => (0,
|
|
191430
|
+
["id", "Team name"].map((str) => (0, import_chalk137.gray)(str)),
|
|
190777
191431
|
...teamList.map((team) => [team.value, team.name])
|
|
190778
191432
|
],
|
|
190779
191433
|
{ hsep: 5 }
|
|
@@ -190790,13 +191444,13 @@ async function list9(client2, argv) {
|
|
|
190790
191444
|
}
|
|
190791
191445
|
return 0;
|
|
190792
191446
|
}
|
|
190793
|
-
var
|
|
191447
|
+
var import_chalk137;
|
|
190794
191448
|
var init_list14 = __esm({
|
|
190795
191449
|
"src/commands/teams/list.ts"() {
|
|
190796
191450
|
"use strict";
|
|
190797
191451
|
init_chars();
|
|
190798
191452
|
init_table();
|
|
190799
|
-
|
|
191453
|
+
import_chalk137 = __toESM3(require_source(), 1);
|
|
190800
191454
|
init_get_user();
|
|
190801
191455
|
init_get_teams();
|
|
190802
191456
|
init_pkg_name();
|
|
@@ -190805,7 +191459,7 @@ var init_list14 = __esm({
|
|
|
190805
191459
|
init_get_args();
|
|
190806
191460
|
init_error2();
|
|
190807
191461
|
init_get_flags_specification();
|
|
190808
|
-
|
|
191462
|
+
init_command38();
|
|
190809
191463
|
init_output_manager();
|
|
190810
191464
|
init_list13();
|
|
190811
191465
|
init_validate_ls_args();
|
|
@@ -190892,7 +191546,7 @@ Please select a team scope using ${getCommandName(
|
|
|
190892
191546
|
return 1;
|
|
190893
191547
|
}
|
|
190894
191548
|
output_manager_default.log(
|
|
190895
|
-
introMsg || `Inviting team members to ${
|
|
191549
|
+
introMsg || `Inviting team members to ${import_chalk138.default.bold(currentTeam.name)}`
|
|
190896
191550
|
);
|
|
190897
191551
|
telemetry2.trackCliArgumentEmail(emails);
|
|
190898
191552
|
if (emails.length > 0) {
|
|
@@ -190912,10 +191566,10 @@ Please select a team scope using ${getCommandName(
|
|
|
190912
191566
|
throw err;
|
|
190913
191567
|
}
|
|
190914
191568
|
output_manager_default.log(
|
|
190915
|
-
`${
|
|
191569
|
+
`${import_chalk138.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
|
190916
191570
|
);
|
|
190917
191571
|
} else {
|
|
190918
|
-
output_manager_default.log(`${
|
|
191572
|
+
output_manager_default.log(`${import_chalk138.default.red(`\u2716 ${email3}`)} ${import_chalk138.default.gray("[invalid]")}`);
|
|
190919
191573
|
}
|
|
190920
191574
|
}
|
|
190921
191575
|
return 0;
|
|
@@ -190932,7 +191586,7 @@ Please select a team scope using ${getCommandName(
|
|
|
190932
191586
|
validate: validateEmail
|
|
190933
191587
|
});
|
|
190934
191588
|
} catch (err) {
|
|
190935
|
-
if (!(0,
|
|
191589
|
+
if (!(0, import_error_utils36.isError)(err) || err.message !== "USER_ABORT") {
|
|
190936
191590
|
throw err;
|
|
190937
191591
|
}
|
|
190938
191592
|
}
|
|
@@ -190948,24 +191602,24 @@ Please select a team scope using ${getCommandName(
|
|
|
190948
191602
|
);
|
|
190949
191603
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
|
190950
191604
|
emails.push(email2);
|
|
190951
|
-
output_manager_default.log(`${
|
|
191605
|
+
output_manager_default.log(`${import_chalk138.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
|
190952
191606
|
if (hasError) {
|
|
190953
191607
|
hasError = false;
|
|
190954
191608
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
190955
191609
|
output_manager_default.log(
|
|
190956
|
-
introMsg || `Inviting team members to ${
|
|
191610
|
+
introMsg || `Inviting team members to ${import_chalk138.default.bold(currentTeam.name)}`
|
|
190957
191611
|
);
|
|
190958
191612
|
for (const email3 of emails) {
|
|
190959
|
-
output_manager_default.log(`${
|
|
191613
|
+
output_manager_default.log(`${import_chalk138.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
190960
191614
|
}
|
|
190961
191615
|
}
|
|
190962
191616
|
} catch (err) {
|
|
190963
191617
|
output_manager_default.stopSpinner();
|
|
190964
191618
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
190965
|
-
output_manager_default.error((0,
|
|
191619
|
+
output_manager_default.error((0, import_error_utils36.errorToString)(err));
|
|
190966
191620
|
hasError = true;
|
|
190967
191621
|
for (const email3 of emails) {
|
|
190968
|
-
output_manager_default.log(`${
|
|
191622
|
+
output_manager_default.log(`${import_chalk138.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
|
190969
191623
|
}
|
|
190970
191624
|
}
|
|
190971
191625
|
}
|
|
@@ -190978,16 +191632,16 @@ Please select a team scope using ${getCommandName(
|
|
|
190978
191632
|
} else {
|
|
190979
191633
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
|
190980
191634
|
for (const email3 of emails) {
|
|
190981
|
-
output_manager_default.log(`${
|
|
191635
|
+
output_manager_default.log(`${import_chalk138.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
190982
191636
|
}
|
|
190983
191637
|
}
|
|
190984
191638
|
return 0;
|
|
190985
191639
|
}
|
|
190986
|
-
var
|
|
191640
|
+
var import_chalk138, import_error_utils36, validateEmail, domains;
|
|
190987
191641
|
var init_invite2 = __esm({
|
|
190988
191642
|
"src/commands/teams/invite.ts"() {
|
|
190989
191643
|
"use strict";
|
|
190990
|
-
|
|
191644
|
+
import_chalk138 = __toESM3(require_source(), 1);
|
|
190991
191645
|
init_cmd();
|
|
190992
191646
|
init_stamp();
|
|
190993
191647
|
init_param();
|
|
@@ -190999,13 +191653,13 @@ var init_invite2 = __esm({
|
|
|
190999
191653
|
init_get_teams();
|
|
191000
191654
|
init_invite_user_to_team();
|
|
191001
191655
|
init_errors_ts();
|
|
191002
|
-
|
|
191656
|
+
import_error_utils36 = __toESM3(require_dist2(), 1);
|
|
191003
191657
|
init_invite();
|
|
191004
191658
|
init_output_manager();
|
|
191005
191659
|
init_get_args();
|
|
191006
191660
|
init_get_flags_specification();
|
|
191007
191661
|
init_error2();
|
|
191008
|
-
|
|
191662
|
+
init_command38();
|
|
191009
191663
|
validateEmail = (data) => email.test(data.trim()) || data.length === 0;
|
|
191010
191664
|
domains = Array.from(
|
|
191011
191665
|
/* @__PURE__ */ new Set([
|
|
@@ -191063,7 +191717,7 @@ async function add8(client2) {
|
|
|
191063
191717
|
let team;
|
|
191064
191718
|
let elapsed2;
|
|
191065
191719
|
output_manager_default.log(
|
|
191066
|
-
`Pick a team identifier for its URL (e.g.: ${
|
|
191720
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk139.default.cyan(
|
|
191067
191721
|
"`vercel.com/acme`"
|
|
191068
191722
|
)})`
|
|
191069
191723
|
);
|
|
@@ -191075,7 +191729,7 @@ async function add8(client2) {
|
|
|
191075
191729
|
default: slug
|
|
191076
191730
|
});
|
|
191077
191731
|
} catch (err) {
|
|
191078
|
-
if ((0,
|
|
191732
|
+
if ((0, import_error_utils37.isError)(err) && err.message === "USER_ABORT") {
|
|
191079
191733
|
output_manager_default.log("Canceled");
|
|
191080
191734
|
return 0;
|
|
191081
191735
|
}
|
|
@@ -191088,13 +191742,13 @@ async function add8(client2) {
|
|
|
191088
191742
|
} catch (err) {
|
|
191089
191743
|
output_manager_default.stopSpinner();
|
|
191090
191744
|
output_manager_default.print(eraseLines(2));
|
|
191091
|
-
output_manager_default.error((0,
|
|
191745
|
+
output_manager_default.error((0, import_error_utils37.errorToString)(err));
|
|
191092
191746
|
}
|
|
191093
191747
|
} while (!team);
|
|
191094
191748
|
output_manager_default.stopSpinner();
|
|
191095
191749
|
process.stdout.write(eraseLines(2));
|
|
191096
191750
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
|
191097
|
-
output_manager_default.log(`${
|
|
191751
|
+
output_manager_default.log(`${import_chalk139.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
|
191098
191752
|
`);
|
|
191099
191753
|
output_manager_default.log("Pick a display name for your team");
|
|
191100
191754
|
let name;
|
|
@@ -191104,7 +191758,7 @@ async function add8(client2) {
|
|
|
191104
191758
|
validate: validateName
|
|
191105
191759
|
});
|
|
191106
191760
|
} catch (err) {
|
|
191107
|
-
if ((0,
|
|
191761
|
+
if ((0, import_error_utils37.isError)(err) && err.message === "USER_ABORT") {
|
|
191108
191762
|
output_manager_default.log("No name specified");
|
|
191109
191763
|
return 2;
|
|
191110
191764
|
}
|
|
@@ -191117,7 +191771,7 @@ async function add8(client2) {
|
|
|
191117
191771
|
process.stdout.write(eraseLines(2));
|
|
191118
191772
|
team = Object.assign(team, res);
|
|
191119
191773
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
|
191120
|
-
output_manager_default.log(`${
|
|
191774
|
+
output_manager_default.log(`${import_chalk139.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
|
191121
191775
|
`);
|
|
191122
191776
|
output_manager_default.spinner("Saving");
|
|
191123
191777
|
client2.config.currentTeam = team.id;
|
|
@@ -191131,11 +191785,11 @@ async function add8(client2) {
|
|
|
191131
191785
|
});
|
|
191132
191786
|
return 0;
|
|
191133
191787
|
}
|
|
191134
|
-
var
|
|
191788
|
+
var import_chalk139, import_error_utils37, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
|
191135
191789
|
var init_add14 = __esm({
|
|
191136
191790
|
"src/commands/teams/add.ts"() {
|
|
191137
191791
|
"use strict";
|
|
191138
|
-
|
|
191792
|
+
import_chalk139 = __toESM3(require_source(), 1);
|
|
191139
191793
|
init_stamp();
|
|
191140
191794
|
init_erase_lines();
|
|
191141
191795
|
init_chars();
|
|
@@ -191144,11 +191798,11 @@ var init_add14 = __esm({
|
|
|
191144
191798
|
init_pkg_name();
|
|
191145
191799
|
init_create_team();
|
|
191146
191800
|
init_patch_team();
|
|
191147
|
-
|
|
191801
|
+
import_error_utils37 = __toESM3(require_dist2(), 1);
|
|
191148
191802
|
init_output_manager();
|
|
191149
191803
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
|
191150
191804
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
|
191151
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
|
191805
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk139.default.gray("vercel.com/");
|
|
191152
191806
|
teamNamePrefix = "Team Name".padEnd(14);
|
|
191153
191807
|
}
|
|
191154
191808
|
});
|
|
@@ -191207,7 +191861,7 @@ async function change(client2, argv) {
|
|
|
191207
191861
|
let title9 = `${team.name} (${team.slug})`;
|
|
191208
191862
|
const selected = team.id === currentTeam?.id;
|
|
191209
191863
|
if (selected) {
|
|
191210
|
-
title9 += ` ${
|
|
191864
|
+
title9 += ` ${import_chalk140.default.bold("(current)")}`;
|
|
191211
191865
|
}
|
|
191212
191866
|
if (team.limited) {
|
|
191213
191867
|
title9 += ` ${emoji("locked")}`;
|
|
@@ -191219,7 +191873,7 @@ async function change(client2, argv) {
|
|
|
191219
191873
|
selected
|
|
191220
191874
|
};
|
|
191221
191875
|
});
|
|
191222
|
-
let suffix = personalScopeSelected ? ` ${
|
|
191876
|
+
let suffix = personalScopeSelected ? ` ${import_chalk140.default.bold("(current)")}` : "";
|
|
191223
191877
|
if (user.limited) {
|
|
191224
191878
|
suffix += ` ${emoji("locked")}`;
|
|
191225
191879
|
}
|
|
@@ -191265,14 +191919,14 @@ async function change(client2, argv) {
|
|
|
191265
191919
|
}
|
|
191266
191920
|
updateCurrentTeam(config2);
|
|
191267
191921
|
output_manager_default.success(
|
|
191268
|
-
`Your account (${
|
|
191922
|
+
`Your account (${import_chalk140.default.bold(user.username)}) is now active!`
|
|
191269
191923
|
);
|
|
191270
191924
|
return 0;
|
|
191271
191925
|
}
|
|
191272
191926
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
|
191273
191927
|
if (!newTeam) {
|
|
191274
191928
|
output_manager_default.error(
|
|
191275
|
-
`You do not have permission to access scope ${
|
|
191929
|
+
`You do not have permission to access scope ${import_chalk140.default.bold(desiredSlug)}.`
|
|
191276
191930
|
);
|
|
191277
191931
|
return 1;
|
|
191278
191932
|
}
|
|
@@ -191290,15 +191944,15 @@ async function change(client2, argv) {
|
|
|
191290
191944
|
}
|
|
191291
191945
|
updateCurrentTeam(config2, newTeam);
|
|
191292
191946
|
output_manager_default.success(
|
|
191293
|
-
`The team ${
|
|
191947
|
+
`The team ${import_chalk140.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
|
191294
191948
|
);
|
|
191295
191949
|
return 0;
|
|
191296
191950
|
}
|
|
191297
|
-
var
|
|
191951
|
+
var import_chalk140, updateCurrentTeam;
|
|
191298
191952
|
var init_switch2 = __esm({
|
|
191299
191953
|
"src/commands/teams/switch.ts"() {
|
|
191300
191954
|
"use strict";
|
|
191301
|
-
|
|
191955
|
+
import_chalk140 = __toESM3(require_source(), 1);
|
|
191302
191956
|
init_emoji();
|
|
191303
191957
|
init_get_user();
|
|
191304
191958
|
init_get_teams();
|
|
@@ -191306,7 +191960,7 @@ var init_switch2 = __esm({
|
|
|
191306
191960
|
init_files();
|
|
191307
191961
|
init_output_manager();
|
|
191308
191962
|
init_switch();
|
|
191309
|
-
|
|
191963
|
+
init_command38();
|
|
191310
191964
|
init_get_args();
|
|
191311
191965
|
init_get_flags_specification();
|
|
191312
191966
|
init_error2();
|
|
@@ -191458,7 +192112,7 @@ var init_teams2 = __esm({
|
|
|
191458
192112
|
init_switch2();
|
|
191459
192113
|
init_invite2();
|
|
191460
192114
|
init_get_args();
|
|
191461
|
-
|
|
192115
|
+
init_command38();
|
|
191462
192116
|
init_help();
|
|
191463
192117
|
init_get_flags_specification();
|
|
191464
192118
|
init_error2();
|
|
@@ -191477,13 +192131,13 @@ var init_teams2 = __esm({
|
|
|
191477
192131
|
// src/commands/telemetry/status.ts
|
|
191478
192132
|
async function status2(client2) {
|
|
191479
192133
|
const enabled = client2.config.telemetry?.enabled !== false;
|
|
191480
|
-
const status3 = enabled ?
|
|
192134
|
+
const status3 = enabled ? import_chalk141.default.green("Enabled") : import_chalk141.default.red("Disabled");
|
|
191481
192135
|
output_manager_default.print("\n");
|
|
191482
|
-
output_manager_default.log(`${
|
|
192136
|
+
output_manager_default.log(`${import_chalk141.default.bold("Telemetry status")}: ${status3}
|
|
191483
192137
|
`);
|
|
191484
192138
|
const learnMoreMessage = `
|
|
191485
192139
|
|
|
191486
|
-
Learn more: ${
|
|
192140
|
+
Learn more: ${import_chalk141.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
|
191487
192141
|
if (enabled) {
|
|
191488
192142
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
|
191489
192143
|
} else {
|
|
@@ -191494,11 +192148,11 @@ Learn more: ${import_chalk140.default.cyan("https://vercel.com/docs/cli/about-te
|
|
|
191494
192148
|
}
|
|
191495
192149
|
return 0;
|
|
191496
192150
|
}
|
|
191497
|
-
var
|
|
192151
|
+
var import_chalk141;
|
|
191498
192152
|
var init_status4 = __esm({
|
|
191499
192153
|
"src/commands/telemetry/status.ts"() {
|
|
191500
192154
|
"use strict";
|
|
191501
|
-
|
|
192155
|
+
import_chalk141 = __toESM3(require_source(), 1);
|
|
191502
192156
|
init_output_manager();
|
|
191503
192157
|
}
|
|
191504
192158
|
});
|
|
@@ -191679,7 +192333,7 @@ async function telemetry(client2) {
|
|
|
191679
192333
|
default: {
|
|
191680
192334
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
|
191681
192335
|
output_manager_default.print(
|
|
191682
|
-
`${
|
|
192336
|
+
`${import_chalk142.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
|
191683
192337
|
`
|
|
191684
192338
|
);
|
|
191685
192339
|
output_manager_default.print(help(telemetryCommand, { columns: client2.stderr.columns }));
|
|
@@ -191687,7 +192341,7 @@ async function telemetry(client2) {
|
|
|
191687
192341
|
}
|
|
191688
192342
|
}
|
|
191689
192343
|
}
|
|
191690
|
-
var
|
|
192344
|
+
var import_chalk142, COMMAND_CONFIG21;
|
|
191691
192345
|
var init_telemetry3 = __esm({
|
|
191692
192346
|
"src/commands/telemetry/index.ts"() {
|
|
191693
192347
|
"use strict";
|
|
@@ -191699,10 +192353,10 @@ var init_telemetry3 = __esm({
|
|
|
191699
192353
|
init_enable2();
|
|
191700
192354
|
init_disable2();
|
|
191701
192355
|
init_flush();
|
|
191702
|
-
|
|
192356
|
+
init_command39();
|
|
191703
192357
|
init_get_flags_specification();
|
|
191704
192358
|
init_telemetry2();
|
|
191705
|
-
|
|
192359
|
+
import_chalk142 = __toESM3(require_source(), 1);
|
|
191706
192360
|
init_output_manager();
|
|
191707
192361
|
init_commands();
|
|
191708
192362
|
COMMAND_CONFIG21 = {
|
|
@@ -191790,7 +192444,7 @@ var init_upgrade3 = __esm({
|
|
|
191790
192444
|
"src/commands/upgrade/index.ts"() {
|
|
191791
192445
|
"use strict";
|
|
191792
192446
|
init_help();
|
|
191793
|
-
|
|
192447
|
+
init_command40();
|
|
191794
192448
|
init_get_args();
|
|
191795
192449
|
init_get_flags_specification();
|
|
191796
192450
|
init_upgrade();
|
|
@@ -191850,7 +192504,7 @@ var init_whoami2 = __esm({
|
|
|
191850
192504
|
"src/commands/whoami/index.ts"() {
|
|
191851
192505
|
"use strict";
|
|
191852
192506
|
init_help();
|
|
191853
|
-
|
|
192507
|
+
init_command41();
|
|
191854
192508
|
init_get_scope();
|
|
191855
192509
|
init_get_args();
|
|
191856
192510
|
init_get_flags_specification();
|
|
@@ -191861,9 +192515,9 @@ var init_whoami2 = __esm({
|
|
|
191861
192515
|
});
|
|
191862
192516
|
|
|
191863
192517
|
// src/index.ts
|
|
191864
|
-
var
|
|
192518
|
+
var import_error_utils38 = __toESM3(require_dist2(), 1);
|
|
191865
192519
|
var import_fs_extra24 = __toESM3(require_lib(), 1);
|
|
191866
|
-
var
|
|
192520
|
+
var import_chalk143 = __toESM3(require_source(), 1);
|
|
191867
192521
|
var import_epipebomb = __toESM3(require_epipebomb(), 1);
|
|
191868
192522
|
import { join as join24 } from "path";
|
|
191869
192523
|
import { existsSync as existsSync5 } from "fs";
|
|
@@ -192470,6 +193124,12 @@ var RootTelemetryClient = class extends TelemetryClient {
|
|
|
192470
193124
|
value: actual
|
|
192471
193125
|
});
|
|
192472
193126
|
}
|
|
193127
|
+
trackCliCommandLogsv2(actual) {
|
|
193128
|
+
this.trackCliCommand({
|
|
193129
|
+
command: "logsv2",
|
|
193130
|
+
value: actual
|
|
193131
|
+
});
|
|
193132
|
+
}
|
|
192473
193133
|
trackCliCommandMicrofrontends(actual) {
|
|
192474
193134
|
this.trackCliCommand({
|
|
192475
193135
|
command: "microfrontends",
|
|
@@ -192797,7 +193457,7 @@ import { determineAgent as determineAgent4 } from "@vercel/detect-agent";
|
|
|
192797
193457
|
try {
|
|
192798
193458
|
process.cwd();
|
|
192799
193459
|
} catch (err) {
|
|
192800
|
-
if ((0,
|
|
193460
|
+
if ((0, import_error_utils38.isError)(err) && err.message.includes("uv_cwd")) {
|
|
192801
193461
|
console.error("Error: The current working directory does not exist.");
|
|
192802
193462
|
process.exit(1);
|
|
192803
193463
|
}
|
|
@@ -192903,13 +193563,13 @@ var main18 = async () => {
|
|
|
192903
193563
|
const betaCommands = ["curl"];
|
|
192904
193564
|
if (betaCommands.includes(targetOrSubcommand)) {
|
|
192905
193565
|
output_manager_default.print(
|
|
192906
|
-
`${
|
|
193566
|
+
`${import_chalk143.default.grey(
|
|
192907
193567
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
|
192908
193568
|
)}
|
|
192909
193569
|
`
|
|
192910
193570
|
);
|
|
192911
193571
|
} else {
|
|
192912
|
-
output_manager_default.print(`${
|
|
193572
|
+
output_manager_default.print(`${import_chalk143.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
|
192913
193573
|
`);
|
|
192914
193574
|
}
|
|
192915
193575
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
|
@@ -192928,7 +193588,7 @@ var main18 = async () => {
|
|
|
192928
193588
|
output_manager_default.error(
|
|
192929
193589
|
`An unexpected error occurred while trying to create the global directory "${humanizePath(
|
|
192930
193590
|
VERCEL_DIR4
|
|
192931
|
-
)}" ${(0,
|
|
193591
|
+
)}" ${(0, import_error_utils38.errorToString)(err)}`
|
|
192932
193592
|
);
|
|
192933
193593
|
return 1;
|
|
192934
193594
|
}
|
|
@@ -192936,7 +193596,7 @@ var main18 = async () => {
|
|
|
192936
193596
|
try {
|
|
192937
193597
|
config2 = readConfigFile();
|
|
192938
193598
|
} catch (err) {
|
|
192939
|
-
if ((0,
|
|
193599
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "ENOENT") {
|
|
192940
193600
|
config2 = defaultGlobalConfig;
|
|
192941
193601
|
try {
|
|
192942
193602
|
writeToConfigFile(config2);
|
|
@@ -192944,7 +193604,7 @@ var main18 = async () => {
|
|
|
192944
193604
|
output_manager_default.error(
|
|
192945
193605
|
`An unexpected error occurred while trying to save the config to "${humanizePath(
|
|
192946
193606
|
VERCEL_CONFIG_PATH
|
|
192947
|
-
)}" ${(0,
|
|
193607
|
+
)}" ${(0, import_error_utils38.errorToString)(err2)}`
|
|
192948
193608
|
);
|
|
192949
193609
|
return 1;
|
|
192950
193610
|
}
|
|
@@ -192952,7 +193612,7 @@ var main18 = async () => {
|
|
|
192952
193612
|
output_manager_default.error(
|
|
192953
193613
|
`An unexpected error occurred while trying to read the config in "${humanizePath(
|
|
192954
193614
|
VERCEL_CONFIG_PATH
|
|
192955
|
-
)}" ${(0,
|
|
193615
|
+
)}" ${(0, import_error_utils38.errorToString)(err)}`
|
|
192956
193616
|
);
|
|
192957
193617
|
return 1;
|
|
192958
193618
|
}
|
|
@@ -192961,7 +193621,7 @@ var main18 = async () => {
|
|
|
192961
193621
|
try {
|
|
192962
193622
|
authConfig = readAuthConfigFile();
|
|
192963
193623
|
} catch (err) {
|
|
192964
|
-
if ((0,
|
|
193624
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "ENOENT") {
|
|
192965
193625
|
authConfig = defaultAuthConfig;
|
|
192966
193626
|
try {
|
|
192967
193627
|
writeToAuthConfigFile(authConfig);
|
|
@@ -192969,7 +193629,7 @@ var main18 = async () => {
|
|
|
192969
193629
|
output_manager_default.error(
|
|
192970
193630
|
`An unexpected error occurred while trying to write the auth config to "${humanizePath(
|
|
192971
193631
|
VERCEL_AUTH_CONFIG_PATH
|
|
192972
|
-
)}" ${(0,
|
|
193632
|
+
)}" ${(0, import_error_utils38.errorToString)(err2)}`
|
|
192973
193633
|
);
|
|
192974
193634
|
return 1;
|
|
192975
193635
|
}
|
|
@@ -192977,7 +193637,7 @@ var main18 = async () => {
|
|
|
192977
193637
|
output_manager_default.error(
|
|
192978
193638
|
`An unexpected error occurred while trying to read the auth config in "${humanizePath(
|
|
192979
193639
|
VERCEL_AUTH_CONFIG_PATH
|
|
192980
|
-
)}" ${(0,
|
|
193640
|
+
)}" ${(0, import_error_utils38.errorToString)(err)}`
|
|
192981
193641
|
);
|
|
192982
193642
|
return 1;
|
|
192983
193643
|
}
|
|
@@ -193157,7 +193817,7 @@ var main18 = async () => {
|
|
|
193157
193817
|
if (err instanceof Error) {
|
|
193158
193818
|
output_manager_default.debug(err.stack || err.toString());
|
|
193159
193819
|
}
|
|
193160
|
-
if ((0,
|
|
193820
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "NOT_AUTHORIZED") {
|
|
193161
193821
|
output_manager_default.prettyError({
|
|
193162
193822
|
message: `You do not have access to the specified account`,
|
|
193163
193823
|
link: "https://err.sh/vercel/scope-not-accessible"
|
|
@@ -193165,7 +193825,7 @@ var main18 = async () => {
|
|
|
193165
193825
|
return 1;
|
|
193166
193826
|
}
|
|
193167
193827
|
output_manager_default.error(
|
|
193168
|
-
`Not able to load user because of unexpected error: ${(0,
|
|
193828
|
+
`Not able to load user because of unexpected error: ${(0, import_error_utils38.errorToString)(err)}`
|
|
193169
193829
|
);
|
|
193170
193830
|
return 1;
|
|
193171
193831
|
}
|
|
@@ -193180,14 +193840,14 @@ var main18 = async () => {
|
|
|
193180
193840
|
try {
|
|
193181
193841
|
teams2 = await getTeams(client);
|
|
193182
193842
|
} catch (err) {
|
|
193183
|
-
if ((0,
|
|
193843
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "not_authorized") {
|
|
193184
193844
|
output_manager_default.prettyError({
|
|
193185
193845
|
message: `You do not have access to the specified team`,
|
|
193186
193846
|
link: "https://err.sh/vercel/scope-not-accessible"
|
|
193187
193847
|
});
|
|
193188
193848
|
return 1;
|
|
193189
193849
|
}
|
|
193190
|
-
if ((0,
|
|
193850
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "rate_limited") {
|
|
193191
193851
|
output_manager_default.prettyError({
|
|
193192
193852
|
message: "Rate limited. Too many requests to the same endpoint: /teams"
|
|
193193
193853
|
});
|
|
@@ -193220,7 +193880,7 @@ var main18 = async () => {
|
|
|
193220
193880
|
);
|
|
193221
193881
|
telemetry2.trackCliExtension();
|
|
193222
193882
|
} catch (err) {
|
|
193223
|
-
if ((0,
|
|
193883
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "ENOENT") {
|
|
193224
193884
|
if (handleCommandTypo({
|
|
193225
193885
|
command: targetCommand2,
|
|
193226
193886
|
availableCommands: commandNames
|
|
@@ -193334,6 +193994,10 @@ var main18 = async () => {
|
|
|
193334
193994
|
telemetry2.trackCliCommandLogs(userSuppliedSubCommand);
|
|
193335
193995
|
func = (init_logs3(), __toCommonJS3(logs_exports)).default;
|
|
193336
193996
|
break;
|
|
193997
|
+
case "logsv2":
|
|
193998
|
+
telemetry2.trackCliCommandLogsv2(userSuppliedSubCommand);
|
|
193999
|
+
func = (init_logsv22(), __toCommonJS3(logsv2_exports)).default;
|
|
194000
|
+
break;
|
|
193337
194001
|
case "mcp":
|
|
193338
194002
|
func = (init_mcp2(), __toCommonJS3(mcp_exports)).default;
|
|
193339
194003
|
break;
|
|
@@ -193426,7 +194090,7 @@ var main18 = async () => {
|
|
|
193426
194090
|
exitCode2 = await func(client);
|
|
193427
194091
|
}
|
|
193428
194092
|
} catch (err) {
|
|
193429
|
-
if ((0,
|
|
194093
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "ENOTFOUND") {
|
|
193430
194094
|
const matches = /getaddrinfo ENOTFOUND (.*)$/.exec(err.message || "");
|
|
193431
194095
|
if (matches && matches[1]) {
|
|
193432
194096
|
const hostname3 = matches[1];
|
|
@@ -193441,7 +194105,7 @@ var main18 = async () => {
|
|
|
193441
194105
|
}
|
|
193442
194106
|
return 1;
|
|
193443
194107
|
}
|
|
193444
|
-
if ((0,
|
|
194108
|
+
if ((0, import_error_utils38.isErrnoException)(err) && err.code === "ECONNRESET") {
|
|
193445
194109
|
const matches = /request to https:\/\/(.*?)\//.exec(err.message || "");
|
|
193446
194110
|
const hostname3 = matches?.[1];
|
|
193447
194111
|
if (hostname3) {
|
|
@@ -193453,7 +194117,7 @@ var main18 = async () => {
|
|
|
193453
194117
|
}
|
|
193454
194118
|
return 1;
|
|
193455
194119
|
}
|
|
193456
|
-
if ((0,
|
|
194120
|
+
if ((0, import_error_utils38.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
|
193457
194121
|
output_manager_default.prettyError(err);
|
|
193458
194122
|
return 1;
|
|
193459
194123
|
}
|
|
@@ -193462,7 +194126,7 @@ var main18 = async () => {
|
|
|
193462
194126
|
output_manager_default.prettyError(err);
|
|
193463
194127
|
return 1;
|
|
193464
194128
|
}
|
|
193465
|
-
if ((0,
|
|
194129
|
+
if ((0, import_error_utils38.isErrnoException)(err)) {
|
|
193466
194130
|
if (typeof err.stack === "string") {
|
|
193467
194131
|
output_manager_default.debug(err.stack);
|
|
193468
194132
|
}
|
|
@@ -193484,20 +194148,20 @@ main18().then(async (exitCode2) => {
|
|
|
193484
194148
|
});
|
|
193485
194149
|
if (latest) {
|
|
193486
194150
|
const changelog = "https://github.com/vercel/vercel/releases";
|
|
193487
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
194151
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk143.default.magenta(
|
|
193488
194152
|
`
|
|
193489
194153
|
|
|
193490
|
-
The latest update ${
|
|
194154
|
+
The latest update ${import_chalk143.default.italic(
|
|
193491
194155
|
"may"
|
|
193492
194156
|
)} fix any errors that occurred.`
|
|
193493
194157
|
) : "";
|
|
193494
194158
|
output_manager_default.print(
|
|
193495
194159
|
box(
|
|
193496
|
-
`Update available! ${
|
|
194160
|
+
`Update available! ${import_chalk143.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk143.default.green(
|
|
193497
194161
|
`v${latest}`
|
|
193498
194162
|
)}
|
|
193499
194163
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
193500
|
-
Run ${
|
|
194164
|
+
Run ${import_chalk143.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
|
193501
194165
|
)
|
|
193502
194166
|
);
|
|
193503
194167
|
output_manager_default.print("\n");
|