vercel 37.5.3 → 37.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +853 -911
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -4019,7 +4019,7 @@ var require_templates = __commonJS2({
|
|
4019
4019
|
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
4020
4020
|
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
4021
4021
|
var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
4022
|
-
var
|
4022
|
+
var ESCAPES = /* @__PURE__ */ new Map([
|
4023
4023
|
["n", "\n"],
|
4024
4024
|
["r", "\r"],
|
4025
4025
|
["t", " "],
|
@@ -4040,7 +4040,7 @@ var require_templates = __commonJS2({
|
|
4040
4040
|
if (u && bracket) {
|
4041
4041
|
return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
|
4042
4042
|
}
|
4043
|
-
return
|
4043
|
+
return ESCAPES.get(c) || c;
|
4044
4044
|
}
|
4045
4045
|
function parseArguments2(name, arguments_) {
|
4046
4046
|
const results = [];
|
@@ -4073,14 +4073,14 @@ var require_templates = __commonJS2({
|
|
4073
4073
|
}
|
4074
4074
|
return results;
|
4075
4075
|
}
|
4076
|
-
function buildStyle(
|
4076
|
+
function buildStyle(chalk108, 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 = chalk108;
|
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 = (chalk108, 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(chalk108, 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(chalk108, 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 chalk109 = {};
|
4160
|
+
applyOptions(chalk109, options);
|
4161
|
+
chalk109.template = (...arguments_) => chalkTag(chalk109.template, ...arguments_);
|
4162
|
+
Object.setPrototypeOf(chalk109, Chalk3.prototype);
|
4163
|
+
Object.setPrototypeOf(chalk109.template, chalk109);
|
4164
|
+
chalk109.template.constructor = () => {
|
4165
4165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4166
4166
|
};
|
4167
|
-
|
4168
|
-
return
|
4167
|
+
chalk109.template.Instance = ChalkClass;
|
4168
|
+
return chalk109.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 = (chalk109, ...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(chalk109, parts.join(""));
|
4296
4296
|
};
|
4297
4297
|
Object.defineProperties(Chalk3.prototype, styles);
|
4298
|
-
var
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
module2.exports =
|
4298
|
+
var chalk108 = Chalk3();
|
4299
|
+
chalk108.supportsColor = stdoutColor;
|
4300
|
+
chalk108.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
4301
|
+
chalk108.stderr.supportsColor = stderrColor;
|
4302
|
+
module2.exports = chalk108;
|
4303
4303
|
}
|
4304
4304
|
});
|
4305
4305
|
|
@@ -11933,14 +11933,14 @@ var init_pkg = __esm({
|
|
11933
11933
|
var require_ansi_escapes = __commonJS2({
|
11934
11934
|
"../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports2, module2) {
|
11935
11935
|
"use strict";
|
11936
|
-
var
|
11937
|
-
module2.exports.default =
|
11936
|
+
var ansiEscapes6 = module2.exports;
|
11937
|
+
module2.exports.default = ansiEscapes6;
|
11938
11938
|
var ESC = "\x1B[";
|
11939
11939
|
var OSC = "\x1B]";
|
11940
11940
|
var BEL = "\x07";
|
11941
11941
|
var SEP = ";";
|
11942
11942
|
var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
|
11943
|
-
|
11943
|
+
ansiEscapes6.cursorTo = (x, y) => {
|
11944
11944
|
if (typeof x !== "number") {
|
11945
11945
|
throw new TypeError("The `x` argument is required");
|
11946
11946
|
}
|
@@ -11949,7 +11949,7 @@ var require_ansi_escapes = __commonJS2({
|
|
11949
11949
|
}
|
11950
11950
|
return ESC + (y + 1) + ";" + (x + 1) + "H";
|
11951
11951
|
};
|
11952
|
-
|
11952
|
+
ansiEscapes6.cursorMove = (x, y) => {
|
11953
11953
|
if (typeof x !== "number") {
|
11954
11954
|
throw new TypeError("The `x` argument is required");
|
11955
11955
|
}
|
@@ -11966,46 +11966,46 @@ var require_ansi_escapes = __commonJS2({
|
|
11966
11966
|
}
|
11967
11967
|
return ret;
|
11968
11968
|
};
|
11969
|
-
|
11970
|
-
|
11971
|
-
|
11972
|
-
|
11973
|
-
|
11974
|
-
|
11975
|
-
|
11976
|
-
|
11977
|
-
|
11978
|
-
|
11979
|
-
|
11980
|
-
|
11981
|
-
|
11969
|
+
ansiEscapes6.cursorUp = (count = 1) => ESC + count + "A";
|
11970
|
+
ansiEscapes6.cursorDown = (count = 1) => ESC + count + "B";
|
11971
|
+
ansiEscapes6.cursorForward = (count = 1) => ESC + count + "C";
|
11972
|
+
ansiEscapes6.cursorBackward = (count = 1) => ESC + count + "D";
|
11973
|
+
ansiEscapes6.cursorLeft = ESC + "G";
|
11974
|
+
ansiEscapes6.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
|
11975
|
+
ansiEscapes6.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
|
11976
|
+
ansiEscapes6.cursorGetPosition = ESC + "6n";
|
11977
|
+
ansiEscapes6.cursorNextLine = ESC + "E";
|
11978
|
+
ansiEscapes6.cursorPrevLine = ESC + "F";
|
11979
|
+
ansiEscapes6.cursorHide = ESC + "?25l";
|
11980
|
+
ansiEscapes6.cursorShow = ESC + "?25h";
|
11981
|
+
ansiEscapes6.eraseLines = (count) => {
|
11982
11982
|
let clear = "";
|
11983
11983
|
for (let i = 0; i < count; i++) {
|
11984
|
-
clear +=
|
11984
|
+
clear += ansiEscapes6.eraseLine + (i < count - 1 ? ansiEscapes6.cursorUp() : "");
|
11985
11985
|
}
|
11986
11986
|
if (count) {
|
11987
|
-
clear +=
|
11987
|
+
clear += ansiEscapes6.cursorLeft;
|
11988
11988
|
}
|
11989
11989
|
return clear;
|
11990
11990
|
};
|
11991
|
-
|
11992
|
-
|
11993
|
-
|
11994
|
-
|
11995
|
-
|
11996
|
-
|
11997
|
-
|
11998
|
-
|
11999
|
-
|
12000
|
-
|
11991
|
+
ansiEscapes6.eraseEndLine = ESC + "K";
|
11992
|
+
ansiEscapes6.eraseStartLine = ESC + "1K";
|
11993
|
+
ansiEscapes6.eraseLine = ESC + "2K";
|
11994
|
+
ansiEscapes6.eraseDown = ESC + "J";
|
11995
|
+
ansiEscapes6.eraseUp = ESC + "1J";
|
11996
|
+
ansiEscapes6.eraseScreen = ESC + "2J";
|
11997
|
+
ansiEscapes6.scrollUp = ESC + "S";
|
11998
|
+
ansiEscapes6.scrollDown = ESC + "T";
|
11999
|
+
ansiEscapes6.clearScreen = "\x1Bc";
|
12000
|
+
ansiEscapes6.clearTerminal = process.platform === "win32" ? `${ansiEscapes6.eraseScreen}${ESC}0f` : (
|
12001
12001
|
// 1. Erases the screen (Only done in case `2` is not supported)
|
12002
12002
|
// 2. Erases the whole screen including scrollback buffer
|
12003
12003
|
// 3. Moves cursor to the top-left position
|
12004
12004
|
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
12005
|
-
`${
|
12005
|
+
`${ansiEscapes6.eraseScreen}${ESC}3J${ESC}H`
|
12006
12006
|
);
|
12007
|
-
|
12008
|
-
|
12007
|
+
ansiEscapes6.beep = BEL;
|
12008
|
+
ansiEscapes6.link = (text, url3) => {
|
12009
12009
|
return [
|
12010
12010
|
OSC,
|
12011
12011
|
"8",
|
@@ -12013,7 +12013,7 @@ var require_ansi_escapes = __commonJS2({
|
|
12013
12013
|
SEP,
|
12014
12014
|
url3,
|
12015
12015
|
BEL,
|
12016
|
-
|
12016
|
+
text,
|
12017
12017
|
OSC,
|
12018
12018
|
"8",
|
12019
12019
|
SEP,
|
@@ -12021,7 +12021,7 @@ var require_ansi_escapes = __commonJS2({
|
|
12021
12021
|
BEL
|
12022
12022
|
].join("");
|
12023
12023
|
};
|
12024
|
-
|
12024
|
+
ansiEscapes6.image = (buffer, options = {}) => {
|
12025
12025
|
let ret = `${OSC}1337;File=inline=1`;
|
12026
12026
|
if (options.width) {
|
12027
12027
|
ret += `;width=${options.width}`;
|
@@ -12034,7 +12034,7 @@ var require_ansi_escapes = __commonJS2({
|
|
12034
12034
|
}
|
12035
12035
|
return ret + ":" + buffer.toString("base64") + BEL;
|
12036
12036
|
};
|
12037
|
-
|
12037
|
+
ansiEscapes6.iTerm = {
|
12038
12038
|
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
12039
12039
|
annotation: (message2, options = {}) => {
|
12040
12040
|
let ret = `${OSC}1337;`;
|
@@ -13430,7 +13430,7 @@ var require_templates2 = __commonJS2({
|
|
13430
13430
|
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
13431
13431
|
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
13432
13432
|
var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
|
13433
|
-
var
|
13433
|
+
var ESCAPES = /* @__PURE__ */ new Map([
|
13434
13434
|
["n", "\n"],
|
13435
13435
|
["r", "\r"],
|
13436
13436
|
["t", " "],
|
@@ -13446,7 +13446,7 @@ var require_templates2 = __commonJS2({
|
|
13446
13446
|
if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
|
13447
13447
|
return String.fromCharCode(parseInt(c.slice(1), 16));
|
13448
13448
|
}
|
13449
|
-
return
|
13449
|
+
return ESCAPES.get(c) || c;
|
13450
13450
|
}
|
13451
13451
|
function parseArguments2(name, args2) {
|
13452
13452
|
const results = [];
|
@@ -13478,14 +13478,14 @@ var require_templates2 = __commonJS2({
|
|
13478
13478
|
}
|
13479
13479
|
return results;
|
13480
13480
|
}
|
13481
|
-
function buildStyle(
|
13481
|
+
function buildStyle(chalk108, 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 = chalk108;
|
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 = (chalk108, 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(chalk108, 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(chalk108, 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 chalk108 = {};
|
13557
|
+
applyOptions(chalk108, options);
|
13558
|
+
chalk108.template = function() {
|
13559
13559
|
const args2 = [].slice.call(arguments);
|
13560
|
-
return chalkTag.apply(null, [
|
13560
|
+
return chalkTag.apply(null, [chalk108.template].concat(args2));
|
13561
13561
|
};
|
13562
|
-
Object.setPrototypeOf(
|
13563
|
-
Object.setPrototypeOf(
|
13564
|
-
|
13565
|
-
return
|
13562
|
+
Object.setPrototypeOf(chalk108, Chalk3.prototype);
|
13563
|
+
Object.setPrototypeOf(chalk108.template, chalk108);
|
13564
|
+
chalk108.template.constructor = Chalk3;
|
13565
|
+
return chalk108.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(chalk108, 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(chalk108, 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 chalk108 = 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: chalk108.blue("\u2139"),
|
15495
|
+
success: chalk108.green("\u2714"),
|
15496
|
+
warning: chalk108.yellow("\u26A0"),
|
15497
|
+
error: chalk108.red("\u2716")
|
15498
15498
|
};
|
15499
15499
|
var fallbacks = {
|
15500
|
-
info:
|
15501
|
-
success:
|
15502
|
-
warning:
|
15503
|
-
error:
|
15500
|
+
info: chalk108.blue("i"),
|
15501
|
+
success: chalk108.green("\u221A"),
|
15502
|
+
warning: chalk108.yellow("\u203C"),
|
15503
|
+
error: chalk108.red("\xD7")
|
15504
15504
|
};
|
15505
15505
|
module2.exports = isSupported ? main15 : fallbacks;
|
15506
15506
|
}
|
@@ -15527,10 +15527,10 @@ var require_ansi_regex = __commonJS2({
|
|
15527
15527
|
var require_strip_ansi = __commonJS2({
|
15528
15528
|
"../../node_modules/.pnpm/strip-ansi@5.2.0/node_modules/strip-ansi/index.js"(exports2, module2) {
|
15529
15529
|
"use strict";
|
15530
|
-
var
|
15531
|
-
var
|
15532
|
-
module2.exports =
|
15533
|
-
module2.exports.default =
|
15530
|
+
var ansiRegex = require_ansi_regex();
|
15531
|
+
var stripAnsi5 = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
15532
|
+
module2.exports = stripAnsi5;
|
15533
|
+
module2.exports.default = stripAnsi5;
|
15534
15534
|
}
|
15535
15535
|
});
|
15536
15536
|
|
@@ -15896,11 +15896,11 @@ 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 chalk108 = require_chalk();
|
15900
15900
|
var cliCursor = require_cli_cursor();
|
15901
15901
|
var cliSpinners = require_cli_spinners();
|
15902
15902
|
var logSymbols = require_log_symbols();
|
15903
|
-
var
|
15903
|
+
var stripAnsi5 = require_strip_ansi();
|
15904
15904
|
var wcwidth = require_wcwidth();
|
15905
15905
|
var TEXT = Symbol("text");
|
15906
15906
|
var PREFIX_TEXT = Symbol("prefixText");
|
@@ -15969,7 +15969,7 @@ var require_ora = __commonJS2({
|
|
15969
15969
|
updateLineCount() {
|
15970
15970
|
const columns = this.stream.columns || 80;
|
15971
15971
|
const fullPrefixText = typeof this[PREFIX_TEXT] === "string" ? this[PREFIX_TEXT] + "-" : "";
|
15972
|
-
this.lineCount =
|
15972
|
+
this.lineCount = stripAnsi5(fullPrefixText + "--" + this[TEXT]).split("\n").reduce((count, line) => {
|
15973
15973
|
return count + Math.max(1, Math.ceil(wcwidth(line) / columns));
|
15974
15974
|
}, 0);
|
15975
15975
|
}
|
@@ -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 = chalk108[this.color](frame);
|
15989
15989
|
}
|
15990
15990
|
this.frameIndex = ++this.frameIndex % frames.length;
|
15991
15991
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
@@ -16012,9 +16012,9 @@ var require_ora = __commonJS2({
|
|
16012
16012
|
this.linesToClear = this.lineCount;
|
16013
16013
|
return this;
|
16014
16014
|
}
|
16015
|
-
start(
|
16016
|
-
if (
|
16017
|
-
this.text =
|
16015
|
+
start(text) {
|
16016
|
+
if (text) {
|
16017
|
+
this.text = text;
|
16018
16018
|
}
|
16019
16019
|
if (!this.isEnabled) {
|
16020
16020
|
this.stream.write(`- ${this.text}
|
@@ -16044,23 +16044,23 @@ var require_ora = __commonJS2({
|
|
16044
16044
|
}
|
16045
16045
|
return this;
|
16046
16046
|
}
|
16047
|
-
succeed(
|
16048
|
-
return this.stopAndPersist({ symbol: logSymbols.success, text
|
16047
|
+
succeed(text) {
|
16048
|
+
return this.stopAndPersist({ symbol: logSymbols.success, text });
|
16049
16049
|
}
|
16050
|
-
fail(
|
16051
|
-
return this.stopAndPersist({ symbol: logSymbols.error, text
|
16050
|
+
fail(text) {
|
16051
|
+
return this.stopAndPersist({ symbol: logSymbols.error, text });
|
16052
16052
|
}
|
16053
|
-
warn(
|
16054
|
-
return this.stopAndPersist({ symbol: logSymbols.warning, text
|
16053
|
+
warn(text) {
|
16054
|
+
return this.stopAndPersist({ symbol: logSymbols.warning, text });
|
16055
16055
|
}
|
16056
|
-
info(
|
16057
|
-
return this.stopAndPersist({ symbol: logSymbols.info, text
|
16056
|
+
info(text) {
|
16057
|
+
return this.stopAndPersist({ symbol: logSymbols.info, text });
|
16058
16058
|
}
|
16059
16059
|
stopAndPersist(options = {}) {
|
16060
16060
|
const prefixText = options.prefixText || this.prefixText;
|
16061
16061
|
const fullPrefixText = typeof prefixText === "string" ? prefixText + " " : "";
|
16062
|
-
const
|
16063
|
-
const fullText = typeof
|
16062
|
+
const text = options.text || this.text;
|
16063
|
+
const fullText = typeof text === "string" ? " " + text : "";
|
16064
16064
|
this.stop();
|
16065
16065
|
this.stream.write(`${fullPrefixText}${options.symbol || " "}${fullText}
|
16066
16066
|
`);
|
@@ -16135,8 +16135,8 @@ var init_emoji = __esm({
|
|
16135
16135
|
});
|
16136
16136
|
|
16137
16137
|
// src/util/output/cmd.ts
|
16138
|
-
function cmd(
|
16139
|
-
return `${import_chalk4.default.gray("`")}${import_chalk4.default.cyan(
|
16138
|
+
function cmd(text) {
|
16139
|
+
return `${import_chalk4.default.gray("`")}${import_chalk4.default.cyan(text)}${import_chalk4.default.gray("`")}`;
|
16140
16140
|
}
|
16141
16141
|
var import_chalk4;
|
16142
16142
|
var init_cmd = __esm({
|
@@ -16169,8 +16169,8 @@ var init_error = __esm({
|
|
16169
16169
|
});
|
16170
16170
|
|
16171
16171
|
// src/util/output/param.ts
|
16172
|
-
function param(
|
16173
|
-
return `${import_chalk6.default.gray('"')}${import_chalk6.default.bold(
|
16172
|
+
function param(text) {
|
16173
|
+
return `${import_chalk6.default.gray('"')}${import_chalk6.default.bold(text)}${import_chalk6.default.gray('"')}`;
|
16174
16174
|
}
|
16175
16175
|
var import_chalk6;
|
16176
16176
|
var init_param = __esm({
|
@@ -16181,8 +16181,8 @@ var init_param = __esm({
|
|
16181
16181
|
});
|
16182
16182
|
|
16183
16183
|
// src/util/output/highlight.ts
|
16184
|
-
function highlight(
|
16185
|
-
return import_chalk7.default.bold.underline(
|
16184
|
+
function highlight(text) {
|
16185
|
+
return import_chalk7.default.bold.underline(text);
|
16186
16186
|
}
|
16187
16187
|
var import_chalk7;
|
16188
16188
|
var init_highlight = __esm({
|
@@ -17711,7 +17711,7 @@ var require_templates3 = __commonJS2({
|
|
17711
17711
|
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
17712
17712
|
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
17713
17713
|
var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
17714
|
-
var
|
17714
|
+
var ESCAPES = /* @__PURE__ */ new Map([
|
17715
17715
|
["n", "\n"],
|
17716
17716
|
["r", "\r"],
|
17717
17717
|
["t", " "],
|
@@ -17732,7 +17732,7 @@ var require_templates3 = __commonJS2({
|
|
17732
17732
|
if (u && bracket) {
|
17733
17733
|
return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
|
17734
17734
|
}
|
17735
|
-
return
|
17735
|
+
return ESCAPES.get(c) || c;
|
17736
17736
|
}
|
17737
17737
|
function parseArguments2(name, arguments_) {
|
17738
17738
|
const results = [];
|
@@ -17765,14 +17765,14 @@ var require_templates3 = __commonJS2({
|
|
17765
17765
|
}
|
17766
17766
|
return results;
|
17767
17767
|
}
|
17768
|
-
function buildStyle(
|
17768
|
+
function buildStyle(chalk108, 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 = chalk108;
|
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 = (chalk108, 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(chalk108, 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(chalk108, 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 chalk109 = {};
|
17852
|
+
applyOptions(chalk109, options);
|
17853
|
+
chalk109.template = (...arguments_) => chalkTag(chalk109.template, ...arguments_);
|
17854
|
+
Object.setPrototypeOf(chalk109, Chalk3.prototype);
|
17855
|
+
Object.setPrototypeOf(chalk109.template, chalk109);
|
17856
|
+
chalk109.template.constructor = () => {
|
17857
17857
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
17858
17858
|
};
|
17859
|
-
|
17860
|
-
return
|
17859
|
+
chalk109.template.Instance = ChalkClass;
|
17860
|
+
return chalk109.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 = (chalk109, ...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(chalk109, parts.join(""));
|
17988
17988
|
};
|
17989
17989
|
Object.defineProperties(Chalk3.prototype, styles);
|
17990
|
-
var
|
17991
|
-
|
17992
|
-
|
17993
|
-
|
17994
|
-
module2.exports =
|
17990
|
+
var chalk108 = Chalk3();
|
17991
|
+
chalk108.supportsColor = stdoutColor;
|
17992
|
+
chalk108.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
17993
|
+
chalk108.stderr.supportsColor = stderrColor;
|
17994
|
+
module2.exports = chalk108;
|
17995
17995
|
}
|
17996
17996
|
});
|
17997
17997
|
|
@@ -19655,11 +19655,11 @@ var init_theme = __esm({
|
|
19655
19655
|
style: {
|
19656
19656
|
answer: import_chalk10.default.cyan,
|
19657
19657
|
message: import_chalk10.default.bold,
|
19658
|
-
error: (
|
19659
|
-
defaultAnswer: (
|
19658
|
+
error: (text) => import_chalk10.default.red(`> ${text}`),
|
19659
|
+
defaultAnswer: (text) => import_chalk10.default.dim(`(${text})`),
|
19660
19660
|
help: import_chalk10.default.dim,
|
19661
19661
|
highlight: import_chalk10.default.cyan,
|
19662
|
-
key: (
|
19662
|
+
key: (text) => import_chalk10.default.cyan.bold(`<${text}>`)
|
19663
19663
|
}
|
19664
19664
|
};
|
19665
19665
|
}
|
@@ -19816,8 +19816,8 @@ var require_ansi_regex2 = __commonJS2({
|
|
19816
19816
|
var require_strip_ansi2 = __commonJS2({
|
19817
19817
|
"../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports2, module2) {
|
19818
19818
|
"use strict";
|
19819
|
-
var
|
19820
|
-
module2.exports = (string) => typeof string === "string" ? string.replace(
|
19819
|
+
var ansiRegex = require_ansi_regex2();
|
19820
|
+
module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
19821
19821
|
}
|
19822
19822
|
});
|
19823
19823
|
|
@@ -19868,14 +19868,14 @@ var require_emoji_regex = __commonJS2({
|
|
19868
19868
|
var require_string_width = __commonJS2({
|
19869
19869
|
"../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports2, module2) {
|
19870
19870
|
"use strict";
|
19871
|
-
var
|
19871
|
+
var stripAnsi5 = require_strip_ansi2();
|
19872
19872
|
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
19873
19873
|
var emojiRegex = require_emoji_regex();
|
19874
19874
|
var stringWidth = (string) => {
|
19875
19875
|
if (typeof string !== "string" || string.length === 0) {
|
19876
19876
|
return 0;
|
19877
19877
|
}
|
19878
|
-
string =
|
19878
|
+
string = stripAnsi5(string);
|
19879
19879
|
if (string.length === 0) {
|
19880
19880
|
return 0;
|
19881
19881
|
}
|
@@ -19906,19 +19906,19 @@ var require_wrap_ansi = __commonJS2({
|
|
19906
19906
|
"../../node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports2, module2) {
|
19907
19907
|
"use strict";
|
19908
19908
|
var stringWidth = require_string_width();
|
19909
|
-
var
|
19909
|
+
var stripAnsi5 = require_strip_ansi2();
|
19910
19910
|
var ansiStyles = require_ansi_styles();
|
19911
|
-
var
|
19911
|
+
var ESCAPES = /* @__PURE__ */ new Set([
|
19912
19912
|
"\x1B",
|
19913
19913
|
"\x9B"
|
19914
19914
|
]);
|
19915
19915
|
var END_CODE = 39;
|
19916
|
-
var wrapAnsi2 = (code2) => `${
|
19916
|
+
var wrapAnsi2 = (code2) => `${ESCAPES.values().next().value}[${code2}m`;
|
19917
19917
|
var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
19918
19918
|
var wrapWord = (rows, word, columns) => {
|
19919
19919
|
const characters = [...word];
|
19920
19920
|
let isInsideEscape = false;
|
19921
|
-
let visible = stringWidth(
|
19921
|
+
let visible = stringWidth(stripAnsi5(rows[rows.length - 1]));
|
19922
19922
|
for (const [index, character] of characters.entries()) {
|
19923
19923
|
const characterLength = stringWidth(character);
|
19924
19924
|
if (visible + characterLength <= columns) {
|
@@ -19927,7 +19927,7 @@ var require_wrap_ansi = __commonJS2({
|
|
19927
19927
|
rows.push(character);
|
19928
19928
|
visible = 0;
|
19929
19929
|
}
|
19930
|
-
if (
|
19930
|
+
if (ESCAPES.has(character)) {
|
19931
19931
|
isInsideEscape = true;
|
19932
19932
|
} else if (isInsideEscape && character === "m") {
|
19933
19933
|
isInsideEscape = false;
|
@@ -20013,7 +20013,7 @@ var require_wrap_ansi = __commonJS2({
|
|
20013
20013
|
pre = rows.join("\n");
|
20014
20014
|
for (const [index, character] of [...pre].entries()) {
|
20015
20015
|
ret += character;
|
20016
|
-
if (
|
20016
|
+
if (ESCAPES.has(character)) {
|
20017
20017
|
const code3 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
|
20018
20018
|
escapeCode = code3 === END_CODE ? null : code3;
|
20019
20019
|
}
|
@@ -20967,7 +20967,7 @@ var init_esm3 = __esm({
|
|
20967
20967
|
cursor: import_figures2.default.pointer
|
20968
20968
|
},
|
20969
20969
|
style: {
|
20970
|
-
disabledChoice: (
|
20970
|
+
disabledChoice: (text) => import_chalk12.default.dim(`- ${text}`),
|
20971
20971
|
renderSelectedChoices: (selectedChoices) => selectedChoices.map((choice) => choice.name || choice.value).join(", ")
|
20972
20972
|
}
|
20973
20973
|
};
|
@@ -21288,7 +21288,7 @@ var init_esm7 = __esm({
|
|
21288
21288
|
import_ansi_escapes4 = __toESM3(require_ansi_escapes(), 1);
|
21289
21289
|
selectTheme = {
|
21290
21290
|
icon: { cursor: import_figures3.default.pointer },
|
21291
|
-
style: { disabled: (
|
21291
|
+
style: { disabled: (text) => import_chalk14.default.dim(`- ${text}`) }
|
21292
21292
|
};
|
21293
21293
|
esm_default5 = createPrompt((config2, done) => {
|
21294
21294
|
const { choices: items, loop = true, pageSize = 7 } = config2;
|
@@ -23863,7 +23863,7 @@ var require_lib7 = __commonJS2({
|
|
23863
23863
|
Body.Promise = global.Promise;
|
23864
23864
|
var invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
|
23865
23865
|
var invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
|
23866
|
-
function
|
23866
|
+
function validateName2(name) {
|
23867
23867
|
name = `${name}`;
|
23868
23868
|
if (invalidTokenRegex.test(name) || name === "") {
|
23869
23869
|
throw new TypeError(`${name} is not a legal HTTP header name`);
|
@@ -23944,7 +23944,7 @@ var require_lib7 = __commonJS2({
|
|
23944
23944
|
*/
|
23945
23945
|
get(name) {
|
23946
23946
|
name = `${name}`;
|
23947
|
-
|
23947
|
+
validateName2(name);
|
23948
23948
|
const key = find(this[MAP], name);
|
23949
23949
|
if (key === void 0) {
|
23950
23950
|
return null;
|
@@ -23980,7 +23980,7 @@ var require_lib7 = __commonJS2({
|
|
23980
23980
|
set(name, value) {
|
23981
23981
|
name = `${name}`;
|
23982
23982
|
value = `${value}`;
|
23983
|
-
|
23983
|
+
validateName2(name);
|
23984
23984
|
validateValue(value);
|
23985
23985
|
const key = find(this[MAP], name);
|
23986
23986
|
this[MAP][key !== void 0 ? key : name] = [value];
|
@@ -23995,7 +23995,7 @@ var require_lib7 = __commonJS2({
|
|
23995
23995
|
append(name, value) {
|
23996
23996
|
name = `${name}`;
|
23997
23997
|
value = `${value}`;
|
23998
|
-
|
23998
|
+
validateName2(name);
|
23999
23999
|
validateValue(value);
|
24000
24000
|
const key = find(this[MAP], name);
|
24001
24001
|
if (key !== void 0) {
|
@@ -24012,7 +24012,7 @@ var require_lib7 = __commonJS2({
|
|
24012
24012
|
*/
|
24013
24013
|
has(name) {
|
24014
24014
|
name = `${name}`;
|
24015
|
-
|
24015
|
+
validateName2(name);
|
24016
24016
|
return find(this[MAP], name) !== void 0;
|
24017
24017
|
}
|
24018
24018
|
/**
|
@@ -24023,7 +24023,7 @@ var require_lib7 = __commonJS2({
|
|
24023
24023
|
*/
|
24024
24024
|
delete(name) {
|
24025
24025
|
name = `${name}`;
|
24026
|
-
|
24026
|
+
validateName2(name);
|
24027
24027
|
const key = find(this[MAP], name);
|
24028
24028
|
if (key !== void 0) {
|
24029
24029
|
delete this[MAP][key];
|
@@ -32536,7 +32536,7 @@ var require_package = __commonJS2({
|
|
32536
32536
|
"../client/package.json"(exports2, module2) {
|
32537
32537
|
module2.exports = {
|
32538
32538
|
name: "@vercel/client",
|
32539
|
-
version: "13.4.
|
32539
|
+
version: "13.4.9",
|
32540
32540
|
main: "dist/index.js",
|
32541
32541
|
typings: "dist/index.d.ts",
|
32542
32542
|
homepage: "https://vercel.com",
|
@@ -32573,7 +32573,7 @@ var require_package = __commonJS2({
|
|
32573
32573
|
typescript: "4.9.5"
|
32574
32574
|
},
|
32575
32575
|
dependencies: {
|
32576
|
-
"@vercel/build-utils": "8.4.
|
32576
|
+
"@vercel/build-utils": "8.4.5",
|
32577
32577
|
"@vercel/error-utils": "2.0.2",
|
32578
32578
|
"@vercel/routing-utils": "3.1.0",
|
32579
32579
|
"@zeit/fetch": "5.2.0",
|
@@ -39214,6 +39214,7 @@ ${error3.stack}`);
|
|
39214
39214
|
this.localConfig = opts.localConfig;
|
39215
39215
|
this.localConfigPath = opts.localConfigPath;
|
39216
39216
|
this.requestIdCounter = 1;
|
39217
|
+
this.telemetryEventStore = opts.telemetryEventStore;
|
39217
39218
|
const theme = {
|
39218
39219
|
prefix: (0, import_chalk17.gray)("?"),
|
39219
39220
|
style: { answer: import_chalk17.gray }
|
@@ -46848,8 +46849,8 @@ var require_parseControlResponse = __commonJS2({
|
|
46848
46849
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
46849
46850
|
exports2.positiveIntermediate = exports2.positiveCompletion = exports2.isMultiline = exports2.isSingleLine = exports2.parseControlResponse = void 0;
|
46850
46851
|
var LF = "\n";
|
46851
|
-
function parseControlResponse(
|
46852
|
-
const lines2 =
|
46852
|
+
function parseControlResponse(text) {
|
46853
|
+
const lines2 = text.split(/\r?\n/).filter(isNotBlank);
|
46853
46854
|
const messages = [];
|
46854
46855
|
let startAt = 0;
|
46855
46856
|
let tokenRegex;
|
@@ -48494,9 +48495,9 @@ var require_Client = __commonJS2({
|
|
48494
48495
|
remotePath: "",
|
48495
48496
|
type: "list"
|
48496
48497
|
});
|
48497
|
-
const
|
48498
|
-
this.ftp.log(
|
48499
|
-
return this.parseList(
|
48498
|
+
const text = buffer.getText(this.ftp.encoding);
|
48499
|
+
this.ftp.log(text);
|
48500
|
+
return this.parseList(text);
|
48500
48501
|
}
|
48501
48502
|
/**
|
48502
48503
|
* Remove a directory and all of its content.
|
@@ -52474,11 +52475,11 @@ var require_escodegen = __commonJS2({
|
|
52474
52475
|
result.push(newline);
|
52475
52476
|
}
|
52476
52477
|
}
|
52477
|
-
function parenthesize(
|
52478
|
+
function parenthesize(text, current, should) {
|
52478
52479
|
if (current < should) {
|
52479
|
-
return ["(",
|
52480
|
+
return ["(", text, ")"];
|
52480
52481
|
}
|
52481
|
-
return
|
52482
|
+
return text;
|
52482
52483
|
}
|
52483
52484
|
function generateVerbatimString(string) {
|
52484
52485
|
var i, iz, result;
|
@@ -54570,14 +54571,14 @@ var require_esprima = __commonJS2({
|
|
54570
54571
|
this.startMarker.line = this.scanner.lineNumber;
|
54571
54572
|
this.startMarker.column = this.scanner.index - this.scanner.lineStart;
|
54572
54573
|
var start = this.scanner.index;
|
54573
|
-
var
|
54574
|
+
var text = "";
|
54574
54575
|
while (!this.scanner.eof()) {
|
54575
54576
|
var ch = this.scanner.source[this.scanner.index];
|
54576
54577
|
if (ch === "{" || ch === "<") {
|
54577
54578
|
break;
|
54578
54579
|
}
|
54579
54580
|
++this.scanner.index;
|
54580
|
-
|
54581
|
+
text += ch;
|
54581
54582
|
if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
|
54582
54583
|
++this.scanner.lineNumber;
|
54583
54584
|
if (ch === "\r" && this.scanner.source[this.scanner.index] === "\n") {
|
@@ -54591,13 +54592,13 @@ var require_esprima = __commonJS2({
|
|
54591
54592
|
this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
|
54592
54593
|
var token = {
|
54593
54594
|
type: 101,
|
54594
|
-
value:
|
54595
|
+
value: text,
|
54595
54596
|
lineNumber: this.scanner.lineNumber,
|
54596
54597
|
lineStart: this.scanner.lineStart,
|
54597
54598
|
start,
|
54598
54599
|
end: this.scanner.index
|
54599
54600
|
};
|
54600
|
-
if (
|
54601
|
+
if (text.length > 0 && this.config.tokens) {
|
54601
54602
|
this.tokens.push(this.convertToken(token));
|
54602
54603
|
}
|
54603
54604
|
return token;
|
@@ -71393,6 +71394,97 @@ var import_blob_polyfill = __toESM(require_Blob());
|
|
71393
71394
|
}
|
71394
71395
|
});
|
71395
71396
|
|
71397
|
+
// src/util/telemetry/index.ts
|
71398
|
+
var import_node_crypto, LogLabel, TelemetryClient, TelemetryEventStore;
|
71399
|
+
var init_telemetry = __esm({
|
71400
|
+
"src/util/telemetry/index.ts"() {
|
71401
|
+
"use strict";
|
71402
|
+
import_node_crypto = require("crypto");
|
71403
|
+
LogLabel = `['telemetry']:`;
|
71404
|
+
TelemetryClient = class {
|
71405
|
+
constructor({ opts }) {
|
71406
|
+
this.redactedValue = "[REDACTED]";
|
71407
|
+
this.output = opts.output;
|
71408
|
+
this.isDebug = opts.isDebug || false;
|
71409
|
+
this.store = opts.store;
|
71410
|
+
}
|
71411
|
+
track(eventData) {
|
71412
|
+
if (this.isDebug) {
|
71413
|
+
this.output.debug(`${LogLabel} ${eventData.key}:${eventData.value}`);
|
71414
|
+
}
|
71415
|
+
const event = {
|
71416
|
+
id: (0, import_node_crypto.randomUUID)(),
|
71417
|
+
...eventData
|
71418
|
+
};
|
71419
|
+
this.store.add(event);
|
71420
|
+
}
|
71421
|
+
trackCliCommand(eventData) {
|
71422
|
+
this.track({
|
71423
|
+
key: `command:${eventData.command}`,
|
71424
|
+
value: eventData.value
|
71425
|
+
});
|
71426
|
+
}
|
71427
|
+
trackCliSubcommand(eventData) {
|
71428
|
+
this.track({
|
71429
|
+
key: `subcommand:${eventData.subcommand}`,
|
71430
|
+
value: eventData.value
|
71431
|
+
});
|
71432
|
+
}
|
71433
|
+
trackCliArgument(eventData) {
|
71434
|
+
if (eventData.value) {
|
71435
|
+
this.track({
|
71436
|
+
key: `argument:${eventData.arg}`,
|
71437
|
+
value: eventData.value
|
71438
|
+
});
|
71439
|
+
}
|
71440
|
+
}
|
71441
|
+
trackCliOption(eventData) {
|
71442
|
+
this.track({
|
71443
|
+
key: `flag:${eventData.flag}`,
|
71444
|
+
value: eventData.value
|
71445
|
+
});
|
71446
|
+
}
|
71447
|
+
trackCliFlag(flag) {
|
71448
|
+
this.track({
|
71449
|
+
key: `flag:${flag}`,
|
71450
|
+
value: "TRUE"
|
71451
|
+
});
|
71452
|
+
}
|
71453
|
+
trackCommandError(error3) {
|
71454
|
+
this.output.error(error3);
|
71455
|
+
return;
|
71456
|
+
}
|
71457
|
+
trackFlagHelp() {
|
71458
|
+
this.trackCliFlag("help");
|
71459
|
+
}
|
71460
|
+
};
|
71461
|
+
TelemetryEventStore = class {
|
71462
|
+
constructor(opts) {
|
71463
|
+
this.isDebug = opts.isDebug || false;
|
71464
|
+
this.output = opts.output;
|
71465
|
+
this.events = [];
|
71466
|
+
}
|
71467
|
+
add(event) {
|
71468
|
+
this.events.push(event);
|
71469
|
+
}
|
71470
|
+
get readonlyEvents() {
|
71471
|
+
return Array.from(this.events);
|
71472
|
+
}
|
71473
|
+
reset() {
|
71474
|
+
this.events = [];
|
71475
|
+
}
|
71476
|
+
save() {
|
71477
|
+
if (this.isDebug) {
|
71478
|
+
this.output.debug(`${LogLabel} Flushing Events`);
|
71479
|
+
this.events.forEach((event) => {
|
71480
|
+
this.output.debug(JSON.stringify(event));
|
71481
|
+
});
|
71482
|
+
}
|
71483
|
+
}
|
71484
|
+
};
|
71485
|
+
}
|
71486
|
+
});
|
71487
|
+
|
71396
71488
|
// src/util/login/update-current-team-after-login.ts
|
71397
71489
|
async function updateCurrentTeamAfterLogin(client2, output2, ssoTeamId) {
|
71398
71490
|
if (ssoTeamId) {
|
@@ -71426,13 +71518,14 @@ function getSubcommand(cliArgs, config2) {
|
|
71426
71518
|
if (k !== "default" && config2[k].indexOf(subcommand) !== -1) {
|
71427
71519
|
return {
|
71428
71520
|
subcommand: k,
|
71429
|
-
|
71521
|
+
subcommandOriginal: subcommand,
|
71430
71522
|
args: rest
|
71431
71523
|
};
|
71432
71524
|
}
|
71433
71525
|
}
|
71434
71526
|
return {
|
71435
71527
|
subcommand: config2.default,
|
71528
|
+
subcommandOriginal: "",
|
71436
71529
|
args: cliArgs
|
71437
71530
|
};
|
71438
71531
|
}
|
@@ -71766,11 +71859,11 @@ var require_utils7 = __commonJS2({
|
|
71766
71859
|
}
|
71767
71860
|
return output2;
|
71768
71861
|
}
|
71769
|
-
function hyperlink(url3,
|
71862
|
+
function hyperlink(url3, text) {
|
71770
71863
|
const OSC = "\x1B]";
|
71771
71864
|
const BEL = "\x07";
|
71772
71865
|
const SEP = ";";
|
71773
|
-
return [OSC, "8", SEP, SEP, url3 ||
|
71866
|
+
return [OSC, "8", SEP, SEP, url3 || text, BEL, text, OSC, "8", SEP, SEP, BEL].join("");
|
71774
71867
|
}
|
71775
71868
|
module2.exports = {
|
71776
71869
|
strlen: strlen2,
|
@@ -71965,10 +72058,10 @@ var require_supports_colors = __commonJS2({
|
|
71965
72058
|
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js
|
71966
72059
|
var require_trap = __commonJS2({
|
71967
72060
|
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js"(exports2, module2) {
|
71968
|
-
module2["exports"] = function runTheTrap(
|
72061
|
+
module2["exports"] = function runTheTrap(text, options) {
|
71969
72062
|
var result = "";
|
71970
|
-
|
71971
|
-
|
72063
|
+
text = text || "Run the trap, drop the bass";
|
72064
|
+
text = text.split("");
|
71972
72065
|
var trap = {
|
71973
72066
|
a: ["@", "\u0104", "\u023A", "\u0245", "\u0394", "\u039B", "\u0414"],
|
71974
72067
|
b: ["\xDF", "\u0181", "\u0243", "\u026E", "\u03B2", "\u0E3F"],
|
@@ -72016,7 +72109,7 @@ var require_trap = __commonJS2({
|
|
72016
72109
|
y: ["\xA5", "\u04B0", "\u04CB"],
|
72017
72110
|
z: ["\u01B5", "\u0240"]
|
72018
72111
|
};
|
72019
|
-
|
72112
|
+
text.forEach(function(c) {
|
72020
72113
|
c = c.toLowerCase();
|
72021
72114
|
var chars2 = trap[c] || [" "];
|
72022
72115
|
var rand = Math.floor(Math.random() * chars2.length);
|
@@ -72034,8 +72127,8 @@ var require_trap = __commonJS2({
|
|
72034
72127
|
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js
|
72035
72128
|
var require_zalgo = __commonJS2({
|
72036
72129
|
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js"(exports2, module2) {
|
72037
|
-
module2["exports"] = function zalgo(
|
72038
|
-
|
72130
|
+
module2["exports"] = function zalgo(text, options) {
|
72131
|
+
text = text || " he is here ";
|
72039
72132
|
var soul = {
|
72040
72133
|
"up": [
|
72041
72134
|
"\u030D",
|
@@ -72168,7 +72261,7 @@ var require_zalgo = __commonJS2({
|
|
72168
72261
|
});
|
72169
72262
|
return bool;
|
72170
72263
|
}
|
72171
|
-
function heComes(
|
72264
|
+
function heComes(text2, options2) {
|
72172
72265
|
var result = "";
|
72173
72266
|
var counts;
|
72174
72267
|
var l;
|
@@ -72177,12 +72270,12 @@ var require_zalgo = __commonJS2({
|
|
72177
72270
|
options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
|
72178
72271
|
options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
|
72179
72272
|
options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
|
72180
|
-
|
72181
|
-
for (l in
|
72273
|
+
text2 = text2.split("");
|
72274
|
+
for (l in text2) {
|
72182
72275
|
if (isChar(l)) {
|
72183
72276
|
continue;
|
72184
72277
|
}
|
72185
|
-
result = result +
|
72278
|
+
result = result + text2[l];
|
72186
72279
|
counts = { "up": 0, "down": 0, "mid": 0 };
|
72187
72280
|
switch (options2.size) {
|
72188
72281
|
case "mini":
|
@@ -72213,7 +72306,7 @@ var require_zalgo = __commonJS2({
|
|
72213
72306
|
}
|
72214
72307
|
return result;
|
72215
72308
|
}
|
72216
|
-
return heComes(
|
72309
|
+
return heComes(text, options);
|
72217
72310
|
};
|
72218
72311
|
}
|
72219
72312
|
});
|
@@ -73218,7 +73311,7 @@ var init_table = __esm({
|
|
73218
73311
|
});
|
73219
73312
|
|
73220
73313
|
// src/commands/help.ts
|
73221
|
-
function wordWrap(
|
73314
|
+
function wordWrap(text, maxWidth) {
|
73222
73315
|
const _tableOptions = Object.assign({}, tableOptions, {
|
73223
73316
|
colWidths: [maxWidth],
|
73224
73317
|
style: {
|
@@ -73228,7 +73321,7 @@ function wordWrap(text2, maxWidth) {
|
|
73228
73321
|
const table2 = new import_cli_table32.default(_tableOptions);
|
73229
73322
|
table2.push([
|
73230
73323
|
{
|
73231
|
-
content:
|
73324
|
+
content: text,
|
73232
73325
|
wordWrap: true
|
73233
73326
|
}
|
73234
73327
|
]);
|
@@ -86603,7 +86696,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
86603
86696
|
});
|
86604
86697
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
86605
86698
|
var import_semver4 = __toESM4(require_semver2());
|
86606
|
-
var
|
86699
|
+
var import__5 = require_dist27();
|
86607
86700
|
async function detectFileSystemAPI2({
|
86608
86701
|
files,
|
86609
86702
|
projectSettings,
|
@@ -86669,7 +86762,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
86669
86762
|
};
|
86670
86763
|
}
|
86671
86764
|
const invalidBuilder = builders.find(({ use }) => {
|
86672
|
-
const valid = (0,
|
86765
|
+
const valid = (0, import__5.isOfficialRuntime)("go", use) || (0, import__5.isOfficialRuntime)("python", use) || (0, import__5.isOfficialRuntime)("ruby", use) || (0, import__5.isOfficialRuntime)("node", use) || (0, import__5.isOfficialRuntime)("next", use) || (0, import__5.isOfficialRuntime)("static", use) || (0, import__5.isOfficialRuntime)("static-build", use);
|
86673
86766
|
return !valid;
|
86674
86767
|
});
|
86675
86768
|
if (invalidBuilder) {
|
@@ -86682,7 +86775,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
86682
86775
|
for (const lang of ["go", "python", "ruby"]) {
|
86683
86776
|
for (const { use } of builders) {
|
86684
86777
|
const plugin = "vercel-plugin-" + lang;
|
86685
|
-
if ((0,
|
86778
|
+
if ((0, import__5.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
86686
86779
|
return {
|
86687
86780
|
metadata,
|
86688
86781
|
fsApiBuilder: null,
|
@@ -86739,7 +86832,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
86739
86832
|
}
|
86740
86833
|
}
|
86741
86834
|
const frontendBuilder = builders.find(
|
86742
|
-
({ use }) => (0,
|
86835
|
+
({ use }) => (0, import__5.isOfficialRuntime)("next", use) || (0, import__5.isOfficialRuntime)("static", use) || (0, import__5.isOfficialRuntime)("static-build", use)
|
86743
86836
|
);
|
86744
86837
|
const config2 = frontendBuilder?.config || {};
|
86745
86838
|
const withTag = tag ? `@${tag}` : "";
|
@@ -92328,8 +92421,8 @@ var require_parse5 = __commonJS2({
|
|
92328
92421
|
var token;
|
92329
92422
|
var key;
|
92330
92423
|
var root;
|
92331
|
-
module2.exports = function parse5(
|
92332
|
-
source = String(
|
92424
|
+
module2.exports = function parse5(text, reviver) {
|
92425
|
+
source = String(text);
|
92333
92426
|
parseState = "start";
|
92334
92427
|
stack2 = [];
|
92335
92428
|
pos = 0;
|
@@ -102029,13 +102122,13 @@ var require_ajv = __commonJS2({
|
|
102029
102122
|
options = options || {};
|
102030
102123
|
var separator = options.separator === void 0 ? ", " : options.separator;
|
102031
102124
|
var dataVar = options.dataVar === void 0 ? "data" : options.dataVar;
|
102032
|
-
var
|
102125
|
+
var text = "";
|
102033
102126
|
for (var i = 0; i < errors.length; i++) {
|
102034
102127
|
var e2 = errors[i];
|
102035
102128
|
if (e2)
|
102036
|
-
|
102129
|
+
text += dataVar + e2.dataPath + " " + e2.message + separator;
|
102037
102130
|
}
|
102038
|
-
return
|
102131
|
+
return text.slice(0, -separator.length);
|
102039
102132
|
}
|
102040
102133
|
function addFormat(name, format4) {
|
102041
102134
|
if (typeof format4 == "string")
|
@@ -108229,13 +108322,13 @@ function getSourceIcon(source) {
|
|
108229
108322
|
function sanitize(log2) {
|
108230
108323
|
return (log2.text || "").replace(/\n$/, "").replace(/^\n/, "").replace(/\x1b\[1000D/g, "").replace(/\x1b\[0K/g, "").replace(/\x1b\[1A/g, "");
|
108231
108324
|
}
|
108232
|
-
function colorize(
|
108325
|
+
function colorize(text, log2) {
|
108233
108326
|
if (log2.level === "error") {
|
108234
|
-
return import_chalk45.default.red(
|
108327
|
+
return import_chalk45.default.red(text);
|
108235
108328
|
} else if (log2.level === "warning") {
|
108236
|
-
return import_chalk45.default.yellow(
|
108329
|
+
return import_chalk45.default.yellow(text);
|
108237
108330
|
}
|
108238
|
-
return
|
108331
|
+
return text;
|
108239
108332
|
}
|
108240
108333
|
var import_chalk45, import_date_fns, import_ms7, import_jsonlines2, import_split2, import_url13, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
|
108241
108334
|
var init_logs = __esm({
|
@@ -142891,241 +142984,6 @@ var init_parse_add_dns_record_args = __esm({
|
|
142891
142984
|
}
|
142892
142985
|
});
|
142893
142986
|
|
142894
|
-
// src/util/input/text.ts
|
142895
|
-
function text({
|
142896
|
-
label = "",
|
142897
|
-
initialValue = "",
|
142898
|
-
// If false, the `- label` will be printed as `✖ label` in red
|
142899
|
-
// Until the first keypress
|
142900
|
-
valid = true,
|
142901
|
-
// Can be:
|
142902
|
-
// - `false`, which does nothing
|
142903
|
-
// - `cc`, for credit cards
|
142904
|
-
// - `date`, for dates in the mm / yyyy format
|
142905
|
-
mask = false,
|
142906
|
-
placeholder = "",
|
142907
|
-
abortSequences = /* @__PURE__ */ new Set([""]),
|
142908
|
-
eraseSequences = /* @__PURE__ */ new Set([ESCAPES.BACKSPACE, ESCAPES.CTRL_H]),
|
142909
|
-
resolveChars = /* @__PURE__ */ new Set([ESCAPES.CARRIAGE]),
|
142910
|
-
stdin = process.stdin,
|
142911
|
-
stdout = process.stdout,
|
142912
|
-
// Char to print before resolving/rejecting the promise
|
142913
|
-
// If `false`, nothing will be printed
|
142914
|
-
trailing = import_ansi_escapes6.default.eraseLines(1),
|
142915
|
-
// Gets called on each keypress;
|
142916
|
-
// `data` contains the current keypress;
|
142917
|
-
// `futureValue` contains the current value + the
|
142918
|
-
// Keypress in the correct place
|
142919
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
142920
|
-
validateKeypress = (data, futureValue) => true,
|
142921
|
-
// eslint-disable-line no-unused-vars
|
142922
|
-
// Get's called before the promise is resolved
|
142923
|
-
// Returning `false` here will prevent the user from submiting the value
|
142924
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
142925
|
-
validateValue = (data) => true,
|
142926
|
-
// eslint-disable-line no-unused-vars
|
142927
|
-
// Receives the value of the input and should return a string
|
142928
|
-
// Or false if no autocomplion is available
|
142929
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
142930
|
-
autoComplete = (value) => false,
|
142931
|
-
// eslint-disable-line no-unused-vars
|
142932
|
-
// Tab
|
142933
|
-
// Right arrow
|
142934
|
-
autoCompleteChars = /* @__PURE__ */ new Set([" ", "\x1B[C"]),
|
142935
|
-
// If true, converts everything the user types to lowercase
|
142936
|
-
forceLowerCase = false
|
142937
|
-
} = {}) {
|
142938
|
-
return new Promise((resolve12, reject) => {
|
142939
|
-
const isRaw = process.stdin.isRaw || false;
|
142940
|
-
let value;
|
142941
|
-
let caretOffset = 0;
|
142942
|
-
let regex;
|
142943
|
-
let suggestion = "";
|
142944
|
-
if (valid) {
|
142945
|
-
stdout.write(label);
|
142946
|
-
} else {
|
142947
|
-
const _label = label.replace("-", "\u2716");
|
142948
|
-
stdout.write(import_chalk61.default.red(_label));
|
142949
|
-
}
|
142950
|
-
value = initialValue;
|
142951
|
-
stdout.write(initialValue);
|
142952
|
-
if (mask) {
|
142953
|
-
if (!value) {
|
142954
|
-
value = import_chalk61.default.gray(placeholder);
|
142955
|
-
caretOffset = 0 - (0, import_strip_ansi4.default)(value).length;
|
142956
|
-
stdout.write(value);
|
142957
|
-
stdout.write(import_ansi_escapes6.default.cursorBackward(Math.abs(caretOffset)));
|
142958
|
-
}
|
142959
|
-
const regexStr = placeholder.split("").reduce((prev, curr) => {
|
142960
|
-
if (curr !== " " && !prev.includes(curr)) {
|
142961
|
-
if (curr === "/") {
|
142962
|
-
prev.push(" / ");
|
142963
|
-
} else {
|
142964
|
-
prev.push(curr);
|
142965
|
-
}
|
142966
|
-
}
|
142967
|
-
return prev;
|
142968
|
-
}, []).join("|");
|
142969
|
-
regex = new RegExp(`(${regexStr})`, "g");
|
142970
|
-
}
|
142971
|
-
if (stdin) {
|
142972
|
-
if (stdin.setRawMode) {
|
142973
|
-
stdin.setRawMode(true);
|
142974
|
-
}
|
142975
|
-
stdin.resume();
|
142976
|
-
}
|
142977
|
-
function restore() {
|
142978
|
-
if (stdin) {
|
142979
|
-
if (stdin.setRawMode) {
|
142980
|
-
stdin.setRawMode(isRaw);
|
142981
|
-
}
|
142982
|
-
stdin.pause();
|
142983
|
-
stdin.removeListener("data", onData);
|
142984
|
-
}
|
142985
|
-
if (trailing) {
|
142986
|
-
stdout.write(trailing);
|
142987
|
-
}
|
142988
|
-
}
|
142989
|
-
async function onData(buffer) {
|
142990
|
-
let data = buffer.toString();
|
142991
|
-
value = (0, import_strip_ansi4.default)(value);
|
142992
|
-
if (abortSequences.has(data)) {
|
142993
|
-
restore();
|
142994
|
-
const error3 = new Error("USER_ABORT");
|
142995
|
-
return reject(error3);
|
142996
|
-
}
|
142997
|
-
if (forceLowerCase) {
|
142998
|
-
data = data.toLowerCase();
|
142999
|
-
}
|
143000
|
-
if (suggestion !== "" && !caretOffset && autoCompleteChars.has(data)) {
|
143001
|
-
value += (0, import_strip_ansi4.default)(suggestion);
|
143002
|
-
suggestion = "";
|
143003
|
-
} else if (data === ESCAPES.LEFT) {
|
143004
|
-
if (value.length > Math.abs(caretOffset)) {
|
143005
|
-
caretOffset--;
|
143006
|
-
}
|
143007
|
-
} else if (data === ESCAPES.RIGHT) {
|
143008
|
-
if (caretOffset < 0) {
|
143009
|
-
caretOffset++;
|
143010
|
-
}
|
143011
|
-
} else if (eraseSequences.has(data)) {
|
143012
|
-
let char;
|
143013
|
-
if (mask && value.length > Math.abs(caretOffset)) {
|
143014
|
-
if (value[value.length + caretOffset - 1] === " ") {
|
143015
|
-
if (value[value.length + caretOffset - 2] === "/") {
|
143016
|
-
caretOffset -= 1;
|
143017
|
-
}
|
143018
|
-
char = placeholder[value.length + caretOffset];
|
143019
|
-
value = value.substring(0, value.length + caretOffset - 2) + char + value.slice(value.length + caretOffset - 1);
|
143020
|
-
caretOffset--;
|
143021
|
-
} else {
|
143022
|
-
char = placeholder[value.length + caretOffset - 1];
|
143023
|
-
value = value.substring(0, value.length + caretOffset - 1) + char + value.slice(value.length + caretOffset);
|
143024
|
-
}
|
143025
|
-
caretOffset--;
|
143026
|
-
} else {
|
143027
|
-
value = value.substring(0, value.length + caretOffset - 1) + value.slice(value.length + caretOffset);
|
143028
|
-
}
|
143029
|
-
suggestion = "";
|
143030
|
-
} else if (resolveChars.has(data)) {
|
143031
|
-
if (validateValue(value)) {
|
143032
|
-
restore();
|
143033
|
-
resolve12(value);
|
143034
|
-
} else {
|
143035
|
-
if (mask === "cc" || mask === "ccv") {
|
143036
|
-
value = formatCC(value);
|
143037
|
-
value = value.replace(regex, import_chalk61.default.gray("$1"));
|
143038
|
-
} else if (mask === "expDate") {
|
143039
|
-
value = value.replace(regex, import_chalk61.default.gray("$1"));
|
143040
|
-
}
|
143041
|
-
const l = import_chalk61.default.red(label.replace("-", "\u2716"));
|
143042
|
-
stdout.write(eraseLines(1));
|
143043
|
-
stdout.write(l + value + import_ansi_escapes6.default.beep);
|
143044
|
-
if (caretOffset) {
|
143045
|
-
process.stdout.write(
|
143046
|
-
import_ansi_escapes6.default.cursorBackward(Math.abs(caretOffset))
|
143047
|
-
);
|
143048
|
-
}
|
143049
|
-
}
|
143050
|
-
return;
|
143051
|
-
} else if (!(0, import_ansi_regex.default)().test(data)) {
|
143052
|
-
let tmp = value.substring(0, value.length + caretOffset) + data + value.slice(value.length + caretOffset);
|
143053
|
-
if (mask) {
|
143054
|
-
if (/\d/.test(data) && caretOffset !== 0) {
|
143055
|
-
let formattedData = data;
|
143056
|
-
if (mask === "cc" || mask === "ccv") {
|
143057
|
-
formattedData = formatCC(data);
|
143058
|
-
}
|
143059
|
-
if (value[value.length + caretOffset + 1] === " ") {
|
143060
|
-
tmp = value.substring(0, value.length + caretOffset) + formattedData + value.slice(value.length + caretOffset + formattedData.length);
|
143061
|
-
caretOffset += formattedData.length + 1;
|
143062
|
-
if (value[value.length + caretOffset] === "/") {
|
143063
|
-
caretOffset += formattedData.length + 1;
|
143064
|
-
}
|
143065
|
-
} else {
|
143066
|
-
tmp = value.substring(0, value.length + caretOffset) + formattedData + value.slice(value.length + caretOffset + formattedData.length);
|
143067
|
-
caretOffset += formattedData.length;
|
143068
|
-
}
|
143069
|
-
} else if (/\s/.test(data) && caretOffset < 0) {
|
143070
|
-
caretOffset++;
|
143071
|
-
tmp = value;
|
143072
|
-
} else {
|
143073
|
-
return stdout.write(import_ansi_escapes6.default.beep);
|
143074
|
-
}
|
143075
|
-
value = tmp;
|
143076
|
-
} else if (validateKeypress(data, value)) {
|
143077
|
-
value = tmp;
|
143078
|
-
if (caretOffset === 0) {
|
143079
|
-
const completion = await autoComplete(value);
|
143080
|
-
if (completion) {
|
143081
|
-
suggestion = import_chalk61.default.gray(completion);
|
143082
|
-
suggestion += import_ansi_escapes6.default.cursorBackward(completion.length);
|
143083
|
-
} else {
|
143084
|
-
suggestion = "";
|
143085
|
-
}
|
143086
|
-
}
|
143087
|
-
} else {
|
143088
|
-
return stdout.write(import_ansi_escapes6.default.beep);
|
143089
|
-
}
|
143090
|
-
}
|
143091
|
-
if (mask === "cc" || mask === "ccv") {
|
143092
|
-
value = formatCC(value);
|
143093
|
-
value = value.replace(regex, import_chalk61.default.gray("$1"));
|
143094
|
-
} else if (mask === "expDate") {
|
143095
|
-
value = value.replace(regex, import_chalk61.default.gray("$1"));
|
143096
|
-
}
|
143097
|
-
stdout.write(eraseLines(1));
|
143098
|
-
stdout.write(label + value + suggestion);
|
143099
|
-
if (caretOffset) {
|
143100
|
-
process.stdout.write(import_ansi_escapes6.default.cursorBackward(Math.abs(caretOffset)));
|
143101
|
-
}
|
143102
|
-
}
|
143103
|
-
if (stdin) {
|
143104
|
-
stdin.on("data", onData);
|
143105
|
-
}
|
143106
|
-
});
|
143107
|
-
}
|
143108
|
-
var import_chalk61, import_ansi_escapes6, import_ansi_regex, import_strip_ansi4, ESCAPES, formatCC;
|
143109
|
-
var init_text = __esm({
|
143110
|
-
"src/util/input/text.ts"() {
|
143111
|
-
"use strict";
|
143112
|
-
import_chalk61 = __toESM3(require_source());
|
143113
|
-
import_ansi_escapes6 = __toESM3(require_ansi_escapes());
|
143114
|
-
import_ansi_regex = __toESM3(require_ansi_regex2());
|
143115
|
-
import_strip_ansi4 = __toESM3(require_strip_ansi2());
|
143116
|
-
init_erase_lines();
|
143117
|
-
ESCAPES = {
|
143118
|
-
LEFT: "\x1B[D",
|
143119
|
-
RIGHT: "\x1B[C",
|
143120
|
-
CTRL_C: "",
|
143121
|
-
BACKSPACE: "\b",
|
143122
|
-
CTRL_H: "\x7F",
|
143123
|
-
CARRIAGE: "\r"
|
143124
|
-
};
|
143125
|
-
formatCC = (data) => data.replace(/\s/g, "").replace(/(.{4})/g, "$1 ").trim();
|
143126
|
-
}
|
143127
|
-
});
|
143128
|
-
|
143129
142987
|
// src/util/dns/get-dns-data.ts
|
143130
142988
|
async function getDNSData(client2, data) {
|
143131
142989
|
if (data) {
|
@@ -143134,20 +142992,20 @@ async function getDNSData(client2, data) {
|
|
143134
142992
|
const { output: output2 } = client2;
|
143135
142993
|
try {
|
143136
142994
|
const possibleTypes = new Set(RECORD_TYPES);
|
143137
|
-
const type = (await text({
|
143138
|
-
|
143139
|
-
|
142995
|
+
const type = (await client2.input.text({
|
142996
|
+
message: `- Record type (${RECORD_TYPES.join(", ")}): `,
|
142997
|
+
validate: (v) => Boolean(v && possibleTypes.has(v.trim().toUpperCase()))
|
143140
142998
|
})).trim().toUpperCase();
|
143141
|
-
const name = await getRecordName(type);
|
142999
|
+
const name = await getRecordName(client2, type);
|
143142
143000
|
if (type === "SRV") {
|
143143
|
-
const priority = await getNumber(`- ${type} priority: `);
|
143144
|
-
const weight = await getNumber(`- ${type} weight: `);
|
143145
|
-
const port = await getNumber(`- ${type} port: `);
|
143146
|
-
const target = await getTrimmedString(`- ${type} target: `);
|
143001
|
+
const priority = await getNumber(client2, `- ${type} priority: `);
|
143002
|
+
const weight = await getNumber(client2, `- ${type} weight: `);
|
143003
|
+
const port = await getNumber(client2, `- ${type} port: `);
|
143004
|
+
const target = await getTrimmedString(client2, `- ${type} target: `);
|
143147
143005
|
output2.log(
|
143148
|
-
`${
|
143006
|
+
`${import_chalk61.default.cyan(name)} ${import_chalk61.default.bold(type)} ${import_chalk61.default.cyan(
|
143149
143007
|
`${priority}`
|
143150
|
-
)} ${
|
143008
|
+
)} ${import_chalk61.default.cyan(`${weight}`)} ${import_chalk61.default.cyan(`${port}`)} ${import_chalk61.default.cyan(
|
143151
143009
|
target
|
143152
143010
|
)}.`
|
143153
143011
|
);
|
@@ -143163,12 +143021,12 @@ async function getDNSData(client2, data) {
|
|
143163
143021
|
} : null;
|
143164
143022
|
}
|
143165
143023
|
if (type === "MX") {
|
143166
|
-
const mxPriority = await getNumber(`- ${type} priority: `);
|
143167
|
-
const value2 = await getTrimmedString(`- ${type} host: `);
|
143024
|
+
const mxPriority = await getNumber(client2, `- ${type} priority: `);
|
143025
|
+
const value2 = await getTrimmedString(client2, `- ${type} host: `);
|
143168
143026
|
output2.log(
|
143169
|
-
`${
|
143027
|
+
`${import_chalk61.default.cyan(name)} ${import_chalk61.default.bold(type)} ${import_chalk61.default.cyan(
|
143170
143028
|
`${mxPriority}`
|
143171
|
-
)} ${
|
143029
|
+
)} ${import_chalk61.default.cyan(value2)}`
|
143172
143030
|
);
|
143173
143031
|
return await verifyData(client2) ? {
|
143174
143032
|
name,
|
@@ -143177,8 +143035,8 @@ async function getDNSData(client2, data) {
|
|
143177
143035
|
mxPriority
|
143178
143036
|
} : null;
|
143179
143037
|
}
|
143180
|
-
const value = await getTrimmedString(`- ${type} value: `);
|
143181
|
-
output2.log(`${
|
143038
|
+
const value = await getTrimmedString(client2, `- ${type} value: `);
|
143039
|
+
output2.log(`${import_chalk61.default.cyan(name)} ${import_chalk61.default.bold(type)} ${import_chalk61.default.cyan(value)}`);
|
143182
143040
|
return await verifyData(client2) ? {
|
143183
143041
|
name,
|
143184
143042
|
type,
|
@@ -143191,33 +143049,32 @@ async function getDNSData(client2, data) {
|
|
143191
143049
|
async function verifyData(client2) {
|
143192
143050
|
return confirm(client2, "Is this correct?", false);
|
143193
143051
|
}
|
143194
|
-
async function getRecordName(type) {
|
143195
|
-
const input = await text({
|
143196
|
-
|
143052
|
+
async function getRecordName(client2, type) {
|
143053
|
+
const input = await client2.input.text({
|
143054
|
+
message: `- ${type} name: `
|
143197
143055
|
});
|
143198
143056
|
return input === "@" ? "" : input;
|
143199
143057
|
}
|
143200
|
-
async function getNumber(label) {
|
143058
|
+
async function getNumber(client2, label) {
|
143201
143059
|
return Number(
|
143202
|
-
await text({
|
143203
|
-
label,
|
143204
|
-
|
143060
|
+
await client2.input.text({
|
143061
|
+
message: label,
|
143062
|
+
validate: (v) => Boolean(v && Number(v))
|
143205
143063
|
})
|
143206
143064
|
);
|
143207
143065
|
}
|
143208
|
-
async function getTrimmedString(label) {
|
143209
|
-
const res = await text({
|
143210
|
-
label,
|
143211
|
-
|
143066
|
+
async function getTrimmedString(client2, label) {
|
143067
|
+
const res = await client2.input.text({
|
143068
|
+
message: label,
|
143069
|
+
validate: (v) => Boolean(v && v.trim().length > 0)
|
143212
143070
|
});
|
143213
143071
|
return res.trim();
|
143214
143072
|
}
|
143215
|
-
var
|
143073
|
+
var import_chalk61, RECORD_TYPES;
|
143216
143074
|
var init_get_dns_data = __esm({
|
143217
143075
|
"src/util/dns/get-dns-data.ts"() {
|
143218
143076
|
"use strict";
|
143219
|
-
|
143220
|
-
init_text();
|
143077
|
+
import_chalk61 = __toESM3(require_source());
|
143221
143078
|
init_confirm();
|
143222
143079
|
RECORD_TYPES = ["A", "AAAA", "ALIAS", "CAA", "CNAME", "MX", "SRV", "TXT"];
|
143223
143080
|
}
|
@@ -143230,7 +143087,7 @@ async function add2(client2, opts, args2) {
|
|
143230
143087
|
const parsedParams = parseAddArgs(args2);
|
143231
143088
|
if (!parsedParams) {
|
143232
143089
|
output2.error(
|
143233
|
-
`Invalid number of arguments. See: ${
|
143090
|
+
`Invalid number of arguments. See: ${import_chalk62.default.cyan(
|
143234
143091
|
`${getCommandName("dns --help")}`
|
143235
143092
|
)} for usage.`
|
143236
143093
|
);
|
@@ -143246,23 +143103,23 @@ async function add2(client2, opts, args2) {
|
|
143246
143103
|
const record = await addDNSRecord(client2, domain, data);
|
143247
143104
|
if (record instanceof DomainNotFound) {
|
143248
143105
|
output2.error(
|
143249
|
-
`The domain ${domain} can't be found under ${
|
143106
|
+
`The domain ${domain} can't be found under ${import_chalk62.default.bold(
|
143250
143107
|
contextName
|
143251
|
-
)} ${
|
143108
|
+
)} ${import_chalk62.default.gray(addStamp())}`
|
143252
143109
|
);
|
143253
143110
|
return 1;
|
143254
143111
|
}
|
143255
143112
|
if (record instanceof DNSPermissionDenied) {
|
143256
143113
|
output2.error(
|
143257
|
-
`You don't have permissions to add records to domain ${domain} under ${
|
143114
|
+
`You don't have permissions to add records to domain ${domain} under ${import_chalk62.default.bold(
|
143258
143115
|
contextName
|
143259
|
-
)} ${
|
143116
|
+
)} ${import_chalk62.default.gray(addStamp())}`
|
143260
143117
|
);
|
143261
143118
|
return 1;
|
143262
143119
|
}
|
143263
143120
|
if (record instanceof DNSInvalidPort) {
|
143264
143121
|
output2.error(
|
143265
|
-
`Invalid <port> parameter. A number was expected ${
|
143122
|
+
`Invalid <port> parameter. A number was expected ${import_chalk62.default.gray(
|
143266
143123
|
addStamp()
|
143267
143124
|
)}`
|
143268
143125
|
);
|
@@ -143270,7 +143127,7 @@ async function add2(client2, opts, args2) {
|
|
143270
143127
|
}
|
143271
143128
|
if (record instanceof DNSInvalidType) {
|
143272
143129
|
output2.error(
|
143273
|
-
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${
|
143130
|
+
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${import_chalk62.default.gray(
|
143274
143131
|
addStamp()
|
143275
143132
|
)}`
|
143276
143133
|
);
|
@@ -143281,17 +143138,17 @@ async function add2(client2, opts, args2) {
|
|
143281
143138
|
return 1;
|
143282
143139
|
}
|
143283
143140
|
output2.success(
|
143284
|
-
`DNS record for domain ${
|
143141
|
+
`DNS record for domain ${import_chalk62.default.bold(domain)} ${import_chalk62.default.gray(
|
143285
143142
|
`(${record.uid})`
|
143286
|
-
)} created under ${
|
143143
|
+
)} created under ${import_chalk62.default.bold(contextName)} ${import_chalk62.default.gray(addStamp())}`
|
143287
143144
|
);
|
143288
143145
|
return 0;
|
143289
143146
|
}
|
143290
|
-
var
|
143147
|
+
var import_chalk62;
|
143291
143148
|
var init_add2 = __esm({
|
143292
143149
|
"src/commands/dns/add.ts"() {
|
143293
143150
|
"use strict";
|
143294
|
-
|
143151
|
+
import_chalk62 = __toESM3(require_source());
|
143295
143152
|
init_errors_ts();
|
143296
143153
|
init_add_dns_record();
|
143297
143154
|
init_get_scope();
|
@@ -143305,7 +143162,7 @@ var init_add2 = __esm({
|
|
143305
143162
|
// src/util/dns/import-zonefile.ts
|
143306
143163
|
async function importZonefile(client2, contextName, domain, zonefilePath) {
|
143307
143164
|
client2.output.spinner(
|
143308
|
-
`Importing Zone file for domain ${domain} under ${
|
143165
|
+
`Importing Zone file for domain ${domain} under ${import_chalk63.default.bold(contextName)}`
|
143309
143166
|
);
|
143310
143167
|
const zonefile = (0, import_fs7.readFileSync)((0, import_path40.resolve)(zonefilePath), "utf8");
|
143311
143168
|
try {
|
@@ -143332,11 +143189,11 @@ async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
143332
143189
|
throw err;
|
143333
143190
|
}
|
143334
143191
|
}
|
143335
|
-
var
|
143192
|
+
var import_chalk63, import_fs7, import_path40;
|
143336
143193
|
var init_import_zonefile = __esm({
|
143337
143194
|
"src/util/dns/import-zonefile.ts"() {
|
143338
143195
|
"use strict";
|
143339
|
-
|
143196
|
+
import_chalk63 = __toESM3(require_source());
|
143340
143197
|
import_fs7 = require("fs");
|
143341
143198
|
import_path40 = require("path");
|
143342
143199
|
init_errors_ts();
|
@@ -143349,7 +143206,7 @@ async function add3(client2, opts, args2) {
|
|
143349
143206
|
const { contextName } = await getScope(client2);
|
143350
143207
|
if (args2.length !== 2) {
|
143351
143208
|
output2.error(
|
143352
|
-
`Invalid number of arguments. Usage: ${
|
143209
|
+
`Invalid number of arguments. Usage: ${import_chalk64.default.cyan(
|
143353
143210
|
`${getCommandName("dns import <domain> <zonefile>")}`
|
143354
143211
|
)}`
|
143355
143212
|
);
|
@@ -143365,32 +143222,32 @@ async function add3(client2, opts, args2) {
|
|
143365
143222
|
);
|
143366
143223
|
if (recordIds instanceof DomainNotFound) {
|
143367
143224
|
output2.error(
|
143368
|
-
`The domain ${domain} can't be found under ${
|
143225
|
+
`The domain ${domain} can't be found under ${import_chalk64.default.bold(
|
143369
143226
|
contextName
|
143370
|
-
)} ${
|
143227
|
+
)} ${import_chalk64.default.gray(addStamp())}`
|
143371
143228
|
);
|
143372
143229
|
return 1;
|
143373
143230
|
}
|
143374
143231
|
if (recordIds instanceof InvalidDomain) {
|
143375
143232
|
output2.error(
|
143376
|
-
`The domain ${domain} doesn't match with the one found in the Zone file ${
|
143233
|
+
`The domain ${domain} doesn't match with the one found in the Zone file ${import_chalk64.default.gray(
|
143377
143234
|
addStamp()
|
143378
143235
|
)}`
|
143379
143236
|
);
|
143380
143237
|
return 1;
|
143381
143238
|
}
|
143382
143239
|
output2.success(
|
143383
|
-
`${recordIds.length} DNS records for domain ${
|
143240
|
+
`${recordIds.length} DNS records for domain ${import_chalk64.default.bold(
|
143384
143241
|
domain
|
143385
|
-
)} created under ${
|
143242
|
+
)} created under ${import_chalk64.default.bold(contextName)} ${import_chalk64.default.gray(addStamp())}`
|
143386
143243
|
);
|
143387
143244
|
return 0;
|
143388
143245
|
}
|
143389
|
-
var
|
143246
|
+
var import_chalk64;
|
143390
143247
|
var init_import = __esm({
|
143391
143248
|
"src/commands/dns/import.ts"() {
|
143392
143249
|
"use strict";
|
143393
|
-
|
143250
|
+
import_chalk64 = __toESM3(require_source());
|
143394
143251
|
init_get_scope();
|
143395
143252
|
init_errors_ts();
|
143396
143253
|
init_stamp();
|
@@ -143401,13 +143258,13 @@ var init_import = __esm({
|
|
143401
143258
|
|
143402
143259
|
// src/util/strlen.ts
|
143403
143260
|
function strlen(str) {
|
143404
|
-
return (0,
|
143261
|
+
return (0, import_strip_ansi4.default)(str).length;
|
143405
143262
|
}
|
143406
|
-
var
|
143263
|
+
var import_strip_ansi4;
|
143407
143264
|
var init_strlen = __esm({
|
143408
143265
|
"src/util/strlen.ts"() {
|
143409
143266
|
"use strict";
|
143410
|
-
|
143267
|
+
import_strip_ansi4 = __toESM3(require_strip_ansi2());
|
143411
143268
|
}
|
143412
143269
|
});
|
143413
143270
|
|
@@ -143427,7 +143284,7 @@ function formatTable(header, align, blocks) {
|
|
143427
143284
|
out += `${block.name}
|
143428
143285
|
`;
|
143429
143286
|
}
|
143430
|
-
const rows = [header.map((s) =>
|
143287
|
+
const rows = [header.map((s) => import_chalk65.default.dim(s))].concat(block.rows);
|
143431
143288
|
if (rows.length > 0) {
|
143432
143289
|
rows[0][0] = ` ${rows[0][0]}`;
|
143433
143290
|
for (let i = 1; i < rows.length; i++) {
|
@@ -143447,11 +143304,11 @@ function formatTable(header, align, blocks) {
|
|
143447
143304
|
}
|
143448
143305
|
return out.slice(0, -1);
|
143449
143306
|
}
|
143450
|
-
var
|
143307
|
+
var import_chalk65;
|
143451
143308
|
var init_format_table = __esm({
|
143452
143309
|
"src/util/format-table.ts"() {
|
143453
143310
|
"use strict";
|
143454
|
-
|
143311
|
+
import_chalk65 = __toESM3(require_source());
|
143455
143312
|
init_table();
|
143456
143313
|
init_strlen();
|
143457
143314
|
}
|
@@ -143534,18 +143391,18 @@ function getAddDomainName(domainNames) {
|
|
143534
143391
|
];
|
143535
143392
|
}
|
143536
143393
|
async function getDomainNames(client2, contextName, next) {
|
143537
|
-
client2.output.spinner(`Fetching domains under ${
|
143394
|
+
client2.output.spinner(`Fetching domains under ${import_chalk66.default.bold(contextName)}`);
|
143538
143395
|
const { domains: domains2, pagination } = await getDomains(client2, next);
|
143539
143396
|
return { domainNames: domains2.map((domain) => domain.name), pagination };
|
143540
143397
|
}
|
143541
|
-
var
|
143398
|
+
var import_chalk66;
|
143542
143399
|
var init_get_dns_records = __esm({
|
143543
143400
|
"src/util/dns/get-dns-records.ts"() {
|
143544
143401
|
"use strict";
|
143545
143402
|
init_errors_ts();
|
143546
143403
|
init_get_domain_dns_records();
|
143547
143404
|
init_get_domains();
|
143548
|
-
|
143405
|
+
import_chalk66 = __toESM3(require_source());
|
143549
143406
|
}
|
143550
143407
|
});
|
143551
143408
|
|
@@ -143557,7 +143414,7 @@ async function ls3(client2, opts, args2) {
|
|
143557
143414
|
const lsStamp = stamp_default();
|
143558
143415
|
if (args2.length > 1) {
|
143559
143416
|
output2.error(
|
143560
|
-
`Invalid number of arguments. Usage: ${
|
143417
|
+
`Invalid number of arguments. Usage: ${import_chalk67.default.cyan(
|
143561
143418
|
`${getCommandName("dns ls [domain]")}`
|
143562
143419
|
)}`
|
143563
143420
|
);
|
@@ -143580,15 +143437,15 @@ async function ls3(client2, opts, args2) {
|
|
143580
143437
|
);
|
143581
143438
|
if (data instanceof DomainNotFound) {
|
143582
143439
|
output2.error(
|
143583
|
-
`The domain ${domainName} can't be found under ${
|
143440
|
+
`The domain ${domainName} can't be found under ${import_chalk67.default.bold(
|
143584
143441
|
contextName
|
143585
|
-
)} ${
|
143442
|
+
)} ${import_chalk67.default.gray(lsStamp())}`
|
143586
143443
|
);
|
143587
143444
|
return 1;
|
143588
143445
|
}
|
143589
143446
|
const { records, pagination: pagination2 } = data;
|
143590
143447
|
output2.log(
|
143591
|
-
`${records.length > 0 ? "Records" : "No records"} found under ${
|
143448
|
+
`${records.length > 0 ? "Records" : "No records"} found under ${import_chalk67.default.bold(contextName)} ${import_chalk67.default.gray(lsStamp())}`
|
143592
143449
|
);
|
143593
143450
|
client2.stdout.write(getDNSRecordsTable([{ domainName, records }]));
|
143594
143451
|
if (pagination2 && pagination2.count === 20) {
|
@@ -143609,9 +143466,9 @@ async function ls3(client2, opts, args2) {
|
|
143609
143466
|
);
|
143610
143467
|
const nRecords = dnsRecords.reduce((p, r) => r.records.length + p, 0);
|
143611
143468
|
output2.log(
|
143612
|
-
`${nRecords > 0 ? "Records" : "No records"} found under ${
|
143469
|
+
`${nRecords > 0 ? "Records" : "No records"} found under ${import_chalk67.default.bold(
|
143613
143470
|
contextName
|
143614
|
-
)} ${
|
143471
|
+
)} ${import_chalk67.default.gray(lsStamp())}`
|
143615
143472
|
);
|
143616
143473
|
output2.log(getDNSRecordsTable(dnsRecords));
|
143617
143474
|
if (pagination && pagination.count === 20) {
|
@@ -143629,7 +143486,7 @@ function getDNSRecordsTable(dnsRecords) {
|
|
143629
143486
|
["", "id", "name", "type", "value", "created"],
|
143630
143487
|
["l", "r", "l", "l", "l", "l"],
|
143631
143488
|
dnsRecords.map(({ domainName, records }) => ({
|
143632
|
-
name:
|
143489
|
+
name: import_chalk67.default.bold(domainName),
|
143633
143490
|
rows: records.map(getDNSRecordRow)
|
143634
143491
|
}))
|
143635
143492
|
);
|
@@ -143646,14 +143503,14 @@ function getDNSRecordRow(record) {
|
|
143646
143503
|
record.name,
|
143647
143504
|
record.type,
|
143648
143505
|
priority ? `${priority} ${record.value}` : record.value,
|
143649
|
-
|
143506
|
+
import_chalk67.default.gray(isSystemRecord ? "default" : createdAt)
|
143650
143507
|
];
|
143651
143508
|
}
|
143652
|
-
var
|
143509
|
+
var import_chalk67, import_ms13;
|
143653
143510
|
var init_ls3 = __esm({
|
143654
143511
|
"src/commands/dns/ls.ts"() {
|
143655
143512
|
"use strict";
|
143656
|
-
|
143513
|
+
import_chalk67 = __toESM3(require_source());
|
143657
143514
|
import_ms13 = __toESM3(require_ms2());
|
143658
143515
|
init_errors_ts();
|
143659
143516
|
init_format_table();
|
@@ -143699,7 +143556,7 @@ async function rm3(client2, _opts, args2) {
|
|
143699
143556
|
const [recordId] = args2;
|
143700
143557
|
if (args2.length !== 1) {
|
143701
143558
|
output2.error(
|
143702
|
-
`Invalid number of arguments. Usage: ${
|
143559
|
+
`Invalid number of arguments. Usage: ${import_chalk68.default.cyan(
|
143703
143560
|
`${getCommandName("dns rm <id>")}`
|
143704
143561
|
)}`
|
143705
143562
|
);
|
@@ -143724,7 +143581,7 @@ async function rm3(client2, _opts, args2) {
|
|
143724
143581
|
const rmStamp = stamp_default();
|
143725
143582
|
await deleteDNSRecordById(client2, domainName, record.id);
|
143726
143583
|
output2.success(
|
143727
|
-
`Record ${
|
143584
|
+
`Record ${import_chalk68.default.gray(`${record.id}`)} removed ${import_chalk68.default.gray(rmStamp())}`
|
143728
143585
|
);
|
143729
143586
|
return 0;
|
143730
143587
|
}
|
@@ -143739,7 +143596,7 @@ function readConfirmation2(output2, msg, domainName, record) {
|
|
143739
143596
|
`
|
143740
143597
|
);
|
143741
143598
|
output2.print(
|
143742
|
-
`${
|
143599
|
+
`${import_chalk68.default.bold.red("> Are you sure?")} ${import_chalk68.default.gray("(y/N) ")}`
|
143743
143600
|
);
|
143744
143601
|
process.stdin.on("data", (d) => {
|
143745
143602
|
process.stdin.pause();
|
@@ -143751,19 +143608,19 @@ function getDeleteTableRow(domainName, record) {
|
|
143751
143608
|
const recordName = `${record.name.length > 0 ? `${record.name}.` : ""}${domainName}`;
|
143752
143609
|
return [
|
143753
143610
|
record.id,
|
143754
|
-
|
143611
|
+
import_chalk68.default.bold(
|
143755
143612
|
`${recordName} ${record.type} ${record.value} ${record.mxPriority || ""}`
|
143756
143613
|
),
|
143757
|
-
|
143614
|
+
import_chalk68.default.gray(
|
143758
143615
|
`${(0, import_ms14.default)(Date.now() - new Date(Number(record.createdAt)).getTime())} ago`
|
143759
143616
|
)
|
143760
143617
|
];
|
143761
143618
|
}
|
143762
|
-
var
|
143619
|
+
var import_chalk68, import_ms14;
|
143763
143620
|
var init_rm3 = __esm({
|
143764
143621
|
"src/commands/dns/rm.ts"() {
|
143765
143622
|
"use strict";
|
143766
|
-
|
143623
|
+
import_chalk68 = __toESM3(require_source());
|
143767
143624
|
import_ms14 = __toESM3(require_ms2());
|
143768
143625
|
init_table();
|
143769
143626
|
init_delete_dns_record_by_id();
|
@@ -143989,16 +143846,16 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
143989
143846
|
const rows = [];
|
143990
143847
|
for (let i = 0; i < maxLength; i++) {
|
143991
143848
|
rows.push([
|
143992
|
-
sortedIntended[i] ||
|
143993
|
-
sortedCurrent[i] ||
|
143994
|
-
sortedIntended[i] === sortedCurrent[i] ?
|
143849
|
+
sortedIntended[i] || import_chalk69.default.gray("-"),
|
143850
|
+
sortedCurrent[i] || import_chalk69.default.gray("-"),
|
143851
|
+
sortedIntended[i] === sortedCurrent[i] ? import_chalk69.default.green(chars_default.tick) : import_chalk69.default.red(chars_default.cross)
|
143995
143852
|
]);
|
143996
143853
|
}
|
143997
143854
|
return table(
|
143998
143855
|
[
|
143999
143856
|
[
|
144000
|
-
|
144001
|
-
|
143857
|
+
import_chalk69.default.gray("Intended Nameservers"),
|
143858
|
+
import_chalk69.default.gray("Current Nameservers"),
|
144002
143859
|
""
|
144003
143860
|
],
|
144004
143861
|
...rows
|
@@ -144006,11 +143863,11 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
144006
143863
|
{ hsep: 4 }
|
144007
143864
|
).replace(/^(.*)/gm, `${extraSpace}$1`);
|
144008
143865
|
}
|
144009
|
-
var
|
143866
|
+
var import_chalk69;
|
144010
143867
|
var init_format_ns_table = __esm({
|
144011
143868
|
"src/util/format-ns-table.ts"() {
|
144012
143869
|
"use strict";
|
144013
|
-
|
143870
|
+
import_chalk69 = __toESM3(require_source());
|
144014
143871
|
init_table();
|
144015
143872
|
init_chars();
|
144016
143873
|
}
|
@@ -144019,7 +143876,7 @@ var init_format_ns_table = __esm({
|
|
144019
143876
|
// src/util/domains/get-domain.ts
|
144020
143877
|
async function getDomain(client2, contextName, domainName) {
|
144021
143878
|
client2.output.spinner(
|
144022
|
-
`Fetching domain ${domainName} under ${
|
143879
|
+
`Fetching domain ${domainName} under ${import_chalk70.default.bold(contextName)}`
|
144023
143880
|
);
|
144024
143881
|
try {
|
144025
143882
|
const { domain } = await client2.fetch(
|
@@ -144033,11 +143890,11 @@ async function getDomain(client2, contextName, domainName) {
|
|
144033
143890
|
throw err;
|
144034
143891
|
}
|
144035
143892
|
}
|
144036
|
-
var
|
143893
|
+
var import_chalk70;
|
144037
143894
|
var init_get_domain = __esm({
|
144038
143895
|
"src/util/domains/get-domain.ts"() {
|
144039
143896
|
"use strict";
|
144040
|
-
|
143897
|
+
import_chalk70 = __toESM3(require_source());
|
144041
143898
|
init_errors_ts();
|
144042
143899
|
}
|
144043
143900
|
});
|
@@ -144076,7 +143933,7 @@ var init_get_domain_config = __esm({
|
|
144076
143933
|
// src/util/projects/add-domain-to-project.ts
|
144077
143934
|
async function addDomainToProject(client2, projectNameOrId, domain) {
|
144078
143935
|
client2.output.spinner(
|
144079
|
-
`Adding domain ${domain} to project ${
|
143936
|
+
`Adding domain ${domain} to project ${import_chalk71.default.bold(projectNameOrId)}`
|
144080
143937
|
);
|
144081
143938
|
try {
|
144082
143939
|
const response = await client2.fetch(
|
@@ -144105,11 +143962,11 @@ async function addDomainToProject(client2, projectNameOrId, domain) {
|
|
144105
143962
|
throw err;
|
144106
143963
|
}
|
144107
143964
|
}
|
144108
|
-
var
|
143965
|
+
var import_chalk71;
|
144109
143966
|
var init_add_domain_to_project = __esm({
|
144110
143967
|
"src/util/projects/add-domain-to-project.ts"() {
|
144111
143968
|
"use strict";
|
144112
|
-
|
143969
|
+
import_chalk71 = __toESM3(require_source());
|
144113
143970
|
init_errors_ts();
|
144114
143971
|
}
|
144115
143972
|
});
|
@@ -144117,7 +143974,7 @@ var init_add_domain_to_project = __esm({
|
|
144117
143974
|
// src/util/projects/remove-domain-from-project.ts
|
144118
143975
|
async function removeDomainFromProject(client2, projectNameOrId, domain) {
|
144119
143976
|
client2.output.spinner(
|
144120
|
-
`Removing domain ${domain} from project ${
|
143977
|
+
`Removing domain ${domain} from project ${import_chalk72.default.bold(projectNameOrId)}`
|
144121
143978
|
);
|
144122
143979
|
try {
|
144123
143980
|
const response = await client2.fetch(
|
@@ -144136,11 +143993,11 @@ async function removeDomainFromProject(client2, projectNameOrId, domain) {
|
|
144136
143993
|
throw err;
|
144137
143994
|
}
|
144138
143995
|
}
|
144139
|
-
var
|
143996
|
+
var import_chalk72;
|
144140
143997
|
var init_remove_domain_from_project = __esm({
|
144141
143998
|
"src/util/projects/remove-domain-from-project.ts"() {
|
144142
143999
|
"use strict";
|
144143
|
-
|
144000
|
+
import_chalk72 = __toESM3(require_source());
|
144144
144001
|
init_errors_ts();
|
144145
144002
|
}
|
144146
144003
|
});
|
@@ -144194,7 +144051,7 @@ async function add4(client2, opts, args2) {
|
|
144194
144051
|
}
|
144195
144052
|
}
|
144196
144053
|
output2.success(
|
144197
|
-
`Domain ${
|
144054
|
+
`Domain ${import_chalk73.default.bold(domainName)} added to project ${import_chalk73.default.bold(
|
144198
144055
|
projectName
|
144199
144056
|
)}. ${addStamp()}`
|
144200
144057
|
);
|
@@ -144215,11 +144072,11 @@ async function add4(client2, opts, args2) {
|
|
144215
144072
|
`This domain is not configured properly. To configure it you should either:`
|
144216
144073
|
);
|
144217
144074
|
output2.print(
|
144218
|
-
` ${
|
144075
|
+
` ${import_chalk73.default.grey("a)")} Set the following record on your DNS provider to continue: ${code(`A ${domainName} 76.76.21.21`)} ${import_chalk73.default.grey("[recommended]")}
|
144219
144076
|
`
|
144220
144077
|
);
|
144221
144078
|
output2.print(
|
144222
|
-
` ${
|
144079
|
+
` ${import_chalk73.default.grey("b)")} Change your Domains's nameservers to the intended set`
|
144223
144080
|
);
|
144224
144081
|
output2.print(
|
144225
144082
|
`
|
@@ -144243,11 +144100,11 @@ ${formatNSTable(
|
|
144243
144100
|
}
|
144244
144101
|
return 0;
|
144245
144102
|
}
|
144246
|
-
var
|
144103
|
+
var import_chalk73;
|
144247
144104
|
var init_add3 = __esm({
|
144248
144105
|
"src/commands/domains/add.ts"() {
|
144249
144106
|
"use strict";
|
144250
|
-
|
144107
|
+
import_chalk73 = __toESM3(require_source());
|
144251
144108
|
init_errors_ts();
|
144252
144109
|
init_format_ns_table();
|
144253
144110
|
init_get_scope();
|
@@ -144304,7 +144161,7 @@ async function buy(client2, opts, args2) {
|
|
144304
144161
|
}
|
144305
144162
|
if (!(await getDomainStatus(client2, domainName)).available) {
|
144306
144163
|
output2.error(
|
144307
|
-
`The domain ${param(domainName)} is ${
|
144164
|
+
`The domain ${param(domainName)} is ${import_chalk74.default.underline(
|
144308
144165
|
"unavailable"
|
144309
144166
|
)}! ${availableStamp()}`
|
144310
144167
|
);
|
@@ -144312,9 +144169,9 @@ async function buy(client2, opts, args2) {
|
|
144312
144169
|
}
|
144313
144170
|
const { period, price } = domainPrice;
|
144314
144171
|
output2.log(
|
144315
|
-
`The domain ${param(domainName)} is ${
|
144172
|
+
`The domain ${param(domainName)} is ${import_chalk74.default.underline(
|
144316
144173
|
"available"
|
144317
|
-
)} to buy under ${
|
144174
|
+
)} to buy under ${import_chalk74.default.bold(contextName)}! ${availableStamp()}`
|
144318
144175
|
);
|
144319
144176
|
let autoRenew;
|
144320
144177
|
if (skipConfirmation) {
|
@@ -144322,14 +144179,14 @@ async function buy(client2, opts, args2) {
|
|
144322
144179
|
} else {
|
144323
144180
|
if (!await confirm(
|
144324
144181
|
client2,
|
144325
|
-
`Buy now for ${
|
144182
|
+
`Buy now for ${import_chalk74.default.bold(`$${price}`)} (${`${period}yr${period > 1 ? "s" : ""}`})?`,
|
144326
144183
|
false
|
144327
144184
|
)) {
|
144328
144185
|
return 0;
|
144329
144186
|
}
|
144330
144187
|
autoRenew = await confirm(
|
144331
144188
|
client2,
|
144332
|
-
renewalPrice.period === 1 ? `Auto renew yearly for ${
|
144189
|
+
renewalPrice.period === 1 ? `Auto renew yearly for ${import_chalk74.default.bold(`$${price}`)}?` : `Auto renew every ${renewalPrice.period} years for ${import_chalk74.default.bold(
|
144333
144190
|
`$${price}`
|
144334
144191
|
)}?`,
|
144335
144192
|
true
|
@@ -144413,11 +144270,11 @@ async function buy(client2, opts, args2) {
|
|
144413
144270
|
}
|
144414
144271
|
return 0;
|
144415
144272
|
}
|
144416
|
-
var
|
144273
|
+
var import_chalk74, import_psl6, import_error_utils21;
|
144417
144274
|
var init_buy = __esm({
|
144418
144275
|
"src/commands/domains/buy.ts"() {
|
144419
144276
|
"use strict";
|
144420
|
-
|
144277
|
+
import_chalk74 = __toESM3(require_source());
|
144421
144278
|
import_psl6 = __toESM3(require_psl());
|
144422
144279
|
init_errors_ts();
|
144423
144280
|
init_get_domain_price();
|
@@ -144471,13 +144328,13 @@ var init_transfer_in_domain = __esm({
|
|
144471
144328
|
});
|
144472
144329
|
|
144473
144330
|
// src/util/domains/get-auth-code.ts
|
144474
|
-
async function getAuthCode(code2) {
|
144331
|
+
async function getAuthCode(client2, code2) {
|
144475
144332
|
if (isValidAuthCode(code2)) {
|
144476
144333
|
return code2;
|
144477
144334
|
}
|
144478
|
-
return text({
|
144479
|
-
|
144480
|
-
|
144335
|
+
return client2.input.text({
|
144336
|
+
message: `- Transfer auth code: `,
|
144337
|
+
validate: isValidAuthCode
|
144481
144338
|
});
|
144482
144339
|
}
|
144483
144340
|
function isValidAuthCode(code2) {
|
@@ -144486,7 +144343,6 @@ function isValidAuthCode(code2) {
|
|
144486
144343
|
var init_get_auth_code = __esm({
|
144487
144344
|
"src/util/domains/get-auth-code.ts"() {
|
144488
144345
|
"use strict";
|
144489
|
-
init_text();
|
144490
144346
|
}
|
144491
144347
|
});
|
144492
144348
|
|
@@ -144519,10 +144375,44 @@ var init_is_root_domain = __esm({
|
|
144519
144375
|
}
|
144520
144376
|
});
|
144521
144377
|
|
144378
|
+
// src/util/telemetry/commands/domains/transfer-in.ts
|
144379
|
+
var DomainsTransferInTelemetryClient;
|
144380
|
+
var init_transfer_in = __esm({
|
144381
|
+
"src/util/telemetry/commands/domains/transfer-in.ts"() {
|
144382
|
+
"use strict";
|
144383
|
+
init_telemetry();
|
144384
|
+
DomainsTransferInTelemetryClient = class extends TelemetryClient {
|
144385
|
+
trackCliOptionCode(code2) {
|
144386
|
+
if (code2) {
|
144387
|
+
this.trackCliOption({
|
144388
|
+
flag: "code",
|
144389
|
+
value: this.redactedValue
|
144390
|
+
});
|
144391
|
+
}
|
144392
|
+
}
|
144393
|
+
trackCliArgumentDomainName(domainName) {
|
144394
|
+
if (domainName) {
|
144395
|
+
this.trackCliArgument({
|
144396
|
+
arg: "domain",
|
144397
|
+
value: this.redactedValue
|
144398
|
+
});
|
144399
|
+
}
|
144400
|
+
}
|
144401
|
+
};
|
144402
|
+
}
|
144403
|
+
});
|
144404
|
+
|
144522
144405
|
// src/commands/domains/transfer-in.ts
|
144523
144406
|
async function transferIn(client2, opts, args2) {
|
144524
|
-
const { output: output2 } = client2;
|
144407
|
+
const { output: output2, telemetryEventStore } = client2;
|
144525
144408
|
const { contextName } = await getScope(client2);
|
144409
|
+
const telemetry = new DomainsTransferInTelemetryClient({
|
144410
|
+
opts: {
|
144411
|
+
store: telemetryEventStore,
|
144412
|
+
output: output2
|
144413
|
+
}
|
144414
|
+
});
|
144415
|
+
telemetry.trackCliOptionCode(opts["--code"]);
|
144526
144416
|
const [domainName] = args2;
|
144527
144417
|
if (!domainName) {
|
144528
144418
|
output2.error(
|
@@ -144530,6 +144420,7 @@ async function transferIn(client2, opts, args2) {
|
|
144530
144420
|
);
|
144531
144421
|
return 1;
|
144532
144422
|
}
|
144423
|
+
telemetry.trackCliArgumentDomainName(domainName);
|
144533
144424
|
if (!isRootDomain(domainName)) {
|
144534
144425
|
output2.error(
|
144535
144426
|
`Invalid domain name ${param(domainName)}. Run ${getCommandName(
|
@@ -144553,14 +144444,14 @@ async function transferIn(client2, opts, args2) {
|
|
144553
144444
|
}
|
144554
144445
|
const { price } = domainPrice;
|
144555
144446
|
output2.log(
|
144556
|
-
`The domain ${param(domainName)} is ${
|
144447
|
+
`The domain ${param(domainName)} is ${import_chalk75.default.underline(
|
144557
144448
|
"available"
|
144558
|
-
)} to transfer under ${
|
144449
|
+
)} to transfer under ${import_chalk75.default.bold(contextName)}! ${availableStamp()}`
|
144559
144450
|
);
|
144560
|
-
const authCode = await getAuthCode(opts["--code"]);
|
144451
|
+
const authCode = await getAuthCode(client2, opts["--code"]);
|
144561
144452
|
const shouldTransfer = await confirm(
|
144562
144453
|
client2,
|
144563
|
-
transferPolicy === "no-change" ? `Transfer now for ${
|
144454
|
+
transferPolicy === "no-change" ? `Transfer now for ${import_chalk75.default.bold(`$${price}`)}?` : `Transfer now with 1yr renewal for ${import_chalk75.default.bold(`$${price}`)}?`,
|
144564
144455
|
false
|
144565
144456
|
);
|
144566
144457
|
if (!shouldTransfer) {
|
@@ -144628,11 +144519,11 @@ async function transferIn(client2, opts, args2) {
|
|
144628
144519
|
);
|
144629
144520
|
return 0;
|
144630
144521
|
}
|
144631
|
-
var
|
144632
|
-
var
|
144522
|
+
var import_chalk75;
|
144523
|
+
var init_transfer_in2 = __esm({
|
144633
144524
|
"src/commands/domains/transfer-in.ts"() {
|
144634
144525
|
"use strict";
|
144635
|
-
|
144526
|
+
import_chalk75 = __toESM3(require_source());
|
144636
144527
|
init_errors_ts();
|
144637
144528
|
init_get_scope();
|
144638
144529
|
init_param();
|
@@ -144644,6 +144535,7 @@ var init_transfer_in = __esm({
|
|
144644
144535
|
init_confirm();
|
144645
144536
|
init_is_root_domain();
|
144646
144537
|
init_pkg_name();
|
144538
|
+
init_transfer_in();
|
144647
144539
|
}
|
144648
144540
|
});
|
144649
144541
|
|
@@ -144707,7 +144599,7 @@ async function inspect2(client2, opts, args2) {
|
|
144707
144599
|
}
|
144708
144600
|
if (args2.length !== 1) {
|
144709
144601
|
output2.error(
|
144710
|
-
`Invalid number of arguments. Usage: ${
|
144602
|
+
`Invalid number of arguments. Usage: ${import_chalk76.default.cyan(
|
144711
144603
|
`${getCommandName("domains inspect <domain>")}`
|
144712
144604
|
)}`
|
144713
144605
|
);
|
@@ -144715,7 +144607,7 @@ async function inspect2(client2, opts, args2) {
|
|
144715
144607
|
}
|
144716
144608
|
output2.debug(`Fetching domain info`);
|
144717
144609
|
output2.spinner(
|
144718
|
-
`Fetching Domain ${domainName} under ${
|
144610
|
+
`Fetching Domain ${domainName} under ${import_chalk76.default.bold(contextName)}`
|
144719
144611
|
);
|
144720
144612
|
const information = await fetchInformation({
|
144721
144613
|
output: output2,
|
@@ -144728,38 +144620,38 @@ async function inspect2(client2, opts, args2) {
|
|
144728
144620
|
}
|
144729
144621
|
const { domain, projects, renewalPrice, domainConfig } = information;
|
144730
144622
|
output2.log(
|
144731
|
-
`Domain ${domainName} found under ${
|
144623
|
+
`Domain ${domainName} found under ${import_chalk76.default.bold(contextName)} ${import_chalk76.default.gray(
|
144732
144624
|
inspectStamp()
|
144733
144625
|
)}`
|
144734
144626
|
);
|
144735
144627
|
output2.print("\n");
|
144736
|
-
output2.print(
|
144737
|
-
output2.print(` ${
|
144628
|
+
output2.print(import_chalk76.default.bold(" General\n\n"));
|
144629
|
+
output2.print(` ${import_chalk76.default.cyan("Name")} ${domain.name}
|
144738
144630
|
`);
|
144739
144631
|
output2.print(
|
144740
|
-
` ${
|
144632
|
+
` ${import_chalk76.default.cyan("Registrar")} ${getDomainRegistrar(domain)}
|
144741
144633
|
`
|
144742
144634
|
);
|
144743
144635
|
output2.print(
|
144744
|
-
` ${
|
144636
|
+
` ${import_chalk76.default.cyan("Expiration Date")} ${formatDate(domain.expiresAt)}
|
144745
144637
|
`
|
144746
144638
|
);
|
144747
144639
|
output2.print(
|
144748
|
-
` ${
|
144640
|
+
` ${import_chalk76.default.cyan("Creator")} ${domain.creator.username}
|
144749
144641
|
`
|
144750
144642
|
);
|
144751
144643
|
output2.print(
|
144752
|
-
` ${
|
144644
|
+
` ${import_chalk76.default.cyan("Created At")} ${formatDate(domain.createdAt)}
|
144753
144645
|
`
|
144754
144646
|
);
|
144755
|
-
output2.print(` ${
|
144647
|
+
output2.print(` ${import_chalk76.default.cyan("Edge Network")} yes
|
144756
144648
|
`);
|
144757
144649
|
output2.print(
|
144758
|
-
` ${
|
144650
|
+
` ${import_chalk76.default.cyan("Renewal Price")} ${domain.boughtAt && renewalPrice ? `$${renewalPrice} USD` : import_chalk76.default.gray("-")}
|
144759
144651
|
`
|
144760
144652
|
);
|
144761
144653
|
output2.print("\n");
|
144762
|
-
output2.print(
|
144654
|
+
output2.print(import_chalk76.default.bold(" Nameservers\n\n"));
|
144763
144655
|
output2.print(
|
144764
144656
|
`${formatNSTable(domain.intendedNameservers, domain.nameservers, {
|
144765
144657
|
extraSpace: " "
|
@@ -144768,7 +144660,7 @@ async function inspect2(client2, opts, args2) {
|
|
144768
144660
|
);
|
144769
144661
|
output2.print("\n");
|
144770
144662
|
if (Array.isArray(projects) && projects.length > 0) {
|
144771
|
-
output2.print(
|
144663
|
+
output2.print(import_chalk76.default.bold(" Projects\n"));
|
144772
144664
|
const table2 = formatTable(
|
144773
144665
|
["Project", "Domains"],
|
144774
144666
|
["l", "l"],
|
@@ -144798,11 +144690,11 @@ async function inspect2(client2, opts, args2) {
|
|
144798
144690
|
null
|
144799
144691
|
);
|
144800
144692
|
output2.print(
|
144801
|
-
` ${
|
144693
|
+
` ${import_chalk76.default.grey("a)")} Set the following record on your DNS provider to continue: ${code(`A ${domainName} 76.76.21.21`)} ${import_chalk76.default.grey("[recommended]")}
|
144802
144694
|
`
|
144803
144695
|
);
|
144804
144696
|
output2.print(
|
144805
|
-
` ${
|
144697
|
+
` ${import_chalk76.default.grey("b)")} Change your Domains's nameservers to the intended set detailed above.
|
144806
144698
|
|
144807
144699
|
`
|
144808
144700
|
);
|
@@ -144862,11 +144754,11 @@ async function fetchInformation({
|
|
144862
144754
|
domainConfig
|
144863
144755
|
};
|
144864
144756
|
}
|
144865
|
-
var
|
144757
|
+
var import_chalk76;
|
144866
144758
|
var init_inspect = __esm({
|
144867
144759
|
"src/commands/domains/inspect.ts"() {
|
144868
144760
|
"use strict";
|
144869
|
-
|
144761
|
+
import_chalk76 = __toESM3(require_source());
|
144870
144762
|
init_errors_ts();
|
144871
144763
|
init_stamp();
|
144872
144764
|
init_format_date();
|
@@ -144897,21 +144789,21 @@ async function ls4(client2, opts, args2) {
|
|
144897
144789
|
const lsStamp = stamp_default();
|
144898
144790
|
if (args2.length !== 0) {
|
144899
144791
|
output2.error(
|
144900
|
-
`Invalid number of arguments. Usage: ${
|
144792
|
+
`Invalid number of arguments. Usage: ${import_chalk77.default.cyan(
|
144901
144793
|
`${getCommandName("domains ls")}`
|
144902
144794
|
)}`
|
144903
144795
|
);
|
144904
144796
|
return 1;
|
144905
144797
|
}
|
144906
|
-
output2.spinner(`Fetching Domains under ${
|
144798
|
+
output2.spinner(`Fetching Domains under ${import_chalk77.default.bold(contextName)}`);
|
144907
144799
|
const { domains: domains2, pagination } = await getDomains(
|
144908
144800
|
client2,
|
144909
144801
|
...paginationOptions
|
144910
144802
|
);
|
144911
144803
|
output2.log(
|
144912
|
-
`${(0, import_pluralize8.default)("Domain", domains2.length, true)} found under ${
|
144804
|
+
`${(0, import_pluralize8.default)("Domain", domains2.length, true)} found under ${import_chalk77.default.bold(
|
144913
144805
|
contextName
|
144914
|
-
)} ${
|
144806
|
+
)} ${import_chalk77.default.gray(lsStamp())}`
|
144915
144807
|
);
|
144916
144808
|
if (domains2.length > 0) {
|
144917
144809
|
output2.print(
|
@@ -144940,7 +144832,7 @@ function formatDomainsTable(domains2) {
|
|
144940
144832
|
isDomainExternal(domain) ? "Third Party" : "Vercel",
|
144941
144833
|
expiration,
|
144942
144834
|
domain.creator.username,
|
144943
|
-
|
144835
|
+
import_chalk77.default.gray(age)
|
144944
144836
|
];
|
144945
144837
|
});
|
144946
144838
|
return formatTable(
|
@@ -144949,12 +144841,12 @@ function formatDomainsTable(domains2) {
|
|
144949
144841
|
[{ rows }]
|
144950
144842
|
);
|
144951
144843
|
}
|
144952
|
-
var import_ms15,
|
144844
|
+
var import_ms15, import_chalk77, import_pluralize8;
|
144953
144845
|
var init_ls4 = __esm({
|
144954
144846
|
"src/commands/domains/ls.ts"() {
|
144955
144847
|
"use strict";
|
144956
144848
|
import_ms15 = __toESM3(require_ms2());
|
144957
|
-
|
144849
|
+
import_chalk77 = __toESM3(require_source());
|
144958
144850
|
import_pluralize8 = __toESM3(require_pluralize());
|
144959
144851
|
init_get_domains();
|
144960
144852
|
init_get_scope();
|
@@ -145058,7 +144950,7 @@ async function rm4(client2, opts, args2) {
|
|
145058
144950
|
}
|
145059
144951
|
if (args2.length !== 1) {
|
145060
144952
|
output2.error(
|
145061
|
-
`Invalid number of arguments. Usage: ${
|
144953
|
+
`Invalid number of arguments. Usage: ${import_chalk78.default.cyan(
|
145062
144954
|
`${getCommandName("domains rm <domain>")}`
|
145063
144955
|
)}`
|
145064
144956
|
);
|
@@ -145067,14 +144959,14 @@ async function rm4(client2, opts, args2) {
|
|
145067
144959
|
const domain = await getDomainByName(client2, contextName, domainName);
|
145068
144960
|
if (domain instanceof DomainNotFound || domain.name !== domainName) {
|
145069
144961
|
output2.error(
|
145070
|
-
`Domain not found by "${domainName}" under ${
|
144962
|
+
`Domain not found by "${domainName}" under ${import_chalk78.default.bold(contextName)}`
|
145071
144963
|
);
|
145072
144964
|
output2.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
145073
144965
|
return 1;
|
145074
144966
|
}
|
145075
144967
|
if (domain instanceof DomainPermissionDenied) {
|
145076
144968
|
output2.error(
|
145077
|
-
`You don't have access to the domain ${domainName} under ${
|
144969
|
+
`You don't have access to the domain ${domainName} under ${import_chalk78.default.bold(
|
145078
144970
|
contextName
|
145079
144971
|
)}`
|
145080
144972
|
);
|
@@ -145135,15 +145027,15 @@ async function removeDomain(output2, client2, contextName, skipConfirmation, dom
|
|
145135
145027
|
domain.name
|
145136
145028
|
);
|
145137
145029
|
if (removeResult instanceof DomainNotFound) {
|
145138
|
-
output2.error(`Domain not found under ${
|
145030
|
+
output2.error(`Domain not found under ${import_chalk78.default.bold(contextName)}`);
|
145139
145031
|
output2.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
145140
145032
|
return 1;
|
145141
145033
|
}
|
145142
145034
|
if (removeResult instanceof DomainPermissionDenied) {
|
145143
145035
|
output2.error(
|
145144
|
-
`You don't have permissions over domain ${
|
145036
|
+
`You don't have permissions over domain ${import_chalk78.default.underline(
|
145145
145037
|
removeResult.meta.domain
|
145146
|
-
)} under ${
|
145038
|
+
)} under ${import_chalk78.default.bold(removeResult.meta.context)}.`
|
145147
145039
|
);
|
145148
145040
|
return 1;
|
145149
145041
|
}
|
@@ -145185,21 +145077,21 @@ async function removeDomain(output2, client2, contextName, skipConfirmation, dom
|
|
145185
145077
|
);
|
145186
145078
|
if (aliases.length > 0) {
|
145187
145079
|
output2.warn(
|
145188
|
-
`This domain's ${
|
145080
|
+
`This domain's ${import_chalk78.default.bold(
|
145189
145081
|
(0, import_pluralize9.default)("alias", aliases.length, true)
|
145190
145082
|
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
145191
145083
|
);
|
145192
145084
|
}
|
145193
145085
|
if (certs.length > 0) {
|
145194
145086
|
output2.warn(
|
145195
|
-
`This domain's ${
|
145087
|
+
`This domain's ${import_chalk78.default.bold(
|
145196
145088
|
(0, import_pluralize9.default)("certificate", certs.length, true)
|
145197
145089
|
)} will be removed. Run ${getCommandName(`cert ls`)} to list them.`
|
145198
145090
|
);
|
145199
145091
|
}
|
145200
145092
|
if (suffix2) {
|
145201
145093
|
output2.warn(
|
145202
|
-
`The ${
|
145094
|
+
`The ${import_chalk78.default.bold(`custom suffix`)} associated with this domain.`
|
145203
145095
|
);
|
145204
145096
|
}
|
145205
145097
|
if (!skipConfirmation && !await confirm(
|
@@ -145222,14 +145114,14 @@ async function removeDomain(output2, client2, contextName, skipConfirmation, dom
|
|
145222
145114
|
attempt + 1
|
145223
145115
|
);
|
145224
145116
|
}
|
145225
|
-
output2.success(`Domain ${
|
145117
|
+
output2.success(`Domain ${import_chalk78.default.bold(domain.name)} removed ${removeStamp()}`);
|
145226
145118
|
return 0;
|
145227
145119
|
}
|
145228
|
-
var
|
145120
|
+
var import_chalk78, import_pluralize9;
|
145229
145121
|
var init_rm4 = __esm({
|
145230
145122
|
"src/commands/domains/rm.ts"() {
|
145231
145123
|
"use strict";
|
145232
|
-
|
145124
|
+
import_chalk78 = __toESM3(require_source());
|
145233
145125
|
import_pluralize9 = __toESM3(require_pluralize());
|
145234
145126
|
init_errors_ts();
|
145235
145127
|
init_delete_cert_by_id();
|
@@ -145304,7 +145196,7 @@ var init_get_domain_aliases = __esm({
|
|
145304
145196
|
async function move2(client2, opts, args2) {
|
145305
145197
|
const { output: output2 } = client2;
|
145306
145198
|
const { contextName, user } = await getScope(client2);
|
145307
|
-
const { domainName, destination } = await getArgs2(args2);
|
145199
|
+
const { domainName, destination } = await getArgs2(client2, args2);
|
145308
145200
|
if (!isRootDomain(domainName)) {
|
145309
145201
|
output2.error(
|
145310
145202
|
`Invalid domain name "${domainName}". Run ${getCommandName(
|
@@ -145315,15 +145207,15 @@ async function move2(client2, opts, args2) {
|
|
145315
145207
|
}
|
145316
145208
|
const domain = await getDomainByName(client2, contextName, domainName);
|
145317
145209
|
if (domain instanceof DomainNotFound) {
|
145318
|
-
output2.error(`Domain not found under ${
|
145210
|
+
output2.error(`Domain not found under ${import_chalk79.default.bold(contextName)}`);
|
145319
145211
|
output2.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
145320
145212
|
return 1;
|
145321
145213
|
}
|
145322
145214
|
if (domain instanceof DomainPermissionDenied) {
|
145323
145215
|
output2.error(
|
145324
|
-
`You don't have permissions over domain ${
|
145216
|
+
`You don't have permissions over domain ${import_chalk79.default.underline(
|
145325
145217
|
domain.meta.domain
|
145326
|
-
)} under ${
|
145218
|
+
)} under ${import_chalk79.default.bold(domain.meta.context)}.`
|
145327
145219
|
);
|
145328
145220
|
return 1;
|
145329
145221
|
}
|
@@ -145354,7 +145246,7 @@ async function move2(client2, opts, args2) {
|
|
145354
145246
|
const aliases = await getDomainAliases(client2, domainName);
|
145355
145247
|
if (aliases.length > 0) {
|
145356
145248
|
output2.warn(
|
145357
|
-
`This domain's ${
|
145249
|
+
`This domain's ${import_chalk79.default.bold(
|
145358
145250
|
(0, import_pluralize10.default)("alias", aliases.length, true)
|
145359
145251
|
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
145360
145252
|
);
|
@@ -145396,21 +145288,21 @@ async function move2(client2, opts, args2) {
|
|
145396
145288
|
return 1;
|
145397
145289
|
}
|
145398
145290
|
if (moveTokenResult instanceof DomainNotFound) {
|
145399
|
-
output2.error(`Domain not found under ${
|
145291
|
+
output2.error(`Domain not found under ${import_chalk79.default.bold(contextName)}`);
|
145400
145292
|
output2.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
145401
145293
|
return 1;
|
145402
145294
|
}
|
145403
145295
|
if (moveTokenResult instanceof DomainPermissionDenied) {
|
145404
145296
|
output2.error(
|
145405
|
-
`You don't have permissions over domain ${
|
145297
|
+
`You don't have permissions over domain ${import_chalk79.default.underline(
|
145406
145298
|
moveTokenResult.meta.domain
|
145407
|
-
)} under ${
|
145299
|
+
)} under ${import_chalk79.default.bold(moveTokenResult.meta.context)}.`
|
145408
145300
|
);
|
145409
145301
|
return 1;
|
145410
145302
|
}
|
145411
145303
|
if (moveTokenResult instanceof InvalidMoveDestination) {
|
145412
145304
|
output2.error(
|
145413
|
-
`Destination ${
|
145305
|
+
`Destination ${import_chalk79.default.bold(
|
145414
145306
|
destination
|
145415
145307
|
)} is invalid. Please supply a valid username, email, team slug, user id, or team id.`
|
145416
145308
|
);
|
@@ -145428,18 +145320,18 @@ async function move2(client2, opts, args2) {
|
|
145428
145320
|
}
|
145429
145321
|
return 0;
|
145430
145322
|
}
|
145431
|
-
async function getArgs2(args2) {
|
145323
|
+
async function getArgs2(client2, args2) {
|
145432
145324
|
let [domainName, destination] = args2;
|
145433
145325
|
if (!domainName) {
|
145434
|
-
domainName = await text({
|
145435
|
-
|
145436
|
-
|
145326
|
+
domainName = await client2.input.text({
|
145327
|
+
message: `- Domain name: `,
|
145328
|
+
validate: isRootDomain
|
145437
145329
|
});
|
145438
145330
|
}
|
145439
145331
|
if (!destination) {
|
145440
|
-
destination = await text({
|
145441
|
-
|
145442
|
-
|
145332
|
+
destination = await client2.input.text({
|
145333
|
+
message: `- Destination: `,
|
145334
|
+
validate: (v) => Boolean(v && v.length > 0)
|
145443
145335
|
});
|
145444
145336
|
}
|
145445
145337
|
return { domainName, destination };
|
@@ -145455,17 +145347,16 @@ async function findDestinationMatch(destination, user, teams) {
|
|
145455
145347
|
}
|
145456
145348
|
return null;
|
145457
145349
|
}
|
145458
|
-
var
|
145350
|
+
var import_chalk79, import_pluralize10;
|
145459
145351
|
var init_move = __esm({
|
145460
145352
|
"src/commands/domains/move.ts"() {
|
145461
145353
|
"use strict";
|
145462
|
-
|
145354
|
+
import_chalk79 = __toESM3(require_source());
|
145463
145355
|
import_pluralize10 = __toESM3(require_pluralize());
|
145464
145356
|
init_errors_ts();
|
145465
145357
|
init_get_scope();
|
145466
145358
|
init_move_out_domain();
|
145467
145359
|
init_is_root_domain();
|
145468
|
-
init_text();
|
145469
145360
|
init_param();
|
145470
145361
|
init_get_domain_aliases();
|
145471
145362
|
init_get_domain_by_name();
|
@@ -145619,6 +145510,23 @@ var init_command10 = __esm({
|
|
145619
145510
|
}
|
145620
145511
|
});
|
145621
145512
|
|
145513
|
+
// src/util/telemetry/commands/domains/index.ts
|
145514
|
+
var DomainsTelemetryClient;
|
145515
|
+
var init_domains = __esm({
|
145516
|
+
"src/util/telemetry/commands/domains/index.ts"() {
|
145517
|
+
"use strict";
|
145518
|
+
init_telemetry();
|
145519
|
+
DomainsTelemetryClient = class extends TelemetryClient {
|
145520
|
+
trackCliSubcommandTransferIn(actual) {
|
145521
|
+
this.trackCliSubcommand({
|
145522
|
+
subcommand: "transfer-in",
|
145523
|
+
value: actual
|
145524
|
+
});
|
145525
|
+
}
|
145526
|
+
};
|
145527
|
+
}
|
145528
|
+
});
|
145529
|
+
|
145622
145530
|
// src/commands/domains/index.ts
|
145623
145531
|
var domains_exports = {};
|
145624
145532
|
__export3(domains_exports, {
|
@@ -145633,12 +145541,18 @@ async function main5(client2) {
|
|
145633
145541
|
handleError(error3);
|
145634
145542
|
return 1;
|
145635
145543
|
}
|
145636
|
-
const { output: output2 } = client2;
|
145544
|
+
const { output: output2, telemetryEventStore } = client2;
|
145545
|
+
const telemetry = new DomainsTelemetryClient({
|
145546
|
+
opts: {
|
145547
|
+
store: telemetryEventStore,
|
145548
|
+
output: output2
|
145549
|
+
}
|
145550
|
+
});
|
145637
145551
|
if (parsedArgs.flags["--help"]) {
|
145638
145552
|
output2.print(help2(domainsCommand, { columns: client2.stderr.columns }));
|
145639
145553
|
return 2;
|
145640
145554
|
}
|
145641
|
-
const { subcommand, args: args2 } = getSubcommand(
|
145555
|
+
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
145642
145556
|
parsedArgs.args.slice(1),
|
145643
145557
|
COMMAND_CONFIG5
|
145644
145558
|
);
|
@@ -145654,13 +145568,14 @@ async function main5(client2) {
|
|
145654
145568
|
case "rm":
|
145655
145569
|
return rm4(client2, parsedArgs.flags, args2);
|
145656
145570
|
case "transferIn":
|
145571
|
+
telemetry.trackCliSubcommandTransferIn(subcommandOriginal);
|
145657
145572
|
return transferIn(client2, parsedArgs.flags, args2);
|
145658
145573
|
default:
|
145659
145574
|
return ls4(client2, parsedArgs.flags, args2);
|
145660
145575
|
}
|
145661
145576
|
}
|
145662
145577
|
var COMMAND_CONFIG5;
|
145663
|
-
var
|
145578
|
+
var init_domains2 = __esm({
|
145664
145579
|
"src/commands/domains/index.ts"() {
|
145665
145580
|
"use strict";
|
145666
145581
|
init_get_args();
|
@@ -145668,7 +145583,7 @@ var init_domains = __esm({
|
|
145668
145583
|
init_handle_error();
|
145669
145584
|
init_add3();
|
145670
145585
|
init_buy();
|
145671
|
-
|
145586
|
+
init_transfer_in2();
|
145672
145587
|
init_inspect();
|
145673
145588
|
init_ls4();
|
145674
145589
|
init_rm4();
|
@@ -145676,6 +145591,7 @@ var init_domains = __esm({
|
|
145676
145591
|
init_command10();
|
145677
145592
|
init_help();
|
145678
145593
|
init_get_flags_specification();
|
145594
|
+
init_domains();
|
145679
145595
|
COMMAND_CONFIG5 = {
|
145680
145596
|
add: ["add"],
|
145681
145597
|
buy: ["buy"],
|
@@ -145936,20 +145852,20 @@ async function add5(client2, link4, opts, args2) {
|
|
145936
145852
|
}
|
145937
145853
|
output2.print(
|
145938
145854
|
`${prependEmoji(
|
145939
|
-
`${opts["--force"] ? "Overrode" : "Added"} Environment Variable ${
|
145855
|
+
`${opts["--force"] ? "Overrode" : "Added"} Environment Variable ${import_chalk80.default.bold(envName)} to Project ${import_chalk80.default.bold(
|
145940
145856
|
project.name
|
145941
|
-
)} ${
|
145857
|
+
)} ${import_chalk80.default.gray(addStamp())}`,
|
145942
145858
|
emoji("success")
|
145943
145859
|
)}
|
145944
145860
|
`
|
145945
145861
|
);
|
145946
145862
|
return 0;
|
145947
145863
|
}
|
145948
|
-
var
|
145864
|
+
var import_chalk80;
|
145949
145865
|
var init_add4 = __esm({
|
145950
145866
|
"src/commands/env/add.ts"() {
|
145951
145867
|
"use strict";
|
145952
|
-
|
145868
|
+
import_chalk80 = __toESM3(require_source());
|
145953
145869
|
init_stamp();
|
145954
145870
|
init_add_env_record();
|
145955
145871
|
init_get_env_records();
|
@@ -145978,18 +145894,18 @@ var init_ellipsis = __esm({
|
|
145978
145894
|
function formatEnvironment(client2, orgSlug, projectSlug, environment) {
|
145979
145895
|
const { output: output2 } = client2;
|
145980
145896
|
const projectUrl = `https://vercel.com/${orgSlug}/${projectSlug}`;
|
145981
|
-
const boldName =
|
145897
|
+
const boldName = import_chalk81.default.bold(environment.name);
|
145982
145898
|
return output2.link(
|
145983
145899
|
boldName,
|
145984
145900
|
`${projectUrl}/settings/environments/${environment.id}`,
|
145985
145901
|
{ fallback: () => boldName, color: false }
|
145986
145902
|
);
|
145987
145903
|
}
|
145988
|
-
var
|
145904
|
+
var import_chalk81;
|
145989
145905
|
var init_format_environment = __esm({
|
145990
145906
|
"src/util/target/format-environment.ts"() {
|
145991
145907
|
"use strict";
|
145992
|
-
|
145908
|
+
import_chalk81 = __toESM3(require_source());
|
145993
145909
|
}
|
145994
145910
|
});
|
145995
145911
|
|
@@ -146041,11 +145957,11 @@ async function ls5(client2, link4, opts, args2) {
|
|
146041
145957
|
const projectSlugLink = formatProject(client2, org.slug, project.name);
|
146042
145958
|
if (envs.length === 0) {
|
146043
145959
|
output2.log(
|
146044
|
-
`No Environment Variables found for ${projectSlugLink} ${
|
145960
|
+
`No Environment Variables found for ${projectSlugLink} ${import_chalk82.default.gray(lsStamp())}`
|
146045
145961
|
);
|
146046
145962
|
} else {
|
146047
145963
|
output2.log(
|
146048
|
-
`Environment Variables found for ${projectSlugLink} ${
|
145964
|
+
`Environment Variables found for ${projectSlugLink} ${import_chalk82.default.gray(lsStamp())}`
|
146049
145965
|
);
|
146050
145966
|
client2.stdout.write(`${getTable(client2, link4, envs, customEnvs)}
|
146051
145967
|
`);
|
@@ -146069,25 +145985,25 @@ function getRow(client2, link4, env, customEnvironments) {
|
|
146069
145985
|
let value;
|
146070
145986
|
if (env.type === "plain") {
|
146071
145987
|
const singleLineValue = env.value.replace(/\s/g, " ");
|
146072
|
-
value =
|
145988
|
+
value = import_chalk82.default.gray(ellipsis(singleLineValue, 19));
|
146073
145989
|
} else if (env.type === "system") {
|
146074
|
-
value =
|
145990
|
+
value = import_chalk82.default.gray.italic(env.value);
|
146075
145991
|
} else {
|
146076
|
-
value =
|
145992
|
+
value = import_chalk82.default.gray.italic("Encrypted");
|
146077
145993
|
}
|
146078
145994
|
const now = Date.now();
|
146079
145995
|
return [
|
146080
|
-
|
145996
|
+
import_chalk82.default.bold(env.key),
|
146081
145997
|
value,
|
146082
145998
|
formatEnvironments(client2, link4, env, customEnvironments),
|
146083
145999
|
env.createdAt ? `${(0, import_ms16.default)(now - env.createdAt)} ago` : ""
|
146084
146000
|
];
|
146085
146001
|
}
|
146086
|
-
var
|
146002
|
+
var import_chalk82, import_ms16;
|
146087
146003
|
var init_ls5 = __esm({
|
146088
146004
|
"src/commands/env/ls.ts"() {
|
146089
146005
|
"use strict";
|
146090
|
-
|
146006
|
+
import_chalk82 = __toESM3(require_source());
|
146091
146007
|
import_ms16 = __toESM3(require_ms2());
|
146092
146008
|
init_format_table();
|
146093
146009
|
init_get_env_records();
|
@@ -146169,7 +146085,7 @@ async function rm5(client2, link4, opts, args2) {
|
|
146169
146085
|
link4,
|
146170
146086
|
env,
|
146171
146087
|
customEnvironments
|
146172
|
-
)} in Project ${
|
146088
|
+
)} in Project ${import_chalk83.default.bold(project.name)}. Are you sure?`,
|
146173
146089
|
false
|
146174
146090
|
)) {
|
146175
146091
|
output2.log("Canceled");
|
@@ -146188,18 +146104,18 @@ async function rm5(client2, link4, opts, args2) {
|
|
146188
146104
|
}
|
146189
146105
|
output2.print(
|
146190
146106
|
`${prependEmoji(
|
146191
|
-
`Removed Environment Variable ${
|
146107
|
+
`Removed Environment Variable ${import_chalk83.default.gray(rmStamp())}`,
|
146192
146108
|
emoji("success")
|
146193
146109
|
)}
|
146194
146110
|
`
|
146195
146111
|
);
|
146196
146112
|
return 0;
|
146197
146113
|
}
|
146198
|
-
var
|
146114
|
+
var import_chalk83;
|
146199
146115
|
var init_rm5 = __esm({
|
146200
146116
|
"src/commands/env/rm.ts"() {
|
146201
146117
|
"use strict";
|
146202
|
-
|
146118
|
+
import_chalk83 = __toESM3(require_source());
|
146203
146119
|
init_confirm();
|
146204
146120
|
init_remove_env_record();
|
146205
146121
|
init_get_env_records();
|
@@ -146496,7 +146412,7 @@ async function connect(client2, argv, args2, project, org) {
|
|
146496
146412
|
const repoArg = args2[0];
|
146497
146413
|
if (args2.length > 1) {
|
146498
146414
|
output2.error(
|
146499
|
-
`Invalid number of arguments. Usage: ${
|
146415
|
+
`Invalid number of arguments. Usage: ${import_chalk84.default.cyan(
|
146500
146416
|
`${getCommandName("project connect")}`
|
146501
146417
|
)}`
|
146502
146418
|
);
|
@@ -146542,7 +146458,7 @@ async function connect(client2, argv, args2, project, org) {
|
|
146542
146458
|
}
|
146543
146459
|
if (!gitConfig) {
|
146544
146460
|
output2.error(
|
146545
|
-
`No local Git repository found. Run ${
|
146461
|
+
`No local Git repository found. Run ${import_chalk84.default.cyan(
|
146546
146462
|
"`git clone <url>`"
|
146547
146463
|
)} to clone a remote Git repository first.`
|
146548
146464
|
);
|
@@ -146551,7 +146467,7 @@ async function connect(client2, argv, args2, project, org) {
|
|
146551
146467
|
const remoteUrls = pluckRemoteUrls(gitConfig);
|
146552
146468
|
if (!remoteUrls) {
|
146553
146469
|
output2.error(
|
146554
|
-
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${
|
146470
|
+
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${import_chalk84.default.cyan(
|
146555
146471
|
"`git remote --help`"
|
146556
146472
|
)} for more details.`
|
146557
146473
|
);
|
@@ -146595,7 +146511,7 @@ async function connect(client2, argv, args2, project, org) {
|
|
146595
146511
|
return checkAndConnect;
|
146596
146512
|
}
|
146597
146513
|
output2.log(
|
146598
|
-
`Connected ${formatProvider(provider)} repository ${
|
146514
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk84.default.cyan(repoPath)}!`
|
146599
146515
|
);
|
146600
146516
|
return 0;
|
146601
146517
|
}
|
@@ -146632,7 +146548,7 @@ async function connectArg({
|
|
146632
146548
|
return connect2;
|
146633
146549
|
}
|
146634
146550
|
client2.output.log(
|
146635
|
-
`Connected ${formatProvider(provider)} repository ${
|
146551
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk84.default.cyan(repoPath)}!`
|
146636
146552
|
);
|
146637
146553
|
return 0;
|
146638
146554
|
}
|
@@ -146674,7 +146590,7 @@ async function connectArgWithLocalGit({
|
|
146674
146590
|
return connect2;
|
146675
146591
|
}
|
146676
146592
|
client2.output.log(
|
146677
|
-
`Connected ${formatProvider(provider)} repository ${
|
146593
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk84.default.cyan(
|
146678
146594
|
repoPath
|
146679
146595
|
)}!`
|
146680
146596
|
);
|
@@ -146707,7 +146623,7 @@ async function promptConnectArg({
|
|
146707
146623
|
return true;
|
146708
146624
|
}
|
146709
146625
|
client2.output.log(
|
146710
|
-
`Found a repository in your local Git Config: ${
|
146626
|
+
`Found a repository in your local Git Config: ${import_chalk84.default.cyan(
|
146711
146627
|
Object.values(remoteUrls)[0]
|
146712
146628
|
)}`
|
146713
146629
|
);
|
@@ -146756,7 +146672,7 @@ async function checkExistsAndConnect({
|
|
146756
146672
|
const isSameRepo = connectedProvider === provider && connectedOrg === gitOrg && connectedRepo === repo;
|
146757
146673
|
if (isSameRepo) {
|
146758
146674
|
client2.output.log(
|
146759
|
-
`${
|
146675
|
+
`${import_chalk84.default.cyan(connectedRepoPath)} is already connected to your project.`
|
146760
146676
|
);
|
146761
146677
|
return 1;
|
146762
146678
|
}
|
@@ -146789,7 +146705,7 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
|
|
146789
146705
|
client2,
|
146790
146706
|
`Looks like you already have a ${formatProvider(
|
146791
146707
|
connectedProvider
|
146792
|
-
)} repository connected: ${
|
146708
|
+
)} repository connected: ${import_chalk84.default.cyan(
|
146793
146709
|
connectedRepoPath
|
146794
146710
|
)}. Do you want to replace it?`,
|
146795
146711
|
true
|
@@ -146804,7 +146720,7 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
146804
146720
|
let choices = [];
|
146805
146721
|
for (const [urlKey, urlValue] of Object.entries(remoteUrls)) {
|
146806
146722
|
choices.push({
|
146807
|
-
name: `${urlValue} ${
|
146723
|
+
name: `${urlValue} ${import_chalk84.default.gray(`(${urlKey})`)}`,
|
146808
146724
|
value: urlValue,
|
146809
146725
|
short: urlKey
|
146810
146726
|
});
|
@@ -146814,11 +146730,11 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
146814
146730
|
choices
|
146815
146731
|
});
|
146816
146732
|
}
|
146817
|
-
var
|
146733
|
+
var import_chalk84, import_path41;
|
146818
146734
|
var init_connect = __esm({
|
146819
146735
|
"src/commands/git/connect.ts"() {
|
146820
146736
|
"use strict";
|
146821
|
-
|
146737
|
+
import_chalk84 = __toESM3(require_source());
|
146822
146738
|
import_path41 = require("path");
|
146823
146739
|
init_create_git_meta();
|
146824
146740
|
init_confirm();
|
@@ -146834,7 +146750,7 @@ async function disconnect(client2, args2, project, org) {
|
|
146834
146750
|
const { output: output2 } = client2;
|
146835
146751
|
if (args2.length !== 0) {
|
146836
146752
|
output2.error(
|
146837
|
-
`Invalid number of arguments. Usage: ${
|
146753
|
+
`Invalid number of arguments. Usage: ${import_chalk85.default.cyan(
|
146838
146754
|
`${getCommandName("project disconnect")}`
|
146839
146755
|
)}`
|
146840
146756
|
);
|
@@ -146852,14 +146768,14 @@ async function disconnect(client2, args2, project, org) {
|
|
146852
146768
|
);
|
146853
146769
|
const confirmDisconnect = await confirm(
|
146854
146770
|
client2,
|
146855
|
-
`Are you sure you want to disconnect ${
|
146771
|
+
`Are you sure you want to disconnect ${import_chalk85.default.cyan(
|
146856
146772
|
`${linkOrg}/${repo}`
|
146857
146773
|
)} from your project?`,
|
146858
146774
|
false
|
146859
146775
|
);
|
146860
146776
|
if (confirmDisconnect) {
|
146861
146777
|
await disconnectGitProvider(client2, org, project.id);
|
146862
|
-
output2.log(`Disconnected ${
|
146778
|
+
output2.log(`Disconnected ${import_chalk85.default.cyan(`${linkOrg}/${repo}`)}.`);
|
146863
146779
|
} else {
|
146864
146780
|
output2.log("Canceled");
|
146865
146781
|
}
|
@@ -146873,11 +146789,11 @@ async function disconnect(client2, args2, project, org) {
|
|
146873
146789
|
}
|
146874
146790
|
return 0;
|
146875
146791
|
}
|
146876
|
-
var
|
146792
|
+
var import_chalk85;
|
146877
146793
|
var init_disconnect = __esm({
|
146878
146794
|
"src/commands/git/disconnect.ts"() {
|
146879
146795
|
"use strict";
|
146880
|
-
|
146796
|
+
import_chalk85 = __toESM3(require_source());
|
146881
146797
|
init_confirm();
|
146882
146798
|
init_pkg_name();
|
146883
146799
|
init_connect_git_provider();
|
@@ -147007,11 +146923,11 @@ var init_git = __esm({
|
|
147007
146923
|
});
|
147008
146924
|
|
147009
146925
|
// src/util/output/list-item.ts
|
147010
|
-
var
|
146926
|
+
var import_chalk86, listItem, list_item_default;
|
147011
146927
|
var init_list_item = __esm({
|
147012
146928
|
"src/util/output/list-item.ts"() {
|
147013
146929
|
"use strict";
|
147014
|
-
|
146930
|
+
import_chalk86 = __toESM3(require_source());
|
147015
146931
|
listItem = (msg, n) => {
|
147016
146932
|
if (!n) {
|
147017
146933
|
n = "-";
|
@@ -147019,7 +146935,7 @@ var init_list_item = __esm({
|
|
147019
146935
|
if (Number(n)) {
|
147020
146936
|
n += ".";
|
147021
146937
|
}
|
147022
|
-
return `${(0,
|
146938
|
+
return `${(0, import_chalk86.default)(n.toString())} ${msg}`;
|
147023
146939
|
};
|
147024
146940
|
list_item_default = listItem;
|
147025
146941
|
}
|
@@ -147211,9 +147127,9 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
147211
147127
|
extractor.on("finish", resolve12);
|
147212
147128
|
res.body.pipe(extractor);
|
147213
147129
|
});
|
147214
|
-
const successLog = `Initialized "${
|
147130
|
+
const successLog = `Initialized "${import_chalk87.default.bold(
|
147215
147131
|
name
|
147216
|
-
)}" example in ${
|
147132
|
+
)}" example in ${import_chalk87.default.bold(humanizePath(folder))}.`;
|
147217
147133
|
const folderRel = import_path42.default.relative(client2.cwd, folder);
|
147218
147134
|
const deployHint = folderRel === "" ? list_item_default(`To deploy, run ${getCommandName()}.`) : list_item_default(
|
147219
147135
|
`To deploy, ${cmd(
|
@@ -147233,14 +147149,14 @@ function prepareFolder(cwd, folder, force) {
|
|
147233
147149
|
if (import_fs8.default.existsSync(dest)) {
|
147234
147150
|
if (!import_fs8.default.lstatSync(dest).isDirectory()) {
|
147235
147151
|
throw new Error(
|
147236
|
-
`Destination path "${
|
147152
|
+
`Destination path "${import_chalk87.default.bold(
|
147237
147153
|
folder
|
147238
147154
|
)}" already exists and is not a directory.`
|
147239
147155
|
);
|
147240
147156
|
}
|
147241
147157
|
if (!force && import_fs8.default.readdirSync(dest).length !== 0) {
|
147242
147158
|
throw new Error(
|
147243
|
-
`Destination path "${
|
147159
|
+
`Destination path "${import_chalk87.default.bold(
|
147244
147160
|
folder
|
147245
147161
|
)}" already exists and is not an empty directory. You may use ${cmd(
|
147246
147162
|
"--force"
|
@@ -147251,14 +147167,14 @@ function prepareFolder(cwd, folder, force) {
|
|
147251
147167
|
try {
|
147252
147168
|
import_fs8.default.mkdirSync(dest);
|
147253
147169
|
} catch (e2) {
|
147254
|
-
throw new Error(`Could not create directory "${
|
147170
|
+
throw new Error(`Could not create directory "${import_chalk87.default.bold(folder)}".`);
|
147255
147171
|
}
|
147256
147172
|
}
|
147257
147173
|
return dest;
|
147258
147174
|
}
|
147259
147175
|
async function guess(client2, exampleList, name) {
|
147260
147176
|
const GuessError = new Error(
|
147261
|
-
`No example found for ${
|
147177
|
+
`No example found for ${import_chalk87.default.bold(name)}, run ${getCommandName(
|
147262
147178
|
`init`
|
147263
147179
|
)} to see the list of available examples.`
|
147264
147180
|
);
|
@@ -147267,21 +147183,21 @@ async function guess(client2, exampleList, name) {
|
|
147267
147183
|
}
|
147268
147184
|
const found = did_you_mean_default(name, exampleList, 0.7);
|
147269
147185
|
if (typeof found === "string") {
|
147270
|
-
if (await confirm(client2, `Did you mean ${
|
147186
|
+
if (await confirm(client2, `Did you mean ${import_chalk87.default.bold(found)}?`, false)) {
|
147271
147187
|
return found;
|
147272
147188
|
}
|
147273
147189
|
} else {
|
147274
147190
|
throw GuessError;
|
147275
147191
|
}
|
147276
147192
|
}
|
147277
|
-
var import_fs8, import_path42, import_tar_fs,
|
147193
|
+
var import_fs8, import_path42, import_tar_fs, import_chalk87, EXAMPLE_API;
|
147278
147194
|
var init_init = __esm({
|
147279
147195
|
"src/commands/init/init.ts"() {
|
147280
147196
|
"use strict";
|
147281
147197
|
import_fs8 = __toESM3(require("fs"));
|
147282
147198
|
import_path42 = __toESM3(require("path"));
|
147283
147199
|
import_tar_fs = __toESM3(require_tar_fs());
|
147284
|
-
|
147200
|
+
import_chalk87 = __toESM3(require_source());
|
147285
147201
|
init_list();
|
147286
147202
|
init_list_item();
|
147287
147203
|
init_confirm();
|
@@ -147407,11 +147323,11 @@ var init_build_state = __esm({
|
|
147407
147323
|
});
|
147408
147324
|
|
147409
147325
|
// src/util/output/builds.ts
|
147410
|
-
var
|
147326
|
+
var import_chalk88, import_bytes7, padding, MAX_BUILD_GROUPS, MAX_OUTPUTS_PER_GROUP, hasOutput, getCommonPath, styleBuild, styleHiddenBuilds, styleOutput, getDirPath, sortByEntrypoint, groupBuilds, builds_default;
|
147411
147327
|
var init_builds = __esm({
|
147412
147328
|
"src/util/output/builds.ts"() {
|
147413
147329
|
"use strict";
|
147414
|
-
|
147330
|
+
import_chalk88 = __toESM3(require_source());
|
147415
147331
|
import_bytes7 = __toESM3(require_bytes());
|
147416
147332
|
init_build_state();
|
147417
147333
|
padding = 8;
|
@@ -147440,48 +147356,48 @@ var init_builds = __esm({
|
|
147440
147356
|
styleBuild = (build2, times, longestSource) => {
|
147441
147357
|
const { entrypoint, id } = build2;
|
147442
147358
|
const time = typeof times[id] === "string" ? times[id] : "";
|
147443
|
-
let pathColor =
|
147359
|
+
let pathColor = import_chalk88.default.cyan;
|
147444
147360
|
if (isFailed(build2)) {
|
147445
|
-
pathColor =
|
147361
|
+
pathColor = import_chalk88.default.red;
|
147446
147362
|
}
|
147447
147363
|
const entry = entrypoint.padEnd(longestSource + padding);
|
147448
147364
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
147449
|
-
return `${
|
147365
|
+
return `${import_chalk88.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
147450
147366
|
};
|
147451
147367
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden2 = false) => {
|
147452
147368
|
const { id } = buildGroup[0];
|
147453
147369
|
const entry = commonPath.padEnd(longestSource + padding);
|
147454
147370
|
const time = typeof times[id] === "string" ? times[id] : "";
|
147455
147371
|
const prefix = isHidden2 === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
147456
|
-
let pathColor =
|
147372
|
+
let pathColor = import_chalk88.default.cyan;
|
147457
147373
|
if (buildGroup.every(isFailed)) {
|
147458
|
-
pathColor =
|
147374
|
+
pathColor = import_chalk88.default.red;
|
147459
147375
|
}
|
147460
147376
|
if (isHidden2) {
|
147461
|
-
pathColor =
|
147377
|
+
pathColor = import_chalk88.default.grey;
|
147462
147378
|
}
|
147463
|
-
return `${
|
147379
|
+
return `${import_chalk88.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
147464
147380
|
};
|
147465
147381
|
styleOutput = (output2, readyState, isLast) => {
|
147466
147382
|
const { type, path: path11, size, lambda } = output2;
|
147467
147383
|
const prefix = type === "lambda" ? "\u03BB " : "";
|
147468
|
-
const finalSize = size ? ` ${
|
147469
|
-
let color =
|
147384
|
+
const finalSize = size ? ` ${import_chalk88.default.grey(`(${(0, import_bytes7.default)(size)})`)}` : "";
|
147385
|
+
let color = import_chalk88.default.grey;
|
147470
147386
|
let finalRegion = "";
|
147471
147387
|
if (isReady({ readyState })) {
|
147472
|
-
color =
|
147388
|
+
color = import_chalk88.default;
|
147473
147389
|
} else if (isFailed({ readyState })) {
|
147474
|
-
color =
|
147390
|
+
color = import_chalk88.default.red;
|
147475
147391
|
}
|
147476
147392
|
if (lambda) {
|
147477
147393
|
const { deployedTo } = lambda;
|
147478
147394
|
if (deployedTo && deployedTo.length > 0) {
|
147479
|
-
finalRegion = ` ${
|
147395
|
+
finalRegion = ` ${import_chalk88.default.grey(`[${deployedTo.join(", ")}]`)}`;
|
147480
147396
|
}
|
147481
147397
|
}
|
147482
147398
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
147483
147399
|
const main15 = prefix + path11 + finalSize + finalRegion;
|
147484
|
-
return `${
|
147400
|
+
return `${import_chalk88.default.grey(corner)} ${color(main15)}`;
|
147485
147401
|
};
|
147486
147402
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
147487
147403
|
const parts = path11.split("/").slice(0, -1);
|
@@ -147613,7 +147529,7 @@ var init_builds = __esm({
|
|
147613
147529
|
);
|
147614
147530
|
if (outputs.length > MAX_OUTPUTS_PER_GROUP) {
|
147615
147531
|
final.push(
|
147616
|
-
|
147532
|
+
import_chalk88.default.grey(
|
147617
147533
|
`\u2514\u2500\u2500 ${outputs.length - MAX_OUTPUTS_PER_GROUP} output items hidden
|
147618
147534
|
`
|
147619
147535
|
)
|
@@ -147661,19 +147577,19 @@ function routes(routes2) {
|
|
147661
147577
|
const padding2 = 6;
|
147662
147578
|
const space = " ".repeat(padding2);
|
147663
147579
|
const destSpace = " ".repeat(longestDest || 10);
|
147664
|
-
const arrow =
|
147580
|
+
const arrow = import_chalk89.default.grey("->");
|
147665
147581
|
for (const item of routes2) {
|
147666
147582
|
if ("handle" in item) {
|
147667
|
-
toPrint += `${
|
147583
|
+
toPrint += `${import_chalk89.default.grey("\u2576")} ${import_chalk89.default.cyan(item.handle)}`;
|
147668
147584
|
continue;
|
147669
147585
|
}
|
147670
147586
|
const { src, dest, status, headers } = item;
|
147671
147587
|
const last = routes2.indexOf(item) === routes2.length - 1;
|
147672
147588
|
const suffix = last ? "" : `
|
147673
147589
|
`;
|
147674
|
-
const finalSrc =
|
147590
|
+
const finalSrc = import_chalk89.default.cyan(src.padEnd(longestSrc + padding2));
|
147675
147591
|
const finalDest = dest ? `${arrow}${space}${dest}` : ` ${space}${destSpace}`;
|
147676
|
-
const finalStatus = status ?
|
147592
|
+
const finalStatus = status ? import_chalk89.default.grey(`[${status}]`) : "";
|
147677
147593
|
let finalHeaders = null;
|
147678
147594
|
if (headers) {
|
147679
147595
|
finalHeaders = `
|
@@ -147684,21 +147600,21 @@ function routes(routes2) {
|
|
147684
147600
|
const last2 = headerKeys.indexOf(header) === headerKeys.length - 1;
|
147685
147601
|
const suffix2 = last2 ? "" : `
|
147686
147602
|
`;
|
147687
|
-
const prefix2 =
|
147603
|
+
const prefix2 = import_chalk89.default.grey(last2 ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500");
|
147688
147604
|
finalHeaders += `${prefix2} ${header}: ${value}${suffix2}`;
|
147689
147605
|
}
|
147690
147606
|
}
|
147691
|
-
const prefix =
|
147607
|
+
const prefix = import_chalk89.default.grey(finalHeaders ? "\u250C" : "\u2576");
|
147692
147608
|
const fill = `${finalSrc}${finalDest}${space}${finalStatus}`;
|
147693
147609
|
toPrint += `${prefix} ${fill}${finalHeaders || ""}${suffix}`;
|
147694
147610
|
}
|
147695
147611
|
return toPrint;
|
147696
147612
|
}
|
147697
|
-
var
|
147613
|
+
var import_chalk89, longestProperty;
|
147698
147614
|
var init_routes = __esm({
|
147699
147615
|
"src/util/output/routes.ts"() {
|
147700
147616
|
"use strict";
|
147701
|
-
|
147617
|
+
import_chalk89 = __toESM3(require_source());
|
147702
147618
|
longestProperty = (routes2, name) => {
|
147703
147619
|
const longestItem = routes2.sort((a, b) => {
|
147704
147620
|
const aName = a[name];
|
@@ -147836,7 +147752,7 @@ async function inspect3(client2) {
|
|
147836
147752
|
} catch {
|
147837
147753
|
}
|
147838
147754
|
client2.output.spinner(
|
147839
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
147755
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk90.default.bold(contextName)}`
|
147840
147756
|
);
|
147841
147757
|
let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
147842
147758
|
let abortController;
|
@@ -147863,7 +147779,7 @@ async function inspect3(client2) {
|
|
147863
147779
|
}
|
147864
147780
|
}
|
147865
147781
|
if (withLogs) {
|
147866
|
-
print(`${
|
147782
|
+
print(`${import_chalk90.default.cyan("status")} ${stateString(deployment.readyState)}
|
147867
147783
|
`);
|
147868
147784
|
} else {
|
147869
147785
|
await printDetails({ deployment, contextName, client: client2, startTimestamp });
|
@@ -147876,17 +147792,17 @@ function stateString(s) {
|
|
147876
147792
|
switch (s) {
|
147877
147793
|
case "INITIALIZING":
|
147878
147794
|
case "BUILDING":
|
147879
|
-
return
|
147795
|
+
return import_chalk90.default.yellow(CIRCLE) + sTitle;
|
147880
147796
|
case "ERROR":
|
147881
|
-
return
|
147797
|
+
return import_chalk90.default.red(CIRCLE) + sTitle;
|
147882
147798
|
case "READY":
|
147883
|
-
return
|
147799
|
+
return import_chalk90.default.green(CIRCLE) + sTitle;
|
147884
147800
|
case "QUEUED":
|
147885
|
-
return
|
147801
|
+
return import_chalk90.default.gray(CIRCLE) + sTitle;
|
147886
147802
|
case "CANCELED":
|
147887
|
-
return
|
147803
|
+
return import_chalk90.default.gray(CIRCLE) + sTitle;
|
147888
147804
|
default:
|
147889
|
-
return
|
147805
|
+
return import_chalk90.default.gray("UNKNOWN");
|
147890
147806
|
}
|
147891
147807
|
}
|
147892
147808
|
async function printDetails({
|
@@ -147896,7 +147812,7 @@ async function printDetails({
|
|
147896
147812
|
startTimestamp
|
147897
147813
|
}) {
|
147898
147814
|
client2.output.log(
|
147899
|
-
`Fetched deployment "${
|
147815
|
+
`Fetched deployment "${import_chalk90.default.bold(deployment.url)}" in ${import_chalk90.default.bold(
|
147900
147816
|
contextName
|
147901
147817
|
)} ${elapsed(Date.now() - startTimestamp)}`
|
147902
147818
|
);
|
@@ -147912,14 +147828,14 @@ async function printDetails({
|
|
147912
147828
|
const { print, link: link4 } = client2.output;
|
147913
147829
|
const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
|
147914
147830
|
print("\n");
|
147915
|
-
print(
|
147916
|
-
print(` ${
|
147831
|
+
print(import_chalk90.default.bold(" General\n\n"));
|
147832
|
+
print(` ${import_chalk90.default.cyan("id")} ${id}
|
147917
147833
|
`);
|
147918
|
-
print(` ${
|
147834
|
+
print(` ${import_chalk90.default.cyan("name")} ${name}
|
147919
147835
|
`);
|
147920
147836
|
const customEnvironmentName = deployment.customEnvironment?.name;
|
147921
147837
|
const target = customEnvironmentName ?? deployment.target ?? "preview";
|
147922
|
-
print(` ${
|
147838
|
+
print(` ${import_chalk90.default.cyan("target")} `);
|
147923
147839
|
print(
|
147924
147840
|
deployment.customEnvironment && deployment.team?.slug ? `${link4(
|
147925
147841
|
`${target}`,
|
@@ -147929,13 +147845,13 @@ async function printDetails({
|
|
147929
147845
|
` : `${target}
|
147930
147846
|
`
|
147931
147847
|
);
|
147932
|
-
print(` ${
|
147848
|
+
print(` ${import_chalk90.default.cyan("status")} ${stateString(readyState)}
|
147933
147849
|
`);
|
147934
|
-
print(` ${
|
147850
|
+
print(` ${import_chalk90.default.cyan("url")} https://${url3}
|
147935
147851
|
`);
|
147936
147852
|
if (createdAt) {
|
147937
147853
|
print(
|
147938
|
-
` ${
|
147854
|
+
` ${import_chalk90.default.cyan("created")} ${new Date(createdAt)} ${elapsed(
|
147939
147855
|
Date.now() - createdAt,
|
147940
147856
|
true
|
147941
147857
|
)}
|
@@ -147944,10 +147860,10 @@ async function printDetails({
|
|
147944
147860
|
}
|
147945
147861
|
print("\n\n");
|
147946
147862
|
if (aliases !== void 0 && aliases.length > 0) {
|
147947
|
-
print(
|
147863
|
+
print(import_chalk90.default.bold(" Aliases\n\n"));
|
147948
147864
|
let aliasList = "";
|
147949
147865
|
for (const alias2 of aliases) {
|
147950
|
-
aliasList += `${
|
147866
|
+
aliasList += `${import_chalk90.default.gray("\u2576")} https://${alias2}
|
147951
147867
|
`;
|
147952
147868
|
}
|
147953
147869
|
print(indent_default(aliasList, 4));
|
@@ -147959,12 +147875,12 @@ async function printDetails({
|
|
147959
147875
|
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
147960
147876
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
147961
147877
|
}
|
147962
|
-
print(
|
147878
|
+
print(import_chalk90.default.bold(" Builds\n\n"));
|
147963
147879
|
print(indent_default(builds_default(builds, times).toPrint, 4));
|
147964
147880
|
print("\n\n");
|
147965
147881
|
}
|
147966
147882
|
if (Array.isArray(routes2) && routes2.length > 0) {
|
147967
|
-
print(
|
147883
|
+
print(import_chalk90.default.bold(" Routes\n\n"));
|
147968
147884
|
print(indent_default(routes(routes2), 4));
|
147969
147885
|
print(`
|
147970
147886
|
|
@@ -147977,12 +147893,12 @@ function exitCode(state) {
|
|
147977
147893
|
}
|
147978
147894
|
return 0;
|
147979
147895
|
}
|
147980
|
-
var import_error_utils25,
|
147896
|
+
var import_error_utils25, import_chalk90, import_ms17, import_title5, import_url19;
|
147981
147897
|
var init_inspect2 = __esm({
|
147982
147898
|
"src/commands/inspect/index.ts"() {
|
147983
147899
|
"use strict";
|
147984
147900
|
import_error_utils25 = __toESM3(require_dist2());
|
147985
|
-
|
147901
|
+
import_chalk90 = __toESM3(require_source());
|
147986
147902
|
import_ms17 = __toESM3(require_ms2());
|
147987
147903
|
import_title5 = __toESM3(require_lib4());
|
147988
147904
|
import_url19 = require("url");
|
@@ -148292,7 +148208,7 @@ async function add6(client2, args2) {
|
|
148292
148208
|
}
|
148293
148209
|
const installation = teamInstallations[0];
|
148294
148210
|
client2.output.log(
|
148295
|
-
`Installing ${
|
148211
|
+
`Installing ${import_chalk91.default.bold(product.name)} by ${import_chalk91.default.bold(integration.name)} under ${import_chalk91.default.bold(contextName)}`
|
148296
148212
|
);
|
148297
148213
|
const metadataSchema = product.metadataSchema;
|
148298
148214
|
const metadataWizard = createMetadataWizard(metadataSchema);
|
@@ -148477,16 +148393,16 @@ async function selectBillingPlan(client2, billingPlans) {
|
|
148477
148393
|
}
|
148478
148394
|
async function confirmProductSelection(client2, product, name, metadata, billingPlan) {
|
148479
148395
|
client2.output.print("Selected product:\n");
|
148480
|
-
client2.output.print(`${
|
148396
|
+
client2.output.print(`${import_chalk91.default.dim(`- ${import_chalk91.default.bold(`Name:`)} ${name}`)}
|
148481
148397
|
`);
|
148482
148398
|
for (const [key, value] of Object.entries(metadata)) {
|
148483
148399
|
client2.output.print(
|
148484
|
-
`${
|
148400
|
+
`${import_chalk91.default.dim(`- ${import_chalk91.default.bold(`${product.metadataSchema.properties[key]["ui:label"]}:`)} ${value}`)}
|
148485
148401
|
`
|
148486
148402
|
);
|
148487
148403
|
}
|
148488
148404
|
client2.output.print(
|
148489
|
-
`${
|
148405
|
+
`${import_chalk91.default.dim(`- ${import_chalk91.default.bold(`Plan:`)} ${billingPlan.name}`)}
|
148490
148406
|
`
|
148491
148407
|
);
|
148492
148408
|
return client2.input.confirm({
|
@@ -148532,7 +148448,7 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
148532
148448
|
]
|
148533
148449
|
});
|
148534
148450
|
client2.output.spinner(
|
148535
|
-
`Connecting ${
|
148451
|
+
`Connecting ${import_chalk91.default.bold(name)} to ${import_chalk91.default.bold(project.name)}...`
|
148536
148452
|
);
|
148537
148453
|
try {
|
148538
148454
|
await connectStoreToProject(
|
@@ -148550,17 +148466,17 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
148550
148466
|
client2.output.stopSpinner();
|
148551
148467
|
}
|
148552
148468
|
client2.output.log(
|
148553
|
-
`${
|
148469
|
+
`${import_chalk91.default.bold(name)} successfully connected to ${import_chalk91.default.bold(project.name)}
|
148554
148470
|
|
148555
148471
|
${indent_default(`Run ${cmd(`${packageName} env pull`)} to update the environment variables`, 4)}`
|
148556
148472
|
);
|
148557
148473
|
return 0;
|
148558
148474
|
}
|
148559
|
-
var
|
148475
|
+
var import_chalk91, import_open3;
|
148560
148476
|
var init_add5 = __esm({
|
148561
148477
|
"src/commands/integration/add.ts"() {
|
148562
148478
|
"use strict";
|
148563
|
-
|
148479
|
+
import_chalk91 = __toESM3(require_source());
|
148564
148480
|
import_open3 = __toESM3(require_open());
|
148565
148481
|
init_format_table();
|
148566
148482
|
init_pkg_name();
|
@@ -149043,7 +148959,7 @@ async function list2(client2) {
|
|
149043
148959
|
}
|
149044
148960
|
const projectSlugLink = formatProject(client2, contextName, project.name);
|
149045
148961
|
if (!singleDeployment) {
|
149046
|
-
spinner(`Fetching deployments in ${
|
148962
|
+
spinner(`Fetching deployments in ${import_chalk92.default.bold(contextName)}`);
|
149047
148963
|
const start = Date.now();
|
149048
148964
|
debug3("Fetching deployments");
|
149049
148965
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
@@ -149083,7 +148999,7 @@ async function list2(client2) {
|
|
149083
148999
|
const urls = [];
|
149084
149000
|
const tablePrint = table(
|
149085
149001
|
[
|
149086
|
-
headers.map((header) =>
|
149002
|
+
headers.map((header) => import_chalk92.default.bold(import_chalk92.default.cyan(header))),
|
149087
149003
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
149088
149004
|
urls.push(`https://${dep.url}`);
|
149089
149005
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
@@ -149093,16 +149009,16 @@ async function list2(client2) {
|
|
149093
149009
|
const targetName = dep.customEnvironment?.name || (dep.target === "production" ? "Production" : "Preview");
|
149094
149010
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
149095
149011
|
return [
|
149096
|
-
|
149012
|
+
import_chalk92.default.gray(createdAt),
|
149097
149013
|
`https://${dep.url}`,
|
149098
149014
|
stateString2(dep.readyState || ""),
|
149099
149015
|
formatEnvironment(client2, contextName, project.name, {
|
149100
149016
|
id: targetSlug,
|
149101
149017
|
name: targetName
|
149102
149018
|
}),
|
149103
|
-
...!showPolicy ? [
|
149104
|
-
...!showPolicy ? [
|
149105
|
-
...showPolicy ? [
|
149019
|
+
...!showPolicy ? [import_chalk92.default.gray(getDeploymentDuration(dep))] : [],
|
149020
|
+
...!showPolicy ? [import_chalk92.default.gray(dep.creator?.username)] : [],
|
149021
|
+
...showPolicy ? [import_chalk92.default.gray(proposedExp)] : []
|
149106
149022
|
];
|
149107
149023
|
}).filter(
|
149108
149024
|
(app2) => (
|
@@ -149149,17 +149065,17 @@ function stateString2(s) {
|
|
149149
149065
|
case "BUILDING":
|
149150
149066
|
case "DEPLOYING":
|
149151
149067
|
case "ANALYZING":
|
149152
|
-
return
|
149068
|
+
return import_chalk92.default.yellow(CIRCLE) + sTitle;
|
149153
149069
|
case "ERROR":
|
149154
|
-
return
|
149070
|
+
return import_chalk92.default.red(CIRCLE) + sTitle;
|
149155
149071
|
case "READY":
|
149156
|
-
return
|
149072
|
+
return import_chalk92.default.green(CIRCLE) + sTitle;
|
149157
149073
|
case "QUEUED":
|
149158
|
-
return
|
149074
|
+
return import_chalk92.default.white(CIRCLE) + sTitle;
|
149159
149075
|
case "CANCELED":
|
149160
|
-
return
|
149076
|
+
return import_chalk92.default.gray(sTitle);
|
149161
149077
|
default:
|
149162
|
-
return
|
149078
|
+
return import_chalk92.default.gray("UNKNOWN");
|
149163
149079
|
}
|
149164
149080
|
}
|
149165
149081
|
function sortByCreatedAt(a, b) {
|
@@ -149175,12 +149091,12 @@ function filterUniqueApps() {
|
|
149175
149091
|
return true;
|
149176
149092
|
};
|
149177
149093
|
}
|
149178
|
-
var import_ms18,
|
149094
|
+
var import_ms18, import_chalk92, import_title6, import_error_utils26;
|
149179
149095
|
var init_list2 = __esm({
|
149180
149096
|
"src/commands/list/index.ts"() {
|
149181
149097
|
"use strict";
|
149182
149098
|
import_ms18 = __toESM3(require_ms2());
|
149183
|
-
|
149099
|
+
import_chalk92 = __toESM3(require_source());
|
149184
149100
|
import_title6 = __toESM3(require_lib4());
|
149185
149101
|
init_table();
|
149186
149102
|
init_get_args();
|
@@ -149266,7 +149182,7 @@ async function logs(client2) {
|
|
149266
149182
|
} catch {
|
149267
149183
|
}
|
149268
149184
|
spinner(
|
149269
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
149185
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk93.default.bold(contextName)}`
|
149270
149186
|
);
|
149271
149187
|
let deployment;
|
149272
149188
|
try {
|
@@ -149302,19 +149218,19 @@ function printDisclaimer(deployment, { print, warn }) {
|
|
149302
149218
|
`This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
|
149303
149219
|
);
|
149304
149220
|
print(
|
149305
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
149221
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk93.default.dim(
|
149306
149222
|
deployment.id
|
149307
|
-
)}) starting from ${
|
149223
|
+
)}) starting from ${import_chalk93.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
|
149308
149224
|
|
149309
149225
|
`
|
149310
149226
|
);
|
149311
149227
|
}
|
149312
|
-
var import_error_utils27,
|
149228
|
+
var import_error_utils27, import_chalk93, import_format2, deprecatedFlags, dateTimeFormat2;
|
149313
149229
|
var init_logs2 = __esm({
|
149314
149230
|
"src/commands/logs/index.ts"() {
|
149315
149231
|
"use strict";
|
149316
149232
|
import_error_utils27 = __toESM3(require_dist2());
|
149317
|
-
|
149233
|
+
import_chalk93 = __toESM3(require_source());
|
149318
149234
|
import_format2 = __toESM3(require_format());
|
149319
149235
|
init_build_state();
|
149320
149236
|
init_is_deploying();
|
@@ -149483,7 +149399,7 @@ async function login2(client2) {
|
|
149483
149399
|
writeToConfigFile(client2.config);
|
149484
149400
|
output2.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
149485
149401
|
output2.print(
|
149486
|
-
`${
|
149402
|
+
`${import_chalk94.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
149487
149403
|
`
|
149488
149404
|
);
|
149489
149405
|
output2.print(
|
@@ -149495,12 +149411,12 @@ async function login2(client2) {
|
|
149495
149411
|
);
|
149496
149412
|
return 0;
|
149497
149413
|
}
|
149498
|
-
var import_email_validator,
|
149414
|
+
var import_email_validator, import_chalk94;
|
149499
149415
|
var init_login2 = __esm({
|
149500
149416
|
"src/commands/login/index.ts"() {
|
149501
149417
|
"use strict";
|
149502
149418
|
import_email_validator = __toESM3(require_email_validator());
|
149503
|
-
|
149419
|
+
import_chalk94 = __toESM3(require_source());
|
149504
149420
|
init_humanize_path();
|
149505
149421
|
init_get_args();
|
149506
149422
|
init_prompt();
|
@@ -149625,12 +149541,12 @@ async function add7(client2, args2, contextName) {
|
|
149625
149541
|
const { output: output2 } = client2;
|
149626
149542
|
if (args2.length !== 1) {
|
149627
149543
|
output2.error(
|
149628
|
-
`Invalid number of arguments. Usage: ${
|
149544
|
+
`Invalid number of arguments. Usage: ${import_chalk95.default.cyan(
|
149629
149545
|
`${getCommandName("project add <name>")}`
|
149630
149546
|
)}`
|
149631
149547
|
);
|
149632
149548
|
if (args2.length > 1) {
|
149633
|
-
const example =
|
149549
|
+
const example = import_chalk95.default.cyan(
|
149634
149550
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
149635
149551
|
);
|
149636
149552
|
output2.log(
|
@@ -149656,17 +149572,17 @@ async function add7(client2, args2, contextName) {
|
|
149656
149572
|
}
|
149657
149573
|
const elapsed2 = (0, import_ms19.default)(Date.now() - start);
|
149658
149574
|
output2.log(
|
149659
|
-
`${
|
149575
|
+
`${import_chalk95.default.cyan("Success!")} Project ${import_chalk95.default.bold(
|
149660
149576
|
name.toLowerCase()
|
149661
|
-
)} added (${
|
149577
|
+
)} added (${import_chalk95.default.bold(contextName)}) ${import_chalk95.default.gray(`[${elapsed2}]`)}`
|
149662
149578
|
);
|
149663
149579
|
return;
|
149664
149580
|
}
|
149665
|
-
var
|
149581
|
+
var import_chalk95, import_ms19;
|
149666
149582
|
var init_add6 = __esm({
|
149667
149583
|
"src/commands/project/add.ts"() {
|
149668
149584
|
"use strict";
|
149669
|
-
|
149585
|
+
import_chalk95 = __toESM3(require_source());
|
149670
149586
|
import_ms19 = __toESM3(require_ms2());
|
149671
149587
|
init_errors_ts();
|
149672
149588
|
init_pkg_name();
|
@@ -149679,14 +149595,14 @@ async function list3(client2, argv, args2, contextName) {
|
|
149679
149595
|
const { output: output2 } = client2;
|
149680
149596
|
if (args2.length !== 0) {
|
149681
149597
|
output2.error(
|
149682
|
-
`Invalid number of arguments. Usage: ${
|
149598
|
+
`Invalid number of arguments. Usage: ${import_chalk96.default.cyan(
|
149683
149599
|
`${getCommandName("project ls")}`
|
149684
149600
|
)}`
|
149685
149601
|
);
|
149686
149602
|
return 2;
|
149687
149603
|
}
|
149688
149604
|
const start = Date.now();
|
149689
|
-
output2.spinner(`Fetching projects in ${
|
149605
|
+
output2.spinner(`Fetching projects in ${import_chalk96.default.bold(contextName)}`);
|
149690
149606
|
let projectsUrl = `/v9/projects?limit=20`;
|
149691
149607
|
const deprecated = argv["--update-required"] || false;
|
149692
149608
|
if (deprecated) {
|
@@ -149721,19 +149637,19 @@ async function list3(client2, argv, args2, contextName) {
|
|
149721
149637
|
);
|
149722
149638
|
}
|
149723
149639
|
output2.log(
|
149724
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
149640
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk96.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk96.default.gray(`[${elapsed2}]`)}`
|
149725
149641
|
);
|
149726
149642
|
if (projectList.length > 0) {
|
149727
149643
|
const tablePrint = table(
|
149728
149644
|
[
|
149729
149645
|
["Project Name", "Latest Production URL", "Updated"].map(
|
149730
|
-
(header) =>
|
149646
|
+
(header) => import_chalk96.default.bold(import_chalk96.default.cyan(header))
|
149731
149647
|
),
|
149732
149648
|
...projectList.map((project) => [
|
149733
149649
|
[
|
149734
|
-
|
149650
|
+
import_chalk96.default.bold(project.name),
|
149735
149651
|
getLatestProdUrl(project),
|
149736
|
-
|
149652
|
+
import_chalk96.default.gray((0, import_ms20.default)(Date.now() - project.updatedAt))
|
149737
149653
|
]
|
149738
149654
|
]).flat()
|
149739
149655
|
],
|
@@ -149757,11 +149673,11 @@ function getLatestProdUrl(project) {
|
|
149757
149673
|
return "https://" + alias2;
|
149758
149674
|
return "--";
|
149759
149675
|
}
|
149760
|
-
var
|
149676
|
+
var import_chalk96, import_ms20, import_build_utils17;
|
149761
149677
|
var init_list3 = __esm({
|
149762
149678
|
"src/commands/project/list.ts"() {
|
149763
149679
|
"use strict";
|
149764
|
-
|
149680
|
+
import_chalk96 = __toESM3(require_source());
|
149765
149681
|
import_ms20 = __toESM3(require_ms2());
|
149766
149682
|
init_table();
|
149767
149683
|
init_get_command_flags();
|
@@ -149774,7 +149690,7 @@ var init_list3 = __esm({
|
|
149774
149690
|
async function rm6(client2, args2) {
|
149775
149691
|
if (args2.length !== 1) {
|
149776
149692
|
client2.output.error(
|
149777
|
-
`Invalid number of arguments. Usage: ${
|
149693
|
+
`Invalid number of arguments. Usage: ${import_chalk97.default.cyan(
|
149778
149694
|
`${getCommandName("project rm <name>")}`
|
149779
149695
|
)}`
|
149780
149696
|
);
|
@@ -149803,7 +149719,7 @@ async function rm6(client2, args2) {
|
|
149803
149719
|
}
|
149804
149720
|
const elapsed2 = (0, import_ms21.default)(Date.now() - start);
|
149805
149721
|
client2.output.log(
|
149806
|
-
`${
|
149722
|
+
`${import_chalk97.default.cyan("Success!")} Project ${import_chalk97.default.bold(name)} removed ${import_chalk97.default.gray(
|
149807
149723
|
`[${elapsed2}]`
|
149808
149724
|
)}`
|
149809
149725
|
);
|
@@ -149812,19 +149728,19 @@ async function rm6(client2, args2) {
|
|
149812
149728
|
async function readConfirmation3(client2, projectName) {
|
149813
149729
|
client2.output.print(
|
149814
149730
|
prependEmoji(
|
149815
|
-
`The project ${
|
149731
|
+
`The project ${import_chalk97.default.bold(projectName)} will be removed permanently.
|
149816
149732
|
It will also delete everything under the project including deployments.
|
149817
149733
|
`,
|
149818
149734
|
emoji("warning")
|
149819
149735
|
)
|
149820
149736
|
);
|
149821
|
-
return await confirm(client2, `${
|
149737
|
+
return await confirm(client2, `${import_chalk97.default.bold.red("Are you sure?")}`, false);
|
149822
149738
|
}
|
149823
|
-
var
|
149739
|
+
var import_chalk97, import_ms21, e;
|
149824
149740
|
var init_rm6 = __esm({
|
149825
149741
|
"src/commands/project/rm.ts"() {
|
149826
149742
|
"use strict";
|
149827
|
-
|
149743
|
+
import_chalk97 = __toESM3(require_source());
|
149828
149744
|
import_ms21 = __toESM3(require_ms2());
|
149829
149745
|
init_emoji();
|
149830
149746
|
init_errors_ts();
|
@@ -150033,7 +149949,7 @@ async function getProjectByDeployment({
|
|
150033
149949
|
let team;
|
150034
149950
|
try {
|
150035
149951
|
output2?.spinner(
|
150036
|
-
`Fetching deployment "${deployId}" in ${
|
149952
|
+
`Fetching deployment "${deployId}" in ${import_chalk98.default.bold(contextName)}\u2026`
|
150037
149953
|
);
|
150038
149954
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
150039
149955
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -150050,12 +149966,12 @@ async function getProjectByDeployment({
|
|
150050
149966
|
team = teamResult.value;
|
150051
149967
|
deployment = deploymentResult.value;
|
150052
149968
|
output2?.log(
|
150053
|
-
`Fetching deployment "${deployId}" in ${
|
149969
|
+
`Fetching deployment "${deployId}" in ${import_chalk98.default.bold(contextName)}\u2026`
|
150054
149970
|
);
|
150055
149971
|
if (deployment.team?.id) {
|
150056
149972
|
if (!team || deployment.team.id !== team.id) {
|
150057
149973
|
const err = new Error(
|
150058
|
-
team ? `Deployment doesn't belong to current team ${
|
149974
|
+
team ? `Deployment doesn't belong to current team ${import_chalk98.default.bold(
|
150059
149975
|
contextName
|
150060
149976
|
)}` : `Deployment belongs to a different team`
|
150061
149977
|
);
|
@@ -150064,7 +149980,7 @@ async function getProjectByDeployment({
|
|
150064
149980
|
}
|
150065
149981
|
} else if (team) {
|
150066
149982
|
const err = new Error(
|
150067
|
-
`Deployment doesn't belong to current team ${
|
149983
|
+
`Deployment doesn't belong to current team ${import_chalk98.default.bold(contextName)}`
|
150068
149984
|
);
|
150069
149985
|
err.code = "ERR_INVALID_TEAM";
|
150070
149986
|
throw err;
|
@@ -150085,11 +150001,11 @@ async function getProjectByDeployment({
|
|
150085
150001
|
output2?.stopSpinner();
|
150086
150002
|
}
|
150087
150003
|
}
|
150088
|
-
var
|
150004
|
+
var import_chalk98;
|
150089
150005
|
var init_get_project_by_deployment = __esm({
|
150090
150006
|
"src/util/projects/get-project-by-deployment.ts"() {
|
150091
150007
|
"use strict";
|
150092
|
-
|
150008
|
+
import_chalk98 = __toESM3(require_source());
|
150093
150009
|
init_get_deployment();
|
150094
150010
|
init_get_project_by_id_or_name();
|
150095
150011
|
init_get_scope();
|
@@ -150102,21 +150018,21 @@ var init_get_project_by_deployment = __esm({
|
|
150102
150018
|
// src/util/alias/render-alias-status.ts
|
150103
150019
|
function renderAliasStatus(status) {
|
150104
150020
|
if (status === "completed") {
|
150105
|
-
return
|
150021
|
+
return import_chalk99.default.green(status);
|
150106
150022
|
}
|
150107
150023
|
if (status === "failed") {
|
150108
|
-
return
|
150024
|
+
return import_chalk99.default.red(status);
|
150109
150025
|
}
|
150110
150026
|
if (status === "skipped") {
|
150111
|
-
return
|
150027
|
+
return import_chalk99.default.gray(status);
|
150112
150028
|
}
|
150113
|
-
return
|
150029
|
+
return import_chalk99.default.yellow(status);
|
150114
150030
|
}
|
150115
|
-
var
|
150031
|
+
var import_chalk99;
|
150116
150032
|
var init_render_alias_status = __esm({
|
150117
150033
|
"src/util/alias/render-alias-status.ts"() {
|
150118
150034
|
"use strict";
|
150119
|
-
|
150035
|
+
import_chalk99 = __toESM3(require_source());
|
150120
150036
|
}
|
150121
150037
|
});
|
150122
150038
|
|
@@ -150191,7 +150107,7 @@ async function promoteStatus({
|
|
150191
150107
|
}
|
150192
150108
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
150193
150109
|
output2.log(
|
150194
|
-
`The promotion exceeded its deadline - rerun ${
|
150110
|
+
`The promotion exceeded its deadline - rerun ${import_chalk100.default.bold(
|
150195
150111
|
`${packageName} promote ${toDeploymentId}`
|
150196
150112
|
)} to try again`
|
150197
150113
|
);
|
@@ -150257,26 +150173,26 @@ async function renderJobSucceeded({
|
|
150257
150173
|
let deploymentInfo = "";
|
150258
150174
|
try {
|
150259
150175
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
150260
|
-
deploymentInfo = `${
|
150176
|
+
deploymentInfo = `${import_chalk100.default.bold(deployment.url)} (${toDeploymentId})`;
|
150261
150177
|
} catch (err) {
|
150262
150178
|
output2.debug(
|
150263
150179
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
150264
150180
|
);
|
150265
|
-
deploymentInfo =
|
150181
|
+
deploymentInfo = import_chalk100.default.bold(toDeploymentId);
|
150266
150182
|
}
|
150267
150183
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
150268
150184
|
output2.log(
|
150269
|
-
`Success! ${
|
150185
|
+
`Success! ${import_chalk100.default.bold(
|
150270
150186
|
project.name
|
150271
150187
|
)} was promoted to ${deploymentInfo} ${duration}`
|
150272
150188
|
);
|
150273
150189
|
return 0;
|
150274
150190
|
}
|
150275
|
-
var
|
150191
|
+
var import_chalk100, import_ms22;
|
150276
150192
|
var init_status = __esm({
|
150277
150193
|
"src/commands/promote/status.ts"() {
|
150278
150194
|
"use strict";
|
150279
|
-
|
150195
|
+
import_chalk100 = __toESM3(require_source());
|
150280
150196
|
init_elapsed();
|
150281
150197
|
init_format_date();
|
150282
150198
|
init_get_deployment();
|
@@ -150303,23 +150219,50 @@ async function requestPromote({
|
|
150303
150219
|
deployId,
|
150304
150220
|
output: client2.output
|
150305
150221
|
});
|
150306
|
-
|
150307
|
-
|
150308
|
-
|
150309
|
-
|
150310
|
-
|
150311
|
-
|
150222
|
+
let promoteByCreation = false;
|
150223
|
+
if (deployment.target !== "production") {
|
150224
|
+
if (yes) {
|
150225
|
+
promoteByCreation = true;
|
150226
|
+
} else {
|
150227
|
+
const question = "This deployment is not a production deployment and cannot be directly promoted. A new deployment will be built using your production environment. Are you sure you want to continue?";
|
150228
|
+
promoteByCreation = await confirm(client2, question, false);
|
150229
|
+
if (!promoteByCreation) {
|
150230
|
+
output2.error("Canceled");
|
150231
|
+
return 0;
|
150232
|
+
}
|
150312
150233
|
}
|
150313
150234
|
}
|
150314
|
-
|
150315
|
-
|
150316
|
-
|
150317
|
-
|
150318
|
-
|
150319
|
-
|
150235
|
+
if (promoteByCreation) {
|
150236
|
+
const newDeployment = await client2.fetch(
|
150237
|
+
`/v13/deployments?teamId=${deployment.ownerId}`,
|
150238
|
+
{
|
150239
|
+
body: {
|
150240
|
+
deploymentId: deployment.id,
|
150241
|
+
name: project.name,
|
150242
|
+
target: "production",
|
150243
|
+
meta: {
|
150244
|
+
action: "promote"
|
150245
|
+
}
|
150246
|
+
},
|
150247
|
+
accountId: deployment.ownerId,
|
150248
|
+
method: "POST"
|
150249
|
+
}
|
150250
|
+
);
|
150251
|
+
output2.log(
|
150252
|
+
`Successfully created new deployment of ${import_chalk101.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
150253
|
+
);
|
150254
|
+
return 0;
|
150255
|
+
} else {
|
150256
|
+
await client2.fetch(`/v10/projects/${project.id}/promote/${deployment.id}`, {
|
150257
|
+
body: {},
|
150258
|
+
// required
|
150259
|
+
json: false,
|
150260
|
+
method: "POST"
|
150261
|
+
});
|
150262
|
+
}
|
150320
150263
|
if (timeout !== void 0 && (0, import_ms23.default)(timeout) === 0) {
|
150321
150264
|
output2.log(
|
150322
|
-
`Successfully requested promote of ${
|
150265
|
+
`Successfully requested promote of ${import_chalk101.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
150323
150266
|
);
|
150324
150267
|
output2.log(`To check promote status, run ${getCommandName("promote")}.`);
|
150325
150268
|
return 0;
|
@@ -150332,11 +150275,11 @@ async function requestPromote({
|
|
150332
150275
|
timeout
|
150333
150276
|
});
|
150334
150277
|
}
|
150335
|
-
var
|
150278
|
+
var import_chalk101, import_ms23;
|
150336
150279
|
var init_request_promote = __esm({
|
150337
150280
|
"src/commands/promote/request-promote.ts"() {
|
150338
150281
|
"use strict";
|
150339
|
-
|
150282
|
+
import_chalk101 = __toESM3(require_source());
|
150340
150283
|
init_pkg_name();
|
150341
150284
|
init_get_project_by_deployment();
|
150342
150285
|
import_ms23 = __toESM3(require_ms2());
|
@@ -150498,7 +150441,7 @@ async function getDeploymentByIdOrURL({
|
|
150498
150441
|
let team;
|
150499
150442
|
try {
|
150500
150443
|
output2.spinner(
|
150501
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
150444
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk102.default.bold(contextName)}\u2026`
|
150502
150445
|
);
|
150503
150446
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
150504
150447
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -150515,7 +150458,7 @@ async function getDeploymentByIdOrURL({
|
|
150515
150458
|
team = teamResult.value;
|
150516
150459
|
deployment = deploymentResult.value;
|
150517
150460
|
output2.log(
|
150518
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
150461
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk102.default.bold(contextName)}\u2026`
|
150519
150462
|
);
|
150520
150463
|
} finally {
|
150521
150464
|
output2.stopSpinner();
|
@@ -150523,7 +150466,7 @@ async function getDeploymentByIdOrURL({
|
|
150523
150466
|
if (deployment.team?.id) {
|
150524
150467
|
if (!team || deployment.team.id !== team.id) {
|
150525
150468
|
const err = new Error(
|
150526
|
-
team ? `Deployment doesn't belong to current team ${
|
150469
|
+
team ? `Deployment doesn't belong to current team ${import_chalk102.default.bold(
|
150527
150470
|
contextName
|
150528
150471
|
)}` : `Deployment belongs to a different team`
|
150529
150472
|
);
|
@@ -150532,18 +150475,18 @@ async function getDeploymentByIdOrURL({
|
|
150532
150475
|
}
|
150533
150476
|
} else if (team) {
|
150534
150477
|
const err = new Error(
|
150535
|
-
`Deployment doesn't belong to current team ${
|
150478
|
+
`Deployment doesn't belong to current team ${import_chalk102.default.bold(contextName)}`
|
150536
150479
|
);
|
150537
150480
|
err.code = "ERR_INVALID_TEAM";
|
150538
150481
|
throw err;
|
150539
150482
|
}
|
150540
150483
|
return deployment;
|
150541
150484
|
}
|
150542
|
-
var
|
150485
|
+
var import_chalk102;
|
150543
150486
|
var init_get_deployment_by_id_or_url = __esm({
|
150544
150487
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
150545
150488
|
"use strict";
|
150546
|
-
|
150489
|
+
import_chalk102 = __toESM3(require_source());
|
150547
150490
|
init_get_deployment();
|
150548
150491
|
init_get_team_by_id();
|
150549
150492
|
init_is_valid_name();
|
@@ -150644,14 +150587,14 @@ async function redeploy(client2) {
|
|
150644
150587
|
const previewUrl = `https://${deployment.url}`;
|
150645
150588
|
output2.print(
|
150646
150589
|
`${prependEmoji(
|
150647
|
-
`Inspect: ${
|
150590
|
+
`Inspect: ${import_chalk103.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
150648
150591
|
emoji("inspect")
|
150649
150592
|
)}
|
150650
150593
|
`
|
150651
150594
|
);
|
150652
150595
|
output2.print(
|
150653
150596
|
prependEmoji(
|
150654
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
150597
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk103.default.bold(
|
150655
150598
|
previewUrl
|
150656
150599
|
)} ${deployStamp()}`,
|
150657
150600
|
emoji("success")
|
@@ -150721,17 +150664,17 @@ async function redeploy(client2) {
|
|
150721
150664
|
output2.prettyError(err);
|
150722
150665
|
if ((0, import_error_utils30.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
150723
150666
|
output2.error(
|
150724
|
-
`Use ${
|
150667
|
+
`Use ${import_chalk103.default.bold("vc switch")} to change your current team`
|
150725
150668
|
);
|
150726
150669
|
}
|
150727
150670
|
return 1;
|
150728
150671
|
}
|
150729
150672
|
}
|
150730
|
-
var
|
150673
|
+
var import_chalk103, import_client13, import_error_utils30;
|
150731
150674
|
var init_redeploy = __esm({
|
150732
150675
|
"src/commands/redeploy/index.ts"() {
|
150733
150676
|
"use strict";
|
150734
|
-
|
150677
|
+
import_chalk103 = __toESM3(require_source());
|
150735
150678
|
import_client13 = __toESM3(require_dist12());
|
150736
150679
|
init_emoji();
|
150737
150680
|
init_get_args();
|
@@ -150941,7 +150884,7 @@ async function remove3(client2) {
|
|
150941
150884
|
}
|
150942
150885
|
const { contextName } = await getScope(client2);
|
150943
150886
|
output2.spinner(
|
150944
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
150887
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk104.default.bold(contextName)}`
|
150945
150888
|
);
|
150946
150889
|
let aliases;
|
150947
150890
|
let projects;
|
@@ -151007,12 +150950,12 @@ async function remove3(client2) {
|
|
151007
150950
|
});
|
151008
150951
|
if (deployments.length === 0 && projects.length === 0) {
|
151009
150952
|
log2(
|
151010
|
-
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) =>
|
150953
|
+
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) => import_chalk104.default.bold(`"${id}"`)).join(", ")}. Run ${getCommandName("projects ls")} to list.`
|
151011
150954
|
);
|
151012
150955
|
return 1;
|
151013
150956
|
}
|
151014
150957
|
log2(
|
151015
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
150958
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk104.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
151016
150959
|
);
|
151017
150960
|
if (deployments.length > 200) {
|
151018
150961
|
output2.warn(
|
@@ -151039,11 +150982,11 @@ async function remove3(client2) {
|
|
151039
150982
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
151040
150983
|
);
|
151041
150984
|
deployments.forEach((depl) => {
|
151042
|
-
output2.print(`${
|
150985
|
+
output2.print(`${import_chalk104.default.gray("-")} ${import_chalk104.default.bold(depl.url)}
|
151043
150986
|
`);
|
151044
150987
|
});
|
151045
150988
|
projects.forEach((project) => {
|
151046
|
-
output2.print(`${
|
150989
|
+
output2.print(`${import_chalk104.default.gray("-")} ${import_chalk104.default.bold(project.name)}
|
151047
150990
|
`);
|
151048
150991
|
});
|
151049
150992
|
return 0;
|
@@ -151060,8 +151003,8 @@ function readConfirmation4(deployments, projects, output2) {
|
|
151060
151003
|
);
|
151061
151004
|
const deploymentTable = table(
|
151062
151005
|
deployments.map((depl) => {
|
151063
|
-
const time =
|
151064
|
-
const url3 = depl.url ?
|
151006
|
+
const time = import_chalk104.default.gray(`${(0, import_ms25.default)(Date.now() - depl.createdAt)} ago`);
|
151007
|
+
const url3 = depl.url ? import_chalk104.default.underline(`https://${depl.url}`) : "";
|
151065
151008
|
return [` ${depl.id}`, url3, time];
|
151066
151009
|
}),
|
151067
151010
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -151072,7 +151015,7 @@ function readConfirmation4(deployments, projects, output2) {
|
|
151072
151015
|
for (const depl of deployments) {
|
151073
151016
|
for (const { alias: alias2 } of depl.aliases) {
|
151074
151017
|
output2.warn(
|
151075
|
-
`${
|
151018
|
+
`${import_chalk104.default.underline(`https://${alias2}`)} is an alias for ${import_chalk104.default.bold(depl.url)} and will be removed`
|
151076
151019
|
);
|
151077
151020
|
}
|
151078
151021
|
}
|
@@ -151086,12 +151029,12 @@ function readConfirmation4(deployments, projects, output2) {
|
|
151086
151029
|
`
|
151087
151030
|
);
|
151088
151031
|
for (const project of projects) {
|
151089
|
-
output2.print(`${
|
151032
|
+
output2.print(`${import_chalk104.default.gray("-")} ${import_chalk104.default.bold(project.name)}
|
151090
151033
|
`);
|
151091
151034
|
}
|
151092
151035
|
}
|
151093
151036
|
output2.print(
|
151094
|
-
`${
|
151037
|
+
`${import_chalk104.default.bold.red("> Are you sure?")} ${import_chalk104.default.gray("(y/N) ")}`
|
151095
151038
|
);
|
151096
151039
|
process.stdin.on("data", (d) => {
|
151097
151040
|
process.stdin.pause();
|
@@ -151108,11 +151051,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
151108
151051
|
}
|
151109
151052
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
151110
151053
|
}
|
151111
|
-
var
|
151054
|
+
var import_chalk104, import_ms25, import_pluralize11;
|
151112
151055
|
var init_remove = __esm({
|
151113
151056
|
"src/commands/remove/index.ts"() {
|
151114
151057
|
"use strict";
|
151115
|
-
|
151058
|
+
import_chalk104 = __toESM3(require_source());
|
151116
151059
|
import_ms25 = __toESM3(require_ms2());
|
151117
151060
|
import_pluralize11 = __toESM3(require_pluralize());
|
151118
151061
|
init_table();
|
@@ -151207,7 +151150,7 @@ async function rollbackStatus({
|
|
151207
151150
|
}
|
151208
151151
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
151209
151152
|
output2.log(
|
151210
|
-
`The rollback exceeded its deadline - rerun ${
|
151153
|
+
`The rollback exceeded its deadline - rerun ${import_chalk105.default.bold(
|
151211
151154
|
`${packageName} rollback ${toDeploymentId}`
|
151212
151155
|
)} to try again`
|
151213
151156
|
);
|
@@ -151273,26 +151216,26 @@ async function renderJobSucceeded2({
|
|
151273
151216
|
let deploymentInfo = "";
|
151274
151217
|
try {
|
151275
151218
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
151276
|
-
deploymentInfo = `${
|
151219
|
+
deploymentInfo = `${import_chalk105.default.bold(deployment.url)} (${toDeploymentId})`;
|
151277
151220
|
} catch (err) {
|
151278
151221
|
output2.debug(
|
151279
151222
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
151280
151223
|
);
|
151281
|
-
deploymentInfo =
|
151224
|
+
deploymentInfo = import_chalk105.default.bold(toDeploymentId);
|
151282
151225
|
}
|
151283
151226
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
151284
151227
|
output2.log(
|
151285
|
-
`Success! ${
|
151228
|
+
`Success! ${import_chalk105.default.bold(
|
151286
151229
|
project.name
|
151287
151230
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
151288
151231
|
);
|
151289
151232
|
return 0;
|
151290
151233
|
}
|
151291
|
-
var
|
151234
|
+
var import_chalk105, import_ms26;
|
151292
151235
|
var init_status2 = __esm({
|
151293
151236
|
"src/commands/rollback/status.ts"() {
|
151294
151237
|
"use strict";
|
151295
|
-
|
151238
|
+
import_chalk105 = __toESM3(require_source());
|
151296
151239
|
init_elapsed();
|
151297
151240
|
init_format_date();
|
151298
151241
|
init_get_deployment();
|
@@ -151325,7 +151268,7 @@ async function requestRollback({
|
|
151325
151268
|
});
|
151326
151269
|
if (timeout !== void 0 && (0, import_ms27.default)(timeout) === 0) {
|
151327
151270
|
output2.log(
|
151328
|
-
`Successfully requested rollback of ${
|
151271
|
+
`Successfully requested rollback of ${import_chalk106.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
151329
151272
|
);
|
151330
151273
|
output2.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
151331
151274
|
return 0;
|
@@ -151338,11 +151281,11 @@ async function requestRollback({
|
|
151338
151281
|
timeout
|
151339
151282
|
});
|
151340
151283
|
}
|
151341
|
-
var
|
151284
|
+
var import_chalk106, import_ms27;
|
151342
151285
|
var init_request_rollback = __esm({
|
151343
151286
|
"src/commands/rollback/request-rollback.ts"() {
|
151344
151287
|
"use strict";
|
151345
|
-
|
151288
|
+
import_chalk106 = __toESM3(require_source());
|
151346
151289
|
init_pkg_name();
|
151347
151290
|
init_get_project_by_deployment();
|
151348
151291
|
import_ms27 = __toESM3(require_ms2());
|
@@ -151490,7 +151433,7 @@ async function list4(client2, argv, args2, link4) {
|
|
151490
151433
|
const { output: output2 } = client2;
|
151491
151434
|
if (args2.length !== 0) {
|
151492
151435
|
output2.error(
|
151493
|
-
`Invalid number of arguments. Usage: ${
|
151436
|
+
`Invalid number of arguments. Usage: ${import_chalk107.default.cyan(
|
151494
151437
|
`${getCommandName("target ls")}`
|
151495
151438
|
)}`
|
151496
151439
|
);
|
@@ -151514,12 +151457,12 @@ async function list4(client2, argv, args2, link4) {
|
|
151514
151457
|
const elapsed2 = (0, import_ms29.default)(Date.now() - start);
|
151515
151458
|
result = withDefaultEnvironmentsIncluded(result);
|
151516
151459
|
output2.log(
|
151517
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
151460
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk107.default.gray(`[${elapsed2}]`)}`
|
151518
151461
|
);
|
151519
151462
|
const tablePrint = table(
|
151520
151463
|
[
|
151521
151464
|
["Target Name", "Target Slug", "Target ID", "Type", "Updated"].map(
|
151522
|
-
(header) =>
|
151465
|
+
(header) => import_chalk107.default.bold(import_chalk107.default.cyan(header))
|
151523
151466
|
),
|
151524
151467
|
...result.map((target) => {
|
151525
151468
|
const type = target.type === "production" ? "Production" : target.type === "development" ? "Development" : "Preview";
|
@@ -151534,7 +151477,7 @@ async function list4(client2, argv, args2, link4) {
|
|
151534
151477
|
target.slug,
|
151535
151478
|
target.id,
|
151536
151479
|
type,
|
151537
|
-
|
151480
|
+
import_chalk107.default.gray(
|
151538
151481
|
target.updatedAt > 0 ? (0, import_ms29.default)(Date.now() - target.updatedAt) : "-"
|
151539
151482
|
)
|
151540
151483
|
]
|
@@ -151584,12 +151527,12 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
151584
151527
|
}
|
151585
151528
|
];
|
151586
151529
|
}
|
151587
|
-
var import_ms29,
|
151530
|
+
var import_ms29, import_chalk107;
|
151588
151531
|
var init_list4 = __esm({
|
151589
151532
|
"src/commands/target/list.ts"() {
|
151590
151533
|
"use strict";
|
151591
151534
|
import_ms29 = __toESM3(require_ms2());
|
151592
|
-
|
151535
|
+
import_chalk107 = __toESM3(require_source());
|
151593
151536
|
init_table();
|
151594
151537
|
init_pkg_name();
|
151595
151538
|
init_format_project();
|
@@ -151836,7 +151779,7 @@ async function list5(client2) {
|
|
151836
151779
|
client2.stdout.write("\n");
|
151837
151780
|
const teamTable = table(
|
151838
151781
|
[
|
151839
|
-
["id", "email / name"].map((str) => (0,
|
151782
|
+
["id", "email / name"].map((str) => (0, import_chalk108.gray)(str)),
|
151840
151783
|
...teamList.map((team) => [team.value, team.name])
|
151841
151784
|
],
|
151842
151785
|
{ hsep: 5 }
|
@@ -151853,13 +151796,13 @@ async function list5(client2) {
|
|
151853
151796
|
}
|
151854
151797
|
return 0;
|
151855
151798
|
}
|
151856
|
-
var
|
151799
|
+
var import_chalk108;
|
151857
151800
|
var init_list5 = __esm({
|
151858
151801
|
"src/commands/teams/list.ts"() {
|
151859
151802
|
"use strict";
|
151860
151803
|
init_chars();
|
151861
151804
|
init_table();
|
151862
|
-
|
151805
|
+
import_chalk108 = __toESM3(require_source());
|
151863
151806
|
init_get_user();
|
151864
151807
|
init_get_teams();
|
151865
151808
|
init_pkg_name();
|
@@ -151919,7 +151862,7 @@ Please select a team scope using ${getCommandName(
|
|
151919
151862
|
return 1;
|
151920
151863
|
}
|
151921
151864
|
output2.log(
|
151922
|
-
introMsg || `Inviting team members to ${
|
151865
|
+
introMsg || `Inviting team members to ${import_chalk109.default.bold(currentTeam.name)}`
|
151923
151866
|
);
|
151924
151867
|
if (emails.length > 0) {
|
151925
151868
|
for (const email3 of emails) {
|
@@ -151938,10 +151881,10 @@ Please select a team scope using ${getCommandName(
|
|
151938
151881
|
throw err;
|
151939
151882
|
}
|
151940
151883
|
output2.log(
|
151941
|
-
`${
|
151884
|
+
`${import_chalk109.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
151942
151885
|
);
|
151943
151886
|
} else {
|
151944
|
-
output2.log(`${
|
151887
|
+
output2.log(`${import_chalk109.default.red(`\u2716 ${email3}`)} ${import_chalk109.default.gray("[invalid]")}`);
|
151945
151888
|
}
|
151946
151889
|
}
|
151947
151890
|
return 0;
|
@@ -151953,10 +151896,9 @@ Please select a team scope using ${getCommandName(
|
|
151953
151896
|
do {
|
151954
151897
|
email2 = "";
|
151955
151898
|
try {
|
151956
|
-
email2 = await text({
|
151957
|
-
|
151958
|
-
|
151959
|
-
autoComplete: (value) => emailAutoComplete(value, currentTeam.slug)
|
151899
|
+
email2 = await client2.input.text({
|
151900
|
+
message: `- ${inviteUserPrefix}`,
|
151901
|
+
validate: validateEmail2
|
151960
151902
|
});
|
151961
151903
|
} catch (err) {
|
151962
151904
|
if (!(0, import_error_utils32.isError)(err) || err.message !== "USER_ABORT") {
|
@@ -151975,15 +151917,15 @@ Please select a team scope using ${getCommandName(
|
|
151975
151917
|
);
|
151976
151918
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
151977
151919
|
emails.push(email2);
|
151978
|
-
output2.log(`${
|
151920
|
+
output2.log(`${import_chalk109.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
151979
151921
|
if (hasError) {
|
151980
151922
|
hasError = false;
|
151981
151923
|
process.stderr.write(eraseLines(emails.length + 2));
|
151982
151924
|
output2.log(
|
151983
|
-
introMsg || `Inviting team members to ${
|
151925
|
+
introMsg || `Inviting team members to ${import_chalk109.default.bold(currentTeam.name)}`
|
151984
151926
|
);
|
151985
151927
|
for (const email3 of emails) {
|
151986
|
-
output2.log(`${
|
151928
|
+
output2.log(`${import_chalk109.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
151987
151929
|
}
|
151988
151930
|
}
|
151989
151931
|
} catch (err) {
|
@@ -151992,7 +151934,7 @@ Please select a team scope using ${getCommandName(
|
|
151992
151934
|
output2.error((0, import_error_utils32.errorToString)(err));
|
151993
151935
|
hasError = true;
|
151994
151936
|
for (const email3 of emails) {
|
151995
|
-
output2.log(`${
|
151937
|
+
output2.log(`${import_chalk109.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
151996
151938
|
}
|
151997
151939
|
}
|
151998
151940
|
}
|
@@ -152005,21 +151947,20 @@ Please select a team scope using ${getCommandName(
|
|
152005
151947
|
} else {
|
152006
151948
|
output2.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
152007
151949
|
for (const email3 of emails) {
|
152008
|
-
output2.log(`${
|
151950
|
+
output2.log(`${import_chalk109.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
152009
151951
|
}
|
152010
151952
|
}
|
152011
151953
|
return 0;
|
152012
151954
|
}
|
152013
|
-
var
|
151955
|
+
var import_chalk109, import_error_utils32, validateEmail2, domains;
|
152014
151956
|
var init_invite = __esm({
|
152015
151957
|
"src/commands/teams/invite.ts"() {
|
152016
151958
|
"use strict";
|
152017
|
-
|
151959
|
+
import_chalk109 = __toESM3(require_source());
|
152018
151960
|
init_cmd();
|
152019
151961
|
init_stamp();
|
152020
151962
|
init_param();
|
152021
151963
|
init_chars();
|
152022
|
-
init_text();
|
152023
151964
|
init_erase_lines();
|
152024
151965
|
init_get_user();
|
152025
151966
|
init_pkg_name();
|
@@ -152045,23 +151986,6 @@ var init_invite = __esm({
|
|
152045
151986
|
"icloud.com"
|
152046
151987
|
])
|
152047
151988
|
);
|
152048
|
-
emailAutoComplete = (value, teamSlug) => {
|
152049
|
-
const parts = value.split("@");
|
152050
|
-
if (parts.length === 2 && parts[1].length > 0) {
|
152051
|
-
const [, host] = parts;
|
152052
|
-
let suggestion = false;
|
152053
|
-
domains.unshift(teamSlug);
|
152054
|
-
for (const domain of domains) {
|
152055
|
-
if (domain.startsWith(host)) {
|
152056
|
-
suggestion = domain.slice(host.length);
|
152057
|
-
break;
|
152058
|
-
}
|
152059
|
-
}
|
152060
|
-
domains.shift();
|
152061
|
-
return suggestion;
|
152062
|
-
}
|
152063
|
-
return false;
|
152064
|
-
};
|
152065
151989
|
}
|
152066
151990
|
});
|
152067
151991
|
|
@@ -152103,18 +152027,16 @@ async function add8(client2) {
|
|
152103
152027
|
let elapsed2;
|
152104
152028
|
const { output: output2 } = client2;
|
152105
152029
|
output2.log(
|
152106
|
-
`Pick a team identifier for its URL (e.g.: ${
|
152030
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk110.default.cyan(
|
152107
152031
|
"`vercel.com/acme`"
|
152108
152032
|
)})`
|
152109
152033
|
);
|
152110
152034
|
do {
|
152111
152035
|
try {
|
152112
|
-
slug = await text({
|
152113
|
-
|
152114
|
-
|
152115
|
-
|
152116
|
-
valid: team,
|
152117
|
-
forceLowerCase: true
|
152036
|
+
slug = await client2.input.text({
|
152037
|
+
message: `- ${teamUrlPrefix}`,
|
152038
|
+
validate: validateSlug,
|
152039
|
+
default: slug
|
152118
152040
|
});
|
152119
152041
|
} catch (err) {
|
152120
152042
|
if ((0, import_error_utils33.isError)(err) && err.message === "USER_ABORT") {
|
@@ -152136,14 +152058,14 @@ async function add8(client2) {
|
|
152136
152058
|
output2.stopSpinner();
|
152137
152059
|
process.stdout.write(eraseLines(2));
|
152138
152060
|
output2.success(`Team created ${elapsed2()}`);
|
152139
|
-
output2.log(`${
|
152061
|
+
output2.log(`${import_chalk110.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
152140
152062
|
`);
|
152141
152063
|
output2.log("Pick a display name for your team");
|
152142
152064
|
let name;
|
152143
152065
|
try {
|
152144
|
-
name = await text({
|
152145
|
-
|
152146
|
-
|
152066
|
+
name = await client2.input.text({
|
152067
|
+
message: `- ${teamNamePrefix}`,
|
152068
|
+
validate: validateName
|
152147
152069
|
});
|
152148
152070
|
} catch (err) {
|
152149
152071
|
if ((0, import_error_utils33.isError)(err) && err.message === "USER_ABORT") {
|
@@ -152159,7 +152081,7 @@ async function add8(client2) {
|
|
152159
152081
|
process.stdout.write(eraseLines(2));
|
152160
152082
|
team = Object.assign(team, res);
|
152161
152083
|
output2.success(`Team name saved ${elapsed2()}`);
|
152162
|
-
output2.log(`${
|
152084
|
+
output2.log(`${import_chalk110.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
152163
152085
|
`);
|
152164
152086
|
output2.spinner("Saving");
|
152165
152087
|
client2.config.currentTeam = team.id;
|
@@ -152173,32 +152095,23 @@ async function add8(client2) {
|
|
152173
152095
|
});
|
152174
152096
|
return 0;
|
152175
152097
|
}
|
152176
|
-
var
|
152098
|
+
var import_chalk110, import_error_utils33, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
152177
152099
|
var init_add7 = __esm({
|
152178
152100
|
"src/commands/teams/add.ts"() {
|
152179
152101
|
"use strict";
|
152180
|
-
|
152102
|
+
import_chalk110 = __toESM3(require_source());
|
152181
152103
|
init_stamp();
|
152182
152104
|
init_erase_lines();
|
152183
152105
|
init_chars();
|
152184
|
-
init_text();
|
152185
152106
|
init_invite();
|
152186
152107
|
init_files();
|
152187
152108
|
init_pkg_name();
|
152188
152109
|
init_create_team();
|
152189
152110
|
init_patch_team();
|
152190
152111
|
import_error_utils33 = __toESM3(require_dist2());
|
152191
|
-
|
152192
|
-
|
152193
|
-
|
152194
|
-
/^[a-zA-Z]+[a-zA-Z0-9_-]*$/.test(value + data)
|
152195
|
-
);
|
152196
|
-
validateNameKeypress = (data, value) => (
|
152197
|
-
// TODO: the `value` here should contain the current value + the keypress
|
152198
|
-
// should be fixed on utils/input/text.js
|
152199
|
-
/^[ a-zA-Z0-9_-]+$/.test(value + data)
|
152200
|
-
);
|
152201
|
-
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk111.default.gray("vercel.com/");
|
152112
|
+
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
152113
|
+
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
152114
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk110.default.gray("vercel.com/");
|
152202
152115
|
teamNamePrefix = "Team Name".padEnd(14);
|
152203
152116
|
}
|
152204
152117
|
});
|
@@ -152221,7 +152134,7 @@ async function main13(client2, desiredSlug) {
|
|
152221
152134
|
let title7 = `${team.name} (${team.slug})`;
|
152222
152135
|
const selected = team.id === currentTeam?.id;
|
152223
152136
|
if (selected) {
|
152224
|
-
title7 += ` ${
|
152137
|
+
title7 += ` ${import_chalk111.default.bold("(current)")}`;
|
152225
152138
|
}
|
152226
152139
|
if (team.limited) {
|
152227
152140
|
title7 += ` ${emoji("locked")}`;
|
@@ -152233,7 +152146,7 @@ async function main13(client2, desiredSlug) {
|
|
152233
152146
|
selected
|
152234
152147
|
};
|
152235
152148
|
});
|
152236
|
-
let suffix = personalScopeSelected ? ` ${
|
152149
|
+
let suffix = personalScopeSelected ? ` ${import_chalk111.default.bold("(current)")}` : "";
|
152237
152150
|
if (user.limited) {
|
152238
152151
|
suffix += ` ${emoji("locked")}`;
|
152239
152152
|
}
|
@@ -152279,14 +152192,14 @@ async function main13(client2, desiredSlug) {
|
|
152279
152192
|
}
|
152280
152193
|
updateCurrentTeam(config2);
|
152281
152194
|
output2.success(
|
152282
|
-
`Your account (${
|
152195
|
+
`Your account (${import_chalk111.default.bold(user.username)}) is now active!`
|
152283
152196
|
);
|
152284
152197
|
return 0;
|
152285
152198
|
}
|
152286
152199
|
const newTeam = teams.find((team) => team.slug === desiredSlug);
|
152287
152200
|
if (!newTeam) {
|
152288
152201
|
output2.error(
|
152289
|
-
`You do not have permission to access scope ${
|
152202
|
+
`You do not have permission to access scope ${import_chalk111.default.bold(desiredSlug)}.`
|
152290
152203
|
);
|
152291
152204
|
return 1;
|
152292
152205
|
}
|
@@ -152304,15 +152217,15 @@ async function main13(client2, desiredSlug) {
|
|
152304
152217
|
}
|
152305
152218
|
updateCurrentTeam(config2, newTeam);
|
152306
152219
|
output2.success(
|
152307
|
-
`The team ${
|
152220
|
+
`The team ${import_chalk111.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
152308
152221
|
);
|
152309
152222
|
return 0;
|
152310
152223
|
}
|
152311
|
-
var
|
152224
|
+
var import_chalk111, updateCurrentTeam;
|
152312
152225
|
var init_switch = __esm({
|
152313
152226
|
"src/commands/teams/switch.ts"() {
|
152314
152227
|
"use strict";
|
152315
|
-
|
152228
|
+
import_chalk111 = __toESM3(require_source());
|
152316
152229
|
init_emoji();
|
152317
152230
|
init_get_user();
|
152318
152231
|
init_get_teams();
|
@@ -152476,7 +152389,7 @@ var import_error_utils34 = __toESM3(require_dist2());
|
|
152476
152389
|
var import_path43 = require("path");
|
152477
152390
|
var import_fs9 = require("fs");
|
152478
152391
|
var import_fs_extra23 = __toESM3(require_lib());
|
152479
|
-
var
|
152392
|
+
var import_chalk112 = __toESM3(require_source());
|
152480
152393
|
var import_epipebomb = __toESM3(require_epipebomb());
|
152481
152394
|
|
152482
152395
|
// src/util/get-latest-version/index.ts
|
@@ -152637,14 +152550,14 @@ var import_ora = __toESM3(require_ora());
|
|
152637
152550
|
var import_chalk2 = __toESM3(require_source());
|
152638
152551
|
init_erase_lines();
|
152639
152552
|
function wait(opts, delay = 300) {
|
152640
|
-
let
|
152553
|
+
let text = opts.text;
|
152641
152554
|
let spinner = null;
|
152642
|
-
if (typeof
|
152555
|
+
if (typeof text !== "string") {
|
152643
152556
|
throw new Error(`"text" is required for Ora spinner`);
|
152644
152557
|
}
|
152645
152558
|
const timeout = setTimeout(() => {
|
152646
152559
|
spinner = (0, import_ora.default)(opts);
|
152647
|
-
spinner.text = import_chalk2.default.gray(
|
152560
|
+
spinner.text = import_chalk2.default.gray(text);
|
152648
152561
|
spinner.color = "gray";
|
152649
152562
|
spinner.start();
|
152650
152563
|
}, delay);
|
@@ -152656,13 +152569,13 @@ function wait(opts, delay = 300) {
|
|
152656
152569
|
process.stderr.write(eraseLines(1));
|
152657
152570
|
}
|
152658
152571
|
};
|
152659
|
-
stop.text =
|
152572
|
+
stop.text = text;
|
152660
152573
|
Object.defineProperty(stop, "text", {
|
152661
152574
|
get() {
|
152662
|
-
return
|
152575
|
+
return text;
|
152663
152576
|
},
|
152664
152577
|
set(v) {
|
152665
|
-
|
152578
|
+
text = v;
|
152666
152579
|
if (spinner) {
|
152667
152580
|
spinner.text = import_chalk2.default.gray(v);
|
152668
152581
|
}
|
@@ -152800,14 +152713,14 @@ ${action}: ${link_default(details)}` : "")
|
|
152800
152713
|
/**
|
152801
152714
|
* Returns an ANSI formatted hyperlink when support has been enabled.
|
152802
152715
|
*/
|
152803
|
-
this.link = (
|
152716
|
+
this.link = (text, url3, { fallback, color = import_chalk3.default.cyan } = {}) => {
|
152804
152717
|
if (!this.supportsHyperlink) {
|
152805
152718
|
if (fallback === false) {
|
152806
|
-
return link_default(
|
152719
|
+
return link_default(text);
|
152807
152720
|
}
|
152808
|
-
return typeof fallback === "function" ? fallback() : `${
|
152721
|
+
return typeof fallback === "function" ? fallback() : `${text} (${link_default(url3)})`;
|
152809
152722
|
}
|
152810
|
-
return ansiEscapes2.link(color ? color(
|
152723
|
+
return ansiEscapes2.link(color ? color(text) : text, url3);
|
152811
152724
|
};
|
152812
152725
|
this.stream = stream;
|
152813
152726
|
this.debugEnabled = debugEnabled;
|
@@ -153110,6 +153023,20 @@ var ENOENT = class extends Error {
|
|
153110
153023
|
}
|
153111
153024
|
};
|
153112
153025
|
|
153026
|
+
// src/index.ts
|
153027
|
+
init_telemetry();
|
153028
|
+
|
153029
|
+
// src/util/telemetry/base.ts
|
153030
|
+
init_telemetry();
|
153031
|
+
var TelemetryBaseClient = class extends TelemetryClient {
|
153032
|
+
trackCliCommandDomains(actual) {
|
153033
|
+
this.trackCliCommand({
|
153034
|
+
command: "domains",
|
153035
|
+
value: actual
|
153036
|
+
});
|
153037
|
+
}
|
153038
|
+
};
|
153039
|
+
|
153113
153040
|
// src/args.ts
|
153114
153041
|
var import_chalk20 = __toESM3(require_source());
|
153115
153042
|
init_pkg_name();
|
@@ -153245,6 +153172,16 @@ var main14 = async () => {
|
|
153245
153172
|
debug: isDebugging,
|
153246
153173
|
noColor: isNoColor
|
153247
153174
|
});
|
153175
|
+
const telemetryEventStore = new TelemetryEventStore({
|
153176
|
+
isDebug: isDebugging,
|
153177
|
+
output
|
153178
|
+
});
|
153179
|
+
const telemetry = new TelemetryBaseClient({
|
153180
|
+
opts: {
|
153181
|
+
store: telemetryEventStore,
|
153182
|
+
output
|
153183
|
+
}
|
153184
|
+
});
|
153248
153185
|
debug2 = output.debug;
|
153249
153186
|
const localConfigPath = parsedArgs.flags["--local-config"];
|
153250
153187
|
let localConfig = await getConfig(
|
@@ -153277,13 +153214,13 @@ var main14 = async () => {
|
|
153277
153214
|
const betaCommands = [];
|
153278
153215
|
if (betaCommands.includes(targetOrSubcommand)) {
|
153279
153216
|
output.print(
|
153280
|
-
`${
|
153217
|
+
`${import_chalk112.default.grey(
|
153281
153218
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
153282
153219
|
)}
|
153283
153220
|
`
|
153284
153221
|
);
|
153285
153222
|
} else {
|
153286
|
-
output.print(`${
|
153223
|
+
output.print(`${import_chalk112.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
153287
153224
|
`);
|
153288
153225
|
}
|
153289
153226
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
@@ -153378,13 +153315,15 @@ var main14 = async () => {
|
|
153378
153315
|
authConfig,
|
153379
153316
|
localConfig,
|
153380
153317
|
localConfigPath,
|
153381
|
-
argv: process.argv
|
153318
|
+
argv: process.argv,
|
153319
|
+
telemetryEventStore
|
153382
153320
|
});
|
153383
153321
|
if (parsedArgs.flags["--cwd"]) {
|
153384
153322
|
client.cwd = parsedArgs.flags["--cwd"];
|
153385
153323
|
}
|
153386
153324
|
const { cwd } = client;
|
153387
153325
|
let subcommand = void 0;
|
153326
|
+
let userSuppliedSubCommand = "";
|
153388
153327
|
if (targetOrSubcommand) {
|
153389
153328
|
const targetPath = (0, import_path43.join)(cwd, targetOrSubcommand);
|
153390
153329
|
const targetPathExists = (0, import_fs9.existsSync)(targetPath);
|
@@ -153397,6 +153336,7 @@ var main14 = async () => {
|
|
153397
153336
|
if (subcommandExists) {
|
153398
153337
|
debug2(`user supplied known subcommand: "${targetOrSubcommand}"`);
|
153399
153338
|
subcommand = targetOrSubcommand;
|
153339
|
+
userSuppliedSubCommand = targetOrSubcommand;
|
153400
153340
|
} else {
|
153401
153341
|
debug2("user supplied a possible target for deployment or an extension");
|
153402
153342
|
}
|
@@ -153572,7 +153512,8 @@ var main14 = async () => {
|
|
153572
153512
|
func = (init_dns(), __toCommonJS3(dns_exports)).default;
|
153573
153513
|
break;
|
153574
153514
|
case "domains":
|
153575
|
-
|
153515
|
+
telemetry.trackCliCommandDomains(userSuppliedSubCommand);
|
153516
|
+
func = (init_domains2(), __toCommonJS3(domains_exports)).default;
|
153576
153517
|
break;
|
153577
153518
|
case "env":
|
153578
153519
|
func = (init_env(), __toCommonJS3(env_exports)).default;
|
@@ -153696,6 +153637,7 @@ var main14 = async () => {
|
|
153696
153637
|
}
|
153697
153638
|
return 1;
|
153698
153639
|
}
|
153640
|
+
telemetryEventStore.save();
|
153699
153641
|
return exitCode2;
|
153700
153642
|
};
|
153701
153643
|
var handleRejection = async (err) => {
|
@@ -153734,20 +153676,20 @@ main14().then(async (exitCode2) => {
|
|
153734
153676
|
});
|
153735
153677
|
if (latest) {
|
153736
153678
|
const changelog = "https://github.com/vercel/vercel/releases";
|
153737
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
153679
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk112.default.magenta(
|
153738
153680
|
`
|
153739
153681
|
|
153740
|
-
The latest update ${
|
153682
|
+
The latest update ${import_chalk112.default.italic(
|
153741
153683
|
"may"
|
153742
153684
|
)} fix any errors that occurred.`
|
153743
153685
|
) : "";
|
153744
153686
|
output.print(
|
153745
153687
|
box(
|
153746
|
-
`Update available! ${
|
153688
|
+
`Update available! ${import_chalk112.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk112.default.green(
|
153747
153689
|
`v${latest}`
|
153748
153690
|
)}
|
153749
153691
|
Changelog: ${output.link(changelog, changelog, { fallback: false })}
|
153750
|
-
Run ${
|
153692
|
+
Run ${import_chalk112.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
153751
153693
|
)
|
153752
153694
|
);
|
153753
153695
|
output.print("\n\n");
|