vercel-cli 48.0.2__py3-none-any.whl → 48.1.0__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 +967 -393
- vercel_cli/vendor/node_modules/.package-lock.json +3 -3
- 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 +2 -2
- {vercel_cli-48.0.2.dist-info → vercel_cli-48.1.0.dist-info}/METADATA +1 -1
- {vercel_cli-48.0.2.dist-info → vercel_cli-48.1.0.dist-info}/RECORD +9 -9
- {vercel_cli-48.0.2.dist-info → vercel_cli-48.1.0.dist-info}/WHEEL +0 -0
- {vercel_cli-48.0.2.dist-info → vercel_cli-48.1.0.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 + " " : "";
|
|
@@ -32452,7 +32452,7 @@ var init_env_target = __esm({
|
|
|
32452
32452
|
});
|
|
32453
32453
|
|
|
32454
32454
|
// src/commands/env/command.ts
|
|
32455
|
-
var targetPlaceholder, listSubcommand5, addSubcommand4, removeSubcommand5, pullSubcommand, envCommand;
|
|
32455
|
+
var targetPlaceholder, listSubcommand5, addSubcommand4, removeSubcommand5, pullSubcommand, updateSubcommand, envCommand;
|
|
32456
32456
|
var init_command10 = __esm({
|
|
32457
32457
|
"src/commands/env/command.ts"() {
|
|
32458
32458
|
"use strict";
|
|
@@ -32646,6 +32646,65 @@ var init_command10 = __esm({
|
|
|
32646
32646
|
}
|
|
32647
32647
|
]
|
|
32648
32648
|
};
|
|
32649
|
+
updateSubcommand = {
|
|
32650
|
+
name: "update",
|
|
32651
|
+
aliases: [],
|
|
32652
|
+
description: "Update the value of an existing Environment Variable (see examples below)",
|
|
32653
|
+
arguments: [
|
|
32654
|
+
{
|
|
32655
|
+
name: "name",
|
|
32656
|
+
required: true
|
|
32657
|
+
},
|
|
32658
|
+
{
|
|
32659
|
+
name: "environment",
|
|
32660
|
+
required: false
|
|
32661
|
+
}
|
|
32662
|
+
],
|
|
32663
|
+
options: [
|
|
32664
|
+
{
|
|
32665
|
+
name: "sensitive",
|
|
32666
|
+
description: "Update to a sensitive Environment Variable",
|
|
32667
|
+
shorthand: null,
|
|
32668
|
+
type: Boolean,
|
|
32669
|
+
deprecated: false
|
|
32670
|
+
},
|
|
32671
|
+
{
|
|
32672
|
+
...yesOption,
|
|
32673
|
+
description: "Skip the confirmation prompt when updating an Environment Variable"
|
|
32674
|
+
}
|
|
32675
|
+
],
|
|
32676
|
+
examples: [
|
|
32677
|
+
{
|
|
32678
|
+
name: "Update a variable in all Environments",
|
|
32679
|
+
value: [
|
|
32680
|
+
`${packageName} env update <name>`,
|
|
32681
|
+
`${packageName} env update API_TOKEN`
|
|
32682
|
+
]
|
|
32683
|
+
},
|
|
32684
|
+
{
|
|
32685
|
+
name: "Update a variable in a specific Environment",
|
|
32686
|
+
value: [
|
|
32687
|
+
`${packageName} env update <name> ${targetPlaceholder}`,
|
|
32688
|
+
`${packageName} env update DB_PASS production`
|
|
32689
|
+
]
|
|
32690
|
+
},
|
|
32691
|
+
{
|
|
32692
|
+
name: "Update a variable for a specific Environment and Git Branch",
|
|
32693
|
+
value: [
|
|
32694
|
+
`${packageName} env update <name> ${targetPlaceholder} <gitbranch>`,
|
|
32695
|
+
`${packageName} env update NPM_RC preview feat1`
|
|
32696
|
+
]
|
|
32697
|
+
},
|
|
32698
|
+
{
|
|
32699
|
+
name: "Update a variable from stdin",
|
|
32700
|
+
value: [
|
|
32701
|
+
`cat <file> | ${packageName} env update <name> ${targetPlaceholder}`,
|
|
32702
|
+
`cat ~/.npmrc | ${packageName} env update NPM_RC preview`,
|
|
32703
|
+
`${packageName} env update API_URL production < url.txt`
|
|
32704
|
+
]
|
|
32705
|
+
}
|
|
32706
|
+
]
|
|
32707
|
+
};
|
|
32649
32708
|
envCommand = {
|
|
32650
32709
|
name: "env",
|
|
32651
32710
|
aliases: [],
|
|
@@ -32655,7 +32714,8 @@ var init_command10 = __esm({
|
|
|
32655
32714
|
addSubcommand4,
|
|
32656
32715
|
listSubcommand5,
|
|
32657
32716
|
pullSubcommand,
|
|
32658
|
-
removeSubcommand5
|
|
32717
|
+
removeSubcommand5,
|
|
32718
|
+
updateSubcommand
|
|
32659
32719
|
],
|
|
32660
32720
|
options: [],
|
|
32661
32721
|
examples: []
|
|
@@ -36006,14 +36066,14 @@ var require_templates3 = __commonJS2({
|
|
|
36006
36066
|
}
|
|
36007
36067
|
return results;
|
|
36008
36068
|
}
|
|
36009
|
-
function buildStyle(
|
|
36069
|
+
function buildStyle(chalk128, styles) {
|
|
36010
36070
|
const enabled = {};
|
|
36011
36071
|
for (const layer of styles) {
|
|
36012
36072
|
for (const style of layer.styles) {
|
|
36013
36073
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
36014
36074
|
}
|
|
36015
36075
|
}
|
|
36016
|
-
let current =
|
|
36076
|
+
let current = chalk128;
|
|
36017
36077
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
36018
36078
|
if (!Array.isArray(styles2)) {
|
|
36019
36079
|
continue;
|
|
@@ -36025,7 +36085,7 @@ var require_templates3 = __commonJS2({
|
|
|
36025
36085
|
}
|
|
36026
36086
|
return current;
|
|
36027
36087
|
}
|
|
36028
|
-
module2.exports = (
|
|
36088
|
+
module2.exports = (chalk128, temporary) => {
|
|
36029
36089
|
const styles = [];
|
|
36030
36090
|
const chunks = [];
|
|
36031
36091
|
let chunk = [];
|
|
@@ -36035,13 +36095,13 @@ var require_templates3 = __commonJS2({
|
|
|
36035
36095
|
} else if (style) {
|
|
36036
36096
|
const string = chunk.join("");
|
|
36037
36097
|
chunk = [];
|
|
36038
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
36098
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk128, styles)(string));
|
|
36039
36099
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
36040
36100
|
} else if (close2) {
|
|
36041
36101
|
if (styles.length === 0) {
|
|
36042
36102
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
36043
36103
|
}
|
|
36044
|
-
chunks.push(buildStyle(
|
|
36104
|
+
chunks.push(buildStyle(chalk128, styles)(chunk.join("")));
|
|
36045
36105
|
chunk = [];
|
|
36046
36106
|
styles.pop();
|
|
36047
36107
|
} else {
|
|
@@ -36089,16 +36149,16 @@ var require_source2 = __commonJS2({
|
|
|
36089
36149
|
}
|
|
36090
36150
|
};
|
|
36091
36151
|
var chalkFactory = (options) => {
|
|
36092
|
-
const
|
|
36093
|
-
applyOptions(
|
|
36094
|
-
|
|
36095
|
-
Object.setPrototypeOf(
|
|
36096
|
-
Object.setPrototypeOf(
|
|
36097
|
-
|
|
36152
|
+
const chalk129 = {};
|
|
36153
|
+
applyOptions(chalk129, options);
|
|
36154
|
+
chalk129.template = (...arguments_) => chalkTag(chalk129.template, ...arguments_);
|
|
36155
|
+
Object.setPrototypeOf(chalk129, Chalk.prototype);
|
|
36156
|
+
Object.setPrototypeOf(chalk129.template, chalk129);
|
|
36157
|
+
chalk129.template.constructor = () => {
|
|
36098
36158
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
36099
36159
|
};
|
|
36100
|
-
|
|
36101
|
-
return
|
|
36160
|
+
chalk129.template.Instance = ChalkClass;
|
|
36161
|
+
return chalk129.template;
|
|
36102
36162
|
};
|
|
36103
36163
|
function Chalk(options) {
|
|
36104
36164
|
return chalkFactory(options);
|
|
@@ -36209,7 +36269,7 @@ var require_source2 = __commonJS2({
|
|
|
36209
36269
|
return openAll + string + closeAll;
|
|
36210
36270
|
};
|
|
36211
36271
|
var template;
|
|
36212
|
-
var chalkTag = (
|
|
36272
|
+
var chalkTag = (chalk129, ...strings) => {
|
|
36213
36273
|
const [firstString] = strings;
|
|
36214
36274
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
36215
36275
|
return strings.join(" ");
|
|
@@ -36225,14 +36285,14 @@ var require_source2 = __commonJS2({
|
|
|
36225
36285
|
if (template === void 0) {
|
|
36226
36286
|
template = require_templates3();
|
|
36227
36287
|
}
|
|
36228
|
-
return template(
|
|
36288
|
+
return template(chalk129, parts.join(""));
|
|
36229
36289
|
};
|
|
36230
36290
|
Object.defineProperties(Chalk.prototype, styles);
|
|
36231
|
-
var
|
|
36232
|
-
|
|
36233
|
-
|
|
36234
|
-
|
|
36235
|
-
module2.exports =
|
|
36291
|
+
var chalk128 = Chalk();
|
|
36292
|
+
chalk128.supportsColor = stdoutColor;
|
|
36293
|
+
chalk128.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
36294
|
+
chalk128.stderr.supportsColor = stderrColor;
|
|
36295
|
+
module2.exports = chalk128;
|
|
36236
36296
|
}
|
|
36237
36297
|
});
|
|
36238
36298
|
|
|
@@ -44762,7 +44822,7 @@ var login_exports = {};
|
|
|
44762
44822
|
__export3(login_exports, {
|
|
44763
44823
|
default: () => login2
|
|
44764
44824
|
});
|
|
44765
|
-
async function login2(client2,
|
|
44825
|
+
async function login2(client2, options) {
|
|
44766
44826
|
let parsedArgs = null;
|
|
44767
44827
|
const flagsSpecification = getFlagsSpecification(loginCommand.options);
|
|
44768
44828
|
const telemetry2 = new LoginTelemetryClient({
|
|
@@ -44771,21 +44831,23 @@ async function login2(client2, shouldWarnObsoleteOptions = false) {
|
|
|
44771
44831
|
}
|
|
44772
44832
|
});
|
|
44773
44833
|
try {
|
|
44774
|
-
|
|
44834
|
+
if (options.shouldParseArgs) {
|
|
44835
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
|
44836
|
+
}
|
|
44775
44837
|
} catch (error3) {
|
|
44776
44838
|
printError(error3);
|
|
44777
44839
|
return 1;
|
|
44778
44840
|
}
|
|
44779
|
-
if (parsedArgs
|
|
44841
|
+
if (parsedArgs?.flags["--help"]) {
|
|
44780
44842
|
telemetry2.trackCliFlagHelp("login");
|
|
44781
44843
|
output_manager_default.print(help(loginCommand, { columns: client2.stderr.columns }));
|
|
44782
44844
|
return 0;
|
|
44783
44845
|
}
|
|
44784
|
-
if (parsedArgs
|
|
44846
|
+
if (parsedArgs?.flags["--token"]) {
|
|
44785
44847
|
output_manager_default.error('`--token` may not be used with the "login" command');
|
|
44786
44848
|
return 2;
|
|
44787
44849
|
}
|
|
44788
|
-
if (
|
|
44850
|
+
if (options.shouldParseArgs && parsedArgs) {
|
|
44789
44851
|
const obsoleteFlags = Object.keys(parsedArgs.flags).filter((flag) => {
|
|
44790
44852
|
const flagKey = flag.replace("--", "");
|
|
44791
44853
|
const option = loginCommand.options.find((o) => o.name === flagKey);
|
|
@@ -44913,7 +44975,7 @@ async function prompt(client2, error3, ssoUserId) {
|
|
|
44913
44975
|
const slug = error3?.scope || error3?.teamId || await readInput(client2, "Enter your Team slug:");
|
|
44914
44976
|
return await doSamlLogin(client2, slug, ssoUserId);
|
|
44915
44977
|
}
|
|
44916
|
-
return await login2(client2);
|
|
44978
|
+
return await login2(client2, { shouldParseArgs: false });
|
|
44917
44979
|
}
|
|
44918
44980
|
async function readInput(client2, message2) {
|
|
44919
44981
|
let input;
|
|
@@ -45092,7 +45154,7 @@ var init_oauth2 = __esm({
|
|
|
45092
45154
|
async function doSamlLogin(client2, teamIdOrSlug, ssoUserId) {
|
|
45093
45155
|
if (!client2.authConfig.refreshToken) {
|
|
45094
45156
|
output_manager_default.log("Token is outdated, please log in again.");
|
|
45095
|
-
const exitCode2 = await login2(
|
|
45157
|
+
const exitCode2 = await login2(client2, { shouldParseArgs: false });
|
|
45096
45158
|
if (exitCode2 !== 0)
|
|
45097
45159
|
return exitCode2;
|
|
45098
45160
|
}
|
|
@@ -49483,7 +49545,7 @@ var require_package = __commonJS2({
|
|
|
49483
49545
|
"../client/package.json"(exports2, module2) {
|
|
49484
49546
|
module2.exports = {
|
|
49485
49547
|
name: "@vercel/client",
|
|
49486
|
-
version: "
|
|
49548
|
+
version: "17.0.0",
|
|
49487
49549
|
main: "dist/index.js",
|
|
49488
49550
|
typings: "dist/index.d.ts",
|
|
49489
49551
|
homepage: "https://vercel.com",
|
|
@@ -58259,6 +58321,9 @@ var require_query_string = __commonJS2({
|
|
|
58259
58321
|
if (clientOptions.skipAutoDetectionConfirmation) {
|
|
58260
58322
|
options.set("skipAutoDetectionConfirmation", "1");
|
|
58261
58323
|
}
|
|
58324
|
+
if (clientOptions.prebuilt) {
|
|
58325
|
+
options.set("prebuilt", "1");
|
|
58326
|
+
}
|
|
58262
58327
|
return Array.from(options.entries()).length ? `?${options.toString()}` : "";
|
|
58263
58328
|
}
|
|
58264
58329
|
}
|
|
@@ -74706,11 +74771,11 @@ var require_esprima = __commonJS2({
|
|
|
74706
74771
|
}();
|
|
74707
74772
|
exports3.ForOfStatement = ForOfStatement;
|
|
74708
74773
|
var ForStatement = function() {
|
|
74709
|
-
function ForStatement2(init3, test,
|
|
74774
|
+
function ForStatement2(init3, test, update2, body) {
|
|
74710
74775
|
this.type = syntax_1.Syntax.ForStatement;
|
|
74711
74776
|
this.init = init3;
|
|
74712
74777
|
this.test = test;
|
|
74713
|
-
this.update =
|
|
74778
|
+
this.update = update2;
|
|
74714
74779
|
this.body = body;
|
|
74715
74780
|
}
|
|
74716
74781
|
return ForStatement2;
|
|
@@ -76814,7 +76879,7 @@ var require_esprima = __commonJS2({
|
|
|
76814
76879
|
Parser2.prototype.parseForStatement = function() {
|
|
76815
76880
|
var init3 = null;
|
|
76816
76881
|
var test = null;
|
|
76817
|
-
var
|
|
76882
|
+
var update2 = null;
|
|
76818
76883
|
var forIn = true;
|
|
76819
76884
|
var left, right;
|
|
76820
76885
|
var node = this.createNode();
|
|
@@ -76927,7 +76992,7 @@ var require_esprima = __commonJS2({
|
|
|
76927
76992
|
}
|
|
76928
76993
|
this.expect(";");
|
|
76929
76994
|
if (!this.match(")")) {
|
|
76930
|
-
|
|
76995
|
+
update2 = this.parseExpression();
|
|
76931
76996
|
}
|
|
76932
76997
|
}
|
|
76933
76998
|
var body;
|
|
@@ -76941,7 +77006,7 @@ var require_esprima = __commonJS2({
|
|
|
76941
77006
|
body = this.isolateCoverGrammar(this.parseStatement);
|
|
76942
77007
|
this.context.inIteration = previousInIteration;
|
|
76943
77008
|
}
|
|
76944
|
-
return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init3, test,
|
|
77009
|
+
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));
|
|
76945
77010
|
};
|
|
76946
77011
|
Parser2.prototype.parseContinueStatement = function() {
|
|
76947
77012
|
var node = this.createNode();
|
|
@@ -116220,8 +116285,9 @@ var require_frameworks = __commonJS2({
|
|
|
116220
116285
|
]
|
|
116221
116286
|
},
|
|
116222
116287
|
{
|
|
116223
|
-
name: "FastAPI
|
|
116288
|
+
name: "FastAPI",
|
|
116224
116289
|
slug: "fastapi",
|
|
116290
|
+
demo: "https://vercel-fastapi-gamma-smoky.vercel.app/",
|
|
116225
116291
|
logo: "https://api-frameworks.vercel.sh/framework-logos/fastapi.svg",
|
|
116226
116292
|
darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/fastapi.svg",
|
|
116227
116293
|
tagline: "FastAPI framework, high performance, easy to learn, fast to code, ready for production",
|
|
@@ -116271,7 +116337,7 @@ var require_frameworks = __commonJS2({
|
|
|
116271
116337
|
]
|
|
116272
116338
|
},
|
|
116273
116339
|
{
|
|
116274
|
-
name: "FastHTML
|
|
116340
|
+
name: "FastHTML",
|
|
116275
116341
|
slug: "fasthtml",
|
|
116276
116342
|
demo: "https://fasthtml-template.vercel.app",
|
|
116277
116343
|
logo: "https://api-frameworks.vercel.sh/framework-logos/fasthtml.png",
|
|
@@ -116863,6 +116929,191 @@ var require_frameworks = __commonJS2({
|
|
|
116863
116929
|
dependency: "express",
|
|
116864
116930
|
getOutputDirName: async () => "public"
|
|
116865
116931
|
},
|
|
116932
|
+
{
|
|
116933
|
+
name: "h3",
|
|
116934
|
+
slug: "h3",
|
|
116935
|
+
logo: "https://api-frameworks.vercel.sh/framework-logos/h3.svg",
|
|
116936
|
+
tagline: "Universal, Tiny, and Fast Servers",
|
|
116937
|
+
description: "H(TTP) server framework built on top of web standards for high performance and composability.",
|
|
116938
|
+
website: "https://h3.dev/",
|
|
116939
|
+
useRuntime: { src: "index.js", use: "@vercel/h3" },
|
|
116940
|
+
defaultRoutes: [
|
|
116941
|
+
{
|
|
116942
|
+
handle: "filesystem"
|
|
116943
|
+
},
|
|
116944
|
+
{
|
|
116945
|
+
src: "/(.*)",
|
|
116946
|
+
dest: "/"
|
|
116947
|
+
}
|
|
116948
|
+
],
|
|
116949
|
+
detectors: {
|
|
116950
|
+
every: [{ matchPackage: "h3" }],
|
|
116951
|
+
some: [
|
|
116952
|
+
{
|
|
116953
|
+
path: "app.cjs",
|
|
116954
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116955
|
+
},
|
|
116956
|
+
{
|
|
116957
|
+
path: "app.js",
|
|
116958
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116959
|
+
},
|
|
116960
|
+
{
|
|
116961
|
+
path: "app.mjs",
|
|
116962
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116963
|
+
},
|
|
116964
|
+
{
|
|
116965
|
+
path: "app.mts",
|
|
116966
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116967
|
+
},
|
|
116968
|
+
{
|
|
116969
|
+
path: "app.ts",
|
|
116970
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116971
|
+
},
|
|
116972
|
+
{
|
|
116973
|
+
path: "app.cts",
|
|
116974
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116975
|
+
},
|
|
116976
|
+
{
|
|
116977
|
+
path: "index.cjs",
|
|
116978
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116979
|
+
},
|
|
116980
|
+
{
|
|
116981
|
+
path: "index.js",
|
|
116982
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116983
|
+
},
|
|
116984
|
+
{
|
|
116985
|
+
path: "index.mjs",
|
|
116986
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116987
|
+
},
|
|
116988
|
+
{
|
|
116989
|
+
path: "index.mts",
|
|
116990
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116991
|
+
},
|
|
116992
|
+
{
|
|
116993
|
+
path: "index.ts",
|
|
116994
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116995
|
+
},
|
|
116996
|
+
{
|
|
116997
|
+
path: "index.cts",
|
|
116998
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
116999
|
+
},
|
|
117000
|
+
{
|
|
117001
|
+
path: "server.cjs",
|
|
117002
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117003
|
+
},
|
|
117004
|
+
{
|
|
117005
|
+
path: "server.js",
|
|
117006
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117007
|
+
},
|
|
117008
|
+
{
|
|
117009
|
+
path: "server.mjs",
|
|
117010
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117011
|
+
},
|
|
117012
|
+
{
|
|
117013
|
+
path: "server.mts",
|
|
117014
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117015
|
+
},
|
|
117016
|
+
{
|
|
117017
|
+
path: "server.ts",
|
|
117018
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117019
|
+
},
|
|
117020
|
+
{
|
|
117021
|
+
path: "server.cts",
|
|
117022
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117023
|
+
},
|
|
117024
|
+
{
|
|
117025
|
+
path: "src/index.cjs",
|
|
117026
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117027
|
+
},
|
|
117028
|
+
{
|
|
117029
|
+
path: "src/index.js",
|
|
117030
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117031
|
+
},
|
|
117032
|
+
{
|
|
117033
|
+
path: "src/index.mjs",
|
|
117034
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117035
|
+
},
|
|
117036
|
+
{
|
|
117037
|
+
path: "src/index.mts",
|
|
117038
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117039
|
+
},
|
|
117040
|
+
{
|
|
117041
|
+
path: "src/index.ts",
|
|
117042
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117043
|
+
},
|
|
117044
|
+
{
|
|
117045
|
+
path: "src/index.cts",
|
|
117046
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117047
|
+
},
|
|
117048
|
+
{
|
|
117049
|
+
path: "src/app.cjs",
|
|
117050
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117051
|
+
},
|
|
117052
|
+
{
|
|
117053
|
+
path: "src/app.js",
|
|
117054
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117055
|
+
},
|
|
117056
|
+
{
|
|
117057
|
+
path: "src/app.mjs",
|
|
117058
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117059
|
+
},
|
|
117060
|
+
{
|
|
117061
|
+
path: "src/app.mts",
|
|
117062
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117063
|
+
},
|
|
117064
|
+
{
|
|
117065
|
+
path: "src/app.ts",
|
|
117066
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117067
|
+
},
|
|
117068
|
+
{
|
|
117069
|
+
path: "src/app.cts",
|
|
117070
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117071
|
+
},
|
|
117072
|
+
{
|
|
117073
|
+
path: "src/server.cjs",
|
|
117074
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117075
|
+
},
|
|
117076
|
+
{
|
|
117077
|
+
path: "src/server.js",
|
|
117078
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117079
|
+
},
|
|
117080
|
+
{
|
|
117081
|
+
path: "src/server.mjs",
|
|
117082
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117083
|
+
},
|
|
117084
|
+
{
|
|
117085
|
+
path: "src/server.mts",
|
|
117086
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117087
|
+
},
|
|
117088
|
+
{
|
|
117089
|
+
path: "src/server.ts",
|
|
117090
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117091
|
+
},
|
|
117092
|
+
{
|
|
117093
|
+
path: "src/server.cts",
|
|
117094
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']h3["']\\s*(?:\\))?`
|
|
117095
|
+
}
|
|
117096
|
+
]
|
|
117097
|
+
},
|
|
117098
|
+
settings: {
|
|
117099
|
+
installCommand: {
|
|
117100
|
+
placeholder: "`yarn install`, `pnpm install`, `npm install`, or `bun install`"
|
|
117101
|
+
},
|
|
117102
|
+
buildCommand: {
|
|
117103
|
+
placeholder: "None",
|
|
117104
|
+
value: null
|
|
117105
|
+
},
|
|
117106
|
+
devCommand: {
|
|
117107
|
+
placeholder: "None",
|
|
117108
|
+
value: null
|
|
117109
|
+
},
|
|
117110
|
+
outputDirectory: {
|
|
117111
|
+
value: "N/A"
|
|
117112
|
+
}
|
|
117113
|
+
},
|
|
117114
|
+
dependency: "h3",
|
|
117115
|
+
getOutputDirName: async () => "public"
|
|
117116
|
+
},
|
|
116866
117117
|
{
|
|
116867
117118
|
name: "xmcp",
|
|
116868
117119
|
slug: "xmcp",
|
|
@@ -119384,6 +119635,25 @@ var require_detect_builders = __commonJS2({
|
|
|
119384
119635
|
}
|
|
119385
119636
|
}
|
|
119386
119637
|
}
|
|
119638
|
+
if (frontendBuilder && ((0, import_is_official_runtime.isOfficialRuntime)("express", frontendBuilder.use) || (0, import_is_official_runtime.isOfficialRuntime)("hono", frontendBuilder.use))) {
|
|
119639
|
+
const validFilenames = [
|
|
119640
|
+
"app",
|
|
119641
|
+
"index",
|
|
119642
|
+
"server",
|
|
119643
|
+
"src/app",
|
|
119644
|
+
"src/index",
|
|
119645
|
+
"src/server"
|
|
119646
|
+
];
|
|
119647
|
+
const validExtensions = ["js", "cjs", "mjs", "ts", "cts", "mts"];
|
|
119648
|
+
const validEntrypoints = validFilenames.flatMap(
|
|
119649
|
+
(filename) => validExtensions.map((extension) => `${filename}.${extension}`)
|
|
119650
|
+
);
|
|
119651
|
+
for (const fnKey of unusedFunctions.values()) {
|
|
119652
|
+
if (validEntrypoints.includes(fnKey)) {
|
|
119653
|
+
unusedFunctions.delete(fnKey);
|
|
119654
|
+
}
|
|
119655
|
+
}
|
|
119656
|
+
}
|
|
119387
119657
|
if (unusedFunctions.size) {
|
|
119388
119658
|
const [fnKey] = Array.from(unusedFunctions);
|
|
119389
119659
|
return {
|
|
@@ -119700,7 +119970,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
119700
119970
|
});
|
|
119701
119971
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
|
119702
119972
|
var import_semver4 = __toESM4(require_semver2());
|
|
119703
|
-
var
|
|
119973
|
+
var import__101 = require_dist20();
|
|
119704
119974
|
async function detectFileSystemAPI2({
|
|
119705
119975
|
files,
|
|
119706
119976
|
projectSettings,
|
|
@@ -119766,7 +120036,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
119766
120036
|
};
|
|
119767
120037
|
}
|
|
119768
120038
|
const invalidBuilder = builders.find(({ use }) => {
|
|
119769
|
-
const valid = (0,
|
|
120039
|
+
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);
|
|
119770
120040
|
return !valid;
|
|
119771
120041
|
});
|
|
119772
120042
|
if (invalidBuilder) {
|
|
@@ -119779,7 +120049,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
119779
120049
|
for (const lang of ["go", "python", "ruby"]) {
|
|
119780
120050
|
for (const { use } of builders) {
|
|
119781
120051
|
const plugin = "vercel-plugin-" + lang;
|
|
119782
|
-
if ((0,
|
|
120052
|
+
if ((0, import__101.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
|
119783
120053
|
return {
|
|
119784
120054
|
metadata,
|
|
119785
120055
|
fsApiBuilder: null,
|
|
@@ -119836,7 +120106,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
119836
120106
|
}
|
|
119837
120107
|
}
|
|
119838
120108
|
const frontendBuilder = builders.find(
|
|
119839
|
-
({ use }) => (0,
|
|
120109
|
+
({ use }) => (0, import__101.isOfficialRuntime)("next", use) || (0, import__101.isOfficialRuntime)("static", use) || (0, import__101.isOfficialRuntime)("static-build", use)
|
|
119840
120110
|
);
|
|
119841
120111
|
const config2 = frontendBuilder?.config || {};
|
|
119842
120112
|
const withTag = tag ? `@${tag}` : "";
|
|
@@ -167895,7 +168165,7 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
|
|
|
167895
168165
|
if (src[0] === "/") {
|
|
167896
168166
|
src = src.substring(1);
|
|
167897
168167
|
}
|
|
167898
|
-
if (buildConfig.config?.framework === "hono" || buildConfig.config?.framework === "express") {
|
|
168168
|
+
if (buildConfig.config?.framework === "hono" || buildConfig.config?.framework === "express" || buildConfig.config?.framework === "h3") {
|
|
167899
168169
|
src = "package.json";
|
|
167900
168170
|
}
|
|
167901
168171
|
const mapToEntrypoint = /* @__PURE__ */ new Map();
|
|
@@ -174547,6 +174817,294 @@ var init_rm8 = __esm({
|
|
|
174547
174817
|
}
|
|
174548
174818
|
});
|
|
174549
174819
|
|
|
174820
|
+
// src/util/env/update-env-record.ts
|
|
174821
|
+
async function updateEnvRecord(client2, projectId, envId, type, key, value, targets, gitBranch) {
|
|
174822
|
+
output_manager_default.debug(
|
|
174823
|
+
`Updating ${type} Environment Variable ${key} in ${targets.length} targets`
|
|
174824
|
+
);
|
|
174825
|
+
const target = [];
|
|
174826
|
+
const customEnvironmentIds = [];
|
|
174827
|
+
for (const t of targets) {
|
|
174828
|
+
const arr = import_constants7.PROJECT_ENV_TARGET.includes(t) ? target : customEnvironmentIds;
|
|
174829
|
+
arr.push(t);
|
|
174830
|
+
}
|
|
174831
|
+
const body = {
|
|
174832
|
+
type,
|
|
174833
|
+
key,
|
|
174834
|
+
value,
|
|
174835
|
+
target,
|
|
174836
|
+
customEnvironmentIds: customEnvironmentIds.length > 0 ? customEnvironmentIds : void 0,
|
|
174837
|
+
gitBranch: gitBranch || void 0
|
|
174838
|
+
};
|
|
174839
|
+
const url3 = `/v10/projects/${projectId}/env/${envId}`;
|
|
174840
|
+
await client2.fetch(url3, {
|
|
174841
|
+
method: "PATCH",
|
|
174842
|
+
body
|
|
174843
|
+
});
|
|
174844
|
+
}
|
|
174845
|
+
var import_constants7;
|
|
174846
|
+
var init_update_env_record = __esm({
|
|
174847
|
+
"src/util/env/update-env-record.ts"() {
|
|
174848
|
+
"use strict";
|
|
174849
|
+
import_constants7 = __toESM3(require_dist4());
|
|
174850
|
+
init_output_manager();
|
|
174851
|
+
}
|
|
174852
|
+
});
|
|
174853
|
+
|
|
174854
|
+
// src/util/telemetry/commands/env/update.ts
|
|
174855
|
+
var EnvUpdateTelemetryClient;
|
|
174856
|
+
var init_update = __esm({
|
|
174857
|
+
"src/util/telemetry/commands/env/update.ts"() {
|
|
174858
|
+
"use strict";
|
|
174859
|
+
init_telemetry();
|
|
174860
|
+
init_standard_environments();
|
|
174861
|
+
EnvUpdateTelemetryClient = class extends TelemetryClient {
|
|
174862
|
+
trackCliArgumentName(name) {
|
|
174863
|
+
if (name) {
|
|
174864
|
+
this.trackCliArgument({
|
|
174865
|
+
arg: "name",
|
|
174866
|
+
value: this.redactedValue
|
|
174867
|
+
});
|
|
174868
|
+
}
|
|
174869
|
+
}
|
|
174870
|
+
trackCliArgumentEnvironment(environment) {
|
|
174871
|
+
if (environment) {
|
|
174872
|
+
this.trackCliArgument({
|
|
174873
|
+
arg: "environment",
|
|
174874
|
+
value: STANDARD_ENVIRONMENTS.includes(
|
|
174875
|
+
environment
|
|
174876
|
+
) ? environment : this.redactedValue
|
|
174877
|
+
});
|
|
174878
|
+
}
|
|
174879
|
+
}
|
|
174880
|
+
trackCliArgumentGitBranch(gitBranch) {
|
|
174881
|
+
if (gitBranch) {
|
|
174882
|
+
this.trackCliArgument({
|
|
174883
|
+
arg: "git-branch",
|
|
174884
|
+
value: this.redactedValue
|
|
174885
|
+
});
|
|
174886
|
+
}
|
|
174887
|
+
}
|
|
174888
|
+
trackCliFlagSensitive(sensitive) {
|
|
174889
|
+
if (sensitive) {
|
|
174890
|
+
this.trackCliFlag("sensitive");
|
|
174891
|
+
}
|
|
174892
|
+
}
|
|
174893
|
+
trackCliFlagYes(yes) {
|
|
174894
|
+
if (yes) {
|
|
174895
|
+
this.trackCliFlag("yes");
|
|
174896
|
+
}
|
|
174897
|
+
}
|
|
174898
|
+
};
|
|
174899
|
+
}
|
|
174900
|
+
});
|
|
174901
|
+
|
|
174902
|
+
// src/commands/env/update.ts
|
|
174903
|
+
async function update(client2, argv) {
|
|
174904
|
+
let parsedArgs;
|
|
174905
|
+
const flagsSpecification = getFlagsSpecification(updateSubcommand.options);
|
|
174906
|
+
try {
|
|
174907
|
+
parsedArgs = parseArguments(argv, flagsSpecification);
|
|
174908
|
+
} catch (err) {
|
|
174909
|
+
printError(err);
|
|
174910
|
+
return 1;
|
|
174911
|
+
}
|
|
174912
|
+
const { args: args2, flags: opts } = parsedArgs;
|
|
174913
|
+
const stdInput = await readStandardInput(client2.stdin);
|
|
174914
|
+
let [envName, envTargetArg, envGitBranch] = args2;
|
|
174915
|
+
const telemetryClient = new EnvUpdateTelemetryClient({
|
|
174916
|
+
opts: {
|
|
174917
|
+
store: client2.telemetryEventStore
|
|
174918
|
+
}
|
|
174919
|
+
});
|
|
174920
|
+
telemetryClient.trackCliArgumentName(envName);
|
|
174921
|
+
telemetryClient.trackCliArgumentEnvironment(envTargetArg);
|
|
174922
|
+
telemetryClient.trackCliArgumentGitBranch(envGitBranch);
|
|
174923
|
+
telemetryClient.trackCliFlagSensitive(opts["--sensitive"]);
|
|
174924
|
+
telemetryClient.trackCliFlagYes(opts["--yes"]);
|
|
174925
|
+
if (args2.length > 3) {
|
|
174926
|
+
output_manager_default.error(
|
|
174927
|
+
`Invalid number of arguments. Usage: ${getCommandName(
|
|
174928
|
+
`env update <name> ${getEnvTargetPlaceholder()} <gitbranch>`
|
|
174929
|
+
)}`
|
|
174930
|
+
);
|
|
174931
|
+
return 1;
|
|
174932
|
+
}
|
|
174933
|
+
if (stdInput && (!envName || !envTargetArg)) {
|
|
174934
|
+
output_manager_default.error(
|
|
174935
|
+
`Invalid number of arguments. Usage: ${getCommandName(
|
|
174936
|
+
`env update <name> <target> <gitbranch> < <file>`
|
|
174937
|
+
)}`
|
|
174938
|
+
);
|
|
174939
|
+
return 1;
|
|
174940
|
+
}
|
|
174941
|
+
const envTargets = [];
|
|
174942
|
+
if (envTargetArg) {
|
|
174943
|
+
envTargets.push(envTargetArg);
|
|
174944
|
+
}
|
|
174945
|
+
if (!envName) {
|
|
174946
|
+
envName = await client2.input.text({
|
|
174947
|
+
message: `What's the name of the variable to update?`,
|
|
174948
|
+
validate: (val) => val ? true : "Name cannot be empty"
|
|
174949
|
+
});
|
|
174950
|
+
}
|
|
174951
|
+
const link4 = await getLinkedProject(client2);
|
|
174952
|
+
if (link4.status === "error") {
|
|
174953
|
+
return link4.exitCode;
|
|
174954
|
+
} else if (link4.status === "not_linked") {
|
|
174955
|
+
output_manager_default.error(
|
|
174956
|
+
`Your codebase isn't linked to a project on Vercel. Run ${getCommandName(
|
|
174957
|
+
"link"
|
|
174958
|
+
)} to begin.`
|
|
174959
|
+
);
|
|
174960
|
+
return 1;
|
|
174961
|
+
}
|
|
174962
|
+
client2.config.currentTeam = link4.org.type === "team" ? link4.org.id : void 0;
|
|
174963
|
+
const { project } = link4;
|
|
174964
|
+
const [{ envs }, customEnvironments] = await Promise.all([
|
|
174965
|
+
getEnvRecords(client2, project.id, "vercel-cli:env:update"),
|
|
174966
|
+
getCustomEnvironments(client2, project.id)
|
|
174967
|
+
]);
|
|
174968
|
+
const matchingEnvs = envs.filter((r) => r.key === envName);
|
|
174969
|
+
if (matchingEnvs.length === 0) {
|
|
174970
|
+
output_manager_default.error(
|
|
174971
|
+
`The variable ${param(envName)} was not found. Run ${getCommandName(
|
|
174972
|
+
`env ls`
|
|
174973
|
+
)} to see all available Environment Variables.`
|
|
174974
|
+
);
|
|
174975
|
+
return 1;
|
|
174976
|
+
}
|
|
174977
|
+
let selectedEnv;
|
|
174978
|
+
if (envTargetArg || envGitBranch) {
|
|
174979
|
+
const filteredEnvs = matchingEnvs.filter((env) => {
|
|
174980
|
+
const matchesTarget = !envTargetArg || (Array.isArray(env.target) ? env.target.includes(envTargetArg) : env.target === envTargetArg) || env.customEnvironmentIds && env.customEnvironmentIds.includes(envTargetArg);
|
|
174981
|
+
const matchesGitBranch = !envGitBranch || env.gitBranch === envGitBranch;
|
|
174982
|
+
return matchesTarget && matchesGitBranch;
|
|
174983
|
+
});
|
|
174984
|
+
if (filteredEnvs.length === 0) {
|
|
174985
|
+
output_manager_default.error(
|
|
174986
|
+
`No Environment Variable ${param(envName)} found matching the specified criteria.`
|
|
174987
|
+
);
|
|
174988
|
+
return 1;
|
|
174989
|
+
}
|
|
174990
|
+
if (filteredEnvs.length === 1) {
|
|
174991
|
+
selectedEnv = filteredEnvs[0];
|
|
174992
|
+
} else {
|
|
174993
|
+
const choices = filteredEnvs.map((env, index) => {
|
|
174994
|
+
const targets2 = formatEnvironments(link4, env, customEnvironments);
|
|
174995
|
+
return {
|
|
174996
|
+
name: targets2,
|
|
174997
|
+
value: index
|
|
174998
|
+
};
|
|
174999
|
+
});
|
|
175000
|
+
const selectedIndex = await client2.input.select({
|
|
175001
|
+
message: `Multiple Environment Variables found for ${param(envName)}. Which one do you want to update?`,
|
|
175002
|
+
choices
|
|
175003
|
+
});
|
|
175004
|
+
selectedEnv = filteredEnvs[selectedIndex];
|
|
175005
|
+
}
|
|
175006
|
+
} else if (matchingEnvs.length === 1) {
|
|
175007
|
+
selectedEnv = matchingEnvs[0];
|
|
175008
|
+
} else {
|
|
175009
|
+
const choices = matchingEnvs.map((env, index) => {
|
|
175010
|
+
const targets2 = formatEnvironments(link4, env, customEnvironments);
|
|
175011
|
+
return {
|
|
175012
|
+
name: targets2,
|
|
175013
|
+
value: index
|
|
175014
|
+
};
|
|
175015
|
+
});
|
|
175016
|
+
const selectedIndex = await client2.input.select({
|
|
175017
|
+
message: `Multiple Environment Variables found for ${param(envName)}. Which one do you want to update?`,
|
|
175018
|
+
choices
|
|
175019
|
+
});
|
|
175020
|
+
selectedEnv = matchingEnvs[selectedIndex];
|
|
175021
|
+
}
|
|
175022
|
+
let envValue;
|
|
175023
|
+
if (stdInput) {
|
|
175024
|
+
envValue = stdInput;
|
|
175025
|
+
} else {
|
|
175026
|
+
envValue = await client2.input.text({
|
|
175027
|
+
message: `What's the new value of ${envName}?`
|
|
175028
|
+
});
|
|
175029
|
+
}
|
|
175030
|
+
if (!opts["--yes"]) {
|
|
175031
|
+
const currentTargets = formatEnvironments(
|
|
175032
|
+
link4,
|
|
175033
|
+
selectedEnv,
|
|
175034
|
+
customEnvironments
|
|
175035
|
+
);
|
|
175036
|
+
const confirmed = await client2.input.confirm(
|
|
175037
|
+
`Updating Environment Variable ${param(envName)} in ${currentTargets} in Project ${import_chalk93.default.bold(project.name)}. Are you sure?`,
|
|
175038
|
+
false
|
|
175039
|
+
);
|
|
175040
|
+
if (!confirmed) {
|
|
175041
|
+
output_manager_default.log("Canceled");
|
|
175042
|
+
return 0;
|
|
175043
|
+
}
|
|
175044
|
+
}
|
|
175045
|
+
const type = opts["--sensitive"] ? "sensitive" : selectedEnv.type;
|
|
175046
|
+
const targets = Array.isArray(selectedEnv.target) ? selectedEnv.target : [selectedEnv.target].filter(
|
|
175047
|
+
(r) => Boolean(r)
|
|
175048
|
+
);
|
|
175049
|
+
const allTargets = [...targets, ...selectedEnv.customEnvironmentIds || []];
|
|
175050
|
+
const updateStamp = stamp_default();
|
|
175051
|
+
try {
|
|
175052
|
+
output_manager_default.spinner("Updating");
|
|
175053
|
+
await updateEnvRecord(
|
|
175054
|
+
client2,
|
|
175055
|
+
project.id,
|
|
175056
|
+
selectedEnv.id,
|
|
175057
|
+
type,
|
|
175058
|
+
envName,
|
|
175059
|
+
envValue,
|
|
175060
|
+
allTargets,
|
|
175061
|
+
selectedEnv.gitBranch || ""
|
|
175062
|
+
);
|
|
175063
|
+
} catch (err) {
|
|
175064
|
+
if (isAPIError(err) && isKnownError(err)) {
|
|
175065
|
+
output_manager_default.error(err.serverMessage);
|
|
175066
|
+
return 1;
|
|
175067
|
+
}
|
|
175068
|
+
throw err;
|
|
175069
|
+
}
|
|
175070
|
+
output_manager_default.print(
|
|
175071
|
+
`${prependEmoji(
|
|
175072
|
+
`Updated Environment Variable ${import_chalk93.default.bold(envName)} in Project ${import_chalk93.default.bold(
|
|
175073
|
+
project.name
|
|
175074
|
+
)} ${import_chalk93.default.gray(updateStamp())}`,
|
|
175075
|
+
emoji("success")
|
|
175076
|
+
)}
|
|
175077
|
+
`
|
|
175078
|
+
);
|
|
175079
|
+
return 0;
|
|
175080
|
+
}
|
|
175081
|
+
var import_chalk93;
|
|
175082
|
+
var init_update2 = __esm({
|
|
175083
|
+
"src/commands/env/update.ts"() {
|
|
175084
|
+
"use strict";
|
|
175085
|
+
import_chalk93 = __toESM3(require_source());
|
|
175086
|
+
init_stamp();
|
|
175087
|
+
init_update_env_record();
|
|
175088
|
+
init_get_env_records();
|
|
175089
|
+
init_env_target();
|
|
175090
|
+
init_read_standard_input();
|
|
175091
|
+
init_param();
|
|
175092
|
+
init_emoji();
|
|
175093
|
+
init_known_error();
|
|
175094
|
+
init_format_environments();
|
|
175095
|
+
init_pkg_name();
|
|
175096
|
+
init_errors_ts();
|
|
175097
|
+
init_get_custom_environments();
|
|
175098
|
+
init_output_manager();
|
|
175099
|
+
init_update();
|
|
175100
|
+
init_get_args();
|
|
175101
|
+
init_get_flags_specification();
|
|
175102
|
+
init_error2();
|
|
175103
|
+
init_command10();
|
|
175104
|
+
init_link2();
|
|
175105
|
+
}
|
|
175106
|
+
});
|
|
175107
|
+
|
|
174550
175108
|
// src/util/telemetry/commands/env/index.ts
|
|
174551
175109
|
var EnvTelemetryClient;
|
|
174552
175110
|
var init_env = __esm({
|
|
@@ -174578,6 +175136,12 @@ var init_env = __esm({
|
|
|
174578
175136
|
value: actual
|
|
174579
175137
|
});
|
|
174580
175138
|
}
|
|
175139
|
+
trackCliSubcommandUpdate(actual) {
|
|
175140
|
+
this.trackCliSubcommand({
|
|
175141
|
+
subcommand: "update",
|
|
175142
|
+
value: actual
|
|
175143
|
+
});
|
|
175144
|
+
}
|
|
174581
175145
|
};
|
|
174582
175146
|
}
|
|
174583
175147
|
});
|
|
@@ -174652,6 +175216,14 @@ async function main8(client2) {
|
|
|
174652
175216
|
}
|
|
174653
175217
|
telemetry2.trackCliSubcommandPull(subcommandOriginal);
|
|
174654
175218
|
return pull(client2, args2);
|
|
175219
|
+
case "update":
|
|
175220
|
+
if (needHelp) {
|
|
175221
|
+
telemetry2.trackCliFlagHelp("env", subcommandOriginal);
|
|
175222
|
+
printHelp(updateSubcommand);
|
|
175223
|
+
return 2;
|
|
175224
|
+
}
|
|
175225
|
+
telemetry2.trackCliSubcommandUpdate(subcommandOriginal);
|
|
175226
|
+
return update(client2, args2);
|
|
174655
175227
|
default:
|
|
174656
175228
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG9));
|
|
174657
175229
|
output_manager_default.print(help(envCommand, { columns: client2.stderr.columns }));
|
|
@@ -174671,6 +175243,7 @@ var init_env2 = __esm({
|
|
|
174671
175243
|
init_ls9();
|
|
174672
175244
|
init_pull2();
|
|
174673
175245
|
init_rm8();
|
|
175246
|
+
init_update2();
|
|
174674
175247
|
init_command10();
|
|
174675
175248
|
init_get_flags_specification();
|
|
174676
175249
|
init_output_manager();
|
|
@@ -174680,7 +175253,8 @@ var init_env2 = __esm({
|
|
|
174680
175253
|
ls: getCommandAliases(listSubcommand5),
|
|
174681
175254
|
add: getCommandAliases(addSubcommand4),
|
|
174682
175255
|
rm: getCommandAliases(removeSubcommand5),
|
|
174683
|
-
pull: getCommandAliases(pullSubcommand)
|
|
175256
|
+
pull: getCommandAliases(pullSubcommand),
|
|
175257
|
+
update: getCommandAliases(updateSubcommand)
|
|
174684
175258
|
};
|
|
174685
175259
|
}
|
|
174686
175260
|
});
|
|
@@ -174740,7 +175314,7 @@ async function connect(client2, argv) {
|
|
|
174740
175314
|
const confirm = Boolean(opts["--yes"]);
|
|
174741
175315
|
if (args2.length > 1) {
|
|
174742
175316
|
output_manager_default.error(
|
|
174743
|
-
`Invalid number of arguments. Usage: ${
|
|
175317
|
+
`Invalid number of arguments. Usage: ${import_chalk94.default.cyan(
|
|
174744
175318
|
`${getCommandName("project connect")}`
|
|
174745
175319
|
)}`
|
|
174746
175320
|
);
|
|
@@ -174787,7 +175361,7 @@ async function connect(client2, argv) {
|
|
|
174787
175361
|
}
|
|
174788
175362
|
if (!gitConfig) {
|
|
174789
175363
|
output_manager_default.error(
|
|
174790
|
-
`No local Git repository found. Run ${
|
|
175364
|
+
`No local Git repository found. Run ${import_chalk94.default.cyan(
|
|
174791
175365
|
"`git clone <url>`"
|
|
174792
175366
|
)} to clone a remote Git repository first.`
|
|
174793
175367
|
);
|
|
@@ -174796,7 +175370,7 @@ async function connect(client2, argv) {
|
|
|
174796
175370
|
const remoteUrls = pluckRemoteUrls(gitConfig);
|
|
174797
175371
|
if (!remoteUrls) {
|
|
174798
175372
|
output_manager_default.error(
|
|
174799
|
-
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${
|
|
175373
|
+
`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(
|
|
174800
175374
|
"`git remote --help`"
|
|
174801
175375
|
)} for more details.`
|
|
174802
175376
|
);
|
|
@@ -174914,7 +175488,7 @@ async function promptConnectArg({
|
|
|
174914
175488
|
return true;
|
|
174915
175489
|
}
|
|
174916
175490
|
output_manager_default.log(
|
|
174917
|
-
`Found a repository in your local Git Config: ${
|
|
175491
|
+
`Found a repository in your local Git Config: ${import_chalk94.default.cyan(
|
|
174918
175492
|
Object.values(remoteUrls)[0]
|
|
174919
175493
|
)}`
|
|
174920
175494
|
);
|
|
@@ -174932,11 +175506,11 @@ async function promptConnectArg({
|
|
|
174932
175506
|
}
|
|
174933
175507
|
return shouldConnect;
|
|
174934
175508
|
}
|
|
174935
|
-
var
|
|
175509
|
+
var import_chalk94, import_path39;
|
|
174936
175510
|
var init_connect2 = __esm({
|
|
174937
175511
|
"src/commands/git/connect.ts"() {
|
|
174938
175512
|
"use strict";
|
|
174939
|
-
|
|
175513
|
+
import_chalk94 = __toESM3(require_source());
|
|
174940
175514
|
import_path39 = require("path");
|
|
174941
175515
|
init_create_git_meta();
|
|
174942
175516
|
init_link();
|
|
@@ -174999,7 +175573,7 @@ async function disconnect(client2, argv) {
|
|
|
174999
175573
|
}
|
|
175000
175574
|
if (args2.length !== 0) {
|
|
175001
175575
|
output_manager_default.error(
|
|
175002
|
-
`Invalid number of arguments. Usage: ${
|
|
175576
|
+
`Invalid number of arguments. Usage: ${import_chalk95.default.cyan(
|
|
175003
175577
|
`${getCommandName("project disconnect")}`
|
|
175004
175578
|
)}`
|
|
175005
175579
|
);
|
|
@@ -175021,14 +175595,14 @@ async function disconnect(client2, argv) {
|
|
|
175021
175595
|
`
|
|
175022
175596
|
);
|
|
175023
175597
|
const confirmDisconnect = autoConfirm || await client2.input.confirm(
|
|
175024
|
-
`Are you sure you want to disconnect ${
|
|
175598
|
+
`Are you sure you want to disconnect ${import_chalk95.default.cyan(
|
|
175025
175599
|
`${linkOrg}/${repo}`
|
|
175026
175600
|
)} from your project?`,
|
|
175027
175601
|
false
|
|
175028
175602
|
);
|
|
175029
175603
|
if (confirmDisconnect) {
|
|
175030
175604
|
await disconnectGitProvider(client2, org, project.id);
|
|
175031
|
-
output_manager_default.log(`Disconnected ${
|
|
175605
|
+
output_manager_default.log(`Disconnected ${import_chalk95.default.cyan(`${linkOrg}/${repo}`)}.`);
|
|
175032
175606
|
} else {
|
|
175033
175607
|
output_manager_default.log("Canceled");
|
|
175034
175608
|
}
|
|
@@ -175042,11 +175616,11 @@ async function disconnect(client2, argv) {
|
|
|
175042
175616
|
}
|
|
175043
175617
|
return 0;
|
|
175044
175618
|
}
|
|
175045
|
-
var
|
|
175619
|
+
var import_chalk95;
|
|
175046
175620
|
var init_disconnect2 = __esm({
|
|
175047
175621
|
"src/commands/git/disconnect.ts"() {
|
|
175048
175622
|
"use strict";
|
|
175049
|
-
|
|
175623
|
+
import_chalk95 = __toESM3(require_source());
|
|
175050
175624
|
init_pkg_name();
|
|
175051
175625
|
init_connect_git_provider();
|
|
175052
175626
|
init_output_manager();
|
|
@@ -175150,17 +175724,17 @@ var init_git2 = __esm({
|
|
|
175150
175724
|
// src/commands/guidance/status.ts
|
|
175151
175725
|
async function status(client2) {
|
|
175152
175726
|
const enabled = client2.config.guidance?.enabled !== false;
|
|
175153
|
-
const status3 = enabled ?
|
|
175727
|
+
const status3 = enabled ? import_chalk96.default.green("Enabled") : import_chalk96.default.red("Disabled");
|
|
175154
175728
|
output_manager_default.print("\n");
|
|
175155
|
-
output_manager_default.log(`${
|
|
175729
|
+
output_manager_default.log(`${import_chalk96.default.bold("Guidance status")}: ${status3}`);
|
|
175156
175730
|
output_manager_default.print("\n");
|
|
175157
175731
|
return 0;
|
|
175158
175732
|
}
|
|
175159
|
-
var
|
|
175733
|
+
var import_chalk96;
|
|
175160
175734
|
var init_status = __esm({
|
|
175161
175735
|
"src/commands/guidance/status.ts"() {
|
|
175162
175736
|
"use strict";
|
|
175163
|
-
|
|
175737
|
+
import_chalk96 = __toESM3(require_source());
|
|
175164
175738
|
init_output_manager();
|
|
175165
175739
|
}
|
|
175166
175740
|
});
|
|
@@ -175518,9 +176092,9 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
|
175518
176092
|
extractor.on("finish", resolve13);
|
|
175519
176093
|
res.body.pipe(extractor);
|
|
175520
176094
|
});
|
|
175521
|
-
const successLog = `Initialized "${
|
|
176095
|
+
const successLog = `Initialized "${import_chalk97.default.bold(
|
|
175522
176096
|
name
|
|
175523
|
-
)}" example in ${
|
|
176097
|
+
)}" example in ${import_chalk97.default.bold(humanizePath(folder))}.`;
|
|
175524
176098
|
const folderRel = import_node_path4.default.relative(client2.cwd, folder);
|
|
175525
176099
|
const deployHint = folderRel === "" ? list_item_default(`To deploy, run ${getCommandName()}.`) : list_item_default(
|
|
175526
176100
|
`To deploy, ${cmd(
|
|
@@ -175540,14 +176114,14 @@ function prepareFolder(cwd, folder, force) {
|
|
|
175540
176114
|
if (import_node_fs2.default.existsSync(dest)) {
|
|
175541
176115
|
if (!import_node_fs2.default.lstatSync(dest).isDirectory()) {
|
|
175542
176116
|
throw new Error(
|
|
175543
|
-
`Destination path "${
|
|
176117
|
+
`Destination path "${import_chalk97.default.bold(
|
|
175544
176118
|
folder
|
|
175545
176119
|
)}" already exists and is not a directory.`
|
|
175546
176120
|
);
|
|
175547
176121
|
}
|
|
175548
176122
|
if (!force && import_node_fs2.default.readdirSync(dest).length !== 0) {
|
|
175549
176123
|
throw new Error(
|
|
175550
|
-
`Destination path "${
|
|
176124
|
+
`Destination path "${import_chalk97.default.bold(
|
|
175551
176125
|
folder
|
|
175552
176126
|
)}" already exists and is not an empty directory. You may use ${cmd(
|
|
175553
176127
|
"--force"
|
|
@@ -175558,14 +176132,14 @@ function prepareFolder(cwd, folder, force) {
|
|
|
175558
176132
|
try {
|
|
175559
176133
|
import_node_fs2.default.mkdirSync(dest);
|
|
175560
176134
|
} catch (e2) {
|
|
175561
|
-
throw new Error(`Could not create directory "${
|
|
176135
|
+
throw new Error(`Could not create directory "${import_chalk97.default.bold(folder)}".`);
|
|
175562
176136
|
}
|
|
175563
176137
|
}
|
|
175564
176138
|
return dest;
|
|
175565
176139
|
}
|
|
175566
176140
|
async function guess(client2, exampleList, name) {
|
|
175567
176141
|
const GuessError = new Error(
|
|
175568
|
-
`No example found for ${
|
|
176142
|
+
`No example found for ${import_chalk97.default.bold(name)}, run ${getCommandName(
|
|
175569
176143
|
"init"
|
|
175570
176144
|
)} to see the list of available examples.`
|
|
175571
176145
|
);
|
|
@@ -175574,21 +176148,21 @@ async function guess(client2, exampleList, name) {
|
|
|
175574
176148
|
}
|
|
175575
176149
|
const found = did_you_mean_default(name, exampleList, 0.7);
|
|
175576
176150
|
if (typeof found === "string") {
|
|
175577
|
-
if (await client2.input.confirm(`Did you mean ${
|
|
176151
|
+
if (await client2.input.confirm(`Did you mean ${import_chalk97.default.bold(found)}?`, false)) {
|
|
175578
176152
|
return found;
|
|
175579
176153
|
}
|
|
175580
176154
|
} else {
|
|
175581
176155
|
throw GuessError;
|
|
175582
176156
|
}
|
|
175583
176157
|
}
|
|
175584
|
-
var import_node_fs2, import_node_path4, import_tar_fs,
|
|
176158
|
+
var import_node_fs2, import_node_path4, import_tar_fs, import_chalk97, EXAMPLE_API;
|
|
175585
176159
|
var init_init = __esm({
|
|
175586
176160
|
"src/commands/init/init.ts"() {
|
|
175587
176161
|
"use strict";
|
|
175588
176162
|
import_node_fs2 = __toESM3(require("fs"));
|
|
175589
176163
|
import_node_path4 = __toESM3(require("path"));
|
|
175590
176164
|
import_tar_fs = __toESM3(require_tar_fs());
|
|
175591
|
-
|
|
176165
|
+
import_chalk97 = __toESM3(require_source());
|
|
175592
176166
|
init_list4();
|
|
175593
176167
|
init_list_item();
|
|
175594
176168
|
init_humanize_path();
|
|
@@ -175704,11 +176278,11 @@ var init_build_state = __esm({
|
|
|
175704
176278
|
});
|
|
175705
176279
|
|
|
175706
176280
|
// src/util/output/builds.ts
|
|
175707
|
-
var
|
|
176281
|
+
var import_chalk98, import_bytes8, padding, MAX_BUILD_GROUPS, MAX_OUTPUTS_PER_GROUP, hasOutput, getCommonPath, styleBuild, styleHiddenBuilds, styleOutput, getDirPath, sortByEntrypoint, groupBuilds, builds_default;
|
|
175708
176282
|
var init_builds = __esm({
|
|
175709
176283
|
"src/util/output/builds.ts"() {
|
|
175710
176284
|
"use strict";
|
|
175711
|
-
|
|
176285
|
+
import_chalk98 = __toESM3(require_source());
|
|
175712
176286
|
import_bytes8 = __toESM3(require_bytes());
|
|
175713
176287
|
init_build_state();
|
|
175714
176288
|
padding = 8;
|
|
@@ -175737,48 +176311,48 @@ var init_builds = __esm({
|
|
|
175737
176311
|
styleBuild = (build2, times, longestSource) => {
|
|
175738
176312
|
const { entrypoint, id } = build2;
|
|
175739
176313
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
175740
|
-
let pathColor =
|
|
176314
|
+
let pathColor = import_chalk98.default.cyan;
|
|
175741
176315
|
if (isFailed(build2)) {
|
|
175742
|
-
pathColor =
|
|
176316
|
+
pathColor = import_chalk98.default.red;
|
|
175743
176317
|
}
|
|
175744
176318
|
const entry = entrypoint.padEnd(longestSource + padding);
|
|
175745
176319
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
|
175746
|
-
return `${
|
|
176320
|
+
return `${import_chalk98.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
175747
176321
|
};
|
|
175748
176322
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden2 = false) => {
|
|
175749
176323
|
const { id } = buildGroup[0];
|
|
175750
176324
|
const entry = commonPath.padEnd(longestSource + padding);
|
|
175751
176325
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
175752
176326
|
const prefix = isHidden2 === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
|
175753
|
-
let pathColor =
|
|
176327
|
+
let pathColor = import_chalk98.default.cyan;
|
|
175754
176328
|
if (buildGroup.every(isFailed)) {
|
|
175755
|
-
pathColor =
|
|
176329
|
+
pathColor = import_chalk98.default.red;
|
|
175756
176330
|
}
|
|
175757
176331
|
if (isHidden2) {
|
|
175758
|
-
pathColor =
|
|
176332
|
+
pathColor = import_chalk98.default.grey;
|
|
175759
176333
|
}
|
|
175760
|
-
return `${
|
|
176334
|
+
return `${import_chalk98.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
175761
176335
|
};
|
|
175762
176336
|
styleOutput = (output2, readyState, isLast) => {
|
|
175763
176337
|
const { type, path: path11, size, lambda } = output2;
|
|
175764
176338
|
const prefix = type === "lambda" ? "\u03BB " : "";
|
|
175765
|
-
const finalSize = size ? ` ${
|
|
175766
|
-
let color =
|
|
176339
|
+
const finalSize = size ? ` ${import_chalk98.default.grey(`(${(0, import_bytes8.default)(size)})`)}` : "";
|
|
176340
|
+
let color = import_chalk98.default.grey;
|
|
175767
176341
|
let finalRegion = "";
|
|
175768
176342
|
if (isReady({ readyState })) {
|
|
175769
|
-
color =
|
|
176343
|
+
color = import_chalk98.default;
|
|
175770
176344
|
} else if (isFailed({ readyState })) {
|
|
175771
|
-
color =
|
|
176345
|
+
color = import_chalk98.default.red;
|
|
175772
176346
|
}
|
|
175773
176347
|
if (lambda) {
|
|
175774
176348
|
const { deployedTo } = lambda;
|
|
175775
176349
|
if (deployedTo && deployedTo.length > 0) {
|
|
175776
|
-
finalRegion = ` ${
|
|
176350
|
+
finalRegion = ` ${import_chalk98.default.grey(`[${deployedTo.join(", ")}]`)}`;
|
|
175777
176351
|
}
|
|
175778
176352
|
}
|
|
175779
176353
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
|
175780
176354
|
const main18 = prefix + path11 + finalSize + finalRegion;
|
|
175781
|
-
return `${
|
|
176355
|
+
return `${import_chalk98.default.grey(corner)} ${color(main18)}`;
|
|
175782
176356
|
};
|
|
175783
176357
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
|
175784
176358
|
const parts = path11.split("/").slice(0, -1);
|
|
@@ -175910,7 +176484,7 @@ var init_builds = __esm({
|
|
|
175910
176484
|
);
|
|
175911
176485
|
if (outputs.length > MAX_OUTPUTS_PER_GROUP) {
|
|
175912
176486
|
final.push(
|
|
175913
|
-
|
|
176487
|
+
import_chalk98.default.grey(
|
|
175914
176488
|
`\u2514\u2500\u2500 ${outputs.length - MAX_OUTPUTS_PER_GROUP} output items hidden
|
|
175915
176489
|
`
|
|
175916
176490
|
)
|
|
@@ -175958,19 +176532,19 @@ function routes(routes2) {
|
|
|
175958
176532
|
const padding2 = 6;
|
|
175959
176533
|
const space = " ".repeat(padding2);
|
|
175960
176534
|
const destSpace = " ".repeat(longestDest || 10);
|
|
175961
|
-
const arrow =
|
|
176535
|
+
const arrow = import_chalk99.default.grey("->");
|
|
175962
176536
|
for (const item of routes2) {
|
|
175963
176537
|
if ("handle" in item) {
|
|
175964
|
-
toPrint += `${
|
|
176538
|
+
toPrint += `${import_chalk99.default.grey("\u2576")} ${import_chalk99.default.cyan(item.handle)}`;
|
|
175965
176539
|
continue;
|
|
175966
176540
|
}
|
|
175967
176541
|
const { src, dest, status: status3, headers } = item;
|
|
175968
176542
|
const last = routes2.indexOf(item) === routes2.length - 1;
|
|
175969
176543
|
const suffix = last ? "" : `
|
|
175970
176544
|
`;
|
|
175971
|
-
const finalSrc =
|
|
176545
|
+
const finalSrc = import_chalk99.default.cyan(src.padEnd(longestSrc + padding2));
|
|
175972
176546
|
const finalDest = dest ? `${arrow}${space}${dest}` : ` ${space}${destSpace}`;
|
|
175973
|
-
const finalStatus = status3 ?
|
|
176547
|
+
const finalStatus = status3 ? import_chalk99.default.grey(`[${status3}]`) : "";
|
|
175974
176548
|
let finalHeaders = null;
|
|
175975
176549
|
if (headers) {
|
|
175976
176550
|
finalHeaders = `
|
|
@@ -175981,21 +176555,21 @@ function routes(routes2) {
|
|
|
175981
176555
|
const last2 = headerKeys.indexOf(header) === headerKeys.length - 1;
|
|
175982
176556
|
const suffix2 = last2 ? "" : `
|
|
175983
176557
|
`;
|
|
175984
|
-
const prefix2 =
|
|
176558
|
+
const prefix2 = import_chalk99.default.grey(last2 ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500");
|
|
175985
176559
|
finalHeaders += `${prefix2} ${header}: ${value}${suffix2}`;
|
|
175986
176560
|
}
|
|
175987
176561
|
}
|
|
175988
|
-
const prefix =
|
|
176562
|
+
const prefix = import_chalk99.default.grey(finalHeaders ? "\u250C" : "\u2576");
|
|
175989
176563
|
const fill = `${finalSrc}${finalDest}${space}${finalStatus}`;
|
|
175990
176564
|
toPrint += `${prefix} ${fill}${finalHeaders || ""}${suffix}`;
|
|
175991
176565
|
}
|
|
175992
176566
|
return toPrint;
|
|
175993
176567
|
}
|
|
175994
|
-
var
|
|
176568
|
+
var import_chalk99, longestProperty;
|
|
175995
176569
|
var init_routes = __esm({
|
|
175996
176570
|
"src/util/output/routes.ts"() {
|
|
175997
176571
|
"use strict";
|
|
175998
|
-
|
|
176572
|
+
import_chalk99 = __toESM3(require_source());
|
|
175999
176573
|
longestProperty = (routes2, name) => {
|
|
176000
176574
|
const longestItem = routes2.sort((a, b) => {
|
|
176001
176575
|
const aName = a[name];
|
|
@@ -176115,7 +176689,7 @@ async function inspect3(client2) {
|
|
|
176115
176689
|
} catch {
|
|
176116
176690
|
}
|
|
176117
176691
|
output_manager_default.spinner(
|
|
176118
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
|
176692
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk100.default.bold(contextName)}`
|
|
176119
176693
|
);
|
|
176120
176694
|
let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
|
176121
176695
|
let abortController;
|
|
@@ -176142,7 +176716,7 @@ async function inspect3(client2) {
|
|
|
176142
176716
|
}
|
|
176143
176717
|
}
|
|
176144
176718
|
if (withLogs) {
|
|
176145
|
-
print(`${
|
|
176719
|
+
print(`${import_chalk100.default.cyan("status")} ${stateString(deployment.readyState)}
|
|
176146
176720
|
`);
|
|
176147
176721
|
} else {
|
|
176148
176722
|
await printDetails({ deployment, contextName, client: client2, startTimestamp });
|
|
@@ -176155,17 +176729,17 @@ function stateString(s) {
|
|
|
176155
176729
|
switch (s) {
|
|
176156
176730
|
case "INITIALIZING":
|
|
176157
176731
|
case "BUILDING":
|
|
176158
|
-
return
|
|
176732
|
+
return import_chalk100.default.yellow(CIRCLE) + sTitle;
|
|
176159
176733
|
case "ERROR":
|
|
176160
|
-
return
|
|
176734
|
+
return import_chalk100.default.red(CIRCLE) + sTitle;
|
|
176161
176735
|
case "READY":
|
|
176162
|
-
return
|
|
176736
|
+
return import_chalk100.default.green(CIRCLE) + sTitle;
|
|
176163
176737
|
case "QUEUED":
|
|
176164
|
-
return
|
|
176738
|
+
return import_chalk100.default.gray(CIRCLE) + sTitle;
|
|
176165
176739
|
case "CANCELED":
|
|
176166
|
-
return
|
|
176740
|
+
return import_chalk100.default.gray(CIRCLE) + sTitle;
|
|
176167
176741
|
default:
|
|
176168
|
-
return
|
|
176742
|
+
return import_chalk100.default.gray("UNKNOWN");
|
|
176169
176743
|
}
|
|
176170
176744
|
}
|
|
176171
176745
|
async function printDetails({
|
|
@@ -176175,7 +176749,7 @@ async function printDetails({
|
|
|
176175
176749
|
startTimestamp
|
|
176176
176750
|
}) {
|
|
176177
176751
|
output_manager_default.log(
|
|
176178
|
-
`Fetched deployment "${
|
|
176752
|
+
`Fetched deployment "${import_chalk100.default.bold(deployment.url)}" in ${import_chalk100.default.bold(
|
|
176179
176753
|
contextName
|
|
176180
176754
|
)} ${elapsed(Date.now() - startTimestamp)}`
|
|
176181
176755
|
);
|
|
@@ -176191,14 +176765,14 @@ async function printDetails({
|
|
|
176191
176765
|
const { print, link: link4 } = output_manager_default;
|
|
176192
176766
|
const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
|
|
176193
176767
|
print("\n");
|
|
176194
|
-
print(
|
|
176195
|
-
print(` ${
|
|
176768
|
+
print(import_chalk100.default.bold(" General\n\n"));
|
|
176769
|
+
print(` ${import_chalk100.default.cyan("id")} ${id}
|
|
176196
176770
|
`);
|
|
176197
|
-
print(` ${
|
|
176771
|
+
print(` ${import_chalk100.default.cyan("name")} ${name}
|
|
176198
176772
|
`);
|
|
176199
176773
|
const customEnvironmentSlug = deployment.customEnvironment?.slug;
|
|
176200
176774
|
const target = customEnvironmentSlug ?? deployment.target ?? "preview";
|
|
176201
|
-
print(` ${
|
|
176775
|
+
print(` ${import_chalk100.default.cyan("target")} `);
|
|
176202
176776
|
print(
|
|
176203
176777
|
deployment.customEnvironment && deployment.team?.slug ? `${link4(
|
|
176204
176778
|
`${target}`,
|
|
@@ -176208,13 +176782,13 @@ async function printDetails({
|
|
|
176208
176782
|
` : `${target}
|
|
176209
176783
|
`
|
|
176210
176784
|
);
|
|
176211
|
-
print(` ${
|
|
176785
|
+
print(` ${import_chalk100.default.cyan("status")} ${stateString(readyState)}
|
|
176212
176786
|
`);
|
|
176213
|
-
print(` ${
|
|
176787
|
+
print(` ${import_chalk100.default.cyan("url")} https://${url3}
|
|
176214
176788
|
`);
|
|
176215
176789
|
if (createdAt) {
|
|
176216
176790
|
print(
|
|
176217
|
-
` ${
|
|
176791
|
+
` ${import_chalk100.default.cyan("created")} ${new Date(createdAt)} ${elapsed(
|
|
176218
176792
|
Date.now() - createdAt,
|
|
176219
176793
|
true
|
|
176220
176794
|
)}
|
|
@@ -176223,10 +176797,10 @@ async function printDetails({
|
|
|
176223
176797
|
}
|
|
176224
176798
|
print("\n\n");
|
|
176225
176799
|
if (aliases !== void 0 && aliases.length > 0) {
|
|
176226
|
-
print(
|
|
176800
|
+
print(import_chalk100.default.bold(" Aliases\n\n"));
|
|
176227
176801
|
let aliasList = "";
|
|
176228
176802
|
for (const alias2 of aliases) {
|
|
176229
|
-
aliasList += `${
|
|
176803
|
+
aliasList += `${import_chalk100.default.gray("\u2576")} https://${alias2}
|
|
176230
176804
|
`;
|
|
176231
176805
|
}
|
|
176232
176806
|
print(indent_default(aliasList, 4));
|
|
@@ -176238,12 +176812,12 @@ async function printDetails({
|
|
|
176238
176812
|
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
|
176239
176813
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
|
176240
176814
|
}
|
|
176241
|
-
print(
|
|
176815
|
+
print(import_chalk100.default.bold(" Builds\n\n"));
|
|
176242
176816
|
print(indent_default(builds_default(builds, times).toPrint, 4));
|
|
176243
176817
|
print("\n\n");
|
|
176244
176818
|
}
|
|
176245
176819
|
if (Array.isArray(routes2) && routes2.length > 0) {
|
|
176246
|
-
print(
|
|
176820
|
+
print(import_chalk100.default.bold(" Routes\n\n"));
|
|
176247
176821
|
print(indent_default(routes(routes2), 4));
|
|
176248
176822
|
print(`
|
|
176249
176823
|
|
|
@@ -176256,12 +176830,12 @@ function exitCode(state) {
|
|
|
176256
176830
|
}
|
|
176257
176831
|
return 0;
|
|
176258
176832
|
}
|
|
176259
|
-
var import_error_utils26,
|
|
176833
|
+
var import_error_utils26, import_chalk100, import_ms19, import_title6, import_url16;
|
|
176260
176834
|
var init_inspect4 = __esm({
|
|
176261
176835
|
"src/commands/inspect/index.ts"() {
|
|
176262
176836
|
"use strict";
|
|
176263
176837
|
import_error_utils26 = __toESM3(require_dist2());
|
|
176264
|
-
|
|
176838
|
+
import_chalk100 = __toESM3(require_source());
|
|
176265
176839
|
import_ms19 = __toESM3(require_ms());
|
|
176266
176840
|
import_title6 = __toESM3(require_lib4());
|
|
176267
176841
|
import_url16 = require("url");
|
|
@@ -176697,7 +177271,7 @@ async function add5(client2, args2) {
|
|
|
176697
177271
|
}
|
|
176698
177272
|
const installation = teamInstallations[0];
|
|
176699
177273
|
output_manager_default.log(
|
|
176700
|
-
`Installing ${
|
|
177274
|
+
`Installing ${import_chalk101.default.bold(product.name)} by ${import_chalk101.default.bold(integration.name)} under ${import_chalk101.default.bold(contextName)}`
|
|
176701
177275
|
);
|
|
176702
177276
|
const metadataSchema = product.metadataSchema;
|
|
176703
177277
|
const metadataWizard = createMetadataWizard(metadataSchema);
|
|
@@ -176917,16 +177491,16 @@ async function selectBillingPlan(client2, billingPlans) {
|
|
|
176917
177491
|
}
|
|
176918
177492
|
async function confirmProductSelection(client2, product, name, metadata, billingPlan) {
|
|
176919
177493
|
output_manager_default.print("Selected product:\n");
|
|
176920
|
-
output_manager_default.print(`${
|
|
177494
|
+
output_manager_default.print(`${import_chalk101.default.dim(`- ${import_chalk101.default.bold("Name:")} ${name}`)}
|
|
176921
177495
|
`);
|
|
176922
177496
|
for (const [key, value] of Object.entries(metadata)) {
|
|
176923
177497
|
output_manager_default.print(
|
|
176924
|
-
`${
|
|
177498
|
+
`${import_chalk101.default.dim(`- ${import_chalk101.default.bold(`${product.metadataSchema.properties[key]["ui:label"]}:`)} ${value}`)}
|
|
176925
177499
|
`
|
|
176926
177500
|
);
|
|
176927
177501
|
}
|
|
176928
177502
|
output_manager_default.print(
|
|
176929
|
-
`${
|
|
177503
|
+
`${import_chalk101.default.dim(`- ${import_chalk101.default.bold("Plan:")} ${billingPlan.name}`)}
|
|
176930
177504
|
`
|
|
176931
177505
|
);
|
|
176932
177506
|
return client2.input.confirm("Confirm selection?", true);
|
|
@@ -177036,7 +177610,7 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
|
177036
177610
|
]
|
|
177037
177611
|
});
|
|
177038
177612
|
output_manager_default.spinner(
|
|
177039
|
-
`Connecting ${
|
|
177613
|
+
`Connecting ${import_chalk101.default.bold(name)} to ${import_chalk101.default.bold(project.name)}...`
|
|
177040
177614
|
);
|
|
177041
177615
|
try {
|
|
177042
177616
|
await connectResourceToProject(
|
|
@@ -177054,17 +177628,17 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
|
177054
177628
|
output_manager_default.stopSpinner();
|
|
177055
177629
|
}
|
|
177056
177630
|
output_manager_default.log(
|
|
177057
|
-
`${
|
|
177631
|
+
`${import_chalk101.default.bold(name)} successfully connected to ${import_chalk101.default.bold(project.name)}
|
|
177058
177632
|
|
|
177059
177633
|
${indent_default(`Run ${cmd(`${packageName} env pull`)} to update the environment variables`, 4)}`
|
|
177060
177634
|
);
|
|
177061
177635
|
return 0;
|
|
177062
177636
|
}
|
|
177063
|
-
var
|
|
177637
|
+
var import_chalk101, import_open3;
|
|
177064
177638
|
var init_add10 = __esm({
|
|
177065
177639
|
"src/commands/integration/add.ts"() {
|
|
177066
177640
|
"use strict";
|
|
177067
|
-
|
|
177641
|
+
import_chalk101 = __toESM3(require_source());
|
|
177068
177642
|
import_open3 = __toESM3(require_open());
|
|
177069
177643
|
init_format_table();
|
|
177070
177644
|
init_pkg_name();
|
|
@@ -177384,7 +177958,7 @@ function outputBalanceInformation(prepaymentInfo, resources, integrationSlug) {
|
|
|
177384
177958
|
}
|
|
177385
177959
|
}
|
|
177386
177960
|
output_manager_default.log(
|
|
177387
|
-
`${
|
|
177961
|
+
`${import_chalk102.default.bold(`Balances and thresholds for ${integrationSlug}`)}:`
|
|
177388
177962
|
);
|
|
177389
177963
|
for (const key in mappings) {
|
|
177390
177964
|
const mapping = mappings[key];
|
|
@@ -177410,11 +177984,11 @@ function formattedCurrency(amountInCents) {
|
|
|
177410
177984
|
currency: "USD"
|
|
177411
177985
|
}).format(amountInCents / 100);
|
|
177412
177986
|
}
|
|
177413
|
-
var
|
|
177987
|
+
var import_chalk102;
|
|
177414
177988
|
var init_balance2 = __esm({
|
|
177415
177989
|
"src/commands/integration/balance.ts"() {
|
|
177416
177990
|
"use strict";
|
|
177417
|
-
|
|
177991
|
+
import_chalk102 = __toESM3(require_source());
|
|
177418
177992
|
init_output_manager();
|
|
177419
177993
|
init_get_scope();
|
|
177420
177994
|
init_fetch_installation_prepayment_info();
|
|
@@ -177568,18 +178142,18 @@ async function list4(client2) {
|
|
|
177568
178142
|
return 0;
|
|
177569
178143
|
}
|
|
177570
178144
|
output_manager_default.log(
|
|
177571
|
-
`Integrations in ${
|
|
178145
|
+
`Integrations in ${import_chalk103.default.bold(contextName)}:
|
|
177572
178146
|
${table(
|
|
177573
178147
|
[
|
|
177574
178148
|
["Name", "Status", "Product", "Integration", "Projects"].map(
|
|
177575
|
-
(header) =>
|
|
178149
|
+
(header) => import_chalk103.default.bold(import_chalk103.default.cyan(header))
|
|
177576
178150
|
),
|
|
177577
178151
|
...results.map((result) => [
|
|
177578
|
-
resourceLink(contextName, result) ??
|
|
178152
|
+
resourceLink(contextName, result) ?? import_chalk103.default.gray("\u2013"),
|
|
177579
178153
|
resourceStatus(result.status ?? "\u2013"),
|
|
177580
|
-
result.product ??
|
|
177581
|
-
integrationLink(result, team) ??
|
|
177582
|
-
|
|
178154
|
+
result.product ?? import_chalk103.default.gray("\u2013"),
|
|
178155
|
+
integrationLink(result, team) ?? import_chalk103.default.gray("\u2013"),
|
|
178156
|
+
import_chalk103.default.grey(result.projects ? result.projects : "\u2013")
|
|
177583
178157
|
])
|
|
177584
178158
|
],
|
|
177585
178159
|
{ hsep: 8 }
|
|
@@ -177592,17 +178166,17 @@ function resourceStatus(status3) {
|
|
|
177592
178166
|
const statusTitleCase = (0, import_title7.default)(status3);
|
|
177593
178167
|
switch (status3) {
|
|
177594
178168
|
case "initializing":
|
|
177595
|
-
return
|
|
178169
|
+
return import_chalk103.default.yellow(CIRCLE) + statusTitleCase;
|
|
177596
178170
|
case "error":
|
|
177597
|
-
return
|
|
178171
|
+
return import_chalk103.default.red(CIRCLE) + statusTitleCase;
|
|
177598
178172
|
case "available":
|
|
177599
|
-
return
|
|
178173
|
+
return import_chalk103.default.green(CIRCLE) + statusTitleCase;
|
|
177600
178174
|
case "suspended":
|
|
177601
|
-
return
|
|
178175
|
+
return import_chalk103.default.white(CIRCLE) + statusTitleCase;
|
|
177602
178176
|
case "limits-exceeded-suspended":
|
|
177603
|
-
return `${
|
|
178177
|
+
return `${import_chalk103.default.white(CIRCLE)}Limits exceeded`;
|
|
177604
178178
|
default:
|
|
177605
|
-
return
|
|
178179
|
+
return import_chalk103.default.gray(statusTitleCase);
|
|
177606
178180
|
}
|
|
177607
178181
|
}
|
|
177608
178182
|
function resourceLink(orgSlug, resource) {
|
|
@@ -177623,18 +178197,18 @@ function integrationLink(integration, team) {
|
|
|
177623
178197
|
if (!integration.configurationId) {
|
|
177624
178198
|
return integration.integration;
|
|
177625
178199
|
}
|
|
177626
|
-
const boldName =
|
|
178200
|
+
const boldName = import_chalk103.default.bold(integration.integration);
|
|
177627
178201
|
const integrationDeepLink = buildSSOLink(team, integration.configurationId);
|
|
177628
178202
|
return output_manager_default.link(boldName, integrationDeepLink, {
|
|
177629
178203
|
fallback: () => boldName,
|
|
177630
178204
|
color: false
|
|
177631
178205
|
});
|
|
177632
178206
|
}
|
|
177633
|
-
var
|
|
178207
|
+
var import_chalk103, import_title7;
|
|
177634
178208
|
var init_list6 = __esm({
|
|
177635
178209
|
"src/commands/integration/list.ts"() {
|
|
177636
178210
|
"use strict";
|
|
177637
|
-
|
|
178211
|
+
import_chalk103 = __toESM3(require_source());
|
|
177638
178212
|
init_get_scope();
|
|
177639
178213
|
init_link2();
|
|
177640
178214
|
init_get_resources();
|
|
@@ -177695,7 +178269,7 @@ async function openIntegration(client2, args2) {
|
|
|
177695
178269
|
knownIntegrationSlug = !!configuration;
|
|
177696
178270
|
} catch (error3) {
|
|
177697
178271
|
output_manager_default.error(
|
|
177698
|
-
`Failed to fetch configuration for ${
|
|
178272
|
+
`Failed to fetch configuration for ${import_chalk104.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
|
|
177699
178273
|
);
|
|
177700
178274
|
return 1;
|
|
177701
178275
|
} finally {
|
|
@@ -177703,19 +178277,19 @@ async function openIntegration(client2, args2) {
|
|
|
177703
178277
|
}
|
|
177704
178278
|
if (!configuration) {
|
|
177705
178279
|
output_manager_default.error(
|
|
177706
|
-
`No configuration found for ${
|
|
178280
|
+
`No configuration found for ${import_chalk104.default.bold(`"${integrationSlug}"`)}.`
|
|
177707
178281
|
);
|
|
177708
178282
|
return 1;
|
|
177709
178283
|
}
|
|
177710
|
-
output_manager_default.print(`Opening the ${
|
|
178284
|
+
output_manager_default.print(`Opening the ${import_chalk104.default.bold(integrationSlug)} dashboard...`);
|
|
177711
178285
|
(0, import_open4.default)(buildSSOLink(team, configuration.id));
|
|
177712
178286
|
return 0;
|
|
177713
178287
|
}
|
|
177714
|
-
var
|
|
178288
|
+
var import_chalk104, import_open4;
|
|
177715
178289
|
var init_open_integration = __esm({
|
|
177716
178290
|
"src/commands/integration/open-integration.ts"() {
|
|
177717
178291
|
"use strict";
|
|
177718
|
-
|
|
178292
|
+
import_chalk104 = __toESM3(require_source());
|
|
177719
178293
|
import_open4 = __toESM3(require_open());
|
|
177720
178294
|
init_get_scope();
|
|
177721
178295
|
init_fetch_marketplace_integrations();
|
|
@@ -177808,7 +178382,7 @@ async function remove3(client2) {
|
|
|
177808
178382
|
);
|
|
177809
178383
|
output_manager_default.stopSpinner();
|
|
177810
178384
|
if (!integrationConfiguration) {
|
|
177811
|
-
output_manager_default.error(`No integration ${
|
|
178385
|
+
output_manager_default.error(`No integration ${import_chalk105.default.bold(integrationName)} found.`);
|
|
177812
178386
|
telemetry2.trackCliArgumentIntegration(integrationName, false);
|
|
177813
178387
|
return 0;
|
|
177814
178388
|
}
|
|
@@ -177827,26 +178401,26 @@ async function remove3(client2) {
|
|
|
177827
178401
|
await removeIntegration(client2, integrationConfiguration, team);
|
|
177828
178402
|
} catch (error3) {
|
|
177829
178403
|
output_manager_default.error(
|
|
177830
|
-
|
|
177831
|
-
`Failed to remove ${
|
|
178404
|
+
import_chalk105.default.red(
|
|
178405
|
+
`Failed to remove ${import_chalk105.default.bold(integrationName)}: ${error3.message}`
|
|
177832
178406
|
)
|
|
177833
178407
|
);
|
|
177834
178408
|
return 1;
|
|
177835
178409
|
}
|
|
177836
|
-
output_manager_default.success(`${
|
|
178410
|
+
output_manager_default.success(`${import_chalk105.default.bold(integrationName)} successfully removed.`);
|
|
177837
178411
|
return 0;
|
|
177838
178412
|
}
|
|
177839
178413
|
async function confirmIntegrationRemoval(client2, integration, team) {
|
|
177840
178414
|
output_manager_default.log(
|
|
177841
|
-
`The ${
|
|
178415
|
+
`The ${import_chalk105.default.bold(integration)} integration will be removed permanently from team ${import_chalk105.default.bold(team.name)}.`
|
|
177842
178416
|
);
|
|
177843
|
-
return client2.input.confirm(`${
|
|
178417
|
+
return client2.input.confirm(`${import_chalk105.default.red("Are you sure?")}`, false);
|
|
177844
178418
|
}
|
|
177845
|
-
var
|
|
178419
|
+
var import_chalk105;
|
|
177846
178420
|
var init_remove_integration2 = __esm({
|
|
177847
178421
|
"src/commands/integration/remove-integration.ts"() {
|
|
177848
178422
|
"use strict";
|
|
177849
|
-
|
|
178423
|
+
import_chalk105 = __toESM3(require_source());
|
|
177850
178424
|
init_output_manager();
|
|
177851
178425
|
init_get_args();
|
|
177852
178426
|
init_get_flags_specification();
|
|
@@ -178144,18 +178718,18 @@ async function createThreshold(client2) {
|
|
|
178144
178718
|
);
|
|
178145
178719
|
output_manager_default.stopSpinner();
|
|
178146
178720
|
if (!targetedResource) {
|
|
178147
|
-
output_manager_default.log(`The resource ${
|
|
178721
|
+
output_manager_default.log(`The resource ${import_chalk106.default.bold(resourceName)} was not found.`);
|
|
178148
178722
|
return 0;
|
|
178149
178723
|
}
|
|
178150
178724
|
if (!targetedResource.product?.integrationConfigurationId) {
|
|
178151
178725
|
output_manager_default.error(
|
|
178152
|
-
`The resource ${
|
|
178726
|
+
`The resource ${import_chalk106.default.bold(resourceName)} does not have an integration configuration.`
|
|
178153
178727
|
);
|
|
178154
178728
|
return 1;
|
|
178155
178729
|
}
|
|
178156
178730
|
if (targetedResource.billingPlan?.type !== "prepayment") {
|
|
178157
178731
|
output_manager_default.error(
|
|
178158
|
-
`The resource ${
|
|
178732
|
+
`The resource ${import_chalk106.default.bold(resourceName)} is not a prepayment-based resource.`
|
|
178159
178733
|
);
|
|
178160
178734
|
return 1;
|
|
178161
178735
|
}
|
|
@@ -178183,7 +178757,7 @@ async function createThreshold(client2) {
|
|
|
178183
178757
|
}
|
|
178184
178758
|
if (targetedResource.billingPlan.scope !== "resource") {
|
|
178185
178759
|
output_manager_default.log(
|
|
178186
|
-
`The resource ${
|
|
178760
|
+
`The resource ${import_chalk106.default.bold(resourceName)} uses an installation-level balance.`
|
|
178187
178761
|
);
|
|
178188
178762
|
return await updateThresholdForInstallation({
|
|
178189
178763
|
client: client2,
|
|
@@ -178297,17 +178871,17 @@ async function updateThresholdForInstallation(props) {
|
|
|
178297
178871
|
async function handleUpdateThreshold(props) {
|
|
178298
178872
|
if (props.resource.billingPlan?.type !== "prepayment") {
|
|
178299
178873
|
output_manager_default.log(
|
|
178300
|
-
`The resource ${
|
|
178874
|
+
`The resource ${import_chalk106.default.bold(props.resource.name)} is not a prepayment-based resource.`
|
|
178301
178875
|
);
|
|
178302
178876
|
return 0;
|
|
178303
178877
|
}
|
|
178304
178878
|
if (!props.resource.product?.integrationConfigurationId) {
|
|
178305
178879
|
output_manager_default.log(
|
|
178306
|
-
`The resource ${
|
|
178880
|
+
`The resource ${import_chalk106.default.bold(props.resource.name)} does not have an integration configuration.`
|
|
178307
178881
|
);
|
|
178308
178882
|
return 0;
|
|
178309
178883
|
}
|
|
178310
|
-
const entityTextReference = props.isInstallationLevel ? `installation ${
|
|
178884
|
+
const entityTextReference = props.isInstallationLevel ? `installation ${import_chalk106.default.bold(props.resource.product?.name)}` : `resource ${import_chalk106.default.bold(props.resource.name)}`;
|
|
178311
178885
|
if (props.existingThreshold) {
|
|
178312
178886
|
const shouldOverwriteThreshold = props.skipConfirmWithYes || await props.client.input.confirm(
|
|
178313
178887
|
`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?`,
|
|
@@ -178364,11 +178938,11 @@ async function handleUpdateThreshold(props) {
|
|
|
178364
178938
|
output_manager_default.success(`Threshold for ${entityTextReference} created successfully.`);
|
|
178365
178939
|
return 0;
|
|
178366
178940
|
}
|
|
178367
|
-
var
|
|
178941
|
+
var import_chalk106;
|
|
178368
178942
|
var init_create_threshold2 = __esm({
|
|
178369
178943
|
"src/commands/integration-resource/create-threshold.ts"() {
|
|
178370
178944
|
"use strict";
|
|
178371
|
-
|
|
178945
|
+
import_chalk106 = __toESM3(require_source());
|
|
178372
178946
|
init_output_manager();
|
|
178373
178947
|
init_error2();
|
|
178374
178948
|
init_get_args();
|
|
@@ -178511,7 +179085,7 @@ async function disconnect2(client2) {
|
|
|
178511
179085
|
);
|
|
178512
179086
|
output_manager_default.stopSpinner();
|
|
178513
179087
|
if (!targetedResource) {
|
|
178514
|
-
output_manager_default.error(`No resource ${
|
|
179088
|
+
output_manager_default.error(`No resource ${import_chalk107.default.bold(resourceName)} found.`);
|
|
178515
179089
|
return 0;
|
|
178516
179090
|
}
|
|
178517
179091
|
if (parsedArguments.flags["--all"]) {
|
|
@@ -178561,7 +179135,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178561
179135
|
);
|
|
178562
179136
|
if (!project) {
|
|
178563
179137
|
output_manager_default.log(
|
|
178564
|
-
`Could not find project ${
|
|
179138
|
+
`Could not find project ${import_chalk107.default.bold(projectName)} connected to resource ${import_chalk107.default.bold(resource.name)}.`
|
|
178565
179139
|
);
|
|
178566
179140
|
return 0;
|
|
178567
179141
|
}
|
|
@@ -178573,7 +179147,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178573
179147
|
output_manager_default.spinner("Disconnecting resource\u2026", 500);
|
|
178574
179148
|
await disconnectResourceFromProject(client2, resource, project);
|
|
178575
179149
|
output_manager_default.success(
|
|
178576
|
-
`Disconnected ${
|
|
179150
|
+
`Disconnected ${import_chalk107.default.bold(project.name)} from ${import_chalk107.default.bold(resource.name)}`
|
|
178577
179151
|
);
|
|
178578
179152
|
} catch (error3) {
|
|
178579
179153
|
output_manager_default.error(
|
|
@@ -178585,7 +179159,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178585
179159
|
}
|
|
178586
179160
|
async function handleDisconnectAllProjects(client2, resource, skipConfirmation) {
|
|
178587
179161
|
if (resource.projectsMetadata?.length === 0) {
|
|
178588
|
-
output_manager_default.log(`${
|
|
179162
|
+
output_manager_default.log(`${import_chalk107.default.bold(resource.name)} has no projects to disconnect.`);
|
|
178589
179163
|
return;
|
|
178590
179164
|
}
|
|
178591
179165
|
if (!skipConfirmation && !await confirmDisconnectAllProjects(client2, resource)) {
|
|
@@ -178595,7 +179169,7 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
|
178595
179169
|
output_manager_default.spinner("Disconnecting projects from resource\u2026", 500);
|
|
178596
179170
|
await disconnectResourceFromAllProjects(client2, resource);
|
|
178597
179171
|
output_manager_default.success(
|
|
178598
|
-
`Disconnected all projects from ${
|
|
179172
|
+
`Disconnected all projects from ${import_chalk107.default.bold(resource.name)}`
|
|
178599
179173
|
);
|
|
178600
179174
|
} catch (error3) {
|
|
178601
179175
|
throw new FailedError(
|
|
@@ -178606,9 +179180,9 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
|
178606
179180
|
}
|
|
178607
179181
|
async function confirmDisconnectProject(client2, resource, project) {
|
|
178608
179182
|
output_manager_default.log(
|
|
178609
|
-
`The resource ${
|
|
179183
|
+
`The resource ${import_chalk107.default.bold(resource.name)} will be disconnected from project ${import_chalk107.default.bold(project.name)}.`
|
|
178610
179184
|
);
|
|
178611
|
-
return client2.input.confirm(`${
|
|
179185
|
+
return client2.input.confirm(`${import_chalk107.default.red("Are you sure?")}`, false);
|
|
178612
179186
|
}
|
|
178613
179187
|
async function confirmDisconnectAllProjects(client2, resource) {
|
|
178614
179188
|
output_manager_default.log("The following projects will be disconnected:");
|
|
@@ -178619,13 +179193,13 @@ async function confirmDisconnectAllProjects(client2, resource) {
|
|
|
178619
179193
|
output_manager_default.print(` ${project.name}
|
|
178620
179194
|
`);
|
|
178621
179195
|
}
|
|
178622
|
-
return client2.input.confirm(
|
|
179196
|
+
return client2.input.confirm(import_chalk107.default.red("Are you sure?"), false);
|
|
178623
179197
|
}
|
|
178624
|
-
var
|
|
179198
|
+
var import_chalk107;
|
|
178625
179199
|
var init_disconnect4 = __esm({
|
|
178626
179200
|
"src/commands/integration-resource/disconnect.ts"() {
|
|
178627
179201
|
"use strict";
|
|
178628
|
-
|
|
179202
|
+
import_chalk107 = __toESM3(require_source());
|
|
178629
179203
|
init_output_manager();
|
|
178630
179204
|
init_get_args();
|
|
178631
179205
|
init_get_flags_specification();
|
|
@@ -178730,7 +179304,7 @@ async function remove4(client2) {
|
|
|
178730
179304
|
);
|
|
178731
179305
|
output_manager_default.stopSpinner();
|
|
178732
179306
|
if (!targetedResource) {
|
|
178733
|
-
output_manager_default.error(`No resource ${
|
|
179307
|
+
output_manager_default.error(`No resource ${import_chalk108.default.bold(resourceName)} found.`);
|
|
178734
179308
|
return 0;
|
|
178735
179309
|
}
|
|
178736
179310
|
if (disconnectAll) {
|
|
@@ -178761,7 +179335,7 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
|
178761
179335
|
const hasProjects = resource.projectsMetadata && resource.projectsMetadata?.length > 0;
|
|
178762
179336
|
if (!options?.skipProjectCheck && hasProjects) {
|
|
178763
179337
|
output_manager_default.error(
|
|
178764
|
-
`Cannot delete resource ${
|
|
179338
|
+
`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.`
|
|
178765
179339
|
);
|
|
178766
179340
|
return 1;
|
|
178767
179341
|
}
|
|
@@ -178772,24 +179346,24 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
|
178772
179346
|
try {
|
|
178773
179347
|
output_manager_default.spinner("Deleting resource\u2026", 500);
|
|
178774
179348
|
await deleteResource(client2, resource, team);
|
|
178775
|
-
output_manager_default.success(`${
|
|
179349
|
+
output_manager_default.success(`${import_chalk108.default.bold(resource.name)} successfully deleted.`);
|
|
178776
179350
|
} catch (error3) {
|
|
178777
179351
|
output_manager_default.error(
|
|
178778
|
-
`A problem occurred when attempting to delete ${
|
|
179352
|
+
`A problem occurred when attempting to delete ${import_chalk108.default.bold(resource.name)}: ${error3.message}`
|
|
178779
179353
|
);
|
|
178780
179354
|
return 1;
|
|
178781
179355
|
}
|
|
178782
179356
|
return 0;
|
|
178783
179357
|
}
|
|
178784
179358
|
async function confirmDeleteResource(client2, resource) {
|
|
178785
|
-
output_manager_default.log(`${
|
|
178786
|
-
return client2.input.confirm(`${
|
|
179359
|
+
output_manager_default.log(`${import_chalk108.default.bold(resource.name)} will be deleted permanently.`);
|
|
179360
|
+
return client2.input.confirm(`${import_chalk108.default.red("Are you sure?")}`, false);
|
|
178787
179361
|
}
|
|
178788
|
-
var
|
|
179362
|
+
var import_chalk108;
|
|
178789
179363
|
var init_remove_resource = __esm({
|
|
178790
179364
|
"src/commands/integration-resource/remove-resource.ts"() {
|
|
178791
179365
|
"use strict";
|
|
178792
|
-
|
|
179366
|
+
import_chalk108 = __toESM3(require_source());
|
|
178793
179367
|
init_output_manager();
|
|
178794
179368
|
init_get_args();
|
|
178795
179369
|
init_get_flags_specification();
|
|
@@ -179235,7 +179809,7 @@ async function list5(client2) {
|
|
|
179235
179809
|
}
|
|
179236
179810
|
const projectSlugLink = formatProject(contextName, project.name);
|
|
179237
179811
|
if (!singleDeployment) {
|
|
179238
|
-
spinner(`Fetching deployments in ${
|
|
179812
|
+
spinner(`Fetching deployments in ${import_chalk109.default.bold(contextName)}`);
|
|
179239
179813
|
const start = Date.now();
|
|
179240
179814
|
debug2("Fetching deployments");
|
|
179241
179815
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
|
@@ -179275,7 +179849,7 @@ async function list5(client2) {
|
|
|
179275
179849
|
const urls = [];
|
|
179276
179850
|
const tablePrint = table(
|
|
179277
179851
|
[
|
|
179278
|
-
headers.map((header) =>
|
|
179852
|
+
headers.map((header) => import_chalk109.default.bold(import_chalk109.default.cyan(header))),
|
|
179279
179853
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
|
179280
179854
|
urls.push(`https://${dep.url}`);
|
|
179281
179855
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
|
@@ -179285,16 +179859,16 @@ async function list5(client2) {
|
|
|
179285
179859
|
const targetName = dep.customEnvironment?.slug || (dep.target === "production" ? "Production" : "Preview");
|
|
179286
179860
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
|
179287
179861
|
return [
|
|
179288
|
-
|
|
179862
|
+
import_chalk109.default.gray(createdAt),
|
|
179289
179863
|
`https://${dep.url}`,
|
|
179290
179864
|
stateString2(dep.readyState || ""),
|
|
179291
179865
|
formatEnvironment(contextName, project.name, {
|
|
179292
179866
|
id: targetSlug,
|
|
179293
179867
|
slug: targetName
|
|
179294
179868
|
}),
|
|
179295
|
-
...!showPolicy ? [
|
|
179296
|
-
...!showPolicy ? [
|
|
179297
|
-
...showPolicy ? [
|
|
179869
|
+
...!showPolicy ? [import_chalk109.default.gray(getDeploymentDuration(dep))] : [],
|
|
179870
|
+
...!showPolicy ? [import_chalk109.default.gray(dep.creator?.username)] : [],
|
|
179871
|
+
...showPolicy ? [import_chalk109.default.gray(proposedExp)] : []
|
|
179298
179872
|
];
|
|
179299
179873
|
}).filter(
|
|
179300
179874
|
(app2) => (
|
|
@@ -179341,17 +179915,17 @@ function stateString2(s) {
|
|
|
179341
179915
|
case "BUILDING":
|
|
179342
179916
|
case "DEPLOYING":
|
|
179343
179917
|
case "ANALYZING":
|
|
179344
|
-
return
|
|
179918
|
+
return import_chalk109.default.yellow(CIRCLE) + sTitle;
|
|
179345
179919
|
case "ERROR":
|
|
179346
|
-
return
|
|
179920
|
+
return import_chalk109.default.red(CIRCLE) + sTitle;
|
|
179347
179921
|
case "READY":
|
|
179348
|
-
return
|
|
179922
|
+
return import_chalk109.default.green(CIRCLE) + sTitle;
|
|
179349
179923
|
case "QUEUED":
|
|
179350
|
-
return
|
|
179924
|
+
return import_chalk109.default.white(CIRCLE) + sTitle;
|
|
179351
179925
|
case "CANCELED":
|
|
179352
|
-
return
|
|
179926
|
+
return import_chalk109.default.gray(sTitle);
|
|
179353
179927
|
default:
|
|
179354
|
-
return
|
|
179928
|
+
return import_chalk109.default.gray("UNKNOWN");
|
|
179355
179929
|
}
|
|
179356
179930
|
}
|
|
179357
179931
|
function sortByCreatedAt(a, b) {
|
|
@@ -179367,12 +179941,12 @@ function filterUniqueApps() {
|
|
|
179367
179941
|
return true;
|
|
179368
179942
|
};
|
|
179369
179943
|
}
|
|
179370
|
-
var import_ms20,
|
|
179944
|
+
var import_ms20, import_chalk109, import_title8, import_error_utils27;
|
|
179371
179945
|
var init_list8 = __esm({
|
|
179372
179946
|
"src/commands/list/index.ts"() {
|
|
179373
179947
|
"use strict";
|
|
179374
179948
|
import_ms20 = __toESM3(require_ms());
|
|
179375
|
-
|
|
179949
|
+
import_chalk109 = __toESM3(require_source());
|
|
179376
179950
|
import_title8 = __toESM3(require_lib4());
|
|
179377
179951
|
init_table();
|
|
179378
179952
|
init_get_args();
|
|
@@ -179536,7 +180110,7 @@ async function logs(client2) {
|
|
|
179536
180110
|
} catch {
|
|
179537
180111
|
}
|
|
179538
180112
|
spinner(
|
|
179539
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
|
180113
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk110.default.bold(contextName)}`
|
|
179540
180114
|
);
|
|
179541
180115
|
let deployment;
|
|
179542
180116
|
try {
|
|
@@ -179556,9 +180130,9 @@ async function logs(client2) {
|
|
|
179556
180130
|
return 1;
|
|
179557
180131
|
}
|
|
179558
180132
|
output_manager_default.print(
|
|
179559
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
|
180133
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk110.default.dim(
|
|
179560
180134
|
deployment.id
|
|
179561
|
-
)}) starting from ${
|
|
180135
|
+
)}) starting from ${import_chalk110.default.bold((0, import_format3.default)(Date.now(), DATE_TIME_FORMAT))}
|
|
179562
180136
|
|
|
179563
180137
|
`
|
|
179564
180138
|
);
|
|
@@ -179573,12 +180147,12 @@ async function logs(client2) {
|
|
|
179573
180147
|
abortController
|
|
179574
180148
|
);
|
|
179575
180149
|
}
|
|
179576
|
-
var import_error_utils28,
|
|
180150
|
+
var import_error_utils28, import_chalk110, import_format3, deprecatedFlags, DATE_TIME_FORMAT;
|
|
179577
180151
|
var init_logs3 = __esm({
|
|
179578
180152
|
"src/commands/logs/index.ts"() {
|
|
179579
180153
|
"use strict";
|
|
179580
180154
|
import_error_utils28 = __toESM3(require_dist2());
|
|
179581
|
-
|
|
180155
|
+
import_chalk110 = __toESM3(require_source());
|
|
179582
180156
|
import_format3 = __toESM3(require_format());
|
|
179583
180157
|
init_build_state();
|
|
179584
180158
|
init_is_deploying();
|
|
@@ -180122,7 +180696,7 @@ async function pull2(client2) {
|
|
|
180122
180696
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
180123
180697
|
const { contextName } = await getScope(client2);
|
|
180124
180698
|
output_manager_default.spinner(
|
|
180125
|
-
`Fetching microfrontends configuration in ${
|
|
180699
|
+
`Fetching microfrontends configuration in ${import_chalk111.default.bold(contextName)}`
|
|
180126
180700
|
);
|
|
180127
180701
|
let parsedArgs;
|
|
180128
180702
|
const flagsSpecification = getFlagsSpecification(pullSubcommand2.options);
|
|
@@ -180170,11 +180744,11 @@ async function pull2(client2) {
|
|
|
180170
180744
|
const microfrontendsStamp = stamp_default();
|
|
180171
180745
|
output_manager_default.print(
|
|
180172
180746
|
`${prependEmoji(
|
|
180173
|
-
`Downloaded microfrontends configuration to ${
|
|
180747
|
+
`Downloaded microfrontends configuration to ${import_chalk111.default.bold(
|
|
180174
180748
|
humanizePath(
|
|
180175
180749
|
(0, import_node_path5.join)(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS)
|
|
180176
180750
|
)
|
|
180177
|
-
)} ${
|
|
180751
|
+
)} ${import_chalk111.default.gray(microfrontendsStamp())}`,
|
|
180178
180752
|
emoji("success")
|
|
180179
180753
|
)}
|
|
180180
180754
|
`
|
|
@@ -180186,11 +180760,11 @@ async function pull2(client2) {
|
|
|
180186
180760
|
return 1;
|
|
180187
180761
|
}
|
|
180188
180762
|
}
|
|
180189
|
-
var
|
|
180763
|
+
var import_chalk111, import_node_path5, import_fs_extra23, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS;
|
|
180190
180764
|
var init_pull5 = __esm({
|
|
180191
180765
|
"src/commands/microfrontends/pull.ts"() {
|
|
180192
180766
|
"use strict";
|
|
180193
|
-
|
|
180767
|
+
import_chalk111 = __toESM3(require_source());
|
|
180194
180768
|
import_node_path5 = require("path");
|
|
180195
180769
|
init_output_manager();
|
|
180196
180770
|
init_get_scope();
|
|
@@ -180343,12 +180917,12 @@ async function add6(client2, argv) {
|
|
|
180343
180917
|
const { args: args2 } = parsedArgs;
|
|
180344
180918
|
if (args2.length !== 1) {
|
|
180345
180919
|
output_manager_default.error(
|
|
180346
|
-
`Invalid number of arguments. Usage: ${
|
|
180920
|
+
`Invalid number of arguments. Usage: ${import_chalk112.default.cyan(
|
|
180347
180921
|
`${getCommandName("project add <name>")}`
|
|
180348
180922
|
)}`
|
|
180349
180923
|
);
|
|
180350
180924
|
if (args2.length > 1) {
|
|
180351
|
-
const example =
|
|
180925
|
+
const example = import_chalk112.default.cyan(
|
|
180352
180926
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
|
180353
180927
|
);
|
|
180354
180928
|
output_manager_default.log(
|
|
@@ -180376,17 +180950,17 @@ async function add6(client2, argv) {
|
|
|
180376
180950
|
const elapsed2 = (0, import_ms21.default)(Date.now() - start);
|
|
180377
180951
|
const { contextName } = await getScope(client2);
|
|
180378
180952
|
output_manager_default.log(
|
|
180379
|
-
`${
|
|
180953
|
+
`${import_chalk112.default.cyan("Success!")} Project ${import_chalk112.default.bold(
|
|
180380
180954
|
name.toLowerCase()
|
|
180381
|
-
)} added (${
|
|
180955
|
+
)} added (${import_chalk112.default.bold(contextName)}) ${import_chalk112.default.gray(`[${elapsed2}]`)}`
|
|
180382
180956
|
);
|
|
180383
180957
|
return 0;
|
|
180384
180958
|
}
|
|
180385
|
-
var
|
|
180959
|
+
var import_chalk112, import_ms21;
|
|
180386
180960
|
var init_add12 = __esm({
|
|
180387
180961
|
"src/commands/project/add.ts"() {
|
|
180388
180962
|
"use strict";
|
|
180389
|
-
|
|
180963
|
+
import_chalk112 = __toESM3(require_source());
|
|
180390
180964
|
import_ms21 = __toESM3(require_ms());
|
|
180391
180965
|
init_errors_ts();
|
|
180392
180966
|
init_pkg_name();
|
|
@@ -180485,7 +181059,7 @@ async function inspect4(client2, argv) {
|
|
|
180485
181059
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
180486
181060
|
if (args2.length !== 0 && args2.length !== 1) {
|
|
180487
181061
|
output_manager_default.error(
|
|
180488
|
-
`Invalid number of arguments. Usage: ${
|
|
181062
|
+
`Invalid number of arguments. Usage: ${import_chalk113.default.cyan(
|
|
180489
181063
|
`${getCommandName("project inspect <name>")}`
|
|
180490
181064
|
)}`
|
|
180491
181065
|
);
|
|
@@ -180500,52 +181074,52 @@ async function inspect4(client2, argv) {
|
|
|
180500
181074
|
});
|
|
180501
181075
|
const org = await getTeamById(client2, project.accountId);
|
|
180502
181076
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
180503
|
-
output_manager_default.log(`Found Project ${projectSlugLink} ${
|
|
181077
|
+
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk113.default.gray(inspectStamp())}`);
|
|
180504
181078
|
output_manager_default.print("\n");
|
|
180505
|
-
output_manager_default.print(
|
|
180506
|
-
output_manager_default.print(` ${
|
|
181079
|
+
output_manager_default.print(import_chalk113.default.bold(" General\n\n"));
|
|
181080
|
+
output_manager_default.print(` ${import_chalk113.default.cyan("ID")} ${project.id}
|
|
180507
181081
|
`);
|
|
180508
|
-
output_manager_default.print(` ${
|
|
181082
|
+
output_manager_default.print(` ${import_chalk113.default.cyan("Name")} ${project.name}
|
|
180509
181083
|
`);
|
|
180510
|
-
output_manager_default.print(` ${
|
|
181084
|
+
output_manager_default.print(` ${import_chalk113.default.cyan("Owner")} ${org.name}
|
|
180511
181085
|
`);
|
|
180512
181086
|
output_manager_default.print(
|
|
180513
|
-
` ${
|
|
181087
|
+
` ${import_chalk113.default.cyan("Created At")} ${formatDate(project.createdAt)}
|
|
180514
181088
|
`
|
|
180515
181089
|
);
|
|
180516
181090
|
output_manager_default.print(
|
|
180517
|
-
` ${
|
|
181091
|
+
` ${import_chalk113.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
|
|
180518
181092
|
`
|
|
180519
181093
|
);
|
|
180520
181094
|
output_manager_default.print(
|
|
180521
|
-
` ${
|
|
181095
|
+
` ${import_chalk113.default.cyan("Node.js Version")} ${project.nodeVersion}
|
|
180522
181096
|
`
|
|
180523
181097
|
);
|
|
180524
181098
|
const framework = import_frameworks7.frameworkList.find((f) => f.slug === project.framework);
|
|
180525
181099
|
output_manager_default.print("\n");
|
|
180526
|
-
output_manager_default.print(
|
|
180527
|
-
output_manager_default.print(` ${
|
|
181100
|
+
output_manager_default.print(import_chalk113.default.bold(" Framework Settings\n\n"));
|
|
181101
|
+
output_manager_default.print(` ${import_chalk113.default.cyan("Framework Preset")} ${framework?.name}
|
|
180528
181102
|
`);
|
|
180529
181103
|
output_manager_default.print(
|
|
180530
|
-
` ${
|
|
181104
|
+
` ${import_chalk113.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk113.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
|
|
180531
181105
|
`
|
|
180532
181106
|
);
|
|
180533
181107
|
output_manager_default.print(
|
|
180534
|
-
` ${
|
|
181108
|
+
` ${import_chalk113.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk113.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
|
|
180535
181109
|
`
|
|
180536
181110
|
);
|
|
180537
181111
|
output_manager_default.print(
|
|
180538
|
-
` ${
|
|
181112
|
+
` ${import_chalk113.default.cyan("Install Command")} ${project.installCommand ?? import_chalk113.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
|
|
180539
181113
|
`
|
|
180540
181114
|
);
|
|
180541
181115
|
output_manager_default.print("\n");
|
|
180542
181116
|
return 0;
|
|
180543
181117
|
}
|
|
180544
|
-
var
|
|
181118
|
+
var import_chalk113, import_frameworks7;
|
|
180545
181119
|
var init_inspect6 = __esm({
|
|
180546
181120
|
"src/commands/project/inspect.ts"() {
|
|
180547
181121
|
"use strict";
|
|
180548
|
-
|
|
181122
|
+
import_chalk113 = __toESM3(require_source());
|
|
180549
181123
|
import_frameworks7 = __toESM3(require_frameworks());
|
|
180550
181124
|
init_pkg_name();
|
|
180551
181125
|
init_inspect5();
|
|
@@ -180609,7 +181183,7 @@ async function list6(client2, argv) {
|
|
|
180609
181183
|
const { args: args2, flags: opts } = parsedArgs;
|
|
180610
181184
|
if (args2.length !== 0) {
|
|
180611
181185
|
output_manager_default.error(
|
|
180612
|
-
`Invalid number of arguments. Usage: ${
|
|
181186
|
+
`Invalid number of arguments. Usage: ${import_chalk114.default.cyan(
|
|
180613
181187
|
`${getCommandName("project ls")}`
|
|
180614
181188
|
)}`
|
|
180615
181189
|
);
|
|
@@ -180617,7 +181191,7 @@ async function list6(client2, argv) {
|
|
|
180617
181191
|
}
|
|
180618
181192
|
const start = Date.now();
|
|
180619
181193
|
const { contextName } = await getScope(client2);
|
|
180620
|
-
output_manager_default.spinner(`Fetching projects in ${
|
|
181194
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk114.default.bold(contextName)}`);
|
|
180621
181195
|
const flags = processFlags(opts, telemetryClient);
|
|
180622
181196
|
const projectsUrl = buildProjectsUrl(flags);
|
|
180623
181197
|
const {
|
|
@@ -180690,7 +181264,7 @@ function outputJson(client2, projectList, metadata) {
|
|
|
180690
181264
|
function outputTable(projectList, options) {
|
|
180691
181265
|
const { contextName, elapsed: elapsed2, deprecated, opts, pagination } = options;
|
|
180692
181266
|
output_manager_default.log(
|
|
180693
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
|
181267
|
+
`${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}]`)}`
|
|
180694
181268
|
);
|
|
180695
181269
|
if (projectList.length > 0) {
|
|
180696
181270
|
printProjectsTable(projectList);
|
|
@@ -180700,12 +181274,12 @@ function outputTable(projectList, options) {
|
|
|
180700
181274
|
function printProjectsTable(projectList) {
|
|
180701
181275
|
const tablePrint = table(
|
|
180702
181276
|
[
|
|
180703
|
-
TABLE_HEADERS.map((header) =>
|
|
181277
|
+
TABLE_HEADERS.map((header) => import_chalk114.default.bold(import_chalk114.default.cyan(header))),
|
|
180704
181278
|
...projectList.flatMap((project) => [
|
|
180705
181279
|
[
|
|
180706
|
-
|
|
181280
|
+
import_chalk114.default.bold(project.name),
|
|
180707
181281
|
getLatestProdUrl(project),
|
|
180708
|
-
|
|
181282
|
+
import_chalk114.default.gray((0, import_ms22.default)(Date.now() - project.updatedAt)),
|
|
180709
181283
|
project.nodeVersion ?? ""
|
|
180710
181284
|
]
|
|
180711
181285
|
])
|
|
@@ -180730,12 +181304,12 @@ function getLatestProdUrl(project) {
|
|
|
180730
181304
|
return `https://${alias2}`;
|
|
180731
181305
|
return "--";
|
|
180732
181306
|
}
|
|
180733
|
-
var import_ms22,
|
|
181307
|
+
var import_ms22, import_chalk114, TABLE_HEADERS, PAGINATION_FLAGS_TO_EXCLUDE, BASE_PROJECTS_URL;
|
|
180734
181308
|
var init_list10 = __esm({
|
|
180735
181309
|
"src/commands/project/list.ts"() {
|
|
180736
181310
|
"use strict";
|
|
180737
181311
|
import_ms22 = __toESM3(require_ms());
|
|
180738
|
-
|
|
181312
|
+
import_chalk114 = __toESM3(require_source());
|
|
180739
181313
|
init_table();
|
|
180740
181314
|
init_get_command_flags();
|
|
180741
181315
|
init_pkg_name();
|
|
@@ -180794,7 +181368,7 @@ async function rm6(client2, argv) {
|
|
|
180794
181368
|
const { args: args2 } = parsedArgs;
|
|
180795
181369
|
if (args2.length !== 1) {
|
|
180796
181370
|
output_manager_default.error(
|
|
180797
|
-
`Invalid number of arguments. Usage: ${
|
|
181371
|
+
`Invalid number of arguments. Usage: ${import_chalk115.default.cyan(
|
|
180798
181372
|
`${getCommandName("project rm <name>")}`
|
|
180799
181373
|
)}`
|
|
180800
181374
|
);
|
|
@@ -180824,7 +181398,7 @@ async function rm6(client2, argv) {
|
|
|
180824
181398
|
}
|
|
180825
181399
|
const elapsed2 = (0, import_ms23.default)(Date.now() - start);
|
|
180826
181400
|
output_manager_default.log(
|
|
180827
|
-
`${
|
|
181401
|
+
`${import_chalk115.default.cyan("Success!")} Project ${import_chalk115.default.bold(name)} removed ${import_chalk115.default.gray(
|
|
180828
181402
|
`[${elapsed2}]`
|
|
180829
181403
|
)}`
|
|
180830
181404
|
);
|
|
@@ -180833,22 +181407,22 @@ async function rm6(client2, argv) {
|
|
|
180833
181407
|
async function readConfirmation3(client2, projectName) {
|
|
180834
181408
|
output_manager_default.print(
|
|
180835
181409
|
prependEmoji(
|
|
180836
|
-
`The project ${
|
|
181410
|
+
`The project ${import_chalk115.default.bold(projectName)} will be removed permanently.
|
|
180837
181411
|
It will also delete everything under the project including deployments.
|
|
180838
181412
|
`,
|
|
180839
181413
|
emoji("warning")
|
|
180840
181414
|
)
|
|
180841
181415
|
);
|
|
180842
181416
|
return await client2.input.confirm(
|
|
180843
|
-
`${
|
|
181417
|
+
`${import_chalk115.default.bold.red("Are you sure?")}`,
|
|
180844
181418
|
false
|
|
180845
181419
|
);
|
|
180846
181420
|
}
|
|
180847
|
-
var
|
|
181421
|
+
var import_chalk115, import_ms23, e;
|
|
180848
181422
|
var init_rm10 = __esm({
|
|
180849
181423
|
"src/commands/project/rm.ts"() {
|
|
180850
181424
|
"use strict";
|
|
180851
|
-
|
|
181425
|
+
import_chalk115 = __toESM3(require_source());
|
|
180852
181426
|
import_ms23 = __toESM3(require_ms());
|
|
180853
181427
|
init_emoji();
|
|
180854
181428
|
init_errors_ts();
|
|
@@ -181016,7 +181590,7 @@ async function getProjectByDeployment({
|
|
|
181016
181590
|
let team;
|
|
181017
181591
|
try {
|
|
181018
181592
|
output_manager_default?.spinner(
|
|
181019
|
-
`Fetching deployment "${deployId}" in ${
|
|
181593
|
+
`Fetching deployment "${deployId}" in ${import_chalk116.default.bold(contextName)}\u2026`
|
|
181020
181594
|
);
|
|
181021
181595
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
181022
181596
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -181033,12 +181607,12 @@ async function getProjectByDeployment({
|
|
|
181033
181607
|
team = teamResult.value;
|
|
181034
181608
|
deployment = deploymentResult.value;
|
|
181035
181609
|
output_manager_default?.log(
|
|
181036
|
-
`Fetching deployment "${deployId}" in ${
|
|
181610
|
+
`Fetching deployment "${deployId}" in ${import_chalk116.default.bold(contextName)}\u2026`
|
|
181037
181611
|
);
|
|
181038
181612
|
if (deployment.team?.id) {
|
|
181039
181613
|
if (!team || deployment.team.id !== team.id) {
|
|
181040
181614
|
const err = new Error(
|
|
181041
|
-
team ? `Deployment doesn't belong to current team ${
|
|
181615
|
+
team ? `Deployment doesn't belong to current team ${import_chalk116.default.bold(
|
|
181042
181616
|
contextName
|
|
181043
181617
|
)}` : `Deployment belongs to a different team`
|
|
181044
181618
|
);
|
|
@@ -181047,7 +181621,7 @@ async function getProjectByDeployment({
|
|
|
181047
181621
|
}
|
|
181048
181622
|
} else if (team) {
|
|
181049
181623
|
const err = new Error(
|
|
181050
|
-
`Deployment doesn't belong to current team ${
|
|
181624
|
+
`Deployment doesn't belong to current team ${import_chalk116.default.bold(contextName)}`
|
|
181051
181625
|
);
|
|
181052
181626
|
err.code = "ERR_INVALID_TEAM";
|
|
181053
181627
|
throw err;
|
|
@@ -181068,11 +181642,11 @@ async function getProjectByDeployment({
|
|
|
181068
181642
|
output_manager_default?.stopSpinner();
|
|
181069
181643
|
}
|
|
181070
181644
|
}
|
|
181071
|
-
var
|
|
181645
|
+
var import_chalk116;
|
|
181072
181646
|
var init_get_project_by_deployment = __esm({
|
|
181073
181647
|
"src/util/projects/get-project-by-deployment.ts"() {
|
|
181074
181648
|
"use strict";
|
|
181075
|
-
|
|
181649
|
+
import_chalk116 = __toESM3(require_source());
|
|
181076
181650
|
init_get_deployment();
|
|
181077
181651
|
init_get_project_by_id_or_name();
|
|
181078
181652
|
init_get_scope();
|
|
@@ -181086,21 +181660,21 @@ var init_get_project_by_deployment = __esm({
|
|
|
181086
181660
|
// src/util/alias/render-alias-status.ts
|
|
181087
181661
|
function renderAliasStatus(status3) {
|
|
181088
181662
|
if (status3 === "completed") {
|
|
181089
|
-
return
|
|
181663
|
+
return import_chalk117.default.green(status3);
|
|
181090
181664
|
}
|
|
181091
181665
|
if (status3 === "failed") {
|
|
181092
|
-
return
|
|
181666
|
+
return import_chalk117.default.red(status3);
|
|
181093
181667
|
}
|
|
181094
181668
|
if (status3 === "skipped") {
|
|
181095
|
-
return
|
|
181669
|
+
return import_chalk117.default.gray(status3);
|
|
181096
181670
|
}
|
|
181097
|
-
return
|
|
181671
|
+
return import_chalk117.default.yellow(status3);
|
|
181098
181672
|
}
|
|
181099
|
-
var
|
|
181673
|
+
var import_chalk117;
|
|
181100
181674
|
var init_render_alias_status = __esm({
|
|
181101
181675
|
"src/util/alias/render-alias-status.ts"() {
|
|
181102
181676
|
"use strict";
|
|
181103
|
-
|
|
181677
|
+
import_chalk117 = __toESM3(require_source());
|
|
181104
181678
|
}
|
|
181105
181679
|
});
|
|
181106
181680
|
|
|
@@ -181207,7 +181781,7 @@ async function promoteStatus({
|
|
|
181207
181781
|
}
|
|
181208
181782
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
|
181209
181783
|
output_manager_default.log(
|
|
181210
|
-
`The promotion exceeded its deadline - rerun ${
|
|
181784
|
+
`The promotion exceeded its deadline - rerun ${import_chalk118.default.bold(
|
|
181211
181785
|
`${packageName} promote ${toDeploymentId}`
|
|
181212
181786
|
)} to try again`
|
|
181213
181787
|
);
|
|
@@ -181271,26 +181845,26 @@ async function renderJobSucceeded({
|
|
|
181271
181845
|
let deploymentInfo = "";
|
|
181272
181846
|
try {
|
|
181273
181847
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
181274
|
-
deploymentInfo = `${
|
|
181848
|
+
deploymentInfo = `${import_chalk118.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
181275
181849
|
} catch (err) {
|
|
181276
181850
|
output_manager_default.debug(
|
|
181277
181851
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
181278
181852
|
);
|
|
181279
|
-
deploymentInfo =
|
|
181853
|
+
deploymentInfo = import_chalk118.default.bold(toDeploymentId);
|
|
181280
181854
|
}
|
|
181281
181855
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
|
181282
181856
|
output_manager_default.log(
|
|
181283
|
-
`Success! ${
|
|
181857
|
+
`Success! ${import_chalk118.default.bold(
|
|
181284
181858
|
project.name
|
|
181285
181859
|
)} was promoted to ${deploymentInfo} ${duration}`
|
|
181286
181860
|
);
|
|
181287
181861
|
return 0;
|
|
181288
181862
|
}
|
|
181289
|
-
var
|
|
181863
|
+
var import_chalk118, import_ms24;
|
|
181290
181864
|
var init_status2 = __esm({
|
|
181291
181865
|
"src/commands/promote/status.ts"() {
|
|
181292
181866
|
"use strict";
|
|
181293
|
-
|
|
181867
|
+
import_chalk118 = __toESM3(require_source());
|
|
181294
181868
|
init_elapsed();
|
|
181295
181869
|
init_format_date();
|
|
181296
181870
|
init_get_deployment();
|
|
@@ -181347,7 +181921,7 @@ async function requestPromote({
|
|
|
181347
181921
|
}
|
|
181348
181922
|
);
|
|
181349
181923
|
output_manager_default.log(
|
|
181350
|
-
`Successfully created new deployment of ${
|
|
181924
|
+
`Successfully created new deployment of ${import_chalk119.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
|
181351
181925
|
);
|
|
181352
181926
|
return 0;
|
|
181353
181927
|
}
|
|
@@ -181368,7 +181942,7 @@ async function requestPromote({
|
|
|
181368
181942
|
}
|
|
181369
181943
|
if (timeout !== void 0 && (0, import_ms25.default)(timeout) === 0) {
|
|
181370
181944
|
output_manager_default.log(
|
|
181371
|
-
`Successfully requested promote of ${
|
|
181945
|
+
`Successfully requested promote of ${import_chalk119.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
181372
181946
|
);
|
|
181373
181947
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
|
181374
181948
|
return 0;
|
|
@@ -181381,11 +181955,11 @@ async function requestPromote({
|
|
|
181381
181955
|
timeout
|
|
181382
181956
|
});
|
|
181383
181957
|
}
|
|
181384
|
-
var
|
|
181958
|
+
var import_chalk119, import_ms25;
|
|
181385
181959
|
var init_request_promote = __esm({
|
|
181386
181960
|
"src/commands/promote/request-promote.ts"() {
|
|
181387
181961
|
"use strict";
|
|
181388
|
-
|
|
181962
|
+
import_chalk119 = __toESM3(require_source());
|
|
181389
181963
|
init_pkg_name();
|
|
181390
181964
|
init_get_project_by_deployment();
|
|
181391
181965
|
import_ms25 = __toESM3(require_ms());
|
|
@@ -181546,7 +182120,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181546
182120
|
let team;
|
|
181547
182121
|
try {
|
|
181548
182122
|
output_manager_default.spinner(
|
|
181549
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
182123
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk120.default.bold(contextName)}\u2026`
|
|
181550
182124
|
);
|
|
181551
182125
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
181552
182126
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -181563,7 +182137,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181563
182137
|
team = teamResult.value;
|
|
181564
182138
|
deployment = deploymentResult.value;
|
|
181565
182139
|
output_manager_default.log(
|
|
181566
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
182140
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk120.default.bold(contextName)}\u2026`
|
|
181567
182141
|
);
|
|
181568
182142
|
} finally {
|
|
181569
182143
|
output_manager_default.stopSpinner();
|
|
@@ -181571,7 +182145,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181571
182145
|
if (deployment.team?.id) {
|
|
181572
182146
|
if (!team || deployment.team.id !== team.id) {
|
|
181573
182147
|
const err = new Error(
|
|
181574
|
-
team ? `Deployment doesn't belong to current team ${
|
|
182148
|
+
team ? `Deployment doesn't belong to current team ${import_chalk120.default.bold(
|
|
181575
182149
|
contextName
|
|
181576
182150
|
)}` : `Deployment belongs to a different team`
|
|
181577
182151
|
);
|
|
@@ -181580,18 +182154,18 @@ async function getDeploymentByIdOrURL({
|
|
|
181580
182154
|
}
|
|
181581
182155
|
} else if (team) {
|
|
181582
182156
|
const err = new Error(
|
|
181583
|
-
`Deployment doesn't belong to current team ${
|
|
182157
|
+
`Deployment doesn't belong to current team ${import_chalk120.default.bold(contextName)}`
|
|
181584
182158
|
);
|
|
181585
182159
|
err.code = "ERR_INVALID_TEAM";
|
|
181586
182160
|
throw err;
|
|
181587
182161
|
}
|
|
181588
182162
|
return deployment;
|
|
181589
182163
|
}
|
|
181590
|
-
var
|
|
182164
|
+
var import_chalk120;
|
|
181591
182165
|
var init_get_deployment_by_id_or_url = __esm({
|
|
181592
182166
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
|
181593
182167
|
"use strict";
|
|
181594
|
-
|
|
182168
|
+
import_chalk120 = __toESM3(require_source());
|
|
181595
182169
|
init_get_deployment();
|
|
181596
182170
|
init_get_team_by_id();
|
|
181597
182171
|
init_is_valid_name();
|
|
@@ -181730,14 +182304,14 @@ async function redeploy(client2) {
|
|
|
181730
182304
|
}
|
|
181731
182305
|
output_manager_default.print(
|
|
181732
182306
|
`${prependEmoji(
|
|
181733
|
-
`Inspect: ${
|
|
182307
|
+
`Inspect: ${import_chalk121.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
|
181734
182308
|
emoji("inspect")
|
|
181735
182309
|
)}
|
|
181736
182310
|
`
|
|
181737
182311
|
);
|
|
181738
182312
|
output_manager_default.print(
|
|
181739
182313
|
prependEmoji(
|
|
181740
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
|
182314
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk121.default.bold(
|
|
181741
182315
|
previewUrl
|
|
181742
182316
|
)} ${deployStamp()}`,
|
|
181743
182317
|
emoji("success")
|
|
@@ -181818,17 +182392,17 @@ async function redeploy(client2) {
|
|
|
181818
182392
|
output_manager_default.prettyError(err);
|
|
181819
182393
|
if ((0, import_error_utils32.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
|
181820
182394
|
output_manager_default.error(
|
|
181821
|
-
`Use ${
|
|
182395
|
+
`Use ${import_chalk121.default.bold("vc switch")} to change your current team`
|
|
181822
182396
|
);
|
|
181823
182397
|
}
|
|
181824
182398
|
return 1;
|
|
181825
182399
|
}
|
|
181826
182400
|
}
|
|
181827
|
-
var
|
|
182401
|
+
var import_chalk121, import_client13, import_error_utils32;
|
|
181828
182402
|
var init_redeploy2 = __esm({
|
|
181829
182403
|
"src/commands/redeploy/index.ts"() {
|
|
181830
182404
|
"use strict";
|
|
181831
|
-
|
|
182405
|
+
import_chalk121 = __toESM3(require_source());
|
|
181832
182406
|
import_client13 = __toESM3(require_dist7());
|
|
181833
182407
|
init_emoji();
|
|
181834
182408
|
init_get_args();
|
|
@@ -182036,7 +182610,7 @@ async function remove5(client2) {
|
|
|
182036
182610
|
}
|
|
182037
182611
|
const { contextName } = await getScope(client2);
|
|
182038
182612
|
output_manager_default.spinner(
|
|
182039
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
|
182613
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk122.default.bold(contextName)}`
|
|
182040
182614
|
);
|
|
182041
182615
|
let aliases;
|
|
182042
182616
|
let projects;
|
|
@@ -182102,7 +182676,7 @@ async function remove5(client2) {
|
|
|
182102
182676
|
});
|
|
182103
182677
|
if (deployments.length === 0 && projects.length === 0) {
|
|
182104
182678
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
|
182105
|
-
const stylizedIds = ids.map((id) =>
|
|
182679
|
+
const stylizedIds = ids.map((id) => import_chalk122.default.bold(`"${id}"`)).join(", ");
|
|
182106
182680
|
const commandName = getCommandName("projects ls");
|
|
182107
182681
|
log2(
|
|
182108
182682
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
|
@@ -182110,7 +182684,7 @@ async function remove5(client2) {
|
|
|
182110
182684
|
return 1;
|
|
182111
182685
|
}
|
|
182112
182686
|
log2(
|
|
182113
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
|
182687
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk122.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
|
182114
182688
|
);
|
|
182115
182689
|
if (deployments.length > 200) {
|
|
182116
182690
|
output_manager_default.warn(
|
|
@@ -182137,11 +182711,11 @@ async function remove5(client2) {
|
|
|
182137
182711
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
|
182138
182712
|
);
|
|
182139
182713
|
deployments.forEach((depl) => {
|
|
182140
|
-
output_manager_default.print(`${
|
|
182714
|
+
output_manager_default.print(`${import_chalk122.default.gray("-")} ${import_chalk122.default.bold(depl.url)}
|
|
182141
182715
|
`);
|
|
182142
182716
|
});
|
|
182143
182717
|
projects.forEach((project) => {
|
|
182144
|
-
output_manager_default.print(`${
|
|
182718
|
+
output_manager_default.print(`${import_chalk122.default.gray("-")} ${import_chalk122.default.bold(project.name)}
|
|
182145
182719
|
`);
|
|
182146
182720
|
});
|
|
182147
182721
|
return 0;
|
|
@@ -182158,8 +182732,8 @@ function readConfirmation4(deployments, projects) {
|
|
|
182158
182732
|
);
|
|
182159
182733
|
const deploymentTable = table(
|
|
182160
182734
|
deployments.map((depl) => {
|
|
182161
|
-
const time =
|
|
182162
|
-
const url3 = depl.url ?
|
|
182735
|
+
const time = import_chalk122.default.gray(`${(0, import_ms27.default)(Date.now() - depl.createdAt)} ago`);
|
|
182736
|
+
const url3 = depl.url ? import_chalk122.default.underline(`https://${depl.url}`) : "";
|
|
182163
182737
|
return [` ${depl.id}`, url3, time];
|
|
182164
182738
|
}),
|
|
182165
182739
|
{ align: ["l", "r", "l"], hsep: 6 }
|
|
@@ -182170,7 +182744,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
182170
182744
|
for (const depl of deployments) {
|
|
182171
182745
|
for (const { alias: alias2 } of depl.aliases) {
|
|
182172
182746
|
output_manager_default.warn(
|
|
182173
|
-
`${
|
|
182747
|
+
`${import_chalk122.default.underline(`https://${alias2}`)} is an alias for ${import_chalk122.default.bold(depl.url)} and will be removed`
|
|
182174
182748
|
);
|
|
182175
182749
|
}
|
|
182176
182750
|
}
|
|
@@ -182184,12 +182758,12 @@ function readConfirmation4(deployments, projects) {
|
|
|
182184
182758
|
`
|
|
182185
182759
|
);
|
|
182186
182760
|
for (const project of projects) {
|
|
182187
|
-
output_manager_default.print(`${
|
|
182761
|
+
output_manager_default.print(`${import_chalk122.default.gray("-")} ${import_chalk122.default.bold(project.name)}
|
|
182188
182762
|
`);
|
|
182189
182763
|
}
|
|
182190
182764
|
}
|
|
182191
182765
|
output_manager_default.print(
|
|
182192
|
-
`${
|
|
182766
|
+
`${import_chalk122.default.bold.red("> Are you sure?")} ${import_chalk122.default.gray("(y/N) ")}`
|
|
182193
182767
|
);
|
|
182194
182768
|
process.stdin.on("data", (d) => {
|
|
182195
182769
|
process.stdin.pause();
|
|
@@ -182206,11 +182780,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
|
182206
182780
|
}
|
|
182207
182781
|
return `${(0, import_pluralize13.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize13.default)("project", projects.length, true)}`;
|
|
182208
182782
|
}
|
|
182209
|
-
var
|
|
182783
|
+
var import_chalk122, import_ms27, import_pluralize13;
|
|
182210
182784
|
var init_remove6 = __esm({
|
|
182211
182785
|
"src/commands/remove/index.ts"() {
|
|
182212
182786
|
"use strict";
|
|
182213
|
-
|
|
182787
|
+
import_chalk122 = __toESM3(require_source());
|
|
182214
182788
|
import_ms27 = __toESM3(require_ms());
|
|
182215
182789
|
import_pluralize13 = __toESM3(require_pluralize());
|
|
182216
182790
|
init_table();
|
|
@@ -182306,7 +182880,7 @@ async function rollbackStatus({
|
|
|
182306
182880
|
}
|
|
182307
182881
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
|
182308
182882
|
output_manager_default.log(
|
|
182309
|
-
`The rollback exceeded its deadline - rerun ${
|
|
182883
|
+
`The rollback exceeded its deadline - rerun ${import_chalk123.default.bold(
|
|
182310
182884
|
`${packageName} rollback ${toDeploymentId}`
|
|
182311
182885
|
)} to try again`
|
|
182312
182886
|
);
|
|
@@ -182370,26 +182944,26 @@ async function renderJobSucceeded2({
|
|
|
182370
182944
|
let deploymentInfo = "";
|
|
182371
182945
|
try {
|
|
182372
182946
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
182373
|
-
deploymentInfo = `${
|
|
182947
|
+
deploymentInfo = `${import_chalk123.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
182374
182948
|
} catch (err) {
|
|
182375
182949
|
output_manager_default.debug(
|
|
182376
182950
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
182377
182951
|
);
|
|
182378
|
-
deploymentInfo =
|
|
182952
|
+
deploymentInfo = import_chalk123.default.bold(toDeploymentId);
|
|
182379
182953
|
}
|
|
182380
182954
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
|
182381
182955
|
output_manager_default.log(
|
|
182382
|
-
`Success! ${
|
|
182956
|
+
`Success! ${import_chalk123.default.bold(
|
|
182383
182957
|
project.name
|
|
182384
182958
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
|
182385
182959
|
);
|
|
182386
182960
|
return 0;
|
|
182387
182961
|
}
|
|
182388
|
-
var
|
|
182962
|
+
var import_chalk123, import_ms28;
|
|
182389
182963
|
var init_status3 = __esm({
|
|
182390
182964
|
"src/commands/rollback/status.ts"() {
|
|
182391
182965
|
"use strict";
|
|
182392
|
-
|
|
182966
|
+
import_chalk123 = __toESM3(require_source());
|
|
182393
182967
|
init_elapsed();
|
|
182394
182968
|
init_format_date();
|
|
182395
182969
|
init_get_deployment();
|
|
@@ -182421,7 +182995,7 @@ async function requestRollback({
|
|
|
182421
182995
|
});
|
|
182422
182996
|
if (timeout !== void 0 && (0, import_ms29.default)(timeout) === 0) {
|
|
182423
182997
|
output_manager_default.log(
|
|
182424
|
-
`Successfully requested rollback of ${
|
|
182998
|
+
`Successfully requested rollback of ${import_chalk124.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
182425
182999
|
);
|
|
182426
183000
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
|
182427
183001
|
return 0;
|
|
@@ -182434,11 +183008,11 @@ async function requestRollback({
|
|
|
182434
183008
|
timeout
|
|
182435
183009
|
});
|
|
182436
183010
|
}
|
|
182437
|
-
var
|
|
183011
|
+
var import_chalk124, import_ms29;
|
|
182438
183012
|
var init_request_rollback = __esm({
|
|
182439
183013
|
"src/commands/rollback/request-rollback.ts"() {
|
|
182440
183014
|
"use strict";
|
|
182441
|
-
|
|
183015
|
+
import_chalk124 = __toESM3(require_source());
|
|
182442
183016
|
init_pkg_name();
|
|
182443
183017
|
init_get_project_by_deployment();
|
|
182444
183018
|
import_ms29 = __toESM3(require_ms());
|
|
@@ -183108,17 +183682,17 @@ function formatBranchMatcher(branchMatcher) {
|
|
|
183108
183682
|
if (branchMatcher?.type === "equals") {
|
|
183109
183683
|
return branchMatcher.pattern;
|
|
183110
183684
|
} else if (branchMatcher?.type === "startsWith") {
|
|
183111
|
-
return `${branchMatcher.pattern}${
|
|
183685
|
+
return `${branchMatcher.pattern}${import_chalk125.default.dim("*")}`;
|
|
183112
183686
|
} else if (branchMatcher?.type === "endsWith") {
|
|
183113
|
-
return `${
|
|
183687
|
+
return `${import_chalk125.default.dim("*")}${branchMatcher.pattern}`;
|
|
183114
183688
|
}
|
|
183115
|
-
return
|
|
183689
|
+
return import_chalk125.default.dim("No branch configuration");
|
|
183116
183690
|
}
|
|
183117
183691
|
async function list7(client2, argv) {
|
|
183118
183692
|
const { cwd } = client2;
|
|
183119
183693
|
if (argv.length !== 0) {
|
|
183120
183694
|
output_manager_default.error(
|
|
183121
|
-
`Invalid number of arguments. Usage: ${
|
|
183695
|
+
`Invalid number of arguments. Usage: ${import_chalk125.default.cyan(
|
|
183122
183696
|
`${getCommandName("target ls")}`
|
|
183123
183697
|
)}`
|
|
183124
183698
|
);
|
|
@@ -183142,12 +183716,12 @@ async function list7(client2, argv) {
|
|
|
183142
183716
|
const elapsed2 = (0, import_ms31.default)(Date.now() - start);
|
|
183143
183717
|
result = withDefaultEnvironmentsIncluded(result);
|
|
183144
183718
|
output_manager_default.log(
|
|
183145
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
|
183719
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk125.default.gray(`[${elapsed2}]`)}`
|
|
183146
183720
|
);
|
|
183147
183721
|
const tablePrint = table(
|
|
183148
183722
|
[
|
|
183149
183723
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
|
183150
|
-
(header) =>
|
|
183724
|
+
(header) => import_chalk125.default.bold(import_chalk125.default.cyan(header))
|
|
183151
183725
|
),
|
|
183152
183726
|
...result.flatMap((target) => {
|
|
183153
183727
|
return [
|
|
@@ -183155,7 +183729,7 @@ async function list7(client2, argv) {
|
|
|
183155
183729
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
|
183156
183730
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
|
183157
183731
|
TYPE_MAP[target.type],
|
|
183158
|
-
|
|
183732
|
+
import_chalk125.default.gray(
|
|
183159
183733
|
target.updatedAt > 0 ? (0, import_ms31.default)(Date.now() - target.updatedAt) : "-"
|
|
183160
183734
|
)
|
|
183161
183735
|
]
|
|
@@ -183202,12 +183776,12 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
|
183202
183776
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
|
183203
183777
|
];
|
|
183204
183778
|
}
|
|
183205
|
-
var import_ms31,
|
|
183779
|
+
var import_ms31, import_chalk125, TYPE_MAP, BRANCH_TRACKING_MAP;
|
|
183206
183780
|
var init_list11 = __esm({
|
|
183207
183781
|
"src/commands/target/list.ts"() {
|
|
183208
183782
|
"use strict";
|
|
183209
183783
|
import_ms31 = __toESM3(require_ms());
|
|
183210
|
-
|
|
183784
|
+
import_chalk125 = __toESM3(require_source());
|
|
183211
183785
|
init_table();
|
|
183212
183786
|
init_output_manager();
|
|
183213
183787
|
init_command32();
|
|
@@ -183222,8 +183796,8 @@ var init_list11 = __esm({
|
|
|
183222
183796
|
};
|
|
183223
183797
|
BRANCH_TRACKING_MAP = {
|
|
183224
183798
|
production: (project) => project.link?.productionBranch ?? "main",
|
|
183225
|
-
preview: (_, env) => env.slug === "preview" ?
|
|
183226
|
-
development: () =>
|
|
183799
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk125.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
|
183800
|
+
development: () => import_chalk125.default.dim("Accessible via CLI")
|
|
183227
183801
|
};
|
|
183228
183802
|
}
|
|
183229
183803
|
});
|
|
@@ -183418,7 +183992,7 @@ async function list8(client2, argv) {
|
|
|
183418
183992
|
client2.stdout.write("\n");
|
|
183419
183993
|
const teamTable = table(
|
|
183420
183994
|
[
|
|
183421
|
-
["id", "Team name"].map((str) => (0,
|
|
183995
|
+
["id", "Team name"].map((str) => (0, import_chalk126.gray)(str)),
|
|
183422
183996
|
...teamList.map((team) => [team.value, team.name])
|
|
183423
183997
|
],
|
|
183424
183998
|
{ hsep: 5 }
|
|
@@ -183435,13 +184009,13 @@ async function list8(client2, argv) {
|
|
|
183435
184009
|
}
|
|
183436
184010
|
return 0;
|
|
183437
184011
|
}
|
|
183438
|
-
var
|
|
184012
|
+
var import_chalk126;
|
|
183439
184013
|
var init_list13 = __esm({
|
|
183440
184014
|
"src/commands/teams/list.ts"() {
|
|
183441
184015
|
"use strict";
|
|
183442
184016
|
init_chars();
|
|
183443
184017
|
init_table();
|
|
183444
|
-
|
|
184018
|
+
import_chalk126 = __toESM3(require_source());
|
|
183445
184019
|
init_get_user();
|
|
183446
184020
|
init_get_teams();
|
|
183447
184021
|
init_pkg_name();
|
|
@@ -183536,7 +184110,7 @@ Please select a team scope using ${getCommandName(
|
|
|
183536
184110
|
return 1;
|
|
183537
184111
|
}
|
|
183538
184112
|
output_manager_default.log(
|
|
183539
|
-
introMsg || `Inviting team members to ${
|
|
184113
|
+
introMsg || `Inviting team members to ${import_chalk127.default.bold(currentTeam.name)}`
|
|
183540
184114
|
);
|
|
183541
184115
|
telemetry2.trackCliArgumentEmail(emails);
|
|
183542
184116
|
if (emails.length > 0) {
|
|
@@ -183556,10 +184130,10 @@ Please select a team scope using ${getCommandName(
|
|
|
183556
184130
|
throw err;
|
|
183557
184131
|
}
|
|
183558
184132
|
output_manager_default.log(
|
|
183559
|
-
`${
|
|
184133
|
+
`${import_chalk127.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
|
183560
184134
|
);
|
|
183561
184135
|
} else {
|
|
183562
|
-
output_manager_default.log(`${
|
|
184136
|
+
output_manager_default.log(`${import_chalk127.default.red(`\u2716 ${email3}`)} ${import_chalk127.default.gray("[invalid]")}`);
|
|
183563
184137
|
}
|
|
183564
184138
|
}
|
|
183565
184139
|
return 0;
|
|
@@ -183592,15 +184166,15 @@ Please select a team scope using ${getCommandName(
|
|
|
183592
184166
|
);
|
|
183593
184167
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
|
183594
184168
|
emails.push(email2);
|
|
183595
|
-
output_manager_default.log(`${
|
|
184169
|
+
output_manager_default.log(`${import_chalk127.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
|
183596
184170
|
if (hasError) {
|
|
183597
184171
|
hasError = false;
|
|
183598
184172
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
183599
184173
|
output_manager_default.log(
|
|
183600
|
-
introMsg || `Inviting team members to ${
|
|
184174
|
+
introMsg || `Inviting team members to ${import_chalk127.default.bold(currentTeam.name)}`
|
|
183601
184175
|
);
|
|
183602
184176
|
for (const email3 of emails) {
|
|
183603
|
-
output_manager_default.log(`${
|
|
184177
|
+
output_manager_default.log(`${import_chalk127.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
183604
184178
|
}
|
|
183605
184179
|
}
|
|
183606
184180
|
} catch (err) {
|
|
@@ -183609,7 +184183,7 @@ Please select a team scope using ${getCommandName(
|
|
|
183609
184183
|
output_manager_default.error((0, import_error_utils34.errorToString)(err));
|
|
183610
184184
|
hasError = true;
|
|
183611
184185
|
for (const email3 of emails) {
|
|
183612
|
-
output_manager_default.log(`${
|
|
184186
|
+
output_manager_default.log(`${import_chalk127.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
|
183613
184187
|
}
|
|
183614
184188
|
}
|
|
183615
184189
|
}
|
|
@@ -183622,16 +184196,16 @@ Please select a team scope using ${getCommandName(
|
|
|
183622
184196
|
} else {
|
|
183623
184197
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
|
183624
184198
|
for (const email3 of emails) {
|
|
183625
|
-
output_manager_default.log(`${
|
|
184199
|
+
output_manager_default.log(`${import_chalk127.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
183626
184200
|
}
|
|
183627
184201
|
}
|
|
183628
184202
|
return 0;
|
|
183629
184203
|
}
|
|
183630
|
-
var
|
|
184204
|
+
var import_chalk127, import_error_utils34, validateEmail, domains;
|
|
183631
184205
|
var init_invite2 = __esm({
|
|
183632
184206
|
"src/commands/teams/invite.ts"() {
|
|
183633
184207
|
"use strict";
|
|
183634
|
-
|
|
184208
|
+
import_chalk127 = __toESM3(require_source());
|
|
183635
184209
|
init_cmd();
|
|
183636
184210
|
init_stamp();
|
|
183637
184211
|
init_param();
|
|
@@ -183707,7 +184281,7 @@ async function add7(client2) {
|
|
|
183707
184281
|
let team;
|
|
183708
184282
|
let elapsed2;
|
|
183709
184283
|
output_manager_default.log(
|
|
183710
|
-
`Pick a team identifier for its URL (e.g.: ${
|
|
184284
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk128.default.cyan(
|
|
183711
184285
|
"`vercel.com/acme`"
|
|
183712
184286
|
)})`
|
|
183713
184287
|
);
|
|
@@ -183738,7 +184312,7 @@ async function add7(client2) {
|
|
|
183738
184312
|
output_manager_default.stopSpinner();
|
|
183739
184313
|
process.stdout.write(eraseLines(2));
|
|
183740
184314
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
|
183741
|
-
output_manager_default.log(`${
|
|
184315
|
+
output_manager_default.log(`${import_chalk128.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
|
183742
184316
|
`);
|
|
183743
184317
|
output_manager_default.log("Pick a display name for your team");
|
|
183744
184318
|
let name;
|
|
@@ -183761,7 +184335,7 @@ async function add7(client2) {
|
|
|
183761
184335
|
process.stdout.write(eraseLines(2));
|
|
183762
184336
|
team = Object.assign(team, res);
|
|
183763
184337
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
|
183764
|
-
output_manager_default.log(`${
|
|
184338
|
+
output_manager_default.log(`${import_chalk128.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
|
183765
184339
|
`);
|
|
183766
184340
|
output_manager_default.spinner("Saving");
|
|
183767
184341
|
client2.config.currentTeam = team.id;
|
|
@@ -183775,11 +184349,11 @@ async function add7(client2) {
|
|
|
183775
184349
|
});
|
|
183776
184350
|
return 0;
|
|
183777
184351
|
}
|
|
183778
|
-
var
|
|
184352
|
+
var import_chalk128, import_error_utils35, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
|
183779
184353
|
var init_add13 = __esm({
|
|
183780
184354
|
"src/commands/teams/add.ts"() {
|
|
183781
184355
|
"use strict";
|
|
183782
|
-
|
|
184356
|
+
import_chalk128 = __toESM3(require_source());
|
|
183783
184357
|
init_stamp();
|
|
183784
184358
|
init_erase_lines();
|
|
183785
184359
|
init_chars();
|
|
@@ -183792,7 +184366,7 @@ var init_add13 = __esm({
|
|
|
183792
184366
|
init_output_manager();
|
|
183793
184367
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
|
183794
184368
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
|
183795
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
|
184369
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk128.default.gray("vercel.com/");
|
|
183796
184370
|
teamNamePrefix = "Team Name".padEnd(14);
|
|
183797
184371
|
}
|
|
183798
184372
|
});
|
|
@@ -183851,7 +184425,7 @@ async function change(client2, argv) {
|
|
|
183851
184425
|
let title9 = `${team.name} (${team.slug})`;
|
|
183852
184426
|
const selected = team.id === currentTeam?.id;
|
|
183853
184427
|
if (selected) {
|
|
183854
|
-
title9 += ` ${
|
|
184428
|
+
title9 += ` ${import_chalk129.default.bold("(current)")}`;
|
|
183855
184429
|
}
|
|
183856
184430
|
if (team.limited) {
|
|
183857
184431
|
title9 += ` ${emoji("locked")}`;
|
|
@@ -183863,7 +184437,7 @@ async function change(client2, argv) {
|
|
|
183863
184437
|
selected
|
|
183864
184438
|
};
|
|
183865
184439
|
});
|
|
183866
|
-
let suffix = personalScopeSelected ? ` ${
|
|
184440
|
+
let suffix = personalScopeSelected ? ` ${import_chalk129.default.bold("(current)")}` : "";
|
|
183867
184441
|
if (user.limited) {
|
|
183868
184442
|
suffix += ` ${emoji("locked")}`;
|
|
183869
184443
|
}
|
|
@@ -183909,14 +184483,14 @@ async function change(client2, argv) {
|
|
|
183909
184483
|
}
|
|
183910
184484
|
updateCurrentTeam(config2);
|
|
183911
184485
|
output_manager_default.success(
|
|
183912
|
-
`Your account (${
|
|
184486
|
+
`Your account (${import_chalk129.default.bold(user.username)}) is now active!`
|
|
183913
184487
|
);
|
|
183914
184488
|
return 0;
|
|
183915
184489
|
}
|
|
183916
184490
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
|
183917
184491
|
if (!newTeam) {
|
|
183918
184492
|
output_manager_default.error(
|
|
183919
|
-
`You do not have permission to access scope ${
|
|
184493
|
+
`You do not have permission to access scope ${import_chalk129.default.bold(desiredSlug)}.`
|
|
183920
184494
|
);
|
|
183921
184495
|
return 1;
|
|
183922
184496
|
}
|
|
@@ -183934,15 +184508,15 @@ async function change(client2, argv) {
|
|
|
183934
184508
|
}
|
|
183935
184509
|
updateCurrentTeam(config2, newTeam);
|
|
183936
184510
|
output_manager_default.success(
|
|
183937
|
-
`The team ${
|
|
184511
|
+
`The team ${import_chalk129.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
|
183938
184512
|
);
|
|
183939
184513
|
return 0;
|
|
183940
184514
|
}
|
|
183941
|
-
var
|
|
184515
|
+
var import_chalk129, updateCurrentTeam;
|
|
183942
184516
|
var init_switch2 = __esm({
|
|
183943
184517
|
"src/commands/teams/switch.ts"() {
|
|
183944
184518
|
"use strict";
|
|
183945
|
-
|
|
184519
|
+
import_chalk129 = __toESM3(require_source());
|
|
183946
184520
|
init_emoji();
|
|
183947
184521
|
init_get_user();
|
|
183948
184522
|
init_get_teams();
|
|
@@ -184121,13 +184695,13 @@ var init_teams2 = __esm({
|
|
|
184121
184695
|
// src/commands/telemetry/status.ts
|
|
184122
184696
|
async function status2(client2) {
|
|
184123
184697
|
const enabled = client2.config.telemetry?.enabled !== false;
|
|
184124
|
-
const status3 = enabled ?
|
|
184698
|
+
const status3 = enabled ? import_chalk130.default.green("Enabled") : import_chalk130.default.red("Disabled");
|
|
184125
184699
|
output_manager_default.print("\n");
|
|
184126
|
-
output_manager_default.log(`${
|
|
184700
|
+
output_manager_default.log(`${import_chalk130.default.bold("Telemetry status")}: ${status3}
|
|
184127
184701
|
`);
|
|
184128
184702
|
const learnMoreMessage = `
|
|
184129
184703
|
|
|
184130
|
-
Learn more: ${
|
|
184704
|
+
Learn more: ${import_chalk130.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
|
184131
184705
|
if (enabled) {
|
|
184132
184706
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
|
184133
184707
|
} else {
|
|
@@ -184138,11 +184712,11 @@ Learn more: ${import_chalk129.default.cyan("https://vercel.com/docs/cli/about-te
|
|
|
184138
184712
|
}
|
|
184139
184713
|
return 0;
|
|
184140
184714
|
}
|
|
184141
|
-
var
|
|
184715
|
+
var import_chalk130;
|
|
184142
184716
|
var init_status4 = __esm({
|
|
184143
184717
|
"src/commands/telemetry/status.ts"() {
|
|
184144
184718
|
"use strict";
|
|
184145
|
-
|
|
184719
|
+
import_chalk130 = __toESM3(require_source());
|
|
184146
184720
|
init_output_manager();
|
|
184147
184721
|
}
|
|
184148
184722
|
});
|
|
@@ -184323,7 +184897,7 @@ async function telemetry(client2) {
|
|
|
184323
184897
|
default: {
|
|
184324
184898
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
|
184325
184899
|
output_manager_default.print(
|
|
184326
|
-
`${
|
|
184900
|
+
`${import_chalk131.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
|
184327
184901
|
`
|
|
184328
184902
|
);
|
|
184329
184903
|
output_manager_default.print(help(telemetryCommand, { columns: client2.stderr.columns }));
|
|
@@ -184331,7 +184905,7 @@ async function telemetry(client2) {
|
|
|
184331
184905
|
}
|
|
184332
184906
|
}
|
|
184333
184907
|
}
|
|
184334
|
-
var
|
|
184908
|
+
var import_chalk131, COMMAND_CONFIG20;
|
|
184335
184909
|
var init_telemetry3 = __esm({
|
|
184336
184910
|
"src/commands/telemetry/index.ts"() {
|
|
184337
184911
|
"use strict";
|
|
@@ -184346,7 +184920,7 @@ var init_telemetry3 = __esm({
|
|
|
184346
184920
|
init_command34();
|
|
184347
184921
|
init_get_flags_specification();
|
|
184348
184922
|
init_telemetry2();
|
|
184349
|
-
|
|
184923
|
+
import_chalk131 = __toESM3(require_source());
|
|
184350
184924
|
init_output_manager();
|
|
184351
184925
|
init_commands();
|
|
184352
184926
|
COMMAND_CONFIG20 = {
|
|
@@ -184421,7 +184995,7 @@ var import_error_utils36 = __toESM3(require_dist2());
|
|
|
184421
184995
|
var import_path40 = require("path");
|
|
184422
184996
|
var import_fs8 = require("fs");
|
|
184423
184997
|
var import_fs_extra24 = __toESM3(require_lib());
|
|
184424
|
-
var
|
|
184998
|
+
var import_chalk132 = __toESM3(require_source());
|
|
184425
184999
|
var import_epipebomb = __toESM3(require_epipebomb());
|
|
184426
185000
|
|
|
184427
185001
|
// src/util/get-latest-version/index.ts
|
|
@@ -185357,13 +185931,13 @@ var main17 = async () => {
|
|
|
185357
185931
|
const betaCommands = [];
|
|
185358
185932
|
if (betaCommands.includes(targetOrSubcommand)) {
|
|
185359
185933
|
output_manager_default.print(
|
|
185360
|
-
`${
|
|
185934
|
+
`${import_chalk132.default.grey(
|
|
185361
185935
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
|
185362
185936
|
)}
|
|
185363
185937
|
`
|
|
185364
185938
|
);
|
|
185365
185939
|
} else {
|
|
185366
|
-
output_manager_default.print(`${
|
|
185940
|
+
output_manager_default.print(`${import_chalk132.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
|
185367
185941
|
`);
|
|
185368
185942
|
}
|
|
185369
185943
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
|
@@ -185543,7 +186117,7 @@ var main17 = async () => {
|
|
|
185543
186117
|
if (isTTY2) {
|
|
185544
186118
|
output_manager_default.log(`No existing credentials found. Please log in:`);
|
|
185545
186119
|
try {
|
|
185546
|
-
const result = await login2(client);
|
|
186120
|
+
const result = await login2(client, { shouldParseArgs: false });
|
|
185547
186121
|
if (result !== 0)
|
|
185548
186122
|
return result;
|
|
185549
186123
|
} catch (error3) {
|
|
@@ -185778,7 +186352,7 @@ var main17 = async () => {
|
|
|
185778
186352
|
break;
|
|
185779
186353
|
case "login":
|
|
185780
186354
|
telemetry2.trackCliCommandLogin(userSuppliedSubCommand);
|
|
185781
|
-
func = (c) => (init_login2(), __toCommonJS3(login_exports)).default(c, true);
|
|
186355
|
+
func = (c) => (init_login2(), __toCommonJS3(login_exports)).default(c, { shouldParseArgs: true });
|
|
185782
186356
|
break;
|
|
185783
186357
|
case "logout":
|
|
185784
186358
|
telemetry2.trackCliCommandLogout(userSuppliedSubCommand);
|
|
@@ -185934,20 +186508,20 @@ main17().then(async (exitCode2) => {
|
|
|
185934
186508
|
});
|
|
185935
186509
|
if (latest) {
|
|
185936
186510
|
const changelog = "https://github.com/vercel/vercel/releases";
|
|
185937
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
186511
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk132.default.magenta(
|
|
185938
186512
|
`
|
|
185939
186513
|
|
|
185940
|
-
The latest update ${
|
|
186514
|
+
The latest update ${import_chalk132.default.italic(
|
|
185941
186515
|
"may"
|
|
185942
186516
|
)} fix any errors that occurred.`
|
|
185943
186517
|
) : "";
|
|
185944
186518
|
output_manager_default.print(
|
|
185945
186519
|
box(
|
|
185946
|
-
`Update available! ${
|
|
186520
|
+
`Update available! ${import_chalk132.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk132.default.green(
|
|
185947
186521
|
`v${latest}`
|
|
185948
186522
|
)}
|
|
185949
186523
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
185950
|
-
Run ${
|
|
186524
|
+
Run ${import_chalk132.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
|
185951
186525
|
)
|
|
185952
186526
|
);
|
|
185953
186527
|
output_manager_default.print("\n\n");
|