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