vercel 37.6.3 → 37.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +342 -245
- package/package.json +6 -6
package/dist/index.js
CHANGED
@@ -862,7 +862,7 @@ var require_graceful_fs = __commonJS2({
|
|
862
862
|
}
|
863
863
|
function ReadStream$open() {
|
864
864
|
var that = this;
|
865
|
-
|
865
|
+
open5(that.path, that.flags, that.mode, function(err, fd) {
|
866
866
|
if (err) {
|
867
867
|
if (that.autoClose)
|
868
868
|
that.destroy();
|
@@ -882,7 +882,7 @@ var require_graceful_fs = __commonJS2({
|
|
882
882
|
}
|
883
883
|
function WriteStream$open() {
|
884
884
|
var that = this;
|
885
|
-
|
885
|
+
open5(that.path, that.flags, that.mode, function(err, fd) {
|
886
886
|
if (err) {
|
887
887
|
that.destroy();
|
888
888
|
that.emit("error", err);
|
@@ -899,8 +899,8 @@ var require_graceful_fs = __commonJS2({
|
|
899
899
|
return new fs16.WriteStream(path11, options);
|
900
900
|
}
|
901
901
|
var fs$open = fs16.open;
|
902
|
-
fs16.open =
|
903
|
-
function
|
902
|
+
fs16.open = open5;
|
903
|
+
function open5(path11, flags, mode, cb) {
|
904
904
|
if (typeof mode === "function")
|
905
905
|
cb = mode, mode = null;
|
906
906
|
return go$open(path11, flags, mode, cb);
|
@@ -4073,14 +4073,14 @@ var require_templates = __commonJS2({
|
|
4073
4073
|
}
|
4074
4074
|
return results;
|
4075
4075
|
}
|
4076
|
-
function buildStyle(
|
4076
|
+
function buildStyle(chalk111, styles) {
|
4077
4077
|
const enabled = {};
|
4078
4078
|
for (const layer of styles) {
|
4079
4079
|
for (const style of layer.styles) {
|
4080
4080
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
4081
4081
|
}
|
4082
4082
|
}
|
4083
|
-
let current =
|
4083
|
+
let current = chalk111;
|
4084
4084
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
4085
4085
|
if (!Array.isArray(styles2)) {
|
4086
4086
|
continue;
|
@@ -4092,7 +4092,7 @@ var require_templates = __commonJS2({
|
|
4092
4092
|
}
|
4093
4093
|
return current;
|
4094
4094
|
}
|
4095
|
-
module2.exports = (
|
4095
|
+
module2.exports = (chalk111, temporary) => {
|
4096
4096
|
const styles = [];
|
4097
4097
|
const chunks = [];
|
4098
4098
|
let chunk = [];
|
@@ -4102,13 +4102,13 @@ var require_templates = __commonJS2({
|
|
4102
4102
|
} else if (style) {
|
4103
4103
|
const string = chunk.join("");
|
4104
4104
|
chunk = [];
|
4105
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
4105
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk111, styles)(string));
|
4106
4106
|
styles.push({ inverse, styles: parseStyle(style) });
|
4107
4107
|
} else if (close2) {
|
4108
4108
|
if (styles.length === 0) {
|
4109
4109
|
throw new Error("Found extraneous } in Chalk template literal");
|
4110
4110
|
}
|
4111
|
-
chunks.push(buildStyle(
|
4111
|
+
chunks.push(buildStyle(chalk111, styles)(chunk.join("")));
|
4112
4112
|
chunk = [];
|
4113
4113
|
styles.pop();
|
4114
4114
|
} else {
|
@@ -4156,16 +4156,16 @@ var require_source = __commonJS2({
|
|
4156
4156
|
}
|
4157
4157
|
};
|
4158
4158
|
var chalkFactory = (options) => {
|
4159
|
-
const
|
4160
|
-
applyOptions(
|
4161
|
-
|
4162
|
-
Object.setPrototypeOf(
|
4163
|
-
Object.setPrototypeOf(
|
4164
|
-
|
4159
|
+
const chalk112 = {};
|
4160
|
+
applyOptions(chalk112, options);
|
4161
|
+
chalk112.template = (...arguments_) => chalkTag(chalk112.template, ...arguments_);
|
4162
|
+
Object.setPrototypeOf(chalk112, Chalk3.prototype);
|
4163
|
+
Object.setPrototypeOf(chalk112.template, chalk112);
|
4164
|
+
chalk112.template.constructor = () => {
|
4165
4165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4166
4166
|
};
|
4167
|
-
|
4168
|
-
return
|
4167
|
+
chalk112.template.Instance = ChalkClass;
|
4168
|
+
return chalk112.template;
|
4169
4169
|
};
|
4170
4170
|
function Chalk3(options) {
|
4171
4171
|
return chalkFactory(options);
|
@@ -4223,18 +4223,18 @@ var require_source = __commonJS2({
|
|
4223
4223
|
}
|
4224
4224
|
}
|
4225
4225
|
});
|
4226
|
-
var createStyler = (
|
4226
|
+
var createStyler = (open5, close2, parent) => {
|
4227
4227
|
let openAll;
|
4228
4228
|
let closeAll;
|
4229
4229
|
if (parent === void 0) {
|
4230
|
-
openAll =
|
4230
|
+
openAll = open5;
|
4231
4231
|
closeAll = close2;
|
4232
4232
|
} else {
|
4233
|
-
openAll = parent.openAll +
|
4233
|
+
openAll = parent.openAll + open5;
|
4234
4234
|
closeAll = close2 + parent.closeAll;
|
4235
4235
|
}
|
4236
4236
|
return {
|
4237
|
-
open:
|
4237
|
+
open: open5,
|
4238
4238
|
close: close2,
|
4239
4239
|
openAll,
|
4240
4240
|
closeAll,
|
@@ -4276,7 +4276,7 @@ var require_source = __commonJS2({
|
|
4276
4276
|
return openAll + string + closeAll;
|
4277
4277
|
};
|
4278
4278
|
var template;
|
4279
|
-
var chalkTag = (
|
4279
|
+
var chalkTag = (chalk112, ...strings) => {
|
4280
4280
|
const [firstString] = strings;
|
4281
4281
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
4282
4282
|
return strings.join(" ");
|
@@ -4292,14 +4292,14 @@ var require_source = __commonJS2({
|
|
4292
4292
|
if (template === void 0) {
|
4293
4293
|
template = require_templates();
|
4294
4294
|
}
|
4295
|
-
return template(
|
4295
|
+
return template(chalk112, parts.join(""));
|
4296
4296
|
};
|
4297
4297
|
Object.defineProperties(Chalk3.prototype, styles);
|
4298
|
-
var
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
module2.exports =
|
4298
|
+
var chalk111 = Chalk3();
|
4299
|
+
chalk111.supportsColor = stdoutColor;
|
4300
|
+
chalk111.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
4301
|
+
chalk111.stderr.supportsColor = stderrColor;
|
4302
|
+
module2.exports = chalk111;
|
4303
4303
|
}
|
4304
4304
|
});
|
4305
4305
|
|
@@ -13478,14 +13478,14 @@ var require_templates2 = __commonJS2({
|
|
13478
13478
|
}
|
13479
13479
|
return results;
|
13480
13480
|
}
|
13481
|
-
function buildStyle(
|
13481
|
+
function buildStyle(chalk111, styles) {
|
13482
13482
|
const enabled = {};
|
13483
13483
|
for (const layer of styles) {
|
13484
13484
|
for (const style of layer.styles) {
|
13485
13485
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
13486
13486
|
}
|
13487
13487
|
}
|
13488
|
-
let current =
|
13488
|
+
let current = chalk111;
|
13489
13489
|
for (const styleName of Object.keys(enabled)) {
|
13490
13490
|
if (Array.isArray(enabled[styleName])) {
|
13491
13491
|
if (!(styleName in current)) {
|
@@ -13500,7 +13500,7 @@ var require_templates2 = __commonJS2({
|
|
13500
13500
|
}
|
13501
13501
|
return current;
|
13502
13502
|
}
|
13503
|
-
module2.exports = (
|
13503
|
+
module2.exports = (chalk111, tmp) => {
|
13504
13504
|
const styles = [];
|
13505
13505
|
const chunks = [];
|
13506
13506
|
let chunk = [];
|
@@ -13510,13 +13510,13 @@ var require_templates2 = __commonJS2({
|
|
13510
13510
|
} else if (style) {
|
13511
13511
|
const str = chunk.join("");
|
13512
13512
|
chunk = [];
|
13513
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
13513
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk111, styles)(str));
|
13514
13514
|
styles.push({ inverse, styles: parseStyle(style) });
|
13515
13515
|
} else if (close2) {
|
13516
13516
|
if (styles.length === 0) {
|
13517
13517
|
throw new Error("Found extraneous } in Chalk template literal");
|
13518
13518
|
}
|
13519
|
-
chunks.push(buildStyle(
|
13519
|
+
chunks.push(buildStyle(chalk111, styles)(chunk.join("")));
|
13520
13520
|
chunk = [];
|
13521
13521
|
styles.pop();
|
13522
13522
|
} else {
|
@@ -13553,16 +13553,16 @@ var require_chalk = __commonJS2({
|
|
13553
13553
|
}
|
13554
13554
|
function Chalk3(options) {
|
13555
13555
|
if (!this || !(this instanceof Chalk3) || this.template) {
|
13556
|
-
const
|
13557
|
-
applyOptions(
|
13558
|
-
|
13556
|
+
const chalk111 = {};
|
13557
|
+
applyOptions(chalk111, options);
|
13558
|
+
chalk111.template = function() {
|
13559
13559
|
const args2 = [].slice.call(arguments);
|
13560
|
-
return chalkTag.apply(null, [
|
13560
|
+
return chalkTag.apply(null, [chalk111.template].concat(args2));
|
13561
13561
|
};
|
13562
|
-
Object.setPrototypeOf(
|
13563
|
-
Object.setPrototypeOf(
|
13564
|
-
|
13565
|
-
return
|
13562
|
+
Object.setPrototypeOf(chalk111, Chalk3.prototype);
|
13563
|
+
Object.setPrototypeOf(chalk111.template, chalk111);
|
13564
|
+
chalk111.template.constructor = Chalk3;
|
13565
|
+
return chalk111.template;
|
13566
13566
|
}
|
13567
13567
|
applyOptions(this, options);
|
13568
13568
|
}
|
@@ -13592,9 +13592,9 @@ var require_chalk = __commonJS2({
|
|
13592
13592
|
get() {
|
13593
13593
|
const level = this.level;
|
13594
13594
|
return function() {
|
13595
|
-
const
|
13595
|
+
const open5 = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
|
13596
13596
|
const codes = {
|
13597
|
-
open:
|
13597
|
+
open: open5,
|
13598
13598
|
close: ansiStyles.color.close,
|
13599
13599
|
closeRe: ansiStyles.color.closeRe
|
13600
13600
|
};
|
@@ -13613,9 +13613,9 @@ var require_chalk = __commonJS2({
|
|
13613
13613
|
get() {
|
13614
13614
|
const level = this.level;
|
13615
13615
|
return function() {
|
13616
|
-
const
|
13616
|
+
const open5 = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
|
13617
13617
|
const codes = {
|
13618
|
-
open:
|
13618
|
+
open: open5,
|
13619
13619
|
close: ansiStyles.bgColor.close,
|
13620
13620
|
closeRe: ansiStyles.bgColor.closeRe
|
13621
13621
|
};
|
@@ -13681,7 +13681,7 @@ var require_chalk = __commonJS2({
|
|
13681
13681
|
ansiStyles.dim.open = originalDim;
|
13682
13682
|
return str;
|
13683
13683
|
}
|
13684
|
-
function chalkTag(
|
13684
|
+
function chalkTag(chalk111, strings) {
|
13685
13685
|
if (!Array.isArray(strings)) {
|
13686
13686
|
return [].slice.call(arguments, 1).join(" ");
|
13687
13687
|
}
|
@@ -13691,7 +13691,7 @@ var require_chalk = __commonJS2({
|
|
13691
13691
|
parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
13692
13692
|
parts.push(String(strings.raw[i]));
|
13693
13693
|
}
|
13694
|
-
return template(
|
13694
|
+
return template(chalk111, parts.join(""));
|
13695
13695
|
}
|
13696
13696
|
Object.defineProperties(Chalk3.prototype, styles);
|
13697
13697
|
module2.exports = Chalk3();
|
@@ -15488,19 +15488,19 @@ var require_cli_spinners = __commonJS2({
|
|
15488
15488
|
var require_log_symbols = __commonJS2({
|
15489
15489
|
"../../node_modules/.pnpm/log-symbols@2.2.0/node_modules/log-symbols/index.js"(exports2, module2) {
|
15490
15490
|
"use strict";
|
15491
|
-
var
|
15491
|
+
var chalk111 = require_chalk();
|
15492
15492
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
15493
15493
|
var main15 = {
|
15494
|
-
info:
|
15495
|
-
success:
|
15496
|
-
warning:
|
15497
|
-
error:
|
15494
|
+
info: chalk111.blue("\u2139"),
|
15495
|
+
success: chalk111.green("\u2714"),
|
15496
|
+
warning: chalk111.yellow("\u26A0"),
|
15497
|
+
error: chalk111.red("\u2716")
|
15498
15498
|
};
|
15499
15499
|
var fallbacks = {
|
15500
|
-
info:
|
15501
|
-
success:
|
15502
|
-
warning:
|
15503
|
-
error:
|
15500
|
+
info: chalk111.blue("i"),
|
15501
|
+
success: chalk111.green("\u221A"),
|
15502
|
+
warning: chalk111.yellow("\u203C"),
|
15503
|
+
error: chalk111.red("\xD7")
|
15504
15504
|
};
|
15505
15505
|
module2.exports = isSupported ? main15 : fallbacks;
|
15506
15506
|
}
|
@@ -15896,7 +15896,7 @@ var require_wcwidth = __commonJS2({
|
|
15896
15896
|
var require_ora = __commonJS2({
|
15897
15897
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
15898
15898
|
"use strict";
|
15899
|
-
var
|
15899
|
+
var chalk111 = require_chalk();
|
15900
15900
|
var cliCursor = require_cli_cursor();
|
15901
15901
|
var cliSpinners = require_cli_spinners();
|
15902
15902
|
var logSymbols = require_log_symbols();
|
@@ -15985,7 +15985,7 @@ var require_ora = __commonJS2({
|
|
15985
15985
|
const { frames } = this.spinner;
|
15986
15986
|
let frame = frames[this.frameIndex];
|
15987
15987
|
if (this.color) {
|
15988
|
-
frame =
|
15988
|
+
frame = chalk111[this.color](frame);
|
15989
15989
|
}
|
15990
15990
|
this.frameIndex = ++this.frameIndex % frames.length;
|
15991
15991
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
@@ -17743,14 +17743,14 @@ var require_templates3 = __commonJS2({
|
|
17743
17743
|
}
|
17744
17744
|
return results;
|
17745
17745
|
}
|
17746
|
-
function buildStyle(
|
17746
|
+
function buildStyle(chalk111, styles) {
|
17747
17747
|
const enabled = {};
|
17748
17748
|
for (const layer of styles) {
|
17749
17749
|
for (const style of layer.styles) {
|
17750
17750
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
17751
17751
|
}
|
17752
17752
|
}
|
17753
|
-
let current =
|
17753
|
+
let current = chalk111;
|
17754
17754
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
17755
17755
|
if (!Array.isArray(styles2)) {
|
17756
17756
|
continue;
|
@@ -17762,7 +17762,7 @@ var require_templates3 = __commonJS2({
|
|
17762
17762
|
}
|
17763
17763
|
return current;
|
17764
17764
|
}
|
17765
|
-
module2.exports = (
|
17765
|
+
module2.exports = (chalk111, temporary) => {
|
17766
17766
|
const styles = [];
|
17767
17767
|
const chunks = [];
|
17768
17768
|
let chunk = [];
|
@@ -17772,13 +17772,13 @@ var require_templates3 = __commonJS2({
|
|
17772
17772
|
} else if (style) {
|
17773
17773
|
const string = chunk.join("");
|
17774
17774
|
chunk = [];
|
17775
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
17775
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk111, styles)(string));
|
17776
17776
|
styles.push({ inverse, styles: parseStyle(style) });
|
17777
17777
|
} else if (close2) {
|
17778
17778
|
if (styles.length === 0) {
|
17779
17779
|
throw new Error("Found extraneous } in Chalk template literal");
|
17780
17780
|
}
|
17781
|
-
chunks.push(buildStyle(
|
17781
|
+
chunks.push(buildStyle(chalk111, styles)(chunk.join("")));
|
17782
17782
|
chunk = [];
|
17783
17783
|
styles.pop();
|
17784
17784
|
} else {
|
@@ -17826,16 +17826,16 @@ var require_source2 = __commonJS2({
|
|
17826
17826
|
}
|
17827
17827
|
};
|
17828
17828
|
var chalkFactory = (options) => {
|
17829
|
-
const
|
17830
|
-
applyOptions(
|
17831
|
-
|
17832
|
-
Object.setPrototypeOf(
|
17833
|
-
Object.setPrototypeOf(
|
17834
|
-
|
17829
|
+
const chalk112 = {};
|
17830
|
+
applyOptions(chalk112, options);
|
17831
|
+
chalk112.template = (...arguments_) => chalkTag(chalk112.template, ...arguments_);
|
17832
|
+
Object.setPrototypeOf(chalk112, Chalk3.prototype);
|
17833
|
+
Object.setPrototypeOf(chalk112.template, chalk112);
|
17834
|
+
chalk112.template.constructor = () => {
|
17835
17835
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
17836
17836
|
};
|
17837
|
-
|
17838
|
-
return
|
17837
|
+
chalk112.template.Instance = ChalkClass;
|
17838
|
+
return chalk112.template;
|
17839
17839
|
};
|
17840
17840
|
function Chalk3(options) {
|
17841
17841
|
return chalkFactory(options);
|
@@ -17893,18 +17893,18 @@ var require_source2 = __commonJS2({
|
|
17893
17893
|
}
|
17894
17894
|
}
|
17895
17895
|
});
|
17896
|
-
var createStyler = (
|
17896
|
+
var createStyler = (open5, close2, parent) => {
|
17897
17897
|
let openAll;
|
17898
17898
|
let closeAll;
|
17899
17899
|
if (parent === void 0) {
|
17900
|
-
openAll =
|
17900
|
+
openAll = open5;
|
17901
17901
|
closeAll = close2;
|
17902
17902
|
} else {
|
17903
|
-
openAll = parent.openAll +
|
17903
|
+
openAll = parent.openAll + open5;
|
17904
17904
|
closeAll = close2 + parent.closeAll;
|
17905
17905
|
}
|
17906
17906
|
return {
|
17907
|
-
open:
|
17907
|
+
open: open5,
|
17908
17908
|
close: close2,
|
17909
17909
|
openAll,
|
17910
17910
|
closeAll,
|
@@ -17946,7 +17946,7 @@ var require_source2 = __commonJS2({
|
|
17946
17946
|
return openAll + string + closeAll;
|
17947
17947
|
};
|
17948
17948
|
var template;
|
17949
|
-
var chalkTag = (
|
17949
|
+
var chalkTag = (chalk112, ...strings) => {
|
17950
17950
|
const [firstString] = strings;
|
17951
17951
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
17952
17952
|
return strings.join(" ");
|
@@ -17962,14 +17962,14 @@ var require_source2 = __commonJS2({
|
|
17962
17962
|
if (template === void 0) {
|
17963
17963
|
template = require_templates3();
|
17964
17964
|
}
|
17965
|
-
return template(
|
17965
|
+
return template(chalk112, parts.join(""));
|
17966
17966
|
};
|
17967
17967
|
Object.defineProperties(Chalk3.prototype, styles);
|
17968
|
-
var
|
17969
|
-
|
17970
|
-
|
17971
|
-
|
17972
|
-
module2.exports =
|
17968
|
+
var chalk111 = Chalk3();
|
17969
|
+
chalk111.supportsColor = stdoutColor;
|
17970
|
+
chalk111.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
17971
|
+
chalk111.stderr.supportsColor = stderrColor;
|
17972
|
+
module2.exports = chalk111;
|
17973
17973
|
}
|
17974
17974
|
});
|
17975
17975
|
|
@@ -24890,7 +24890,7 @@ var require_open = __commonJS2({
|
|
24890
24890
|
subprocess.unref();
|
24891
24891
|
return subprocess;
|
24892
24892
|
};
|
24893
|
-
var
|
24893
|
+
var open5 = (target, options) => {
|
24894
24894
|
if (typeof target !== "string") {
|
24895
24895
|
throw new TypeError("Expected a `target`");
|
24896
24896
|
}
|
@@ -24959,9 +24959,9 @@ var require_open = __commonJS2({
|
|
24959
24959
|
}, {
|
24960
24960
|
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
24961
24961
|
}));
|
24962
|
-
|
24963
|
-
|
24964
|
-
module2.exports =
|
24962
|
+
open5.apps = apps;
|
24963
|
+
open5.openApp = openApp;
|
24964
|
+
module2.exports = open5;
|
24965
24965
|
}
|
24966
24966
|
});
|
24967
24967
|
|
@@ -26428,7 +26428,7 @@ var require_graceful_fs2 = __commonJS2({
|
|
26428
26428
|
}
|
26429
26429
|
function ReadStream$open() {
|
26430
26430
|
var that = this;
|
26431
|
-
|
26431
|
+
open5(that.path, that.flags, that.mode, function(err, fd) {
|
26432
26432
|
if (err) {
|
26433
26433
|
if (that.autoClose)
|
26434
26434
|
that.destroy();
|
@@ -26448,7 +26448,7 @@ var require_graceful_fs2 = __commonJS2({
|
|
26448
26448
|
}
|
26449
26449
|
function WriteStream$open() {
|
26450
26450
|
var that = this;
|
26451
|
-
|
26451
|
+
open5(that.path, that.flags, that.mode, function(err, fd) {
|
26452
26452
|
if (err) {
|
26453
26453
|
that.destroy();
|
26454
26454
|
that.emit("error", err);
|
@@ -26465,8 +26465,8 @@ var require_graceful_fs2 = __commonJS2({
|
|
26465
26465
|
return new fs16.WriteStream(path11, options);
|
26466
26466
|
}
|
26467
26467
|
var fs$open = fs16.open;
|
26468
|
-
fs16.open =
|
26469
|
-
function
|
26468
|
+
fs16.open = open5;
|
26469
|
+
function open5(path11, flags, mode, cb) {
|
26470
26470
|
if (typeof mode === "function")
|
26471
26471
|
cb = mode, mode = null;
|
26472
26472
|
return go$open(path11, flags, mode, cb);
|
@@ -30857,7 +30857,7 @@ var require_package = __commonJS2({
|
|
30857
30857
|
"../client/package.json"(exports2, module2) {
|
30858
30858
|
module2.exports = {
|
30859
30859
|
name: "@vercel/client",
|
30860
|
-
version: "13.4.
|
30860
|
+
version: "13.4.13",
|
30861
30861
|
main: "dist/index.js",
|
30862
30862
|
typings: "dist/index.d.ts",
|
30863
30863
|
homepage: "https://vercel.com",
|
@@ -30894,7 +30894,7 @@ var require_package = __commonJS2({
|
|
30894
30894
|
typescript: "4.9.5"
|
30895
30895
|
},
|
30896
30896
|
dependencies: {
|
30897
|
-
"@vercel/build-utils": "8.4.
|
30897
|
+
"@vercel/build-utils": "8.4.9",
|
30898
30898
|
"@vercel/error-utils": "2.0.2",
|
30899
30899
|
"@vercel/routing-utils": "3.1.0",
|
30900
30900
|
"async-retry": "1.2.3",
|
@@ -93035,8 +93035,8 @@ var require_dist28 = __commonJS2({
|
|
93035
93035
|
result.push(path11);
|
93036
93036
|
path11 = "";
|
93037
93037
|
}
|
93038
|
-
var
|
93039
|
-
if (
|
93038
|
+
var open5 = tryConsume("OPEN");
|
93039
|
+
if (open5) {
|
93040
93040
|
var prefix = consumeText();
|
93041
93041
|
var name_1 = tryConsume("NAME") || "";
|
93042
93042
|
var pattern_1 = tryConsume("PATTERN") || "";
|
@@ -116830,7 +116830,7 @@ var require_yauzl = __commonJS2({
|
|
116830
116830
|
var Transform = require("stream").Transform;
|
116831
116831
|
var PassThrough = require("stream").PassThrough;
|
116832
116832
|
var Writable = require("stream").Writable;
|
116833
|
-
exports2.open =
|
116833
|
+
exports2.open = open5;
|
116834
116834
|
exports2.fromFd = fromFd;
|
116835
116835
|
exports2.fromBuffer = fromBuffer;
|
116836
116836
|
exports2.fromRandomAccessReader = fromRandomAccessReader;
|
@@ -116839,7 +116839,7 @@ var require_yauzl = __commonJS2({
|
|
116839
116839
|
exports2.ZipFile = ZipFile2;
|
116840
116840
|
exports2.Entry = Entry2;
|
116841
116841
|
exports2.RandomAccessReader = RandomAccessReader;
|
116842
|
-
function
|
116842
|
+
function open5(path11, options, callback) {
|
116843
116843
|
if (typeof options === "function") {
|
116844
116844
|
callback = options;
|
116845
116845
|
options = null;
|
@@ -121503,9 +121503,6 @@ async function main3(client2) {
|
|
121503
121503
|
return rm_default(client2, parsedArgs.flags, args2);
|
121504
121504
|
case "add":
|
121505
121505
|
return add_default(client2, parsedArgs.flags, args2);
|
121506
|
-
case "renew":
|
121507
|
-
output2.error("Renewing certificates is deprecated, issue a new one.");
|
121508
|
-
return 1;
|
121509
121506
|
default:
|
121510
121507
|
output2.error("Please specify a valid subcommand: ls | issue | rm");
|
121511
121508
|
client2.output.print(
|
@@ -121532,7 +121529,6 @@ var init_certs = __esm({
|
|
121532
121529
|
add: ["add"],
|
121533
121530
|
issue: ["issue"],
|
121534
121531
|
ls: ["ls", "list"],
|
121535
|
-
renew: ["renew"],
|
121536
121532
|
rm: ["rm", "remove"]
|
121537
121533
|
};
|
121538
121534
|
}
|
@@ -146823,6 +146819,18 @@ async function fetchIntegration(client2, slug) {
|
|
146823
146819
|
}
|
146824
146820
|
);
|
146825
146821
|
}
|
146822
|
+
async function fetchMarketplaceIntegrations(client2, slug) {
|
146823
|
+
const searchParams = new URLSearchParams();
|
146824
|
+
searchParams.set("view", "account");
|
146825
|
+
searchParams.set("installationType", "marketplace");
|
146826
|
+
searchParams.set("integrationIdOrSlug", slug);
|
146827
|
+
return await client2.fetch(
|
146828
|
+
`/v1/integrations/configurations?${searchParams}`,
|
146829
|
+
{
|
146830
|
+
json: true
|
146831
|
+
}
|
146832
|
+
);
|
146833
|
+
}
|
146826
146834
|
async function fetchInstallations(client2, integration) {
|
146827
146835
|
return client2.fetch(
|
146828
146836
|
`/v1/integrations/integration/${integration.id}/installed?source=marketplace`,
|
@@ -147293,6 +147301,18 @@ var init_command16 = __esm({
|
|
147293
147301
|
],
|
147294
147302
|
options: [],
|
147295
147303
|
examples: []
|
147304
|
+
},
|
147305
|
+
{
|
147306
|
+
name: "open",
|
147307
|
+
description: "Opens a marketplace integration's dashboard",
|
147308
|
+
arguments: [
|
147309
|
+
{
|
147310
|
+
name: "name",
|
147311
|
+
required: true
|
147312
|
+
}
|
147313
|
+
],
|
147314
|
+
options: [],
|
147315
|
+
examples: []
|
147296
147316
|
}
|
147297
147317
|
],
|
147298
147318
|
examples: [
|
@@ -147302,12 +147322,77 @@ var init_command16 = __esm({
|
|
147302
147322
|
`${packageName} integration add <integration-name>`,
|
147303
147323
|
`${packageName} integration add acme`
|
147304
147324
|
]
|
147325
|
+
},
|
147326
|
+
{
|
147327
|
+
name: "Open a marketplace integration's dashboard",
|
147328
|
+
value: [
|
147329
|
+
`${packageName} integration open <integration-name>`,
|
147330
|
+
`${packageName} integration open acme`
|
147331
|
+
]
|
147305
147332
|
}
|
147306
147333
|
]
|
147307
147334
|
};
|
147308
147335
|
}
|
147309
147336
|
});
|
147310
147337
|
|
147338
|
+
// src/commands/integration/open-integration.ts
|
147339
|
+
async function openIntegration(client2, args2) {
|
147340
|
+
if (args2.length > 1) {
|
147341
|
+
client2.output.error("Cannot open more than one dashboard at a time");
|
147342
|
+
return 1;
|
147343
|
+
}
|
147344
|
+
const integrationSlug = args2[0];
|
147345
|
+
if (!integrationSlug) {
|
147346
|
+
client2.output.error("You must pass an integration slug");
|
147347
|
+
return 1;
|
147348
|
+
}
|
147349
|
+
const { team } = await getScope(client2);
|
147350
|
+
if (!team) {
|
147351
|
+
client2.output.error("Team not found");
|
147352
|
+
return 1;
|
147353
|
+
}
|
147354
|
+
let configuration;
|
147355
|
+
try {
|
147356
|
+
configuration = await getFirstConfiguration(client2, integrationSlug);
|
147357
|
+
} catch (error3) {
|
147358
|
+
client2.output.error(
|
147359
|
+
`Failed to fetch configuration for ${import_chalk92.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
|
147360
|
+
);
|
147361
|
+
return 1;
|
147362
|
+
}
|
147363
|
+
if (!configuration) {
|
147364
|
+
client2.output.error(
|
147365
|
+
`No configuration found for ${import_chalk92.default.bold(`"${integrationSlug}"`)}.`
|
147366
|
+
);
|
147367
|
+
return 1;
|
147368
|
+
}
|
147369
|
+
client2.output.print(
|
147370
|
+
`Opening the ${import_chalk92.default.bold(integrationSlug)} dashboard...`
|
147371
|
+
);
|
147372
|
+
const url3 = new URL("/api/marketplace/sso", "https://vercel.com");
|
147373
|
+
url3.searchParams.set("teamId", team.id);
|
147374
|
+
url3.searchParams.set("integrationConfigurationId", configuration.id);
|
147375
|
+
(0, import_open4.default)(url3.href);
|
147376
|
+
return 0;
|
147377
|
+
}
|
147378
|
+
async function getFirstConfiguration(client2, integrationSlug) {
|
147379
|
+
const configurations = await fetchMarketplaceIntegrations(
|
147380
|
+
client2,
|
147381
|
+
integrationSlug
|
147382
|
+
);
|
147383
|
+
return configurations.length > 0 ? configurations[0] : void 0;
|
147384
|
+
}
|
147385
|
+
var import_chalk92, import_open4;
|
147386
|
+
var init_open_integration = __esm({
|
147387
|
+
"src/commands/integration/open-integration.ts"() {
|
147388
|
+
"use strict";
|
147389
|
+
import_chalk92 = __toESM3(require_source());
|
147390
|
+
import_open4 = __toESM3(require_open());
|
147391
|
+
init_get_scope();
|
147392
|
+
init_client2();
|
147393
|
+
}
|
147394
|
+
});
|
147395
|
+
|
147311
147396
|
// src/commands/integration/index.ts
|
147312
147397
|
var integration_exports = {};
|
147313
147398
|
__export3(integration_exports, {
|
@@ -147329,6 +147414,9 @@ async function main9(client2) {
|
|
147329
147414
|
case "add": {
|
147330
147415
|
return add6(client2, subArgs);
|
147331
147416
|
}
|
147417
|
+
case "open": {
|
147418
|
+
return openIntegration(client2, subArgs);
|
147419
|
+
}
|
147332
147420
|
default: {
|
147333
147421
|
client2.output.error(getInvalidSubcommand(COMMAND_CONFIG9));
|
147334
147422
|
return 2;
|
@@ -147345,8 +147433,10 @@ var init_integration = __esm({
|
|
147345
147433
|
init_help();
|
147346
147434
|
init_add5();
|
147347
147435
|
init_command16();
|
147436
|
+
init_open_integration();
|
147348
147437
|
COMMAND_CONFIG9 = {
|
147349
|
-
add: ["add"]
|
147438
|
+
add: ["add"],
|
147439
|
+
open: ["open"]
|
147350
147440
|
};
|
147351
147441
|
}
|
147352
147442
|
});
|
@@ -147683,7 +147773,7 @@ async function list2(client2) {
|
|
147683
147773
|
}
|
147684
147774
|
const projectSlugLink = formatProject(client2, contextName, project.name);
|
147685
147775
|
if (!singleDeployment) {
|
147686
|
-
spinner(`Fetching deployments in ${
|
147776
|
+
spinner(`Fetching deployments in ${import_chalk93.default.bold(contextName)}`);
|
147687
147777
|
const start = Date.now();
|
147688
147778
|
debug3("Fetching deployments");
|
147689
147779
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
@@ -147723,7 +147813,7 @@ async function list2(client2) {
|
|
147723
147813
|
const urls = [];
|
147724
147814
|
const tablePrint = table(
|
147725
147815
|
[
|
147726
|
-
headers.map((header) =>
|
147816
|
+
headers.map((header) => import_chalk93.default.bold(import_chalk93.default.cyan(header))),
|
147727
147817
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
147728
147818
|
urls.push(`https://${dep.url}`);
|
147729
147819
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
@@ -147733,16 +147823,16 @@ async function list2(client2) {
|
|
147733
147823
|
const targetName = dep.customEnvironment?.name || (dep.target === "production" ? "Production" : "Preview");
|
147734
147824
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
147735
147825
|
return [
|
147736
|
-
|
147826
|
+
import_chalk93.default.gray(createdAt),
|
147737
147827
|
`https://${dep.url}`,
|
147738
147828
|
stateString2(dep.readyState || ""),
|
147739
147829
|
formatEnvironment(client2, contextName, project.name, {
|
147740
147830
|
id: targetSlug,
|
147741
147831
|
name: targetName
|
147742
147832
|
}),
|
147743
|
-
...!showPolicy ? [
|
147744
|
-
...!showPolicy ? [
|
147745
|
-
...showPolicy ? [
|
147833
|
+
...!showPolicy ? [import_chalk93.default.gray(getDeploymentDuration(dep))] : [],
|
147834
|
+
...!showPolicy ? [import_chalk93.default.gray(dep.creator?.username)] : [],
|
147835
|
+
...showPolicy ? [import_chalk93.default.gray(proposedExp)] : []
|
147746
147836
|
];
|
147747
147837
|
}).filter(
|
147748
147838
|
(app2) => (
|
@@ -147789,17 +147879,17 @@ function stateString2(s) {
|
|
147789
147879
|
case "BUILDING":
|
147790
147880
|
case "DEPLOYING":
|
147791
147881
|
case "ANALYZING":
|
147792
|
-
return
|
147882
|
+
return import_chalk93.default.yellow(CIRCLE) + sTitle;
|
147793
147883
|
case "ERROR":
|
147794
|
-
return
|
147884
|
+
return import_chalk93.default.red(CIRCLE) + sTitle;
|
147795
147885
|
case "READY":
|
147796
|
-
return
|
147886
|
+
return import_chalk93.default.green(CIRCLE) + sTitle;
|
147797
147887
|
case "QUEUED":
|
147798
|
-
return
|
147888
|
+
return import_chalk93.default.white(CIRCLE) + sTitle;
|
147799
147889
|
case "CANCELED":
|
147800
|
-
return
|
147890
|
+
return import_chalk93.default.gray(sTitle);
|
147801
147891
|
default:
|
147802
|
-
return
|
147892
|
+
return import_chalk93.default.gray("UNKNOWN");
|
147803
147893
|
}
|
147804
147894
|
}
|
147805
147895
|
function sortByCreatedAt(a, b) {
|
@@ -147815,12 +147905,12 @@ function filterUniqueApps() {
|
|
147815
147905
|
return true;
|
147816
147906
|
};
|
147817
147907
|
}
|
147818
|
-
var import_ms19,
|
147908
|
+
var import_ms19, import_chalk93, import_title6, import_error_utils26;
|
147819
147909
|
var init_list2 = __esm({
|
147820
147910
|
"src/commands/list/index.ts"() {
|
147821
147911
|
"use strict";
|
147822
147912
|
import_ms19 = __toESM3(require_ms2());
|
147823
|
-
|
147913
|
+
import_chalk93 = __toESM3(require_source());
|
147824
147914
|
import_title6 = __toESM3(require_lib4());
|
147825
147915
|
init_table();
|
147826
147916
|
init_get_args();
|
@@ -147906,7 +147996,7 @@ async function logs(client2) {
|
|
147906
147996
|
} catch {
|
147907
147997
|
}
|
147908
147998
|
spinner(
|
147909
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
147999
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk94.default.bold(contextName)}`
|
147910
148000
|
);
|
147911
148001
|
let deployment;
|
147912
148002
|
try {
|
@@ -147942,19 +148032,19 @@ function printDisclaimer(deployment, { print, warn }) {
|
|
147942
148032
|
`This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
|
147943
148033
|
);
|
147944
148034
|
print(
|
147945
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
148035
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk94.default.dim(
|
147946
148036
|
deployment.id
|
147947
|
-
)}) starting from ${
|
148037
|
+
)}) starting from ${import_chalk94.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
|
147948
148038
|
|
147949
148039
|
`
|
147950
148040
|
);
|
147951
148041
|
}
|
147952
|
-
var import_error_utils27,
|
148042
|
+
var import_error_utils27, import_chalk94, import_format2, deprecatedFlags, dateTimeFormat2;
|
147953
148043
|
var init_logs2 = __esm({
|
147954
148044
|
"src/commands/logs/index.ts"() {
|
147955
148045
|
"use strict";
|
147956
148046
|
import_error_utils27 = __toESM3(require_dist2());
|
147957
|
-
|
148047
|
+
import_chalk94 = __toESM3(require_source());
|
147958
148048
|
import_format2 = __toESM3(require_format());
|
147959
148049
|
init_build_state();
|
147960
148050
|
init_is_deploying();
|
@@ -148123,7 +148213,7 @@ async function login2(client2) {
|
|
148123
148213
|
writeToConfigFile(output2, client2.config);
|
148124
148214
|
output2.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
148125
148215
|
output2.print(
|
148126
|
-
`${
|
148216
|
+
`${import_chalk95.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
148127
148217
|
`
|
148128
148218
|
);
|
148129
148219
|
output2.print(
|
@@ -148135,12 +148225,12 @@ async function login2(client2) {
|
|
148135
148225
|
);
|
148136
148226
|
return 0;
|
148137
148227
|
}
|
148138
|
-
var import_email_validator,
|
148228
|
+
var import_email_validator, import_chalk95;
|
148139
148229
|
var init_login2 = __esm({
|
148140
148230
|
"src/commands/login/index.ts"() {
|
148141
148231
|
"use strict";
|
148142
148232
|
import_email_validator = __toESM3(require_email_validator());
|
148143
|
-
|
148233
|
+
import_chalk95 = __toESM3(require_source());
|
148144
148234
|
init_humanize_path();
|
148145
148235
|
init_get_args();
|
148146
148236
|
init_prompt();
|
@@ -148265,12 +148355,12 @@ async function add7(client2, args2, contextName) {
|
|
148265
148355
|
const { output: output2 } = client2;
|
148266
148356
|
if (args2.length !== 1) {
|
148267
148357
|
output2.error(
|
148268
|
-
`Invalid number of arguments. Usage: ${
|
148358
|
+
`Invalid number of arguments. Usage: ${import_chalk96.default.cyan(
|
148269
148359
|
`${getCommandName("project add <name>")}`
|
148270
148360
|
)}`
|
148271
148361
|
);
|
148272
148362
|
if (args2.length > 1) {
|
148273
|
-
const example =
|
148363
|
+
const example = import_chalk96.default.cyan(
|
148274
148364
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
148275
148365
|
);
|
148276
148366
|
output2.log(
|
@@ -148296,17 +148386,17 @@ async function add7(client2, args2, contextName) {
|
|
148296
148386
|
}
|
148297
148387
|
const elapsed2 = (0, import_ms20.default)(Date.now() - start);
|
148298
148388
|
output2.log(
|
148299
|
-
`${
|
148389
|
+
`${import_chalk96.default.cyan("Success!")} Project ${import_chalk96.default.bold(
|
148300
148390
|
name.toLowerCase()
|
148301
|
-
)} added (${
|
148391
|
+
)} added (${import_chalk96.default.bold(contextName)}) ${import_chalk96.default.gray(`[${elapsed2}]`)}`
|
148302
148392
|
);
|
148303
148393
|
return;
|
148304
148394
|
}
|
148305
|
-
var
|
148395
|
+
var import_chalk96, import_ms20;
|
148306
148396
|
var init_add6 = __esm({
|
148307
148397
|
"src/commands/project/add.ts"() {
|
148308
148398
|
"use strict";
|
148309
|
-
|
148399
|
+
import_chalk96 = __toESM3(require_source());
|
148310
148400
|
import_ms20 = __toESM3(require_ms2());
|
148311
148401
|
init_errors_ts();
|
148312
148402
|
init_pkg_name();
|
@@ -148319,14 +148409,14 @@ async function list3(client2, argv, args2, contextName) {
|
|
148319
148409
|
const { output: output2 } = client2;
|
148320
148410
|
if (args2.length !== 0) {
|
148321
148411
|
output2.error(
|
148322
|
-
`Invalid number of arguments. Usage: ${
|
148412
|
+
`Invalid number of arguments. Usage: ${import_chalk97.default.cyan(
|
148323
148413
|
`${getCommandName("project ls")}`
|
148324
148414
|
)}`
|
148325
148415
|
);
|
148326
148416
|
return 2;
|
148327
148417
|
}
|
148328
148418
|
const start = Date.now();
|
148329
|
-
output2.spinner(`Fetching projects in ${
|
148419
|
+
output2.spinner(`Fetching projects in ${import_chalk97.default.bold(contextName)}`);
|
148330
148420
|
let projectsUrl = `/v9/projects?limit=20`;
|
148331
148421
|
const deprecated = argv["--update-required"] || false;
|
148332
148422
|
if (deprecated) {
|
@@ -148361,19 +148451,19 @@ async function list3(client2, argv, args2, contextName) {
|
|
148361
148451
|
);
|
148362
148452
|
}
|
148363
148453
|
output2.log(
|
148364
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
148454
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk97.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk97.default.gray(`[${elapsed2}]`)}`
|
148365
148455
|
);
|
148366
148456
|
if (projectList.length > 0) {
|
148367
148457
|
const tablePrint = table(
|
148368
148458
|
[
|
148369
148459
|
["Project Name", "Latest Production URL", "Updated"].map(
|
148370
|
-
(header) =>
|
148460
|
+
(header) => import_chalk97.default.bold(import_chalk97.default.cyan(header))
|
148371
148461
|
),
|
148372
148462
|
...projectList.map((project) => [
|
148373
148463
|
[
|
148374
|
-
|
148464
|
+
import_chalk97.default.bold(project.name),
|
148375
148465
|
getLatestProdUrl(project),
|
148376
|
-
|
148466
|
+
import_chalk97.default.gray((0, import_ms21.default)(Date.now() - project.updatedAt))
|
148377
148467
|
]
|
148378
148468
|
]).flat()
|
148379
148469
|
],
|
@@ -148397,11 +148487,11 @@ function getLatestProdUrl(project) {
|
|
148397
148487
|
return "https://" + alias2;
|
148398
148488
|
return "--";
|
148399
148489
|
}
|
148400
|
-
var
|
148490
|
+
var import_chalk97, import_ms21, import_build_utils17;
|
148401
148491
|
var init_list3 = __esm({
|
148402
148492
|
"src/commands/project/list.ts"() {
|
148403
148493
|
"use strict";
|
148404
|
-
|
148494
|
+
import_chalk97 = __toESM3(require_source());
|
148405
148495
|
import_ms21 = __toESM3(require_ms2());
|
148406
148496
|
init_table();
|
148407
148497
|
init_get_command_flags();
|
@@ -148414,7 +148504,7 @@ var init_list3 = __esm({
|
|
148414
148504
|
async function rm6(client2, args2) {
|
148415
148505
|
if (args2.length !== 1) {
|
148416
148506
|
client2.output.error(
|
148417
|
-
`Invalid number of arguments. Usage: ${
|
148507
|
+
`Invalid number of arguments. Usage: ${import_chalk98.default.cyan(
|
148418
148508
|
`${getCommandName("project rm <name>")}`
|
148419
148509
|
)}`
|
148420
148510
|
);
|
@@ -148443,7 +148533,7 @@ async function rm6(client2, args2) {
|
|
148443
148533
|
}
|
148444
148534
|
const elapsed2 = (0, import_ms22.default)(Date.now() - start);
|
148445
148535
|
client2.output.log(
|
148446
|
-
`${
|
148536
|
+
`${import_chalk98.default.cyan("Success!")} Project ${import_chalk98.default.bold(name)} removed ${import_chalk98.default.gray(
|
148447
148537
|
`[${elapsed2}]`
|
148448
148538
|
)}`
|
148449
148539
|
);
|
@@ -148452,19 +148542,19 @@ async function rm6(client2, args2) {
|
|
148452
148542
|
async function readConfirmation3(client2, projectName) {
|
148453
148543
|
client2.output.print(
|
148454
148544
|
prependEmoji(
|
148455
|
-
`The project ${
|
148545
|
+
`The project ${import_chalk98.default.bold(projectName)} will be removed permanently.
|
148456
148546
|
It will also delete everything under the project including deployments.
|
148457
148547
|
`,
|
148458
148548
|
emoji("warning")
|
148459
148549
|
)
|
148460
148550
|
);
|
148461
|
-
return await confirm(client2, `${
|
148551
|
+
return await confirm(client2, `${import_chalk98.default.bold.red("Are you sure?")}`, false);
|
148462
148552
|
}
|
148463
|
-
var
|
148553
|
+
var import_chalk98, import_ms22, e;
|
148464
148554
|
var init_rm6 = __esm({
|
148465
148555
|
"src/commands/project/rm.ts"() {
|
148466
148556
|
"use strict";
|
148467
|
-
|
148557
|
+
import_chalk98 = __toESM3(require_source());
|
148468
148558
|
import_ms22 = __toESM3(require_ms2());
|
148469
148559
|
init_emoji();
|
148470
148560
|
init_errors_ts();
|
@@ -148673,7 +148763,7 @@ async function getProjectByDeployment({
|
|
148673
148763
|
let team;
|
148674
148764
|
try {
|
148675
148765
|
output2?.spinner(
|
148676
|
-
`Fetching deployment "${deployId}" in ${
|
148766
|
+
`Fetching deployment "${deployId}" in ${import_chalk99.default.bold(contextName)}\u2026`
|
148677
148767
|
);
|
148678
148768
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
148679
148769
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -148690,12 +148780,12 @@ async function getProjectByDeployment({
|
|
148690
148780
|
team = teamResult.value;
|
148691
148781
|
deployment = deploymentResult.value;
|
148692
148782
|
output2?.log(
|
148693
|
-
`Fetching deployment "${deployId}" in ${
|
148783
|
+
`Fetching deployment "${deployId}" in ${import_chalk99.default.bold(contextName)}\u2026`
|
148694
148784
|
);
|
148695
148785
|
if (deployment.team?.id) {
|
148696
148786
|
if (!team || deployment.team.id !== team.id) {
|
148697
148787
|
const err = new Error(
|
148698
|
-
team ? `Deployment doesn't belong to current team ${
|
148788
|
+
team ? `Deployment doesn't belong to current team ${import_chalk99.default.bold(
|
148699
148789
|
contextName
|
148700
148790
|
)}` : `Deployment belongs to a different team`
|
148701
148791
|
);
|
@@ -148704,7 +148794,7 @@ async function getProjectByDeployment({
|
|
148704
148794
|
}
|
148705
148795
|
} else if (team) {
|
148706
148796
|
const err = new Error(
|
148707
|
-
`Deployment doesn't belong to current team ${
|
148797
|
+
`Deployment doesn't belong to current team ${import_chalk99.default.bold(contextName)}`
|
148708
148798
|
);
|
148709
148799
|
err.code = "ERR_INVALID_TEAM";
|
148710
148800
|
throw err;
|
@@ -148725,11 +148815,11 @@ async function getProjectByDeployment({
|
|
148725
148815
|
output2?.stopSpinner();
|
148726
148816
|
}
|
148727
148817
|
}
|
148728
|
-
var
|
148818
|
+
var import_chalk99;
|
148729
148819
|
var init_get_project_by_deployment = __esm({
|
148730
148820
|
"src/util/projects/get-project-by-deployment.ts"() {
|
148731
148821
|
"use strict";
|
148732
|
-
|
148822
|
+
import_chalk99 = __toESM3(require_source());
|
148733
148823
|
init_get_deployment();
|
148734
148824
|
init_get_project_by_id_or_name();
|
148735
148825
|
init_get_scope();
|
@@ -148742,21 +148832,21 @@ var init_get_project_by_deployment = __esm({
|
|
148742
148832
|
// src/util/alias/render-alias-status.ts
|
148743
148833
|
function renderAliasStatus(status2) {
|
148744
148834
|
if (status2 === "completed") {
|
148745
|
-
return
|
148835
|
+
return import_chalk100.default.green(status2);
|
148746
148836
|
}
|
148747
148837
|
if (status2 === "failed") {
|
148748
|
-
return
|
148838
|
+
return import_chalk100.default.red(status2);
|
148749
148839
|
}
|
148750
148840
|
if (status2 === "skipped") {
|
148751
|
-
return
|
148841
|
+
return import_chalk100.default.gray(status2);
|
148752
148842
|
}
|
148753
|
-
return
|
148843
|
+
return import_chalk100.default.yellow(status2);
|
148754
148844
|
}
|
148755
|
-
var
|
148845
|
+
var import_chalk100;
|
148756
148846
|
var init_render_alias_status = __esm({
|
148757
148847
|
"src/util/alias/render-alias-status.ts"() {
|
148758
148848
|
"use strict";
|
148759
|
-
|
148849
|
+
import_chalk100 = __toESM3(require_source());
|
148760
148850
|
}
|
148761
148851
|
});
|
148762
148852
|
|
@@ -148831,7 +148921,7 @@ async function promoteStatus({
|
|
148831
148921
|
}
|
148832
148922
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
148833
148923
|
output2.log(
|
148834
|
-
`The promotion exceeded its deadline - rerun ${
|
148924
|
+
`The promotion exceeded its deadline - rerun ${import_chalk101.default.bold(
|
148835
148925
|
`${packageName} promote ${toDeploymentId}`
|
148836
148926
|
)} to try again`
|
148837
148927
|
);
|
@@ -148897,26 +148987,26 @@ async function renderJobSucceeded({
|
|
148897
148987
|
let deploymentInfo = "";
|
148898
148988
|
try {
|
148899
148989
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
148900
|
-
deploymentInfo = `${
|
148990
|
+
deploymentInfo = `${import_chalk101.default.bold(deployment.url)} (${toDeploymentId})`;
|
148901
148991
|
} catch (err) {
|
148902
148992
|
output2.debug(
|
148903
148993
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
148904
148994
|
);
|
148905
|
-
deploymentInfo =
|
148995
|
+
deploymentInfo = import_chalk101.default.bold(toDeploymentId);
|
148906
148996
|
}
|
148907
148997
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
148908
148998
|
output2.log(
|
148909
|
-
`Success! ${
|
148999
|
+
`Success! ${import_chalk101.default.bold(
|
148910
149000
|
project.name
|
148911
149001
|
)} was promoted to ${deploymentInfo} ${duration}`
|
148912
149002
|
);
|
148913
149003
|
return 0;
|
148914
149004
|
}
|
148915
|
-
var
|
149005
|
+
var import_chalk101, import_ms23;
|
148916
149006
|
var init_status = __esm({
|
148917
149007
|
"src/commands/promote/status.ts"() {
|
148918
149008
|
"use strict";
|
148919
|
-
|
149009
|
+
import_chalk101 = __toESM3(require_source());
|
148920
149010
|
init_elapsed();
|
148921
149011
|
init_format_date();
|
148922
149012
|
init_get_deployment();
|
@@ -148973,7 +149063,7 @@ async function requestPromote({
|
|
148973
149063
|
}
|
148974
149064
|
);
|
148975
149065
|
output2.log(
|
148976
|
-
`Successfully created new deployment of ${
|
149066
|
+
`Successfully created new deployment of ${import_chalk102.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
148977
149067
|
);
|
148978
149068
|
return 0;
|
148979
149069
|
} else {
|
@@ -148986,7 +149076,7 @@ async function requestPromote({
|
|
148986
149076
|
}
|
148987
149077
|
if (timeout !== void 0 && (0, import_ms24.default)(timeout) === 0) {
|
148988
149078
|
output2.log(
|
148989
|
-
`Successfully requested promote of ${
|
149079
|
+
`Successfully requested promote of ${import_chalk102.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
148990
149080
|
);
|
148991
149081
|
output2.log(`To check promote status, run ${getCommandName("promote")}.`);
|
148992
149082
|
return 0;
|
@@ -148999,11 +149089,11 @@ async function requestPromote({
|
|
148999
149089
|
timeout
|
149000
149090
|
});
|
149001
149091
|
}
|
149002
|
-
var
|
149092
|
+
var import_chalk102, import_ms24;
|
149003
149093
|
var init_request_promote = __esm({
|
149004
149094
|
"src/commands/promote/request-promote.ts"() {
|
149005
149095
|
"use strict";
|
149006
|
-
|
149096
|
+
import_chalk102 = __toESM3(require_source());
|
149007
149097
|
init_pkg_name();
|
149008
149098
|
init_get_project_by_deployment();
|
149009
149099
|
import_ms24 = __toESM3(require_ms2());
|
@@ -149165,7 +149255,7 @@ async function getDeploymentByIdOrURL({
|
|
149165
149255
|
let team;
|
149166
149256
|
try {
|
149167
149257
|
output2.spinner(
|
149168
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
149258
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk103.default.bold(contextName)}\u2026`
|
149169
149259
|
);
|
149170
149260
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
149171
149261
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -149182,7 +149272,7 @@ async function getDeploymentByIdOrURL({
|
|
149182
149272
|
team = teamResult.value;
|
149183
149273
|
deployment = deploymentResult.value;
|
149184
149274
|
output2.log(
|
149185
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
149275
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk103.default.bold(contextName)}\u2026`
|
149186
149276
|
);
|
149187
149277
|
} finally {
|
149188
149278
|
output2.stopSpinner();
|
@@ -149190,7 +149280,7 @@ async function getDeploymentByIdOrURL({
|
|
149190
149280
|
if (deployment.team?.id) {
|
149191
149281
|
if (!team || deployment.team.id !== team.id) {
|
149192
149282
|
const err = new Error(
|
149193
|
-
team ? `Deployment doesn't belong to current team ${
|
149283
|
+
team ? `Deployment doesn't belong to current team ${import_chalk103.default.bold(
|
149194
149284
|
contextName
|
149195
149285
|
)}` : `Deployment belongs to a different team`
|
149196
149286
|
);
|
@@ -149199,18 +149289,18 @@ async function getDeploymentByIdOrURL({
|
|
149199
149289
|
}
|
149200
149290
|
} else if (team) {
|
149201
149291
|
const err = new Error(
|
149202
|
-
`Deployment doesn't belong to current team ${
|
149292
|
+
`Deployment doesn't belong to current team ${import_chalk103.default.bold(contextName)}`
|
149203
149293
|
);
|
149204
149294
|
err.code = "ERR_INVALID_TEAM";
|
149205
149295
|
throw err;
|
149206
149296
|
}
|
149207
149297
|
return deployment;
|
149208
149298
|
}
|
149209
|
-
var
|
149299
|
+
var import_chalk103;
|
149210
149300
|
var init_get_deployment_by_id_or_url = __esm({
|
149211
149301
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
149212
149302
|
"use strict";
|
149213
|
-
|
149303
|
+
import_chalk103 = __toESM3(require_source());
|
149214
149304
|
init_get_deployment();
|
149215
149305
|
init_get_team_by_id();
|
149216
149306
|
init_is_valid_name();
|
@@ -149311,14 +149401,14 @@ async function redeploy(client2) {
|
|
149311
149401
|
const previewUrl = `https://${deployment.url}`;
|
149312
149402
|
output2.print(
|
149313
149403
|
`${prependEmoji(
|
149314
|
-
`Inspect: ${
|
149404
|
+
`Inspect: ${import_chalk104.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
149315
149405
|
emoji("inspect")
|
149316
149406
|
)}
|
149317
149407
|
`
|
149318
149408
|
);
|
149319
149409
|
output2.print(
|
149320
149410
|
prependEmoji(
|
149321
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
149411
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk104.default.bold(
|
149322
149412
|
previewUrl
|
149323
149413
|
)} ${deployStamp()}`,
|
149324
149414
|
emoji("success")
|
@@ -149347,7 +149437,7 @@ async function redeploy(client2) {
|
|
149347
149437
|
token: client2.authConfig.token,
|
149348
149438
|
userAgent: ua_default
|
149349
149439
|
};
|
149350
|
-
for await (const event of (0,
|
149440
|
+
for await (const event of (0, import_client14.checkDeploymentStatus)(
|
149351
149441
|
deployment,
|
149352
149442
|
clientOptions
|
149353
149443
|
)) {
|
@@ -149388,18 +149478,18 @@ async function redeploy(client2) {
|
|
149388
149478
|
output2.prettyError(err);
|
149389
149479
|
if ((0, import_error_utils30.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
149390
149480
|
output2.error(
|
149391
|
-
`Use ${
|
149481
|
+
`Use ${import_chalk104.default.bold("vc switch")} to change your current team`
|
149392
149482
|
);
|
149393
149483
|
}
|
149394
149484
|
return 1;
|
149395
149485
|
}
|
149396
149486
|
}
|
149397
|
-
var
|
149487
|
+
var import_chalk104, import_client14, import_error_utils30;
|
149398
149488
|
var init_redeploy = __esm({
|
149399
149489
|
"src/commands/redeploy/index.ts"() {
|
149400
149490
|
"use strict";
|
149401
|
-
|
149402
|
-
|
149491
|
+
import_chalk104 = __toESM3(require_source());
|
149492
|
+
import_client14 = __toESM3(require_dist12());
|
149403
149493
|
init_emoji();
|
149404
149494
|
init_get_args();
|
149405
149495
|
init_pkg_name();
|
@@ -149608,7 +149698,7 @@ async function remove3(client2) {
|
|
149608
149698
|
}
|
149609
149699
|
const { contextName } = await getScope(client2);
|
149610
149700
|
output2.spinner(
|
149611
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
149701
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk105.default.bold(contextName)}`
|
149612
149702
|
);
|
149613
149703
|
let aliases;
|
149614
149704
|
let projects;
|
@@ -149674,12 +149764,12 @@ async function remove3(client2) {
|
|
149674
149764
|
});
|
149675
149765
|
if (deployments.length === 0 && projects.length === 0) {
|
149676
149766
|
log2(
|
149677
|
-
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) =>
|
149767
|
+
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) => import_chalk105.default.bold(`"${id}"`)).join(", ")}. Run ${getCommandName("projects ls")} to list.`
|
149678
149768
|
);
|
149679
149769
|
return 1;
|
149680
149770
|
}
|
149681
149771
|
log2(
|
149682
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
149772
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk105.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
149683
149773
|
);
|
149684
149774
|
if (deployments.length > 200) {
|
149685
149775
|
output2.warn(
|
@@ -149706,11 +149796,11 @@ async function remove3(client2) {
|
|
149706
149796
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
149707
149797
|
);
|
149708
149798
|
deployments.forEach((depl) => {
|
149709
|
-
output2.print(`${
|
149799
|
+
output2.print(`${import_chalk105.default.gray("-")} ${import_chalk105.default.bold(depl.url)}
|
149710
149800
|
`);
|
149711
149801
|
});
|
149712
149802
|
projects.forEach((project) => {
|
149713
|
-
output2.print(`${
|
149803
|
+
output2.print(`${import_chalk105.default.gray("-")} ${import_chalk105.default.bold(project.name)}
|
149714
149804
|
`);
|
149715
149805
|
});
|
149716
149806
|
return 0;
|
@@ -149727,8 +149817,8 @@ function readConfirmation4(deployments, projects, output2) {
|
|
149727
149817
|
);
|
149728
149818
|
const deploymentTable = table(
|
149729
149819
|
deployments.map((depl) => {
|
149730
|
-
const time =
|
149731
|
-
const url3 = depl.url ?
|
149820
|
+
const time = import_chalk105.default.gray(`${(0, import_ms26.default)(Date.now() - depl.createdAt)} ago`);
|
149821
|
+
const url3 = depl.url ? import_chalk105.default.underline(`https://${depl.url}`) : "";
|
149732
149822
|
return [` ${depl.id}`, url3, time];
|
149733
149823
|
}),
|
149734
149824
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -149739,7 +149829,7 @@ function readConfirmation4(deployments, projects, output2) {
|
|
149739
149829
|
for (const depl of deployments) {
|
149740
149830
|
for (const { alias: alias2 } of depl.aliases) {
|
149741
149831
|
output2.warn(
|
149742
|
-
`${
|
149832
|
+
`${import_chalk105.default.underline(`https://${alias2}`)} is an alias for ${import_chalk105.default.bold(depl.url)} and will be removed`
|
149743
149833
|
);
|
149744
149834
|
}
|
149745
149835
|
}
|
@@ -149753,12 +149843,12 @@ function readConfirmation4(deployments, projects, output2) {
|
|
149753
149843
|
`
|
149754
149844
|
);
|
149755
149845
|
for (const project of projects) {
|
149756
|
-
output2.print(`${
|
149846
|
+
output2.print(`${import_chalk105.default.gray("-")} ${import_chalk105.default.bold(project.name)}
|
149757
149847
|
`);
|
149758
149848
|
}
|
149759
149849
|
}
|
149760
149850
|
output2.print(
|
149761
|
-
`${
|
149851
|
+
`${import_chalk105.default.bold.red("> Are you sure?")} ${import_chalk105.default.gray("(y/N) ")}`
|
149762
149852
|
);
|
149763
149853
|
process.stdin.on("data", (d) => {
|
149764
149854
|
process.stdin.pause();
|
@@ -149775,11 +149865,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
149775
149865
|
}
|
149776
149866
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
149777
149867
|
}
|
149778
|
-
var
|
149868
|
+
var import_chalk105, import_ms26, import_pluralize11;
|
149779
149869
|
var init_remove = __esm({
|
149780
149870
|
"src/commands/remove/index.ts"() {
|
149781
149871
|
"use strict";
|
149782
|
-
|
149872
|
+
import_chalk105 = __toESM3(require_source());
|
149783
149873
|
import_ms26 = __toESM3(require_ms2());
|
149784
149874
|
import_pluralize11 = __toESM3(require_pluralize());
|
149785
149875
|
init_table();
|
@@ -149874,7 +149964,7 @@ async function rollbackStatus({
|
|
149874
149964
|
}
|
149875
149965
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
149876
149966
|
output2.log(
|
149877
|
-
`The rollback exceeded its deadline - rerun ${
|
149967
|
+
`The rollback exceeded its deadline - rerun ${import_chalk106.default.bold(
|
149878
149968
|
`${packageName} rollback ${toDeploymentId}`
|
149879
149969
|
)} to try again`
|
149880
149970
|
);
|
@@ -149940,26 +150030,26 @@ async function renderJobSucceeded2({
|
|
149940
150030
|
let deploymentInfo = "";
|
149941
150031
|
try {
|
149942
150032
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
149943
|
-
deploymentInfo = `${
|
150033
|
+
deploymentInfo = `${import_chalk106.default.bold(deployment.url)} (${toDeploymentId})`;
|
149944
150034
|
} catch (err) {
|
149945
150035
|
output2.debug(
|
149946
150036
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
149947
150037
|
);
|
149948
|
-
deploymentInfo =
|
150038
|
+
deploymentInfo = import_chalk106.default.bold(toDeploymentId);
|
149949
150039
|
}
|
149950
150040
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
149951
150041
|
output2.log(
|
149952
|
-
`Success! ${
|
150042
|
+
`Success! ${import_chalk106.default.bold(
|
149953
150043
|
project.name
|
149954
150044
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
149955
150045
|
);
|
149956
150046
|
return 0;
|
149957
150047
|
}
|
149958
|
-
var
|
150048
|
+
var import_chalk106, import_ms27;
|
149959
150049
|
var init_status2 = __esm({
|
149960
150050
|
"src/commands/rollback/status.ts"() {
|
149961
150051
|
"use strict";
|
149962
|
-
|
150052
|
+
import_chalk106 = __toESM3(require_source());
|
149963
150053
|
init_elapsed();
|
149964
150054
|
init_format_date();
|
149965
150055
|
init_get_deployment();
|
@@ -149992,7 +150082,7 @@ async function requestRollback({
|
|
149992
150082
|
});
|
149993
150083
|
if (timeout !== void 0 && (0, import_ms28.default)(timeout) === 0) {
|
149994
150084
|
output2.log(
|
149995
|
-
`Successfully requested rollback of ${
|
150085
|
+
`Successfully requested rollback of ${import_chalk107.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
149996
150086
|
);
|
149997
150087
|
output2.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
149998
150088
|
return 0;
|
@@ -150005,11 +150095,11 @@ async function requestRollback({
|
|
150005
150095
|
timeout
|
150006
150096
|
});
|
150007
150097
|
}
|
150008
|
-
var
|
150098
|
+
var import_chalk107, import_ms28;
|
150009
150099
|
var init_request_rollback = __esm({
|
150010
150100
|
"src/commands/rollback/request-rollback.ts"() {
|
150011
150101
|
"use strict";
|
150012
|
-
|
150102
|
+
import_chalk107 = __toESM3(require_source());
|
150013
150103
|
init_pkg_name();
|
150014
150104
|
init_get_project_by_deployment();
|
150015
150105
|
import_ms28 = __toESM3(require_ms2());
|
@@ -150157,7 +150247,7 @@ async function list4(client2, argv, args2, link4) {
|
|
150157
150247
|
const { output: output2 } = client2;
|
150158
150248
|
if (args2.length !== 0) {
|
150159
150249
|
output2.error(
|
150160
|
-
`Invalid number of arguments. Usage: ${
|
150250
|
+
`Invalid number of arguments. Usage: ${import_chalk108.default.cyan(
|
150161
150251
|
`${getCommandName("target ls")}`
|
150162
150252
|
)}`
|
150163
150253
|
);
|
@@ -150181,12 +150271,12 @@ async function list4(client2, argv, args2, link4) {
|
|
150181
150271
|
const elapsed2 = (0, import_ms30.default)(Date.now() - start);
|
150182
150272
|
result = withDefaultEnvironmentsIncluded(result);
|
150183
150273
|
output2.log(
|
150184
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
150274
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk108.default.gray(`[${elapsed2}]`)}`
|
150185
150275
|
);
|
150186
150276
|
const tablePrint = table(
|
150187
150277
|
[
|
150188
150278
|
["Target Name", "Target Slug", "Target ID", "Type", "Updated"].map(
|
150189
|
-
(header) =>
|
150279
|
+
(header) => import_chalk108.default.bold(import_chalk108.default.cyan(header))
|
150190
150280
|
),
|
150191
150281
|
...result.map((target) => {
|
150192
150282
|
const type = target.type === "production" ? "Production" : target.type === "development" ? "Development" : "Preview";
|
@@ -150201,7 +150291,7 @@ async function list4(client2, argv, args2, link4) {
|
|
150201
150291
|
target.slug,
|
150202
150292
|
target.id,
|
150203
150293
|
type,
|
150204
|
-
|
150294
|
+
import_chalk108.default.gray(
|
150205
150295
|
target.updatedAt > 0 ? (0, import_ms30.default)(Date.now() - target.updatedAt) : "-"
|
150206
150296
|
)
|
150207
150297
|
]
|
@@ -150251,12 +150341,12 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
150251
150341
|
}
|
150252
150342
|
];
|
150253
150343
|
}
|
150254
|
-
var import_ms30,
|
150344
|
+
var import_ms30, import_chalk108;
|
150255
150345
|
var init_list4 = __esm({
|
150256
150346
|
"src/commands/target/list.ts"() {
|
150257
150347
|
"use strict";
|
150258
150348
|
import_ms30 = __toESM3(require_ms2());
|
150259
|
-
|
150349
|
+
import_chalk108 = __toESM3(require_source());
|
150260
150350
|
init_table();
|
150261
150351
|
init_pkg_name();
|
150262
150352
|
init_format_project();
|
@@ -150502,7 +150592,7 @@ async function list5(client2) {
|
|
150502
150592
|
client2.stdout.write("\n");
|
150503
150593
|
const teamTable = table(
|
150504
150594
|
[
|
150505
|
-
["id", "email / name"].map((str) => (0,
|
150595
|
+
["id", "email / name"].map((str) => (0, import_chalk109.gray)(str)),
|
150506
150596
|
...teamList.map((team) => [team.value, team.name])
|
150507
150597
|
],
|
150508
150598
|
{ hsep: 5 }
|
@@ -150519,13 +150609,13 @@ async function list5(client2) {
|
|
150519
150609
|
}
|
150520
150610
|
return 0;
|
150521
150611
|
}
|
150522
|
-
var
|
150612
|
+
var import_chalk109;
|
150523
150613
|
var init_list5 = __esm({
|
150524
150614
|
"src/commands/teams/list.ts"() {
|
150525
150615
|
"use strict";
|
150526
150616
|
init_chars();
|
150527
150617
|
init_table();
|
150528
|
-
|
150618
|
+
import_chalk109 = __toESM3(require_source());
|
150529
150619
|
init_get_user();
|
150530
150620
|
init_get_teams();
|
150531
150621
|
init_pkg_name();
|
@@ -150585,7 +150675,7 @@ Please select a team scope using ${getCommandName(
|
|
150585
150675
|
return 1;
|
150586
150676
|
}
|
150587
150677
|
output2.log(
|
150588
|
-
introMsg || `Inviting team members to ${
|
150678
|
+
introMsg || `Inviting team members to ${import_chalk110.default.bold(currentTeam.name)}`
|
150589
150679
|
);
|
150590
150680
|
if (emails.length > 0) {
|
150591
150681
|
for (const email3 of emails) {
|
@@ -150604,10 +150694,10 @@ Please select a team scope using ${getCommandName(
|
|
150604
150694
|
throw err;
|
150605
150695
|
}
|
150606
150696
|
output2.log(
|
150607
|
-
`${
|
150697
|
+
`${import_chalk110.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
150608
150698
|
);
|
150609
150699
|
} else {
|
150610
|
-
output2.log(`${
|
150700
|
+
output2.log(`${import_chalk110.default.red(`\u2716 ${email3}`)} ${import_chalk110.default.gray("[invalid]")}`);
|
150611
150701
|
}
|
150612
150702
|
}
|
150613
150703
|
return 0;
|
@@ -150640,15 +150730,15 @@ Please select a team scope using ${getCommandName(
|
|
150640
150730
|
);
|
150641
150731
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
150642
150732
|
emails.push(email2);
|
150643
|
-
output2.log(`${
|
150733
|
+
output2.log(`${import_chalk110.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
150644
150734
|
if (hasError) {
|
150645
150735
|
hasError = false;
|
150646
150736
|
process.stderr.write(eraseLines(emails.length + 2));
|
150647
150737
|
output2.log(
|
150648
|
-
introMsg || `Inviting team members to ${
|
150738
|
+
introMsg || `Inviting team members to ${import_chalk110.default.bold(currentTeam.name)}`
|
150649
150739
|
);
|
150650
150740
|
for (const email3 of emails) {
|
150651
|
-
output2.log(`${
|
150741
|
+
output2.log(`${import_chalk110.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
150652
150742
|
}
|
150653
150743
|
}
|
150654
150744
|
} catch (err) {
|
@@ -150657,7 +150747,7 @@ Please select a team scope using ${getCommandName(
|
|
150657
150747
|
output2.error((0, import_error_utils32.errorToString)(err));
|
150658
150748
|
hasError = true;
|
150659
150749
|
for (const email3 of emails) {
|
150660
|
-
output2.log(`${
|
150750
|
+
output2.log(`${import_chalk110.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
150661
150751
|
}
|
150662
150752
|
}
|
150663
150753
|
}
|
@@ -150670,16 +150760,16 @@ Please select a team scope using ${getCommandName(
|
|
150670
150760
|
} else {
|
150671
150761
|
output2.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
150672
150762
|
for (const email3 of emails) {
|
150673
|
-
output2.log(`${
|
150763
|
+
output2.log(`${import_chalk110.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
150674
150764
|
}
|
150675
150765
|
}
|
150676
150766
|
return 0;
|
150677
150767
|
}
|
150678
|
-
var
|
150768
|
+
var import_chalk110, import_error_utils32, validateEmail2, domains;
|
150679
150769
|
var init_invite = __esm({
|
150680
150770
|
"src/commands/teams/invite.ts"() {
|
150681
150771
|
"use strict";
|
150682
|
-
|
150772
|
+
import_chalk110 = __toESM3(require_source());
|
150683
150773
|
init_cmd();
|
150684
150774
|
init_stamp();
|
150685
150775
|
init_param();
|
@@ -150750,7 +150840,7 @@ async function add8(client2) {
|
|
150750
150840
|
let elapsed2;
|
150751
150841
|
const { output: output2 } = client2;
|
150752
150842
|
output2.log(
|
150753
|
-
`Pick a team identifier for its URL (e.g.: ${
|
150843
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk111.default.cyan(
|
150754
150844
|
"`vercel.com/acme`"
|
150755
150845
|
)})`
|
150756
150846
|
);
|
@@ -150781,7 +150871,7 @@ async function add8(client2) {
|
|
150781
150871
|
output2.stopSpinner();
|
150782
150872
|
process.stdout.write(eraseLines(2));
|
150783
150873
|
output2.success(`Team created ${elapsed2()}`);
|
150784
|
-
output2.log(`${
|
150874
|
+
output2.log(`${import_chalk111.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
150785
150875
|
`);
|
150786
150876
|
output2.log("Pick a display name for your team");
|
150787
150877
|
let name;
|
@@ -150804,7 +150894,7 @@ async function add8(client2) {
|
|
150804
150894
|
process.stdout.write(eraseLines(2));
|
150805
150895
|
team = Object.assign(team, res);
|
150806
150896
|
output2.success(`Team name saved ${elapsed2()}`);
|
150807
|
-
output2.log(`${
|
150897
|
+
output2.log(`${import_chalk111.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
150808
150898
|
`);
|
150809
150899
|
output2.spinner("Saving");
|
150810
150900
|
client2.config.currentTeam = team.id;
|
@@ -150818,11 +150908,11 @@ async function add8(client2) {
|
|
150818
150908
|
});
|
150819
150909
|
return 0;
|
150820
150910
|
}
|
150821
|
-
var
|
150911
|
+
var import_chalk111, import_error_utils33, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
150822
150912
|
var init_add7 = __esm({
|
150823
150913
|
"src/commands/teams/add.ts"() {
|
150824
150914
|
"use strict";
|
150825
|
-
|
150915
|
+
import_chalk111 = __toESM3(require_source());
|
150826
150916
|
init_stamp();
|
150827
150917
|
init_erase_lines();
|
150828
150918
|
init_chars();
|
@@ -150834,7 +150924,7 @@ var init_add7 = __esm({
|
|
150834
150924
|
import_error_utils33 = __toESM3(require_dist2());
|
150835
150925
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
150836
150926
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
150837
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
150927
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk111.default.gray("vercel.com/");
|
150838
150928
|
teamNamePrefix = "Team Name".padEnd(14);
|
150839
150929
|
}
|
150840
150930
|
});
|
@@ -150857,7 +150947,7 @@ async function main13(client2, desiredSlug) {
|
|
150857
150947
|
let title7 = `${team.name} (${team.slug})`;
|
150858
150948
|
const selected = team.id === currentTeam?.id;
|
150859
150949
|
if (selected) {
|
150860
|
-
title7 += ` ${
|
150950
|
+
title7 += ` ${import_chalk112.default.bold("(current)")}`;
|
150861
150951
|
}
|
150862
150952
|
if (team.limited) {
|
150863
150953
|
title7 += ` ${emoji("locked")}`;
|
@@ -150869,7 +150959,7 @@ async function main13(client2, desiredSlug) {
|
|
150869
150959
|
selected
|
150870
150960
|
};
|
150871
150961
|
});
|
150872
|
-
let suffix = personalScopeSelected ? ` ${
|
150962
|
+
let suffix = personalScopeSelected ? ` ${import_chalk112.default.bold("(current)")}` : "";
|
150873
150963
|
if (user.limited) {
|
150874
150964
|
suffix += ` ${emoji("locked")}`;
|
150875
150965
|
}
|
@@ -150915,14 +151005,14 @@ async function main13(client2, desiredSlug) {
|
|
150915
151005
|
}
|
150916
151006
|
updateCurrentTeam(output2, config2);
|
150917
151007
|
output2.success(
|
150918
|
-
`Your account (${
|
151008
|
+
`Your account (${import_chalk112.default.bold(user.username)}) is now active!`
|
150919
151009
|
);
|
150920
151010
|
return 0;
|
150921
151011
|
}
|
150922
151012
|
const newTeam = teams.find((team) => team.slug === desiredSlug);
|
150923
151013
|
if (!newTeam) {
|
150924
151014
|
output2.error(
|
150925
|
-
`You do not have permission to access scope ${
|
151015
|
+
`You do not have permission to access scope ${import_chalk112.default.bold(desiredSlug)}.`
|
150926
151016
|
);
|
150927
151017
|
return 1;
|
150928
151018
|
}
|
@@ -150940,15 +151030,15 @@ async function main13(client2, desiredSlug) {
|
|
150940
151030
|
}
|
150941
151031
|
updateCurrentTeam(output2, config2, newTeam);
|
150942
151032
|
output2.success(
|
150943
|
-
`The team ${
|
151033
|
+
`The team ${import_chalk112.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
150944
151034
|
);
|
150945
151035
|
return 0;
|
150946
151036
|
}
|
150947
|
-
var
|
151037
|
+
var import_chalk112, updateCurrentTeam;
|
150948
151038
|
var init_switch = __esm({
|
150949
151039
|
"src/commands/teams/switch.ts"() {
|
150950
151040
|
"use strict";
|
150951
|
-
|
151041
|
+
import_chalk112 = __toESM3(require_source());
|
150952
151042
|
init_emoji();
|
150953
151043
|
init_get_user();
|
150954
151044
|
init_get_teams();
|
@@ -151048,10 +151138,10 @@ var init_teams = __esm({
|
|
151048
151138
|
// src/commands/telemetry/status.ts
|
151049
151139
|
async function status(client2) {
|
151050
151140
|
const status2 = client2.config.telemetry?.enabled === false ? "disabled" : "enabled";
|
151051
|
-
const message2 = status2 === "disabled" ?
|
151141
|
+
const message2 = status2 === "disabled" ? import_chalk113.default.red("Disabled") : import_chalk113.default.green("Enabled");
|
151052
151142
|
await client2.output.print(
|
151053
151143
|
`
|
151054
|
-
${
|
151144
|
+
${import_chalk113.default.bold("Telemetry status")}: ${message2}
|
151055
151145
|
|
151056
151146
|
`
|
151057
151147
|
);
|
@@ -151063,11 +151153,11 @@ No data will be collected from your machine${learnMoreMessage}`;
|
|
151063
151153
|
await client2.output.print(optedInorOutMessage);
|
151064
151154
|
return 0;
|
151065
151155
|
}
|
151066
|
-
var
|
151156
|
+
var import_chalk113;
|
151067
151157
|
var init_status3 = __esm({
|
151068
151158
|
"src/commands/telemetry/status.ts"() {
|
151069
151159
|
"use strict";
|
151070
|
-
|
151160
|
+
import_chalk113 = __toESM3(require_source());
|
151071
151161
|
}
|
151072
151162
|
});
|
151073
151163
|
|
@@ -151189,7 +151279,7 @@ async function telemetry(client2) {
|
|
151189
151279
|
default: {
|
151190
151280
|
const errorMessage = parsedArguments.args.length !== 2 ? `Invalid number of arguments` : `Invalid subcommand`;
|
151191
151281
|
client2.output.print(
|
151192
|
-
`${
|
151282
|
+
`${import_chalk114.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
151193
151283
|
`
|
151194
151284
|
);
|
151195
151285
|
client2.output.print(
|
@@ -151199,7 +151289,7 @@ async function telemetry(client2) {
|
|
151199
151289
|
}
|
151200
151290
|
}
|
151201
151291
|
}
|
151202
|
-
var
|
151292
|
+
var import_chalk114, COMMAND_CONFIG12;
|
151203
151293
|
var init_telemetry2 = __esm({
|
151204
151294
|
"src/commands/telemetry/index.ts"() {
|
151205
151295
|
"use strict";
|
@@ -151212,7 +151302,7 @@ var init_telemetry2 = __esm({
|
|
151212
151302
|
init_disable();
|
151213
151303
|
init_command28();
|
151214
151304
|
init_get_flags_specification();
|
151215
|
-
|
151305
|
+
import_chalk114 = __toESM3(require_source());
|
151216
151306
|
COMMAND_CONFIG12 = {
|
151217
151307
|
status: ["status"],
|
151218
151308
|
enable: ["enable"],
|
@@ -151287,7 +151377,7 @@ var import_error_utils34 = __toESM3(require_dist2());
|
|
151287
151377
|
var import_path43 = require("path");
|
151288
151378
|
var import_fs9 = require("fs");
|
151289
151379
|
var import_fs_extra23 = __toESM3(require_lib());
|
151290
|
-
var
|
151380
|
+
var import_chalk115 = __toESM3(require_source());
|
151291
151381
|
var import_epipebomb = __toESM3(require_epipebomb());
|
151292
151382
|
|
151293
151383
|
// src/util/get-latest-version/index.ts
|
@@ -151932,6 +152022,12 @@ var RootTelemetryClient = class extends TelemetryClient {
|
|
151932
152022
|
value: actual
|
151933
152023
|
});
|
151934
152024
|
}
|
152025
|
+
trackCliCommandAlias(actual) {
|
152026
|
+
this.trackCliCommand({
|
152027
|
+
command: "alias",
|
152028
|
+
value: actual
|
152029
|
+
});
|
152030
|
+
}
|
151935
152031
|
trackCPUs() {
|
151936
152032
|
super.trackCPUs();
|
151937
152033
|
}
|
@@ -152501,13 +152597,13 @@ var main14 = async () => {
|
|
152501
152597
|
const betaCommands = [];
|
152502
152598
|
if (betaCommands.includes(targetOrSubcommand)) {
|
152503
152599
|
output.print(
|
152504
|
-
`${
|
152600
|
+
`${import_chalk115.default.grey(
|
152505
152601
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
152506
152602
|
)}
|
152507
152603
|
`
|
152508
152604
|
);
|
152509
152605
|
} else {
|
152510
|
-
output.print(`${
|
152606
|
+
output.print(`${import_chalk115.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
152511
152607
|
`);
|
152512
152608
|
}
|
152513
152609
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
@@ -152794,6 +152890,7 @@ var main14 = async () => {
|
|
152794
152890
|
let func;
|
152795
152891
|
switch (targetCommand2) {
|
152796
152892
|
case "alias":
|
152893
|
+
telemetry2.trackCliCommandAlias(userSuppliedSubCommand);
|
152797
152894
|
func = (init_alias2(), __toCommonJS3(alias_exports)).default;
|
152798
152895
|
break;
|
152799
152896
|
case "bisect":
|
@@ -152982,20 +153079,20 @@ main14().then(async (exitCode2) => {
|
|
152982
153079
|
});
|
152983
153080
|
if (latest) {
|
152984
153081
|
const changelog = "https://github.com/vercel/vercel/releases";
|
152985
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
153082
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk115.default.magenta(
|
152986
153083
|
`
|
152987
153084
|
|
152988
|
-
The latest update ${
|
153085
|
+
The latest update ${import_chalk115.default.italic(
|
152989
153086
|
"may"
|
152990
153087
|
)} fix any errors that occurred.`
|
152991
153088
|
) : "";
|
152992
153089
|
output.print(
|
152993
153090
|
box(
|
152994
|
-
`Update available! ${
|
153091
|
+
`Update available! ${import_chalk115.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk115.default.green(
|
152995
153092
|
`v${latest}`
|
152996
153093
|
)}
|
152997
153094
|
Changelog: ${output.link(changelog, changelog, { fallback: false })}
|
152998
|
-
Run ${
|
153095
|
+
Run ${import_chalk115.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
152999
153096
|
)
|
153000
153097
|
);
|
153001
153098
|
output.print("\n\n");
|