vercel-cli 48.0.3__py3-none-any.whl → 48.1.1__py3-none-any.whl
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.
Potentially problematic release.
This version of vercel-cli might be problematic. Click here for more details.
- vercel_cli/vendor/dist/index.js +856 -413
- vercel_cli/vendor/node_modules/.package-lock.json +10 -7
- vercel_cli/vendor/node_modules/@vercel/detect-agent/CHANGELOG.md +19 -0
- vercel_cli/vendor/node_modules/@vercel/detect-agent/README.md +123 -0
- vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.d.ts +29 -1
- vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.js +28 -11
- vercel_cli/vendor/node_modules/@vercel/detect-agent/package.json +33 -5
- vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +188 -45
- vercel_cli/vendor/node_modules/@vercel/python/package.json +1 -1
- vercel_cli/vendor/package.json +3 -3
- {vercel_cli-48.0.3.dist-info → vercel_cli-48.1.1.dist-info}/METADATA +1 -1
- {vercel_cli-48.0.3.dist-info → vercel_cli-48.1.1.dist-info}/RECORD +14 -12
- {vercel_cli-48.0.3.dist-info → vercel_cli-48.1.1.dist-info}/WHEEL +0 -0
- {vercel_cli-48.0.3.dist-info → vercel_cli-48.1.1.dist-info}/entry_points.txt +0 -0
vercel_cli/vendor/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(chalk128, 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 = chalk128;
|
|
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 = (chalk128, 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(chalk128, 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(chalk128, 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 chalk129 = {};
|
|
4158
|
+
applyOptions(chalk129, options);
|
|
4159
|
+
chalk129.template = (...arguments_) => chalkTag(chalk129.template, ...arguments_);
|
|
4160
|
+
Object.setPrototypeOf(chalk129, Chalk.prototype);
|
|
4161
|
+
Object.setPrototypeOf(chalk129.template, chalk129);
|
|
4162
|
+
chalk129.template.constructor = () => {
|
|
4163
4163
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
4164
4164
|
};
|
|
4165
|
-
|
|
4166
|
-
return
|
|
4165
|
+
chalk129.template.Instance = ChalkClass;
|
|
4166
|
+
return chalk129.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 = (chalk129, ...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(chalk129, parts.join(""));
|
|
4294
4294
|
};
|
|
4295
4295
|
Object.defineProperties(Chalk.prototype, styles);
|
|
4296
|
-
var
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
module2.exports =
|
|
4296
|
+
var chalk128 = Chalk();
|
|
4297
|
+
chalk128.supportsColor = stdoutColor;
|
|
4298
|
+
chalk128.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
4299
|
+
chalk128.stderr.supportsColor = stderrColor;
|
|
4300
|
+
module2.exports = chalk128;
|
|
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(chalk128, 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 = chalk128;
|
|
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 = (chalk128, 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(chalk128, 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(chalk128, 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 chalk128 = {};
|
|
7287
|
+
applyOptions(chalk128, options);
|
|
7288
|
+
chalk128.template = function() {
|
|
7289
7289
|
const args2 = [].slice.call(arguments);
|
|
7290
|
-
return chalkTag.apply(null, [
|
|
7290
|
+
return chalkTag.apply(null, [chalk128.template].concat(args2));
|
|
7291
7291
|
};
|
|
7292
|
-
Object.setPrototypeOf(
|
|
7293
|
-
Object.setPrototypeOf(
|
|
7294
|
-
|
|
7295
|
-
return
|
|
7292
|
+
Object.setPrototypeOf(chalk128, Chalk.prototype);
|
|
7293
|
+
Object.setPrototypeOf(chalk128.template, chalk128);
|
|
7294
|
+
chalk128.template.constructor = Chalk;
|
|
7295
|
+
return chalk128.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(chalk128, 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(chalk128, 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 chalk128 = require_chalk();
|
|
9376
9376
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
|
9377
9377
|
var main18 = {
|
|
9378
|
-
info:
|
|
9379
|
-
success:
|
|
9380
|
-
warning:
|
|
9381
|
-
error:
|
|
9378
|
+
info: chalk128.blue("\u2139"),
|
|
9379
|
+
success: chalk128.green("\u2714"),
|
|
9380
|
+
warning: chalk128.yellow("\u26A0"),
|
|
9381
|
+
error: chalk128.red("\u2716")
|
|
9382
9382
|
};
|
|
9383
9383
|
var fallbacks = {
|
|
9384
|
-
info:
|
|
9385
|
-
success:
|
|
9386
|
-
warning:
|
|
9387
|
-
error:
|
|
9384
|
+
info: chalk128.blue("i"),
|
|
9385
|
+
success: chalk128.green("\u221A"),
|
|
9386
|
+
warning: chalk128.yellow("\u203C"),
|
|
9387
|
+
error: chalk128.red("\xD7")
|
|
9388
9388
|
};
|
|
9389
9389
|
module2.exports = isSupported ? main18 : 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 chalk128 = 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 = chalk128[this.color](frame);
|
|
9873
9873
|
}
|
|
9874
9874
|
this.frameIndex = ++this.frameIndex % frames.length;
|
|
9875
9875
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
|
@@ -31624,6 +31624,15 @@ var init_command3 = __esm({
|
|
|
31624
31624
|
...yesOption,
|
|
31625
31625
|
description: "Skip the confirmation prompt about pulling environment variables and project settings when not found locally"
|
|
31626
31626
|
}
|
|
31627
|
+
// FIXME: standalone:replace env var with flag
|
|
31628
|
+
// {
|
|
31629
|
+
// name: 'experimentalStandalone',
|
|
31630
|
+
// description:
|
|
31631
|
+
// 'Create a standalone build with all dependencies inlined into function output folders',
|
|
31632
|
+
// shorthand: null,
|
|
31633
|
+
// type: Boolean,
|
|
31634
|
+
// deprecated: false,
|
|
31635
|
+
// },
|
|
31627
31636
|
],
|
|
31628
31637
|
examples: [
|
|
31629
31638
|
{
|
|
@@ -32452,7 +32461,7 @@ var init_env_target = __esm({
|
|
|
32452
32461
|
});
|
|
32453
32462
|
|
|
32454
32463
|
// src/commands/env/command.ts
|
|
32455
|
-
var targetPlaceholder, listSubcommand5, addSubcommand4, removeSubcommand5, pullSubcommand, envCommand;
|
|
32464
|
+
var targetPlaceholder, listSubcommand5, addSubcommand4, removeSubcommand5, pullSubcommand, updateSubcommand, envCommand;
|
|
32456
32465
|
var init_command10 = __esm({
|
|
32457
32466
|
"src/commands/env/command.ts"() {
|
|
32458
32467
|
"use strict";
|
|
@@ -32646,6 +32655,65 @@ var init_command10 = __esm({
|
|
|
32646
32655
|
}
|
|
32647
32656
|
]
|
|
32648
32657
|
};
|
|
32658
|
+
updateSubcommand = {
|
|
32659
|
+
name: "update",
|
|
32660
|
+
aliases: [],
|
|
32661
|
+
description: "Update the value of an existing Environment Variable (see examples below)",
|
|
32662
|
+
arguments: [
|
|
32663
|
+
{
|
|
32664
|
+
name: "name",
|
|
32665
|
+
required: true
|
|
32666
|
+
},
|
|
32667
|
+
{
|
|
32668
|
+
name: "environment",
|
|
32669
|
+
required: false
|
|
32670
|
+
}
|
|
32671
|
+
],
|
|
32672
|
+
options: [
|
|
32673
|
+
{
|
|
32674
|
+
name: "sensitive",
|
|
32675
|
+
description: "Update to a sensitive Environment Variable",
|
|
32676
|
+
shorthand: null,
|
|
32677
|
+
type: Boolean,
|
|
32678
|
+
deprecated: false
|
|
32679
|
+
},
|
|
32680
|
+
{
|
|
32681
|
+
...yesOption,
|
|
32682
|
+
description: "Skip the confirmation prompt when updating an Environment Variable"
|
|
32683
|
+
}
|
|
32684
|
+
],
|
|
32685
|
+
examples: [
|
|
32686
|
+
{
|
|
32687
|
+
name: "Update a variable in all Environments",
|
|
32688
|
+
value: [
|
|
32689
|
+
`${packageName} env update <name>`,
|
|
32690
|
+
`${packageName} env update API_TOKEN`
|
|
32691
|
+
]
|
|
32692
|
+
},
|
|
32693
|
+
{
|
|
32694
|
+
name: "Update a variable in a specific Environment",
|
|
32695
|
+
value: [
|
|
32696
|
+
`${packageName} env update <name> ${targetPlaceholder}`,
|
|
32697
|
+
`${packageName} env update DB_PASS production`
|
|
32698
|
+
]
|
|
32699
|
+
},
|
|
32700
|
+
{
|
|
32701
|
+
name: "Update a variable for a specific Environment and Git Branch",
|
|
32702
|
+
value: [
|
|
32703
|
+
`${packageName} env update <name> ${targetPlaceholder} <gitbranch>`,
|
|
32704
|
+
`${packageName} env update NPM_RC preview feat1`
|
|
32705
|
+
]
|
|
32706
|
+
},
|
|
32707
|
+
{
|
|
32708
|
+
name: "Update a variable from stdin",
|
|
32709
|
+
value: [
|
|
32710
|
+
`cat <file> | ${packageName} env update <name> ${targetPlaceholder}`,
|
|
32711
|
+
`cat ~/.npmrc | ${packageName} env update NPM_RC preview`,
|
|
32712
|
+
`${packageName} env update API_URL production < url.txt`
|
|
32713
|
+
]
|
|
32714
|
+
}
|
|
32715
|
+
]
|
|
32716
|
+
};
|
|
32649
32717
|
envCommand = {
|
|
32650
32718
|
name: "env",
|
|
32651
32719
|
aliases: [],
|
|
@@ -32655,7 +32723,8 @@ var init_command10 = __esm({
|
|
|
32655
32723
|
addSubcommand4,
|
|
32656
32724
|
listSubcommand5,
|
|
32657
32725
|
pullSubcommand,
|
|
32658
|
-
removeSubcommand5
|
|
32726
|
+
removeSubcommand5,
|
|
32727
|
+
updateSubcommand
|
|
32659
32728
|
],
|
|
32660
32729
|
options: [],
|
|
32661
32730
|
examples: []
|
|
@@ -36006,14 +36075,14 @@ var require_templates3 = __commonJS2({
|
|
|
36006
36075
|
}
|
|
36007
36076
|
return results;
|
|
36008
36077
|
}
|
|
36009
|
-
function buildStyle(
|
|
36078
|
+
function buildStyle(chalk128, styles) {
|
|
36010
36079
|
const enabled = {};
|
|
36011
36080
|
for (const layer of styles) {
|
|
36012
36081
|
for (const style of layer.styles) {
|
|
36013
36082
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
36014
36083
|
}
|
|
36015
36084
|
}
|
|
36016
|
-
let current =
|
|
36085
|
+
let current = chalk128;
|
|
36017
36086
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
36018
36087
|
if (!Array.isArray(styles2)) {
|
|
36019
36088
|
continue;
|
|
@@ -36025,7 +36094,7 @@ var require_templates3 = __commonJS2({
|
|
|
36025
36094
|
}
|
|
36026
36095
|
return current;
|
|
36027
36096
|
}
|
|
36028
|
-
module2.exports = (
|
|
36097
|
+
module2.exports = (chalk128, temporary) => {
|
|
36029
36098
|
const styles = [];
|
|
36030
36099
|
const chunks = [];
|
|
36031
36100
|
let chunk = [];
|
|
@@ -36035,13 +36104,13 @@ var require_templates3 = __commonJS2({
|
|
|
36035
36104
|
} else if (style) {
|
|
36036
36105
|
const string = chunk.join("");
|
|
36037
36106
|
chunk = [];
|
|
36038
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
36107
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk128, styles)(string));
|
|
36039
36108
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
36040
36109
|
} else if (close2) {
|
|
36041
36110
|
if (styles.length === 0) {
|
|
36042
36111
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
36043
36112
|
}
|
|
36044
|
-
chunks.push(buildStyle(
|
|
36113
|
+
chunks.push(buildStyle(chalk128, styles)(chunk.join("")));
|
|
36045
36114
|
chunk = [];
|
|
36046
36115
|
styles.pop();
|
|
36047
36116
|
} else {
|
|
@@ -36089,16 +36158,16 @@ var require_source2 = __commonJS2({
|
|
|
36089
36158
|
}
|
|
36090
36159
|
};
|
|
36091
36160
|
var chalkFactory = (options) => {
|
|
36092
|
-
const
|
|
36093
|
-
applyOptions(
|
|
36094
|
-
|
|
36095
|
-
Object.setPrototypeOf(
|
|
36096
|
-
Object.setPrototypeOf(
|
|
36097
|
-
|
|
36161
|
+
const chalk129 = {};
|
|
36162
|
+
applyOptions(chalk129, options);
|
|
36163
|
+
chalk129.template = (...arguments_) => chalkTag(chalk129.template, ...arguments_);
|
|
36164
|
+
Object.setPrototypeOf(chalk129, Chalk.prototype);
|
|
36165
|
+
Object.setPrototypeOf(chalk129.template, chalk129);
|
|
36166
|
+
chalk129.template.constructor = () => {
|
|
36098
36167
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
36099
36168
|
};
|
|
36100
|
-
|
|
36101
|
-
return
|
|
36169
|
+
chalk129.template.Instance = ChalkClass;
|
|
36170
|
+
return chalk129.template;
|
|
36102
36171
|
};
|
|
36103
36172
|
function Chalk(options) {
|
|
36104
36173
|
return chalkFactory(options);
|
|
@@ -36209,7 +36278,7 @@ var require_source2 = __commonJS2({
|
|
|
36209
36278
|
return openAll + string + closeAll;
|
|
36210
36279
|
};
|
|
36211
36280
|
var template;
|
|
36212
|
-
var chalkTag = (
|
|
36281
|
+
var chalkTag = (chalk129, ...strings) => {
|
|
36213
36282
|
const [firstString] = strings;
|
|
36214
36283
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
36215
36284
|
return strings.join(" ");
|
|
@@ -36225,14 +36294,14 @@ var require_source2 = __commonJS2({
|
|
|
36225
36294
|
if (template === void 0) {
|
|
36226
36295
|
template = require_templates3();
|
|
36227
36296
|
}
|
|
36228
|
-
return template(
|
|
36297
|
+
return template(chalk129, parts.join(""));
|
|
36229
36298
|
};
|
|
36230
36299
|
Object.defineProperties(Chalk.prototype, styles);
|
|
36231
|
-
var
|
|
36232
|
-
|
|
36233
|
-
|
|
36234
|
-
|
|
36235
|
-
module2.exports =
|
|
36300
|
+
var chalk128 = Chalk();
|
|
36301
|
+
chalk128.supportsColor = stdoutColor;
|
|
36302
|
+
chalk128.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
36303
|
+
chalk128.stderr.supportsColor = stderrColor;
|
|
36304
|
+
module2.exports = chalk128;
|
|
36236
36305
|
}
|
|
36237
36306
|
});
|
|
36238
36307
|
|
|
@@ -49485,7 +49554,7 @@ var require_package = __commonJS2({
|
|
|
49485
49554
|
"../client/package.json"(exports2, module2) {
|
|
49486
49555
|
module2.exports = {
|
|
49487
49556
|
name: "@vercel/client",
|
|
49488
|
-
version: "
|
|
49557
|
+
version: "17.0.0",
|
|
49489
49558
|
main: "dist/index.js",
|
|
49490
49559
|
typings: "dist/index.d.ts",
|
|
49491
49560
|
homepage: "https://vercel.com",
|
|
@@ -58261,6 +58330,9 @@ var require_query_string = __commonJS2({
|
|
|
58261
58330
|
if (clientOptions.skipAutoDetectionConfirmation) {
|
|
58262
58331
|
options.set("skipAutoDetectionConfirmation", "1");
|
|
58263
58332
|
}
|
|
58333
|
+
if (clientOptions.prebuilt) {
|
|
58334
|
+
options.set("prebuilt", "1");
|
|
58335
|
+
}
|
|
58264
58336
|
return Array.from(options.entries()).length ? `?${options.toString()}` : "";
|
|
58265
58337
|
}
|
|
58266
58338
|
}
|
|
@@ -74708,11 +74780,11 @@ var require_esprima = __commonJS2({
|
|
|
74708
74780
|
}();
|
|
74709
74781
|
exports3.ForOfStatement = ForOfStatement;
|
|
74710
74782
|
var ForStatement = function() {
|
|
74711
|
-
function ForStatement2(init3, test,
|
|
74783
|
+
function ForStatement2(init3, test, update2, body) {
|
|
74712
74784
|
this.type = syntax_1.Syntax.ForStatement;
|
|
74713
74785
|
this.init = init3;
|
|
74714
74786
|
this.test = test;
|
|
74715
|
-
this.update =
|
|
74787
|
+
this.update = update2;
|
|
74716
74788
|
this.body = body;
|
|
74717
74789
|
}
|
|
74718
74790
|
return ForStatement2;
|
|
@@ -76816,7 +76888,7 @@ var require_esprima = __commonJS2({
|
|
|
76816
76888
|
Parser2.prototype.parseForStatement = function() {
|
|
76817
76889
|
var init3 = null;
|
|
76818
76890
|
var test = null;
|
|
76819
|
-
var
|
|
76891
|
+
var update2 = null;
|
|
76820
76892
|
var forIn = true;
|
|
76821
76893
|
var left, right;
|
|
76822
76894
|
var node = this.createNode();
|
|
@@ -76929,7 +77001,7 @@ var require_esprima = __commonJS2({
|
|
|
76929
77001
|
}
|
|
76930
77002
|
this.expect(";");
|
|
76931
77003
|
if (!this.match(")")) {
|
|
76932
|
-
|
|
77004
|
+
update2 = this.parseExpression();
|
|
76933
77005
|
}
|
|
76934
77006
|
}
|
|
76935
77007
|
var body;
|
|
@@ -76943,7 +77015,7 @@ var require_esprima = __commonJS2({
|
|
|
76943
77015
|
body = this.isolateCoverGrammar(this.parseStatement);
|
|
76944
77016
|
this.context.inIteration = previousInIteration;
|
|
76945
77017
|
}
|
|
76946
|
-
return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init3, test,
|
|
77018
|
+
return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init3, test, update2, body)) : forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : this.finalize(node, new Node.ForOfStatement(left, right, body));
|
|
76947
77019
|
};
|
|
76948
77020
|
Parser2.prototype.parseContinueStatement = function() {
|
|
76949
77021
|
var node = this.createNode();
|
|
@@ -116222,8 +116294,9 @@ var require_frameworks = __commonJS2({
|
|
|
116222
116294
|
]
|
|
116223
116295
|
},
|
|
116224
116296
|
{
|
|
116225
|
-
name: "FastAPI
|
|
116297
|
+
name: "FastAPI",
|
|
116226
116298
|
slug: "fastapi",
|
|
116299
|
+
demo: "https://vercel-fastapi-gamma-smoky.vercel.app/",
|
|
116227
116300
|
logo: "https://api-frameworks.vercel.sh/framework-logos/fastapi.svg",
|
|
116228
116301
|
darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/fastapi.svg",
|
|
116229
116302
|
tagline: "FastAPI framework, high performance, easy to learn, fast to code, ready for production",
|
|
@@ -116273,7 +116346,7 @@ var require_frameworks = __commonJS2({
|
|
|
116273
116346
|
]
|
|
116274
116347
|
},
|
|
116275
116348
|
{
|
|
116276
|
-
name: "FastHTML
|
|
116349
|
+
name: "FastHTML",
|
|
116277
116350
|
slug: "fasthtml",
|
|
116278
116351
|
demo: "https://fasthtml-template.vercel.app",
|
|
116279
116352
|
logo: "https://api-frameworks.vercel.sh/framework-logos/fasthtml.png",
|
|
@@ -116866,7 +116939,7 @@ var require_frameworks = __commonJS2({
|
|
|
116866
116939
|
getOutputDirName: async () => "public"
|
|
116867
116940
|
},
|
|
116868
116941
|
{
|
|
116869
|
-
name: "
|
|
116942
|
+
name: "H3",
|
|
116870
116943
|
slug: "h3",
|
|
116871
116944
|
logo: "https://api-frameworks.vercel.sh/framework-logos/h3.svg",
|
|
116872
116945
|
tagline: "Universal, Tiny, and Fast Servers",
|
|
@@ -119304,7 +119377,7 @@ var require_detect_builders = __commonJS2({
|
|
|
119304
119377
|
builders.push(...apiBuilders);
|
|
119305
119378
|
}
|
|
119306
119379
|
if (frontendBuilder) {
|
|
119307
|
-
if (frontendBuilder?.use === "@vercel/express") {
|
|
119380
|
+
if (frontendBuilder?.use === "@vercel/express" || frontendBuilder?.use === "@vercel/hono") {
|
|
119308
119381
|
builders.push({
|
|
119309
119382
|
src: "public/**/*",
|
|
119310
119383
|
use: "@vercel/static",
|
|
@@ -119571,6 +119644,25 @@ var require_detect_builders = __commonJS2({
|
|
|
119571
119644
|
}
|
|
119572
119645
|
}
|
|
119573
119646
|
}
|
|
119647
|
+
if (frontendBuilder && ((0, import_is_official_runtime.isOfficialRuntime)("express", frontendBuilder.use) || (0, import_is_official_runtime.isOfficialRuntime)("hono", frontendBuilder.use))) {
|
|
119648
|
+
const validFilenames = [
|
|
119649
|
+
"app",
|
|
119650
|
+
"index",
|
|
119651
|
+
"server",
|
|
119652
|
+
"src/app",
|
|
119653
|
+
"src/index",
|
|
119654
|
+
"src/server"
|
|
119655
|
+
];
|
|
119656
|
+
const validExtensions = ["js", "cjs", "mjs", "ts", "cts", "mts"];
|
|
119657
|
+
const validEntrypoints = validFilenames.flatMap(
|
|
119658
|
+
(filename) => validExtensions.map((extension) => `${filename}.${extension}`)
|
|
119659
|
+
);
|
|
119660
|
+
for (const fnKey of unusedFunctions.values()) {
|
|
119661
|
+
if (validEntrypoints.includes(fnKey)) {
|
|
119662
|
+
unusedFunctions.delete(fnKey);
|
|
119663
|
+
}
|
|
119664
|
+
}
|
|
119665
|
+
}
|
|
119574
119666
|
if (unusedFunctions.size) {
|
|
119575
119667
|
const [fnKey] = Array.from(unusedFunctions);
|
|
119576
119668
|
return {
|
|
@@ -119887,7 +119979,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
119887
119979
|
});
|
|
119888
119980
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
|
119889
119981
|
var import_semver4 = __toESM4(require_semver2());
|
|
119890
|
-
var
|
|
119982
|
+
var import__101 = require_dist20();
|
|
119891
119983
|
async function detectFileSystemAPI2({
|
|
119892
119984
|
files,
|
|
119893
119985
|
projectSettings,
|
|
@@ -119953,7 +120045,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
119953
120045
|
};
|
|
119954
120046
|
}
|
|
119955
120047
|
const invalidBuilder = builders.find(({ use }) => {
|
|
119956
|
-
const valid = (0,
|
|
120048
|
+
const valid = (0, import__101.isOfficialRuntime)("go", use) || (0, import__101.isOfficialRuntime)("python", use) || (0, import__101.isOfficialRuntime)("ruby", use) || (0, import__101.isOfficialRuntime)("node", use) || (0, import__101.isOfficialRuntime)("next", use) || (0, import__101.isOfficialRuntime)("static", use) || (0, import__101.isOfficialRuntime)("static-build", use);
|
|
119957
120049
|
return !valid;
|
|
119958
120050
|
});
|
|
119959
120051
|
if (invalidBuilder) {
|
|
@@ -119966,7 +120058,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
119966
120058
|
for (const lang of ["go", "python", "ruby"]) {
|
|
119967
120059
|
for (const { use } of builders) {
|
|
119968
120060
|
const plugin = "vercel-plugin-" + lang;
|
|
119969
|
-
if ((0,
|
|
120061
|
+
if ((0, import__101.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
|
119970
120062
|
return {
|
|
119971
120063
|
metadata,
|
|
119972
120064
|
fsApiBuilder: null,
|
|
@@ -120023,7 +120115,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
120023
120115
|
}
|
|
120024
120116
|
}
|
|
120025
120117
|
const frontendBuilder = builders.find(
|
|
120026
|
-
({ use }) => (0,
|
|
120118
|
+
({ use }) => (0, import__101.isOfficialRuntime)("next", use) || (0, import__101.isOfficialRuntime)("static", use) || (0, import__101.isOfficialRuntime)("static-build", use)
|
|
120027
120119
|
);
|
|
120028
120120
|
const config2 = frontendBuilder?.config || {};
|
|
120029
120121
|
const withTag = tag ? `@${tag}` : "";
|
|
@@ -144616,7 +144708,7 @@ var init_unzip = __esm({
|
|
|
144616
144708
|
});
|
|
144617
144709
|
|
|
144618
144710
|
// src/util/build/write-build-result.ts
|
|
144619
|
-
async function writeBuildResult(repoRootPath, outputDir, buildResult, build2, builder, builderPkg, vercelConfig) {
|
|
144711
|
+
async function writeBuildResult(repoRootPath, outputDir, buildResult, build2, builder, builderPkg, vercelConfig, standalone = false) {
|
|
144620
144712
|
const { version: version2 } = builder;
|
|
144621
144713
|
if (typeof version2 !== "number" || version2 === 2) {
|
|
144622
144714
|
return writeBuildResultV2(
|
|
@@ -144624,7 +144716,8 @@ async function writeBuildResult(repoRootPath, outputDir, buildResult, build2, bu
|
|
|
144624
144716
|
outputDir,
|
|
144625
144717
|
buildResult,
|
|
144626
144718
|
build2,
|
|
144627
|
-
vercelConfig
|
|
144719
|
+
vercelConfig,
|
|
144720
|
+
standalone
|
|
144628
144721
|
);
|
|
144629
144722
|
} else if (version2 === 3) {
|
|
144630
144723
|
return writeBuildResultV3(
|
|
@@ -144632,7 +144725,8 @@ async function writeBuildResult(repoRootPath, outputDir, buildResult, build2, bu
|
|
|
144632
144725
|
outputDir,
|
|
144633
144726
|
buildResult,
|
|
144634
144727
|
build2,
|
|
144635
|
-
vercelConfig
|
|
144728
|
+
vercelConfig,
|
|
144729
|
+
standalone
|
|
144636
144730
|
);
|
|
144637
144731
|
}
|
|
144638
144732
|
throw new Error(
|
|
@@ -144655,7 +144749,7 @@ function isFile(v) {
|
|
|
144655
144749
|
function stripDuplicateSlashes(path11) {
|
|
144656
144750
|
return normalize2(path11).replace(/(^\/|\/$)/g, "");
|
|
144657
144751
|
}
|
|
144658
|
-
async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2, vercelConfig) {
|
|
144752
|
+
async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2, vercelConfig, standalone = false) {
|
|
144659
144753
|
if ("buildOutputPath" in buildResult) {
|
|
144660
144754
|
await mergeBuilderOutput(outputDir, buildResult);
|
|
144661
144755
|
return;
|
|
@@ -144678,7 +144772,8 @@ async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2,
|
|
|
144678
144772
|
output2,
|
|
144679
144773
|
normalizedPath,
|
|
144680
144774
|
void 0,
|
|
144681
|
-
existingFunctions
|
|
144775
|
+
existingFunctions,
|
|
144776
|
+
standalone
|
|
144682
144777
|
);
|
|
144683
144778
|
} else if (isPrerender(output2)) {
|
|
144684
144779
|
if (!output2.lambda) {
|
|
@@ -144692,7 +144787,8 @@ async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2,
|
|
|
144692
144787
|
output2.lambda,
|
|
144693
144788
|
normalizedPath,
|
|
144694
144789
|
void 0,
|
|
144695
|
-
existingFunctions
|
|
144790
|
+
existingFunctions,
|
|
144791
|
+
standalone
|
|
144696
144792
|
);
|
|
144697
144793
|
let fallback = output2.fallback;
|
|
144698
144794
|
if (fallback) {
|
|
@@ -144744,7 +144840,8 @@ async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2,
|
|
|
144744
144840
|
outputDir,
|
|
144745
144841
|
output2,
|
|
144746
144842
|
normalizedPath,
|
|
144747
|
-
existingFunctions
|
|
144843
|
+
existingFunctions,
|
|
144844
|
+
standalone
|
|
144748
144845
|
);
|
|
144749
144846
|
} else {
|
|
144750
144847
|
throw new Error(
|
|
@@ -144754,7 +144851,7 @@ async function writeBuildResultV2(repoRootPath, outputDir, buildResult, build2,
|
|
|
144754
144851
|
}
|
|
144755
144852
|
return Object.keys(overrides).length > 0 ? overrides : void 0;
|
|
144756
144853
|
}
|
|
144757
|
-
async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build2, vercelConfig) {
|
|
144854
|
+
async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build2, vercelConfig, standalone = false) {
|
|
144758
144855
|
const { output: output2 } = buildResult;
|
|
144759
144856
|
const src = build2.src;
|
|
144760
144857
|
if (typeof src !== "string") {
|
|
@@ -144774,10 +144871,19 @@ async function writeBuildResultV3(repoRootPath, outputDir, buildResult, build2,
|
|
|
144774
144871
|
outputDir,
|
|
144775
144872
|
output2,
|
|
144776
144873
|
path11,
|
|
144777
|
-
functionConfiguration
|
|
144874
|
+
functionConfiguration,
|
|
144875
|
+
void 0,
|
|
144876
|
+
standalone
|
|
144778
144877
|
);
|
|
144779
144878
|
} else if (isEdgeFunction(output2)) {
|
|
144780
|
-
await writeEdgeFunction(
|
|
144879
|
+
await writeEdgeFunction(
|
|
144880
|
+
repoRootPath,
|
|
144881
|
+
outputDir,
|
|
144882
|
+
output2,
|
|
144883
|
+
path11,
|
|
144884
|
+
void 0,
|
|
144885
|
+
standalone
|
|
144886
|
+
);
|
|
144781
144887
|
} else {
|
|
144782
144888
|
throw new Error(
|
|
144783
144889
|
`Unsupported output type: "${output2.type}" for ${build2.src}`
|
|
@@ -144828,7 +144934,7 @@ async function writeFunctionSymlink(outputDir, dest, fn2, existingFunctions) {
|
|
|
144828
144934
|
await import_fs_extra12.default.symlink(target, dest);
|
|
144829
144935
|
return true;
|
|
144830
144936
|
}
|
|
144831
|
-
async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path11, existingFunctions) {
|
|
144937
|
+
async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path11, existingFunctions, standalone = false) {
|
|
144832
144938
|
const dest = (0, import_path21.join)(outputDir, "functions", `${path11}.func`);
|
|
144833
144939
|
if (existingFunctions) {
|
|
144834
144940
|
if (await writeFunctionSymlink(
|
|
@@ -144843,11 +144949,17 @@ async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path11,
|
|
|
144843
144949
|
}
|
|
144844
144950
|
await import_fs_extra12.default.mkdirp(dest);
|
|
144845
144951
|
const ops = [];
|
|
144846
|
-
const
|
|
144952
|
+
const sharedDest = (0, import_path21.join)(outputDir, "shared");
|
|
144953
|
+
const { files, filePathMap, shared } = filesWithoutFsRefs(
|
|
144847
144954
|
edgeFunction.files,
|
|
144848
|
-
repoRootPath
|
|
144955
|
+
repoRootPath,
|
|
144956
|
+
sharedDest,
|
|
144957
|
+
standalone
|
|
144849
144958
|
);
|
|
144850
144959
|
ops.push((0, import_build_utils11.download)(files, dest));
|
|
144960
|
+
if (shared) {
|
|
144961
|
+
ops.push((0, import_build_utils11.download)(shared, sharedDest));
|
|
144962
|
+
}
|
|
144851
144963
|
const config2 = {
|
|
144852
144964
|
runtime: "edge",
|
|
144853
144965
|
...edgeFunction,
|
|
@@ -144864,7 +144976,7 @@ async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path11,
|
|
|
144864
144976
|
);
|
|
144865
144977
|
await Promise.all(ops);
|
|
144866
144978
|
}
|
|
144867
|
-
async function writeLambda(repoRootPath, outputDir, lambda, path11, functionConfiguration, existingFunctions) {
|
|
144979
|
+
async function writeLambda(repoRootPath, outputDir, lambda, path11, functionConfiguration, existingFunctions, standalone = false) {
|
|
144868
144980
|
const dest = (0, import_path21.join)(outputDir, "functions", `${path11}.func`);
|
|
144869
144981
|
if (existingFunctions) {
|
|
144870
144982
|
if (await writeFunctionSymlink(outputDir, dest, lambda, existingFunctions)) {
|
|
@@ -144876,9 +144988,18 @@ async function writeLambda(repoRootPath, outputDir, lambda, path11, functionConf
|
|
|
144876
144988
|
const ops = [];
|
|
144877
144989
|
let filePathMap;
|
|
144878
144990
|
if (lambda.files) {
|
|
144879
|
-
const
|
|
144991
|
+
const sharedDest = (0, import_path21.join)(outputDir, "shared");
|
|
144992
|
+
const f = filesWithoutFsRefs(
|
|
144993
|
+
lambda.files,
|
|
144994
|
+
repoRootPath,
|
|
144995
|
+
sharedDest,
|
|
144996
|
+
standalone
|
|
144997
|
+
);
|
|
144880
144998
|
filePathMap = f.filePathMap;
|
|
144881
144999
|
ops.push((0, import_build_utils11.download)(f.files, dest));
|
|
145000
|
+
if (f.shared) {
|
|
145001
|
+
ops.push((0, import_build_utils11.download)(f.shared, sharedDest));
|
|
145002
|
+
}
|
|
144882
145003
|
} else if (lambda.zipBuffer) {
|
|
144883
145004
|
ops.push(unzip(lambda.zipBuffer, dest));
|
|
144884
145005
|
} else {
|
|
@@ -144970,21 +145091,29 @@ async function* findDirs(name, dir, root = dir) {
|
|
|
144970
145091
|
}
|
|
144971
145092
|
}
|
|
144972
145093
|
}
|
|
144973
|
-
function filesWithoutFsRefs(files, repoRootPath) {
|
|
145094
|
+
function filesWithoutFsRefs(files, repoRootPath, sharedDest, standalone) {
|
|
144974
145095
|
let filePathMap;
|
|
144975
145096
|
const out = {};
|
|
145097
|
+
const shared = {};
|
|
144976
145098
|
for (const [path11, file] of Object.entries(files)) {
|
|
144977
145099
|
if (file.type === "FileFsRef") {
|
|
144978
145100
|
if (!filePathMap)
|
|
144979
145101
|
filePathMap = {};
|
|
144980
|
-
|
|
144981
|
-
|
|
144982
|
-
|
|
145102
|
+
if (standalone && sharedDest) {
|
|
145103
|
+
shared[path11] = file;
|
|
145104
|
+
filePathMap[(0, import_build_utils11.normalizePath)((0, import_path21.join)(sharedDest, path11))] = (0, import_build_utils11.normalizePath)(
|
|
145105
|
+
(0, import_path21.relative)(repoRootPath, (0, import_path21.join)(sharedDest, file.fsPath))
|
|
145106
|
+
);
|
|
145107
|
+
} else {
|
|
145108
|
+
filePathMap[(0, import_build_utils11.normalizePath)(path11)] = (0, import_build_utils11.normalizePath)(
|
|
145109
|
+
(0, import_path21.relative)(repoRootPath, file.fsPath)
|
|
145110
|
+
);
|
|
145111
|
+
}
|
|
144983
145112
|
} else {
|
|
144984
145113
|
out[path11] = file;
|
|
144985
145114
|
}
|
|
144986
145115
|
}
|
|
144987
|
-
return { files: out, filePathMap };
|
|
145116
|
+
return { files: out, filePathMap, shared };
|
|
144988
145117
|
}
|
|
144989
145118
|
var import_fs_extra12, import_mime_types, import_path21, import_build_utils11, import_promisepipe2, import_client3, normalize2, OUTPUT_DIR;
|
|
144990
145119
|
var init_write_build_result = __esm({
|
|
@@ -145252,6 +145381,11 @@ var init_build = __esm({
|
|
|
145252
145381
|
this.trackCliFlag("yes");
|
|
145253
145382
|
}
|
|
145254
145383
|
}
|
|
145384
|
+
trackCliFlagStandalone(flag) {
|
|
145385
|
+
if (flag) {
|
|
145386
|
+
this.trackCliFlag("standalone");
|
|
145387
|
+
}
|
|
145388
|
+
}
|
|
145255
145389
|
};
|
|
145256
145390
|
}
|
|
145257
145391
|
});
|
|
@@ -146627,6 +146761,7 @@ async function main3(client2) {
|
|
|
146627
146761
|
flags: parsedArgs.flags
|
|
146628
146762
|
}) || "preview";
|
|
146629
146763
|
const yes = Boolean(parsedArgs.flags["--yes"]);
|
|
146764
|
+
const standalone = process.env.VERCEL_EXPERIMENTAL_STANDALONE_BUILD === "1";
|
|
146630
146765
|
try {
|
|
146631
146766
|
await (0, import_build_utils13.validateNpmrc)(cwd);
|
|
146632
146767
|
} catch (err) {
|
|
@@ -146733,7 +146868,7 @@ async function main3(client2) {
|
|
|
146733
146868
|
process.env.NOW_BUILDER = "1";
|
|
146734
146869
|
try {
|
|
146735
146870
|
await rootSpan.child("vc.doBuild").trace(
|
|
146736
|
-
(span) => doBuild(client2, project, buildsJson, cwd, outputDir, span)
|
|
146871
|
+
(span) => doBuild(client2, project, buildsJson, cwd, outputDir, span, standalone)
|
|
146737
146872
|
);
|
|
146738
146873
|
} finally {
|
|
146739
146874
|
await rootSpan.stop();
|
|
@@ -146766,7 +146901,7 @@ async function main3(client2) {
|
|
|
146766
146901
|
}
|
|
146767
146902
|
}
|
|
146768
146903
|
}
|
|
146769
|
-
async function doBuild(client2, project, buildsJson, cwd, outputDir, span) {
|
|
146904
|
+
async function doBuild(client2, project, buildsJson, cwd, outputDir, span, standalone = false) {
|
|
146770
146905
|
const { localConfigPath } = client2;
|
|
146771
146906
|
const workPath = (0, import_path27.join)(cwd, project.settings.rootDirectory || ".");
|
|
146772
146907
|
const [pkg, vercelConfig, nowConfig, hasInstrumentation] = await Promise.all([
|
|
@@ -147002,7 +147137,8 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span) {
|
|
|
147002
147137
|
build2,
|
|
147003
147138
|
builder,
|
|
147004
147139
|
builderPkg,
|
|
147005
|
-
localConfig
|
|
147140
|
+
localConfig,
|
|
147141
|
+
standalone
|
|
147006
147142
|
)
|
|
147007
147143
|
).then(
|
|
147008
147144
|
(override) => {
|
|
@@ -150958,7 +151094,8 @@ ${err.stack}`);
|
|
|
150958
151094
|
printError(err);
|
|
150959
151095
|
return 1;
|
|
150960
151096
|
}
|
|
150961
|
-
const
|
|
151097
|
+
const { isAgent } = await (0, import_detect_agent.determineAgent)();
|
|
151098
|
+
const guidanceMode = parsedArguments.flags["--guidance"] ?? isAgent;
|
|
150962
151099
|
return printDeploymentStatus(deployment, deployStamp, noWait, guidanceMode);
|
|
150963
151100
|
};
|
|
150964
151101
|
addProcessEnv = async (log2, env) => {
|
|
@@ -174290,7 +174427,8 @@ async function add4(client2, argv) {
|
|
|
174290
174427
|
)}
|
|
174291
174428
|
`
|
|
174292
174429
|
);
|
|
174293
|
-
const
|
|
174430
|
+
const { isAgent } = await (0, import_detect_agent2.determineAgent)();
|
|
174431
|
+
const guidanceMode = parsedArgs.flags["--guidance"] ?? isAgent;
|
|
174294
174432
|
if (guidanceMode) {
|
|
174295
174433
|
suggestNextCommands([getCommandName(`env ls`), getCommandName(`env pull`)]);
|
|
174296
174434
|
}
|
|
@@ -174475,7 +174613,8 @@ async function ls5(client2, argv) {
|
|
|
174475
174613
|
client2.stdout.write(`${getTable(link4, envs, customEnvs)}
|
|
174476
174614
|
`);
|
|
174477
174615
|
}
|
|
174478
|
-
const
|
|
174616
|
+
const { isAgent } = await (0, import_detect_agent3.determineAgent)();
|
|
174617
|
+
const guidanceMode = parsedArgs.flags["--guidance"] ?? isAgent;
|
|
174479
174618
|
if (guidanceMode) {
|
|
174480
174619
|
suggestNextCommands([
|
|
174481
174620
|
getCommandName(`env add`),
|
|
@@ -174734,6 +174873,294 @@ var init_rm8 = __esm({
|
|
|
174734
174873
|
}
|
|
174735
174874
|
});
|
|
174736
174875
|
|
|
174876
|
+
// src/util/env/update-env-record.ts
|
|
174877
|
+
async function updateEnvRecord(client2, projectId, envId, type, key, value, targets, gitBranch) {
|
|
174878
|
+
output_manager_default.debug(
|
|
174879
|
+
`Updating ${type} Environment Variable ${key} in ${targets.length} targets`
|
|
174880
|
+
);
|
|
174881
|
+
const target = [];
|
|
174882
|
+
const customEnvironmentIds = [];
|
|
174883
|
+
for (const t of targets) {
|
|
174884
|
+
const arr = import_constants7.PROJECT_ENV_TARGET.includes(t) ? target : customEnvironmentIds;
|
|
174885
|
+
arr.push(t);
|
|
174886
|
+
}
|
|
174887
|
+
const body = {
|
|
174888
|
+
type,
|
|
174889
|
+
key,
|
|
174890
|
+
value,
|
|
174891
|
+
target,
|
|
174892
|
+
customEnvironmentIds: customEnvironmentIds.length > 0 ? customEnvironmentIds : void 0,
|
|
174893
|
+
gitBranch: gitBranch || void 0
|
|
174894
|
+
};
|
|
174895
|
+
const url3 = `/v10/projects/${projectId}/env/${envId}`;
|
|
174896
|
+
await client2.fetch(url3, {
|
|
174897
|
+
method: "PATCH",
|
|
174898
|
+
body
|
|
174899
|
+
});
|
|
174900
|
+
}
|
|
174901
|
+
var import_constants7;
|
|
174902
|
+
var init_update_env_record = __esm({
|
|
174903
|
+
"src/util/env/update-env-record.ts"() {
|
|
174904
|
+
"use strict";
|
|
174905
|
+
import_constants7 = __toESM3(require_dist4());
|
|
174906
|
+
init_output_manager();
|
|
174907
|
+
}
|
|
174908
|
+
});
|
|
174909
|
+
|
|
174910
|
+
// src/util/telemetry/commands/env/update.ts
|
|
174911
|
+
var EnvUpdateTelemetryClient;
|
|
174912
|
+
var init_update = __esm({
|
|
174913
|
+
"src/util/telemetry/commands/env/update.ts"() {
|
|
174914
|
+
"use strict";
|
|
174915
|
+
init_telemetry();
|
|
174916
|
+
init_standard_environments();
|
|
174917
|
+
EnvUpdateTelemetryClient = class extends TelemetryClient {
|
|
174918
|
+
trackCliArgumentName(name) {
|
|
174919
|
+
if (name) {
|
|
174920
|
+
this.trackCliArgument({
|
|
174921
|
+
arg: "name",
|
|
174922
|
+
value: this.redactedValue
|
|
174923
|
+
});
|
|
174924
|
+
}
|
|
174925
|
+
}
|
|
174926
|
+
trackCliArgumentEnvironment(environment) {
|
|
174927
|
+
if (environment) {
|
|
174928
|
+
this.trackCliArgument({
|
|
174929
|
+
arg: "environment",
|
|
174930
|
+
value: STANDARD_ENVIRONMENTS.includes(
|
|
174931
|
+
environment
|
|
174932
|
+
) ? environment : this.redactedValue
|
|
174933
|
+
});
|
|
174934
|
+
}
|
|
174935
|
+
}
|
|
174936
|
+
trackCliArgumentGitBranch(gitBranch) {
|
|
174937
|
+
if (gitBranch) {
|
|
174938
|
+
this.trackCliArgument({
|
|
174939
|
+
arg: "git-branch",
|
|
174940
|
+
value: this.redactedValue
|
|
174941
|
+
});
|
|
174942
|
+
}
|
|
174943
|
+
}
|
|
174944
|
+
trackCliFlagSensitive(sensitive) {
|
|
174945
|
+
if (sensitive) {
|
|
174946
|
+
this.trackCliFlag("sensitive");
|
|
174947
|
+
}
|
|
174948
|
+
}
|
|
174949
|
+
trackCliFlagYes(yes) {
|
|
174950
|
+
if (yes) {
|
|
174951
|
+
this.trackCliFlag("yes");
|
|
174952
|
+
}
|
|
174953
|
+
}
|
|
174954
|
+
};
|
|
174955
|
+
}
|
|
174956
|
+
});
|
|
174957
|
+
|
|
174958
|
+
// src/commands/env/update.ts
|
|
174959
|
+
async function update(client2, argv) {
|
|
174960
|
+
let parsedArgs;
|
|
174961
|
+
const flagsSpecification = getFlagsSpecification(updateSubcommand.options);
|
|
174962
|
+
try {
|
|
174963
|
+
parsedArgs = parseArguments(argv, flagsSpecification);
|
|
174964
|
+
} catch (err) {
|
|
174965
|
+
printError(err);
|
|
174966
|
+
return 1;
|
|
174967
|
+
}
|
|
174968
|
+
const { args: args2, flags: opts } = parsedArgs;
|
|
174969
|
+
const stdInput = await readStandardInput(client2.stdin);
|
|
174970
|
+
let [envName, envTargetArg, envGitBranch] = args2;
|
|
174971
|
+
const telemetryClient = new EnvUpdateTelemetryClient({
|
|
174972
|
+
opts: {
|
|
174973
|
+
store: client2.telemetryEventStore
|
|
174974
|
+
}
|
|
174975
|
+
});
|
|
174976
|
+
telemetryClient.trackCliArgumentName(envName);
|
|
174977
|
+
telemetryClient.trackCliArgumentEnvironment(envTargetArg);
|
|
174978
|
+
telemetryClient.trackCliArgumentGitBranch(envGitBranch);
|
|
174979
|
+
telemetryClient.trackCliFlagSensitive(opts["--sensitive"]);
|
|
174980
|
+
telemetryClient.trackCliFlagYes(opts["--yes"]);
|
|
174981
|
+
if (args2.length > 3) {
|
|
174982
|
+
output_manager_default.error(
|
|
174983
|
+
`Invalid number of arguments. Usage: ${getCommandName(
|
|
174984
|
+
`env update <name> ${getEnvTargetPlaceholder()} <gitbranch>`
|
|
174985
|
+
)}`
|
|
174986
|
+
);
|
|
174987
|
+
return 1;
|
|
174988
|
+
}
|
|
174989
|
+
if (stdInput && (!envName || !envTargetArg)) {
|
|
174990
|
+
output_manager_default.error(
|
|
174991
|
+
`Invalid number of arguments. Usage: ${getCommandName(
|
|
174992
|
+
`env update <name> <target> <gitbranch> < <file>`
|
|
174993
|
+
)}`
|
|
174994
|
+
);
|
|
174995
|
+
return 1;
|
|
174996
|
+
}
|
|
174997
|
+
const envTargets = [];
|
|
174998
|
+
if (envTargetArg) {
|
|
174999
|
+
envTargets.push(envTargetArg);
|
|
175000
|
+
}
|
|
175001
|
+
if (!envName) {
|
|
175002
|
+
envName = await client2.input.text({
|
|
175003
|
+
message: `What's the name of the variable to update?`,
|
|
175004
|
+
validate: (val) => val ? true : "Name cannot be empty"
|
|
175005
|
+
});
|
|
175006
|
+
}
|
|
175007
|
+
const link4 = await getLinkedProject(client2);
|
|
175008
|
+
if (link4.status === "error") {
|
|
175009
|
+
return link4.exitCode;
|
|
175010
|
+
} else if (link4.status === "not_linked") {
|
|
175011
|
+
output_manager_default.error(
|
|
175012
|
+
`Your codebase isn't linked to a project on Vercel. Run ${getCommandName(
|
|
175013
|
+
"link"
|
|
175014
|
+
)} to begin.`
|
|
175015
|
+
);
|
|
175016
|
+
return 1;
|
|
175017
|
+
}
|
|
175018
|
+
client2.config.currentTeam = link4.org.type === "team" ? link4.org.id : void 0;
|
|
175019
|
+
const { project } = link4;
|
|
175020
|
+
const [{ envs }, customEnvironments] = await Promise.all([
|
|
175021
|
+
getEnvRecords(client2, project.id, "vercel-cli:env:update"),
|
|
175022
|
+
getCustomEnvironments(client2, project.id)
|
|
175023
|
+
]);
|
|
175024
|
+
const matchingEnvs = envs.filter((r) => r.key === envName);
|
|
175025
|
+
if (matchingEnvs.length === 0) {
|
|
175026
|
+
output_manager_default.error(
|
|
175027
|
+
`The variable ${param(envName)} was not found. Run ${getCommandName(
|
|
175028
|
+
`env ls`
|
|
175029
|
+
)} to see all available Environment Variables.`
|
|
175030
|
+
);
|
|
175031
|
+
return 1;
|
|
175032
|
+
}
|
|
175033
|
+
let selectedEnv;
|
|
175034
|
+
if (envTargetArg || envGitBranch) {
|
|
175035
|
+
const filteredEnvs = matchingEnvs.filter((env) => {
|
|
175036
|
+
const matchesTarget = !envTargetArg || (Array.isArray(env.target) ? env.target.includes(envTargetArg) : env.target === envTargetArg) || env.customEnvironmentIds && env.customEnvironmentIds.includes(envTargetArg);
|
|
175037
|
+
const matchesGitBranch = !envGitBranch || env.gitBranch === envGitBranch;
|
|
175038
|
+
return matchesTarget && matchesGitBranch;
|
|
175039
|
+
});
|
|
175040
|
+
if (filteredEnvs.length === 0) {
|
|
175041
|
+
output_manager_default.error(
|
|
175042
|
+
`No Environment Variable ${param(envName)} found matching the specified criteria.`
|
|
175043
|
+
);
|
|
175044
|
+
return 1;
|
|
175045
|
+
}
|
|
175046
|
+
if (filteredEnvs.length === 1) {
|
|
175047
|
+
selectedEnv = filteredEnvs[0];
|
|
175048
|
+
} else {
|
|
175049
|
+
const choices = filteredEnvs.map((env, index) => {
|
|
175050
|
+
const targets2 = formatEnvironments(link4, env, customEnvironments);
|
|
175051
|
+
return {
|
|
175052
|
+
name: targets2,
|
|
175053
|
+
value: index
|
|
175054
|
+
};
|
|
175055
|
+
});
|
|
175056
|
+
const selectedIndex = await client2.input.select({
|
|
175057
|
+
message: `Multiple Environment Variables found for ${param(envName)}. Which one do you want to update?`,
|
|
175058
|
+
choices
|
|
175059
|
+
});
|
|
175060
|
+
selectedEnv = filteredEnvs[selectedIndex];
|
|
175061
|
+
}
|
|
175062
|
+
} else if (matchingEnvs.length === 1) {
|
|
175063
|
+
selectedEnv = matchingEnvs[0];
|
|
175064
|
+
} else {
|
|
175065
|
+
const choices = matchingEnvs.map((env, index) => {
|
|
175066
|
+
const targets2 = formatEnvironments(link4, env, customEnvironments);
|
|
175067
|
+
return {
|
|
175068
|
+
name: targets2,
|
|
175069
|
+
value: index
|
|
175070
|
+
};
|
|
175071
|
+
});
|
|
175072
|
+
const selectedIndex = await client2.input.select({
|
|
175073
|
+
message: `Multiple Environment Variables found for ${param(envName)}. Which one do you want to update?`,
|
|
175074
|
+
choices
|
|
175075
|
+
});
|
|
175076
|
+
selectedEnv = matchingEnvs[selectedIndex];
|
|
175077
|
+
}
|
|
175078
|
+
let envValue;
|
|
175079
|
+
if (stdInput) {
|
|
175080
|
+
envValue = stdInput;
|
|
175081
|
+
} else {
|
|
175082
|
+
envValue = await client2.input.text({
|
|
175083
|
+
message: `What's the new value of ${envName}?`
|
|
175084
|
+
});
|
|
175085
|
+
}
|
|
175086
|
+
if (!opts["--yes"]) {
|
|
175087
|
+
const currentTargets = formatEnvironments(
|
|
175088
|
+
link4,
|
|
175089
|
+
selectedEnv,
|
|
175090
|
+
customEnvironments
|
|
175091
|
+
);
|
|
175092
|
+
const confirmed = await client2.input.confirm(
|
|
175093
|
+
`Updating Environment Variable ${param(envName)} in ${currentTargets} in Project ${import_chalk93.default.bold(project.name)}. Are you sure?`,
|
|
175094
|
+
false
|
|
175095
|
+
);
|
|
175096
|
+
if (!confirmed) {
|
|
175097
|
+
output_manager_default.log("Canceled");
|
|
175098
|
+
return 0;
|
|
175099
|
+
}
|
|
175100
|
+
}
|
|
175101
|
+
const type = opts["--sensitive"] ? "sensitive" : selectedEnv.type;
|
|
175102
|
+
const targets = Array.isArray(selectedEnv.target) ? selectedEnv.target : [selectedEnv.target].filter(
|
|
175103
|
+
(r) => Boolean(r)
|
|
175104
|
+
);
|
|
175105
|
+
const allTargets = [...targets, ...selectedEnv.customEnvironmentIds || []];
|
|
175106
|
+
const updateStamp = stamp_default();
|
|
175107
|
+
try {
|
|
175108
|
+
output_manager_default.spinner("Updating");
|
|
175109
|
+
await updateEnvRecord(
|
|
175110
|
+
client2,
|
|
175111
|
+
project.id,
|
|
175112
|
+
selectedEnv.id,
|
|
175113
|
+
type,
|
|
175114
|
+
envName,
|
|
175115
|
+
envValue,
|
|
175116
|
+
allTargets,
|
|
175117
|
+
selectedEnv.gitBranch || ""
|
|
175118
|
+
);
|
|
175119
|
+
} catch (err) {
|
|
175120
|
+
if (isAPIError(err) && isKnownError(err)) {
|
|
175121
|
+
output_manager_default.error(err.serverMessage);
|
|
175122
|
+
return 1;
|
|
175123
|
+
}
|
|
175124
|
+
throw err;
|
|
175125
|
+
}
|
|
175126
|
+
output_manager_default.print(
|
|
175127
|
+
`${prependEmoji(
|
|
175128
|
+
`Updated Environment Variable ${import_chalk93.default.bold(envName)} in Project ${import_chalk93.default.bold(
|
|
175129
|
+
project.name
|
|
175130
|
+
)} ${import_chalk93.default.gray(updateStamp())}`,
|
|
175131
|
+
emoji("success")
|
|
175132
|
+
)}
|
|
175133
|
+
`
|
|
175134
|
+
);
|
|
175135
|
+
return 0;
|
|
175136
|
+
}
|
|
175137
|
+
var import_chalk93;
|
|
175138
|
+
var init_update2 = __esm({
|
|
175139
|
+
"src/commands/env/update.ts"() {
|
|
175140
|
+
"use strict";
|
|
175141
|
+
import_chalk93 = __toESM3(require_source());
|
|
175142
|
+
init_stamp();
|
|
175143
|
+
init_update_env_record();
|
|
175144
|
+
init_get_env_records();
|
|
175145
|
+
init_env_target();
|
|
175146
|
+
init_read_standard_input();
|
|
175147
|
+
init_param();
|
|
175148
|
+
init_emoji();
|
|
175149
|
+
init_known_error();
|
|
175150
|
+
init_format_environments();
|
|
175151
|
+
init_pkg_name();
|
|
175152
|
+
init_errors_ts();
|
|
175153
|
+
init_get_custom_environments();
|
|
175154
|
+
init_output_manager();
|
|
175155
|
+
init_update();
|
|
175156
|
+
init_get_args();
|
|
175157
|
+
init_get_flags_specification();
|
|
175158
|
+
init_error2();
|
|
175159
|
+
init_command10();
|
|
175160
|
+
init_link2();
|
|
175161
|
+
}
|
|
175162
|
+
});
|
|
175163
|
+
|
|
174737
175164
|
// src/util/telemetry/commands/env/index.ts
|
|
174738
175165
|
var EnvTelemetryClient;
|
|
174739
175166
|
var init_env = __esm({
|
|
@@ -174765,6 +175192,12 @@ var init_env = __esm({
|
|
|
174765
175192
|
value: actual
|
|
174766
175193
|
});
|
|
174767
175194
|
}
|
|
175195
|
+
trackCliSubcommandUpdate(actual) {
|
|
175196
|
+
this.trackCliSubcommand({
|
|
175197
|
+
subcommand: "update",
|
|
175198
|
+
value: actual
|
|
175199
|
+
});
|
|
175200
|
+
}
|
|
174768
175201
|
};
|
|
174769
175202
|
}
|
|
174770
175203
|
});
|
|
@@ -174839,6 +175272,14 @@ async function main8(client2) {
|
|
|
174839
175272
|
}
|
|
174840
175273
|
telemetry2.trackCliSubcommandPull(subcommandOriginal);
|
|
174841
175274
|
return pull(client2, args2);
|
|
175275
|
+
case "update":
|
|
175276
|
+
if (needHelp) {
|
|
175277
|
+
telemetry2.trackCliFlagHelp("env", subcommandOriginal);
|
|
175278
|
+
printHelp(updateSubcommand);
|
|
175279
|
+
return 2;
|
|
175280
|
+
}
|
|
175281
|
+
telemetry2.trackCliSubcommandUpdate(subcommandOriginal);
|
|
175282
|
+
return update(client2, args2);
|
|
174842
175283
|
default:
|
|
174843
175284
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG9));
|
|
174844
175285
|
output_manager_default.print(help(envCommand, { columns: client2.stderr.columns }));
|
|
@@ -174858,6 +175299,7 @@ var init_env2 = __esm({
|
|
|
174858
175299
|
init_ls9();
|
|
174859
175300
|
init_pull2();
|
|
174860
175301
|
init_rm8();
|
|
175302
|
+
init_update2();
|
|
174861
175303
|
init_command10();
|
|
174862
175304
|
init_get_flags_specification();
|
|
174863
175305
|
init_output_manager();
|
|
@@ -174867,7 +175309,8 @@ var init_env2 = __esm({
|
|
|
174867
175309
|
ls: getCommandAliases(listSubcommand5),
|
|
174868
175310
|
add: getCommandAliases(addSubcommand4),
|
|
174869
175311
|
rm: getCommandAliases(removeSubcommand5),
|
|
174870
|
-
pull: getCommandAliases(pullSubcommand)
|
|
175312
|
+
pull: getCommandAliases(pullSubcommand),
|
|
175313
|
+
update: getCommandAliases(updateSubcommand)
|
|
174871
175314
|
};
|
|
174872
175315
|
}
|
|
174873
175316
|
});
|
|
@@ -174927,7 +175370,7 @@ async function connect(client2, argv) {
|
|
|
174927
175370
|
const confirm = Boolean(opts["--yes"]);
|
|
174928
175371
|
if (args2.length > 1) {
|
|
174929
175372
|
output_manager_default.error(
|
|
174930
|
-
`Invalid number of arguments. Usage: ${
|
|
175373
|
+
`Invalid number of arguments. Usage: ${import_chalk94.default.cyan(
|
|
174931
175374
|
`${getCommandName("project connect")}`
|
|
174932
175375
|
)}`
|
|
174933
175376
|
);
|
|
@@ -174974,7 +175417,7 @@ async function connect(client2, argv) {
|
|
|
174974
175417
|
}
|
|
174975
175418
|
if (!gitConfig) {
|
|
174976
175419
|
output_manager_default.error(
|
|
174977
|
-
`No local Git repository found. Run ${
|
|
175420
|
+
`No local Git repository found. Run ${import_chalk94.default.cyan(
|
|
174978
175421
|
"`git clone <url>`"
|
|
174979
175422
|
)} to clone a remote Git repository first.`
|
|
174980
175423
|
);
|
|
@@ -174983,7 +175426,7 @@ async function connect(client2, argv) {
|
|
|
174983
175426
|
const remoteUrls = pluckRemoteUrls(gitConfig);
|
|
174984
175427
|
if (!remoteUrls) {
|
|
174985
175428
|
output_manager_default.error(
|
|
174986
|
-
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${
|
|
175429
|
+
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${import_chalk94.default.cyan(
|
|
174987
175430
|
"`git remote --help`"
|
|
174988
175431
|
)} for more details.`
|
|
174989
175432
|
);
|
|
@@ -175101,7 +175544,7 @@ async function promptConnectArg({
|
|
|
175101
175544
|
return true;
|
|
175102
175545
|
}
|
|
175103
175546
|
output_manager_default.log(
|
|
175104
|
-
`Found a repository in your local Git Config: ${
|
|
175547
|
+
`Found a repository in your local Git Config: ${import_chalk94.default.cyan(
|
|
175105
175548
|
Object.values(remoteUrls)[0]
|
|
175106
175549
|
)}`
|
|
175107
175550
|
);
|
|
@@ -175119,11 +175562,11 @@ async function promptConnectArg({
|
|
|
175119
175562
|
}
|
|
175120
175563
|
return shouldConnect;
|
|
175121
175564
|
}
|
|
175122
|
-
var
|
|
175565
|
+
var import_chalk94, import_path39;
|
|
175123
175566
|
var init_connect2 = __esm({
|
|
175124
175567
|
"src/commands/git/connect.ts"() {
|
|
175125
175568
|
"use strict";
|
|
175126
|
-
|
|
175569
|
+
import_chalk94 = __toESM3(require_source());
|
|
175127
175570
|
import_path39 = require("path");
|
|
175128
175571
|
init_create_git_meta();
|
|
175129
175572
|
init_link();
|
|
@@ -175186,7 +175629,7 @@ async function disconnect(client2, argv) {
|
|
|
175186
175629
|
}
|
|
175187
175630
|
if (args2.length !== 0) {
|
|
175188
175631
|
output_manager_default.error(
|
|
175189
|
-
`Invalid number of arguments. Usage: ${
|
|
175632
|
+
`Invalid number of arguments. Usage: ${import_chalk95.default.cyan(
|
|
175190
175633
|
`${getCommandName("project disconnect")}`
|
|
175191
175634
|
)}`
|
|
175192
175635
|
);
|
|
@@ -175208,14 +175651,14 @@ async function disconnect(client2, argv) {
|
|
|
175208
175651
|
`
|
|
175209
175652
|
);
|
|
175210
175653
|
const confirmDisconnect = autoConfirm || await client2.input.confirm(
|
|
175211
|
-
`Are you sure you want to disconnect ${
|
|
175654
|
+
`Are you sure you want to disconnect ${import_chalk95.default.cyan(
|
|
175212
175655
|
`${linkOrg}/${repo}`
|
|
175213
175656
|
)} from your project?`,
|
|
175214
175657
|
false
|
|
175215
175658
|
);
|
|
175216
175659
|
if (confirmDisconnect) {
|
|
175217
175660
|
await disconnectGitProvider(client2, org, project.id);
|
|
175218
|
-
output_manager_default.log(`Disconnected ${
|
|
175661
|
+
output_manager_default.log(`Disconnected ${import_chalk95.default.cyan(`${linkOrg}/${repo}`)}.`);
|
|
175219
175662
|
} else {
|
|
175220
175663
|
output_manager_default.log("Canceled");
|
|
175221
175664
|
}
|
|
@@ -175229,11 +175672,11 @@ async function disconnect(client2, argv) {
|
|
|
175229
175672
|
}
|
|
175230
175673
|
return 0;
|
|
175231
175674
|
}
|
|
175232
|
-
var
|
|
175675
|
+
var import_chalk95;
|
|
175233
175676
|
var init_disconnect2 = __esm({
|
|
175234
175677
|
"src/commands/git/disconnect.ts"() {
|
|
175235
175678
|
"use strict";
|
|
175236
|
-
|
|
175679
|
+
import_chalk95 = __toESM3(require_source());
|
|
175237
175680
|
init_pkg_name();
|
|
175238
175681
|
init_connect_git_provider();
|
|
175239
175682
|
init_output_manager();
|
|
@@ -175337,17 +175780,17 @@ var init_git2 = __esm({
|
|
|
175337
175780
|
// src/commands/guidance/status.ts
|
|
175338
175781
|
async function status(client2) {
|
|
175339
175782
|
const enabled = client2.config.guidance?.enabled !== false;
|
|
175340
|
-
const status3 = enabled ?
|
|
175783
|
+
const status3 = enabled ? import_chalk96.default.green("Enabled") : import_chalk96.default.red("Disabled");
|
|
175341
175784
|
output_manager_default.print("\n");
|
|
175342
|
-
output_manager_default.log(`${
|
|
175785
|
+
output_manager_default.log(`${import_chalk96.default.bold("Guidance status")}: ${status3}`);
|
|
175343
175786
|
output_manager_default.print("\n");
|
|
175344
175787
|
return 0;
|
|
175345
175788
|
}
|
|
175346
|
-
var
|
|
175789
|
+
var import_chalk96;
|
|
175347
175790
|
var init_status = __esm({
|
|
175348
175791
|
"src/commands/guidance/status.ts"() {
|
|
175349
175792
|
"use strict";
|
|
175350
|
-
|
|
175793
|
+
import_chalk96 = __toESM3(require_source());
|
|
175351
175794
|
init_output_manager();
|
|
175352
175795
|
}
|
|
175353
175796
|
});
|
|
@@ -175705,9 +176148,9 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
|
175705
176148
|
extractor.on("finish", resolve13);
|
|
175706
176149
|
res.body.pipe(extractor);
|
|
175707
176150
|
});
|
|
175708
|
-
const successLog = `Initialized "${
|
|
176151
|
+
const successLog = `Initialized "${import_chalk97.default.bold(
|
|
175709
176152
|
name
|
|
175710
|
-
)}" example in ${
|
|
176153
|
+
)}" example in ${import_chalk97.default.bold(humanizePath(folder))}.`;
|
|
175711
176154
|
const folderRel = import_node_path4.default.relative(client2.cwd, folder);
|
|
175712
176155
|
const deployHint = folderRel === "" ? list_item_default(`To deploy, run ${getCommandName()}.`) : list_item_default(
|
|
175713
176156
|
`To deploy, ${cmd(
|
|
@@ -175727,14 +176170,14 @@ function prepareFolder(cwd, folder, force) {
|
|
|
175727
176170
|
if (import_node_fs2.default.existsSync(dest)) {
|
|
175728
176171
|
if (!import_node_fs2.default.lstatSync(dest).isDirectory()) {
|
|
175729
176172
|
throw new Error(
|
|
175730
|
-
`Destination path "${
|
|
176173
|
+
`Destination path "${import_chalk97.default.bold(
|
|
175731
176174
|
folder
|
|
175732
176175
|
)}" already exists and is not a directory.`
|
|
175733
176176
|
);
|
|
175734
176177
|
}
|
|
175735
176178
|
if (!force && import_node_fs2.default.readdirSync(dest).length !== 0) {
|
|
175736
176179
|
throw new Error(
|
|
175737
|
-
`Destination path "${
|
|
176180
|
+
`Destination path "${import_chalk97.default.bold(
|
|
175738
176181
|
folder
|
|
175739
176182
|
)}" already exists and is not an empty directory. You may use ${cmd(
|
|
175740
176183
|
"--force"
|
|
@@ -175745,14 +176188,14 @@ function prepareFolder(cwd, folder, force) {
|
|
|
175745
176188
|
try {
|
|
175746
176189
|
import_node_fs2.default.mkdirSync(dest);
|
|
175747
176190
|
} catch (e2) {
|
|
175748
|
-
throw new Error(`Could not create directory "${
|
|
176191
|
+
throw new Error(`Could not create directory "${import_chalk97.default.bold(folder)}".`);
|
|
175749
176192
|
}
|
|
175750
176193
|
}
|
|
175751
176194
|
return dest;
|
|
175752
176195
|
}
|
|
175753
176196
|
async function guess(client2, exampleList, name) {
|
|
175754
176197
|
const GuessError = new Error(
|
|
175755
|
-
`No example found for ${
|
|
176198
|
+
`No example found for ${import_chalk97.default.bold(name)}, run ${getCommandName(
|
|
175756
176199
|
"init"
|
|
175757
176200
|
)} to see the list of available examples.`
|
|
175758
176201
|
);
|
|
@@ -175761,21 +176204,21 @@ async function guess(client2, exampleList, name) {
|
|
|
175761
176204
|
}
|
|
175762
176205
|
const found = did_you_mean_default(name, exampleList, 0.7);
|
|
175763
176206
|
if (typeof found === "string") {
|
|
175764
|
-
if (await client2.input.confirm(`Did you mean ${
|
|
176207
|
+
if (await client2.input.confirm(`Did you mean ${import_chalk97.default.bold(found)}?`, false)) {
|
|
175765
176208
|
return found;
|
|
175766
176209
|
}
|
|
175767
176210
|
} else {
|
|
175768
176211
|
throw GuessError;
|
|
175769
176212
|
}
|
|
175770
176213
|
}
|
|
175771
|
-
var import_node_fs2, import_node_path4, import_tar_fs,
|
|
176214
|
+
var import_node_fs2, import_node_path4, import_tar_fs, import_chalk97, EXAMPLE_API;
|
|
175772
176215
|
var init_init = __esm({
|
|
175773
176216
|
"src/commands/init/init.ts"() {
|
|
175774
176217
|
"use strict";
|
|
175775
176218
|
import_node_fs2 = __toESM3(require("fs"));
|
|
175776
176219
|
import_node_path4 = __toESM3(require("path"));
|
|
175777
176220
|
import_tar_fs = __toESM3(require_tar_fs());
|
|
175778
|
-
|
|
176221
|
+
import_chalk97 = __toESM3(require_source());
|
|
175779
176222
|
init_list4();
|
|
175780
176223
|
init_list_item();
|
|
175781
176224
|
init_humanize_path();
|
|
@@ -175891,11 +176334,11 @@ var init_build_state = __esm({
|
|
|
175891
176334
|
});
|
|
175892
176335
|
|
|
175893
176336
|
// src/util/output/builds.ts
|
|
175894
|
-
var
|
|
176337
|
+
var import_chalk98, import_bytes8, padding, MAX_BUILD_GROUPS, MAX_OUTPUTS_PER_GROUP, hasOutput, getCommonPath, styleBuild, styleHiddenBuilds, styleOutput, getDirPath, sortByEntrypoint, groupBuilds, builds_default;
|
|
175895
176338
|
var init_builds = __esm({
|
|
175896
176339
|
"src/util/output/builds.ts"() {
|
|
175897
176340
|
"use strict";
|
|
175898
|
-
|
|
176341
|
+
import_chalk98 = __toESM3(require_source());
|
|
175899
176342
|
import_bytes8 = __toESM3(require_bytes());
|
|
175900
176343
|
init_build_state();
|
|
175901
176344
|
padding = 8;
|
|
@@ -175924,48 +176367,48 @@ var init_builds = __esm({
|
|
|
175924
176367
|
styleBuild = (build2, times, longestSource) => {
|
|
175925
176368
|
const { entrypoint, id } = build2;
|
|
175926
176369
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
175927
|
-
let pathColor =
|
|
176370
|
+
let pathColor = import_chalk98.default.cyan;
|
|
175928
176371
|
if (isFailed(build2)) {
|
|
175929
|
-
pathColor =
|
|
176372
|
+
pathColor = import_chalk98.default.red;
|
|
175930
176373
|
}
|
|
175931
176374
|
const entry = entrypoint.padEnd(longestSource + padding);
|
|
175932
176375
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
|
175933
|
-
return `${
|
|
176376
|
+
return `${import_chalk98.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
175934
176377
|
};
|
|
175935
176378
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden2 = false) => {
|
|
175936
176379
|
const { id } = buildGroup[0];
|
|
175937
176380
|
const entry = commonPath.padEnd(longestSource + padding);
|
|
175938
176381
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
175939
176382
|
const prefix = isHidden2 === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
|
175940
|
-
let pathColor =
|
|
176383
|
+
let pathColor = import_chalk98.default.cyan;
|
|
175941
176384
|
if (buildGroup.every(isFailed)) {
|
|
175942
|
-
pathColor =
|
|
176385
|
+
pathColor = import_chalk98.default.red;
|
|
175943
176386
|
}
|
|
175944
176387
|
if (isHidden2) {
|
|
175945
|
-
pathColor =
|
|
176388
|
+
pathColor = import_chalk98.default.grey;
|
|
175946
176389
|
}
|
|
175947
|
-
return `${
|
|
176390
|
+
return `${import_chalk98.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
175948
176391
|
};
|
|
175949
176392
|
styleOutput = (output2, readyState, isLast) => {
|
|
175950
176393
|
const { type, path: path11, size, lambda } = output2;
|
|
175951
176394
|
const prefix = type === "lambda" ? "\u03BB " : "";
|
|
175952
|
-
const finalSize = size ? ` ${
|
|
175953
|
-
let color =
|
|
176395
|
+
const finalSize = size ? ` ${import_chalk98.default.grey(`(${(0, import_bytes8.default)(size)})`)}` : "";
|
|
176396
|
+
let color = import_chalk98.default.grey;
|
|
175954
176397
|
let finalRegion = "";
|
|
175955
176398
|
if (isReady({ readyState })) {
|
|
175956
|
-
color =
|
|
176399
|
+
color = import_chalk98.default;
|
|
175957
176400
|
} else if (isFailed({ readyState })) {
|
|
175958
|
-
color =
|
|
176401
|
+
color = import_chalk98.default.red;
|
|
175959
176402
|
}
|
|
175960
176403
|
if (lambda) {
|
|
175961
176404
|
const { deployedTo } = lambda;
|
|
175962
176405
|
if (deployedTo && deployedTo.length > 0) {
|
|
175963
|
-
finalRegion = ` ${
|
|
176406
|
+
finalRegion = ` ${import_chalk98.default.grey(`[${deployedTo.join(", ")}]`)}`;
|
|
175964
176407
|
}
|
|
175965
176408
|
}
|
|
175966
176409
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
|
175967
176410
|
const main18 = prefix + path11 + finalSize + finalRegion;
|
|
175968
|
-
return `${
|
|
176411
|
+
return `${import_chalk98.default.grey(corner)} ${color(main18)}`;
|
|
175969
176412
|
};
|
|
175970
176413
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
|
175971
176414
|
const parts = path11.split("/").slice(0, -1);
|
|
@@ -176097,7 +176540,7 @@ var init_builds = __esm({
|
|
|
176097
176540
|
);
|
|
176098
176541
|
if (outputs.length > MAX_OUTPUTS_PER_GROUP) {
|
|
176099
176542
|
final.push(
|
|
176100
|
-
|
|
176543
|
+
import_chalk98.default.grey(
|
|
176101
176544
|
`\u2514\u2500\u2500 ${outputs.length - MAX_OUTPUTS_PER_GROUP} output items hidden
|
|
176102
176545
|
`
|
|
176103
176546
|
)
|
|
@@ -176145,19 +176588,19 @@ function routes(routes2) {
|
|
|
176145
176588
|
const padding2 = 6;
|
|
176146
176589
|
const space = " ".repeat(padding2);
|
|
176147
176590
|
const destSpace = " ".repeat(longestDest || 10);
|
|
176148
|
-
const arrow =
|
|
176591
|
+
const arrow = import_chalk99.default.grey("->");
|
|
176149
176592
|
for (const item of routes2) {
|
|
176150
176593
|
if ("handle" in item) {
|
|
176151
|
-
toPrint += `${
|
|
176594
|
+
toPrint += `${import_chalk99.default.grey("\u2576")} ${import_chalk99.default.cyan(item.handle)}`;
|
|
176152
176595
|
continue;
|
|
176153
176596
|
}
|
|
176154
176597
|
const { src, dest, status: status3, headers } = item;
|
|
176155
176598
|
const last = routes2.indexOf(item) === routes2.length - 1;
|
|
176156
176599
|
const suffix = last ? "" : `
|
|
176157
176600
|
`;
|
|
176158
|
-
const finalSrc =
|
|
176601
|
+
const finalSrc = import_chalk99.default.cyan(src.padEnd(longestSrc + padding2));
|
|
176159
176602
|
const finalDest = dest ? `${arrow}${space}${dest}` : ` ${space}${destSpace}`;
|
|
176160
|
-
const finalStatus = status3 ?
|
|
176603
|
+
const finalStatus = status3 ? import_chalk99.default.grey(`[${status3}]`) : "";
|
|
176161
176604
|
let finalHeaders = null;
|
|
176162
176605
|
if (headers) {
|
|
176163
176606
|
finalHeaders = `
|
|
@@ -176168,21 +176611,21 @@ function routes(routes2) {
|
|
|
176168
176611
|
const last2 = headerKeys.indexOf(header) === headerKeys.length - 1;
|
|
176169
176612
|
const suffix2 = last2 ? "" : `
|
|
176170
176613
|
`;
|
|
176171
|
-
const prefix2 =
|
|
176614
|
+
const prefix2 = import_chalk99.default.grey(last2 ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500");
|
|
176172
176615
|
finalHeaders += `${prefix2} ${header}: ${value}${suffix2}`;
|
|
176173
176616
|
}
|
|
176174
176617
|
}
|
|
176175
|
-
const prefix =
|
|
176618
|
+
const prefix = import_chalk99.default.grey(finalHeaders ? "\u250C" : "\u2576");
|
|
176176
176619
|
const fill = `${finalSrc}${finalDest}${space}${finalStatus}`;
|
|
176177
176620
|
toPrint += `${prefix} ${fill}${finalHeaders || ""}${suffix}`;
|
|
176178
176621
|
}
|
|
176179
176622
|
return toPrint;
|
|
176180
176623
|
}
|
|
176181
|
-
var
|
|
176624
|
+
var import_chalk99, longestProperty;
|
|
176182
176625
|
var init_routes = __esm({
|
|
176183
176626
|
"src/util/output/routes.ts"() {
|
|
176184
176627
|
"use strict";
|
|
176185
|
-
|
|
176628
|
+
import_chalk99 = __toESM3(require_source());
|
|
176186
176629
|
longestProperty = (routes2, name) => {
|
|
176187
176630
|
const longestItem = routes2.sort((a, b) => {
|
|
176188
176631
|
const aName = a[name];
|
|
@@ -176302,7 +176745,7 @@ async function inspect3(client2) {
|
|
|
176302
176745
|
} catch {
|
|
176303
176746
|
}
|
|
176304
176747
|
output_manager_default.spinner(
|
|
176305
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
|
176748
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk100.default.bold(contextName)}`
|
|
176306
176749
|
);
|
|
176307
176750
|
let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
|
176308
176751
|
let abortController;
|
|
@@ -176329,7 +176772,7 @@ async function inspect3(client2) {
|
|
|
176329
176772
|
}
|
|
176330
176773
|
}
|
|
176331
176774
|
if (withLogs) {
|
|
176332
|
-
print(`${
|
|
176775
|
+
print(`${import_chalk100.default.cyan("status")} ${stateString(deployment.readyState)}
|
|
176333
176776
|
`);
|
|
176334
176777
|
} else {
|
|
176335
176778
|
await printDetails({ deployment, contextName, client: client2, startTimestamp });
|
|
@@ -176342,17 +176785,17 @@ function stateString(s) {
|
|
|
176342
176785
|
switch (s) {
|
|
176343
176786
|
case "INITIALIZING":
|
|
176344
176787
|
case "BUILDING":
|
|
176345
|
-
return
|
|
176788
|
+
return import_chalk100.default.yellow(CIRCLE) + sTitle;
|
|
176346
176789
|
case "ERROR":
|
|
176347
|
-
return
|
|
176790
|
+
return import_chalk100.default.red(CIRCLE) + sTitle;
|
|
176348
176791
|
case "READY":
|
|
176349
|
-
return
|
|
176792
|
+
return import_chalk100.default.green(CIRCLE) + sTitle;
|
|
176350
176793
|
case "QUEUED":
|
|
176351
|
-
return
|
|
176794
|
+
return import_chalk100.default.gray(CIRCLE) + sTitle;
|
|
176352
176795
|
case "CANCELED":
|
|
176353
|
-
return
|
|
176796
|
+
return import_chalk100.default.gray(CIRCLE) + sTitle;
|
|
176354
176797
|
default:
|
|
176355
|
-
return
|
|
176798
|
+
return import_chalk100.default.gray("UNKNOWN");
|
|
176356
176799
|
}
|
|
176357
176800
|
}
|
|
176358
176801
|
async function printDetails({
|
|
@@ -176362,7 +176805,7 @@ async function printDetails({
|
|
|
176362
176805
|
startTimestamp
|
|
176363
176806
|
}) {
|
|
176364
176807
|
output_manager_default.log(
|
|
176365
|
-
`Fetched deployment "${
|
|
176808
|
+
`Fetched deployment "${import_chalk100.default.bold(deployment.url)}" in ${import_chalk100.default.bold(
|
|
176366
176809
|
contextName
|
|
176367
176810
|
)} ${elapsed(Date.now() - startTimestamp)}`
|
|
176368
176811
|
);
|
|
@@ -176378,14 +176821,14 @@ async function printDetails({
|
|
|
176378
176821
|
const { print, link: link4 } = output_manager_default;
|
|
176379
176822
|
const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
|
|
176380
176823
|
print("\n");
|
|
176381
|
-
print(
|
|
176382
|
-
print(` ${
|
|
176824
|
+
print(import_chalk100.default.bold(" General\n\n"));
|
|
176825
|
+
print(` ${import_chalk100.default.cyan("id")} ${id}
|
|
176383
176826
|
`);
|
|
176384
|
-
print(` ${
|
|
176827
|
+
print(` ${import_chalk100.default.cyan("name")} ${name}
|
|
176385
176828
|
`);
|
|
176386
176829
|
const customEnvironmentSlug = deployment.customEnvironment?.slug;
|
|
176387
176830
|
const target = customEnvironmentSlug ?? deployment.target ?? "preview";
|
|
176388
|
-
print(` ${
|
|
176831
|
+
print(` ${import_chalk100.default.cyan("target")} `);
|
|
176389
176832
|
print(
|
|
176390
176833
|
deployment.customEnvironment && deployment.team?.slug ? `${link4(
|
|
176391
176834
|
`${target}`,
|
|
@@ -176395,13 +176838,13 @@ async function printDetails({
|
|
|
176395
176838
|
` : `${target}
|
|
176396
176839
|
`
|
|
176397
176840
|
);
|
|
176398
|
-
print(` ${
|
|
176841
|
+
print(` ${import_chalk100.default.cyan("status")} ${stateString(readyState)}
|
|
176399
176842
|
`);
|
|
176400
|
-
print(` ${
|
|
176843
|
+
print(` ${import_chalk100.default.cyan("url")} https://${url3}
|
|
176401
176844
|
`);
|
|
176402
176845
|
if (createdAt) {
|
|
176403
176846
|
print(
|
|
176404
|
-
` ${
|
|
176847
|
+
` ${import_chalk100.default.cyan("created")} ${new Date(createdAt)} ${elapsed(
|
|
176405
176848
|
Date.now() - createdAt,
|
|
176406
176849
|
true
|
|
176407
176850
|
)}
|
|
@@ -176410,10 +176853,10 @@ async function printDetails({
|
|
|
176410
176853
|
}
|
|
176411
176854
|
print("\n\n");
|
|
176412
176855
|
if (aliases !== void 0 && aliases.length > 0) {
|
|
176413
|
-
print(
|
|
176856
|
+
print(import_chalk100.default.bold(" Aliases\n\n"));
|
|
176414
176857
|
let aliasList = "";
|
|
176415
176858
|
for (const alias2 of aliases) {
|
|
176416
|
-
aliasList += `${
|
|
176859
|
+
aliasList += `${import_chalk100.default.gray("\u2576")} https://${alias2}
|
|
176417
176860
|
`;
|
|
176418
176861
|
}
|
|
176419
176862
|
print(indent_default(aliasList, 4));
|
|
@@ -176425,12 +176868,12 @@ async function printDetails({
|
|
|
176425
176868
|
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
|
176426
176869
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
|
176427
176870
|
}
|
|
176428
|
-
print(
|
|
176871
|
+
print(import_chalk100.default.bold(" Builds\n\n"));
|
|
176429
176872
|
print(indent_default(builds_default(builds, times).toPrint, 4));
|
|
176430
176873
|
print("\n\n");
|
|
176431
176874
|
}
|
|
176432
176875
|
if (Array.isArray(routes2) && routes2.length > 0) {
|
|
176433
|
-
print(
|
|
176876
|
+
print(import_chalk100.default.bold(" Routes\n\n"));
|
|
176434
176877
|
print(indent_default(routes(routes2), 4));
|
|
176435
176878
|
print(`
|
|
176436
176879
|
|
|
@@ -176443,12 +176886,12 @@ function exitCode(state) {
|
|
|
176443
176886
|
}
|
|
176444
176887
|
return 0;
|
|
176445
176888
|
}
|
|
176446
|
-
var import_error_utils26,
|
|
176889
|
+
var import_error_utils26, import_chalk100, import_ms19, import_title6, import_url16;
|
|
176447
176890
|
var init_inspect4 = __esm({
|
|
176448
176891
|
"src/commands/inspect/index.ts"() {
|
|
176449
176892
|
"use strict";
|
|
176450
176893
|
import_error_utils26 = __toESM3(require_dist2());
|
|
176451
|
-
|
|
176894
|
+
import_chalk100 = __toESM3(require_source());
|
|
176452
176895
|
import_ms19 = __toESM3(require_ms());
|
|
176453
176896
|
import_title6 = __toESM3(require_lib4());
|
|
176454
176897
|
import_url16 = require("url");
|
|
@@ -176884,7 +177327,7 @@ async function add5(client2, args2) {
|
|
|
176884
177327
|
}
|
|
176885
177328
|
const installation = teamInstallations[0];
|
|
176886
177329
|
output_manager_default.log(
|
|
176887
|
-
`Installing ${
|
|
177330
|
+
`Installing ${import_chalk101.default.bold(product.name)} by ${import_chalk101.default.bold(integration.name)} under ${import_chalk101.default.bold(contextName)}`
|
|
176888
177331
|
);
|
|
176889
177332
|
const metadataSchema = product.metadataSchema;
|
|
176890
177333
|
const metadataWizard = createMetadataWizard(metadataSchema);
|
|
@@ -177104,16 +177547,16 @@ async function selectBillingPlan(client2, billingPlans) {
|
|
|
177104
177547
|
}
|
|
177105
177548
|
async function confirmProductSelection(client2, product, name, metadata, billingPlan) {
|
|
177106
177549
|
output_manager_default.print("Selected product:\n");
|
|
177107
|
-
output_manager_default.print(`${
|
|
177550
|
+
output_manager_default.print(`${import_chalk101.default.dim(`- ${import_chalk101.default.bold("Name:")} ${name}`)}
|
|
177108
177551
|
`);
|
|
177109
177552
|
for (const [key, value] of Object.entries(metadata)) {
|
|
177110
177553
|
output_manager_default.print(
|
|
177111
|
-
`${
|
|
177554
|
+
`${import_chalk101.default.dim(`- ${import_chalk101.default.bold(`${product.metadataSchema.properties[key]["ui:label"]}:`)} ${value}`)}
|
|
177112
177555
|
`
|
|
177113
177556
|
);
|
|
177114
177557
|
}
|
|
177115
177558
|
output_manager_default.print(
|
|
177116
|
-
`${
|
|
177559
|
+
`${import_chalk101.default.dim(`- ${import_chalk101.default.bold("Plan:")} ${billingPlan.name}`)}
|
|
177117
177560
|
`
|
|
177118
177561
|
);
|
|
177119
177562
|
return client2.input.confirm("Confirm selection?", true);
|
|
@@ -177223,7 +177666,7 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
|
177223
177666
|
]
|
|
177224
177667
|
});
|
|
177225
177668
|
output_manager_default.spinner(
|
|
177226
|
-
`Connecting ${
|
|
177669
|
+
`Connecting ${import_chalk101.default.bold(name)} to ${import_chalk101.default.bold(project.name)}...`
|
|
177227
177670
|
);
|
|
177228
177671
|
try {
|
|
177229
177672
|
await connectResourceToProject(
|
|
@@ -177241,17 +177684,17 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
|
177241
177684
|
output_manager_default.stopSpinner();
|
|
177242
177685
|
}
|
|
177243
177686
|
output_manager_default.log(
|
|
177244
|
-
`${
|
|
177687
|
+
`${import_chalk101.default.bold(name)} successfully connected to ${import_chalk101.default.bold(project.name)}
|
|
177245
177688
|
|
|
177246
177689
|
${indent_default(`Run ${cmd(`${packageName} env pull`)} to update the environment variables`, 4)}`
|
|
177247
177690
|
);
|
|
177248
177691
|
return 0;
|
|
177249
177692
|
}
|
|
177250
|
-
var
|
|
177693
|
+
var import_chalk101, import_open3;
|
|
177251
177694
|
var init_add10 = __esm({
|
|
177252
177695
|
"src/commands/integration/add.ts"() {
|
|
177253
177696
|
"use strict";
|
|
177254
|
-
|
|
177697
|
+
import_chalk101 = __toESM3(require_source());
|
|
177255
177698
|
import_open3 = __toESM3(require_open());
|
|
177256
177699
|
init_format_table();
|
|
177257
177700
|
init_pkg_name();
|
|
@@ -177571,7 +178014,7 @@ function outputBalanceInformation(prepaymentInfo, resources, integrationSlug) {
|
|
|
177571
178014
|
}
|
|
177572
178015
|
}
|
|
177573
178016
|
output_manager_default.log(
|
|
177574
|
-
`${
|
|
178017
|
+
`${import_chalk102.default.bold(`Balances and thresholds for ${integrationSlug}`)}:`
|
|
177575
178018
|
);
|
|
177576
178019
|
for (const key in mappings) {
|
|
177577
178020
|
const mapping = mappings[key];
|
|
@@ -177597,11 +178040,11 @@ function formattedCurrency(amountInCents) {
|
|
|
177597
178040
|
currency: "USD"
|
|
177598
178041
|
}).format(amountInCents / 100);
|
|
177599
178042
|
}
|
|
177600
|
-
var
|
|
178043
|
+
var import_chalk102;
|
|
177601
178044
|
var init_balance2 = __esm({
|
|
177602
178045
|
"src/commands/integration/balance.ts"() {
|
|
177603
178046
|
"use strict";
|
|
177604
|
-
|
|
178047
|
+
import_chalk102 = __toESM3(require_source());
|
|
177605
178048
|
init_output_manager();
|
|
177606
178049
|
init_get_scope();
|
|
177607
178050
|
init_fetch_installation_prepayment_info();
|
|
@@ -177755,18 +178198,18 @@ async function list4(client2) {
|
|
|
177755
178198
|
return 0;
|
|
177756
178199
|
}
|
|
177757
178200
|
output_manager_default.log(
|
|
177758
|
-
`Integrations in ${
|
|
178201
|
+
`Integrations in ${import_chalk103.default.bold(contextName)}:
|
|
177759
178202
|
${table(
|
|
177760
178203
|
[
|
|
177761
178204
|
["Name", "Status", "Product", "Integration", "Projects"].map(
|
|
177762
|
-
(header) =>
|
|
178205
|
+
(header) => import_chalk103.default.bold(import_chalk103.default.cyan(header))
|
|
177763
178206
|
),
|
|
177764
178207
|
...results.map((result) => [
|
|
177765
|
-
resourceLink(contextName, result) ??
|
|
178208
|
+
resourceLink(contextName, result) ?? import_chalk103.default.gray("\u2013"),
|
|
177766
178209
|
resourceStatus(result.status ?? "\u2013"),
|
|
177767
|
-
result.product ??
|
|
177768
|
-
integrationLink(result, team) ??
|
|
177769
|
-
|
|
178210
|
+
result.product ?? import_chalk103.default.gray("\u2013"),
|
|
178211
|
+
integrationLink(result, team) ?? import_chalk103.default.gray("\u2013"),
|
|
178212
|
+
import_chalk103.default.grey(result.projects ? result.projects : "\u2013")
|
|
177770
178213
|
])
|
|
177771
178214
|
],
|
|
177772
178215
|
{ hsep: 8 }
|
|
@@ -177779,17 +178222,17 @@ function resourceStatus(status3) {
|
|
|
177779
178222
|
const statusTitleCase = (0, import_title7.default)(status3);
|
|
177780
178223
|
switch (status3) {
|
|
177781
178224
|
case "initializing":
|
|
177782
|
-
return
|
|
178225
|
+
return import_chalk103.default.yellow(CIRCLE) + statusTitleCase;
|
|
177783
178226
|
case "error":
|
|
177784
|
-
return
|
|
178227
|
+
return import_chalk103.default.red(CIRCLE) + statusTitleCase;
|
|
177785
178228
|
case "available":
|
|
177786
|
-
return
|
|
178229
|
+
return import_chalk103.default.green(CIRCLE) + statusTitleCase;
|
|
177787
178230
|
case "suspended":
|
|
177788
|
-
return
|
|
178231
|
+
return import_chalk103.default.white(CIRCLE) + statusTitleCase;
|
|
177789
178232
|
case "limits-exceeded-suspended":
|
|
177790
|
-
return `${
|
|
178233
|
+
return `${import_chalk103.default.white(CIRCLE)}Limits exceeded`;
|
|
177791
178234
|
default:
|
|
177792
|
-
return
|
|
178235
|
+
return import_chalk103.default.gray(statusTitleCase);
|
|
177793
178236
|
}
|
|
177794
178237
|
}
|
|
177795
178238
|
function resourceLink(orgSlug, resource) {
|
|
@@ -177810,18 +178253,18 @@ function integrationLink(integration, team) {
|
|
|
177810
178253
|
if (!integration.configurationId) {
|
|
177811
178254
|
return integration.integration;
|
|
177812
178255
|
}
|
|
177813
|
-
const boldName =
|
|
178256
|
+
const boldName = import_chalk103.default.bold(integration.integration);
|
|
177814
178257
|
const integrationDeepLink = buildSSOLink(team, integration.configurationId);
|
|
177815
178258
|
return output_manager_default.link(boldName, integrationDeepLink, {
|
|
177816
178259
|
fallback: () => boldName,
|
|
177817
178260
|
color: false
|
|
177818
178261
|
});
|
|
177819
178262
|
}
|
|
177820
|
-
var
|
|
178263
|
+
var import_chalk103, import_title7;
|
|
177821
178264
|
var init_list6 = __esm({
|
|
177822
178265
|
"src/commands/integration/list.ts"() {
|
|
177823
178266
|
"use strict";
|
|
177824
|
-
|
|
178267
|
+
import_chalk103 = __toESM3(require_source());
|
|
177825
178268
|
init_get_scope();
|
|
177826
178269
|
init_link2();
|
|
177827
178270
|
init_get_resources();
|
|
@@ -177882,7 +178325,7 @@ async function openIntegration(client2, args2) {
|
|
|
177882
178325
|
knownIntegrationSlug = !!configuration;
|
|
177883
178326
|
} catch (error3) {
|
|
177884
178327
|
output_manager_default.error(
|
|
177885
|
-
`Failed to fetch configuration for ${
|
|
178328
|
+
`Failed to fetch configuration for ${import_chalk104.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
|
|
177886
178329
|
);
|
|
177887
178330
|
return 1;
|
|
177888
178331
|
} finally {
|
|
@@ -177890,19 +178333,19 @@ async function openIntegration(client2, args2) {
|
|
|
177890
178333
|
}
|
|
177891
178334
|
if (!configuration) {
|
|
177892
178335
|
output_manager_default.error(
|
|
177893
|
-
`No configuration found for ${
|
|
178336
|
+
`No configuration found for ${import_chalk104.default.bold(`"${integrationSlug}"`)}.`
|
|
177894
178337
|
);
|
|
177895
178338
|
return 1;
|
|
177896
178339
|
}
|
|
177897
|
-
output_manager_default.print(`Opening the ${
|
|
178340
|
+
output_manager_default.print(`Opening the ${import_chalk104.default.bold(integrationSlug)} dashboard...`);
|
|
177898
178341
|
(0, import_open4.default)(buildSSOLink(team, configuration.id));
|
|
177899
178342
|
return 0;
|
|
177900
178343
|
}
|
|
177901
|
-
var
|
|
178344
|
+
var import_chalk104, import_open4;
|
|
177902
178345
|
var init_open_integration = __esm({
|
|
177903
178346
|
"src/commands/integration/open-integration.ts"() {
|
|
177904
178347
|
"use strict";
|
|
177905
|
-
|
|
178348
|
+
import_chalk104 = __toESM3(require_source());
|
|
177906
178349
|
import_open4 = __toESM3(require_open());
|
|
177907
178350
|
init_get_scope();
|
|
177908
178351
|
init_fetch_marketplace_integrations();
|
|
@@ -177995,7 +178438,7 @@ async function remove3(client2) {
|
|
|
177995
178438
|
);
|
|
177996
178439
|
output_manager_default.stopSpinner();
|
|
177997
178440
|
if (!integrationConfiguration) {
|
|
177998
|
-
output_manager_default.error(`No integration ${
|
|
178441
|
+
output_manager_default.error(`No integration ${import_chalk105.default.bold(integrationName)} found.`);
|
|
177999
178442
|
telemetry2.trackCliArgumentIntegration(integrationName, false);
|
|
178000
178443
|
return 0;
|
|
178001
178444
|
}
|
|
@@ -178014,26 +178457,26 @@ async function remove3(client2) {
|
|
|
178014
178457
|
await removeIntegration(client2, integrationConfiguration, team);
|
|
178015
178458
|
} catch (error3) {
|
|
178016
178459
|
output_manager_default.error(
|
|
178017
|
-
|
|
178018
|
-
`Failed to remove ${
|
|
178460
|
+
import_chalk105.default.red(
|
|
178461
|
+
`Failed to remove ${import_chalk105.default.bold(integrationName)}: ${error3.message}`
|
|
178019
178462
|
)
|
|
178020
178463
|
);
|
|
178021
178464
|
return 1;
|
|
178022
178465
|
}
|
|
178023
|
-
output_manager_default.success(`${
|
|
178466
|
+
output_manager_default.success(`${import_chalk105.default.bold(integrationName)} successfully removed.`);
|
|
178024
178467
|
return 0;
|
|
178025
178468
|
}
|
|
178026
178469
|
async function confirmIntegrationRemoval(client2, integration, team) {
|
|
178027
178470
|
output_manager_default.log(
|
|
178028
|
-
`The ${
|
|
178471
|
+
`The ${import_chalk105.default.bold(integration)} integration will be removed permanently from team ${import_chalk105.default.bold(team.name)}.`
|
|
178029
178472
|
);
|
|
178030
|
-
return client2.input.confirm(`${
|
|
178473
|
+
return client2.input.confirm(`${import_chalk105.default.red("Are you sure?")}`, false);
|
|
178031
178474
|
}
|
|
178032
|
-
var
|
|
178475
|
+
var import_chalk105;
|
|
178033
178476
|
var init_remove_integration2 = __esm({
|
|
178034
178477
|
"src/commands/integration/remove-integration.ts"() {
|
|
178035
178478
|
"use strict";
|
|
178036
|
-
|
|
178479
|
+
import_chalk105 = __toESM3(require_source());
|
|
178037
178480
|
init_output_manager();
|
|
178038
178481
|
init_get_args();
|
|
178039
178482
|
init_get_flags_specification();
|
|
@@ -178331,18 +178774,18 @@ async function createThreshold(client2) {
|
|
|
178331
178774
|
);
|
|
178332
178775
|
output_manager_default.stopSpinner();
|
|
178333
178776
|
if (!targetedResource) {
|
|
178334
|
-
output_manager_default.log(`The resource ${
|
|
178777
|
+
output_manager_default.log(`The resource ${import_chalk106.default.bold(resourceName)} was not found.`);
|
|
178335
178778
|
return 0;
|
|
178336
178779
|
}
|
|
178337
178780
|
if (!targetedResource.product?.integrationConfigurationId) {
|
|
178338
178781
|
output_manager_default.error(
|
|
178339
|
-
`The resource ${
|
|
178782
|
+
`The resource ${import_chalk106.default.bold(resourceName)} does not have an integration configuration.`
|
|
178340
178783
|
);
|
|
178341
178784
|
return 1;
|
|
178342
178785
|
}
|
|
178343
178786
|
if (targetedResource.billingPlan?.type !== "prepayment") {
|
|
178344
178787
|
output_manager_default.error(
|
|
178345
|
-
`The resource ${
|
|
178788
|
+
`The resource ${import_chalk106.default.bold(resourceName)} is not a prepayment-based resource.`
|
|
178346
178789
|
);
|
|
178347
178790
|
return 1;
|
|
178348
178791
|
}
|
|
@@ -178370,7 +178813,7 @@ async function createThreshold(client2) {
|
|
|
178370
178813
|
}
|
|
178371
178814
|
if (targetedResource.billingPlan.scope !== "resource") {
|
|
178372
178815
|
output_manager_default.log(
|
|
178373
|
-
`The resource ${
|
|
178816
|
+
`The resource ${import_chalk106.default.bold(resourceName)} uses an installation-level balance.`
|
|
178374
178817
|
);
|
|
178375
178818
|
return await updateThresholdForInstallation({
|
|
178376
178819
|
client: client2,
|
|
@@ -178484,17 +178927,17 @@ async function updateThresholdForInstallation(props) {
|
|
|
178484
178927
|
async function handleUpdateThreshold(props) {
|
|
178485
178928
|
if (props.resource.billingPlan?.type !== "prepayment") {
|
|
178486
178929
|
output_manager_default.log(
|
|
178487
|
-
`The resource ${
|
|
178930
|
+
`The resource ${import_chalk106.default.bold(props.resource.name)} is not a prepayment-based resource.`
|
|
178488
178931
|
);
|
|
178489
178932
|
return 0;
|
|
178490
178933
|
}
|
|
178491
178934
|
if (!props.resource.product?.integrationConfigurationId) {
|
|
178492
178935
|
output_manager_default.log(
|
|
178493
|
-
`The resource ${
|
|
178936
|
+
`The resource ${import_chalk106.default.bold(props.resource.name)} does not have an integration configuration.`
|
|
178494
178937
|
);
|
|
178495
178938
|
return 0;
|
|
178496
178939
|
}
|
|
178497
|
-
const entityTextReference = props.isInstallationLevel ? `installation ${
|
|
178940
|
+
const entityTextReference = props.isInstallationLevel ? `installation ${import_chalk106.default.bold(props.resource.product?.name)}` : `resource ${import_chalk106.default.bold(props.resource.name)}`;
|
|
178498
178941
|
if (props.existingThreshold) {
|
|
178499
178942
|
const shouldOverwriteThreshold = props.skipConfirmWithYes || await props.client.input.confirm(
|
|
178500
178943
|
`The ${entityTextReference} already has a threshold. (minimum: $${props.existingThreshold.minimumAmountInCents / 100}, spend: $${props.existingThreshold.purchaseAmountInCents / 100}, limit: ${props.existingThreshold.maximumAmountPerPeriodInCents ? `$${props.existingThreshold.maximumAmountPerPeriodInCents / 100}` : "none set"}). Do you want to overwrite it?`,
|
|
@@ -178551,11 +178994,11 @@ async function handleUpdateThreshold(props) {
|
|
|
178551
178994
|
output_manager_default.success(`Threshold for ${entityTextReference} created successfully.`);
|
|
178552
178995
|
return 0;
|
|
178553
178996
|
}
|
|
178554
|
-
var
|
|
178997
|
+
var import_chalk106;
|
|
178555
178998
|
var init_create_threshold2 = __esm({
|
|
178556
178999
|
"src/commands/integration-resource/create-threshold.ts"() {
|
|
178557
179000
|
"use strict";
|
|
178558
|
-
|
|
179001
|
+
import_chalk106 = __toESM3(require_source());
|
|
178559
179002
|
init_output_manager();
|
|
178560
179003
|
init_error2();
|
|
178561
179004
|
init_get_args();
|
|
@@ -178698,7 +179141,7 @@ async function disconnect2(client2) {
|
|
|
178698
179141
|
);
|
|
178699
179142
|
output_manager_default.stopSpinner();
|
|
178700
179143
|
if (!targetedResource) {
|
|
178701
|
-
output_manager_default.error(`No resource ${
|
|
179144
|
+
output_manager_default.error(`No resource ${import_chalk107.default.bold(resourceName)} found.`);
|
|
178702
179145
|
return 0;
|
|
178703
179146
|
}
|
|
178704
179147
|
if (parsedArguments.flags["--all"]) {
|
|
@@ -178748,7 +179191,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178748
179191
|
);
|
|
178749
179192
|
if (!project) {
|
|
178750
179193
|
output_manager_default.log(
|
|
178751
|
-
`Could not find project ${
|
|
179194
|
+
`Could not find project ${import_chalk107.default.bold(projectName)} connected to resource ${import_chalk107.default.bold(resource.name)}.`
|
|
178752
179195
|
);
|
|
178753
179196
|
return 0;
|
|
178754
179197
|
}
|
|
@@ -178760,7 +179203,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178760
179203
|
output_manager_default.spinner("Disconnecting resource\u2026", 500);
|
|
178761
179204
|
await disconnectResourceFromProject(client2, resource, project);
|
|
178762
179205
|
output_manager_default.success(
|
|
178763
|
-
`Disconnected ${
|
|
179206
|
+
`Disconnected ${import_chalk107.default.bold(project.name)} from ${import_chalk107.default.bold(resource.name)}`
|
|
178764
179207
|
);
|
|
178765
179208
|
} catch (error3) {
|
|
178766
179209
|
output_manager_default.error(
|
|
@@ -178772,7 +179215,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178772
179215
|
}
|
|
178773
179216
|
async function handleDisconnectAllProjects(client2, resource, skipConfirmation) {
|
|
178774
179217
|
if (resource.projectsMetadata?.length === 0) {
|
|
178775
|
-
output_manager_default.log(`${
|
|
179218
|
+
output_manager_default.log(`${import_chalk107.default.bold(resource.name)} has no projects to disconnect.`);
|
|
178776
179219
|
return;
|
|
178777
179220
|
}
|
|
178778
179221
|
if (!skipConfirmation && !await confirmDisconnectAllProjects(client2, resource)) {
|
|
@@ -178782,7 +179225,7 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
|
178782
179225
|
output_manager_default.spinner("Disconnecting projects from resource\u2026", 500);
|
|
178783
179226
|
await disconnectResourceFromAllProjects(client2, resource);
|
|
178784
179227
|
output_manager_default.success(
|
|
178785
|
-
`Disconnected all projects from ${
|
|
179228
|
+
`Disconnected all projects from ${import_chalk107.default.bold(resource.name)}`
|
|
178786
179229
|
);
|
|
178787
179230
|
} catch (error3) {
|
|
178788
179231
|
throw new FailedError(
|
|
@@ -178793,9 +179236,9 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
|
178793
179236
|
}
|
|
178794
179237
|
async function confirmDisconnectProject(client2, resource, project) {
|
|
178795
179238
|
output_manager_default.log(
|
|
178796
|
-
`The resource ${
|
|
179239
|
+
`The resource ${import_chalk107.default.bold(resource.name)} will be disconnected from project ${import_chalk107.default.bold(project.name)}.`
|
|
178797
179240
|
);
|
|
178798
|
-
return client2.input.confirm(`${
|
|
179241
|
+
return client2.input.confirm(`${import_chalk107.default.red("Are you sure?")}`, false);
|
|
178799
179242
|
}
|
|
178800
179243
|
async function confirmDisconnectAllProjects(client2, resource) {
|
|
178801
179244
|
output_manager_default.log("The following projects will be disconnected:");
|
|
@@ -178806,13 +179249,13 @@ async function confirmDisconnectAllProjects(client2, resource) {
|
|
|
178806
179249
|
output_manager_default.print(` ${project.name}
|
|
178807
179250
|
`);
|
|
178808
179251
|
}
|
|
178809
|
-
return client2.input.confirm(
|
|
179252
|
+
return client2.input.confirm(import_chalk107.default.red("Are you sure?"), false);
|
|
178810
179253
|
}
|
|
178811
|
-
var
|
|
179254
|
+
var import_chalk107;
|
|
178812
179255
|
var init_disconnect4 = __esm({
|
|
178813
179256
|
"src/commands/integration-resource/disconnect.ts"() {
|
|
178814
179257
|
"use strict";
|
|
178815
|
-
|
|
179258
|
+
import_chalk107 = __toESM3(require_source());
|
|
178816
179259
|
init_output_manager();
|
|
178817
179260
|
init_get_args();
|
|
178818
179261
|
init_get_flags_specification();
|
|
@@ -178917,7 +179360,7 @@ async function remove4(client2) {
|
|
|
178917
179360
|
);
|
|
178918
179361
|
output_manager_default.stopSpinner();
|
|
178919
179362
|
if (!targetedResource) {
|
|
178920
|
-
output_manager_default.error(`No resource ${
|
|
179363
|
+
output_manager_default.error(`No resource ${import_chalk108.default.bold(resourceName)} found.`);
|
|
178921
179364
|
return 0;
|
|
178922
179365
|
}
|
|
178923
179366
|
if (disconnectAll) {
|
|
@@ -178948,7 +179391,7 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
|
178948
179391
|
const hasProjects = resource.projectsMetadata && resource.projectsMetadata?.length > 0;
|
|
178949
179392
|
if (!options?.skipProjectCheck && hasProjects) {
|
|
178950
179393
|
output_manager_default.error(
|
|
178951
|
-
`Cannot delete resource ${
|
|
179394
|
+
`Cannot delete resource ${import_chalk108.default.bold(resource.name)} while it has connected projects. Please disconnect any projects using this resource first or use the \`--disconnect-all\` flag.`
|
|
178952
179395
|
);
|
|
178953
179396
|
return 1;
|
|
178954
179397
|
}
|
|
@@ -178959,24 +179402,24 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
|
178959
179402
|
try {
|
|
178960
179403
|
output_manager_default.spinner("Deleting resource\u2026", 500);
|
|
178961
179404
|
await deleteResource(client2, resource, team);
|
|
178962
|
-
output_manager_default.success(`${
|
|
179405
|
+
output_manager_default.success(`${import_chalk108.default.bold(resource.name)} successfully deleted.`);
|
|
178963
179406
|
} catch (error3) {
|
|
178964
179407
|
output_manager_default.error(
|
|
178965
|
-
`A problem occurred when attempting to delete ${
|
|
179408
|
+
`A problem occurred when attempting to delete ${import_chalk108.default.bold(resource.name)}: ${error3.message}`
|
|
178966
179409
|
);
|
|
178967
179410
|
return 1;
|
|
178968
179411
|
}
|
|
178969
179412
|
return 0;
|
|
178970
179413
|
}
|
|
178971
179414
|
async function confirmDeleteResource(client2, resource) {
|
|
178972
|
-
output_manager_default.log(`${
|
|
178973
|
-
return client2.input.confirm(`${
|
|
179415
|
+
output_manager_default.log(`${import_chalk108.default.bold(resource.name)} will be deleted permanently.`);
|
|
179416
|
+
return client2.input.confirm(`${import_chalk108.default.red("Are you sure?")}`, false);
|
|
178974
179417
|
}
|
|
178975
|
-
var
|
|
179418
|
+
var import_chalk108;
|
|
178976
179419
|
var init_remove_resource = __esm({
|
|
178977
179420
|
"src/commands/integration-resource/remove-resource.ts"() {
|
|
178978
179421
|
"use strict";
|
|
178979
|
-
|
|
179422
|
+
import_chalk108 = __toESM3(require_source());
|
|
178980
179423
|
init_output_manager();
|
|
178981
179424
|
init_get_args();
|
|
178982
179425
|
init_get_flags_specification();
|
|
@@ -179422,7 +179865,7 @@ async function list5(client2) {
|
|
|
179422
179865
|
}
|
|
179423
179866
|
const projectSlugLink = formatProject(contextName, project.name);
|
|
179424
179867
|
if (!singleDeployment) {
|
|
179425
|
-
spinner(`Fetching deployments in ${
|
|
179868
|
+
spinner(`Fetching deployments in ${import_chalk109.default.bold(contextName)}`);
|
|
179426
179869
|
const start = Date.now();
|
|
179427
179870
|
debug2("Fetching deployments");
|
|
179428
179871
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
|
@@ -179462,7 +179905,7 @@ async function list5(client2) {
|
|
|
179462
179905
|
const urls = [];
|
|
179463
179906
|
const tablePrint = table(
|
|
179464
179907
|
[
|
|
179465
|
-
headers.map((header) =>
|
|
179908
|
+
headers.map((header) => import_chalk109.default.bold(import_chalk109.default.cyan(header))),
|
|
179466
179909
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
|
179467
179910
|
urls.push(`https://${dep.url}`);
|
|
179468
179911
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
|
@@ -179472,16 +179915,16 @@ async function list5(client2) {
|
|
|
179472
179915
|
const targetName = dep.customEnvironment?.slug || (dep.target === "production" ? "Production" : "Preview");
|
|
179473
179916
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
|
179474
179917
|
return [
|
|
179475
|
-
|
|
179918
|
+
import_chalk109.default.gray(createdAt),
|
|
179476
179919
|
`https://${dep.url}`,
|
|
179477
179920
|
stateString2(dep.readyState || ""),
|
|
179478
179921
|
formatEnvironment(contextName, project.name, {
|
|
179479
179922
|
id: targetSlug,
|
|
179480
179923
|
slug: targetName
|
|
179481
179924
|
}),
|
|
179482
|
-
...!showPolicy ? [
|
|
179483
|
-
...!showPolicy ? [
|
|
179484
|
-
...showPolicy ? [
|
|
179925
|
+
...!showPolicy ? [import_chalk109.default.gray(getDeploymentDuration(dep))] : [],
|
|
179926
|
+
...!showPolicy ? [import_chalk109.default.gray(dep.creator?.username)] : [],
|
|
179927
|
+
...showPolicy ? [import_chalk109.default.gray(proposedExp)] : []
|
|
179485
179928
|
];
|
|
179486
179929
|
}).filter(
|
|
179487
179930
|
(app2) => (
|
|
@@ -179528,17 +179971,17 @@ function stateString2(s) {
|
|
|
179528
179971
|
case "BUILDING":
|
|
179529
179972
|
case "DEPLOYING":
|
|
179530
179973
|
case "ANALYZING":
|
|
179531
|
-
return
|
|
179974
|
+
return import_chalk109.default.yellow(CIRCLE) + sTitle;
|
|
179532
179975
|
case "ERROR":
|
|
179533
|
-
return
|
|
179976
|
+
return import_chalk109.default.red(CIRCLE) + sTitle;
|
|
179534
179977
|
case "READY":
|
|
179535
|
-
return
|
|
179978
|
+
return import_chalk109.default.green(CIRCLE) + sTitle;
|
|
179536
179979
|
case "QUEUED":
|
|
179537
|
-
return
|
|
179980
|
+
return import_chalk109.default.white(CIRCLE) + sTitle;
|
|
179538
179981
|
case "CANCELED":
|
|
179539
|
-
return
|
|
179982
|
+
return import_chalk109.default.gray(sTitle);
|
|
179540
179983
|
default:
|
|
179541
|
-
return
|
|
179984
|
+
return import_chalk109.default.gray("UNKNOWN");
|
|
179542
179985
|
}
|
|
179543
179986
|
}
|
|
179544
179987
|
function sortByCreatedAt(a, b) {
|
|
@@ -179554,12 +179997,12 @@ function filterUniqueApps() {
|
|
|
179554
179997
|
return true;
|
|
179555
179998
|
};
|
|
179556
179999
|
}
|
|
179557
|
-
var import_ms20,
|
|
180000
|
+
var import_ms20, import_chalk109, import_title8, import_error_utils27;
|
|
179558
180001
|
var init_list8 = __esm({
|
|
179559
180002
|
"src/commands/list/index.ts"() {
|
|
179560
180003
|
"use strict";
|
|
179561
180004
|
import_ms20 = __toESM3(require_ms());
|
|
179562
|
-
|
|
180005
|
+
import_chalk109 = __toESM3(require_source());
|
|
179563
180006
|
import_title8 = __toESM3(require_lib4());
|
|
179564
180007
|
init_table();
|
|
179565
180008
|
init_get_args();
|
|
@@ -179723,7 +180166,7 @@ async function logs(client2) {
|
|
|
179723
180166
|
} catch {
|
|
179724
180167
|
}
|
|
179725
180168
|
spinner(
|
|
179726
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
|
180169
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk110.default.bold(contextName)}`
|
|
179727
180170
|
);
|
|
179728
180171
|
let deployment;
|
|
179729
180172
|
try {
|
|
@@ -179743,9 +180186,9 @@ async function logs(client2) {
|
|
|
179743
180186
|
return 1;
|
|
179744
180187
|
}
|
|
179745
180188
|
output_manager_default.print(
|
|
179746
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
|
180189
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk110.default.dim(
|
|
179747
180190
|
deployment.id
|
|
179748
|
-
)}) starting from ${
|
|
180191
|
+
)}) starting from ${import_chalk110.default.bold((0, import_format3.default)(Date.now(), DATE_TIME_FORMAT))}
|
|
179749
180192
|
|
|
179750
180193
|
`
|
|
179751
180194
|
);
|
|
@@ -179760,12 +180203,12 @@ async function logs(client2) {
|
|
|
179760
180203
|
abortController
|
|
179761
180204
|
);
|
|
179762
180205
|
}
|
|
179763
|
-
var import_error_utils28,
|
|
180206
|
+
var import_error_utils28, import_chalk110, import_format3, deprecatedFlags, DATE_TIME_FORMAT;
|
|
179764
180207
|
var init_logs3 = __esm({
|
|
179765
180208
|
"src/commands/logs/index.ts"() {
|
|
179766
180209
|
"use strict";
|
|
179767
180210
|
import_error_utils28 = __toESM3(require_dist2());
|
|
179768
|
-
|
|
180211
|
+
import_chalk110 = __toESM3(require_source());
|
|
179769
180212
|
import_format3 = __toESM3(require_format());
|
|
179770
180213
|
init_build_state();
|
|
179771
180214
|
init_is_deploying();
|
|
@@ -180309,7 +180752,7 @@ async function pull2(client2) {
|
|
|
180309
180752
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
180310
180753
|
const { contextName } = await getScope(client2);
|
|
180311
180754
|
output_manager_default.spinner(
|
|
180312
|
-
`Fetching microfrontends configuration in ${
|
|
180755
|
+
`Fetching microfrontends configuration in ${import_chalk111.default.bold(contextName)}`
|
|
180313
180756
|
);
|
|
180314
180757
|
let parsedArgs;
|
|
180315
180758
|
const flagsSpecification = getFlagsSpecification(pullSubcommand2.options);
|
|
@@ -180357,11 +180800,11 @@ async function pull2(client2) {
|
|
|
180357
180800
|
const microfrontendsStamp = stamp_default();
|
|
180358
180801
|
output_manager_default.print(
|
|
180359
180802
|
`${prependEmoji(
|
|
180360
|
-
`Downloaded microfrontends configuration to ${
|
|
180803
|
+
`Downloaded microfrontends configuration to ${import_chalk111.default.bold(
|
|
180361
180804
|
humanizePath(
|
|
180362
180805
|
(0, import_node_path5.join)(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS)
|
|
180363
180806
|
)
|
|
180364
|
-
)} ${
|
|
180807
|
+
)} ${import_chalk111.default.gray(microfrontendsStamp())}`,
|
|
180365
180808
|
emoji("success")
|
|
180366
180809
|
)}
|
|
180367
180810
|
`
|
|
@@ -180373,11 +180816,11 @@ async function pull2(client2) {
|
|
|
180373
180816
|
return 1;
|
|
180374
180817
|
}
|
|
180375
180818
|
}
|
|
180376
|
-
var
|
|
180819
|
+
var import_chalk111, import_node_path5, import_fs_extra23, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS;
|
|
180377
180820
|
var init_pull5 = __esm({
|
|
180378
180821
|
"src/commands/microfrontends/pull.ts"() {
|
|
180379
180822
|
"use strict";
|
|
180380
|
-
|
|
180823
|
+
import_chalk111 = __toESM3(require_source());
|
|
180381
180824
|
import_node_path5 = require("path");
|
|
180382
180825
|
init_output_manager();
|
|
180383
180826
|
init_get_scope();
|
|
@@ -180530,12 +180973,12 @@ async function add6(client2, argv) {
|
|
|
180530
180973
|
const { args: args2 } = parsedArgs;
|
|
180531
180974
|
if (args2.length !== 1) {
|
|
180532
180975
|
output_manager_default.error(
|
|
180533
|
-
`Invalid number of arguments. Usage: ${
|
|
180976
|
+
`Invalid number of arguments. Usage: ${import_chalk112.default.cyan(
|
|
180534
180977
|
`${getCommandName("project add <name>")}`
|
|
180535
180978
|
)}`
|
|
180536
180979
|
);
|
|
180537
180980
|
if (args2.length > 1) {
|
|
180538
|
-
const example =
|
|
180981
|
+
const example = import_chalk112.default.cyan(
|
|
180539
180982
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
|
180540
180983
|
);
|
|
180541
180984
|
output_manager_default.log(
|
|
@@ -180563,17 +181006,17 @@ async function add6(client2, argv) {
|
|
|
180563
181006
|
const elapsed2 = (0, import_ms21.default)(Date.now() - start);
|
|
180564
181007
|
const { contextName } = await getScope(client2);
|
|
180565
181008
|
output_manager_default.log(
|
|
180566
|
-
`${
|
|
181009
|
+
`${import_chalk112.default.cyan("Success!")} Project ${import_chalk112.default.bold(
|
|
180567
181010
|
name.toLowerCase()
|
|
180568
|
-
)} added (${
|
|
181011
|
+
)} added (${import_chalk112.default.bold(contextName)}) ${import_chalk112.default.gray(`[${elapsed2}]`)}`
|
|
180569
181012
|
);
|
|
180570
181013
|
return 0;
|
|
180571
181014
|
}
|
|
180572
|
-
var
|
|
181015
|
+
var import_chalk112, import_ms21;
|
|
180573
181016
|
var init_add12 = __esm({
|
|
180574
181017
|
"src/commands/project/add.ts"() {
|
|
180575
181018
|
"use strict";
|
|
180576
|
-
|
|
181019
|
+
import_chalk112 = __toESM3(require_source());
|
|
180577
181020
|
import_ms21 = __toESM3(require_ms());
|
|
180578
181021
|
init_errors_ts();
|
|
180579
181022
|
init_pkg_name();
|
|
@@ -180672,7 +181115,7 @@ async function inspect4(client2, argv) {
|
|
|
180672
181115
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
180673
181116
|
if (args2.length !== 0 && args2.length !== 1) {
|
|
180674
181117
|
output_manager_default.error(
|
|
180675
|
-
`Invalid number of arguments. Usage: ${
|
|
181118
|
+
`Invalid number of arguments. Usage: ${import_chalk113.default.cyan(
|
|
180676
181119
|
`${getCommandName("project inspect <name>")}`
|
|
180677
181120
|
)}`
|
|
180678
181121
|
);
|
|
@@ -180687,52 +181130,52 @@ async function inspect4(client2, argv) {
|
|
|
180687
181130
|
});
|
|
180688
181131
|
const org = await getTeamById(client2, project.accountId);
|
|
180689
181132
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
180690
|
-
output_manager_default.log(`Found Project ${projectSlugLink} ${
|
|
181133
|
+
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk113.default.gray(inspectStamp())}`);
|
|
180691
181134
|
output_manager_default.print("\n");
|
|
180692
|
-
output_manager_default.print(
|
|
180693
|
-
output_manager_default.print(` ${
|
|
181135
|
+
output_manager_default.print(import_chalk113.default.bold(" General\n\n"));
|
|
181136
|
+
output_manager_default.print(` ${import_chalk113.default.cyan("ID")} ${project.id}
|
|
180694
181137
|
`);
|
|
180695
|
-
output_manager_default.print(` ${
|
|
181138
|
+
output_manager_default.print(` ${import_chalk113.default.cyan("Name")} ${project.name}
|
|
180696
181139
|
`);
|
|
180697
|
-
output_manager_default.print(` ${
|
|
181140
|
+
output_manager_default.print(` ${import_chalk113.default.cyan("Owner")} ${org.name}
|
|
180698
181141
|
`);
|
|
180699
181142
|
output_manager_default.print(
|
|
180700
|
-
` ${
|
|
181143
|
+
` ${import_chalk113.default.cyan("Created At")} ${formatDate(project.createdAt)}
|
|
180701
181144
|
`
|
|
180702
181145
|
);
|
|
180703
181146
|
output_manager_default.print(
|
|
180704
|
-
` ${
|
|
181147
|
+
` ${import_chalk113.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
|
|
180705
181148
|
`
|
|
180706
181149
|
);
|
|
180707
181150
|
output_manager_default.print(
|
|
180708
|
-
` ${
|
|
181151
|
+
` ${import_chalk113.default.cyan("Node.js Version")} ${project.nodeVersion}
|
|
180709
181152
|
`
|
|
180710
181153
|
);
|
|
180711
181154
|
const framework = import_frameworks7.frameworkList.find((f) => f.slug === project.framework);
|
|
180712
181155
|
output_manager_default.print("\n");
|
|
180713
|
-
output_manager_default.print(
|
|
180714
|
-
output_manager_default.print(` ${
|
|
181156
|
+
output_manager_default.print(import_chalk113.default.bold(" Framework Settings\n\n"));
|
|
181157
|
+
output_manager_default.print(` ${import_chalk113.default.cyan("Framework Preset")} ${framework?.name}
|
|
180715
181158
|
`);
|
|
180716
181159
|
output_manager_default.print(
|
|
180717
|
-
` ${
|
|
181160
|
+
` ${import_chalk113.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk113.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
|
|
180718
181161
|
`
|
|
180719
181162
|
);
|
|
180720
181163
|
output_manager_default.print(
|
|
180721
|
-
` ${
|
|
181164
|
+
` ${import_chalk113.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk113.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
|
|
180722
181165
|
`
|
|
180723
181166
|
);
|
|
180724
181167
|
output_manager_default.print(
|
|
180725
|
-
` ${
|
|
181168
|
+
` ${import_chalk113.default.cyan("Install Command")} ${project.installCommand ?? import_chalk113.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
|
|
180726
181169
|
`
|
|
180727
181170
|
);
|
|
180728
181171
|
output_manager_default.print("\n");
|
|
180729
181172
|
return 0;
|
|
180730
181173
|
}
|
|
180731
|
-
var
|
|
181174
|
+
var import_chalk113, import_frameworks7;
|
|
180732
181175
|
var init_inspect6 = __esm({
|
|
180733
181176
|
"src/commands/project/inspect.ts"() {
|
|
180734
181177
|
"use strict";
|
|
180735
|
-
|
|
181178
|
+
import_chalk113 = __toESM3(require_source());
|
|
180736
181179
|
import_frameworks7 = __toESM3(require_frameworks());
|
|
180737
181180
|
init_pkg_name();
|
|
180738
181181
|
init_inspect5();
|
|
@@ -180796,7 +181239,7 @@ async function list6(client2, argv) {
|
|
|
180796
181239
|
const { args: args2, flags: opts } = parsedArgs;
|
|
180797
181240
|
if (args2.length !== 0) {
|
|
180798
181241
|
output_manager_default.error(
|
|
180799
|
-
`Invalid number of arguments. Usage: ${
|
|
181242
|
+
`Invalid number of arguments. Usage: ${import_chalk114.default.cyan(
|
|
180800
181243
|
`${getCommandName("project ls")}`
|
|
180801
181244
|
)}`
|
|
180802
181245
|
);
|
|
@@ -180804,7 +181247,7 @@ async function list6(client2, argv) {
|
|
|
180804
181247
|
}
|
|
180805
181248
|
const start = Date.now();
|
|
180806
181249
|
const { contextName } = await getScope(client2);
|
|
180807
|
-
output_manager_default.spinner(`Fetching projects in ${
|
|
181250
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk114.default.bold(contextName)}`);
|
|
180808
181251
|
const flags = processFlags(opts, telemetryClient);
|
|
180809
181252
|
const projectsUrl = buildProjectsUrl(flags);
|
|
180810
181253
|
const {
|
|
@@ -180877,7 +181320,7 @@ function outputJson(client2, projectList, metadata) {
|
|
|
180877
181320
|
function outputTable(projectList, options) {
|
|
180878
181321
|
const { contextName, elapsed: elapsed2, deprecated, opts, pagination } = options;
|
|
180879
181322
|
output_manager_default.log(
|
|
180880
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
|
181323
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk114.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk114.default.gray(`[${elapsed2}]`)}`
|
|
180881
181324
|
);
|
|
180882
181325
|
if (projectList.length > 0) {
|
|
180883
181326
|
printProjectsTable(projectList);
|
|
@@ -180887,12 +181330,12 @@ function outputTable(projectList, options) {
|
|
|
180887
181330
|
function printProjectsTable(projectList) {
|
|
180888
181331
|
const tablePrint = table(
|
|
180889
181332
|
[
|
|
180890
|
-
TABLE_HEADERS.map((header) =>
|
|
181333
|
+
TABLE_HEADERS.map((header) => import_chalk114.default.bold(import_chalk114.default.cyan(header))),
|
|
180891
181334
|
...projectList.flatMap((project) => [
|
|
180892
181335
|
[
|
|
180893
|
-
|
|
181336
|
+
import_chalk114.default.bold(project.name),
|
|
180894
181337
|
getLatestProdUrl(project),
|
|
180895
|
-
|
|
181338
|
+
import_chalk114.default.gray((0, import_ms22.default)(Date.now() - project.updatedAt)),
|
|
180896
181339
|
project.nodeVersion ?? ""
|
|
180897
181340
|
]
|
|
180898
181341
|
])
|
|
@@ -180917,12 +181360,12 @@ function getLatestProdUrl(project) {
|
|
|
180917
181360
|
return `https://${alias2}`;
|
|
180918
181361
|
return "--";
|
|
180919
181362
|
}
|
|
180920
|
-
var import_ms22,
|
|
181363
|
+
var import_ms22, import_chalk114, TABLE_HEADERS, PAGINATION_FLAGS_TO_EXCLUDE, BASE_PROJECTS_URL;
|
|
180921
181364
|
var init_list10 = __esm({
|
|
180922
181365
|
"src/commands/project/list.ts"() {
|
|
180923
181366
|
"use strict";
|
|
180924
181367
|
import_ms22 = __toESM3(require_ms());
|
|
180925
|
-
|
|
181368
|
+
import_chalk114 = __toESM3(require_source());
|
|
180926
181369
|
init_table();
|
|
180927
181370
|
init_get_command_flags();
|
|
180928
181371
|
init_pkg_name();
|
|
@@ -180981,7 +181424,7 @@ async function rm6(client2, argv) {
|
|
|
180981
181424
|
const { args: args2 } = parsedArgs;
|
|
180982
181425
|
if (args2.length !== 1) {
|
|
180983
181426
|
output_manager_default.error(
|
|
180984
|
-
`Invalid number of arguments. Usage: ${
|
|
181427
|
+
`Invalid number of arguments. Usage: ${import_chalk115.default.cyan(
|
|
180985
181428
|
`${getCommandName("project rm <name>")}`
|
|
180986
181429
|
)}`
|
|
180987
181430
|
);
|
|
@@ -181011,7 +181454,7 @@ async function rm6(client2, argv) {
|
|
|
181011
181454
|
}
|
|
181012
181455
|
const elapsed2 = (0, import_ms23.default)(Date.now() - start);
|
|
181013
181456
|
output_manager_default.log(
|
|
181014
|
-
`${
|
|
181457
|
+
`${import_chalk115.default.cyan("Success!")} Project ${import_chalk115.default.bold(name)} removed ${import_chalk115.default.gray(
|
|
181015
181458
|
`[${elapsed2}]`
|
|
181016
181459
|
)}`
|
|
181017
181460
|
);
|
|
@@ -181020,22 +181463,22 @@ async function rm6(client2, argv) {
|
|
|
181020
181463
|
async function readConfirmation3(client2, projectName) {
|
|
181021
181464
|
output_manager_default.print(
|
|
181022
181465
|
prependEmoji(
|
|
181023
|
-
`The project ${
|
|
181466
|
+
`The project ${import_chalk115.default.bold(projectName)} will be removed permanently.
|
|
181024
181467
|
It will also delete everything under the project including deployments.
|
|
181025
181468
|
`,
|
|
181026
181469
|
emoji("warning")
|
|
181027
181470
|
)
|
|
181028
181471
|
);
|
|
181029
181472
|
return await client2.input.confirm(
|
|
181030
|
-
`${
|
|
181473
|
+
`${import_chalk115.default.bold.red("Are you sure?")}`,
|
|
181031
181474
|
false
|
|
181032
181475
|
);
|
|
181033
181476
|
}
|
|
181034
|
-
var
|
|
181477
|
+
var import_chalk115, import_ms23, e;
|
|
181035
181478
|
var init_rm10 = __esm({
|
|
181036
181479
|
"src/commands/project/rm.ts"() {
|
|
181037
181480
|
"use strict";
|
|
181038
|
-
|
|
181481
|
+
import_chalk115 = __toESM3(require_source());
|
|
181039
181482
|
import_ms23 = __toESM3(require_ms());
|
|
181040
181483
|
init_emoji();
|
|
181041
181484
|
init_errors_ts();
|
|
@@ -181203,7 +181646,7 @@ async function getProjectByDeployment({
|
|
|
181203
181646
|
let team;
|
|
181204
181647
|
try {
|
|
181205
181648
|
output_manager_default?.spinner(
|
|
181206
|
-
`Fetching deployment "${deployId}" in ${
|
|
181649
|
+
`Fetching deployment "${deployId}" in ${import_chalk116.default.bold(contextName)}\u2026`
|
|
181207
181650
|
);
|
|
181208
181651
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
181209
181652
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -181220,12 +181663,12 @@ async function getProjectByDeployment({
|
|
|
181220
181663
|
team = teamResult.value;
|
|
181221
181664
|
deployment = deploymentResult.value;
|
|
181222
181665
|
output_manager_default?.log(
|
|
181223
|
-
`Fetching deployment "${deployId}" in ${
|
|
181666
|
+
`Fetching deployment "${deployId}" in ${import_chalk116.default.bold(contextName)}\u2026`
|
|
181224
181667
|
);
|
|
181225
181668
|
if (deployment.team?.id) {
|
|
181226
181669
|
if (!team || deployment.team.id !== team.id) {
|
|
181227
181670
|
const err = new Error(
|
|
181228
|
-
team ? `Deployment doesn't belong to current team ${
|
|
181671
|
+
team ? `Deployment doesn't belong to current team ${import_chalk116.default.bold(
|
|
181229
181672
|
contextName
|
|
181230
181673
|
)}` : `Deployment belongs to a different team`
|
|
181231
181674
|
);
|
|
@@ -181234,7 +181677,7 @@ async function getProjectByDeployment({
|
|
|
181234
181677
|
}
|
|
181235
181678
|
} else if (team) {
|
|
181236
181679
|
const err = new Error(
|
|
181237
|
-
`Deployment doesn't belong to current team ${
|
|
181680
|
+
`Deployment doesn't belong to current team ${import_chalk116.default.bold(contextName)}`
|
|
181238
181681
|
);
|
|
181239
181682
|
err.code = "ERR_INVALID_TEAM";
|
|
181240
181683
|
throw err;
|
|
@@ -181255,11 +181698,11 @@ async function getProjectByDeployment({
|
|
|
181255
181698
|
output_manager_default?.stopSpinner();
|
|
181256
181699
|
}
|
|
181257
181700
|
}
|
|
181258
|
-
var
|
|
181701
|
+
var import_chalk116;
|
|
181259
181702
|
var init_get_project_by_deployment = __esm({
|
|
181260
181703
|
"src/util/projects/get-project-by-deployment.ts"() {
|
|
181261
181704
|
"use strict";
|
|
181262
|
-
|
|
181705
|
+
import_chalk116 = __toESM3(require_source());
|
|
181263
181706
|
init_get_deployment();
|
|
181264
181707
|
init_get_project_by_id_or_name();
|
|
181265
181708
|
init_get_scope();
|
|
@@ -181273,21 +181716,21 @@ var init_get_project_by_deployment = __esm({
|
|
|
181273
181716
|
// src/util/alias/render-alias-status.ts
|
|
181274
181717
|
function renderAliasStatus(status3) {
|
|
181275
181718
|
if (status3 === "completed") {
|
|
181276
|
-
return
|
|
181719
|
+
return import_chalk117.default.green(status3);
|
|
181277
181720
|
}
|
|
181278
181721
|
if (status3 === "failed") {
|
|
181279
|
-
return
|
|
181722
|
+
return import_chalk117.default.red(status3);
|
|
181280
181723
|
}
|
|
181281
181724
|
if (status3 === "skipped") {
|
|
181282
|
-
return
|
|
181725
|
+
return import_chalk117.default.gray(status3);
|
|
181283
181726
|
}
|
|
181284
|
-
return
|
|
181727
|
+
return import_chalk117.default.yellow(status3);
|
|
181285
181728
|
}
|
|
181286
|
-
var
|
|
181729
|
+
var import_chalk117;
|
|
181287
181730
|
var init_render_alias_status = __esm({
|
|
181288
181731
|
"src/util/alias/render-alias-status.ts"() {
|
|
181289
181732
|
"use strict";
|
|
181290
|
-
|
|
181733
|
+
import_chalk117 = __toESM3(require_source());
|
|
181291
181734
|
}
|
|
181292
181735
|
});
|
|
181293
181736
|
|
|
@@ -181394,7 +181837,7 @@ async function promoteStatus({
|
|
|
181394
181837
|
}
|
|
181395
181838
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
|
181396
181839
|
output_manager_default.log(
|
|
181397
|
-
`The promotion exceeded its deadline - rerun ${
|
|
181840
|
+
`The promotion exceeded its deadline - rerun ${import_chalk118.default.bold(
|
|
181398
181841
|
`${packageName} promote ${toDeploymentId}`
|
|
181399
181842
|
)} to try again`
|
|
181400
181843
|
);
|
|
@@ -181458,26 +181901,26 @@ async function renderJobSucceeded({
|
|
|
181458
181901
|
let deploymentInfo = "";
|
|
181459
181902
|
try {
|
|
181460
181903
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
181461
|
-
deploymentInfo = `${
|
|
181904
|
+
deploymentInfo = `${import_chalk118.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
181462
181905
|
} catch (err) {
|
|
181463
181906
|
output_manager_default.debug(
|
|
181464
181907
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
181465
181908
|
);
|
|
181466
|
-
deploymentInfo =
|
|
181909
|
+
deploymentInfo = import_chalk118.default.bold(toDeploymentId);
|
|
181467
181910
|
}
|
|
181468
181911
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
|
181469
181912
|
output_manager_default.log(
|
|
181470
|
-
`Success! ${
|
|
181913
|
+
`Success! ${import_chalk118.default.bold(
|
|
181471
181914
|
project.name
|
|
181472
181915
|
)} was promoted to ${deploymentInfo} ${duration}`
|
|
181473
181916
|
);
|
|
181474
181917
|
return 0;
|
|
181475
181918
|
}
|
|
181476
|
-
var
|
|
181919
|
+
var import_chalk118, import_ms24;
|
|
181477
181920
|
var init_status2 = __esm({
|
|
181478
181921
|
"src/commands/promote/status.ts"() {
|
|
181479
181922
|
"use strict";
|
|
181480
|
-
|
|
181923
|
+
import_chalk118 = __toESM3(require_source());
|
|
181481
181924
|
init_elapsed();
|
|
181482
181925
|
init_format_date();
|
|
181483
181926
|
init_get_deployment();
|
|
@@ -181534,7 +181977,7 @@ async function requestPromote({
|
|
|
181534
181977
|
}
|
|
181535
181978
|
);
|
|
181536
181979
|
output_manager_default.log(
|
|
181537
|
-
`Successfully created new deployment of ${
|
|
181980
|
+
`Successfully created new deployment of ${import_chalk119.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
|
181538
181981
|
);
|
|
181539
181982
|
return 0;
|
|
181540
181983
|
}
|
|
@@ -181555,7 +181998,7 @@ async function requestPromote({
|
|
|
181555
181998
|
}
|
|
181556
181999
|
if (timeout !== void 0 && (0, import_ms25.default)(timeout) === 0) {
|
|
181557
182000
|
output_manager_default.log(
|
|
181558
|
-
`Successfully requested promote of ${
|
|
182001
|
+
`Successfully requested promote of ${import_chalk119.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
181559
182002
|
);
|
|
181560
182003
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
|
181561
182004
|
return 0;
|
|
@@ -181568,11 +182011,11 @@ async function requestPromote({
|
|
|
181568
182011
|
timeout
|
|
181569
182012
|
});
|
|
181570
182013
|
}
|
|
181571
|
-
var
|
|
182014
|
+
var import_chalk119, import_ms25;
|
|
181572
182015
|
var init_request_promote = __esm({
|
|
181573
182016
|
"src/commands/promote/request-promote.ts"() {
|
|
181574
182017
|
"use strict";
|
|
181575
|
-
|
|
182018
|
+
import_chalk119 = __toESM3(require_source());
|
|
181576
182019
|
init_pkg_name();
|
|
181577
182020
|
init_get_project_by_deployment();
|
|
181578
182021
|
import_ms25 = __toESM3(require_ms());
|
|
@@ -181733,7 +182176,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181733
182176
|
let team;
|
|
181734
182177
|
try {
|
|
181735
182178
|
output_manager_default.spinner(
|
|
181736
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
182179
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk120.default.bold(contextName)}\u2026`
|
|
181737
182180
|
);
|
|
181738
182181
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
181739
182182
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -181750,7 +182193,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181750
182193
|
team = teamResult.value;
|
|
181751
182194
|
deployment = deploymentResult.value;
|
|
181752
182195
|
output_manager_default.log(
|
|
181753
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
182196
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk120.default.bold(contextName)}\u2026`
|
|
181754
182197
|
);
|
|
181755
182198
|
} finally {
|
|
181756
182199
|
output_manager_default.stopSpinner();
|
|
@@ -181758,7 +182201,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181758
182201
|
if (deployment.team?.id) {
|
|
181759
182202
|
if (!team || deployment.team.id !== team.id) {
|
|
181760
182203
|
const err = new Error(
|
|
181761
|
-
team ? `Deployment doesn't belong to current team ${
|
|
182204
|
+
team ? `Deployment doesn't belong to current team ${import_chalk120.default.bold(
|
|
181762
182205
|
contextName
|
|
181763
182206
|
)}` : `Deployment belongs to a different team`
|
|
181764
182207
|
);
|
|
@@ -181767,18 +182210,18 @@ async function getDeploymentByIdOrURL({
|
|
|
181767
182210
|
}
|
|
181768
182211
|
} else if (team) {
|
|
181769
182212
|
const err = new Error(
|
|
181770
|
-
`Deployment doesn't belong to current team ${
|
|
182213
|
+
`Deployment doesn't belong to current team ${import_chalk120.default.bold(contextName)}`
|
|
181771
182214
|
);
|
|
181772
182215
|
err.code = "ERR_INVALID_TEAM";
|
|
181773
182216
|
throw err;
|
|
181774
182217
|
}
|
|
181775
182218
|
return deployment;
|
|
181776
182219
|
}
|
|
181777
|
-
var
|
|
182220
|
+
var import_chalk120;
|
|
181778
182221
|
var init_get_deployment_by_id_or_url = __esm({
|
|
181779
182222
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
|
181780
182223
|
"use strict";
|
|
181781
|
-
|
|
182224
|
+
import_chalk120 = __toESM3(require_source());
|
|
181782
182225
|
init_get_deployment();
|
|
181783
182226
|
init_get_team_by_id();
|
|
181784
182227
|
init_is_valid_name();
|
|
@@ -181917,14 +182360,14 @@ async function redeploy(client2) {
|
|
|
181917
182360
|
}
|
|
181918
182361
|
output_manager_default.print(
|
|
181919
182362
|
`${prependEmoji(
|
|
181920
|
-
`Inspect: ${
|
|
182363
|
+
`Inspect: ${import_chalk121.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
|
181921
182364
|
emoji("inspect")
|
|
181922
182365
|
)}
|
|
181923
182366
|
`
|
|
181924
182367
|
);
|
|
181925
182368
|
output_manager_default.print(
|
|
181926
182369
|
prependEmoji(
|
|
181927
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
|
182370
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk121.default.bold(
|
|
181928
182371
|
previewUrl
|
|
181929
182372
|
)} ${deployStamp()}`,
|
|
181930
182373
|
emoji("success")
|
|
@@ -182005,17 +182448,17 @@ async function redeploy(client2) {
|
|
|
182005
182448
|
output_manager_default.prettyError(err);
|
|
182006
182449
|
if ((0, import_error_utils32.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
|
182007
182450
|
output_manager_default.error(
|
|
182008
|
-
`Use ${
|
|
182451
|
+
`Use ${import_chalk121.default.bold("vc switch")} to change your current team`
|
|
182009
182452
|
);
|
|
182010
182453
|
}
|
|
182011
182454
|
return 1;
|
|
182012
182455
|
}
|
|
182013
182456
|
}
|
|
182014
|
-
var
|
|
182457
|
+
var import_chalk121, import_client13, import_error_utils32;
|
|
182015
182458
|
var init_redeploy2 = __esm({
|
|
182016
182459
|
"src/commands/redeploy/index.ts"() {
|
|
182017
182460
|
"use strict";
|
|
182018
|
-
|
|
182461
|
+
import_chalk121 = __toESM3(require_source());
|
|
182019
182462
|
import_client13 = __toESM3(require_dist7());
|
|
182020
182463
|
init_emoji();
|
|
182021
182464
|
init_get_args();
|
|
@@ -182223,7 +182666,7 @@ async function remove5(client2) {
|
|
|
182223
182666
|
}
|
|
182224
182667
|
const { contextName } = await getScope(client2);
|
|
182225
182668
|
output_manager_default.spinner(
|
|
182226
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
|
182669
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk122.default.bold(contextName)}`
|
|
182227
182670
|
);
|
|
182228
182671
|
let aliases;
|
|
182229
182672
|
let projects;
|
|
@@ -182289,7 +182732,7 @@ async function remove5(client2) {
|
|
|
182289
182732
|
});
|
|
182290
182733
|
if (deployments.length === 0 && projects.length === 0) {
|
|
182291
182734
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
|
182292
|
-
const stylizedIds = ids.map((id) =>
|
|
182735
|
+
const stylizedIds = ids.map((id) => import_chalk122.default.bold(`"${id}"`)).join(", ");
|
|
182293
182736
|
const commandName = getCommandName("projects ls");
|
|
182294
182737
|
log2(
|
|
182295
182738
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
|
@@ -182297,7 +182740,7 @@ async function remove5(client2) {
|
|
|
182297
182740
|
return 1;
|
|
182298
182741
|
}
|
|
182299
182742
|
log2(
|
|
182300
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
|
182743
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk122.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
|
182301
182744
|
);
|
|
182302
182745
|
if (deployments.length > 200) {
|
|
182303
182746
|
output_manager_default.warn(
|
|
@@ -182324,11 +182767,11 @@ async function remove5(client2) {
|
|
|
182324
182767
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
|
182325
182768
|
);
|
|
182326
182769
|
deployments.forEach((depl) => {
|
|
182327
|
-
output_manager_default.print(`${
|
|
182770
|
+
output_manager_default.print(`${import_chalk122.default.gray("-")} ${import_chalk122.default.bold(depl.url)}
|
|
182328
182771
|
`);
|
|
182329
182772
|
});
|
|
182330
182773
|
projects.forEach((project) => {
|
|
182331
|
-
output_manager_default.print(`${
|
|
182774
|
+
output_manager_default.print(`${import_chalk122.default.gray("-")} ${import_chalk122.default.bold(project.name)}
|
|
182332
182775
|
`);
|
|
182333
182776
|
});
|
|
182334
182777
|
return 0;
|
|
@@ -182345,8 +182788,8 @@ function readConfirmation4(deployments, projects) {
|
|
|
182345
182788
|
);
|
|
182346
182789
|
const deploymentTable = table(
|
|
182347
182790
|
deployments.map((depl) => {
|
|
182348
|
-
const time =
|
|
182349
|
-
const url3 = depl.url ?
|
|
182791
|
+
const time = import_chalk122.default.gray(`${(0, import_ms27.default)(Date.now() - depl.createdAt)} ago`);
|
|
182792
|
+
const url3 = depl.url ? import_chalk122.default.underline(`https://${depl.url}`) : "";
|
|
182350
182793
|
return [` ${depl.id}`, url3, time];
|
|
182351
182794
|
}),
|
|
182352
182795
|
{ align: ["l", "r", "l"], hsep: 6 }
|
|
@@ -182357,7 +182800,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
182357
182800
|
for (const depl of deployments) {
|
|
182358
182801
|
for (const { alias: alias2 } of depl.aliases) {
|
|
182359
182802
|
output_manager_default.warn(
|
|
182360
|
-
`${
|
|
182803
|
+
`${import_chalk122.default.underline(`https://${alias2}`)} is an alias for ${import_chalk122.default.bold(depl.url)} and will be removed`
|
|
182361
182804
|
);
|
|
182362
182805
|
}
|
|
182363
182806
|
}
|
|
@@ -182371,12 +182814,12 @@ function readConfirmation4(deployments, projects) {
|
|
|
182371
182814
|
`
|
|
182372
182815
|
);
|
|
182373
182816
|
for (const project of projects) {
|
|
182374
|
-
output_manager_default.print(`${
|
|
182817
|
+
output_manager_default.print(`${import_chalk122.default.gray("-")} ${import_chalk122.default.bold(project.name)}
|
|
182375
182818
|
`);
|
|
182376
182819
|
}
|
|
182377
182820
|
}
|
|
182378
182821
|
output_manager_default.print(
|
|
182379
|
-
`${
|
|
182822
|
+
`${import_chalk122.default.bold.red("> Are you sure?")} ${import_chalk122.default.gray("(y/N) ")}`
|
|
182380
182823
|
);
|
|
182381
182824
|
process.stdin.on("data", (d) => {
|
|
182382
182825
|
process.stdin.pause();
|
|
@@ -182393,11 +182836,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
|
182393
182836
|
}
|
|
182394
182837
|
return `${(0, import_pluralize13.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize13.default)("project", projects.length, true)}`;
|
|
182395
182838
|
}
|
|
182396
|
-
var
|
|
182839
|
+
var import_chalk122, import_ms27, import_pluralize13;
|
|
182397
182840
|
var init_remove6 = __esm({
|
|
182398
182841
|
"src/commands/remove/index.ts"() {
|
|
182399
182842
|
"use strict";
|
|
182400
|
-
|
|
182843
|
+
import_chalk122 = __toESM3(require_source());
|
|
182401
182844
|
import_ms27 = __toESM3(require_ms());
|
|
182402
182845
|
import_pluralize13 = __toESM3(require_pluralize());
|
|
182403
182846
|
init_table();
|
|
@@ -182493,7 +182936,7 @@ async function rollbackStatus({
|
|
|
182493
182936
|
}
|
|
182494
182937
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
|
182495
182938
|
output_manager_default.log(
|
|
182496
|
-
`The rollback exceeded its deadline - rerun ${
|
|
182939
|
+
`The rollback exceeded its deadline - rerun ${import_chalk123.default.bold(
|
|
182497
182940
|
`${packageName} rollback ${toDeploymentId}`
|
|
182498
182941
|
)} to try again`
|
|
182499
182942
|
);
|
|
@@ -182557,26 +183000,26 @@ async function renderJobSucceeded2({
|
|
|
182557
183000
|
let deploymentInfo = "";
|
|
182558
183001
|
try {
|
|
182559
183002
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
182560
|
-
deploymentInfo = `${
|
|
183003
|
+
deploymentInfo = `${import_chalk123.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
182561
183004
|
} catch (err) {
|
|
182562
183005
|
output_manager_default.debug(
|
|
182563
183006
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
182564
183007
|
);
|
|
182565
|
-
deploymentInfo =
|
|
183008
|
+
deploymentInfo = import_chalk123.default.bold(toDeploymentId);
|
|
182566
183009
|
}
|
|
182567
183010
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
|
182568
183011
|
output_manager_default.log(
|
|
182569
|
-
`Success! ${
|
|
183012
|
+
`Success! ${import_chalk123.default.bold(
|
|
182570
183013
|
project.name
|
|
182571
183014
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
|
182572
183015
|
);
|
|
182573
183016
|
return 0;
|
|
182574
183017
|
}
|
|
182575
|
-
var
|
|
183018
|
+
var import_chalk123, import_ms28;
|
|
182576
183019
|
var init_status3 = __esm({
|
|
182577
183020
|
"src/commands/rollback/status.ts"() {
|
|
182578
183021
|
"use strict";
|
|
182579
|
-
|
|
183022
|
+
import_chalk123 = __toESM3(require_source());
|
|
182580
183023
|
init_elapsed();
|
|
182581
183024
|
init_format_date();
|
|
182582
183025
|
init_get_deployment();
|
|
@@ -182608,7 +183051,7 @@ async function requestRollback({
|
|
|
182608
183051
|
});
|
|
182609
183052
|
if (timeout !== void 0 && (0, import_ms29.default)(timeout) === 0) {
|
|
182610
183053
|
output_manager_default.log(
|
|
182611
|
-
`Successfully requested rollback of ${
|
|
183054
|
+
`Successfully requested rollback of ${import_chalk124.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
182612
183055
|
);
|
|
182613
183056
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
|
182614
183057
|
return 0;
|
|
@@ -182621,11 +183064,11 @@ async function requestRollback({
|
|
|
182621
183064
|
timeout
|
|
182622
183065
|
});
|
|
182623
183066
|
}
|
|
182624
|
-
var
|
|
183067
|
+
var import_chalk124, import_ms29;
|
|
182625
183068
|
var init_request_rollback = __esm({
|
|
182626
183069
|
"src/commands/rollback/request-rollback.ts"() {
|
|
182627
183070
|
"use strict";
|
|
182628
|
-
|
|
183071
|
+
import_chalk124 = __toESM3(require_source());
|
|
182629
183072
|
init_pkg_name();
|
|
182630
183073
|
init_get_project_by_deployment();
|
|
182631
183074
|
import_ms29 = __toESM3(require_ms());
|
|
@@ -183295,17 +183738,17 @@ function formatBranchMatcher(branchMatcher) {
|
|
|
183295
183738
|
if (branchMatcher?.type === "equals") {
|
|
183296
183739
|
return branchMatcher.pattern;
|
|
183297
183740
|
} else if (branchMatcher?.type === "startsWith") {
|
|
183298
|
-
return `${branchMatcher.pattern}${
|
|
183741
|
+
return `${branchMatcher.pattern}${import_chalk125.default.dim("*")}`;
|
|
183299
183742
|
} else if (branchMatcher?.type === "endsWith") {
|
|
183300
|
-
return `${
|
|
183743
|
+
return `${import_chalk125.default.dim("*")}${branchMatcher.pattern}`;
|
|
183301
183744
|
}
|
|
183302
|
-
return
|
|
183745
|
+
return import_chalk125.default.dim("No branch configuration");
|
|
183303
183746
|
}
|
|
183304
183747
|
async function list7(client2, argv) {
|
|
183305
183748
|
const { cwd } = client2;
|
|
183306
183749
|
if (argv.length !== 0) {
|
|
183307
183750
|
output_manager_default.error(
|
|
183308
|
-
`Invalid number of arguments. Usage: ${
|
|
183751
|
+
`Invalid number of arguments. Usage: ${import_chalk125.default.cyan(
|
|
183309
183752
|
`${getCommandName("target ls")}`
|
|
183310
183753
|
)}`
|
|
183311
183754
|
);
|
|
@@ -183329,12 +183772,12 @@ async function list7(client2, argv) {
|
|
|
183329
183772
|
const elapsed2 = (0, import_ms31.default)(Date.now() - start);
|
|
183330
183773
|
result = withDefaultEnvironmentsIncluded(result);
|
|
183331
183774
|
output_manager_default.log(
|
|
183332
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
|
183775
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk125.default.gray(`[${elapsed2}]`)}`
|
|
183333
183776
|
);
|
|
183334
183777
|
const tablePrint = table(
|
|
183335
183778
|
[
|
|
183336
183779
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
|
183337
|
-
(header) =>
|
|
183780
|
+
(header) => import_chalk125.default.bold(import_chalk125.default.cyan(header))
|
|
183338
183781
|
),
|
|
183339
183782
|
...result.flatMap((target) => {
|
|
183340
183783
|
return [
|
|
@@ -183342,7 +183785,7 @@ async function list7(client2, argv) {
|
|
|
183342
183785
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
|
183343
183786
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
|
183344
183787
|
TYPE_MAP[target.type],
|
|
183345
|
-
|
|
183788
|
+
import_chalk125.default.gray(
|
|
183346
183789
|
target.updatedAt > 0 ? (0, import_ms31.default)(Date.now() - target.updatedAt) : "-"
|
|
183347
183790
|
)
|
|
183348
183791
|
]
|
|
@@ -183389,12 +183832,12 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
|
183389
183832
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
|
183390
183833
|
];
|
|
183391
183834
|
}
|
|
183392
|
-
var import_ms31,
|
|
183835
|
+
var import_ms31, import_chalk125, TYPE_MAP, BRANCH_TRACKING_MAP;
|
|
183393
183836
|
var init_list11 = __esm({
|
|
183394
183837
|
"src/commands/target/list.ts"() {
|
|
183395
183838
|
"use strict";
|
|
183396
183839
|
import_ms31 = __toESM3(require_ms());
|
|
183397
|
-
|
|
183840
|
+
import_chalk125 = __toESM3(require_source());
|
|
183398
183841
|
init_table();
|
|
183399
183842
|
init_output_manager();
|
|
183400
183843
|
init_command32();
|
|
@@ -183409,8 +183852,8 @@ var init_list11 = __esm({
|
|
|
183409
183852
|
};
|
|
183410
183853
|
BRANCH_TRACKING_MAP = {
|
|
183411
183854
|
production: (project) => project.link?.productionBranch ?? "main",
|
|
183412
|
-
preview: (_, env) => env.slug === "preview" ?
|
|
183413
|
-
development: () =>
|
|
183855
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk125.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
|
183856
|
+
development: () => import_chalk125.default.dim("Accessible via CLI")
|
|
183414
183857
|
};
|
|
183415
183858
|
}
|
|
183416
183859
|
});
|
|
@@ -183605,7 +184048,7 @@ async function list8(client2, argv) {
|
|
|
183605
184048
|
client2.stdout.write("\n");
|
|
183606
184049
|
const teamTable = table(
|
|
183607
184050
|
[
|
|
183608
|
-
["id", "Team name"].map((str) => (0,
|
|
184051
|
+
["id", "Team name"].map((str) => (0, import_chalk126.gray)(str)),
|
|
183609
184052
|
...teamList.map((team) => [team.value, team.name])
|
|
183610
184053
|
],
|
|
183611
184054
|
{ hsep: 5 }
|
|
@@ -183622,13 +184065,13 @@ async function list8(client2, argv) {
|
|
|
183622
184065
|
}
|
|
183623
184066
|
return 0;
|
|
183624
184067
|
}
|
|
183625
|
-
var
|
|
184068
|
+
var import_chalk126;
|
|
183626
184069
|
var init_list13 = __esm({
|
|
183627
184070
|
"src/commands/teams/list.ts"() {
|
|
183628
184071
|
"use strict";
|
|
183629
184072
|
init_chars();
|
|
183630
184073
|
init_table();
|
|
183631
|
-
|
|
184074
|
+
import_chalk126 = __toESM3(require_source());
|
|
183632
184075
|
init_get_user();
|
|
183633
184076
|
init_get_teams();
|
|
183634
184077
|
init_pkg_name();
|
|
@@ -183723,7 +184166,7 @@ Please select a team scope using ${getCommandName(
|
|
|
183723
184166
|
return 1;
|
|
183724
184167
|
}
|
|
183725
184168
|
output_manager_default.log(
|
|
183726
|
-
introMsg || `Inviting team members to ${
|
|
184169
|
+
introMsg || `Inviting team members to ${import_chalk127.default.bold(currentTeam.name)}`
|
|
183727
184170
|
);
|
|
183728
184171
|
telemetry2.trackCliArgumentEmail(emails);
|
|
183729
184172
|
if (emails.length > 0) {
|
|
@@ -183743,10 +184186,10 @@ Please select a team scope using ${getCommandName(
|
|
|
183743
184186
|
throw err;
|
|
183744
184187
|
}
|
|
183745
184188
|
output_manager_default.log(
|
|
183746
|
-
`${
|
|
184189
|
+
`${import_chalk127.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
|
183747
184190
|
);
|
|
183748
184191
|
} else {
|
|
183749
|
-
output_manager_default.log(`${
|
|
184192
|
+
output_manager_default.log(`${import_chalk127.default.red(`\u2716 ${email3}`)} ${import_chalk127.default.gray("[invalid]")}`);
|
|
183750
184193
|
}
|
|
183751
184194
|
}
|
|
183752
184195
|
return 0;
|
|
@@ -183779,15 +184222,15 @@ Please select a team scope using ${getCommandName(
|
|
|
183779
184222
|
);
|
|
183780
184223
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
|
183781
184224
|
emails.push(email2);
|
|
183782
|
-
output_manager_default.log(`${
|
|
184225
|
+
output_manager_default.log(`${import_chalk127.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
|
183783
184226
|
if (hasError) {
|
|
183784
184227
|
hasError = false;
|
|
183785
184228
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
183786
184229
|
output_manager_default.log(
|
|
183787
|
-
introMsg || `Inviting team members to ${
|
|
184230
|
+
introMsg || `Inviting team members to ${import_chalk127.default.bold(currentTeam.name)}`
|
|
183788
184231
|
);
|
|
183789
184232
|
for (const email3 of emails) {
|
|
183790
|
-
output_manager_default.log(`${
|
|
184233
|
+
output_manager_default.log(`${import_chalk127.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
183791
184234
|
}
|
|
183792
184235
|
}
|
|
183793
184236
|
} catch (err) {
|
|
@@ -183796,7 +184239,7 @@ Please select a team scope using ${getCommandName(
|
|
|
183796
184239
|
output_manager_default.error((0, import_error_utils34.errorToString)(err));
|
|
183797
184240
|
hasError = true;
|
|
183798
184241
|
for (const email3 of emails) {
|
|
183799
|
-
output_manager_default.log(`${
|
|
184242
|
+
output_manager_default.log(`${import_chalk127.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
|
183800
184243
|
}
|
|
183801
184244
|
}
|
|
183802
184245
|
}
|
|
@@ -183809,16 +184252,16 @@ Please select a team scope using ${getCommandName(
|
|
|
183809
184252
|
} else {
|
|
183810
184253
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
|
183811
184254
|
for (const email3 of emails) {
|
|
183812
|
-
output_manager_default.log(`${
|
|
184255
|
+
output_manager_default.log(`${import_chalk127.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
183813
184256
|
}
|
|
183814
184257
|
}
|
|
183815
184258
|
return 0;
|
|
183816
184259
|
}
|
|
183817
|
-
var
|
|
184260
|
+
var import_chalk127, import_error_utils34, validateEmail, domains;
|
|
183818
184261
|
var init_invite2 = __esm({
|
|
183819
184262
|
"src/commands/teams/invite.ts"() {
|
|
183820
184263
|
"use strict";
|
|
183821
|
-
|
|
184264
|
+
import_chalk127 = __toESM3(require_source());
|
|
183822
184265
|
init_cmd();
|
|
183823
184266
|
init_stamp();
|
|
183824
184267
|
init_param();
|
|
@@ -183894,7 +184337,7 @@ async function add7(client2) {
|
|
|
183894
184337
|
let team;
|
|
183895
184338
|
let elapsed2;
|
|
183896
184339
|
output_manager_default.log(
|
|
183897
|
-
`Pick a team identifier for its URL (e.g.: ${
|
|
184340
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk128.default.cyan(
|
|
183898
184341
|
"`vercel.com/acme`"
|
|
183899
184342
|
)})`
|
|
183900
184343
|
);
|
|
@@ -183925,7 +184368,7 @@ async function add7(client2) {
|
|
|
183925
184368
|
output_manager_default.stopSpinner();
|
|
183926
184369
|
process.stdout.write(eraseLines(2));
|
|
183927
184370
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
|
183928
|
-
output_manager_default.log(`${
|
|
184371
|
+
output_manager_default.log(`${import_chalk128.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
|
183929
184372
|
`);
|
|
183930
184373
|
output_manager_default.log("Pick a display name for your team");
|
|
183931
184374
|
let name;
|
|
@@ -183948,7 +184391,7 @@ async function add7(client2) {
|
|
|
183948
184391
|
process.stdout.write(eraseLines(2));
|
|
183949
184392
|
team = Object.assign(team, res);
|
|
183950
184393
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
|
183951
|
-
output_manager_default.log(`${
|
|
184394
|
+
output_manager_default.log(`${import_chalk128.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
|
183952
184395
|
`);
|
|
183953
184396
|
output_manager_default.spinner("Saving");
|
|
183954
184397
|
client2.config.currentTeam = team.id;
|
|
@@ -183962,11 +184405,11 @@ async function add7(client2) {
|
|
|
183962
184405
|
});
|
|
183963
184406
|
return 0;
|
|
183964
184407
|
}
|
|
183965
|
-
var
|
|
184408
|
+
var import_chalk128, import_error_utils35, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
|
183966
184409
|
var init_add13 = __esm({
|
|
183967
184410
|
"src/commands/teams/add.ts"() {
|
|
183968
184411
|
"use strict";
|
|
183969
|
-
|
|
184412
|
+
import_chalk128 = __toESM3(require_source());
|
|
183970
184413
|
init_stamp();
|
|
183971
184414
|
init_erase_lines();
|
|
183972
184415
|
init_chars();
|
|
@@ -183979,7 +184422,7 @@ var init_add13 = __esm({
|
|
|
183979
184422
|
init_output_manager();
|
|
183980
184423
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
|
183981
184424
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
|
183982
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
|
184425
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk128.default.gray("vercel.com/");
|
|
183983
184426
|
teamNamePrefix = "Team Name".padEnd(14);
|
|
183984
184427
|
}
|
|
183985
184428
|
});
|
|
@@ -184038,7 +184481,7 @@ async function change(client2, argv) {
|
|
|
184038
184481
|
let title9 = `${team.name} (${team.slug})`;
|
|
184039
184482
|
const selected = team.id === currentTeam?.id;
|
|
184040
184483
|
if (selected) {
|
|
184041
|
-
title9 += ` ${
|
|
184484
|
+
title9 += ` ${import_chalk129.default.bold("(current)")}`;
|
|
184042
184485
|
}
|
|
184043
184486
|
if (team.limited) {
|
|
184044
184487
|
title9 += ` ${emoji("locked")}`;
|
|
@@ -184050,7 +184493,7 @@ async function change(client2, argv) {
|
|
|
184050
184493
|
selected
|
|
184051
184494
|
};
|
|
184052
184495
|
});
|
|
184053
|
-
let suffix = personalScopeSelected ? ` ${
|
|
184496
|
+
let suffix = personalScopeSelected ? ` ${import_chalk129.default.bold("(current)")}` : "";
|
|
184054
184497
|
if (user.limited) {
|
|
184055
184498
|
suffix += ` ${emoji("locked")}`;
|
|
184056
184499
|
}
|
|
@@ -184096,14 +184539,14 @@ async function change(client2, argv) {
|
|
|
184096
184539
|
}
|
|
184097
184540
|
updateCurrentTeam(config2);
|
|
184098
184541
|
output_manager_default.success(
|
|
184099
|
-
`Your account (${
|
|
184542
|
+
`Your account (${import_chalk129.default.bold(user.username)}) is now active!`
|
|
184100
184543
|
);
|
|
184101
184544
|
return 0;
|
|
184102
184545
|
}
|
|
184103
184546
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
|
184104
184547
|
if (!newTeam) {
|
|
184105
184548
|
output_manager_default.error(
|
|
184106
|
-
`You do not have permission to access scope ${
|
|
184549
|
+
`You do not have permission to access scope ${import_chalk129.default.bold(desiredSlug)}.`
|
|
184107
184550
|
);
|
|
184108
184551
|
return 1;
|
|
184109
184552
|
}
|
|
@@ -184121,15 +184564,15 @@ async function change(client2, argv) {
|
|
|
184121
184564
|
}
|
|
184122
184565
|
updateCurrentTeam(config2, newTeam);
|
|
184123
184566
|
output_manager_default.success(
|
|
184124
|
-
`The team ${
|
|
184567
|
+
`The team ${import_chalk129.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
|
184125
184568
|
);
|
|
184126
184569
|
return 0;
|
|
184127
184570
|
}
|
|
184128
|
-
var
|
|
184571
|
+
var import_chalk129, updateCurrentTeam;
|
|
184129
184572
|
var init_switch2 = __esm({
|
|
184130
184573
|
"src/commands/teams/switch.ts"() {
|
|
184131
184574
|
"use strict";
|
|
184132
|
-
|
|
184575
|
+
import_chalk129 = __toESM3(require_source());
|
|
184133
184576
|
init_emoji();
|
|
184134
184577
|
init_get_user();
|
|
184135
184578
|
init_get_teams();
|
|
@@ -184308,13 +184751,13 @@ var init_teams2 = __esm({
|
|
|
184308
184751
|
// src/commands/telemetry/status.ts
|
|
184309
184752
|
async function status2(client2) {
|
|
184310
184753
|
const enabled = client2.config.telemetry?.enabled !== false;
|
|
184311
|
-
const status3 = enabled ?
|
|
184754
|
+
const status3 = enabled ? import_chalk130.default.green("Enabled") : import_chalk130.default.red("Disabled");
|
|
184312
184755
|
output_manager_default.print("\n");
|
|
184313
|
-
output_manager_default.log(`${
|
|
184756
|
+
output_manager_default.log(`${import_chalk130.default.bold("Telemetry status")}: ${status3}
|
|
184314
184757
|
`);
|
|
184315
184758
|
const learnMoreMessage = `
|
|
184316
184759
|
|
|
184317
|
-
Learn more: ${
|
|
184760
|
+
Learn more: ${import_chalk130.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
|
184318
184761
|
if (enabled) {
|
|
184319
184762
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
|
184320
184763
|
} else {
|
|
@@ -184325,11 +184768,11 @@ Learn more: ${import_chalk129.default.cyan("https://vercel.com/docs/cli/about-te
|
|
|
184325
184768
|
}
|
|
184326
184769
|
return 0;
|
|
184327
184770
|
}
|
|
184328
|
-
var
|
|
184771
|
+
var import_chalk130;
|
|
184329
184772
|
var init_status4 = __esm({
|
|
184330
184773
|
"src/commands/telemetry/status.ts"() {
|
|
184331
184774
|
"use strict";
|
|
184332
|
-
|
|
184775
|
+
import_chalk130 = __toESM3(require_source());
|
|
184333
184776
|
init_output_manager();
|
|
184334
184777
|
}
|
|
184335
184778
|
});
|
|
@@ -184510,7 +184953,7 @@ async function telemetry(client2) {
|
|
|
184510
184953
|
default: {
|
|
184511
184954
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
|
184512
184955
|
output_manager_default.print(
|
|
184513
|
-
`${
|
|
184956
|
+
`${import_chalk131.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
|
184514
184957
|
`
|
|
184515
184958
|
);
|
|
184516
184959
|
output_manager_default.print(help(telemetryCommand, { columns: client2.stderr.columns }));
|
|
@@ -184518,7 +184961,7 @@ async function telemetry(client2) {
|
|
|
184518
184961
|
}
|
|
184519
184962
|
}
|
|
184520
184963
|
}
|
|
184521
|
-
var
|
|
184964
|
+
var import_chalk131, COMMAND_CONFIG20;
|
|
184522
184965
|
var init_telemetry3 = __esm({
|
|
184523
184966
|
"src/commands/telemetry/index.ts"() {
|
|
184524
184967
|
"use strict";
|
|
@@ -184533,7 +184976,7 @@ var init_telemetry3 = __esm({
|
|
|
184533
184976
|
init_command34();
|
|
184534
184977
|
init_get_flags_specification();
|
|
184535
184978
|
init_telemetry2();
|
|
184536
|
-
|
|
184979
|
+
import_chalk131 = __toESM3(require_source());
|
|
184537
184980
|
init_output_manager();
|
|
184538
184981
|
init_commands();
|
|
184539
184982
|
COMMAND_CONFIG20 = {
|
|
@@ -184608,7 +185051,7 @@ var import_error_utils36 = __toESM3(require_dist2());
|
|
|
184608
185051
|
var import_path40 = require("path");
|
|
184609
185052
|
var import_fs8 = require("fs");
|
|
184610
185053
|
var import_fs_extra24 = __toESM3(require_lib());
|
|
184611
|
-
var
|
|
185054
|
+
var import_chalk132 = __toESM3(require_source());
|
|
184612
185055
|
var import_epipebomb = __toESM3(require_epipebomb());
|
|
184613
185056
|
|
|
184614
185057
|
// src/util/get-latest-version/index.ts
|
|
@@ -185544,13 +185987,13 @@ var main17 = async () => {
|
|
|
185544
185987
|
const betaCommands = [];
|
|
185545
185988
|
if (betaCommands.includes(targetOrSubcommand)) {
|
|
185546
185989
|
output_manager_default.print(
|
|
185547
|
-
`${
|
|
185990
|
+
`${import_chalk132.default.grey(
|
|
185548
185991
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
|
185549
185992
|
)}
|
|
185550
185993
|
`
|
|
185551
185994
|
);
|
|
185552
185995
|
} else {
|
|
185553
|
-
output_manager_default.print(`${
|
|
185996
|
+
output_manager_default.print(`${import_chalk132.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
|
185554
185997
|
`);
|
|
185555
185998
|
}
|
|
185556
185999
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
|
@@ -185640,8 +186083,8 @@ var main17 = async () => {
|
|
|
185640
186083
|
store: telemetryEventStore
|
|
185641
186084
|
}
|
|
185642
186085
|
});
|
|
185643
|
-
const agent = await (0, import_detect_agent4.determineAgent)();
|
|
185644
|
-
telemetry2.trackAgenticUse(agent);
|
|
186086
|
+
const { agent } = await (0, import_detect_agent4.determineAgent)();
|
|
186087
|
+
telemetry2.trackAgenticUse(agent?.name);
|
|
185645
186088
|
telemetry2.trackCPUs();
|
|
185646
186089
|
telemetry2.trackPlatform();
|
|
185647
186090
|
telemetry2.trackArch();
|
|
@@ -186121,20 +186564,20 @@ main17().then(async (exitCode2) => {
|
|
|
186121
186564
|
});
|
|
186122
186565
|
if (latest) {
|
|
186123
186566
|
const changelog = "https://github.com/vercel/vercel/releases";
|
|
186124
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
186567
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk132.default.magenta(
|
|
186125
186568
|
`
|
|
186126
186569
|
|
|
186127
|
-
The latest update ${
|
|
186570
|
+
The latest update ${import_chalk132.default.italic(
|
|
186128
186571
|
"may"
|
|
186129
186572
|
)} fix any errors that occurred.`
|
|
186130
186573
|
) : "";
|
|
186131
186574
|
output_manager_default.print(
|
|
186132
186575
|
box(
|
|
186133
|
-
`Update available! ${
|
|
186576
|
+
`Update available! ${import_chalk132.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk132.default.green(
|
|
186134
186577
|
`v${latest}`
|
|
186135
186578
|
)}
|
|
186136
186579
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
186137
|
-
Run ${
|
|
186580
|
+
Run ${import_chalk132.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
|
186138
186581
|
)
|
|
186139
186582
|
);
|
|
186140
186583
|
output_manager_default.print("\n\n");
|