vercel 35.2.0 → 35.2.1
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 +346 -354
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -4073,14 +4073,14 @@ var require_templates = __commonJS2({
|
|
4073
4073
|
}
|
4074
4074
|
return results;
|
4075
4075
|
}
|
4076
|
-
function buildStyle(
|
4076
|
+
function buildStyle(chalk107, 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 = chalk107;
|
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 = (chalk107, 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(chalk107, 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(chalk107, 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 chalk108 = {};
|
4160
|
+
applyOptions(chalk108, options);
|
4161
|
+
chalk108.template = (...arguments_) => chalkTag(chalk108.template, ...arguments_);
|
4162
|
+
Object.setPrototypeOf(chalk108, Chalk3.prototype);
|
4163
|
+
Object.setPrototypeOf(chalk108.template, chalk108);
|
4164
|
+
chalk108.template.constructor = () => {
|
4165
4165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4166
4166
|
};
|
4167
|
-
|
4168
|
-
return
|
4167
|
+
chalk108.template.Instance = ChalkClass;
|
4168
|
+
return chalk108.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 = (chalk108, ...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(chalk108, parts.join(""));
|
4296
4296
|
};
|
4297
4297
|
Object.defineProperties(Chalk3.prototype, styles);
|
4298
|
-
var
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
module2.exports =
|
4298
|
+
var chalk107 = Chalk3();
|
4299
|
+
chalk107.supportsColor = stdoutColor;
|
4300
|
+
chalk107.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
4301
|
+
chalk107.stderr.supportsColor = stderrColor;
|
4302
|
+
module2.exports = chalk107;
|
4303
4303
|
}
|
4304
4304
|
});
|
4305
4305
|
|
@@ -13478,14 +13478,14 @@ var require_templates2 = __commonJS2({
|
|
13478
13478
|
}
|
13479
13479
|
return results;
|
13480
13480
|
}
|
13481
|
-
function buildStyle(
|
13481
|
+
function buildStyle(chalk107, 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 = chalk107;
|
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 = (chalk107, 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(chalk107, 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(chalk107, 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 chalk107 = {};
|
13557
|
+
applyOptions(chalk107, options);
|
13558
|
+
chalk107.template = function() {
|
13559
13559
|
const args2 = [].slice.call(arguments);
|
13560
|
-
return chalkTag.apply(null, [
|
13560
|
+
return chalkTag.apply(null, [chalk107.template].concat(args2));
|
13561
13561
|
};
|
13562
|
-
Object.setPrototypeOf(
|
13563
|
-
Object.setPrototypeOf(
|
13564
|
-
|
13565
|
-
return
|
13562
|
+
Object.setPrototypeOf(chalk107, Chalk3.prototype);
|
13563
|
+
Object.setPrototypeOf(chalk107.template, chalk107);
|
13564
|
+
chalk107.template.constructor = Chalk3;
|
13565
|
+
return chalk107.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(chalk107, 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(chalk107, 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 chalk107 = 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: chalk107.blue("\u2139"),
|
15495
|
+
success: chalk107.green("\u2714"),
|
15496
|
+
warning: chalk107.yellow("\u26A0"),
|
15497
|
+
error: chalk107.red("\u2716")
|
15498
15498
|
};
|
15499
15499
|
var fallbacks = {
|
15500
|
-
info:
|
15501
|
-
success:
|
15502
|
-
warning:
|
15503
|
-
error:
|
15500
|
+
info: chalk107.blue("i"),
|
15501
|
+
success: chalk107.green("\u221A"),
|
15502
|
+
warning: chalk107.yellow("\u203C"),
|
15503
|
+
error: chalk107.red("\xD7")
|
15504
15504
|
};
|
15505
15505
|
module2.exports = isSupported ? main15 : fallbacks;
|
15506
15506
|
}
|
@@ -15896,7 +15896,7 @@ var require_wcwidth = __commonJS2({
|
|
15896
15896
|
var require_ora = __commonJS2({
|
15897
15897
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
15898
15898
|
"use strict";
|
15899
|
-
var
|
15899
|
+
var chalk107 = require_chalk();
|
15900
15900
|
var cliCursor = require_cli_cursor();
|
15901
15901
|
var cliSpinners = require_cli_spinners();
|
15902
15902
|
var logSymbols = require_log_symbols();
|
@@ -15985,7 +15985,7 @@ var require_ora = __commonJS2({
|
|
15985
15985
|
const { frames } = this.spinner;
|
15986
15986
|
let frame = frames[this.frameIndex];
|
15987
15987
|
if (this.color) {
|
15988
|
-
frame =
|
15988
|
+
frame = chalk107[this.color](frame);
|
15989
15989
|
}
|
15990
15990
|
this.frameIndex = ++this.frameIndex % frames.length;
|
15991
15991
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
@@ -70629,14 +70629,14 @@ var require_templates3 = __commonJS2({
|
|
70629
70629
|
}
|
70630
70630
|
return results;
|
70631
70631
|
}
|
70632
|
-
function buildStyle(
|
70632
|
+
function buildStyle(chalk107, styles) {
|
70633
70633
|
const enabled = {};
|
70634
70634
|
for (const layer of styles) {
|
70635
70635
|
for (const style of layer.styles) {
|
70636
70636
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
70637
70637
|
}
|
70638
70638
|
}
|
70639
|
-
let current =
|
70639
|
+
let current = chalk107;
|
70640
70640
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
70641
70641
|
if (!Array.isArray(styles2)) {
|
70642
70642
|
continue;
|
@@ -70648,7 +70648,7 @@ var require_templates3 = __commonJS2({
|
|
70648
70648
|
}
|
70649
70649
|
return current;
|
70650
70650
|
}
|
70651
|
-
module2.exports = (
|
70651
|
+
module2.exports = (chalk107, temporary) => {
|
70652
70652
|
const styles = [];
|
70653
70653
|
const chunks = [];
|
70654
70654
|
let chunk = [];
|
@@ -70658,13 +70658,13 @@ var require_templates3 = __commonJS2({
|
|
70658
70658
|
} else if (style) {
|
70659
70659
|
const string = chunk.join("");
|
70660
70660
|
chunk = [];
|
70661
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
70661
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk107, styles)(string));
|
70662
70662
|
styles.push({ inverse, styles: parseStyle(style) });
|
70663
70663
|
} else if (close2) {
|
70664
70664
|
if (styles.length === 0) {
|
70665
70665
|
throw new Error("Found extraneous } in Chalk template literal");
|
70666
70666
|
}
|
70667
|
-
chunks.push(buildStyle(
|
70667
|
+
chunks.push(buildStyle(chalk107, styles)(chunk.join("")));
|
70668
70668
|
chunk = [];
|
70669
70669
|
styles.pop();
|
70670
70670
|
} else {
|
@@ -70712,16 +70712,16 @@ var require_source2 = __commonJS2({
|
|
70712
70712
|
}
|
70713
70713
|
};
|
70714
70714
|
var chalkFactory = (options) => {
|
70715
|
-
const
|
70716
|
-
applyOptions(
|
70717
|
-
|
70718
|
-
Object.setPrototypeOf(
|
70719
|
-
Object.setPrototypeOf(
|
70720
|
-
|
70715
|
+
const chalk108 = {};
|
70716
|
+
applyOptions(chalk108, options);
|
70717
|
+
chalk108.template = (...arguments_) => chalkTag(chalk108.template, ...arguments_);
|
70718
|
+
Object.setPrototypeOf(chalk108, Chalk3.prototype);
|
70719
|
+
Object.setPrototypeOf(chalk108.template, chalk108);
|
70720
|
+
chalk108.template.constructor = () => {
|
70721
70721
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
70722
70722
|
};
|
70723
|
-
|
70724
|
-
return
|
70723
|
+
chalk108.template.Instance = ChalkClass;
|
70724
|
+
return chalk108.template;
|
70725
70725
|
};
|
70726
70726
|
function Chalk3(options) {
|
70727
70727
|
return chalkFactory(options);
|
@@ -70832,7 +70832,7 @@ var require_source2 = __commonJS2({
|
|
70832
70832
|
return openAll + string + closeAll;
|
70833
70833
|
};
|
70834
70834
|
var template;
|
70835
|
-
var chalkTag = (
|
70835
|
+
var chalkTag = (chalk108, ...strings) => {
|
70836
70836
|
const [firstString] = strings;
|
70837
70837
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
70838
70838
|
return strings.join(" ");
|
@@ -70848,14 +70848,14 @@ var require_source2 = __commonJS2({
|
|
70848
70848
|
if (template === void 0) {
|
70849
70849
|
template = require_templates3();
|
70850
70850
|
}
|
70851
|
-
return template(
|
70851
|
+
return template(chalk108, parts.join(""));
|
70852
70852
|
};
|
70853
70853
|
Object.defineProperties(Chalk3.prototype, styles);
|
70854
|
-
var
|
70855
|
-
|
70856
|
-
|
70857
|
-
|
70858
|
-
module2.exports =
|
70854
|
+
var chalk107 = Chalk3();
|
70855
|
+
chalk107.supportsColor = stdoutColor;
|
70856
|
+
chalk107.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
70857
|
+
chalk107.stderr.supportsColor = stderrColor;
|
70858
|
+
module2.exports = chalk107;
|
70859
70859
|
}
|
70860
70860
|
});
|
70861
70861
|
|
@@ -120573,7 +120573,8 @@ var require_frameworks = __commonJS2({
|
|
120573
120573
|
name: "FastHTML (Experimental)",
|
120574
120574
|
slug: "fasthtml",
|
120575
120575
|
demo: "https://fasthtml-template.vercel.app",
|
120576
|
-
logo: "https://api-frameworks.vercel.sh/framework-logos/fasthtml.
|
120576
|
+
logo: "https://api-frameworks.vercel.sh/framework-logos/fasthtml.png",
|
120577
|
+
darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/fasthtml-dark.png",
|
120577
120578
|
tagline: "The fastest way to create an HTML app",
|
120578
120579
|
description: "A library for writing fast and scalable Starlette-powered web applications",
|
120579
120580
|
website: "https://fastht.ml",
|
@@ -144094,6 +144095,35 @@ var init_command4 = __esm({
|
|
144094
144095
|
}
|
144095
144096
|
});
|
144096
144097
|
|
144098
|
+
// src/util/parse-target.ts
|
144099
|
+
function parseTarget({
|
144100
|
+
output: output2,
|
144101
|
+
targetFlagName,
|
144102
|
+
targetFlagValue,
|
144103
|
+
prodFlagValue
|
144104
|
+
}) {
|
144105
|
+
if (prodFlagValue && targetFlagValue) {
|
144106
|
+
output2.warn(
|
144107
|
+
`Both \`--prod\` and \`--${targetFlagName}\` detected. Ignoring \`--prod\`.`
|
144108
|
+
);
|
144109
|
+
}
|
144110
|
+
if (targetFlagValue) {
|
144111
|
+
const lowerCaseTarget = targetFlagValue.toLowerCase();
|
144112
|
+
output2.debug(`Setting target to ${lowerCaseTarget}`);
|
144113
|
+
return lowerCaseTarget;
|
144114
|
+
}
|
144115
|
+
if (prodFlagValue) {
|
144116
|
+
output2.debug("Setting target to production");
|
144117
|
+
return "production";
|
144118
|
+
}
|
144119
|
+
return void 0;
|
144120
|
+
}
|
144121
|
+
var init_parse_target = __esm({
|
144122
|
+
"src/util/parse-target.ts"() {
|
144123
|
+
"use strict";
|
144124
|
+
}
|
144125
|
+
});
|
144126
|
+
|
144097
144127
|
// src/commands/pull/index.ts
|
144098
144128
|
var pull_exports = {};
|
144099
144129
|
__export3(pull_exports, {
|
@@ -144147,7 +144177,11 @@ async function main(client2) {
|
|
144147
144177
|
}
|
144148
144178
|
let cwd = argv2._[1] || client2.cwd;
|
144149
144179
|
const autoConfirm = Boolean(argv2["--yes"]);
|
144150
|
-
const environment =
|
144180
|
+
const environment = parseTarget({
|
144181
|
+
output: client2.output,
|
144182
|
+
targetFlagName: "environment",
|
144183
|
+
targetFlagValue: argv2["--environment"]
|
144184
|
+
}) || "development";
|
144151
144185
|
const link4 = await ensureLink("pull", client2, cwd, { autoConfirm });
|
144152
144186
|
if (typeof link4 === "number") {
|
144153
144187
|
return link4;
|
@@ -144201,6 +144235,7 @@ var init_pull2 = __esm({
|
|
144201
144235
|
init_humanize_path();
|
144202
144236
|
init_help();
|
144203
144237
|
init_command4();
|
144238
|
+
init_parse_target();
|
144204
144239
|
}
|
144205
144240
|
});
|
144206
144241
|
|
@@ -148276,35 +148311,6 @@ var init_scrub_argv = __esm({
|
|
148276
148311
|
}
|
148277
148312
|
});
|
148278
148313
|
|
148279
|
-
// src/util/parse-target.ts
|
148280
|
-
function parseTarget({
|
148281
|
-
output: output2,
|
148282
|
-
targetFlagName,
|
148283
|
-
targetFlagValue,
|
148284
|
-
prodFlagValue
|
148285
|
-
}) {
|
148286
|
-
if (prodFlagValue && targetFlagValue) {
|
148287
|
-
output2.warn(
|
148288
|
-
`Both \`--prod\` and \`--${targetFlagName}\` detected. Ignoring \`--prod\`.`
|
148289
|
-
);
|
148290
|
-
}
|
148291
|
-
if (targetFlagValue) {
|
148292
|
-
const lowerCaseTarget = targetFlagValue.toLowerCase();
|
148293
|
-
output2.debug(`Setting target to ${lowerCaseTarget}`);
|
148294
|
-
return lowerCaseTarget;
|
148295
|
-
}
|
148296
|
-
if (prodFlagValue) {
|
148297
|
-
output2.debug("Setting target to production");
|
148298
|
-
return "production";
|
148299
|
-
}
|
148300
|
-
return void 0;
|
148301
|
-
}
|
148302
|
-
var init_parse_target = __esm({
|
148303
|
-
"src/util/parse-target.ts"() {
|
148304
|
-
"use strict";
|
148305
|
-
}
|
148306
|
-
});
|
148307
|
-
|
148308
148314
|
// src/commands/build/index.ts
|
148309
148315
|
var build_exports = {};
|
148310
148316
|
__export3(build_exports, {
|
@@ -173396,14 +173402,6 @@ async function main6(client2) {
|
|
173396
173402
|
targetFlagName: "environment",
|
173397
173403
|
targetFlagValue: argv2["--environment"]
|
173398
173404
|
}) || "development";
|
173399
|
-
if (!isValidEnvTarget(target)) {
|
173400
|
-
output2.error(
|
173401
|
-
`Invalid environment \`${import_chalk83.default.cyan(
|
173402
|
-
target
|
173403
|
-
)}\`. Valid options: ${getEnvTargetPlaceholder()}`
|
173404
|
-
);
|
173405
|
-
return 1;
|
173406
|
-
}
|
173407
173405
|
const link4 = await getLinkedProject(client2, cwd);
|
173408
173406
|
if (link4.status === "error") {
|
173409
173407
|
return link4.exitCode;
|
@@ -173445,12 +173443,10 @@ async function main6(client2) {
|
|
173445
173443
|
}
|
173446
173444
|
}
|
173447
173445
|
}
|
173448
|
-
var
|
173446
|
+
var COMMAND_CONFIG6;
|
173449
173447
|
var init_env = __esm({
|
173450
173448
|
"src/commands/env/index.ts"() {
|
173451
173449
|
"use strict";
|
173452
|
-
import_chalk83 = __toESM3(require_source());
|
173453
|
-
init_env_target();
|
173454
173450
|
init_get_args();
|
173455
173451
|
init_get_invalid_subcommand();
|
173456
173452
|
init_get_subcommand();
|
@@ -173480,7 +173476,7 @@ async function connect(client2, argv2, args2, project, org) {
|
|
173480
173476
|
const repoArg = argv2._[1];
|
173481
173477
|
if (args2.length > 1) {
|
173482
173478
|
output2.error(
|
173483
|
-
`Invalid number of arguments. Usage: ${
|
173479
|
+
`Invalid number of arguments. Usage: ${import_chalk83.default.cyan(
|
173484
173480
|
`${getCommandName("project connect")}`
|
173485
173481
|
)}`
|
173486
173482
|
);
|
@@ -173526,7 +173522,7 @@ async function connect(client2, argv2, args2, project, org) {
|
|
173526
173522
|
}
|
173527
173523
|
if (!gitConfig) {
|
173528
173524
|
output2.error(
|
173529
|
-
`No local Git repository found. Run ${
|
173525
|
+
`No local Git repository found. Run ${import_chalk83.default.cyan(
|
173530
173526
|
"`git clone <url>`"
|
173531
173527
|
)} to clone a remote Git repository first.`
|
173532
173528
|
);
|
@@ -173535,7 +173531,7 @@ async function connect(client2, argv2, args2, project, org) {
|
|
173535
173531
|
const remoteUrls = pluckRemoteUrls(gitConfig);
|
173536
173532
|
if (!remoteUrls) {
|
173537
173533
|
output2.error(
|
173538
|
-
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${
|
173534
|
+
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${import_chalk83.default.cyan(
|
173539
173535
|
"`git remote --help`"
|
173540
173536
|
)} for more details.`
|
173541
173537
|
);
|
@@ -173579,7 +173575,7 @@ async function connect(client2, argv2, args2, project, org) {
|
|
173579
173575
|
return checkAndConnect;
|
173580
173576
|
}
|
173581
173577
|
output2.log(
|
173582
|
-
`Connected ${formatProvider(provider)} repository ${
|
173578
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk83.default.cyan(repoPath)}!`
|
173583
173579
|
);
|
173584
173580
|
return 0;
|
173585
173581
|
}
|
@@ -173616,7 +173612,7 @@ async function connectArg({
|
|
173616
173612
|
return connect2;
|
173617
173613
|
}
|
173618
173614
|
client2.output.log(
|
173619
|
-
`Connected ${formatProvider(provider)} repository ${
|
173615
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk83.default.cyan(repoPath)}!`
|
173620
173616
|
);
|
173621
173617
|
return 0;
|
173622
173618
|
}
|
@@ -173658,7 +173654,7 @@ async function connectArgWithLocalGit({
|
|
173658
173654
|
return connect2;
|
173659
173655
|
}
|
173660
173656
|
client2.output.log(
|
173661
|
-
`Connected ${formatProvider(provider)} repository ${
|
173657
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk83.default.cyan(
|
173662
173658
|
repoPath
|
173663
173659
|
)}!`
|
173664
173660
|
);
|
@@ -173691,7 +173687,7 @@ async function promptConnectArg({
|
|
173691
173687
|
return true;
|
173692
173688
|
}
|
173693
173689
|
client2.output.log(
|
173694
|
-
`Found a repository in your local Git Config: ${
|
173690
|
+
`Found a repository in your local Git Config: ${import_chalk83.default.cyan(
|
173695
173691
|
Object.values(remoteUrls)[0]
|
173696
173692
|
)}`
|
173697
173693
|
);
|
@@ -173740,7 +173736,7 @@ async function checkExistsAndConnect({
|
|
173740
173736
|
const isSameRepo = connectedProvider === provider && connectedOrg === gitOrg && connectedRepo === repo;
|
173741
173737
|
if (isSameRepo) {
|
173742
173738
|
client2.output.log(
|
173743
|
-
`${
|
173739
|
+
`${import_chalk83.default.cyan(connectedRepoPath)} is already connected to your project.`
|
173744
173740
|
);
|
173745
173741
|
return 1;
|
173746
173742
|
}
|
@@ -173773,7 +173769,7 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
|
|
173773
173769
|
client2,
|
173774
173770
|
`Looks like you already have a ${formatProvider(
|
173775
173771
|
connectedProvider
|
173776
|
-
)} repository connected: ${
|
173772
|
+
)} repository connected: ${import_chalk83.default.cyan(
|
173777
173773
|
connectedRepoPath
|
173778
173774
|
)}. Do you want to replace it?`,
|
173779
173775
|
true
|
@@ -173788,7 +173784,7 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
173788
173784
|
let choices = [];
|
173789
173785
|
for (const [urlKey, urlValue] of Object.entries(remoteUrls)) {
|
173790
173786
|
choices.push({
|
173791
|
-
name: `${urlValue} ${
|
173787
|
+
name: `${urlValue} ${import_chalk83.default.gray(`(${urlKey})`)}`,
|
173792
173788
|
value: urlValue,
|
173793
173789
|
short: urlKey
|
173794
173790
|
});
|
@@ -173798,11 +173794,11 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
173798
173794
|
choices
|
173799
173795
|
});
|
173800
173796
|
}
|
173801
|
-
var
|
173797
|
+
var import_chalk83, import_path41;
|
173802
173798
|
var init_connect = __esm({
|
173803
173799
|
"src/commands/git/connect.ts"() {
|
173804
173800
|
"use strict";
|
173805
|
-
|
173801
|
+
import_chalk83 = __toESM3(require_source());
|
173806
173802
|
import_path41 = require("path");
|
173807
173803
|
init_create_git_meta();
|
173808
173804
|
init_confirm();
|
@@ -173818,7 +173814,7 @@ async function disconnect(client2, args2, project, org) {
|
|
173818
173814
|
const { output: output2 } = client2;
|
173819
173815
|
if (args2.length !== 0) {
|
173820
173816
|
output2.error(
|
173821
|
-
`Invalid number of arguments. Usage: ${
|
173817
|
+
`Invalid number of arguments. Usage: ${import_chalk84.default.cyan(
|
173822
173818
|
`${getCommandName("project disconnect")}`
|
173823
173819
|
)}`
|
173824
173820
|
);
|
@@ -173836,14 +173832,14 @@ async function disconnect(client2, args2, project, org) {
|
|
173836
173832
|
);
|
173837
173833
|
const confirmDisconnect = await confirm(
|
173838
173834
|
client2,
|
173839
|
-
`Are you sure you want to disconnect ${
|
173835
|
+
`Are you sure you want to disconnect ${import_chalk84.default.cyan(
|
173840
173836
|
`${linkOrg}/${repo}`
|
173841
173837
|
)} from your project?`,
|
173842
173838
|
false
|
173843
173839
|
);
|
173844
173840
|
if (confirmDisconnect) {
|
173845
173841
|
await disconnectGitProvider(client2, org, project.id);
|
173846
|
-
output2.log(`Disconnected ${
|
173842
|
+
output2.log(`Disconnected ${import_chalk84.default.cyan(`${linkOrg}/${repo}`)}.`);
|
173847
173843
|
} else {
|
173848
173844
|
output2.log("Canceled");
|
173849
173845
|
}
|
@@ -173857,11 +173853,11 @@ async function disconnect(client2, args2, project, org) {
|
|
173857
173853
|
}
|
173858
173854
|
return 0;
|
173859
173855
|
}
|
173860
|
-
var
|
173856
|
+
var import_chalk84;
|
173861
173857
|
var init_disconnect = __esm({
|
173862
173858
|
"src/commands/git/disconnect.ts"() {
|
173863
173859
|
"use strict";
|
173864
|
-
|
173860
|
+
import_chalk84 = __toESM3(require_source());
|
173865
173861
|
init_confirm();
|
173866
173862
|
init_pkg_name();
|
173867
173863
|
init_connect_git_provider();
|
@@ -173989,11 +173985,11 @@ var init_git = __esm({
|
|
173989
173985
|
});
|
173990
173986
|
|
173991
173987
|
// src/util/output/list-item.ts
|
173992
|
-
var
|
173988
|
+
var import_chalk85, listItem, list_item_default;
|
173993
173989
|
var init_list_item = __esm({
|
173994
173990
|
"src/util/output/list-item.ts"() {
|
173995
173991
|
"use strict";
|
173996
|
-
|
173992
|
+
import_chalk85 = __toESM3(require_source());
|
173997
173993
|
listItem = (msg, n) => {
|
173998
173994
|
if (!n) {
|
173999
173995
|
n = "-";
|
@@ -174001,7 +173997,7 @@ var init_list_item = __esm({
|
|
174001
173997
|
if (Number(n)) {
|
174002
173998
|
n += ".";
|
174003
173999
|
}
|
174004
|
-
return `${(0,
|
174000
|
+
return `${(0, import_chalk85.default)(n.toString())} ${msg}`;
|
174005
174001
|
};
|
174006
174002
|
list_item_default = listItem;
|
174007
174003
|
}
|
@@ -174193,9 +174189,9 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
174193
174189
|
extractor.on("finish", resolve12);
|
174194
174190
|
res.body.pipe(extractor);
|
174195
174191
|
});
|
174196
|
-
const successLog = `Initialized "${
|
174192
|
+
const successLog = `Initialized "${import_chalk86.default.bold(
|
174197
174193
|
name
|
174198
|
-
)}" example in ${
|
174194
|
+
)}" example in ${import_chalk86.default.bold(humanizePath(folder))}.`;
|
174199
174195
|
const folderRel = import_path42.default.relative(client2.cwd, folder);
|
174200
174196
|
const deployHint = folderRel === "" ? list_item_default(`To deploy, run ${getCommandName()}.`) : list_item_default(
|
174201
174197
|
`To deploy, ${cmd(
|
@@ -174215,14 +174211,14 @@ function prepareFolder(cwd, folder, force) {
|
|
174215
174211
|
if (import_fs8.default.existsSync(dest)) {
|
174216
174212
|
if (!import_fs8.default.lstatSync(dest).isDirectory()) {
|
174217
174213
|
throw new Error(
|
174218
|
-
`Destination path "${
|
174214
|
+
`Destination path "${import_chalk86.default.bold(
|
174219
174215
|
folder
|
174220
174216
|
)}" already exists and is not a directory.`
|
174221
174217
|
);
|
174222
174218
|
}
|
174223
174219
|
if (!force && import_fs8.default.readdirSync(dest).length !== 0) {
|
174224
174220
|
throw new Error(
|
174225
|
-
`Destination path "${
|
174221
|
+
`Destination path "${import_chalk86.default.bold(
|
174226
174222
|
folder
|
174227
174223
|
)}" already exists and is not an empty directory. You may use ${cmd(
|
174228
174224
|
"--force"
|
@@ -174233,14 +174229,14 @@ function prepareFolder(cwd, folder, force) {
|
|
174233
174229
|
try {
|
174234
174230
|
import_fs8.default.mkdirSync(dest);
|
174235
174231
|
} catch (e2) {
|
174236
|
-
throw new Error(`Could not create directory "${
|
174232
|
+
throw new Error(`Could not create directory "${import_chalk86.default.bold(folder)}".`);
|
174237
174233
|
}
|
174238
174234
|
}
|
174239
174235
|
return dest;
|
174240
174236
|
}
|
174241
174237
|
async function guess(client2, exampleList, name) {
|
174242
174238
|
const GuessError = new Error(
|
174243
|
-
`No example found for ${
|
174239
|
+
`No example found for ${import_chalk86.default.bold(name)}, run ${getCommandName(
|
174244
174240
|
`init`
|
174245
174241
|
)} to see the list of available examples.`
|
174246
174242
|
);
|
@@ -174249,21 +174245,21 @@ async function guess(client2, exampleList, name) {
|
|
174249
174245
|
}
|
174250
174246
|
const found = did_you_mean_default(name, exampleList, 0.7);
|
174251
174247
|
if (typeof found === "string") {
|
174252
|
-
if (await confirm(client2, `Did you mean ${
|
174248
|
+
if (await confirm(client2, `Did you mean ${import_chalk86.default.bold(found)}?`, false)) {
|
174253
174249
|
return found;
|
174254
174250
|
}
|
174255
174251
|
} else {
|
174256
174252
|
throw GuessError;
|
174257
174253
|
}
|
174258
174254
|
}
|
174259
|
-
var import_fs8, import_path42, import_tar_fs,
|
174255
|
+
var import_fs8, import_path42, import_tar_fs, import_chalk86, EXAMPLE_API;
|
174260
174256
|
var init_init = __esm({
|
174261
174257
|
"src/commands/init/init.ts"() {
|
174262
174258
|
"use strict";
|
174263
174259
|
import_fs8 = __toESM3(require("fs"));
|
174264
174260
|
import_path42 = __toESM3(require("path"));
|
174265
174261
|
import_tar_fs = __toESM3(require_tar_fs());
|
174266
|
-
|
174262
|
+
import_chalk86 = __toESM3(require_source());
|
174267
174263
|
init_list();
|
174268
174264
|
init_list_item();
|
174269
174265
|
init_confirm();
|
@@ -174393,11 +174389,11 @@ var init_build_state = __esm({
|
|
174393
174389
|
});
|
174394
174390
|
|
174395
174391
|
// src/util/output/builds.ts
|
174396
|
-
var
|
174392
|
+
var import_chalk87, import_bytes7, padding, MAX_BUILD_GROUPS, MAX_OUTPUTS_PER_GROUP, hasOutput, getCommonPath, styleBuild, styleHiddenBuilds, styleOutput, getDirPath, sortByEntrypoint, groupBuilds, builds_default;
|
174397
174393
|
var init_builds = __esm({
|
174398
174394
|
"src/util/output/builds.ts"() {
|
174399
174395
|
"use strict";
|
174400
|
-
|
174396
|
+
import_chalk87 = __toESM3(require_source());
|
174401
174397
|
import_bytes7 = __toESM3(require_bytes());
|
174402
174398
|
init_build_state();
|
174403
174399
|
padding = 8;
|
@@ -174426,48 +174422,48 @@ var init_builds = __esm({
|
|
174426
174422
|
styleBuild = (build2, times, longestSource) => {
|
174427
174423
|
const { entrypoint, id } = build2;
|
174428
174424
|
const time = typeof times[id] === "string" ? times[id] : "";
|
174429
|
-
let pathColor =
|
174425
|
+
let pathColor = import_chalk87.default.cyan;
|
174430
174426
|
if (isFailed(build2)) {
|
174431
|
-
pathColor =
|
174427
|
+
pathColor = import_chalk87.default.red;
|
174432
174428
|
}
|
174433
174429
|
const entry = entrypoint.padEnd(longestSource + padding);
|
174434
174430
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
174435
|
-
return `${
|
174431
|
+
return `${import_chalk87.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
174436
174432
|
};
|
174437
174433
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden = false) => {
|
174438
174434
|
const { id } = buildGroup[0];
|
174439
174435
|
const entry = commonPath.padEnd(longestSource + padding);
|
174440
174436
|
const time = typeof times[id] === "string" ? times[id] : "";
|
174441
174437
|
const prefix = isHidden === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
174442
|
-
let pathColor =
|
174438
|
+
let pathColor = import_chalk87.default.cyan;
|
174443
174439
|
if (buildGroup.every(isFailed)) {
|
174444
|
-
pathColor =
|
174440
|
+
pathColor = import_chalk87.default.red;
|
174445
174441
|
}
|
174446
174442
|
if (isHidden) {
|
174447
|
-
pathColor =
|
174443
|
+
pathColor = import_chalk87.default.grey;
|
174448
174444
|
}
|
174449
|
-
return `${
|
174445
|
+
return `${import_chalk87.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
174450
174446
|
};
|
174451
174447
|
styleOutput = (output2, readyState, isLast) => {
|
174452
174448
|
const { type, path: path11, size, lambda } = output2;
|
174453
174449
|
const prefix = type === "lambda" ? "\u03BB " : "";
|
174454
|
-
const finalSize = size ? ` ${
|
174455
|
-
let color =
|
174450
|
+
const finalSize = size ? ` ${import_chalk87.default.grey(`(${(0, import_bytes7.default)(size)})`)}` : "";
|
174451
|
+
let color = import_chalk87.default.grey;
|
174456
174452
|
let finalRegion = "";
|
174457
174453
|
if (isReady({ readyState })) {
|
174458
|
-
color =
|
174454
|
+
color = import_chalk87.default;
|
174459
174455
|
} else if (isFailed({ readyState })) {
|
174460
|
-
color =
|
174456
|
+
color = import_chalk87.default.red;
|
174461
174457
|
}
|
174462
174458
|
if (lambda) {
|
174463
174459
|
const { deployedTo } = lambda;
|
174464
174460
|
if (deployedTo && deployedTo.length > 0) {
|
174465
|
-
finalRegion = ` ${
|
174461
|
+
finalRegion = ` ${import_chalk87.default.grey(`[${deployedTo.join(", ")}]`)}`;
|
174466
174462
|
}
|
174467
174463
|
}
|
174468
174464
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
174469
174465
|
const main15 = prefix + path11 + finalSize + finalRegion;
|
174470
|
-
return `${
|
174466
|
+
return `${import_chalk87.default.grey(corner)} ${color(main15)}`;
|
174471
174467
|
};
|
174472
174468
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
174473
174469
|
const parts = path11.split("/").slice(0, -1);
|
@@ -174599,7 +174595,7 @@ var init_builds = __esm({
|
|
174599
174595
|
);
|
174600
174596
|
if (outputs.length > MAX_OUTPUTS_PER_GROUP) {
|
174601
174597
|
final.push(
|
174602
|
-
|
174598
|
+
import_chalk87.default.grey(
|
174603
174599
|
`\u2514\u2500\u2500 ${outputs.length - MAX_OUTPUTS_PER_GROUP} output items hidden
|
174604
174600
|
`
|
174605
174601
|
)
|
@@ -174647,19 +174643,19 @@ function routes(routes2) {
|
|
174647
174643
|
const padding2 = 6;
|
174648
174644
|
const space = " ".repeat(padding2);
|
174649
174645
|
const destSpace = " ".repeat(longestDest || 10);
|
174650
|
-
const arrow =
|
174646
|
+
const arrow = import_chalk88.default.grey("->");
|
174651
174647
|
for (const item of routes2) {
|
174652
174648
|
if ("handle" in item) {
|
174653
|
-
toPrint += `${
|
174649
|
+
toPrint += `${import_chalk88.default.grey("\u2576")} ${import_chalk88.default.cyan(item.handle)}`;
|
174654
174650
|
continue;
|
174655
174651
|
}
|
174656
174652
|
const { src, dest, status, headers } = item;
|
174657
174653
|
const last = routes2.indexOf(item) === routes2.length - 1;
|
174658
174654
|
const suffix = last ? "" : `
|
174659
174655
|
`;
|
174660
|
-
const finalSrc =
|
174656
|
+
const finalSrc = import_chalk88.default.cyan(src.padEnd(longestSrc + padding2));
|
174661
174657
|
const finalDest = dest ? `${arrow}${space}${dest}` : ` ${space}${destSpace}`;
|
174662
|
-
const finalStatus = status ?
|
174658
|
+
const finalStatus = status ? import_chalk88.default.grey(`[${status}]`) : "";
|
174663
174659
|
let finalHeaders = null;
|
174664
174660
|
if (headers) {
|
174665
174661
|
finalHeaders = `
|
@@ -174670,21 +174666,21 @@ function routes(routes2) {
|
|
174670
174666
|
const last2 = headerKeys.indexOf(header) === headerKeys.length - 1;
|
174671
174667
|
const suffix2 = last2 ? "" : `
|
174672
174668
|
`;
|
174673
|
-
const prefix2 =
|
174669
|
+
const prefix2 = import_chalk88.default.grey(last2 ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500");
|
174674
174670
|
finalHeaders += `${prefix2} ${header}: ${value}${suffix2}`;
|
174675
174671
|
}
|
174676
174672
|
}
|
174677
|
-
const prefix =
|
174673
|
+
const prefix = import_chalk88.default.grey(finalHeaders ? "\u250C" : "\u2576");
|
174678
174674
|
const fill = `${finalSrc}${finalDest}${space}${finalStatus}`;
|
174679
174675
|
toPrint += `${prefix} ${fill}${finalHeaders || ""}${suffix}`;
|
174680
174676
|
}
|
174681
174677
|
return toPrint;
|
174682
174678
|
}
|
174683
|
-
var
|
174679
|
+
var import_chalk88, longestProperty;
|
174684
174680
|
var init_routes = __esm({
|
174685
174681
|
"src/util/output/routes.ts"() {
|
174686
174682
|
"use strict";
|
174687
|
-
|
174683
|
+
import_chalk88 = __toESM3(require_source());
|
174688
174684
|
longestProperty = (routes2, name) => {
|
174689
174685
|
const longestItem = routes2.sort((a, b) => {
|
174690
174686
|
const aName = a[name];
|
@@ -174822,7 +174818,7 @@ async function inspect3(client2) {
|
|
174822
174818
|
} catch {
|
174823
174819
|
}
|
174824
174820
|
client2.output.spinner(
|
174825
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
174821
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk89.default.bold(contextName)}`
|
174826
174822
|
);
|
174827
174823
|
let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
174828
174824
|
let abortController;
|
@@ -174849,7 +174845,7 @@ async function inspect3(client2) {
|
|
174849
174845
|
}
|
174850
174846
|
}
|
174851
174847
|
if (withLogs) {
|
174852
|
-
print(`${
|
174848
|
+
print(`${import_chalk89.default.cyan("status")} ${stateString(deployment.readyState)}
|
174853
174849
|
`);
|
174854
174850
|
} else {
|
174855
174851
|
await printDetails({ deployment, contextName, client: client2, startTimestamp });
|
@@ -174862,17 +174858,17 @@ function stateString(s) {
|
|
174862
174858
|
switch (s) {
|
174863
174859
|
case "INITIALIZING":
|
174864
174860
|
case "BUILDING":
|
174865
|
-
return
|
174861
|
+
return import_chalk89.default.yellow(CIRCLE) + sTitle;
|
174866
174862
|
case "ERROR":
|
174867
|
-
return
|
174863
|
+
return import_chalk89.default.red(CIRCLE) + sTitle;
|
174868
174864
|
case "READY":
|
174869
|
-
return
|
174865
|
+
return import_chalk89.default.green(CIRCLE) + sTitle;
|
174870
174866
|
case "QUEUED":
|
174871
|
-
return
|
174867
|
+
return import_chalk89.default.gray(CIRCLE) + sTitle;
|
174872
174868
|
case "CANCELED":
|
174873
|
-
return
|
174869
|
+
return import_chalk89.default.gray(CIRCLE) + sTitle;
|
174874
174870
|
default:
|
174875
|
-
return
|
174871
|
+
return import_chalk89.default.gray("UNKNOWN");
|
174876
174872
|
}
|
174877
174873
|
}
|
174878
174874
|
async function printDetails({
|
@@ -174882,7 +174878,7 @@ async function printDetails({
|
|
174882
174878
|
startTimestamp
|
174883
174879
|
}) {
|
174884
174880
|
client2.output.log(
|
174885
|
-
`Fetched deployment "${
|
174881
|
+
`Fetched deployment "${import_chalk89.default.bold(deployment.url)}" in ${import_chalk89.default.bold(
|
174886
174882
|
contextName
|
174887
174883
|
)} ${elapsed(Date.now() - startTimestamp)}`
|
174888
174884
|
);
|
@@ -174898,14 +174894,14 @@ async function printDetails({
|
|
174898
174894
|
const { print, link: link4 } = client2.output;
|
174899
174895
|
const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
|
174900
174896
|
print("\n");
|
174901
|
-
print(
|
174902
|
-
print(` ${
|
174897
|
+
print(import_chalk89.default.bold(" General\n\n"));
|
174898
|
+
print(` ${import_chalk89.default.cyan("id")} ${id}
|
174903
174899
|
`);
|
174904
|
-
print(` ${
|
174900
|
+
print(` ${import_chalk89.default.cyan("name")} ${name}
|
174905
174901
|
`);
|
174906
174902
|
const customEnvironmentName = deployment.customEnvironment?.name;
|
174907
174903
|
const target = customEnvironmentName ?? deployment.target ?? "preview";
|
174908
|
-
print(` ${
|
174904
|
+
print(` ${import_chalk89.default.cyan("target")} `);
|
174909
174905
|
print(
|
174910
174906
|
deployment.customEnvironment && deployment.team?.slug ? `${link4(
|
174911
174907
|
`${target}`,
|
@@ -174915,13 +174911,13 @@ async function printDetails({
|
|
174915
174911
|
` : `${target}
|
174916
174912
|
`
|
174917
174913
|
);
|
174918
|
-
print(` ${
|
174914
|
+
print(` ${import_chalk89.default.cyan("status")} ${stateString(readyState)}
|
174919
174915
|
`);
|
174920
|
-
print(` ${
|
174916
|
+
print(` ${import_chalk89.default.cyan("url")} https://${url3}
|
174921
174917
|
`);
|
174922
174918
|
if (createdAt) {
|
174923
174919
|
print(
|
174924
|
-
` ${
|
174920
|
+
` ${import_chalk89.default.cyan("created")} ${new Date(createdAt)} ${elapsed(
|
174925
174921
|
Date.now() - createdAt,
|
174926
174922
|
true
|
174927
174923
|
)}
|
@@ -174930,10 +174926,10 @@ async function printDetails({
|
|
174930
174926
|
}
|
174931
174927
|
print("\n\n");
|
174932
174928
|
if (aliases !== void 0 && aliases.length > 0) {
|
174933
|
-
print(
|
174929
|
+
print(import_chalk89.default.bold(" Aliases\n\n"));
|
174934
174930
|
let aliasList = "";
|
174935
174931
|
for (const alias2 of aliases) {
|
174936
|
-
aliasList += `${
|
174932
|
+
aliasList += `${import_chalk89.default.gray("\u2576")} https://${alias2}
|
174937
174933
|
`;
|
174938
174934
|
}
|
174939
174935
|
print(indent_default(aliasList, 4));
|
@@ -174945,12 +174941,12 @@ async function printDetails({
|
|
174945
174941
|
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
174946
174942
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
174947
174943
|
}
|
174948
|
-
print(
|
174944
|
+
print(import_chalk89.default.bold(" Builds\n\n"));
|
174949
174945
|
print(indent_default(builds_default(builds, times).toPrint, 4));
|
174950
174946
|
print("\n\n");
|
174951
174947
|
}
|
174952
174948
|
if (Array.isArray(routes2) && routes2.length > 0) {
|
174953
|
-
print(
|
174949
|
+
print(import_chalk89.default.bold(" Routes\n\n"));
|
174954
174950
|
print(indent_default(routes(routes2), 4));
|
174955
174951
|
print(`
|
174956
174952
|
|
@@ -174963,12 +174959,12 @@ function exitCode(state) {
|
|
174963
174959
|
}
|
174964
174960
|
return 0;
|
174965
174961
|
}
|
174966
|
-
var import_error_utils24,
|
174962
|
+
var import_error_utils24, import_chalk89, import_ms17, import_title5, import_url20;
|
174967
174963
|
var init_inspect2 = __esm({
|
174968
174964
|
"src/commands/inspect/index.ts"() {
|
174969
174965
|
"use strict";
|
174970
174966
|
import_error_utils24 = __toESM3(require_dist2());
|
174971
|
-
|
174967
|
+
import_chalk89 = __toESM3(require_source());
|
174972
174968
|
import_ms17 = __toESM3(require_ms2());
|
174973
174969
|
import_title5 = __toESM3(require_lib17());
|
174974
174970
|
import_url20 = require("url");
|
@@ -175276,7 +175272,7 @@ async function list2(client2) {
|
|
175276
175272
|
error4("Please provide a number for flag `--next`");
|
175277
175273
|
return 1;
|
175278
175274
|
}
|
175279
|
-
spinner(`Fetching deployments in ${
|
175275
|
+
spinner(`Fetching deployments in ${import_chalk90.default.bold(contextName)}`);
|
175280
175276
|
const now = new Now({
|
175281
175277
|
client: client2,
|
175282
175278
|
currentTeam
|
@@ -175347,7 +175343,7 @@ async function list2(client2) {
|
|
175347
175343
|
return 0;
|
175348
175344
|
}
|
175349
175345
|
log2(
|
175350
|
-
`${target === "production" ? `Production deployments` : `Deployments`} for ${
|
175346
|
+
`${target === "production" ? `Production deployments` : `Deployments`} for ${import_chalk90.default.bold(app)} under ${import_chalk90.default.bold(contextName)} ${elapsed(
|
175351
175347
|
Date.now() - start
|
175352
175348
|
)}`
|
175353
175349
|
);
|
@@ -175362,16 +175358,16 @@ async function list2(client2) {
|
|
175362
175358
|
client2.output.print(
|
175363
175359
|
`${table(
|
175364
175360
|
[
|
175365
|
-
headers.map((header) =>
|
175361
|
+
headers.map((header) => import_chalk90.default.bold(import_chalk90.default.cyan(header))),
|
175366
175362
|
...deployments.sort(sortRecent()).map((dep) => {
|
175367
175363
|
urls.push(`https://${dep.url}`);
|
175368
175364
|
return [
|
175369
|
-
|
175365
|
+
import_chalk90.default.gray((0, import_ms18.default)(Date.now() - dep.createdAt)),
|
175370
175366
|
`https://${dep.url}`,
|
175371
175367
|
stateString2(dep.state || ""),
|
175372
175368
|
dep.target === "production" ? "Production" : "Preview",
|
175373
|
-
|
175374
|
-
showUsername ?
|
175369
|
+
import_chalk90.default.gray(getDeploymentDuration(dep)),
|
175370
|
+
showUsername ? import_chalk90.default.gray(dep.creator?.username) : ""
|
175375
175371
|
];
|
175376
175372
|
}).filter(
|
175377
175373
|
(app2) => (
|
@@ -175417,17 +175413,17 @@ function stateString2(s) {
|
|
175417
175413
|
case "BUILDING":
|
175418
175414
|
case "DEPLOYING":
|
175419
175415
|
case "ANALYZING":
|
175420
|
-
return
|
175416
|
+
return import_chalk90.default.yellow(CIRCLE) + sTitle;
|
175421
175417
|
case "ERROR":
|
175422
|
-
return
|
175418
|
+
return import_chalk90.default.red(CIRCLE) + sTitle;
|
175423
175419
|
case "READY":
|
175424
|
-
return
|
175420
|
+
return import_chalk90.default.green(CIRCLE) + sTitle;
|
175425
175421
|
case "QUEUED":
|
175426
|
-
return
|
175422
|
+
return import_chalk90.default.white(CIRCLE) + sTitle;
|
175427
175423
|
case "CANCELED":
|
175428
|
-
return
|
175424
|
+
return import_chalk90.default.gray(sTitle);
|
175429
175425
|
default:
|
175430
|
-
return
|
175426
|
+
return import_chalk90.default.gray("UNKNOWN");
|
175431
175427
|
}
|
175432
175428
|
}
|
175433
175429
|
function sortRecent() {
|
@@ -175445,11 +175441,11 @@ function filterUniqueApps() {
|
|
175445
175441
|
return true;
|
175446
175442
|
};
|
175447
175443
|
}
|
175448
|
-
var
|
175444
|
+
var import_chalk90, import_ms18, import_title6, import_error_utils25;
|
175449
175445
|
var init_list2 = __esm({
|
175450
175446
|
"src/commands/list/index.ts"() {
|
175451
175447
|
"use strict";
|
175452
|
-
|
175448
|
+
import_chalk90 = __toESM3(require_source());
|
175453
175449
|
import_ms18 = __toESM3(require_ms2());
|
175454
175450
|
init_table();
|
175455
175451
|
import_title6 = __toESM3(require_lib17());
|
@@ -175532,7 +175528,7 @@ async function logs(client2) {
|
|
175532
175528
|
} catch {
|
175533
175529
|
}
|
175534
175530
|
spinner(
|
175535
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
175531
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk91.default.bold(contextName)}`
|
175536
175532
|
);
|
175537
175533
|
let deployment;
|
175538
175534
|
try {
|
@@ -175568,19 +175564,19 @@ function printDisclaimer(deployment, { print, warn }) {
|
|
175568
175564
|
`This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
|
175569
175565
|
);
|
175570
175566
|
print(
|
175571
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
175567
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk91.default.dim(
|
175572
175568
|
deployment.id
|
175573
|
-
)}) starting from ${
|
175569
|
+
)}) starting from ${import_chalk91.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
|
175574
175570
|
|
175575
175571
|
`
|
175576
175572
|
);
|
175577
175573
|
}
|
175578
|
-
var import_error_utils26,
|
175574
|
+
var import_error_utils26, import_chalk91, import_format2, deprecatedFlags, dateTimeFormat2;
|
175579
175575
|
var init_logs2 = __esm({
|
175580
175576
|
"src/commands/logs/index.ts"() {
|
175581
175577
|
"use strict";
|
175582
175578
|
import_error_utils26 = __toESM3(require_dist2());
|
175583
|
-
|
175579
|
+
import_chalk91 = __toESM3(require_source());
|
175584
175580
|
import_format2 = __toESM3(require_format2());
|
175585
175581
|
init_build_state();
|
175586
175582
|
init_is_deploying();
|
@@ -175745,7 +175741,7 @@ async function login2(client2) {
|
|
175745
175741
|
writeToConfigFile(client2.config);
|
175746
175742
|
output2.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
175747
175743
|
output2.print(
|
175748
|
-
`${
|
175744
|
+
`${import_chalk92.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
175749
175745
|
`
|
175750
175746
|
);
|
175751
175747
|
output2.print(
|
@@ -175757,12 +175753,12 @@ async function login2(client2) {
|
|
175757
175753
|
);
|
175758
175754
|
return 0;
|
175759
175755
|
}
|
175760
|
-
var import_email_validator,
|
175756
|
+
var import_email_validator, import_chalk92;
|
175761
175757
|
var init_login2 = __esm({
|
175762
175758
|
"src/commands/login/index.ts"() {
|
175763
175759
|
"use strict";
|
175764
175760
|
import_email_validator = __toESM3(require_email_validator());
|
175765
|
-
|
175761
|
+
import_chalk92 = __toESM3(require_source());
|
175766
175762
|
init_humanize_path();
|
175767
175763
|
init_get_args();
|
175768
175764
|
init_prompt();
|
@@ -175886,12 +175882,12 @@ async function add6(client2, args2, contextName) {
|
|
175886
175882
|
const { output: output2 } = client2;
|
175887
175883
|
if (args2.length !== 1) {
|
175888
175884
|
output2.error(
|
175889
|
-
`Invalid number of arguments. Usage: ${
|
175885
|
+
`Invalid number of arguments. Usage: ${import_chalk93.default.cyan(
|
175890
175886
|
`${getCommandName("project add <name>")}`
|
175891
175887
|
)}`
|
175892
175888
|
);
|
175893
175889
|
if (args2.length > 1) {
|
175894
|
-
const example =
|
175890
|
+
const example = import_chalk93.default.cyan(
|
175895
175891
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
175896
175892
|
);
|
175897
175893
|
output2.log(
|
@@ -175917,17 +175913,17 @@ async function add6(client2, args2, contextName) {
|
|
175917
175913
|
}
|
175918
175914
|
const elapsed2 = (0, import_ms19.default)(Date.now() - start);
|
175919
175915
|
output2.log(
|
175920
|
-
`${
|
175916
|
+
`${import_chalk93.default.cyan("Success!")} Project ${import_chalk93.default.bold(
|
175921
175917
|
name.toLowerCase()
|
175922
|
-
)} added (${
|
175918
|
+
)} added (${import_chalk93.default.bold(contextName)}) ${import_chalk93.default.gray(`[${elapsed2}]`)}`
|
175923
175919
|
);
|
175924
175920
|
return;
|
175925
175921
|
}
|
175926
|
-
var
|
175922
|
+
var import_chalk93, import_ms19;
|
175927
175923
|
var init_add5 = __esm({
|
175928
175924
|
"src/commands/project/add.ts"() {
|
175929
175925
|
"use strict";
|
175930
|
-
|
175926
|
+
import_chalk93 = __toESM3(require_source());
|
175931
175927
|
import_ms19 = __toESM3(require_ms2());
|
175932
175928
|
init_errors_ts();
|
175933
175929
|
init_pkg_name();
|
@@ -175940,14 +175936,14 @@ async function list3(client2, argv2, args2, contextName) {
|
|
175940
175936
|
const { output: output2 } = client2;
|
175941
175937
|
if (args2.length !== 0) {
|
175942
175938
|
output2.error(
|
175943
|
-
`Invalid number of arguments. Usage: ${
|
175939
|
+
`Invalid number of arguments. Usage: ${import_chalk94.default.cyan(
|
175944
175940
|
`${getCommandName("project ls")}`
|
175945
175941
|
)}`
|
175946
175942
|
);
|
175947
175943
|
return 2;
|
175948
175944
|
}
|
175949
175945
|
const start = Date.now();
|
175950
|
-
output2.spinner(`Fetching projects in ${
|
175946
|
+
output2.spinner(`Fetching projects in ${import_chalk94.default.bold(contextName)}`);
|
175951
175947
|
let projectsUrl = `/v9/projects?limit=20`;
|
175952
175948
|
const deprecated = argv2["--update-required"] || false;
|
175953
175949
|
if (deprecated) {
|
@@ -175982,19 +175978,19 @@ async function list3(client2, argv2, args2, contextName) {
|
|
175982
175978
|
);
|
175983
175979
|
}
|
175984
175980
|
output2.log(
|
175985
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
175981
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk94.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk94.default.gray(`[${elapsed2}]`)}`
|
175986
175982
|
);
|
175987
175983
|
if (projectList.length > 0) {
|
175988
175984
|
const tablePrint = table(
|
175989
175985
|
[
|
175990
175986
|
["Project Name", "Latest Production URL", "Updated"].map(
|
175991
|
-
(header) =>
|
175987
|
+
(header) => import_chalk94.default.bold(import_chalk94.default.cyan(header))
|
175992
175988
|
),
|
175993
175989
|
...projectList.map((project) => [
|
175994
175990
|
[
|
175995
|
-
|
175991
|
+
import_chalk94.default.bold(project.name),
|
175996
175992
|
getLatestProdUrl(project),
|
175997
|
-
|
175993
|
+
import_chalk94.default.gray((0, import_ms20.default)(Date.now() - project.updatedAt))
|
175998
175994
|
]
|
175999
175995
|
]).flat()
|
176000
175996
|
],
|
@@ -176018,11 +176014,11 @@ function getLatestProdUrl(project) {
|
|
176018
176014
|
return "https://" + alias2;
|
176019
176015
|
return "--";
|
176020
176016
|
}
|
176021
|
-
var
|
176017
|
+
var import_chalk94, import_ms20, import_build_utils18;
|
176022
176018
|
var init_list3 = __esm({
|
176023
176019
|
"src/commands/project/list.ts"() {
|
176024
176020
|
"use strict";
|
176025
|
-
|
176021
|
+
import_chalk94 = __toESM3(require_source());
|
176026
176022
|
import_ms20 = __toESM3(require_ms2());
|
176027
176023
|
init_table();
|
176028
176024
|
init_get_command_flags();
|
@@ -176035,7 +176031,7 @@ var init_list3 = __esm({
|
|
176035
176031
|
async function rm6(client2, args2) {
|
176036
176032
|
if (args2.length !== 1) {
|
176037
176033
|
client2.output.error(
|
176038
|
-
`Invalid number of arguments. Usage: ${
|
176034
|
+
`Invalid number of arguments. Usage: ${import_chalk95.default.cyan(
|
176039
176035
|
`${getCommandName("project rm <name>")}`
|
176040
176036
|
)}`
|
176041
176037
|
);
|
@@ -176064,7 +176060,7 @@ async function rm6(client2, args2) {
|
|
176064
176060
|
}
|
176065
176061
|
const elapsed2 = (0, import_ms21.default)(Date.now() - start);
|
176066
176062
|
client2.output.log(
|
176067
|
-
`${
|
176063
|
+
`${import_chalk95.default.cyan("Success!")} Project ${import_chalk95.default.bold(name)} removed ${import_chalk95.default.gray(
|
176068
176064
|
`[${elapsed2}]`
|
176069
176065
|
)}`
|
176070
176066
|
);
|
@@ -176073,19 +176069,19 @@ async function rm6(client2, args2) {
|
|
176073
176069
|
async function readConfirmation3(client2, projectName) {
|
176074
176070
|
client2.output.print(
|
176075
176071
|
prependEmoji(
|
176076
|
-
`The project ${
|
176072
|
+
`The project ${import_chalk95.default.bold(projectName)} will be removed permanently.
|
176077
176073
|
It will also delete everything under the project including deployments.
|
176078
176074
|
`,
|
176079
176075
|
emoji("warning")
|
176080
176076
|
)
|
176081
176077
|
);
|
176082
|
-
return await confirm(client2, `${
|
176078
|
+
return await confirm(client2, `${import_chalk95.default.bold.red("Are you sure?")}`, false);
|
176083
176079
|
}
|
176084
|
-
var
|
176080
|
+
var import_chalk95, import_ms21, e;
|
176085
176081
|
var init_rm6 = __esm({
|
176086
176082
|
"src/commands/project/rm.ts"() {
|
176087
176083
|
"use strict";
|
176088
|
-
|
176084
|
+
import_chalk95 = __toESM3(require_source());
|
176089
176085
|
import_ms21 = __toESM3(require_ms2());
|
176090
176086
|
init_emoji();
|
176091
176087
|
init_errors_ts();
|
@@ -176294,7 +176290,7 @@ async function getProjectByDeployment({
|
|
176294
176290
|
let team;
|
176295
176291
|
try {
|
176296
176292
|
output2?.spinner(
|
176297
|
-
`Fetching deployment "${deployId}" in ${
|
176293
|
+
`Fetching deployment "${deployId}" in ${import_chalk96.default.bold(contextName)}\u2026`
|
176298
176294
|
);
|
176299
176295
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
176300
176296
|
config3.currentTeam ? getTeamById(client2, config3.currentTeam) : void 0,
|
@@ -176311,12 +176307,12 @@ async function getProjectByDeployment({
|
|
176311
176307
|
team = teamResult.value;
|
176312
176308
|
deployment = deploymentResult.value;
|
176313
176309
|
output2?.log(
|
176314
|
-
`Fetching deployment "${deployId}" in ${
|
176310
|
+
`Fetching deployment "${deployId}" in ${import_chalk96.default.bold(contextName)}\u2026`
|
176315
176311
|
);
|
176316
176312
|
if (deployment.team?.id) {
|
176317
176313
|
if (!team || deployment.team.id !== team.id) {
|
176318
176314
|
const err = new Error(
|
176319
|
-
team ? `Deployment doesn't belong to current team ${
|
176315
|
+
team ? `Deployment doesn't belong to current team ${import_chalk96.default.bold(
|
176320
176316
|
contextName
|
176321
176317
|
)}` : `Deployment belongs to a different team`
|
176322
176318
|
);
|
@@ -176325,7 +176321,7 @@ async function getProjectByDeployment({
|
|
176325
176321
|
}
|
176326
176322
|
} else if (team) {
|
176327
176323
|
const err = new Error(
|
176328
|
-
`Deployment doesn't belong to current team ${
|
176324
|
+
`Deployment doesn't belong to current team ${import_chalk96.default.bold(contextName)}`
|
176329
176325
|
);
|
176330
176326
|
err.code = "ERR_INVALID_TEAM";
|
176331
176327
|
throw err;
|
@@ -176346,11 +176342,11 @@ async function getProjectByDeployment({
|
|
176346
176342
|
output2?.stopSpinner();
|
176347
176343
|
}
|
176348
176344
|
}
|
176349
|
-
var
|
176345
|
+
var import_chalk96;
|
176350
176346
|
var init_get_project_by_deployment = __esm({
|
176351
176347
|
"src/util/projects/get-project-by-deployment.ts"() {
|
176352
176348
|
"use strict";
|
176353
|
-
|
176349
|
+
import_chalk96 = __toESM3(require_source());
|
176354
176350
|
init_get_deployment();
|
176355
176351
|
init_get_project_by_id_or_name();
|
176356
176352
|
init_get_scope();
|
@@ -176363,21 +176359,21 @@ var init_get_project_by_deployment = __esm({
|
|
176363
176359
|
// src/util/alias/render-alias-status.ts
|
176364
176360
|
function renderAliasStatus(status) {
|
176365
176361
|
if (status === "completed") {
|
176366
|
-
return
|
176362
|
+
return import_chalk97.default.green(status);
|
176367
176363
|
}
|
176368
176364
|
if (status === "failed") {
|
176369
|
-
return
|
176365
|
+
return import_chalk97.default.red(status);
|
176370
176366
|
}
|
176371
176367
|
if (status === "skipped") {
|
176372
|
-
return
|
176368
|
+
return import_chalk97.default.gray(status);
|
176373
176369
|
}
|
176374
|
-
return
|
176370
|
+
return import_chalk97.default.yellow(status);
|
176375
176371
|
}
|
176376
|
-
var
|
176372
|
+
var import_chalk97;
|
176377
176373
|
var init_render_alias_status = __esm({
|
176378
176374
|
"src/util/alias/render-alias-status.ts"() {
|
176379
176375
|
"use strict";
|
176380
|
-
|
176376
|
+
import_chalk97 = __toESM3(require_source());
|
176381
176377
|
}
|
176382
176378
|
});
|
176383
176379
|
|
@@ -176452,7 +176448,7 @@ async function promoteStatus({
|
|
176452
176448
|
}
|
176453
176449
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
176454
176450
|
output2.log(
|
176455
|
-
`The promotion exceeded its deadline - rerun ${
|
176451
|
+
`The promotion exceeded its deadline - rerun ${import_chalk98.default.bold(
|
176456
176452
|
`${packageName} promote ${toDeploymentId}`
|
176457
176453
|
)} to try again`
|
176458
176454
|
);
|
@@ -176518,26 +176514,26 @@ async function renderJobSucceeded({
|
|
176518
176514
|
let deploymentInfo = "";
|
176519
176515
|
try {
|
176520
176516
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
176521
|
-
deploymentInfo = `${
|
176517
|
+
deploymentInfo = `${import_chalk98.default.bold(deployment.url)} (${toDeploymentId})`;
|
176522
176518
|
} catch (err) {
|
176523
176519
|
output2.debug(
|
176524
176520
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
176525
176521
|
);
|
176526
|
-
deploymentInfo =
|
176522
|
+
deploymentInfo = import_chalk98.default.bold(toDeploymentId);
|
176527
176523
|
}
|
176528
176524
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
176529
176525
|
output2.log(
|
176530
|
-
`Success! ${
|
176526
|
+
`Success! ${import_chalk98.default.bold(
|
176531
176527
|
project.name
|
176532
176528
|
)} was promoted to ${deploymentInfo} ${duration}`
|
176533
176529
|
);
|
176534
176530
|
return 0;
|
176535
176531
|
}
|
176536
|
-
var
|
176532
|
+
var import_chalk98, import_ms22;
|
176537
176533
|
var init_status = __esm({
|
176538
176534
|
"src/commands/promote/status.ts"() {
|
176539
176535
|
"use strict";
|
176540
|
-
|
176536
|
+
import_chalk98 = __toESM3(require_source());
|
176541
176537
|
init_elapsed();
|
176542
176538
|
init_format_date();
|
176543
176539
|
init_get_deployment();
|
@@ -176580,7 +176576,7 @@ async function requestPromote({
|
|
176580
176576
|
});
|
176581
176577
|
if (timeout !== void 0 && (0, import_ms23.default)(timeout) === 0) {
|
176582
176578
|
output2.log(
|
176583
|
-
`Successfully requested promote of ${
|
176579
|
+
`Successfully requested promote of ${import_chalk99.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
176584
176580
|
);
|
176585
176581
|
output2.log(`To check promote status, run ${getCommandName("promote")}.`);
|
176586
176582
|
return 0;
|
@@ -176593,11 +176589,11 @@ async function requestPromote({
|
|
176593
176589
|
timeout
|
176594
176590
|
});
|
176595
176591
|
}
|
176596
|
-
var
|
176592
|
+
var import_chalk99, import_ms23;
|
176597
176593
|
var init_request_promote = __esm({
|
176598
176594
|
"src/commands/promote/request-promote.ts"() {
|
176599
176595
|
"use strict";
|
176600
|
-
|
176596
|
+
import_chalk99 = __toESM3(require_source());
|
176601
176597
|
init_pkg_name();
|
176602
176598
|
init_get_project_by_deployment();
|
176603
176599
|
import_ms23 = __toESM3(require_ms2());
|
@@ -176760,7 +176756,7 @@ async function getDeploymentByIdOrURL({
|
|
176760
176756
|
let team;
|
176761
176757
|
try {
|
176762
176758
|
output2.spinner(
|
176763
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
176759
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk100.default.bold(contextName)}\u2026`
|
176764
176760
|
);
|
176765
176761
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
176766
176762
|
config3.currentTeam ? getTeamById(client2, config3.currentTeam) : void 0,
|
@@ -176777,7 +176773,7 @@ async function getDeploymentByIdOrURL({
|
|
176777
176773
|
team = teamResult.value;
|
176778
176774
|
deployment = deploymentResult.value;
|
176779
176775
|
output2.log(
|
176780
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
176776
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk100.default.bold(contextName)}\u2026`
|
176781
176777
|
);
|
176782
176778
|
} finally {
|
176783
176779
|
output2.stopSpinner();
|
@@ -176785,7 +176781,7 @@ async function getDeploymentByIdOrURL({
|
|
176785
176781
|
if (deployment.team?.id) {
|
176786
176782
|
if (!team || deployment.team.id !== team.id) {
|
176787
176783
|
const err = new Error(
|
176788
|
-
team ? `Deployment doesn't belong to current team ${
|
176784
|
+
team ? `Deployment doesn't belong to current team ${import_chalk100.default.bold(
|
176789
176785
|
contextName
|
176790
176786
|
)}` : `Deployment belongs to a different team`
|
176791
176787
|
);
|
@@ -176794,18 +176790,18 @@ async function getDeploymentByIdOrURL({
|
|
176794
176790
|
}
|
176795
176791
|
} else if (team) {
|
176796
176792
|
const err = new Error(
|
176797
|
-
`Deployment doesn't belong to current team ${
|
176793
|
+
`Deployment doesn't belong to current team ${import_chalk100.default.bold(contextName)}`
|
176798
176794
|
);
|
176799
176795
|
err.code = "ERR_INVALID_TEAM";
|
176800
176796
|
throw err;
|
176801
176797
|
}
|
176802
176798
|
return deployment;
|
176803
176799
|
}
|
176804
|
-
var
|
176800
|
+
var import_chalk100;
|
176805
176801
|
var init_get_deployment_by_id_or_url = __esm({
|
176806
176802
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
176807
176803
|
"use strict";
|
176808
|
-
|
176804
|
+
import_chalk100 = __toESM3(require_source());
|
176809
176805
|
init_get_deployment();
|
176810
176806
|
init_get_team_by_id();
|
176811
176807
|
init_is_valid_name();
|
@@ -176907,14 +176903,14 @@ async function redeploy(client2) {
|
|
176907
176903
|
const previewUrl = `https://${deployment.url}`;
|
176908
176904
|
output2.print(
|
176909
176905
|
`${prependEmoji(
|
176910
|
-
`Inspect: ${
|
176906
|
+
`Inspect: ${import_chalk101.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
176911
176907
|
emoji("inspect")
|
176912
176908
|
)}
|
176913
176909
|
`
|
176914
176910
|
);
|
176915
176911
|
output2.print(
|
176916
176912
|
prependEmoji(
|
176917
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
176913
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk101.default.bold(
|
176918
176914
|
previewUrl
|
176919
176915
|
)} ${deployStamp()}`,
|
176920
176916
|
emoji("success")
|
@@ -176984,17 +176980,17 @@ async function redeploy(client2) {
|
|
176984
176980
|
output2.prettyError(err);
|
176985
176981
|
if ((0, import_error_utils29.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
176986
176982
|
output2.error(
|
176987
|
-
`Use ${
|
176983
|
+
`Use ${import_chalk101.default.bold("vc switch")} to change your current team`
|
176988
176984
|
);
|
176989
176985
|
}
|
176990
176986
|
return 1;
|
176991
176987
|
}
|
176992
176988
|
}
|
176993
|
-
var
|
176989
|
+
var import_chalk101, import_client12, import_error_utils29;
|
176994
176990
|
var init_redeploy = __esm({
|
176995
176991
|
"src/commands/redeploy/index.ts"() {
|
176996
176992
|
"use strict";
|
176997
|
-
|
176993
|
+
import_chalk101 = __toESM3(require_source());
|
176998
176994
|
import_client12 = __toESM3(require_dist10());
|
176999
176995
|
init_emoji();
|
177000
176996
|
init_get_args();
|
@@ -177209,7 +177205,7 @@ async function remove3(client2) {
|
|
177209
177205
|
}
|
177210
177206
|
const { contextName } = await getScope(client2);
|
177211
177207
|
output2.spinner(
|
177212
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
177208
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk102.default.bold(contextName)}`
|
177213
177209
|
);
|
177214
177210
|
let aliases;
|
177215
177211
|
let projects;
|
@@ -177275,12 +177271,12 @@ async function remove3(client2) {
|
|
177275
177271
|
});
|
177276
177272
|
if (deployments.length === 0 && projects.length === 0) {
|
177277
177273
|
log2(
|
177278
|
-
`Could not find ${argv2["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) =>
|
177274
|
+
`Could not find ${argv2["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) => import_chalk102.default.bold(`"${id}"`)).join(", ")}. Run ${getCommandName("projects ls")} to list.`
|
177279
177275
|
);
|
177280
177276
|
return 1;
|
177281
177277
|
}
|
177282
177278
|
log2(
|
177283
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
177279
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk102.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
177284
177280
|
);
|
177285
177281
|
if (deployments.length > 200) {
|
177286
177282
|
output2.warn(
|
@@ -177307,11 +177303,11 @@ async function remove3(client2) {
|
|
177307
177303
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
177308
177304
|
);
|
177309
177305
|
deployments.forEach((depl) => {
|
177310
|
-
output2.print(`${
|
177306
|
+
output2.print(`${import_chalk102.default.gray("-")} ${import_chalk102.default.bold(depl.url)}
|
177311
177307
|
`);
|
177312
177308
|
});
|
177313
177309
|
projects.forEach((project) => {
|
177314
|
-
output2.print(`${
|
177310
|
+
output2.print(`${import_chalk102.default.gray("-")} ${import_chalk102.default.bold(project.name)}
|
177315
177311
|
`);
|
177316
177312
|
});
|
177317
177313
|
return 0;
|
@@ -177328,8 +177324,8 @@ function readConfirmation4(deployments, projects, output2) {
|
|
177328
177324
|
);
|
177329
177325
|
const deploymentTable = table(
|
177330
177326
|
deployments.map((depl) => {
|
177331
|
-
const time =
|
177332
|
-
const url3 = depl.url ?
|
177327
|
+
const time = import_chalk102.default.gray(`${(0, import_ms25.default)(Date.now() - depl.createdAt)} ago`);
|
177328
|
+
const url3 = depl.url ? import_chalk102.default.underline(`https://${depl.url}`) : "";
|
177333
177329
|
return [` ${depl.id}`, url3, time];
|
177334
177330
|
}),
|
177335
177331
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -177340,7 +177336,7 @@ function readConfirmation4(deployments, projects, output2) {
|
|
177340
177336
|
for (const depl of deployments) {
|
177341
177337
|
for (const { alias: alias2 } of depl.aliases) {
|
177342
177338
|
output2.warn(
|
177343
|
-
`${
|
177339
|
+
`${import_chalk102.default.underline(`https://${alias2}`)} is an alias for ${import_chalk102.default.bold(depl.url)} and will be removed`
|
177344
177340
|
);
|
177345
177341
|
}
|
177346
177342
|
}
|
@@ -177354,12 +177350,12 @@ function readConfirmation4(deployments, projects, output2) {
|
|
177354
177350
|
`
|
177355
177351
|
);
|
177356
177352
|
for (const project of projects) {
|
177357
|
-
output2.print(`${
|
177353
|
+
output2.print(`${import_chalk102.default.gray("-")} ${import_chalk102.default.bold(project.name)}
|
177358
177354
|
`);
|
177359
177355
|
}
|
177360
177356
|
}
|
177361
177357
|
output2.print(
|
177362
|
-
`${
|
177358
|
+
`${import_chalk102.default.bold.red("> Are you sure?")} ${import_chalk102.default.gray("(y/N) ")}`
|
177363
177359
|
);
|
177364
177360
|
process.stdin.on("data", (d) => {
|
177365
177361
|
process.stdin.pause();
|
@@ -177376,11 +177372,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
177376
177372
|
}
|
177377
177373
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
177378
177374
|
}
|
177379
|
-
var
|
177375
|
+
var import_chalk102, import_ms25, import_pluralize11;
|
177380
177376
|
var init_remove = __esm({
|
177381
177377
|
"src/commands/remove/index.ts"() {
|
177382
177378
|
"use strict";
|
177383
|
-
|
177379
|
+
import_chalk102 = __toESM3(require_source());
|
177384
177380
|
import_ms25 = __toESM3(require_ms2());
|
177385
177381
|
import_pluralize11 = __toESM3(require_pluralize());
|
177386
177382
|
init_table();
|
@@ -177474,7 +177470,7 @@ async function rollbackStatus({
|
|
177474
177470
|
}
|
177475
177471
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
177476
177472
|
output2.log(
|
177477
|
-
`The rollback exceeded its deadline - rerun ${
|
177473
|
+
`The rollback exceeded its deadline - rerun ${import_chalk103.default.bold(
|
177478
177474
|
`${packageName} rollback ${toDeploymentId}`
|
177479
177475
|
)} to try again`
|
177480
177476
|
);
|
@@ -177542,26 +177538,26 @@ async function renderJobSucceeded2({
|
|
177542
177538
|
let deploymentInfo = "";
|
177543
177539
|
try {
|
177544
177540
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
177545
|
-
deploymentInfo = `${
|
177541
|
+
deploymentInfo = `${import_chalk103.default.bold(deployment.url)} (${toDeploymentId})`;
|
177546
177542
|
} catch (err) {
|
177547
177543
|
output2.debug(
|
177548
177544
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
177549
177545
|
);
|
177550
|
-
deploymentInfo =
|
177546
|
+
deploymentInfo = import_chalk103.default.bold(toDeploymentId);
|
177551
177547
|
}
|
177552
177548
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
177553
177549
|
output2.log(
|
177554
|
-
`Success! ${
|
177550
|
+
`Success! ${import_chalk103.default.bold(
|
177555
177551
|
project.name
|
177556
177552
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
177557
177553
|
);
|
177558
177554
|
return 0;
|
177559
177555
|
}
|
177560
|
-
var
|
177556
|
+
var import_chalk103, import_ms26;
|
177561
177557
|
var init_status2 = __esm({
|
177562
177558
|
"src/commands/rollback/status.ts"() {
|
177563
177559
|
"use strict";
|
177564
|
-
|
177560
|
+
import_chalk103 = __toESM3(require_source());
|
177565
177561
|
init_elapsed();
|
177566
177562
|
init_format_date();
|
177567
177563
|
init_get_deployment();
|
@@ -177594,7 +177590,7 @@ async function requestRollback({
|
|
177594
177590
|
});
|
177595
177591
|
if (timeout !== void 0 && (0, import_ms27.default)(timeout) === 0) {
|
177596
177592
|
output2.log(
|
177597
|
-
`Successfully requested rollback of ${
|
177593
|
+
`Successfully requested rollback of ${import_chalk104.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
177598
177594
|
);
|
177599
177595
|
output2.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
177600
177596
|
return 0;
|
@@ -177607,11 +177603,11 @@ async function requestRollback({
|
|
177607
177603
|
timeout
|
177608
177604
|
});
|
177609
177605
|
}
|
177610
|
-
var
|
177606
|
+
var import_chalk104, import_ms27;
|
177611
177607
|
var init_request_rollback = __esm({
|
177612
177608
|
"src/commands/rollback/request-rollback.ts"() {
|
177613
177609
|
"use strict";
|
177614
|
-
|
177610
|
+
import_chalk104 = __toESM3(require_source());
|
177615
177611
|
init_pkg_name();
|
177616
177612
|
init_get_project_by_deployment();
|
177617
177613
|
import_ms27 = __toESM3(require_ms2());
|
@@ -177997,7 +177993,7 @@ async function run({ output: output2, contextName, currentTeam, client: client2
|
|
177997
177993
|
if (args2.length > 1) {
|
177998
177994
|
console.error(
|
177999
177995
|
error2(
|
178000
|
-
`Invalid number of arguments. Usage: ${
|
177996
|
+
`Invalid number of arguments. Usage: ${import_chalk105.default.cyan(
|
178001
177997
|
`${getCommandName("secret ls")}`
|
178002
177998
|
)}`
|
178003
177999
|
)
|
@@ -178010,20 +178006,20 @@ async function run({ output: output2, contextName, currentTeam, client: client2
|
|
178010
178006
|
);
|
178011
178007
|
const elapsed2 = (0, import_ms29.default)(Date.now() - start);
|
178012
178008
|
output2.print(
|
178013
|
-
`${list6.length > 0 ? "Secrets" : "No secrets"} found under ${
|
178009
|
+
`${list6.length > 0 ? "Secrets" : "No secrets"} found under ${import_chalk105.default.bold(
|
178014
178010
|
contextName
|
178015
|
-
)} ${
|
178011
|
+
)} ${import_chalk105.default.gray(`[${elapsed2}]`)}
|
178016
178012
|
`
|
178017
178013
|
);
|
178018
178014
|
if (list6.length > 0) {
|
178019
178015
|
const cur = Date.now();
|
178020
|
-
const header = [["", "name", "created"].map((s) =>
|
178016
|
+
const header = [["", "name", "created"].map((s) => import_chalk105.default.dim(s))];
|
178021
178017
|
const out = table(
|
178022
178018
|
header.concat(
|
178023
178019
|
list6.map((secret) => [
|
178024
178020
|
"",
|
178025
|
-
|
178026
|
-
|
178021
|
+
import_chalk105.default.bold(secret.name),
|
178022
|
+
import_chalk105.default.gray(`${(0, import_ms29.default)(cur - new Date(secret.created))} ago`)
|
178027
178023
|
])
|
178028
178024
|
),
|
178029
178025
|
{ hsep: 2 }
|
@@ -178051,7 +178047,7 @@ ${out}
|
|
178051
178047
|
if (args2.length !== 1) {
|
178052
178048
|
console.error(
|
178053
178049
|
error2(
|
178054
|
-
`Invalid number of arguments. Usage: ${
|
178050
|
+
`Invalid number of arguments. Usage: ${import_chalk105.default.cyan(
|
178055
178051
|
`${getCommandName("secret rm <name>")}`
|
178056
178052
|
)}`
|
178057
178053
|
)
|
@@ -178069,7 +178065,7 @@ ${out}
|
|
178069
178065
|
} else {
|
178070
178066
|
console.error(
|
178071
178067
|
error2(
|
178072
|
-
`No secret found by name "${args2[0]}" under ${
|
178068
|
+
`No secret found by name "${args2[0]}" under ${import_chalk105.default.bold(
|
178073
178069
|
contextName
|
178074
178070
|
)}`
|
178075
178071
|
)
|
@@ -178079,9 +178075,9 @@ ${out}
|
|
178079
178075
|
const secret = await secrets.rm(args2[0]);
|
178080
178076
|
const elapsed2 = (0, import_ms29.default)(/* @__PURE__ */ new Date() - start);
|
178081
178077
|
output2.success(
|
178082
|
-
`Secret ${
|
178078
|
+
`Secret ${import_chalk105.default.bold(secret.name)} under ${import_chalk105.default.bold(
|
178083
178079
|
contextName
|
178084
|
-
)} removed ${
|
178080
|
+
)} removed ${import_chalk105.default.gray(`[${elapsed2}]`)}`
|
178085
178081
|
);
|
178086
178082
|
return secrets.close();
|
178087
178083
|
}
|
@@ -178095,7 +178091,7 @@ ${out}
|
|
178095
178091
|
if (args2.length !== 2) {
|
178096
178092
|
console.error(
|
178097
178093
|
error2(
|
178098
|
-
`Invalid number of arguments. Usage: ${
|
178094
|
+
`Invalid number of arguments. Usage: ${import_chalk105.default.cyan(
|
178099
178095
|
`${getCommandName("secret rename <old-name> <new-name>")}`
|
178100
178096
|
)}`
|
178101
178097
|
)
|
@@ -178105,9 +178101,9 @@ ${out}
|
|
178105
178101
|
const secret = await secrets.rename(args2[0], args2[1]);
|
178106
178102
|
const elapsed2 = (0, import_ms29.default)(/* @__PURE__ */ new Date() - start);
|
178107
178103
|
output2.success(
|
178108
|
-
`Secret ${
|
178104
|
+
`Secret ${import_chalk105.default.bold(secret.oldName)} renamed to ${import_chalk105.default.bold(
|
178109
178105
|
args2[1]
|
178110
|
-
)} under ${
|
178106
|
+
)} under ${import_chalk105.default.bold(contextName)} ${import_chalk105.default.gray(`[${elapsed2}]`)}`
|
178111
178107
|
);
|
178112
178108
|
return secrets.close();
|
178113
178109
|
}
|
@@ -178121,13 +178117,13 @@ ${out}
|
|
178121
178117
|
if (args2.length !== 2) {
|
178122
178118
|
console.error(
|
178123
178119
|
error2(
|
178124
|
-
`Invalid number of arguments. Usage: ${
|
178120
|
+
`Invalid number of arguments. Usage: ${import_chalk105.default.cyan(
|
178125
178121
|
`${getCommandName("secret add <name> <value>")}`
|
178126
178122
|
)}`
|
178127
178123
|
)
|
178128
178124
|
);
|
178129
178125
|
if (args2.length > 2) {
|
178130
|
-
const example =
|
178126
|
+
const example = import_chalk105.default.cyan(
|
178131
178127
|
`$ ${getCommandName('secret add -- "${args[0]}"')}`
|
178132
178128
|
);
|
178133
178129
|
output2.log(
|
@@ -178139,7 +178135,7 @@ ${out}
|
|
178139
178135
|
}
|
178140
178136
|
const [name, value] = args2;
|
178141
178137
|
if (typeof value === "boolean") {
|
178142
|
-
const example =
|
178138
|
+
const example = import_chalk105.default.cyan(
|
178143
178139
|
`$ ${getCommandName('secret add -- "${name}"')}`
|
178144
178140
|
);
|
178145
178141
|
output2.log(
|
@@ -178154,9 +178150,9 @@ ${out}
|
|
178154
178150
|
output2.warn(`Your secret name was converted to lower-case`);
|
178155
178151
|
}
|
178156
178152
|
output2.success(
|
178157
|
-
`Secret ${
|
178153
|
+
`Secret ${import_chalk105.default.bold(name.toLowerCase())} added under ${import_chalk105.default.bold(
|
178158
178154
|
contextName
|
178159
|
-
)} ${
|
178155
|
+
)} ${import_chalk105.default.gray(`[${elapsed2}]`)}`
|
178160
178156
|
);
|
178161
178157
|
return secrets.close();
|
178162
178158
|
}
|
@@ -178167,27 +178163,27 @@ ${out}
|
|
178167
178163
|
return 2;
|
178168
178164
|
}
|
178169
178165
|
async function readConfirmation5(client2, output2, secret, contextName) {
|
178170
|
-
const time =
|
178171
|
-
const tbl = table([[
|
178166
|
+
const time = import_chalk105.default.gray(`${(0, import_ms29.default)(/* @__PURE__ */ new Date() - new Date(secret.created))} ago`);
|
178167
|
+
const tbl = table([[import_chalk105.default.bold(secret.name), time]], {
|
178172
178168
|
align: ["r", "l"],
|
178173
178169
|
hsep: 6
|
178174
178170
|
});
|
178175
178171
|
output2.print(
|
178176
|
-
`The following secret will be removed permanently from ${
|
178172
|
+
`The following secret will be removed permanently from ${import_chalk105.default.bold(
|
178177
178173
|
contextName
|
178178
178174
|
)}
|
178179
178175
|
`
|
178180
178176
|
);
|
178181
178177
|
output2.print(` ${tbl}
|
178182
178178
|
`);
|
178183
|
-
return confirm(client2, `${
|
178179
|
+
return confirm(client2, `${import_chalk105.default.bold.red("Are you sure?")}`, false);
|
178184
178180
|
}
|
178185
|
-
var import_error_utils31,
|
178181
|
+
var import_error_utils31, import_chalk105, import_ms29, argv, subcommand, nextTimestamp, main11, secrets_default;
|
178186
178182
|
var init_secrets2 = __esm({
|
178187
178183
|
"src/commands/secrets/index.js"() {
|
178188
178184
|
"use strict";
|
178189
178185
|
import_error_utils31 = __toESM3(require_dist2());
|
178190
|
-
|
178186
|
+
import_chalk105 = __toESM3(require_source());
|
178191
178187
|
init_table();
|
178192
178188
|
import_ms29 = __toESM3(require_ms2());
|
178193
178189
|
init_error2();
|
@@ -178250,7 +178246,7 @@ async function list4(client2, argv2, args2, link4) {
|
|
178250
178246
|
const { output: output2 } = client2;
|
178251
178247
|
if (args2.length !== 0) {
|
178252
178248
|
output2.error(
|
178253
|
-
`Invalid number of arguments. Usage: ${
|
178249
|
+
`Invalid number of arguments. Usage: ${import_chalk106.default.cyan(
|
178254
178250
|
`${getCommandName("target ls")}`
|
178255
178251
|
)}`
|
178256
178252
|
);
|
@@ -178259,10 +178255,10 @@ async function list4(client2, argv2, args2, link4) {
|
|
178259
178255
|
const start = Date.now();
|
178260
178256
|
const projectUrl = `https://vercel.com/${link4.org.slug}/${link4.project.name}`;
|
178261
178257
|
const projectSlugLink = output2.link(
|
178262
|
-
|
178258
|
+
import_chalk106.default.bold(`${link4.org.slug}/${link4.project.name}`),
|
178263
178259
|
projectUrl,
|
178264
178260
|
{
|
178265
|
-
fallback: () =>
|
178261
|
+
fallback: () => import_chalk106.default.bold(`${link4.org.slug}/${link4.project.name}`),
|
178266
178262
|
color: false
|
178267
178263
|
}
|
178268
178264
|
);
|
@@ -178278,15 +178274,15 @@ async function list4(client2, argv2, args2, link4) {
|
|
178278
178274
|
const elapsed2 = (0, import_ms30.default)(Date.now() - start);
|
178279
178275
|
result = withDefaultEnvironmentsIncluded(result);
|
178280
178276
|
output2.log(
|
178281
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
178277
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk106.default.gray(`[${elapsed2}]`)}`
|
178282
178278
|
);
|
178283
178279
|
const tablePrint = table(
|
178284
178280
|
[
|
178285
178281
|
["Target Name", "Target Slug", "Target ID", "Type", "Updated"].map(
|
178286
|
-
(header) =>
|
178282
|
+
(header) => import_chalk106.default.bold(import_chalk106.default.cyan(header))
|
178287
178283
|
),
|
178288
178284
|
...result.map((target) => {
|
178289
|
-
const boldName =
|
178285
|
+
const boldName = import_chalk106.default.bold(target.name);
|
178290
178286
|
const type = target.type === "production" ? "Production" : target.type === "development" ? "Development" : "Preview";
|
178291
178287
|
return [
|
178292
178288
|
[
|
@@ -178298,7 +178294,7 @@ async function list4(client2, argv2, args2, link4) {
|
|
178298
178294
|
target.slug,
|
178299
178295
|
target.id,
|
178300
178296
|
type,
|
178301
|
-
|
178297
|
+
import_chalk106.default.gray(
|
178302
178298
|
target.updatedAt > 0 ? (0, import_ms30.default)(Date.now() - target.updatedAt) : "-"
|
178303
178299
|
)
|
178304
178300
|
]
|
@@ -178348,11 +178344,11 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
178348
178344
|
}
|
178349
178345
|
];
|
178350
178346
|
}
|
178351
|
-
var
|
178347
|
+
var import_chalk106, import_ms30;
|
178352
178348
|
var init_list4 = __esm({
|
178353
178349
|
"src/commands/target/list.ts"() {
|
178354
178350
|
"use strict";
|
178355
|
-
|
178351
|
+
import_chalk106 = __toESM3(require_source());
|
178356
178352
|
import_ms30 = __toESM3(require_ms2());
|
178357
178353
|
init_table();
|
178358
178354
|
init_pkg_name();
|
@@ -178366,7 +178362,7 @@ var init_command25 = __esm({
|
|
178366
178362
|
"use strict";
|
178367
178363
|
init_pkg_name();
|
178368
178364
|
targetCommand = {
|
178369
|
-
name: "
|
178365
|
+
name: "target",
|
178370
178366
|
description: `Manage your Vercel Project's "targets" (custom environments).`,
|
178371
178367
|
arguments: [
|
178372
178368
|
{
|
@@ -178415,18 +178411,14 @@ async function main12(client2) {
|
|
178415
178411
|
subcommand2 = argv2._[0] || "list";
|
178416
178412
|
const args2 = argv2._.slice(1);
|
178417
178413
|
const { cwd, output: output2 } = client2;
|
178418
|
-
const
|
178419
|
-
if (
|
178420
|
-
return
|
178421
|
-
}
|
178422
|
-
if (link4.status === "not_linked") {
|
178423
|
-
output2.error("Project not linked");
|
178424
|
-
return 1;
|
178414
|
+
const linkedProject = await ensureLink(targetCommand.name, client2, cwd);
|
178415
|
+
if (typeof linkedProject === "number") {
|
178416
|
+
return linkedProject;
|
178425
178417
|
}
|
178426
178418
|
switch (subcommand2) {
|
178427
178419
|
case "ls":
|
178428
178420
|
case "list":
|
178429
|
-
return await list4(client2, argv2, args2,
|
178421
|
+
return await list4(client2, argv2, args2, linkedProject);
|
178430
178422
|
default:
|
178431
178423
|
output2.error(getInvalidSubcommand(COMMAND_CONFIG10));
|
178432
178424
|
client2.output.print(
|
@@ -178444,7 +178436,7 @@ var init_target = __esm({
|
|
178444
178436
|
init_help();
|
178445
178437
|
init_list4();
|
178446
178438
|
init_command25();
|
178447
|
-
|
178439
|
+
init_ensure_link();
|
178448
178440
|
COMMAND_CONFIG10 = {
|
178449
178441
|
ls: ["ls", "list"]
|
178450
178442
|
};
|
@@ -178507,7 +178499,7 @@ async function list5(client2) {
|
|
178507
178499
|
client2.stdout.write("\n");
|
178508
178500
|
const teamTable = table(
|
178509
178501
|
[
|
178510
|
-
["id", "email / name"].map((str) => (0,
|
178502
|
+
["id", "email / name"].map((str) => (0, import_chalk107.gray)(str)),
|
178511
178503
|
...teamList.map((team) => [team.value, team.name])
|
178512
178504
|
],
|
178513
178505
|
{ hsep: 5 }
|
@@ -178524,13 +178516,13 @@ async function list5(client2) {
|
|
178524
178516
|
}
|
178525
178517
|
return 0;
|
178526
178518
|
}
|
178527
|
-
var
|
178519
|
+
var import_chalk107;
|
178528
178520
|
var init_list5 = __esm({
|
178529
178521
|
"src/commands/teams/list.ts"() {
|
178530
178522
|
"use strict";
|
178531
178523
|
init_chars();
|
178532
178524
|
init_table();
|
178533
|
-
|
178525
|
+
import_chalk107 = __toESM3(require_source());
|
178534
178526
|
init_get_user();
|
178535
178527
|
init_get_teams();
|
178536
178528
|
init_pkg_name();
|
@@ -178587,7 +178579,7 @@ Please select a team scope using ${getCommandName(
|
|
178587
178579
|
return 1;
|
178588
178580
|
}
|
178589
178581
|
output2.log(
|
178590
|
-
introMsg || `Inviting team members to ${
|
178582
|
+
introMsg || `Inviting team members to ${import_chalk108.default.bold(currentTeam.name)}`
|
178591
178583
|
);
|
178592
178584
|
if (emails.length > 0) {
|
178593
178585
|
for (const email3 of emails) {
|
@@ -178606,10 +178598,10 @@ Please select a team scope using ${getCommandName(
|
|
178606
178598
|
throw err;
|
178607
178599
|
}
|
178608
178600
|
output2.log(
|
178609
|
-
`${
|
178601
|
+
`${import_chalk108.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
178610
178602
|
);
|
178611
178603
|
} else {
|
178612
|
-
output2.log(`${
|
178604
|
+
output2.log(`${import_chalk108.default.red(`\u2716 ${email3}`)} ${import_chalk108.default.gray("[invalid]")}`);
|
178613
178605
|
}
|
178614
178606
|
}
|
178615
178607
|
return 0;
|
@@ -178643,15 +178635,15 @@ Please select a team scope using ${getCommandName(
|
|
178643
178635
|
);
|
178644
178636
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
178645
178637
|
emails.push(email2);
|
178646
|
-
output2.log(`${
|
178638
|
+
output2.log(`${import_chalk108.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
178647
178639
|
if (hasError) {
|
178648
178640
|
hasError = false;
|
178649
178641
|
process.stderr.write(eraseLines(emails.length + 2));
|
178650
178642
|
output2.log(
|
178651
|
-
introMsg || `Inviting team members to ${
|
178643
|
+
introMsg || `Inviting team members to ${import_chalk108.default.bold(currentTeam.name)}`
|
178652
178644
|
);
|
178653
178645
|
for (const email3 of emails) {
|
178654
|
-
output2.log(`${
|
178646
|
+
output2.log(`${import_chalk108.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
178655
178647
|
}
|
178656
178648
|
}
|
178657
178649
|
} catch (err) {
|
@@ -178660,7 +178652,7 @@ Please select a team scope using ${getCommandName(
|
|
178660
178652
|
output2.error((0, import_error_utils32.errorToString)(err));
|
178661
178653
|
hasError = true;
|
178662
178654
|
for (const email3 of emails) {
|
178663
|
-
output2.log(`${
|
178655
|
+
output2.log(`${import_chalk108.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
178664
178656
|
}
|
178665
178657
|
}
|
178666
178658
|
}
|
@@ -178673,16 +178665,16 @@ Please select a team scope using ${getCommandName(
|
|
178673
178665
|
} else {
|
178674
178666
|
output2.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
178675
178667
|
for (const email3 of emails) {
|
178676
|
-
output2.log(`${
|
178668
|
+
output2.log(`${import_chalk108.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
178677
178669
|
}
|
178678
178670
|
}
|
178679
178671
|
return 0;
|
178680
178672
|
}
|
178681
|
-
var
|
178673
|
+
var import_chalk108, import_error_utils32, validateEmail2, domains, emailAutoComplete;
|
178682
178674
|
var init_invite = __esm({
|
178683
178675
|
"src/commands/teams/invite.ts"() {
|
178684
178676
|
"use strict";
|
178685
|
-
|
178677
|
+
import_chalk108 = __toESM3(require_source());
|
178686
178678
|
init_cmd();
|
178687
178679
|
init_stamp();
|
178688
178680
|
init_param();
|
@@ -178771,7 +178763,7 @@ async function add7(client2) {
|
|
178771
178763
|
let elapsed2;
|
178772
178764
|
const { output: output2 } = client2;
|
178773
178765
|
output2.log(
|
178774
|
-
`Pick a team identifier for its URL (e.g.: ${
|
178766
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk109.default.cyan(
|
178775
178767
|
"`vercel.com/acme`"
|
178776
178768
|
)})`
|
178777
178769
|
);
|
@@ -178804,7 +178796,7 @@ async function add7(client2) {
|
|
178804
178796
|
output2.stopSpinner();
|
178805
178797
|
process.stdout.write(eraseLines(2));
|
178806
178798
|
output2.success(`Team created ${elapsed2()}`);
|
178807
|
-
output2.log(`${
|
178799
|
+
output2.log(`${import_chalk109.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
178808
178800
|
`);
|
178809
178801
|
output2.log("Pick a display name for your team");
|
178810
178802
|
let name;
|
@@ -178827,7 +178819,7 @@ async function add7(client2) {
|
|
178827
178819
|
process.stdout.write(eraseLines(2));
|
178828
178820
|
team = Object.assign(team, res);
|
178829
178821
|
output2.success(`Team name saved ${elapsed2()}`);
|
178830
|
-
output2.log(`${
|
178822
|
+
output2.log(`${import_chalk109.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
178831
178823
|
`);
|
178832
178824
|
output2.spinner("Saving");
|
178833
178825
|
client2.config.currentTeam = team.id;
|
@@ -178841,11 +178833,11 @@ async function add7(client2) {
|
|
178841
178833
|
});
|
178842
178834
|
return 0;
|
178843
178835
|
}
|
178844
|
-
var
|
178836
|
+
var import_chalk109, import_error_utils33, validateSlugKeypress, validateNameKeypress, teamUrlPrefix, teamNamePrefix;
|
178845
178837
|
var init_add6 = __esm({
|
178846
178838
|
"src/commands/teams/add.ts"() {
|
178847
178839
|
"use strict";
|
178848
|
-
|
178840
|
+
import_chalk109 = __toESM3(require_source());
|
178849
178841
|
init_stamp();
|
178850
178842
|
init_erase_lines();
|
178851
178843
|
init_chars();
|
@@ -178866,7 +178858,7 @@ var init_add6 = __esm({
|
|
178866
178858
|
// should be fixed on utils/input/text.js
|
178867
178859
|
/^[ a-zA-Z0-9_-]+$/.test(value + data)
|
178868
178860
|
);
|
178869
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
178861
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk109.default.gray("vercel.com/");
|
178870
178862
|
teamNamePrefix = "Team Name".padEnd(14);
|
178871
178863
|
}
|
178872
178864
|
});
|
@@ -178889,7 +178881,7 @@ async function main13(client2, desiredSlug) {
|
|
178889
178881
|
let title7 = `${team.name} (${team.slug})`;
|
178890
178882
|
const selected = team.id === currentTeam?.id;
|
178891
178883
|
if (selected) {
|
178892
|
-
title7 += ` ${
|
178884
|
+
title7 += ` ${import_chalk110.default.bold("(current)")}`;
|
178893
178885
|
}
|
178894
178886
|
if (team.limited) {
|
178895
178887
|
title7 += ` ${emoji("locked")}`;
|
@@ -178901,7 +178893,7 @@ async function main13(client2, desiredSlug) {
|
|
178901
178893
|
selected
|
178902
178894
|
};
|
178903
178895
|
});
|
178904
|
-
let suffix = personalScopeSelected ? ` ${
|
178896
|
+
let suffix = personalScopeSelected ? ` ${import_chalk110.default.bold("(current)")}` : "";
|
178905
178897
|
if (user.limited) {
|
178906
178898
|
suffix += ` ${emoji("locked")}`;
|
178907
178899
|
}
|
@@ -178947,14 +178939,14 @@ async function main13(client2, desiredSlug) {
|
|
178947
178939
|
}
|
178948
178940
|
updateCurrentTeam(config3);
|
178949
178941
|
output2.success(
|
178950
|
-
`Your account (${
|
178942
|
+
`Your account (${import_chalk110.default.bold(user.username)}) is now active!`
|
178951
178943
|
);
|
178952
178944
|
return 0;
|
178953
178945
|
}
|
178954
178946
|
const newTeam = teams.find((team) => team.slug === desiredSlug);
|
178955
178947
|
if (!newTeam) {
|
178956
178948
|
output2.error(
|
178957
|
-
`You do not have permission to access scope ${
|
178949
|
+
`You do not have permission to access scope ${import_chalk110.default.bold(desiredSlug)}.`
|
178958
178950
|
);
|
178959
178951
|
return 1;
|
178960
178952
|
}
|
@@ -178972,15 +178964,15 @@ async function main13(client2, desiredSlug) {
|
|
178972
178964
|
}
|
178973
178965
|
updateCurrentTeam(config3, newTeam);
|
178974
178966
|
output2.success(
|
178975
|
-
`The team ${
|
178967
|
+
`The team ${import_chalk110.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
178976
178968
|
);
|
178977
178969
|
return 0;
|
178978
178970
|
}
|
178979
|
-
var
|
178971
|
+
var import_chalk110, updateCurrentTeam;
|
178980
178972
|
var init_switch = __esm({
|
178981
178973
|
"src/commands/teams/switch.ts"() {
|
178982
178974
|
"use strict";
|
178983
|
-
|
178975
|
+
import_chalk110 = __toESM3(require_source());
|
178984
178976
|
init_emoji();
|
178985
178977
|
init_get_user();
|
178986
178978
|
init_get_teams();
|
@@ -179206,7 +179198,7 @@ var import_error_utils34 = __toESM3(require_dist2());
|
|
179206
179198
|
var import_path43 = require("path");
|
179207
179199
|
var import_fs9 = require("fs");
|
179208
179200
|
var import_fs_extra23 = __toESM3(require_lib());
|
179209
|
-
var
|
179201
|
+
var import_chalk111 = __toESM3(require_source());
|
179210
179202
|
var import_epipebomb = __toESM3(require_epipebomb());
|
179211
179203
|
|
179212
179204
|
// src/util/get-latest-version/index.ts
|
@@ -180007,13 +179999,13 @@ var main14 = async () => {
|
|
180007
179999
|
const betaCommands = [];
|
180008
180000
|
if (betaCommands.includes(targetOrSubcommand)) {
|
180009
180001
|
output.print(
|
180010
|
-
`${
|
180002
|
+
`${import_chalk111.default.grey(
|
180011
180003
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
180012
180004
|
)}
|
180013
180005
|
`
|
180014
180006
|
);
|
180015
180007
|
} else {
|
180016
|
-
output.print(`${
|
180008
|
+
output.print(`${import_chalk111.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
180017
180009
|
`);
|
180018
180010
|
}
|
180019
180011
|
if (!targetOrSubcommand && argv2["--version"]) {
|
@@ -180481,20 +180473,20 @@ main14().then(async (exitCode2) => {
|
|
180481
180473
|
});
|
180482
180474
|
if (latest) {
|
180483
180475
|
const changelog = "https://github.com/vercel/vercel/releases";
|
180484
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
180476
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk111.default.magenta(
|
180485
180477
|
`
|
180486
180478
|
|
180487
|
-
The latest update ${
|
180479
|
+
The latest update ${import_chalk111.default.italic(
|
180488
180480
|
"may"
|
180489
180481
|
)} fix any errors that occurred.`
|
180490
180482
|
) : "";
|
180491
180483
|
output.print(
|
180492
180484
|
box(
|
180493
|
-
`Update available! ${
|
180485
|
+
`Update available! ${import_chalk111.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk111.default.green(
|
180494
180486
|
`v${latest}`
|
180495
180487
|
)}
|
180496
180488
|
Changelog: ${output.link(changelog, changelog, { fallback: false })}
|
180497
|
-
Run ${
|
180489
|
+
Run ${import_chalk111.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
180498
180490
|
)
|
180499
180491
|
);
|
180500
180492
|
output.print("\n\n");
|