vercel-cli 47.0.7__py3-none-any.whl → 47.1.4__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 +673 -572
- vercel_cli/vendor/node_modules/.package-lock.json +3 -3
- vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +163 -54
- vercel_cli/vendor/node_modules/@vercel/python/package.json +2 -2
- vercel_cli/vendor/node_modules/@vercel/python/vc_init.py +26 -2
- vercel_cli/vendor/package.json +2 -2
- {vercel_cli-47.0.7.dist-info → vercel_cli-47.1.4.dist-info}/METADATA +1 -1
- {vercel_cli-47.0.7.dist-info → vercel_cli-47.1.4.dist-info}/RECORD +10 -10
- {vercel_cli-47.0.7.dist-info → vercel_cli-47.1.4.dist-info}/WHEEL +0 -0
- {vercel_cli-47.0.7.dist-info → vercel_cli-47.1.4.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(chalk127, 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 = chalk127;
|
|
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 = (chalk127, 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(chalk127, 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(chalk127, 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 chalk128 = {};
|
|
4158
|
+
applyOptions(chalk128, options);
|
|
4159
|
+
chalk128.template = (...arguments_) => chalkTag(chalk128.template, ...arguments_);
|
|
4160
|
+
Object.setPrototypeOf(chalk128, Chalk.prototype);
|
|
4161
|
+
Object.setPrototypeOf(chalk128.template, chalk128);
|
|
4162
|
+
chalk128.template.constructor = () => {
|
|
4163
4163
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
4164
4164
|
};
|
|
4165
|
-
|
|
4166
|
-
return
|
|
4165
|
+
chalk128.template.Instance = ChalkClass;
|
|
4166
|
+
return chalk128.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 = (chalk128, ...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(chalk128, parts.join(""));
|
|
4294
4294
|
};
|
|
4295
4295
|
Object.defineProperties(Chalk.prototype, styles);
|
|
4296
|
-
var
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
module2.exports =
|
|
4296
|
+
var chalk127 = Chalk();
|
|
4297
|
+
chalk127.supportsColor = stdoutColor;
|
|
4298
|
+
chalk127.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
4299
|
+
chalk127.stderr.supportsColor = stderrColor;
|
|
4300
|
+
module2.exports = chalk127;
|
|
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(chalk127, 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 = chalk127;
|
|
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 = (chalk127, 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(chalk127, 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(chalk127, 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 chalk127 = {};
|
|
7287
|
+
applyOptions(chalk127, options);
|
|
7288
|
+
chalk127.template = function() {
|
|
7289
7289
|
const args2 = [].slice.call(arguments);
|
|
7290
|
-
return chalkTag.apply(null, [
|
|
7290
|
+
return chalkTag.apply(null, [chalk127.template].concat(args2));
|
|
7291
7291
|
};
|
|
7292
|
-
Object.setPrototypeOf(
|
|
7293
|
-
Object.setPrototypeOf(
|
|
7294
|
-
|
|
7295
|
-
return
|
|
7292
|
+
Object.setPrototypeOf(chalk127, Chalk.prototype);
|
|
7293
|
+
Object.setPrototypeOf(chalk127.template, chalk127);
|
|
7294
|
+
chalk127.template.constructor = Chalk;
|
|
7295
|
+
return chalk127.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(chalk127, 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(chalk127, 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 chalk127 = 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: chalk127.blue("\u2139"),
|
|
9379
|
+
success: chalk127.green("\u2714"),
|
|
9380
|
+
warning: chalk127.yellow("\u26A0"),
|
|
9381
|
+
error: chalk127.red("\u2716")
|
|
9382
9382
|
};
|
|
9383
9383
|
var fallbacks = {
|
|
9384
|
-
info:
|
|
9385
|
-
success:
|
|
9386
|
-
warning:
|
|
9387
|
-
error:
|
|
9384
|
+
info: chalk127.blue("i"),
|
|
9385
|
+
success: chalk127.green("\u221A"),
|
|
9386
|
+
warning: chalk127.yellow("\u203C"),
|
|
9387
|
+
error: chalk127.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 chalk127 = 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 = chalk127[this.color](frame);
|
|
9873
9873
|
}
|
|
9874
9874
|
this.frameIndex = ++this.frameIndex % frames.length;
|
|
9875
9875
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
|
@@ -31954,6 +31954,13 @@ var init_command6 = __esm({
|
|
|
31954
31954
|
deprecated: false,
|
|
31955
31955
|
description: "Print the build logs"
|
|
31956
31956
|
},
|
|
31957
|
+
{
|
|
31958
|
+
name: "guidance",
|
|
31959
|
+
shorthand: null,
|
|
31960
|
+
type: Boolean,
|
|
31961
|
+
deprecated: false,
|
|
31962
|
+
description: "Receive command suggestions once deployment is complete"
|
|
31963
|
+
},
|
|
31957
31964
|
{
|
|
31958
31965
|
name: "no-logs",
|
|
31959
31966
|
shorthand: null,
|
|
@@ -32401,7 +32408,15 @@ var init_command10 = __esm({
|
|
|
32401
32408
|
required: false
|
|
32402
32409
|
}
|
|
32403
32410
|
],
|
|
32404
|
-
options: [
|
|
32411
|
+
options: [
|
|
32412
|
+
{
|
|
32413
|
+
name: "guidance",
|
|
32414
|
+
description: "Receive command suggestions once command is complete",
|
|
32415
|
+
shorthand: null,
|
|
32416
|
+
type: Boolean,
|
|
32417
|
+
deprecated: false
|
|
32418
|
+
}
|
|
32419
|
+
],
|
|
32405
32420
|
examples: []
|
|
32406
32421
|
};
|
|
32407
32422
|
addSubcommand4 = {
|
|
@@ -32430,6 +32445,13 @@ var init_command10 = __esm({
|
|
|
32430
32445
|
...forceOption,
|
|
32431
32446
|
description: "Force overwrites when a command would normally fail",
|
|
32432
32447
|
shorthand: null
|
|
32448
|
+
},
|
|
32449
|
+
{
|
|
32450
|
+
name: "guidance",
|
|
32451
|
+
description: "Receive command suggestions once command is complete",
|
|
32452
|
+
shorthand: null,
|
|
32453
|
+
type: Boolean,
|
|
32454
|
+
deprecated: false
|
|
32433
32455
|
}
|
|
32434
32456
|
],
|
|
32435
32457
|
examples: [
|
|
@@ -35956,14 +35978,14 @@ var require_templates3 = __commonJS2({
|
|
|
35956
35978
|
}
|
|
35957
35979
|
return results;
|
|
35958
35980
|
}
|
|
35959
|
-
function buildStyle(
|
|
35981
|
+
function buildStyle(chalk127, styles) {
|
|
35960
35982
|
const enabled = {};
|
|
35961
35983
|
for (const layer of styles) {
|
|
35962
35984
|
for (const style of layer.styles) {
|
|
35963
35985
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
35964
35986
|
}
|
|
35965
35987
|
}
|
|
35966
|
-
let current =
|
|
35988
|
+
let current = chalk127;
|
|
35967
35989
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
35968
35990
|
if (!Array.isArray(styles2)) {
|
|
35969
35991
|
continue;
|
|
@@ -35975,7 +35997,7 @@ var require_templates3 = __commonJS2({
|
|
|
35975
35997
|
}
|
|
35976
35998
|
return current;
|
|
35977
35999
|
}
|
|
35978
|
-
module2.exports = (
|
|
36000
|
+
module2.exports = (chalk127, temporary) => {
|
|
35979
36001
|
const styles = [];
|
|
35980
36002
|
const chunks = [];
|
|
35981
36003
|
let chunk = [];
|
|
@@ -35985,13 +36007,13 @@ var require_templates3 = __commonJS2({
|
|
|
35985
36007
|
} else if (style) {
|
|
35986
36008
|
const string = chunk.join("");
|
|
35987
36009
|
chunk = [];
|
|
35988
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
36010
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk127, styles)(string));
|
|
35989
36011
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
35990
36012
|
} else if (close2) {
|
|
35991
36013
|
if (styles.length === 0) {
|
|
35992
36014
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
35993
36015
|
}
|
|
35994
|
-
chunks.push(buildStyle(
|
|
36016
|
+
chunks.push(buildStyle(chalk127, styles)(chunk.join("")));
|
|
35995
36017
|
chunk = [];
|
|
35996
36018
|
styles.pop();
|
|
35997
36019
|
} else {
|
|
@@ -36039,16 +36061,16 @@ var require_source2 = __commonJS2({
|
|
|
36039
36061
|
}
|
|
36040
36062
|
};
|
|
36041
36063
|
var chalkFactory = (options) => {
|
|
36042
|
-
const
|
|
36043
|
-
applyOptions(
|
|
36044
|
-
|
|
36045
|
-
Object.setPrototypeOf(
|
|
36046
|
-
Object.setPrototypeOf(
|
|
36047
|
-
|
|
36064
|
+
const chalk128 = {};
|
|
36065
|
+
applyOptions(chalk128, options);
|
|
36066
|
+
chalk128.template = (...arguments_) => chalkTag(chalk128.template, ...arguments_);
|
|
36067
|
+
Object.setPrototypeOf(chalk128, Chalk.prototype);
|
|
36068
|
+
Object.setPrototypeOf(chalk128.template, chalk128);
|
|
36069
|
+
chalk128.template.constructor = () => {
|
|
36048
36070
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
36049
36071
|
};
|
|
36050
|
-
|
|
36051
|
-
return
|
|
36072
|
+
chalk128.template.Instance = ChalkClass;
|
|
36073
|
+
return chalk128.template;
|
|
36052
36074
|
};
|
|
36053
36075
|
function Chalk(options) {
|
|
36054
36076
|
return chalkFactory(options);
|
|
@@ -36159,7 +36181,7 @@ var require_source2 = __commonJS2({
|
|
|
36159
36181
|
return openAll + string + closeAll;
|
|
36160
36182
|
};
|
|
36161
36183
|
var template;
|
|
36162
|
-
var chalkTag = (
|
|
36184
|
+
var chalkTag = (chalk128, ...strings) => {
|
|
36163
36185
|
const [firstString] = strings;
|
|
36164
36186
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
36165
36187
|
return strings.join(" ");
|
|
@@ -36175,14 +36197,14 @@ var require_source2 = __commonJS2({
|
|
|
36175
36197
|
if (template === void 0) {
|
|
36176
36198
|
template = require_templates3();
|
|
36177
36199
|
}
|
|
36178
|
-
return template(
|
|
36200
|
+
return template(chalk128, parts.join(""));
|
|
36179
36201
|
};
|
|
36180
36202
|
Object.defineProperties(Chalk.prototype, styles);
|
|
36181
|
-
var
|
|
36182
|
-
|
|
36183
|
-
|
|
36184
|
-
|
|
36185
|
-
module2.exports =
|
|
36203
|
+
var chalk127 = Chalk();
|
|
36204
|
+
chalk127.supportsColor = stdoutColor;
|
|
36205
|
+
chalk127.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
36206
|
+
chalk127.stderr.supportsColor = stderrColor;
|
|
36207
|
+
module2.exports = chalk127;
|
|
36186
36208
|
}
|
|
36187
36209
|
});
|
|
36188
36210
|
|
|
@@ -116264,10 +116286,18 @@ var require_frameworks = __commonJS2({
|
|
|
116264
116286
|
website: "https://fastapi.tiangolo.com",
|
|
116265
116287
|
useRuntime: { src: "main.py", use: "@vercel/python" },
|
|
116266
116288
|
detectors: {
|
|
116267
|
-
|
|
116289
|
+
some: [
|
|
116268
116290
|
{
|
|
116269
116291
|
path: "requirements.txt",
|
|
116270
116292
|
matchContent: "fastapi"
|
|
116293
|
+
},
|
|
116294
|
+
{
|
|
116295
|
+
path: "pyproject.toml",
|
|
116296
|
+
matchContent: "fastapi"
|
|
116297
|
+
},
|
|
116298
|
+
{
|
|
116299
|
+
path: "Pipfile",
|
|
116300
|
+
matchContent: "fastapi"
|
|
116271
116301
|
}
|
|
116272
116302
|
]
|
|
116273
116303
|
},
|
|
@@ -149374,13 +149404,36 @@ var init_is_deploying = __esm({
|
|
|
149374
149404
|
}
|
|
149375
149405
|
});
|
|
149376
149406
|
|
|
149407
|
+
// src/util/suggest-next-commands.ts
|
|
149408
|
+
function suggestNextCommands(commands2) {
|
|
149409
|
+
output_manager_default.print(
|
|
149410
|
+
import_chalk62.default.dim(
|
|
149411
|
+
[
|
|
149412
|
+
`Common next commands:`,
|
|
149413
|
+
...commands2.map((command) => `- ${command}`)
|
|
149414
|
+
].join("\n")
|
|
149415
|
+
)
|
|
149416
|
+
);
|
|
149417
|
+
output_manager_default.print("\n");
|
|
149418
|
+
}
|
|
149419
|
+
var import_chalk62;
|
|
149420
|
+
var init_suggest_next_commands = __esm({
|
|
149421
|
+
"src/util/suggest-next-commands.ts"() {
|
|
149422
|
+
"use strict";
|
|
149423
|
+
init_output_manager();
|
|
149424
|
+
import_chalk62 = __toESM3(require_source());
|
|
149425
|
+
}
|
|
149426
|
+
});
|
|
149427
|
+
|
|
149377
149428
|
// src/util/deploy/print-deployment-status.ts
|
|
149378
149429
|
async function printDeploymentStatus({
|
|
149379
149430
|
readyState,
|
|
149380
149431
|
aliasError,
|
|
149381
149432
|
indications,
|
|
149382
|
-
aliasWarning
|
|
149383
|
-
|
|
149433
|
+
aliasWarning,
|
|
149434
|
+
url: url3,
|
|
149435
|
+
target
|
|
149436
|
+
}, deployStamp, noWait, guidanceMode) {
|
|
149384
149437
|
indications = indications || [];
|
|
149385
149438
|
let isStillBuilding = false;
|
|
149386
149439
|
if (noWait) {
|
|
@@ -149415,25 +149468,37 @@ async function printDeploymentStatus({
|
|
|
149415
149468
|
}
|
|
149416
149469
|
const newline = "\n";
|
|
149417
149470
|
for (const indication of indications) {
|
|
149418
|
-
const message2 = prependEmoji(
|
|
149471
|
+
const message2 = prependEmoji(import_chalk63.default.dim(indication.payload), emoji(indication.type)) + newline;
|
|
149419
149472
|
let link4 = "";
|
|
149420
149473
|
if (indication.link)
|
|
149421
|
-
link4 =
|
|
149474
|
+
link4 = import_chalk63.default.dim(
|
|
149422
149475
|
`${indication.action || "Learn More"}: ${link_default(indication.link)}`
|
|
149423
149476
|
) + newline;
|
|
149424
149477
|
output_manager_default.print(message2 + link4);
|
|
149425
149478
|
}
|
|
149479
|
+
if (guidanceMode) {
|
|
149480
|
+
output_manager_default.print("\n");
|
|
149481
|
+
suggestNextCommands(
|
|
149482
|
+
[
|
|
149483
|
+
getCommandName(`inspect ${url3} --logs`),
|
|
149484
|
+
getCommandName(`redeploy ${url3}`),
|
|
149485
|
+
target !== "production" ? getCommandName(`deploy --prod`) : false
|
|
149486
|
+
].filter(Boolean)
|
|
149487
|
+
);
|
|
149488
|
+
}
|
|
149426
149489
|
return 0;
|
|
149427
149490
|
}
|
|
149428
|
-
var
|
|
149491
|
+
var import_chalk63;
|
|
149429
149492
|
var init_print_deployment_status = __esm({
|
|
149430
149493
|
"src/util/deploy/print-deployment-status.ts"() {
|
|
149431
149494
|
"use strict";
|
|
149432
|
-
|
|
149495
|
+
import_chalk63 = __toESM3(require_source());
|
|
149433
149496
|
init_is_deploying();
|
|
149434
149497
|
init_link();
|
|
149435
149498
|
init_emoji();
|
|
149436
149499
|
init_output_manager();
|
|
149500
|
+
init_pkg_name();
|
|
149501
|
+
init_suggest_next_commands();
|
|
149437
149502
|
}
|
|
149438
149503
|
});
|
|
149439
149504
|
|
|
@@ -149591,6 +149656,11 @@ var init_deploy = __esm({
|
|
|
149591
149656
|
this.trackCliFlag("no-logs");
|
|
149592
149657
|
}
|
|
149593
149658
|
}
|
|
149659
|
+
trackCliFlagGuidance(flag) {
|
|
149660
|
+
if (flag) {
|
|
149661
|
+
this.trackCliFlag("guidance");
|
|
149662
|
+
}
|
|
149663
|
+
}
|
|
149594
149664
|
trackCliFlagNoClipboard(flag) {
|
|
149595
149665
|
if (flag) {
|
|
149596
149666
|
this.trackCliFlag("no-clipboard");
|
|
@@ -149647,7 +149717,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
149647
149717
|
}
|
|
149648
149718
|
if (error3 instanceof DomainVerificationFailed) {
|
|
149649
149719
|
output_manager_default.error(
|
|
149650
|
-
`The domain used as a suffix ${
|
|
149720
|
+
`The domain used as a suffix ${import_chalk64.default.underline(
|
|
149651
149721
|
error3.meta.domain
|
|
149652
149722
|
)} is not verified and can't be used as custom suffix.`
|
|
149653
149723
|
);
|
|
@@ -149655,7 +149725,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
149655
149725
|
}
|
|
149656
149726
|
if (error3 instanceof DomainPermissionDenied) {
|
|
149657
149727
|
output_manager_default.error(
|
|
149658
|
-
`You don't have permissions to access the domain used as a suffix ${
|
|
149728
|
+
`You don't have permissions to access the domain used as a suffix ${import_chalk64.default.underline(
|
|
149659
149729
|
error3.meta.domain
|
|
149660
149730
|
)}.`
|
|
149661
149731
|
);
|
|
@@ -149681,7 +149751,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
149681
149751
|
}
|
|
149682
149752
|
if (error3 instanceof DomainNotVerified) {
|
|
149683
149753
|
output_manager_default.error(
|
|
149684
|
-
`The domain used as an alias ${
|
|
149754
|
+
`The domain used as an alias ${import_chalk64.default.underline(
|
|
149685
149755
|
error3.meta.domain
|
|
149686
149756
|
)} is not verified yet. Please verify it.`
|
|
149687
149757
|
);
|
|
@@ -149700,7 +149770,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
149700
149770
|
}
|
|
149701
149771
|
return error3;
|
|
149702
149772
|
}
|
|
149703
|
-
var import_build_utils14, import_client11, import_error_utils21, import_bytes6,
|
|
149773
|
+
var import_build_utils14, import_client11, import_error_utils21, import_bytes6, import_chalk64, import_fs_extra20, import_ms12, import_path31, import_detect_agent, deploy_default, addProcessEnv;
|
|
149704
149774
|
var init_deploy2 = __esm({
|
|
149705
149775
|
"src/commands/deploy/index.ts"() {
|
|
149706
149776
|
"use strict";
|
|
@@ -149708,7 +149778,7 @@ var init_deploy2 = __esm({
|
|
|
149708
149778
|
import_client11 = __toESM3(require_dist7());
|
|
149709
149779
|
import_error_utils21 = __toESM3(require_dist2());
|
|
149710
149780
|
import_bytes6 = __toESM3(require_bytes());
|
|
149711
|
-
|
|
149781
|
+
import_chalk64 = __toESM3(require_source());
|
|
149712
149782
|
import_fs_extra20 = __toESM3(require_lib());
|
|
149713
149783
|
import_ms12 = __toESM3(require_ms());
|
|
149714
149784
|
import_path31 = require("path");
|
|
@@ -149746,6 +149816,7 @@ var init_deploy2 = __esm({
|
|
|
149746
149816
|
init_ensure_link();
|
|
149747
149817
|
init_process_deployment();
|
|
149748
149818
|
init_logs();
|
|
149819
|
+
import_detect_agent = require("@vercel/detect-agent");
|
|
149749
149820
|
deploy_default = async (client2) => {
|
|
149750
149821
|
const telemetryClient = new DeployTelemetryClient({
|
|
149751
149822
|
opts: {
|
|
@@ -149774,6 +149845,7 @@ var init_deploy2 = __esm({
|
|
|
149774
149845
|
telemetryClient.trackCliFlagPublic(parsedArguments.flags["--public"]);
|
|
149775
149846
|
telemetryClient.trackCliFlagLogs(parsedArguments.flags["--logs"]);
|
|
149776
149847
|
telemetryClient.trackCliFlagNoLogs(parsedArguments.flags["--no-logs"]);
|
|
149848
|
+
telemetryClient.trackCliFlagGuidance(parsedArguments.flags["--guidance"]);
|
|
149777
149849
|
telemetryClient.trackCliFlagForce(parsedArguments.flags["--force"]);
|
|
149778
149850
|
telemetryClient.trackCliFlagWithCache(
|
|
149779
149851
|
parsedArguments.flags["--with-cache"]
|
|
@@ -150225,7 +150297,8 @@ ${err.stack}`);
|
|
|
150225
150297
|
printError(err);
|
|
150226
150298
|
return 1;
|
|
150227
150299
|
}
|
|
150228
|
-
|
|
150300
|
+
const guidanceMode = parsedArguments.flags["--guidance"] ?? await (0, import_detect_agent.determineAgent)() !== false;
|
|
150301
|
+
return printDeploymentStatus(deployment, deployStamp, noWait, guidanceMode);
|
|
150229
150302
|
};
|
|
150230
150303
|
addProcessEnv = async (log2, env) => {
|
|
150231
150304
|
let val;
|
|
@@ -150236,15 +150309,15 @@ ${err.stack}`);
|
|
|
150236
150309
|
val = process.env[key];
|
|
150237
150310
|
if (typeof val === "string") {
|
|
150238
150311
|
log2(
|
|
150239
|
-
`Reading ${
|
|
150240
|
-
`"${
|
|
150312
|
+
`Reading ${import_chalk64.default.bold(
|
|
150313
|
+
`"${import_chalk64.default.bold(key)}"`
|
|
150241
150314
|
)} from your env (as no value was specified)`
|
|
150242
150315
|
);
|
|
150243
150316
|
env[key] = val.replace(/^@/, "\\@");
|
|
150244
150317
|
} else {
|
|
150245
150318
|
throw new Error(
|
|
150246
|
-
`No value specified for env variable ${
|
|
150247
|
-
`"${
|
|
150319
|
+
`No value specified for env variable ${import_chalk64.default.bold(
|
|
150320
|
+
`"${import_chalk64.default.bold(key)}"`
|
|
150248
150321
|
)} and it was not found in your env. If you meant to specify an environment to deploy to, use ${param("--target")}`
|
|
150249
150322
|
);
|
|
150250
150323
|
}
|
|
@@ -167984,7 +168057,7 @@ function buildMatchEquals(a, b) {
|
|
|
167984
168057
|
return false;
|
|
167985
168058
|
return true;
|
|
167986
168059
|
}
|
|
167987
|
-
var import_url19, import_http3, import_fs_extra21, import_ms14,
|
|
168060
|
+
var import_url19, import_http3, import_fs_extra21, import_ms14, import_chalk65, import_node_fetch6, import_pluralize7, import_raw_body, import_async_listen3, import_minimatch4, import_http_proxy, import_crypto2, import_serve_handler, import_chokidar, import_dotenv2, import_path35, import_once, import_directory, import_get_port, import_is_port_reachable, import_fast_deep_equal, import_npm_package_arg2, import_json_parse_better_errors3, import_client12, import_routing_utils5, import_build_utils17, import_fs_detectors6, import_frameworks6, import_error_utils22, frontendRuntimeSet, DEV_SERVER_PORT_BIND_TIMEOUT, DevServer;
|
|
167988
168061
|
var init_server = __esm({
|
|
167989
168062
|
"src/util/dev/server.ts"() {
|
|
167990
168063
|
"use strict";
|
|
@@ -167992,7 +168065,7 @@ var init_server = __esm({
|
|
|
167992
168065
|
import_http3 = __toESM3(require("http"));
|
|
167993
168066
|
import_fs_extra21 = __toESM3(require_lib());
|
|
167994
168067
|
import_ms14 = __toESM3(require_ms());
|
|
167995
|
-
|
|
168068
|
+
import_chalk65 = __toESM3(require_source());
|
|
167996
168069
|
import_node_fetch6 = __toESM3(require_lib7());
|
|
167997
168070
|
import_pluralize7 = __toESM3(require_pluralize());
|
|
167998
168071
|
import_raw_body = __toESM3(require_raw_body());
|
|
@@ -168070,7 +168143,7 @@ var init_server = __esm({
|
|
|
168070
168143
|
return;
|
|
168071
168144
|
}
|
|
168072
168145
|
const method = req.method || "GET";
|
|
168073
|
-
output_manager_default.debug(`${
|
|
168146
|
+
output_manager_default.debug(`${import_chalk65.default.bold(method)} ${req.url}`);
|
|
168074
168147
|
try {
|
|
168075
168148
|
const vercelConfig = await this.getVercelConfig();
|
|
168076
168149
|
await this.serveProjectAsNowV2(req, res, requestId, vercelConfig);
|
|
@@ -168272,7 +168345,7 @@ var init_server = __esm({
|
|
|
168272
168345
|
}
|
|
168273
168346
|
} catch (err) {
|
|
168274
168347
|
if ((0, import_error_utils22.isSpawnError)(err) && err.code === "ENOENT") {
|
|
168275
|
-
err.message = `Command not found: ${
|
|
168348
|
+
err.message = `Command not found: ${import_chalk65.default.cyan(
|
|
168276
168349
|
err.path,
|
|
168277
168350
|
...err.spawnargs
|
|
168278
168351
|
)}
|
|
@@ -168529,7 +168602,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
168529
168602
|
});
|
|
168530
168603
|
} catch (err) {
|
|
168531
168604
|
if ((0, import_error_utils22.isSpawnError)(err) && err.code === "ENOENT") {
|
|
168532
|
-
err.message = `Command not found: ${
|
|
168605
|
+
err.message = `Command not found: ${import_chalk65.default.cyan(
|
|
168533
168606
|
err.path,
|
|
168534
168607
|
...err.spawnargs
|
|
168535
168608
|
)}
|
|
@@ -169229,10 +169302,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
169229
169302
|
*/
|
|
169230
169303
|
async _start(...listenSpec) {
|
|
169231
169304
|
if (!import_fs_extra21.default.existsSync(this.cwd)) {
|
|
169232
|
-
throw new Error(`${
|
|
169305
|
+
throw new Error(`${import_chalk65.default.bold(this.cwd)} doesn't exist`);
|
|
169233
169306
|
}
|
|
169234
169307
|
if (!import_fs_extra21.default.lstatSync(this.cwd).isDirectory()) {
|
|
169235
|
-
throw new Error(`${
|
|
169308
|
+
throw new Error(`${import_chalk65.default.bold(this.cwd)} is not a directory`);
|
|
169236
169309
|
}
|
|
169237
169310
|
const { ig } = await (0, import_client12.getVercelIgnore)(this.cwd);
|
|
169238
169311
|
this.filter = ig.createFilter();
|
|
@@ -169246,14 +169319,14 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
169246
169319
|
if (err.code === "EADDRINUSE") {
|
|
169247
169320
|
if (typeof listenSpec[0] === "number") {
|
|
169248
169321
|
output_manager_default.note(
|
|
169249
|
-
`Requested port ${
|
|
169322
|
+
`Requested port ${import_chalk65.default.yellow(
|
|
169250
169323
|
String(listenSpec[0])
|
|
169251
169324
|
)} is already in use`
|
|
169252
169325
|
);
|
|
169253
169326
|
listenSpec[0]++;
|
|
169254
169327
|
} else {
|
|
169255
169328
|
output_manager_default.error(
|
|
169256
|
-
`Requested socket ${
|
|
169329
|
+
`Requested socket ${import_chalk65.default.cyan(
|
|
169257
169330
|
listenSpec[0]
|
|
169258
169331
|
)} is already in use`
|
|
169259
169332
|
);
|
|
@@ -169645,7 +169718,7 @@ ${error_code}
|
|
|
169645
169718
|
if (this.devProcess) {
|
|
169646
169719
|
await treeKill(this.devProcess.pid);
|
|
169647
169720
|
}
|
|
169648
|
-
output_manager_default.log(`Running Dev Command ${
|
|
169721
|
+
output_manager_default.log(`Running Dev Command ${import_chalk65.default.cyan.bold(`\u201C${devCommand2}\u201D`)}`);
|
|
169649
169722
|
const port = await (0, import_get_port.default)();
|
|
169650
169723
|
const env = (0, import_build_utils17.cloneEnv)(
|
|
169651
169724
|
{
|
|
@@ -169884,7 +169957,7 @@ async function dev(client2, opts, args2, telemetry2) {
|
|
|
169884
169957
|
envValues,
|
|
169885
169958
|
"vercel-cli:dev"
|
|
169886
169959
|
)) {
|
|
169887
|
-
output_manager_default.debug(`Refreshing ${
|
|
169960
|
+
output_manager_default.debug(`Refreshing ${import_chalk66.default.green(VERCEL_OIDC_TOKEN)}`);
|
|
169888
169961
|
envValues[VERCEL_OIDC_TOKEN] = token;
|
|
169889
169962
|
await devServer.runDevCommand(true);
|
|
169890
169963
|
telemetry2.trackOidcTokenRefresh(++refreshCount);
|
|
@@ -169915,11 +169988,11 @@ async function dev(client2, opts, args2, telemetry2) {
|
|
|
169915
169988
|
controller.abort();
|
|
169916
169989
|
}
|
|
169917
169990
|
}
|
|
169918
|
-
var
|
|
169991
|
+
var import_chalk66, import_path36, import_fs_extra22;
|
|
169919
169992
|
var init_dev = __esm({
|
|
169920
169993
|
"src/commands/dev/dev.ts"() {
|
|
169921
169994
|
"use strict";
|
|
169922
|
-
|
|
169995
|
+
import_chalk66 = __toESM3(require_source());
|
|
169923
169996
|
import_path36 = require("path");
|
|
169924
169997
|
import_fs_extra22 = __toESM3(require_lib());
|
|
169925
169998
|
init_server();
|
|
@@ -170092,17 +170165,17 @@ async function main6(client2) {
|
|
|
170092
170165
|
function stringifyError(err) {
|
|
170093
170166
|
if (err instanceof NowError) {
|
|
170094
170167
|
const errMeta = JSON.stringify(err.meta, null, 2).replace(/\\n/g, "\n");
|
|
170095
|
-
return `${
|
|
170168
|
+
return `${import_chalk67.default.red(err.code)} ${err.message}
|
|
170096
170169
|
${errMeta}`;
|
|
170097
170170
|
}
|
|
170098
170171
|
return err.stack;
|
|
170099
170172
|
}
|
|
170100
|
-
var import_path37,
|
|
170173
|
+
var import_path37, import_chalk67, import_error_utils23, COMMAND_CONFIG6;
|
|
170101
170174
|
var init_dev3 = __esm({
|
|
170102
170175
|
"src/commands/dev/index.ts"() {
|
|
170103
170176
|
"use strict";
|
|
170104
170177
|
import_path37 = __toESM3(require("path"));
|
|
170105
|
-
|
|
170178
|
+
import_chalk67 = __toESM3(require_source());
|
|
170106
170179
|
init_get_args();
|
|
170107
170180
|
init_get_subcommand();
|
|
170108
170181
|
init_now_error();
|
|
@@ -170244,9 +170317,9 @@ async function getDNSData(client2, data) {
|
|
|
170244
170317
|
const port = await getNumber(client2, `- ${type} port: `);
|
|
170245
170318
|
const target = await getTrimmedString(client2, `- ${type} target: `);
|
|
170246
170319
|
output_manager_default.log(
|
|
170247
|
-
`${
|
|
170320
|
+
`${import_chalk68.default.cyan(name)} ${import_chalk68.default.bold(type)} ${import_chalk68.default.cyan(
|
|
170248
170321
|
`${priority}`
|
|
170249
|
-
)} ${
|
|
170322
|
+
)} ${import_chalk68.default.cyan(`${weight}`)} ${import_chalk68.default.cyan(`${port}`)} ${import_chalk68.default.cyan(
|
|
170250
170323
|
target
|
|
170251
170324
|
)}.`
|
|
170252
170325
|
);
|
|
@@ -170265,9 +170338,9 @@ async function getDNSData(client2, data) {
|
|
|
170265
170338
|
const mxPriority = await getNumber(client2, `- ${type} priority: `);
|
|
170266
170339
|
const value2 = await getTrimmedString(client2, `- ${type} host: `);
|
|
170267
170340
|
output_manager_default.log(
|
|
170268
|
-
`${
|
|
170341
|
+
`${import_chalk68.default.cyan(name)} ${import_chalk68.default.bold(type)} ${import_chalk68.default.cyan(
|
|
170269
170342
|
`${mxPriority}`
|
|
170270
|
-
)} ${
|
|
170343
|
+
)} ${import_chalk68.default.cyan(value2)}`
|
|
170271
170344
|
);
|
|
170272
170345
|
return await verifyData(client2) ? {
|
|
170273
170346
|
name,
|
|
@@ -170277,7 +170350,7 @@ async function getDNSData(client2, data) {
|
|
|
170277
170350
|
} : null;
|
|
170278
170351
|
}
|
|
170279
170352
|
const value = await getTrimmedString(client2, `- ${type} value: `);
|
|
170280
|
-
output_manager_default.log(`${
|
|
170353
|
+
output_manager_default.log(`${import_chalk68.default.cyan(name)} ${import_chalk68.default.bold(type)} ${import_chalk68.default.cyan(value)}`);
|
|
170281
170354
|
return await verifyData(client2) ? {
|
|
170282
170355
|
name,
|
|
170283
170356
|
type,
|
|
@@ -170311,11 +170384,11 @@ async function getTrimmedString(client2, label) {
|
|
|
170311
170384
|
});
|
|
170312
170385
|
return res.trim();
|
|
170313
170386
|
}
|
|
170314
|
-
var
|
|
170387
|
+
var import_chalk68, RECORD_TYPES;
|
|
170315
170388
|
var init_get_dns_data = __esm({
|
|
170316
170389
|
"src/util/dns/get-dns-data.ts"() {
|
|
170317
170390
|
"use strict";
|
|
170318
|
-
|
|
170391
|
+
import_chalk68 = __toESM3(require_source());
|
|
170319
170392
|
init_output_manager();
|
|
170320
170393
|
RECORD_TYPES = ["A", "AAAA", "ALIAS", "CAA", "CNAME", "MX", "SRV", "TXT"];
|
|
170321
170394
|
}
|
|
@@ -170388,7 +170461,7 @@ async function add2(client2, argv) {
|
|
|
170388
170461
|
const parsedParams = parseAddArgs(args2);
|
|
170389
170462
|
if (!parsedParams) {
|
|
170390
170463
|
output_manager_default.error(
|
|
170391
|
-
`Invalid number of arguments. See: ${
|
|
170464
|
+
`Invalid number of arguments. See: ${import_chalk69.default.cyan(
|
|
170392
170465
|
`${getCommandName("dns --help")}`
|
|
170393
170466
|
)} for usage.`
|
|
170394
170467
|
);
|
|
@@ -170415,23 +170488,23 @@ async function add2(client2, argv) {
|
|
|
170415
170488
|
const record = await addDNSRecord(client2, domain, data);
|
|
170416
170489
|
if (record instanceof DomainNotFound) {
|
|
170417
170490
|
output_manager_default.error(
|
|
170418
|
-
`The domain ${domain} can't be found under ${
|
|
170491
|
+
`The domain ${domain} can't be found under ${import_chalk69.default.bold(
|
|
170419
170492
|
contextName
|
|
170420
|
-
)} ${
|
|
170493
|
+
)} ${import_chalk69.default.gray(addStamp())}`
|
|
170421
170494
|
);
|
|
170422
170495
|
return 1;
|
|
170423
170496
|
}
|
|
170424
170497
|
if (record instanceof DNSPermissionDenied) {
|
|
170425
170498
|
output_manager_default.error(
|
|
170426
|
-
`You don't have permissions to add records to domain ${domain} under ${
|
|
170499
|
+
`You don't have permissions to add records to domain ${domain} under ${import_chalk69.default.bold(
|
|
170427
170500
|
contextName
|
|
170428
|
-
)} ${
|
|
170501
|
+
)} ${import_chalk69.default.gray(addStamp())}`
|
|
170429
170502
|
);
|
|
170430
170503
|
return 1;
|
|
170431
170504
|
}
|
|
170432
170505
|
if (record instanceof DNSInvalidPort) {
|
|
170433
170506
|
output_manager_default.error(
|
|
170434
|
-
`Invalid <port> parameter. A number was expected ${
|
|
170507
|
+
`Invalid <port> parameter. A number was expected ${import_chalk69.default.gray(
|
|
170435
170508
|
addStamp()
|
|
170436
170509
|
)}`
|
|
170437
170510
|
);
|
|
@@ -170439,7 +170512,7 @@ async function add2(client2, argv) {
|
|
|
170439
170512
|
}
|
|
170440
170513
|
if (record instanceof DNSInvalidType) {
|
|
170441
170514
|
output_manager_default.error(
|
|
170442
|
-
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${
|
|
170515
|
+
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${import_chalk69.default.gray(
|
|
170443
170516
|
addStamp()
|
|
170444
170517
|
)}`
|
|
170445
170518
|
);
|
|
@@ -170450,17 +170523,17 @@ async function add2(client2, argv) {
|
|
|
170450
170523
|
return 1;
|
|
170451
170524
|
}
|
|
170452
170525
|
output_manager_default.success(
|
|
170453
|
-
`DNS record for domain ${
|
|
170526
|
+
`DNS record for domain ${import_chalk69.default.bold(domain)} ${import_chalk69.default.gray(
|
|
170454
170527
|
`(${record.uid})`
|
|
170455
|
-
)} created under ${
|
|
170528
|
+
)} created under ${import_chalk69.default.bold(contextName)} ${import_chalk69.default.gray(addStamp())}`
|
|
170456
170529
|
);
|
|
170457
170530
|
return 0;
|
|
170458
170531
|
}
|
|
170459
|
-
var
|
|
170532
|
+
var import_chalk69;
|
|
170460
170533
|
var init_add4 = __esm({
|
|
170461
170534
|
"src/commands/dns/add.ts"() {
|
|
170462
170535
|
"use strict";
|
|
170463
|
-
|
|
170536
|
+
import_chalk69 = __toESM3(require_source());
|
|
170464
170537
|
init_errors_ts();
|
|
170465
170538
|
init_add_dns_record();
|
|
170466
170539
|
init_get_scope();
|
|
@@ -170480,7 +170553,7 @@ var init_add4 = __esm({
|
|
|
170480
170553
|
// src/util/dns/import-zonefile.ts
|
|
170481
170554
|
async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
170482
170555
|
output_manager_default.spinner(
|
|
170483
|
-
`Importing Zone file for domain ${domain} under ${
|
|
170556
|
+
`Importing Zone file for domain ${domain} under ${import_chalk70.default.bold(contextName)}`
|
|
170484
170557
|
);
|
|
170485
170558
|
const zonefile = (0, import_fs7.readFileSync)((0, import_path38.resolve)(zonefilePath), "utf8");
|
|
170486
170559
|
try {
|
|
@@ -170507,11 +170580,11 @@ async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
|
170507
170580
|
throw err;
|
|
170508
170581
|
}
|
|
170509
170582
|
}
|
|
170510
|
-
var
|
|
170583
|
+
var import_chalk70, import_fs7, import_path38;
|
|
170511
170584
|
var init_import_zonefile = __esm({
|
|
170512
170585
|
"src/util/dns/import-zonefile.ts"() {
|
|
170513
170586
|
"use strict";
|
|
170514
|
-
|
|
170587
|
+
import_chalk70 = __toESM3(require_source());
|
|
170515
170588
|
import_fs7 = require("fs");
|
|
170516
170589
|
import_path38 = require("path");
|
|
170517
170590
|
init_errors_ts();
|
|
@@ -170566,7 +170639,7 @@ async function importZone(client2, argv) {
|
|
|
170566
170639
|
});
|
|
170567
170640
|
if (args2.length !== 2) {
|
|
170568
170641
|
output_manager_default.error(
|
|
170569
|
-
`Invalid number of arguments. Usage: ${
|
|
170642
|
+
`Invalid number of arguments. Usage: ${import_chalk71.default.cyan(
|
|
170570
170643
|
`${getCommandName("dns import <domain> <zonefile>")}`
|
|
170571
170644
|
)}`
|
|
170572
170645
|
);
|
|
@@ -170584,32 +170657,32 @@ async function importZone(client2, argv) {
|
|
|
170584
170657
|
);
|
|
170585
170658
|
if (recordIds instanceof DomainNotFound) {
|
|
170586
170659
|
output_manager_default.error(
|
|
170587
|
-
`The domain ${domain} can't be found under ${
|
|
170660
|
+
`The domain ${domain} can't be found under ${import_chalk71.default.bold(
|
|
170588
170661
|
contextName
|
|
170589
|
-
)} ${
|
|
170662
|
+
)} ${import_chalk71.default.gray(addStamp())}`
|
|
170590
170663
|
);
|
|
170591
170664
|
return 1;
|
|
170592
170665
|
}
|
|
170593
170666
|
if (recordIds instanceof InvalidDomain) {
|
|
170594
170667
|
output_manager_default.error(
|
|
170595
|
-
`The domain ${domain} doesn't match with the one found in the Zone file ${
|
|
170668
|
+
`The domain ${domain} doesn't match with the one found in the Zone file ${import_chalk71.default.gray(
|
|
170596
170669
|
addStamp()
|
|
170597
170670
|
)}`
|
|
170598
170671
|
);
|
|
170599
170672
|
return 1;
|
|
170600
170673
|
}
|
|
170601
170674
|
output_manager_default.success(
|
|
170602
|
-
`${recordIds.length} DNS records for domain ${
|
|
170675
|
+
`${recordIds.length} DNS records for domain ${import_chalk71.default.bold(
|
|
170603
170676
|
domain
|
|
170604
|
-
)} created under ${
|
|
170677
|
+
)} created under ${import_chalk71.default.bold(contextName)} ${import_chalk71.default.gray(addStamp())}`
|
|
170605
170678
|
);
|
|
170606
170679
|
return 0;
|
|
170607
170680
|
}
|
|
170608
|
-
var
|
|
170681
|
+
var import_chalk71;
|
|
170609
170682
|
var init_import2 = __esm({
|
|
170610
170683
|
"src/commands/dns/import.ts"() {
|
|
170611
170684
|
"use strict";
|
|
170612
|
-
|
|
170685
|
+
import_chalk71 = __toESM3(require_source());
|
|
170613
170686
|
init_get_scope();
|
|
170614
170687
|
init_errors_ts();
|
|
170615
170688
|
init_stamp();
|
|
@@ -170652,7 +170725,7 @@ function formatTable(header, align, blocks) {
|
|
|
170652
170725
|
out += `${block.name}
|
|
170653
170726
|
`;
|
|
170654
170727
|
}
|
|
170655
|
-
const rows = [header.map((s) =>
|
|
170728
|
+
const rows = [header.map((s) => import_chalk72.default.dim(s))].concat(block.rows);
|
|
170656
170729
|
if (rows.length > 0) {
|
|
170657
170730
|
rows[0][0] = ` ${rows[0][0]}`;
|
|
170658
170731
|
for (let i = 1; i < rows.length; i++) {
|
|
@@ -170672,11 +170745,11 @@ function formatTable(header, align, blocks) {
|
|
|
170672
170745
|
}
|
|
170673
170746
|
return out.slice(0, -1);
|
|
170674
170747
|
}
|
|
170675
|
-
var
|
|
170748
|
+
var import_chalk72;
|
|
170676
170749
|
var init_format_table = __esm({
|
|
170677
170750
|
"src/util/format-table.ts"() {
|
|
170678
170751
|
"use strict";
|
|
170679
|
-
|
|
170752
|
+
import_chalk72 = __toESM3(require_source());
|
|
170680
170753
|
init_table();
|
|
170681
170754
|
init_strlen();
|
|
170682
170755
|
}
|
|
@@ -170760,18 +170833,18 @@ function getAddDomainName(domainNames) {
|
|
|
170760
170833
|
];
|
|
170761
170834
|
}
|
|
170762
170835
|
async function getDomainNames(client2, contextName, next) {
|
|
170763
|
-
output_manager_default.spinner(`Fetching domains under ${
|
|
170836
|
+
output_manager_default.spinner(`Fetching domains under ${import_chalk73.default.bold(contextName)}`);
|
|
170764
170837
|
const { domains: domains2, pagination } = await getDomains(client2, next);
|
|
170765
170838
|
return { domainNames: domains2.map((domain) => domain.name), pagination };
|
|
170766
170839
|
}
|
|
170767
|
-
var
|
|
170840
|
+
var import_chalk73;
|
|
170768
170841
|
var init_get_dns_records = __esm({
|
|
170769
170842
|
"src/util/dns/get-dns-records.ts"() {
|
|
170770
170843
|
"use strict";
|
|
170771
170844
|
init_errors_ts();
|
|
170772
170845
|
init_get_domain_dns_records();
|
|
170773
170846
|
init_get_domains();
|
|
170774
|
-
|
|
170847
|
+
import_chalk73 = __toESM3(require_source());
|
|
170775
170848
|
init_output_manager();
|
|
170776
170849
|
}
|
|
170777
170850
|
});
|
|
@@ -170836,7 +170909,7 @@ async function ls3(client2, argv) {
|
|
|
170836
170909
|
telemetry2.trackCliOptionNext(opts["--next"]);
|
|
170837
170910
|
if (args2.length > 1) {
|
|
170838
170911
|
output_manager_default.error(
|
|
170839
|
-
`Invalid number of arguments. Usage: ${
|
|
170912
|
+
`Invalid number of arguments. Usage: ${import_chalk74.default.cyan(
|
|
170840
170913
|
`${getCommandName("dns ls [domain]")}`
|
|
170841
170914
|
)}`
|
|
170842
170915
|
);
|
|
@@ -170858,15 +170931,15 @@ async function ls3(client2, argv) {
|
|
|
170858
170931
|
);
|
|
170859
170932
|
if (data instanceof DomainNotFound) {
|
|
170860
170933
|
output_manager_default.error(
|
|
170861
|
-
`The domain ${domainName} can't be found under ${
|
|
170934
|
+
`The domain ${domainName} can't be found under ${import_chalk74.default.bold(
|
|
170862
170935
|
contextName
|
|
170863
|
-
)} ${
|
|
170936
|
+
)} ${import_chalk74.default.gray(lsStamp())}`
|
|
170864
170937
|
);
|
|
170865
170938
|
return 1;
|
|
170866
170939
|
}
|
|
170867
170940
|
const { records, pagination: pagination2 } = data;
|
|
170868
170941
|
output_manager_default.log(
|
|
170869
|
-
`${records.length > 0 ? "Records" : "No records"} found under ${
|
|
170942
|
+
`${records.length > 0 ? "Records" : "No records"} found under ${import_chalk74.default.bold(contextName)} ${import_chalk74.default.gray(lsStamp())}`
|
|
170870
170943
|
);
|
|
170871
170944
|
client2.stdout.write(getDNSRecordsTable([{ domainName, records }]));
|
|
170872
170945
|
if (pagination2 && pagination2.count === 20) {
|
|
@@ -170886,9 +170959,9 @@ async function ls3(client2, argv) {
|
|
|
170886
170959
|
);
|
|
170887
170960
|
const nRecords = dnsRecords.reduce((p, r) => r.records.length + p, 0);
|
|
170888
170961
|
output_manager_default.log(
|
|
170889
|
-
`${nRecords > 0 ? "Records" : "No records"} found under ${
|
|
170962
|
+
`${nRecords > 0 ? "Records" : "No records"} found under ${import_chalk74.default.bold(
|
|
170890
170963
|
contextName
|
|
170891
|
-
)} ${
|
|
170964
|
+
)} ${import_chalk74.default.gray(lsStamp())}`
|
|
170892
170965
|
);
|
|
170893
170966
|
output_manager_default.log(getDNSRecordsTable(dnsRecords));
|
|
170894
170967
|
if (pagination && pagination.count === 20) {
|
|
@@ -170906,7 +170979,7 @@ function getDNSRecordsTable(dnsRecords) {
|
|
|
170906
170979
|
["", "id", "name", "type", "value", "created"],
|
|
170907
170980
|
["l", "r", "l", "l", "l", "l"],
|
|
170908
170981
|
dnsRecords.map(({ domainName, records }) => ({
|
|
170909
|
-
name:
|
|
170982
|
+
name: import_chalk74.default.bold(domainName),
|
|
170910
170983
|
rows: records.map(getDNSRecordRow)
|
|
170911
170984
|
}))
|
|
170912
170985
|
);
|
|
@@ -170923,14 +170996,14 @@ function getDNSRecordRow(record) {
|
|
|
170923
170996
|
record.name,
|
|
170924
170997
|
record.type,
|
|
170925
170998
|
priority ? `${priority} ${record.value}` : record.value,
|
|
170926
|
-
|
|
170999
|
+
import_chalk74.default.gray(isSystemRecord ? "default" : createdAt)
|
|
170927
171000
|
];
|
|
170928
171001
|
}
|
|
170929
|
-
var
|
|
171002
|
+
var import_chalk74, import_ms16;
|
|
170930
171003
|
var init_ls5 = __esm({
|
|
170931
171004
|
"src/commands/dns/ls.ts"() {
|
|
170932
171005
|
"use strict";
|
|
170933
|
-
|
|
171006
|
+
import_chalk74 = __toESM3(require_source());
|
|
170934
171007
|
import_ms16 = __toESM3(require_ms());
|
|
170935
171008
|
init_errors_ts();
|
|
170936
171009
|
init_format_table();
|
|
@@ -171015,7 +171088,7 @@ async function rm3(client2, argv) {
|
|
|
171015
171088
|
const [recordId] = args2;
|
|
171016
171089
|
if (args2.length !== 1) {
|
|
171017
171090
|
output_manager_default.error(
|
|
171018
|
-
`Invalid number of arguments. Usage: ${
|
|
171091
|
+
`Invalid number of arguments. Usage: ${import_chalk75.default.cyan(
|
|
171019
171092
|
`${getCommandName("dns rm <id>")}`
|
|
171020
171093
|
)}`
|
|
171021
171094
|
);
|
|
@@ -171041,7 +171114,7 @@ async function rm3(client2, argv) {
|
|
|
171041
171114
|
const rmStamp = stamp_default();
|
|
171042
171115
|
await deleteDNSRecordById(client2, domainName, record.id);
|
|
171043
171116
|
output_manager_default.success(
|
|
171044
|
-
`Record ${
|
|
171117
|
+
`Record ${import_chalk75.default.gray(`${record.id}`)} removed ${import_chalk75.default.gray(rmStamp())}`
|
|
171045
171118
|
);
|
|
171046
171119
|
return 0;
|
|
171047
171120
|
}
|
|
@@ -171056,7 +171129,7 @@ function readConfirmation2(client2, msg, domainName, record) {
|
|
|
171056
171129
|
`
|
|
171057
171130
|
);
|
|
171058
171131
|
output_manager_default.print(
|
|
171059
|
-
`${
|
|
171132
|
+
`${import_chalk75.default.bold.red("> Are you sure?")} ${import_chalk75.default.gray("(y/N) ")}`
|
|
171060
171133
|
);
|
|
171061
171134
|
client2.stdin.on("data", (d) => {
|
|
171062
171135
|
process.stdin.pause();
|
|
@@ -171068,19 +171141,19 @@ function getDeleteTableRow(domainName, record) {
|
|
|
171068
171141
|
const recordName = `${record.name.length > 0 ? `${record.name}.` : ""}${domainName}`;
|
|
171069
171142
|
return [
|
|
171070
171143
|
record.id,
|
|
171071
|
-
|
|
171144
|
+
import_chalk75.default.bold(
|
|
171072
171145
|
`${recordName} ${record.type} ${record.value} ${record.mxPriority || ""}`
|
|
171073
171146
|
),
|
|
171074
|
-
|
|
171147
|
+
import_chalk75.default.gray(
|
|
171075
171148
|
`${(0, import_ms17.default)(Date.now() - new Date(Number(record.createdAt)).getTime())} ago`
|
|
171076
171149
|
)
|
|
171077
171150
|
];
|
|
171078
171151
|
}
|
|
171079
|
-
var
|
|
171152
|
+
var import_chalk75, import_ms17;
|
|
171080
171153
|
var init_rm4 = __esm({
|
|
171081
171154
|
"src/commands/dns/rm.ts"() {
|
|
171082
171155
|
"use strict";
|
|
171083
|
-
|
|
171156
|
+
import_chalk75 = __toESM3(require_source());
|
|
171084
171157
|
import_ms17 = __toESM3(require_ms());
|
|
171085
171158
|
init_table();
|
|
171086
171159
|
init_delete_dns_record_by_id();
|
|
@@ -171254,16 +171327,16 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
|
171254
171327
|
const rows = [];
|
|
171255
171328
|
for (let i = 0; i < maxLength; i++) {
|
|
171256
171329
|
rows.push([
|
|
171257
|
-
sortedIntended[i] ||
|
|
171258
|
-
sortedCurrent[i] ||
|
|
171259
|
-
sortedIntended[i] === sortedCurrent[i] ?
|
|
171330
|
+
sortedIntended[i] || import_chalk76.default.gray("-"),
|
|
171331
|
+
sortedCurrent[i] || import_chalk76.default.gray("-"),
|
|
171332
|
+
sortedIntended[i] === sortedCurrent[i] ? import_chalk76.default.green(chars_default.tick) : import_chalk76.default.red(chars_default.cross)
|
|
171260
171333
|
]);
|
|
171261
171334
|
}
|
|
171262
171335
|
return table(
|
|
171263
171336
|
[
|
|
171264
171337
|
[
|
|
171265
|
-
|
|
171266
|
-
|
|
171338
|
+
import_chalk76.default.gray("Intended Nameservers"),
|
|
171339
|
+
import_chalk76.default.gray("Current Nameservers"),
|
|
171267
171340
|
""
|
|
171268
171341
|
],
|
|
171269
171342
|
...rows
|
|
@@ -171271,11 +171344,11 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
|
171271
171344
|
{ hsep: 4 }
|
|
171272
171345
|
).replace(/^(.*)/gm, `${extraSpace}$1`);
|
|
171273
171346
|
}
|
|
171274
|
-
var
|
|
171347
|
+
var import_chalk76;
|
|
171275
171348
|
var init_format_ns_table = __esm({
|
|
171276
171349
|
"src/util/format-ns-table.ts"() {
|
|
171277
171350
|
"use strict";
|
|
171278
|
-
|
|
171351
|
+
import_chalk76 = __toESM3(require_source());
|
|
171279
171352
|
init_table();
|
|
171280
171353
|
init_chars();
|
|
171281
171354
|
}
|
|
@@ -171284,7 +171357,7 @@ var init_format_ns_table = __esm({
|
|
|
171284
171357
|
// src/util/domains/get-domain.ts
|
|
171285
171358
|
async function getDomain(client2, contextName, domainName) {
|
|
171286
171359
|
output_manager_default.spinner(
|
|
171287
|
-
`Fetching domain ${domainName} under ${
|
|
171360
|
+
`Fetching domain ${domainName} under ${import_chalk77.default.bold(contextName)}`
|
|
171288
171361
|
);
|
|
171289
171362
|
try {
|
|
171290
171363
|
const { domain } = await client2.fetch(
|
|
@@ -171298,11 +171371,11 @@ async function getDomain(client2, contextName, domainName) {
|
|
|
171298
171371
|
throw err;
|
|
171299
171372
|
}
|
|
171300
171373
|
}
|
|
171301
|
-
var
|
|
171374
|
+
var import_chalk77;
|
|
171302
171375
|
var init_get_domain = __esm({
|
|
171303
171376
|
"src/util/domains/get-domain.ts"() {
|
|
171304
171377
|
"use strict";
|
|
171305
|
-
|
|
171378
|
+
import_chalk77 = __toESM3(require_source());
|
|
171306
171379
|
init_errors_ts();
|
|
171307
171380
|
init_output_manager();
|
|
171308
171381
|
}
|
|
@@ -171342,7 +171415,7 @@ var init_get_domain_config = __esm({
|
|
|
171342
171415
|
// src/util/projects/add-domain-to-project.ts
|
|
171343
171416
|
async function addDomainToProject(client2, projectNameOrId, domain) {
|
|
171344
171417
|
output_manager_default.spinner(
|
|
171345
|
-
`Adding domain ${domain} to project ${
|
|
171418
|
+
`Adding domain ${domain} to project ${import_chalk78.default.bold(projectNameOrId)}`
|
|
171346
171419
|
);
|
|
171347
171420
|
try {
|
|
171348
171421
|
const response = await client2.fetch(
|
|
@@ -171371,11 +171444,11 @@ async function addDomainToProject(client2, projectNameOrId, domain) {
|
|
|
171371
171444
|
throw err;
|
|
171372
171445
|
}
|
|
171373
171446
|
}
|
|
171374
|
-
var
|
|
171447
|
+
var import_chalk78;
|
|
171375
171448
|
var init_add_domain_to_project = __esm({
|
|
171376
171449
|
"src/util/projects/add-domain-to-project.ts"() {
|
|
171377
171450
|
"use strict";
|
|
171378
|
-
|
|
171451
|
+
import_chalk78 = __toESM3(require_source());
|
|
171379
171452
|
init_errors_ts();
|
|
171380
171453
|
init_output_manager();
|
|
171381
171454
|
}
|
|
@@ -171384,7 +171457,7 @@ var init_add_domain_to_project = __esm({
|
|
|
171384
171457
|
// src/util/projects/remove-domain-from-project.ts
|
|
171385
171458
|
async function removeDomainFromProject(client2, projectNameOrId, domain) {
|
|
171386
171459
|
output_manager_default.spinner(
|
|
171387
|
-
`Removing domain ${domain} from project ${
|
|
171460
|
+
`Removing domain ${domain} from project ${import_chalk79.default.bold(projectNameOrId)}`
|
|
171388
171461
|
);
|
|
171389
171462
|
try {
|
|
171390
171463
|
const response = await client2.fetch(
|
|
@@ -171403,11 +171476,11 @@ async function removeDomainFromProject(client2, projectNameOrId, domain) {
|
|
|
171403
171476
|
throw err;
|
|
171404
171477
|
}
|
|
171405
171478
|
}
|
|
171406
|
-
var
|
|
171479
|
+
var import_chalk79;
|
|
171407
171480
|
var init_remove_domain_from_project = __esm({
|
|
171408
171481
|
"src/util/projects/remove-domain-from-project.ts"() {
|
|
171409
171482
|
"use strict";
|
|
171410
|
-
|
|
171483
|
+
import_chalk79 = __toESM3(require_source());
|
|
171411
171484
|
init_errors_ts();
|
|
171412
171485
|
init_output_manager();
|
|
171413
171486
|
}
|
|
@@ -171511,7 +171584,7 @@ async function add3(client2, argv) {
|
|
|
171511
171584
|
}
|
|
171512
171585
|
}
|
|
171513
171586
|
output_manager_default.success(
|
|
171514
|
-
`Domain ${
|
|
171587
|
+
`Domain ${import_chalk80.default.bold(domainName)} added to project ${import_chalk80.default.bold(
|
|
171515
171588
|
projectName
|
|
171516
171589
|
)}. ${addStamp()}`
|
|
171517
171590
|
);
|
|
@@ -171532,11 +171605,11 @@ async function add3(client2, argv) {
|
|
|
171532
171605
|
"This domain is not configured properly. To configure it you should either:"
|
|
171533
171606
|
);
|
|
171534
171607
|
output_manager_default.print(
|
|
171535
|
-
` ${
|
|
171608
|
+
` ${import_chalk80.default.grey("a)")} Set the following record on your DNS provider to continue: ${code(`A ${domainName} 76.76.21.21`)} ${import_chalk80.default.grey("[recommended]")}
|
|
171536
171609
|
`
|
|
171537
171610
|
);
|
|
171538
171611
|
output_manager_default.print(
|
|
171539
|
-
` ${
|
|
171612
|
+
` ${import_chalk80.default.grey("b)")} Change your Domains's nameservers to the intended set`
|
|
171540
171613
|
);
|
|
171541
171614
|
output_manager_default.print(
|
|
171542
171615
|
`
|
|
@@ -171559,11 +171632,11 @@ ${formatNSTable(
|
|
|
171559
171632
|
}
|
|
171560
171633
|
return 0;
|
|
171561
171634
|
}
|
|
171562
|
-
var
|
|
171635
|
+
var import_chalk80;
|
|
171563
171636
|
var init_add6 = __esm({
|
|
171564
171637
|
"src/commands/domains/add.ts"() {
|
|
171565
171638
|
"use strict";
|
|
171566
|
-
|
|
171639
|
+
import_chalk80 = __toESM3(require_source());
|
|
171567
171640
|
init_errors_ts();
|
|
171568
171641
|
init_format_ns_table();
|
|
171569
171642
|
init_get_scope();
|
|
@@ -171655,7 +171728,7 @@ async function buy(client2, argv) {
|
|
|
171655
171728
|
}
|
|
171656
171729
|
if (!(await getDomainStatus(client2, domainName)).available) {
|
|
171657
171730
|
output_manager_default.error(
|
|
171658
|
-
`The domain ${param(domainName)} is ${
|
|
171731
|
+
`The domain ${param(domainName)} is ${import_chalk81.default.underline(
|
|
171659
171732
|
"unavailable"
|
|
171660
171733
|
)}! ${availableStamp()}`
|
|
171661
171734
|
);
|
|
@@ -171663,22 +171736,22 @@ async function buy(client2, argv) {
|
|
|
171663
171736
|
}
|
|
171664
171737
|
const { period, price } = domainPrice;
|
|
171665
171738
|
output_manager_default.log(
|
|
171666
|
-
`The domain ${param(domainName)} is ${
|
|
171739
|
+
`The domain ${param(domainName)} is ${import_chalk81.default.underline(
|
|
171667
171740
|
"available"
|
|
171668
|
-
)} to buy under ${
|
|
171741
|
+
)} to buy under ${import_chalk81.default.bold(contextName)}! ${availableStamp()}`
|
|
171669
171742
|
);
|
|
171670
171743
|
let autoRenew;
|
|
171671
171744
|
if (skipConfirmation) {
|
|
171672
171745
|
autoRenew = true;
|
|
171673
171746
|
} else {
|
|
171674
171747
|
if (!await client2.input.confirm(
|
|
171675
|
-
`Buy now for ${
|
|
171748
|
+
`Buy now for ${import_chalk81.default.bold(`$${price}`)} (${`${period}yr${period > 1 ? "s" : ""}`})?`,
|
|
171676
171749
|
false
|
|
171677
171750
|
)) {
|
|
171678
171751
|
return 0;
|
|
171679
171752
|
}
|
|
171680
171753
|
autoRenew = await client2.input.confirm(
|
|
171681
|
-
renewalPrice.period === 1 ? `Auto renew yearly for ${
|
|
171754
|
+
renewalPrice.period === 1 ? `Auto renew yearly for ${import_chalk81.default.bold(`$${price}`)}?` : `Auto renew every ${renewalPrice.period} years for ${import_chalk81.default.bold(
|
|
171682
171755
|
`$${price}`
|
|
171683
171756
|
)}?`,
|
|
171684
171757
|
true
|
|
@@ -171762,11 +171835,11 @@ async function buy(client2, argv) {
|
|
|
171762
171835
|
}
|
|
171763
171836
|
return 0;
|
|
171764
171837
|
}
|
|
171765
|
-
var
|
|
171838
|
+
var import_chalk81, import_tldts6, import_error_utils24;
|
|
171766
171839
|
var init_buy2 = __esm({
|
|
171767
171840
|
"src/commands/domains/buy.ts"() {
|
|
171768
171841
|
"use strict";
|
|
171769
|
-
|
|
171842
|
+
import_chalk81 = __toESM3(require_source());
|
|
171770
171843
|
import_tldts6 = __toESM3(require_cjs7());
|
|
171771
171844
|
import_error_utils24 = __toESM3(require_dist2());
|
|
171772
171845
|
init_errors_ts();
|
|
@@ -171947,13 +172020,13 @@ async function transferIn(client2, argv) {
|
|
|
171947
172020
|
const { price } = domainPrice;
|
|
171948
172021
|
const { contextName } = await getScope(client2);
|
|
171949
172022
|
output_manager_default.log(
|
|
171950
|
-
`The domain ${param(domainName)} is ${
|
|
172023
|
+
`The domain ${param(domainName)} is ${import_chalk82.default.underline(
|
|
171951
172024
|
"available"
|
|
171952
|
-
)} to transfer under ${
|
|
172025
|
+
)} to transfer under ${import_chalk82.default.bold(contextName)}! ${availableStamp()}`
|
|
171953
172026
|
);
|
|
171954
172027
|
const authCode = await getAuthCode(client2, opts["--code"]);
|
|
171955
172028
|
const shouldTransfer = await client2.input.confirm(
|
|
171956
|
-
transferPolicy === "no-change" ? `Transfer now for ${
|
|
172029
|
+
transferPolicy === "no-change" ? `Transfer now for ${import_chalk82.default.bold(`$${price}`)}?` : `Transfer now with 1yr renewal for ${import_chalk82.default.bold(`$${price}`)}?`,
|
|
171957
172030
|
false
|
|
171958
172031
|
);
|
|
171959
172032
|
if (!shouldTransfer) {
|
|
@@ -172021,11 +172094,11 @@ async function transferIn(client2, argv) {
|
|
|
172021
172094
|
);
|
|
172022
172095
|
return 0;
|
|
172023
172096
|
}
|
|
172024
|
-
var
|
|
172097
|
+
var import_chalk82;
|
|
172025
172098
|
var init_transfer_in2 = __esm({
|
|
172026
172099
|
"src/commands/domains/transfer-in.ts"() {
|
|
172027
172100
|
"use strict";
|
|
172028
|
-
|
|
172101
|
+
import_chalk82 = __toESM3(require_source());
|
|
172029
172102
|
init_errors_ts();
|
|
172030
172103
|
init_get_scope();
|
|
172031
172104
|
init_param();
|
|
@@ -172137,7 +172210,7 @@ async function inspect2(client2, argv) {
|
|
|
172137
172210
|
telemetry2.trackCliArgumentDomain(domainName);
|
|
172138
172211
|
if (args2.length !== 1) {
|
|
172139
172212
|
output_manager_default.error(
|
|
172140
|
-
`Invalid number of arguments. Usage: ${
|
|
172213
|
+
`Invalid number of arguments. Usage: ${import_chalk83.default.cyan(
|
|
172141
172214
|
`${getCommandName("domains inspect <domain>")}`
|
|
172142
172215
|
)}`
|
|
172143
172216
|
);
|
|
@@ -172146,7 +172219,7 @@ async function inspect2(client2, argv) {
|
|
|
172146
172219
|
output_manager_default.debug(`Fetching domain info`);
|
|
172147
172220
|
const { contextName } = await getScope(client2);
|
|
172148
172221
|
output_manager_default.spinner(
|
|
172149
|
-
`Fetching Domain ${domainName} under ${
|
|
172222
|
+
`Fetching Domain ${domainName} under ${import_chalk83.default.bold(contextName)}`
|
|
172150
172223
|
);
|
|
172151
172224
|
const information = await fetchInformation({
|
|
172152
172225
|
client: client2,
|
|
@@ -172158,38 +172231,38 @@ async function inspect2(client2, argv) {
|
|
|
172158
172231
|
}
|
|
172159
172232
|
const { domain, projects, renewalPrice, domainConfig } = information;
|
|
172160
172233
|
output_manager_default.log(
|
|
172161
|
-
`Domain ${domainName} found under ${
|
|
172234
|
+
`Domain ${domainName} found under ${import_chalk83.default.bold(contextName)} ${import_chalk83.default.gray(
|
|
172162
172235
|
inspectStamp()
|
|
172163
172236
|
)}`
|
|
172164
172237
|
);
|
|
172165
172238
|
output_manager_default.print("\n");
|
|
172166
|
-
output_manager_default.print(
|
|
172167
|
-
output_manager_default.print(` ${
|
|
172239
|
+
output_manager_default.print(import_chalk83.default.bold(" General\n\n"));
|
|
172240
|
+
output_manager_default.print(` ${import_chalk83.default.cyan("Name")} ${domain.name}
|
|
172168
172241
|
`);
|
|
172169
172242
|
output_manager_default.print(
|
|
172170
|
-
` ${
|
|
172243
|
+
` ${import_chalk83.default.cyan("Registrar")} ${getDomainRegistrar(domain)}
|
|
172171
172244
|
`
|
|
172172
172245
|
);
|
|
172173
172246
|
output_manager_default.print(
|
|
172174
|
-
` ${
|
|
172247
|
+
` ${import_chalk83.default.cyan("Expiration Date")} ${formatDate(domain.expiresAt)}
|
|
172175
172248
|
`
|
|
172176
172249
|
);
|
|
172177
172250
|
output_manager_default.print(
|
|
172178
|
-
` ${
|
|
172251
|
+
` ${import_chalk83.default.cyan("Creator")} ${domain.creator.username}
|
|
172179
172252
|
`
|
|
172180
172253
|
);
|
|
172181
172254
|
output_manager_default.print(
|
|
172182
|
-
` ${
|
|
172255
|
+
` ${import_chalk83.default.cyan("Created At")} ${formatDate(domain.createdAt)}
|
|
172183
172256
|
`
|
|
172184
172257
|
);
|
|
172185
|
-
output_manager_default.print(` ${
|
|
172258
|
+
output_manager_default.print(` ${import_chalk83.default.cyan("Edge Network")} yes
|
|
172186
172259
|
`);
|
|
172187
172260
|
output_manager_default.print(
|
|
172188
|
-
` ${
|
|
172261
|
+
` ${import_chalk83.default.cyan("Renewal Price")} ${domain.boughtAt && renewalPrice ? `$${renewalPrice} USD` : import_chalk83.default.gray("-")}
|
|
172189
172262
|
`
|
|
172190
172263
|
);
|
|
172191
172264
|
output_manager_default.print("\n");
|
|
172192
|
-
output_manager_default.print(
|
|
172265
|
+
output_manager_default.print(import_chalk83.default.bold(" Nameservers\n\n"));
|
|
172193
172266
|
output_manager_default.print(
|
|
172194
172267
|
`${formatNSTable(domain.intendedNameservers, domain.nameservers, {
|
|
172195
172268
|
extraSpace: " "
|
|
@@ -172198,7 +172271,7 @@ async function inspect2(client2, argv) {
|
|
|
172198
172271
|
);
|
|
172199
172272
|
output_manager_default.print("\n");
|
|
172200
172273
|
if (Array.isArray(projects) && projects.length > 0) {
|
|
172201
|
-
output_manager_default.print(
|
|
172274
|
+
output_manager_default.print(import_chalk83.default.bold(" Projects\n"));
|
|
172202
172275
|
const table2 = formatTable(
|
|
172203
172276
|
["Project", "Domains"],
|
|
172204
172277
|
["l", "l"],
|
|
@@ -172228,11 +172301,11 @@ async function inspect2(client2, argv) {
|
|
|
172228
172301
|
null
|
|
172229
172302
|
);
|
|
172230
172303
|
output_manager_default.print(
|
|
172231
|
-
` ${
|
|
172304
|
+
` ${import_chalk83.default.grey("a)")} Set the following record on your DNS provider to continue: ${code(`A ${domainName} 76.76.21.21`)} ${import_chalk83.default.grey("[recommended]")}
|
|
172232
172305
|
`
|
|
172233
172306
|
);
|
|
172234
172307
|
output_manager_default.print(
|
|
172235
|
-
` ${
|
|
172308
|
+
` ${import_chalk83.default.grey("b)")} Change your Domains's nameservers to the intended set detailed above.
|
|
172236
172309
|
|
|
172237
172310
|
`
|
|
172238
172311
|
);
|
|
@@ -172291,11 +172364,11 @@ async function fetchInformation({
|
|
|
172291
172364
|
domainConfig
|
|
172292
172365
|
};
|
|
172293
172366
|
}
|
|
172294
|
-
var
|
|
172367
|
+
var import_chalk83;
|
|
172295
172368
|
var init_inspect2 = __esm({
|
|
172296
172369
|
"src/commands/domains/inspect.ts"() {
|
|
172297
172370
|
"use strict";
|
|
172298
|
-
|
|
172371
|
+
import_chalk83 = __toESM3(require_source());
|
|
172299
172372
|
init_errors_ts();
|
|
172300
172373
|
init_stamp();
|
|
172301
172374
|
init_format_date();
|
|
@@ -172374,21 +172447,21 @@ async function ls4(client2, argv) {
|
|
|
172374
172447
|
const lsStamp = stamp_default();
|
|
172375
172448
|
if (args2.length !== 0) {
|
|
172376
172449
|
output_manager_default.error(
|
|
172377
|
-
`Invalid number of arguments. Usage: ${
|
|
172450
|
+
`Invalid number of arguments. Usage: ${import_chalk84.default.cyan(
|
|
172378
172451
|
`${getCommandName("domains ls")}`
|
|
172379
172452
|
)}`
|
|
172380
172453
|
);
|
|
172381
172454
|
return 1;
|
|
172382
172455
|
}
|
|
172383
|
-
output_manager_default.spinner(`Fetching Domains under ${
|
|
172456
|
+
output_manager_default.spinner(`Fetching Domains under ${import_chalk84.default.bold(contextName)}`);
|
|
172384
172457
|
const { domains: domains2, pagination } = await getDomains(
|
|
172385
172458
|
client2,
|
|
172386
172459
|
...paginationOptions
|
|
172387
172460
|
);
|
|
172388
172461
|
output_manager_default.log(
|
|
172389
|
-
`${(0, import_pluralize8.default)("Domain", domains2.length, true)} found under ${
|
|
172462
|
+
`${(0, import_pluralize8.default)("Domain", domains2.length, true)} found under ${import_chalk84.default.bold(
|
|
172390
172463
|
contextName
|
|
172391
|
-
)} ${
|
|
172464
|
+
)} ${import_chalk84.default.gray(lsStamp())}`
|
|
172392
172465
|
);
|
|
172393
172466
|
if (domains2.length > 0) {
|
|
172394
172467
|
output_manager_default.print(
|
|
@@ -172417,7 +172490,7 @@ function formatDomainsTable(domains2) {
|
|
|
172417
172490
|
isDomainExternal(domain) ? "Third Party" : "Vercel",
|
|
172418
172491
|
expiration,
|
|
172419
172492
|
domain.creator.username,
|
|
172420
|
-
|
|
172493
|
+
import_chalk84.default.gray(age)
|
|
172421
172494
|
];
|
|
172422
172495
|
});
|
|
172423
172496
|
return formatTable(
|
|
@@ -172426,12 +172499,12 @@ function formatDomainsTable(domains2) {
|
|
|
172426
172499
|
[{ rows }]
|
|
172427
172500
|
);
|
|
172428
172501
|
}
|
|
172429
|
-
var import_ms18,
|
|
172502
|
+
var import_ms18, import_chalk84, import_pluralize8;
|
|
172430
172503
|
var init_ls7 = __esm({
|
|
172431
172504
|
"src/commands/domains/ls.ts"() {
|
|
172432
172505
|
"use strict";
|
|
172433
172506
|
import_ms18 = __toESM3(require_ms());
|
|
172434
|
-
|
|
172507
|
+
import_chalk84 = __toESM3(require_source());
|
|
172435
172508
|
import_pluralize8 = __toESM3(require_pluralize());
|
|
172436
172509
|
init_get_domains();
|
|
172437
172510
|
init_get_scope();
|
|
@@ -172580,7 +172653,7 @@ async function rm4(client2, argv) {
|
|
|
172580
172653
|
const { contextName } = await getScope(client2);
|
|
172581
172654
|
if (args2.length !== 1) {
|
|
172582
172655
|
output_manager_default.error(
|
|
172583
|
-
`Invalid number of arguments. Usage: ${
|
|
172656
|
+
`Invalid number of arguments. Usage: ${import_chalk85.default.cyan(
|
|
172584
172657
|
`${getCommandName("domains rm <domain>")}`
|
|
172585
172658
|
)}`
|
|
172586
172659
|
);
|
|
@@ -172589,14 +172662,14 @@ async function rm4(client2, argv) {
|
|
|
172589
172662
|
const domain = await getDomainByName(client2, contextName, domainName);
|
|
172590
172663
|
if (domain instanceof DomainNotFound || domain.name !== domainName) {
|
|
172591
172664
|
output_manager_default.error(
|
|
172592
|
-
`Domain not found by "${domainName}" under ${
|
|
172665
|
+
`Domain not found by "${domainName}" under ${import_chalk85.default.bold(contextName)}`
|
|
172593
172666
|
);
|
|
172594
172667
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
172595
172668
|
return 1;
|
|
172596
172669
|
}
|
|
172597
172670
|
if (domain instanceof DomainPermissionDenied) {
|
|
172598
172671
|
output_manager_default.error(
|
|
172599
|
-
`You don't have access to the domain ${domainName} under ${
|
|
172672
|
+
`You don't have access to the domain ${domainName} under ${import_chalk85.default.bold(
|
|
172600
172673
|
contextName
|
|
172601
172674
|
)}`
|
|
172602
172675
|
);
|
|
@@ -172656,15 +172729,15 @@ async function removeDomain(client2, contextName, skipConfirmation, domain, alia
|
|
|
172656
172729
|
domain.name
|
|
172657
172730
|
);
|
|
172658
172731
|
if (removeResult instanceof DomainNotFound) {
|
|
172659
|
-
output_manager_default.error(`Domain not found under ${
|
|
172732
|
+
output_manager_default.error(`Domain not found under ${import_chalk85.default.bold(contextName)}`);
|
|
172660
172733
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
172661
172734
|
return 1;
|
|
172662
172735
|
}
|
|
172663
172736
|
if (removeResult instanceof DomainPermissionDenied) {
|
|
172664
172737
|
output_manager_default.error(
|
|
172665
|
-
`You don't have permissions over domain ${
|
|
172738
|
+
`You don't have permissions over domain ${import_chalk85.default.underline(
|
|
172666
172739
|
removeResult.meta.domain
|
|
172667
|
-
)} under ${
|
|
172740
|
+
)} under ${import_chalk85.default.bold(removeResult.meta.context)}.`
|
|
172668
172741
|
);
|
|
172669
172742
|
return 1;
|
|
172670
172743
|
}
|
|
@@ -172706,21 +172779,21 @@ async function removeDomain(client2, contextName, skipConfirmation, domain, alia
|
|
|
172706
172779
|
);
|
|
172707
172780
|
if (aliases.length > 0) {
|
|
172708
172781
|
output_manager_default.warn(
|
|
172709
|
-
`This domain's ${
|
|
172782
|
+
`This domain's ${import_chalk85.default.bold(
|
|
172710
172783
|
(0, import_pluralize9.default)("alias", aliases.length, true)
|
|
172711
172784
|
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
|
172712
172785
|
);
|
|
172713
172786
|
}
|
|
172714
172787
|
if (certs.length > 0) {
|
|
172715
172788
|
output_manager_default.warn(
|
|
172716
|
-
`This domain's ${
|
|
172789
|
+
`This domain's ${import_chalk85.default.bold(
|
|
172717
172790
|
(0, import_pluralize9.default)("certificate", certs.length, true)
|
|
172718
172791
|
)} will be removed. Run ${getCommandName(`cert ls`)} to list them.`
|
|
172719
172792
|
);
|
|
172720
172793
|
}
|
|
172721
172794
|
if (suffix2) {
|
|
172722
172795
|
output_manager_default.warn(
|
|
172723
|
-
`The ${
|
|
172796
|
+
`The ${import_chalk85.default.bold(`custom suffix`)} associated with this domain.`
|
|
172724
172797
|
);
|
|
172725
172798
|
}
|
|
172726
172799
|
if (!skipConfirmation && !await client2.input.confirm(
|
|
@@ -172741,14 +172814,14 @@ async function removeDomain(client2, contextName, skipConfirmation, domain, alia
|
|
|
172741
172814
|
attempt + 1
|
|
172742
172815
|
);
|
|
172743
172816
|
}
|
|
172744
|
-
output_manager_default.success(`Domain ${
|
|
172817
|
+
output_manager_default.success(`Domain ${import_chalk85.default.bold(domain.name)} removed ${removeStamp()}`);
|
|
172745
172818
|
return 0;
|
|
172746
172819
|
}
|
|
172747
|
-
var
|
|
172820
|
+
var import_chalk85, import_pluralize9;
|
|
172748
172821
|
var init_rm6 = __esm({
|
|
172749
172822
|
"src/commands/domains/rm.ts"() {
|
|
172750
172823
|
"use strict";
|
|
172751
|
-
|
|
172824
|
+
import_chalk85 = __toESM3(require_source());
|
|
172752
172825
|
import_pluralize9 = __toESM3(require_pluralize());
|
|
172753
172826
|
init_errors_ts();
|
|
172754
172827
|
init_delete_cert_by_id();
|
|
@@ -172887,15 +172960,15 @@ async function move2(client2, argv) {
|
|
|
172887
172960
|
}
|
|
172888
172961
|
const domain = await getDomainByName(client2, contextName, domainName);
|
|
172889
172962
|
if (domain instanceof DomainNotFound) {
|
|
172890
|
-
output_manager_default.error(`Domain not found under ${
|
|
172963
|
+
output_manager_default.error(`Domain not found under ${import_chalk86.default.bold(contextName)}`);
|
|
172891
172964
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
172892
172965
|
return 1;
|
|
172893
172966
|
}
|
|
172894
172967
|
if (domain instanceof DomainPermissionDenied) {
|
|
172895
172968
|
output_manager_default.error(
|
|
172896
|
-
`You don't have permissions over domain ${
|
|
172969
|
+
`You don't have permissions over domain ${import_chalk86.default.underline(
|
|
172897
172970
|
domain.meta.domain
|
|
172898
|
-
)} under ${
|
|
172971
|
+
)} under ${import_chalk86.default.bold(domain.meta.context)}.`
|
|
172899
172972
|
);
|
|
172900
172973
|
return 1;
|
|
172901
172974
|
}
|
|
@@ -172925,7 +172998,7 @@ async function move2(client2, argv) {
|
|
|
172925
172998
|
const aliases = await getDomainAliases(client2, domainName);
|
|
172926
172999
|
if (aliases.length > 0) {
|
|
172927
173000
|
output_manager_default.warn(
|
|
172928
|
-
`This domain's ${
|
|
173001
|
+
`This domain's ${import_chalk86.default.bold(
|
|
172929
173002
|
(0, import_pluralize10.default)("alias", aliases.length, true)
|
|
172930
173003
|
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
|
172931
173004
|
);
|
|
@@ -172966,21 +173039,21 @@ async function move2(client2, argv) {
|
|
|
172966
173039
|
return 1;
|
|
172967
173040
|
}
|
|
172968
173041
|
if (moveTokenResult instanceof DomainNotFound) {
|
|
172969
|
-
output_manager_default.error(`Domain not found under ${
|
|
173042
|
+
output_manager_default.error(`Domain not found under ${import_chalk86.default.bold(contextName)}`);
|
|
172970
173043
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
172971
173044
|
return 1;
|
|
172972
173045
|
}
|
|
172973
173046
|
if (moveTokenResult instanceof DomainPermissionDenied) {
|
|
172974
173047
|
output_manager_default.error(
|
|
172975
|
-
`You don't have permissions over domain ${
|
|
173048
|
+
`You don't have permissions over domain ${import_chalk86.default.underline(
|
|
172976
173049
|
moveTokenResult.meta.domain
|
|
172977
|
-
)} under ${
|
|
173050
|
+
)} under ${import_chalk86.default.bold(moveTokenResult.meta.context)}.`
|
|
172978
173051
|
);
|
|
172979
173052
|
return 1;
|
|
172980
173053
|
}
|
|
172981
173054
|
if (moveTokenResult instanceof InvalidMoveDestination) {
|
|
172982
173055
|
output_manager_default.error(
|
|
172983
|
-
`Destination ${
|
|
173056
|
+
`Destination ${import_chalk86.default.bold(
|
|
172984
173057
|
destination
|
|
172985
173058
|
)} is invalid. Please supply a valid username, email, team slug, user id, or team id.`
|
|
172986
173059
|
);
|
|
@@ -173025,11 +173098,11 @@ async function findDestinationMatch(destination, user, teams2) {
|
|
|
173025
173098
|
}
|
|
173026
173099
|
return null;
|
|
173027
173100
|
}
|
|
173028
|
-
var
|
|
173101
|
+
var import_chalk86, import_pluralize10;
|
|
173029
173102
|
var init_move2 = __esm({
|
|
173030
173103
|
"src/commands/domains/move.ts"() {
|
|
173031
173104
|
"use strict";
|
|
173032
|
-
|
|
173105
|
+
import_chalk86 = __toESM3(require_source());
|
|
173033
173106
|
import_pluralize10 = __toESM3(require_pluralize());
|
|
173034
173107
|
init_errors_ts();
|
|
173035
173108
|
init_get_scope();
|
|
@@ -173393,6 +173466,11 @@ var init_add7 = __esm({
|
|
|
173393
173466
|
this.trackCliFlag("force");
|
|
173394
173467
|
}
|
|
173395
173468
|
}
|
|
173469
|
+
trackCliFlagGuidance(guidance2) {
|
|
173470
|
+
if (guidance2) {
|
|
173471
|
+
this.trackCliFlag("guidance");
|
|
173472
|
+
}
|
|
173473
|
+
}
|
|
173396
173474
|
};
|
|
173397
173475
|
}
|
|
173398
173476
|
});
|
|
@@ -173420,6 +173498,7 @@ async function add4(client2, argv) {
|
|
|
173420
173498
|
telemetryClient.trackCliArgumentGitBranch(envGitBranch);
|
|
173421
173499
|
telemetryClient.trackCliFlagSensitive(opts["--sensitive"]);
|
|
173422
173500
|
telemetryClient.trackCliFlagForce(opts["--force"]);
|
|
173501
|
+
telemetryClient.trackCliFlagGuidance(opts["--guidance"]);
|
|
173423
173502
|
if (args2.length > 3) {
|
|
173424
173503
|
output_manager_default.error(
|
|
173425
173504
|
`Invalid number of arguments. Usage: ${getCommandName(
|
|
@@ -173543,20 +173622,24 @@ async function add4(client2, argv) {
|
|
|
173543
173622
|
}
|
|
173544
173623
|
output_manager_default.print(
|
|
173545
173624
|
`${prependEmoji(
|
|
173546
|
-
`${opts["--force"] ? "Overrode" : "Added"} Environment Variable ${
|
|
173625
|
+
`${opts["--force"] ? "Overrode" : "Added"} Environment Variable ${import_chalk87.default.bold(envName)} to Project ${import_chalk87.default.bold(
|
|
173547
173626
|
project.name
|
|
173548
|
-
)} ${
|
|
173627
|
+
)} ${import_chalk87.default.gray(addStamp())}`,
|
|
173549
173628
|
emoji("success")
|
|
173550
173629
|
)}
|
|
173551
173630
|
`
|
|
173552
173631
|
);
|
|
173632
|
+
const guidanceMode = parsedArgs.flags["--guidance"] ?? await (0, import_detect_agent2.determineAgent)() !== false;
|
|
173633
|
+
if (guidanceMode) {
|
|
173634
|
+
suggestNextCommands([getCommandName(`env ls`), getCommandName(`env pull`)]);
|
|
173635
|
+
}
|
|
173553
173636
|
return 0;
|
|
173554
173637
|
}
|
|
173555
|
-
var
|
|
173638
|
+
var import_chalk87, import_detect_agent2;
|
|
173556
173639
|
var init_add8 = __esm({
|
|
173557
173640
|
"src/commands/env/add.ts"() {
|
|
173558
173641
|
"use strict";
|
|
173559
|
-
|
|
173642
|
+
import_chalk87 = __toESM3(require_source());
|
|
173560
173643
|
init_stamp();
|
|
173561
173644
|
init_add_env_record();
|
|
173562
173645
|
init_get_env_records();
|
|
@@ -173575,6 +173658,8 @@ var init_add8 = __esm({
|
|
|
173575
173658
|
init_error2();
|
|
173576
173659
|
init_command10();
|
|
173577
173660
|
init_link2();
|
|
173661
|
+
import_detect_agent2 = require("@vercel/detect-agent");
|
|
173662
|
+
init_suggest_next_commands();
|
|
173578
173663
|
}
|
|
173579
173664
|
});
|
|
173580
173665
|
|
|
@@ -173591,7 +173676,7 @@ var init_ellipsis = __esm({
|
|
|
173591
173676
|
// src/util/target/format-environment.ts
|
|
173592
173677
|
function formatEnvironment(orgSlug, projectSlug, environment) {
|
|
173593
173678
|
const projectUrl = `https://vercel.com/${orgSlug}/${projectSlug}`;
|
|
173594
|
-
const boldName =
|
|
173679
|
+
const boldName = import_chalk88.default.bold(
|
|
173595
173680
|
STANDARD_ENVIRONMENTS.includes(environment.slug) ? (0, import_title4.default)(environment.slug) : environment.slug
|
|
173596
173681
|
);
|
|
173597
173682
|
return output_manager_default.link(
|
|
@@ -173600,11 +173685,11 @@ function formatEnvironment(orgSlug, projectSlug, environment) {
|
|
|
173600
173685
|
{ fallback: () => boldName, color: false }
|
|
173601
173686
|
);
|
|
173602
173687
|
}
|
|
173603
|
-
var
|
|
173688
|
+
var import_chalk88, import_title4;
|
|
173604
173689
|
var init_format_environment = __esm({
|
|
173605
173690
|
"src/util/target/format-environment.ts"() {
|
|
173606
173691
|
"use strict";
|
|
173607
|
-
|
|
173692
|
+
import_chalk88 = __toESM3(require_source());
|
|
173608
173693
|
init_output_manager();
|
|
173609
173694
|
init_standard_environments();
|
|
173610
173695
|
import_title4 = __toESM3(require_lib4());
|
|
@@ -173658,6 +173743,11 @@ var init_ls8 = __esm({
|
|
|
173658
173743
|
});
|
|
173659
173744
|
}
|
|
173660
173745
|
}
|
|
173746
|
+
trackCliFlagGuidance(guidance2) {
|
|
173747
|
+
if (guidance2) {
|
|
173748
|
+
this.trackCliFlag("guidance");
|
|
173749
|
+
}
|
|
173750
|
+
}
|
|
173661
173751
|
};
|
|
173662
173752
|
}
|
|
173663
173753
|
});
|
|
@@ -173677,7 +173767,7 @@ async function ls5(client2, argv) {
|
|
|
173677
173767
|
printError(err);
|
|
173678
173768
|
return 1;
|
|
173679
173769
|
}
|
|
173680
|
-
const { args: args2 } = parsedArgs;
|
|
173770
|
+
const { args: args2, flags } = parsedArgs;
|
|
173681
173771
|
if (args2.length > 2) {
|
|
173682
173772
|
output_manager_default.error(
|
|
173683
173773
|
`Invalid number of arguments. Usage: ${getCommandName(
|
|
@@ -173689,6 +173779,7 @@ async function ls5(client2, argv) {
|
|
|
173689
173779
|
const [envTarget, envGitBranch] = args2;
|
|
173690
173780
|
telemetryClient.trackCliArgumentEnvironment(envTarget);
|
|
173691
173781
|
telemetryClient.trackCliArgumentGitBranch(envGitBranch);
|
|
173782
|
+
telemetryClient.trackCliFlagGuidance(flags["--guidance"]);
|
|
173692
173783
|
const link4 = await getLinkedProject(client2);
|
|
173693
173784
|
if (link4.status === "error") {
|
|
173694
173785
|
return link4.exitCode;
|
|
@@ -173714,15 +173805,23 @@ async function ls5(client2, argv) {
|
|
|
173714
173805
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
173715
173806
|
if (envs.length === 0) {
|
|
173716
173807
|
output_manager_default.log(
|
|
173717
|
-
`No Environment Variables found for ${projectSlugLink} ${
|
|
173808
|
+
`No Environment Variables found for ${projectSlugLink} ${import_chalk89.default.gray(lsStamp())}`
|
|
173718
173809
|
);
|
|
173719
173810
|
} else {
|
|
173720
173811
|
output_manager_default.log(
|
|
173721
|
-
`Environment Variables found for ${projectSlugLink} ${
|
|
173812
|
+
`Environment Variables found for ${projectSlugLink} ${import_chalk89.default.gray(lsStamp())}`
|
|
173722
173813
|
);
|
|
173723
173814
|
client2.stdout.write(`${getTable(link4, envs, customEnvs)}
|
|
173724
173815
|
`);
|
|
173725
173816
|
}
|
|
173817
|
+
const guidanceMode = parsedArgs.flags["--guidance"] ?? await (0, import_detect_agent3.determineAgent)() !== false;
|
|
173818
|
+
if (guidanceMode) {
|
|
173819
|
+
suggestNextCommands([
|
|
173820
|
+
getCommandName(`env add`),
|
|
173821
|
+
getCommandName("env rm"),
|
|
173822
|
+
getCommandName(`env pull`)
|
|
173823
|
+
]);
|
|
173824
|
+
}
|
|
173726
173825
|
return 0;
|
|
173727
173826
|
}
|
|
173728
173827
|
function getTable(link4, records, customEnvironments) {
|
|
@@ -173742,25 +173841,25 @@ function getRow(link4, env, customEnvironments) {
|
|
|
173742
173841
|
let value;
|
|
173743
173842
|
if (env.type === "plain") {
|
|
173744
173843
|
const singleLineValue = env.value.replace(/\s/g, " ");
|
|
173745
|
-
value =
|
|
173844
|
+
value = import_chalk89.default.gray(ellipsis(singleLineValue, 19));
|
|
173746
173845
|
} else if (env.type === "system") {
|
|
173747
|
-
value =
|
|
173846
|
+
value = import_chalk89.default.gray.italic(env.value);
|
|
173748
173847
|
} else {
|
|
173749
|
-
value =
|
|
173848
|
+
value = import_chalk89.default.gray.italic("Encrypted");
|
|
173750
173849
|
}
|
|
173751
173850
|
const now = Date.now();
|
|
173752
173851
|
return [
|
|
173753
|
-
|
|
173852
|
+
import_chalk89.default.bold(env.key),
|
|
173754
173853
|
value,
|
|
173755
173854
|
formatEnvironments(link4, env, customEnvironments),
|
|
173756
173855
|
env.createdAt ? `${(0, import_ms19.default)(now - env.createdAt)} ago` : ""
|
|
173757
173856
|
];
|
|
173758
173857
|
}
|
|
173759
|
-
var
|
|
173858
|
+
var import_chalk89, import_ms19, import_detect_agent3;
|
|
173760
173859
|
var init_ls9 = __esm({
|
|
173761
173860
|
"src/commands/env/ls.ts"() {
|
|
173762
173861
|
"use strict";
|
|
173763
|
-
|
|
173862
|
+
import_chalk89 = __toESM3(require_source());
|
|
173764
173863
|
import_ms19 = __toESM3(require_ms());
|
|
173765
173864
|
init_format_table();
|
|
173766
173865
|
init_get_env_records();
|
|
@@ -173778,6 +173877,8 @@ var init_ls9 = __esm({
|
|
|
173778
173877
|
init_get_flags_specification();
|
|
173779
173878
|
init_error2();
|
|
173780
173879
|
init_link2();
|
|
173880
|
+
import_detect_agent3 = require("@vercel/detect-agent");
|
|
173881
|
+
init_suggest_next_commands();
|
|
173781
173882
|
}
|
|
173782
173883
|
});
|
|
173783
173884
|
|
|
@@ -173920,7 +174021,7 @@ async function rm5(client2, argv) {
|
|
|
173920
174021
|
link4,
|
|
173921
174022
|
env,
|
|
173922
174023
|
customEnvironments
|
|
173923
|
-
)} in Project ${
|
|
174024
|
+
)} in Project ${import_chalk90.default.bold(project.name)}. Are you sure?`,
|
|
173924
174025
|
false
|
|
173925
174026
|
)) {
|
|
173926
174027
|
output_manager_default.log("Canceled");
|
|
@@ -173939,18 +174040,18 @@ async function rm5(client2, argv) {
|
|
|
173939
174040
|
}
|
|
173940
174041
|
output_manager_default.print(
|
|
173941
174042
|
`${prependEmoji(
|
|
173942
|
-
`Removed Environment Variable ${
|
|
174043
|
+
`Removed Environment Variable ${import_chalk90.default.gray(rmStamp())}`,
|
|
173943
174044
|
emoji("success")
|
|
173944
174045
|
)}
|
|
173945
174046
|
`
|
|
173946
174047
|
);
|
|
173947
174048
|
return 0;
|
|
173948
174049
|
}
|
|
173949
|
-
var
|
|
174050
|
+
var import_chalk90;
|
|
173950
174051
|
var init_rm8 = __esm({
|
|
173951
174052
|
"src/commands/env/rm.ts"() {
|
|
173952
174053
|
"use strict";
|
|
173953
|
-
|
|
174054
|
+
import_chalk90 = __toESM3(require_source());
|
|
173954
174055
|
init_remove_env_record();
|
|
173955
174056
|
init_get_env_records();
|
|
173956
174057
|
init_format_environments();
|
|
@@ -174165,7 +174266,7 @@ async function connect(client2, argv) {
|
|
|
174165
174266
|
const confirm = Boolean(opts["--yes"]);
|
|
174166
174267
|
if (args2.length > 1) {
|
|
174167
174268
|
output_manager_default.error(
|
|
174168
|
-
`Invalid number of arguments. Usage: ${
|
|
174269
|
+
`Invalid number of arguments. Usage: ${import_chalk91.default.cyan(
|
|
174169
174270
|
`${getCommandName("project connect")}`
|
|
174170
174271
|
)}`
|
|
174171
174272
|
);
|
|
@@ -174212,7 +174313,7 @@ async function connect(client2, argv) {
|
|
|
174212
174313
|
}
|
|
174213
174314
|
if (!gitConfig) {
|
|
174214
174315
|
output_manager_default.error(
|
|
174215
|
-
`No local Git repository found. Run ${
|
|
174316
|
+
`No local Git repository found. Run ${import_chalk91.default.cyan(
|
|
174216
174317
|
"`git clone <url>`"
|
|
174217
174318
|
)} to clone a remote Git repository first.`
|
|
174218
174319
|
);
|
|
@@ -174221,7 +174322,7 @@ async function connect(client2, argv) {
|
|
|
174221
174322
|
const remoteUrls = pluckRemoteUrls(gitConfig);
|
|
174222
174323
|
if (!remoteUrls) {
|
|
174223
174324
|
output_manager_default.error(
|
|
174224
|
-
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${
|
|
174325
|
+
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${import_chalk91.default.cyan(
|
|
174225
174326
|
"`git remote --help`"
|
|
174226
174327
|
)} for more details.`
|
|
174227
174328
|
);
|
|
@@ -174265,7 +174366,7 @@ async function connect(client2, argv) {
|
|
|
174265
174366
|
return checkAndConnect;
|
|
174266
174367
|
}
|
|
174267
174368
|
output_manager_default.log(
|
|
174268
|
-
`Connected ${formatProvider(provider)} repository ${
|
|
174369
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk91.default.cyan(repoPath)}!`
|
|
174269
174370
|
);
|
|
174270
174371
|
return 0;
|
|
174271
174372
|
}
|
|
@@ -174302,7 +174403,7 @@ async function connectArg({
|
|
|
174302
174403
|
return connect2;
|
|
174303
174404
|
}
|
|
174304
174405
|
output_manager_default.log(
|
|
174305
|
-
`Connected ${formatProvider(provider)} repository ${
|
|
174406
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk91.default.cyan(repoPath)}!`
|
|
174306
174407
|
);
|
|
174307
174408
|
return 0;
|
|
174308
174409
|
}
|
|
@@ -174344,7 +174445,7 @@ async function connectArgWithLocalGit({
|
|
|
174344
174445
|
return connect2;
|
|
174345
174446
|
}
|
|
174346
174447
|
output_manager_default.log(
|
|
174347
|
-
`Connected ${formatProvider(provider)} repository ${
|
|
174448
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk91.default.cyan(
|
|
174348
174449
|
repoPath
|
|
174349
174450
|
)}!`
|
|
174350
174451
|
);
|
|
@@ -174375,7 +174476,7 @@ async function promptConnectArg({
|
|
|
174375
174476
|
return true;
|
|
174376
174477
|
}
|
|
174377
174478
|
output_manager_default.log(
|
|
174378
|
-
`Found a repository in your local Git Config: ${
|
|
174479
|
+
`Found a repository in your local Git Config: ${import_chalk91.default.cyan(
|
|
174379
174480
|
Object.values(remoteUrls)[0]
|
|
174380
174481
|
)}`
|
|
174381
174482
|
);
|
|
@@ -174422,7 +174523,7 @@ async function checkExistsAndConnect({
|
|
|
174422
174523
|
const isSameRepo = connectedProvider === provider && connectedOrg === gitOrg && connectedRepo === repo;
|
|
174423
174524
|
if (isSameRepo) {
|
|
174424
174525
|
output_manager_default.log(
|
|
174425
|
-
`${
|
|
174526
|
+
`${import_chalk91.default.cyan(connectedRepoPath)} is already connected to your project.`
|
|
174426
174527
|
);
|
|
174427
174528
|
return 1;
|
|
174428
174529
|
}
|
|
@@ -174453,7 +174554,7 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
|
|
|
174453
174554
|
shouldReplaceProject = await client2.input.confirm(
|
|
174454
174555
|
`Looks like you already have a ${formatProvider(
|
|
174455
174556
|
connectedProvider
|
|
174456
|
-
)} repository connected: ${
|
|
174557
|
+
)} repository connected: ${import_chalk91.default.cyan(
|
|
174457
174558
|
connectedRepoPath
|
|
174458
174559
|
)}. Do you want to replace it?`,
|
|
174459
174560
|
true
|
|
@@ -174468,7 +174569,7 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
|
174468
174569
|
const choices = [];
|
|
174469
174570
|
for (const [urlKey, urlValue] of Object.entries(remoteUrls)) {
|
|
174470
174571
|
choices.push({
|
|
174471
|
-
name: `${urlValue} ${
|
|
174572
|
+
name: `${urlValue} ${import_chalk91.default.gray(`(${urlKey})`)}`,
|
|
174472
174573
|
value: urlValue,
|
|
174473
174574
|
short: urlKey
|
|
174474
174575
|
});
|
|
@@ -174478,11 +174579,11 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
|
174478
174579
|
choices
|
|
174479
174580
|
});
|
|
174480
174581
|
}
|
|
174481
|
-
var
|
|
174582
|
+
var import_chalk91, import_path39;
|
|
174482
174583
|
var init_connect2 = __esm({
|
|
174483
174584
|
"src/commands/git/connect.ts"() {
|
|
174484
174585
|
"use strict";
|
|
174485
|
-
|
|
174586
|
+
import_chalk91 = __toESM3(require_source());
|
|
174486
174587
|
import_path39 = require("path");
|
|
174487
174588
|
init_create_git_meta();
|
|
174488
174589
|
init_list();
|
|
@@ -174546,7 +174647,7 @@ async function disconnect(client2, argv) {
|
|
|
174546
174647
|
}
|
|
174547
174648
|
if (args2.length !== 0) {
|
|
174548
174649
|
output_manager_default.error(
|
|
174549
|
-
`Invalid number of arguments. Usage: ${
|
|
174650
|
+
`Invalid number of arguments. Usage: ${import_chalk92.default.cyan(
|
|
174550
174651
|
`${getCommandName("project disconnect")}`
|
|
174551
174652
|
)}`
|
|
174552
174653
|
);
|
|
@@ -174568,14 +174669,14 @@ async function disconnect(client2, argv) {
|
|
|
174568
174669
|
`
|
|
174569
174670
|
);
|
|
174570
174671
|
const confirmDisconnect = autoConfirm || await client2.input.confirm(
|
|
174571
|
-
`Are you sure you want to disconnect ${
|
|
174672
|
+
`Are you sure you want to disconnect ${import_chalk92.default.cyan(
|
|
174572
174673
|
`${linkOrg}/${repo}`
|
|
174573
174674
|
)} from your project?`,
|
|
174574
174675
|
false
|
|
174575
174676
|
);
|
|
174576
174677
|
if (confirmDisconnect) {
|
|
174577
174678
|
await disconnectGitProvider(client2, org, project.id);
|
|
174578
|
-
output_manager_default.log(`Disconnected ${
|
|
174679
|
+
output_manager_default.log(`Disconnected ${import_chalk92.default.cyan(`${linkOrg}/${repo}`)}.`);
|
|
174579
174680
|
} else {
|
|
174580
174681
|
output_manager_default.log("Canceled");
|
|
174581
174682
|
}
|
|
@@ -174589,11 +174690,11 @@ async function disconnect(client2, argv) {
|
|
|
174589
174690
|
}
|
|
174590
174691
|
return 0;
|
|
174591
174692
|
}
|
|
174592
|
-
var
|
|
174693
|
+
var import_chalk92;
|
|
174593
174694
|
var init_disconnect2 = __esm({
|
|
174594
174695
|
"src/commands/git/disconnect.ts"() {
|
|
174595
174696
|
"use strict";
|
|
174596
|
-
|
|
174697
|
+
import_chalk92 = __toESM3(require_source());
|
|
174597
174698
|
init_pkg_name();
|
|
174598
174699
|
init_connect_git_provider();
|
|
174599
174700
|
init_output_manager();
|
|
@@ -174697,17 +174798,17 @@ var init_git2 = __esm({
|
|
|
174697
174798
|
// src/commands/guidance/status.ts
|
|
174698
174799
|
async function status(client2) {
|
|
174699
174800
|
const enabled = client2.config.guidance?.enabled !== false;
|
|
174700
|
-
const status3 = enabled ?
|
|
174801
|
+
const status3 = enabled ? import_chalk93.default.green("Enabled") : import_chalk93.default.red("Disabled");
|
|
174701
174802
|
output_manager_default.print("\n");
|
|
174702
|
-
output_manager_default.log(`${
|
|
174803
|
+
output_manager_default.log(`${import_chalk93.default.bold("Guidance status")}: ${status3}`);
|
|
174703
174804
|
output_manager_default.print("\n");
|
|
174704
174805
|
return 0;
|
|
174705
174806
|
}
|
|
174706
|
-
var
|
|
174807
|
+
var import_chalk93;
|
|
174707
174808
|
var init_status = __esm({
|
|
174708
174809
|
"src/commands/guidance/status.ts"() {
|
|
174709
174810
|
"use strict";
|
|
174710
|
-
|
|
174811
|
+
import_chalk93 = __toESM3(require_source());
|
|
174711
174812
|
init_output_manager();
|
|
174712
174813
|
}
|
|
174713
174814
|
});
|
|
@@ -175065,9 +175166,9 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
|
175065
175166
|
extractor.on("finish", resolve13);
|
|
175066
175167
|
res.body.pipe(extractor);
|
|
175067
175168
|
});
|
|
175068
|
-
const successLog = `Initialized "${
|
|
175169
|
+
const successLog = `Initialized "${import_chalk94.default.bold(
|
|
175069
175170
|
name
|
|
175070
|
-
)}" example in ${
|
|
175171
|
+
)}" example in ${import_chalk94.default.bold(humanizePath(folder))}.`;
|
|
175071
175172
|
const folderRel = import_node_path4.default.relative(client2.cwd, folder);
|
|
175072
175173
|
const deployHint = folderRel === "" ? list_item_default(`To deploy, run ${getCommandName()}.`) : list_item_default(
|
|
175073
175174
|
`To deploy, ${cmd(
|
|
@@ -175087,14 +175188,14 @@ function prepareFolder(cwd, folder, force) {
|
|
|
175087
175188
|
if (import_node_fs2.default.existsSync(dest)) {
|
|
175088
175189
|
if (!import_node_fs2.default.lstatSync(dest).isDirectory()) {
|
|
175089
175190
|
throw new Error(
|
|
175090
|
-
`Destination path "${
|
|
175191
|
+
`Destination path "${import_chalk94.default.bold(
|
|
175091
175192
|
folder
|
|
175092
175193
|
)}" already exists and is not a directory.`
|
|
175093
175194
|
);
|
|
175094
175195
|
}
|
|
175095
175196
|
if (!force && import_node_fs2.default.readdirSync(dest).length !== 0) {
|
|
175096
175197
|
throw new Error(
|
|
175097
|
-
`Destination path "${
|
|
175198
|
+
`Destination path "${import_chalk94.default.bold(
|
|
175098
175199
|
folder
|
|
175099
175200
|
)}" already exists and is not an empty directory. You may use ${cmd(
|
|
175100
175201
|
"--force"
|
|
@@ -175105,14 +175206,14 @@ function prepareFolder(cwd, folder, force) {
|
|
|
175105
175206
|
try {
|
|
175106
175207
|
import_node_fs2.default.mkdirSync(dest);
|
|
175107
175208
|
} catch (e2) {
|
|
175108
|
-
throw new Error(`Could not create directory "${
|
|
175209
|
+
throw new Error(`Could not create directory "${import_chalk94.default.bold(folder)}".`);
|
|
175109
175210
|
}
|
|
175110
175211
|
}
|
|
175111
175212
|
return dest;
|
|
175112
175213
|
}
|
|
175113
175214
|
async function guess(client2, exampleList, name) {
|
|
175114
175215
|
const GuessError = new Error(
|
|
175115
|
-
`No example found for ${
|
|
175216
|
+
`No example found for ${import_chalk94.default.bold(name)}, run ${getCommandName(
|
|
175116
175217
|
"init"
|
|
175117
175218
|
)} to see the list of available examples.`
|
|
175118
175219
|
);
|
|
@@ -175121,21 +175222,21 @@ async function guess(client2, exampleList, name) {
|
|
|
175121
175222
|
}
|
|
175122
175223
|
const found = did_you_mean_default(name, exampleList, 0.7);
|
|
175123
175224
|
if (typeof found === "string") {
|
|
175124
|
-
if (await client2.input.confirm(`Did you mean ${
|
|
175225
|
+
if (await client2.input.confirm(`Did you mean ${import_chalk94.default.bold(found)}?`, false)) {
|
|
175125
175226
|
return found;
|
|
175126
175227
|
}
|
|
175127
175228
|
} else {
|
|
175128
175229
|
throw GuessError;
|
|
175129
175230
|
}
|
|
175130
175231
|
}
|
|
175131
|
-
var import_node_fs2, import_node_path4, import_tar_fs,
|
|
175232
|
+
var import_node_fs2, import_node_path4, import_tar_fs, import_chalk94, EXAMPLE_API;
|
|
175132
175233
|
var init_init = __esm({
|
|
175133
175234
|
"src/commands/init/init.ts"() {
|
|
175134
175235
|
"use strict";
|
|
175135
175236
|
import_node_fs2 = __toESM3(require("fs"));
|
|
175136
175237
|
import_node_path4 = __toESM3(require("path"));
|
|
175137
175238
|
import_tar_fs = __toESM3(require_tar_fs());
|
|
175138
|
-
|
|
175239
|
+
import_chalk94 = __toESM3(require_source());
|
|
175139
175240
|
init_list();
|
|
175140
175241
|
init_list_item();
|
|
175141
175242
|
init_humanize_path();
|
|
@@ -175251,11 +175352,11 @@ var init_build_state = __esm({
|
|
|
175251
175352
|
});
|
|
175252
175353
|
|
|
175253
175354
|
// src/util/output/builds.ts
|
|
175254
|
-
var
|
|
175355
|
+
var import_chalk95, import_bytes8, padding, MAX_BUILD_GROUPS, MAX_OUTPUTS_PER_GROUP, hasOutput, getCommonPath, styleBuild, styleHiddenBuilds, styleOutput, getDirPath, sortByEntrypoint, groupBuilds, builds_default;
|
|
175255
175356
|
var init_builds = __esm({
|
|
175256
175357
|
"src/util/output/builds.ts"() {
|
|
175257
175358
|
"use strict";
|
|
175258
|
-
|
|
175359
|
+
import_chalk95 = __toESM3(require_source());
|
|
175259
175360
|
import_bytes8 = __toESM3(require_bytes());
|
|
175260
175361
|
init_build_state();
|
|
175261
175362
|
padding = 8;
|
|
@@ -175284,48 +175385,48 @@ var init_builds = __esm({
|
|
|
175284
175385
|
styleBuild = (build2, times, longestSource) => {
|
|
175285
175386
|
const { entrypoint, id } = build2;
|
|
175286
175387
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
175287
|
-
let pathColor =
|
|
175388
|
+
let pathColor = import_chalk95.default.cyan;
|
|
175288
175389
|
if (isFailed(build2)) {
|
|
175289
|
-
pathColor =
|
|
175390
|
+
pathColor = import_chalk95.default.red;
|
|
175290
175391
|
}
|
|
175291
175392
|
const entry = entrypoint.padEnd(longestSource + padding);
|
|
175292
175393
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
|
175293
|
-
return `${
|
|
175394
|
+
return `${import_chalk95.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
175294
175395
|
};
|
|
175295
175396
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden2 = false) => {
|
|
175296
175397
|
const { id } = buildGroup[0];
|
|
175297
175398
|
const entry = commonPath.padEnd(longestSource + padding);
|
|
175298
175399
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
175299
175400
|
const prefix = isHidden2 === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
|
175300
|
-
let pathColor =
|
|
175401
|
+
let pathColor = import_chalk95.default.cyan;
|
|
175301
175402
|
if (buildGroup.every(isFailed)) {
|
|
175302
|
-
pathColor =
|
|
175403
|
+
pathColor = import_chalk95.default.red;
|
|
175303
175404
|
}
|
|
175304
175405
|
if (isHidden2) {
|
|
175305
|
-
pathColor =
|
|
175406
|
+
pathColor = import_chalk95.default.grey;
|
|
175306
175407
|
}
|
|
175307
|
-
return `${
|
|
175408
|
+
return `${import_chalk95.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
175308
175409
|
};
|
|
175309
175410
|
styleOutput = (output2, readyState, isLast) => {
|
|
175310
175411
|
const { type, path: path11, size, lambda } = output2;
|
|
175311
175412
|
const prefix = type === "lambda" ? "\u03BB " : "";
|
|
175312
|
-
const finalSize = size ? ` ${
|
|
175313
|
-
let color =
|
|
175413
|
+
const finalSize = size ? ` ${import_chalk95.default.grey(`(${(0, import_bytes8.default)(size)})`)}` : "";
|
|
175414
|
+
let color = import_chalk95.default.grey;
|
|
175314
175415
|
let finalRegion = "";
|
|
175315
175416
|
if (isReady({ readyState })) {
|
|
175316
|
-
color =
|
|
175417
|
+
color = import_chalk95.default;
|
|
175317
175418
|
} else if (isFailed({ readyState })) {
|
|
175318
|
-
color =
|
|
175419
|
+
color = import_chalk95.default.red;
|
|
175319
175420
|
}
|
|
175320
175421
|
if (lambda) {
|
|
175321
175422
|
const { deployedTo } = lambda;
|
|
175322
175423
|
if (deployedTo && deployedTo.length > 0) {
|
|
175323
|
-
finalRegion = ` ${
|
|
175424
|
+
finalRegion = ` ${import_chalk95.default.grey(`[${deployedTo.join(", ")}]`)}`;
|
|
175324
175425
|
}
|
|
175325
175426
|
}
|
|
175326
175427
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
|
175327
175428
|
const main18 = prefix + path11 + finalSize + finalRegion;
|
|
175328
|
-
return `${
|
|
175429
|
+
return `${import_chalk95.default.grey(corner)} ${color(main18)}`;
|
|
175329
175430
|
};
|
|
175330
175431
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
|
175331
175432
|
const parts = path11.split("/").slice(0, -1);
|
|
@@ -175457,7 +175558,7 @@ var init_builds = __esm({
|
|
|
175457
175558
|
);
|
|
175458
175559
|
if (outputs.length > MAX_OUTPUTS_PER_GROUP) {
|
|
175459
175560
|
final.push(
|
|
175460
|
-
|
|
175561
|
+
import_chalk95.default.grey(
|
|
175461
175562
|
`\u2514\u2500\u2500 ${outputs.length - MAX_OUTPUTS_PER_GROUP} output items hidden
|
|
175462
175563
|
`
|
|
175463
175564
|
)
|
|
@@ -175505,19 +175606,19 @@ function routes(routes2) {
|
|
|
175505
175606
|
const padding2 = 6;
|
|
175506
175607
|
const space = " ".repeat(padding2);
|
|
175507
175608
|
const destSpace = " ".repeat(longestDest || 10);
|
|
175508
|
-
const arrow =
|
|
175609
|
+
const arrow = import_chalk96.default.grey("->");
|
|
175509
175610
|
for (const item of routes2) {
|
|
175510
175611
|
if ("handle" in item) {
|
|
175511
|
-
toPrint += `${
|
|
175612
|
+
toPrint += `${import_chalk96.default.grey("\u2576")} ${import_chalk96.default.cyan(item.handle)}`;
|
|
175512
175613
|
continue;
|
|
175513
175614
|
}
|
|
175514
175615
|
const { src, dest, status: status3, headers } = item;
|
|
175515
175616
|
const last = routes2.indexOf(item) === routes2.length - 1;
|
|
175516
175617
|
const suffix = last ? "" : `
|
|
175517
175618
|
`;
|
|
175518
|
-
const finalSrc =
|
|
175619
|
+
const finalSrc = import_chalk96.default.cyan(src.padEnd(longestSrc + padding2));
|
|
175519
175620
|
const finalDest = dest ? `${arrow}${space}${dest}` : ` ${space}${destSpace}`;
|
|
175520
|
-
const finalStatus = status3 ?
|
|
175621
|
+
const finalStatus = status3 ? import_chalk96.default.grey(`[${status3}]`) : "";
|
|
175521
175622
|
let finalHeaders = null;
|
|
175522
175623
|
if (headers) {
|
|
175523
175624
|
finalHeaders = `
|
|
@@ -175528,21 +175629,21 @@ function routes(routes2) {
|
|
|
175528
175629
|
const last2 = headerKeys.indexOf(header) === headerKeys.length - 1;
|
|
175529
175630
|
const suffix2 = last2 ? "" : `
|
|
175530
175631
|
`;
|
|
175531
|
-
const prefix2 =
|
|
175632
|
+
const prefix2 = import_chalk96.default.grey(last2 ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500");
|
|
175532
175633
|
finalHeaders += `${prefix2} ${header}: ${value}${suffix2}`;
|
|
175533
175634
|
}
|
|
175534
175635
|
}
|
|
175535
|
-
const prefix =
|
|
175636
|
+
const prefix = import_chalk96.default.grey(finalHeaders ? "\u250C" : "\u2576");
|
|
175536
175637
|
const fill = `${finalSrc}${finalDest}${space}${finalStatus}`;
|
|
175537
175638
|
toPrint += `${prefix} ${fill}${finalHeaders || ""}${suffix}`;
|
|
175538
175639
|
}
|
|
175539
175640
|
return toPrint;
|
|
175540
175641
|
}
|
|
175541
|
-
var
|
|
175642
|
+
var import_chalk96, longestProperty;
|
|
175542
175643
|
var init_routes = __esm({
|
|
175543
175644
|
"src/util/output/routes.ts"() {
|
|
175544
175645
|
"use strict";
|
|
175545
|
-
|
|
175646
|
+
import_chalk96 = __toESM3(require_source());
|
|
175546
175647
|
longestProperty = (routes2, name) => {
|
|
175547
175648
|
const longestItem = routes2.sort((a, b) => {
|
|
175548
175649
|
const aName = a[name];
|
|
@@ -175662,7 +175763,7 @@ async function inspect3(client2) {
|
|
|
175662
175763
|
} catch {
|
|
175663
175764
|
}
|
|
175664
175765
|
output_manager_default.spinner(
|
|
175665
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
|
175766
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk97.default.bold(contextName)}`
|
|
175666
175767
|
);
|
|
175667
175768
|
let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
|
175668
175769
|
let abortController;
|
|
@@ -175689,7 +175790,7 @@ async function inspect3(client2) {
|
|
|
175689
175790
|
}
|
|
175690
175791
|
}
|
|
175691
175792
|
if (withLogs) {
|
|
175692
|
-
print(`${
|
|
175793
|
+
print(`${import_chalk97.default.cyan("status")} ${stateString(deployment.readyState)}
|
|
175693
175794
|
`);
|
|
175694
175795
|
} else {
|
|
175695
175796
|
await printDetails({ deployment, contextName, client: client2, startTimestamp });
|
|
@@ -175702,17 +175803,17 @@ function stateString(s) {
|
|
|
175702
175803
|
switch (s) {
|
|
175703
175804
|
case "INITIALIZING":
|
|
175704
175805
|
case "BUILDING":
|
|
175705
|
-
return
|
|
175806
|
+
return import_chalk97.default.yellow(CIRCLE) + sTitle;
|
|
175706
175807
|
case "ERROR":
|
|
175707
|
-
return
|
|
175808
|
+
return import_chalk97.default.red(CIRCLE) + sTitle;
|
|
175708
175809
|
case "READY":
|
|
175709
|
-
return
|
|
175810
|
+
return import_chalk97.default.green(CIRCLE) + sTitle;
|
|
175710
175811
|
case "QUEUED":
|
|
175711
|
-
return
|
|
175812
|
+
return import_chalk97.default.gray(CIRCLE) + sTitle;
|
|
175712
175813
|
case "CANCELED":
|
|
175713
|
-
return
|
|
175814
|
+
return import_chalk97.default.gray(CIRCLE) + sTitle;
|
|
175714
175815
|
default:
|
|
175715
|
-
return
|
|
175816
|
+
return import_chalk97.default.gray("UNKNOWN");
|
|
175716
175817
|
}
|
|
175717
175818
|
}
|
|
175718
175819
|
async function printDetails({
|
|
@@ -175722,7 +175823,7 @@ async function printDetails({
|
|
|
175722
175823
|
startTimestamp
|
|
175723
175824
|
}) {
|
|
175724
175825
|
output_manager_default.log(
|
|
175725
|
-
`Fetched deployment "${
|
|
175826
|
+
`Fetched deployment "${import_chalk97.default.bold(deployment.url)}" in ${import_chalk97.default.bold(
|
|
175726
175827
|
contextName
|
|
175727
175828
|
)} ${elapsed(Date.now() - startTimestamp)}`
|
|
175728
175829
|
);
|
|
@@ -175738,14 +175839,14 @@ async function printDetails({
|
|
|
175738
175839
|
const { print, link: link4 } = output_manager_default;
|
|
175739
175840
|
const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
|
|
175740
175841
|
print("\n");
|
|
175741
|
-
print(
|
|
175742
|
-
print(` ${
|
|
175842
|
+
print(import_chalk97.default.bold(" General\n\n"));
|
|
175843
|
+
print(` ${import_chalk97.default.cyan("id")} ${id}
|
|
175743
175844
|
`);
|
|
175744
|
-
print(` ${
|
|
175845
|
+
print(` ${import_chalk97.default.cyan("name")} ${name}
|
|
175745
175846
|
`);
|
|
175746
175847
|
const customEnvironmentSlug = deployment.customEnvironment?.slug;
|
|
175747
175848
|
const target = customEnvironmentSlug ?? deployment.target ?? "preview";
|
|
175748
|
-
print(` ${
|
|
175849
|
+
print(` ${import_chalk97.default.cyan("target")} `);
|
|
175749
175850
|
print(
|
|
175750
175851
|
deployment.customEnvironment && deployment.team?.slug ? `${link4(
|
|
175751
175852
|
`${target}`,
|
|
@@ -175755,13 +175856,13 @@ async function printDetails({
|
|
|
175755
175856
|
` : `${target}
|
|
175756
175857
|
`
|
|
175757
175858
|
);
|
|
175758
|
-
print(` ${
|
|
175859
|
+
print(` ${import_chalk97.default.cyan("status")} ${stateString(readyState)}
|
|
175759
175860
|
`);
|
|
175760
|
-
print(` ${
|
|
175861
|
+
print(` ${import_chalk97.default.cyan("url")} https://${url3}
|
|
175761
175862
|
`);
|
|
175762
175863
|
if (createdAt) {
|
|
175763
175864
|
print(
|
|
175764
|
-
` ${
|
|
175865
|
+
` ${import_chalk97.default.cyan("created")} ${new Date(createdAt)} ${elapsed(
|
|
175765
175866
|
Date.now() - createdAt,
|
|
175766
175867
|
true
|
|
175767
175868
|
)}
|
|
@@ -175770,10 +175871,10 @@ async function printDetails({
|
|
|
175770
175871
|
}
|
|
175771
175872
|
print("\n\n");
|
|
175772
175873
|
if (aliases !== void 0 && aliases.length > 0) {
|
|
175773
|
-
print(
|
|
175874
|
+
print(import_chalk97.default.bold(" Aliases\n\n"));
|
|
175774
175875
|
let aliasList = "";
|
|
175775
175876
|
for (const alias2 of aliases) {
|
|
175776
|
-
aliasList += `${
|
|
175877
|
+
aliasList += `${import_chalk97.default.gray("\u2576")} https://${alias2}
|
|
175777
175878
|
`;
|
|
175778
175879
|
}
|
|
175779
175880
|
print(indent_default(aliasList, 4));
|
|
@@ -175785,12 +175886,12 @@ async function printDetails({
|
|
|
175785
175886
|
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
|
175786
175887
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
|
175787
175888
|
}
|
|
175788
|
-
print(
|
|
175889
|
+
print(import_chalk97.default.bold(" Builds\n\n"));
|
|
175789
175890
|
print(indent_default(builds_default(builds, times).toPrint, 4));
|
|
175790
175891
|
print("\n\n");
|
|
175791
175892
|
}
|
|
175792
175893
|
if (Array.isArray(routes2) && routes2.length > 0) {
|
|
175793
|
-
print(
|
|
175894
|
+
print(import_chalk97.default.bold(" Routes\n\n"));
|
|
175794
175895
|
print(indent_default(routes(routes2), 4));
|
|
175795
175896
|
print(`
|
|
175796
175897
|
|
|
@@ -175803,12 +175904,12 @@ function exitCode(state) {
|
|
|
175803
175904
|
}
|
|
175804
175905
|
return 0;
|
|
175805
175906
|
}
|
|
175806
|
-
var import_error_utils28,
|
|
175907
|
+
var import_error_utils28, import_chalk97, import_ms20, import_title6, import_url20;
|
|
175807
175908
|
var init_inspect4 = __esm({
|
|
175808
175909
|
"src/commands/inspect/index.ts"() {
|
|
175809
175910
|
"use strict";
|
|
175810
175911
|
import_error_utils28 = __toESM3(require_dist2());
|
|
175811
|
-
|
|
175912
|
+
import_chalk97 = __toESM3(require_source());
|
|
175812
175913
|
import_ms20 = __toESM3(require_ms());
|
|
175813
175914
|
import_title6 = __toESM3(require_lib4());
|
|
175814
175915
|
import_url20 = require("url");
|
|
@@ -176244,7 +176345,7 @@ async function add5(client2, args2) {
|
|
|
176244
176345
|
}
|
|
176245
176346
|
const installation = teamInstallations[0];
|
|
176246
176347
|
output_manager_default.log(
|
|
176247
|
-
`Installing ${
|
|
176348
|
+
`Installing ${import_chalk98.default.bold(product.name)} by ${import_chalk98.default.bold(integration.name)} under ${import_chalk98.default.bold(contextName)}`
|
|
176248
176349
|
);
|
|
176249
176350
|
const metadataSchema = product.metadataSchema;
|
|
176250
176351
|
const metadataWizard = createMetadataWizard(metadataSchema);
|
|
@@ -176464,16 +176565,16 @@ async function selectBillingPlan(client2, billingPlans) {
|
|
|
176464
176565
|
}
|
|
176465
176566
|
async function confirmProductSelection(client2, product, name, metadata, billingPlan) {
|
|
176466
176567
|
output_manager_default.print("Selected product:\n");
|
|
176467
|
-
output_manager_default.print(`${
|
|
176568
|
+
output_manager_default.print(`${import_chalk98.default.dim(`- ${import_chalk98.default.bold("Name:")} ${name}`)}
|
|
176468
176569
|
`);
|
|
176469
176570
|
for (const [key, value] of Object.entries(metadata)) {
|
|
176470
176571
|
output_manager_default.print(
|
|
176471
|
-
`${
|
|
176572
|
+
`${import_chalk98.default.dim(`- ${import_chalk98.default.bold(`${product.metadataSchema.properties[key]["ui:label"]}:`)} ${value}`)}
|
|
176472
176573
|
`
|
|
176473
176574
|
);
|
|
176474
176575
|
}
|
|
176475
176576
|
output_manager_default.print(
|
|
176476
|
-
`${
|
|
176577
|
+
`${import_chalk98.default.dim(`- ${import_chalk98.default.bold("Plan:")} ${billingPlan.name}`)}
|
|
176477
176578
|
`
|
|
176478
176579
|
);
|
|
176479
176580
|
return client2.input.confirm("Confirm selection?", true);
|
|
@@ -176583,7 +176684,7 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
|
176583
176684
|
]
|
|
176584
176685
|
});
|
|
176585
176686
|
output_manager_default.spinner(
|
|
176586
|
-
`Connecting ${
|
|
176687
|
+
`Connecting ${import_chalk98.default.bold(name)} to ${import_chalk98.default.bold(project.name)}...`
|
|
176587
176688
|
);
|
|
176588
176689
|
try {
|
|
176589
176690
|
await connectResourceToProject(
|
|
@@ -176601,17 +176702,17 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
|
176601
176702
|
output_manager_default.stopSpinner();
|
|
176602
176703
|
}
|
|
176603
176704
|
output_manager_default.log(
|
|
176604
|
-
`${
|
|
176705
|
+
`${import_chalk98.default.bold(name)} successfully connected to ${import_chalk98.default.bold(project.name)}
|
|
176605
176706
|
|
|
176606
176707
|
${indent_default(`Run ${cmd(`${packageName} env pull`)} to update the environment variables`, 4)}`
|
|
176607
176708
|
);
|
|
176608
176709
|
return 0;
|
|
176609
176710
|
}
|
|
176610
|
-
var
|
|
176711
|
+
var import_chalk98, import_open3;
|
|
176611
176712
|
var init_add10 = __esm({
|
|
176612
176713
|
"src/commands/integration/add.ts"() {
|
|
176613
176714
|
"use strict";
|
|
176614
|
-
|
|
176715
|
+
import_chalk98 = __toESM3(require_source());
|
|
176615
176716
|
import_open3 = __toESM3(require_open());
|
|
176616
176717
|
init_format_table();
|
|
176617
176718
|
init_pkg_name();
|
|
@@ -176931,7 +177032,7 @@ function outputBalanceInformation(prepaymentInfo, resources, integrationSlug) {
|
|
|
176931
177032
|
}
|
|
176932
177033
|
}
|
|
176933
177034
|
output_manager_default.log(
|
|
176934
|
-
`${
|
|
177035
|
+
`${import_chalk99.default.bold(`Balances and thresholds for ${integrationSlug}`)}:`
|
|
176935
177036
|
);
|
|
176936
177037
|
for (const key in mappings) {
|
|
176937
177038
|
const mapping = mappings[key];
|
|
@@ -176957,11 +177058,11 @@ function formattedCurrency(amountInCents) {
|
|
|
176957
177058
|
currency: "USD"
|
|
176958
177059
|
}).format(amountInCents / 100);
|
|
176959
177060
|
}
|
|
176960
|
-
var
|
|
177061
|
+
var import_chalk99;
|
|
176961
177062
|
var init_balance2 = __esm({
|
|
176962
177063
|
"src/commands/integration/balance.ts"() {
|
|
176963
177064
|
"use strict";
|
|
176964
|
-
|
|
177065
|
+
import_chalk99 = __toESM3(require_source());
|
|
176965
177066
|
init_output_manager();
|
|
176966
177067
|
init_get_scope();
|
|
176967
177068
|
init_fetch_installation_prepayment_info();
|
|
@@ -177115,18 +177216,18 @@ async function list4(client2) {
|
|
|
177115
177216
|
return 0;
|
|
177116
177217
|
}
|
|
177117
177218
|
output_manager_default.log(
|
|
177118
|
-
`Integrations in ${
|
|
177219
|
+
`Integrations in ${import_chalk100.default.bold(contextName)}:
|
|
177119
177220
|
${table(
|
|
177120
177221
|
[
|
|
177121
177222
|
["Name", "Status", "Product", "Integration", "Projects"].map(
|
|
177122
|
-
(header) =>
|
|
177223
|
+
(header) => import_chalk100.default.bold(import_chalk100.default.cyan(header))
|
|
177123
177224
|
),
|
|
177124
177225
|
...results.map((result) => [
|
|
177125
|
-
resourceLink(contextName, result) ??
|
|
177226
|
+
resourceLink(contextName, result) ?? import_chalk100.default.gray("\u2013"),
|
|
177126
177227
|
resourceStatus(result.status ?? "\u2013"),
|
|
177127
|
-
result.product ??
|
|
177128
|
-
integrationLink(result, team) ??
|
|
177129
|
-
|
|
177228
|
+
result.product ?? import_chalk100.default.gray("\u2013"),
|
|
177229
|
+
integrationLink(result, team) ?? import_chalk100.default.gray("\u2013"),
|
|
177230
|
+
import_chalk100.default.grey(result.projects ? result.projects : "\u2013")
|
|
177130
177231
|
])
|
|
177131
177232
|
],
|
|
177132
177233
|
{ hsep: 8 }
|
|
@@ -177139,17 +177240,17 @@ function resourceStatus(status3) {
|
|
|
177139
177240
|
const statusTitleCase = (0, import_title7.default)(status3);
|
|
177140
177241
|
switch (status3) {
|
|
177141
177242
|
case "initializing":
|
|
177142
|
-
return
|
|
177243
|
+
return import_chalk100.default.yellow(CIRCLE) + statusTitleCase;
|
|
177143
177244
|
case "error":
|
|
177144
|
-
return
|
|
177245
|
+
return import_chalk100.default.red(CIRCLE) + statusTitleCase;
|
|
177145
177246
|
case "available":
|
|
177146
|
-
return
|
|
177247
|
+
return import_chalk100.default.green(CIRCLE) + statusTitleCase;
|
|
177147
177248
|
case "suspended":
|
|
177148
|
-
return
|
|
177249
|
+
return import_chalk100.default.white(CIRCLE) + statusTitleCase;
|
|
177149
177250
|
case "limits-exceeded-suspended":
|
|
177150
|
-
return `${
|
|
177251
|
+
return `${import_chalk100.default.white(CIRCLE)}Limits exceeded`;
|
|
177151
177252
|
default:
|
|
177152
|
-
return
|
|
177253
|
+
return import_chalk100.default.gray(statusTitleCase);
|
|
177153
177254
|
}
|
|
177154
177255
|
}
|
|
177155
177256
|
function resourceLink(orgSlug, resource) {
|
|
@@ -177170,18 +177271,18 @@ function integrationLink(integration, team) {
|
|
|
177170
177271
|
if (!integration.configurationId) {
|
|
177171
177272
|
return integration.integration;
|
|
177172
177273
|
}
|
|
177173
|
-
const boldName =
|
|
177274
|
+
const boldName = import_chalk100.default.bold(integration.integration);
|
|
177174
177275
|
const integrationDeepLink = buildSSOLink(team, integration.configurationId);
|
|
177175
177276
|
return output_manager_default.link(boldName, integrationDeepLink, {
|
|
177176
177277
|
fallback: () => boldName,
|
|
177177
177278
|
color: false
|
|
177178
177279
|
});
|
|
177179
177280
|
}
|
|
177180
|
-
var
|
|
177281
|
+
var import_chalk100, import_title7;
|
|
177181
177282
|
var init_list6 = __esm({
|
|
177182
177283
|
"src/commands/integration/list.ts"() {
|
|
177183
177284
|
"use strict";
|
|
177184
|
-
|
|
177285
|
+
import_chalk100 = __toESM3(require_source());
|
|
177185
177286
|
init_get_scope();
|
|
177186
177287
|
init_link2();
|
|
177187
177288
|
init_get_resources();
|
|
@@ -177242,7 +177343,7 @@ async function openIntegration(client2, args2) {
|
|
|
177242
177343
|
knownIntegrationSlug = !!configuration;
|
|
177243
177344
|
} catch (error3) {
|
|
177244
177345
|
output_manager_default.error(
|
|
177245
|
-
`Failed to fetch configuration for ${
|
|
177346
|
+
`Failed to fetch configuration for ${import_chalk101.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
|
|
177246
177347
|
);
|
|
177247
177348
|
return 1;
|
|
177248
177349
|
} finally {
|
|
@@ -177250,19 +177351,19 @@ async function openIntegration(client2, args2) {
|
|
|
177250
177351
|
}
|
|
177251
177352
|
if (!configuration) {
|
|
177252
177353
|
output_manager_default.error(
|
|
177253
|
-
`No configuration found for ${
|
|
177354
|
+
`No configuration found for ${import_chalk101.default.bold(`"${integrationSlug}"`)}.`
|
|
177254
177355
|
);
|
|
177255
177356
|
return 1;
|
|
177256
177357
|
}
|
|
177257
|
-
output_manager_default.print(`Opening the ${
|
|
177358
|
+
output_manager_default.print(`Opening the ${import_chalk101.default.bold(integrationSlug)} dashboard...`);
|
|
177258
177359
|
(0, import_open4.default)(buildSSOLink(team, configuration.id));
|
|
177259
177360
|
return 0;
|
|
177260
177361
|
}
|
|
177261
|
-
var
|
|
177362
|
+
var import_chalk101, import_open4;
|
|
177262
177363
|
var init_open_integration = __esm({
|
|
177263
177364
|
"src/commands/integration/open-integration.ts"() {
|
|
177264
177365
|
"use strict";
|
|
177265
|
-
|
|
177366
|
+
import_chalk101 = __toESM3(require_source());
|
|
177266
177367
|
import_open4 = __toESM3(require_open());
|
|
177267
177368
|
init_get_scope();
|
|
177268
177369
|
init_fetch_marketplace_integrations();
|
|
@@ -177355,7 +177456,7 @@ async function remove3(client2) {
|
|
|
177355
177456
|
);
|
|
177356
177457
|
output_manager_default.stopSpinner();
|
|
177357
177458
|
if (!integrationConfiguration) {
|
|
177358
|
-
output_manager_default.error(`No integration ${
|
|
177459
|
+
output_manager_default.error(`No integration ${import_chalk102.default.bold(integrationName)} found.`);
|
|
177359
177460
|
telemetry2.trackCliArgumentIntegration(integrationName, false);
|
|
177360
177461
|
return 0;
|
|
177361
177462
|
}
|
|
@@ -177374,26 +177475,26 @@ async function remove3(client2) {
|
|
|
177374
177475
|
await removeIntegration(client2, integrationConfiguration, team);
|
|
177375
177476
|
} catch (error3) {
|
|
177376
177477
|
output_manager_default.error(
|
|
177377
|
-
|
|
177378
|
-
`Failed to remove ${
|
|
177478
|
+
import_chalk102.default.red(
|
|
177479
|
+
`Failed to remove ${import_chalk102.default.bold(integrationName)}: ${error3.message}`
|
|
177379
177480
|
)
|
|
177380
177481
|
);
|
|
177381
177482
|
return 1;
|
|
177382
177483
|
}
|
|
177383
|
-
output_manager_default.success(`${
|
|
177484
|
+
output_manager_default.success(`${import_chalk102.default.bold(integrationName)} successfully removed.`);
|
|
177384
177485
|
return 0;
|
|
177385
177486
|
}
|
|
177386
177487
|
async function confirmIntegrationRemoval(client2, integration, team) {
|
|
177387
177488
|
output_manager_default.log(
|
|
177388
|
-
`The ${
|
|
177489
|
+
`The ${import_chalk102.default.bold(integration)} integration will be removed permanently from team ${import_chalk102.default.bold(team.name)}.`
|
|
177389
177490
|
);
|
|
177390
|
-
return client2.input.confirm(`${
|
|
177491
|
+
return client2.input.confirm(`${import_chalk102.default.red("Are you sure?")}`, false);
|
|
177391
177492
|
}
|
|
177392
|
-
var
|
|
177493
|
+
var import_chalk102;
|
|
177393
177494
|
var init_remove_integration2 = __esm({
|
|
177394
177495
|
"src/commands/integration/remove-integration.ts"() {
|
|
177395
177496
|
"use strict";
|
|
177396
|
-
|
|
177497
|
+
import_chalk102 = __toESM3(require_source());
|
|
177397
177498
|
init_output_manager();
|
|
177398
177499
|
init_get_args();
|
|
177399
177500
|
init_get_flags_specification();
|
|
@@ -177691,18 +177792,18 @@ async function createThreshold(client2) {
|
|
|
177691
177792
|
);
|
|
177692
177793
|
output_manager_default.stopSpinner();
|
|
177693
177794
|
if (!targetedResource) {
|
|
177694
|
-
output_manager_default.log(`The resource ${
|
|
177795
|
+
output_manager_default.log(`The resource ${import_chalk103.default.bold(resourceName)} was not found.`);
|
|
177695
177796
|
return 0;
|
|
177696
177797
|
}
|
|
177697
177798
|
if (!targetedResource.product?.integrationConfigurationId) {
|
|
177698
177799
|
output_manager_default.error(
|
|
177699
|
-
`The resource ${
|
|
177800
|
+
`The resource ${import_chalk103.default.bold(resourceName)} does not have an integration configuration.`
|
|
177700
177801
|
);
|
|
177701
177802
|
return 1;
|
|
177702
177803
|
}
|
|
177703
177804
|
if (targetedResource.billingPlan?.type !== "prepayment") {
|
|
177704
177805
|
output_manager_default.error(
|
|
177705
|
-
`The resource ${
|
|
177806
|
+
`The resource ${import_chalk103.default.bold(resourceName)} is not a prepayment-based resource.`
|
|
177706
177807
|
);
|
|
177707
177808
|
return 1;
|
|
177708
177809
|
}
|
|
@@ -177730,7 +177831,7 @@ async function createThreshold(client2) {
|
|
|
177730
177831
|
}
|
|
177731
177832
|
if (targetedResource.billingPlan.scope !== "resource") {
|
|
177732
177833
|
output_manager_default.log(
|
|
177733
|
-
`The resource ${
|
|
177834
|
+
`The resource ${import_chalk103.default.bold(resourceName)} uses an installation-level balance.`
|
|
177734
177835
|
);
|
|
177735
177836
|
return await updateThresholdForInstallation({
|
|
177736
177837
|
client: client2,
|
|
@@ -177844,17 +177945,17 @@ async function updateThresholdForInstallation(props) {
|
|
|
177844
177945
|
async function handleUpdateThreshold(props) {
|
|
177845
177946
|
if (props.resource.billingPlan?.type !== "prepayment") {
|
|
177846
177947
|
output_manager_default.log(
|
|
177847
|
-
`The resource ${
|
|
177948
|
+
`The resource ${import_chalk103.default.bold(props.resource.name)} is not a prepayment-based resource.`
|
|
177848
177949
|
);
|
|
177849
177950
|
return 0;
|
|
177850
177951
|
}
|
|
177851
177952
|
if (!props.resource.product?.integrationConfigurationId) {
|
|
177852
177953
|
output_manager_default.log(
|
|
177853
|
-
`The resource ${
|
|
177954
|
+
`The resource ${import_chalk103.default.bold(props.resource.name)} does not have an integration configuration.`
|
|
177854
177955
|
);
|
|
177855
177956
|
return 0;
|
|
177856
177957
|
}
|
|
177857
|
-
const entityTextReference = props.isInstallationLevel ? `installation ${
|
|
177958
|
+
const entityTextReference = props.isInstallationLevel ? `installation ${import_chalk103.default.bold(props.resource.product?.name)}` : `resource ${import_chalk103.default.bold(props.resource.name)}`;
|
|
177858
177959
|
if (props.existingThreshold) {
|
|
177859
177960
|
const shouldOverwriteThreshold = props.skipConfirmWithYes || await props.client.input.confirm(
|
|
177860
177961
|
`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?`,
|
|
@@ -177911,11 +178012,11 @@ async function handleUpdateThreshold(props) {
|
|
|
177911
178012
|
output_manager_default.success(`Threshold for ${entityTextReference} created successfully.`);
|
|
177912
178013
|
return 0;
|
|
177913
178014
|
}
|
|
177914
|
-
var
|
|
178015
|
+
var import_chalk103;
|
|
177915
178016
|
var init_create_threshold2 = __esm({
|
|
177916
178017
|
"src/commands/integration-resource/create-threshold.ts"() {
|
|
177917
178018
|
"use strict";
|
|
177918
|
-
|
|
178019
|
+
import_chalk103 = __toESM3(require_source());
|
|
177919
178020
|
init_output_manager();
|
|
177920
178021
|
init_error2();
|
|
177921
178022
|
init_get_args();
|
|
@@ -178058,7 +178159,7 @@ async function disconnect2(client2) {
|
|
|
178058
178159
|
);
|
|
178059
178160
|
output_manager_default.stopSpinner();
|
|
178060
178161
|
if (!targetedResource) {
|
|
178061
|
-
output_manager_default.error(`No resource ${
|
|
178162
|
+
output_manager_default.error(`No resource ${import_chalk104.default.bold(resourceName)} found.`);
|
|
178062
178163
|
return 0;
|
|
178063
178164
|
}
|
|
178064
178165
|
if (parsedArguments.flags["--all"]) {
|
|
@@ -178108,7 +178209,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178108
178209
|
);
|
|
178109
178210
|
if (!project) {
|
|
178110
178211
|
output_manager_default.log(
|
|
178111
|
-
`Could not find project ${
|
|
178212
|
+
`Could not find project ${import_chalk104.default.bold(projectName)} connected to resource ${import_chalk104.default.bold(resource.name)}.`
|
|
178112
178213
|
);
|
|
178113
178214
|
return 0;
|
|
178114
178215
|
}
|
|
@@ -178120,7 +178221,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178120
178221
|
output_manager_default.spinner("Disconnecting resource\u2026", 500);
|
|
178121
178222
|
await disconnectResourceFromProject(client2, resource, project);
|
|
178122
178223
|
output_manager_default.success(
|
|
178123
|
-
`Disconnected ${
|
|
178224
|
+
`Disconnected ${import_chalk104.default.bold(project.name)} from ${import_chalk104.default.bold(resource.name)}`
|
|
178124
178225
|
);
|
|
178125
178226
|
} catch (error3) {
|
|
178126
178227
|
output_manager_default.error(
|
|
@@ -178132,7 +178233,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178132
178233
|
}
|
|
178133
178234
|
async function handleDisconnectAllProjects(client2, resource, skipConfirmation) {
|
|
178134
178235
|
if (resource.projectsMetadata?.length === 0) {
|
|
178135
|
-
output_manager_default.log(`${
|
|
178236
|
+
output_manager_default.log(`${import_chalk104.default.bold(resource.name)} has no projects to disconnect.`);
|
|
178136
178237
|
return;
|
|
178137
178238
|
}
|
|
178138
178239
|
if (!skipConfirmation && !await confirmDisconnectAllProjects(client2, resource)) {
|
|
@@ -178142,7 +178243,7 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
|
178142
178243
|
output_manager_default.spinner("Disconnecting projects from resource\u2026", 500);
|
|
178143
178244
|
await disconnectResourceFromAllProjects(client2, resource);
|
|
178144
178245
|
output_manager_default.success(
|
|
178145
|
-
`Disconnected all projects from ${
|
|
178246
|
+
`Disconnected all projects from ${import_chalk104.default.bold(resource.name)}`
|
|
178146
178247
|
);
|
|
178147
178248
|
} catch (error3) {
|
|
178148
178249
|
throw new FailedError(
|
|
@@ -178153,9 +178254,9 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
|
178153
178254
|
}
|
|
178154
178255
|
async function confirmDisconnectProject(client2, resource, project) {
|
|
178155
178256
|
output_manager_default.log(
|
|
178156
|
-
`The resource ${
|
|
178257
|
+
`The resource ${import_chalk104.default.bold(resource.name)} will be disconnected from project ${import_chalk104.default.bold(project.name)}.`
|
|
178157
178258
|
);
|
|
178158
|
-
return client2.input.confirm(`${
|
|
178259
|
+
return client2.input.confirm(`${import_chalk104.default.red("Are you sure?")}`, false);
|
|
178159
178260
|
}
|
|
178160
178261
|
async function confirmDisconnectAllProjects(client2, resource) {
|
|
178161
178262
|
output_manager_default.log("The following projects will be disconnected:");
|
|
@@ -178166,13 +178267,13 @@ async function confirmDisconnectAllProjects(client2, resource) {
|
|
|
178166
178267
|
output_manager_default.print(` ${project.name}
|
|
178167
178268
|
`);
|
|
178168
178269
|
}
|
|
178169
|
-
return client2.input.confirm(
|
|
178270
|
+
return client2.input.confirm(import_chalk104.default.red("Are you sure?"), false);
|
|
178170
178271
|
}
|
|
178171
|
-
var
|
|
178272
|
+
var import_chalk104;
|
|
178172
178273
|
var init_disconnect4 = __esm({
|
|
178173
178274
|
"src/commands/integration-resource/disconnect.ts"() {
|
|
178174
178275
|
"use strict";
|
|
178175
|
-
|
|
178276
|
+
import_chalk104 = __toESM3(require_source());
|
|
178176
178277
|
init_output_manager();
|
|
178177
178278
|
init_get_args();
|
|
178178
178279
|
init_get_flags_specification();
|
|
@@ -178277,7 +178378,7 @@ async function remove4(client2) {
|
|
|
178277
178378
|
);
|
|
178278
178379
|
output_manager_default.stopSpinner();
|
|
178279
178380
|
if (!targetedResource) {
|
|
178280
|
-
output_manager_default.error(`No resource ${
|
|
178381
|
+
output_manager_default.error(`No resource ${import_chalk105.default.bold(resourceName)} found.`);
|
|
178281
178382
|
return 0;
|
|
178282
178383
|
}
|
|
178283
178384
|
if (disconnectAll) {
|
|
@@ -178308,7 +178409,7 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
|
178308
178409
|
const hasProjects = resource.projectsMetadata && resource.projectsMetadata?.length > 0;
|
|
178309
178410
|
if (!options?.skipProjectCheck && hasProjects) {
|
|
178310
178411
|
output_manager_default.error(
|
|
178311
|
-
`Cannot delete resource ${
|
|
178412
|
+
`Cannot delete resource ${import_chalk105.default.bold(resource.name)} while it has connected projects. Please disconnect any projects using this resource first or use the \`--disconnect-all\` flag.`
|
|
178312
178413
|
);
|
|
178313
178414
|
return 1;
|
|
178314
178415
|
}
|
|
@@ -178319,24 +178420,24 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
|
178319
178420
|
try {
|
|
178320
178421
|
output_manager_default.spinner("Deleting resource\u2026", 500);
|
|
178321
178422
|
await deleteResource(client2, resource, team);
|
|
178322
|
-
output_manager_default.success(`${
|
|
178423
|
+
output_manager_default.success(`${import_chalk105.default.bold(resource.name)} successfully deleted.`);
|
|
178323
178424
|
} catch (error3) {
|
|
178324
178425
|
output_manager_default.error(
|
|
178325
|
-
`A problem occurred when attempting to delete ${
|
|
178426
|
+
`A problem occurred when attempting to delete ${import_chalk105.default.bold(resource.name)}: ${error3.message}`
|
|
178326
178427
|
);
|
|
178327
178428
|
return 1;
|
|
178328
178429
|
}
|
|
178329
178430
|
return 0;
|
|
178330
178431
|
}
|
|
178331
178432
|
async function confirmDeleteResource(client2, resource) {
|
|
178332
|
-
output_manager_default.log(`${
|
|
178333
|
-
return client2.input.confirm(`${
|
|
178433
|
+
output_manager_default.log(`${import_chalk105.default.bold(resource.name)} will be deleted permanently.`);
|
|
178434
|
+
return client2.input.confirm(`${import_chalk105.default.red("Are you sure?")}`, false);
|
|
178334
178435
|
}
|
|
178335
|
-
var
|
|
178436
|
+
var import_chalk105;
|
|
178336
178437
|
var init_remove_resource = __esm({
|
|
178337
178438
|
"src/commands/integration-resource/remove-resource.ts"() {
|
|
178338
178439
|
"use strict";
|
|
178339
|
-
|
|
178440
|
+
import_chalk105 = __toESM3(require_source());
|
|
178340
178441
|
init_output_manager();
|
|
178341
178442
|
init_get_args();
|
|
178342
178443
|
init_get_flags_specification();
|
|
@@ -178782,7 +178883,7 @@ async function list5(client2) {
|
|
|
178782
178883
|
}
|
|
178783
178884
|
const projectSlugLink = formatProject(contextName, project.name);
|
|
178784
178885
|
if (!singleDeployment) {
|
|
178785
|
-
spinner(`Fetching deployments in ${
|
|
178886
|
+
spinner(`Fetching deployments in ${import_chalk106.default.bold(contextName)}`);
|
|
178786
178887
|
const start = Date.now();
|
|
178787
178888
|
debug2("Fetching deployments");
|
|
178788
178889
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
|
@@ -178822,7 +178923,7 @@ async function list5(client2) {
|
|
|
178822
178923
|
const urls = [];
|
|
178823
178924
|
const tablePrint = table(
|
|
178824
178925
|
[
|
|
178825
|
-
headers.map((header) =>
|
|
178926
|
+
headers.map((header) => import_chalk106.default.bold(import_chalk106.default.cyan(header))),
|
|
178826
178927
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
|
178827
178928
|
urls.push(`https://${dep.url}`);
|
|
178828
178929
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
|
@@ -178832,16 +178933,16 @@ async function list5(client2) {
|
|
|
178832
178933
|
const targetName = dep.customEnvironment?.slug || (dep.target === "production" ? "Production" : "Preview");
|
|
178833
178934
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
|
178834
178935
|
return [
|
|
178835
|
-
|
|
178936
|
+
import_chalk106.default.gray(createdAt),
|
|
178836
178937
|
`https://${dep.url}`,
|
|
178837
178938
|
stateString2(dep.readyState || ""),
|
|
178838
178939
|
formatEnvironment(contextName, project.name, {
|
|
178839
178940
|
id: targetSlug,
|
|
178840
178941
|
slug: targetName
|
|
178841
178942
|
}),
|
|
178842
|
-
...!showPolicy ? [
|
|
178843
|
-
...!showPolicy ? [
|
|
178844
|
-
...showPolicy ? [
|
|
178943
|
+
...!showPolicy ? [import_chalk106.default.gray(getDeploymentDuration(dep))] : [],
|
|
178944
|
+
...!showPolicy ? [import_chalk106.default.gray(dep.creator?.username)] : [],
|
|
178945
|
+
...showPolicy ? [import_chalk106.default.gray(proposedExp)] : []
|
|
178845
178946
|
];
|
|
178846
178947
|
}).filter(
|
|
178847
178948
|
(app2) => (
|
|
@@ -178888,17 +178989,17 @@ function stateString2(s) {
|
|
|
178888
178989
|
case "BUILDING":
|
|
178889
178990
|
case "DEPLOYING":
|
|
178890
178991
|
case "ANALYZING":
|
|
178891
|
-
return
|
|
178992
|
+
return import_chalk106.default.yellow(CIRCLE) + sTitle;
|
|
178892
178993
|
case "ERROR":
|
|
178893
|
-
return
|
|
178994
|
+
return import_chalk106.default.red(CIRCLE) + sTitle;
|
|
178894
178995
|
case "READY":
|
|
178895
|
-
return
|
|
178996
|
+
return import_chalk106.default.green(CIRCLE) + sTitle;
|
|
178896
178997
|
case "QUEUED":
|
|
178897
|
-
return
|
|
178998
|
+
return import_chalk106.default.white(CIRCLE) + sTitle;
|
|
178898
178999
|
case "CANCELED":
|
|
178899
|
-
return
|
|
179000
|
+
return import_chalk106.default.gray(sTitle);
|
|
178900
179001
|
default:
|
|
178901
|
-
return
|
|
179002
|
+
return import_chalk106.default.gray("UNKNOWN");
|
|
178902
179003
|
}
|
|
178903
179004
|
}
|
|
178904
179005
|
function sortByCreatedAt(a, b) {
|
|
@@ -178914,12 +179015,12 @@ function filterUniqueApps() {
|
|
|
178914
179015
|
return true;
|
|
178915
179016
|
};
|
|
178916
179017
|
}
|
|
178917
|
-
var import_ms21,
|
|
179018
|
+
var import_ms21, import_chalk106, import_title8, import_error_utils29;
|
|
178918
179019
|
var init_list8 = __esm({
|
|
178919
179020
|
"src/commands/list/index.ts"() {
|
|
178920
179021
|
"use strict";
|
|
178921
179022
|
import_ms21 = __toESM3(require_ms());
|
|
178922
|
-
|
|
179023
|
+
import_chalk106 = __toESM3(require_source());
|
|
178923
179024
|
import_title8 = __toESM3(require_lib4());
|
|
178924
179025
|
init_table();
|
|
178925
179026
|
init_get_args();
|
|
@@ -179083,7 +179184,7 @@ async function logs(client2) {
|
|
|
179083
179184
|
} catch {
|
|
179084
179185
|
}
|
|
179085
179186
|
spinner(
|
|
179086
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
|
179187
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk107.default.bold(contextName)}`
|
|
179087
179188
|
);
|
|
179088
179189
|
let deployment;
|
|
179089
179190
|
try {
|
|
@@ -179103,9 +179204,9 @@ async function logs(client2) {
|
|
|
179103
179204
|
return 1;
|
|
179104
179205
|
}
|
|
179105
179206
|
output_manager_default.print(
|
|
179106
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
|
179207
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk107.default.dim(
|
|
179107
179208
|
deployment.id
|
|
179108
|
-
)}) starting from ${
|
|
179209
|
+
)}) starting from ${import_chalk107.default.bold((0, import_format3.default)(Date.now(), DATE_TIME_FORMAT))}
|
|
179109
179210
|
|
|
179110
179211
|
`
|
|
179111
179212
|
);
|
|
@@ -179120,12 +179221,12 @@ async function logs(client2) {
|
|
|
179120
179221
|
abortController
|
|
179121
179222
|
);
|
|
179122
179223
|
}
|
|
179123
|
-
var import_error_utils30,
|
|
179224
|
+
var import_error_utils30, import_chalk107, import_format3, deprecatedFlags, DATE_TIME_FORMAT;
|
|
179124
179225
|
var init_logs3 = __esm({
|
|
179125
179226
|
"src/commands/logs/index.ts"() {
|
|
179126
179227
|
"use strict";
|
|
179127
179228
|
import_error_utils30 = __toESM3(require_dist2());
|
|
179128
|
-
|
|
179229
|
+
import_chalk107 = __toESM3(require_source());
|
|
179129
179230
|
import_format3 = __toESM3(require_format());
|
|
179130
179231
|
init_build_state();
|
|
179131
179232
|
init_is_deploying();
|
|
@@ -179581,14 +179682,14 @@ async function login2(client2, telemetry2) {
|
|
|
179581
179682
|
});
|
|
179582
179683
|
rl.question(
|
|
179583
179684
|
`
|
|
179584
|
-
Visit ${
|
|
179685
|
+
Visit ${import_chalk108.default.bold(
|
|
179585
179686
|
output_manager_default.link(
|
|
179586
179687
|
verification_uri.replace("https://", ""),
|
|
179587
179688
|
verification_uri_complete,
|
|
179588
179689
|
{ color: false, fallback: () => verification_uri_complete }
|
|
179589
179690
|
)
|
|
179590
|
-
)}${output_manager_default.supportsHyperlink ? ` and enter ${
|
|
179591
|
-
${
|
|
179691
|
+
)}${output_manager_default.supportsHyperlink ? ` and enter ${import_chalk108.default.bold(user_code)}` : ""}
|
|
179692
|
+
${import_chalk108.default.grey("Press [ENTER] to open the browser")}
|
|
179592
179693
|
`,
|
|
179593
179694
|
() => {
|
|
179594
179695
|
open6.default(verification_uri_complete);
|
|
@@ -179654,12 +179755,12 @@ async function login2(client2, telemetry2) {
|
|
|
179654
179755
|
client2.writeToConfigFile();
|
|
179655
179756
|
output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
|
179656
179757
|
output_manager_default.print(`
|
|
179657
|
-
${
|
|
179758
|
+
${import_chalk108.default.cyan("Congratulations!")} You are now signed in.
|
|
179658
179759
|
|
|
179659
179760
|
To deploy something, run ${getCommandName()}.
|
|
179660
179761
|
|
|
179661
179762
|
${emoji("tip")} To deploy every commit automatically,
|
|
179662
|
-
connect a Git Repository (${
|
|
179763
|
+
connect a Git Repository (${import_chalk108.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).
|
|
179663
179764
|
`);
|
|
179664
179765
|
return;
|
|
179665
179766
|
}
|
|
@@ -179675,12 +179776,12 @@ async function login2(client2, telemetry2) {
|
|
|
179675
179776
|
telemetry2.trackState("error");
|
|
179676
179777
|
return 1;
|
|
179677
179778
|
}
|
|
179678
|
-
var import_node_readline,
|
|
179779
|
+
var import_node_readline, import_chalk108, open6, import_ansi_escapes6;
|
|
179679
179780
|
var init_future = __esm({
|
|
179680
179781
|
"src/commands/login/future.ts"() {
|
|
179681
179782
|
"use strict";
|
|
179682
179783
|
import_node_readline = __toESM3(require("readline"));
|
|
179683
|
-
|
|
179784
|
+
import_chalk108 = __toESM3(require_source());
|
|
179684
179785
|
open6 = __toESM3(require_open());
|
|
179685
179786
|
import_ansi_escapes6 = __toESM3(require_ansi_escapes());
|
|
179686
179787
|
init_error2();
|
|
@@ -179761,7 +179862,7 @@ async function login3(client2) {
|
|
|
179761
179862
|
writeToConfigFile(client2.config);
|
|
179762
179863
|
output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
|
179763
179864
|
output_manager_default.print(
|
|
179764
|
-
`${
|
|
179865
|
+
`${import_chalk109.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
|
179765
179866
|
`
|
|
179766
179867
|
);
|
|
179767
179868
|
output_manager_default.print(
|
|
@@ -179773,12 +179874,12 @@ async function login3(client2) {
|
|
|
179773
179874
|
);
|
|
179774
179875
|
return 0;
|
|
179775
179876
|
}
|
|
179776
|
-
var import_email_validator,
|
|
179877
|
+
var import_email_validator, import_chalk109;
|
|
179777
179878
|
var init_login3 = __esm({
|
|
179778
179879
|
"src/commands/login/index.ts"() {
|
|
179779
179880
|
"use strict";
|
|
179780
179881
|
import_email_validator = __toESM3(require_email_validator());
|
|
179781
|
-
|
|
179882
|
+
import_chalk109 = __toESM3(require_source());
|
|
179782
179883
|
init_humanize_path();
|
|
179783
179884
|
init_get_args();
|
|
179784
179885
|
init_prompt();
|
|
@@ -179965,7 +180066,7 @@ async function pull2(client2) {
|
|
|
179965
180066
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
179966
180067
|
const { contextName } = await getScope(client2);
|
|
179967
180068
|
output_manager_default.spinner(
|
|
179968
|
-
`Fetching microfrontends configuration in ${
|
|
180069
|
+
`Fetching microfrontends configuration in ${import_chalk110.default.bold(contextName)}`
|
|
179969
180070
|
);
|
|
179970
180071
|
let parsedArgs;
|
|
179971
180072
|
const flagsSpecification = getFlagsSpecification(pullSubcommand2.options);
|
|
@@ -180013,11 +180114,11 @@ async function pull2(client2) {
|
|
|
180013
180114
|
const microfrontendsStamp = stamp_default();
|
|
180014
180115
|
output_manager_default.print(
|
|
180015
180116
|
`${prependEmoji(
|
|
180016
|
-
`Downloaded microfrontends configuration to ${
|
|
180117
|
+
`Downloaded microfrontends configuration to ${import_chalk110.default.bold(
|
|
180017
180118
|
humanizePath(
|
|
180018
180119
|
(0, import_node_path5.join)(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS)
|
|
180019
180120
|
)
|
|
180020
|
-
)} ${
|
|
180121
|
+
)} ${import_chalk110.default.gray(microfrontendsStamp())}`,
|
|
180021
180122
|
emoji("success")
|
|
180022
180123
|
)}
|
|
180023
180124
|
`
|
|
@@ -180029,11 +180130,11 @@ async function pull2(client2) {
|
|
|
180029
180130
|
return 1;
|
|
180030
180131
|
}
|
|
180031
180132
|
}
|
|
180032
|
-
var
|
|
180133
|
+
var import_chalk110, import_node_path5, import_fs_extra23, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS;
|
|
180033
180134
|
var init_pull5 = __esm({
|
|
180034
180135
|
"src/commands/microfrontends/pull.ts"() {
|
|
180035
180136
|
"use strict";
|
|
180036
|
-
|
|
180137
|
+
import_chalk110 = __toESM3(require_source());
|
|
180037
180138
|
import_node_path5 = require("path");
|
|
180038
180139
|
init_output_manager();
|
|
180039
180140
|
init_get_scope();
|
|
@@ -180186,12 +180287,12 @@ async function add6(client2, argv) {
|
|
|
180186
180287
|
const { args: args2 } = parsedArgs;
|
|
180187
180288
|
if (args2.length !== 1) {
|
|
180188
180289
|
output_manager_default.error(
|
|
180189
|
-
`Invalid number of arguments. Usage: ${
|
|
180290
|
+
`Invalid number of arguments. Usage: ${import_chalk111.default.cyan(
|
|
180190
180291
|
`${getCommandName("project add <name>")}`
|
|
180191
180292
|
)}`
|
|
180192
180293
|
);
|
|
180193
180294
|
if (args2.length > 1) {
|
|
180194
|
-
const example =
|
|
180295
|
+
const example = import_chalk111.default.cyan(
|
|
180195
180296
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
|
180196
180297
|
);
|
|
180197
180298
|
output_manager_default.log(
|
|
@@ -180219,17 +180320,17 @@ async function add6(client2, argv) {
|
|
|
180219
180320
|
const elapsed2 = (0, import_ms22.default)(Date.now() - start);
|
|
180220
180321
|
const { contextName } = await getScope(client2);
|
|
180221
180322
|
output_manager_default.log(
|
|
180222
|
-
`${
|
|
180323
|
+
`${import_chalk111.default.cyan("Success!")} Project ${import_chalk111.default.bold(
|
|
180223
180324
|
name.toLowerCase()
|
|
180224
|
-
)} added (${
|
|
180325
|
+
)} added (${import_chalk111.default.bold(contextName)}) ${import_chalk111.default.gray(`[${elapsed2}]`)}`
|
|
180225
180326
|
);
|
|
180226
180327
|
return 0;
|
|
180227
180328
|
}
|
|
180228
|
-
var
|
|
180329
|
+
var import_chalk111, import_ms22;
|
|
180229
180330
|
var init_add12 = __esm({
|
|
180230
180331
|
"src/commands/project/add.ts"() {
|
|
180231
180332
|
"use strict";
|
|
180232
|
-
|
|
180333
|
+
import_chalk111 = __toESM3(require_source());
|
|
180233
180334
|
import_ms22 = __toESM3(require_ms());
|
|
180234
180335
|
init_errors_ts();
|
|
180235
180336
|
init_pkg_name();
|
|
@@ -180328,7 +180429,7 @@ async function inspect4(client2, argv) {
|
|
|
180328
180429
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
180329
180430
|
if (args2.length !== 0 && args2.length !== 1) {
|
|
180330
180431
|
output_manager_default.error(
|
|
180331
|
-
`Invalid number of arguments. Usage: ${
|
|
180432
|
+
`Invalid number of arguments. Usage: ${import_chalk112.default.cyan(
|
|
180332
180433
|
`${getCommandName("project inspect <name>")}`
|
|
180333
180434
|
)}`
|
|
180334
180435
|
);
|
|
@@ -180343,52 +180444,52 @@ async function inspect4(client2, argv) {
|
|
|
180343
180444
|
});
|
|
180344
180445
|
const org = await getTeamById(client2, project.accountId);
|
|
180345
180446
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
180346
|
-
output_manager_default.log(`Found Project ${projectSlugLink} ${
|
|
180447
|
+
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk112.default.gray(inspectStamp())}`);
|
|
180347
180448
|
output_manager_default.print("\n");
|
|
180348
|
-
output_manager_default.print(
|
|
180349
|
-
output_manager_default.print(` ${
|
|
180449
|
+
output_manager_default.print(import_chalk112.default.bold(" General\n\n"));
|
|
180450
|
+
output_manager_default.print(` ${import_chalk112.default.cyan("ID")} ${project.id}
|
|
180350
180451
|
`);
|
|
180351
|
-
output_manager_default.print(` ${
|
|
180452
|
+
output_manager_default.print(` ${import_chalk112.default.cyan("Name")} ${project.name}
|
|
180352
180453
|
`);
|
|
180353
|
-
output_manager_default.print(` ${
|
|
180454
|
+
output_manager_default.print(` ${import_chalk112.default.cyan("Owner")} ${org.name}
|
|
180354
180455
|
`);
|
|
180355
180456
|
output_manager_default.print(
|
|
180356
|
-
` ${
|
|
180457
|
+
` ${import_chalk112.default.cyan("Created At")} ${formatDate(project.createdAt)}
|
|
180357
180458
|
`
|
|
180358
180459
|
);
|
|
180359
180460
|
output_manager_default.print(
|
|
180360
|
-
` ${
|
|
180461
|
+
` ${import_chalk112.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
|
|
180361
180462
|
`
|
|
180362
180463
|
);
|
|
180363
180464
|
output_manager_default.print(
|
|
180364
|
-
` ${
|
|
180465
|
+
` ${import_chalk112.default.cyan("Node.js Version")} ${project.nodeVersion}
|
|
180365
180466
|
`
|
|
180366
180467
|
);
|
|
180367
180468
|
const framework = import_frameworks7.frameworkList.find((f) => f.slug === project.framework);
|
|
180368
180469
|
output_manager_default.print("\n");
|
|
180369
|
-
output_manager_default.print(
|
|
180370
|
-
output_manager_default.print(` ${
|
|
180470
|
+
output_manager_default.print(import_chalk112.default.bold(" Framework Settings\n\n"));
|
|
180471
|
+
output_manager_default.print(` ${import_chalk112.default.cyan("Framework Preset")} ${framework?.name}
|
|
180371
180472
|
`);
|
|
180372
180473
|
output_manager_default.print(
|
|
180373
|
-
` ${
|
|
180474
|
+
` ${import_chalk112.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk112.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
|
|
180374
180475
|
`
|
|
180375
180476
|
);
|
|
180376
180477
|
output_manager_default.print(
|
|
180377
|
-
` ${
|
|
180478
|
+
` ${import_chalk112.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk112.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
|
|
180378
180479
|
`
|
|
180379
180480
|
);
|
|
180380
180481
|
output_manager_default.print(
|
|
180381
|
-
` ${
|
|
180482
|
+
` ${import_chalk112.default.cyan("Install Command")} ${project.installCommand ?? import_chalk112.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
|
|
180382
180483
|
`
|
|
180383
180484
|
);
|
|
180384
180485
|
output_manager_default.print("\n");
|
|
180385
180486
|
return 0;
|
|
180386
180487
|
}
|
|
180387
|
-
var
|
|
180488
|
+
var import_chalk112, import_frameworks7;
|
|
180388
180489
|
var init_inspect6 = __esm({
|
|
180389
180490
|
"src/commands/project/inspect.ts"() {
|
|
180390
180491
|
"use strict";
|
|
180391
|
-
|
|
180492
|
+
import_chalk112 = __toESM3(require_source());
|
|
180392
180493
|
import_frameworks7 = __toESM3(require_frameworks());
|
|
180393
180494
|
init_pkg_name();
|
|
180394
180495
|
init_inspect5();
|
|
@@ -180452,7 +180553,7 @@ async function list6(client2, argv) {
|
|
|
180452
180553
|
const { args: args2, flags: opts } = parsedArgs;
|
|
180453
180554
|
if (args2.length !== 0) {
|
|
180454
180555
|
output_manager_default.error(
|
|
180455
|
-
`Invalid number of arguments. Usage: ${
|
|
180556
|
+
`Invalid number of arguments. Usage: ${import_chalk113.default.cyan(
|
|
180456
180557
|
`${getCommandName("project ls")}`
|
|
180457
180558
|
)}`
|
|
180458
180559
|
);
|
|
@@ -180460,7 +180561,7 @@ async function list6(client2, argv) {
|
|
|
180460
180561
|
}
|
|
180461
180562
|
const start = Date.now();
|
|
180462
180563
|
const { contextName } = await getScope(client2);
|
|
180463
|
-
output_manager_default.spinner(`Fetching projects in ${
|
|
180564
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk113.default.bold(contextName)}`);
|
|
180464
180565
|
const flags = processFlags(opts, telemetryClient);
|
|
180465
180566
|
const projectsUrl = buildProjectsUrl(flags);
|
|
180466
180567
|
const {
|
|
@@ -180533,7 +180634,7 @@ function outputJson(client2, projectList, metadata) {
|
|
|
180533
180634
|
function outputTable(projectList, options) {
|
|
180534
180635
|
const { contextName, elapsed: elapsed2, deprecated, opts, pagination } = options;
|
|
180535
180636
|
output_manager_default.log(
|
|
180536
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
|
180637
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk113.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk113.default.gray(`[${elapsed2}]`)}`
|
|
180537
180638
|
);
|
|
180538
180639
|
if (projectList.length > 0) {
|
|
180539
180640
|
printProjectsTable(projectList);
|
|
@@ -180543,12 +180644,12 @@ function outputTable(projectList, options) {
|
|
|
180543
180644
|
function printProjectsTable(projectList) {
|
|
180544
180645
|
const tablePrint = table(
|
|
180545
180646
|
[
|
|
180546
|
-
TABLE_HEADERS.map((header) =>
|
|
180647
|
+
TABLE_HEADERS.map((header) => import_chalk113.default.bold(import_chalk113.default.cyan(header))),
|
|
180547
180648
|
...projectList.flatMap((project) => [
|
|
180548
180649
|
[
|
|
180549
|
-
|
|
180650
|
+
import_chalk113.default.bold(project.name),
|
|
180550
180651
|
getLatestProdUrl(project),
|
|
180551
|
-
|
|
180652
|
+
import_chalk113.default.gray((0, import_ms23.default)(Date.now() - project.updatedAt)),
|
|
180552
180653
|
project.nodeVersion ?? ""
|
|
180553
180654
|
]
|
|
180554
180655
|
])
|
|
@@ -180573,12 +180674,12 @@ function getLatestProdUrl(project) {
|
|
|
180573
180674
|
return `https://${alias2}`;
|
|
180574
180675
|
return "--";
|
|
180575
180676
|
}
|
|
180576
|
-
var import_ms23,
|
|
180677
|
+
var import_ms23, import_chalk113, TABLE_HEADERS, PAGINATION_FLAGS_TO_EXCLUDE, BASE_PROJECTS_URL;
|
|
180577
180678
|
var init_list10 = __esm({
|
|
180578
180679
|
"src/commands/project/list.ts"() {
|
|
180579
180680
|
"use strict";
|
|
180580
180681
|
import_ms23 = __toESM3(require_ms());
|
|
180581
|
-
|
|
180682
|
+
import_chalk113 = __toESM3(require_source());
|
|
180582
180683
|
init_table();
|
|
180583
180684
|
init_get_command_flags();
|
|
180584
180685
|
init_pkg_name();
|
|
@@ -180637,7 +180738,7 @@ async function rm6(client2, argv) {
|
|
|
180637
180738
|
const { args: args2 } = parsedArgs;
|
|
180638
180739
|
if (args2.length !== 1) {
|
|
180639
180740
|
output_manager_default.error(
|
|
180640
|
-
`Invalid number of arguments. Usage: ${
|
|
180741
|
+
`Invalid number of arguments. Usage: ${import_chalk114.default.cyan(
|
|
180641
180742
|
`${getCommandName("project rm <name>")}`
|
|
180642
180743
|
)}`
|
|
180643
180744
|
);
|
|
@@ -180667,7 +180768,7 @@ async function rm6(client2, argv) {
|
|
|
180667
180768
|
}
|
|
180668
180769
|
const elapsed2 = (0, import_ms24.default)(Date.now() - start);
|
|
180669
180770
|
output_manager_default.log(
|
|
180670
|
-
`${
|
|
180771
|
+
`${import_chalk114.default.cyan("Success!")} Project ${import_chalk114.default.bold(name)} removed ${import_chalk114.default.gray(
|
|
180671
180772
|
`[${elapsed2}]`
|
|
180672
180773
|
)}`
|
|
180673
180774
|
);
|
|
@@ -180676,22 +180777,22 @@ async function rm6(client2, argv) {
|
|
|
180676
180777
|
async function readConfirmation3(client2, projectName) {
|
|
180677
180778
|
output_manager_default.print(
|
|
180678
180779
|
prependEmoji(
|
|
180679
|
-
`The project ${
|
|
180780
|
+
`The project ${import_chalk114.default.bold(projectName)} will be removed permanently.
|
|
180680
180781
|
It will also delete everything under the project including deployments.
|
|
180681
180782
|
`,
|
|
180682
180783
|
emoji("warning")
|
|
180683
180784
|
)
|
|
180684
180785
|
);
|
|
180685
180786
|
return await client2.input.confirm(
|
|
180686
|
-
`${
|
|
180787
|
+
`${import_chalk114.default.bold.red("Are you sure?")}`,
|
|
180687
180788
|
false
|
|
180688
180789
|
);
|
|
180689
180790
|
}
|
|
180690
|
-
var
|
|
180791
|
+
var import_chalk114, import_ms24, e;
|
|
180691
180792
|
var init_rm10 = __esm({
|
|
180692
180793
|
"src/commands/project/rm.ts"() {
|
|
180693
180794
|
"use strict";
|
|
180694
|
-
|
|
180795
|
+
import_chalk114 = __toESM3(require_source());
|
|
180695
180796
|
import_ms24 = __toESM3(require_ms());
|
|
180696
180797
|
init_emoji();
|
|
180697
180798
|
init_errors_ts();
|
|
@@ -180859,7 +180960,7 @@ async function getProjectByDeployment({
|
|
|
180859
180960
|
let team;
|
|
180860
180961
|
try {
|
|
180861
180962
|
output_manager_default?.spinner(
|
|
180862
|
-
`Fetching deployment "${deployId}" in ${
|
|
180963
|
+
`Fetching deployment "${deployId}" in ${import_chalk115.default.bold(contextName)}\u2026`
|
|
180863
180964
|
);
|
|
180864
180965
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
180865
180966
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -180876,12 +180977,12 @@ async function getProjectByDeployment({
|
|
|
180876
180977
|
team = teamResult.value;
|
|
180877
180978
|
deployment = deploymentResult.value;
|
|
180878
180979
|
output_manager_default?.log(
|
|
180879
|
-
`Fetching deployment "${deployId}" in ${
|
|
180980
|
+
`Fetching deployment "${deployId}" in ${import_chalk115.default.bold(contextName)}\u2026`
|
|
180880
180981
|
);
|
|
180881
180982
|
if (deployment.team?.id) {
|
|
180882
180983
|
if (!team || deployment.team.id !== team.id) {
|
|
180883
180984
|
const err = new Error(
|
|
180884
|
-
team ? `Deployment doesn't belong to current team ${
|
|
180985
|
+
team ? `Deployment doesn't belong to current team ${import_chalk115.default.bold(
|
|
180885
180986
|
contextName
|
|
180886
180987
|
)}` : `Deployment belongs to a different team`
|
|
180887
180988
|
);
|
|
@@ -180890,7 +180991,7 @@ async function getProjectByDeployment({
|
|
|
180890
180991
|
}
|
|
180891
180992
|
} else if (team) {
|
|
180892
180993
|
const err = new Error(
|
|
180893
|
-
`Deployment doesn't belong to current team ${
|
|
180994
|
+
`Deployment doesn't belong to current team ${import_chalk115.default.bold(contextName)}`
|
|
180894
180995
|
);
|
|
180895
180996
|
err.code = "ERR_INVALID_TEAM";
|
|
180896
180997
|
throw err;
|
|
@@ -180911,11 +181012,11 @@ async function getProjectByDeployment({
|
|
|
180911
181012
|
output_manager_default?.stopSpinner();
|
|
180912
181013
|
}
|
|
180913
181014
|
}
|
|
180914
|
-
var
|
|
181015
|
+
var import_chalk115;
|
|
180915
181016
|
var init_get_project_by_deployment = __esm({
|
|
180916
181017
|
"src/util/projects/get-project-by-deployment.ts"() {
|
|
180917
181018
|
"use strict";
|
|
180918
|
-
|
|
181019
|
+
import_chalk115 = __toESM3(require_source());
|
|
180919
181020
|
init_get_deployment();
|
|
180920
181021
|
init_get_project_by_id_or_name();
|
|
180921
181022
|
init_get_scope();
|
|
@@ -180929,21 +181030,21 @@ var init_get_project_by_deployment = __esm({
|
|
|
180929
181030
|
// src/util/alias/render-alias-status.ts
|
|
180930
181031
|
function renderAliasStatus(status3) {
|
|
180931
181032
|
if (status3 === "completed") {
|
|
180932
|
-
return
|
|
181033
|
+
return import_chalk116.default.green(status3);
|
|
180933
181034
|
}
|
|
180934
181035
|
if (status3 === "failed") {
|
|
180935
|
-
return
|
|
181036
|
+
return import_chalk116.default.red(status3);
|
|
180936
181037
|
}
|
|
180937
181038
|
if (status3 === "skipped") {
|
|
180938
|
-
return
|
|
181039
|
+
return import_chalk116.default.gray(status3);
|
|
180939
181040
|
}
|
|
180940
|
-
return
|
|
181041
|
+
return import_chalk116.default.yellow(status3);
|
|
180941
181042
|
}
|
|
180942
|
-
var
|
|
181043
|
+
var import_chalk116;
|
|
180943
181044
|
var init_render_alias_status = __esm({
|
|
180944
181045
|
"src/util/alias/render-alias-status.ts"() {
|
|
180945
181046
|
"use strict";
|
|
180946
|
-
|
|
181047
|
+
import_chalk116 = __toESM3(require_source());
|
|
180947
181048
|
}
|
|
180948
181049
|
});
|
|
180949
181050
|
|
|
@@ -181050,7 +181151,7 @@ async function promoteStatus({
|
|
|
181050
181151
|
}
|
|
181051
181152
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
|
181052
181153
|
output_manager_default.log(
|
|
181053
|
-
`The promotion exceeded its deadline - rerun ${
|
|
181154
|
+
`The promotion exceeded its deadline - rerun ${import_chalk117.default.bold(
|
|
181054
181155
|
`${packageName} promote ${toDeploymentId}`
|
|
181055
181156
|
)} to try again`
|
|
181056
181157
|
);
|
|
@@ -181114,26 +181215,26 @@ async function renderJobSucceeded({
|
|
|
181114
181215
|
let deploymentInfo = "";
|
|
181115
181216
|
try {
|
|
181116
181217
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
181117
|
-
deploymentInfo = `${
|
|
181218
|
+
deploymentInfo = `${import_chalk117.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
181118
181219
|
} catch (err) {
|
|
181119
181220
|
output_manager_default.debug(
|
|
181120
181221
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
181121
181222
|
);
|
|
181122
|
-
deploymentInfo =
|
|
181223
|
+
deploymentInfo = import_chalk117.default.bold(toDeploymentId);
|
|
181123
181224
|
}
|
|
181124
181225
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
|
181125
181226
|
output_manager_default.log(
|
|
181126
|
-
`Success! ${
|
|
181227
|
+
`Success! ${import_chalk117.default.bold(
|
|
181127
181228
|
project.name
|
|
181128
181229
|
)} was promoted to ${deploymentInfo} ${duration}`
|
|
181129
181230
|
);
|
|
181130
181231
|
return 0;
|
|
181131
181232
|
}
|
|
181132
|
-
var
|
|
181233
|
+
var import_chalk117, import_ms25;
|
|
181133
181234
|
var init_status2 = __esm({
|
|
181134
181235
|
"src/commands/promote/status.ts"() {
|
|
181135
181236
|
"use strict";
|
|
181136
|
-
|
|
181237
|
+
import_chalk117 = __toESM3(require_source());
|
|
181137
181238
|
init_elapsed();
|
|
181138
181239
|
init_format_date();
|
|
181139
181240
|
init_get_deployment();
|
|
@@ -181190,7 +181291,7 @@ async function requestPromote({
|
|
|
181190
181291
|
}
|
|
181191
181292
|
);
|
|
181192
181293
|
output_manager_default.log(
|
|
181193
|
-
`Successfully created new deployment of ${
|
|
181294
|
+
`Successfully created new deployment of ${import_chalk118.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
|
181194
181295
|
);
|
|
181195
181296
|
return 0;
|
|
181196
181297
|
}
|
|
@@ -181211,7 +181312,7 @@ async function requestPromote({
|
|
|
181211
181312
|
}
|
|
181212
181313
|
if (timeout !== void 0 && (0, import_ms26.default)(timeout) === 0) {
|
|
181213
181314
|
output_manager_default.log(
|
|
181214
|
-
`Successfully requested promote of ${
|
|
181315
|
+
`Successfully requested promote of ${import_chalk118.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
181215
181316
|
);
|
|
181216
181317
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
|
181217
181318
|
return 0;
|
|
@@ -181224,11 +181325,11 @@ async function requestPromote({
|
|
|
181224
181325
|
timeout
|
|
181225
181326
|
});
|
|
181226
181327
|
}
|
|
181227
|
-
var
|
|
181328
|
+
var import_chalk118, import_ms26;
|
|
181228
181329
|
var init_request_promote = __esm({
|
|
181229
181330
|
"src/commands/promote/request-promote.ts"() {
|
|
181230
181331
|
"use strict";
|
|
181231
|
-
|
|
181332
|
+
import_chalk118 = __toESM3(require_source());
|
|
181232
181333
|
init_pkg_name();
|
|
181233
181334
|
init_get_project_by_deployment();
|
|
181234
181335
|
import_ms26 = __toESM3(require_ms());
|
|
@@ -181389,7 +181490,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181389
181490
|
let team;
|
|
181390
181491
|
try {
|
|
181391
181492
|
output_manager_default.spinner(
|
|
181392
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
181493
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk119.default.bold(contextName)}\u2026`
|
|
181393
181494
|
);
|
|
181394
181495
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
181395
181496
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -181406,7 +181507,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181406
181507
|
team = teamResult.value;
|
|
181407
181508
|
deployment = deploymentResult.value;
|
|
181408
181509
|
output_manager_default.log(
|
|
181409
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
181510
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk119.default.bold(contextName)}\u2026`
|
|
181410
181511
|
);
|
|
181411
181512
|
} finally {
|
|
181412
181513
|
output_manager_default.stopSpinner();
|
|
@@ -181414,7 +181515,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181414
181515
|
if (deployment.team?.id) {
|
|
181415
181516
|
if (!team || deployment.team.id !== team.id) {
|
|
181416
181517
|
const err = new Error(
|
|
181417
|
-
team ? `Deployment doesn't belong to current team ${
|
|
181518
|
+
team ? `Deployment doesn't belong to current team ${import_chalk119.default.bold(
|
|
181418
181519
|
contextName
|
|
181419
181520
|
)}` : `Deployment belongs to a different team`
|
|
181420
181521
|
);
|
|
@@ -181423,18 +181524,18 @@ async function getDeploymentByIdOrURL({
|
|
|
181423
181524
|
}
|
|
181424
181525
|
} else if (team) {
|
|
181425
181526
|
const err = new Error(
|
|
181426
|
-
`Deployment doesn't belong to current team ${
|
|
181527
|
+
`Deployment doesn't belong to current team ${import_chalk119.default.bold(contextName)}`
|
|
181427
181528
|
);
|
|
181428
181529
|
err.code = "ERR_INVALID_TEAM";
|
|
181429
181530
|
throw err;
|
|
181430
181531
|
}
|
|
181431
181532
|
return deployment;
|
|
181432
181533
|
}
|
|
181433
|
-
var
|
|
181534
|
+
var import_chalk119;
|
|
181434
181535
|
var init_get_deployment_by_id_or_url = __esm({
|
|
181435
181536
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
|
181436
181537
|
"use strict";
|
|
181437
|
-
|
|
181538
|
+
import_chalk119 = __toESM3(require_source());
|
|
181438
181539
|
init_get_deployment();
|
|
181439
181540
|
init_get_team_by_id();
|
|
181440
181541
|
init_is_valid_name();
|
|
@@ -181573,14 +181674,14 @@ async function redeploy(client2) {
|
|
|
181573
181674
|
}
|
|
181574
181675
|
output_manager_default.print(
|
|
181575
181676
|
`${prependEmoji(
|
|
181576
|
-
`Inspect: ${
|
|
181677
|
+
`Inspect: ${import_chalk120.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
|
181577
181678
|
emoji("inspect")
|
|
181578
181679
|
)}
|
|
181579
181680
|
`
|
|
181580
181681
|
);
|
|
181581
181682
|
output_manager_default.print(
|
|
181582
181683
|
prependEmoji(
|
|
181583
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
|
181684
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk120.default.bold(
|
|
181584
181685
|
previewUrl
|
|
181585
181686
|
)} ${deployStamp()}`,
|
|
181586
181687
|
emoji("success")
|
|
@@ -181656,22 +181757,22 @@ async function redeploy(client2) {
|
|
|
181656
181757
|
}
|
|
181657
181758
|
}
|
|
181658
181759
|
}
|
|
181659
|
-
return printDeploymentStatus(deployment, deployStamp, noWait);
|
|
181760
|
+
return printDeploymentStatus(deployment, deployStamp, noWait, false);
|
|
181660
181761
|
} catch (err) {
|
|
181661
181762
|
output_manager_default.prettyError(err);
|
|
181662
181763
|
if ((0, import_error_utils34.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
|
181663
181764
|
output_manager_default.error(
|
|
181664
|
-
`Use ${
|
|
181765
|
+
`Use ${import_chalk120.default.bold("vc switch")} to change your current team`
|
|
181665
181766
|
);
|
|
181666
181767
|
}
|
|
181667
181768
|
return 1;
|
|
181668
181769
|
}
|
|
181669
181770
|
}
|
|
181670
|
-
var
|
|
181771
|
+
var import_chalk120, import_client13, import_error_utils34;
|
|
181671
181772
|
var init_redeploy2 = __esm({
|
|
181672
181773
|
"src/commands/redeploy/index.ts"() {
|
|
181673
181774
|
"use strict";
|
|
181674
|
-
|
|
181775
|
+
import_chalk120 = __toESM3(require_source());
|
|
181675
181776
|
import_client13 = __toESM3(require_dist7());
|
|
181676
181777
|
init_emoji();
|
|
181677
181778
|
init_get_args();
|
|
@@ -181879,7 +181980,7 @@ async function remove5(client2) {
|
|
|
181879
181980
|
}
|
|
181880
181981
|
const { contextName } = await getScope(client2);
|
|
181881
181982
|
output_manager_default.spinner(
|
|
181882
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
|
181983
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk121.default.bold(contextName)}`
|
|
181883
181984
|
);
|
|
181884
181985
|
let aliases;
|
|
181885
181986
|
let projects;
|
|
@@ -181945,7 +182046,7 @@ async function remove5(client2) {
|
|
|
181945
182046
|
});
|
|
181946
182047
|
if (deployments.length === 0 && projects.length === 0) {
|
|
181947
182048
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
|
181948
|
-
const stylizedIds = ids.map((id) =>
|
|
182049
|
+
const stylizedIds = ids.map((id) => import_chalk121.default.bold(`"${id}"`)).join(", ");
|
|
181949
182050
|
const commandName = getCommandName("projects ls");
|
|
181950
182051
|
log2(
|
|
181951
182052
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
|
@@ -181953,7 +182054,7 @@ async function remove5(client2) {
|
|
|
181953
182054
|
return 1;
|
|
181954
182055
|
}
|
|
181955
182056
|
log2(
|
|
181956
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
|
182057
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk121.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
|
181957
182058
|
);
|
|
181958
182059
|
if (deployments.length > 200) {
|
|
181959
182060
|
output_manager_default.warn(
|
|
@@ -181980,11 +182081,11 @@ async function remove5(client2) {
|
|
|
181980
182081
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
|
181981
182082
|
);
|
|
181982
182083
|
deployments.forEach((depl) => {
|
|
181983
|
-
output_manager_default.print(`${
|
|
182084
|
+
output_manager_default.print(`${import_chalk121.default.gray("-")} ${import_chalk121.default.bold(depl.url)}
|
|
181984
182085
|
`);
|
|
181985
182086
|
});
|
|
181986
182087
|
projects.forEach((project) => {
|
|
181987
|
-
output_manager_default.print(`${
|
|
182088
|
+
output_manager_default.print(`${import_chalk121.default.gray("-")} ${import_chalk121.default.bold(project.name)}
|
|
181988
182089
|
`);
|
|
181989
182090
|
});
|
|
181990
182091
|
return 0;
|
|
@@ -182001,8 +182102,8 @@ function readConfirmation4(deployments, projects) {
|
|
|
182001
182102
|
);
|
|
182002
182103
|
const deploymentTable = table(
|
|
182003
182104
|
deployments.map((depl) => {
|
|
182004
|
-
const time =
|
|
182005
|
-
const url3 = depl.url ?
|
|
182105
|
+
const time = import_chalk121.default.gray(`${(0, import_ms28.default)(Date.now() - depl.createdAt)} ago`);
|
|
182106
|
+
const url3 = depl.url ? import_chalk121.default.underline(`https://${depl.url}`) : "";
|
|
182006
182107
|
return [` ${depl.id}`, url3, time];
|
|
182007
182108
|
}),
|
|
182008
182109
|
{ align: ["l", "r", "l"], hsep: 6 }
|
|
@@ -182013,7 +182114,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
182013
182114
|
for (const depl of deployments) {
|
|
182014
182115
|
for (const { alias: alias2 } of depl.aliases) {
|
|
182015
182116
|
output_manager_default.warn(
|
|
182016
|
-
`${
|
|
182117
|
+
`${import_chalk121.default.underline(`https://${alias2}`)} is an alias for ${import_chalk121.default.bold(depl.url)} and will be removed`
|
|
182017
182118
|
);
|
|
182018
182119
|
}
|
|
182019
182120
|
}
|
|
@@ -182027,12 +182128,12 @@ function readConfirmation4(deployments, projects) {
|
|
|
182027
182128
|
`
|
|
182028
182129
|
);
|
|
182029
182130
|
for (const project of projects) {
|
|
182030
|
-
output_manager_default.print(`${
|
|
182131
|
+
output_manager_default.print(`${import_chalk121.default.gray("-")} ${import_chalk121.default.bold(project.name)}
|
|
182031
182132
|
`);
|
|
182032
182133
|
}
|
|
182033
182134
|
}
|
|
182034
182135
|
output_manager_default.print(
|
|
182035
|
-
`${
|
|
182136
|
+
`${import_chalk121.default.bold.red("> Are you sure?")} ${import_chalk121.default.gray("(y/N) ")}`
|
|
182036
182137
|
);
|
|
182037
182138
|
process.stdin.on("data", (d) => {
|
|
182038
182139
|
process.stdin.pause();
|
|
@@ -182049,11 +182150,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
|
182049
182150
|
}
|
|
182050
182151
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
|
182051
182152
|
}
|
|
182052
|
-
var
|
|
182153
|
+
var import_chalk121, import_ms28, import_pluralize11;
|
|
182053
182154
|
var init_remove6 = __esm({
|
|
182054
182155
|
"src/commands/remove/index.ts"() {
|
|
182055
182156
|
"use strict";
|
|
182056
|
-
|
|
182157
|
+
import_chalk121 = __toESM3(require_source());
|
|
182057
182158
|
import_ms28 = __toESM3(require_ms());
|
|
182058
182159
|
import_pluralize11 = __toESM3(require_pluralize());
|
|
182059
182160
|
init_table();
|
|
@@ -182149,7 +182250,7 @@ async function rollbackStatus({
|
|
|
182149
182250
|
}
|
|
182150
182251
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
|
182151
182252
|
output_manager_default.log(
|
|
182152
|
-
`The rollback exceeded its deadline - rerun ${
|
|
182253
|
+
`The rollback exceeded its deadline - rerun ${import_chalk122.default.bold(
|
|
182153
182254
|
`${packageName} rollback ${toDeploymentId}`
|
|
182154
182255
|
)} to try again`
|
|
182155
182256
|
);
|
|
@@ -182213,26 +182314,26 @@ async function renderJobSucceeded2({
|
|
|
182213
182314
|
let deploymentInfo = "";
|
|
182214
182315
|
try {
|
|
182215
182316
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
182216
|
-
deploymentInfo = `${
|
|
182317
|
+
deploymentInfo = `${import_chalk122.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
182217
182318
|
} catch (err) {
|
|
182218
182319
|
output_manager_default.debug(
|
|
182219
182320
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
182220
182321
|
);
|
|
182221
|
-
deploymentInfo =
|
|
182322
|
+
deploymentInfo = import_chalk122.default.bold(toDeploymentId);
|
|
182222
182323
|
}
|
|
182223
182324
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
|
182224
182325
|
output_manager_default.log(
|
|
182225
|
-
`Success! ${
|
|
182326
|
+
`Success! ${import_chalk122.default.bold(
|
|
182226
182327
|
project.name
|
|
182227
182328
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
|
182228
182329
|
);
|
|
182229
182330
|
return 0;
|
|
182230
182331
|
}
|
|
182231
|
-
var
|
|
182332
|
+
var import_chalk122, import_ms29;
|
|
182232
182333
|
var init_status3 = __esm({
|
|
182233
182334
|
"src/commands/rollback/status.ts"() {
|
|
182234
182335
|
"use strict";
|
|
182235
|
-
|
|
182336
|
+
import_chalk122 = __toESM3(require_source());
|
|
182236
182337
|
init_elapsed();
|
|
182237
182338
|
init_format_date();
|
|
182238
182339
|
init_get_deployment();
|
|
@@ -182264,7 +182365,7 @@ async function requestRollback({
|
|
|
182264
182365
|
});
|
|
182265
182366
|
if (timeout !== void 0 && (0, import_ms30.default)(timeout) === 0) {
|
|
182266
182367
|
output_manager_default.log(
|
|
182267
|
-
`Successfully requested rollback of ${
|
|
182368
|
+
`Successfully requested rollback of ${import_chalk123.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
182268
182369
|
);
|
|
182269
182370
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
|
182270
182371
|
return 0;
|
|
@@ -182277,11 +182378,11 @@ async function requestRollback({
|
|
|
182277
182378
|
timeout
|
|
182278
182379
|
});
|
|
182279
182380
|
}
|
|
182280
|
-
var
|
|
182381
|
+
var import_chalk123, import_ms30;
|
|
182281
182382
|
var init_request_rollback = __esm({
|
|
182282
182383
|
"src/commands/rollback/request-rollback.ts"() {
|
|
182283
182384
|
"use strict";
|
|
182284
|
-
|
|
182385
|
+
import_chalk123 = __toESM3(require_source());
|
|
182285
182386
|
init_pkg_name();
|
|
182286
182387
|
init_get_project_by_deployment();
|
|
182287
182388
|
import_ms30 = __toESM3(require_ms());
|
|
@@ -182951,17 +183052,17 @@ function formatBranchMatcher(branchMatcher) {
|
|
|
182951
183052
|
if (branchMatcher?.type === "equals") {
|
|
182952
183053
|
return branchMatcher.pattern;
|
|
182953
183054
|
} else if (branchMatcher?.type === "startsWith") {
|
|
182954
|
-
return `${branchMatcher.pattern}${
|
|
183055
|
+
return `${branchMatcher.pattern}${import_chalk124.default.dim("*")}`;
|
|
182955
183056
|
} else if (branchMatcher?.type === "endsWith") {
|
|
182956
|
-
return `${
|
|
183057
|
+
return `${import_chalk124.default.dim("*")}${branchMatcher.pattern}`;
|
|
182957
183058
|
}
|
|
182958
|
-
return
|
|
183059
|
+
return import_chalk124.default.dim("No branch configuration");
|
|
182959
183060
|
}
|
|
182960
183061
|
async function list7(client2, argv) {
|
|
182961
183062
|
const { cwd } = client2;
|
|
182962
183063
|
if (argv.length !== 0) {
|
|
182963
183064
|
output_manager_default.error(
|
|
182964
|
-
`Invalid number of arguments. Usage: ${
|
|
183065
|
+
`Invalid number of arguments. Usage: ${import_chalk124.default.cyan(
|
|
182965
183066
|
`${getCommandName("target ls")}`
|
|
182966
183067
|
)}`
|
|
182967
183068
|
);
|
|
@@ -182985,12 +183086,12 @@ async function list7(client2, argv) {
|
|
|
182985
183086
|
const elapsed2 = (0, import_ms32.default)(Date.now() - start);
|
|
182986
183087
|
result = withDefaultEnvironmentsIncluded(result);
|
|
182987
183088
|
output_manager_default.log(
|
|
182988
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
|
183089
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk124.default.gray(`[${elapsed2}]`)}`
|
|
182989
183090
|
);
|
|
182990
183091
|
const tablePrint = table(
|
|
182991
183092
|
[
|
|
182992
183093
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
|
182993
|
-
(header) =>
|
|
183094
|
+
(header) => import_chalk124.default.bold(import_chalk124.default.cyan(header))
|
|
182994
183095
|
),
|
|
182995
183096
|
...result.flatMap((target) => {
|
|
182996
183097
|
return [
|
|
@@ -182998,7 +183099,7 @@ async function list7(client2, argv) {
|
|
|
182998
183099
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
|
182999
183100
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
|
183000
183101
|
TYPE_MAP[target.type],
|
|
183001
|
-
|
|
183102
|
+
import_chalk124.default.gray(
|
|
183002
183103
|
target.updatedAt > 0 ? (0, import_ms32.default)(Date.now() - target.updatedAt) : "-"
|
|
183003
183104
|
)
|
|
183004
183105
|
]
|
|
@@ -183045,12 +183146,12 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
|
183045
183146
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
|
183046
183147
|
];
|
|
183047
183148
|
}
|
|
183048
|
-
var import_ms32,
|
|
183149
|
+
var import_ms32, import_chalk124, TYPE_MAP, BRANCH_TRACKING_MAP;
|
|
183049
183150
|
var init_list11 = __esm({
|
|
183050
183151
|
"src/commands/target/list.ts"() {
|
|
183051
183152
|
"use strict";
|
|
183052
183153
|
import_ms32 = __toESM3(require_ms());
|
|
183053
|
-
|
|
183154
|
+
import_chalk124 = __toESM3(require_source());
|
|
183054
183155
|
init_table();
|
|
183055
183156
|
init_output_manager();
|
|
183056
183157
|
init_command32();
|
|
@@ -183065,8 +183166,8 @@ var init_list11 = __esm({
|
|
|
183065
183166
|
};
|
|
183066
183167
|
BRANCH_TRACKING_MAP = {
|
|
183067
183168
|
production: (project) => project.link?.productionBranch ?? "main",
|
|
183068
|
-
preview: (_, env) => env.slug === "preview" ?
|
|
183069
|
-
development: () =>
|
|
183169
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk124.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
|
183170
|
+
development: () => import_chalk124.default.dim("Accessible via CLI")
|
|
183070
183171
|
};
|
|
183071
183172
|
}
|
|
183072
183173
|
});
|
|
@@ -183261,7 +183362,7 @@ async function list8(client2, argv) {
|
|
|
183261
183362
|
client2.stdout.write("\n");
|
|
183262
183363
|
const teamTable = table(
|
|
183263
183364
|
[
|
|
183264
|
-
["id", "Team name"].map((str) => (0,
|
|
183365
|
+
["id", "Team name"].map((str) => (0, import_chalk125.gray)(str)),
|
|
183265
183366
|
...teamList.map((team) => [team.value, team.name])
|
|
183266
183367
|
],
|
|
183267
183368
|
{ hsep: 5 }
|
|
@@ -183278,13 +183379,13 @@ async function list8(client2, argv) {
|
|
|
183278
183379
|
}
|
|
183279
183380
|
return 0;
|
|
183280
183381
|
}
|
|
183281
|
-
var
|
|
183382
|
+
var import_chalk125;
|
|
183282
183383
|
var init_list13 = __esm({
|
|
183283
183384
|
"src/commands/teams/list.ts"() {
|
|
183284
183385
|
"use strict";
|
|
183285
183386
|
init_chars();
|
|
183286
183387
|
init_table();
|
|
183287
|
-
|
|
183388
|
+
import_chalk125 = __toESM3(require_source());
|
|
183288
183389
|
init_get_user();
|
|
183289
183390
|
init_get_teams();
|
|
183290
183391
|
init_pkg_name();
|
|
@@ -183379,7 +183480,7 @@ Please select a team scope using ${getCommandName(
|
|
|
183379
183480
|
return 1;
|
|
183380
183481
|
}
|
|
183381
183482
|
output_manager_default.log(
|
|
183382
|
-
introMsg || `Inviting team members to ${
|
|
183483
|
+
introMsg || `Inviting team members to ${import_chalk126.default.bold(currentTeam.name)}`
|
|
183383
183484
|
);
|
|
183384
183485
|
telemetry2.trackCliArgumentEmail(emails);
|
|
183385
183486
|
if (emails.length > 0) {
|
|
@@ -183399,10 +183500,10 @@ Please select a team scope using ${getCommandName(
|
|
|
183399
183500
|
throw err;
|
|
183400
183501
|
}
|
|
183401
183502
|
output_manager_default.log(
|
|
183402
|
-
`${
|
|
183503
|
+
`${import_chalk126.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
|
183403
183504
|
);
|
|
183404
183505
|
} else {
|
|
183405
|
-
output_manager_default.log(`${
|
|
183506
|
+
output_manager_default.log(`${import_chalk126.default.red(`\u2716 ${email3}`)} ${import_chalk126.default.gray("[invalid]")}`);
|
|
183406
183507
|
}
|
|
183407
183508
|
}
|
|
183408
183509
|
return 0;
|
|
@@ -183435,15 +183536,15 @@ Please select a team scope using ${getCommandName(
|
|
|
183435
183536
|
);
|
|
183436
183537
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
|
183437
183538
|
emails.push(email2);
|
|
183438
|
-
output_manager_default.log(`${
|
|
183539
|
+
output_manager_default.log(`${import_chalk126.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
|
183439
183540
|
if (hasError) {
|
|
183440
183541
|
hasError = false;
|
|
183441
183542
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
183442
183543
|
output_manager_default.log(
|
|
183443
|
-
introMsg || `Inviting team members to ${
|
|
183544
|
+
introMsg || `Inviting team members to ${import_chalk126.default.bold(currentTeam.name)}`
|
|
183444
183545
|
);
|
|
183445
183546
|
for (const email3 of emails) {
|
|
183446
|
-
output_manager_default.log(`${
|
|
183547
|
+
output_manager_default.log(`${import_chalk126.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
183447
183548
|
}
|
|
183448
183549
|
}
|
|
183449
183550
|
} catch (err) {
|
|
@@ -183452,7 +183553,7 @@ Please select a team scope using ${getCommandName(
|
|
|
183452
183553
|
output_manager_default.error((0, import_error_utils36.errorToString)(err));
|
|
183453
183554
|
hasError = true;
|
|
183454
183555
|
for (const email3 of emails) {
|
|
183455
|
-
output_manager_default.log(`${
|
|
183556
|
+
output_manager_default.log(`${import_chalk126.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
|
183456
183557
|
}
|
|
183457
183558
|
}
|
|
183458
183559
|
}
|
|
@@ -183465,16 +183566,16 @@ Please select a team scope using ${getCommandName(
|
|
|
183465
183566
|
} else {
|
|
183466
183567
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
|
183467
183568
|
for (const email3 of emails) {
|
|
183468
|
-
output_manager_default.log(`${
|
|
183569
|
+
output_manager_default.log(`${import_chalk126.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
183469
183570
|
}
|
|
183470
183571
|
}
|
|
183471
183572
|
return 0;
|
|
183472
183573
|
}
|
|
183473
|
-
var
|
|
183574
|
+
var import_chalk126, import_error_utils36, validateEmail2, domains;
|
|
183474
183575
|
var init_invite2 = __esm({
|
|
183475
183576
|
"src/commands/teams/invite.ts"() {
|
|
183476
183577
|
"use strict";
|
|
183477
|
-
|
|
183578
|
+
import_chalk126 = __toESM3(require_source());
|
|
183478
183579
|
init_cmd();
|
|
183479
183580
|
init_stamp();
|
|
183480
183581
|
init_param();
|
|
@@ -183550,7 +183651,7 @@ async function add7(client2) {
|
|
|
183550
183651
|
let team;
|
|
183551
183652
|
let elapsed2;
|
|
183552
183653
|
output_manager_default.log(
|
|
183553
|
-
`Pick a team identifier for its URL (e.g.: ${
|
|
183654
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk127.default.cyan(
|
|
183554
183655
|
"`vercel.com/acme`"
|
|
183555
183656
|
)})`
|
|
183556
183657
|
);
|
|
@@ -183581,7 +183682,7 @@ async function add7(client2) {
|
|
|
183581
183682
|
output_manager_default.stopSpinner();
|
|
183582
183683
|
process.stdout.write(eraseLines(2));
|
|
183583
183684
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
|
183584
|
-
output_manager_default.log(`${
|
|
183685
|
+
output_manager_default.log(`${import_chalk127.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
|
183585
183686
|
`);
|
|
183586
183687
|
output_manager_default.log("Pick a display name for your team");
|
|
183587
183688
|
let name;
|
|
@@ -183604,7 +183705,7 @@ async function add7(client2) {
|
|
|
183604
183705
|
process.stdout.write(eraseLines(2));
|
|
183605
183706
|
team = Object.assign(team, res);
|
|
183606
183707
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
|
183607
|
-
output_manager_default.log(`${
|
|
183708
|
+
output_manager_default.log(`${import_chalk127.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
|
183608
183709
|
`);
|
|
183609
183710
|
output_manager_default.spinner("Saving");
|
|
183610
183711
|
client2.config.currentTeam = team.id;
|
|
@@ -183618,11 +183719,11 @@ async function add7(client2) {
|
|
|
183618
183719
|
});
|
|
183619
183720
|
return 0;
|
|
183620
183721
|
}
|
|
183621
|
-
var
|
|
183722
|
+
var import_chalk127, import_error_utils37, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
|
183622
183723
|
var init_add13 = __esm({
|
|
183623
183724
|
"src/commands/teams/add.ts"() {
|
|
183624
183725
|
"use strict";
|
|
183625
|
-
|
|
183726
|
+
import_chalk127 = __toESM3(require_source());
|
|
183626
183727
|
init_stamp();
|
|
183627
183728
|
init_erase_lines();
|
|
183628
183729
|
init_chars();
|
|
@@ -183635,7 +183736,7 @@ var init_add13 = __esm({
|
|
|
183635
183736
|
init_output_manager();
|
|
183636
183737
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
|
183637
183738
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
|
183638
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
|
183739
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk127.default.gray("vercel.com/");
|
|
183639
183740
|
teamNamePrefix = "Team Name".padEnd(14);
|
|
183640
183741
|
}
|
|
183641
183742
|
});
|
|
@@ -183694,7 +183795,7 @@ async function change(client2, argv) {
|
|
|
183694
183795
|
let title9 = `${team.name} (${team.slug})`;
|
|
183695
183796
|
const selected = team.id === currentTeam?.id;
|
|
183696
183797
|
if (selected) {
|
|
183697
|
-
title9 += ` ${
|
|
183798
|
+
title9 += ` ${import_chalk128.default.bold("(current)")}`;
|
|
183698
183799
|
}
|
|
183699
183800
|
if (team.limited) {
|
|
183700
183801
|
title9 += ` ${emoji("locked")}`;
|
|
@@ -183706,7 +183807,7 @@ async function change(client2, argv) {
|
|
|
183706
183807
|
selected
|
|
183707
183808
|
};
|
|
183708
183809
|
});
|
|
183709
|
-
let suffix = personalScopeSelected ? ` ${
|
|
183810
|
+
let suffix = personalScopeSelected ? ` ${import_chalk128.default.bold("(current)")}` : "";
|
|
183710
183811
|
if (user.limited) {
|
|
183711
183812
|
suffix += ` ${emoji("locked")}`;
|
|
183712
183813
|
}
|
|
@@ -183752,14 +183853,14 @@ async function change(client2, argv) {
|
|
|
183752
183853
|
}
|
|
183753
183854
|
updateCurrentTeam(config2);
|
|
183754
183855
|
output_manager_default.success(
|
|
183755
|
-
`Your account (${
|
|
183856
|
+
`Your account (${import_chalk128.default.bold(user.username)}) is now active!`
|
|
183756
183857
|
);
|
|
183757
183858
|
return 0;
|
|
183758
183859
|
}
|
|
183759
183860
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
|
183760
183861
|
if (!newTeam) {
|
|
183761
183862
|
output_manager_default.error(
|
|
183762
|
-
`You do not have permission to access scope ${
|
|
183863
|
+
`You do not have permission to access scope ${import_chalk128.default.bold(desiredSlug)}.`
|
|
183763
183864
|
);
|
|
183764
183865
|
return 1;
|
|
183765
183866
|
}
|
|
@@ -183777,15 +183878,15 @@ async function change(client2, argv) {
|
|
|
183777
183878
|
}
|
|
183778
183879
|
updateCurrentTeam(config2, newTeam);
|
|
183779
183880
|
output_manager_default.success(
|
|
183780
|
-
`The team ${
|
|
183881
|
+
`The team ${import_chalk128.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
|
183781
183882
|
);
|
|
183782
183883
|
return 0;
|
|
183783
183884
|
}
|
|
183784
|
-
var
|
|
183885
|
+
var import_chalk128, updateCurrentTeam;
|
|
183785
183886
|
var init_switch2 = __esm({
|
|
183786
183887
|
"src/commands/teams/switch.ts"() {
|
|
183787
183888
|
"use strict";
|
|
183788
|
-
|
|
183889
|
+
import_chalk128 = __toESM3(require_source());
|
|
183789
183890
|
init_emoji();
|
|
183790
183891
|
init_get_user();
|
|
183791
183892
|
init_get_teams();
|
|
@@ -183964,13 +184065,13 @@ var init_teams2 = __esm({
|
|
|
183964
184065
|
// src/commands/telemetry/status.ts
|
|
183965
184066
|
async function status2(client2) {
|
|
183966
184067
|
const enabled = client2.config.telemetry?.enabled !== false;
|
|
183967
|
-
const status3 = enabled ?
|
|
184068
|
+
const status3 = enabled ? import_chalk129.default.green("Enabled") : import_chalk129.default.red("Disabled");
|
|
183968
184069
|
output_manager_default.print("\n");
|
|
183969
|
-
output_manager_default.log(`${
|
|
184070
|
+
output_manager_default.log(`${import_chalk129.default.bold("Telemetry status")}: ${status3}
|
|
183970
184071
|
`);
|
|
183971
184072
|
const learnMoreMessage = `
|
|
183972
184073
|
|
|
183973
|
-
Learn more: ${
|
|
184074
|
+
Learn more: ${import_chalk129.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
|
183974
184075
|
if (enabled) {
|
|
183975
184076
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
|
183976
184077
|
} else {
|
|
@@ -183981,11 +184082,11 @@ Learn more: ${import_chalk128.default.cyan("https://vercel.com/docs/cli/about-te
|
|
|
183981
184082
|
}
|
|
183982
184083
|
return 0;
|
|
183983
184084
|
}
|
|
183984
|
-
var
|
|
184085
|
+
var import_chalk129;
|
|
183985
184086
|
var init_status4 = __esm({
|
|
183986
184087
|
"src/commands/telemetry/status.ts"() {
|
|
183987
184088
|
"use strict";
|
|
183988
|
-
|
|
184089
|
+
import_chalk129 = __toESM3(require_source());
|
|
183989
184090
|
init_output_manager();
|
|
183990
184091
|
}
|
|
183991
184092
|
});
|
|
@@ -184166,7 +184267,7 @@ async function telemetry(client2) {
|
|
|
184166
184267
|
default: {
|
|
184167
184268
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
|
184168
184269
|
output_manager_default.print(
|
|
184169
|
-
`${
|
|
184270
|
+
`${import_chalk130.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
|
184170
184271
|
`
|
|
184171
184272
|
);
|
|
184172
184273
|
output_manager_default.print(help2(telemetryCommand, { columns: client2.stderr.columns }));
|
|
@@ -184174,7 +184275,7 @@ async function telemetry(client2) {
|
|
|
184174
184275
|
}
|
|
184175
184276
|
}
|
|
184176
184277
|
}
|
|
184177
|
-
var
|
|
184278
|
+
var import_chalk130, COMMAND_CONFIG20;
|
|
184178
184279
|
var init_telemetry3 = __esm({
|
|
184179
184280
|
"src/commands/telemetry/index.ts"() {
|
|
184180
184281
|
"use strict";
|
|
@@ -184189,7 +184290,7 @@ var init_telemetry3 = __esm({
|
|
|
184189
184290
|
init_command34();
|
|
184190
184291
|
init_get_flags_specification();
|
|
184191
184292
|
init_telemetry2();
|
|
184192
|
-
|
|
184293
|
+
import_chalk130 = __toESM3(require_source());
|
|
184193
184294
|
init_output_manager();
|
|
184194
184295
|
init_commands();
|
|
184195
184296
|
COMMAND_CONFIG20 = {
|
|
@@ -184264,7 +184365,7 @@ var import_error_utils38 = __toESM3(require_dist2());
|
|
|
184264
184365
|
var import_path40 = require("path");
|
|
184265
184366
|
var import_fs8 = require("fs");
|
|
184266
184367
|
var import_fs_extra24 = __toESM3(require_lib());
|
|
184267
|
-
var
|
|
184368
|
+
var import_chalk131 = __toESM3(require_source());
|
|
184268
184369
|
var import_epipebomb = __toESM3(require_epipebomb());
|
|
184269
184370
|
|
|
184270
184371
|
// src/util/get-latest-version/index.ts
|
|
@@ -185115,7 +185216,7 @@ function checkGuidanceStatus({ config: config2 }) {
|
|
|
185115
185216
|
}
|
|
185116
185217
|
|
|
185117
185218
|
// src/index.ts
|
|
185118
|
-
var
|
|
185219
|
+
var import_detect_agent4 = require("@vercel/detect-agent");
|
|
185119
185220
|
try {
|
|
185120
185221
|
process.cwd();
|
|
185121
185222
|
} catch (err) {
|
|
@@ -185203,13 +185304,13 @@ var main17 = async () => {
|
|
|
185203
185304
|
const betaCommands = [];
|
|
185204
185305
|
if (betaCommands.includes(targetOrSubcommand)) {
|
|
185205
185306
|
output_manager_default.print(
|
|
185206
|
-
`${
|
|
185307
|
+
`${import_chalk131.default.grey(
|
|
185207
185308
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
|
185208
185309
|
)}
|
|
185209
185310
|
`
|
|
185210
185311
|
);
|
|
185211
185312
|
} else {
|
|
185212
|
-
output_manager_default.print(`${
|
|
185313
|
+
output_manager_default.print(`${import_chalk131.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
|
185213
185314
|
`);
|
|
185214
185315
|
}
|
|
185215
185316
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
|
@@ -185299,7 +185400,7 @@ var main17 = async () => {
|
|
|
185299
185400
|
store: telemetryEventStore
|
|
185300
185401
|
}
|
|
185301
185402
|
});
|
|
185302
|
-
const agent = await (0,
|
|
185403
|
+
const agent = await (0, import_detect_agent4.determineAgent)();
|
|
185303
185404
|
telemetry2.trackAgenticUse(agent);
|
|
185304
185405
|
telemetry2.trackCPUs();
|
|
185305
185406
|
telemetry2.trackPlatform();
|
|
@@ -185785,20 +185886,20 @@ main17().then(async (exitCode2) => {
|
|
|
185785
185886
|
});
|
|
185786
185887
|
if (latest) {
|
|
185787
185888
|
const changelog = "https://github.com/vercel/vercel/releases";
|
|
185788
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
185889
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk131.default.magenta(
|
|
185789
185890
|
`
|
|
185790
185891
|
|
|
185791
|
-
The latest update ${
|
|
185892
|
+
The latest update ${import_chalk131.default.italic(
|
|
185792
185893
|
"may"
|
|
185793
185894
|
)} fix any errors that occurred.`
|
|
185794
185895
|
) : "";
|
|
185795
185896
|
output_manager_default.print(
|
|
185796
185897
|
box(
|
|
185797
|
-
`Update available! ${
|
|
185898
|
+
`Update available! ${import_chalk131.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk131.default.green(
|
|
185798
185899
|
`v${latest}`
|
|
185799
185900
|
)}
|
|
185800
185901
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
185801
|
-
Run ${
|
|
185902
|
+
Run ${import_chalk131.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
|
185802
185903
|
)
|
|
185803
185904
|
);
|
|
185804
185905
|
output_manager_default.print("\n\n");
|