vercel-cli 47.0.7__py3-none-any.whl → 47.1.3__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 +664 -571
- vercel_cli/vendor/node_modules/.package-lock.json +3 -3
- vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +120 -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.3.dist-info}/METADATA +1 -1
- {vercel_cli-47.0.7.dist-info → vercel_cli-47.1.3.dist-info}/RECORD +10 -10
- {vercel_cli-47.0.7.dist-info → vercel_cli-47.1.3.dist-info}/WHEEL +0 -0
- {vercel_cli-47.0.7.dist-info → vercel_cli-47.1.3.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
|
|
|
@@ -149374,13 +149396,36 @@ var init_is_deploying = __esm({
|
|
|
149374
149396
|
}
|
|
149375
149397
|
});
|
|
149376
149398
|
|
|
149399
|
+
// src/util/suggest-next-commands.ts
|
|
149400
|
+
function suggestNextCommands(commands2) {
|
|
149401
|
+
output_manager_default.print(
|
|
149402
|
+
import_chalk62.default.dim(
|
|
149403
|
+
[
|
|
149404
|
+
`Common next commands:`,
|
|
149405
|
+
...commands2.map((command) => `- ${command}`)
|
|
149406
|
+
].join("\n")
|
|
149407
|
+
)
|
|
149408
|
+
);
|
|
149409
|
+
output_manager_default.print("\n");
|
|
149410
|
+
}
|
|
149411
|
+
var import_chalk62;
|
|
149412
|
+
var init_suggest_next_commands = __esm({
|
|
149413
|
+
"src/util/suggest-next-commands.ts"() {
|
|
149414
|
+
"use strict";
|
|
149415
|
+
init_output_manager();
|
|
149416
|
+
import_chalk62 = __toESM3(require_source());
|
|
149417
|
+
}
|
|
149418
|
+
});
|
|
149419
|
+
|
|
149377
149420
|
// src/util/deploy/print-deployment-status.ts
|
|
149378
149421
|
async function printDeploymentStatus({
|
|
149379
149422
|
readyState,
|
|
149380
149423
|
aliasError,
|
|
149381
149424
|
indications,
|
|
149382
|
-
aliasWarning
|
|
149383
|
-
|
|
149425
|
+
aliasWarning,
|
|
149426
|
+
url: url3,
|
|
149427
|
+
target
|
|
149428
|
+
}, deployStamp, noWait, guidanceMode) {
|
|
149384
149429
|
indications = indications || [];
|
|
149385
149430
|
let isStillBuilding = false;
|
|
149386
149431
|
if (noWait) {
|
|
@@ -149415,25 +149460,37 @@ async function printDeploymentStatus({
|
|
|
149415
149460
|
}
|
|
149416
149461
|
const newline = "\n";
|
|
149417
149462
|
for (const indication of indications) {
|
|
149418
|
-
const message2 = prependEmoji(
|
|
149463
|
+
const message2 = prependEmoji(import_chalk63.default.dim(indication.payload), emoji(indication.type)) + newline;
|
|
149419
149464
|
let link4 = "";
|
|
149420
149465
|
if (indication.link)
|
|
149421
|
-
link4 =
|
|
149466
|
+
link4 = import_chalk63.default.dim(
|
|
149422
149467
|
`${indication.action || "Learn More"}: ${link_default(indication.link)}`
|
|
149423
149468
|
) + newline;
|
|
149424
149469
|
output_manager_default.print(message2 + link4);
|
|
149425
149470
|
}
|
|
149471
|
+
if (guidanceMode) {
|
|
149472
|
+
output_manager_default.print("\n");
|
|
149473
|
+
suggestNextCommands(
|
|
149474
|
+
[
|
|
149475
|
+
getCommandName(`inspect ${url3} --logs`),
|
|
149476
|
+
getCommandName(`redeploy ${url3}`),
|
|
149477
|
+
target !== "production" ? getCommandName(`deploy --prod`) : false
|
|
149478
|
+
].filter(Boolean)
|
|
149479
|
+
);
|
|
149480
|
+
}
|
|
149426
149481
|
return 0;
|
|
149427
149482
|
}
|
|
149428
|
-
var
|
|
149483
|
+
var import_chalk63;
|
|
149429
149484
|
var init_print_deployment_status = __esm({
|
|
149430
149485
|
"src/util/deploy/print-deployment-status.ts"() {
|
|
149431
149486
|
"use strict";
|
|
149432
|
-
|
|
149487
|
+
import_chalk63 = __toESM3(require_source());
|
|
149433
149488
|
init_is_deploying();
|
|
149434
149489
|
init_link();
|
|
149435
149490
|
init_emoji();
|
|
149436
149491
|
init_output_manager();
|
|
149492
|
+
init_pkg_name();
|
|
149493
|
+
init_suggest_next_commands();
|
|
149437
149494
|
}
|
|
149438
149495
|
});
|
|
149439
149496
|
|
|
@@ -149591,6 +149648,11 @@ var init_deploy = __esm({
|
|
|
149591
149648
|
this.trackCliFlag("no-logs");
|
|
149592
149649
|
}
|
|
149593
149650
|
}
|
|
149651
|
+
trackCliFlagGuidance(flag) {
|
|
149652
|
+
if (flag) {
|
|
149653
|
+
this.trackCliFlag("guidance");
|
|
149654
|
+
}
|
|
149655
|
+
}
|
|
149594
149656
|
trackCliFlagNoClipboard(flag) {
|
|
149595
149657
|
if (flag) {
|
|
149596
149658
|
this.trackCliFlag("no-clipboard");
|
|
@@ -149647,7 +149709,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
149647
149709
|
}
|
|
149648
149710
|
if (error3 instanceof DomainVerificationFailed) {
|
|
149649
149711
|
output_manager_default.error(
|
|
149650
|
-
`The domain used as a suffix ${
|
|
149712
|
+
`The domain used as a suffix ${import_chalk64.default.underline(
|
|
149651
149713
|
error3.meta.domain
|
|
149652
149714
|
)} is not verified and can't be used as custom suffix.`
|
|
149653
149715
|
);
|
|
@@ -149655,7 +149717,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
149655
149717
|
}
|
|
149656
149718
|
if (error3 instanceof DomainPermissionDenied) {
|
|
149657
149719
|
output_manager_default.error(
|
|
149658
|
-
`You don't have permissions to access the domain used as a suffix ${
|
|
149720
|
+
`You don't have permissions to access the domain used as a suffix ${import_chalk64.default.underline(
|
|
149659
149721
|
error3.meta.domain
|
|
149660
149722
|
)}.`
|
|
149661
149723
|
);
|
|
@@ -149681,7 +149743,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
149681
149743
|
}
|
|
149682
149744
|
if (error3 instanceof DomainNotVerified) {
|
|
149683
149745
|
output_manager_default.error(
|
|
149684
|
-
`The domain used as an alias ${
|
|
149746
|
+
`The domain used as an alias ${import_chalk64.default.underline(
|
|
149685
149747
|
error3.meta.domain
|
|
149686
149748
|
)} is not verified yet. Please verify it.`
|
|
149687
149749
|
);
|
|
@@ -149700,7 +149762,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
149700
149762
|
}
|
|
149701
149763
|
return error3;
|
|
149702
149764
|
}
|
|
149703
|
-
var import_build_utils14, import_client11, import_error_utils21, import_bytes6,
|
|
149765
|
+
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
149766
|
var init_deploy2 = __esm({
|
|
149705
149767
|
"src/commands/deploy/index.ts"() {
|
|
149706
149768
|
"use strict";
|
|
@@ -149708,7 +149770,7 @@ var init_deploy2 = __esm({
|
|
|
149708
149770
|
import_client11 = __toESM3(require_dist7());
|
|
149709
149771
|
import_error_utils21 = __toESM3(require_dist2());
|
|
149710
149772
|
import_bytes6 = __toESM3(require_bytes());
|
|
149711
|
-
|
|
149773
|
+
import_chalk64 = __toESM3(require_source());
|
|
149712
149774
|
import_fs_extra20 = __toESM3(require_lib());
|
|
149713
149775
|
import_ms12 = __toESM3(require_ms());
|
|
149714
149776
|
import_path31 = require("path");
|
|
@@ -149746,6 +149808,7 @@ var init_deploy2 = __esm({
|
|
|
149746
149808
|
init_ensure_link();
|
|
149747
149809
|
init_process_deployment();
|
|
149748
149810
|
init_logs();
|
|
149811
|
+
import_detect_agent = require("@vercel/detect-agent");
|
|
149749
149812
|
deploy_default = async (client2) => {
|
|
149750
149813
|
const telemetryClient = new DeployTelemetryClient({
|
|
149751
149814
|
opts: {
|
|
@@ -149774,6 +149837,7 @@ var init_deploy2 = __esm({
|
|
|
149774
149837
|
telemetryClient.trackCliFlagPublic(parsedArguments.flags["--public"]);
|
|
149775
149838
|
telemetryClient.trackCliFlagLogs(parsedArguments.flags["--logs"]);
|
|
149776
149839
|
telemetryClient.trackCliFlagNoLogs(parsedArguments.flags["--no-logs"]);
|
|
149840
|
+
telemetryClient.trackCliFlagGuidance(parsedArguments.flags["--guidance"]);
|
|
149777
149841
|
telemetryClient.trackCliFlagForce(parsedArguments.flags["--force"]);
|
|
149778
149842
|
telemetryClient.trackCliFlagWithCache(
|
|
149779
149843
|
parsedArguments.flags["--with-cache"]
|
|
@@ -150225,7 +150289,8 @@ ${err.stack}`);
|
|
|
150225
150289
|
printError(err);
|
|
150226
150290
|
return 1;
|
|
150227
150291
|
}
|
|
150228
|
-
|
|
150292
|
+
const guidanceMode = parsedArguments.flags["--guidance"] ?? await (0, import_detect_agent.determineAgent)() !== false;
|
|
150293
|
+
return printDeploymentStatus(deployment, deployStamp, noWait, guidanceMode);
|
|
150229
150294
|
};
|
|
150230
150295
|
addProcessEnv = async (log2, env) => {
|
|
150231
150296
|
let val;
|
|
@@ -150236,15 +150301,15 @@ ${err.stack}`);
|
|
|
150236
150301
|
val = process.env[key];
|
|
150237
150302
|
if (typeof val === "string") {
|
|
150238
150303
|
log2(
|
|
150239
|
-
`Reading ${
|
|
150240
|
-
`"${
|
|
150304
|
+
`Reading ${import_chalk64.default.bold(
|
|
150305
|
+
`"${import_chalk64.default.bold(key)}"`
|
|
150241
150306
|
)} from your env (as no value was specified)`
|
|
150242
150307
|
);
|
|
150243
150308
|
env[key] = val.replace(/^@/, "\\@");
|
|
150244
150309
|
} else {
|
|
150245
150310
|
throw new Error(
|
|
150246
|
-
`No value specified for env variable ${
|
|
150247
|
-
`"${
|
|
150311
|
+
`No value specified for env variable ${import_chalk64.default.bold(
|
|
150312
|
+
`"${import_chalk64.default.bold(key)}"`
|
|
150248
150313
|
)} and it was not found in your env. If you meant to specify an environment to deploy to, use ${param("--target")}`
|
|
150249
150314
|
);
|
|
150250
150315
|
}
|
|
@@ -167984,7 +168049,7 @@ function buildMatchEquals(a, b) {
|
|
|
167984
168049
|
return false;
|
|
167985
168050
|
return true;
|
|
167986
168051
|
}
|
|
167987
|
-
var import_url19, import_http3, import_fs_extra21, import_ms14,
|
|
168052
|
+
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
168053
|
var init_server = __esm({
|
|
167989
168054
|
"src/util/dev/server.ts"() {
|
|
167990
168055
|
"use strict";
|
|
@@ -167992,7 +168057,7 @@ var init_server = __esm({
|
|
|
167992
168057
|
import_http3 = __toESM3(require("http"));
|
|
167993
168058
|
import_fs_extra21 = __toESM3(require_lib());
|
|
167994
168059
|
import_ms14 = __toESM3(require_ms());
|
|
167995
|
-
|
|
168060
|
+
import_chalk65 = __toESM3(require_source());
|
|
167996
168061
|
import_node_fetch6 = __toESM3(require_lib7());
|
|
167997
168062
|
import_pluralize7 = __toESM3(require_pluralize());
|
|
167998
168063
|
import_raw_body = __toESM3(require_raw_body());
|
|
@@ -168070,7 +168135,7 @@ var init_server = __esm({
|
|
|
168070
168135
|
return;
|
|
168071
168136
|
}
|
|
168072
168137
|
const method = req.method || "GET";
|
|
168073
|
-
output_manager_default.debug(`${
|
|
168138
|
+
output_manager_default.debug(`${import_chalk65.default.bold(method)} ${req.url}`);
|
|
168074
168139
|
try {
|
|
168075
168140
|
const vercelConfig = await this.getVercelConfig();
|
|
168076
168141
|
await this.serveProjectAsNowV2(req, res, requestId, vercelConfig);
|
|
@@ -168272,7 +168337,7 @@ var init_server = __esm({
|
|
|
168272
168337
|
}
|
|
168273
168338
|
} catch (err) {
|
|
168274
168339
|
if ((0, import_error_utils22.isSpawnError)(err) && err.code === "ENOENT") {
|
|
168275
|
-
err.message = `Command not found: ${
|
|
168340
|
+
err.message = `Command not found: ${import_chalk65.default.cyan(
|
|
168276
168341
|
err.path,
|
|
168277
168342
|
...err.spawnargs
|
|
168278
168343
|
)}
|
|
@@ -168529,7 +168594,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
168529
168594
|
});
|
|
168530
168595
|
} catch (err) {
|
|
168531
168596
|
if ((0, import_error_utils22.isSpawnError)(err) && err.code === "ENOENT") {
|
|
168532
|
-
err.message = `Command not found: ${
|
|
168597
|
+
err.message = `Command not found: ${import_chalk65.default.cyan(
|
|
168533
168598
|
err.path,
|
|
168534
168599
|
...err.spawnargs
|
|
168535
168600
|
)}
|
|
@@ -169229,10 +169294,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
169229
169294
|
*/
|
|
169230
169295
|
async _start(...listenSpec) {
|
|
169231
169296
|
if (!import_fs_extra21.default.existsSync(this.cwd)) {
|
|
169232
|
-
throw new Error(`${
|
|
169297
|
+
throw new Error(`${import_chalk65.default.bold(this.cwd)} doesn't exist`);
|
|
169233
169298
|
}
|
|
169234
169299
|
if (!import_fs_extra21.default.lstatSync(this.cwd).isDirectory()) {
|
|
169235
|
-
throw new Error(`${
|
|
169300
|
+
throw new Error(`${import_chalk65.default.bold(this.cwd)} is not a directory`);
|
|
169236
169301
|
}
|
|
169237
169302
|
const { ig } = await (0, import_client12.getVercelIgnore)(this.cwd);
|
|
169238
169303
|
this.filter = ig.createFilter();
|
|
@@ -169246,14 +169311,14 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
169246
169311
|
if (err.code === "EADDRINUSE") {
|
|
169247
169312
|
if (typeof listenSpec[0] === "number") {
|
|
169248
169313
|
output_manager_default.note(
|
|
169249
|
-
`Requested port ${
|
|
169314
|
+
`Requested port ${import_chalk65.default.yellow(
|
|
169250
169315
|
String(listenSpec[0])
|
|
169251
169316
|
)} is already in use`
|
|
169252
169317
|
);
|
|
169253
169318
|
listenSpec[0]++;
|
|
169254
169319
|
} else {
|
|
169255
169320
|
output_manager_default.error(
|
|
169256
|
-
`Requested socket ${
|
|
169321
|
+
`Requested socket ${import_chalk65.default.cyan(
|
|
169257
169322
|
listenSpec[0]
|
|
169258
169323
|
)} is already in use`
|
|
169259
169324
|
);
|
|
@@ -169645,7 +169710,7 @@ ${error_code}
|
|
|
169645
169710
|
if (this.devProcess) {
|
|
169646
169711
|
await treeKill(this.devProcess.pid);
|
|
169647
169712
|
}
|
|
169648
|
-
output_manager_default.log(`Running Dev Command ${
|
|
169713
|
+
output_manager_default.log(`Running Dev Command ${import_chalk65.default.cyan.bold(`\u201C${devCommand2}\u201D`)}`);
|
|
169649
169714
|
const port = await (0, import_get_port.default)();
|
|
169650
169715
|
const env = (0, import_build_utils17.cloneEnv)(
|
|
169651
169716
|
{
|
|
@@ -169884,7 +169949,7 @@ async function dev(client2, opts, args2, telemetry2) {
|
|
|
169884
169949
|
envValues,
|
|
169885
169950
|
"vercel-cli:dev"
|
|
169886
169951
|
)) {
|
|
169887
|
-
output_manager_default.debug(`Refreshing ${
|
|
169952
|
+
output_manager_default.debug(`Refreshing ${import_chalk66.default.green(VERCEL_OIDC_TOKEN)}`);
|
|
169888
169953
|
envValues[VERCEL_OIDC_TOKEN] = token;
|
|
169889
169954
|
await devServer.runDevCommand(true);
|
|
169890
169955
|
telemetry2.trackOidcTokenRefresh(++refreshCount);
|
|
@@ -169915,11 +169980,11 @@ async function dev(client2, opts, args2, telemetry2) {
|
|
|
169915
169980
|
controller.abort();
|
|
169916
169981
|
}
|
|
169917
169982
|
}
|
|
169918
|
-
var
|
|
169983
|
+
var import_chalk66, import_path36, import_fs_extra22;
|
|
169919
169984
|
var init_dev = __esm({
|
|
169920
169985
|
"src/commands/dev/dev.ts"() {
|
|
169921
169986
|
"use strict";
|
|
169922
|
-
|
|
169987
|
+
import_chalk66 = __toESM3(require_source());
|
|
169923
169988
|
import_path36 = require("path");
|
|
169924
169989
|
import_fs_extra22 = __toESM3(require_lib());
|
|
169925
169990
|
init_server();
|
|
@@ -170092,17 +170157,17 @@ async function main6(client2) {
|
|
|
170092
170157
|
function stringifyError(err) {
|
|
170093
170158
|
if (err instanceof NowError) {
|
|
170094
170159
|
const errMeta = JSON.stringify(err.meta, null, 2).replace(/\\n/g, "\n");
|
|
170095
|
-
return `${
|
|
170160
|
+
return `${import_chalk67.default.red(err.code)} ${err.message}
|
|
170096
170161
|
${errMeta}`;
|
|
170097
170162
|
}
|
|
170098
170163
|
return err.stack;
|
|
170099
170164
|
}
|
|
170100
|
-
var import_path37,
|
|
170165
|
+
var import_path37, import_chalk67, import_error_utils23, COMMAND_CONFIG6;
|
|
170101
170166
|
var init_dev3 = __esm({
|
|
170102
170167
|
"src/commands/dev/index.ts"() {
|
|
170103
170168
|
"use strict";
|
|
170104
170169
|
import_path37 = __toESM3(require("path"));
|
|
170105
|
-
|
|
170170
|
+
import_chalk67 = __toESM3(require_source());
|
|
170106
170171
|
init_get_args();
|
|
170107
170172
|
init_get_subcommand();
|
|
170108
170173
|
init_now_error();
|
|
@@ -170244,9 +170309,9 @@ async function getDNSData(client2, data) {
|
|
|
170244
170309
|
const port = await getNumber(client2, `- ${type} port: `);
|
|
170245
170310
|
const target = await getTrimmedString(client2, `- ${type} target: `);
|
|
170246
170311
|
output_manager_default.log(
|
|
170247
|
-
`${
|
|
170312
|
+
`${import_chalk68.default.cyan(name)} ${import_chalk68.default.bold(type)} ${import_chalk68.default.cyan(
|
|
170248
170313
|
`${priority}`
|
|
170249
|
-
)} ${
|
|
170314
|
+
)} ${import_chalk68.default.cyan(`${weight}`)} ${import_chalk68.default.cyan(`${port}`)} ${import_chalk68.default.cyan(
|
|
170250
170315
|
target
|
|
170251
170316
|
)}.`
|
|
170252
170317
|
);
|
|
@@ -170265,9 +170330,9 @@ async function getDNSData(client2, data) {
|
|
|
170265
170330
|
const mxPriority = await getNumber(client2, `- ${type} priority: `);
|
|
170266
170331
|
const value2 = await getTrimmedString(client2, `- ${type} host: `);
|
|
170267
170332
|
output_manager_default.log(
|
|
170268
|
-
`${
|
|
170333
|
+
`${import_chalk68.default.cyan(name)} ${import_chalk68.default.bold(type)} ${import_chalk68.default.cyan(
|
|
170269
170334
|
`${mxPriority}`
|
|
170270
|
-
)} ${
|
|
170335
|
+
)} ${import_chalk68.default.cyan(value2)}`
|
|
170271
170336
|
);
|
|
170272
170337
|
return await verifyData(client2) ? {
|
|
170273
170338
|
name,
|
|
@@ -170277,7 +170342,7 @@ async function getDNSData(client2, data) {
|
|
|
170277
170342
|
} : null;
|
|
170278
170343
|
}
|
|
170279
170344
|
const value = await getTrimmedString(client2, `- ${type} value: `);
|
|
170280
|
-
output_manager_default.log(`${
|
|
170345
|
+
output_manager_default.log(`${import_chalk68.default.cyan(name)} ${import_chalk68.default.bold(type)} ${import_chalk68.default.cyan(value)}`);
|
|
170281
170346
|
return await verifyData(client2) ? {
|
|
170282
170347
|
name,
|
|
170283
170348
|
type,
|
|
@@ -170311,11 +170376,11 @@ async function getTrimmedString(client2, label) {
|
|
|
170311
170376
|
});
|
|
170312
170377
|
return res.trim();
|
|
170313
170378
|
}
|
|
170314
|
-
var
|
|
170379
|
+
var import_chalk68, RECORD_TYPES;
|
|
170315
170380
|
var init_get_dns_data = __esm({
|
|
170316
170381
|
"src/util/dns/get-dns-data.ts"() {
|
|
170317
170382
|
"use strict";
|
|
170318
|
-
|
|
170383
|
+
import_chalk68 = __toESM3(require_source());
|
|
170319
170384
|
init_output_manager();
|
|
170320
170385
|
RECORD_TYPES = ["A", "AAAA", "ALIAS", "CAA", "CNAME", "MX", "SRV", "TXT"];
|
|
170321
170386
|
}
|
|
@@ -170388,7 +170453,7 @@ async function add2(client2, argv) {
|
|
|
170388
170453
|
const parsedParams = parseAddArgs(args2);
|
|
170389
170454
|
if (!parsedParams) {
|
|
170390
170455
|
output_manager_default.error(
|
|
170391
|
-
`Invalid number of arguments. See: ${
|
|
170456
|
+
`Invalid number of arguments. See: ${import_chalk69.default.cyan(
|
|
170392
170457
|
`${getCommandName("dns --help")}`
|
|
170393
170458
|
)} for usage.`
|
|
170394
170459
|
);
|
|
@@ -170415,23 +170480,23 @@ async function add2(client2, argv) {
|
|
|
170415
170480
|
const record = await addDNSRecord(client2, domain, data);
|
|
170416
170481
|
if (record instanceof DomainNotFound) {
|
|
170417
170482
|
output_manager_default.error(
|
|
170418
|
-
`The domain ${domain} can't be found under ${
|
|
170483
|
+
`The domain ${domain} can't be found under ${import_chalk69.default.bold(
|
|
170419
170484
|
contextName
|
|
170420
|
-
)} ${
|
|
170485
|
+
)} ${import_chalk69.default.gray(addStamp())}`
|
|
170421
170486
|
);
|
|
170422
170487
|
return 1;
|
|
170423
170488
|
}
|
|
170424
170489
|
if (record instanceof DNSPermissionDenied) {
|
|
170425
170490
|
output_manager_default.error(
|
|
170426
|
-
`You don't have permissions to add records to domain ${domain} under ${
|
|
170491
|
+
`You don't have permissions to add records to domain ${domain} under ${import_chalk69.default.bold(
|
|
170427
170492
|
contextName
|
|
170428
|
-
)} ${
|
|
170493
|
+
)} ${import_chalk69.default.gray(addStamp())}`
|
|
170429
170494
|
);
|
|
170430
170495
|
return 1;
|
|
170431
170496
|
}
|
|
170432
170497
|
if (record instanceof DNSInvalidPort) {
|
|
170433
170498
|
output_manager_default.error(
|
|
170434
|
-
`Invalid <port> parameter. A number was expected ${
|
|
170499
|
+
`Invalid <port> parameter. A number was expected ${import_chalk69.default.gray(
|
|
170435
170500
|
addStamp()
|
|
170436
170501
|
)}`
|
|
170437
170502
|
);
|
|
@@ -170439,7 +170504,7 @@ async function add2(client2, argv) {
|
|
|
170439
170504
|
}
|
|
170440
170505
|
if (record instanceof DNSInvalidType) {
|
|
170441
170506
|
output_manager_default.error(
|
|
170442
|
-
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${
|
|
170507
|
+
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${import_chalk69.default.gray(
|
|
170443
170508
|
addStamp()
|
|
170444
170509
|
)}`
|
|
170445
170510
|
);
|
|
@@ -170450,17 +170515,17 @@ async function add2(client2, argv) {
|
|
|
170450
170515
|
return 1;
|
|
170451
170516
|
}
|
|
170452
170517
|
output_manager_default.success(
|
|
170453
|
-
`DNS record for domain ${
|
|
170518
|
+
`DNS record for domain ${import_chalk69.default.bold(domain)} ${import_chalk69.default.gray(
|
|
170454
170519
|
`(${record.uid})`
|
|
170455
|
-
)} created under ${
|
|
170520
|
+
)} created under ${import_chalk69.default.bold(contextName)} ${import_chalk69.default.gray(addStamp())}`
|
|
170456
170521
|
);
|
|
170457
170522
|
return 0;
|
|
170458
170523
|
}
|
|
170459
|
-
var
|
|
170524
|
+
var import_chalk69;
|
|
170460
170525
|
var init_add4 = __esm({
|
|
170461
170526
|
"src/commands/dns/add.ts"() {
|
|
170462
170527
|
"use strict";
|
|
170463
|
-
|
|
170528
|
+
import_chalk69 = __toESM3(require_source());
|
|
170464
170529
|
init_errors_ts();
|
|
170465
170530
|
init_add_dns_record();
|
|
170466
170531
|
init_get_scope();
|
|
@@ -170480,7 +170545,7 @@ var init_add4 = __esm({
|
|
|
170480
170545
|
// src/util/dns/import-zonefile.ts
|
|
170481
170546
|
async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
170482
170547
|
output_manager_default.spinner(
|
|
170483
|
-
`Importing Zone file for domain ${domain} under ${
|
|
170548
|
+
`Importing Zone file for domain ${domain} under ${import_chalk70.default.bold(contextName)}`
|
|
170484
170549
|
);
|
|
170485
170550
|
const zonefile = (0, import_fs7.readFileSync)((0, import_path38.resolve)(zonefilePath), "utf8");
|
|
170486
170551
|
try {
|
|
@@ -170507,11 +170572,11 @@ async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
|
170507
170572
|
throw err;
|
|
170508
170573
|
}
|
|
170509
170574
|
}
|
|
170510
|
-
var
|
|
170575
|
+
var import_chalk70, import_fs7, import_path38;
|
|
170511
170576
|
var init_import_zonefile = __esm({
|
|
170512
170577
|
"src/util/dns/import-zonefile.ts"() {
|
|
170513
170578
|
"use strict";
|
|
170514
|
-
|
|
170579
|
+
import_chalk70 = __toESM3(require_source());
|
|
170515
170580
|
import_fs7 = require("fs");
|
|
170516
170581
|
import_path38 = require("path");
|
|
170517
170582
|
init_errors_ts();
|
|
@@ -170566,7 +170631,7 @@ async function importZone(client2, argv) {
|
|
|
170566
170631
|
});
|
|
170567
170632
|
if (args2.length !== 2) {
|
|
170568
170633
|
output_manager_default.error(
|
|
170569
|
-
`Invalid number of arguments. Usage: ${
|
|
170634
|
+
`Invalid number of arguments. Usage: ${import_chalk71.default.cyan(
|
|
170570
170635
|
`${getCommandName("dns import <domain> <zonefile>")}`
|
|
170571
170636
|
)}`
|
|
170572
170637
|
);
|
|
@@ -170584,32 +170649,32 @@ async function importZone(client2, argv) {
|
|
|
170584
170649
|
);
|
|
170585
170650
|
if (recordIds instanceof DomainNotFound) {
|
|
170586
170651
|
output_manager_default.error(
|
|
170587
|
-
`The domain ${domain} can't be found under ${
|
|
170652
|
+
`The domain ${domain} can't be found under ${import_chalk71.default.bold(
|
|
170588
170653
|
contextName
|
|
170589
|
-
)} ${
|
|
170654
|
+
)} ${import_chalk71.default.gray(addStamp())}`
|
|
170590
170655
|
);
|
|
170591
170656
|
return 1;
|
|
170592
170657
|
}
|
|
170593
170658
|
if (recordIds instanceof InvalidDomain) {
|
|
170594
170659
|
output_manager_default.error(
|
|
170595
|
-
`The domain ${domain} doesn't match with the one found in the Zone file ${
|
|
170660
|
+
`The domain ${domain} doesn't match with the one found in the Zone file ${import_chalk71.default.gray(
|
|
170596
170661
|
addStamp()
|
|
170597
170662
|
)}`
|
|
170598
170663
|
);
|
|
170599
170664
|
return 1;
|
|
170600
170665
|
}
|
|
170601
170666
|
output_manager_default.success(
|
|
170602
|
-
`${recordIds.length} DNS records for domain ${
|
|
170667
|
+
`${recordIds.length} DNS records for domain ${import_chalk71.default.bold(
|
|
170603
170668
|
domain
|
|
170604
|
-
)} created under ${
|
|
170669
|
+
)} created under ${import_chalk71.default.bold(contextName)} ${import_chalk71.default.gray(addStamp())}`
|
|
170605
170670
|
);
|
|
170606
170671
|
return 0;
|
|
170607
170672
|
}
|
|
170608
|
-
var
|
|
170673
|
+
var import_chalk71;
|
|
170609
170674
|
var init_import2 = __esm({
|
|
170610
170675
|
"src/commands/dns/import.ts"() {
|
|
170611
170676
|
"use strict";
|
|
170612
|
-
|
|
170677
|
+
import_chalk71 = __toESM3(require_source());
|
|
170613
170678
|
init_get_scope();
|
|
170614
170679
|
init_errors_ts();
|
|
170615
170680
|
init_stamp();
|
|
@@ -170652,7 +170717,7 @@ function formatTable(header, align, blocks) {
|
|
|
170652
170717
|
out += `${block.name}
|
|
170653
170718
|
`;
|
|
170654
170719
|
}
|
|
170655
|
-
const rows = [header.map((s) =>
|
|
170720
|
+
const rows = [header.map((s) => import_chalk72.default.dim(s))].concat(block.rows);
|
|
170656
170721
|
if (rows.length > 0) {
|
|
170657
170722
|
rows[0][0] = ` ${rows[0][0]}`;
|
|
170658
170723
|
for (let i = 1; i < rows.length; i++) {
|
|
@@ -170672,11 +170737,11 @@ function formatTable(header, align, blocks) {
|
|
|
170672
170737
|
}
|
|
170673
170738
|
return out.slice(0, -1);
|
|
170674
170739
|
}
|
|
170675
|
-
var
|
|
170740
|
+
var import_chalk72;
|
|
170676
170741
|
var init_format_table = __esm({
|
|
170677
170742
|
"src/util/format-table.ts"() {
|
|
170678
170743
|
"use strict";
|
|
170679
|
-
|
|
170744
|
+
import_chalk72 = __toESM3(require_source());
|
|
170680
170745
|
init_table();
|
|
170681
170746
|
init_strlen();
|
|
170682
170747
|
}
|
|
@@ -170760,18 +170825,18 @@ function getAddDomainName(domainNames) {
|
|
|
170760
170825
|
];
|
|
170761
170826
|
}
|
|
170762
170827
|
async function getDomainNames(client2, contextName, next) {
|
|
170763
|
-
output_manager_default.spinner(`Fetching domains under ${
|
|
170828
|
+
output_manager_default.spinner(`Fetching domains under ${import_chalk73.default.bold(contextName)}`);
|
|
170764
170829
|
const { domains: domains2, pagination } = await getDomains(client2, next);
|
|
170765
170830
|
return { domainNames: domains2.map((domain) => domain.name), pagination };
|
|
170766
170831
|
}
|
|
170767
|
-
var
|
|
170832
|
+
var import_chalk73;
|
|
170768
170833
|
var init_get_dns_records = __esm({
|
|
170769
170834
|
"src/util/dns/get-dns-records.ts"() {
|
|
170770
170835
|
"use strict";
|
|
170771
170836
|
init_errors_ts();
|
|
170772
170837
|
init_get_domain_dns_records();
|
|
170773
170838
|
init_get_domains();
|
|
170774
|
-
|
|
170839
|
+
import_chalk73 = __toESM3(require_source());
|
|
170775
170840
|
init_output_manager();
|
|
170776
170841
|
}
|
|
170777
170842
|
});
|
|
@@ -170836,7 +170901,7 @@ async function ls3(client2, argv) {
|
|
|
170836
170901
|
telemetry2.trackCliOptionNext(opts["--next"]);
|
|
170837
170902
|
if (args2.length > 1) {
|
|
170838
170903
|
output_manager_default.error(
|
|
170839
|
-
`Invalid number of arguments. Usage: ${
|
|
170904
|
+
`Invalid number of arguments. Usage: ${import_chalk74.default.cyan(
|
|
170840
170905
|
`${getCommandName("dns ls [domain]")}`
|
|
170841
170906
|
)}`
|
|
170842
170907
|
);
|
|
@@ -170858,15 +170923,15 @@ async function ls3(client2, argv) {
|
|
|
170858
170923
|
);
|
|
170859
170924
|
if (data instanceof DomainNotFound) {
|
|
170860
170925
|
output_manager_default.error(
|
|
170861
|
-
`The domain ${domainName} can't be found under ${
|
|
170926
|
+
`The domain ${domainName} can't be found under ${import_chalk74.default.bold(
|
|
170862
170927
|
contextName
|
|
170863
|
-
)} ${
|
|
170928
|
+
)} ${import_chalk74.default.gray(lsStamp())}`
|
|
170864
170929
|
);
|
|
170865
170930
|
return 1;
|
|
170866
170931
|
}
|
|
170867
170932
|
const { records, pagination: pagination2 } = data;
|
|
170868
170933
|
output_manager_default.log(
|
|
170869
|
-
`${records.length > 0 ? "Records" : "No records"} found under ${
|
|
170934
|
+
`${records.length > 0 ? "Records" : "No records"} found under ${import_chalk74.default.bold(contextName)} ${import_chalk74.default.gray(lsStamp())}`
|
|
170870
170935
|
);
|
|
170871
170936
|
client2.stdout.write(getDNSRecordsTable([{ domainName, records }]));
|
|
170872
170937
|
if (pagination2 && pagination2.count === 20) {
|
|
@@ -170886,9 +170951,9 @@ async function ls3(client2, argv) {
|
|
|
170886
170951
|
);
|
|
170887
170952
|
const nRecords = dnsRecords.reduce((p, r) => r.records.length + p, 0);
|
|
170888
170953
|
output_manager_default.log(
|
|
170889
|
-
`${nRecords > 0 ? "Records" : "No records"} found under ${
|
|
170954
|
+
`${nRecords > 0 ? "Records" : "No records"} found under ${import_chalk74.default.bold(
|
|
170890
170955
|
contextName
|
|
170891
|
-
)} ${
|
|
170956
|
+
)} ${import_chalk74.default.gray(lsStamp())}`
|
|
170892
170957
|
);
|
|
170893
170958
|
output_manager_default.log(getDNSRecordsTable(dnsRecords));
|
|
170894
170959
|
if (pagination && pagination.count === 20) {
|
|
@@ -170906,7 +170971,7 @@ function getDNSRecordsTable(dnsRecords) {
|
|
|
170906
170971
|
["", "id", "name", "type", "value", "created"],
|
|
170907
170972
|
["l", "r", "l", "l", "l", "l"],
|
|
170908
170973
|
dnsRecords.map(({ domainName, records }) => ({
|
|
170909
|
-
name:
|
|
170974
|
+
name: import_chalk74.default.bold(domainName),
|
|
170910
170975
|
rows: records.map(getDNSRecordRow)
|
|
170911
170976
|
}))
|
|
170912
170977
|
);
|
|
@@ -170923,14 +170988,14 @@ function getDNSRecordRow(record) {
|
|
|
170923
170988
|
record.name,
|
|
170924
170989
|
record.type,
|
|
170925
170990
|
priority ? `${priority} ${record.value}` : record.value,
|
|
170926
|
-
|
|
170991
|
+
import_chalk74.default.gray(isSystemRecord ? "default" : createdAt)
|
|
170927
170992
|
];
|
|
170928
170993
|
}
|
|
170929
|
-
var
|
|
170994
|
+
var import_chalk74, import_ms16;
|
|
170930
170995
|
var init_ls5 = __esm({
|
|
170931
170996
|
"src/commands/dns/ls.ts"() {
|
|
170932
170997
|
"use strict";
|
|
170933
|
-
|
|
170998
|
+
import_chalk74 = __toESM3(require_source());
|
|
170934
170999
|
import_ms16 = __toESM3(require_ms());
|
|
170935
171000
|
init_errors_ts();
|
|
170936
171001
|
init_format_table();
|
|
@@ -171015,7 +171080,7 @@ async function rm3(client2, argv) {
|
|
|
171015
171080
|
const [recordId] = args2;
|
|
171016
171081
|
if (args2.length !== 1) {
|
|
171017
171082
|
output_manager_default.error(
|
|
171018
|
-
`Invalid number of arguments. Usage: ${
|
|
171083
|
+
`Invalid number of arguments. Usage: ${import_chalk75.default.cyan(
|
|
171019
171084
|
`${getCommandName("dns rm <id>")}`
|
|
171020
171085
|
)}`
|
|
171021
171086
|
);
|
|
@@ -171041,7 +171106,7 @@ async function rm3(client2, argv) {
|
|
|
171041
171106
|
const rmStamp = stamp_default();
|
|
171042
171107
|
await deleteDNSRecordById(client2, domainName, record.id);
|
|
171043
171108
|
output_manager_default.success(
|
|
171044
|
-
`Record ${
|
|
171109
|
+
`Record ${import_chalk75.default.gray(`${record.id}`)} removed ${import_chalk75.default.gray(rmStamp())}`
|
|
171045
171110
|
);
|
|
171046
171111
|
return 0;
|
|
171047
171112
|
}
|
|
@@ -171056,7 +171121,7 @@ function readConfirmation2(client2, msg, domainName, record) {
|
|
|
171056
171121
|
`
|
|
171057
171122
|
);
|
|
171058
171123
|
output_manager_default.print(
|
|
171059
|
-
`${
|
|
171124
|
+
`${import_chalk75.default.bold.red("> Are you sure?")} ${import_chalk75.default.gray("(y/N) ")}`
|
|
171060
171125
|
);
|
|
171061
171126
|
client2.stdin.on("data", (d) => {
|
|
171062
171127
|
process.stdin.pause();
|
|
@@ -171068,19 +171133,19 @@ function getDeleteTableRow(domainName, record) {
|
|
|
171068
171133
|
const recordName = `${record.name.length > 0 ? `${record.name}.` : ""}${domainName}`;
|
|
171069
171134
|
return [
|
|
171070
171135
|
record.id,
|
|
171071
|
-
|
|
171136
|
+
import_chalk75.default.bold(
|
|
171072
171137
|
`${recordName} ${record.type} ${record.value} ${record.mxPriority || ""}`
|
|
171073
171138
|
),
|
|
171074
|
-
|
|
171139
|
+
import_chalk75.default.gray(
|
|
171075
171140
|
`${(0, import_ms17.default)(Date.now() - new Date(Number(record.createdAt)).getTime())} ago`
|
|
171076
171141
|
)
|
|
171077
171142
|
];
|
|
171078
171143
|
}
|
|
171079
|
-
var
|
|
171144
|
+
var import_chalk75, import_ms17;
|
|
171080
171145
|
var init_rm4 = __esm({
|
|
171081
171146
|
"src/commands/dns/rm.ts"() {
|
|
171082
171147
|
"use strict";
|
|
171083
|
-
|
|
171148
|
+
import_chalk75 = __toESM3(require_source());
|
|
171084
171149
|
import_ms17 = __toESM3(require_ms());
|
|
171085
171150
|
init_table();
|
|
171086
171151
|
init_delete_dns_record_by_id();
|
|
@@ -171254,16 +171319,16 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
|
171254
171319
|
const rows = [];
|
|
171255
171320
|
for (let i = 0; i < maxLength; i++) {
|
|
171256
171321
|
rows.push([
|
|
171257
|
-
sortedIntended[i] ||
|
|
171258
|
-
sortedCurrent[i] ||
|
|
171259
|
-
sortedIntended[i] === sortedCurrent[i] ?
|
|
171322
|
+
sortedIntended[i] || import_chalk76.default.gray("-"),
|
|
171323
|
+
sortedCurrent[i] || import_chalk76.default.gray("-"),
|
|
171324
|
+
sortedIntended[i] === sortedCurrent[i] ? import_chalk76.default.green(chars_default.tick) : import_chalk76.default.red(chars_default.cross)
|
|
171260
171325
|
]);
|
|
171261
171326
|
}
|
|
171262
171327
|
return table(
|
|
171263
171328
|
[
|
|
171264
171329
|
[
|
|
171265
|
-
|
|
171266
|
-
|
|
171330
|
+
import_chalk76.default.gray("Intended Nameservers"),
|
|
171331
|
+
import_chalk76.default.gray("Current Nameservers"),
|
|
171267
171332
|
""
|
|
171268
171333
|
],
|
|
171269
171334
|
...rows
|
|
@@ -171271,11 +171336,11 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
|
171271
171336
|
{ hsep: 4 }
|
|
171272
171337
|
).replace(/^(.*)/gm, `${extraSpace}$1`);
|
|
171273
171338
|
}
|
|
171274
|
-
var
|
|
171339
|
+
var import_chalk76;
|
|
171275
171340
|
var init_format_ns_table = __esm({
|
|
171276
171341
|
"src/util/format-ns-table.ts"() {
|
|
171277
171342
|
"use strict";
|
|
171278
|
-
|
|
171343
|
+
import_chalk76 = __toESM3(require_source());
|
|
171279
171344
|
init_table();
|
|
171280
171345
|
init_chars();
|
|
171281
171346
|
}
|
|
@@ -171284,7 +171349,7 @@ var init_format_ns_table = __esm({
|
|
|
171284
171349
|
// src/util/domains/get-domain.ts
|
|
171285
171350
|
async function getDomain(client2, contextName, domainName) {
|
|
171286
171351
|
output_manager_default.spinner(
|
|
171287
|
-
`Fetching domain ${domainName} under ${
|
|
171352
|
+
`Fetching domain ${domainName} under ${import_chalk77.default.bold(contextName)}`
|
|
171288
171353
|
);
|
|
171289
171354
|
try {
|
|
171290
171355
|
const { domain } = await client2.fetch(
|
|
@@ -171298,11 +171363,11 @@ async function getDomain(client2, contextName, domainName) {
|
|
|
171298
171363
|
throw err;
|
|
171299
171364
|
}
|
|
171300
171365
|
}
|
|
171301
|
-
var
|
|
171366
|
+
var import_chalk77;
|
|
171302
171367
|
var init_get_domain = __esm({
|
|
171303
171368
|
"src/util/domains/get-domain.ts"() {
|
|
171304
171369
|
"use strict";
|
|
171305
|
-
|
|
171370
|
+
import_chalk77 = __toESM3(require_source());
|
|
171306
171371
|
init_errors_ts();
|
|
171307
171372
|
init_output_manager();
|
|
171308
171373
|
}
|
|
@@ -171342,7 +171407,7 @@ var init_get_domain_config = __esm({
|
|
|
171342
171407
|
// src/util/projects/add-domain-to-project.ts
|
|
171343
171408
|
async function addDomainToProject(client2, projectNameOrId, domain) {
|
|
171344
171409
|
output_manager_default.spinner(
|
|
171345
|
-
`Adding domain ${domain} to project ${
|
|
171410
|
+
`Adding domain ${domain} to project ${import_chalk78.default.bold(projectNameOrId)}`
|
|
171346
171411
|
);
|
|
171347
171412
|
try {
|
|
171348
171413
|
const response = await client2.fetch(
|
|
@@ -171371,11 +171436,11 @@ async function addDomainToProject(client2, projectNameOrId, domain) {
|
|
|
171371
171436
|
throw err;
|
|
171372
171437
|
}
|
|
171373
171438
|
}
|
|
171374
|
-
var
|
|
171439
|
+
var import_chalk78;
|
|
171375
171440
|
var init_add_domain_to_project = __esm({
|
|
171376
171441
|
"src/util/projects/add-domain-to-project.ts"() {
|
|
171377
171442
|
"use strict";
|
|
171378
|
-
|
|
171443
|
+
import_chalk78 = __toESM3(require_source());
|
|
171379
171444
|
init_errors_ts();
|
|
171380
171445
|
init_output_manager();
|
|
171381
171446
|
}
|
|
@@ -171384,7 +171449,7 @@ var init_add_domain_to_project = __esm({
|
|
|
171384
171449
|
// src/util/projects/remove-domain-from-project.ts
|
|
171385
171450
|
async function removeDomainFromProject(client2, projectNameOrId, domain) {
|
|
171386
171451
|
output_manager_default.spinner(
|
|
171387
|
-
`Removing domain ${domain} from project ${
|
|
171452
|
+
`Removing domain ${domain} from project ${import_chalk79.default.bold(projectNameOrId)}`
|
|
171388
171453
|
);
|
|
171389
171454
|
try {
|
|
171390
171455
|
const response = await client2.fetch(
|
|
@@ -171403,11 +171468,11 @@ async function removeDomainFromProject(client2, projectNameOrId, domain) {
|
|
|
171403
171468
|
throw err;
|
|
171404
171469
|
}
|
|
171405
171470
|
}
|
|
171406
|
-
var
|
|
171471
|
+
var import_chalk79;
|
|
171407
171472
|
var init_remove_domain_from_project = __esm({
|
|
171408
171473
|
"src/util/projects/remove-domain-from-project.ts"() {
|
|
171409
171474
|
"use strict";
|
|
171410
|
-
|
|
171475
|
+
import_chalk79 = __toESM3(require_source());
|
|
171411
171476
|
init_errors_ts();
|
|
171412
171477
|
init_output_manager();
|
|
171413
171478
|
}
|
|
@@ -171511,7 +171576,7 @@ async function add3(client2, argv) {
|
|
|
171511
171576
|
}
|
|
171512
171577
|
}
|
|
171513
171578
|
output_manager_default.success(
|
|
171514
|
-
`Domain ${
|
|
171579
|
+
`Domain ${import_chalk80.default.bold(domainName)} added to project ${import_chalk80.default.bold(
|
|
171515
171580
|
projectName
|
|
171516
171581
|
)}. ${addStamp()}`
|
|
171517
171582
|
);
|
|
@@ -171532,11 +171597,11 @@ async function add3(client2, argv) {
|
|
|
171532
171597
|
"This domain is not configured properly. To configure it you should either:"
|
|
171533
171598
|
);
|
|
171534
171599
|
output_manager_default.print(
|
|
171535
|
-
` ${
|
|
171600
|
+
` ${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
171601
|
`
|
|
171537
171602
|
);
|
|
171538
171603
|
output_manager_default.print(
|
|
171539
|
-
` ${
|
|
171604
|
+
` ${import_chalk80.default.grey("b)")} Change your Domains's nameservers to the intended set`
|
|
171540
171605
|
);
|
|
171541
171606
|
output_manager_default.print(
|
|
171542
171607
|
`
|
|
@@ -171559,11 +171624,11 @@ ${formatNSTable(
|
|
|
171559
171624
|
}
|
|
171560
171625
|
return 0;
|
|
171561
171626
|
}
|
|
171562
|
-
var
|
|
171627
|
+
var import_chalk80;
|
|
171563
171628
|
var init_add6 = __esm({
|
|
171564
171629
|
"src/commands/domains/add.ts"() {
|
|
171565
171630
|
"use strict";
|
|
171566
|
-
|
|
171631
|
+
import_chalk80 = __toESM3(require_source());
|
|
171567
171632
|
init_errors_ts();
|
|
171568
171633
|
init_format_ns_table();
|
|
171569
171634
|
init_get_scope();
|
|
@@ -171655,7 +171720,7 @@ async function buy(client2, argv) {
|
|
|
171655
171720
|
}
|
|
171656
171721
|
if (!(await getDomainStatus(client2, domainName)).available) {
|
|
171657
171722
|
output_manager_default.error(
|
|
171658
|
-
`The domain ${param(domainName)} is ${
|
|
171723
|
+
`The domain ${param(domainName)} is ${import_chalk81.default.underline(
|
|
171659
171724
|
"unavailable"
|
|
171660
171725
|
)}! ${availableStamp()}`
|
|
171661
171726
|
);
|
|
@@ -171663,22 +171728,22 @@ async function buy(client2, argv) {
|
|
|
171663
171728
|
}
|
|
171664
171729
|
const { period, price } = domainPrice;
|
|
171665
171730
|
output_manager_default.log(
|
|
171666
|
-
`The domain ${param(domainName)} is ${
|
|
171731
|
+
`The domain ${param(domainName)} is ${import_chalk81.default.underline(
|
|
171667
171732
|
"available"
|
|
171668
|
-
)} to buy under ${
|
|
171733
|
+
)} to buy under ${import_chalk81.default.bold(contextName)}! ${availableStamp()}`
|
|
171669
171734
|
);
|
|
171670
171735
|
let autoRenew;
|
|
171671
171736
|
if (skipConfirmation) {
|
|
171672
171737
|
autoRenew = true;
|
|
171673
171738
|
} else {
|
|
171674
171739
|
if (!await client2.input.confirm(
|
|
171675
|
-
`Buy now for ${
|
|
171740
|
+
`Buy now for ${import_chalk81.default.bold(`$${price}`)} (${`${period}yr${period > 1 ? "s" : ""}`})?`,
|
|
171676
171741
|
false
|
|
171677
171742
|
)) {
|
|
171678
171743
|
return 0;
|
|
171679
171744
|
}
|
|
171680
171745
|
autoRenew = await client2.input.confirm(
|
|
171681
|
-
renewalPrice.period === 1 ? `Auto renew yearly for ${
|
|
171746
|
+
renewalPrice.period === 1 ? `Auto renew yearly for ${import_chalk81.default.bold(`$${price}`)}?` : `Auto renew every ${renewalPrice.period} years for ${import_chalk81.default.bold(
|
|
171682
171747
|
`$${price}`
|
|
171683
171748
|
)}?`,
|
|
171684
171749
|
true
|
|
@@ -171762,11 +171827,11 @@ async function buy(client2, argv) {
|
|
|
171762
171827
|
}
|
|
171763
171828
|
return 0;
|
|
171764
171829
|
}
|
|
171765
|
-
var
|
|
171830
|
+
var import_chalk81, import_tldts6, import_error_utils24;
|
|
171766
171831
|
var init_buy2 = __esm({
|
|
171767
171832
|
"src/commands/domains/buy.ts"() {
|
|
171768
171833
|
"use strict";
|
|
171769
|
-
|
|
171834
|
+
import_chalk81 = __toESM3(require_source());
|
|
171770
171835
|
import_tldts6 = __toESM3(require_cjs7());
|
|
171771
171836
|
import_error_utils24 = __toESM3(require_dist2());
|
|
171772
171837
|
init_errors_ts();
|
|
@@ -171947,13 +172012,13 @@ async function transferIn(client2, argv) {
|
|
|
171947
172012
|
const { price } = domainPrice;
|
|
171948
172013
|
const { contextName } = await getScope(client2);
|
|
171949
172014
|
output_manager_default.log(
|
|
171950
|
-
`The domain ${param(domainName)} is ${
|
|
172015
|
+
`The domain ${param(domainName)} is ${import_chalk82.default.underline(
|
|
171951
172016
|
"available"
|
|
171952
|
-
)} to transfer under ${
|
|
172017
|
+
)} to transfer under ${import_chalk82.default.bold(contextName)}! ${availableStamp()}`
|
|
171953
172018
|
);
|
|
171954
172019
|
const authCode = await getAuthCode(client2, opts["--code"]);
|
|
171955
172020
|
const shouldTransfer = await client2.input.confirm(
|
|
171956
|
-
transferPolicy === "no-change" ? `Transfer now for ${
|
|
172021
|
+
transferPolicy === "no-change" ? `Transfer now for ${import_chalk82.default.bold(`$${price}`)}?` : `Transfer now with 1yr renewal for ${import_chalk82.default.bold(`$${price}`)}?`,
|
|
171957
172022
|
false
|
|
171958
172023
|
);
|
|
171959
172024
|
if (!shouldTransfer) {
|
|
@@ -172021,11 +172086,11 @@ async function transferIn(client2, argv) {
|
|
|
172021
172086
|
);
|
|
172022
172087
|
return 0;
|
|
172023
172088
|
}
|
|
172024
|
-
var
|
|
172089
|
+
var import_chalk82;
|
|
172025
172090
|
var init_transfer_in2 = __esm({
|
|
172026
172091
|
"src/commands/domains/transfer-in.ts"() {
|
|
172027
172092
|
"use strict";
|
|
172028
|
-
|
|
172093
|
+
import_chalk82 = __toESM3(require_source());
|
|
172029
172094
|
init_errors_ts();
|
|
172030
172095
|
init_get_scope();
|
|
172031
172096
|
init_param();
|
|
@@ -172137,7 +172202,7 @@ async function inspect2(client2, argv) {
|
|
|
172137
172202
|
telemetry2.trackCliArgumentDomain(domainName);
|
|
172138
172203
|
if (args2.length !== 1) {
|
|
172139
172204
|
output_manager_default.error(
|
|
172140
|
-
`Invalid number of arguments. Usage: ${
|
|
172205
|
+
`Invalid number of arguments. Usage: ${import_chalk83.default.cyan(
|
|
172141
172206
|
`${getCommandName("domains inspect <domain>")}`
|
|
172142
172207
|
)}`
|
|
172143
172208
|
);
|
|
@@ -172146,7 +172211,7 @@ async function inspect2(client2, argv) {
|
|
|
172146
172211
|
output_manager_default.debug(`Fetching domain info`);
|
|
172147
172212
|
const { contextName } = await getScope(client2);
|
|
172148
172213
|
output_manager_default.spinner(
|
|
172149
|
-
`Fetching Domain ${domainName} under ${
|
|
172214
|
+
`Fetching Domain ${domainName} under ${import_chalk83.default.bold(contextName)}`
|
|
172150
172215
|
);
|
|
172151
172216
|
const information = await fetchInformation({
|
|
172152
172217
|
client: client2,
|
|
@@ -172158,38 +172223,38 @@ async function inspect2(client2, argv) {
|
|
|
172158
172223
|
}
|
|
172159
172224
|
const { domain, projects, renewalPrice, domainConfig } = information;
|
|
172160
172225
|
output_manager_default.log(
|
|
172161
|
-
`Domain ${domainName} found under ${
|
|
172226
|
+
`Domain ${domainName} found under ${import_chalk83.default.bold(contextName)} ${import_chalk83.default.gray(
|
|
172162
172227
|
inspectStamp()
|
|
172163
172228
|
)}`
|
|
172164
172229
|
);
|
|
172165
172230
|
output_manager_default.print("\n");
|
|
172166
|
-
output_manager_default.print(
|
|
172167
|
-
output_manager_default.print(` ${
|
|
172231
|
+
output_manager_default.print(import_chalk83.default.bold(" General\n\n"));
|
|
172232
|
+
output_manager_default.print(` ${import_chalk83.default.cyan("Name")} ${domain.name}
|
|
172168
172233
|
`);
|
|
172169
172234
|
output_manager_default.print(
|
|
172170
|
-
` ${
|
|
172235
|
+
` ${import_chalk83.default.cyan("Registrar")} ${getDomainRegistrar(domain)}
|
|
172171
172236
|
`
|
|
172172
172237
|
);
|
|
172173
172238
|
output_manager_default.print(
|
|
172174
|
-
` ${
|
|
172239
|
+
` ${import_chalk83.default.cyan("Expiration Date")} ${formatDate(domain.expiresAt)}
|
|
172175
172240
|
`
|
|
172176
172241
|
);
|
|
172177
172242
|
output_manager_default.print(
|
|
172178
|
-
` ${
|
|
172243
|
+
` ${import_chalk83.default.cyan("Creator")} ${domain.creator.username}
|
|
172179
172244
|
`
|
|
172180
172245
|
);
|
|
172181
172246
|
output_manager_default.print(
|
|
172182
|
-
` ${
|
|
172247
|
+
` ${import_chalk83.default.cyan("Created At")} ${formatDate(domain.createdAt)}
|
|
172183
172248
|
`
|
|
172184
172249
|
);
|
|
172185
|
-
output_manager_default.print(` ${
|
|
172250
|
+
output_manager_default.print(` ${import_chalk83.default.cyan("Edge Network")} yes
|
|
172186
172251
|
`);
|
|
172187
172252
|
output_manager_default.print(
|
|
172188
|
-
` ${
|
|
172253
|
+
` ${import_chalk83.default.cyan("Renewal Price")} ${domain.boughtAt && renewalPrice ? `$${renewalPrice} USD` : import_chalk83.default.gray("-")}
|
|
172189
172254
|
`
|
|
172190
172255
|
);
|
|
172191
172256
|
output_manager_default.print("\n");
|
|
172192
|
-
output_manager_default.print(
|
|
172257
|
+
output_manager_default.print(import_chalk83.default.bold(" Nameservers\n\n"));
|
|
172193
172258
|
output_manager_default.print(
|
|
172194
172259
|
`${formatNSTable(domain.intendedNameservers, domain.nameservers, {
|
|
172195
172260
|
extraSpace: " "
|
|
@@ -172198,7 +172263,7 @@ async function inspect2(client2, argv) {
|
|
|
172198
172263
|
);
|
|
172199
172264
|
output_manager_default.print("\n");
|
|
172200
172265
|
if (Array.isArray(projects) && projects.length > 0) {
|
|
172201
|
-
output_manager_default.print(
|
|
172266
|
+
output_manager_default.print(import_chalk83.default.bold(" Projects\n"));
|
|
172202
172267
|
const table2 = formatTable(
|
|
172203
172268
|
["Project", "Domains"],
|
|
172204
172269
|
["l", "l"],
|
|
@@ -172228,11 +172293,11 @@ async function inspect2(client2, argv) {
|
|
|
172228
172293
|
null
|
|
172229
172294
|
);
|
|
172230
172295
|
output_manager_default.print(
|
|
172231
|
-
` ${
|
|
172296
|
+
` ${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
172297
|
`
|
|
172233
172298
|
);
|
|
172234
172299
|
output_manager_default.print(
|
|
172235
|
-
` ${
|
|
172300
|
+
` ${import_chalk83.default.grey("b)")} Change your Domains's nameservers to the intended set detailed above.
|
|
172236
172301
|
|
|
172237
172302
|
`
|
|
172238
172303
|
);
|
|
@@ -172291,11 +172356,11 @@ async function fetchInformation({
|
|
|
172291
172356
|
domainConfig
|
|
172292
172357
|
};
|
|
172293
172358
|
}
|
|
172294
|
-
var
|
|
172359
|
+
var import_chalk83;
|
|
172295
172360
|
var init_inspect2 = __esm({
|
|
172296
172361
|
"src/commands/domains/inspect.ts"() {
|
|
172297
172362
|
"use strict";
|
|
172298
|
-
|
|
172363
|
+
import_chalk83 = __toESM3(require_source());
|
|
172299
172364
|
init_errors_ts();
|
|
172300
172365
|
init_stamp();
|
|
172301
172366
|
init_format_date();
|
|
@@ -172374,21 +172439,21 @@ async function ls4(client2, argv) {
|
|
|
172374
172439
|
const lsStamp = stamp_default();
|
|
172375
172440
|
if (args2.length !== 0) {
|
|
172376
172441
|
output_manager_default.error(
|
|
172377
|
-
`Invalid number of arguments. Usage: ${
|
|
172442
|
+
`Invalid number of arguments. Usage: ${import_chalk84.default.cyan(
|
|
172378
172443
|
`${getCommandName("domains ls")}`
|
|
172379
172444
|
)}`
|
|
172380
172445
|
);
|
|
172381
172446
|
return 1;
|
|
172382
172447
|
}
|
|
172383
|
-
output_manager_default.spinner(`Fetching Domains under ${
|
|
172448
|
+
output_manager_default.spinner(`Fetching Domains under ${import_chalk84.default.bold(contextName)}`);
|
|
172384
172449
|
const { domains: domains2, pagination } = await getDomains(
|
|
172385
172450
|
client2,
|
|
172386
172451
|
...paginationOptions
|
|
172387
172452
|
);
|
|
172388
172453
|
output_manager_default.log(
|
|
172389
|
-
`${(0, import_pluralize8.default)("Domain", domains2.length, true)} found under ${
|
|
172454
|
+
`${(0, import_pluralize8.default)("Domain", domains2.length, true)} found under ${import_chalk84.default.bold(
|
|
172390
172455
|
contextName
|
|
172391
|
-
)} ${
|
|
172456
|
+
)} ${import_chalk84.default.gray(lsStamp())}`
|
|
172392
172457
|
);
|
|
172393
172458
|
if (domains2.length > 0) {
|
|
172394
172459
|
output_manager_default.print(
|
|
@@ -172417,7 +172482,7 @@ function formatDomainsTable(domains2) {
|
|
|
172417
172482
|
isDomainExternal(domain) ? "Third Party" : "Vercel",
|
|
172418
172483
|
expiration,
|
|
172419
172484
|
domain.creator.username,
|
|
172420
|
-
|
|
172485
|
+
import_chalk84.default.gray(age)
|
|
172421
172486
|
];
|
|
172422
172487
|
});
|
|
172423
172488
|
return formatTable(
|
|
@@ -172426,12 +172491,12 @@ function formatDomainsTable(domains2) {
|
|
|
172426
172491
|
[{ rows }]
|
|
172427
172492
|
);
|
|
172428
172493
|
}
|
|
172429
|
-
var import_ms18,
|
|
172494
|
+
var import_ms18, import_chalk84, import_pluralize8;
|
|
172430
172495
|
var init_ls7 = __esm({
|
|
172431
172496
|
"src/commands/domains/ls.ts"() {
|
|
172432
172497
|
"use strict";
|
|
172433
172498
|
import_ms18 = __toESM3(require_ms());
|
|
172434
|
-
|
|
172499
|
+
import_chalk84 = __toESM3(require_source());
|
|
172435
172500
|
import_pluralize8 = __toESM3(require_pluralize());
|
|
172436
172501
|
init_get_domains();
|
|
172437
172502
|
init_get_scope();
|
|
@@ -172580,7 +172645,7 @@ async function rm4(client2, argv) {
|
|
|
172580
172645
|
const { contextName } = await getScope(client2);
|
|
172581
172646
|
if (args2.length !== 1) {
|
|
172582
172647
|
output_manager_default.error(
|
|
172583
|
-
`Invalid number of arguments. Usage: ${
|
|
172648
|
+
`Invalid number of arguments. Usage: ${import_chalk85.default.cyan(
|
|
172584
172649
|
`${getCommandName("domains rm <domain>")}`
|
|
172585
172650
|
)}`
|
|
172586
172651
|
);
|
|
@@ -172589,14 +172654,14 @@ async function rm4(client2, argv) {
|
|
|
172589
172654
|
const domain = await getDomainByName(client2, contextName, domainName);
|
|
172590
172655
|
if (domain instanceof DomainNotFound || domain.name !== domainName) {
|
|
172591
172656
|
output_manager_default.error(
|
|
172592
|
-
`Domain not found by "${domainName}" under ${
|
|
172657
|
+
`Domain not found by "${domainName}" under ${import_chalk85.default.bold(contextName)}`
|
|
172593
172658
|
);
|
|
172594
172659
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
172595
172660
|
return 1;
|
|
172596
172661
|
}
|
|
172597
172662
|
if (domain instanceof DomainPermissionDenied) {
|
|
172598
172663
|
output_manager_default.error(
|
|
172599
|
-
`You don't have access to the domain ${domainName} under ${
|
|
172664
|
+
`You don't have access to the domain ${domainName} under ${import_chalk85.default.bold(
|
|
172600
172665
|
contextName
|
|
172601
172666
|
)}`
|
|
172602
172667
|
);
|
|
@@ -172656,15 +172721,15 @@ async function removeDomain(client2, contextName, skipConfirmation, domain, alia
|
|
|
172656
172721
|
domain.name
|
|
172657
172722
|
);
|
|
172658
172723
|
if (removeResult instanceof DomainNotFound) {
|
|
172659
|
-
output_manager_default.error(`Domain not found under ${
|
|
172724
|
+
output_manager_default.error(`Domain not found under ${import_chalk85.default.bold(contextName)}`);
|
|
172660
172725
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
172661
172726
|
return 1;
|
|
172662
172727
|
}
|
|
172663
172728
|
if (removeResult instanceof DomainPermissionDenied) {
|
|
172664
172729
|
output_manager_default.error(
|
|
172665
|
-
`You don't have permissions over domain ${
|
|
172730
|
+
`You don't have permissions over domain ${import_chalk85.default.underline(
|
|
172666
172731
|
removeResult.meta.domain
|
|
172667
|
-
)} under ${
|
|
172732
|
+
)} under ${import_chalk85.default.bold(removeResult.meta.context)}.`
|
|
172668
172733
|
);
|
|
172669
172734
|
return 1;
|
|
172670
172735
|
}
|
|
@@ -172706,21 +172771,21 @@ async function removeDomain(client2, contextName, skipConfirmation, domain, alia
|
|
|
172706
172771
|
);
|
|
172707
172772
|
if (aliases.length > 0) {
|
|
172708
172773
|
output_manager_default.warn(
|
|
172709
|
-
`This domain's ${
|
|
172774
|
+
`This domain's ${import_chalk85.default.bold(
|
|
172710
172775
|
(0, import_pluralize9.default)("alias", aliases.length, true)
|
|
172711
172776
|
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
|
172712
172777
|
);
|
|
172713
172778
|
}
|
|
172714
172779
|
if (certs.length > 0) {
|
|
172715
172780
|
output_manager_default.warn(
|
|
172716
|
-
`This domain's ${
|
|
172781
|
+
`This domain's ${import_chalk85.default.bold(
|
|
172717
172782
|
(0, import_pluralize9.default)("certificate", certs.length, true)
|
|
172718
172783
|
)} will be removed. Run ${getCommandName(`cert ls`)} to list them.`
|
|
172719
172784
|
);
|
|
172720
172785
|
}
|
|
172721
172786
|
if (suffix2) {
|
|
172722
172787
|
output_manager_default.warn(
|
|
172723
|
-
`The ${
|
|
172788
|
+
`The ${import_chalk85.default.bold(`custom suffix`)} associated with this domain.`
|
|
172724
172789
|
);
|
|
172725
172790
|
}
|
|
172726
172791
|
if (!skipConfirmation && !await client2.input.confirm(
|
|
@@ -172741,14 +172806,14 @@ async function removeDomain(client2, contextName, skipConfirmation, domain, alia
|
|
|
172741
172806
|
attempt + 1
|
|
172742
172807
|
);
|
|
172743
172808
|
}
|
|
172744
|
-
output_manager_default.success(`Domain ${
|
|
172809
|
+
output_manager_default.success(`Domain ${import_chalk85.default.bold(domain.name)} removed ${removeStamp()}`);
|
|
172745
172810
|
return 0;
|
|
172746
172811
|
}
|
|
172747
|
-
var
|
|
172812
|
+
var import_chalk85, import_pluralize9;
|
|
172748
172813
|
var init_rm6 = __esm({
|
|
172749
172814
|
"src/commands/domains/rm.ts"() {
|
|
172750
172815
|
"use strict";
|
|
172751
|
-
|
|
172816
|
+
import_chalk85 = __toESM3(require_source());
|
|
172752
172817
|
import_pluralize9 = __toESM3(require_pluralize());
|
|
172753
172818
|
init_errors_ts();
|
|
172754
172819
|
init_delete_cert_by_id();
|
|
@@ -172887,15 +172952,15 @@ async function move2(client2, argv) {
|
|
|
172887
172952
|
}
|
|
172888
172953
|
const domain = await getDomainByName(client2, contextName, domainName);
|
|
172889
172954
|
if (domain instanceof DomainNotFound) {
|
|
172890
|
-
output_manager_default.error(`Domain not found under ${
|
|
172955
|
+
output_manager_default.error(`Domain not found under ${import_chalk86.default.bold(contextName)}`);
|
|
172891
172956
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
172892
172957
|
return 1;
|
|
172893
172958
|
}
|
|
172894
172959
|
if (domain instanceof DomainPermissionDenied) {
|
|
172895
172960
|
output_manager_default.error(
|
|
172896
|
-
`You don't have permissions over domain ${
|
|
172961
|
+
`You don't have permissions over domain ${import_chalk86.default.underline(
|
|
172897
172962
|
domain.meta.domain
|
|
172898
|
-
)} under ${
|
|
172963
|
+
)} under ${import_chalk86.default.bold(domain.meta.context)}.`
|
|
172899
172964
|
);
|
|
172900
172965
|
return 1;
|
|
172901
172966
|
}
|
|
@@ -172925,7 +172990,7 @@ async function move2(client2, argv) {
|
|
|
172925
172990
|
const aliases = await getDomainAliases(client2, domainName);
|
|
172926
172991
|
if (aliases.length > 0) {
|
|
172927
172992
|
output_manager_default.warn(
|
|
172928
|
-
`This domain's ${
|
|
172993
|
+
`This domain's ${import_chalk86.default.bold(
|
|
172929
172994
|
(0, import_pluralize10.default)("alias", aliases.length, true)
|
|
172930
172995
|
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
|
172931
172996
|
);
|
|
@@ -172966,21 +173031,21 @@ async function move2(client2, argv) {
|
|
|
172966
173031
|
return 1;
|
|
172967
173032
|
}
|
|
172968
173033
|
if (moveTokenResult instanceof DomainNotFound) {
|
|
172969
|
-
output_manager_default.error(`Domain not found under ${
|
|
173034
|
+
output_manager_default.error(`Domain not found under ${import_chalk86.default.bold(contextName)}`);
|
|
172970
173035
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
172971
173036
|
return 1;
|
|
172972
173037
|
}
|
|
172973
173038
|
if (moveTokenResult instanceof DomainPermissionDenied) {
|
|
172974
173039
|
output_manager_default.error(
|
|
172975
|
-
`You don't have permissions over domain ${
|
|
173040
|
+
`You don't have permissions over domain ${import_chalk86.default.underline(
|
|
172976
173041
|
moveTokenResult.meta.domain
|
|
172977
|
-
)} under ${
|
|
173042
|
+
)} under ${import_chalk86.default.bold(moveTokenResult.meta.context)}.`
|
|
172978
173043
|
);
|
|
172979
173044
|
return 1;
|
|
172980
173045
|
}
|
|
172981
173046
|
if (moveTokenResult instanceof InvalidMoveDestination) {
|
|
172982
173047
|
output_manager_default.error(
|
|
172983
|
-
`Destination ${
|
|
173048
|
+
`Destination ${import_chalk86.default.bold(
|
|
172984
173049
|
destination
|
|
172985
173050
|
)} is invalid. Please supply a valid username, email, team slug, user id, or team id.`
|
|
172986
173051
|
);
|
|
@@ -173025,11 +173090,11 @@ async function findDestinationMatch(destination, user, teams2) {
|
|
|
173025
173090
|
}
|
|
173026
173091
|
return null;
|
|
173027
173092
|
}
|
|
173028
|
-
var
|
|
173093
|
+
var import_chalk86, import_pluralize10;
|
|
173029
173094
|
var init_move2 = __esm({
|
|
173030
173095
|
"src/commands/domains/move.ts"() {
|
|
173031
173096
|
"use strict";
|
|
173032
|
-
|
|
173097
|
+
import_chalk86 = __toESM3(require_source());
|
|
173033
173098
|
import_pluralize10 = __toESM3(require_pluralize());
|
|
173034
173099
|
init_errors_ts();
|
|
173035
173100
|
init_get_scope();
|
|
@@ -173393,6 +173458,11 @@ var init_add7 = __esm({
|
|
|
173393
173458
|
this.trackCliFlag("force");
|
|
173394
173459
|
}
|
|
173395
173460
|
}
|
|
173461
|
+
trackCliFlagGuidance(guidance2) {
|
|
173462
|
+
if (guidance2) {
|
|
173463
|
+
this.trackCliFlag("guidance");
|
|
173464
|
+
}
|
|
173465
|
+
}
|
|
173396
173466
|
};
|
|
173397
173467
|
}
|
|
173398
173468
|
});
|
|
@@ -173420,6 +173490,7 @@ async function add4(client2, argv) {
|
|
|
173420
173490
|
telemetryClient.trackCliArgumentGitBranch(envGitBranch);
|
|
173421
173491
|
telemetryClient.trackCliFlagSensitive(opts["--sensitive"]);
|
|
173422
173492
|
telemetryClient.trackCliFlagForce(opts["--force"]);
|
|
173493
|
+
telemetryClient.trackCliFlagGuidance(opts["--guidance"]);
|
|
173423
173494
|
if (args2.length > 3) {
|
|
173424
173495
|
output_manager_default.error(
|
|
173425
173496
|
`Invalid number of arguments. Usage: ${getCommandName(
|
|
@@ -173543,20 +173614,24 @@ async function add4(client2, argv) {
|
|
|
173543
173614
|
}
|
|
173544
173615
|
output_manager_default.print(
|
|
173545
173616
|
`${prependEmoji(
|
|
173546
|
-
`${opts["--force"] ? "Overrode" : "Added"} Environment Variable ${
|
|
173617
|
+
`${opts["--force"] ? "Overrode" : "Added"} Environment Variable ${import_chalk87.default.bold(envName)} to Project ${import_chalk87.default.bold(
|
|
173547
173618
|
project.name
|
|
173548
|
-
)} ${
|
|
173619
|
+
)} ${import_chalk87.default.gray(addStamp())}`,
|
|
173549
173620
|
emoji("success")
|
|
173550
173621
|
)}
|
|
173551
173622
|
`
|
|
173552
173623
|
);
|
|
173624
|
+
const guidanceMode = parsedArgs.flags["--guidance"] ?? await (0, import_detect_agent2.determineAgent)() !== false;
|
|
173625
|
+
if (guidanceMode) {
|
|
173626
|
+
suggestNextCommands([getCommandName(`env ls`), getCommandName(`env pull`)]);
|
|
173627
|
+
}
|
|
173553
173628
|
return 0;
|
|
173554
173629
|
}
|
|
173555
|
-
var
|
|
173630
|
+
var import_chalk87, import_detect_agent2;
|
|
173556
173631
|
var init_add8 = __esm({
|
|
173557
173632
|
"src/commands/env/add.ts"() {
|
|
173558
173633
|
"use strict";
|
|
173559
|
-
|
|
173634
|
+
import_chalk87 = __toESM3(require_source());
|
|
173560
173635
|
init_stamp();
|
|
173561
173636
|
init_add_env_record();
|
|
173562
173637
|
init_get_env_records();
|
|
@@ -173575,6 +173650,8 @@ var init_add8 = __esm({
|
|
|
173575
173650
|
init_error2();
|
|
173576
173651
|
init_command10();
|
|
173577
173652
|
init_link2();
|
|
173653
|
+
import_detect_agent2 = require("@vercel/detect-agent");
|
|
173654
|
+
init_suggest_next_commands();
|
|
173578
173655
|
}
|
|
173579
173656
|
});
|
|
173580
173657
|
|
|
@@ -173591,7 +173668,7 @@ var init_ellipsis = __esm({
|
|
|
173591
173668
|
// src/util/target/format-environment.ts
|
|
173592
173669
|
function formatEnvironment(orgSlug, projectSlug, environment) {
|
|
173593
173670
|
const projectUrl = `https://vercel.com/${orgSlug}/${projectSlug}`;
|
|
173594
|
-
const boldName =
|
|
173671
|
+
const boldName = import_chalk88.default.bold(
|
|
173595
173672
|
STANDARD_ENVIRONMENTS.includes(environment.slug) ? (0, import_title4.default)(environment.slug) : environment.slug
|
|
173596
173673
|
);
|
|
173597
173674
|
return output_manager_default.link(
|
|
@@ -173600,11 +173677,11 @@ function formatEnvironment(orgSlug, projectSlug, environment) {
|
|
|
173600
173677
|
{ fallback: () => boldName, color: false }
|
|
173601
173678
|
);
|
|
173602
173679
|
}
|
|
173603
|
-
var
|
|
173680
|
+
var import_chalk88, import_title4;
|
|
173604
173681
|
var init_format_environment = __esm({
|
|
173605
173682
|
"src/util/target/format-environment.ts"() {
|
|
173606
173683
|
"use strict";
|
|
173607
|
-
|
|
173684
|
+
import_chalk88 = __toESM3(require_source());
|
|
173608
173685
|
init_output_manager();
|
|
173609
173686
|
init_standard_environments();
|
|
173610
173687
|
import_title4 = __toESM3(require_lib4());
|
|
@@ -173658,6 +173735,11 @@ var init_ls8 = __esm({
|
|
|
173658
173735
|
});
|
|
173659
173736
|
}
|
|
173660
173737
|
}
|
|
173738
|
+
trackCliFlagGuidance(guidance2) {
|
|
173739
|
+
if (guidance2) {
|
|
173740
|
+
this.trackCliFlag("guidance");
|
|
173741
|
+
}
|
|
173742
|
+
}
|
|
173661
173743
|
};
|
|
173662
173744
|
}
|
|
173663
173745
|
});
|
|
@@ -173677,7 +173759,7 @@ async function ls5(client2, argv) {
|
|
|
173677
173759
|
printError(err);
|
|
173678
173760
|
return 1;
|
|
173679
173761
|
}
|
|
173680
|
-
const { args: args2 } = parsedArgs;
|
|
173762
|
+
const { args: args2, flags } = parsedArgs;
|
|
173681
173763
|
if (args2.length > 2) {
|
|
173682
173764
|
output_manager_default.error(
|
|
173683
173765
|
`Invalid number of arguments. Usage: ${getCommandName(
|
|
@@ -173689,6 +173771,7 @@ async function ls5(client2, argv) {
|
|
|
173689
173771
|
const [envTarget, envGitBranch] = args2;
|
|
173690
173772
|
telemetryClient.trackCliArgumentEnvironment(envTarget);
|
|
173691
173773
|
telemetryClient.trackCliArgumentGitBranch(envGitBranch);
|
|
173774
|
+
telemetryClient.trackCliFlagGuidance(flags["--guidance"]);
|
|
173692
173775
|
const link4 = await getLinkedProject(client2);
|
|
173693
173776
|
if (link4.status === "error") {
|
|
173694
173777
|
return link4.exitCode;
|
|
@@ -173714,15 +173797,23 @@ async function ls5(client2, argv) {
|
|
|
173714
173797
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
173715
173798
|
if (envs.length === 0) {
|
|
173716
173799
|
output_manager_default.log(
|
|
173717
|
-
`No Environment Variables found for ${projectSlugLink} ${
|
|
173800
|
+
`No Environment Variables found for ${projectSlugLink} ${import_chalk89.default.gray(lsStamp())}`
|
|
173718
173801
|
);
|
|
173719
173802
|
} else {
|
|
173720
173803
|
output_manager_default.log(
|
|
173721
|
-
`Environment Variables found for ${projectSlugLink} ${
|
|
173804
|
+
`Environment Variables found for ${projectSlugLink} ${import_chalk89.default.gray(lsStamp())}`
|
|
173722
173805
|
);
|
|
173723
173806
|
client2.stdout.write(`${getTable(link4, envs, customEnvs)}
|
|
173724
173807
|
`);
|
|
173725
173808
|
}
|
|
173809
|
+
const guidanceMode = parsedArgs.flags["--guidance"] ?? await (0, import_detect_agent3.determineAgent)() !== false;
|
|
173810
|
+
if (guidanceMode) {
|
|
173811
|
+
suggestNextCommands([
|
|
173812
|
+
getCommandName(`env add`),
|
|
173813
|
+
getCommandName("env rm"),
|
|
173814
|
+
getCommandName(`env pull`)
|
|
173815
|
+
]);
|
|
173816
|
+
}
|
|
173726
173817
|
return 0;
|
|
173727
173818
|
}
|
|
173728
173819
|
function getTable(link4, records, customEnvironments) {
|
|
@@ -173742,25 +173833,25 @@ function getRow(link4, env, customEnvironments) {
|
|
|
173742
173833
|
let value;
|
|
173743
173834
|
if (env.type === "plain") {
|
|
173744
173835
|
const singleLineValue = env.value.replace(/\s/g, " ");
|
|
173745
|
-
value =
|
|
173836
|
+
value = import_chalk89.default.gray(ellipsis(singleLineValue, 19));
|
|
173746
173837
|
} else if (env.type === "system") {
|
|
173747
|
-
value =
|
|
173838
|
+
value = import_chalk89.default.gray.italic(env.value);
|
|
173748
173839
|
} else {
|
|
173749
|
-
value =
|
|
173840
|
+
value = import_chalk89.default.gray.italic("Encrypted");
|
|
173750
173841
|
}
|
|
173751
173842
|
const now = Date.now();
|
|
173752
173843
|
return [
|
|
173753
|
-
|
|
173844
|
+
import_chalk89.default.bold(env.key),
|
|
173754
173845
|
value,
|
|
173755
173846
|
formatEnvironments(link4, env, customEnvironments),
|
|
173756
173847
|
env.createdAt ? `${(0, import_ms19.default)(now - env.createdAt)} ago` : ""
|
|
173757
173848
|
];
|
|
173758
173849
|
}
|
|
173759
|
-
var
|
|
173850
|
+
var import_chalk89, import_ms19, import_detect_agent3;
|
|
173760
173851
|
var init_ls9 = __esm({
|
|
173761
173852
|
"src/commands/env/ls.ts"() {
|
|
173762
173853
|
"use strict";
|
|
173763
|
-
|
|
173854
|
+
import_chalk89 = __toESM3(require_source());
|
|
173764
173855
|
import_ms19 = __toESM3(require_ms());
|
|
173765
173856
|
init_format_table();
|
|
173766
173857
|
init_get_env_records();
|
|
@@ -173778,6 +173869,8 @@ var init_ls9 = __esm({
|
|
|
173778
173869
|
init_get_flags_specification();
|
|
173779
173870
|
init_error2();
|
|
173780
173871
|
init_link2();
|
|
173872
|
+
import_detect_agent3 = require("@vercel/detect-agent");
|
|
173873
|
+
init_suggest_next_commands();
|
|
173781
173874
|
}
|
|
173782
173875
|
});
|
|
173783
173876
|
|
|
@@ -173920,7 +174013,7 @@ async function rm5(client2, argv) {
|
|
|
173920
174013
|
link4,
|
|
173921
174014
|
env,
|
|
173922
174015
|
customEnvironments
|
|
173923
|
-
)} in Project ${
|
|
174016
|
+
)} in Project ${import_chalk90.default.bold(project.name)}. Are you sure?`,
|
|
173924
174017
|
false
|
|
173925
174018
|
)) {
|
|
173926
174019
|
output_manager_default.log("Canceled");
|
|
@@ -173939,18 +174032,18 @@ async function rm5(client2, argv) {
|
|
|
173939
174032
|
}
|
|
173940
174033
|
output_manager_default.print(
|
|
173941
174034
|
`${prependEmoji(
|
|
173942
|
-
`Removed Environment Variable ${
|
|
174035
|
+
`Removed Environment Variable ${import_chalk90.default.gray(rmStamp())}`,
|
|
173943
174036
|
emoji("success")
|
|
173944
174037
|
)}
|
|
173945
174038
|
`
|
|
173946
174039
|
);
|
|
173947
174040
|
return 0;
|
|
173948
174041
|
}
|
|
173949
|
-
var
|
|
174042
|
+
var import_chalk90;
|
|
173950
174043
|
var init_rm8 = __esm({
|
|
173951
174044
|
"src/commands/env/rm.ts"() {
|
|
173952
174045
|
"use strict";
|
|
173953
|
-
|
|
174046
|
+
import_chalk90 = __toESM3(require_source());
|
|
173954
174047
|
init_remove_env_record();
|
|
173955
174048
|
init_get_env_records();
|
|
173956
174049
|
init_format_environments();
|
|
@@ -174165,7 +174258,7 @@ async function connect(client2, argv) {
|
|
|
174165
174258
|
const confirm = Boolean(opts["--yes"]);
|
|
174166
174259
|
if (args2.length > 1) {
|
|
174167
174260
|
output_manager_default.error(
|
|
174168
|
-
`Invalid number of arguments. Usage: ${
|
|
174261
|
+
`Invalid number of arguments. Usage: ${import_chalk91.default.cyan(
|
|
174169
174262
|
`${getCommandName("project connect")}`
|
|
174170
174263
|
)}`
|
|
174171
174264
|
);
|
|
@@ -174212,7 +174305,7 @@ async function connect(client2, argv) {
|
|
|
174212
174305
|
}
|
|
174213
174306
|
if (!gitConfig) {
|
|
174214
174307
|
output_manager_default.error(
|
|
174215
|
-
`No local Git repository found. Run ${
|
|
174308
|
+
`No local Git repository found. Run ${import_chalk91.default.cyan(
|
|
174216
174309
|
"`git clone <url>`"
|
|
174217
174310
|
)} to clone a remote Git repository first.`
|
|
174218
174311
|
);
|
|
@@ -174221,7 +174314,7 @@ async function connect(client2, argv) {
|
|
|
174221
174314
|
const remoteUrls = pluckRemoteUrls(gitConfig);
|
|
174222
174315
|
if (!remoteUrls) {
|
|
174223
174316
|
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 ${
|
|
174317
|
+
`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
174318
|
"`git remote --help`"
|
|
174226
174319
|
)} for more details.`
|
|
174227
174320
|
);
|
|
@@ -174265,7 +174358,7 @@ async function connect(client2, argv) {
|
|
|
174265
174358
|
return checkAndConnect;
|
|
174266
174359
|
}
|
|
174267
174360
|
output_manager_default.log(
|
|
174268
|
-
`Connected ${formatProvider(provider)} repository ${
|
|
174361
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk91.default.cyan(repoPath)}!`
|
|
174269
174362
|
);
|
|
174270
174363
|
return 0;
|
|
174271
174364
|
}
|
|
@@ -174302,7 +174395,7 @@ async function connectArg({
|
|
|
174302
174395
|
return connect2;
|
|
174303
174396
|
}
|
|
174304
174397
|
output_manager_default.log(
|
|
174305
|
-
`Connected ${formatProvider(provider)} repository ${
|
|
174398
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk91.default.cyan(repoPath)}!`
|
|
174306
174399
|
);
|
|
174307
174400
|
return 0;
|
|
174308
174401
|
}
|
|
@@ -174344,7 +174437,7 @@ async function connectArgWithLocalGit({
|
|
|
174344
174437
|
return connect2;
|
|
174345
174438
|
}
|
|
174346
174439
|
output_manager_default.log(
|
|
174347
|
-
`Connected ${formatProvider(provider)} repository ${
|
|
174440
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk91.default.cyan(
|
|
174348
174441
|
repoPath
|
|
174349
174442
|
)}!`
|
|
174350
174443
|
);
|
|
@@ -174375,7 +174468,7 @@ async function promptConnectArg({
|
|
|
174375
174468
|
return true;
|
|
174376
174469
|
}
|
|
174377
174470
|
output_manager_default.log(
|
|
174378
|
-
`Found a repository in your local Git Config: ${
|
|
174471
|
+
`Found a repository in your local Git Config: ${import_chalk91.default.cyan(
|
|
174379
174472
|
Object.values(remoteUrls)[0]
|
|
174380
174473
|
)}`
|
|
174381
174474
|
);
|
|
@@ -174422,7 +174515,7 @@ async function checkExistsAndConnect({
|
|
|
174422
174515
|
const isSameRepo = connectedProvider === provider && connectedOrg === gitOrg && connectedRepo === repo;
|
|
174423
174516
|
if (isSameRepo) {
|
|
174424
174517
|
output_manager_default.log(
|
|
174425
|
-
`${
|
|
174518
|
+
`${import_chalk91.default.cyan(connectedRepoPath)} is already connected to your project.`
|
|
174426
174519
|
);
|
|
174427
174520
|
return 1;
|
|
174428
174521
|
}
|
|
@@ -174453,7 +174546,7 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
|
|
|
174453
174546
|
shouldReplaceProject = await client2.input.confirm(
|
|
174454
174547
|
`Looks like you already have a ${formatProvider(
|
|
174455
174548
|
connectedProvider
|
|
174456
|
-
)} repository connected: ${
|
|
174549
|
+
)} repository connected: ${import_chalk91.default.cyan(
|
|
174457
174550
|
connectedRepoPath
|
|
174458
174551
|
)}. Do you want to replace it?`,
|
|
174459
174552
|
true
|
|
@@ -174468,7 +174561,7 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
|
174468
174561
|
const choices = [];
|
|
174469
174562
|
for (const [urlKey, urlValue] of Object.entries(remoteUrls)) {
|
|
174470
174563
|
choices.push({
|
|
174471
|
-
name: `${urlValue} ${
|
|
174564
|
+
name: `${urlValue} ${import_chalk91.default.gray(`(${urlKey})`)}`,
|
|
174472
174565
|
value: urlValue,
|
|
174473
174566
|
short: urlKey
|
|
174474
174567
|
});
|
|
@@ -174478,11 +174571,11 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
|
174478
174571
|
choices
|
|
174479
174572
|
});
|
|
174480
174573
|
}
|
|
174481
|
-
var
|
|
174574
|
+
var import_chalk91, import_path39;
|
|
174482
174575
|
var init_connect2 = __esm({
|
|
174483
174576
|
"src/commands/git/connect.ts"() {
|
|
174484
174577
|
"use strict";
|
|
174485
|
-
|
|
174578
|
+
import_chalk91 = __toESM3(require_source());
|
|
174486
174579
|
import_path39 = require("path");
|
|
174487
174580
|
init_create_git_meta();
|
|
174488
174581
|
init_list();
|
|
@@ -174546,7 +174639,7 @@ async function disconnect(client2, argv) {
|
|
|
174546
174639
|
}
|
|
174547
174640
|
if (args2.length !== 0) {
|
|
174548
174641
|
output_manager_default.error(
|
|
174549
|
-
`Invalid number of arguments. Usage: ${
|
|
174642
|
+
`Invalid number of arguments. Usage: ${import_chalk92.default.cyan(
|
|
174550
174643
|
`${getCommandName("project disconnect")}`
|
|
174551
174644
|
)}`
|
|
174552
174645
|
);
|
|
@@ -174568,14 +174661,14 @@ async function disconnect(client2, argv) {
|
|
|
174568
174661
|
`
|
|
174569
174662
|
);
|
|
174570
174663
|
const confirmDisconnect = autoConfirm || await client2.input.confirm(
|
|
174571
|
-
`Are you sure you want to disconnect ${
|
|
174664
|
+
`Are you sure you want to disconnect ${import_chalk92.default.cyan(
|
|
174572
174665
|
`${linkOrg}/${repo}`
|
|
174573
174666
|
)} from your project?`,
|
|
174574
174667
|
false
|
|
174575
174668
|
);
|
|
174576
174669
|
if (confirmDisconnect) {
|
|
174577
174670
|
await disconnectGitProvider(client2, org, project.id);
|
|
174578
|
-
output_manager_default.log(`Disconnected ${
|
|
174671
|
+
output_manager_default.log(`Disconnected ${import_chalk92.default.cyan(`${linkOrg}/${repo}`)}.`);
|
|
174579
174672
|
} else {
|
|
174580
174673
|
output_manager_default.log("Canceled");
|
|
174581
174674
|
}
|
|
@@ -174589,11 +174682,11 @@ async function disconnect(client2, argv) {
|
|
|
174589
174682
|
}
|
|
174590
174683
|
return 0;
|
|
174591
174684
|
}
|
|
174592
|
-
var
|
|
174685
|
+
var import_chalk92;
|
|
174593
174686
|
var init_disconnect2 = __esm({
|
|
174594
174687
|
"src/commands/git/disconnect.ts"() {
|
|
174595
174688
|
"use strict";
|
|
174596
|
-
|
|
174689
|
+
import_chalk92 = __toESM3(require_source());
|
|
174597
174690
|
init_pkg_name();
|
|
174598
174691
|
init_connect_git_provider();
|
|
174599
174692
|
init_output_manager();
|
|
@@ -174697,17 +174790,17 @@ var init_git2 = __esm({
|
|
|
174697
174790
|
// src/commands/guidance/status.ts
|
|
174698
174791
|
async function status(client2) {
|
|
174699
174792
|
const enabled = client2.config.guidance?.enabled !== false;
|
|
174700
|
-
const status3 = enabled ?
|
|
174793
|
+
const status3 = enabled ? import_chalk93.default.green("Enabled") : import_chalk93.default.red("Disabled");
|
|
174701
174794
|
output_manager_default.print("\n");
|
|
174702
|
-
output_manager_default.log(`${
|
|
174795
|
+
output_manager_default.log(`${import_chalk93.default.bold("Guidance status")}: ${status3}`);
|
|
174703
174796
|
output_manager_default.print("\n");
|
|
174704
174797
|
return 0;
|
|
174705
174798
|
}
|
|
174706
|
-
var
|
|
174799
|
+
var import_chalk93;
|
|
174707
174800
|
var init_status = __esm({
|
|
174708
174801
|
"src/commands/guidance/status.ts"() {
|
|
174709
174802
|
"use strict";
|
|
174710
|
-
|
|
174803
|
+
import_chalk93 = __toESM3(require_source());
|
|
174711
174804
|
init_output_manager();
|
|
174712
174805
|
}
|
|
174713
174806
|
});
|
|
@@ -175065,9 +175158,9 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
|
175065
175158
|
extractor.on("finish", resolve13);
|
|
175066
175159
|
res.body.pipe(extractor);
|
|
175067
175160
|
});
|
|
175068
|
-
const successLog = `Initialized "${
|
|
175161
|
+
const successLog = `Initialized "${import_chalk94.default.bold(
|
|
175069
175162
|
name
|
|
175070
|
-
)}" example in ${
|
|
175163
|
+
)}" example in ${import_chalk94.default.bold(humanizePath(folder))}.`;
|
|
175071
175164
|
const folderRel = import_node_path4.default.relative(client2.cwd, folder);
|
|
175072
175165
|
const deployHint = folderRel === "" ? list_item_default(`To deploy, run ${getCommandName()}.`) : list_item_default(
|
|
175073
175166
|
`To deploy, ${cmd(
|
|
@@ -175087,14 +175180,14 @@ function prepareFolder(cwd, folder, force) {
|
|
|
175087
175180
|
if (import_node_fs2.default.existsSync(dest)) {
|
|
175088
175181
|
if (!import_node_fs2.default.lstatSync(dest).isDirectory()) {
|
|
175089
175182
|
throw new Error(
|
|
175090
|
-
`Destination path "${
|
|
175183
|
+
`Destination path "${import_chalk94.default.bold(
|
|
175091
175184
|
folder
|
|
175092
175185
|
)}" already exists and is not a directory.`
|
|
175093
175186
|
);
|
|
175094
175187
|
}
|
|
175095
175188
|
if (!force && import_node_fs2.default.readdirSync(dest).length !== 0) {
|
|
175096
175189
|
throw new Error(
|
|
175097
|
-
`Destination path "${
|
|
175190
|
+
`Destination path "${import_chalk94.default.bold(
|
|
175098
175191
|
folder
|
|
175099
175192
|
)}" already exists and is not an empty directory. You may use ${cmd(
|
|
175100
175193
|
"--force"
|
|
@@ -175105,14 +175198,14 @@ function prepareFolder(cwd, folder, force) {
|
|
|
175105
175198
|
try {
|
|
175106
175199
|
import_node_fs2.default.mkdirSync(dest);
|
|
175107
175200
|
} catch (e2) {
|
|
175108
|
-
throw new Error(`Could not create directory "${
|
|
175201
|
+
throw new Error(`Could not create directory "${import_chalk94.default.bold(folder)}".`);
|
|
175109
175202
|
}
|
|
175110
175203
|
}
|
|
175111
175204
|
return dest;
|
|
175112
175205
|
}
|
|
175113
175206
|
async function guess(client2, exampleList, name) {
|
|
175114
175207
|
const GuessError = new Error(
|
|
175115
|
-
`No example found for ${
|
|
175208
|
+
`No example found for ${import_chalk94.default.bold(name)}, run ${getCommandName(
|
|
175116
175209
|
"init"
|
|
175117
175210
|
)} to see the list of available examples.`
|
|
175118
175211
|
);
|
|
@@ -175121,21 +175214,21 @@ async function guess(client2, exampleList, name) {
|
|
|
175121
175214
|
}
|
|
175122
175215
|
const found = did_you_mean_default(name, exampleList, 0.7);
|
|
175123
175216
|
if (typeof found === "string") {
|
|
175124
|
-
if (await client2.input.confirm(`Did you mean ${
|
|
175217
|
+
if (await client2.input.confirm(`Did you mean ${import_chalk94.default.bold(found)}?`, false)) {
|
|
175125
175218
|
return found;
|
|
175126
175219
|
}
|
|
175127
175220
|
} else {
|
|
175128
175221
|
throw GuessError;
|
|
175129
175222
|
}
|
|
175130
175223
|
}
|
|
175131
|
-
var import_node_fs2, import_node_path4, import_tar_fs,
|
|
175224
|
+
var import_node_fs2, import_node_path4, import_tar_fs, import_chalk94, EXAMPLE_API;
|
|
175132
175225
|
var init_init = __esm({
|
|
175133
175226
|
"src/commands/init/init.ts"() {
|
|
175134
175227
|
"use strict";
|
|
175135
175228
|
import_node_fs2 = __toESM3(require("fs"));
|
|
175136
175229
|
import_node_path4 = __toESM3(require("path"));
|
|
175137
175230
|
import_tar_fs = __toESM3(require_tar_fs());
|
|
175138
|
-
|
|
175231
|
+
import_chalk94 = __toESM3(require_source());
|
|
175139
175232
|
init_list();
|
|
175140
175233
|
init_list_item();
|
|
175141
175234
|
init_humanize_path();
|
|
@@ -175251,11 +175344,11 @@ var init_build_state = __esm({
|
|
|
175251
175344
|
});
|
|
175252
175345
|
|
|
175253
175346
|
// src/util/output/builds.ts
|
|
175254
|
-
var
|
|
175347
|
+
var import_chalk95, import_bytes8, padding, MAX_BUILD_GROUPS, MAX_OUTPUTS_PER_GROUP, hasOutput, getCommonPath, styleBuild, styleHiddenBuilds, styleOutput, getDirPath, sortByEntrypoint, groupBuilds, builds_default;
|
|
175255
175348
|
var init_builds = __esm({
|
|
175256
175349
|
"src/util/output/builds.ts"() {
|
|
175257
175350
|
"use strict";
|
|
175258
|
-
|
|
175351
|
+
import_chalk95 = __toESM3(require_source());
|
|
175259
175352
|
import_bytes8 = __toESM3(require_bytes());
|
|
175260
175353
|
init_build_state();
|
|
175261
175354
|
padding = 8;
|
|
@@ -175284,48 +175377,48 @@ var init_builds = __esm({
|
|
|
175284
175377
|
styleBuild = (build2, times, longestSource) => {
|
|
175285
175378
|
const { entrypoint, id } = build2;
|
|
175286
175379
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
175287
|
-
let pathColor =
|
|
175380
|
+
let pathColor = import_chalk95.default.cyan;
|
|
175288
175381
|
if (isFailed(build2)) {
|
|
175289
|
-
pathColor =
|
|
175382
|
+
pathColor = import_chalk95.default.red;
|
|
175290
175383
|
}
|
|
175291
175384
|
const entry = entrypoint.padEnd(longestSource + padding);
|
|
175292
175385
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
|
175293
|
-
return `${
|
|
175386
|
+
return `${import_chalk95.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
175294
175387
|
};
|
|
175295
175388
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden2 = false) => {
|
|
175296
175389
|
const { id } = buildGroup[0];
|
|
175297
175390
|
const entry = commonPath.padEnd(longestSource + padding);
|
|
175298
175391
|
const time = typeof times[id] === "string" ? times[id] : "";
|
|
175299
175392
|
const prefix = isHidden2 === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
|
175300
|
-
let pathColor =
|
|
175393
|
+
let pathColor = import_chalk95.default.cyan;
|
|
175301
175394
|
if (buildGroup.every(isFailed)) {
|
|
175302
|
-
pathColor =
|
|
175395
|
+
pathColor = import_chalk95.default.red;
|
|
175303
175396
|
}
|
|
175304
175397
|
if (isHidden2) {
|
|
175305
|
-
pathColor =
|
|
175398
|
+
pathColor = import_chalk95.default.grey;
|
|
175306
175399
|
}
|
|
175307
|
-
return `${
|
|
175400
|
+
return `${import_chalk95.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
|
175308
175401
|
};
|
|
175309
175402
|
styleOutput = (output2, readyState, isLast) => {
|
|
175310
175403
|
const { type, path: path11, size, lambda } = output2;
|
|
175311
175404
|
const prefix = type === "lambda" ? "\u03BB " : "";
|
|
175312
|
-
const finalSize = size ? ` ${
|
|
175313
|
-
let color =
|
|
175405
|
+
const finalSize = size ? ` ${import_chalk95.default.grey(`(${(0, import_bytes8.default)(size)})`)}` : "";
|
|
175406
|
+
let color = import_chalk95.default.grey;
|
|
175314
175407
|
let finalRegion = "";
|
|
175315
175408
|
if (isReady({ readyState })) {
|
|
175316
|
-
color =
|
|
175409
|
+
color = import_chalk95.default;
|
|
175317
175410
|
} else if (isFailed({ readyState })) {
|
|
175318
|
-
color =
|
|
175411
|
+
color = import_chalk95.default.red;
|
|
175319
175412
|
}
|
|
175320
175413
|
if (lambda) {
|
|
175321
175414
|
const { deployedTo } = lambda;
|
|
175322
175415
|
if (deployedTo && deployedTo.length > 0) {
|
|
175323
|
-
finalRegion = ` ${
|
|
175416
|
+
finalRegion = ` ${import_chalk95.default.grey(`[${deployedTo.join(", ")}]`)}`;
|
|
175324
175417
|
}
|
|
175325
175418
|
}
|
|
175326
175419
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
|
175327
175420
|
const main18 = prefix + path11 + finalSize + finalRegion;
|
|
175328
|
-
return `${
|
|
175421
|
+
return `${import_chalk95.default.grey(corner)} ${color(main18)}`;
|
|
175329
175422
|
};
|
|
175330
175423
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
|
175331
175424
|
const parts = path11.split("/").slice(0, -1);
|
|
@@ -175457,7 +175550,7 @@ var init_builds = __esm({
|
|
|
175457
175550
|
);
|
|
175458
175551
|
if (outputs.length > MAX_OUTPUTS_PER_GROUP) {
|
|
175459
175552
|
final.push(
|
|
175460
|
-
|
|
175553
|
+
import_chalk95.default.grey(
|
|
175461
175554
|
`\u2514\u2500\u2500 ${outputs.length - MAX_OUTPUTS_PER_GROUP} output items hidden
|
|
175462
175555
|
`
|
|
175463
175556
|
)
|
|
@@ -175505,19 +175598,19 @@ function routes(routes2) {
|
|
|
175505
175598
|
const padding2 = 6;
|
|
175506
175599
|
const space = " ".repeat(padding2);
|
|
175507
175600
|
const destSpace = " ".repeat(longestDest || 10);
|
|
175508
|
-
const arrow =
|
|
175601
|
+
const arrow = import_chalk96.default.grey("->");
|
|
175509
175602
|
for (const item of routes2) {
|
|
175510
175603
|
if ("handle" in item) {
|
|
175511
|
-
toPrint += `${
|
|
175604
|
+
toPrint += `${import_chalk96.default.grey("\u2576")} ${import_chalk96.default.cyan(item.handle)}`;
|
|
175512
175605
|
continue;
|
|
175513
175606
|
}
|
|
175514
175607
|
const { src, dest, status: status3, headers } = item;
|
|
175515
175608
|
const last = routes2.indexOf(item) === routes2.length - 1;
|
|
175516
175609
|
const suffix = last ? "" : `
|
|
175517
175610
|
`;
|
|
175518
|
-
const finalSrc =
|
|
175611
|
+
const finalSrc = import_chalk96.default.cyan(src.padEnd(longestSrc + padding2));
|
|
175519
175612
|
const finalDest = dest ? `${arrow}${space}${dest}` : ` ${space}${destSpace}`;
|
|
175520
|
-
const finalStatus = status3 ?
|
|
175613
|
+
const finalStatus = status3 ? import_chalk96.default.grey(`[${status3}]`) : "";
|
|
175521
175614
|
let finalHeaders = null;
|
|
175522
175615
|
if (headers) {
|
|
175523
175616
|
finalHeaders = `
|
|
@@ -175528,21 +175621,21 @@ function routes(routes2) {
|
|
|
175528
175621
|
const last2 = headerKeys.indexOf(header) === headerKeys.length - 1;
|
|
175529
175622
|
const suffix2 = last2 ? "" : `
|
|
175530
175623
|
`;
|
|
175531
|
-
const prefix2 =
|
|
175624
|
+
const prefix2 = import_chalk96.default.grey(last2 ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500");
|
|
175532
175625
|
finalHeaders += `${prefix2} ${header}: ${value}${suffix2}`;
|
|
175533
175626
|
}
|
|
175534
175627
|
}
|
|
175535
|
-
const prefix =
|
|
175628
|
+
const prefix = import_chalk96.default.grey(finalHeaders ? "\u250C" : "\u2576");
|
|
175536
175629
|
const fill = `${finalSrc}${finalDest}${space}${finalStatus}`;
|
|
175537
175630
|
toPrint += `${prefix} ${fill}${finalHeaders || ""}${suffix}`;
|
|
175538
175631
|
}
|
|
175539
175632
|
return toPrint;
|
|
175540
175633
|
}
|
|
175541
|
-
var
|
|
175634
|
+
var import_chalk96, longestProperty;
|
|
175542
175635
|
var init_routes = __esm({
|
|
175543
175636
|
"src/util/output/routes.ts"() {
|
|
175544
175637
|
"use strict";
|
|
175545
|
-
|
|
175638
|
+
import_chalk96 = __toESM3(require_source());
|
|
175546
175639
|
longestProperty = (routes2, name) => {
|
|
175547
175640
|
const longestItem = routes2.sort((a, b) => {
|
|
175548
175641
|
const aName = a[name];
|
|
@@ -175662,7 +175755,7 @@ async function inspect3(client2) {
|
|
|
175662
175755
|
} catch {
|
|
175663
175756
|
}
|
|
175664
175757
|
output_manager_default.spinner(
|
|
175665
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
|
175758
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk97.default.bold(contextName)}`
|
|
175666
175759
|
);
|
|
175667
175760
|
let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
|
175668
175761
|
let abortController;
|
|
@@ -175689,7 +175782,7 @@ async function inspect3(client2) {
|
|
|
175689
175782
|
}
|
|
175690
175783
|
}
|
|
175691
175784
|
if (withLogs) {
|
|
175692
|
-
print(`${
|
|
175785
|
+
print(`${import_chalk97.default.cyan("status")} ${stateString(deployment.readyState)}
|
|
175693
175786
|
`);
|
|
175694
175787
|
} else {
|
|
175695
175788
|
await printDetails({ deployment, contextName, client: client2, startTimestamp });
|
|
@@ -175702,17 +175795,17 @@ function stateString(s) {
|
|
|
175702
175795
|
switch (s) {
|
|
175703
175796
|
case "INITIALIZING":
|
|
175704
175797
|
case "BUILDING":
|
|
175705
|
-
return
|
|
175798
|
+
return import_chalk97.default.yellow(CIRCLE) + sTitle;
|
|
175706
175799
|
case "ERROR":
|
|
175707
|
-
return
|
|
175800
|
+
return import_chalk97.default.red(CIRCLE) + sTitle;
|
|
175708
175801
|
case "READY":
|
|
175709
|
-
return
|
|
175802
|
+
return import_chalk97.default.green(CIRCLE) + sTitle;
|
|
175710
175803
|
case "QUEUED":
|
|
175711
|
-
return
|
|
175804
|
+
return import_chalk97.default.gray(CIRCLE) + sTitle;
|
|
175712
175805
|
case "CANCELED":
|
|
175713
|
-
return
|
|
175806
|
+
return import_chalk97.default.gray(CIRCLE) + sTitle;
|
|
175714
175807
|
default:
|
|
175715
|
-
return
|
|
175808
|
+
return import_chalk97.default.gray("UNKNOWN");
|
|
175716
175809
|
}
|
|
175717
175810
|
}
|
|
175718
175811
|
async function printDetails({
|
|
@@ -175722,7 +175815,7 @@ async function printDetails({
|
|
|
175722
175815
|
startTimestamp
|
|
175723
175816
|
}) {
|
|
175724
175817
|
output_manager_default.log(
|
|
175725
|
-
`Fetched deployment "${
|
|
175818
|
+
`Fetched deployment "${import_chalk97.default.bold(deployment.url)}" in ${import_chalk97.default.bold(
|
|
175726
175819
|
contextName
|
|
175727
175820
|
)} ${elapsed(Date.now() - startTimestamp)}`
|
|
175728
175821
|
);
|
|
@@ -175738,14 +175831,14 @@ async function printDetails({
|
|
|
175738
175831
|
const { print, link: link4 } = output_manager_default;
|
|
175739
175832
|
const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
|
|
175740
175833
|
print("\n");
|
|
175741
|
-
print(
|
|
175742
|
-
print(` ${
|
|
175834
|
+
print(import_chalk97.default.bold(" General\n\n"));
|
|
175835
|
+
print(` ${import_chalk97.default.cyan("id")} ${id}
|
|
175743
175836
|
`);
|
|
175744
|
-
print(` ${
|
|
175837
|
+
print(` ${import_chalk97.default.cyan("name")} ${name}
|
|
175745
175838
|
`);
|
|
175746
175839
|
const customEnvironmentSlug = deployment.customEnvironment?.slug;
|
|
175747
175840
|
const target = customEnvironmentSlug ?? deployment.target ?? "preview";
|
|
175748
|
-
print(` ${
|
|
175841
|
+
print(` ${import_chalk97.default.cyan("target")} `);
|
|
175749
175842
|
print(
|
|
175750
175843
|
deployment.customEnvironment && deployment.team?.slug ? `${link4(
|
|
175751
175844
|
`${target}`,
|
|
@@ -175755,13 +175848,13 @@ async function printDetails({
|
|
|
175755
175848
|
` : `${target}
|
|
175756
175849
|
`
|
|
175757
175850
|
);
|
|
175758
|
-
print(` ${
|
|
175851
|
+
print(` ${import_chalk97.default.cyan("status")} ${stateString(readyState)}
|
|
175759
175852
|
`);
|
|
175760
|
-
print(` ${
|
|
175853
|
+
print(` ${import_chalk97.default.cyan("url")} https://${url3}
|
|
175761
175854
|
`);
|
|
175762
175855
|
if (createdAt) {
|
|
175763
175856
|
print(
|
|
175764
|
-
` ${
|
|
175857
|
+
` ${import_chalk97.default.cyan("created")} ${new Date(createdAt)} ${elapsed(
|
|
175765
175858
|
Date.now() - createdAt,
|
|
175766
175859
|
true
|
|
175767
175860
|
)}
|
|
@@ -175770,10 +175863,10 @@ async function printDetails({
|
|
|
175770
175863
|
}
|
|
175771
175864
|
print("\n\n");
|
|
175772
175865
|
if (aliases !== void 0 && aliases.length > 0) {
|
|
175773
|
-
print(
|
|
175866
|
+
print(import_chalk97.default.bold(" Aliases\n\n"));
|
|
175774
175867
|
let aliasList = "";
|
|
175775
175868
|
for (const alias2 of aliases) {
|
|
175776
|
-
aliasList += `${
|
|
175869
|
+
aliasList += `${import_chalk97.default.gray("\u2576")} https://${alias2}
|
|
175777
175870
|
`;
|
|
175778
175871
|
}
|
|
175779
175872
|
print(indent_default(aliasList, 4));
|
|
@@ -175785,12 +175878,12 @@ async function printDetails({
|
|
|
175785
175878
|
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
|
175786
175879
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
|
175787
175880
|
}
|
|
175788
|
-
print(
|
|
175881
|
+
print(import_chalk97.default.bold(" Builds\n\n"));
|
|
175789
175882
|
print(indent_default(builds_default(builds, times).toPrint, 4));
|
|
175790
175883
|
print("\n\n");
|
|
175791
175884
|
}
|
|
175792
175885
|
if (Array.isArray(routes2) && routes2.length > 0) {
|
|
175793
|
-
print(
|
|
175886
|
+
print(import_chalk97.default.bold(" Routes\n\n"));
|
|
175794
175887
|
print(indent_default(routes(routes2), 4));
|
|
175795
175888
|
print(`
|
|
175796
175889
|
|
|
@@ -175803,12 +175896,12 @@ function exitCode(state) {
|
|
|
175803
175896
|
}
|
|
175804
175897
|
return 0;
|
|
175805
175898
|
}
|
|
175806
|
-
var import_error_utils28,
|
|
175899
|
+
var import_error_utils28, import_chalk97, import_ms20, import_title6, import_url20;
|
|
175807
175900
|
var init_inspect4 = __esm({
|
|
175808
175901
|
"src/commands/inspect/index.ts"() {
|
|
175809
175902
|
"use strict";
|
|
175810
175903
|
import_error_utils28 = __toESM3(require_dist2());
|
|
175811
|
-
|
|
175904
|
+
import_chalk97 = __toESM3(require_source());
|
|
175812
175905
|
import_ms20 = __toESM3(require_ms());
|
|
175813
175906
|
import_title6 = __toESM3(require_lib4());
|
|
175814
175907
|
import_url20 = require("url");
|
|
@@ -176244,7 +176337,7 @@ async function add5(client2, args2) {
|
|
|
176244
176337
|
}
|
|
176245
176338
|
const installation = teamInstallations[0];
|
|
176246
176339
|
output_manager_default.log(
|
|
176247
|
-
`Installing ${
|
|
176340
|
+
`Installing ${import_chalk98.default.bold(product.name)} by ${import_chalk98.default.bold(integration.name)} under ${import_chalk98.default.bold(contextName)}`
|
|
176248
176341
|
);
|
|
176249
176342
|
const metadataSchema = product.metadataSchema;
|
|
176250
176343
|
const metadataWizard = createMetadataWizard(metadataSchema);
|
|
@@ -176464,16 +176557,16 @@ async function selectBillingPlan(client2, billingPlans) {
|
|
|
176464
176557
|
}
|
|
176465
176558
|
async function confirmProductSelection(client2, product, name, metadata, billingPlan) {
|
|
176466
176559
|
output_manager_default.print("Selected product:\n");
|
|
176467
|
-
output_manager_default.print(`${
|
|
176560
|
+
output_manager_default.print(`${import_chalk98.default.dim(`- ${import_chalk98.default.bold("Name:")} ${name}`)}
|
|
176468
176561
|
`);
|
|
176469
176562
|
for (const [key, value] of Object.entries(metadata)) {
|
|
176470
176563
|
output_manager_default.print(
|
|
176471
|
-
`${
|
|
176564
|
+
`${import_chalk98.default.dim(`- ${import_chalk98.default.bold(`${product.metadataSchema.properties[key]["ui:label"]}:`)} ${value}`)}
|
|
176472
176565
|
`
|
|
176473
176566
|
);
|
|
176474
176567
|
}
|
|
176475
176568
|
output_manager_default.print(
|
|
176476
|
-
`${
|
|
176569
|
+
`${import_chalk98.default.dim(`- ${import_chalk98.default.bold("Plan:")} ${billingPlan.name}`)}
|
|
176477
176570
|
`
|
|
176478
176571
|
);
|
|
176479
176572
|
return client2.input.confirm("Confirm selection?", true);
|
|
@@ -176583,7 +176676,7 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
|
176583
176676
|
]
|
|
176584
176677
|
});
|
|
176585
176678
|
output_manager_default.spinner(
|
|
176586
|
-
`Connecting ${
|
|
176679
|
+
`Connecting ${import_chalk98.default.bold(name)} to ${import_chalk98.default.bold(project.name)}...`
|
|
176587
176680
|
);
|
|
176588
176681
|
try {
|
|
176589
176682
|
await connectResourceToProject(
|
|
@@ -176601,17 +176694,17 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
|
176601
176694
|
output_manager_default.stopSpinner();
|
|
176602
176695
|
}
|
|
176603
176696
|
output_manager_default.log(
|
|
176604
|
-
`${
|
|
176697
|
+
`${import_chalk98.default.bold(name)} successfully connected to ${import_chalk98.default.bold(project.name)}
|
|
176605
176698
|
|
|
176606
176699
|
${indent_default(`Run ${cmd(`${packageName} env pull`)} to update the environment variables`, 4)}`
|
|
176607
176700
|
);
|
|
176608
176701
|
return 0;
|
|
176609
176702
|
}
|
|
176610
|
-
var
|
|
176703
|
+
var import_chalk98, import_open3;
|
|
176611
176704
|
var init_add10 = __esm({
|
|
176612
176705
|
"src/commands/integration/add.ts"() {
|
|
176613
176706
|
"use strict";
|
|
176614
|
-
|
|
176707
|
+
import_chalk98 = __toESM3(require_source());
|
|
176615
176708
|
import_open3 = __toESM3(require_open());
|
|
176616
176709
|
init_format_table();
|
|
176617
176710
|
init_pkg_name();
|
|
@@ -176931,7 +177024,7 @@ function outputBalanceInformation(prepaymentInfo, resources, integrationSlug) {
|
|
|
176931
177024
|
}
|
|
176932
177025
|
}
|
|
176933
177026
|
output_manager_default.log(
|
|
176934
|
-
`${
|
|
177027
|
+
`${import_chalk99.default.bold(`Balances and thresholds for ${integrationSlug}`)}:`
|
|
176935
177028
|
);
|
|
176936
177029
|
for (const key in mappings) {
|
|
176937
177030
|
const mapping = mappings[key];
|
|
@@ -176957,11 +177050,11 @@ function formattedCurrency(amountInCents) {
|
|
|
176957
177050
|
currency: "USD"
|
|
176958
177051
|
}).format(amountInCents / 100);
|
|
176959
177052
|
}
|
|
176960
|
-
var
|
|
177053
|
+
var import_chalk99;
|
|
176961
177054
|
var init_balance2 = __esm({
|
|
176962
177055
|
"src/commands/integration/balance.ts"() {
|
|
176963
177056
|
"use strict";
|
|
176964
|
-
|
|
177057
|
+
import_chalk99 = __toESM3(require_source());
|
|
176965
177058
|
init_output_manager();
|
|
176966
177059
|
init_get_scope();
|
|
176967
177060
|
init_fetch_installation_prepayment_info();
|
|
@@ -177115,18 +177208,18 @@ async function list4(client2) {
|
|
|
177115
177208
|
return 0;
|
|
177116
177209
|
}
|
|
177117
177210
|
output_manager_default.log(
|
|
177118
|
-
`Integrations in ${
|
|
177211
|
+
`Integrations in ${import_chalk100.default.bold(contextName)}:
|
|
177119
177212
|
${table(
|
|
177120
177213
|
[
|
|
177121
177214
|
["Name", "Status", "Product", "Integration", "Projects"].map(
|
|
177122
|
-
(header) =>
|
|
177215
|
+
(header) => import_chalk100.default.bold(import_chalk100.default.cyan(header))
|
|
177123
177216
|
),
|
|
177124
177217
|
...results.map((result) => [
|
|
177125
|
-
resourceLink(contextName, result) ??
|
|
177218
|
+
resourceLink(contextName, result) ?? import_chalk100.default.gray("\u2013"),
|
|
177126
177219
|
resourceStatus(result.status ?? "\u2013"),
|
|
177127
|
-
result.product ??
|
|
177128
|
-
integrationLink(result, team) ??
|
|
177129
|
-
|
|
177220
|
+
result.product ?? import_chalk100.default.gray("\u2013"),
|
|
177221
|
+
integrationLink(result, team) ?? import_chalk100.default.gray("\u2013"),
|
|
177222
|
+
import_chalk100.default.grey(result.projects ? result.projects : "\u2013")
|
|
177130
177223
|
])
|
|
177131
177224
|
],
|
|
177132
177225
|
{ hsep: 8 }
|
|
@@ -177139,17 +177232,17 @@ function resourceStatus(status3) {
|
|
|
177139
177232
|
const statusTitleCase = (0, import_title7.default)(status3);
|
|
177140
177233
|
switch (status3) {
|
|
177141
177234
|
case "initializing":
|
|
177142
|
-
return
|
|
177235
|
+
return import_chalk100.default.yellow(CIRCLE) + statusTitleCase;
|
|
177143
177236
|
case "error":
|
|
177144
|
-
return
|
|
177237
|
+
return import_chalk100.default.red(CIRCLE) + statusTitleCase;
|
|
177145
177238
|
case "available":
|
|
177146
|
-
return
|
|
177239
|
+
return import_chalk100.default.green(CIRCLE) + statusTitleCase;
|
|
177147
177240
|
case "suspended":
|
|
177148
|
-
return
|
|
177241
|
+
return import_chalk100.default.white(CIRCLE) + statusTitleCase;
|
|
177149
177242
|
case "limits-exceeded-suspended":
|
|
177150
|
-
return `${
|
|
177243
|
+
return `${import_chalk100.default.white(CIRCLE)}Limits exceeded`;
|
|
177151
177244
|
default:
|
|
177152
|
-
return
|
|
177245
|
+
return import_chalk100.default.gray(statusTitleCase);
|
|
177153
177246
|
}
|
|
177154
177247
|
}
|
|
177155
177248
|
function resourceLink(orgSlug, resource) {
|
|
@@ -177170,18 +177263,18 @@ function integrationLink(integration, team) {
|
|
|
177170
177263
|
if (!integration.configurationId) {
|
|
177171
177264
|
return integration.integration;
|
|
177172
177265
|
}
|
|
177173
|
-
const boldName =
|
|
177266
|
+
const boldName = import_chalk100.default.bold(integration.integration);
|
|
177174
177267
|
const integrationDeepLink = buildSSOLink(team, integration.configurationId);
|
|
177175
177268
|
return output_manager_default.link(boldName, integrationDeepLink, {
|
|
177176
177269
|
fallback: () => boldName,
|
|
177177
177270
|
color: false
|
|
177178
177271
|
});
|
|
177179
177272
|
}
|
|
177180
|
-
var
|
|
177273
|
+
var import_chalk100, import_title7;
|
|
177181
177274
|
var init_list6 = __esm({
|
|
177182
177275
|
"src/commands/integration/list.ts"() {
|
|
177183
177276
|
"use strict";
|
|
177184
|
-
|
|
177277
|
+
import_chalk100 = __toESM3(require_source());
|
|
177185
177278
|
init_get_scope();
|
|
177186
177279
|
init_link2();
|
|
177187
177280
|
init_get_resources();
|
|
@@ -177242,7 +177335,7 @@ async function openIntegration(client2, args2) {
|
|
|
177242
177335
|
knownIntegrationSlug = !!configuration;
|
|
177243
177336
|
} catch (error3) {
|
|
177244
177337
|
output_manager_default.error(
|
|
177245
|
-
`Failed to fetch configuration for ${
|
|
177338
|
+
`Failed to fetch configuration for ${import_chalk101.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
|
|
177246
177339
|
);
|
|
177247
177340
|
return 1;
|
|
177248
177341
|
} finally {
|
|
@@ -177250,19 +177343,19 @@ async function openIntegration(client2, args2) {
|
|
|
177250
177343
|
}
|
|
177251
177344
|
if (!configuration) {
|
|
177252
177345
|
output_manager_default.error(
|
|
177253
|
-
`No configuration found for ${
|
|
177346
|
+
`No configuration found for ${import_chalk101.default.bold(`"${integrationSlug}"`)}.`
|
|
177254
177347
|
);
|
|
177255
177348
|
return 1;
|
|
177256
177349
|
}
|
|
177257
|
-
output_manager_default.print(`Opening the ${
|
|
177350
|
+
output_manager_default.print(`Opening the ${import_chalk101.default.bold(integrationSlug)} dashboard...`);
|
|
177258
177351
|
(0, import_open4.default)(buildSSOLink(team, configuration.id));
|
|
177259
177352
|
return 0;
|
|
177260
177353
|
}
|
|
177261
|
-
var
|
|
177354
|
+
var import_chalk101, import_open4;
|
|
177262
177355
|
var init_open_integration = __esm({
|
|
177263
177356
|
"src/commands/integration/open-integration.ts"() {
|
|
177264
177357
|
"use strict";
|
|
177265
|
-
|
|
177358
|
+
import_chalk101 = __toESM3(require_source());
|
|
177266
177359
|
import_open4 = __toESM3(require_open());
|
|
177267
177360
|
init_get_scope();
|
|
177268
177361
|
init_fetch_marketplace_integrations();
|
|
@@ -177355,7 +177448,7 @@ async function remove3(client2) {
|
|
|
177355
177448
|
);
|
|
177356
177449
|
output_manager_default.stopSpinner();
|
|
177357
177450
|
if (!integrationConfiguration) {
|
|
177358
|
-
output_manager_default.error(`No integration ${
|
|
177451
|
+
output_manager_default.error(`No integration ${import_chalk102.default.bold(integrationName)} found.`);
|
|
177359
177452
|
telemetry2.trackCliArgumentIntegration(integrationName, false);
|
|
177360
177453
|
return 0;
|
|
177361
177454
|
}
|
|
@@ -177374,26 +177467,26 @@ async function remove3(client2) {
|
|
|
177374
177467
|
await removeIntegration(client2, integrationConfiguration, team);
|
|
177375
177468
|
} catch (error3) {
|
|
177376
177469
|
output_manager_default.error(
|
|
177377
|
-
|
|
177378
|
-
`Failed to remove ${
|
|
177470
|
+
import_chalk102.default.red(
|
|
177471
|
+
`Failed to remove ${import_chalk102.default.bold(integrationName)}: ${error3.message}`
|
|
177379
177472
|
)
|
|
177380
177473
|
);
|
|
177381
177474
|
return 1;
|
|
177382
177475
|
}
|
|
177383
|
-
output_manager_default.success(`${
|
|
177476
|
+
output_manager_default.success(`${import_chalk102.default.bold(integrationName)} successfully removed.`);
|
|
177384
177477
|
return 0;
|
|
177385
177478
|
}
|
|
177386
177479
|
async function confirmIntegrationRemoval(client2, integration, team) {
|
|
177387
177480
|
output_manager_default.log(
|
|
177388
|
-
`The ${
|
|
177481
|
+
`The ${import_chalk102.default.bold(integration)} integration will be removed permanently from team ${import_chalk102.default.bold(team.name)}.`
|
|
177389
177482
|
);
|
|
177390
|
-
return client2.input.confirm(`${
|
|
177483
|
+
return client2.input.confirm(`${import_chalk102.default.red("Are you sure?")}`, false);
|
|
177391
177484
|
}
|
|
177392
|
-
var
|
|
177485
|
+
var import_chalk102;
|
|
177393
177486
|
var init_remove_integration2 = __esm({
|
|
177394
177487
|
"src/commands/integration/remove-integration.ts"() {
|
|
177395
177488
|
"use strict";
|
|
177396
|
-
|
|
177489
|
+
import_chalk102 = __toESM3(require_source());
|
|
177397
177490
|
init_output_manager();
|
|
177398
177491
|
init_get_args();
|
|
177399
177492
|
init_get_flags_specification();
|
|
@@ -177691,18 +177784,18 @@ async function createThreshold(client2) {
|
|
|
177691
177784
|
);
|
|
177692
177785
|
output_manager_default.stopSpinner();
|
|
177693
177786
|
if (!targetedResource) {
|
|
177694
|
-
output_manager_default.log(`The resource ${
|
|
177787
|
+
output_manager_default.log(`The resource ${import_chalk103.default.bold(resourceName)} was not found.`);
|
|
177695
177788
|
return 0;
|
|
177696
177789
|
}
|
|
177697
177790
|
if (!targetedResource.product?.integrationConfigurationId) {
|
|
177698
177791
|
output_manager_default.error(
|
|
177699
|
-
`The resource ${
|
|
177792
|
+
`The resource ${import_chalk103.default.bold(resourceName)} does not have an integration configuration.`
|
|
177700
177793
|
);
|
|
177701
177794
|
return 1;
|
|
177702
177795
|
}
|
|
177703
177796
|
if (targetedResource.billingPlan?.type !== "prepayment") {
|
|
177704
177797
|
output_manager_default.error(
|
|
177705
|
-
`The resource ${
|
|
177798
|
+
`The resource ${import_chalk103.default.bold(resourceName)} is not a prepayment-based resource.`
|
|
177706
177799
|
);
|
|
177707
177800
|
return 1;
|
|
177708
177801
|
}
|
|
@@ -177730,7 +177823,7 @@ async function createThreshold(client2) {
|
|
|
177730
177823
|
}
|
|
177731
177824
|
if (targetedResource.billingPlan.scope !== "resource") {
|
|
177732
177825
|
output_manager_default.log(
|
|
177733
|
-
`The resource ${
|
|
177826
|
+
`The resource ${import_chalk103.default.bold(resourceName)} uses an installation-level balance.`
|
|
177734
177827
|
);
|
|
177735
177828
|
return await updateThresholdForInstallation({
|
|
177736
177829
|
client: client2,
|
|
@@ -177844,17 +177937,17 @@ async function updateThresholdForInstallation(props) {
|
|
|
177844
177937
|
async function handleUpdateThreshold(props) {
|
|
177845
177938
|
if (props.resource.billingPlan?.type !== "prepayment") {
|
|
177846
177939
|
output_manager_default.log(
|
|
177847
|
-
`The resource ${
|
|
177940
|
+
`The resource ${import_chalk103.default.bold(props.resource.name)} is not a prepayment-based resource.`
|
|
177848
177941
|
);
|
|
177849
177942
|
return 0;
|
|
177850
177943
|
}
|
|
177851
177944
|
if (!props.resource.product?.integrationConfigurationId) {
|
|
177852
177945
|
output_manager_default.log(
|
|
177853
|
-
`The resource ${
|
|
177946
|
+
`The resource ${import_chalk103.default.bold(props.resource.name)} does not have an integration configuration.`
|
|
177854
177947
|
);
|
|
177855
177948
|
return 0;
|
|
177856
177949
|
}
|
|
177857
|
-
const entityTextReference = props.isInstallationLevel ? `installation ${
|
|
177950
|
+
const entityTextReference = props.isInstallationLevel ? `installation ${import_chalk103.default.bold(props.resource.product?.name)}` : `resource ${import_chalk103.default.bold(props.resource.name)}`;
|
|
177858
177951
|
if (props.existingThreshold) {
|
|
177859
177952
|
const shouldOverwriteThreshold = props.skipConfirmWithYes || await props.client.input.confirm(
|
|
177860
177953
|
`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 +178004,11 @@ async function handleUpdateThreshold(props) {
|
|
|
177911
178004
|
output_manager_default.success(`Threshold for ${entityTextReference} created successfully.`);
|
|
177912
178005
|
return 0;
|
|
177913
178006
|
}
|
|
177914
|
-
var
|
|
178007
|
+
var import_chalk103;
|
|
177915
178008
|
var init_create_threshold2 = __esm({
|
|
177916
178009
|
"src/commands/integration-resource/create-threshold.ts"() {
|
|
177917
178010
|
"use strict";
|
|
177918
|
-
|
|
178011
|
+
import_chalk103 = __toESM3(require_source());
|
|
177919
178012
|
init_output_manager();
|
|
177920
178013
|
init_error2();
|
|
177921
178014
|
init_get_args();
|
|
@@ -178058,7 +178151,7 @@ async function disconnect2(client2) {
|
|
|
178058
178151
|
);
|
|
178059
178152
|
output_manager_default.stopSpinner();
|
|
178060
178153
|
if (!targetedResource) {
|
|
178061
|
-
output_manager_default.error(`No resource ${
|
|
178154
|
+
output_manager_default.error(`No resource ${import_chalk104.default.bold(resourceName)} found.`);
|
|
178062
178155
|
return 0;
|
|
178063
178156
|
}
|
|
178064
178157
|
if (parsedArguments.flags["--all"]) {
|
|
@@ -178108,7 +178201,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178108
178201
|
);
|
|
178109
178202
|
if (!project) {
|
|
178110
178203
|
output_manager_default.log(
|
|
178111
|
-
`Could not find project ${
|
|
178204
|
+
`Could not find project ${import_chalk104.default.bold(projectName)} connected to resource ${import_chalk104.default.bold(resource.name)}.`
|
|
178112
178205
|
);
|
|
178113
178206
|
return 0;
|
|
178114
178207
|
}
|
|
@@ -178120,7 +178213,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178120
178213
|
output_manager_default.spinner("Disconnecting resource\u2026", 500);
|
|
178121
178214
|
await disconnectResourceFromProject(client2, resource, project);
|
|
178122
178215
|
output_manager_default.success(
|
|
178123
|
-
`Disconnected ${
|
|
178216
|
+
`Disconnected ${import_chalk104.default.bold(project.name)} from ${import_chalk104.default.bold(resource.name)}`
|
|
178124
178217
|
);
|
|
178125
178218
|
} catch (error3) {
|
|
178126
178219
|
output_manager_default.error(
|
|
@@ -178132,7 +178225,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
|
178132
178225
|
}
|
|
178133
178226
|
async function handleDisconnectAllProjects(client2, resource, skipConfirmation) {
|
|
178134
178227
|
if (resource.projectsMetadata?.length === 0) {
|
|
178135
|
-
output_manager_default.log(`${
|
|
178228
|
+
output_manager_default.log(`${import_chalk104.default.bold(resource.name)} has no projects to disconnect.`);
|
|
178136
178229
|
return;
|
|
178137
178230
|
}
|
|
178138
178231
|
if (!skipConfirmation && !await confirmDisconnectAllProjects(client2, resource)) {
|
|
@@ -178142,7 +178235,7 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
|
178142
178235
|
output_manager_default.spinner("Disconnecting projects from resource\u2026", 500);
|
|
178143
178236
|
await disconnectResourceFromAllProjects(client2, resource);
|
|
178144
178237
|
output_manager_default.success(
|
|
178145
|
-
`Disconnected all projects from ${
|
|
178238
|
+
`Disconnected all projects from ${import_chalk104.default.bold(resource.name)}`
|
|
178146
178239
|
);
|
|
178147
178240
|
} catch (error3) {
|
|
178148
178241
|
throw new FailedError(
|
|
@@ -178153,9 +178246,9 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
|
178153
178246
|
}
|
|
178154
178247
|
async function confirmDisconnectProject(client2, resource, project) {
|
|
178155
178248
|
output_manager_default.log(
|
|
178156
|
-
`The resource ${
|
|
178249
|
+
`The resource ${import_chalk104.default.bold(resource.name)} will be disconnected from project ${import_chalk104.default.bold(project.name)}.`
|
|
178157
178250
|
);
|
|
178158
|
-
return client2.input.confirm(`${
|
|
178251
|
+
return client2.input.confirm(`${import_chalk104.default.red("Are you sure?")}`, false);
|
|
178159
178252
|
}
|
|
178160
178253
|
async function confirmDisconnectAllProjects(client2, resource) {
|
|
178161
178254
|
output_manager_default.log("The following projects will be disconnected:");
|
|
@@ -178166,13 +178259,13 @@ async function confirmDisconnectAllProjects(client2, resource) {
|
|
|
178166
178259
|
output_manager_default.print(` ${project.name}
|
|
178167
178260
|
`);
|
|
178168
178261
|
}
|
|
178169
|
-
return client2.input.confirm(
|
|
178262
|
+
return client2.input.confirm(import_chalk104.default.red("Are you sure?"), false);
|
|
178170
178263
|
}
|
|
178171
|
-
var
|
|
178264
|
+
var import_chalk104;
|
|
178172
178265
|
var init_disconnect4 = __esm({
|
|
178173
178266
|
"src/commands/integration-resource/disconnect.ts"() {
|
|
178174
178267
|
"use strict";
|
|
178175
|
-
|
|
178268
|
+
import_chalk104 = __toESM3(require_source());
|
|
178176
178269
|
init_output_manager();
|
|
178177
178270
|
init_get_args();
|
|
178178
178271
|
init_get_flags_specification();
|
|
@@ -178277,7 +178370,7 @@ async function remove4(client2) {
|
|
|
178277
178370
|
);
|
|
178278
178371
|
output_manager_default.stopSpinner();
|
|
178279
178372
|
if (!targetedResource) {
|
|
178280
|
-
output_manager_default.error(`No resource ${
|
|
178373
|
+
output_manager_default.error(`No resource ${import_chalk105.default.bold(resourceName)} found.`);
|
|
178281
178374
|
return 0;
|
|
178282
178375
|
}
|
|
178283
178376
|
if (disconnectAll) {
|
|
@@ -178308,7 +178401,7 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
|
178308
178401
|
const hasProjects = resource.projectsMetadata && resource.projectsMetadata?.length > 0;
|
|
178309
178402
|
if (!options?.skipProjectCheck && hasProjects) {
|
|
178310
178403
|
output_manager_default.error(
|
|
178311
|
-
`Cannot delete resource ${
|
|
178404
|
+
`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
178405
|
);
|
|
178313
178406
|
return 1;
|
|
178314
178407
|
}
|
|
@@ -178319,24 +178412,24 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
|
178319
178412
|
try {
|
|
178320
178413
|
output_manager_default.spinner("Deleting resource\u2026", 500);
|
|
178321
178414
|
await deleteResource(client2, resource, team);
|
|
178322
|
-
output_manager_default.success(`${
|
|
178415
|
+
output_manager_default.success(`${import_chalk105.default.bold(resource.name)} successfully deleted.`);
|
|
178323
178416
|
} catch (error3) {
|
|
178324
178417
|
output_manager_default.error(
|
|
178325
|
-
`A problem occurred when attempting to delete ${
|
|
178418
|
+
`A problem occurred when attempting to delete ${import_chalk105.default.bold(resource.name)}: ${error3.message}`
|
|
178326
178419
|
);
|
|
178327
178420
|
return 1;
|
|
178328
178421
|
}
|
|
178329
178422
|
return 0;
|
|
178330
178423
|
}
|
|
178331
178424
|
async function confirmDeleteResource(client2, resource) {
|
|
178332
|
-
output_manager_default.log(`${
|
|
178333
|
-
return client2.input.confirm(`${
|
|
178425
|
+
output_manager_default.log(`${import_chalk105.default.bold(resource.name)} will be deleted permanently.`);
|
|
178426
|
+
return client2.input.confirm(`${import_chalk105.default.red("Are you sure?")}`, false);
|
|
178334
178427
|
}
|
|
178335
|
-
var
|
|
178428
|
+
var import_chalk105;
|
|
178336
178429
|
var init_remove_resource = __esm({
|
|
178337
178430
|
"src/commands/integration-resource/remove-resource.ts"() {
|
|
178338
178431
|
"use strict";
|
|
178339
|
-
|
|
178432
|
+
import_chalk105 = __toESM3(require_source());
|
|
178340
178433
|
init_output_manager();
|
|
178341
178434
|
init_get_args();
|
|
178342
178435
|
init_get_flags_specification();
|
|
@@ -178782,7 +178875,7 @@ async function list5(client2) {
|
|
|
178782
178875
|
}
|
|
178783
178876
|
const projectSlugLink = formatProject(contextName, project.name);
|
|
178784
178877
|
if (!singleDeployment) {
|
|
178785
|
-
spinner(`Fetching deployments in ${
|
|
178878
|
+
spinner(`Fetching deployments in ${import_chalk106.default.bold(contextName)}`);
|
|
178786
178879
|
const start = Date.now();
|
|
178787
178880
|
debug2("Fetching deployments");
|
|
178788
178881
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
|
@@ -178822,7 +178915,7 @@ async function list5(client2) {
|
|
|
178822
178915
|
const urls = [];
|
|
178823
178916
|
const tablePrint = table(
|
|
178824
178917
|
[
|
|
178825
|
-
headers.map((header) =>
|
|
178918
|
+
headers.map((header) => import_chalk106.default.bold(import_chalk106.default.cyan(header))),
|
|
178826
178919
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
|
178827
178920
|
urls.push(`https://${dep.url}`);
|
|
178828
178921
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
|
@@ -178832,16 +178925,16 @@ async function list5(client2) {
|
|
|
178832
178925
|
const targetName = dep.customEnvironment?.slug || (dep.target === "production" ? "Production" : "Preview");
|
|
178833
178926
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
|
178834
178927
|
return [
|
|
178835
|
-
|
|
178928
|
+
import_chalk106.default.gray(createdAt),
|
|
178836
178929
|
`https://${dep.url}`,
|
|
178837
178930
|
stateString2(dep.readyState || ""),
|
|
178838
178931
|
formatEnvironment(contextName, project.name, {
|
|
178839
178932
|
id: targetSlug,
|
|
178840
178933
|
slug: targetName
|
|
178841
178934
|
}),
|
|
178842
|
-
...!showPolicy ? [
|
|
178843
|
-
...!showPolicy ? [
|
|
178844
|
-
...showPolicy ? [
|
|
178935
|
+
...!showPolicy ? [import_chalk106.default.gray(getDeploymentDuration(dep))] : [],
|
|
178936
|
+
...!showPolicy ? [import_chalk106.default.gray(dep.creator?.username)] : [],
|
|
178937
|
+
...showPolicy ? [import_chalk106.default.gray(proposedExp)] : []
|
|
178845
178938
|
];
|
|
178846
178939
|
}).filter(
|
|
178847
178940
|
(app2) => (
|
|
@@ -178888,17 +178981,17 @@ function stateString2(s) {
|
|
|
178888
178981
|
case "BUILDING":
|
|
178889
178982
|
case "DEPLOYING":
|
|
178890
178983
|
case "ANALYZING":
|
|
178891
|
-
return
|
|
178984
|
+
return import_chalk106.default.yellow(CIRCLE) + sTitle;
|
|
178892
178985
|
case "ERROR":
|
|
178893
|
-
return
|
|
178986
|
+
return import_chalk106.default.red(CIRCLE) + sTitle;
|
|
178894
178987
|
case "READY":
|
|
178895
|
-
return
|
|
178988
|
+
return import_chalk106.default.green(CIRCLE) + sTitle;
|
|
178896
178989
|
case "QUEUED":
|
|
178897
|
-
return
|
|
178990
|
+
return import_chalk106.default.white(CIRCLE) + sTitle;
|
|
178898
178991
|
case "CANCELED":
|
|
178899
|
-
return
|
|
178992
|
+
return import_chalk106.default.gray(sTitle);
|
|
178900
178993
|
default:
|
|
178901
|
-
return
|
|
178994
|
+
return import_chalk106.default.gray("UNKNOWN");
|
|
178902
178995
|
}
|
|
178903
178996
|
}
|
|
178904
178997
|
function sortByCreatedAt(a, b) {
|
|
@@ -178914,12 +179007,12 @@ function filterUniqueApps() {
|
|
|
178914
179007
|
return true;
|
|
178915
179008
|
};
|
|
178916
179009
|
}
|
|
178917
|
-
var import_ms21,
|
|
179010
|
+
var import_ms21, import_chalk106, import_title8, import_error_utils29;
|
|
178918
179011
|
var init_list8 = __esm({
|
|
178919
179012
|
"src/commands/list/index.ts"() {
|
|
178920
179013
|
"use strict";
|
|
178921
179014
|
import_ms21 = __toESM3(require_ms());
|
|
178922
|
-
|
|
179015
|
+
import_chalk106 = __toESM3(require_source());
|
|
178923
179016
|
import_title8 = __toESM3(require_lib4());
|
|
178924
179017
|
init_table();
|
|
178925
179018
|
init_get_args();
|
|
@@ -179083,7 +179176,7 @@ async function logs(client2) {
|
|
|
179083
179176
|
} catch {
|
|
179084
179177
|
}
|
|
179085
179178
|
spinner(
|
|
179086
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
|
179179
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk107.default.bold(contextName)}`
|
|
179087
179180
|
);
|
|
179088
179181
|
let deployment;
|
|
179089
179182
|
try {
|
|
@@ -179103,9 +179196,9 @@ async function logs(client2) {
|
|
|
179103
179196
|
return 1;
|
|
179104
179197
|
}
|
|
179105
179198
|
output_manager_default.print(
|
|
179106
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
|
179199
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk107.default.dim(
|
|
179107
179200
|
deployment.id
|
|
179108
|
-
)}) starting from ${
|
|
179201
|
+
)}) starting from ${import_chalk107.default.bold((0, import_format3.default)(Date.now(), DATE_TIME_FORMAT))}
|
|
179109
179202
|
|
|
179110
179203
|
`
|
|
179111
179204
|
);
|
|
@@ -179120,12 +179213,12 @@ async function logs(client2) {
|
|
|
179120
179213
|
abortController
|
|
179121
179214
|
);
|
|
179122
179215
|
}
|
|
179123
|
-
var import_error_utils30,
|
|
179216
|
+
var import_error_utils30, import_chalk107, import_format3, deprecatedFlags, DATE_TIME_FORMAT;
|
|
179124
179217
|
var init_logs3 = __esm({
|
|
179125
179218
|
"src/commands/logs/index.ts"() {
|
|
179126
179219
|
"use strict";
|
|
179127
179220
|
import_error_utils30 = __toESM3(require_dist2());
|
|
179128
|
-
|
|
179221
|
+
import_chalk107 = __toESM3(require_source());
|
|
179129
179222
|
import_format3 = __toESM3(require_format());
|
|
179130
179223
|
init_build_state();
|
|
179131
179224
|
init_is_deploying();
|
|
@@ -179581,14 +179674,14 @@ async function login2(client2, telemetry2) {
|
|
|
179581
179674
|
});
|
|
179582
179675
|
rl.question(
|
|
179583
179676
|
`
|
|
179584
|
-
Visit ${
|
|
179677
|
+
Visit ${import_chalk108.default.bold(
|
|
179585
179678
|
output_manager_default.link(
|
|
179586
179679
|
verification_uri.replace("https://", ""),
|
|
179587
179680
|
verification_uri_complete,
|
|
179588
179681
|
{ color: false, fallback: () => verification_uri_complete }
|
|
179589
179682
|
)
|
|
179590
|
-
)}${output_manager_default.supportsHyperlink ? ` and enter ${
|
|
179591
|
-
${
|
|
179683
|
+
)}${output_manager_default.supportsHyperlink ? ` and enter ${import_chalk108.default.bold(user_code)}` : ""}
|
|
179684
|
+
${import_chalk108.default.grey("Press [ENTER] to open the browser")}
|
|
179592
179685
|
`,
|
|
179593
179686
|
() => {
|
|
179594
179687
|
open6.default(verification_uri_complete);
|
|
@@ -179654,12 +179747,12 @@ async function login2(client2, telemetry2) {
|
|
|
179654
179747
|
client2.writeToConfigFile();
|
|
179655
179748
|
output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
|
179656
179749
|
output_manager_default.print(`
|
|
179657
|
-
${
|
|
179750
|
+
${import_chalk108.default.cyan("Congratulations!")} You are now signed in.
|
|
179658
179751
|
|
|
179659
179752
|
To deploy something, run ${getCommandName()}.
|
|
179660
179753
|
|
|
179661
179754
|
${emoji("tip")} To deploy every commit automatically,
|
|
179662
|
-
connect a Git Repository (${
|
|
179755
|
+
connect a Git Repository (${import_chalk108.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).
|
|
179663
179756
|
`);
|
|
179664
179757
|
return;
|
|
179665
179758
|
}
|
|
@@ -179675,12 +179768,12 @@ async function login2(client2, telemetry2) {
|
|
|
179675
179768
|
telemetry2.trackState("error");
|
|
179676
179769
|
return 1;
|
|
179677
179770
|
}
|
|
179678
|
-
var import_node_readline,
|
|
179771
|
+
var import_node_readline, import_chalk108, open6, import_ansi_escapes6;
|
|
179679
179772
|
var init_future = __esm({
|
|
179680
179773
|
"src/commands/login/future.ts"() {
|
|
179681
179774
|
"use strict";
|
|
179682
179775
|
import_node_readline = __toESM3(require("readline"));
|
|
179683
|
-
|
|
179776
|
+
import_chalk108 = __toESM3(require_source());
|
|
179684
179777
|
open6 = __toESM3(require_open());
|
|
179685
179778
|
import_ansi_escapes6 = __toESM3(require_ansi_escapes());
|
|
179686
179779
|
init_error2();
|
|
@@ -179761,7 +179854,7 @@ async function login3(client2) {
|
|
|
179761
179854
|
writeToConfigFile(client2.config);
|
|
179762
179855
|
output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
|
179763
179856
|
output_manager_default.print(
|
|
179764
|
-
`${
|
|
179857
|
+
`${import_chalk109.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
|
179765
179858
|
`
|
|
179766
179859
|
);
|
|
179767
179860
|
output_manager_default.print(
|
|
@@ -179773,12 +179866,12 @@ async function login3(client2) {
|
|
|
179773
179866
|
);
|
|
179774
179867
|
return 0;
|
|
179775
179868
|
}
|
|
179776
|
-
var import_email_validator,
|
|
179869
|
+
var import_email_validator, import_chalk109;
|
|
179777
179870
|
var init_login3 = __esm({
|
|
179778
179871
|
"src/commands/login/index.ts"() {
|
|
179779
179872
|
"use strict";
|
|
179780
179873
|
import_email_validator = __toESM3(require_email_validator());
|
|
179781
|
-
|
|
179874
|
+
import_chalk109 = __toESM3(require_source());
|
|
179782
179875
|
init_humanize_path();
|
|
179783
179876
|
init_get_args();
|
|
179784
179877
|
init_prompt();
|
|
@@ -179965,7 +180058,7 @@ async function pull2(client2) {
|
|
|
179965
180058
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
179966
180059
|
const { contextName } = await getScope(client2);
|
|
179967
180060
|
output_manager_default.spinner(
|
|
179968
|
-
`Fetching microfrontends configuration in ${
|
|
180061
|
+
`Fetching microfrontends configuration in ${import_chalk110.default.bold(contextName)}`
|
|
179969
180062
|
);
|
|
179970
180063
|
let parsedArgs;
|
|
179971
180064
|
const flagsSpecification = getFlagsSpecification(pullSubcommand2.options);
|
|
@@ -180013,11 +180106,11 @@ async function pull2(client2) {
|
|
|
180013
180106
|
const microfrontendsStamp = stamp_default();
|
|
180014
180107
|
output_manager_default.print(
|
|
180015
180108
|
`${prependEmoji(
|
|
180016
|
-
`Downloaded microfrontends configuration to ${
|
|
180109
|
+
`Downloaded microfrontends configuration to ${import_chalk110.default.bold(
|
|
180017
180110
|
humanizePath(
|
|
180018
180111
|
(0, import_node_path5.join)(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS)
|
|
180019
180112
|
)
|
|
180020
|
-
)} ${
|
|
180113
|
+
)} ${import_chalk110.default.gray(microfrontendsStamp())}`,
|
|
180021
180114
|
emoji("success")
|
|
180022
180115
|
)}
|
|
180023
180116
|
`
|
|
@@ -180029,11 +180122,11 @@ async function pull2(client2) {
|
|
|
180029
180122
|
return 1;
|
|
180030
180123
|
}
|
|
180031
180124
|
}
|
|
180032
|
-
var
|
|
180125
|
+
var import_chalk110, import_node_path5, import_fs_extra23, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS;
|
|
180033
180126
|
var init_pull5 = __esm({
|
|
180034
180127
|
"src/commands/microfrontends/pull.ts"() {
|
|
180035
180128
|
"use strict";
|
|
180036
|
-
|
|
180129
|
+
import_chalk110 = __toESM3(require_source());
|
|
180037
180130
|
import_node_path5 = require("path");
|
|
180038
180131
|
init_output_manager();
|
|
180039
180132
|
init_get_scope();
|
|
@@ -180186,12 +180279,12 @@ async function add6(client2, argv) {
|
|
|
180186
180279
|
const { args: args2 } = parsedArgs;
|
|
180187
180280
|
if (args2.length !== 1) {
|
|
180188
180281
|
output_manager_default.error(
|
|
180189
|
-
`Invalid number of arguments. Usage: ${
|
|
180282
|
+
`Invalid number of arguments. Usage: ${import_chalk111.default.cyan(
|
|
180190
180283
|
`${getCommandName("project add <name>")}`
|
|
180191
180284
|
)}`
|
|
180192
180285
|
);
|
|
180193
180286
|
if (args2.length > 1) {
|
|
180194
|
-
const example =
|
|
180287
|
+
const example = import_chalk111.default.cyan(
|
|
180195
180288
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
|
180196
180289
|
);
|
|
180197
180290
|
output_manager_default.log(
|
|
@@ -180219,17 +180312,17 @@ async function add6(client2, argv) {
|
|
|
180219
180312
|
const elapsed2 = (0, import_ms22.default)(Date.now() - start);
|
|
180220
180313
|
const { contextName } = await getScope(client2);
|
|
180221
180314
|
output_manager_default.log(
|
|
180222
|
-
`${
|
|
180315
|
+
`${import_chalk111.default.cyan("Success!")} Project ${import_chalk111.default.bold(
|
|
180223
180316
|
name.toLowerCase()
|
|
180224
|
-
)} added (${
|
|
180317
|
+
)} added (${import_chalk111.default.bold(contextName)}) ${import_chalk111.default.gray(`[${elapsed2}]`)}`
|
|
180225
180318
|
);
|
|
180226
180319
|
return 0;
|
|
180227
180320
|
}
|
|
180228
|
-
var
|
|
180321
|
+
var import_chalk111, import_ms22;
|
|
180229
180322
|
var init_add12 = __esm({
|
|
180230
180323
|
"src/commands/project/add.ts"() {
|
|
180231
180324
|
"use strict";
|
|
180232
|
-
|
|
180325
|
+
import_chalk111 = __toESM3(require_source());
|
|
180233
180326
|
import_ms22 = __toESM3(require_ms());
|
|
180234
180327
|
init_errors_ts();
|
|
180235
180328
|
init_pkg_name();
|
|
@@ -180328,7 +180421,7 @@ async function inspect4(client2, argv) {
|
|
|
180328
180421
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
180329
180422
|
if (args2.length !== 0 && args2.length !== 1) {
|
|
180330
180423
|
output_manager_default.error(
|
|
180331
|
-
`Invalid number of arguments. Usage: ${
|
|
180424
|
+
`Invalid number of arguments. Usage: ${import_chalk112.default.cyan(
|
|
180332
180425
|
`${getCommandName("project inspect <name>")}`
|
|
180333
180426
|
)}`
|
|
180334
180427
|
);
|
|
@@ -180343,52 +180436,52 @@ async function inspect4(client2, argv) {
|
|
|
180343
180436
|
});
|
|
180344
180437
|
const org = await getTeamById(client2, project.accountId);
|
|
180345
180438
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
180346
|
-
output_manager_default.log(`Found Project ${projectSlugLink} ${
|
|
180439
|
+
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk112.default.gray(inspectStamp())}`);
|
|
180347
180440
|
output_manager_default.print("\n");
|
|
180348
|
-
output_manager_default.print(
|
|
180349
|
-
output_manager_default.print(` ${
|
|
180441
|
+
output_manager_default.print(import_chalk112.default.bold(" General\n\n"));
|
|
180442
|
+
output_manager_default.print(` ${import_chalk112.default.cyan("ID")} ${project.id}
|
|
180350
180443
|
`);
|
|
180351
|
-
output_manager_default.print(` ${
|
|
180444
|
+
output_manager_default.print(` ${import_chalk112.default.cyan("Name")} ${project.name}
|
|
180352
180445
|
`);
|
|
180353
|
-
output_manager_default.print(` ${
|
|
180446
|
+
output_manager_default.print(` ${import_chalk112.default.cyan("Owner")} ${org.name}
|
|
180354
180447
|
`);
|
|
180355
180448
|
output_manager_default.print(
|
|
180356
|
-
` ${
|
|
180449
|
+
` ${import_chalk112.default.cyan("Created At")} ${formatDate(project.createdAt)}
|
|
180357
180450
|
`
|
|
180358
180451
|
);
|
|
180359
180452
|
output_manager_default.print(
|
|
180360
|
-
` ${
|
|
180453
|
+
` ${import_chalk112.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
|
|
180361
180454
|
`
|
|
180362
180455
|
);
|
|
180363
180456
|
output_manager_default.print(
|
|
180364
|
-
` ${
|
|
180457
|
+
` ${import_chalk112.default.cyan("Node.js Version")} ${project.nodeVersion}
|
|
180365
180458
|
`
|
|
180366
180459
|
);
|
|
180367
180460
|
const framework = import_frameworks7.frameworkList.find((f) => f.slug === project.framework);
|
|
180368
180461
|
output_manager_default.print("\n");
|
|
180369
|
-
output_manager_default.print(
|
|
180370
|
-
output_manager_default.print(` ${
|
|
180462
|
+
output_manager_default.print(import_chalk112.default.bold(" Framework Settings\n\n"));
|
|
180463
|
+
output_manager_default.print(` ${import_chalk112.default.cyan("Framework Preset")} ${framework?.name}
|
|
180371
180464
|
`);
|
|
180372
180465
|
output_manager_default.print(
|
|
180373
|
-
` ${
|
|
180466
|
+
` ${import_chalk112.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk112.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
|
|
180374
180467
|
`
|
|
180375
180468
|
);
|
|
180376
180469
|
output_manager_default.print(
|
|
180377
|
-
` ${
|
|
180470
|
+
` ${import_chalk112.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk112.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
|
|
180378
180471
|
`
|
|
180379
180472
|
);
|
|
180380
180473
|
output_manager_default.print(
|
|
180381
|
-
` ${
|
|
180474
|
+
` ${import_chalk112.default.cyan("Install Command")} ${project.installCommand ?? import_chalk112.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
|
|
180382
180475
|
`
|
|
180383
180476
|
);
|
|
180384
180477
|
output_manager_default.print("\n");
|
|
180385
180478
|
return 0;
|
|
180386
180479
|
}
|
|
180387
|
-
var
|
|
180480
|
+
var import_chalk112, import_frameworks7;
|
|
180388
180481
|
var init_inspect6 = __esm({
|
|
180389
180482
|
"src/commands/project/inspect.ts"() {
|
|
180390
180483
|
"use strict";
|
|
180391
|
-
|
|
180484
|
+
import_chalk112 = __toESM3(require_source());
|
|
180392
180485
|
import_frameworks7 = __toESM3(require_frameworks());
|
|
180393
180486
|
init_pkg_name();
|
|
180394
180487
|
init_inspect5();
|
|
@@ -180452,7 +180545,7 @@ async function list6(client2, argv) {
|
|
|
180452
180545
|
const { args: args2, flags: opts } = parsedArgs;
|
|
180453
180546
|
if (args2.length !== 0) {
|
|
180454
180547
|
output_manager_default.error(
|
|
180455
|
-
`Invalid number of arguments. Usage: ${
|
|
180548
|
+
`Invalid number of arguments. Usage: ${import_chalk113.default.cyan(
|
|
180456
180549
|
`${getCommandName("project ls")}`
|
|
180457
180550
|
)}`
|
|
180458
180551
|
);
|
|
@@ -180460,7 +180553,7 @@ async function list6(client2, argv) {
|
|
|
180460
180553
|
}
|
|
180461
180554
|
const start = Date.now();
|
|
180462
180555
|
const { contextName } = await getScope(client2);
|
|
180463
|
-
output_manager_default.spinner(`Fetching projects in ${
|
|
180556
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk113.default.bold(contextName)}`);
|
|
180464
180557
|
const flags = processFlags(opts, telemetryClient);
|
|
180465
180558
|
const projectsUrl = buildProjectsUrl(flags);
|
|
180466
180559
|
const {
|
|
@@ -180533,7 +180626,7 @@ function outputJson(client2, projectList, metadata) {
|
|
|
180533
180626
|
function outputTable(projectList, options) {
|
|
180534
180627
|
const { contextName, elapsed: elapsed2, deprecated, opts, pagination } = options;
|
|
180535
180628
|
output_manager_default.log(
|
|
180536
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
|
180629
|
+
`${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
180630
|
);
|
|
180538
180631
|
if (projectList.length > 0) {
|
|
180539
180632
|
printProjectsTable(projectList);
|
|
@@ -180543,12 +180636,12 @@ function outputTable(projectList, options) {
|
|
|
180543
180636
|
function printProjectsTable(projectList) {
|
|
180544
180637
|
const tablePrint = table(
|
|
180545
180638
|
[
|
|
180546
|
-
TABLE_HEADERS.map((header) =>
|
|
180639
|
+
TABLE_HEADERS.map((header) => import_chalk113.default.bold(import_chalk113.default.cyan(header))),
|
|
180547
180640
|
...projectList.flatMap((project) => [
|
|
180548
180641
|
[
|
|
180549
|
-
|
|
180642
|
+
import_chalk113.default.bold(project.name),
|
|
180550
180643
|
getLatestProdUrl(project),
|
|
180551
|
-
|
|
180644
|
+
import_chalk113.default.gray((0, import_ms23.default)(Date.now() - project.updatedAt)),
|
|
180552
180645
|
project.nodeVersion ?? ""
|
|
180553
180646
|
]
|
|
180554
180647
|
])
|
|
@@ -180573,12 +180666,12 @@ function getLatestProdUrl(project) {
|
|
|
180573
180666
|
return `https://${alias2}`;
|
|
180574
180667
|
return "--";
|
|
180575
180668
|
}
|
|
180576
|
-
var import_ms23,
|
|
180669
|
+
var import_ms23, import_chalk113, TABLE_HEADERS, PAGINATION_FLAGS_TO_EXCLUDE, BASE_PROJECTS_URL;
|
|
180577
180670
|
var init_list10 = __esm({
|
|
180578
180671
|
"src/commands/project/list.ts"() {
|
|
180579
180672
|
"use strict";
|
|
180580
180673
|
import_ms23 = __toESM3(require_ms());
|
|
180581
|
-
|
|
180674
|
+
import_chalk113 = __toESM3(require_source());
|
|
180582
180675
|
init_table();
|
|
180583
180676
|
init_get_command_flags();
|
|
180584
180677
|
init_pkg_name();
|
|
@@ -180637,7 +180730,7 @@ async function rm6(client2, argv) {
|
|
|
180637
180730
|
const { args: args2 } = parsedArgs;
|
|
180638
180731
|
if (args2.length !== 1) {
|
|
180639
180732
|
output_manager_default.error(
|
|
180640
|
-
`Invalid number of arguments. Usage: ${
|
|
180733
|
+
`Invalid number of arguments. Usage: ${import_chalk114.default.cyan(
|
|
180641
180734
|
`${getCommandName("project rm <name>")}`
|
|
180642
180735
|
)}`
|
|
180643
180736
|
);
|
|
@@ -180667,7 +180760,7 @@ async function rm6(client2, argv) {
|
|
|
180667
180760
|
}
|
|
180668
180761
|
const elapsed2 = (0, import_ms24.default)(Date.now() - start);
|
|
180669
180762
|
output_manager_default.log(
|
|
180670
|
-
`${
|
|
180763
|
+
`${import_chalk114.default.cyan("Success!")} Project ${import_chalk114.default.bold(name)} removed ${import_chalk114.default.gray(
|
|
180671
180764
|
`[${elapsed2}]`
|
|
180672
180765
|
)}`
|
|
180673
180766
|
);
|
|
@@ -180676,22 +180769,22 @@ async function rm6(client2, argv) {
|
|
|
180676
180769
|
async function readConfirmation3(client2, projectName) {
|
|
180677
180770
|
output_manager_default.print(
|
|
180678
180771
|
prependEmoji(
|
|
180679
|
-
`The project ${
|
|
180772
|
+
`The project ${import_chalk114.default.bold(projectName)} will be removed permanently.
|
|
180680
180773
|
It will also delete everything under the project including deployments.
|
|
180681
180774
|
`,
|
|
180682
180775
|
emoji("warning")
|
|
180683
180776
|
)
|
|
180684
180777
|
);
|
|
180685
180778
|
return await client2.input.confirm(
|
|
180686
|
-
`${
|
|
180779
|
+
`${import_chalk114.default.bold.red("Are you sure?")}`,
|
|
180687
180780
|
false
|
|
180688
180781
|
);
|
|
180689
180782
|
}
|
|
180690
|
-
var
|
|
180783
|
+
var import_chalk114, import_ms24, e;
|
|
180691
180784
|
var init_rm10 = __esm({
|
|
180692
180785
|
"src/commands/project/rm.ts"() {
|
|
180693
180786
|
"use strict";
|
|
180694
|
-
|
|
180787
|
+
import_chalk114 = __toESM3(require_source());
|
|
180695
180788
|
import_ms24 = __toESM3(require_ms());
|
|
180696
180789
|
init_emoji();
|
|
180697
180790
|
init_errors_ts();
|
|
@@ -180859,7 +180952,7 @@ async function getProjectByDeployment({
|
|
|
180859
180952
|
let team;
|
|
180860
180953
|
try {
|
|
180861
180954
|
output_manager_default?.spinner(
|
|
180862
|
-
`Fetching deployment "${deployId}" in ${
|
|
180955
|
+
`Fetching deployment "${deployId}" in ${import_chalk115.default.bold(contextName)}\u2026`
|
|
180863
180956
|
);
|
|
180864
180957
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
180865
180958
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -180876,12 +180969,12 @@ async function getProjectByDeployment({
|
|
|
180876
180969
|
team = teamResult.value;
|
|
180877
180970
|
deployment = deploymentResult.value;
|
|
180878
180971
|
output_manager_default?.log(
|
|
180879
|
-
`Fetching deployment "${deployId}" in ${
|
|
180972
|
+
`Fetching deployment "${deployId}" in ${import_chalk115.default.bold(contextName)}\u2026`
|
|
180880
180973
|
);
|
|
180881
180974
|
if (deployment.team?.id) {
|
|
180882
180975
|
if (!team || deployment.team.id !== team.id) {
|
|
180883
180976
|
const err = new Error(
|
|
180884
|
-
team ? `Deployment doesn't belong to current team ${
|
|
180977
|
+
team ? `Deployment doesn't belong to current team ${import_chalk115.default.bold(
|
|
180885
180978
|
contextName
|
|
180886
180979
|
)}` : `Deployment belongs to a different team`
|
|
180887
180980
|
);
|
|
@@ -180890,7 +180983,7 @@ async function getProjectByDeployment({
|
|
|
180890
180983
|
}
|
|
180891
180984
|
} else if (team) {
|
|
180892
180985
|
const err = new Error(
|
|
180893
|
-
`Deployment doesn't belong to current team ${
|
|
180986
|
+
`Deployment doesn't belong to current team ${import_chalk115.default.bold(contextName)}`
|
|
180894
180987
|
);
|
|
180895
180988
|
err.code = "ERR_INVALID_TEAM";
|
|
180896
180989
|
throw err;
|
|
@@ -180911,11 +181004,11 @@ async function getProjectByDeployment({
|
|
|
180911
181004
|
output_manager_default?.stopSpinner();
|
|
180912
181005
|
}
|
|
180913
181006
|
}
|
|
180914
|
-
var
|
|
181007
|
+
var import_chalk115;
|
|
180915
181008
|
var init_get_project_by_deployment = __esm({
|
|
180916
181009
|
"src/util/projects/get-project-by-deployment.ts"() {
|
|
180917
181010
|
"use strict";
|
|
180918
|
-
|
|
181011
|
+
import_chalk115 = __toESM3(require_source());
|
|
180919
181012
|
init_get_deployment();
|
|
180920
181013
|
init_get_project_by_id_or_name();
|
|
180921
181014
|
init_get_scope();
|
|
@@ -180929,21 +181022,21 @@ var init_get_project_by_deployment = __esm({
|
|
|
180929
181022
|
// src/util/alias/render-alias-status.ts
|
|
180930
181023
|
function renderAliasStatus(status3) {
|
|
180931
181024
|
if (status3 === "completed") {
|
|
180932
|
-
return
|
|
181025
|
+
return import_chalk116.default.green(status3);
|
|
180933
181026
|
}
|
|
180934
181027
|
if (status3 === "failed") {
|
|
180935
|
-
return
|
|
181028
|
+
return import_chalk116.default.red(status3);
|
|
180936
181029
|
}
|
|
180937
181030
|
if (status3 === "skipped") {
|
|
180938
|
-
return
|
|
181031
|
+
return import_chalk116.default.gray(status3);
|
|
180939
181032
|
}
|
|
180940
|
-
return
|
|
181033
|
+
return import_chalk116.default.yellow(status3);
|
|
180941
181034
|
}
|
|
180942
|
-
var
|
|
181035
|
+
var import_chalk116;
|
|
180943
181036
|
var init_render_alias_status = __esm({
|
|
180944
181037
|
"src/util/alias/render-alias-status.ts"() {
|
|
180945
181038
|
"use strict";
|
|
180946
|
-
|
|
181039
|
+
import_chalk116 = __toESM3(require_source());
|
|
180947
181040
|
}
|
|
180948
181041
|
});
|
|
180949
181042
|
|
|
@@ -181050,7 +181143,7 @@ async function promoteStatus({
|
|
|
181050
181143
|
}
|
|
181051
181144
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
|
181052
181145
|
output_manager_default.log(
|
|
181053
|
-
`The promotion exceeded its deadline - rerun ${
|
|
181146
|
+
`The promotion exceeded its deadline - rerun ${import_chalk117.default.bold(
|
|
181054
181147
|
`${packageName} promote ${toDeploymentId}`
|
|
181055
181148
|
)} to try again`
|
|
181056
181149
|
);
|
|
@@ -181114,26 +181207,26 @@ async function renderJobSucceeded({
|
|
|
181114
181207
|
let deploymentInfo = "";
|
|
181115
181208
|
try {
|
|
181116
181209
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
181117
|
-
deploymentInfo = `${
|
|
181210
|
+
deploymentInfo = `${import_chalk117.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
181118
181211
|
} catch (err) {
|
|
181119
181212
|
output_manager_default.debug(
|
|
181120
181213
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
181121
181214
|
);
|
|
181122
|
-
deploymentInfo =
|
|
181215
|
+
deploymentInfo = import_chalk117.default.bold(toDeploymentId);
|
|
181123
181216
|
}
|
|
181124
181217
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
|
181125
181218
|
output_manager_default.log(
|
|
181126
|
-
`Success! ${
|
|
181219
|
+
`Success! ${import_chalk117.default.bold(
|
|
181127
181220
|
project.name
|
|
181128
181221
|
)} was promoted to ${deploymentInfo} ${duration}`
|
|
181129
181222
|
);
|
|
181130
181223
|
return 0;
|
|
181131
181224
|
}
|
|
181132
|
-
var
|
|
181225
|
+
var import_chalk117, import_ms25;
|
|
181133
181226
|
var init_status2 = __esm({
|
|
181134
181227
|
"src/commands/promote/status.ts"() {
|
|
181135
181228
|
"use strict";
|
|
181136
|
-
|
|
181229
|
+
import_chalk117 = __toESM3(require_source());
|
|
181137
181230
|
init_elapsed();
|
|
181138
181231
|
init_format_date();
|
|
181139
181232
|
init_get_deployment();
|
|
@@ -181190,7 +181283,7 @@ async function requestPromote({
|
|
|
181190
181283
|
}
|
|
181191
181284
|
);
|
|
181192
181285
|
output_manager_default.log(
|
|
181193
|
-
`Successfully created new deployment of ${
|
|
181286
|
+
`Successfully created new deployment of ${import_chalk118.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
|
181194
181287
|
);
|
|
181195
181288
|
return 0;
|
|
181196
181289
|
}
|
|
@@ -181211,7 +181304,7 @@ async function requestPromote({
|
|
|
181211
181304
|
}
|
|
181212
181305
|
if (timeout !== void 0 && (0, import_ms26.default)(timeout) === 0) {
|
|
181213
181306
|
output_manager_default.log(
|
|
181214
|
-
`Successfully requested promote of ${
|
|
181307
|
+
`Successfully requested promote of ${import_chalk118.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
181215
181308
|
);
|
|
181216
181309
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
|
181217
181310
|
return 0;
|
|
@@ -181224,11 +181317,11 @@ async function requestPromote({
|
|
|
181224
181317
|
timeout
|
|
181225
181318
|
});
|
|
181226
181319
|
}
|
|
181227
|
-
var
|
|
181320
|
+
var import_chalk118, import_ms26;
|
|
181228
181321
|
var init_request_promote = __esm({
|
|
181229
181322
|
"src/commands/promote/request-promote.ts"() {
|
|
181230
181323
|
"use strict";
|
|
181231
|
-
|
|
181324
|
+
import_chalk118 = __toESM3(require_source());
|
|
181232
181325
|
init_pkg_name();
|
|
181233
181326
|
init_get_project_by_deployment();
|
|
181234
181327
|
import_ms26 = __toESM3(require_ms());
|
|
@@ -181389,7 +181482,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181389
181482
|
let team;
|
|
181390
181483
|
try {
|
|
181391
181484
|
output_manager_default.spinner(
|
|
181392
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
181485
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk119.default.bold(contextName)}\u2026`
|
|
181393
181486
|
);
|
|
181394
181487
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
|
181395
181488
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
|
@@ -181406,7 +181499,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181406
181499
|
team = teamResult.value;
|
|
181407
181500
|
deployment = deploymentResult.value;
|
|
181408
181501
|
output_manager_default.log(
|
|
181409
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
|
181502
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk119.default.bold(contextName)}\u2026`
|
|
181410
181503
|
);
|
|
181411
181504
|
} finally {
|
|
181412
181505
|
output_manager_default.stopSpinner();
|
|
@@ -181414,7 +181507,7 @@ async function getDeploymentByIdOrURL({
|
|
|
181414
181507
|
if (deployment.team?.id) {
|
|
181415
181508
|
if (!team || deployment.team.id !== team.id) {
|
|
181416
181509
|
const err = new Error(
|
|
181417
|
-
team ? `Deployment doesn't belong to current team ${
|
|
181510
|
+
team ? `Deployment doesn't belong to current team ${import_chalk119.default.bold(
|
|
181418
181511
|
contextName
|
|
181419
181512
|
)}` : `Deployment belongs to a different team`
|
|
181420
181513
|
);
|
|
@@ -181423,18 +181516,18 @@ async function getDeploymentByIdOrURL({
|
|
|
181423
181516
|
}
|
|
181424
181517
|
} else if (team) {
|
|
181425
181518
|
const err = new Error(
|
|
181426
|
-
`Deployment doesn't belong to current team ${
|
|
181519
|
+
`Deployment doesn't belong to current team ${import_chalk119.default.bold(contextName)}`
|
|
181427
181520
|
);
|
|
181428
181521
|
err.code = "ERR_INVALID_TEAM";
|
|
181429
181522
|
throw err;
|
|
181430
181523
|
}
|
|
181431
181524
|
return deployment;
|
|
181432
181525
|
}
|
|
181433
|
-
var
|
|
181526
|
+
var import_chalk119;
|
|
181434
181527
|
var init_get_deployment_by_id_or_url = __esm({
|
|
181435
181528
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
|
181436
181529
|
"use strict";
|
|
181437
|
-
|
|
181530
|
+
import_chalk119 = __toESM3(require_source());
|
|
181438
181531
|
init_get_deployment();
|
|
181439
181532
|
init_get_team_by_id();
|
|
181440
181533
|
init_is_valid_name();
|
|
@@ -181573,14 +181666,14 @@ async function redeploy(client2) {
|
|
|
181573
181666
|
}
|
|
181574
181667
|
output_manager_default.print(
|
|
181575
181668
|
`${prependEmoji(
|
|
181576
|
-
`Inspect: ${
|
|
181669
|
+
`Inspect: ${import_chalk120.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
|
181577
181670
|
emoji("inspect")
|
|
181578
181671
|
)}
|
|
181579
181672
|
`
|
|
181580
181673
|
);
|
|
181581
181674
|
output_manager_default.print(
|
|
181582
181675
|
prependEmoji(
|
|
181583
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
|
181676
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk120.default.bold(
|
|
181584
181677
|
previewUrl
|
|
181585
181678
|
)} ${deployStamp()}`,
|
|
181586
181679
|
emoji("success")
|
|
@@ -181656,22 +181749,22 @@ async function redeploy(client2) {
|
|
|
181656
181749
|
}
|
|
181657
181750
|
}
|
|
181658
181751
|
}
|
|
181659
|
-
return printDeploymentStatus(deployment, deployStamp, noWait);
|
|
181752
|
+
return printDeploymentStatus(deployment, deployStamp, noWait, false);
|
|
181660
181753
|
} catch (err) {
|
|
181661
181754
|
output_manager_default.prettyError(err);
|
|
181662
181755
|
if ((0, import_error_utils34.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
|
181663
181756
|
output_manager_default.error(
|
|
181664
|
-
`Use ${
|
|
181757
|
+
`Use ${import_chalk120.default.bold("vc switch")} to change your current team`
|
|
181665
181758
|
);
|
|
181666
181759
|
}
|
|
181667
181760
|
return 1;
|
|
181668
181761
|
}
|
|
181669
181762
|
}
|
|
181670
|
-
var
|
|
181763
|
+
var import_chalk120, import_client13, import_error_utils34;
|
|
181671
181764
|
var init_redeploy2 = __esm({
|
|
181672
181765
|
"src/commands/redeploy/index.ts"() {
|
|
181673
181766
|
"use strict";
|
|
181674
|
-
|
|
181767
|
+
import_chalk120 = __toESM3(require_source());
|
|
181675
181768
|
import_client13 = __toESM3(require_dist7());
|
|
181676
181769
|
init_emoji();
|
|
181677
181770
|
init_get_args();
|
|
@@ -181879,7 +181972,7 @@ async function remove5(client2) {
|
|
|
181879
181972
|
}
|
|
181880
181973
|
const { contextName } = await getScope(client2);
|
|
181881
181974
|
output_manager_default.spinner(
|
|
181882
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
|
181975
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk121.default.bold(contextName)}`
|
|
181883
181976
|
);
|
|
181884
181977
|
let aliases;
|
|
181885
181978
|
let projects;
|
|
@@ -181945,7 +182038,7 @@ async function remove5(client2) {
|
|
|
181945
182038
|
});
|
|
181946
182039
|
if (deployments.length === 0 && projects.length === 0) {
|
|
181947
182040
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
|
181948
|
-
const stylizedIds = ids.map((id) =>
|
|
182041
|
+
const stylizedIds = ids.map((id) => import_chalk121.default.bold(`"${id}"`)).join(", ");
|
|
181949
182042
|
const commandName = getCommandName("projects ls");
|
|
181950
182043
|
log2(
|
|
181951
182044
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
|
@@ -181953,7 +182046,7 @@ async function remove5(client2) {
|
|
|
181953
182046
|
return 1;
|
|
181954
182047
|
}
|
|
181955
182048
|
log2(
|
|
181956
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
|
182049
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk121.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
|
181957
182050
|
);
|
|
181958
182051
|
if (deployments.length > 200) {
|
|
181959
182052
|
output_manager_default.warn(
|
|
@@ -181980,11 +182073,11 @@ async function remove5(client2) {
|
|
|
181980
182073
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
|
181981
182074
|
);
|
|
181982
182075
|
deployments.forEach((depl) => {
|
|
181983
|
-
output_manager_default.print(`${
|
|
182076
|
+
output_manager_default.print(`${import_chalk121.default.gray("-")} ${import_chalk121.default.bold(depl.url)}
|
|
181984
182077
|
`);
|
|
181985
182078
|
});
|
|
181986
182079
|
projects.forEach((project) => {
|
|
181987
|
-
output_manager_default.print(`${
|
|
182080
|
+
output_manager_default.print(`${import_chalk121.default.gray("-")} ${import_chalk121.default.bold(project.name)}
|
|
181988
182081
|
`);
|
|
181989
182082
|
});
|
|
181990
182083
|
return 0;
|
|
@@ -182001,8 +182094,8 @@ function readConfirmation4(deployments, projects) {
|
|
|
182001
182094
|
);
|
|
182002
182095
|
const deploymentTable = table(
|
|
182003
182096
|
deployments.map((depl) => {
|
|
182004
|
-
const time =
|
|
182005
|
-
const url3 = depl.url ?
|
|
182097
|
+
const time = import_chalk121.default.gray(`${(0, import_ms28.default)(Date.now() - depl.createdAt)} ago`);
|
|
182098
|
+
const url3 = depl.url ? import_chalk121.default.underline(`https://${depl.url}`) : "";
|
|
182006
182099
|
return [` ${depl.id}`, url3, time];
|
|
182007
182100
|
}),
|
|
182008
182101
|
{ align: ["l", "r", "l"], hsep: 6 }
|
|
@@ -182013,7 +182106,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
182013
182106
|
for (const depl of deployments) {
|
|
182014
182107
|
for (const { alias: alias2 } of depl.aliases) {
|
|
182015
182108
|
output_manager_default.warn(
|
|
182016
|
-
`${
|
|
182109
|
+
`${import_chalk121.default.underline(`https://${alias2}`)} is an alias for ${import_chalk121.default.bold(depl.url)} and will be removed`
|
|
182017
182110
|
);
|
|
182018
182111
|
}
|
|
182019
182112
|
}
|
|
@@ -182027,12 +182120,12 @@ function readConfirmation4(deployments, projects) {
|
|
|
182027
182120
|
`
|
|
182028
182121
|
);
|
|
182029
182122
|
for (const project of projects) {
|
|
182030
|
-
output_manager_default.print(`${
|
|
182123
|
+
output_manager_default.print(`${import_chalk121.default.gray("-")} ${import_chalk121.default.bold(project.name)}
|
|
182031
182124
|
`);
|
|
182032
182125
|
}
|
|
182033
182126
|
}
|
|
182034
182127
|
output_manager_default.print(
|
|
182035
|
-
`${
|
|
182128
|
+
`${import_chalk121.default.bold.red("> Are you sure?")} ${import_chalk121.default.gray("(y/N) ")}`
|
|
182036
182129
|
);
|
|
182037
182130
|
process.stdin.on("data", (d) => {
|
|
182038
182131
|
process.stdin.pause();
|
|
@@ -182049,11 +182142,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
|
182049
182142
|
}
|
|
182050
182143
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
|
182051
182144
|
}
|
|
182052
|
-
var
|
|
182145
|
+
var import_chalk121, import_ms28, import_pluralize11;
|
|
182053
182146
|
var init_remove6 = __esm({
|
|
182054
182147
|
"src/commands/remove/index.ts"() {
|
|
182055
182148
|
"use strict";
|
|
182056
|
-
|
|
182149
|
+
import_chalk121 = __toESM3(require_source());
|
|
182057
182150
|
import_ms28 = __toESM3(require_ms());
|
|
182058
182151
|
import_pluralize11 = __toESM3(require_pluralize());
|
|
182059
182152
|
init_table();
|
|
@@ -182149,7 +182242,7 @@ async function rollbackStatus({
|
|
|
182149
182242
|
}
|
|
182150
182243
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
|
182151
182244
|
output_manager_default.log(
|
|
182152
|
-
`The rollback exceeded its deadline - rerun ${
|
|
182245
|
+
`The rollback exceeded its deadline - rerun ${import_chalk122.default.bold(
|
|
182153
182246
|
`${packageName} rollback ${toDeploymentId}`
|
|
182154
182247
|
)} to try again`
|
|
182155
182248
|
);
|
|
@@ -182213,26 +182306,26 @@ async function renderJobSucceeded2({
|
|
|
182213
182306
|
let deploymentInfo = "";
|
|
182214
182307
|
try {
|
|
182215
182308
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
182216
|
-
deploymentInfo = `${
|
|
182309
|
+
deploymentInfo = `${import_chalk122.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
182217
182310
|
} catch (err) {
|
|
182218
182311
|
output_manager_default.debug(
|
|
182219
182312
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
182220
182313
|
);
|
|
182221
|
-
deploymentInfo =
|
|
182314
|
+
deploymentInfo = import_chalk122.default.bold(toDeploymentId);
|
|
182222
182315
|
}
|
|
182223
182316
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
|
182224
182317
|
output_manager_default.log(
|
|
182225
|
-
`Success! ${
|
|
182318
|
+
`Success! ${import_chalk122.default.bold(
|
|
182226
182319
|
project.name
|
|
182227
182320
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
|
182228
182321
|
);
|
|
182229
182322
|
return 0;
|
|
182230
182323
|
}
|
|
182231
|
-
var
|
|
182324
|
+
var import_chalk122, import_ms29;
|
|
182232
182325
|
var init_status3 = __esm({
|
|
182233
182326
|
"src/commands/rollback/status.ts"() {
|
|
182234
182327
|
"use strict";
|
|
182235
|
-
|
|
182328
|
+
import_chalk122 = __toESM3(require_source());
|
|
182236
182329
|
init_elapsed();
|
|
182237
182330
|
init_format_date();
|
|
182238
182331
|
init_get_deployment();
|
|
@@ -182264,7 +182357,7 @@ async function requestRollback({
|
|
|
182264
182357
|
});
|
|
182265
182358
|
if (timeout !== void 0 && (0, import_ms30.default)(timeout) === 0) {
|
|
182266
182359
|
output_manager_default.log(
|
|
182267
|
-
`Successfully requested rollback of ${
|
|
182360
|
+
`Successfully requested rollback of ${import_chalk123.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
182268
182361
|
);
|
|
182269
182362
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
|
182270
182363
|
return 0;
|
|
@@ -182277,11 +182370,11 @@ async function requestRollback({
|
|
|
182277
182370
|
timeout
|
|
182278
182371
|
});
|
|
182279
182372
|
}
|
|
182280
|
-
var
|
|
182373
|
+
var import_chalk123, import_ms30;
|
|
182281
182374
|
var init_request_rollback = __esm({
|
|
182282
182375
|
"src/commands/rollback/request-rollback.ts"() {
|
|
182283
182376
|
"use strict";
|
|
182284
|
-
|
|
182377
|
+
import_chalk123 = __toESM3(require_source());
|
|
182285
182378
|
init_pkg_name();
|
|
182286
182379
|
init_get_project_by_deployment();
|
|
182287
182380
|
import_ms30 = __toESM3(require_ms());
|
|
@@ -182951,17 +183044,17 @@ function formatBranchMatcher(branchMatcher) {
|
|
|
182951
183044
|
if (branchMatcher?.type === "equals") {
|
|
182952
183045
|
return branchMatcher.pattern;
|
|
182953
183046
|
} else if (branchMatcher?.type === "startsWith") {
|
|
182954
|
-
return `${branchMatcher.pattern}${
|
|
183047
|
+
return `${branchMatcher.pattern}${import_chalk124.default.dim("*")}`;
|
|
182955
183048
|
} else if (branchMatcher?.type === "endsWith") {
|
|
182956
|
-
return `${
|
|
183049
|
+
return `${import_chalk124.default.dim("*")}${branchMatcher.pattern}`;
|
|
182957
183050
|
}
|
|
182958
|
-
return
|
|
183051
|
+
return import_chalk124.default.dim("No branch configuration");
|
|
182959
183052
|
}
|
|
182960
183053
|
async function list7(client2, argv) {
|
|
182961
183054
|
const { cwd } = client2;
|
|
182962
183055
|
if (argv.length !== 0) {
|
|
182963
183056
|
output_manager_default.error(
|
|
182964
|
-
`Invalid number of arguments. Usage: ${
|
|
183057
|
+
`Invalid number of arguments. Usage: ${import_chalk124.default.cyan(
|
|
182965
183058
|
`${getCommandName("target ls")}`
|
|
182966
183059
|
)}`
|
|
182967
183060
|
);
|
|
@@ -182985,12 +183078,12 @@ async function list7(client2, argv) {
|
|
|
182985
183078
|
const elapsed2 = (0, import_ms32.default)(Date.now() - start);
|
|
182986
183079
|
result = withDefaultEnvironmentsIncluded(result);
|
|
182987
183080
|
output_manager_default.log(
|
|
182988
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
|
183081
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk124.default.gray(`[${elapsed2}]`)}`
|
|
182989
183082
|
);
|
|
182990
183083
|
const tablePrint = table(
|
|
182991
183084
|
[
|
|
182992
183085
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
|
182993
|
-
(header) =>
|
|
183086
|
+
(header) => import_chalk124.default.bold(import_chalk124.default.cyan(header))
|
|
182994
183087
|
),
|
|
182995
183088
|
...result.flatMap((target) => {
|
|
182996
183089
|
return [
|
|
@@ -182998,7 +183091,7 @@ async function list7(client2, argv) {
|
|
|
182998
183091
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
|
182999
183092
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
|
183000
183093
|
TYPE_MAP[target.type],
|
|
183001
|
-
|
|
183094
|
+
import_chalk124.default.gray(
|
|
183002
183095
|
target.updatedAt > 0 ? (0, import_ms32.default)(Date.now() - target.updatedAt) : "-"
|
|
183003
183096
|
)
|
|
183004
183097
|
]
|
|
@@ -183045,12 +183138,12 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
|
183045
183138
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
|
183046
183139
|
];
|
|
183047
183140
|
}
|
|
183048
|
-
var import_ms32,
|
|
183141
|
+
var import_ms32, import_chalk124, TYPE_MAP, BRANCH_TRACKING_MAP;
|
|
183049
183142
|
var init_list11 = __esm({
|
|
183050
183143
|
"src/commands/target/list.ts"() {
|
|
183051
183144
|
"use strict";
|
|
183052
183145
|
import_ms32 = __toESM3(require_ms());
|
|
183053
|
-
|
|
183146
|
+
import_chalk124 = __toESM3(require_source());
|
|
183054
183147
|
init_table();
|
|
183055
183148
|
init_output_manager();
|
|
183056
183149
|
init_command32();
|
|
@@ -183065,8 +183158,8 @@ var init_list11 = __esm({
|
|
|
183065
183158
|
};
|
|
183066
183159
|
BRANCH_TRACKING_MAP = {
|
|
183067
183160
|
production: (project) => project.link?.productionBranch ?? "main",
|
|
183068
|
-
preview: (_, env) => env.slug === "preview" ?
|
|
183069
|
-
development: () =>
|
|
183161
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk124.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
|
183162
|
+
development: () => import_chalk124.default.dim("Accessible via CLI")
|
|
183070
183163
|
};
|
|
183071
183164
|
}
|
|
183072
183165
|
});
|
|
@@ -183261,7 +183354,7 @@ async function list8(client2, argv) {
|
|
|
183261
183354
|
client2.stdout.write("\n");
|
|
183262
183355
|
const teamTable = table(
|
|
183263
183356
|
[
|
|
183264
|
-
["id", "Team name"].map((str) => (0,
|
|
183357
|
+
["id", "Team name"].map((str) => (0, import_chalk125.gray)(str)),
|
|
183265
183358
|
...teamList.map((team) => [team.value, team.name])
|
|
183266
183359
|
],
|
|
183267
183360
|
{ hsep: 5 }
|
|
@@ -183278,13 +183371,13 @@ async function list8(client2, argv) {
|
|
|
183278
183371
|
}
|
|
183279
183372
|
return 0;
|
|
183280
183373
|
}
|
|
183281
|
-
var
|
|
183374
|
+
var import_chalk125;
|
|
183282
183375
|
var init_list13 = __esm({
|
|
183283
183376
|
"src/commands/teams/list.ts"() {
|
|
183284
183377
|
"use strict";
|
|
183285
183378
|
init_chars();
|
|
183286
183379
|
init_table();
|
|
183287
|
-
|
|
183380
|
+
import_chalk125 = __toESM3(require_source());
|
|
183288
183381
|
init_get_user();
|
|
183289
183382
|
init_get_teams();
|
|
183290
183383
|
init_pkg_name();
|
|
@@ -183379,7 +183472,7 @@ Please select a team scope using ${getCommandName(
|
|
|
183379
183472
|
return 1;
|
|
183380
183473
|
}
|
|
183381
183474
|
output_manager_default.log(
|
|
183382
|
-
introMsg || `Inviting team members to ${
|
|
183475
|
+
introMsg || `Inviting team members to ${import_chalk126.default.bold(currentTeam.name)}`
|
|
183383
183476
|
);
|
|
183384
183477
|
telemetry2.trackCliArgumentEmail(emails);
|
|
183385
183478
|
if (emails.length > 0) {
|
|
@@ -183399,10 +183492,10 @@ Please select a team scope using ${getCommandName(
|
|
|
183399
183492
|
throw err;
|
|
183400
183493
|
}
|
|
183401
183494
|
output_manager_default.log(
|
|
183402
|
-
`${
|
|
183495
|
+
`${import_chalk126.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
|
183403
183496
|
);
|
|
183404
183497
|
} else {
|
|
183405
|
-
output_manager_default.log(`${
|
|
183498
|
+
output_manager_default.log(`${import_chalk126.default.red(`\u2716 ${email3}`)} ${import_chalk126.default.gray("[invalid]")}`);
|
|
183406
183499
|
}
|
|
183407
183500
|
}
|
|
183408
183501
|
return 0;
|
|
@@ -183435,15 +183528,15 @@ Please select a team scope using ${getCommandName(
|
|
|
183435
183528
|
);
|
|
183436
183529
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
|
183437
183530
|
emails.push(email2);
|
|
183438
|
-
output_manager_default.log(`${
|
|
183531
|
+
output_manager_default.log(`${import_chalk126.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
|
183439
183532
|
if (hasError) {
|
|
183440
183533
|
hasError = false;
|
|
183441
183534
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
183442
183535
|
output_manager_default.log(
|
|
183443
|
-
introMsg || `Inviting team members to ${
|
|
183536
|
+
introMsg || `Inviting team members to ${import_chalk126.default.bold(currentTeam.name)}`
|
|
183444
183537
|
);
|
|
183445
183538
|
for (const email3 of emails) {
|
|
183446
|
-
output_manager_default.log(`${
|
|
183539
|
+
output_manager_default.log(`${import_chalk126.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
183447
183540
|
}
|
|
183448
183541
|
}
|
|
183449
183542
|
} catch (err) {
|
|
@@ -183452,7 +183545,7 @@ Please select a team scope using ${getCommandName(
|
|
|
183452
183545
|
output_manager_default.error((0, import_error_utils36.errorToString)(err));
|
|
183453
183546
|
hasError = true;
|
|
183454
183547
|
for (const email3 of emails) {
|
|
183455
|
-
output_manager_default.log(`${
|
|
183548
|
+
output_manager_default.log(`${import_chalk126.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
|
183456
183549
|
}
|
|
183457
183550
|
}
|
|
183458
183551
|
}
|
|
@@ -183465,16 +183558,16 @@ Please select a team scope using ${getCommandName(
|
|
|
183465
183558
|
} else {
|
|
183466
183559
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
|
183467
183560
|
for (const email3 of emails) {
|
|
183468
|
-
output_manager_default.log(`${
|
|
183561
|
+
output_manager_default.log(`${import_chalk126.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
183469
183562
|
}
|
|
183470
183563
|
}
|
|
183471
183564
|
return 0;
|
|
183472
183565
|
}
|
|
183473
|
-
var
|
|
183566
|
+
var import_chalk126, import_error_utils36, validateEmail2, domains;
|
|
183474
183567
|
var init_invite2 = __esm({
|
|
183475
183568
|
"src/commands/teams/invite.ts"() {
|
|
183476
183569
|
"use strict";
|
|
183477
|
-
|
|
183570
|
+
import_chalk126 = __toESM3(require_source());
|
|
183478
183571
|
init_cmd();
|
|
183479
183572
|
init_stamp();
|
|
183480
183573
|
init_param();
|
|
@@ -183550,7 +183643,7 @@ async function add7(client2) {
|
|
|
183550
183643
|
let team;
|
|
183551
183644
|
let elapsed2;
|
|
183552
183645
|
output_manager_default.log(
|
|
183553
|
-
`Pick a team identifier for its URL (e.g.: ${
|
|
183646
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk127.default.cyan(
|
|
183554
183647
|
"`vercel.com/acme`"
|
|
183555
183648
|
)})`
|
|
183556
183649
|
);
|
|
@@ -183581,7 +183674,7 @@ async function add7(client2) {
|
|
|
183581
183674
|
output_manager_default.stopSpinner();
|
|
183582
183675
|
process.stdout.write(eraseLines(2));
|
|
183583
183676
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
|
183584
|
-
output_manager_default.log(`${
|
|
183677
|
+
output_manager_default.log(`${import_chalk127.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
|
183585
183678
|
`);
|
|
183586
183679
|
output_manager_default.log("Pick a display name for your team");
|
|
183587
183680
|
let name;
|
|
@@ -183604,7 +183697,7 @@ async function add7(client2) {
|
|
|
183604
183697
|
process.stdout.write(eraseLines(2));
|
|
183605
183698
|
team = Object.assign(team, res);
|
|
183606
183699
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
|
183607
|
-
output_manager_default.log(`${
|
|
183700
|
+
output_manager_default.log(`${import_chalk127.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
|
183608
183701
|
`);
|
|
183609
183702
|
output_manager_default.spinner("Saving");
|
|
183610
183703
|
client2.config.currentTeam = team.id;
|
|
@@ -183618,11 +183711,11 @@ async function add7(client2) {
|
|
|
183618
183711
|
});
|
|
183619
183712
|
return 0;
|
|
183620
183713
|
}
|
|
183621
|
-
var
|
|
183714
|
+
var import_chalk127, import_error_utils37, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
|
183622
183715
|
var init_add13 = __esm({
|
|
183623
183716
|
"src/commands/teams/add.ts"() {
|
|
183624
183717
|
"use strict";
|
|
183625
|
-
|
|
183718
|
+
import_chalk127 = __toESM3(require_source());
|
|
183626
183719
|
init_stamp();
|
|
183627
183720
|
init_erase_lines();
|
|
183628
183721
|
init_chars();
|
|
@@ -183635,7 +183728,7 @@ var init_add13 = __esm({
|
|
|
183635
183728
|
init_output_manager();
|
|
183636
183729
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
|
183637
183730
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
|
183638
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
|
183731
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk127.default.gray("vercel.com/");
|
|
183639
183732
|
teamNamePrefix = "Team Name".padEnd(14);
|
|
183640
183733
|
}
|
|
183641
183734
|
});
|
|
@@ -183694,7 +183787,7 @@ async function change(client2, argv) {
|
|
|
183694
183787
|
let title9 = `${team.name} (${team.slug})`;
|
|
183695
183788
|
const selected = team.id === currentTeam?.id;
|
|
183696
183789
|
if (selected) {
|
|
183697
|
-
title9 += ` ${
|
|
183790
|
+
title9 += ` ${import_chalk128.default.bold("(current)")}`;
|
|
183698
183791
|
}
|
|
183699
183792
|
if (team.limited) {
|
|
183700
183793
|
title9 += ` ${emoji("locked")}`;
|
|
@@ -183706,7 +183799,7 @@ async function change(client2, argv) {
|
|
|
183706
183799
|
selected
|
|
183707
183800
|
};
|
|
183708
183801
|
});
|
|
183709
|
-
let suffix = personalScopeSelected ? ` ${
|
|
183802
|
+
let suffix = personalScopeSelected ? ` ${import_chalk128.default.bold("(current)")}` : "";
|
|
183710
183803
|
if (user.limited) {
|
|
183711
183804
|
suffix += ` ${emoji("locked")}`;
|
|
183712
183805
|
}
|
|
@@ -183752,14 +183845,14 @@ async function change(client2, argv) {
|
|
|
183752
183845
|
}
|
|
183753
183846
|
updateCurrentTeam(config2);
|
|
183754
183847
|
output_manager_default.success(
|
|
183755
|
-
`Your account (${
|
|
183848
|
+
`Your account (${import_chalk128.default.bold(user.username)}) is now active!`
|
|
183756
183849
|
);
|
|
183757
183850
|
return 0;
|
|
183758
183851
|
}
|
|
183759
183852
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
|
183760
183853
|
if (!newTeam) {
|
|
183761
183854
|
output_manager_default.error(
|
|
183762
|
-
`You do not have permission to access scope ${
|
|
183855
|
+
`You do not have permission to access scope ${import_chalk128.default.bold(desiredSlug)}.`
|
|
183763
183856
|
);
|
|
183764
183857
|
return 1;
|
|
183765
183858
|
}
|
|
@@ -183777,15 +183870,15 @@ async function change(client2, argv) {
|
|
|
183777
183870
|
}
|
|
183778
183871
|
updateCurrentTeam(config2, newTeam);
|
|
183779
183872
|
output_manager_default.success(
|
|
183780
|
-
`The team ${
|
|
183873
|
+
`The team ${import_chalk128.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
|
183781
183874
|
);
|
|
183782
183875
|
return 0;
|
|
183783
183876
|
}
|
|
183784
|
-
var
|
|
183877
|
+
var import_chalk128, updateCurrentTeam;
|
|
183785
183878
|
var init_switch2 = __esm({
|
|
183786
183879
|
"src/commands/teams/switch.ts"() {
|
|
183787
183880
|
"use strict";
|
|
183788
|
-
|
|
183881
|
+
import_chalk128 = __toESM3(require_source());
|
|
183789
183882
|
init_emoji();
|
|
183790
183883
|
init_get_user();
|
|
183791
183884
|
init_get_teams();
|
|
@@ -183964,13 +184057,13 @@ var init_teams2 = __esm({
|
|
|
183964
184057
|
// src/commands/telemetry/status.ts
|
|
183965
184058
|
async function status2(client2) {
|
|
183966
184059
|
const enabled = client2.config.telemetry?.enabled !== false;
|
|
183967
|
-
const status3 = enabled ?
|
|
184060
|
+
const status3 = enabled ? import_chalk129.default.green("Enabled") : import_chalk129.default.red("Disabled");
|
|
183968
184061
|
output_manager_default.print("\n");
|
|
183969
|
-
output_manager_default.log(`${
|
|
184062
|
+
output_manager_default.log(`${import_chalk129.default.bold("Telemetry status")}: ${status3}
|
|
183970
184063
|
`);
|
|
183971
184064
|
const learnMoreMessage = `
|
|
183972
184065
|
|
|
183973
|
-
Learn more: ${
|
|
184066
|
+
Learn more: ${import_chalk129.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
|
183974
184067
|
if (enabled) {
|
|
183975
184068
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
|
183976
184069
|
} else {
|
|
@@ -183981,11 +184074,11 @@ Learn more: ${import_chalk128.default.cyan("https://vercel.com/docs/cli/about-te
|
|
|
183981
184074
|
}
|
|
183982
184075
|
return 0;
|
|
183983
184076
|
}
|
|
183984
|
-
var
|
|
184077
|
+
var import_chalk129;
|
|
183985
184078
|
var init_status4 = __esm({
|
|
183986
184079
|
"src/commands/telemetry/status.ts"() {
|
|
183987
184080
|
"use strict";
|
|
183988
|
-
|
|
184081
|
+
import_chalk129 = __toESM3(require_source());
|
|
183989
184082
|
init_output_manager();
|
|
183990
184083
|
}
|
|
183991
184084
|
});
|
|
@@ -184166,7 +184259,7 @@ async function telemetry(client2) {
|
|
|
184166
184259
|
default: {
|
|
184167
184260
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
|
184168
184261
|
output_manager_default.print(
|
|
184169
|
-
`${
|
|
184262
|
+
`${import_chalk130.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
|
184170
184263
|
`
|
|
184171
184264
|
);
|
|
184172
184265
|
output_manager_default.print(help2(telemetryCommand, { columns: client2.stderr.columns }));
|
|
@@ -184174,7 +184267,7 @@ async function telemetry(client2) {
|
|
|
184174
184267
|
}
|
|
184175
184268
|
}
|
|
184176
184269
|
}
|
|
184177
|
-
var
|
|
184270
|
+
var import_chalk130, COMMAND_CONFIG20;
|
|
184178
184271
|
var init_telemetry3 = __esm({
|
|
184179
184272
|
"src/commands/telemetry/index.ts"() {
|
|
184180
184273
|
"use strict";
|
|
@@ -184189,7 +184282,7 @@ var init_telemetry3 = __esm({
|
|
|
184189
184282
|
init_command34();
|
|
184190
184283
|
init_get_flags_specification();
|
|
184191
184284
|
init_telemetry2();
|
|
184192
|
-
|
|
184285
|
+
import_chalk130 = __toESM3(require_source());
|
|
184193
184286
|
init_output_manager();
|
|
184194
184287
|
init_commands();
|
|
184195
184288
|
COMMAND_CONFIG20 = {
|
|
@@ -184264,7 +184357,7 @@ var import_error_utils38 = __toESM3(require_dist2());
|
|
|
184264
184357
|
var import_path40 = require("path");
|
|
184265
184358
|
var import_fs8 = require("fs");
|
|
184266
184359
|
var import_fs_extra24 = __toESM3(require_lib());
|
|
184267
|
-
var
|
|
184360
|
+
var import_chalk131 = __toESM3(require_source());
|
|
184268
184361
|
var import_epipebomb = __toESM3(require_epipebomb());
|
|
184269
184362
|
|
|
184270
184363
|
// src/util/get-latest-version/index.ts
|
|
@@ -185115,7 +185208,7 @@ function checkGuidanceStatus({ config: config2 }) {
|
|
|
185115
185208
|
}
|
|
185116
185209
|
|
|
185117
185210
|
// src/index.ts
|
|
185118
|
-
var
|
|
185211
|
+
var import_detect_agent4 = require("@vercel/detect-agent");
|
|
185119
185212
|
try {
|
|
185120
185213
|
process.cwd();
|
|
185121
185214
|
} catch (err) {
|
|
@@ -185203,13 +185296,13 @@ var main17 = async () => {
|
|
|
185203
185296
|
const betaCommands = [];
|
|
185204
185297
|
if (betaCommands.includes(targetOrSubcommand)) {
|
|
185205
185298
|
output_manager_default.print(
|
|
185206
|
-
`${
|
|
185299
|
+
`${import_chalk131.default.grey(
|
|
185207
185300
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
|
185208
185301
|
)}
|
|
185209
185302
|
`
|
|
185210
185303
|
);
|
|
185211
185304
|
} else {
|
|
185212
|
-
output_manager_default.print(`${
|
|
185305
|
+
output_manager_default.print(`${import_chalk131.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
|
185213
185306
|
`);
|
|
185214
185307
|
}
|
|
185215
185308
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
|
@@ -185299,7 +185392,7 @@ var main17 = async () => {
|
|
|
185299
185392
|
store: telemetryEventStore
|
|
185300
185393
|
}
|
|
185301
185394
|
});
|
|
185302
|
-
const agent = await (0,
|
|
185395
|
+
const agent = await (0, import_detect_agent4.determineAgent)();
|
|
185303
185396
|
telemetry2.trackAgenticUse(agent);
|
|
185304
185397
|
telemetry2.trackCPUs();
|
|
185305
185398
|
telemetry2.trackPlatform();
|
|
@@ -185785,20 +185878,20 @@ main17().then(async (exitCode2) => {
|
|
|
185785
185878
|
});
|
|
185786
185879
|
if (latest) {
|
|
185787
185880
|
const changelog = "https://github.com/vercel/vercel/releases";
|
|
185788
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
185881
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk131.default.magenta(
|
|
185789
185882
|
`
|
|
185790
185883
|
|
|
185791
|
-
The latest update ${
|
|
185884
|
+
The latest update ${import_chalk131.default.italic(
|
|
185792
185885
|
"may"
|
|
185793
185886
|
)} fix any errors that occurred.`
|
|
185794
185887
|
) : "";
|
|
185795
185888
|
output_manager_default.print(
|
|
185796
185889
|
box(
|
|
185797
|
-
`Update available! ${
|
|
185890
|
+
`Update available! ${import_chalk131.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk131.default.green(
|
|
185798
185891
|
`v${latest}`
|
|
185799
185892
|
)}
|
|
185800
185893
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
185801
|
-
Run ${
|
|
185894
|
+
Run ${import_chalk131.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
|
185802
185895
|
)
|
|
185803
185896
|
);
|
|
185804
185897
|
output_manager_default.print("\n\n");
|