vercel 37.4.2 → 37.5.2
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 +719 -262
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -4073,14 +4073,14 @@ var require_templates = __commonJS2({
|
|
4073
4073
|
}
|
4074
4074
|
return results;
|
4075
4075
|
}
|
4076
|
-
function buildStyle(
|
4076
|
+
function buildStyle(chalk109, styles) {
|
4077
4077
|
const enabled = {};
|
4078
4078
|
for (const layer of styles) {
|
4079
4079
|
for (const style of layer.styles) {
|
4080
4080
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
4081
4081
|
}
|
4082
4082
|
}
|
4083
|
-
let current =
|
4083
|
+
let current = chalk109;
|
4084
4084
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
4085
4085
|
if (!Array.isArray(styles2)) {
|
4086
4086
|
continue;
|
@@ -4092,7 +4092,7 @@ var require_templates = __commonJS2({
|
|
4092
4092
|
}
|
4093
4093
|
return current;
|
4094
4094
|
}
|
4095
|
-
module2.exports = (
|
4095
|
+
module2.exports = (chalk109, temporary) => {
|
4096
4096
|
const styles = [];
|
4097
4097
|
const chunks = [];
|
4098
4098
|
let chunk = [];
|
@@ -4102,13 +4102,13 @@ var require_templates = __commonJS2({
|
|
4102
4102
|
} else if (style) {
|
4103
4103
|
const string = chunk.join("");
|
4104
4104
|
chunk = [];
|
4105
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
4105
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk109, styles)(string));
|
4106
4106
|
styles.push({ inverse, styles: parseStyle(style) });
|
4107
4107
|
} else if (close2) {
|
4108
4108
|
if (styles.length === 0) {
|
4109
4109
|
throw new Error("Found extraneous } in Chalk template literal");
|
4110
4110
|
}
|
4111
|
-
chunks.push(buildStyle(
|
4111
|
+
chunks.push(buildStyle(chalk109, styles)(chunk.join("")));
|
4112
4112
|
chunk = [];
|
4113
4113
|
styles.pop();
|
4114
4114
|
} else {
|
@@ -4156,16 +4156,16 @@ var require_source = __commonJS2({
|
|
4156
4156
|
}
|
4157
4157
|
};
|
4158
4158
|
var chalkFactory = (options) => {
|
4159
|
-
const
|
4160
|
-
applyOptions(
|
4161
|
-
|
4162
|
-
Object.setPrototypeOf(
|
4163
|
-
Object.setPrototypeOf(
|
4164
|
-
|
4159
|
+
const chalk110 = {};
|
4160
|
+
applyOptions(chalk110, options);
|
4161
|
+
chalk110.template = (...arguments_) => chalkTag(chalk110.template, ...arguments_);
|
4162
|
+
Object.setPrototypeOf(chalk110, Chalk3.prototype);
|
4163
|
+
Object.setPrototypeOf(chalk110.template, chalk110);
|
4164
|
+
chalk110.template.constructor = () => {
|
4165
4165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4166
4166
|
};
|
4167
|
-
|
4168
|
-
return
|
4167
|
+
chalk110.template.Instance = ChalkClass;
|
4168
|
+
return chalk110.template;
|
4169
4169
|
};
|
4170
4170
|
function Chalk3(options) {
|
4171
4171
|
return chalkFactory(options);
|
@@ -4276,7 +4276,7 @@ var require_source = __commonJS2({
|
|
4276
4276
|
return openAll + string + closeAll;
|
4277
4277
|
};
|
4278
4278
|
var template;
|
4279
|
-
var chalkTag = (
|
4279
|
+
var chalkTag = (chalk110, ...strings) => {
|
4280
4280
|
const [firstString] = strings;
|
4281
4281
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
4282
4282
|
return strings.join(" ");
|
@@ -4292,14 +4292,14 @@ var require_source = __commonJS2({
|
|
4292
4292
|
if (template === void 0) {
|
4293
4293
|
template = require_templates();
|
4294
4294
|
}
|
4295
|
-
return template(
|
4295
|
+
return template(chalk110, parts.join(""));
|
4296
4296
|
};
|
4297
4297
|
Object.defineProperties(Chalk3.prototype, styles);
|
4298
|
-
var
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
module2.exports =
|
4298
|
+
var chalk109 = Chalk3();
|
4299
|
+
chalk109.supportsColor = stdoutColor;
|
4300
|
+
chalk109.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
4301
|
+
chalk109.stderr.supportsColor = stderrColor;
|
4302
|
+
module2.exports = chalk109;
|
4303
4303
|
}
|
4304
4304
|
});
|
4305
4305
|
|
@@ -13478,14 +13478,14 @@ var require_templates2 = __commonJS2({
|
|
13478
13478
|
}
|
13479
13479
|
return results;
|
13480
13480
|
}
|
13481
|
-
function buildStyle(
|
13481
|
+
function buildStyle(chalk109, styles) {
|
13482
13482
|
const enabled = {};
|
13483
13483
|
for (const layer of styles) {
|
13484
13484
|
for (const style of layer.styles) {
|
13485
13485
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
13486
13486
|
}
|
13487
13487
|
}
|
13488
|
-
let current =
|
13488
|
+
let current = chalk109;
|
13489
13489
|
for (const styleName of Object.keys(enabled)) {
|
13490
13490
|
if (Array.isArray(enabled[styleName])) {
|
13491
13491
|
if (!(styleName in current)) {
|
@@ -13500,7 +13500,7 @@ var require_templates2 = __commonJS2({
|
|
13500
13500
|
}
|
13501
13501
|
return current;
|
13502
13502
|
}
|
13503
|
-
module2.exports = (
|
13503
|
+
module2.exports = (chalk109, tmp) => {
|
13504
13504
|
const styles = [];
|
13505
13505
|
const chunks = [];
|
13506
13506
|
let chunk = [];
|
@@ -13510,13 +13510,13 @@ var require_templates2 = __commonJS2({
|
|
13510
13510
|
} else if (style) {
|
13511
13511
|
const str = chunk.join("");
|
13512
13512
|
chunk = [];
|
13513
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
13513
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk109, styles)(str));
|
13514
13514
|
styles.push({ inverse, styles: parseStyle(style) });
|
13515
13515
|
} else if (close2) {
|
13516
13516
|
if (styles.length === 0) {
|
13517
13517
|
throw new Error("Found extraneous } in Chalk template literal");
|
13518
13518
|
}
|
13519
|
-
chunks.push(buildStyle(
|
13519
|
+
chunks.push(buildStyle(chalk109, styles)(chunk.join("")));
|
13520
13520
|
chunk = [];
|
13521
13521
|
styles.pop();
|
13522
13522
|
} else {
|
@@ -13553,16 +13553,16 @@ var require_chalk = __commonJS2({
|
|
13553
13553
|
}
|
13554
13554
|
function Chalk3(options) {
|
13555
13555
|
if (!this || !(this instanceof Chalk3) || this.template) {
|
13556
|
-
const
|
13557
|
-
applyOptions(
|
13558
|
-
|
13556
|
+
const chalk109 = {};
|
13557
|
+
applyOptions(chalk109, options);
|
13558
|
+
chalk109.template = function() {
|
13559
13559
|
const args2 = [].slice.call(arguments);
|
13560
|
-
return chalkTag.apply(null, [
|
13560
|
+
return chalkTag.apply(null, [chalk109.template].concat(args2));
|
13561
13561
|
};
|
13562
|
-
Object.setPrototypeOf(
|
13563
|
-
Object.setPrototypeOf(
|
13564
|
-
|
13565
|
-
return
|
13562
|
+
Object.setPrototypeOf(chalk109, Chalk3.prototype);
|
13563
|
+
Object.setPrototypeOf(chalk109.template, chalk109);
|
13564
|
+
chalk109.template.constructor = Chalk3;
|
13565
|
+
return chalk109.template;
|
13566
13566
|
}
|
13567
13567
|
applyOptions(this, options);
|
13568
13568
|
}
|
@@ -13681,7 +13681,7 @@ var require_chalk = __commonJS2({
|
|
13681
13681
|
ansiStyles.dim.open = originalDim;
|
13682
13682
|
return str;
|
13683
13683
|
}
|
13684
|
-
function chalkTag(
|
13684
|
+
function chalkTag(chalk109, strings) {
|
13685
13685
|
if (!Array.isArray(strings)) {
|
13686
13686
|
return [].slice.call(arguments, 1).join(" ");
|
13687
13687
|
}
|
@@ -13691,7 +13691,7 @@ var require_chalk = __commonJS2({
|
|
13691
13691
|
parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
13692
13692
|
parts.push(String(strings.raw[i]));
|
13693
13693
|
}
|
13694
|
-
return template(
|
13694
|
+
return template(chalk109, parts.join(""));
|
13695
13695
|
}
|
13696
13696
|
Object.defineProperties(Chalk3.prototype, styles);
|
13697
13697
|
module2.exports = Chalk3();
|
@@ -15488,19 +15488,19 @@ var require_cli_spinners = __commonJS2({
|
|
15488
15488
|
var require_log_symbols = __commonJS2({
|
15489
15489
|
"../../node_modules/.pnpm/log-symbols@2.2.0/node_modules/log-symbols/index.js"(exports2, module2) {
|
15490
15490
|
"use strict";
|
15491
|
-
var
|
15491
|
+
var chalk109 = require_chalk();
|
15492
15492
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
15493
15493
|
var main15 = {
|
15494
|
-
info:
|
15495
|
-
success:
|
15496
|
-
warning:
|
15497
|
-
error:
|
15494
|
+
info: chalk109.blue("\u2139"),
|
15495
|
+
success: chalk109.green("\u2714"),
|
15496
|
+
warning: chalk109.yellow("\u26A0"),
|
15497
|
+
error: chalk109.red("\u2716")
|
15498
15498
|
};
|
15499
15499
|
var fallbacks = {
|
15500
|
-
info:
|
15501
|
-
success:
|
15502
|
-
warning:
|
15503
|
-
error:
|
15500
|
+
info: chalk109.blue("i"),
|
15501
|
+
success: chalk109.green("\u221A"),
|
15502
|
+
warning: chalk109.yellow("\u203C"),
|
15503
|
+
error: chalk109.red("\xD7")
|
15504
15504
|
};
|
15505
15505
|
module2.exports = isSupported ? main15 : fallbacks;
|
15506
15506
|
}
|
@@ -15896,7 +15896,7 @@ var require_wcwidth = __commonJS2({
|
|
15896
15896
|
var require_ora = __commonJS2({
|
15897
15897
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
15898
15898
|
"use strict";
|
15899
|
-
var
|
15899
|
+
var chalk109 = require_chalk();
|
15900
15900
|
var cliCursor = require_cli_cursor();
|
15901
15901
|
var cliSpinners = require_cli_spinners();
|
15902
15902
|
var logSymbols = require_log_symbols();
|
@@ -15985,7 +15985,7 @@ var require_ora = __commonJS2({
|
|
15985
15985
|
const { frames } = this.spinner;
|
15986
15986
|
let frame = frames[this.frameIndex];
|
15987
15987
|
if (this.color) {
|
15988
|
-
frame =
|
15988
|
+
frame = chalk109[this.color](frame);
|
15989
15989
|
}
|
15990
15990
|
this.frameIndex = ++this.frameIndex % frames.length;
|
15991
15991
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
@@ -17765,14 +17765,14 @@ var require_templates3 = __commonJS2({
|
|
17765
17765
|
}
|
17766
17766
|
return results;
|
17767
17767
|
}
|
17768
|
-
function buildStyle(
|
17768
|
+
function buildStyle(chalk109, styles) {
|
17769
17769
|
const enabled = {};
|
17770
17770
|
for (const layer of styles) {
|
17771
17771
|
for (const style of layer.styles) {
|
17772
17772
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
17773
17773
|
}
|
17774
17774
|
}
|
17775
|
-
let current =
|
17775
|
+
let current = chalk109;
|
17776
17776
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
17777
17777
|
if (!Array.isArray(styles2)) {
|
17778
17778
|
continue;
|
@@ -17784,7 +17784,7 @@ var require_templates3 = __commonJS2({
|
|
17784
17784
|
}
|
17785
17785
|
return current;
|
17786
17786
|
}
|
17787
|
-
module2.exports = (
|
17787
|
+
module2.exports = (chalk109, temporary) => {
|
17788
17788
|
const styles = [];
|
17789
17789
|
const chunks = [];
|
17790
17790
|
let chunk = [];
|
@@ -17794,13 +17794,13 @@ var require_templates3 = __commonJS2({
|
|
17794
17794
|
} else if (style) {
|
17795
17795
|
const string = chunk.join("");
|
17796
17796
|
chunk = [];
|
17797
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
17797
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk109, styles)(string));
|
17798
17798
|
styles.push({ inverse, styles: parseStyle(style) });
|
17799
17799
|
} else if (close2) {
|
17800
17800
|
if (styles.length === 0) {
|
17801
17801
|
throw new Error("Found extraneous } in Chalk template literal");
|
17802
17802
|
}
|
17803
|
-
chunks.push(buildStyle(
|
17803
|
+
chunks.push(buildStyle(chalk109, styles)(chunk.join("")));
|
17804
17804
|
chunk = [];
|
17805
17805
|
styles.pop();
|
17806
17806
|
} else {
|
@@ -17848,16 +17848,16 @@ var require_source2 = __commonJS2({
|
|
17848
17848
|
}
|
17849
17849
|
};
|
17850
17850
|
var chalkFactory = (options) => {
|
17851
|
-
const
|
17852
|
-
applyOptions(
|
17853
|
-
|
17854
|
-
Object.setPrototypeOf(
|
17855
|
-
Object.setPrototypeOf(
|
17856
|
-
|
17851
|
+
const chalk110 = {};
|
17852
|
+
applyOptions(chalk110, options);
|
17853
|
+
chalk110.template = (...arguments_) => chalkTag(chalk110.template, ...arguments_);
|
17854
|
+
Object.setPrototypeOf(chalk110, Chalk3.prototype);
|
17855
|
+
Object.setPrototypeOf(chalk110.template, chalk110);
|
17856
|
+
chalk110.template.constructor = () => {
|
17857
17857
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
17858
17858
|
};
|
17859
|
-
|
17860
|
-
return
|
17859
|
+
chalk110.template.Instance = ChalkClass;
|
17860
|
+
return chalk110.template;
|
17861
17861
|
};
|
17862
17862
|
function Chalk3(options) {
|
17863
17863
|
return chalkFactory(options);
|
@@ -17968,7 +17968,7 @@ var require_source2 = __commonJS2({
|
|
17968
17968
|
return openAll + string + closeAll;
|
17969
17969
|
};
|
17970
17970
|
var template;
|
17971
|
-
var chalkTag = (
|
17971
|
+
var chalkTag = (chalk110, ...strings) => {
|
17972
17972
|
const [firstString] = strings;
|
17973
17973
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
17974
17974
|
return strings.join(" ");
|
@@ -17984,14 +17984,14 @@ var require_source2 = __commonJS2({
|
|
17984
17984
|
if (template === void 0) {
|
17985
17985
|
template = require_templates3();
|
17986
17986
|
}
|
17987
|
-
return template(
|
17987
|
+
return template(chalk110, parts.join(""));
|
17988
17988
|
};
|
17989
17989
|
Object.defineProperties(Chalk3.prototype, styles);
|
17990
|
-
var
|
17991
|
-
|
17992
|
-
|
17993
|
-
|
17994
|
-
module2.exports =
|
17990
|
+
var chalk109 = Chalk3();
|
17991
|
+
chalk109.supportsColor = stdoutColor;
|
17992
|
+
chalk109.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
17993
|
+
chalk109.stderr.supportsColor = stderrColor;
|
17994
|
+
module2.exports = chalk109;
|
17995
17995
|
}
|
17996
17996
|
});
|
17997
17997
|
|
@@ -71424,7 +71424,11 @@ function getSubcommand(cliArgs, config2) {
|
|
71424
71424
|
const [subcommand, ...rest] = cliArgs;
|
71425
71425
|
for (const k of Object.keys(config2)) {
|
71426
71426
|
if (k !== "default" && config2[k].indexOf(subcommand) !== -1) {
|
71427
|
-
return {
|
71427
|
+
return {
|
71428
|
+
subcommand: k,
|
71429
|
+
subcommandActual: subcommand,
|
71430
|
+
args: rest
|
71431
|
+
};
|
71428
71432
|
}
|
71429
71433
|
}
|
71430
71434
|
return {
|
@@ -147361,7 +147365,7 @@ async function main8(client2) {
|
|
147361
147365
|
}
|
147362
147366
|
args2 = getSubcommand(parsedArgs.args.slice(1), COMMAND_CONFIG8).args;
|
147363
147367
|
if (parsedArgs.args.length > 3) {
|
147364
|
-
output2.error("Too
|
147368
|
+
output2.error("Too many arguments.");
|
147365
147369
|
return 1;
|
147366
147370
|
}
|
147367
147371
|
try {
|
@@ -147444,16 +147448,16 @@ var init_builds = __esm({
|
|
147444
147448
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
147445
147449
|
return `${import_chalk89.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
147446
147450
|
};
|
147447
|
-
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource,
|
147451
|
+
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden2 = false) => {
|
147448
147452
|
const { id } = buildGroup[0];
|
147449
147453
|
const entry = commonPath.padEnd(longestSource + padding);
|
147450
147454
|
const time = typeof times[id] === "string" ? times[id] : "";
|
147451
|
-
const prefix =
|
147455
|
+
const prefix = isHidden2 === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
147452
147456
|
let pathColor = import_chalk89.default.cyan;
|
147453
147457
|
if (buildGroup.every(isFailed)) {
|
147454
147458
|
pathColor = import_chalk89.default.red;
|
147455
147459
|
}
|
147456
|
-
if (
|
147460
|
+
if (isHidden2) {
|
147457
147461
|
pathColor = import_chalk89.default.grey;
|
147458
147462
|
}
|
147459
147463
|
return `${import_chalk89.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
@@ -148001,80 +148005,325 @@ var init_inspect2 = __esm({
|
|
148001
148005
|
}
|
148002
148006
|
});
|
148003
148007
|
|
148008
|
+
// src/commands/integration/wizard.ts
|
148009
|
+
function createInputStep(key, schema) {
|
148010
|
+
if (schema["ui:control"] !== "input") {
|
148011
|
+
throw new Error(
|
148012
|
+
`InputStep: Expected control "input" for key "${key}", but was "${schema["ui:control"]}"`
|
148013
|
+
);
|
148014
|
+
}
|
148015
|
+
switch (schema.type) {
|
148016
|
+
case "string": {
|
148017
|
+
return async (client2) => {
|
148018
|
+
const value = await client2.input.text({
|
148019
|
+
message: schema["ui:placeholder"] || schema["ui:label"] || key,
|
148020
|
+
default: schema.default
|
148021
|
+
});
|
148022
|
+
return [key, value];
|
148023
|
+
};
|
148024
|
+
}
|
148025
|
+
case "number": {
|
148026
|
+
return async (client2) => {
|
148027
|
+
const value = await client2.input.text({
|
148028
|
+
message: schema["ui:placeholder"] || schema["ui:label"] || key,
|
148029
|
+
default: schema.default,
|
148030
|
+
validate: (value2) => {
|
148031
|
+
const number = Number(value2);
|
148032
|
+
if (isNaN(number)) {
|
148033
|
+
return `Value "${value2}" must be a number.`;
|
148034
|
+
}
|
148035
|
+
if (schema.minimum !== void 0 && schema.minimum > number) {
|
148036
|
+
return `Value "${value2}" must be greater or equal ${schema.minimum}.`;
|
148037
|
+
}
|
148038
|
+
if (schema.maximum !== void 0 && schema.maximum < number) {
|
148039
|
+
return `Value "${value2}" must be smaller or equal ${schema.maximum}.`;
|
148040
|
+
}
|
148041
|
+
return true;
|
148042
|
+
}
|
148043
|
+
});
|
148044
|
+
return [key, value];
|
148045
|
+
};
|
148046
|
+
}
|
148047
|
+
default: {
|
148048
|
+
throw new Error(
|
148049
|
+
`[Input Step] Unsupported schema type for input control of key "${key}": ${schema.type}`
|
148050
|
+
);
|
148051
|
+
}
|
148052
|
+
}
|
148053
|
+
}
|
148054
|
+
function createSelectStep(key, schema) {
|
148055
|
+
if (!["select", "region", "vercel-region"].includes(schema["ui:control"])) {
|
148056
|
+
throw new Error(
|
148057
|
+
`SelectStep: Expected control "select", "region" or "vercel-region", but was "${schema["ui:control"]}"`
|
148058
|
+
);
|
148059
|
+
}
|
148060
|
+
if (!schema["ui:options"]?.length) {
|
148061
|
+
throw new Error(
|
148062
|
+
`SelectStep: Expected control for key "${key}" to have options, but was ${JSON.stringify(schema["ui:options"])}`
|
148063
|
+
);
|
148064
|
+
}
|
148065
|
+
const options = schema["ui:options"];
|
148066
|
+
const choices = [];
|
148067
|
+
const defaultValue = schema.default;
|
148068
|
+
for (const option of options) {
|
148069
|
+
if (typeof option === "string") {
|
148070
|
+
choices.push({
|
148071
|
+
name: option,
|
148072
|
+
value: option,
|
148073
|
+
short: option,
|
148074
|
+
selected: Boolean(defaultValue && option === defaultValue)
|
148075
|
+
});
|
148076
|
+
} else {
|
148077
|
+
if (option.hidden) {
|
148078
|
+
continue;
|
148079
|
+
}
|
148080
|
+
choices.push({
|
148081
|
+
name: option.label,
|
148082
|
+
value: option.value,
|
148083
|
+
short: option.label,
|
148084
|
+
selected: Boolean(defaultValue && option.value === defaultValue)
|
148085
|
+
});
|
148086
|
+
}
|
148087
|
+
}
|
148088
|
+
return async (client2) => {
|
148089
|
+
const value = await list(client2, {
|
148090
|
+
message: schema["ui:placeholder"] || schema["ui:label"] || key,
|
148091
|
+
choices
|
148092
|
+
});
|
148093
|
+
return [key, value];
|
148094
|
+
};
|
148095
|
+
}
|
148096
|
+
function createMetadataWizard(metadataSchema) {
|
148097
|
+
const properties = metadataSchema.properties;
|
148098
|
+
let isSupported = true;
|
148099
|
+
let allFieldsAreReadonly = true;
|
148100
|
+
const steps = [];
|
148101
|
+
for (const [key, schema] of Object.entries(properties)) {
|
148102
|
+
if (isHidden(schema)) {
|
148103
|
+
continue;
|
148104
|
+
}
|
148105
|
+
if (!supportedUIControls.has(schema["ui:control"])) {
|
148106
|
+
isSupported = false;
|
148107
|
+
break;
|
148108
|
+
}
|
148109
|
+
if (!isReadOnly(schema)) {
|
148110
|
+
allFieldsAreReadonly = false;
|
148111
|
+
}
|
148112
|
+
switch (schema["ui:control"]) {
|
148113
|
+
case "input": {
|
148114
|
+
steps.push(createInputStep(key, schema));
|
148115
|
+
break;
|
148116
|
+
}
|
148117
|
+
case "region":
|
148118
|
+
case "vercel-region":
|
148119
|
+
case "select": {
|
148120
|
+
steps.push(createSelectStep(key, schema));
|
148121
|
+
break;
|
148122
|
+
}
|
148123
|
+
default: {
|
148124
|
+
throw new Error(
|
148125
|
+
`Unsupported metadata control: ${schema["ui:control"]}`
|
148126
|
+
);
|
148127
|
+
}
|
148128
|
+
}
|
148129
|
+
}
|
148130
|
+
return {
|
148131
|
+
isSupported,
|
148132
|
+
run: async (client2) => allFieldsAreReadonly ? getMetadataFromReadOnlyFields(metadataSchema) : getMetadataFromSteps(client2, steps)
|
148133
|
+
};
|
148134
|
+
}
|
148135
|
+
function getMetadataFromReadOnlyFields(metadataSchema) {
|
148136
|
+
const metadata = {};
|
148137
|
+
for (const [key, schema] of Object.entries(metadataSchema.properties)) {
|
148138
|
+
if (isHidden(schema)) {
|
148139
|
+
continue;
|
148140
|
+
}
|
148141
|
+
if (!isReadOnly(schema)) {
|
148142
|
+
throw new Error(`Field "${key}" must be read-only.`);
|
148143
|
+
}
|
148144
|
+
metadata[key] = schema.default;
|
148145
|
+
}
|
148146
|
+
return metadata;
|
148147
|
+
}
|
148148
|
+
async function getMetadataFromSteps(client2, steps) {
|
148149
|
+
const metadataEntries = [];
|
148150
|
+
for (const step of steps) {
|
148151
|
+
metadataEntries.push(await step(client2));
|
148152
|
+
}
|
148153
|
+
return Object.fromEntries(metadataEntries);
|
148154
|
+
}
|
148155
|
+
function isHidden(schema) {
|
148156
|
+
return Boolean(
|
148157
|
+
schema["ui:hidden"] === true || schema["ui:hidden"] === "create"
|
148158
|
+
);
|
148159
|
+
}
|
148160
|
+
function isReadOnly(schema) {
|
148161
|
+
return Boolean(schema["ui:read-only"]);
|
148162
|
+
}
|
148163
|
+
var supportedUIControls;
|
148164
|
+
var init_wizard = __esm({
|
148165
|
+
"src/commands/integration/wizard.ts"() {
|
148166
|
+
"use strict";
|
148167
|
+
init_list();
|
148168
|
+
supportedUIControls = /* @__PURE__ */ new Set([
|
148169
|
+
"input",
|
148170
|
+
"select",
|
148171
|
+
"region",
|
148172
|
+
"vercel-region"
|
148173
|
+
]);
|
148174
|
+
}
|
148175
|
+
});
|
148176
|
+
|
148177
|
+
// src/commands/integration/client.ts
|
148178
|
+
async function fetchIntegration(client2, slug) {
|
148179
|
+
return client2.fetch(
|
148180
|
+
`/v1/integrations/integration/${slug}?public=1`,
|
148181
|
+
{
|
148182
|
+
json: true
|
148183
|
+
}
|
148184
|
+
);
|
148185
|
+
}
|
148186
|
+
async function fetchInstallations(client2, integration) {
|
148187
|
+
return client2.fetch(
|
148188
|
+
`/v1/integrations/integration/${integration.id}/installed?source=marketplace`,
|
148189
|
+
{
|
148190
|
+
json: true
|
148191
|
+
}
|
148192
|
+
);
|
148193
|
+
}
|
148194
|
+
async function fetchBillingPlans(client2, integration, product, metadata) {
|
148195
|
+
const searchParams = new URLSearchParams();
|
148196
|
+
searchParams.set("metadata", JSON.stringify(metadata));
|
148197
|
+
return client2.fetch(
|
148198
|
+
`/v1/integrations/integration/${integration.id}/products/${product.id}/plans?${searchParams}`,
|
148199
|
+
{
|
148200
|
+
json: true
|
148201
|
+
}
|
148202
|
+
);
|
148203
|
+
}
|
148204
|
+
async function connectStoreToProject(client2, projectId, storeId, environments) {
|
148205
|
+
return client2.fetch(`/v1/storage/stores/${storeId}/connections`, {
|
148206
|
+
json: true,
|
148207
|
+
method: "POST",
|
148208
|
+
body: {
|
148209
|
+
envVarEnvironments: environments,
|
148210
|
+
projectId,
|
148211
|
+
type: "integration"
|
148212
|
+
}
|
148213
|
+
});
|
148214
|
+
}
|
148215
|
+
async function provisionStoreResource(client2, installationId, productId, billingPlanId, name, metadata) {
|
148216
|
+
return await client2.fetch(
|
148217
|
+
"/v1/storage/stores/integration",
|
148218
|
+
{
|
148219
|
+
method: "POST",
|
148220
|
+
json: true,
|
148221
|
+
body: {
|
148222
|
+
billingPlanId,
|
148223
|
+
integrationConfigurationId: installationId,
|
148224
|
+
integrationProductIdOrSlug: productId,
|
148225
|
+
metadata,
|
148226
|
+
name
|
148227
|
+
}
|
148228
|
+
}
|
148229
|
+
);
|
148230
|
+
}
|
148231
|
+
var init_client2 = __esm({
|
148232
|
+
"src/commands/integration/client.ts"() {
|
148233
|
+
"use strict";
|
148234
|
+
}
|
148235
|
+
});
|
148236
|
+
|
148004
148237
|
// src/commands/integration/add.ts
|
148005
148238
|
async function add6(client2, args2) {
|
148006
148239
|
if (args2.length > 1) {
|
148007
|
-
client2.output.error(
|
148240
|
+
client2.output.error("Cannot install more than one integration at a time");
|
148008
148241
|
return 1;
|
148009
148242
|
}
|
148010
148243
|
const integrationSlug = args2[0];
|
148011
|
-
|
148012
|
-
|
148013
|
-
|
148244
|
+
if (!integrationSlug) {
|
148245
|
+
client2.output.error("You must pass an integration slug");
|
148246
|
+
return 1;
|
148247
|
+
}
|
148248
|
+
const { contextName, team } = await getScope(client2);
|
148249
|
+
if (!team) {
|
148014
148250
|
client2.output.error("Team not found");
|
148015
148251
|
return 1;
|
148016
148252
|
}
|
148017
|
-
|
148018
|
-
|
148019
|
-
|
148020
|
-
|
148253
|
+
let integration;
|
148254
|
+
try {
|
148255
|
+
integration = await fetchIntegration(client2, integrationSlug);
|
148256
|
+
} catch (error3) {
|
148257
|
+
client2.output.error(
|
148258
|
+
`Failed to get integration "${integrationSlug}": ${error3.message}`
|
148259
|
+
);
|
148021
148260
|
return 1;
|
148022
148261
|
}
|
148023
148262
|
if (!integration.products) {
|
148024
148263
|
client2.output.error(
|
148025
|
-
`Integration is not
|
148264
|
+
`Integration "${integrationSlug}" is not a Marketplace integration`
|
148026
148265
|
);
|
148027
148266
|
return 1;
|
148028
148267
|
}
|
148029
|
-
const
|
148030
|
-
|
148268
|
+
const [productResult, installationsResult] = await Promise.allSettled([
|
148269
|
+
selectProduct(client2, integration),
|
148270
|
+
fetchInstallations(client2, integration)
|
148271
|
+
]);
|
148272
|
+
if (productResult.status === "rejected" || !productResult.value) {
|
148273
|
+
client2.output.error("Product not found");
|
148274
|
+
return 1;
|
148275
|
+
}
|
148276
|
+
if (installationsResult.status === "rejected") {
|
148031
148277
|
client2.output.error(
|
148032
|
-
`
|
148278
|
+
`Failed to get integration installations: ${installationsResult.reason}`
|
148033
148279
|
);
|
148034
148280
|
return 1;
|
148035
148281
|
}
|
148036
|
-
const
|
148037
|
-
|
148038
|
-
|
148039
|
-
|
148040
|
-
privisionResourceViaWebUI(
|
148041
|
-
client2,
|
148042
|
-
teamId,
|
148043
|
-
integration.id,
|
148044
|
-
product.id,
|
148045
|
-
projectLink?.project?.id
|
148282
|
+
const product = productResult.value;
|
148283
|
+
const installations = installationsResult.value;
|
148284
|
+
const teamInstallations = installations.filter(
|
148285
|
+
(install2) => install2.ownerId === team.id && install2.installationType === "marketplace"
|
148046
148286
|
);
|
148047
|
-
|
148048
|
-
|
148049
|
-
|
148050
|
-
try {
|
148051
|
-
return await client2.fetch(
|
148052
|
-
`/v1/integrations/integration/${slug}?teamSlug=${team.slug}&source=marketplace&public=1`,
|
148053
|
-
{
|
148054
|
-
json: true
|
148055
|
-
}
|
148287
|
+
if (teamInstallations.length > 1) {
|
148288
|
+
client2.output.error(
|
148289
|
+
`Found more than one existing installation of ${integration.name}. Please contact Vercel Support at https://vercel.com/help`
|
148056
148290
|
);
|
148057
|
-
|
148058
|
-
client2.output.error(error3.message);
|
148059
|
-
}
|
148060
|
-
}
|
148061
|
-
async function selectProduct(client2, integration) {
|
148062
|
-
const products = integration.products;
|
148063
|
-
if (!products?.length) {
|
148064
|
-
return;
|
148291
|
+
return 1;
|
148065
148292
|
}
|
148066
|
-
|
148067
|
-
|
148293
|
+
const installation = teamInstallations[0];
|
148294
|
+
client2.output.log(
|
148295
|
+
`Installing ${import_chalk92.default.bold(product.name)} by ${import_chalk92.default.bold(integration.name)} under ${import_chalk92.default.bold(contextName)}`
|
148296
|
+
);
|
148297
|
+
const metadataSchema = product.metadataSchema;
|
148298
|
+
const metadataWizard = createMetadataWizard(metadataSchema);
|
148299
|
+
const isStorageProduct = product.type === "storage";
|
148300
|
+
const provisionResourceViaCLIIsSupported = installation && metadataWizard.isSupported && isStorageProduct;
|
148301
|
+
if (!provisionResourceViaCLIIsSupported) {
|
148302
|
+
const projectLink = await getOptionalLinkedProject(client2);
|
148303
|
+
if (projectLink?.status === "error") {
|
148304
|
+
return projectLink.exitCode;
|
148305
|
+
}
|
148306
|
+
const openInWeb = await client2.input.confirm({
|
148307
|
+
message: !installation ? "Terms have not been accepted. Open Vercel Dashboard?" : "This resource must be provisioned through the Web UI. Open Vercel Dashboard?"
|
148308
|
+
});
|
148309
|
+
if (openInWeb) {
|
148310
|
+
privisionResourceViaWebUI(
|
148311
|
+
client2,
|
148312
|
+
team.id,
|
148313
|
+
integration.id,
|
148314
|
+
product.id,
|
148315
|
+
projectLink?.project?.id
|
148316
|
+
);
|
148317
|
+
}
|
148318
|
+
return 0;
|
148068
148319
|
}
|
148069
|
-
|
148070
|
-
|
148071
|
-
|
148072
|
-
|
148073
|
-
|
148074
|
-
|
148075
|
-
|
148076
|
-
});
|
148077
|
-
return selected;
|
148320
|
+
return provisionResourceViaCLI(
|
148321
|
+
client2,
|
148322
|
+
integration,
|
148323
|
+
installation,
|
148324
|
+
product,
|
148325
|
+
metadataWizard
|
148326
|
+
);
|
148078
148327
|
}
|
148079
148328
|
async function getOptionalLinkedProject(client2) {
|
148080
148329
|
const linkedProject = await getLinkedProject(client2);
|
@@ -148106,14 +148355,222 @@ function privisionResourceViaWebUI(client2, teamId, integrationId, productId, pr
|
|
148106
148355
|
);
|
148107
148356
|
(0, import_open3.default)(url3.href);
|
148108
148357
|
}
|
148109
|
-
|
148358
|
+
async function provisionResourceViaCLI(client2, integration, installation, product, metadataWizard) {
|
148359
|
+
const name = await client2.input.text({
|
148360
|
+
message: "What is the name of the resource?"
|
148361
|
+
});
|
148362
|
+
const metadata = await metadataWizard.run(client2);
|
148363
|
+
let billingPlans;
|
148364
|
+
try {
|
148365
|
+
const billingPlansResponse = await fetchBillingPlans(
|
148366
|
+
client2,
|
148367
|
+
integration,
|
148368
|
+
product,
|
148369
|
+
metadata
|
148370
|
+
);
|
148371
|
+
billingPlans = billingPlansResponse.plans;
|
148372
|
+
} catch (error3) {
|
148373
|
+
client2.output.error(
|
148374
|
+
`Failed to get billing plans: ${error3.message}`
|
148375
|
+
);
|
148376
|
+
return 1;
|
148377
|
+
}
|
148378
|
+
const enabledBillingPlans = billingPlans.filter((plan) => !plan.disabled);
|
148379
|
+
if (!enabledBillingPlans.length) {
|
148380
|
+
client2.output.error("No billing plans available");
|
148381
|
+
return 1;
|
148382
|
+
}
|
148383
|
+
const billingPlan = await selectBillingPlan(client2, enabledBillingPlans);
|
148384
|
+
if (!billingPlan) {
|
148385
|
+
client2.output.error("No billing plan selected");
|
148386
|
+
return 1;
|
148387
|
+
}
|
148388
|
+
const confirmed = await confirmProductSelection(
|
148389
|
+
client2,
|
148390
|
+
product,
|
148391
|
+
name,
|
148392
|
+
metadata,
|
148393
|
+
billingPlan
|
148394
|
+
);
|
148395
|
+
if (!confirmed) {
|
148396
|
+
return 1;
|
148397
|
+
}
|
148398
|
+
return provisionStorageProduct(
|
148399
|
+
client2,
|
148400
|
+
product,
|
148401
|
+
installation,
|
148402
|
+
name,
|
148403
|
+
metadata,
|
148404
|
+
billingPlan
|
148405
|
+
);
|
148406
|
+
}
|
148407
|
+
async function selectProduct(client2, integration) {
|
148408
|
+
const products = integration.products;
|
148409
|
+
if (!products?.length) {
|
148410
|
+
return;
|
148411
|
+
}
|
148412
|
+
if (products.length === 1) {
|
148413
|
+
return products[0];
|
148414
|
+
}
|
148415
|
+
const selected = await client2.input.select({
|
148416
|
+
message: "Select a product",
|
148417
|
+
choices: products.map((product) => ({
|
148418
|
+
description: product.shortDescription,
|
148419
|
+
name: product.name,
|
148420
|
+
value: product
|
148421
|
+
}))
|
148422
|
+
});
|
148423
|
+
return selected;
|
148424
|
+
}
|
148425
|
+
async function selectBillingPlan(client2, billingPlans) {
|
148426
|
+
const billingPlanId = await list(client2, {
|
148427
|
+
message: "Choose a billing plan",
|
148428
|
+
separator: true,
|
148429
|
+
choices: billingPlans.map((plan) => {
|
148430
|
+
const body = [plan.description];
|
148431
|
+
if (plan.details?.length) {
|
148432
|
+
const detailsTable = formatTable(
|
148433
|
+
["", ""],
|
148434
|
+
["l", "r"],
|
148435
|
+
[
|
148436
|
+
{
|
148437
|
+
name: "Details",
|
148438
|
+
rows: plan.details.map((detail) => [
|
148439
|
+
detail.label,
|
148440
|
+
detail.value || "-"
|
148441
|
+
])
|
148442
|
+
}
|
148443
|
+
]
|
148444
|
+
);
|
148445
|
+
body.push(detailsTable);
|
148446
|
+
}
|
148447
|
+
if (plan.highlightedDetails?.length) {
|
148448
|
+
const hightlightedDetailsTable = formatTable(
|
148449
|
+
["", ""],
|
148450
|
+
["l", "r"],
|
148451
|
+
[
|
148452
|
+
{
|
148453
|
+
name: "More Details",
|
148454
|
+
rows: plan.highlightedDetails.map((detail) => [
|
148455
|
+
detail.label,
|
148456
|
+
detail.value || "-"
|
148457
|
+
])
|
148458
|
+
}
|
148459
|
+
]
|
148460
|
+
);
|
148461
|
+
body.push(hightlightedDetailsTable);
|
148462
|
+
}
|
148463
|
+
let planName = plan.name;
|
148464
|
+
if (plan.cost) {
|
148465
|
+
planName += ` ${plan.cost}`;
|
148466
|
+
}
|
148467
|
+
return {
|
148468
|
+
name: [planName, "", indent_default(body.join("\n"), 4)].join("\n"),
|
148469
|
+
value: plan.id,
|
148470
|
+
short: planName,
|
148471
|
+
disabled: plan.disabled
|
148472
|
+
};
|
148473
|
+
}),
|
148474
|
+
pageSize: 1e3
|
148475
|
+
});
|
148476
|
+
return billingPlans.find((plan) => plan.id === billingPlanId);
|
148477
|
+
}
|
148478
|
+
async function confirmProductSelection(client2, product, name, metadata, billingPlan) {
|
148479
|
+
client2.output.print("Selected product:\n");
|
148480
|
+
client2.output.print(`${import_chalk92.default.dim(`- ${import_chalk92.default.bold(`Name:`)} ${name}`)}
|
148481
|
+
`);
|
148482
|
+
for (const [key, value] of Object.entries(metadata)) {
|
148483
|
+
client2.output.print(
|
148484
|
+
`${import_chalk92.default.dim(`- ${import_chalk92.default.bold(`${product.metadataSchema.properties[key]["ui:label"]}:`)} ${value}`)}
|
148485
|
+
`
|
148486
|
+
);
|
148487
|
+
}
|
148488
|
+
client2.output.print(
|
148489
|
+
`${import_chalk92.default.dim(`- ${import_chalk92.default.bold(`Plan:`)} ${billingPlan.name}`)}
|
148490
|
+
`
|
148491
|
+
);
|
148492
|
+
return client2.input.confirm({
|
148493
|
+
message: "Confirm selection?"
|
148494
|
+
});
|
148495
|
+
}
|
148496
|
+
async function provisionStorageProduct(client2, product, installation, name, metadata, billingPlan) {
|
148497
|
+
client2.output.spinner("Provisioning resource...");
|
148498
|
+
let storeId;
|
148499
|
+
try {
|
148500
|
+
const result = await provisionStoreResource(
|
148501
|
+
client2,
|
148502
|
+
installation.id,
|
148503
|
+
product.id,
|
148504
|
+
billingPlan.id,
|
148505
|
+
name,
|
148506
|
+
metadata
|
148507
|
+
);
|
148508
|
+
storeId = result.store.id;
|
148509
|
+
} catch (error3) {
|
148510
|
+
client2.output.error(
|
148511
|
+
`Failed to provision ${product.name}: ${error3.message}`
|
148512
|
+
);
|
148513
|
+
return 1;
|
148514
|
+
} finally {
|
148515
|
+
client2.output.stopSpinner();
|
148516
|
+
}
|
148517
|
+
client2.output.log(`${product.name} successfully provisioned`);
|
148518
|
+
const projectLink = await getOptionalLinkedProject(client2);
|
148519
|
+
if (projectLink?.status === "error") {
|
148520
|
+
return projectLink.exitCode;
|
148521
|
+
}
|
148522
|
+
if (!projectLink?.project) {
|
148523
|
+
return 0;
|
148524
|
+
}
|
148525
|
+
const project = projectLink.project;
|
148526
|
+
const environments = await client2.input.checkbox({
|
148527
|
+
message: "Select environments",
|
148528
|
+
choices: [
|
148529
|
+
{ name: "Production", value: "production", checked: true },
|
148530
|
+
{ name: "Preview", value: "preview", checked: true },
|
148531
|
+
{ name: "Development", value: "development", checked: true }
|
148532
|
+
]
|
148533
|
+
});
|
148534
|
+
client2.output.spinner(
|
148535
|
+
`Connecting ${import_chalk92.default.bold(name)} to ${import_chalk92.default.bold(project.name)}...`
|
148536
|
+
);
|
148537
|
+
try {
|
148538
|
+
await connectStoreToProject(
|
148539
|
+
client2,
|
148540
|
+
projectLink.project.id,
|
148541
|
+
storeId,
|
148542
|
+
environments
|
148543
|
+
);
|
148544
|
+
} catch (error3) {
|
148545
|
+
client2.output.error(
|
148546
|
+
`Failed to connect store to project: ${error3.message}`
|
148547
|
+
);
|
148548
|
+
return 1;
|
148549
|
+
} finally {
|
148550
|
+
client2.output.stopSpinner();
|
148551
|
+
}
|
148552
|
+
client2.output.log(
|
148553
|
+
`${import_chalk92.default.bold(name)} successfully connected to ${import_chalk92.default.bold(project.name)}
|
148554
|
+
|
148555
|
+
${indent_default(`Run ${cmd(`${packageName} env pull`)} to update the environment variables`, 4)}`
|
148556
|
+
);
|
148557
|
+
return 0;
|
148558
|
+
}
|
148559
|
+
var import_chalk92, import_open3;
|
148110
148560
|
var init_add5 = __esm({
|
148111
148561
|
"src/commands/integration/add.ts"() {
|
148112
148562
|
"use strict";
|
148563
|
+
import_chalk92 = __toESM3(require_source());
|
148113
148564
|
import_open3 = __toESM3(require_open());
|
148114
|
-
|
148565
|
+
init_format_table();
|
148566
|
+
init_pkg_name();
|
148567
|
+
init_get_scope();
|
148568
|
+
init_list();
|
148569
|
+
init_cmd();
|
148570
|
+
init_indent();
|
148115
148571
|
init_link2();
|
148116
|
-
|
148572
|
+
init_wizard();
|
148573
|
+
init_client2();
|
148117
148574
|
}
|
148118
148575
|
});
|
148119
148576
|
|
@@ -148149,14 +148606,14 @@ __export3(install_exports, {
|
|
148149
148606
|
default: () => install
|
148150
148607
|
});
|
148151
148608
|
async function install(client2) {
|
148152
|
-
const { flags } = parseArguments(client2.argv.slice(2));
|
148609
|
+
const { args: args2, flags } = parseArguments(client2.argv.slice(2));
|
148153
148610
|
if (flags["--help"]) {
|
148154
148611
|
client2.output.print(
|
148155
148612
|
help2(installCommand, { columns: client2.stderr.columns })
|
148156
148613
|
);
|
148157
148614
|
return 2;
|
148158
148615
|
}
|
148159
|
-
await add6(client2,
|
148616
|
+
await add6(client2, args2.slice(1));
|
148160
148617
|
}
|
148161
148618
|
var init_install = __esm({
|
148162
148619
|
"src/commands/install/index.ts"() {
|
@@ -148586,7 +149043,7 @@ async function list2(client2) {
|
|
148586
149043
|
}
|
148587
149044
|
const projectSlugLink = formatProject(client2, contextName, project.name);
|
148588
149045
|
if (!singleDeployment) {
|
148589
|
-
spinner(`Fetching deployments in ${
|
149046
|
+
spinner(`Fetching deployments in ${import_chalk93.default.bold(contextName)}`);
|
148590
149047
|
const start = Date.now();
|
148591
149048
|
debug3("Fetching deployments");
|
148592
149049
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
@@ -148626,7 +149083,7 @@ async function list2(client2) {
|
|
148626
149083
|
const urls = [];
|
148627
149084
|
const tablePrint = table(
|
148628
149085
|
[
|
148629
|
-
headers.map((header) =>
|
149086
|
+
headers.map((header) => import_chalk93.default.bold(import_chalk93.default.cyan(header))),
|
148630
149087
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
148631
149088
|
urls.push(`https://${dep.url}`);
|
148632
149089
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
@@ -148636,16 +149093,16 @@ async function list2(client2) {
|
|
148636
149093
|
const targetName = dep.customEnvironment?.name || (dep.target === "production" ? "Production" : "Preview");
|
148637
149094
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
148638
149095
|
return [
|
148639
|
-
|
149096
|
+
import_chalk93.default.gray(createdAt),
|
148640
149097
|
`https://${dep.url}`,
|
148641
149098
|
stateString2(dep.readyState || ""),
|
148642
149099
|
formatEnvironment(client2, contextName, project.name, {
|
148643
149100
|
id: targetSlug,
|
148644
149101
|
name: targetName
|
148645
149102
|
}),
|
148646
|
-
...!showPolicy ? [
|
148647
|
-
...!showPolicy ? [
|
148648
|
-
...showPolicy ? [
|
149103
|
+
...!showPolicy ? [import_chalk93.default.gray(getDeploymentDuration(dep))] : [],
|
149104
|
+
...!showPolicy ? [import_chalk93.default.gray(dep.creator?.username)] : [],
|
149105
|
+
...showPolicy ? [import_chalk93.default.gray(proposedExp)] : []
|
148649
149106
|
];
|
148650
149107
|
}).filter(
|
148651
149108
|
(app2) => (
|
@@ -148692,17 +149149,17 @@ function stateString2(s) {
|
|
148692
149149
|
case "BUILDING":
|
148693
149150
|
case "DEPLOYING":
|
148694
149151
|
case "ANALYZING":
|
148695
|
-
return
|
149152
|
+
return import_chalk93.default.yellow(CIRCLE) + sTitle;
|
148696
149153
|
case "ERROR":
|
148697
|
-
return
|
149154
|
+
return import_chalk93.default.red(CIRCLE) + sTitle;
|
148698
149155
|
case "READY":
|
148699
|
-
return
|
149156
|
+
return import_chalk93.default.green(CIRCLE) + sTitle;
|
148700
149157
|
case "QUEUED":
|
148701
|
-
return
|
149158
|
+
return import_chalk93.default.white(CIRCLE) + sTitle;
|
148702
149159
|
case "CANCELED":
|
148703
|
-
return
|
149160
|
+
return import_chalk93.default.gray(sTitle);
|
148704
149161
|
default:
|
148705
|
-
return
|
149162
|
+
return import_chalk93.default.gray("UNKNOWN");
|
148706
149163
|
}
|
148707
149164
|
}
|
148708
149165
|
function sortByCreatedAt(a, b) {
|
@@ -148718,12 +149175,12 @@ function filterUniqueApps() {
|
|
148718
149175
|
return true;
|
148719
149176
|
};
|
148720
149177
|
}
|
148721
|
-
var import_ms18,
|
149178
|
+
var import_ms18, import_chalk93, import_title6, import_error_utils26;
|
148722
149179
|
var init_list2 = __esm({
|
148723
149180
|
"src/commands/list/index.ts"() {
|
148724
149181
|
"use strict";
|
148725
149182
|
import_ms18 = __toESM3(require_ms2());
|
148726
|
-
|
149183
|
+
import_chalk93 = __toESM3(require_source());
|
148727
149184
|
import_title6 = __toESM3(require_lib4());
|
148728
149185
|
init_table();
|
148729
149186
|
init_get_args();
|
@@ -148809,7 +149266,7 @@ async function logs(client2) {
|
|
148809
149266
|
} catch {
|
148810
149267
|
}
|
148811
149268
|
spinner(
|
148812
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
149269
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk94.default.bold(contextName)}`
|
148813
149270
|
);
|
148814
149271
|
let deployment;
|
148815
149272
|
try {
|
@@ -148845,19 +149302,19 @@ function printDisclaimer(deployment, { print, warn }) {
|
|
148845
149302
|
`This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
|
148846
149303
|
);
|
148847
149304
|
print(
|
148848
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
149305
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk94.default.dim(
|
148849
149306
|
deployment.id
|
148850
|
-
)}) starting from ${
|
149307
|
+
)}) starting from ${import_chalk94.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
|
148851
149308
|
|
148852
149309
|
`
|
148853
149310
|
);
|
148854
149311
|
}
|
148855
|
-
var import_error_utils27,
|
149312
|
+
var import_error_utils27, import_chalk94, import_format2, deprecatedFlags, dateTimeFormat2;
|
148856
149313
|
var init_logs2 = __esm({
|
148857
149314
|
"src/commands/logs/index.ts"() {
|
148858
149315
|
"use strict";
|
148859
149316
|
import_error_utils27 = __toESM3(require_dist2());
|
148860
|
-
|
149317
|
+
import_chalk94 = __toESM3(require_source());
|
148861
149318
|
import_format2 = __toESM3(require_format());
|
148862
149319
|
init_build_state();
|
148863
149320
|
init_is_deploying();
|
@@ -149026,7 +149483,7 @@ async function login2(client2) {
|
|
149026
149483
|
writeToConfigFile(client2.config);
|
149027
149484
|
output2.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
149028
149485
|
output2.print(
|
149029
|
-
`${
|
149486
|
+
`${import_chalk95.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
149030
149487
|
`
|
149031
149488
|
);
|
149032
149489
|
output2.print(
|
@@ -149038,12 +149495,12 @@ async function login2(client2) {
|
|
149038
149495
|
);
|
149039
149496
|
return 0;
|
149040
149497
|
}
|
149041
|
-
var import_email_validator,
|
149498
|
+
var import_email_validator, import_chalk95;
|
149042
149499
|
var init_login2 = __esm({
|
149043
149500
|
"src/commands/login/index.ts"() {
|
149044
149501
|
"use strict";
|
149045
149502
|
import_email_validator = __toESM3(require_email_validator());
|
149046
|
-
|
149503
|
+
import_chalk95 = __toESM3(require_source());
|
149047
149504
|
init_humanize_path();
|
149048
149505
|
init_get_args();
|
149049
149506
|
init_prompt();
|
@@ -149168,12 +149625,12 @@ async function add7(client2, args2, contextName) {
|
|
149168
149625
|
const { output: output2 } = client2;
|
149169
149626
|
if (args2.length !== 1) {
|
149170
149627
|
output2.error(
|
149171
|
-
`Invalid number of arguments. Usage: ${
|
149628
|
+
`Invalid number of arguments. Usage: ${import_chalk96.default.cyan(
|
149172
149629
|
`${getCommandName("project add <name>")}`
|
149173
149630
|
)}`
|
149174
149631
|
);
|
149175
149632
|
if (args2.length > 1) {
|
149176
|
-
const example =
|
149633
|
+
const example = import_chalk96.default.cyan(
|
149177
149634
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
149178
149635
|
);
|
149179
149636
|
output2.log(
|
@@ -149199,17 +149656,17 @@ async function add7(client2, args2, contextName) {
|
|
149199
149656
|
}
|
149200
149657
|
const elapsed2 = (0, import_ms19.default)(Date.now() - start);
|
149201
149658
|
output2.log(
|
149202
|
-
`${
|
149659
|
+
`${import_chalk96.default.cyan("Success!")} Project ${import_chalk96.default.bold(
|
149203
149660
|
name.toLowerCase()
|
149204
|
-
)} added (${
|
149661
|
+
)} added (${import_chalk96.default.bold(contextName)}) ${import_chalk96.default.gray(`[${elapsed2}]`)}`
|
149205
149662
|
);
|
149206
149663
|
return;
|
149207
149664
|
}
|
149208
|
-
var
|
149665
|
+
var import_chalk96, import_ms19;
|
149209
149666
|
var init_add6 = __esm({
|
149210
149667
|
"src/commands/project/add.ts"() {
|
149211
149668
|
"use strict";
|
149212
|
-
|
149669
|
+
import_chalk96 = __toESM3(require_source());
|
149213
149670
|
import_ms19 = __toESM3(require_ms2());
|
149214
149671
|
init_errors_ts();
|
149215
149672
|
init_pkg_name();
|
@@ -149222,14 +149679,14 @@ async function list3(client2, argv, args2, contextName) {
|
|
149222
149679
|
const { output: output2 } = client2;
|
149223
149680
|
if (args2.length !== 0) {
|
149224
149681
|
output2.error(
|
149225
|
-
`Invalid number of arguments. Usage: ${
|
149682
|
+
`Invalid number of arguments. Usage: ${import_chalk97.default.cyan(
|
149226
149683
|
`${getCommandName("project ls")}`
|
149227
149684
|
)}`
|
149228
149685
|
);
|
149229
149686
|
return 2;
|
149230
149687
|
}
|
149231
149688
|
const start = Date.now();
|
149232
|
-
output2.spinner(`Fetching projects in ${
|
149689
|
+
output2.spinner(`Fetching projects in ${import_chalk97.default.bold(contextName)}`);
|
149233
149690
|
let projectsUrl = `/v9/projects?limit=20`;
|
149234
149691
|
const deprecated = argv["--update-required"] || false;
|
149235
149692
|
if (deprecated) {
|
@@ -149264,19 +149721,19 @@ async function list3(client2, argv, args2, contextName) {
|
|
149264
149721
|
);
|
149265
149722
|
}
|
149266
149723
|
output2.log(
|
149267
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
149724
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk97.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk97.default.gray(`[${elapsed2}]`)}`
|
149268
149725
|
);
|
149269
149726
|
if (projectList.length > 0) {
|
149270
149727
|
const tablePrint = table(
|
149271
149728
|
[
|
149272
149729
|
["Project Name", "Latest Production URL", "Updated"].map(
|
149273
|
-
(header) =>
|
149730
|
+
(header) => import_chalk97.default.bold(import_chalk97.default.cyan(header))
|
149274
149731
|
),
|
149275
149732
|
...projectList.map((project) => [
|
149276
149733
|
[
|
149277
|
-
|
149734
|
+
import_chalk97.default.bold(project.name),
|
149278
149735
|
getLatestProdUrl(project),
|
149279
|
-
|
149736
|
+
import_chalk97.default.gray((0, import_ms20.default)(Date.now() - project.updatedAt))
|
149280
149737
|
]
|
149281
149738
|
]).flat()
|
149282
149739
|
],
|
@@ -149300,11 +149757,11 @@ function getLatestProdUrl(project) {
|
|
149300
149757
|
return "https://" + alias2;
|
149301
149758
|
return "--";
|
149302
149759
|
}
|
149303
|
-
var
|
149760
|
+
var import_chalk97, import_ms20, import_build_utils17;
|
149304
149761
|
var init_list3 = __esm({
|
149305
149762
|
"src/commands/project/list.ts"() {
|
149306
149763
|
"use strict";
|
149307
|
-
|
149764
|
+
import_chalk97 = __toESM3(require_source());
|
149308
149765
|
import_ms20 = __toESM3(require_ms2());
|
149309
149766
|
init_table();
|
149310
149767
|
init_get_command_flags();
|
@@ -149317,7 +149774,7 @@ var init_list3 = __esm({
|
|
149317
149774
|
async function rm6(client2, args2) {
|
149318
149775
|
if (args2.length !== 1) {
|
149319
149776
|
client2.output.error(
|
149320
|
-
`Invalid number of arguments. Usage: ${
|
149777
|
+
`Invalid number of arguments. Usage: ${import_chalk98.default.cyan(
|
149321
149778
|
`${getCommandName("project rm <name>")}`
|
149322
149779
|
)}`
|
149323
149780
|
);
|
@@ -149346,7 +149803,7 @@ async function rm6(client2, args2) {
|
|
149346
149803
|
}
|
149347
149804
|
const elapsed2 = (0, import_ms21.default)(Date.now() - start);
|
149348
149805
|
client2.output.log(
|
149349
|
-
`${
|
149806
|
+
`${import_chalk98.default.cyan("Success!")} Project ${import_chalk98.default.bold(name)} removed ${import_chalk98.default.gray(
|
149350
149807
|
`[${elapsed2}]`
|
149351
149808
|
)}`
|
149352
149809
|
);
|
@@ -149355,19 +149812,19 @@ async function rm6(client2, args2) {
|
|
149355
149812
|
async function readConfirmation3(client2, projectName) {
|
149356
149813
|
client2.output.print(
|
149357
149814
|
prependEmoji(
|
149358
|
-
`The project ${
|
149815
|
+
`The project ${import_chalk98.default.bold(projectName)} will be removed permanently.
|
149359
149816
|
It will also delete everything under the project including deployments.
|
149360
149817
|
`,
|
149361
149818
|
emoji("warning")
|
149362
149819
|
)
|
149363
149820
|
);
|
149364
|
-
return await confirm(client2, `${
|
149821
|
+
return await confirm(client2, `${import_chalk98.default.bold.red("Are you sure?")}`, false);
|
149365
149822
|
}
|
149366
|
-
var
|
149823
|
+
var import_chalk98, import_ms21, e;
|
149367
149824
|
var init_rm6 = __esm({
|
149368
149825
|
"src/commands/project/rm.ts"() {
|
149369
149826
|
"use strict";
|
149370
|
-
|
149827
|
+
import_chalk98 = __toESM3(require_source());
|
149371
149828
|
import_ms21 = __toESM3(require_ms2());
|
149372
149829
|
init_emoji();
|
149373
149830
|
init_errors_ts();
|
@@ -149576,7 +150033,7 @@ async function getProjectByDeployment({
|
|
149576
150033
|
let team;
|
149577
150034
|
try {
|
149578
150035
|
output2?.spinner(
|
149579
|
-
`Fetching deployment "${deployId}" in ${
|
150036
|
+
`Fetching deployment "${deployId}" in ${import_chalk99.default.bold(contextName)}\u2026`
|
149580
150037
|
);
|
149581
150038
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
149582
150039
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -149593,12 +150050,12 @@ async function getProjectByDeployment({
|
|
149593
150050
|
team = teamResult.value;
|
149594
150051
|
deployment = deploymentResult.value;
|
149595
150052
|
output2?.log(
|
149596
|
-
`Fetching deployment "${deployId}" in ${
|
150053
|
+
`Fetching deployment "${deployId}" in ${import_chalk99.default.bold(contextName)}\u2026`
|
149597
150054
|
);
|
149598
150055
|
if (deployment.team?.id) {
|
149599
150056
|
if (!team || deployment.team.id !== team.id) {
|
149600
150057
|
const err = new Error(
|
149601
|
-
team ? `Deployment doesn't belong to current team ${
|
150058
|
+
team ? `Deployment doesn't belong to current team ${import_chalk99.default.bold(
|
149602
150059
|
contextName
|
149603
150060
|
)}` : `Deployment belongs to a different team`
|
149604
150061
|
);
|
@@ -149607,7 +150064,7 @@ async function getProjectByDeployment({
|
|
149607
150064
|
}
|
149608
150065
|
} else if (team) {
|
149609
150066
|
const err = new Error(
|
149610
|
-
`Deployment doesn't belong to current team ${
|
150067
|
+
`Deployment doesn't belong to current team ${import_chalk99.default.bold(contextName)}`
|
149611
150068
|
);
|
149612
150069
|
err.code = "ERR_INVALID_TEAM";
|
149613
150070
|
throw err;
|
@@ -149628,11 +150085,11 @@ async function getProjectByDeployment({
|
|
149628
150085
|
output2?.stopSpinner();
|
149629
150086
|
}
|
149630
150087
|
}
|
149631
|
-
var
|
150088
|
+
var import_chalk99;
|
149632
150089
|
var init_get_project_by_deployment = __esm({
|
149633
150090
|
"src/util/projects/get-project-by-deployment.ts"() {
|
149634
150091
|
"use strict";
|
149635
|
-
|
150092
|
+
import_chalk99 = __toESM3(require_source());
|
149636
150093
|
init_get_deployment();
|
149637
150094
|
init_get_project_by_id_or_name();
|
149638
150095
|
init_get_scope();
|
@@ -149645,21 +150102,21 @@ var init_get_project_by_deployment = __esm({
|
|
149645
150102
|
// src/util/alias/render-alias-status.ts
|
149646
150103
|
function renderAliasStatus(status) {
|
149647
150104
|
if (status === "completed") {
|
149648
|
-
return
|
150105
|
+
return import_chalk100.default.green(status);
|
149649
150106
|
}
|
149650
150107
|
if (status === "failed") {
|
149651
|
-
return
|
150108
|
+
return import_chalk100.default.red(status);
|
149652
150109
|
}
|
149653
150110
|
if (status === "skipped") {
|
149654
|
-
return
|
150111
|
+
return import_chalk100.default.gray(status);
|
149655
150112
|
}
|
149656
|
-
return
|
150113
|
+
return import_chalk100.default.yellow(status);
|
149657
150114
|
}
|
149658
|
-
var
|
150115
|
+
var import_chalk100;
|
149659
150116
|
var init_render_alias_status = __esm({
|
149660
150117
|
"src/util/alias/render-alias-status.ts"() {
|
149661
150118
|
"use strict";
|
149662
|
-
|
150119
|
+
import_chalk100 = __toESM3(require_source());
|
149663
150120
|
}
|
149664
150121
|
});
|
149665
150122
|
|
@@ -149734,7 +150191,7 @@ async function promoteStatus({
|
|
149734
150191
|
}
|
149735
150192
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
149736
150193
|
output2.log(
|
149737
|
-
`The promotion exceeded its deadline - rerun ${
|
150194
|
+
`The promotion exceeded its deadline - rerun ${import_chalk101.default.bold(
|
149738
150195
|
`${packageName} promote ${toDeploymentId}`
|
149739
150196
|
)} to try again`
|
149740
150197
|
);
|
@@ -149800,26 +150257,26 @@ async function renderJobSucceeded({
|
|
149800
150257
|
let deploymentInfo = "";
|
149801
150258
|
try {
|
149802
150259
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
149803
|
-
deploymentInfo = `${
|
150260
|
+
deploymentInfo = `${import_chalk101.default.bold(deployment.url)} (${toDeploymentId})`;
|
149804
150261
|
} catch (err) {
|
149805
150262
|
output2.debug(
|
149806
150263
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
149807
150264
|
);
|
149808
|
-
deploymentInfo =
|
150265
|
+
deploymentInfo = import_chalk101.default.bold(toDeploymentId);
|
149809
150266
|
}
|
149810
150267
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
149811
150268
|
output2.log(
|
149812
|
-
`Success! ${
|
150269
|
+
`Success! ${import_chalk101.default.bold(
|
149813
150270
|
project.name
|
149814
150271
|
)} was promoted to ${deploymentInfo} ${duration}`
|
149815
150272
|
);
|
149816
150273
|
return 0;
|
149817
150274
|
}
|
149818
|
-
var
|
150275
|
+
var import_chalk101, import_ms22;
|
149819
150276
|
var init_status = __esm({
|
149820
150277
|
"src/commands/promote/status.ts"() {
|
149821
150278
|
"use strict";
|
149822
|
-
|
150279
|
+
import_chalk101 = __toESM3(require_source());
|
149823
150280
|
init_elapsed();
|
149824
150281
|
init_format_date();
|
149825
150282
|
init_get_deployment();
|
@@ -149862,7 +150319,7 @@ async function requestPromote({
|
|
149862
150319
|
});
|
149863
150320
|
if (timeout !== void 0 && (0, import_ms23.default)(timeout) === 0) {
|
149864
150321
|
output2.log(
|
149865
|
-
`Successfully requested promote of ${
|
150322
|
+
`Successfully requested promote of ${import_chalk102.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
149866
150323
|
);
|
149867
150324
|
output2.log(`To check promote status, run ${getCommandName("promote")}.`);
|
149868
150325
|
return 0;
|
@@ -149875,11 +150332,11 @@ async function requestPromote({
|
|
149875
150332
|
timeout
|
149876
150333
|
});
|
149877
150334
|
}
|
149878
|
-
var
|
150335
|
+
var import_chalk102, import_ms23;
|
149879
150336
|
var init_request_promote = __esm({
|
149880
150337
|
"src/commands/promote/request-promote.ts"() {
|
149881
150338
|
"use strict";
|
149882
|
-
|
150339
|
+
import_chalk102 = __toESM3(require_source());
|
149883
150340
|
init_pkg_name();
|
149884
150341
|
init_get_project_by_deployment();
|
149885
150342
|
import_ms23 = __toESM3(require_ms2());
|
@@ -150041,7 +150498,7 @@ async function getDeploymentByIdOrURL({
|
|
150041
150498
|
let team;
|
150042
150499
|
try {
|
150043
150500
|
output2.spinner(
|
150044
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
150501
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk103.default.bold(contextName)}\u2026`
|
150045
150502
|
);
|
150046
150503
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
150047
150504
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -150058,7 +150515,7 @@ async function getDeploymentByIdOrURL({
|
|
150058
150515
|
team = teamResult.value;
|
150059
150516
|
deployment = deploymentResult.value;
|
150060
150517
|
output2.log(
|
150061
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
150518
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk103.default.bold(contextName)}\u2026`
|
150062
150519
|
);
|
150063
150520
|
} finally {
|
150064
150521
|
output2.stopSpinner();
|
@@ -150066,7 +150523,7 @@ async function getDeploymentByIdOrURL({
|
|
150066
150523
|
if (deployment.team?.id) {
|
150067
150524
|
if (!team || deployment.team.id !== team.id) {
|
150068
150525
|
const err = new Error(
|
150069
|
-
team ? `Deployment doesn't belong to current team ${
|
150526
|
+
team ? `Deployment doesn't belong to current team ${import_chalk103.default.bold(
|
150070
150527
|
contextName
|
150071
150528
|
)}` : `Deployment belongs to a different team`
|
150072
150529
|
);
|
@@ -150075,18 +150532,18 @@ async function getDeploymentByIdOrURL({
|
|
150075
150532
|
}
|
150076
150533
|
} else if (team) {
|
150077
150534
|
const err = new Error(
|
150078
|
-
`Deployment doesn't belong to current team ${
|
150535
|
+
`Deployment doesn't belong to current team ${import_chalk103.default.bold(contextName)}`
|
150079
150536
|
);
|
150080
150537
|
err.code = "ERR_INVALID_TEAM";
|
150081
150538
|
throw err;
|
150082
150539
|
}
|
150083
150540
|
return deployment;
|
150084
150541
|
}
|
150085
|
-
var
|
150542
|
+
var import_chalk103;
|
150086
150543
|
var init_get_deployment_by_id_or_url = __esm({
|
150087
150544
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
150088
150545
|
"use strict";
|
150089
|
-
|
150546
|
+
import_chalk103 = __toESM3(require_source());
|
150090
150547
|
init_get_deployment();
|
150091
150548
|
init_get_team_by_id();
|
150092
150549
|
init_is_valid_name();
|
@@ -150187,14 +150644,14 @@ async function redeploy(client2) {
|
|
150187
150644
|
const previewUrl = `https://${deployment.url}`;
|
150188
150645
|
output2.print(
|
150189
150646
|
`${prependEmoji(
|
150190
|
-
`Inspect: ${
|
150647
|
+
`Inspect: ${import_chalk104.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
150191
150648
|
emoji("inspect")
|
150192
150649
|
)}
|
150193
150650
|
`
|
150194
150651
|
);
|
150195
150652
|
output2.print(
|
150196
150653
|
prependEmoji(
|
150197
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
150654
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk104.default.bold(
|
150198
150655
|
previewUrl
|
150199
150656
|
)} ${deployStamp()}`,
|
150200
150657
|
emoji("success")
|
@@ -150223,7 +150680,7 @@ async function redeploy(client2) {
|
|
150223
150680
|
token: client2.authConfig.token,
|
150224
150681
|
userAgent: ua_default
|
150225
150682
|
};
|
150226
|
-
for await (const event of (0,
|
150683
|
+
for await (const event of (0, import_client13.checkDeploymentStatus)(
|
150227
150684
|
deployment,
|
150228
150685
|
clientOptions
|
150229
150686
|
)) {
|
@@ -150264,18 +150721,18 @@ async function redeploy(client2) {
|
|
150264
150721
|
output2.prettyError(err);
|
150265
150722
|
if ((0, import_error_utils30.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
150266
150723
|
output2.error(
|
150267
|
-
`Use ${
|
150724
|
+
`Use ${import_chalk104.default.bold("vc switch")} to change your current team`
|
150268
150725
|
);
|
150269
150726
|
}
|
150270
150727
|
return 1;
|
150271
150728
|
}
|
150272
150729
|
}
|
150273
|
-
var
|
150730
|
+
var import_chalk104, import_client13, import_error_utils30;
|
150274
150731
|
var init_redeploy = __esm({
|
150275
150732
|
"src/commands/redeploy/index.ts"() {
|
150276
150733
|
"use strict";
|
150277
|
-
|
150278
|
-
|
150734
|
+
import_chalk104 = __toESM3(require_source());
|
150735
|
+
import_client13 = __toESM3(require_dist12());
|
150279
150736
|
init_emoji();
|
150280
150737
|
init_get_args();
|
150281
150738
|
init_pkg_name();
|
@@ -150484,7 +150941,7 @@ async function remove3(client2) {
|
|
150484
150941
|
}
|
150485
150942
|
const { contextName } = await getScope(client2);
|
150486
150943
|
output2.spinner(
|
150487
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
150944
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk105.default.bold(contextName)}`
|
150488
150945
|
);
|
150489
150946
|
let aliases;
|
150490
150947
|
let projects;
|
@@ -150550,12 +151007,12 @@ async function remove3(client2) {
|
|
150550
151007
|
});
|
150551
151008
|
if (deployments.length === 0 && projects.length === 0) {
|
150552
151009
|
log2(
|
150553
|
-
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) =>
|
151010
|
+
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) => import_chalk105.default.bold(`"${id}"`)).join(", ")}. Run ${getCommandName("projects ls")} to list.`
|
150554
151011
|
);
|
150555
151012
|
return 1;
|
150556
151013
|
}
|
150557
151014
|
log2(
|
150558
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
151015
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk105.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
150559
151016
|
);
|
150560
151017
|
if (deployments.length > 200) {
|
150561
151018
|
output2.warn(
|
@@ -150582,11 +151039,11 @@ async function remove3(client2) {
|
|
150582
151039
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
150583
151040
|
);
|
150584
151041
|
deployments.forEach((depl) => {
|
150585
|
-
output2.print(`${
|
151042
|
+
output2.print(`${import_chalk105.default.gray("-")} ${import_chalk105.default.bold(depl.url)}
|
150586
151043
|
`);
|
150587
151044
|
});
|
150588
151045
|
projects.forEach((project) => {
|
150589
|
-
output2.print(`${
|
151046
|
+
output2.print(`${import_chalk105.default.gray("-")} ${import_chalk105.default.bold(project.name)}
|
150590
151047
|
`);
|
150591
151048
|
});
|
150592
151049
|
return 0;
|
@@ -150603,8 +151060,8 @@ function readConfirmation4(deployments, projects, output2) {
|
|
150603
151060
|
);
|
150604
151061
|
const deploymentTable = table(
|
150605
151062
|
deployments.map((depl) => {
|
150606
|
-
const time =
|
150607
|
-
const url3 = depl.url ?
|
151063
|
+
const time = import_chalk105.default.gray(`${(0, import_ms25.default)(Date.now() - depl.createdAt)} ago`);
|
151064
|
+
const url3 = depl.url ? import_chalk105.default.underline(`https://${depl.url}`) : "";
|
150608
151065
|
return [` ${depl.id}`, url3, time];
|
150609
151066
|
}),
|
150610
151067
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -150615,7 +151072,7 @@ function readConfirmation4(deployments, projects, output2) {
|
|
150615
151072
|
for (const depl of deployments) {
|
150616
151073
|
for (const { alias: alias2 } of depl.aliases) {
|
150617
151074
|
output2.warn(
|
150618
|
-
`${
|
151075
|
+
`${import_chalk105.default.underline(`https://${alias2}`)} is an alias for ${import_chalk105.default.bold(depl.url)} and will be removed`
|
150619
151076
|
);
|
150620
151077
|
}
|
150621
151078
|
}
|
@@ -150629,12 +151086,12 @@ function readConfirmation4(deployments, projects, output2) {
|
|
150629
151086
|
`
|
150630
151087
|
);
|
150631
151088
|
for (const project of projects) {
|
150632
|
-
output2.print(`${
|
151089
|
+
output2.print(`${import_chalk105.default.gray("-")} ${import_chalk105.default.bold(project.name)}
|
150633
151090
|
`);
|
150634
151091
|
}
|
150635
151092
|
}
|
150636
151093
|
output2.print(
|
150637
|
-
`${
|
151094
|
+
`${import_chalk105.default.bold.red("> Are you sure?")} ${import_chalk105.default.gray("(y/N) ")}`
|
150638
151095
|
);
|
150639
151096
|
process.stdin.on("data", (d) => {
|
150640
151097
|
process.stdin.pause();
|
@@ -150651,11 +151108,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
150651
151108
|
}
|
150652
151109
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
150653
151110
|
}
|
150654
|
-
var
|
151111
|
+
var import_chalk105, import_ms25, import_pluralize11;
|
150655
151112
|
var init_remove = __esm({
|
150656
151113
|
"src/commands/remove/index.ts"() {
|
150657
151114
|
"use strict";
|
150658
|
-
|
151115
|
+
import_chalk105 = __toESM3(require_source());
|
150659
151116
|
import_ms25 = __toESM3(require_ms2());
|
150660
151117
|
import_pluralize11 = __toESM3(require_pluralize());
|
150661
151118
|
init_table();
|
@@ -150750,7 +151207,7 @@ async function rollbackStatus({
|
|
150750
151207
|
}
|
150751
151208
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
150752
151209
|
output2.log(
|
150753
|
-
`The rollback exceeded its deadline - rerun ${
|
151210
|
+
`The rollback exceeded its deadline - rerun ${import_chalk106.default.bold(
|
150754
151211
|
`${packageName} rollback ${toDeploymentId}`
|
150755
151212
|
)} to try again`
|
150756
151213
|
);
|
@@ -150816,26 +151273,26 @@ async function renderJobSucceeded2({
|
|
150816
151273
|
let deploymentInfo = "";
|
150817
151274
|
try {
|
150818
151275
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
150819
|
-
deploymentInfo = `${
|
151276
|
+
deploymentInfo = `${import_chalk106.default.bold(deployment.url)} (${toDeploymentId})`;
|
150820
151277
|
} catch (err) {
|
150821
151278
|
output2.debug(
|
150822
151279
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
150823
151280
|
);
|
150824
|
-
deploymentInfo =
|
151281
|
+
deploymentInfo = import_chalk106.default.bold(toDeploymentId);
|
150825
151282
|
}
|
150826
151283
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
150827
151284
|
output2.log(
|
150828
|
-
`Success! ${
|
151285
|
+
`Success! ${import_chalk106.default.bold(
|
150829
151286
|
project.name
|
150830
151287
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
150831
151288
|
);
|
150832
151289
|
return 0;
|
150833
151290
|
}
|
150834
|
-
var
|
151291
|
+
var import_chalk106, import_ms26;
|
150835
151292
|
var init_status2 = __esm({
|
150836
151293
|
"src/commands/rollback/status.ts"() {
|
150837
151294
|
"use strict";
|
150838
|
-
|
151295
|
+
import_chalk106 = __toESM3(require_source());
|
150839
151296
|
init_elapsed();
|
150840
151297
|
init_format_date();
|
150841
151298
|
init_get_deployment();
|
@@ -150868,7 +151325,7 @@ async function requestRollback({
|
|
150868
151325
|
});
|
150869
151326
|
if (timeout !== void 0 && (0, import_ms27.default)(timeout) === 0) {
|
150870
151327
|
output2.log(
|
150871
|
-
`Successfully requested rollback of ${
|
151328
|
+
`Successfully requested rollback of ${import_chalk107.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
150872
151329
|
);
|
150873
151330
|
output2.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
150874
151331
|
return 0;
|
@@ -150881,11 +151338,11 @@ async function requestRollback({
|
|
150881
151338
|
timeout
|
150882
151339
|
});
|
150883
151340
|
}
|
150884
|
-
var
|
151341
|
+
var import_chalk107, import_ms27;
|
150885
151342
|
var init_request_rollback = __esm({
|
150886
151343
|
"src/commands/rollback/request-rollback.ts"() {
|
150887
151344
|
"use strict";
|
150888
|
-
|
151345
|
+
import_chalk107 = __toESM3(require_source());
|
150889
151346
|
init_pkg_name();
|
150890
151347
|
init_get_project_by_deployment();
|
150891
151348
|
import_ms27 = __toESM3(require_ms2());
|
@@ -151033,7 +151490,7 @@ async function list4(client2, argv, args2, link4) {
|
|
151033
151490
|
const { output: output2 } = client2;
|
151034
151491
|
if (args2.length !== 0) {
|
151035
151492
|
output2.error(
|
151036
|
-
`Invalid number of arguments. Usage: ${
|
151493
|
+
`Invalid number of arguments. Usage: ${import_chalk108.default.cyan(
|
151037
151494
|
`${getCommandName("target ls")}`
|
151038
151495
|
)}`
|
151039
151496
|
);
|
@@ -151057,12 +151514,12 @@ async function list4(client2, argv, args2, link4) {
|
|
151057
151514
|
const elapsed2 = (0, import_ms29.default)(Date.now() - start);
|
151058
151515
|
result = withDefaultEnvironmentsIncluded(result);
|
151059
151516
|
output2.log(
|
151060
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
151517
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk108.default.gray(`[${elapsed2}]`)}`
|
151061
151518
|
);
|
151062
151519
|
const tablePrint = table(
|
151063
151520
|
[
|
151064
151521
|
["Target Name", "Target Slug", "Target ID", "Type", "Updated"].map(
|
151065
|
-
(header) =>
|
151522
|
+
(header) => import_chalk108.default.bold(import_chalk108.default.cyan(header))
|
151066
151523
|
),
|
151067
151524
|
...result.map((target) => {
|
151068
151525
|
const type = target.type === "production" ? "Production" : target.type === "development" ? "Development" : "Preview";
|
@@ -151077,7 +151534,7 @@ async function list4(client2, argv, args2, link4) {
|
|
151077
151534
|
target.slug,
|
151078
151535
|
target.id,
|
151079
151536
|
type,
|
151080
|
-
|
151537
|
+
import_chalk108.default.gray(
|
151081
151538
|
target.updatedAt > 0 ? (0, import_ms29.default)(Date.now() - target.updatedAt) : "-"
|
151082
151539
|
)
|
151083
151540
|
]
|
@@ -151127,12 +151584,12 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
151127
151584
|
}
|
151128
151585
|
];
|
151129
151586
|
}
|
151130
|
-
var import_ms29,
|
151587
|
+
var import_ms29, import_chalk108;
|
151131
151588
|
var init_list4 = __esm({
|
151132
151589
|
"src/commands/target/list.ts"() {
|
151133
151590
|
"use strict";
|
151134
151591
|
import_ms29 = __toESM3(require_ms2());
|
151135
|
-
|
151592
|
+
import_chalk108 = __toESM3(require_source());
|
151136
151593
|
init_table();
|
151137
151594
|
init_pkg_name();
|
151138
151595
|
init_format_project();
|
@@ -151379,7 +151836,7 @@ async function list5(client2) {
|
|
151379
151836
|
client2.stdout.write("\n");
|
151380
151837
|
const teamTable = table(
|
151381
151838
|
[
|
151382
|
-
["id", "email / name"].map((str) => (0,
|
151839
|
+
["id", "email / name"].map((str) => (0, import_chalk109.gray)(str)),
|
151383
151840
|
...teamList.map((team) => [team.value, team.name])
|
151384
151841
|
],
|
151385
151842
|
{ hsep: 5 }
|
@@ -151396,13 +151853,13 @@ async function list5(client2) {
|
|
151396
151853
|
}
|
151397
151854
|
return 0;
|
151398
151855
|
}
|
151399
|
-
var
|
151856
|
+
var import_chalk109;
|
151400
151857
|
var init_list5 = __esm({
|
151401
151858
|
"src/commands/teams/list.ts"() {
|
151402
151859
|
"use strict";
|
151403
151860
|
init_chars();
|
151404
151861
|
init_table();
|
151405
|
-
|
151862
|
+
import_chalk109 = __toESM3(require_source());
|
151406
151863
|
init_get_user();
|
151407
151864
|
init_get_teams();
|
151408
151865
|
init_pkg_name();
|
@@ -151462,7 +151919,7 @@ Please select a team scope using ${getCommandName(
|
|
151462
151919
|
return 1;
|
151463
151920
|
}
|
151464
151921
|
output2.log(
|
151465
|
-
introMsg || `Inviting team members to ${
|
151922
|
+
introMsg || `Inviting team members to ${import_chalk110.default.bold(currentTeam.name)}`
|
151466
151923
|
);
|
151467
151924
|
if (emails.length > 0) {
|
151468
151925
|
for (const email3 of emails) {
|
@@ -151481,10 +151938,10 @@ Please select a team scope using ${getCommandName(
|
|
151481
151938
|
throw err;
|
151482
151939
|
}
|
151483
151940
|
output2.log(
|
151484
|
-
`${
|
151941
|
+
`${import_chalk110.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
151485
151942
|
);
|
151486
151943
|
} else {
|
151487
|
-
output2.log(`${
|
151944
|
+
output2.log(`${import_chalk110.default.red(`\u2716 ${email3}`)} ${import_chalk110.default.gray("[invalid]")}`);
|
151488
151945
|
}
|
151489
151946
|
}
|
151490
151947
|
return 0;
|
@@ -151518,15 +151975,15 @@ Please select a team scope using ${getCommandName(
|
|
151518
151975
|
);
|
151519
151976
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
151520
151977
|
emails.push(email2);
|
151521
|
-
output2.log(`${
|
151978
|
+
output2.log(`${import_chalk110.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
151522
151979
|
if (hasError) {
|
151523
151980
|
hasError = false;
|
151524
151981
|
process.stderr.write(eraseLines(emails.length + 2));
|
151525
151982
|
output2.log(
|
151526
|
-
introMsg || `Inviting team members to ${
|
151983
|
+
introMsg || `Inviting team members to ${import_chalk110.default.bold(currentTeam.name)}`
|
151527
151984
|
);
|
151528
151985
|
for (const email3 of emails) {
|
151529
|
-
output2.log(`${
|
151986
|
+
output2.log(`${import_chalk110.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
151530
151987
|
}
|
151531
151988
|
}
|
151532
151989
|
} catch (err) {
|
@@ -151535,7 +151992,7 @@ Please select a team scope using ${getCommandName(
|
|
151535
151992
|
output2.error((0, import_error_utils32.errorToString)(err));
|
151536
151993
|
hasError = true;
|
151537
151994
|
for (const email3 of emails) {
|
151538
|
-
output2.log(`${
|
151995
|
+
output2.log(`${import_chalk110.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
151539
151996
|
}
|
151540
151997
|
}
|
151541
151998
|
}
|
@@ -151548,16 +152005,16 @@ Please select a team scope using ${getCommandName(
|
|
151548
152005
|
} else {
|
151549
152006
|
output2.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
151550
152007
|
for (const email3 of emails) {
|
151551
|
-
output2.log(`${
|
152008
|
+
output2.log(`${import_chalk110.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
151552
152009
|
}
|
151553
152010
|
}
|
151554
152011
|
return 0;
|
151555
152012
|
}
|
151556
|
-
var
|
152013
|
+
var import_chalk110, import_error_utils32, validateEmail2, domains, emailAutoComplete;
|
151557
152014
|
var init_invite = __esm({
|
151558
152015
|
"src/commands/teams/invite.ts"() {
|
151559
152016
|
"use strict";
|
151560
|
-
|
152017
|
+
import_chalk110 = __toESM3(require_source());
|
151561
152018
|
init_cmd();
|
151562
152019
|
init_stamp();
|
151563
152020
|
init_param();
|
@@ -151646,7 +152103,7 @@ async function add8(client2) {
|
|
151646
152103
|
let elapsed2;
|
151647
152104
|
const { output: output2 } = client2;
|
151648
152105
|
output2.log(
|
151649
|
-
`Pick a team identifier for its URL (e.g.: ${
|
152106
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk111.default.cyan(
|
151650
152107
|
"`vercel.com/acme`"
|
151651
152108
|
)})`
|
151652
152109
|
);
|
@@ -151679,7 +152136,7 @@ async function add8(client2) {
|
|
151679
152136
|
output2.stopSpinner();
|
151680
152137
|
process.stdout.write(eraseLines(2));
|
151681
152138
|
output2.success(`Team created ${elapsed2()}`);
|
151682
|
-
output2.log(`${
|
152139
|
+
output2.log(`${import_chalk111.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
151683
152140
|
`);
|
151684
152141
|
output2.log("Pick a display name for your team");
|
151685
152142
|
let name;
|
@@ -151702,7 +152159,7 @@ async function add8(client2) {
|
|
151702
152159
|
process.stdout.write(eraseLines(2));
|
151703
152160
|
team = Object.assign(team, res);
|
151704
152161
|
output2.success(`Team name saved ${elapsed2()}`);
|
151705
|
-
output2.log(`${
|
152162
|
+
output2.log(`${import_chalk111.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
151706
152163
|
`);
|
151707
152164
|
output2.spinner("Saving");
|
151708
152165
|
client2.config.currentTeam = team.id;
|
@@ -151716,11 +152173,11 @@ async function add8(client2) {
|
|
151716
152173
|
});
|
151717
152174
|
return 0;
|
151718
152175
|
}
|
151719
|
-
var
|
152176
|
+
var import_chalk111, import_error_utils33, validateSlugKeypress, validateNameKeypress, teamUrlPrefix, teamNamePrefix;
|
151720
152177
|
var init_add7 = __esm({
|
151721
152178
|
"src/commands/teams/add.ts"() {
|
151722
152179
|
"use strict";
|
151723
|
-
|
152180
|
+
import_chalk111 = __toESM3(require_source());
|
151724
152181
|
init_stamp();
|
151725
152182
|
init_erase_lines();
|
151726
152183
|
init_chars();
|
@@ -151741,7 +152198,7 @@ var init_add7 = __esm({
|
|
151741
152198
|
// should be fixed on utils/input/text.js
|
151742
152199
|
/^[ a-zA-Z0-9_-]+$/.test(value + data)
|
151743
152200
|
);
|
151744
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
152201
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk111.default.gray("vercel.com/");
|
151745
152202
|
teamNamePrefix = "Team Name".padEnd(14);
|
151746
152203
|
}
|
151747
152204
|
});
|
@@ -151764,7 +152221,7 @@ async function main13(client2, desiredSlug) {
|
|
151764
152221
|
let title7 = `${team.name} (${team.slug})`;
|
151765
152222
|
const selected = team.id === currentTeam?.id;
|
151766
152223
|
if (selected) {
|
151767
|
-
title7 += ` ${
|
152224
|
+
title7 += ` ${import_chalk112.default.bold("(current)")}`;
|
151768
152225
|
}
|
151769
152226
|
if (team.limited) {
|
151770
152227
|
title7 += ` ${emoji("locked")}`;
|
@@ -151776,7 +152233,7 @@ async function main13(client2, desiredSlug) {
|
|
151776
152233
|
selected
|
151777
152234
|
};
|
151778
152235
|
});
|
151779
|
-
let suffix = personalScopeSelected ? ` ${
|
152236
|
+
let suffix = personalScopeSelected ? ` ${import_chalk112.default.bold("(current)")}` : "";
|
151780
152237
|
if (user.limited) {
|
151781
152238
|
suffix += ` ${emoji("locked")}`;
|
151782
152239
|
}
|
@@ -151822,14 +152279,14 @@ async function main13(client2, desiredSlug) {
|
|
151822
152279
|
}
|
151823
152280
|
updateCurrentTeam(config2);
|
151824
152281
|
output2.success(
|
151825
|
-
`Your account (${
|
152282
|
+
`Your account (${import_chalk112.default.bold(user.username)}) is now active!`
|
151826
152283
|
);
|
151827
152284
|
return 0;
|
151828
152285
|
}
|
151829
152286
|
const newTeam = teams.find((team) => team.slug === desiredSlug);
|
151830
152287
|
if (!newTeam) {
|
151831
152288
|
output2.error(
|
151832
|
-
`You do not have permission to access scope ${
|
152289
|
+
`You do not have permission to access scope ${import_chalk112.default.bold(desiredSlug)}.`
|
151833
152290
|
);
|
151834
152291
|
return 1;
|
151835
152292
|
}
|
@@ -151847,15 +152304,15 @@ async function main13(client2, desiredSlug) {
|
|
151847
152304
|
}
|
151848
152305
|
updateCurrentTeam(config2, newTeam);
|
151849
152306
|
output2.success(
|
151850
|
-
`The team ${
|
152307
|
+
`The team ${import_chalk112.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
151851
152308
|
);
|
151852
152309
|
return 0;
|
151853
152310
|
}
|
151854
|
-
var
|
152311
|
+
var import_chalk112, updateCurrentTeam;
|
151855
152312
|
var init_switch = __esm({
|
151856
152313
|
"src/commands/teams/switch.ts"() {
|
151857
152314
|
"use strict";
|
151858
|
-
|
152315
|
+
import_chalk112 = __toESM3(require_source());
|
151859
152316
|
init_emoji();
|
151860
152317
|
init_get_user();
|
151861
152318
|
init_get_teams();
|
@@ -152019,7 +152476,7 @@ var import_error_utils34 = __toESM3(require_dist2());
|
|
152019
152476
|
var import_path43 = require("path");
|
152020
152477
|
var import_fs9 = require("fs");
|
152021
152478
|
var import_fs_extra23 = __toESM3(require_lib());
|
152022
|
-
var
|
152479
|
+
var import_chalk113 = __toESM3(require_source());
|
152023
152480
|
var import_epipebomb = __toESM3(require_epipebomb());
|
152024
152481
|
|
152025
152482
|
// src/util/get-latest-version/index.ts
|
@@ -152820,13 +153277,13 @@ var main14 = async () => {
|
|
152820
153277
|
const betaCommands = [];
|
152821
153278
|
if (betaCommands.includes(targetOrSubcommand)) {
|
152822
153279
|
output.print(
|
152823
|
-
`${
|
153280
|
+
`${import_chalk113.default.grey(
|
152824
153281
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
152825
153282
|
)}
|
152826
153283
|
`
|
152827
153284
|
);
|
152828
153285
|
} else {
|
152829
|
-
output.print(`${
|
153286
|
+
output.print(`${import_chalk113.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
152830
153287
|
`);
|
152831
153288
|
}
|
152832
153289
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
@@ -153277,20 +153734,20 @@ main14().then(async (exitCode2) => {
|
|
153277
153734
|
});
|
153278
153735
|
if (latest) {
|
153279
153736
|
const changelog = "https://github.com/vercel/vercel/releases";
|
153280
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
153737
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk113.default.magenta(
|
153281
153738
|
`
|
153282
153739
|
|
153283
|
-
The latest update ${
|
153740
|
+
The latest update ${import_chalk113.default.italic(
|
153284
153741
|
"may"
|
153285
153742
|
)} fix any errors that occurred.`
|
153286
153743
|
) : "";
|
153287
153744
|
output.print(
|
153288
153745
|
box(
|
153289
|
-
`Update available! ${
|
153746
|
+
`Update available! ${import_chalk113.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk113.default.green(
|
153290
153747
|
`v${latest}`
|
153291
153748
|
)}
|
153292
153749
|
Changelog: ${output.link(changelog, changelog, { fallback: false })}
|
153293
|
-
Run ${
|
153750
|
+
Run ${import_chalk113.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
153294
153751
|
)
|
153295
153752
|
);
|
153296
153753
|
output.print("\n\n");
|