vercel 41.3.1 → 41.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +515 -288
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -4071,14 +4071,14 @@ var require_templates = __commonJS2({
|
|
4071
4071
|
}
|
4072
4072
|
return results;
|
4073
4073
|
}
|
4074
|
-
function buildStyle(
|
4074
|
+
function buildStyle(chalk116, styles) {
|
4075
4075
|
const enabled = {};
|
4076
4076
|
for (const layer of styles) {
|
4077
4077
|
for (const style of layer.styles) {
|
4078
4078
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
4079
4079
|
}
|
4080
4080
|
}
|
4081
|
-
let current =
|
4081
|
+
let current = chalk116;
|
4082
4082
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
4083
4083
|
if (!Array.isArray(styles2)) {
|
4084
4084
|
continue;
|
@@ -4090,7 +4090,7 @@ var require_templates = __commonJS2({
|
|
4090
4090
|
}
|
4091
4091
|
return current;
|
4092
4092
|
}
|
4093
|
-
module2.exports = (
|
4093
|
+
module2.exports = (chalk116, temporary) => {
|
4094
4094
|
const styles = [];
|
4095
4095
|
const chunks = [];
|
4096
4096
|
let chunk = [];
|
@@ -4100,13 +4100,13 @@ var require_templates = __commonJS2({
|
|
4100
4100
|
} else if (style) {
|
4101
4101
|
const string = chunk.join("");
|
4102
4102
|
chunk = [];
|
4103
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
4103
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk116, styles)(string));
|
4104
4104
|
styles.push({ inverse, styles: parseStyle(style) });
|
4105
4105
|
} else if (close2) {
|
4106
4106
|
if (styles.length === 0) {
|
4107
4107
|
throw new Error("Found extraneous } in Chalk template literal");
|
4108
4108
|
}
|
4109
|
-
chunks.push(buildStyle(
|
4109
|
+
chunks.push(buildStyle(chalk116, styles)(chunk.join("")));
|
4110
4110
|
chunk = [];
|
4111
4111
|
styles.pop();
|
4112
4112
|
} else {
|
@@ -4154,16 +4154,16 @@ var require_source = __commonJS2({
|
|
4154
4154
|
}
|
4155
4155
|
};
|
4156
4156
|
var chalkFactory = (options) => {
|
4157
|
-
const
|
4158
|
-
applyOptions(
|
4159
|
-
|
4160
|
-
Object.setPrototypeOf(
|
4161
|
-
Object.setPrototypeOf(
|
4162
|
-
|
4157
|
+
const chalk117 = {};
|
4158
|
+
applyOptions(chalk117, options);
|
4159
|
+
chalk117.template = (...arguments_) => chalkTag(chalk117.template, ...arguments_);
|
4160
|
+
Object.setPrototypeOf(chalk117, Chalk.prototype);
|
4161
|
+
Object.setPrototypeOf(chalk117.template, chalk117);
|
4162
|
+
chalk117.template.constructor = () => {
|
4163
4163
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4164
4164
|
};
|
4165
|
-
|
4166
|
-
return
|
4165
|
+
chalk117.template.Instance = ChalkClass;
|
4166
|
+
return chalk117.template;
|
4167
4167
|
};
|
4168
4168
|
function Chalk(options) {
|
4169
4169
|
return chalkFactory(options);
|
@@ -4274,7 +4274,7 @@ var require_source = __commonJS2({
|
|
4274
4274
|
return openAll + string + closeAll;
|
4275
4275
|
};
|
4276
4276
|
var template;
|
4277
|
-
var chalkTag = (
|
4277
|
+
var chalkTag = (chalk117, ...strings) => {
|
4278
4278
|
const [firstString] = strings;
|
4279
4279
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
4280
4280
|
return strings.join(" ");
|
@@ -4290,14 +4290,14 @@ var require_source = __commonJS2({
|
|
4290
4290
|
if (template === void 0) {
|
4291
4291
|
template = require_templates();
|
4292
4292
|
}
|
4293
|
-
return template(
|
4293
|
+
return template(chalk117, parts.join(""));
|
4294
4294
|
};
|
4295
4295
|
Object.defineProperties(Chalk.prototype, styles);
|
4296
|
-
var
|
4297
|
-
|
4298
|
-
|
4299
|
-
|
4300
|
-
module2.exports =
|
4296
|
+
var chalk116 = Chalk();
|
4297
|
+
chalk116.supportsColor = stdoutColor;
|
4298
|
+
chalk116.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
4299
|
+
chalk116.stderr.supportsColor = stderrColor;
|
4300
|
+
module2.exports = chalk116;
|
4301
4301
|
}
|
4302
4302
|
});
|
4303
4303
|
|
@@ -7208,14 +7208,14 @@ var require_templates2 = __commonJS2({
|
|
7208
7208
|
}
|
7209
7209
|
return results;
|
7210
7210
|
}
|
7211
|
-
function buildStyle(
|
7211
|
+
function buildStyle(chalk116, styles) {
|
7212
7212
|
const enabled = {};
|
7213
7213
|
for (const layer of styles) {
|
7214
7214
|
for (const style of layer.styles) {
|
7215
7215
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
7216
7216
|
}
|
7217
7217
|
}
|
7218
|
-
let current =
|
7218
|
+
let current = chalk116;
|
7219
7219
|
for (const styleName of Object.keys(enabled)) {
|
7220
7220
|
if (Array.isArray(enabled[styleName])) {
|
7221
7221
|
if (!(styleName in current)) {
|
@@ -7230,7 +7230,7 @@ var require_templates2 = __commonJS2({
|
|
7230
7230
|
}
|
7231
7231
|
return current;
|
7232
7232
|
}
|
7233
|
-
module2.exports = (
|
7233
|
+
module2.exports = (chalk116, tmp) => {
|
7234
7234
|
const styles = [];
|
7235
7235
|
const chunks = [];
|
7236
7236
|
let chunk = [];
|
@@ -7240,13 +7240,13 @@ var require_templates2 = __commonJS2({
|
|
7240
7240
|
} else if (style) {
|
7241
7241
|
const str = chunk.join("");
|
7242
7242
|
chunk = [];
|
7243
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
7243
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk116, styles)(str));
|
7244
7244
|
styles.push({ inverse, styles: parseStyle(style) });
|
7245
7245
|
} else if (close2) {
|
7246
7246
|
if (styles.length === 0) {
|
7247
7247
|
throw new Error("Found extraneous } in Chalk template literal");
|
7248
7248
|
}
|
7249
|
-
chunks.push(buildStyle(
|
7249
|
+
chunks.push(buildStyle(chalk116, styles)(chunk.join("")));
|
7250
7250
|
chunk = [];
|
7251
7251
|
styles.pop();
|
7252
7252
|
} else {
|
@@ -7283,16 +7283,16 @@ var require_chalk = __commonJS2({
|
|
7283
7283
|
}
|
7284
7284
|
function Chalk(options) {
|
7285
7285
|
if (!this || !(this instanceof Chalk) || this.template) {
|
7286
|
-
const
|
7287
|
-
applyOptions(
|
7288
|
-
|
7286
|
+
const chalk116 = {};
|
7287
|
+
applyOptions(chalk116, options);
|
7288
|
+
chalk116.template = function() {
|
7289
7289
|
const args2 = [].slice.call(arguments);
|
7290
|
-
return chalkTag.apply(null, [
|
7290
|
+
return chalkTag.apply(null, [chalk116.template].concat(args2));
|
7291
7291
|
};
|
7292
|
-
Object.setPrototypeOf(
|
7293
|
-
Object.setPrototypeOf(
|
7294
|
-
|
7295
|
-
return
|
7292
|
+
Object.setPrototypeOf(chalk116, Chalk.prototype);
|
7293
|
+
Object.setPrototypeOf(chalk116.template, chalk116);
|
7294
|
+
chalk116.template.constructor = Chalk;
|
7295
|
+
return chalk116.template;
|
7296
7296
|
}
|
7297
7297
|
applyOptions(this, options);
|
7298
7298
|
}
|
@@ -7411,7 +7411,7 @@ var require_chalk = __commonJS2({
|
|
7411
7411
|
ansiStyles.dim.open = originalDim;
|
7412
7412
|
return str;
|
7413
7413
|
}
|
7414
|
-
function chalkTag(
|
7414
|
+
function chalkTag(chalk116, strings) {
|
7415
7415
|
if (!Array.isArray(strings)) {
|
7416
7416
|
return [].slice.call(arguments, 1).join(" ");
|
7417
7417
|
}
|
@@ -7421,7 +7421,7 @@ var require_chalk = __commonJS2({
|
|
7421
7421
|
parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
7422
7422
|
parts.push(String(strings.raw[i]));
|
7423
7423
|
}
|
7424
|
-
return template(
|
7424
|
+
return template(chalk116, parts.join(""));
|
7425
7425
|
}
|
7426
7426
|
Object.defineProperties(Chalk.prototype, styles);
|
7427
7427
|
module2.exports = Chalk();
|
@@ -9372,19 +9372,19 @@ var require_cli_spinners = __commonJS2({
|
|
9372
9372
|
var require_log_symbols = __commonJS2({
|
9373
9373
|
"../../node_modules/.pnpm/log-symbols@2.2.0/node_modules/log-symbols/index.js"(exports2, module2) {
|
9374
9374
|
"use strict";
|
9375
|
-
var
|
9375
|
+
var chalk116 = require_chalk();
|
9376
9376
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
9377
9377
|
var main14 = {
|
9378
|
-
info:
|
9379
|
-
success:
|
9380
|
-
warning:
|
9381
|
-
error:
|
9378
|
+
info: chalk116.blue("\u2139"),
|
9379
|
+
success: chalk116.green("\u2714"),
|
9380
|
+
warning: chalk116.yellow("\u26A0"),
|
9381
|
+
error: chalk116.red("\u2716")
|
9382
9382
|
};
|
9383
9383
|
var fallbacks = {
|
9384
|
-
info:
|
9385
|
-
success:
|
9386
|
-
warning:
|
9387
|
-
error:
|
9384
|
+
info: chalk116.blue("i"),
|
9385
|
+
success: chalk116.green("\u221A"),
|
9386
|
+
warning: chalk116.yellow("\u203C"),
|
9387
|
+
error: chalk116.red("\xD7")
|
9388
9388
|
};
|
9389
9389
|
module2.exports = isSupported ? main14 : fallbacks;
|
9390
9390
|
}
|
@@ -9780,7 +9780,7 @@ var require_wcwidth = __commonJS2({
|
|
9780
9780
|
var require_ora = __commonJS2({
|
9781
9781
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
9782
9782
|
"use strict";
|
9783
|
-
var
|
9783
|
+
var chalk116 = require_chalk();
|
9784
9784
|
var cliCursor = require_cli_cursor();
|
9785
9785
|
var cliSpinners = require_cli_spinners();
|
9786
9786
|
var logSymbols = require_log_symbols();
|
@@ -9869,7 +9869,7 @@ var require_ora = __commonJS2({
|
|
9869
9869
|
const { frames } = this.spinner;
|
9870
9870
|
let frame = frames[this.frameIndex];
|
9871
9871
|
if (this.color) {
|
9872
|
-
frame =
|
9872
|
+
frame = chalk116[this.color](frame);
|
9873
9873
|
}
|
9874
9874
|
this.frameIndex = ++this.frameIndex % frames.length;
|
9875
9875
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
@@ -31403,7 +31403,8 @@ var init_arg_common = __esm({
|
|
31403
31403
|
name: "yes",
|
31404
31404
|
shorthand: "y",
|
31405
31405
|
type: Boolean,
|
31406
|
-
deprecated: false
|
31406
|
+
deprecated: false,
|
31407
|
+
description: "Accept default value for all prompts"
|
31407
31408
|
};
|
31408
31409
|
nextOption = {
|
31409
31410
|
name: "next",
|
@@ -32133,7 +32134,7 @@ var init_command8 = __esm({
|
|
32133
32134
|
listSubcommand4 = {
|
32134
32135
|
name: "list",
|
32135
32136
|
aliases: ["ls"],
|
32136
|
-
description: "Show all
|
32137
|
+
description: "Show all domains in a list",
|
32137
32138
|
default: true,
|
32138
32139
|
arguments: [],
|
32139
32140
|
options: [limitOption, nextOption],
|
@@ -33261,7 +33262,7 @@ var init_command20 = __esm({
|
|
33261
33262
|
});
|
33262
33263
|
|
33263
33264
|
// src/commands/project/command.ts
|
33264
|
-
var addSubcommand6, listSubcommand7, removeSubcommand8, projectCommand;
|
33265
|
+
var addSubcommand6, inspectSubcommand2, listSubcommand7, removeSubcommand8, projectCommand;
|
33265
33266
|
var init_command21 = __esm({
|
33266
33267
|
"src/commands/project/command.ts"() {
|
33267
33268
|
"use strict";
|
@@ -33270,7 +33271,7 @@ var init_command21 = __esm({
|
|
33270
33271
|
addSubcommand6 = {
|
33271
33272
|
name: "add",
|
33272
33273
|
aliases: [],
|
33273
|
-
description: "Add a new
|
33274
|
+
description: "Add a new project",
|
33274
33275
|
arguments: [
|
33275
33276
|
{
|
33276
33277
|
name: "name",
|
@@ -33280,15 +33281,37 @@ var init_command21 = __esm({
|
|
33280
33281
|
options: [],
|
33281
33282
|
examples: [
|
33282
33283
|
{
|
33283
|
-
name: "Add a new
|
33284
|
+
name: "Add a new project",
|
33284
33285
|
value: `${packageName} project add my-project`
|
33285
33286
|
}
|
33286
33287
|
]
|
33287
33288
|
};
|
33289
|
+
inspectSubcommand2 = {
|
33290
|
+
name: "inspect",
|
33291
|
+
aliases: [],
|
33292
|
+
description: "Displays information related to a project",
|
33293
|
+
arguments: [
|
33294
|
+
{
|
33295
|
+
name: "name",
|
33296
|
+
required: false
|
33297
|
+
}
|
33298
|
+
],
|
33299
|
+
options: [yesOption],
|
33300
|
+
examples: [
|
33301
|
+
{
|
33302
|
+
name: "Inspect the linked project from the current directory",
|
33303
|
+
value: `${packageName} project inspect`
|
33304
|
+
},
|
33305
|
+
{
|
33306
|
+
name: 'Inspect the project named "my-project"',
|
33307
|
+
value: `${packageName} project inspect my-project`
|
33308
|
+
}
|
33309
|
+
]
|
33310
|
+
};
|
33288
33311
|
listSubcommand7 = {
|
33289
33312
|
name: "list",
|
33290
33313
|
aliases: ["ls"],
|
33291
|
-
description: "Show all
|
33314
|
+
description: "Show all projects in the selected scope",
|
33292
33315
|
default: true,
|
33293
33316
|
arguments: [],
|
33294
33317
|
options: [
|
@@ -33303,7 +33326,7 @@ var init_command21 = __esm({
|
|
33303
33326
|
],
|
33304
33327
|
examples: [
|
33305
33328
|
{
|
33306
|
-
name: "Paginate
|
33329
|
+
name: "Paginate projects, where `1584722256178` is the time in milliseconds since the UNIX epoch",
|
33307
33330
|
value: `${packageName} project ls --next 1584722256178`
|
33308
33331
|
}
|
33309
33332
|
]
|
@@ -33311,7 +33334,7 @@ var init_command21 = __esm({
|
|
33311
33334
|
removeSubcommand8 = {
|
33312
33335
|
name: "remove",
|
33313
33336
|
aliases: ["rm"],
|
33314
|
-
description: "Delete a
|
33337
|
+
description: "Delete a project",
|
33315
33338
|
arguments: [
|
33316
33339
|
{
|
33317
33340
|
name: "name",
|
@@ -33324,9 +33347,14 @@ var init_command21 = __esm({
|
|
33324
33347
|
projectCommand = {
|
33325
33348
|
name: "project",
|
33326
33349
|
aliases: ["projects"],
|
33327
|
-
description: "Manage your Vercel
|
33350
|
+
description: "Manage your Vercel projects",
|
33328
33351
|
arguments: [],
|
33329
|
-
subcommands: [
|
33352
|
+
subcommands: [
|
33353
|
+
addSubcommand6,
|
33354
|
+
inspectSubcommand2,
|
33355
|
+
listSubcommand7,
|
33356
|
+
removeSubcommand8
|
33357
|
+
],
|
33330
33358
|
options: [],
|
33331
33359
|
examples: []
|
33332
33360
|
};
|
@@ -35209,14 +35237,14 @@ var require_templates3 = __commonJS2({
|
|
35209
35237
|
}
|
35210
35238
|
return results;
|
35211
35239
|
}
|
35212
|
-
function buildStyle(
|
35240
|
+
function buildStyle(chalk116, styles) {
|
35213
35241
|
const enabled = {};
|
35214
35242
|
for (const layer of styles) {
|
35215
35243
|
for (const style of layer.styles) {
|
35216
35244
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
35217
35245
|
}
|
35218
35246
|
}
|
35219
|
-
let current =
|
35247
|
+
let current = chalk116;
|
35220
35248
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
35221
35249
|
if (!Array.isArray(styles2)) {
|
35222
35250
|
continue;
|
@@ -35228,7 +35256,7 @@ var require_templates3 = __commonJS2({
|
|
35228
35256
|
}
|
35229
35257
|
return current;
|
35230
35258
|
}
|
35231
|
-
module2.exports = (
|
35259
|
+
module2.exports = (chalk116, temporary) => {
|
35232
35260
|
const styles = [];
|
35233
35261
|
const chunks = [];
|
35234
35262
|
let chunk = [];
|
@@ -35238,13 +35266,13 @@ var require_templates3 = __commonJS2({
|
|
35238
35266
|
} else if (style) {
|
35239
35267
|
const string = chunk.join("");
|
35240
35268
|
chunk = [];
|
35241
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
35269
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk116, styles)(string));
|
35242
35270
|
styles.push({ inverse, styles: parseStyle(style) });
|
35243
35271
|
} else if (close2) {
|
35244
35272
|
if (styles.length === 0) {
|
35245
35273
|
throw new Error("Found extraneous } in Chalk template literal");
|
35246
35274
|
}
|
35247
|
-
chunks.push(buildStyle(
|
35275
|
+
chunks.push(buildStyle(chalk116, styles)(chunk.join("")));
|
35248
35276
|
chunk = [];
|
35249
35277
|
styles.pop();
|
35250
35278
|
} else {
|
@@ -35292,16 +35320,16 @@ var require_source2 = __commonJS2({
|
|
35292
35320
|
}
|
35293
35321
|
};
|
35294
35322
|
var chalkFactory = (options) => {
|
35295
|
-
const
|
35296
|
-
applyOptions(
|
35297
|
-
|
35298
|
-
Object.setPrototypeOf(
|
35299
|
-
Object.setPrototypeOf(
|
35300
|
-
|
35323
|
+
const chalk117 = {};
|
35324
|
+
applyOptions(chalk117, options);
|
35325
|
+
chalk117.template = (...arguments_) => chalkTag(chalk117.template, ...arguments_);
|
35326
|
+
Object.setPrototypeOf(chalk117, Chalk.prototype);
|
35327
|
+
Object.setPrototypeOf(chalk117.template, chalk117);
|
35328
|
+
chalk117.template.constructor = () => {
|
35301
35329
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
35302
35330
|
};
|
35303
|
-
|
35304
|
-
return
|
35331
|
+
chalk117.template.Instance = ChalkClass;
|
35332
|
+
return chalk117.template;
|
35305
35333
|
};
|
35306
35334
|
function Chalk(options) {
|
35307
35335
|
return chalkFactory(options);
|
@@ -35412,7 +35440,7 @@ var require_source2 = __commonJS2({
|
|
35412
35440
|
return openAll + string + closeAll;
|
35413
35441
|
};
|
35414
35442
|
var template;
|
35415
|
-
var chalkTag = (
|
35443
|
+
var chalkTag = (chalk117, ...strings) => {
|
35416
35444
|
const [firstString] = strings;
|
35417
35445
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
35418
35446
|
return strings.join(" ");
|
@@ -35428,14 +35456,14 @@ var require_source2 = __commonJS2({
|
|
35428
35456
|
if (template === void 0) {
|
35429
35457
|
template = require_templates3();
|
35430
35458
|
}
|
35431
|
-
return template(
|
35459
|
+
return template(chalk117, parts.join(""));
|
35432
35460
|
};
|
35433
35461
|
Object.defineProperties(Chalk.prototype, styles);
|
35434
|
-
var
|
35435
|
-
|
35436
|
-
|
35437
|
-
|
35438
|
-
module2.exports =
|
35462
|
+
var chalk116 = Chalk();
|
35463
|
+
chalk116.supportsColor = stdoutColor;
|
35464
|
+
chalk116.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
35465
|
+
chalk116.stderr.supportsColor = stderrColor;
|
35466
|
+
module2.exports = chalk116;
|
35439
35467
|
}
|
35440
35468
|
});
|
35441
35469
|
|
@@ -46172,7 +46200,7 @@ var require_package = __commonJS2({
|
|
46172
46200
|
"../client/package.json"(exports2, module2) {
|
46173
46201
|
module2.exports = {
|
46174
46202
|
name: "@vercel/client",
|
46175
|
-
version: "15.1.
|
46203
|
+
version: "15.1.5",
|
46176
46204
|
main: "dist/index.js",
|
46177
46205
|
typings: "dist/index.d.ts",
|
46178
46206
|
homepage: "https://vercel.com",
|
@@ -46211,7 +46239,7 @@ var require_package = __commonJS2({
|
|
46211
46239
|
typescript: "4.9.5"
|
46212
46240
|
},
|
46213
46241
|
dependencies: {
|
46214
|
-
"@vercel/build-utils": "10.
|
46242
|
+
"@vercel/build-utils": "10.5.0",
|
46215
46243
|
"@vercel/error-utils": "2.0.3",
|
46216
46244
|
"@vercel/routing-utils": "5.0.4",
|
46217
46245
|
"async-retry": "1.2.3",
|
@@ -47321,6 +47349,7 @@ var require_utils8 = __commonJS2({
|
|
47321
47349
|
".env.*.local",
|
47322
47350
|
".venv",
|
47323
47351
|
".yarn/cache",
|
47352
|
+
".pnp*",
|
47324
47353
|
"npm-debug.log",
|
47325
47354
|
"config.gypi",
|
47326
47355
|
"node_modules",
|
@@ -97941,7 +97970,7 @@ var require_frameworks = __commonJS2({
|
|
97941
97970
|
var frameworks_exports = {};
|
97942
97971
|
__export4(frameworks_exports, {
|
97943
97972
|
default: () => frameworks_default,
|
97944
|
-
frameworkList: () =>
|
97973
|
+
frameworkList: () => frameworkList8,
|
97945
97974
|
frameworks: () => frameworks
|
97946
97975
|
});
|
97947
97976
|
module2.exports = __toCommonJS4(frameworks_exports);
|
@@ -100066,8 +100095,8 @@ var require_frameworks = __commonJS2({
|
|
100066
100095
|
getOutputDirName: async () => "public"
|
100067
100096
|
}
|
100068
100097
|
];
|
100069
|
-
var
|
100070
|
-
var frameworks_default =
|
100098
|
+
var frameworkList8 = frameworks;
|
100099
|
+
var frameworks_default = frameworkList8;
|
100071
100100
|
}
|
100072
100101
|
});
|
100073
100102
|
|
@@ -101306,13 +101335,13 @@ var require_detect_builders = __commonJS2({
|
|
101306
101335
|
var import_minimatch5 = __toESM4(require_minimatch2());
|
101307
101336
|
var import_semver4 = require_semver2();
|
101308
101337
|
var import_path41 = require("path");
|
101309
|
-
var
|
101338
|
+
var import_frameworks8 = __toESM4(require_frameworks());
|
101310
101339
|
var import_is_official_runtime = require_is_official_runtime();
|
101311
101340
|
var REGEX_MIDDLEWARE_FILES = "middleware.[jt]s";
|
101312
101341
|
var REGEX_VERCEL_PLATFORM_FILES = `api/**,package.json,${REGEX_MIDDLEWARE_FILES}`;
|
101313
101342
|
var REGEX_NON_VERCEL_PLATFORM_FILES2 = `!{${REGEX_VERCEL_PLATFORM_FILES}}`;
|
101314
101343
|
var slugToFramework = new Map(
|
101315
|
-
|
101344
|
+
import_frameworks8.default.map((f) => [f.slug, f])
|
101316
101345
|
);
|
101317
101346
|
function sortFiles(fileA, fileB) {
|
101318
101347
|
return fileA.localeCompare(fileB);
|
@@ -102074,7 +102103,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
102074
102103
|
});
|
102075
102104
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
102076
102105
|
var import_semver4 = __toESM4(require_semver2());
|
102077
|
-
var
|
102106
|
+
var import__77 = require_dist20();
|
102078
102107
|
async function detectFileSystemAPI2({
|
102079
102108
|
files,
|
102080
102109
|
projectSettings,
|
@@ -102140,7 +102169,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
102140
102169
|
};
|
102141
102170
|
}
|
102142
102171
|
const invalidBuilder = builders.find(({ use }) => {
|
102143
|
-
const valid = (0,
|
102172
|
+
const valid = (0, import__77.isOfficialRuntime)("go", use) || (0, import__77.isOfficialRuntime)("python", use) || (0, import__77.isOfficialRuntime)("ruby", use) || (0, import__77.isOfficialRuntime)("node", use) || (0, import__77.isOfficialRuntime)("next", use) || (0, import__77.isOfficialRuntime)("static", use) || (0, import__77.isOfficialRuntime)("static-build", use);
|
102144
102173
|
return !valid;
|
102145
102174
|
});
|
102146
102175
|
if (invalidBuilder) {
|
@@ -102153,7 +102182,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
102153
102182
|
for (const lang of ["go", "python", "ruby"]) {
|
102154
102183
|
for (const { use } of builders) {
|
102155
102184
|
const plugin = "vercel-plugin-" + lang;
|
102156
|
-
if ((0,
|
102185
|
+
if ((0, import__77.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
102157
102186
|
return {
|
102158
102187
|
metadata,
|
102159
102188
|
fsApiBuilder: null,
|
@@ -102210,7 +102239,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
102210
102239
|
}
|
102211
102240
|
}
|
102212
102241
|
const frontendBuilder = builders.find(
|
102213
|
-
({ use }) => (0,
|
102242
|
+
({ use }) => (0, import__77.isOfficialRuntime)("next", use) || (0, import__77.isOfficialRuntime)("static", use) || (0, import__77.isOfficialRuntime)("static-build", use)
|
102214
102243
|
);
|
102215
102244
|
const config2 = frontendBuilder?.config || {};
|
102216
102245
|
const withTag = tag ? `@${tag}` : "";
|
@@ -102374,10 +102403,10 @@ var require_detect_framework = __commonJS2({
|
|
102374
102403
|
}
|
102375
102404
|
async function detectFramework2({
|
102376
102405
|
fs: fs15,
|
102377
|
-
frameworkList:
|
102406
|
+
frameworkList: frameworkList8
|
102378
102407
|
}) {
|
102379
102408
|
const result = await Promise.all(
|
102380
|
-
|
102409
|
+
frameworkList8.map(async (frameworkMatch) => {
|
102381
102410
|
if (await matches(fs15, frameworkMatch)) {
|
102382
102411
|
return frameworkMatch;
|
102383
102412
|
}
|
@@ -102389,10 +102418,10 @@ var require_detect_framework = __commonJS2({
|
|
102389
102418
|
}
|
102390
102419
|
async function detectFrameworks3({
|
102391
102420
|
fs: fs15,
|
102392
|
-
frameworkList:
|
102421
|
+
frameworkList: frameworkList8
|
102393
102422
|
}) {
|
102394
102423
|
const result = await Promise.all(
|
102395
|
-
|
102424
|
+
frameworkList8.map(async (frameworkMatch) => {
|
102396
102425
|
if (await matches(fs15, frameworkMatch)) {
|
102397
102426
|
return frameworkMatch;
|
102398
102427
|
}
|
@@ -102404,10 +102433,10 @@ var require_detect_framework = __commonJS2({
|
|
102404
102433
|
}
|
102405
102434
|
async function detectFrameworkRecord3({
|
102406
102435
|
fs: fs15,
|
102407
|
-
frameworkList:
|
102436
|
+
frameworkList: frameworkList8
|
102408
102437
|
}) {
|
102409
102438
|
const result = await Promise.all(
|
102410
|
-
|
102439
|
+
frameworkList8.map(async (frameworkMatch) => {
|
102411
102440
|
const matchResult = await matches(fs15, frameworkMatch);
|
102412
102441
|
if (matchResult) {
|
102413
102442
|
return {
|
@@ -102488,7 +102517,7 @@ var require_get_project_paths = __commonJS2({
|
|
102488
102517
|
});
|
102489
102518
|
module2.exports = __toCommonJS4(get_project_paths_exports);
|
102490
102519
|
var import_detect_framework = require_detect_framework();
|
102491
|
-
var
|
102520
|
+
var import_frameworks8 = __toESM4(require_frameworks());
|
102492
102521
|
var MAX_DEPTH_TRAVERSE = 3;
|
102493
102522
|
var getProjectPaths2 = async ({
|
102494
102523
|
fs: fs15,
|
@@ -102505,7 +102534,7 @@ var require_get_project_paths = __commonJS2({
|
|
102505
102534
|
}
|
102506
102535
|
const framework = await (0, import_detect_framework.detectFramework)({
|
102507
102536
|
fs: fs15.chdir(topPath),
|
102508
|
-
frameworkList:
|
102537
|
+
frameworkList: import_frameworks8.default
|
102509
102538
|
});
|
102510
102539
|
if (framework !== null)
|
102511
102540
|
allPaths.push(topPath);
|
@@ -132687,12 +132716,26 @@ var init_format_project = __esm({
|
|
132687
132716
|
}
|
132688
132717
|
});
|
132689
132718
|
|
132719
|
+
// src/util/target/standard-environments.ts
|
132720
|
+
var STANDARD_ENVIRONMENTS;
|
132721
|
+
var init_standard_environments = __esm({
|
132722
|
+
"src/util/target/standard-environments.ts"() {
|
132723
|
+
"use strict";
|
132724
|
+
STANDARD_ENVIRONMENTS = [
|
132725
|
+
"production",
|
132726
|
+
"preview",
|
132727
|
+
"development"
|
132728
|
+
];
|
132729
|
+
}
|
132730
|
+
});
|
132731
|
+
|
132690
132732
|
// src/util/telemetry/commands/env/pull.ts
|
132691
132733
|
var EnvPullTelemetryClient;
|
132692
132734
|
var init_pull = __esm({
|
132693
132735
|
"src/util/telemetry/commands/env/pull.ts"() {
|
132694
132736
|
"use strict";
|
132695
132737
|
init_telemetry();
|
132738
|
+
init_standard_environments();
|
132696
132739
|
EnvPullTelemetryClient = class extends TelemetryClient {
|
132697
132740
|
trackCliArgumentFilename(filename) {
|
132698
132741
|
if (filename) {
|
@@ -132704,10 +132747,11 @@ var init_pull = __esm({
|
|
132704
132747
|
}
|
132705
132748
|
trackCliOptionEnvironment(environment) {
|
132706
132749
|
if (environment) {
|
132707
|
-
const standardEnvironments = ["production", "preview", "development"];
|
132708
132750
|
this.trackCliOption({
|
132709
132751
|
option: "environment",
|
132710
|
-
value:
|
132752
|
+
value: STANDARD_ENVIRONMENTS.includes(
|
132753
|
+
environment
|
132754
|
+
) ? environment : this.redactedValue
|
132711
132755
|
});
|
132712
132756
|
}
|
132713
132757
|
}
|
@@ -161357,7 +161401,7 @@ async function findProjectsForDomain(client2, domainName) {
|
|
161357
161401
|
"/v9/projects"
|
161358
161402
|
)) {
|
161359
161403
|
for (const project of chunk.projects) {
|
161360
|
-
if (project.targets?.production?.alias?.some(
|
161404
|
+
if (project.targets?.production?.alias?.some?.(
|
161361
161405
|
(alias2) => alias2.endsWith(domainName)
|
161362
161406
|
)) {
|
161363
161407
|
result.push(project);
|
@@ -162671,6 +162715,7 @@ var init_add7 = __esm({
|
|
162671
162715
|
"src/util/telemetry/commands/env/add.ts"() {
|
162672
162716
|
"use strict";
|
162673
162717
|
init_telemetry();
|
162718
|
+
init_standard_environments();
|
162674
162719
|
EnvAddTelemetryClient = class extends TelemetryClient {
|
162675
162720
|
trackCliArgumentName(name) {
|
162676
162721
|
if (name) {
|
@@ -162681,11 +162726,12 @@ var init_add7 = __esm({
|
|
162681
162726
|
}
|
162682
162727
|
}
|
162683
162728
|
trackCliArgumentEnvironment(environment) {
|
162684
|
-
const standardEnvironments = ["production", "preview", "development"];
|
162685
162729
|
if (environment) {
|
162686
162730
|
this.trackCliArgument({
|
162687
162731
|
arg: "environment",
|
162688
|
-
value:
|
162732
|
+
value: STANDARD_ENVIRONMENTS.includes(
|
162733
|
+
environment
|
162734
|
+
) ? environment : this.redactedValue
|
162689
162735
|
});
|
162690
162736
|
}
|
162691
162737
|
}
|
@@ -162905,7 +162951,9 @@ var init_ellipsis = __esm({
|
|
162905
162951
|
// src/util/target/format-environment.ts
|
162906
162952
|
function formatEnvironment(orgSlug, projectSlug, environment) {
|
162907
162953
|
const projectUrl = `https://vercel.com/${orgSlug}/${projectSlug}`;
|
162908
|
-
const boldName = import_chalk80.default.bold(
|
162954
|
+
const boldName = import_chalk80.default.bold(
|
162955
|
+
STANDARD_ENVIRONMENTS.includes(environment.slug) ? (0, import_title4.default)(environment.slug) : environment.slug
|
162956
|
+
);
|
162909
162957
|
return output_manager_default.link(
|
162910
162958
|
boldName,
|
162911
162959
|
`${projectUrl}/settings/environments/${environment.id}`,
|
@@ -162918,6 +162966,7 @@ var init_format_environment = __esm({
|
|
162918
162966
|
"use strict";
|
162919
162967
|
import_chalk80 = __toESM3(require_source());
|
162920
162968
|
init_output_manager();
|
162969
|
+
init_standard_environments();
|
162921
162970
|
import_title4 = __toESM3(require_lib4());
|
162922
162971
|
}
|
162923
162972
|
});
|
@@ -162949,13 +162998,15 @@ var init_ls8 = __esm({
|
|
162949
162998
|
"src/util/telemetry/commands/env/ls.ts"() {
|
162950
162999
|
"use strict";
|
162951
163000
|
init_telemetry();
|
163001
|
+
init_standard_environments();
|
162952
163002
|
EnvLsTelemetryClient = class extends TelemetryClient {
|
162953
163003
|
trackCliArgumentEnvironment(environment) {
|
162954
163004
|
if (environment) {
|
162955
|
-
const standardEnvironments = ["production", "preview", "development"];
|
162956
163005
|
this.trackCliArgument({
|
162957
163006
|
arg: "environment",
|
162958
|
-
value:
|
163007
|
+
value: STANDARD_ENVIRONMENTS.includes(
|
163008
|
+
environment
|
163009
|
+
) ? environment : this.redactedValue
|
162959
163010
|
});
|
162960
163011
|
}
|
162961
163012
|
}
|
@@ -163111,6 +163162,7 @@ var init_rm7 = __esm({
|
|
163111
163162
|
"src/util/telemetry/commands/env/rm.ts"() {
|
163112
163163
|
"use strict";
|
163113
163164
|
init_telemetry();
|
163165
|
+
init_standard_environments();
|
163114
163166
|
EnvRmTelemetryClient = class extends TelemetryClient {
|
163115
163167
|
trackCliArgumentName(name) {
|
163116
163168
|
if (name) {
|
@@ -163121,11 +163173,12 @@ var init_rm7 = __esm({
|
|
163121
163173
|
}
|
163122
163174
|
}
|
163123
163175
|
trackCliArgumentEnvironment(environment) {
|
163124
|
-
const standardEnvironments = ["production", "preview", "development"];
|
163125
163176
|
if (environment) {
|
163126
163177
|
this.trackCliArgument({
|
163127
163178
|
arg: "environment",
|
163128
|
-
value:
|
163179
|
+
value: STANDARD_ENVIRONMENTS.includes(
|
163180
|
+
environment
|
163181
|
+
) ? environment : this.redactedValue
|
163129
163182
|
});
|
163130
163183
|
}
|
163131
163184
|
}
|
@@ -165359,13 +165412,8 @@ async function add5(client2, args2) {
|
|
165359
165412
|
);
|
165360
165413
|
const metadataSchema = product.metadataSchema;
|
165361
165414
|
const metadataWizard = createMetadataWizard(metadataSchema);
|
165362
|
-
const
|
165363
|
-
|
165364
|
-
const isVideoProduct = product.protocols?.video?.status;
|
165365
|
-
const isStorageProduct = isPreProtocolStorageProduct || isPostProtocolStorageProduct;
|
165366
|
-
const isSupportedProductType = isStorageProduct || isVideoProduct;
|
165367
|
-
const provisionResourceViaCLIIsSupported = installation && metadataWizard.isSupported && isSupportedProductType;
|
165368
|
-
if (!provisionResourceViaCLIIsSupported) {
|
165415
|
+
const provisionResourceViaCLIIsSupported = false;
|
165416
|
+
if (!provisionResourceViaCLIIsSupported || !installation) {
|
165369
165417
|
const projectLink = await getOptionalLinkedProject(client2);
|
165370
165418
|
if (projectLink?.status === "error") {
|
165371
165419
|
return projectLink.exitCode;
|
@@ -167743,13 +167791,13 @@ async function processRevocationResponse(response) {
|
|
167743
167791
|
}
|
167744
167792
|
function processOAuthErrorResponse(json) {
|
167745
167793
|
if (typeof json !== "object" || json === null)
|
167746
|
-
|
167794
|
+
return new TypeError("Expected response to be an object");
|
167747
167795
|
if (!("error" in json) || typeof json.error !== "string")
|
167748
|
-
|
167796
|
+
return new TypeError("Expected `error` to be a string");
|
167749
167797
|
if ("error_description" in json && typeof json.error_description !== "string")
|
167750
|
-
|
167798
|
+
return new TypeError("Expected `error_description` to be a string");
|
167751
167799
|
if ("error_uri" in json && typeof json.error_uri !== "string")
|
167752
|
-
|
167800
|
+
return new TypeError("Expected `error_uri` to be a string");
|
167753
167801
|
return json;
|
167754
167802
|
}
|
167755
167803
|
function isOAuthError(error3) {
|
@@ -167763,12 +167811,18 @@ function canParseURL(url3) {
|
|
167763
167811
|
}
|
167764
167812
|
}
|
167765
167813
|
async function verifyJWT(token) {
|
167766
|
-
|
167767
|
-
|
167768
|
-
|
167769
|
-
|
167770
|
-
|
167771
|
-
|
167814
|
+
try {
|
167815
|
+
const JWKS = (0, import_jose.createRemoteJWKSet)((await as()).jwks_uri);
|
167816
|
+
const { payload } = await (0, import_jose.jwtVerify)(token, JWKS, {
|
167817
|
+
issuer: "https://vercel.com",
|
167818
|
+
audience: ["https://api.vercel.com", "https://vercel.com/api"]
|
167819
|
+
});
|
167820
|
+
return [null, payload];
|
167821
|
+
} catch (error3) {
|
167822
|
+
if (error3 instanceof Error)
|
167823
|
+
return [error3];
|
167824
|
+
return [new Error("Could not verify JWT.", { cause: error3 })];
|
167825
|
+
}
|
167772
167826
|
}
|
167773
167827
|
var import_node_fetch6, import_jose, VERCEL_ISSUER, VERCEL_CLI_CLIENT_ID, _as, OAuthError;
|
167774
167828
|
var init_oauth2 = __esm({
|
@@ -167781,13 +167835,23 @@ var init_oauth2 = __esm({
|
|
167781
167835
|
VERCEL_CLI_CLIENT_ID = "cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp";
|
167782
167836
|
OAuthError = class extends Error {
|
167783
167837
|
constructor(message2, response) {
|
167838
|
+
var __super = (...args) => {
|
167839
|
+
super(...args);
|
167840
|
+
};
|
167784
167841
|
const error3 = processOAuthErrorResponse(response);
|
167842
|
+
if (error3 instanceof TypeError) {
|
167843
|
+
const message3 = `Unexpected server response: ${JSON.stringify(response)}`;
|
167844
|
+
__super(message3);
|
167845
|
+
this.cause = new Error(message3, { cause: error3 });
|
167846
|
+
this.code = "server_error";
|
167847
|
+
return;
|
167848
|
+
}
|
167785
167849
|
let cause = error3.error;
|
167786
167850
|
if (error3.error_description)
|
167787
167851
|
cause += `: ${error3.error_description}`;
|
167788
167852
|
if (error3.error_uri)
|
167789
167853
|
cause += ` (${error3.error_uri})`;
|
167790
|
-
|
167854
|
+
__super(message2, { cause });
|
167791
167855
|
this.cause = new Error(cause);
|
167792
167856
|
this.code = error3.error;
|
167793
167857
|
}
|
@@ -167822,7 +167886,7 @@ async function login2(client2) {
|
|
167822
167886
|
`
|
167823
167887
|
\u25B2 Sign in to the Vercel CLI
|
167824
167888
|
|
167825
|
-
Visit ${import_chalk98.default.bold(output_manager_default.link(verification_uri, verification_uri_complete, { color: false }))} to enter ${import_chalk98.default.bold(user_code)}
|
167889
|
+
Visit ${import_chalk98.default.bold(output_manager_default.link(verification_uri.replace("https://", ""), verification_uri_complete, { color: false }))} to enter ${import_chalk98.default.bold(user_code)}
|
167826
167890
|
${import_chalk98.default.grey("Press [ENTER] to open the browser")}
|
167827
167891
|
`,
|
167828
167892
|
() => {
|
@@ -167873,11 +167937,16 @@ async function login2(client2) {
|
|
167873
167937
|
const isInitialLogin = !client2.authConfig.token;
|
167874
167938
|
client2.authConfig.token = token.access_token;
|
167875
167939
|
error3 = void 0;
|
167876
|
-
const
|
167940
|
+
const [accessTokenError, accessToken] = await verifyJWT(
|
167941
|
+
token.access_token
|
167942
|
+
);
|
167943
|
+
if (accessTokenError) {
|
167944
|
+
return accessTokenError;
|
167945
|
+
}
|
167877
167946
|
output_manager_default.debug("access_token verified");
|
167878
|
-
if (team_id) {
|
167947
|
+
if (accessToken.team_id) {
|
167879
167948
|
output_manager_default.debug("Current team updated");
|
167880
|
-
client2.config.currentTeam = team_id;
|
167949
|
+
client2.config.currentTeam = accessToken.team_id;
|
167881
167950
|
} else {
|
167882
167951
|
output_manager_default.debug("Current team deleted");
|
167883
167952
|
delete client2.config.currentTeam;
|
@@ -168280,6 +168349,167 @@ var init_add12 = __esm({
|
|
168280
168349
|
}
|
168281
168350
|
});
|
168282
168351
|
|
168352
|
+
// src/util/telemetry/commands/project/inspect.ts
|
168353
|
+
var ProjectInspectTelemetryClient;
|
168354
|
+
var init_inspect5 = __esm({
|
168355
|
+
"src/util/telemetry/commands/project/inspect.ts"() {
|
168356
|
+
"use strict";
|
168357
|
+
init_telemetry();
|
168358
|
+
ProjectInspectTelemetryClient = class extends TelemetryClient {
|
168359
|
+
trackCliArgumentName(value) {
|
168360
|
+
if (value) {
|
168361
|
+
this.trackCliArgument({
|
168362
|
+
arg: "name",
|
168363
|
+
value: this.redactedValue
|
168364
|
+
});
|
168365
|
+
}
|
168366
|
+
}
|
168367
|
+
trackCliFlagYes(yes) {
|
168368
|
+
if (yes) {
|
168369
|
+
this.trackCliFlag("yes");
|
168370
|
+
}
|
168371
|
+
}
|
168372
|
+
};
|
168373
|
+
}
|
168374
|
+
});
|
168375
|
+
|
168376
|
+
// src/util/projects/get-project-by-cwd-or-link.ts
|
168377
|
+
async function getProjectByCwdOrLink({
|
168378
|
+
autoConfirm,
|
168379
|
+
client: client2,
|
168380
|
+
commandName,
|
168381
|
+
cwd,
|
168382
|
+
projectNameOrId
|
168383
|
+
}) {
|
168384
|
+
if (projectNameOrId) {
|
168385
|
+
const project = await getProjectByNameOrId(client2, projectNameOrId);
|
168386
|
+
if (project instanceof ProjectNotFound) {
|
168387
|
+
throw project;
|
168388
|
+
}
|
168389
|
+
return project;
|
168390
|
+
}
|
168391
|
+
const linkedProject = await ensureLink(
|
168392
|
+
commandName,
|
168393
|
+
client2,
|
168394
|
+
cwd ?? client2.cwd,
|
168395
|
+
{
|
168396
|
+
autoConfirm
|
168397
|
+
}
|
168398
|
+
);
|
168399
|
+
if (typeof linkedProject === "number") {
|
168400
|
+
const err = new Error("Link project error");
|
168401
|
+
err.code = "ERR_LINK_PROJECT";
|
168402
|
+
throw err;
|
168403
|
+
}
|
168404
|
+
return linkedProject.project;
|
168405
|
+
}
|
168406
|
+
var init_get_project_by_cwd_or_link = __esm({
|
168407
|
+
"src/util/projects/get-project-by-cwd-or-link.ts"() {
|
168408
|
+
"use strict";
|
168409
|
+
init_errors_ts();
|
168410
|
+
init_ensure_link();
|
168411
|
+
init_get_project_by_id_or_name();
|
168412
|
+
}
|
168413
|
+
});
|
168414
|
+
|
168415
|
+
// src/commands/project/inspect.ts
|
168416
|
+
async function inspect4(client2, argv) {
|
168417
|
+
const telemetry2 = new ProjectInspectTelemetryClient({
|
168418
|
+
opts: {
|
168419
|
+
store: client2.telemetryEventStore
|
168420
|
+
}
|
168421
|
+
});
|
168422
|
+
let parsedArgs;
|
168423
|
+
const flagsSpecification = getFlagsSpecification(inspectSubcommand2.options);
|
168424
|
+
try {
|
168425
|
+
parsedArgs = parseArguments(argv, flagsSpecification);
|
168426
|
+
} catch (error3) {
|
168427
|
+
printError(error3);
|
168428
|
+
return 1;
|
168429
|
+
}
|
168430
|
+
const { args: args2 } = parsedArgs;
|
168431
|
+
const name = args2[0];
|
168432
|
+
telemetry2.trackCliArgumentName(name);
|
168433
|
+
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
168434
|
+
if (args2.length !== 0 && args2.length !== 1) {
|
168435
|
+
output_manager_default.error(
|
168436
|
+
`Invalid number of arguments. Usage: ${import_chalk101.default.cyan(
|
168437
|
+
`${getCommandName("project inspect <name>")}`
|
168438
|
+
)}`
|
168439
|
+
);
|
168440
|
+
return 2;
|
168441
|
+
}
|
168442
|
+
const inspectStamp = stamp_default();
|
168443
|
+
const project = await getProjectByCwdOrLink({
|
168444
|
+
autoConfirm: parsedArgs.flags["--yes"],
|
168445
|
+
client: client2,
|
168446
|
+
commandName: "project inspect",
|
168447
|
+
projectNameOrId: name
|
168448
|
+
});
|
168449
|
+
const org = await getTeamById(client2, project.accountId);
|
168450
|
+
const projectSlugLink = formatProject(org.slug, project.name);
|
168451
|
+
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk101.default.gray(inspectStamp())}`);
|
168452
|
+
output_manager_default.print("\n");
|
168453
|
+
output_manager_default.print(import_chalk101.default.bold(" General\n\n"));
|
168454
|
+
output_manager_default.print(` ${import_chalk101.default.cyan("ID")} ${project.id}
|
168455
|
+
`);
|
168456
|
+
output_manager_default.print(` ${import_chalk101.default.cyan("Name")} ${project.name}
|
168457
|
+
`);
|
168458
|
+
output_manager_default.print(` ${import_chalk101.default.cyan("Owner")} ${org.name}
|
168459
|
+
`);
|
168460
|
+
output_manager_default.print(
|
168461
|
+
` ${import_chalk101.default.cyan("Created At")} ${formatDate(project.createdAt)}
|
168462
|
+
`
|
168463
|
+
);
|
168464
|
+
output_manager_default.print(
|
168465
|
+
` ${import_chalk101.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
|
168466
|
+
`
|
168467
|
+
);
|
168468
|
+
output_manager_default.print(
|
168469
|
+
` ${import_chalk101.default.cyan("Node.js Version")} ${project.nodeVersion}
|
168470
|
+
`
|
168471
|
+
);
|
168472
|
+
const framework = import_frameworks7.frameworkList.find((f) => f.slug === project.framework);
|
168473
|
+
output_manager_default.print("\n");
|
168474
|
+
output_manager_default.print(import_chalk101.default.bold(" Framework Settings\n\n"));
|
168475
|
+
output_manager_default.print(` ${import_chalk101.default.cyan("Framework Preset")} ${framework?.name}
|
168476
|
+
`);
|
168477
|
+
output_manager_default.print(
|
168478
|
+
` ${import_chalk101.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk101.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
|
168479
|
+
`
|
168480
|
+
);
|
168481
|
+
output_manager_default.print(
|
168482
|
+
` ${import_chalk101.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk101.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
|
168483
|
+
`
|
168484
|
+
);
|
168485
|
+
output_manager_default.print(
|
168486
|
+
` ${import_chalk101.default.cyan("Install Command")} ${project.installCommand ?? import_chalk101.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
|
168487
|
+
`
|
168488
|
+
);
|
168489
|
+
output_manager_default.print("\n");
|
168490
|
+
return 0;
|
168491
|
+
}
|
168492
|
+
var import_chalk101, import_frameworks7;
|
168493
|
+
var init_inspect6 = __esm({
|
168494
|
+
"src/commands/project/inspect.ts"() {
|
168495
|
+
"use strict";
|
168496
|
+
import_chalk101 = __toESM3(require_source());
|
168497
|
+
import_frameworks7 = __toESM3(require_frameworks());
|
168498
|
+
init_pkg_name();
|
168499
|
+
init_inspect5();
|
168500
|
+
init_output_manager();
|
168501
|
+
init_command21();
|
168502
|
+
init_get_args();
|
168503
|
+
init_get_flags_specification();
|
168504
|
+
init_error2();
|
168505
|
+
init_get_project_by_cwd_or_link();
|
168506
|
+
init_format_project();
|
168507
|
+
init_stamp();
|
168508
|
+
init_get_team_by_id();
|
168509
|
+
init_format_date();
|
168510
|
+
}
|
168511
|
+
});
|
168512
|
+
|
168283
168513
|
// src/util/telemetry/commands/project/list.ts
|
168284
168514
|
var ProjectListTelemetryClient;
|
168285
168515
|
var init_list7 = __esm({
|
@@ -168322,7 +168552,7 @@ async function list4(client2, argv) {
|
|
168322
168552
|
const { args: args2, flags: opts } = parsedArgs;
|
168323
168553
|
if (args2.length !== 0) {
|
168324
168554
|
output_manager_default.error(
|
168325
|
-
`Invalid number of arguments. Usage: ${
|
168555
|
+
`Invalid number of arguments. Usage: ${import_chalk102.default.cyan(
|
168326
168556
|
`${getCommandName("project ls")}`
|
168327
168557
|
)}`
|
168328
168558
|
);
|
@@ -168330,7 +168560,7 @@ async function list4(client2, argv) {
|
|
168330
168560
|
}
|
168331
168561
|
const start = Date.now();
|
168332
168562
|
const { contextName } = await getScope(client2);
|
168333
|
-
output_manager_default.spinner(`Fetching projects in ${
|
168563
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk102.default.bold(contextName)}`);
|
168334
168564
|
let projectsUrl = "/v9/projects?limit=20";
|
168335
168565
|
const deprecated = opts["--update-required"] || false;
|
168336
168566
|
telemetryClient.trackCliFlagUpdateRequired(deprecated);
|
@@ -168351,7 +168581,7 @@ async function list4(client2, argv) {
|
|
168351
168581
|
output_manager_default.stopSpinner();
|
168352
168582
|
const elapsed2 = (0, import_ms21.default)(Date.now() - start);
|
168353
168583
|
output_manager_default.log(
|
168354
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
168584
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk102.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk102.default.gray(`[${elapsed2}]`)}`
|
168355
168585
|
);
|
168356
168586
|
if (projectList.length > 0) {
|
168357
168587
|
const tablePrint = table(
|
@@ -168361,12 +168591,12 @@ async function list4(client2, argv) {
|
|
168361
168591
|
"Latest Production URL",
|
168362
168592
|
"Updated",
|
168363
168593
|
"Node Version"
|
168364
|
-
].map((header) =>
|
168594
|
+
].map((header) => import_chalk102.default.bold(import_chalk102.default.cyan(header))),
|
168365
168595
|
...projectList.flatMap((project) => [
|
168366
168596
|
[
|
168367
|
-
|
168597
|
+
import_chalk102.default.bold(project.name),
|
168368
168598
|
getLatestProdUrl(project),
|
168369
|
-
|
168599
|
+
import_chalk102.default.gray((0, import_ms21.default)(Date.now() - project.updatedAt)),
|
168370
168600
|
project.nodeVersion ?? ""
|
168371
168601
|
]
|
168372
168602
|
])
|
@@ -168391,12 +168621,12 @@ function getLatestProdUrl(project) {
|
|
168391
168621
|
return `https://${alias2}`;
|
168392
168622
|
return "--";
|
168393
168623
|
}
|
168394
|
-
var import_ms21,
|
168624
|
+
var import_ms21, import_chalk102;
|
168395
168625
|
var init_list8 = __esm({
|
168396
168626
|
"src/commands/project/list.ts"() {
|
168397
168627
|
"use strict";
|
168398
168628
|
import_ms21 = __toESM3(require_ms());
|
168399
|
-
|
168629
|
+
import_chalk102 = __toESM3(require_source());
|
168400
168630
|
init_table();
|
168401
168631
|
init_get_command_flags();
|
168402
168632
|
init_pkg_name();
|
@@ -168447,7 +168677,7 @@ async function rm6(client2, argv) {
|
|
168447
168677
|
const { args: args2 } = parsedArgs;
|
168448
168678
|
if (args2.length !== 1) {
|
168449
168679
|
output_manager_default.error(
|
168450
|
-
`Invalid number of arguments. Usage: ${
|
168680
|
+
`Invalid number of arguments. Usage: ${import_chalk103.default.cyan(
|
168451
168681
|
`${getCommandName("project rm <name>")}`
|
168452
168682
|
)}`
|
168453
168683
|
);
|
@@ -168477,7 +168707,7 @@ async function rm6(client2, argv) {
|
|
168477
168707
|
}
|
168478
168708
|
const elapsed2 = (0, import_ms22.default)(Date.now() - start);
|
168479
168709
|
output_manager_default.log(
|
168480
|
-
`${
|
168710
|
+
`${import_chalk103.default.cyan("Success!")} Project ${import_chalk103.default.bold(name)} removed ${import_chalk103.default.gray(
|
168481
168711
|
`[${elapsed2}]`
|
168482
168712
|
)}`
|
168483
168713
|
);
|
@@ -168486,22 +168716,22 @@ async function rm6(client2, argv) {
|
|
168486
168716
|
async function readConfirmation3(client2, projectName) {
|
168487
168717
|
output_manager_default.print(
|
168488
168718
|
prependEmoji(
|
168489
|
-
`The project ${
|
168719
|
+
`The project ${import_chalk103.default.bold(projectName)} will be removed permanently.
|
168490
168720
|
It will also delete everything under the project including deployments.
|
168491
168721
|
`,
|
168492
168722
|
emoji("warning")
|
168493
168723
|
)
|
168494
168724
|
);
|
168495
168725
|
return await client2.input.confirm(
|
168496
|
-
`${
|
168726
|
+
`${import_chalk103.default.bold.red("Are you sure?")}`,
|
168497
168727
|
false
|
168498
168728
|
);
|
168499
168729
|
}
|
168500
|
-
var
|
168730
|
+
var import_chalk103, import_ms22, e;
|
168501
168731
|
var init_rm10 = __esm({
|
168502
168732
|
"src/commands/project/rm.ts"() {
|
168503
168733
|
"use strict";
|
168504
|
-
|
168734
|
+
import_chalk103 = __toESM3(require_source());
|
168505
168735
|
import_ms22 = __toESM3(require_ms());
|
168506
168736
|
init_emoji();
|
168507
168737
|
init_errors_ts();
|
@@ -168523,6 +168753,12 @@ var init_project = __esm({
|
|
168523
168753
|
"use strict";
|
168524
168754
|
init_telemetry();
|
168525
168755
|
ProjectTelemetryClient = class extends TelemetryClient {
|
168756
|
+
trackCliSubcommandInspect(actual) {
|
168757
|
+
this.trackCliSubcommand({
|
168758
|
+
subcommand: "inspect",
|
168759
|
+
value: actual
|
168760
|
+
});
|
168761
|
+
}
|
168526
168762
|
trackCliSubcommandList(actual) {
|
168527
168763
|
this.trackCliSubcommand({
|
168528
168764
|
subcommand: "list",
|
@@ -168586,6 +168822,13 @@ async function main11(client2) {
|
|
168586
168822
|
subcommand = "list";
|
168587
168823
|
}
|
168588
168824
|
switch (subcommand) {
|
168825
|
+
case "inspect":
|
168826
|
+
if (needHelp) {
|
168827
|
+
telemetry2.trackCliFlagHelp("project", subcommandOriginal);
|
168828
|
+
return printHelp(inspectSubcommand2);
|
168829
|
+
}
|
168830
|
+
telemetry2.trackCliSubcommandInspect(subcommandOriginal);
|
168831
|
+
return inspect4(client2, args2);
|
168589
168832
|
case "list":
|
168590
168833
|
if (needHelp) {
|
168591
168834
|
telemetry2.trackCliFlagHelp("project", subcommandOriginal);
|
@@ -168622,6 +168865,7 @@ var init_project2 = __esm({
|
|
168622
168865
|
init_error2();
|
168623
168866
|
init_help();
|
168624
168867
|
init_add12();
|
168868
|
+
init_inspect6();
|
168625
168869
|
init_list8();
|
168626
168870
|
init_rm10();
|
168627
168871
|
init_command21();
|
@@ -168631,6 +168875,7 @@ var init_project2 = __esm({
|
|
168631
168875
|
init_commands();
|
168632
168876
|
init_get_subcommand();
|
168633
168877
|
COMMAND_CONFIG11 = {
|
168878
|
+
inspect: getCommandAliases(inspectSubcommand2),
|
168634
168879
|
list: getCommandAliases(listSubcommand7),
|
168635
168880
|
add: getCommandAliases(addSubcommand6),
|
168636
168881
|
remove: getCommandAliases(removeSubcommand8)
|
@@ -168638,40 +168883,6 @@ var init_project2 = __esm({
|
|
168638
168883
|
}
|
168639
168884
|
});
|
168640
168885
|
|
168641
|
-
// src/util/projects/get-project-by-cwd-or-link.ts
|
168642
|
-
async function getProjectByCwdOrLink({
|
168643
|
-
autoConfirm,
|
168644
|
-
client: client2,
|
168645
|
-
commandName,
|
168646
|
-
cwd,
|
168647
|
-
projectNameOrId
|
168648
|
-
}) {
|
168649
|
-
if (projectNameOrId) {
|
168650
|
-
const project = await getProjectByNameOrId(client2, projectNameOrId);
|
168651
|
-
if (project instanceof ProjectNotFound) {
|
168652
|
-
throw project;
|
168653
|
-
}
|
168654
|
-
return project;
|
168655
|
-
}
|
168656
|
-
const linkedProject = await ensureLink(commandName, client2, cwd, {
|
168657
|
-
autoConfirm
|
168658
|
-
});
|
168659
|
-
if (typeof linkedProject === "number") {
|
168660
|
-
const err = new Error("Link project error");
|
168661
|
-
err.code = "ERR_LINK_PROJECT";
|
168662
|
-
throw err;
|
168663
|
-
}
|
168664
|
-
return linkedProject.project;
|
168665
|
-
}
|
168666
|
-
var init_get_project_by_cwd_or_link = __esm({
|
168667
|
-
"src/util/projects/get-project-by-cwd-or-link.ts"() {
|
168668
|
-
"use strict";
|
168669
|
-
init_errors_ts();
|
168670
|
-
init_ensure_link();
|
168671
|
-
init_get_project_by_id_or_name();
|
168672
|
-
}
|
168673
|
-
});
|
168674
|
-
|
168675
168886
|
// src/util/projects/get-project-by-deployment.ts
|
168676
168887
|
async function getProjectByDeployment({
|
168677
168888
|
client: client2,
|
@@ -168688,7 +168899,7 @@ async function getProjectByDeployment({
|
|
168688
168899
|
let team;
|
168689
168900
|
try {
|
168690
168901
|
output_manager_default?.spinner(
|
168691
|
-
`Fetching deployment "${deployId}" in ${
|
168902
|
+
`Fetching deployment "${deployId}" in ${import_chalk104.default.bold(contextName)}\u2026`
|
168692
168903
|
);
|
168693
168904
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
168694
168905
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -168705,12 +168916,12 @@ async function getProjectByDeployment({
|
|
168705
168916
|
team = teamResult.value;
|
168706
168917
|
deployment = deploymentResult.value;
|
168707
168918
|
output_manager_default?.log(
|
168708
|
-
`Fetching deployment "${deployId}" in ${
|
168919
|
+
`Fetching deployment "${deployId}" in ${import_chalk104.default.bold(contextName)}\u2026`
|
168709
168920
|
);
|
168710
168921
|
if (deployment.team?.id) {
|
168711
168922
|
if (!team || deployment.team.id !== team.id) {
|
168712
168923
|
const err = new Error(
|
168713
|
-
team ? `Deployment doesn't belong to current team ${
|
168924
|
+
team ? `Deployment doesn't belong to current team ${import_chalk104.default.bold(
|
168714
168925
|
contextName
|
168715
168926
|
)}` : `Deployment belongs to a different team`
|
168716
168927
|
);
|
@@ -168719,7 +168930,7 @@ async function getProjectByDeployment({
|
|
168719
168930
|
}
|
168720
168931
|
} else if (team) {
|
168721
168932
|
const err = new Error(
|
168722
|
-
`Deployment doesn't belong to current team ${
|
168933
|
+
`Deployment doesn't belong to current team ${import_chalk104.default.bold(contextName)}`
|
168723
168934
|
);
|
168724
168935
|
err.code = "ERR_INVALID_TEAM";
|
168725
168936
|
throw err;
|
@@ -168740,11 +168951,11 @@ async function getProjectByDeployment({
|
|
168740
168951
|
output_manager_default?.stopSpinner();
|
168741
168952
|
}
|
168742
168953
|
}
|
168743
|
-
var
|
168954
|
+
var import_chalk104;
|
168744
168955
|
var init_get_project_by_deployment = __esm({
|
168745
168956
|
"src/util/projects/get-project-by-deployment.ts"() {
|
168746
168957
|
"use strict";
|
168747
|
-
|
168958
|
+
import_chalk104 = __toESM3(require_source());
|
168748
168959
|
init_get_deployment();
|
168749
168960
|
init_get_project_by_id_or_name();
|
168750
168961
|
init_get_scope();
|
@@ -168758,21 +168969,21 @@ var init_get_project_by_deployment = __esm({
|
|
168758
168969
|
// src/util/alias/render-alias-status.ts
|
168759
168970
|
function renderAliasStatus(status2) {
|
168760
168971
|
if (status2 === "completed") {
|
168761
|
-
return
|
168972
|
+
return import_chalk105.default.green(status2);
|
168762
168973
|
}
|
168763
168974
|
if (status2 === "failed") {
|
168764
|
-
return
|
168975
|
+
return import_chalk105.default.red(status2);
|
168765
168976
|
}
|
168766
168977
|
if (status2 === "skipped") {
|
168767
|
-
return
|
168978
|
+
return import_chalk105.default.gray(status2);
|
168768
168979
|
}
|
168769
|
-
return
|
168980
|
+
return import_chalk105.default.yellow(status2);
|
168770
168981
|
}
|
168771
|
-
var
|
168982
|
+
var import_chalk105;
|
168772
168983
|
var init_render_alias_status = __esm({
|
168773
168984
|
"src/util/alias/render-alias-status.ts"() {
|
168774
168985
|
"use strict";
|
168775
|
-
|
168986
|
+
import_chalk105 = __toESM3(require_source());
|
168776
168987
|
}
|
168777
168988
|
});
|
168778
168989
|
|
@@ -168846,7 +169057,7 @@ async function promoteStatus({
|
|
168846
169057
|
}
|
168847
169058
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
168848
169059
|
output_manager_default.log(
|
168849
|
-
`The promotion exceeded its deadline - rerun ${
|
169060
|
+
`The promotion exceeded its deadline - rerun ${import_chalk106.default.bold(
|
168850
169061
|
`${packageName} promote ${toDeploymentId}`
|
168851
169062
|
)} to try again`
|
168852
169063
|
);
|
@@ -168910,26 +169121,26 @@ async function renderJobSucceeded({
|
|
168910
169121
|
let deploymentInfo = "";
|
168911
169122
|
try {
|
168912
169123
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
168913
|
-
deploymentInfo = `${
|
169124
|
+
deploymentInfo = `${import_chalk106.default.bold(deployment.url)} (${toDeploymentId})`;
|
168914
169125
|
} catch (err) {
|
168915
169126
|
output_manager_default.debug(
|
168916
169127
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
168917
169128
|
);
|
168918
|
-
deploymentInfo =
|
169129
|
+
deploymentInfo = import_chalk106.default.bold(toDeploymentId);
|
168919
169130
|
}
|
168920
169131
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
168921
169132
|
output_manager_default.log(
|
168922
|
-
`Success! ${
|
169133
|
+
`Success! ${import_chalk106.default.bold(
|
168923
169134
|
project.name
|
168924
169135
|
)} was promoted to ${deploymentInfo} ${duration}`
|
168925
169136
|
);
|
168926
169137
|
return 0;
|
168927
169138
|
}
|
168928
|
-
var
|
169139
|
+
var import_chalk106, import_ms23;
|
168929
169140
|
var init_status = __esm({
|
168930
169141
|
"src/commands/promote/status.ts"() {
|
168931
169142
|
"use strict";
|
168932
|
-
|
169143
|
+
import_chalk106 = __toESM3(require_source());
|
168933
169144
|
init_elapsed();
|
168934
169145
|
init_format_date();
|
168935
169146
|
init_get_deployment();
|
@@ -168985,7 +169196,7 @@ async function requestPromote({
|
|
168985
169196
|
}
|
168986
169197
|
);
|
168987
169198
|
output_manager_default.log(
|
168988
|
-
`Successfully created new deployment of ${
|
169199
|
+
`Successfully created new deployment of ${import_chalk107.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
168989
169200
|
);
|
168990
169201
|
return 0;
|
168991
169202
|
}
|
@@ -168997,7 +169208,7 @@ async function requestPromote({
|
|
168997
169208
|
});
|
168998
169209
|
if (timeout !== void 0 && (0, import_ms24.default)(timeout) === 0) {
|
168999
169210
|
output_manager_default.log(
|
169000
|
-
`Successfully requested promote of ${
|
169211
|
+
`Successfully requested promote of ${import_chalk107.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
169001
169212
|
);
|
169002
169213
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
169003
169214
|
return 0;
|
@@ -169010,11 +169221,11 @@ async function requestPromote({
|
|
169010
169221
|
timeout
|
169011
169222
|
});
|
169012
169223
|
}
|
169013
|
-
var
|
169224
|
+
var import_chalk107, import_ms24;
|
169014
169225
|
var init_request_promote = __esm({
|
169015
169226
|
"src/commands/promote/request-promote.ts"() {
|
169016
169227
|
"use strict";
|
169017
|
-
|
169228
|
+
import_chalk107 = __toESM3(require_source());
|
169018
169229
|
init_pkg_name();
|
169019
169230
|
init_get_project_by_deployment();
|
169020
169231
|
import_ms24 = __toESM3(require_ms());
|
@@ -169125,10 +169336,9 @@ var init_promote2 = __esm({
|
|
169125
169336
|
}
|
169126
169337
|
telemetry2.trackCliSubcommandStatus();
|
169127
169338
|
const project = await getProjectByCwdOrLink({
|
169128
|
-
autoConfirm:
|
169339
|
+
autoConfirm: parsedArgs.flags["--yes"],
|
169129
169340
|
client: client2,
|
169130
169341
|
commandName: "promote",
|
169131
|
-
cwd: client2.cwd,
|
169132
169342
|
projectNameOrId: parsedArgs.args[2]
|
169133
169343
|
});
|
169134
169344
|
return await promoteStatus({
|
@@ -169176,7 +169386,7 @@ async function getDeploymentByIdOrURL({
|
|
169176
169386
|
let team;
|
169177
169387
|
try {
|
169178
169388
|
output_manager_default.spinner(
|
169179
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
169389
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk108.default.bold(contextName)}\u2026`
|
169180
169390
|
);
|
169181
169391
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
169182
169392
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -169193,7 +169403,7 @@ async function getDeploymentByIdOrURL({
|
|
169193
169403
|
team = teamResult.value;
|
169194
169404
|
deployment = deploymentResult.value;
|
169195
169405
|
output_manager_default.log(
|
169196
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
169406
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk108.default.bold(contextName)}\u2026`
|
169197
169407
|
);
|
169198
169408
|
} finally {
|
169199
169409
|
output_manager_default.stopSpinner();
|
@@ -169201,7 +169411,7 @@ async function getDeploymentByIdOrURL({
|
|
169201
169411
|
if (deployment.team?.id) {
|
169202
169412
|
if (!team || deployment.team.id !== team.id) {
|
169203
169413
|
const err = new Error(
|
169204
|
-
team ? `Deployment doesn't belong to current team ${
|
169414
|
+
team ? `Deployment doesn't belong to current team ${import_chalk108.default.bold(
|
169205
169415
|
contextName
|
169206
169416
|
)}` : `Deployment belongs to a different team`
|
169207
169417
|
);
|
@@ -169210,18 +169420,18 @@ async function getDeploymentByIdOrURL({
|
|
169210
169420
|
}
|
169211
169421
|
} else if (team) {
|
169212
169422
|
const err = new Error(
|
169213
|
-
`Deployment doesn't belong to current team ${
|
169423
|
+
`Deployment doesn't belong to current team ${import_chalk108.default.bold(contextName)}`
|
169214
169424
|
);
|
169215
169425
|
err.code = "ERR_INVALID_TEAM";
|
169216
169426
|
throw err;
|
169217
169427
|
}
|
169218
169428
|
return deployment;
|
169219
169429
|
}
|
169220
|
-
var
|
169430
|
+
var import_chalk108;
|
169221
169431
|
var init_get_deployment_by_id_or_url = __esm({
|
169222
169432
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
169223
169433
|
"use strict";
|
169224
|
-
|
169434
|
+
import_chalk108 = __toESM3(require_source());
|
169225
169435
|
init_get_deployment();
|
169226
169436
|
init_get_team_by_id();
|
169227
169437
|
init_is_valid_name();
|
@@ -169360,14 +169570,14 @@ async function redeploy(client2) {
|
|
169360
169570
|
}
|
169361
169571
|
output_manager_default.print(
|
169362
169572
|
`${prependEmoji(
|
169363
|
-
`Inspect: ${
|
169573
|
+
`Inspect: ${import_chalk109.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
169364
169574
|
emoji("inspect")
|
169365
169575
|
)}
|
169366
169576
|
`
|
169367
169577
|
);
|
169368
169578
|
output_manager_default.print(
|
169369
169579
|
prependEmoji(
|
169370
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
169580
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk109.default.bold(
|
169371
169581
|
previewUrl
|
169372
169582
|
)} ${deployStamp()}`,
|
169373
169583
|
emoji("success")
|
@@ -169437,17 +169647,17 @@ async function redeploy(client2) {
|
|
169437
169647
|
output_manager_default.prettyError(err);
|
169438
169648
|
if ((0, import_error_utils33.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
169439
169649
|
output_manager_default.error(
|
169440
|
-
`Use ${
|
169650
|
+
`Use ${import_chalk109.default.bold("vc switch")} to change your current team`
|
169441
169651
|
);
|
169442
169652
|
}
|
169443
169653
|
return 1;
|
169444
169654
|
}
|
169445
169655
|
}
|
169446
|
-
var
|
169656
|
+
var import_chalk109, import_client13, import_error_utils33;
|
169447
169657
|
var init_redeploy2 = __esm({
|
169448
169658
|
"src/commands/redeploy/index.ts"() {
|
169449
169659
|
"use strict";
|
169450
|
-
|
169660
|
+
import_chalk109 = __toESM3(require_source());
|
169451
169661
|
import_client13 = __toESM3(require_dist7());
|
169452
169662
|
init_emoji();
|
169453
169663
|
init_get_args();
|
@@ -169654,7 +169864,7 @@ async function remove5(client2) {
|
|
169654
169864
|
}
|
169655
169865
|
const { contextName } = await getScope(client2);
|
169656
169866
|
output_manager_default.spinner(
|
169657
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
169867
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk110.default.bold(contextName)}`
|
169658
169868
|
);
|
169659
169869
|
let aliases;
|
169660
169870
|
let projects;
|
@@ -169720,7 +169930,7 @@ async function remove5(client2) {
|
|
169720
169930
|
});
|
169721
169931
|
if (deployments.length === 0 && projects.length === 0) {
|
169722
169932
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
169723
|
-
const stylizedIds = ids.map((id) =>
|
169933
|
+
const stylizedIds = ids.map((id) => import_chalk110.default.bold(`"${id}"`)).join(", ");
|
169724
169934
|
const commandName = getCommandName("projects ls");
|
169725
169935
|
log2(
|
169726
169936
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
@@ -169728,7 +169938,7 @@ async function remove5(client2) {
|
|
169728
169938
|
return 1;
|
169729
169939
|
}
|
169730
169940
|
log2(
|
169731
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
169941
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk110.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
169732
169942
|
);
|
169733
169943
|
if (deployments.length > 200) {
|
169734
169944
|
output_manager_default.warn(
|
@@ -169755,11 +169965,11 @@ async function remove5(client2) {
|
|
169755
169965
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
169756
169966
|
);
|
169757
169967
|
deployments.forEach((depl) => {
|
169758
|
-
output_manager_default.print(`${
|
169968
|
+
output_manager_default.print(`${import_chalk110.default.gray("-")} ${import_chalk110.default.bold(depl.url)}
|
169759
169969
|
`);
|
169760
169970
|
});
|
169761
169971
|
projects.forEach((project) => {
|
169762
|
-
output_manager_default.print(`${
|
169972
|
+
output_manager_default.print(`${import_chalk110.default.gray("-")} ${import_chalk110.default.bold(project.name)}
|
169763
169973
|
`);
|
169764
169974
|
});
|
169765
169975
|
return 0;
|
@@ -169776,8 +169986,8 @@ function readConfirmation4(deployments, projects) {
|
|
169776
169986
|
);
|
169777
169987
|
const deploymentTable = table(
|
169778
169988
|
deployments.map((depl) => {
|
169779
|
-
const time =
|
169780
|
-
const url3 = depl.url ?
|
169989
|
+
const time = import_chalk110.default.gray(`${(0, import_ms26.default)(Date.now() - depl.createdAt)} ago`);
|
169990
|
+
const url3 = depl.url ? import_chalk110.default.underline(`https://${depl.url}`) : "";
|
169781
169991
|
return [` ${depl.id}`, url3, time];
|
169782
169992
|
}),
|
169783
169993
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -169788,7 +169998,7 @@ function readConfirmation4(deployments, projects) {
|
|
169788
169998
|
for (const depl of deployments) {
|
169789
169999
|
for (const { alias: alias2 } of depl.aliases) {
|
169790
170000
|
output_manager_default.warn(
|
169791
|
-
`${
|
170001
|
+
`${import_chalk110.default.underline(`https://${alias2}`)} is an alias for ${import_chalk110.default.bold(depl.url)} and will be removed`
|
169792
170002
|
);
|
169793
170003
|
}
|
169794
170004
|
}
|
@@ -169802,12 +170012,12 @@ function readConfirmation4(deployments, projects) {
|
|
169802
170012
|
`
|
169803
170013
|
);
|
169804
170014
|
for (const project of projects) {
|
169805
|
-
output_manager_default.print(`${
|
170015
|
+
output_manager_default.print(`${import_chalk110.default.gray("-")} ${import_chalk110.default.bold(project.name)}
|
169806
170016
|
`);
|
169807
170017
|
}
|
169808
170018
|
}
|
169809
170019
|
output_manager_default.print(
|
169810
|
-
`${
|
170020
|
+
`${import_chalk110.default.bold.red("> Are you sure?")} ${import_chalk110.default.gray("(y/N) ")}`
|
169811
170021
|
);
|
169812
170022
|
process.stdin.on("data", (d) => {
|
169813
170023
|
process.stdin.pause();
|
@@ -169824,11 +170034,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
169824
170034
|
}
|
169825
170035
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
169826
170036
|
}
|
169827
|
-
var
|
170037
|
+
var import_chalk110, import_ms26, import_pluralize11;
|
169828
170038
|
var init_remove6 = __esm({
|
169829
170039
|
"src/commands/remove/index.ts"() {
|
169830
170040
|
"use strict";
|
169831
|
-
|
170041
|
+
import_chalk110 = __toESM3(require_source());
|
169832
170042
|
import_ms26 = __toESM3(require_ms());
|
169833
170043
|
import_pluralize11 = __toESM3(require_pluralize());
|
169834
170044
|
init_table();
|
@@ -169924,7 +170134,7 @@ async function rollbackStatus({
|
|
169924
170134
|
}
|
169925
170135
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
169926
170136
|
output_manager_default.log(
|
169927
|
-
`The rollback exceeded its deadline - rerun ${
|
170137
|
+
`The rollback exceeded its deadline - rerun ${import_chalk111.default.bold(
|
169928
170138
|
`${packageName} rollback ${toDeploymentId}`
|
169929
170139
|
)} to try again`
|
169930
170140
|
);
|
@@ -169988,26 +170198,26 @@ async function renderJobSucceeded2({
|
|
169988
170198
|
let deploymentInfo = "";
|
169989
170199
|
try {
|
169990
170200
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
169991
|
-
deploymentInfo = `${
|
170201
|
+
deploymentInfo = `${import_chalk111.default.bold(deployment.url)} (${toDeploymentId})`;
|
169992
170202
|
} catch (err) {
|
169993
170203
|
output_manager_default.debug(
|
169994
170204
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
169995
170205
|
);
|
169996
|
-
deploymentInfo =
|
170206
|
+
deploymentInfo = import_chalk111.default.bold(toDeploymentId);
|
169997
170207
|
}
|
169998
170208
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
169999
170209
|
output_manager_default.log(
|
170000
|
-
`Success! ${
|
170210
|
+
`Success! ${import_chalk111.default.bold(
|
170001
170211
|
project.name
|
170002
170212
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
170003
170213
|
);
|
170004
170214
|
return 0;
|
170005
170215
|
}
|
170006
|
-
var
|
170216
|
+
var import_chalk111, import_ms27;
|
170007
170217
|
var init_status2 = __esm({
|
170008
170218
|
"src/commands/rollback/status.ts"() {
|
170009
170219
|
"use strict";
|
170010
|
-
|
170220
|
+
import_chalk111 = __toESM3(require_source());
|
170011
170221
|
init_elapsed();
|
170012
170222
|
init_format_date();
|
170013
170223
|
init_get_deployment();
|
@@ -170039,7 +170249,7 @@ async function requestRollback({
|
|
170039
170249
|
});
|
170040
170250
|
if (timeout !== void 0 && (0, import_ms28.default)(timeout) === 0) {
|
170041
170251
|
output_manager_default.log(
|
170042
|
-
`Successfully requested rollback of ${
|
170252
|
+
`Successfully requested rollback of ${import_chalk112.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
170043
170253
|
);
|
170044
170254
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
170045
170255
|
return 0;
|
@@ -170052,11 +170262,11 @@ async function requestRollback({
|
|
170052
170262
|
timeout
|
170053
170263
|
});
|
170054
170264
|
}
|
170055
|
-
var
|
170265
|
+
var import_chalk112, import_ms28;
|
170056
170266
|
var init_request_rollback = __esm({
|
170057
170267
|
"src/commands/rollback/request-rollback.ts"() {
|
170058
170268
|
"use strict";
|
170059
|
-
|
170269
|
+
import_chalk112 = __toESM3(require_source());
|
170060
170270
|
init_pkg_name();
|
170061
170271
|
init_get_project_by_deployment();
|
170062
170272
|
import_ms28 = __toESM3(require_ms());
|
@@ -170166,10 +170376,9 @@ var init_rollback2 = __esm({
|
|
170166
170376
|
}
|
170167
170377
|
telemetry2.trackCliSubcommandStatus();
|
170168
170378
|
const project = await getProjectByCwdOrLink({
|
170169
|
-
autoConfirm:
|
170379
|
+
autoConfirm: parsedArgs.flags["--yes"],
|
170170
170380
|
client: client2,
|
170171
170381
|
commandName: "promote",
|
170172
|
-
cwd: client2.cwd,
|
170173
170382
|
projectNameOrId: parsedArgs.args[2]
|
170174
170383
|
});
|
170175
170384
|
return await rollbackStatus({
|
@@ -170200,11 +170409,21 @@ var init_rollback2 = __esm({
|
|
170200
170409
|
});
|
170201
170410
|
|
170202
170411
|
// src/commands/target/list.ts
|
170412
|
+
function formatBranchMatcher(branchMatcher) {
|
170413
|
+
if (branchMatcher?.type === "equals") {
|
170414
|
+
return branchMatcher.pattern;
|
170415
|
+
} else if (branchMatcher?.type === "startsWith") {
|
170416
|
+
return `${branchMatcher.pattern}*`;
|
170417
|
+
} else if (branchMatcher?.type === "endsWith") {
|
170418
|
+
return `*${branchMatcher.pattern}`;
|
170419
|
+
}
|
170420
|
+
return import_chalk113.default.dim("No branch configuration");
|
170421
|
+
}
|
170203
170422
|
async function list5(client2, argv) {
|
170204
170423
|
const { cwd } = client2;
|
170205
170424
|
if (argv.length !== 0) {
|
170206
170425
|
output_manager_default.error(
|
170207
|
-
`Invalid number of arguments. Usage: ${
|
170426
|
+
`Invalid number of arguments. Usage: ${import_chalk113.default.cyan(
|
170208
170427
|
`${getCommandName("target ls")}`
|
170209
170428
|
)}`
|
170210
170429
|
);
|
@@ -170228,22 +170447,20 @@ async function list5(client2, argv) {
|
|
170228
170447
|
const elapsed2 = (0, import_ms30.default)(Date.now() - start);
|
170229
170448
|
result = withDefaultEnvironmentsIncluded(result);
|
170230
170449
|
output_manager_default.log(
|
170231
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
170450
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk113.default.gray(`[${elapsed2}]`)}`
|
170232
170451
|
);
|
170233
170452
|
const tablePrint = table(
|
170234
170453
|
[
|
170235
|
-
["Target Name", "
|
170236
|
-
(header) =>
|
170454
|
+
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
170455
|
+
(header) => import_chalk113.default.bold(import_chalk113.default.cyan(header))
|
170237
170456
|
),
|
170238
170457
|
...result.flatMap((target) => {
|
170239
|
-
const type = target.type === "production" ? "Production" : target.type === "development" ? "Development" : "Preview";
|
170240
170458
|
return [
|
170241
170459
|
[
|
170242
170460
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
170243
|
-
target.
|
170244
|
-
target.
|
170245
|
-
|
170246
|
-
import_chalk112.default.gray(
|
170461
|
+
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
170462
|
+
TYPE_MAP[target.type],
|
170463
|
+
import_chalk113.default.gray(
|
170247
170464
|
target.updatedAt > 0 ? (0, import_ms30.default)(Date.now() - target.updatedAt) : "-"
|
170248
170465
|
)
|
170249
170466
|
]
|
@@ -170278,7 +170495,6 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
170278
170495
|
description: "",
|
170279
170496
|
domains: []
|
170280
170497
|
},
|
170281
|
-
...environments,
|
170282
170498
|
{
|
170283
170499
|
id: "development",
|
170284
170500
|
slug: "development",
|
@@ -170287,22 +170503,33 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
170287
170503
|
type: "development",
|
170288
170504
|
description: "",
|
170289
170505
|
domains: []
|
170290
|
-
}
|
170506
|
+
},
|
170507
|
+
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
170291
170508
|
];
|
170292
170509
|
}
|
170293
|
-
var import_ms30,
|
170510
|
+
var import_ms30, import_chalk113, TYPE_MAP, BRANCH_TRACKING_MAP;
|
170294
170511
|
var init_list9 = __esm({
|
170295
170512
|
"src/commands/target/list.ts"() {
|
170296
170513
|
"use strict";
|
170297
170514
|
import_ms30 = __toESM3(require_ms());
|
170298
|
-
|
170515
|
+
import_chalk113 = __toESM3(require_source());
|
170299
170516
|
init_table();
|
170517
|
+
init_output_manager();
|
170300
170518
|
init_command27();
|
170301
170519
|
init_pkg_name();
|
170302
170520
|
init_ensure_link();
|
170303
170521
|
init_format_project();
|
170304
170522
|
init_format_environment();
|
170305
|
-
|
170523
|
+
TYPE_MAP = {
|
170524
|
+
production: "Production",
|
170525
|
+
preview: "Preview",
|
170526
|
+
development: "Development"
|
170527
|
+
};
|
170528
|
+
BRANCH_TRACKING_MAP = {
|
170529
|
+
production: (project) => project.link?.productionBranch ?? "main",
|
170530
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk113.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
170531
|
+
development: () => import_chalk113.default.dim("Accessible via CLI")
|
170532
|
+
};
|
170306
170533
|
}
|
170307
170534
|
});
|
170308
170535
|
|
@@ -170496,7 +170723,7 @@ async function list6(client2, argv) {
|
|
170496
170723
|
client2.stdout.write("\n");
|
170497
170724
|
const teamTable = table(
|
170498
170725
|
[
|
170499
|
-
["id", "email / name"].map((str) => (0,
|
170726
|
+
["id", "email / name"].map((str) => (0, import_chalk114.gray)(str)),
|
170500
170727
|
...teamList.map((team) => [team.value, team.name])
|
170501
170728
|
],
|
170502
170729
|
{ hsep: 5 }
|
@@ -170513,13 +170740,13 @@ async function list6(client2, argv) {
|
|
170513
170740
|
}
|
170514
170741
|
return 0;
|
170515
170742
|
}
|
170516
|
-
var
|
170743
|
+
var import_chalk114;
|
170517
170744
|
var init_list11 = __esm({
|
170518
170745
|
"src/commands/teams/list.ts"() {
|
170519
170746
|
"use strict";
|
170520
170747
|
init_chars();
|
170521
170748
|
init_table();
|
170522
|
-
|
170749
|
+
import_chalk114 = __toESM3(require_source());
|
170523
170750
|
init_get_user();
|
170524
170751
|
init_get_teams();
|
170525
170752
|
init_pkg_name();
|
@@ -170614,7 +170841,7 @@ Please select a team scope using ${getCommandName(
|
|
170614
170841
|
return 1;
|
170615
170842
|
}
|
170616
170843
|
output_manager_default.log(
|
170617
|
-
introMsg || `Inviting team members to ${
|
170844
|
+
introMsg || `Inviting team members to ${import_chalk115.default.bold(currentTeam.name)}`
|
170618
170845
|
);
|
170619
170846
|
telemetry2.trackCliArgumentEmail(emails);
|
170620
170847
|
if (emails.length > 0) {
|
@@ -170634,10 +170861,10 @@ Please select a team scope using ${getCommandName(
|
|
170634
170861
|
throw err;
|
170635
170862
|
}
|
170636
170863
|
output_manager_default.log(
|
170637
|
-
`${
|
170864
|
+
`${import_chalk115.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
170638
170865
|
);
|
170639
170866
|
} else {
|
170640
|
-
output_manager_default.log(`${
|
170867
|
+
output_manager_default.log(`${import_chalk115.default.red(`\u2716 ${email3}`)} ${import_chalk115.default.gray("[invalid]")}`);
|
170641
170868
|
}
|
170642
170869
|
}
|
170643
170870
|
return 0;
|
@@ -170670,15 +170897,15 @@ Please select a team scope using ${getCommandName(
|
|
170670
170897
|
);
|
170671
170898
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
170672
170899
|
emails.push(email2);
|
170673
|
-
output_manager_default.log(`${
|
170900
|
+
output_manager_default.log(`${import_chalk115.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
170674
170901
|
if (hasError) {
|
170675
170902
|
hasError = false;
|
170676
170903
|
process.stderr.write(eraseLines(emails.length + 2));
|
170677
170904
|
output_manager_default.log(
|
170678
|
-
introMsg || `Inviting team members to ${
|
170905
|
+
introMsg || `Inviting team members to ${import_chalk115.default.bold(currentTeam.name)}`
|
170679
170906
|
);
|
170680
170907
|
for (const email3 of emails) {
|
170681
|
-
output_manager_default.log(`${
|
170908
|
+
output_manager_default.log(`${import_chalk115.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
170682
170909
|
}
|
170683
170910
|
}
|
170684
170911
|
} catch (err) {
|
@@ -170687,7 +170914,7 @@ Please select a team scope using ${getCommandName(
|
|
170687
170914
|
output_manager_default.error((0, import_error_utils35.errorToString)(err));
|
170688
170915
|
hasError = true;
|
170689
170916
|
for (const email3 of emails) {
|
170690
|
-
output_manager_default.log(`${
|
170917
|
+
output_manager_default.log(`${import_chalk115.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
170691
170918
|
}
|
170692
170919
|
}
|
170693
170920
|
}
|
@@ -170700,16 +170927,16 @@ Please select a team scope using ${getCommandName(
|
|
170700
170927
|
} else {
|
170701
170928
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
170702
170929
|
for (const email3 of emails) {
|
170703
|
-
output_manager_default.log(`${
|
170930
|
+
output_manager_default.log(`${import_chalk115.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
170704
170931
|
}
|
170705
170932
|
}
|
170706
170933
|
return 0;
|
170707
170934
|
}
|
170708
|
-
var
|
170935
|
+
var import_chalk115, import_error_utils35, validateEmail2, domains;
|
170709
170936
|
var init_invite2 = __esm({
|
170710
170937
|
"src/commands/teams/invite.ts"() {
|
170711
170938
|
"use strict";
|
170712
|
-
|
170939
|
+
import_chalk115 = __toESM3(require_source());
|
170713
170940
|
init_cmd();
|
170714
170941
|
init_stamp();
|
170715
170942
|
init_param();
|
@@ -170785,7 +171012,7 @@ async function add7(client2) {
|
|
170785
171012
|
let team;
|
170786
171013
|
let elapsed2;
|
170787
171014
|
output_manager_default.log(
|
170788
|
-
`Pick a team identifier for its URL (e.g.: ${
|
171015
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk116.default.cyan(
|
170789
171016
|
"`vercel.com/acme`"
|
170790
171017
|
)})`
|
170791
171018
|
);
|
@@ -170816,7 +171043,7 @@ async function add7(client2) {
|
|
170816
171043
|
output_manager_default.stopSpinner();
|
170817
171044
|
process.stdout.write(eraseLines(2));
|
170818
171045
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
170819
|
-
output_manager_default.log(`${
|
171046
|
+
output_manager_default.log(`${import_chalk116.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
170820
171047
|
`);
|
170821
171048
|
output_manager_default.log("Pick a display name for your team");
|
170822
171049
|
let name;
|
@@ -170839,7 +171066,7 @@ async function add7(client2) {
|
|
170839
171066
|
process.stdout.write(eraseLines(2));
|
170840
171067
|
team = Object.assign(team, res);
|
170841
171068
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
170842
|
-
output_manager_default.log(`${
|
171069
|
+
output_manager_default.log(`${import_chalk116.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
170843
171070
|
`);
|
170844
171071
|
output_manager_default.spinner("Saving");
|
170845
171072
|
client2.config.currentTeam = team.id;
|
@@ -170853,11 +171080,11 @@ async function add7(client2) {
|
|
170853
171080
|
});
|
170854
171081
|
return 0;
|
170855
171082
|
}
|
170856
|
-
var
|
171083
|
+
var import_chalk116, import_error_utils36, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
170857
171084
|
var init_add13 = __esm({
|
170858
171085
|
"src/commands/teams/add.ts"() {
|
170859
171086
|
"use strict";
|
170860
|
-
|
171087
|
+
import_chalk116 = __toESM3(require_source());
|
170861
171088
|
init_stamp();
|
170862
171089
|
init_erase_lines();
|
170863
171090
|
init_chars();
|
@@ -170870,7 +171097,7 @@ var init_add13 = __esm({
|
|
170870
171097
|
init_output_manager();
|
170871
171098
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
170872
171099
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
170873
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
171100
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk116.default.gray("vercel.com/");
|
170874
171101
|
teamNamePrefix = "Team Name".padEnd(14);
|
170875
171102
|
}
|
170876
171103
|
});
|
@@ -170929,7 +171156,7 @@ async function change(client2, argv) {
|
|
170929
171156
|
let title9 = `${team.name} (${team.slug})`;
|
170930
171157
|
const selected = team.id === currentTeam?.id;
|
170931
171158
|
if (selected) {
|
170932
|
-
title9 += ` ${
|
171159
|
+
title9 += ` ${import_chalk117.default.bold("(current)")}`;
|
170933
171160
|
}
|
170934
171161
|
if (team.limited) {
|
170935
171162
|
title9 += ` ${emoji("locked")}`;
|
@@ -170941,7 +171168,7 @@ async function change(client2, argv) {
|
|
170941
171168
|
selected
|
170942
171169
|
};
|
170943
171170
|
});
|
170944
|
-
let suffix = personalScopeSelected ? ` ${
|
171171
|
+
let suffix = personalScopeSelected ? ` ${import_chalk117.default.bold("(current)")}` : "";
|
170945
171172
|
if (user.limited) {
|
170946
171173
|
suffix += ` ${emoji("locked")}`;
|
170947
171174
|
}
|
@@ -170987,14 +171214,14 @@ async function change(client2, argv) {
|
|
170987
171214
|
}
|
170988
171215
|
updateCurrentTeam(config2);
|
170989
171216
|
output_manager_default.success(
|
170990
|
-
`Your account (${
|
171217
|
+
`Your account (${import_chalk117.default.bold(user.username)}) is now active!`
|
170991
171218
|
);
|
170992
171219
|
return 0;
|
170993
171220
|
}
|
170994
171221
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
170995
171222
|
if (!newTeam) {
|
170996
171223
|
output_manager_default.error(
|
170997
|
-
`You do not have permission to access scope ${
|
171224
|
+
`You do not have permission to access scope ${import_chalk117.default.bold(desiredSlug)}.`
|
170998
171225
|
);
|
170999
171226
|
return 1;
|
171000
171227
|
}
|
@@ -171012,15 +171239,15 @@ async function change(client2, argv) {
|
|
171012
171239
|
}
|
171013
171240
|
updateCurrentTeam(config2, newTeam);
|
171014
171241
|
output_manager_default.success(
|
171015
|
-
`The team ${
|
171242
|
+
`The team ${import_chalk117.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
171016
171243
|
);
|
171017
171244
|
return 0;
|
171018
171245
|
}
|
171019
|
-
var
|
171246
|
+
var import_chalk117, updateCurrentTeam;
|
171020
171247
|
var init_switch2 = __esm({
|
171021
171248
|
"src/commands/teams/switch.ts"() {
|
171022
171249
|
"use strict";
|
171023
|
-
|
171250
|
+
import_chalk117 = __toESM3(require_source());
|
171024
171251
|
init_emoji();
|
171025
171252
|
init_get_user();
|
171026
171253
|
init_get_teams();
|
@@ -171199,13 +171426,13 @@ var init_teams2 = __esm({
|
|
171199
171426
|
// src/commands/telemetry/status.ts
|
171200
171427
|
async function status(client2) {
|
171201
171428
|
const enabled = client2.config.telemetry?.enabled !== false;
|
171202
|
-
const status2 = enabled ?
|
171429
|
+
const status2 = enabled ? import_chalk118.default.green("Enabled") : import_chalk118.default.red("Disabled");
|
171203
171430
|
output_manager_default.print("\n");
|
171204
|
-
output_manager_default.log(`${
|
171431
|
+
output_manager_default.log(`${import_chalk118.default.bold("Telemetry status")}: ${status2}
|
171205
171432
|
`);
|
171206
171433
|
const learnMoreMessage = `
|
171207
171434
|
|
171208
|
-
Learn more: ${
|
171435
|
+
Learn more: ${import_chalk118.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
171209
171436
|
if (enabled) {
|
171210
171437
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
171211
171438
|
} else {
|
@@ -171216,11 +171443,11 @@ Learn more: ${import_chalk117.default.cyan("https://vercel.com/docs/cli/about-te
|
|
171216
171443
|
}
|
171217
171444
|
return 0;
|
171218
171445
|
}
|
171219
|
-
var
|
171446
|
+
var import_chalk118;
|
171220
171447
|
var init_status3 = __esm({
|
171221
171448
|
"src/commands/telemetry/status.ts"() {
|
171222
171449
|
"use strict";
|
171223
|
-
|
171450
|
+
import_chalk118 = __toESM3(require_source());
|
171224
171451
|
init_output_manager();
|
171225
171452
|
}
|
171226
171453
|
});
|
@@ -171401,7 +171628,7 @@ async function telemetry(client2) {
|
|
171401
171628
|
default: {
|
171402
171629
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
171403
171630
|
output_manager_default.print(
|
171404
|
-
`${
|
171631
|
+
`${import_chalk119.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
171405
171632
|
`
|
171406
171633
|
);
|
171407
171634
|
output_manager_default.print(help2(telemetryCommand, { columns: client2.stderr.columns }));
|
@@ -171409,7 +171636,7 @@ async function telemetry(client2) {
|
|
171409
171636
|
}
|
171410
171637
|
}
|
171411
171638
|
}
|
171412
|
-
var
|
171639
|
+
var import_chalk119, COMMAND_CONFIG14;
|
171413
171640
|
var init_telemetry3 = __esm({
|
171414
171641
|
"src/commands/telemetry/index.ts"() {
|
171415
171642
|
"use strict";
|
@@ -171424,7 +171651,7 @@ var init_telemetry3 = __esm({
|
|
171424
171651
|
init_command29();
|
171425
171652
|
init_get_flags_specification();
|
171426
171653
|
init_telemetry2();
|
171427
|
-
|
171654
|
+
import_chalk119 = __toESM3(require_source());
|
171428
171655
|
init_output_manager();
|
171429
171656
|
init_commands();
|
171430
171657
|
COMMAND_CONFIG14 = {
|
@@ -171499,7 +171726,7 @@ var import_error_utils37 = __toESM3(require_dist2());
|
|
171499
171726
|
var import_path40 = require("path");
|
171500
171727
|
var import_fs8 = require("fs");
|
171501
171728
|
var import_fs_extra23 = __toESM3(require_lib());
|
171502
|
-
var
|
171729
|
+
var import_chalk120 = __toESM3(require_source());
|
171503
171730
|
var import_epipebomb = __toESM3(require_epipebomb());
|
171504
171731
|
|
171505
171732
|
// src/util/get-latest-version/index.ts
|
@@ -172371,13 +172598,13 @@ var main13 = async () => {
|
|
172371
172598
|
const betaCommands = [];
|
172372
172599
|
if (betaCommands.includes(targetOrSubcommand)) {
|
172373
172600
|
output_manager_default.print(
|
172374
|
-
`${
|
172601
|
+
`${import_chalk120.default.grey(
|
172375
172602
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
172376
172603
|
)}
|
172377
172604
|
`
|
172378
172605
|
);
|
172379
172606
|
} else {
|
172380
|
-
output_manager_default.print(`${
|
172607
|
+
output_manager_default.print(`${import_chalk120.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
172381
172608
|
`);
|
172382
172609
|
}
|
172383
172610
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
@@ -172906,20 +173133,20 @@ main13().then(async (exitCode2) => {
|
|
172906
173133
|
});
|
172907
173134
|
if (latest) {
|
172908
173135
|
const changelog = "https://github.com/vercel/vercel/releases";
|
172909
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
173136
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk120.default.magenta(
|
172910
173137
|
`
|
172911
173138
|
|
172912
|
-
The latest update ${
|
173139
|
+
The latest update ${import_chalk120.default.italic(
|
172913
173140
|
"may"
|
172914
173141
|
)} fix any errors that occurred.`
|
172915
173142
|
) : "";
|
172916
173143
|
output_manager_default.print(
|
172917
173144
|
box(
|
172918
|
-
`Update available! ${
|
173145
|
+
`Update available! ${import_chalk120.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk120.default.green(
|
172919
173146
|
`v${latest}`
|
172920
173147
|
)}
|
172921
173148
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
172922
|
-
Run ${
|
173149
|
+
Run ${import_chalk120.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
172923
173150
|
)
|
172924
173151
|
);
|
172925
173152
|
output_manager_default.print("\n\n");
|