vercel 37.7.1 → 37.9.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 +1047 -465
- package/package.json +10 -10
package/dist/index.js
CHANGED
@@ -4073,14 +4073,14 @@ var require_templates = __commonJS2({
|
|
4073
4073
|
}
|
4074
4074
|
return results;
|
4075
4075
|
}
|
4076
|
-
function buildStyle(
|
4076
|
+
function buildStyle(chalk112, 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 = chalk112;
|
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 = (chalk112, 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(chalk112, 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(chalk112, 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 chalk113 = {};
|
4160
|
+
applyOptions(chalk113, options);
|
4161
|
+
chalk113.template = (...arguments_) => chalkTag(chalk113.template, ...arguments_);
|
4162
|
+
Object.setPrototypeOf(chalk113, Chalk3.prototype);
|
4163
|
+
Object.setPrototypeOf(chalk113.template, chalk113);
|
4164
|
+
chalk113.template.constructor = () => {
|
4165
4165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4166
4166
|
};
|
4167
|
-
|
4168
|
-
return
|
4167
|
+
chalk113.template.Instance = ChalkClass;
|
4168
|
+
return chalk113.template;
|
4169
4169
|
};
|
4170
4170
|
function Chalk3(options) {
|
4171
4171
|
return chalkFactory(options);
|
@@ -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 = (chalk113, ...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(chalk113, parts.join(""));
|
4296
4296
|
};
|
4297
4297
|
Object.defineProperties(Chalk3.prototype, styles);
|
4298
|
-
var
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
module2.exports =
|
4298
|
+
var chalk112 = Chalk3();
|
4299
|
+
chalk112.supportsColor = stdoutColor;
|
4300
|
+
chalk112.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
4301
|
+
chalk112.stderr.supportsColor = stderrColor;
|
4302
|
+
module2.exports = chalk112;
|
4303
4303
|
}
|
4304
4304
|
});
|
4305
4305
|
|
@@ -4755,14 +4755,14 @@ var require_semver = __commonJS2({
|
|
4755
4755
|
return compare(b, a, loose);
|
4756
4756
|
}
|
4757
4757
|
exports2.sort = sort;
|
4758
|
-
function sort(
|
4759
|
-
return
|
4758
|
+
function sort(list7, loose) {
|
4759
|
+
return list7.sort(function(a, b) {
|
4760
4760
|
return exports2.compare(a, b, loose);
|
4761
4761
|
});
|
4762
4762
|
}
|
4763
4763
|
exports2.rsort = rsort;
|
4764
|
-
function rsort(
|
4765
|
-
return
|
4764
|
+
function rsort(list7, loose) {
|
4765
|
+
return list7.sort(function(a, b) {
|
4766
4766
|
return exports2.rcompare(a, b, loose);
|
4767
4767
|
});
|
4768
4768
|
}
|
@@ -13478,14 +13478,14 @@ var require_templates2 = __commonJS2({
|
|
13478
13478
|
}
|
13479
13479
|
return results;
|
13480
13480
|
}
|
13481
|
-
function buildStyle(
|
13481
|
+
function buildStyle(chalk112, 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 = chalk112;
|
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 = (chalk112, 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(chalk112, 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(chalk112, 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 chalk112 = {};
|
13557
|
+
applyOptions(chalk112, options);
|
13558
|
+
chalk112.template = function() {
|
13559
13559
|
const args2 = [].slice.call(arguments);
|
13560
|
-
return chalkTag.apply(null, [
|
13560
|
+
return chalkTag.apply(null, [chalk112.template].concat(args2));
|
13561
13561
|
};
|
13562
|
-
Object.setPrototypeOf(
|
13563
|
-
Object.setPrototypeOf(
|
13564
|
-
|
13565
|
-
return
|
13562
|
+
Object.setPrototypeOf(chalk112, Chalk3.prototype);
|
13563
|
+
Object.setPrototypeOf(chalk112.template, chalk112);
|
13564
|
+
chalk112.template.constructor = Chalk3;
|
13565
|
+
return chalk112.template;
|
13566
13566
|
}
|
13567
13567
|
applyOptions(this, options);
|
13568
13568
|
}
|
@@ -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(chalk112, 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(chalk112, 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 chalk112 = 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: chalk112.blue("\u2139"),
|
15495
|
+
success: chalk112.green("\u2714"),
|
15496
|
+
warning: chalk112.yellow("\u26A0"),
|
15497
|
+
error: chalk112.red("\u2716")
|
15498
15498
|
};
|
15499
15499
|
var fallbacks = {
|
15500
|
-
info:
|
15501
|
-
success:
|
15502
|
-
warning:
|
15503
|
-
error:
|
15500
|
+
info: chalk112.blue("i"),
|
15501
|
+
success: chalk112.green("\u221A"),
|
15502
|
+
warning: chalk112.yellow("\u203C"),
|
15503
|
+
error: chalk112.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 chalk112 = 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 = chalk112[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(chalk112, 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 = chalk112;
|
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 = (chalk112, 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(chalk112, 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(chalk112, 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 chalk113 = {};
|
17830
|
+
applyOptions(chalk113, options);
|
17831
|
+
chalk113.template = (...arguments_) => chalkTag(chalk113.template, ...arguments_);
|
17832
|
+
Object.setPrototypeOf(chalk113, Chalk3.prototype);
|
17833
|
+
Object.setPrototypeOf(chalk113.template, chalk113);
|
17834
|
+
chalk113.template.constructor = () => {
|
17835
17835
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
17836
17836
|
};
|
17837
|
-
|
17838
|
-
return
|
17837
|
+
chalk113.template.Instance = ChalkClass;
|
17838
|
+
return chalk113.template;
|
17839
17839
|
};
|
17840
17840
|
function Chalk3(options) {
|
17841
17841
|
return chalkFactory(options);
|
@@ -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 = (chalk113, ...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(chalk113, parts.join(""));
|
17966
17966
|
};
|
17967
17967
|
Object.defineProperties(Chalk3.prototype, styles);
|
17968
|
-
var
|
17969
|
-
|
17970
|
-
|
17971
|
-
|
17972
|
-
module2.exports =
|
17968
|
+
var chalk112 = Chalk3();
|
17969
|
+
chalk112.supportsColor = stdoutColor;
|
17970
|
+
chalk112.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
17971
|
+
chalk112.stderr.supportsColor = stderrColor;
|
17972
|
+
module2.exports = chalk112;
|
17973
17973
|
}
|
17974
17974
|
});
|
17975
17975
|
|
@@ -20346,15 +20346,15 @@ var init_mjs = __esm({
|
|
20346
20346
|
this.listeners[ev].push(fn2);
|
20347
20347
|
}
|
20348
20348
|
removeListener(ev, fn2) {
|
20349
|
-
const
|
20350
|
-
const i =
|
20349
|
+
const list7 = this.listeners[ev];
|
20350
|
+
const i = list7.indexOf(fn2);
|
20351
20351
|
if (i === -1) {
|
20352
20352
|
return;
|
20353
20353
|
}
|
20354
|
-
if (i === 0 &&
|
20355
|
-
|
20354
|
+
if (i === 0 && list7.length === 1) {
|
20355
|
+
list7.length = 0;
|
20356
20356
|
} else {
|
20357
|
-
|
20357
|
+
list7.splice(i, 1);
|
20358
20358
|
}
|
20359
20359
|
}
|
20360
20360
|
emit(ev, code2, signal) {
|
@@ -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.15",
|
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.11",
|
30898
30898
|
"@vercel/error-utils": "2.0.2",
|
30899
30899
|
"@vercel/routing-utils": "3.1.0",
|
30900
30900
|
"async-retry": "1.2.3",
|
@@ -31196,7 +31196,7 @@ var require_minimatch = __commonJS2({
|
|
31196
31196
|
var reSpecials = charSet("().*{}+?[]^$\\!");
|
31197
31197
|
var addPatternStartSet = charSet("[.(");
|
31198
31198
|
var slashSplit = /\/+/;
|
31199
|
-
minimatch5.filter = (pattern, options = {}) => (p, i,
|
31199
|
+
minimatch5.filter = (pattern, options = {}) => (p, i, list7) => minimatch5(p, pattern, options);
|
31200
31200
|
var ext = (a, b = {}) => {
|
31201
31201
|
const t = {};
|
31202
31202
|
Object.keys(a).forEach((k) => t[k] = a[k]);
|
@@ -31219,7 +31219,7 @@ var require_minimatch = __commonJS2({
|
|
31219
31219
|
m.defaults = (options) => orig.defaults(ext(def, options));
|
31220
31220
|
m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options));
|
31221
31221
|
m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options));
|
31222
|
-
m.match = (
|
31222
|
+
m.match = (list7, pattern, options) => orig.match(list7, pattern, ext(def, options));
|
31223
31223
|
return m;
|
31224
31224
|
};
|
31225
31225
|
minimatch5.braceExpand = (pattern, options) => braceExpand(pattern, options);
|
@@ -31241,13 +31241,13 @@ var require_minimatch = __commonJS2({
|
|
31241
31241
|
};
|
31242
31242
|
var SUBPARSE = Symbol("subparse");
|
31243
31243
|
minimatch5.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe();
|
31244
|
-
minimatch5.match = (
|
31244
|
+
minimatch5.match = (list7, pattern, options = {}) => {
|
31245
31245
|
const mm = new Minimatch(pattern, options);
|
31246
|
-
|
31247
|
-
if (mm.options.nonull && !
|
31248
|
-
|
31246
|
+
list7 = list7.filter((f) => mm.match(f));
|
31247
|
+
if (mm.options.nonull && !list7.length) {
|
31248
|
+
list7.push(pattern);
|
31249
31249
|
}
|
31250
|
-
return
|
31250
|
+
return list7;
|
31251
31251
|
};
|
31252
31252
|
var globUnescape = (s) => s.replace(/\\(.)/g, "$1");
|
31253
31253
|
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
@@ -31759,7 +31759,7 @@ var require_readdir_recursive = __commonJS2({
|
|
31759
31759
|
}
|
31760
31760
|
function readdir2(path11, ignores) {
|
31761
31761
|
ignores = ignores.map(toMatcherFunction);
|
31762
|
-
let
|
31762
|
+
let list7 = [];
|
31763
31763
|
return new Promise(function(resolve12, reject) {
|
31764
31764
|
import_fs10.default.readdir(path11, function(err, files) {
|
31765
31765
|
if (err) {
|
@@ -31767,7 +31767,7 @@ var require_readdir_recursive = __commonJS2({
|
|
31767
31767
|
}
|
31768
31768
|
let pending = files.length;
|
31769
31769
|
if (!pending) {
|
31770
|
-
return resolve12(
|
31770
|
+
return resolve12(list7);
|
31771
31771
|
}
|
31772
31772
|
files.forEach(function(file) {
|
31773
31773
|
const filePath = import_path44.default.join(path11, file);
|
@@ -31779,26 +31779,26 @@ var require_readdir_recursive = __commonJS2({
|
|
31779
31779
|
if (matches) {
|
31780
31780
|
pending -= 1;
|
31781
31781
|
if (!pending) {
|
31782
|
-
return resolve12(
|
31782
|
+
return resolve12(list7);
|
31783
31783
|
}
|
31784
31784
|
return null;
|
31785
31785
|
}
|
31786
31786
|
if (stats.isDirectory()) {
|
31787
31787
|
readdir2(filePath, ignores).then(function(res) {
|
31788
31788
|
if (res.length === 0) {
|
31789
|
-
|
31789
|
+
list7.push(filePath);
|
31790
31790
|
}
|
31791
|
-
|
31791
|
+
list7 = list7.concat(res);
|
31792
31792
|
pending -= 1;
|
31793
31793
|
if (!pending) {
|
31794
|
-
return resolve12(
|
31794
|
+
return resolve12(list7);
|
31795
31795
|
}
|
31796
31796
|
}).catch(reject);
|
31797
31797
|
} else {
|
31798
|
-
|
31798
|
+
list7.push(filePath);
|
31799
31799
|
pending -= 1;
|
31800
31800
|
if (!pending) {
|
31801
|
-
return resolve12(
|
31801
|
+
return resolve12(list7);
|
31802
31802
|
}
|
31803
31803
|
}
|
31804
31804
|
});
|
@@ -32665,7 +32665,7 @@ var require_upload = __commonJS2({
|
|
32665
32665
|
var import_async_sema = require_lib9();
|
32666
32666
|
var import_utils4 = require_utils4();
|
32667
32667
|
var import_errors6 = require_errors();
|
32668
|
-
var
|
32668
|
+
var import_deploy2 = require_deploy();
|
32669
32669
|
var isClientNetworkError = (err) => {
|
32670
32670
|
if (err.message) {
|
32671
32671
|
return err.message.includes("ETIMEDOUT") || err.message.includes("ECONNREFUSED") || err.message.includes("ENOTFOUND") || err.message.includes("ECONNRESET") || err.message.includes("EAI_FAIL") || err.message.includes("socket hang up") || err.message.includes("network socket disconnected");
|
@@ -32681,7 +32681,7 @@ var require_upload = __commonJS2({
|
|
32681
32681
|
}
|
32682
32682
|
let shas = [];
|
32683
32683
|
debug3("Determining necessary files for upload...");
|
32684
|
-
for await (const event of (0,
|
32684
|
+
for await (const event of (0, import_deploy2.deploy)(files, clientOptions, deploymentOptions)) {
|
32685
32685
|
if (event.type === "error") {
|
32686
32686
|
if (event.payload.code === "missing_files") {
|
32687
32687
|
shas = event.payload.missing;
|
@@ -32820,7 +32820,7 @@ ${e2}`);
|
|
32820
32820
|
yield { type: "all-files-uploaded", payload: files };
|
32821
32821
|
try {
|
32822
32822
|
debug3("Starting deployment creation");
|
32823
|
-
for await (const event of (0,
|
32823
|
+
for await (const event of (0, import_deploy2.deploy)(files, clientOptions, deploymentOptions)) {
|
32824
32824
|
if (event.type === "alias-assigned") {
|
32825
32825
|
debug3("Deployment is ready");
|
32826
32826
|
return yield event;
|
@@ -34843,20 +34843,20 @@ var require_stream_readable = __commonJS2({
|
|
34843
34843
|
}
|
34844
34844
|
return ret;
|
34845
34845
|
}
|
34846
|
-
function fromListPartial(n,
|
34846
|
+
function fromListPartial(n, list7, hasStrings) {
|
34847
34847
|
var ret;
|
34848
|
-
if (n <
|
34849
|
-
ret =
|
34850
|
-
|
34851
|
-
} else if (n ===
|
34852
|
-
ret =
|
34848
|
+
if (n < list7.head.data.length) {
|
34849
|
+
ret = list7.head.data.slice(0, n);
|
34850
|
+
list7.head.data = list7.head.data.slice(n);
|
34851
|
+
} else if (n === list7.head.data.length) {
|
34852
|
+
ret = list7.shift();
|
34853
34853
|
} else {
|
34854
|
-
ret = hasStrings ? copyFromBufferString(n,
|
34854
|
+
ret = hasStrings ? copyFromBufferString(n, list7) : copyFromBuffer(n, list7);
|
34855
34855
|
}
|
34856
34856
|
return ret;
|
34857
34857
|
}
|
34858
|
-
function copyFromBufferString(n,
|
34859
|
-
var p =
|
34858
|
+
function copyFromBufferString(n, list7) {
|
34859
|
+
var p = list7.head;
|
34860
34860
|
var c = 1;
|
34861
34861
|
var ret = p.data;
|
34862
34862
|
n -= ret.length;
|
@@ -34872,23 +34872,23 @@ var require_stream_readable = __commonJS2({
|
|
34872
34872
|
if (nb === str.length) {
|
34873
34873
|
++c;
|
34874
34874
|
if (p.next)
|
34875
|
-
|
34875
|
+
list7.head = p.next;
|
34876
34876
|
else
|
34877
|
-
|
34877
|
+
list7.head = list7.tail = null;
|
34878
34878
|
} else {
|
34879
|
-
|
34879
|
+
list7.head = p;
|
34880
34880
|
p.data = str.slice(nb);
|
34881
34881
|
}
|
34882
34882
|
break;
|
34883
34883
|
}
|
34884
34884
|
++c;
|
34885
34885
|
}
|
34886
|
-
|
34886
|
+
list7.length -= c;
|
34887
34887
|
return ret;
|
34888
34888
|
}
|
34889
|
-
function copyFromBuffer(n,
|
34889
|
+
function copyFromBuffer(n, list7) {
|
34890
34890
|
var ret = Buffer2.allocUnsafe(n);
|
34891
|
-
var p =
|
34891
|
+
var p = list7.head;
|
34892
34892
|
var c = 1;
|
34893
34893
|
p.data.copy(ret);
|
34894
34894
|
n -= p.data.length;
|
@@ -34901,18 +34901,18 @@ var require_stream_readable = __commonJS2({
|
|
34901
34901
|
if (nb === buf.length) {
|
34902
34902
|
++c;
|
34903
34903
|
if (p.next)
|
34904
|
-
|
34904
|
+
list7.head = p.next;
|
34905
34905
|
else
|
34906
|
-
|
34906
|
+
list7.head = list7.tail = null;
|
34907
34907
|
} else {
|
34908
|
-
|
34908
|
+
list7.head = p;
|
34909
34909
|
p.data = buf.slice(nb);
|
34910
34910
|
}
|
34911
34911
|
break;
|
34912
34912
|
}
|
34913
34913
|
++c;
|
34914
34914
|
}
|
34915
|
-
|
34915
|
+
list7.length -= c;
|
34916
34916
|
return ret;
|
34917
34917
|
}
|
34918
34918
|
function endReadable(stream) {
|
@@ -36789,8 +36789,8 @@ var require_tar_fs = __commonJS2({
|
|
36789
36789
|
onnextentry();
|
36790
36790
|
return pack;
|
36791
36791
|
};
|
36792
|
-
var head = function(
|
36793
|
-
return
|
36792
|
+
var head = function(list7) {
|
36793
|
+
return list7.length ? list7[list7.length - 1] : null;
|
36794
36794
|
};
|
36795
36795
|
var processGetuid = function() {
|
36796
36796
|
return process.getuid ? process.getuid() : -1;
|
@@ -47137,9 +47137,9 @@ var require_ftp = __commonJS2({
|
|
47137
47137
|
}
|
47138
47138
|
}
|
47139
47139
|
if (!lastModified) {
|
47140
|
-
const
|
47140
|
+
const list7 = await client2.list((0, path_1.dirname)(filepath));
|
47141
47141
|
const name = (0, path_1.basename)(filepath);
|
47142
|
-
const entry =
|
47142
|
+
const entry = list7.find((e2) => e2.name === name);
|
47143
47143
|
if (entry) {
|
47144
47144
|
lastModified = entry.modifiedAt;
|
47145
47145
|
}
|
@@ -55303,15 +55303,15 @@ var require_esprima = __commonJS2({
|
|
55303
55303
|
this.context.isAssignmentTarget = false;
|
55304
55304
|
this.context.isBindingElement = false;
|
55305
55305
|
var isAsync = expr.async;
|
55306
|
-
var
|
55307
|
-
if (
|
55306
|
+
var list7 = this.reinterpretAsCoverFormalsList(expr);
|
55307
|
+
if (list7) {
|
55308
55308
|
if (this.hasLineTerminator) {
|
55309
55309
|
this.tolerateUnexpectedToken(this.lookahead);
|
55310
55310
|
}
|
55311
55311
|
this.context.firstCoverInitializedNameError = null;
|
55312
55312
|
var previousStrict = this.context.strict;
|
55313
55313
|
var previousAllowStrictDirective = this.context.allowStrictDirective;
|
55314
|
-
this.context.allowStrictDirective =
|
55314
|
+
this.context.allowStrictDirective = list7.simple;
|
55315
55315
|
var previousAllowYield = this.context.allowYield;
|
55316
55316
|
var previousAwait = this.context.await;
|
55317
55317
|
this.context.allowYield = true;
|
@@ -55328,13 +55328,13 @@ var require_esprima = __commonJS2({
|
|
55328
55328
|
body = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
55329
55329
|
}
|
55330
55330
|
var expression = body.type !== syntax_1.Syntax.BlockStatement;
|
55331
|
-
if (this.context.strict &&
|
55332
|
-
this.throwUnexpectedToken(
|
55331
|
+
if (this.context.strict && list7.firstRestricted) {
|
55332
|
+
this.throwUnexpectedToken(list7.firstRestricted, list7.message);
|
55333
55333
|
}
|
55334
|
-
if (this.context.strict &&
|
55335
|
-
this.tolerateUnexpectedToken(
|
55334
|
+
if (this.context.strict && list7.stricted) {
|
55335
|
+
this.tolerateUnexpectedToken(list7.stricted, list7.message);
|
55336
55336
|
}
|
55337
|
-
expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(
|
55337
|
+
expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list7.params, body, expression)) : this.finalize(node, new Node.ArrowFunctionExpression(list7.params, body, expression));
|
55338
55338
|
this.context.strict = previousStrict;
|
55339
55339
|
this.context.allowStrictDirective = previousAllowStrictDirective;
|
55340
55340
|
this.context.allowYield = previousAllowYield;
|
@@ -55465,12 +55465,12 @@ var require_esprima = __commonJS2({
|
|
55465
55465
|
return this.finalize(node, new Node.VariableDeclarator(id, init3));
|
55466
55466
|
};
|
55467
55467
|
Parser2.prototype.parseBindingList = function(kind, options) {
|
55468
|
-
var
|
55468
|
+
var list7 = [this.parseLexicalBinding(kind, options)];
|
55469
55469
|
while (this.match(",")) {
|
55470
55470
|
this.nextToken();
|
55471
|
-
|
55471
|
+
list7.push(this.parseLexicalBinding(kind, options));
|
55472
55472
|
}
|
55473
|
-
return
|
55473
|
+
return list7;
|
55474
55474
|
};
|
55475
55475
|
Parser2.prototype.isLexicalDeclaration = function() {
|
55476
55476
|
var state = this.scanner.saveState();
|
@@ -55632,13 +55632,13 @@ var require_esprima = __commonJS2({
|
|
55632
55632
|
};
|
55633
55633
|
Parser2.prototype.parseVariableDeclarationList = function(options) {
|
55634
55634
|
var opt = { inFor: options.inFor };
|
55635
|
-
var
|
55636
|
-
|
55635
|
+
var list7 = [];
|
55636
|
+
list7.push(this.parseVariableDeclaration(opt));
|
55637
55637
|
while (this.match(",")) {
|
55638
55638
|
this.nextToken();
|
55639
|
-
|
55639
|
+
list7.push(this.parseVariableDeclaration(opt));
|
55640
55640
|
}
|
55641
|
-
return
|
55641
|
+
return list7;
|
55642
55642
|
};
|
55643
55643
|
Parser2.prototype.parseVariableStatement = function() {
|
55644
55644
|
var node = this.createNode();
|
@@ -59712,28 +59712,28 @@ var require_types2 = __commonJS2({
|
|
59712
59712
|
};
|
59713
59713
|
builders[wrapperName] = builder;
|
59714
59714
|
}
|
59715
|
-
function populateSupertypeList(typeName,
|
59716
|
-
|
59717
|
-
|
59715
|
+
function populateSupertypeList(typeName, list7) {
|
59716
|
+
list7.length = 0;
|
59717
|
+
list7.push(typeName);
|
59718
59718
|
var lastSeen = /* @__PURE__ */ Object.create(null);
|
59719
|
-
for (var pos = 0; pos <
|
59720
|
-
typeName =
|
59719
|
+
for (var pos = 0; pos < list7.length; ++pos) {
|
59720
|
+
typeName = list7[pos];
|
59721
59721
|
var d = defCache[typeName];
|
59722
59722
|
if (d.finalized !== true) {
|
59723
59723
|
throw new Error("");
|
59724
59724
|
}
|
59725
59725
|
if (hasOwn.call(lastSeen, typeName)) {
|
59726
|
-
delete
|
59726
|
+
delete list7[lastSeen[typeName]];
|
59727
59727
|
}
|
59728
59728
|
lastSeen[typeName] = pos;
|
59729
|
-
|
59729
|
+
list7.push.apply(list7, d.baseNames);
|
59730
59730
|
}
|
59731
|
-
for (var to = 0, from = to, len =
|
59732
|
-
if (hasOwn.call(
|
59733
|
-
|
59731
|
+
for (var to = 0, from = to, len = list7.length; from < len; ++from) {
|
59732
|
+
if (hasOwn.call(list7, from)) {
|
59733
|
+
list7[to++] = list7[from];
|
59734
59734
|
}
|
59735
59735
|
}
|
59736
|
-
|
59736
|
+
list7.length = to;
|
59737
59737
|
}
|
59738
59738
|
function extend(into, from) {
|
59739
59739
|
Object.keys(from).forEach(function(name) {
|
@@ -75745,7 +75745,7 @@ var require_minimatch2 = __commonJS2({
|
|
75745
75745
|
minimatch5.filter = filter;
|
75746
75746
|
function filter(pattern, options) {
|
75747
75747
|
options = options || {};
|
75748
|
-
return function(p, i,
|
75748
|
+
return function(p, i, list7) {
|
75749
75749
|
return minimatch5(p, pattern, options);
|
75750
75750
|
};
|
75751
75751
|
}
|
@@ -75786,8 +75786,8 @@ var require_minimatch2 = __commonJS2({
|
|
75786
75786
|
m.braceExpand = function braceExpand2(pattern, options) {
|
75787
75787
|
return orig.braceExpand(pattern, ext(def, options));
|
75788
75788
|
};
|
75789
|
-
m.match = function(
|
75790
|
-
return orig.match(
|
75789
|
+
m.match = function(list7, pattern, options) {
|
75790
|
+
return orig.match(list7, pattern, ext(def, options));
|
75791
75791
|
};
|
75792
75792
|
return m;
|
75793
75793
|
};
|
@@ -76167,16 +76167,16 @@ var require_minimatch2 = __commonJS2({
|
|
76167
76167
|
}
|
76168
76168
|
return this.regexp;
|
76169
76169
|
}
|
76170
|
-
minimatch5.match = function(
|
76170
|
+
minimatch5.match = function(list7, pattern, options) {
|
76171
76171
|
options = options || {};
|
76172
76172
|
var mm = new Minimatch(pattern, options);
|
76173
|
-
|
76173
|
+
list7 = list7.filter(function(f) {
|
76174
76174
|
return mm.match(f);
|
76175
76175
|
});
|
76176
|
-
if (mm.options.nonull && !
|
76177
|
-
|
76176
|
+
if (mm.options.nonull && !list7.length) {
|
76177
|
+
list7.push(pattern);
|
76178
76178
|
}
|
76179
|
-
return
|
76179
|
+
return list7;
|
76180
76180
|
};
|
76181
76181
|
Minimatch.prototype.match = function match(f, partial) {
|
76182
76182
|
if (typeof partial === "undefined")
|
@@ -83860,14 +83860,14 @@ var require_semver2 = __commonJS2({
|
|
83860
83860
|
return compare(b, a, loose);
|
83861
83861
|
}
|
83862
83862
|
exports2.sort = sort;
|
83863
|
-
function sort(
|
83864
|
-
return
|
83863
|
+
function sort(list7, loose) {
|
83864
|
+
return list7.sort(function(a, b) {
|
83865
83865
|
return exports2.compareBuild(a, b, loose);
|
83866
83866
|
});
|
83867
83867
|
}
|
83868
83868
|
exports2.rsort = rsort;
|
83869
|
-
function rsort(
|
83870
|
-
return
|
83869
|
+
function rsort(list7, loose) {
|
83870
|
+
return list7.sort(function(a, b) {
|
83871
83871
|
return exports2.compareBuild(b, a, loose);
|
83872
83872
|
});
|
83873
83873
|
}
|
@@ -85397,7 +85397,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
85397
85397
|
});
|
85398
85398
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
85399
85399
|
var import_semver4 = __toESM4(require_semver2());
|
85400
|
-
var
|
85400
|
+
var import__11 = require_dist27();
|
85401
85401
|
async function detectFileSystemAPI2({
|
85402
85402
|
files,
|
85403
85403
|
projectSettings,
|
@@ -85463,7 +85463,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
85463
85463
|
};
|
85464
85464
|
}
|
85465
85465
|
const invalidBuilder = builders.find(({ use }) => {
|
85466
|
-
const valid = (0,
|
85466
|
+
const valid = (0, import__11.isOfficialRuntime)("go", use) || (0, import__11.isOfficialRuntime)("python", use) || (0, import__11.isOfficialRuntime)("ruby", use) || (0, import__11.isOfficialRuntime)("node", use) || (0, import__11.isOfficialRuntime)("next", use) || (0, import__11.isOfficialRuntime)("static", use) || (0, import__11.isOfficialRuntime)("static-build", use);
|
85467
85467
|
return !valid;
|
85468
85468
|
});
|
85469
85469
|
if (invalidBuilder) {
|
@@ -85476,7 +85476,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
85476
85476
|
for (const lang of ["go", "python", "ruby"]) {
|
85477
85477
|
for (const { use } of builders) {
|
85478
85478
|
const plugin = "vercel-plugin-" + lang;
|
85479
|
-
if ((0,
|
85479
|
+
if ((0, import__11.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
85480
85480
|
return {
|
85481
85481
|
metadata,
|
85482
85482
|
fsApiBuilder: null,
|
@@ -85533,7 +85533,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
85533
85533
|
}
|
85534
85534
|
}
|
85535
85535
|
const frontendBuilder = builders.find(
|
85536
|
-
({ use }) => (0,
|
85536
|
+
({ use }) => (0, import__11.isOfficialRuntime)("next", use) || (0, import__11.isOfficialRuntime)("static", use) || (0, import__11.isOfficialRuntime)("static-build", use)
|
85537
85537
|
);
|
85538
85538
|
const config2 = frontendBuilder?.config || {};
|
85539
85539
|
const withTag = tag ? `@${tag}` : "";
|
@@ -89412,7 +89412,7 @@ var require_minimatch3 = __commonJS2({
|
|
89412
89412
|
var reSpecials = charSet("().*{}+?[]^$\\!");
|
89413
89413
|
var addPatternStartSet = charSet("[.(");
|
89414
89414
|
var slashSplit = /\/+/;
|
89415
|
-
minimatch5.filter = (pattern, options = {}) => (p, i,
|
89415
|
+
minimatch5.filter = (pattern, options = {}) => (p, i, list7) => minimatch5(p, pattern, options);
|
89416
89416
|
var ext = (a, b = {}) => {
|
89417
89417
|
const t = {};
|
89418
89418
|
Object.keys(a).forEach((k) => t[k] = a[k]);
|
@@ -89435,7 +89435,7 @@ var require_minimatch3 = __commonJS2({
|
|
89435
89435
|
m.defaults = (options) => orig.defaults(ext(def, options));
|
89436
89436
|
m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options));
|
89437
89437
|
m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options));
|
89438
|
-
m.match = (
|
89438
|
+
m.match = (list7, pattern, options) => orig.match(list7, pattern, ext(def, options));
|
89439
89439
|
return m;
|
89440
89440
|
};
|
89441
89441
|
minimatch5.braceExpand = (pattern, options) => braceExpand(pattern, options);
|
@@ -89457,13 +89457,13 @@ var require_minimatch3 = __commonJS2({
|
|
89457
89457
|
};
|
89458
89458
|
var SUBPARSE = Symbol("subparse");
|
89459
89459
|
minimatch5.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe();
|
89460
|
-
minimatch5.match = (
|
89460
|
+
minimatch5.match = (list7, pattern, options = {}) => {
|
89461
89461
|
const mm = new Minimatch(pattern, options);
|
89462
|
-
|
89463
|
-
if (mm.options.nonull && !
|
89464
|
-
|
89462
|
+
list7 = list7.filter((f) => mm.match(f));
|
89463
|
+
if (mm.options.nonull && !list7.length) {
|
89464
|
+
list7.push(pattern);
|
89465
89465
|
}
|
89466
|
-
return
|
89466
|
+
return list7;
|
89467
89467
|
};
|
89468
89468
|
var globUnescape = (s) => s.replace(/\\(.)/g, "$1");
|
89469
89469
|
var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1");
|
@@ -106517,22 +106517,22 @@ var require_split2 = __commonJS2({
|
|
106517
106517
|
var kLast = Symbol("last");
|
106518
106518
|
var kDecoder = Symbol("decoder");
|
106519
106519
|
function transform(chunk, enc, cb) {
|
106520
|
-
let
|
106520
|
+
let list7;
|
106521
106521
|
if (this.overflow) {
|
106522
106522
|
const buf = this[kDecoder].write(chunk);
|
106523
|
-
|
106524
|
-
if (
|
106523
|
+
list7 = buf.split(this.matcher);
|
106524
|
+
if (list7.length === 1)
|
106525
106525
|
return cb();
|
106526
|
-
|
106526
|
+
list7.shift();
|
106527
106527
|
this.overflow = false;
|
106528
106528
|
} else {
|
106529
106529
|
this[kLast] += this[kDecoder].write(chunk);
|
106530
|
-
|
106530
|
+
list7 = this[kLast].split(this.matcher);
|
106531
106531
|
}
|
106532
|
-
this[kLast] =
|
106533
|
-
for (let i = 0; i <
|
106532
|
+
this[kLast] = list7.pop();
|
106533
|
+
for (let i = 0; i < list7.length; i++) {
|
106534
106534
|
try {
|
106535
|
-
push(this, this.mapper(
|
106535
|
+
push(this, this.mapper(list7[i]));
|
106536
106536
|
} catch (error3) {
|
106537
106537
|
return cb(error3);
|
106538
106538
|
}
|
@@ -108083,7 +108083,7 @@ async function staticFiles(path11, { output: output2, src }) {
|
|
108083
108083
|
}
|
108084
108084
|
async function explode(paths, { accepts, output: output2 }) {
|
108085
108085
|
const { debug: debug3 } = output2;
|
108086
|
-
const
|
108086
|
+
const list7 = async (file) => {
|
108087
108087
|
let path11 = file;
|
108088
108088
|
let s;
|
108089
108089
|
if (!accepts(file)) {
|
@@ -108111,7 +108111,7 @@ async function explode(paths, { accepts, output: output2 }) {
|
|
108111
108111
|
}
|
108112
108112
|
return path11;
|
108113
108113
|
};
|
108114
|
-
const many = (all) => Promise.all(all.map((file) =>
|
108114
|
+
const many = (all) => Promise.all(all.map((file) => list7(file)));
|
108115
108115
|
const arrayOfArrays = await many(paths);
|
108116
108116
|
return flatten(arrayOfArrays).filter(notNull);
|
108117
108117
|
}
|
@@ -117590,18 +117590,18 @@ var require_events_intercept = __commonJS2({
|
|
117590
117590
|
return ret;
|
117591
117591
|
}
|
117592
117592
|
function removeInterceptor(type, interceptor) {
|
117593
|
-
var
|
117593
|
+
var list7, position, length, i;
|
117594
117594
|
if (typeof interceptor !== "function") {
|
117595
117595
|
throw new TypeError("interceptor must be a function");
|
117596
117596
|
}
|
117597
117597
|
if (!this._interceptors || !this._interceptors[type]) {
|
117598
117598
|
return this;
|
117599
117599
|
}
|
117600
|
-
|
117601
|
-
length =
|
117600
|
+
list7 = this._interceptors[type];
|
117601
|
+
length = list7.length;
|
117602
117602
|
position = -1;
|
117603
117603
|
for (i = length - 1; i >= 0; i--) {
|
117604
|
-
if (
|
117604
|
+
if (list7[i] === interceptor) {
|
117605
117605
|
position = i;
|
117606
117606
|
break;
|
117607
117607
|
}
|
@@ -117612,7 +117612,7 @@ var require_events_intercept = __commonJS2({
|
|
117612
117612
|
if (length === 1) {
|
117613
117613
|
delete this._interceptors[type];
|
117614
117614
|
} else {
|
117615
|
-
|
117615
|
+
list7.splice(position, 1);
|
117616
117616
|
}
|
117617
117617
|
this.emit("removeInterceptor", type, interceptor);
|
117618
117618
|
return this;
|
@@ -121863,6 +121863,137 @@ var init_command7 = __esm({
|
|
121863
121863
|
}
|
121864
121864
|
});
|
121865
121865
|
|
121866
|
+
// src/util/telemetry/commands/deploy/index.ts
|
121867
|
+
var DeployTelemetryClient;
|
121868
|
+
var init_deploy = __esm({
|
121869
|
+
"src/util/telemetry/commands/deploy/index.ts"() {
|
121870
|
+
"use strict";
|
121871
|
+
init_telemetry();
|
121872
|
+
DeployTelemetryClient = class extends TelemetryClient {
|
121873
|
+
trackCliArgumentProjectPath(projectPaths) {
|
121874
|
+
if (projectPaths && projectPaths.length > 0) {
|
121875
|
+
this.trackCliArgument({
|
121876
|
+
arg: "project-path",
|
121877
|
+
value: this.redactedValue
|
121878
|
+
});
|
121879
|
+
}
|
121880
|
+
}
|
121881
|
+
trackCliOptionArchive(format4) {
|
121882
|
+
if (format4) {
|
121883
|
+
this.trackCliOption({
|
121884
|
+
flag: "archive",
|
121885
|
+
value: format4
|
121886
|
+
});
|
121887
|
+
}
|
121888
|
+
}
|
121889
|
+
trackCliOptionBuildEnv(buildEnv) {
|
121890
|
+
if (buildEnv && buildEnv.length > 0) {
|
121891
|
+
this.trackCliOption({
|
121892
|
+
flag: "build-env",
|
121893
|
+
value: this.redactedValue
|
121894
|
+
});
|
121895
|
+
}
|
121896
|
+
}
|
121897
|
+
trackCliOptionEnv(env) {
|
121898
|
+
if (env && env.length > 0) {
|
121899
|
+
this.trackCliOption({
|
121900
|
+
flag: "env",
|
121901
|
+
value: this.redactedValue
|
121902
|
+
});
|
121903
|
+
}
|
121904
|
+
}
|
121905
|
+
trackCliOptionMeta(meta) {
|
121906
|
+
if (meta && meta.length > 0) {
|
121907
|
+
this.trackCliOption({
|
121908
|
+
flag: "meta",
|
121909
|
+
value: this.redactedValue
|
121910
|
+
});
|
121911
|
+
}
|
121912
|
+
}
|
121913
|
+
trackCliOptionName(name) {
|
121914
|
+
if (name) {
|
121915
|
+
this.trackCliOption({
|
121916
|
+
flag: "name",
|
121917
|
+
value: this.redactedValue
|
121918
|
+
});
|
121919
|
+
}
|
121920
|
+
}
|
121921
|
+
trackCliOptionRegions(regions) {
|
121922
|
+
if (regions) {
|
121923
|
+
this.trackCliOption({
|
121924
|
+
flag: "regions",
|
121925
|
+
value: regions
|
121926
|
+
});
|
121927
|
+
}
|
121928
|
+
}
|
121929
|
+
trackCliOptionTarget(target) {
|
121930
|
+
if (target) {
|
121931
|
+
const value = ["production", "preview"].includes(target) ? target : "CUSTOM_ID_OR_SLUG";
|
121932
|
+
this.trackCliOption({
|
121933
|
+
flag: "target",
|
121934
|
+
value
|
121935
|
+
});
|
121936
|
+
}
|
121937
|
+
}
|
121938
|
+
trackCliFlagConfirm(flag) {
|
121939
|
+
if (flag) {
|
121940
|
+
this.trackCliFlag("confirm");
|
121941
|
+
}
|
121942
|
+
}
|
121943
|
+
trackCliFlagForce(flag) {
|
121944
|
+
if (flag) {
|
121945
|
+
this.trackCliFlag("force");
|
121946
|
+
}
|
121947
|
+
}
|
121948
|
+
trackCliFlagLogs(flag) {
|
121949
|
+
if (flag) {
|
121950
|
+
this.trackCliFlag("logs");
|
121951
|
+
}
|
121952
|
+
}
|
121953
|
+
trackCliFlagNoClipboard(flag) {
|
121954
|
+
if (flag) {
|
121955
|
+
this.trackCliFlag("no-clipboard");
|
121956
|
+
}
|
121957
|
+
}
|
121958
|
+
trackCliFlagNoWait(flag) {
|
121959
|
+
if (flag) {
|
121960
|
+
this.trackCliFlag("no-wait");
|
121961
|
+
}
|
121962
|
+
}
|
121963
|
+
trackCliFlagPrebuilt(flag) {
|
121964
|
+
if (flag) {
|
121965
|
+
this.trackCliFlag("prebuilt");
|
121966
|
+
}
|
121967
|
+
}
|
121968
|
+
trackCliFlagProd(flag) {
|
121969
|
+
if (flag) {
|
121970
|
+
this.trackCliFlag("prod");
|
121971
|
+
}
|
121972
|
+
}
|
121973
|
+
trackCliFlagPublic(flag) {
|
121974
|
+
if (flag) {
|
121975
|
+
this.trackCliFlag("public");
|
121976
|
+
}
|
121977
|
+
}
|
121978
|
+
trackCliFlagSkipDomain(flag) {
|
121979
|
+
if (flag) {
|
121980
|
+
this.trackCliFlag("skip-domain");
|
121981
|
+
}
|
121982
|
+
}
|
121983
|
+
trackCliFlagWithCache(flag) {
|
121984
|
+
if (flag) {
|
121985
|
+
this.trackCliFlag("with-cache");
|
121986
|
+
}
|
121987
|
+
}
|
121988
|
+
trackCliFlagYes(flag) {
|
121989
|
+
if (flag) {
|
121990
|
+
this.trackCliFlag("yes");
|
121991
|
+
}
|
121992
|
+
}
|
121993
|
+
};
|
121994
|
+
}
|
121995
|
+
});
|
121996
|
+
|
121866
121997
|
// src/commands/deploy/index.ts
|
121867
121998
|
var deploy_exports = {};
|
121868
121999
|
__export3(deploy_exports, {
|
@@ -121929,7 +122060,7 @@ function handleCreateDeployError(output2, error3, localConfig) {
|
|
121929
122060
|
return error3;
|
121930
122061
|
}
|
121931
122062
|
var import_build_utils13, import_client10, import_error_utils18, import_bytes5, import_chalk58, import_fs_extra20, import_ms11, import_path32, deploy_default, addProcessEnv;
|
121932
|
-
var
|
122063
|
+
var init_deploy2 = __esm({
|
121933
122064
|
"src/commands/deploy/index.ts"() {
|
121934
122065
|
"use strict";
|
121935
122066
|
import_build_utils13 = require("@vercel/build-utils");
|
@@ -121976,13 +122107,42 @@ var init_deploy = __esm({
|
|
121976
122107
|
init_help();
|
121977
122108
|
init_command7();
|
121978
122109
|
init_parse_target();
|
122110
|
+
init_deploy();
|
121979
122111
|
deploy_default = async (client2) => {
|
122112
|
+
let telemetryClient = new DeployTelemetryClient({
|
122113
|
+
opts: {
|
122114
|
+
output: client2.output,
|
122115
|
+
store: client2.telemetryEventStore
|
122116
|
+
}
|
122117
|
+
});
|
121980
122118
|
const { output: output2 } = client2;
|
121981
122119
|
let parsedArguments = null;
|
121982
122120
|
const flagsSpecification = getFlagsSpecification(deployCommand.options);
|
121983
122121
|
try {
|
121984
122122
|
parsedArguments = parseArguments(client2.argv.slice(2), flagsSpecification);
|
122123
|
+
telemetryClient.trackCliOptionArchive(parsedArguments.flags["--archive"]);
|
122124
|
+
telemetryClient.trackCliOptionEnv(parsedArguments.flags["--env"]);
|
122125
|
+
telemetryClient.trackCliOptionBuildEnv(
|
122126
|
+
parsedArguments.flags["--build-env"]
|
122127
|
+
);
|
122128
|
+
telemetryClient.trackCliOptionMeta(parsedArguments.flags["--meta"]);
|
122129
|
+
telemetryClient.trackCliFlagPrebuilt(parsedArguments.flags["--prebuilt"]);
|
122130
|
+
telemetryClient.trackCliOptionRegions(parsedArguments.flags["--regions"]);
|
122131
|
+
telemetryClient.trackCliFlagNoWait(parsedArguments.flags["--no-wait"]);
|
122132
|
+
telemetryClient.trackCliFlagYes(parsedArguments.flags["--yes"]);
|
122133
|
+
telemetryClient.trackCliOptionTarget(parsedArguments.flags["--target"]);
|
122134
|
+
telemetryClient.trackCliFlagProd(parsedArguments.flags["--prod"]);
|
122135
|
+
telemetryClient.trackCliFlagSkipDomain(
|
122136
|
+
parsedArguments.flags["--skip-domain"]
|
122137
|
+
);
|
122138
|
+
telemetryClient.trackCliFlagPublic(parsedArguments.flags["--public"]);
|
122139
|
+
telemetryClient.trackCliFlagLogs(parsedArguments.flags["--logs"]);
|
122140
|
+
telemetryClient.trackCliFlagForce(parsedArguments.flags["--force"]);
|
122141
|
+
telemetryClient.trackCliFlagWithCache(
|
122142
|
+
parsedArguments.flags["--with-cache"]
|
122143
|
+
);
|
121985
122144
|
if ("--confirm" in parsedArguments.flags) {
|
122145
|
+
telemetryClient.trackCliFlagConfirm(true);
|
121986
122146
|
output2.warn("`--confirm` is deprecated, please use `--yes` instead");
|
121987
122147
|
parsedArguments.flags["--yes"] = parsedArguments.flags["--confirm"];
|
121988
122148
|
}
|
@@ -122000,6 +122160,7 @@ var init_deploy = __esm({
|
|
122000
122160
|
let paths;
|
122001
122161
|
if (parsedArguments.args.length > 0) {
|
122002
122162
|
paths = parsedArguments.args.map((item) => (0, import_path32.resolve)(client2.cwd, item));
|
122163
|
+
telemetryClient.trackCliArgumentProjectPath(paths);
|
122003
122164
|
} else {
|
122004
122165
|
paths = [client2.cwd];
|
122005
122166
|
}
|
@@ -122043,6 +122204,7 @@ var init_deploy = __esm({
|
|
122043
122204
|
)}
|
122044
122205
|
`
|
122045
122206
|
);
|
122207
|
+
telemetryClient.trackCliOptionName(parsedArguments.flags["--name"]);
|
122046
122208
|
}
|
122047
122209
|
if (parsedArguments.flags["--no-clipboard"]) {
|
122048
122210
|
output2.print(
|
@@ -122054,6 +122216,7 @@ var init_deploy = __esm({
|
|
122054
122216
|
)}
|
122055
122217
|
`
|
122056
122218
|
);
|
122219
|
+
telemetryClient.trackCliFlagNoClipboard(true);
|
122057
122220
|
}
|
122058
122221
|
const target = parseTarget({
|
122059
122222
|
output: output2,
|
@@ -129193,7 +129356,7 @@ var require_minimatch4 = __commonJS2({
|
|
129193
129356
|
minimatch5.filter = filter;
|
129194
129357
|
function filter(pattern, options) {
|
129195
129358
|
options = options || {};
|
129196
|
-
return function(p, i,
|
129359
|
+
return function(p, i, list7) {
|
129197
129360
|
return minimatch5(p, pattern, options);
|
129198
129361
|
};
|
129199
129362
|
}
|
@@ -129596,16 +129759,16 @@ var require_minimatch4 = __commonJS2({
|
|
129596
129759
|
}
|
129597
129760
|
return this.regexp;
|
129598
129761
|
}
|
129599
|
-
minimatch5.match = function(
|
129762
|
+
minimatch5.match = function(list7, pattern, options) {
|
129600
129763
|
options = options || {};
|
129601
129764
|
var mm = new Minimatch(pattern, options);
|
129602
|
-
|
129765
|
+
list7 = list7.filter(function(f) {
|
129603
129766
|
return mm.match(f);
|
129604
129767
|
});
|
129605
|
-
if (mm.options.nonull && !
|
129606
|
-
|
129768
|
+
if (mm.options.nonull && !list7.length) {
|
129769
|
+
list7.push(pattern);
|
129607
129770
|
}
|
129608
|
-
return
|
129771
|
+
return list7;
|
129609
129772
|
};
|
129610
129773
|
Minimatch.prototype.match = match;
|
129611
129774
|
function match(f, partial) {
|
@@ -145747,8 +145910,8 @@ var require_jaro_winkler = __commonJS2({
|
|
145747
145910
|
});
|
145748
145911
|
|
145749
145912
|
// src/util/init/did-you-mean.ts
|
145750
|
-
function didYouMean(input,
|
145751
|
-
const rated =
|
145913
|
+
function didYouMean(input, list7, threshold = 0.5) {
|
145914
|
+
const rated = list7.map((item) => [dashAwareDistance(input, item), item]);
|
145752
145915
|
const found = rated.filter((item) => item[0] > threshold);
|
145753
145916
|
if (found.length) {
|
145754
145917
|
const highestRated = found.reduce((accu, curr) => {
|
@@ -146665,7 +146828,7 @@ function createInputStep(key, schema) {
|
|
146665
146828
|
default: schema.default,
|
146666
146829
|
validate: (value2) => {
|
146667
146830
|
const number = Number(value2);
|
146668
|
-
if (isNaN(number)) {
|
146831
|
+
if (Number.isNaN(number)) {
|
146669
146832
|
return `Value "${value2}" must be a number.`;
|
146670
146833
|
}
|
146671
146834
|
if (schema.minimum !== void 0 && schema.minimum > number) {
|
@@ -146810,27 +146973,65 @@ var init_wizard = __esm({
|
|
146810
146973
|
}
|
146811
146974
|
});
|
146812
146975
|
|
146813
|
-
// src/
|
146814
|
-
async function
|
146815
|
-
return client2.fetch(
|
146816
|
-
|
146976
|
+
// src/util/integration/provision-store-resource.ts
|
146977
|
+
async function provisionStoreResource(client2, installationId, productId, billingPlanId, name, metadata) {
|
146978
|
+
return await client2.fetch(
|
146979
|
+
"/v1/storage/stores/integration",
|
146817
146980
|
{
|
146818
|
-
|
146981
|
+
method: "POST",
|
146982
|
+
json: true,
|
146983
|
+
body: {
|
146984
|
+
billingPlanId,
|
146985
|
+
integrationConfigurationId: installationId,
|
146986
|
+
integrationProductIdOrSlug: productId,
|
146987
|
+
metadata,
|
146988
|
+
name
|
146989
|
+
}
|
146819
146990
|
}
|
146820
146991
|
);
|
146821
146992
|
}
|
146822
|
-
|
146993
|
+
var init_provision_store_resource = __esm({
|
146994
|
+
"src/util/integration/provision-store-resource.ts"() {
|
146995
|
+
"use strict";
|
146996
|
+
}
|
146997
|
+
});
|
146998
|
+
|
146999
|
+
// src/util/integration/connect-resource-to-project.ts
|
147000
|
+
async function connectResourceToProject(client2, projectId, storeId, environments) {
|
147001
|
+
return client2.fetch(`/v1/storage/stores/${storeId}/connections`, {
|
147002
|
+
json: true,
|
147003
|
+
method: "POST",
|
147004
|
+
body: {
|
147005
|
+
envVarEnvironments: environments,
|
147006
|
+
projectId,
|
147007
|
+
type: "integration"
|
147008
|
+
}
|
147009
|
+
});
|
147010
|
+
}
|
147011
|
+
var init_connect_resource_to_project = __esm({
|
147012
|
+
"src/util/integration/connect-resource-to-project.ts"() {
|
147013
|
+
"use strict";
|
147014
|
+
}
|
147015
|
+
});
|
147016
|
+
|
147017
|
+
// src/util/integration/fetch-billing-plans.ts
|
147018
|
+
async function fetchBillingPlans(client2, integration, product, metadata) {
|
146823
147019
|
const searchParams = new URLSearchParams();
|
146824
|
-
searchParams.set("
|
146825
|
-
|
146826
|
-
|
146827
|
-
return await client2.fetch(
|
146828
|
-
`/v1/integrations/configurations?${searchParams}`,
|
147020
|
+
searchParams.set("metadata", JSON.stringify(metadata));
|
147021
|
+
return client2.fetch(
|
147022
|
+
`/v1/integrations/integration/${integration.id}/products/${product.id}/plans?${searchParams}`,
|
146829
147023
|
{
|
146830
147024
|
json: true
|
146831
147025
|
}
|
146832
147026
|
);
|
146833
147027
|
}
|
147028
|
+
var init_fetch_billing_plans = __esm({
|
147029
|
+
"src/util/integration/fetch-billing-plans.ts"() {
|
147030
|
+
"use strict";
|
147031
|
+
}
|
147032
|
+
});
|
147033
|
+
|
147034
|
+
// src/util/integration/fetch-installations.ts
|
146834
147035
|
async function fetchInstallations(client2, integration) {
|
146835
147036
|
return client2.fetch(
|
146836
147037
|
`/v1/integrations/integration/${integration.id}/installed?source=marketplace`,
|
@@ -146839,45 +147040,23 @@ async function fetchInstallations(client2, integration) {
|
|
146839
147040
|
}
|
146840
147041
|
);
|
146841
147042
|
}
|
146842
|
-
|
146843
|
-
|
146844
|
-
|
147043
|
+
var init_fetch_installations = __esm({
|
147044
|
+
"src/util/integration/fetch-installations.ts"() {
|
147045
|
+
"use strict";
|
147046
|
+
}
|
147047
|
+
});
|
147048
|
+
|
147049
|
+
// src/util/integration/fetch-integration.ts
|
147050
|
+
async function fetchIntegration(client2, slug) {
|
146845
147051
|
return client2.fetch(
|
146846
|
-
`/v1/integrations/integration/${
|
147052
|
+
`/v1/integrations/integration/${slug}?public=1`,
|
146847
147053
|
{
|
146848
147054
|
json: true
|
146849
147055
|
}
|
146850
147056
|
);
|
146851
147057
|
}
|
146852
|
-
|
146853
|
-
|
146854
|
-
json: true,
|
146855
|
-
method: "POST",
|
146856
|
-
body: {
|
146857
|
-
envVarEnvironments: environments,
|
146858
|
-
projectId,
|
146859
|
-
type: "integration"
|
146860
|
-
}
|
146861
|
-
});
|
146862
|
-
}
|
146863
|
-
async function provisionStoreResource(client2, installationId, productId, billingPlanId, name, metadata) {
|
146864
|
-
return await client2.fetch(
|
146865
|
-
"/v1/storage/stores/integration",
|
146866
|
-
{
|
146867
|
-
method: "POST",
|
146868
|
-
json: true,
|
146869
|
-
body: {
|
146870
|
-
billingPlanId,
|
146871
|
-
integrationConfigurationId: installationId,
|
146872
|
-
integrationProductIdOrSlug: productId,
|
146873
|
-
metadata,
|
146874
|
-
name
|
146875
|
-
}
|
146876
|
-
}
|
146877
|
-
);
|
146878
|
-
}
|
146879
|
-
var init_client2 = __esm({
|
146880
|
-
"src/commands/integration/client.ts"() {
|
147058
|
+
var init_fetch_integration = __esm({
|
147059
|
+
"src/util/integration/fetch-integration.ts"() {
|
146881
147060
|
"use strict";
|
146882
147061
|
}
|
146883
147062
|
});
|
@@ -146990,7 +147169,7 @@ async function getOptionalLinkedProject(client2) {
|
|
146990
147169
|
return { status: "success", project: linkedProject.project };
|
146991
147170
|
}
|
146992
147171
|
function privisionResourceViaWebUI(client2, teamId, integrationId, productId, projectId) {
|
146993
|
-
const url3 = new URL(
|
147172
|
+
const url3 = new URL("/api/marketplace/cli", "https://vercel.com");
|
146994
147173
|
url3.searchParams.set("teamId", teamId);
|
146995
147174
|
url3.searchParams.set("integrationId", integrationId);
|
146996
147175
|
url3.searchParams.set("productId", productId);
|
@@ -146999,7 +147178,7 @@ function privisionResourceViaWebUI(client2, teamId, integrationId, productId, pr
|
|
146999
147178
|
}
|
147000
147179
|
url3.searchParams.set("cmd", "add");
|
147001
147180
|
client2.output.print(
|
147002
|
-
|
147181
|
+
"Opening the Vercel Dashboard to continue the installation..."
|
147003
147182
|
);
|
147004
147183
|
(0, import_open3.default)(url3.href);
|
147005
147184
|
}
|
@@ -147125,7 +147304,7 @@ async function selectBillingPlan(client2, billingPlans) {
|
|
147125
147304
|
}
|
147126
147305
|
async function confirmProductSelection(client2, product, name, metadata, billingPlan) {
|
147127
147306
|
client2.output.print("Selected product:\n");
|
147128
|
-
client2.output.print(`${import_chalk91.default.dim(`- ${import_chalk91.default.bold(
|
147307
|
+
client2.output.print(`${import_chalk91.default.dim(`- ${import_chalk91.default.bold("Name:")} ${name}`)}
|
147129
147308
|
`);
|
147130
147309
|
for (const [key, value] of Object.entries(metadata)) {
|
147131
147310
|
client2.output.print(
|
@@ -147134,7 +147313,7 @@ async function confirmProductSelection(client2, product, name, metadata, billing
|
|
147134
147313
|
);
|
147135
147314
|
}
|
147136
147315
|
client2.output.print(
|
147137
|
-
`${import_chalk91.default.dim(`- ${import_chalk91.default.bold(
|
147316
|
+
`${import_chalk91.default.dim(`- ${import_chalk91.default.bold("Plan:")} ${billingPlan.name}`)}
|
147138
147317
|
`
|
147139
147318
|
);
|
147140
147319
|
return client2.input.confirm({
|
@@ -147183,7 +147362,7 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
147183
147362
|
`Connecting ${import_chalk91.default.bold(name)} to ${import_chalk91.default.bold(project.name)}...`
|
147184
147363
|
);
|
147185
147364
|
try {
|
147186
|
-
await
|
147365
|
+
await connectResourceToProject(
|
147187
147366
|
client2,
|
147188
147367
|
projectLink.project.id,
|
147189
147368
|
storeId,
|
@@ -147218,7 +147397,11 @@ var init_add5 = __esm({
|
|
147218
147397
|
init_indent();
|
147219
147398
|
init_link2();
|
147220
147399
|
init_wizard();
|
147221
|
-
|
147400
|
+
init_provision_store_resource();
|
147401
|
+
init_connect_resource_to_project();
|
147402
|
+
init_fetch_billing_plans();
|
147403
|
+
init_fetch_installations();
|
147404
|
+
init_fetch_integration();
|
147222
147405
|
}
|
147223
147406
|
});
|
147224
147407
|
|
@@ -147274,64 +147457,328 @@ var init_install = __esm({
|
|
147274
147457
|
});
|
147275
147458
|
|
147276
147459
|
// src/commands/integration/command.ts
|
147277
|
-
var integrationCommand;
|
147460
|
+
var addSubCommand, openSubCommand, listSubcommand, integrationCommand;
|
147278
147461
|
var init_command16 = __esm({
|
147279
147462
|
"src/commands/integration/command.ts"() {
|
147280
147463
|
"use strict";
|
147281
147464
|
init_pkg_name();
|
147282
|
-
|
147283
|
-
name: "
|
147284
|
-
description: "
|
147465
|
+
addSubCommand = {
|
147466
|
+
name: "add",
|
147467
|
+
description: "Installs a marketplace integration",
|
147468
|
+
arguments: [
|
147469
|
+
{
|
147470
|
+
name: "name",
|
147471
|
+
required: true
|
147472
|
+
}
|
147473
|
+
],
|
147285
147474
|
options: [],
|
147475
|
+
examples: [
|
147476
|
+
{
|
147477
|
+
name: "Install a marketplace integration",
|
147478
|
+
value: [
|
147479
|
+
`${packageName} integration add <integration-name>`,
|
147480
|
+
`${packageName} integration add acme`
|
147481
|
+
]
|
147482
|
+
}
|
147483
|
+
]
|
147484
|
+
};
|
147485
|
+
openSubCommand = {
|
147486
|
+
name: "open",
|
147487
|
+
description: "Opens a marketplace integration's dashboard",
|
147286
147488
|
arguments: [
|
147287
147489
|
{
|
147288
|
-
name: "
|
147490
|
+
name: "name",
|
147289
147491
|
required: true
|
147290
147492
|
}
|
147291
147493
|
],
|
147292
|
-
|
147494
|
+
options: [],
|
147495
|
+
examples: [
|
147293
147496
|
{
|
147294
|
-
name: "
|
147295
|
-
|
147296
|
-
|
147297
|
-
{
|
147298
|
-
|
147299
|
-
|
147300
|
-
|
147301
|
-
|
147302
|
-
|
147303
|
-
|
147497
|
+
name: "Open a marketplace integration's dashboard",
|
147498
|
+
value: [
|
147499
|
+
`${packageName} integration open <integration-name>`,
|
147500
|
+
`${packageName} integration open acme`
|
147501
|
+
]
|
147502
|
+
}
|
147503
|
+
]
|
147504
|
+
};
|
147505
|
+
listSubcommand = {
|
147506
|
+
name: "list",
|
147507
|
+
description: "Lists all resources from marketplace integrations",
|
147508
|
+
arguments: [
|
147509
|
+
{
|
147510
|
+
name: "project",
|
147511
|
+
required: false
|
147512
|
+
}
|
147513
|
+
],
|
147514
|
+
options: [
|
147515
|
+
{
|
147516
|
+
name: "integration",
|
147517
|
+
description: "limits the resources listed to a designated integration",
|
147518
|
+
shorthand: "i",
|
147519
|
+
type: String,
|
147520
|
+
deprecated: false,
|
147521
|
+
argument: "NAME"
|
147304
147522
|
},
|
147305
147523
|
{
|
147306
|
-
name: "
|
147307
|
-
description: "
|
147308
|
-
|
147309
|
-
|
147310
|
-
|
147311
|
-
required: true
|
147312
|
-
}
|
147313
|
-
],
|
147314
|
-
options: [],
|
147315
|
-
examples: []
|
147524
|
+
name: "all",
|
147525
|
+
description: "lists all resources regardless of project",
|
147526
|
+
shorthand: "a",
|
147527
|
+
type: Boolean,
|
147528
|
+
deprecated: false
|
147316
147529
|
}
|
147317
147530
|
],
|
147318
147531
|
examples: [
|
147319
147532
|
{
|
147320
|
-
name: "
|
147533
|
+
name: "List all resources",
|
147534
|
+
value: [`${packageName} integrations list`]
|
147535
|
+
},
|
147536
|
+
{
|
147537
|
+
name: "Filter the resources to a single integration",
|
147321
147538
|
value: [
|
147322
|
-
`${packageName} integration
|
147323
|
-
`${packageName} integration
|
147539
|
+
`${packageName} integrations list --integration <integration>`,
|
147540
|
+
`${packageName} integrations list --integration acme`,
|
147541
|
+
`${packageName} integrations list -i acme`
|
147324
147542
|
]
|
147325
147543
|
},
|
147326
147544
|
{
|
147327
|
-
name: "
|
147545
|
+
name: "List all marketplace resources for the current team",
|
147328
147546
|
value: [
|
147329
|
-
`${packageName}
|
147330
|
-
`${packageName}
|
147547
|
+
`${packageName} integrations list --all`,
|
147548
|
+
`${packageName} integrations list -a`
|
147331
147549
|
]
|
147332
147550
|
}
|
147333
147551
|
]
|
147334
147552
|
};
|
147553
|
+
integrationCommand = {
|
147554
|
+
name: "integration",
|
147555
|
+
description: "Manage marketplace integrations",
|
147556
|
+
options: [],
|
147557
|
+
arguments: [
|
147558
|
+
{
|
147559
|
+
name: "command",
|
147560
|
+
required: true
|
147561
|
+
}
|
147562
|
+
],
|
147563
|
+
subcommands: [addSubCommand, openSubCommand, listSubcommand],
|
147564
|
+
examples: []
|
147565
|
+
};
|
147566
|
+
}
|
147567
|
+
});
|
147568
|
+
|
147569
|
+
// src/util/integration/get-resources.ts
|
147570
|
+
async function getResources(client2, teamId) {
|
147571
|
+
const searchParams = new URLSearchParams();
|
147572
|
+
searchParams.set("teamId", teamId);
|
147573
|
+
const storesResponse = await client2.fetch(
|
147574
|
+
`/v1/storage/stores?teamId=${searchParams}`,
|
147575
|
+
{
|
147576
|
+
json: true
|
147577
|
+
}
|
147578
|
+
);
|
147579
|
+
return storesResponse.stores;
|
147580
|
+
}
|
147581
|
+
var init_get_resources = __esm({
|
147582
|
+
"src/util/integration/get-resources.ts"() {
|
147583
|
+
"use strict";
|
147584
|
+
}
|
147585
|
+
});
|
147586
|
+
|
147587
|
+
// src/util/integration/build-sso-link.ts
|
147588
|
+
function buildSSOLink(team, configurationId) {
|
147589
|
+
const url3 = new URL("/api/marketplace/sso", "https://vercel.com");
|
147590
|
+
url3.searchParams.set("teamId", team.id);
|
147591
|
+
url3.searchParams.set("integrationConfigurationId", configurationId);
|
147592
|
+
return url3.href;
|
147593
|
+
}
|
147594
|
+
var init_build_sso_link = __esm({
|
147595
|
+
"src/util/integration/build-sso-link.ts"() {
|
147596
|
+
"use strict";
|
147597
|
+
}
|
147598
|
+
});
|
147599
|
+
|
147600
|
+
// src/commands/integration/list.ts
|
147601
|
+
async function list2(client2) {
|
147602
|
+
let parsedArguments = null;
|
147603
|
+
const flagsSpecification = getFlagsSpecification(listSubcommand.options);
|
147604
|
+
try {
|
147605
|
+
parsedArguments = parseArguments(client2.argv.slice(3), flagsSpecification);
|
147606
|
+
} catch (error3) {
|
147607
|
+
handleError(error3);
|
147608
|
+
return 1;
|
147609
|
+
}
|
147610
|
+
const { contextName, team } = await getScope(client2);
|
147611
|
+
let project;
|
147612
|
+
if (!team) {
|
147613
|
+
client2.output.error("Team not found.");
|
147614
|
+
return 1;
|
147615
|
+
}
|
147616
|
+
if (parsedArguments.args.length > 2) {
|
147617
|
+
client2.output.error(
|
147618
|
+
"Cannot specify more than one project at a time. Use `--all` to show all resources."
|
147619
|
+
);
|
147620
|
+
return 1;
|
147621
|
+
}
|
147622
|
+
if (parsedArguments.args.length === 2) {
|
147623
|
+
if (parsedArguments.flags["--all"]) {
|
147624
|
+
client2.output.error(
|
147625
|
+
"Cannot specify a project when using the `--all` flag."
|
147626
|
+
);
|
147627
|
+
return 1;
|
147628
|
+
}
|
147629
|
+
project = { name: parsedArguments.args[1] };
|
147630
|
+
}
|
147631
|
+
if (!parsedArguments.flags["--all"]) {
|
147632
|
+
project = await getLinkedProject(client2).then((result) => {
|
147633
|
+
if (result.status === "linked") {
|
147634
|
+
return result.project;
|
147635
|
+
}
|
147636
|
+
return;
|
147637
|
+
});
|
147638
|
+
if (!project) {
|
147639
|
+
client2.output.error(
|
147640
|
+
"No project linked. Either use `vc link` to link a project, or the `--all` flag to list all resources."
|
147641
|
+
);
|
147642
|
+
return 1;
|
147643
|
+
}
|
147644
|
+
}
|
147645
|
+
let resources;
|
147646
|
+
try {
|
147647
|
+
client2.output.spinner("Retrieving resources\u2026", 500);
|
147648
|
+
resources = await getResources(client2, team.id);
|
147649
|
+
} catch (error3) {
|
147650
|
+
client2.output.error(
|
147651
|
+
`Failed to fetch resources: ${error3.message}`
|
147652
|
+
);
|
147653
|
+
return 1;
|
147654
|
+
}
|
147655
|
+
const filterIntegration = parsedArguments.flags["--integration"]?.toLocaleLowerCase();
|
147656
|
+
function resourceIsFromMarketplace(resource) {
|
147657
|
+
return resource.type === "integration";
|
147658
|
+
}
|
147659
|
+
function filterOnIntegration(resource) {
|
147660
|
+
return !filterIntegration || filterIntegration === resource.product?.slug;
|
147661
|
+
}
|
147662
|
+
function filterOnProject(resource) {
|
147663
|
+
return !project || !!resource.projectsMetadata?.find(
|
147664
|
+
(metadata) => metadata.projectId === project?.id || metadata.name === project?.name
|
147665
|
+
);
|
147666
|
+
}
|
147667
|
+
function filterOnFlags(resource) {
|
147668
|
+
return filterOnIntegration(resource) && filterOnProject(resource);
|
147669
|
+
}
|
147670
|
+
const results = resources.filter(resourceIsFromMarketplace).filter(filterOnFlags).map((resource) => {
|
147671
|
+
return {
|
147672
|
+
id: resource.id,
|
147673
|
+
name: resource.name,
|
147674
|
+
status: resource.status,
|
147675
|
+
product: resource.product?.name,
|
147676
|
+
integration: resource.product?.slug,
|
147677
|
+
configurationId: resource.product?.integrationConfigurationId,
|
147678
|
+
projects: resource.projectsMetadata?.map((metadata) => metadata.name).join(", ")
|
147679
|
+
};
|
147680
|
+
});
|
147681
|
+
if (results.length === 0) {
|
147682
|
+
client2.output.log("No resources found.");
|
147683
|
+
return 0;
|
147684
|
+
}
|
147685
|
+
client2.output.log(
|
147686
|
+
`Integrations in ${import_chalk92.default.bold(contextName)}:
|
147687
|
+
${table(
|
147688
|
+
[
|
147689
|
+
["Name", "Status", "Product", "Integration", "Projects"].map(
|
147690
|
+
(header) => import_chalk92.default.bold(import_chalk92.default.cyan(header))
|
147691
|
+
),
|
147692
|
+
...results.map((result) => [
|
147693
|
+
resourceLink(client2.output, contextName, result) ?? import_chalk92.default.gray("\u2013"),
|
147694
|
+
resourceStatus(result.status ?? "\u2013"),
|
147695
|
+
result.product ?? import_chalk92.default.gray("\u2013"),
|
147696
|
+
integrationLink(client2.output, result, team) ?? import_chalk92.default.gray("\u2013"),
|
147697
|
+
import_chalk92.default.grey(result.projects ? result.projects : "\u2013")
|
147698
|
+
])
|
147699
|
+
],
|
147700
|
+
{ hsep: 8 }
|
147701
|
+
)}`
|
147702
|
+
);
|
147703
|
+
return 0;
|
147704
|
+
}
|
147705
|
+
function resourceStatus(status2) {
|
147706
|
+
const CIRCLE = "\u25CF ";
|
147707
|
+
const statusTitleCase = (0, import_title6.default)(status2);
|
147708
|
+
switch (status2) {
|
147709
|
+
case "initializing":
|
147710
|
+
return import_chalk92.default.yellow(CIRCLE) + statusTitleCase;
|
147711
|
+
case "error":
|
147712
|
+
return import_chalk92.default.red(CIRCLE) + statusTitleCase;
|
147713
|
+
case "available":
|
147714
|
+
return import_chalk92.default.green(CIRCLE) + statusTitleCase;
|
147715
|
+
case "suspended":
|
147716
|
+
return import_chalk92.default.white(CIRCLE) + statusTitleCase;
|
147717
|
+
case "limits-exceeded-suspended":
|
147718
|
+
return `${import_chalk92.default.white(CIRCLE)}Limits exceeded`;
|
147719
|
+
default:
|
147720
|
+
return import_chalk92.default.gray(statusTitleCase);
|
147721
|
+
}
|
147722
|
+
}
|
147723
|
+
function resourceLink(output2, orgSlug, resource) {
|
147724
|
+
if (!resource.name) {
|
147725
|
+
return;
|
147726
|
+
}
|
147727
|
+
const projectUrl = `https://vercel.com/${orgSlug}/~`;
|
147728
|
+
return output2.link(
|
147729
|
+
resource.name,
|
147730
|
+
`${projectUrl}/stores/integration/${resource.id}`,
|
147731
|
+
{ fallback: () => resource.name ?? "\u2013", color: false }
|
147732
|
+
);
|
147733
|
+
}
|
147734
|
+
function integrationLink(output2, integration, team) {
|
147735
|
+
if (!integration.integration) {
|
147736
|
+
return;
|
147737
|
+
}
|
147738
|
+
if (!integration.configurationId) {
|
147739
|
+
return integration.integration;
|
147740
|
+
}
|
147741
|
+
const boldName = import_chalk92.default.bold(integration.integration);
|
147742
|
+
const integrationDeepLink = buildSSOLink(team, integration.configurationId);
|
147743
|
+
return output2.link(boldName, integrationDeepLink, {
|
147744
|
+
fallback: () => boldName,
|
147745
|
+
color: false
|
147746
|
+
});
|
147747
|
+
}
|
147748
|
+
var import_chalk92, import_title6;
|
147749
|
+
var init_list2 = __esm({
|
147750
|
+
"src/commands/integration/list.ts"() {
|
147751
|
+
"use strict";
|
147752
|
+
import_chalk92 = __toESM3(require_source());
|
147753
|
+
init_get_scope();
|
147754
|
+
init_link2();
|
147755
|
+
init_get_resources();
|
147756
|
+
init_command16();
|
147757
|
+
init_get_flags_specification();
|
147758
|
+
init_get_args();
|
147759
|
+
init_handle_error();
|
147760
|
+
init_table();
|
147761
|
+
import_title6 = __toESM3(require_lib4());
|
147762
|
+
init_build_sso_link();
|
147763
|
+
}
|
147764
|
+
});
|
147765
|
+
|
147766
|
+
// src/util/integration/fetch-marketplace-integrations.ts
|
147767
|
+
async function fetchMarketplaceIntegrations(client2, slug) {
|
147768
|
+
const searchParams = new URLSearchParams();
|
147769
|
+
searchParams.set("view", "account");
|
147770
|
+
searchParams.set("installationType", "marketplace");
|
147771
|
+
searchParams.set("integrationIdOrSlug", slug);
|
147772
|
+
return await client2.fetch(
|
147773
|
+
`/v1/integrations/configurations?${searchParams}`,
|
147774
|
+
{
|
147775
|
+
json: true
|
147776
|
+
}
|
147777
|
+
);
|
147778
|
+
}
|
147779
|
+
var init_fetch_marketplace_integrations = __esm({
|
147780
|
+
"src/util/integration/fetch-marketplace-integrations.ts"() {
|
147781
|
+
"use strict";
|
147335
147782
|
}
|
147336
147783
|
});
|
147337
147784
|
|
@@ -147356,23 +147803,20 @@ async function openIntegration(client2, args2) {
|
|
147356
147803
|
configuration = await getFirstConfiguration(client2, integrationSlug);
|
147357
147804
|
} catch (error3) {
|
147358
147805
|
client2.output.error(
|
147359
|
-
`Failed to fetch configuration for ${
|
147806
|
+
`Failed to fetch configuration for ${import_chalk93.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
|
147360
147807
|
);
|
147361
147808
|
return 1;
|
147362
147809
|
}
|
147363
147810
|
if (!configuration) {
|
147364
147811
|
client2.output.error(
|
147365
|
-
`No configuration found for ${
|
147812
|
+
`No configuration found for ${import_chalk93.default.bold(`"${integrationSlug}"`)}.`
|
147366
147813
|
);
|
147367
147814
|
return 1;
|
147368
147815
|
}
|
147369
147816
|
client2.output.print(
|
147370
|
-
`Opening the ${
|
147817
|
+
`Opening the ${import_chalk93.default.bold(integrationSlug)} dashboard...`
|
147371
147818
|
);
|
147372
|
-
|
147373
|
-
url3.searchParams.set("teamId", team.id);
|
147374
|
-
url3.searchParams.set("integrationConfigurationId", configuration.id);
|
147375
|
-
(0, import_open4.default)(url3.href);
|
147819
|
+
(0, import_open4.default)(buildSSOLink(team, configuration.id));
|
147376
147820
|
return 0;
|
147377
147821
|
}
|
147378
147822
|
async function getFirstConfiguration(client2, integrationSlug) {
|
@@ -147382,14 +147826,15 @@ async function getFirstConfiguration(client2, integrationSlug) {
|
|
147382
147826
|
);
|
147383
147827
|
return configurations.length > 0 ? configurations[0] : void 0;
|
147384
147828
|
}
|
147385
|
-
var
|
147829
|
+
var import_chalk93, import_open4;
|
147386
147830
|
var init_open_integration = __esm({
|
147387
147831
|
"src/commands/integration/open-integration.ts"() {
|
147388
147832
|
"use strict";
|
147389
|
-
|
147833
|
+
import_chalk93 = __toESM3(require_source());
|
147390
147834
|
import_open4 = __toESM3(require_open());
|
147391
147835
|
init_get_scope();
|
147392
|
-
|
147836
|
+
init_fetch_marketplace_integrations();
|
147837
|
+
init_build_sso_link();
|
147393
147838
|
}
|
147394
147839
|
});
|
147395
147840
|
|
@@ -147399,7 +147844,11 @@ __export3(integration_exports, {
|
|
147399
147844
|
default: () => main9
|
147400
147845
|
});
|
147401
147846
|
async function main9(client2) {
|
147402
|
-
const { args: args2, flags } = parseArguments(
|
147847
|
+
const { args: args2, flags } = parseArguments(
|
147848
|
+
client2.argv.slice(2),
|
147849
|
+
getFlagsSpecification(integrationCommand.options),
|
147850
|
+
{ permissive: true }
|
147851
|
+
);
|
147403
147852
|
const { subcommand, args: subArgs } = getSubcommand(
|
147404
147853
|
args2.slice(1),
|
147405
147854
|
COMMAND_CONFIG9
|
@@ -147414,6 +147863,9 @@ async function main9(client2) {
|
|
147414
147863
|
case "add": {
|
147415
147864
|
return add6(client2, subArgs);
|
147416
147865
|
}
|
147866
|
+
case "list": {
|
147867
|
+
return list2(client2);
|
147868
|
+
}
|
147417
147869
|
case "open": {
|
147418
147870
|
return openIntegration(client2, subArgs);
|
147419
147871
|
}
|
@@ -147428,15 +147880,18 @@ var init_integration = __esm({
|
|
147428
147880
|
"src/commands/integration/index.ts"() {
|
147429
147881
|
"use strict";
|
147430
147882
|
init_get_args();
|
147883
|
+
init_get_flags_specification();
|
147431
147884
|
init_get_invalid_subcommand();
|
147432
147885
|
init_get_subcommand();
|
147433
147886
|
init_help();
|
147434
147887
|
init_add5();
|
147435
147888
|
init_command16();
|
147889
|
+
init_list2();
|
147436
147890
|
init_open_integration();
|
147437
147891
|
COMMAND_CONFIG9 = {
|
147438
147892
|
add: ["add"],
|
147439
|
-
open: ["open"]
|
147893
|
+
open: ["open"],
|
147894
|
+
list: ["list", "ls"]
|
147440
147895
|
};
|
147441
147896
|
}
|
147442
147897
|
});
|
@@ -147659,7 +148114,7 @@ var init_command18 = __esm({
|
|
147659
148114
|
// src/commands/list/index.ts
|
147660
148115
|
var list_exports = {};
|
147661
148116
|
__export3(list_exports, {
|
147662
|
-
default: () =>
|
148117
|
+
default: () => list3,
|
147663
148118
|
getDeploymentDuration: () => getDeploymentDuration,
|
147664
148119
|
stateString: () => stateString2
|
147665
148120
|
});
|
@@ -147672,7 +148127,7 @@ function toDate(timestamp) {
|
|
147672
148127
|
};
|
147673
148128
|
return date.toLocaleDateString("en-US", options);
|
147674
148129
|
}
|
147675
|
-
async function
|
148130
|
+
async function list3(client2) {
|
147676
148131
|
const { print, log: log2, warn, error: error3, note, debug: debug3, spinner } = client2.output;
|
147677
148132
|
let parsedArgs = null;
|
147678
148133
|
const flagsSpecification = getFlagsSpecification(listCommand.options);
|
@@ -147773,7 +148228,7 @@ async function list2(client2) {
|
|
147773
148228
|
}
|
147774
148229
|
const projectSlugLink = formatProject(client2, contextName, project.name);
|
147775
148230
|
if (!singleDeployment) {
|
147776
|
-
spinner(`Fetching deployments in ${
|
148231
|
+
spinner(`Fetching deployments in ${import_chalk94.default.bold(contextName)}`);
|
147777
148232
|
const start = Date.now();
|
147778
148233
|
debug3("Fetching deployments");
|
147779
148234
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
@@ -147813,7 +148268,7 @@ async function list2(client2) {
|
|
147813
148268
|
const urls = [];
|
147814
148269
|
const tablePrint = table(
|
147815
148270
|
[
|
147816
|
-
headers.map((header) =>
|
148271
|
+
headers.map((header) => import_chalk94.default.bold(import_chalk94.default.cyan(header))),
|
147817
148272
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
147818
148273
|
urls.push(`https://${dep.url}`);
|
147819
148274
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
@@ -147823,16 +148278,16 @@ async function list2(client2) {
|
|
147823
148278
|
const targetName = dep.customEnvironment?.name || (dep.target === "production" ? "Production" : "Preview");
|
147824
148279
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
147825
148280
|
return [
|
147826
|
-
|
148281
|
+
import_chalk94.default.gray(createdAt),
|
147827
148282
|
`https://${dep.url}`,
|
147828
148283
|
stateString2(dep.readyState || ""),
|
147829
148284
|
formatEnvironment(client2, contextName, project.name, {
|
147830
148285
|
id: targetSlug,
|
147831
148286
|
name: targetName
|
147832
148287
|
}),
|
147833
|
-
...!showPolicy ? [
|
147834
|
-
...!showPolicy ? [
|
147835
|
-
...showPolicy ? [
|
148288
|
+
...!showPolicy ? [import_chalk94.default.gray(getDeploymentDuration(dep))] : [],
|
148289
|
+
...!showPolicy ? [import_chalk94.default.gray(dep.creator?.username)] : [],
|
148290
|
+
...showPolicy ? [import_chalk94.default.gray(proposedExp)] : []
|
147836
148291
|
];
|
147837
148292
|
}).filter(
|
147838
148293
|
(app2) => (
|
@@ -147873,23 +148328,23 @@ function getDeploymentDuration(dep) {
|
|
147873
148328
|
}
|
147874
148329
|
function stateString2(s) {
|
147875
148330
|
const CIRCLE = "\u25CF ";
|
147876
|
-
const sTitle = (0,
|
148331
|
+
const sTitle = (0, import_title7.default)(s);
|
147877
148332
|
switch (s) {
|
147878
148333
|
case "INITIALIZING":
|
147879
148334
|
case "BUILDING":
|
147880
148335
|
case "DEPLOYING":
|
147881
148336
|
case "ANALYZING":
|
147882
|
-
return
|
148337
|
+
return import_chalk94.default.yellow(CIRCLE) + sTitle;
|
147883
148338
|
case "ERROR":
|
147884
|
-
return
|
148339
|
+
return import_chalk94.default.red(CIRCLE) + sTitle;
|
147885
148340
|
case "READY":
|
147886
|
-
return
|
148341
|
+
return import_chalk94.default.green(CIRCLE) + sTitle;
|
147887
148342
|
case "QUEUED":
|
147888
|
-
return
|
148343
|
+
return import_chalk94.default.white(CIRCLE) + sTitle;
|
147889
148344
|
case "CANCELED":
|
147890
|
-
return
|
148345
|
+
return import_chalk94.default.gray(sTitle);
|
147891
148346
|
default:
|
147892
|
-
return
|
148347
|
+
return import_chalk94.default.gray("UNKNOWN");
|
147893
148348
|
}
|
147894
148349
|
}
|
147895
148350
|
function sortByCreatedAt(a, b) {
|
@@ -147905,13 +148360,13 @@ function filterUniqueApps() {
|
|
147905
148360
|
return true;
|
147906
148361
|
};
|
147907
148362
|
}
|
147908
|
-
var import_ms19,
|
147909
|
-
var
|
148363
|
+
var import_ms19, import_chalk94, import_title7, import_error_utils26;
|
148364
|
+
var init_list3 = __esm({
|
147910
148365
|
"src/commands/list/index.ts"() {
|
147911
148366
|
"use strict";
|
147912
148367
|
import_ms19 = __toESM3(require_ms2());
|
147913
|
-
|
147914
|
-
|
148368
|
+
import_chalk94 = __toESM3(require_source());
|
148369
|
+
import_title7 = __toESM3(require_lib4());
|
147915
148370
|
init_table();
|
147916
148371
|
init_get_args();
|
147917
148372
|
init_error2();
|
@@ -147996,7 +148451,7 @@ async function logs(client2) {
|
|
147996
148451
|
} catch {
|
147997
148452
|
}
|
147998
148453
|
spinner(
|
147999
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
148454
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk95.default.bold(contextName)}`
|
148000
148455
|
);
|
148001
148456
|
let deployment;
|
148002
148457
|
try {
|
@@ -148032,19 +148487,19 @@ function printDisclaimer(deployment, { print, warn }) {
|
|
148032
148487
|
`This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
|
148033
148488
|
);
|
148034
148489
|
print(
|
148035
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
148490
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk95.default.dim(
|
148036
148491
|
deployment.id
|
148037
|
-
)}) starting from ${
|
148492
|
+
)}) starting from ${import_chalk95.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
|
148038
148493
|
|
148039
148494
|
`
|
148040
148495
|
);
|
148041
148496
|
}
|
148042
|
-
var import_error_utils27,
|
148497
|
+
var import_error_utils27, import_chalk95, import_format2, deprecatedFlags, dateTimeFormat2;
|
148043
148498
|
var init_logs2 = __esm({
|
148044
148499
|
"src/commands/logs/index.ts"() {
|
148045
148500
|
"use strict";
|
148046
148501
|
import_error_utils27 = __toESM3(require_dist2());
|
148047
|
-
|
148502
|
+
import_chalk95 = __toESM3(require_source());
|
148048
148503
|
import_format2 = __toESM3(require_format());
|
148049
148504
|
init_build_state();
|
148050
148505
|
init_is_deploying();
|
@@ -148058,7 +148513,7 @@ var init_logs2 = __esm({
|
|
148058
148513
|
init_param();
|
148059
148514
|
init_pkg_name();
|
148060
148515
|
init_help();
|
148061
|
-
|
148516
|
+
init_list3();
|
148062
148517
|
init_command3();
|
148063
148518
|
deprecatedFlags = [
|
148064
148519
|
"--follow",
|
@@ -148213,7 +148668,7 @@ async function login2(client2) {
|
|
148213
148668
|
writeToConfigFile(output2, client2.config);
|
148214
148669
|
output2.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
148215
148670
|
output2.print(
|
148216
|
-
`${
|
148671
|
+
`${import_chalk96.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
148217
148672
|
`
|
148218
148673
|
);
|
148219
148674
|
output2.print(
|
@@ -148225,12 +148680,12 @@ async function login2(client2) {
|
|
148225
148680
|
);
|
148226
148681
|
return 0;
|
148227
148682
|
}
|
148228
|
-
var import_email_validator,
|
148683
|
+
var import_email_validator, import_chalk96;
|
148229
148684
|
var init_login2 = __esm({
|
148230
148685
|
"src/commands/login/index.ts"() {
|
148231
148686
|
"use strict";
|
148232
148687
|
import_email_validator = __toESM3(require_email_validator());
|
148233
|
-
|
148688
|
+
import_chalk96 = __toESM3(require_source());
|
148234
148689
|
init_humanize_path();
|
148235
148690
|
init_get_args();
|
148236
148691
|
init_prompt();
|
@@ -148355,12 +148810,12 @@ async function add7(client2, args2, contextName) {
|
|
148355
148810
|
const { output: output2 } = client2;
|
148356
148811
|
if (args2.length !== 1) {
|
148357
148812
|
output2.error(
|
148358
|
-
`Invalid number of arguments. Usage: ${
|
148813
|
+
`Invalid number of arguments. Usage: ${import_chalk97.default.cyan(
|
148359
148814
|
`${getCommandName("project add <name>")}`
|
148360
148815
|
)}`
|
148361
148816
|
);
|
148362
148817
|
if (args2.length > 1) {
|
148363
|
-
const example =
|
148818
|
+
const example = import_chalk97.default.cyan(
|
148364
148819
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
148365
148820
|
);
|
148366
148821
|
output2.log(
|
@@ -148386,17 +148841,17 @@ async function add7(client2, args2, contextName) {
|
|
148386
148841
|
}
|
148387
148842
|
const elapsed2 = (0, import_ms20.default)(Date.now() - start);
|
148388
148843
|
output2.log(
|
148389
|
-
`${
|
148844
|
+
`${import_chalk97.default.cyan("Success!")} Project ${import_chalk97.default.bold(
|
148390
148845
|
name.toLowerCase()
|
148391
|
-
)} added (${
|
148846
|
+
)} added (${import_chalk97.default.bold(contextName)}) ${import_chalk97.default.gray(`[${elapsed2}]`)}`
|
148392
148847
|
);
|
148393
148848
|
return;
|
148394
148849
|
}
|
148395
|
-
var
|
148850
|
+
var import_chalk97, import_ms20;
|
148396
148851
|
var init_add6 = __esm({
|
148397
148852
|
"src/commands/project/add.ts"() {
|
148398
148853
|
"use strict";
|
148399
|
-
|
148854
|
+
import_chalk97 = __toESM3(require_source());
|
148400
148855
|
import_ms20 = __toESM3(require_ms2());
|
148401
148856
|
init_errors_ts();
|
148402
148857
|
init_pkg_name();
|
@@ -148405,18 +148860,18 @@ var init_add6 = __esm({
|
|
148405
148860
|
});
|
148406
148861
|
|
148407
148862
|
// src/commands/project/list.ts
|
148408
|
-
async function
|
148863
|
+
async function list4(client2, argv, args2, contextName) {
|
148409
148864
|
const { output: output2 } = client2;
|
148410
148865
|
if (args2.length !== 0) {
|
148411
148866
|
output2.error(
|
148412
|
-
`Invalid number of arguments. Usage: ${
|
148867
|
+
`Invalid number of arguments. Usage: ${import_chalk98.default.cyan(
|
148413
148868
|
`${getCommandName("project ls")}`
|
148414
148869
|
)}`
|
148415
148870
|
);
|
148416
148871
|
return 2;
|
148417
148872
|
}
|
148418
148873
|
const start = Date.now();
|
148419
|
-
output2.spinner(`Fetching projects in ${
|
148874
|
+
output2.spinner(`Fetching projects in ${import_chalk98.default.bold(contextName)}`);
|
148420
148875
|
let projectsUrl = `/v9/projects?limit=20`;
|
148421
148876
|
const deprecated = argv["--update-required"] || false;
|
148422
148877
|
if (deprecated) {
|
@@ -148451,19 +148906,19 @@ async function list3(client2, argv, args2, contextName) {
|
|
148451
148906
|
);
|
148452
148907
|
}
|
148453
148908
|
output2.log(
|
148454
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
148909
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk98.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk98.default.gray(`[${elapsed2}]`)}`
|
148455
148910
|
);
|
148456
148911
|
if (projectList.length > 0) {
|
148457
148912
|
const tablePrint = table(
|
148458
148913
|
[
|
148459
148914
|
["Project Name", "Latest Production URL", "Updated"].map(
|
148460
|
-
(header) =>
|
148915
|
+
(header) => import_chalk98.default.bold(import_chalk98.default.cyan(header))
|
148461
148916
|
),
|
148462
148917
|
...projectList.map((project) => [
|
148463
148918
|
[
|
148464
|
-
|
148919
|
+
import_chalk98.default.bold(project.name),
|
148465
148920
|
getLatestProdUrl(project),
|
148466
|
-
|
148921
|
+
import_chalk98.default.gray((0, import_ms21.default)(Date.now() - project.updatedAt))
|
148467
148922
|
]
|
148468
148923
|
]).flat()
|
148469
148924
|
],
|
@@ -148487,11 +148942,11 @@ function getLatestProdUrl(project) {
|
|
148487
148942
|
return "https://" + alias2;
|
148488
148943
|
return "--";
|
148489
148944
|
}
|
148490
|
-
var
|
148491
|
-
var
|
148945
|
+
var import_chalk98, import_ms21, import_build_utils17;
|
148946
|
+
var init_list4 = __esm({
|
148492
148947
|
"src/commands/project/list.ts"() {
|
148493
148948
|
"use strict";
|
148494
|
-
|
148949
|
+
import_chalk98 = __toESM3(require_source());
|
148495
148950
|
import_ms21 = __toESM3(require_ms2());
|
148496
148951
|
init_table();
|
148497
148952
|
init_get_command_flags();
|
@@ -148504,7 +148959,7 @@ var init_list3 = __esm({
|
|
148504
148959
|
async function rm6(client2, args2) {
|
148505
148960
|
if (args2.length !== 1) {
|
148506
148961
|
client2.output.error(
|
148507
|
-
`Invalid number of arguments. Usage: ${
|
148962
|
+
`Invalid number of arguments. Usage: ${import_chalk99.default.cyan(
|
148508
148963
|
`${getCommandName("project rm <name>")}`
|
148509
148964
|
)}`
|
148510
148965
|
);
|
@@ -148533,7 +148988,7 @@ async function rm6(client2, args2) {
|
|
148533
148988
|
}
|
148534
148989
|
const elapsed2 = (0, import_ms22.default)(Date.now() - start);
|
148535
148990
|
client2.output.log(
|
148536
|
-
`${
|
148991
|
+
`${import_chalk99.default.cyan("Success!")} Project ${import_chalk99.default.bold(name)} removed ${import_chalk99.default.gray(
|
148537
148992
|
`[${elapsed2}]`
|
148538
148993
|
)}`
|
148539
148994
|
);
|
@@ -148542,19 +148997,19 @@ async function rm6(client2, args2) {
|
|
148542
148997
|
async function readConfirmation3(client2, projectName) {
|
148543
148998
|
client2.output.print(
|
148544
148999
|
prependEmoji(
|
148545
|
-
`The project ${
|
149000
|
+
`The project ${import_chalk99.default.bold(projectName)} will be removed permanently.
|
148546
149001
|
It will also delete everything under the project including deployments.
|
148547
149002
|
`,
|
148548
149003
|
emoji("warning")
|
148549
149004
|
)
|
148550
149005
|
);
|
148551
|
-
return await confirm(client2, `${
|
149006
|
+
return await confirm(client2, `${import_chalk99.default.bold.red("Are you sure?")}`, false);
|
148552
149007
|
}
|
148553
|
-
var
|
149008
|
+
var import_chalk99, import_ms22, e;
|
148554
149009
|
var init_rm6 = __esm({
|
148555
149010
|
"src/commands/project/rm.ts"() {
|
148556
149011
|
"use strict";
|
148557
|
-
|
149012
|
+
import_chalk99 = __toESM3(require_source());
|
148558
149013
|
import_ms22 = __toESM3(require_ms2());
|
148559
149014
|
init_emoji();
|
148560
149015
|
init_errors_ts();
|
@@ -148676,7 +149131,7 @@ async function main11(client2) {
|
|
148676
149131
|
switch (subcommand) {
|
148677
149132
|
case "ls":
|
148678
149133
|
case "list":
|
148679
|
-
return await
|
149134
|
+
return await list4(client2, parsedArgs.flags, args2, contextName);
|
148680
149135
|
case "add":
|
148681
149136
|
return await add7(client2, args2, contextName);
|
148682
149137
|
case "rm":
|
@@ -148700,7 +149155,7 @@ var init_project = __esm({
|
|
148700
149155
|
init_handle_error();
|
148701
149156
|
init_help();
|
148702
149157
|
init_add6();
|
148703
|
-
|
149158
|
+
init_list4();
|
148704
149159
|
init_rm6();
|
148705
149160
|
init_command21();
|
148706
149161
|
init_get_flags_specification();
|
@@ -148763,7 +149218,7 @@ async function getProjectByDeployment({
|
|
148763
149218
|
let team;
|
148764
149219
|
try {
|
148765
149220
|
output2?.spinner(
|
148766
|
-
`Fetching deployment "${deployId}" in ${
|
149221
|
+
`Fetching deployment "${deployId}" in ${import_chalk100.default.bold(contextName)}\u2026`
|
148767
149222
|
);
|
148768
149223
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
148769
149224
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -148780,12 +149235,12 @@ async function getProjectByDeployment({
|
|
148780
149235
|
team = teamResult.value;
|
148781
149236
|
deployment = deploymentResult.value;
|
148782
149237
|
output2?.log(
|
148783
|
-
`Fetching deployment "${deployId}" in ${
|
149238
|
+
`Fetching deployment "${deployId}" in ${import_chalk100.default.bold(contextName)}\u2026`
|
148784
149239
|
);
|
148785
149240
|
if (deployment.team?.id) {
|
148786
149241
|
if (!team || deployment.team.id !== team.id) {
|
148787
149242
|
const err = new Error(
|
148788
|
-
team ? `Deployment doesn't belong to current team ${
|
149243
|
+
team ? `Deployment doesn't belong to current team ${import_chalk100.default.bold(
|
148789
149244
|
contextName
|
148790
149245
|
)}` : `Deployment belongs to a different team`
|
148791
149246
|
);
|
@@ -148794,7 +149249,7 @@ async function getProjectByDeployment({
|
|
148794
149249
|
}
|
148795
149250
|
} else if (team) {
|
148796
149251
|
const err = new Error(
|
148797
|
-
`Deployment doesn't belong to current team ${
|
149252
|
+
`Deployment doesn't belong to current team ${import_chalk100.default.bold(contextName)}`
|
148798
149253
|
);
|
148799
149254
|
err.code = "ERR_INVALID_TEAM";
|
148800
149255
|
throw err;
|
@@ -148815,11 +149270,11 @@ async function getProjectByDeployment({
|
|
148815
149270
|
output2?.stopSpinner();
|
148816
149271
|
}
|
148817
149272
|
}
|
148818
|
-
var
|
149273
|
+
var import_chalk100;
|
148819
149274
|
var init_get_project_by_deployment = __esm({
|
148820
149275
|
"src/util/projects/get-project-by-deployment.ts"() {
|
148821
149276
|
"use strict";
|
148822
|
-
|
149277
|
+
import_chalk100 = __toESM3(require_source());
|
148823
149278
|
init_get_deployment();
|
148824
149279
|
init_get_project_by_id_or_name();
|
148825
149280
|
init_get_scope();
|
@@ -148832,21 +149287,21 @@ var init_get_project_by_deployment = __esm({
|
|
148832
149287
|
// src/util/alias/render-alias-status.ts
|
148833
149288
|
function renderAliasStatus(status2) {
|
148834
149289
|
if (status2 === "completed") {
|
148835
|
-
return
|
149290
|
+
return import_chalk101.default.green(status2);
|
148836
149291
|
}
|
148837
149292
|
if (status2 === "failed") {
|
148838
|
-
return
|
149293
|
+
return import_chalk101.default.red(status2);
|
148839
149294
|
}
|
148840
149295
|
if (status2 === "skipped") {
|
148841
|
-
return
|
149296
|
+
return import_chalk101.default.gray(status2);
|
148842
149297
|
}
|
148843
|
-
return
|
149298
|
+
return import_chalk101.default.yellow(status2);
|
148844
149299
|
}
|
148845
|
-
var
|
149300
|
+
var import_chalk101;
|
148846
149301
|
var init_render_alias_status = __esm({
|
148847
149302
|
"src/util/alias/render-alias-status.ts"() {
|
148848
149303
|
"use strict";
|
148849
|
-
|
149304
|
+
import_chalk101 = __toESM3(require_source());
|
148850
149305
|
}
|
148851
149306
|
});
|
148852
149307
|
|
@@ -148921,7 +149376,7 @@ async function promoteStatus({
|
|
148921
149376
|
}
|
148922
149377
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
148923
149378
|
output2.log(
|
148924
|
-
`The promotion exceeded its deadline - rerun ${
|
149379
|
+
`The promotion exceeded its deadline - rerun ${import_chalk102.default.bold(
|
148925
149380
|
`${packageName} promote ${toDeploymentId}`
|
148926
149381
|
)} to try again`
|
148927
149382
|
);
|
@@ -148987,26 +149442,26 @@ async function renderJobSucceeded({
|
|
148987
149442
|
let deploymentInfo = "";
|
148988
149443
|
try {
|
148989
149444
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
148990
|
-
deploymentInfo = `${
|
149445
|
+
deploymentInfo = `${import_chalk102.default.bold(deployment.url)} (${toDeploymentId})`;
|
148991
149446
|
} catch (err) {
|
148992
149447
|
output2.debug(
|
148993
149448
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
148994
149449
|
);
|
148995
|
-
deploymentInfo =
|
149450
|
+
deploymentInfo = import_chalk102.default.bold(toDeploymentId);
|
148996
149451
|
}
|
148997
149452
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
148998
149453
|
output2.log(
|
148999
|
-
`Success! ${
|
149454
|
+
`Success! ${import_chalk102.default.bold(
|
149000
149455
|
project.name
|
149001
149456
|
)} was promoted to ${deploymentInfo} ${duration}`
|
149002
149457
|
);
|
149003
149458
|
return 0;
|
149004
149459
|
}
|
149005
|
-
var
|
149460
|
+
var import_chalk102, import_ms23;
|
149006
149461
|
var init_status = __esm({
|
149007
149462
|
"src/commands/promote/status.ts"() {
|
149008
149463
|
"use strict";
|
149009
|
-
|
149464
|
+
import_chalk102 = __toESM3(require_source());
|
149010
149465
|
init_elapsed();
|
149011
149466
|
init_format_date();
|
149012
149467
|
init_get_deployment();
|
@@ -149063,7 +149518,7 @@ async function requestPromote({
|
|
149063
149518
|
}
|
149064
149519
|
);
|
149065
149520
|
output2.log(
|
149066
|
-
`Successfully created new deployment of ${
|
149521
|
+
`Successfully created new deployment of ${import_chalk103.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
149067
149522
|
);
|
149068
149523
|
return 0;
|
149069
149524
|
} else {
|
@@ -149076,7 +149531,7 @@ async function requestPromote({
|
|
149076
149531
|
}
|
149077
149532
|
if (timeout !== void 0 && (0, import_ms24.default)(timeout) === 0) {
|
149078
149533
|
output2.log(
|
149079
|
-
`Successfully requested promote of ${
|
149534
|
+
`Successfully requested promote of ${import_chalk103.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
149080
149535
|
);
|
149081
149536
|
output2.log(`To check promote status, run ${getCommandName("promote")}.`);
|
149082
149537
|
return 0;
|
@@ -149089,11 +149544,11 @@ async function requestPromote({
|
|
149089
149544
|
timeout
|
149090
149545
|
});
|
149091
149546
|
}
|
149092
|
-
var
|
149547
|
+
var import_chalk103, import_ms24;
|
149093
149548
|
var init_request_promote = __esm({
|
149094
149549
|
"src/commands/promote/request-promote.ts"() {
|
149095
149550
|
"use strict";
|
149096
|
-
|
149551
|
+
import_chalk103 = __toESM3(require_source());
|
149097
149552
|
init_pkg_name();
|
149098
149553
|
init_get_project_by_deployment();
|
149099
149554
|
import_ms24 = __toESM3(require_ms2());
|
@@ -149255,7 +149710,7 @@ async function getDeploymentByIdOrURL({
|
|
149255
149710
|
let team;
|
149256
149711
|
try {
|
149257
149712
|
output2.spinner(
|
149258
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
149713
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk104.default.bold(contextName)}\u2026`
|
149259
149714
|
);
|
149260
149715
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
149261
149716
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -149272,7 +149727,7 @@ async function getDeploymentByIdOrURL({
|
|
149272
149727
|
team = teamResult.value;
|
149273
149728
|
deployment = deploymentResult.value;
|
149274
149729
|
output2.log(
|
149275
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
149730
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk104.default.bold(contextName)}\u2026`
|
149276
149731
|
);
|
149277
149732
|
} finally {
|
149278
149733
|
output2.stopSpinner();
|
@@ -149280,7 +149735,7 @@ async function getDeploymentByIdOrURL({
|
|
149280
149735
|
if (deployment.team?.id) {
|
149281
149736
|
if (!team || deployment.team.id !== team.id) {
|
149282
149737
|
const err = new Error(
|
149283
|
-
team ? `Deployment doesn't belong to current team ${
|
149738
|
+
team ? `Deployment doesn't belong to current team ${import_chalk104.default.bold(
|
149284
149739
|
contextName
|
149285
149740
|
)}` : `Deployment belongs to a different team`
|
149286
149741
|
);
|
@@ -149289,18 +149744,18 @@ async function getDeploymentByIdOrURL({
|
|
149289
149744
|
}
|
149290
149745
|
} else if (team) {
|
149291
149746
|
const err = new Error(
|
149292
|
-
`Deployment doesn't belong to current team ${
|
149747
|
+
`Deployment doesn't belong to current team ${import_chalk104.default.bold(contextName)}`
|
149293
149748
|
);
|
149294
149749
|
err.code = "ERR_INVALID_TEAM";
|
149295
149750
|
throw err;
|
149296
149751
|
}
|
149297
149752
|
return deployment;
|
149298
149753
|
}
|
149299
|
-
var
|
149754
|
+
var import_chalk104;
|
149300
149755
|
var init_get_deployment_by_id_or_url = __esm({
|
149301
149756
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
149302
149757
|
"use strict";
|
149303
|
-
|
149758
|
+
import_chalk104 = __toESM3(require_source());
|
149304
149759
|
init_get_deployment();
|
149305
149760
|
init_get_team_by_id();
|
149306
149761
|
init_is_valid_name();
|
@@ -149399,14 +149854,14 @@ async function redeploy(client2) {
|
|
149399
149854
|
const previewUrl = `https://${deployment.url}`;
|
149400
149855
|
output2.print(
|
149401
149856
|
`${prependEmoji(
|
149402
|
-
`Inspect: ${
|
149857
|
+
`Inspect: ${import_chalk105.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
149403
149858
|
emoji("inspect")
|
149404
149859
|
)}
|
149405
149860
|
`
|
149406
149861
|
);
|
149407
149862
|
output2.print(
|
149408
149863
|
prependEmoji(
|
149409
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
149864
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk105.default.bold(
|
149410
149865
|
previewUrl
|
149411
149866
|
)} ${deployStamp()}`,
|
149412
149867
|
emoji("success")
|
@@ -149435,7 +149890,7 @@ async function redeploy(client2) {
|
|
149435
149890
|
token: client2.authConfig.token,
|
149436
149891
|
userAgent: ua_default
|
149437
149892
|
};
|
149438
|
-
for await (const event of (0,
|
149893
|
+
for await (const event of (0, import_client12.checkDeploymentStatus)(
|
149439
149894
|
deployment,
|
149440
149895
|
clientOptions
|
149441
149896
|
)) {
|
@@ -149476,18 +149931,18 @@ async function redeploy(client2) {
|
|
149476
149931
|
output2.prettyError(err);
|
149477
149932
|
if ((0, import_error_utils30.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
149478
149933
|
output2.error(
|
149479
|
-
`Use ${
|
149934
|
+
`Use ${import_chalk105.default.bold("vc switch")} to change your current team`
|
149480
149935
|
);
|
149481
149936
|
}
|
149482
149937
|
return 1;
|
149483
149938
|
}
|
149484
149939
|
}
|
149485
|
-
var
|
149940
|
+
var import_chalk105, import_client12, import_error_utils30;
|
149486
149941
|
var init_redeploy = __esm({
|
149487
149942
|
"src/commands/redeploy/index.ts"() {
|
149488
149943
|
"use strict";
|
149489
|
-
|
149490
|
-
|
149944
|
+
import_chalk105 = __toESM3(require_source());
|
149945
|
+
import_client12 = __toESM3(require_dist12());
|
149491
149946
|
init_emoji();
|
149492
149947
|
init_get_args();
|
149493
149948
|
init_pkg_name();
|
@@ -149696,7 +150151,7 @@ async function remove3(client2) {
|
|
149696
150151
|
}
|
149697
150152
|
const { contextName } = await getScope(client2);
|
149698
150153
|
output2.spinner(
|
149699
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
150154
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk106.default.bold(contextName)}`
|
149700
150155
|
);
|
149701
150156
|
let aliases;
|
149702
150157
|
let projects;
|
@@ -149762,12 +150217,12 @@ async function remove3(client2) {
|
|
149762
150217
|
});
|
149763
150218
|
if (deployments.length === 0 && projects.length === 0) {
|
149764
150219
|
log2(
|
149765
|
-
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) =>
|
150220
|
+
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) => import_chalk106.default.bold(`"${id}"`)).join(", ")}. Run ${getCommandName("projects ls")} to list.`
|
149766
150221
|
);
|
149767
150222
|
return 1;
|
149768
150223
|
}
|
149769
150224
|
log2(
|
149770
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
150225
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk106.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
149771
150226
|
);
|
149772
150227
|
if (deployments.length > 200) {
|
149773
150228
|
output2.warn(
|
@@ -149794,11 +150249,11 @@ async function remove3(client2) {
|
|
149794
150249
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
149795
150250
|
);
|
149796
150251
|
deployments.forEach((depl) => {
|
149797
|
-
output2.print(`${
|
150252
|
+
output2.print(`${import_chalk106.default.gray("-")} ${import_chalk106.default.bold(depl.url)}
|
149798
150253
|
`);
|
149799
150254
|
});
|
149800
150255
|
projects.forEach((project) => {
|
149801
|
-
output2.print(`${
|
150256
|
+
output2.print(`${import_chalk106.default.gray("-")} ${import_chalk106.default.bold(project.name)}
|
149802
150257
|
`);
|
149803
150258
|
});
|
149804
150259
|
return 0;
|
@@ -149815,8 +150270,8 @@ function readConfirmation4(deployments, projects, output2) {
|
|
149815
150270
|
);
|
149816
150271
|
const deploymentTable = table(
|
149817
150272
|
deployments.map((depl) => {
|
149818
|
-
const time =
|
149819
|
-
const url3 = depl.url ?
|
150273
|
+
const time = import_chalk106.default.gray(`${(0, import_ms26.default)(Date.now() - depl.createdAt)} ago`);
|
150274
|
+
const url3 = depl.url ? import_chalk106.default.underline(`https://${depl.url}`) : "";
|
149820
150275
|
return [` ${depl.id}`, url3, time];
|
149821
150276
|
}),
|
149822
150277
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -149827,7 +150282,7 @@ function readConfirmation4(deployments, projects, output2) {
|
|
149827
150282
|
for (const depl of deployments) {
|
149828
150283
|
for (const { alias: alias2 } of depl.aliases) {
|
149829
150284
|
output2.warn(
|
149830
|
-
`${
|
150285
|
+
`${import_chalk106.default.underline(`https://${alias2}`)} is an alias for ${import_chalk106.default.bold(depl.url)} and will be removed`
|
149831
150286
|
);
|
149832
150287
|
}
|
149833
150288
|
}
|
@@ -149841,12 +150296,12 @@ function readConfirmation4(deployments, projects, output2) {
|
|
149841
150296
|
`
|
149842
150297
|
);
|
149843
150298
|
for (const project of projects) {
|
149844
|
-
output2.print(`${
|
150299
|
+
output2.print(`${import_chalk106.default.gray("-")} ${import_chalk106.default.bold(project.name)}
|
149845
150300
|
`);
|
149846
150301
|
}
|
149847
150302
|
}
|
149848
150303
|
output2.print(
|
149849
|
-
`${
|
150304
|
+
`${import_chalk106.default.bold.red("> Are you sure?")} ${import_chalk106.default.gray("(y/N) ")}`
|
149850
150305
|
);
|
149851
150306
|
process.stdin.on("data", (d) => {
|
149852
150307
|
process.stdin.pause();
|
@@ -149863,11 +150318,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
149863
150318
|
}
|
149864
150319
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
149865
150320
|
}
|
149866
|
-
var
|
150321
|
+
var import_chalk106, import_ms26, import_pluralize11;
|
149867
150322
|
var init_remove = __esm({
|
149868
150323
|
"src/commands/remove/index.ts"() {
|
149869
150324
|
"use strict";
|
149870
|
-
|
150325
|
+
import_chalk106 = __toESM3(require_source());
|
149871
150326
|
import_ms26 = __toESM3(require_ms2());
|
149872
150327
|
import_pluralize11 = __toESM3(require_pluralize());
|
149873
150328
|
init_table();
|
@@ -149962,7 +150417,7 @@ async function rollbackStatus({
|
|
149962
150417
|
}
|
149963
150418
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
149964
150419
|
output2.log(
|
149965
|
-
`The rollback exceeded its deadline - rerun ${
|
150420
|
+
`The rollback exceeded its deadline - rerun ${import_chalk107.default.bold(
|
149966
150421
|
`${packageName} rollback ${toDeploymentId}`
|
149967
150422
|
)} to try again`
|
149968
150423
|
);
|
@@ -150028,26 +150483,26 @@ async function renderJobSucceeded2({
|
|
150028
150483
|
let deploymentInfo = "";
|
150029
150484
|
try {
|
150030
150485
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
150031
|
-
deploymentInfo = `${
|
150486
|
+
deploymentInfo = `${import_chalk107.default.bold(deployment.url)} (${toDeploymentId})`;
|
150032
150487
|
} catch (err) {
|
150033
150488
|
output2.debug(
|
150034
150489
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
150035
150490
|
);
|
150036
|
-
deploymentInfo =
|
150491
|
+
deploymentInfo = import_chalk107.default.bold(toDeploymentId);
|
150037
150492
|
}
|
150038
150493
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
150039
150494
|
output2.log(
|
150040
|
-
`Success! ${
|
150495
|
+
`Success! ${import_chalk107.default.bold(
|
150041
150496
|
project.name
|
150042
150497
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
150043
150498
|
);
|
150044
150499
|
return 0;
|
150045
150500
|
}
|
150046
|
-
var
|
150501
|
+
var import_chalk107, import_ms27;
|
150047
150502
|
var init_status2 = __esm({
|
150048
150503
|
"src/commands/rollback/status.ts"() {
|
150049
150504
|
"use strict";
|
150050
|
-
|
150505
|
+
import_chalk107 = __toESM3(require_source());
|
150051
150506
|
init_elapsed();
|
150052
150507
|
init_format_date();
|
150053
150508
|
init_get_deployment();
|
@@ -150080,7 +150535,7 @@ async function requestRollback({
|
|
150080
150535
|
});
|
150081
150536
|
if (timeout !== void 0 && (0, import_ms28.default)(timeout) === 0) {
|
150082
150537
|
output2.log(
|
150083
|
-
`Successfully requested rollback of ${
|
150538
|
+
`Successfully requested rollback of ${import_chalk108.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
150084
150539
|
);
|
150085
150540
|
output2.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
150086
150541
|
return 0;
|
@@ -150093,11 +150548,11 @@ async function requestRollback({
|
|
150093
150548
|
timeout
|
150094
150549
|
});
|
150095
150550
|
}
|
150096
|
-
var
|
150551
|
+
var import_chalk108, import_ms28;
|
150097
150552
|
var init_request_rollback = __esm({
|
150098
150553
|
"src/commands/rollback/request-rollback.ts"() {
|
150099
150554
|
"use strict";
|
150100
|
-
|
150555
|
+
import_chalk108 = __toESM3(require_source());
|
150101
150556
|
init_pkg_name();
|
150102
150557
|
init_get_project_by_deployment();
|
150103
150558
|
import_ms28 = __toESM3(require_ms2());
|
@@ -150165,13 +150620,43 @@ var init_command25 = __esm({
|
|
150165
150620
|
}
|
150166
150621
|
});
|
150167
150622
|
|
150623
|
+
// src/util/telemetry/commands/rollback/index.ts
|
150624
|
+
var RollbackTelemetryClient;
|
150625
|
+
var init_rollback = __esm({
|
150626
|
+
"src/util/telemetry/commands/rollback/index.ts"() {
|
150627
|
+
"use strict";
|
150628
|
+
init_telemetry();
|
150629
|
+
RollbackTelemetryClient = class extends TelemetryClient {
|
150630
|
+
trackCliSubcommandStatus() {
|
150631
|
+
this.trackCliSubcommand({
|
150632
|
+
subcommand: "status",
|
150633
|
+
value: "status"
|
150634
|
+
});
|
150635
|
+
}
|
150636
|
+
trackCliOptionTimeout(time) {
|
150637
|
+
if (time) {
|
150638
|
+
this.trackCliOption({
|
150639
|
+
flag: "timeout",
|
150640
|
+
value: "[TIME]"
|
150641
|
+
});
|
150642
|
+
}
|
150643
|
+
}
|
150644
|
+
trackCliFlagYes(yes) {
|
150645
|
+
if (yes) {
|
150646
|
+
this.trackCliFlag("yes");
|
150647
|
+
}
|
150648
|
+
}
|
150649
|
+
};
|
150650
|
+
}
|
150651
|
+
});
|
150652
|
+
|
150168
150653
|
// src/commands/rollback/index.ts
|
150169
150654
|
var rollback_exports = {};
|
150170
150655
|
__export3(rollback_exports, {
|
150171
150656
|
default: () => rollback_default
|
150172
150657
|
});
|
150173
150658
|
var import_error_utils31, import_ms29, rollback_default;
|
150174
|
-
var
|
150659
|
+
var init_rollback2 = __esm({
|
150175
150660
|
"src/commands/rollback/index.ts"() {
|
150176
150661
|
"use strict";
|
150177
150662
|
init_get_args();
|
@@ -150184,15 +150669,24 @@ var init_rollback = __esm({
|
|
150184
150669
|
init_help();
|
150185
150670
|
init_command25();
|
150186
150671
|
init_get_flags_specification();
|
150672
|
+
init_rollback();
|
150187
150673
|
rollback_default = async (client2) => {
|
150188
150674
|
let parsedArgs = null;
|
150189
150675
|
const flagsSpecification = getFlagsSpecification(rollbackCommand.options);
|
150676
|
+
const telemetry2 = new RollbackTelemetryClient({
|
150677
|
+
opts: {
|
150678
|
+
output: client2.output,
|
150679
|
+
store: client2.telemetryEventStore
|
150680
|
+
}
|
150681
|
+
});
|
150190
150682
|
try {
|
150191
150683
|
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
150192
150684
|
} catch (error3) {
|
150193
150685
|
handleError(error3);
|
150194
150686
|
return 1;
|
150195
150687
|
}
|
150688
|
+
telemetry2.trackCliOptionTimeout(parsedArgs.flags["--timeout"]);
|
150689
|
+
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
150196
150690
|
const { output: output2 } = client2;
|
150197
150691
|
if (parsedArgs.flags["--help"]) {
|
150198
150692
|
output2.print(help2(rollbackCommand, { columns: client2.stderr.columns }));
|
@@ -150206,6 +150700,7 @@ var init_rollback = __esm({
|
|
150206
150700
|
const actionOrDeployId = parsedArgs.args[1] || "status";
|
150207
150701
|
try {
|
150208
150702
|
if (actionOrDeployId === "status") {
|
150703
|
+
telemetry2.trackCliSubcommandStatus();
|
150209
150704
|
const project = await getProjectByCwdOrLink({
|
150210
150705
|
autoConfirm: Boolean(parsedArgs.flags["--yes"]),
|
150211
150706
|
client: client2,
|
@@ -150241,11 +150736,11 @@ var init_rollback = __esm({
|
|
150241
150736
|
});
|
150242
150737
|
|
150243
150738
|
// src/commands/target/list.ts
|
150244
|
-
async function
|
150739
|
+
async function list5(client2, argv, args2, link4) {
|
150245
150740
|
const { output: output2 } = client2;
|
150246
150741
|
if (args2.length !== 0) {
|
150247
150742
|
output2.error(
|
150248
|
-
`Invalid number of arguments. Usage: ${
|
150743
|
+
`Invalid number of arguments. Usage: ${import_chalk109.default.cyan(
|
150249
150744
|
`${getCommandName("target ls")}`
|
150250
150745
|
)}`
|
150251
150746
|
);
|
@@ -150269,12 +150764,12 @@ async function list4(client2, argv, args2, link4) {
|
|
150269
150764
|
const elapsed2 = (0, import_ms30.default)(Date.now() - start);
|
150270
150765
|
result = withDefaultEnvironmentsIncluded(result);
|
150271
150766
|
output2.log(
|
150272
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
150767
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk109.default.gray(`[${elapsed2}]`)}`
|
150273
150768
|
);
|
150274
150769
|
const tablePrint = table(
|
150275
150770
|
[
|
150276
150771
|
["Target Name", "Target Slug", "Target ID", "Type", "Updated"].map(
|
150277
|
-
(header) =>
|
150772
|
+
(header) => import_chalk109.default.bold(import_chalk109.default.cyan(header))
|
150278
150773
|
),
|
150279
150774
|
...result.map((target) => {
|
150280
150775
|
const type = target.type === "production" ? "Production" : target.type === "development" ? "Development" : "Preview";
|
@@ -150289,7 +150784,7 @@ async function list4(client2, argv, args2, link4) {
|
|
150289
150784
|
target.slug,
|
150290
150785
|
target.id,
|
150291
150786
|
type,
|
150292
|
-
|
150787
|
+
import_chalk109.default.gray(
|
150293
150788
|
target.updatedAt > 0 ? (0, import_ms30.default)(Date.now() - target.updatedAt) : "-"
|
150294
150789
|
)
|
150295
150790
|
]
|
@@ -150339,12 +150834,12 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
150339
150834
|
}
|
150340
150835
|
];
|
150341
150836
|
}
|
150342
|
-
var import_ms30,
|
150343
|
-
var
|
150837
|
+
var import_ms30, import_chalk109;
|
150838
|
+
var init_list5 = __esm({
|
150344
150839
|
"src/commands/target/list.ts"() {
|
150345
150840
|
"use strict";
|
150346
150841
|
import_ms30 = __toESM3(require_ms2());
|
150347
|
-
|
150842
|
+
import_chalk109 = __toESM3(require_source());
|
150348
150843
|
init_table();
|
150349
150844
|
init_pkg_name();
|
150350
150845
|
init_format_project();
|
@@ -150418,7 +150913,7 @@ async function main12(client2) {
|
|
150418
150913
|
switch (subcommand) {
|
150419
150914
|
case "ls":
|
150420
150915
|
case "list":
|
150421
|
-
return await
|
150916
|
+
return await list5(client2, parsedArgs.flags, args2, linkedProject);
|
150422
150917
|
default:
|
150423
150918
|
output2.error(getInvalidSubcommand(COMMAND_CONFIG11));
|
150424
150919
|
client2.output.print(
|
@@ -150434,7 +150929,7 @@ var init_target = __esm({
|
|
150434
150929
|
init_get_args();
|
150435
150930
|
init_get_invalid_subcommand();
|
150436
150931
|
init_help();
|
150437
|
-
|
150932
|
+
init_list5();
|
150438
150933
|
init_command26();
|
150439
150934
|
init_ensure_link();
|
150440
150935
|
init_get_flags_specification();
|
@@ -150446,13 +150941,13 @@ var init_target = __esm({
|
|
150446
150941
|
});
|
150447
150942
|
|
150448
150943
|
// src/commands/teams/command.ts
|
150449
|
-
var
|
150944
|
+
var listSubcommand2, teamsCommand;
|
150450
150945
|
var init_command27 = __esm({
|
150451
150946
|
"src/commands/teams/command.ts"() {
|
150452
150947
|
"use strict";
|
150453
150948
|
init_pkg_name();
|
150454
150949
|
init_arg_common();
|
150455
|
-
|
150950
|
+
listSubcommand2 = {
|
150456
150951
|
name: "ls",
|
150457
150952
|
description: "Show all teams you're a part of",
|
150458
150953
|
arguments: [],
|
@@ -150476,7 +150971,7 @@ var init_command27 = __esm({
|
|
150476
150971
|
options: [],
|
150477
150972
|
examples: []
|
150478
150973
|
},
|
150479
|
-
|
150974
|
+
listSubcommand2,
|
150480
150975
|
{
|
150481
150976
|
name: "switch",
|
150482
150977
|
description: "Switch to a different team",
|
@@ -150535,10 +151030,10 @@ var init_command27 = __esm({
|
|
150535
151030
|
});
|
150536
151031
|
|
150537
151032
|
// src/commands/teams/list.ts
|
150538
|
-
async function
|
151033
|
+
async function list6(client2) {
|
150539
151034
|
const { config: config2, output: output2 } = client2;
|
150540
151035
|
let parsedArgs = null;
|
150541
|
-
const flagsSpecification = getFlagsSpecification(
|
151036
|
+
const flagsSpecification = getFlagsSpecification(listSubcommand2.options);
|
150542
151037
|
try {
|
150543
151038
|
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
150544
151039
|
} catch (error3) {
|
@@ -150590,7 +151085,7 @@ async function list5(client2) {
|
|
150590
151085
|
client2.stdout.write("\n");
|
150591
151086
|
const teamTable = table(
|
150592
151087
|
[
|
150593
|
-
["id", "email / name"].map((str) => (0,
|
151088
|
+
["id", "email / name"].map((str) => (0, import_chalk110.gray)(str)),
|
150594
151089
|
...teamList.map((team) => [team.value, team.name])
|
150595
151090
|
],
|
150596
151091
|
{ hsep: 5 }
|
@@ -150607,13 +151102,13 @@ async function list5(client2) {
|
|
150607
151102
|
}
|
150608
151103
|
return 0;
|
150609
151104
|
}
|
150610
|
-
var
|
150611
|
-
var
|
151105
|
+
var import_chalk110;
|
151106
|
+
var init_list6 = __esm({
|
150612
151107
|
"src/commands/teams/list.ts"() {
|
150613
151108
|
"use strict";
|
150614
151109
|
init_chars();
|
150615
151110
|
init_table();
|
150616
|
-
|
151111
|
+
import_chalk110 = __toESM3(require_source());
|
150617
151112
|
init_get_user();
|
150618
151113
|
init_get_teams();
|
150619
151114
|
init_pkg_name();
|
@@ -150652,10 +151147,35 @@ var init_invite_user_to_team = __esm({
|
|
150652
151147
|
}
|
150653
151148
|
});
|
150654
151149
|
|
151150
|
+
// src/util/telemetry/commands/teams/invite.ts
|
151151
|
+
var TeamsInviteTelemetryClient;
|
151152
|
+
var init_invite = __esm({
|
151153
|
+
"src/util/telemetry/commands/teams/invite.ts"() {
|
151154
|
+
"use strict";
|
151155
|
+
init_telemetry();
|
151156
|
+
TeamsInviteTelemetryClient = class extends TelemetryClient {
|
151157
|
+
trackCliArgumentEmail(count) {
|
151158
|
+
if (count > 0) {
|
151159
|
+
this.trackCliArgument({
|
151160
|
+
arg: "email",
|
151161
|
+
value: count === 1 ? "ONE" : "MANY"
|
151162
|
+
});
|
151163
|
+
}
|
151164
|
+
}
|
151165
|
+
};
|
151166
|
+
}
|
151167
|
+
});
|
151168
|
+
|
150655
151169
|
// src/commands/teams/invite.ts
|
150656
151170
|
async function invite(client2, emails = [], { introMsg = "", noopMsg = "No changes made" } = {}) {
|
150657
|
-
const { config: config2, output: output2 } = client2;
|
151171
|
+
const { config: config2, output: output2, telemetryEventStore } = client2;
|
150658
151172
|
const { currentTeam: currentTeamId } = config2;
|
151173
|
+
const telemetry2 = new TeamsInviteTelemetryClient({
|
151174
|
+
opts: {
|
151175
|
+
output: output2,
|
151176
|
+
store: telemetryEventStore
|
151177
|
+
}
|
151178
|
+
});
|
150659
151179
|
output2.spinner("Fetching teams");
|
150660
151180
|
const teams = await getTeams(client2);
|
150661
151181
|
const currentTeam = teams.find((team) => team.id === currentTeamId);
|
@@ -150673,8 +151193,9 @@ Please select a team scope using ${getCommandName(
|
|
150673
151193
|
return 1;
|
150674
151194
|
}
|
150675
151195
|
output2.log(
|
150676
|
-
introMsg || `Inviting team members to ${
|
151196
|
+
introMsg || `Inviting team members to ${import_chalk111.default.bold(currentTeam.name)}`
|
150677
151197
|
);
|
151198
|
+
telemetry2.trackCliArgumentEmail(emails.length);
|
150678
151199
|
if (emails.length > 0) {
|
150679
151200
|
for (const email3 of emails) {
|
150680
151201
|
if (email.test(email3)) {
|
@@ -150692,10 +151213,10 @@ Please select a team scope using ${getCommandName(
|
|
150692
151213
|
throw err;
|
150693
151214
|
}
|
150694
151215
|
output2.log(
|
150695
|
-
`${
|
151216
|
+
`${import_chalk111.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
150696
151217
|
);
|
150697
151218
|
} else {
|
150698
|
-
output2.log(`${
|
151219
|
+
output2.log(`${import_chalk111.default.red(`\u2716 ${email3}`)} ${import_chalk111.default.gray("[invalid]")}`);
|
150699
151220
|
}
|
150700
151221
|
}
|
150701
151222
|
return 0;
|
@@ -150728,15 +151249,15 @@ Please select a team scope using ${getCommandName(
|
|
150728
151249
|
);
|
150729
151250
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
150730
151251
|
emails.push(email2);
|
150731
|
-
output2.log(`${
|
151252
|
+
output2.log(`${import_chalk111.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
150732
151253
|
if (hasError) {
|
150733
151254
|
hasError = false;
|
150734
151255
|
process.stderr.write(eraseLines(emails.length + 2));
|
150735
151256
|
output2.log(
|
150736
|
-
introMsg || `Inviting team members to ${
|
151257
|
+
introMsg || `Inviting team members to ${import_chalk111.default.bold(currentTeam.name)}`
|
150737
151258
|
);
|
150738
151259
|
for (const email3 of emails) {
|
150739
|
-
output2.log(`${
|
151260
|
+
output2.log(`${import_chalk111.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
150740
151261
|
}
|
150741
151262
|
}
|
150742
151263
|
} catch (err) {
|
@@ -150745,7 +151266,7 @@ Please select a team scope using ${getCommandName(
|
|
150745
151266
|
output2.error((0, import_error_utils32.errorToString)(err));
|
150746
151267
|
hasError = true;
|
150747
151268
|
for (const email3 of emails) {
|
150748
|
-
output2.log(`${
|
151269
|
+
output2.log(`${import_chalk111.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
150749
151270
|
}
|
150750
151271
|
}
|
150751
151272
|
}
|
@@ -150758,16 +151279,16 @@ Please select a team scope using ${getCommandName(
|
|
150758
151279
|
} else {
|
150759
151280
|
output2.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
150760
151281
|
for (const email3 of emails) {
|
150761
|
-
output2.log(`${
|
151282
|
+
output2.log(`${import_chalk111.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
150762
151283
|
}
|
150763
151284
|
}
|
150764
151285
|
return 0;
|
150765
151286
|
}
|
150766
|
-
var
|
150767
|
-
var
|
151287
|
+
var import_chalk111, import_error_utils32, validateEmail2, domains;
|
151288
|
+
var init_invite2 = __esm({
|
150768
151289
|
"src/commands/teams/invite.ts"() {
|
150769
151290
|
"use strict";
|
150770
|
-
|
151291
|
+
import_chalk111 = __toESM3(require_source());
|
150771
151292
|
init_cmd();
|
150772
151293
|
init_stamp();
|
150773
151294
|
init_param();
|
@@ -150780,6 +151301,7 @@ var init_invite = __esm({
|
|
150780
151301
|
init_invite_user_to_team();
|
150781
151302
|
init_errors_ts();
|
150782
151303
|
import_error_utils32 = __toESM3(require_dist2());
|
151304
|
+
init_invite();
|
150783
151305
|
validateEmail2 = (data) => email.test(data.trim()) || data.length === 0;
|
150784
151306
|
domains = Array.from(
|
150785
151307
|
/* @__PURE__ */ new Set([
|
@@ -150838,7 +151360,7 @@ async function add8(client2) {
|
|
150838
151360
|
let elapsed2;
|
150839
151361
|
const { output: output2 } = client2;
|
150840
151362
|
output2.log(
|
150841
|
-
`Pick a team identifier for its URL (e.g.: ${
|
151363
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk112.default.cyan(
|
150842
151364
|
"`vercel.com/acme`"
|
150843
151365
|
)})`
|
150844
151366
|
);
|
@@ -150869,7 +151391,7 @@ async function add8(client2) {
|
|
150869
151391
|
output2.stopSpinner();
|
150870
151392
|
process.stdout.write(eraseLines(2));
|
150871
151393
|
output2.success(`Team created ${elapsed2()}`);
|
150872
|
-
output2.log(`${
|
151394
|
+
output2.log(`${import_chalk112.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
150873
151395
|
`);
|
150874
151396
|
output2.log("Pick a display name for your team");
|
150875
151397
|
let name;
|
@@ -150892,7 +151414,7 @@ async function add8(client2) {
|
|
150892
151414
|
process.stdout.write(eraseLines(2));
|
150893
151415
|
team = Object.assign(team, res);
|
150894
151416
|
output2.success(`Team name saved ${elapsed2()}`);
|
150895
|
-
output2.log(`${
|
151417
|
+
output2.log(`${import_chalk112.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
150896
151418
|
`);
|
150897
151419
|
output2.spinner("Saving");
|
150898
151420
|
client2.config.currentTeam = team.id;
|
@@ -150906,15 +151428,15 @@ async function add8(client2) {
|
|
150906
151428
|
});
|
150907
151429
|
return 0;
|
150908
151430
|
}
|
150909
|
-
var
|
151431
|
+
var import_chalk112, import_error_utils33, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
150910
151432
|
var init_add7 = __esm({
|
150911
151433
|
"src/commands/teams/add.ts"() {
|
150912
151434
|
"use strict";
|
150913
|
-
|
151435
|
+
import_chalk112 = __toESM3(require_source());
|
150914
151436
|
init_stamp();
|
150915
151437
|
init_erase_lines();
|
150916
151438
|
init_chars();
|
150917
|
-
|
151439
|
+
init_invite2();
|
150918
151440
|
init_files();
|
150919
151441
|
init_pkg_name();
|
150920
151442
|
init_create_team();
|
@@ -150922,7 +151444,7 @@ var init_add7 = __esm({
|
|
150922
151444
|
import_error_utils33 = __toESM3(require_dist2());
|
150923
151445
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
150924
151446
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
150925
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
151447
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk112.default.gray("vercel.com/");
|
150926
151448
|
teamNamePrefix = "Team Name".padEnd(14);
|
150927
151449
|
}
|
150928
151450
|
});
|
@@ -150942,22 +151464,22 @@ async function main13(client2, desiredSlug) {
|
|
150942
151464
|
const teamChoices = teams.slice(0).sort((a, b) => {
|
150943
151465
|
return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
|
150944
151466
|
}).map((team) => {
|
150945
|
-
let
|
151467
|
+
let title8 = `${team.name} (${team.slug})`;
|
150946
151468
|
const selected = team.id === currentTeam?.id;
|
150947
151469
|
if (selected) {
|
150948
|
-
|
151470
|
+
title8 += ` ${import_chalk113.default.bold("(current)")}`;
|
150949
151471
|
}
|
150950
151472
|
if (team.limited) {
|
150951
|
-
|
151473
|
+
title8 += ` ${emoji("locked")}`;
|
150952
151474
|
}
|
150953
151475
|
return {
|
150954
|
-
name:
|
151476
|
+
name: title8,
|
150955
151477
|
value: team.slug,
|
150956
151478
|
short: team.slug,
|
150957
151479
|
selected
|
150958
151480
|
};
|
150959
151481
|
});
|
150960
|
-
let suffix = personalScopeSelected ? ` ${
|
151482
|
+
let suffix = personalScopeSelected ? ` ${import_chalk113.default.bold("(current)")}` : "";
|
150961
151483
|
if (user.limited) {
|
150962
151484
|
suffix += ` ${emoji("locked")}`;
|
150963
151485
|
}
|
@@ -151003,14 +151525,14 @@ async function main13(client2, desiredSlug) {
|
|
151003
151525
|
}
|
151004
151526
|
updateCurrentTeam(output2, config2);
|
151005
151527
|
output2.success(
|
151006
|
-
`Your account (${
|
151528
|
+
`Your account (${import_chalk113.default.bold(user.username)}) is now active!`
|
151007
151529
|
);
|
151008
151530
|
return 0;
|
151009
151531
|
}
|
151010
151532
|
const newTeam = teams.find((team) => team.slug === desiredSlug);
|
151011
151533
|
if (!newTeam) {
|
151012
151534
|
output2.error(
|
151013
|
-
`You do not have permission to access scope ${
|
151535
|
+
`You do not have permission to access scope ${import_chalk113.default.bold(desiredSlug)}.`
|
151014
151536
|
);
|
151015
151537
|
return 1;
|
151016
151538
|
}
|
@@ -151028,15 +151550,15 @@ async function main13(client2, desiredSlug) {
|
|
151028
151550
|
}
|
151029
151551
|
updateCurrentTeam(output2, config2, newTeam);
|
151030
151552
|
output2.success(
|
151031
|
-
`The team ${
|
151553
|
+
`The team ${import_chalk113.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
151032
151554
|
);
|
151033
151555
|
return 0;
|
151034
151556
|
}
|
151035
|
-
var
|
151557
|
+
var import_chalk113, updateCurrentTeam;
|
151036
151558
|
var init_switch = __esm({
|
151037
151559
|
"src/commands/teams/switch.ts"() {
|
151038
151560
|
"use strict";
|
151039
|
-
|
151561
|
+
import_chalk113 = __toESM3(require_source());
|
151040
151562
|
init_emoji();
|
151041
151563
|
init_get_user();
|
151042
151564
|
init_get_teams();
|
@@ -151053,25 +151575,49 @@ var init_switch = __esm({
|
|
151053
151575
|
}
|
151054
151576
|
});
|
151055
151577
|
|
151578
|
+
// src/util/telemetry/commands/teams/index.ts
|
151579
|
+
var TeamsTelemetryClient;
|
151580
|
+
var init_teams = __esm({
|
151581
|
+
"src/util/telemetry/commands/teams/index.ts"() {
|
151582
|
+
"use strict";
|
151583
|
+
init_telemetry();
|
151584
|
+
TeamsTelemetryClient = class extends TelemetryClient {
|
151585
|
+
trackCliSubcommandInvite(actual) {
|
151586
|
+
this.trackCliSubcommand({
|
151587
|
+
subcommand: "invite",
|
151588
|
+
value: actual
|
151589
|
+
});
|
151590
|
+
}
|
151591
|
+
};
|
151592
|
+
}
|
151593
|
+
});
|
151594
|
+
|
151056
151595
|
// src/commands/teams/index.ts
|
151057
151596
|
var teams_exports = {};
|
151058
151597
|
__export3(teams_exports, {
|
151059
151598
|
default: () => teams_default
|
151060
151599
|
});
|
151061
151600
|
var teams_default;
|
151062
|
-
var
|
151601
|
+
var init_teams2 = __esm({
|
151063
151602
|
"src/commands/teams/index.ts"() {
|
151064
151603
|
"use strict";
|
151065
|
-
|
151604
|
+
init_list6();
|
151066
151605
|
init_add7();
|
151067
151606
|
init_switch();
|
151068
|
-
|
151607
|
+
init_invite2();
|
151069
151608
|
init_get_args();
|
151070
151609
|
init_command27();
|
151071
151610
|
init_help();
|
151072
151611
|
init_get_flags_specification();
|
151073
151612
|
init_handle_error();
|
151613
|
+
init_teams();
|
151074
151614
|
teams_default = async (client2) => {
|
151615
|
+
const telemetryClient = new TeamsTelemetryClient({
|
151616
|
+
opts: {
|
151617
|
+
output: client2.output,
|
151618
|
+
store: client2.telemetryEventStore
|
151619
|
+
}
|
151620
|
+
});
|
151075
151621
|
let subcommand;
|
151076
151622
|
let parsedArgs = null;
|
151077
151623
|
const flagsSpecification = getFlagsSpecification(teamsCommand.options);
|
@@ -151099,7 +151645,7 @@ var init_teams = __esm({
|
|
151099
151645
|
switch (subcommand) {
|
151100
151646
|
case "list":
|
151101
151647
|
case "ls": {
|
151102
|
-
exitCode2 = await
|
151648
|
+
exitCode2 = await list6(client2);
|
151103
151649
|
break;
|
151104
151650
|
}
|
151105
151651
|
case "switch":
|
@@ -151113,6 +151659,7 @@ var init_teams = __esm({
|
|
151113
151659
|
break;
|
151114
151660
|
}
|
151115
151661
|
case "invite": {
|
151662
|
+
telemetryClient.trackCliSubcommandInvite("invite");
|
151116
151663
|
exitCode2 = await invite(client2, parsedArgs.args);
|
151117
151664
|
break;
|
151118
151665
|
}
|
@@ -151136,10 +151683,10 @@ var init_teams = __esm({
|
|
151136
151683
|
// src/commands/telemetry/status.ts
|
151137
151684
|
async function status(client2) {
|
151138
151685
|
const status2 = client2.config.telemetry?.enabled === false ? "disabled" : "enabled";
|
151139
|
-
const message2 = status2 === "disabled" ?
|
151686
|
+
const message2 = status2 === "disabled" ? import_chalk114.default.red("Disabled") : import_chalk114.default.green("Enabled");
|
151140
151687
|
await client2.output.print(
|
151141
151688
|
`
|
151142
|
-
${
|
151689
|
+
${import_chalk114.default.bold("Telemetry status")}: ${message2}
|
151143
151690
|
|
151144
151691
|
`
|
151145
151692
|
);
|
@@ -151151,11 +151698,11 @@ No data will be collected from your machine${learnMoreMessage}`;
|
|
151151
151698
|
await client2.output.print(optedInorOutMessage);
|
151152
151699
|
return 0;
|
151153
151700
|
}
|
151154
|
-
var
|
151701
|
+
var import_chalk114;
|
151155
151702
|
var init_status3 = __esm({
|
151156
151703
|
"src/commands/telemetry/status.ts"() {
|
151157
151704
|
"use strict";
|
151158
|
-
|
151705
|
+
import_chalk114 = __toESM3(require_source());
|
151159
151706
|
}
|
151160
151707
|
});
|
151161
151708
|
|
@@ -151277,7 +151824,7 @@ async function telemetry(client2) {
|
|
151277
151824
|
default: {
|
151278
151825
|
const errorMessage = parsedArguments.args.length !== 2 ? `Invalid number of arguments` : `Invalid subcommand`;
|
151279
151826
|
client2.output.print(
|
151280
|
-
`${
|
151827
|
+
`${import_chalk115.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
151281
151828
|
`
|
151282
151829
|
);
|
151283
151830
|
client2.output.print(
|
@@ -151287,7 +151834,7 @@ async function telemetry(client2) {
|
|
151287
151834
|
}
|
151288
151835
|
}
|
151289
151836
|
}
|
151290
|
-
var
|
151837
|
+
var import_chalk115, COMMAND_CONFIG12;
|
151291
151838
|
var init_telemetry2 = __esm({
|
151292
151839
|
"src/commands/telemetry/index.ts"() {
|
151293
151840
|
"use strict";
|
@@ -151300,7 +151847,7 @@ var init_telemetry2 = __esm({
|
|
151300
151847
|
init_disable();
|
151301
151848
|
init_command28();
|
151302
151849
|
init_get_flags_specification();
|
151303
|
-
|
151850
|
+
import_chalk115 = __toESM3(require_source());
|
151304
151851
|
COMMAND_CONFIG12 = {
|
151305
151852
|
status: ["status"],
|
151306
151853
|
enable: ["enable"],
|
@@ -151375,7 +151922,7 @@ var import_error_utils34 = __toESM3(require_dist2());
|
|
151375
151922
|
var import_path43 = require("path");
|
151376
151923
|
var import_fs9 = require("fs");
|
151377
151924
|
var import_fs_extra23 = __toESM3(require_lib());
|
151378
|
-
var
|
151925
|
+
var import_chalk116 = __toESM3(require_source());
|
151379
151926
|
var import_epipebomb = __toESM3(require_epipebomb());
|
151380
151927
|
|
151381
151928
|
// src/util/get-latest-version/index.ts
|
@@ -152026,6 +152573,36 @@ var RootTelemetryClient = class extends TelemetryClient {
|
|
152026
152573
|
value: actual
|
152027
152574
|
});
|
152028
152575
|
}
|
152576
|
+
trackCliCommandDeploy(actual) {
|
152577
|
+
this.trackCliCommand({
|
152578
|
+
command: "deploy",
|
152579
|
+
value: actual
|
152580
|
+
});
|
152581
|
+
}
|
152582
|
+
trackCliCommandWhoami(actual) {
|
152583
|
+
this.trackCliCommand({
|
152584
|
+
command: "whoami",
|
152585
|
+
value: actual
|
152586
|
+
});
|
152587
|
+
}
|
152588
|
+
trackCliCommandRollback(actual) {
|
152589
|
+
this.trackCliCommand({
|
152590
|
+
command: "rollback",
|
152591
|
+
value: actual
|
152592
|
+
});
|
152593
|
+
}
|
152594
|
+
trackCliCommandTeams(actual) {
|
152595
|
+
this.trackCliCommand({
|
152596
|
+
command: "teams",
|
152597
|
+
value: actual
|
152598
|
+
});
|
152599
|
+
}
|
152600
|
+
trackCliCommandLogout(actual) {
|
152601
|
+
this.trackCliCommand({
|
152602
|
+
command: "logout",
|
152603
|
+
value: actual
|
152604
|
+
});
|
152605
|
+
}
|
152029
152606
|
trackCPUs() {
|
152030
152607
|
super.trackCPUs();
|
152031
152608
|
}
|
@@ -152595,13 +153172,13 @@ var main14 = async () => {
|
|
152595
153172
|
const betaCommands = [];
|
152596
153173
|
if (betaCommands.includes(targetOrSubcommand)) {
|
152597
153174
|
output.print(
|
152598
|
-
`${
|
153175
|
+
`${import_chalk116.default.grey(
|
152599
153176
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
152600
153177
|
)}
|
152601
153178
|
`
|
152602
153179
|
);
|
152603
153180
|
} else {
|
152604
|
-
output.print(`${
|
153181
|
+
output.print(`${import_chalk116.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
152605
153182
|
`);
|
152606
153183
|
}
|
152607
153184
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
@@ -152901,7 +153478,8 @@ var main14 = async () => {
|
|
152901
153478
|
func = (init_certs(), __toCommonJS3(certs_exports)).default;
|
152902
153479
|
break;
|
152903
153480
|
case "deploy":
|
152904
|
-
|
153481
|
+
telemetry2.trackCliCommandDeploy(userSuppliedSubCommand);
|
153482
|
+
func = (init_deploy2(), __toCommonJS3(deploy_exports)).default;
|
152905
153483
|
break;
|
152906
153484
|
case "dev":
|
152907
153485
|
func = (init_dev2(), __toCommonJS3(dev_exports)).default;
|
@@ -152935,7 +153513,7 @@ var main14 = async () => {
|
|
152935
153513
|
func = (init_link3(), __toCommonJS3(link_exports)).default;
|
152936
153514
|
break;
|
152937
153515
|
case "list":
|
152938
|
-
func = (
|
153516
|
+
func = (init_list3(), __toCommonJS3(list_exports)).default;
|
152939
153517
|
break;
|
152940
153518
|
case "logs":
|
152941
153519
|
func = (init_logs2(), __toCommonJS3(logs_exports)).default;
|
@@ -152944,6 +153522,7 @@ var main14 = async () => {
|
|
152944
153522
|
func = (init_login2(), __toCommonJS3(login_exports)).default;
|
152945
153523
|
break;
|
152946
153524
|
case "logout":
|
153525
|
+
telemetry2.trackCliCommandLogout(userSuppliedSubCommand);
|
152947
153526
|
func = (init_logout(), __toCommonJS3(logout_exports)).default;
|
152948
153527
|
break;
|
152949
153528
|
case "project":
|
@@ -152962,18 +153541,21 @@ var main14 = async () => {
|
|
152962
153541
|
func = (init_remove(), __toCommonJS3(remove_exports)).default;
|
152963
153542
|
break;
|
152964
153543
|
case "rollback":
|
152965
|
-
|
153544
|
+
telemetry2.trackCliCommandRollback(userSuppliedSubCommand);
|
153545
|
+
func = (init_rollback2(), __toCommonJS3(rollback_exports)).default;
|
152966
153546
|
break;
|
152967
153547
|
case "target":
|
152968
153548
|
func = (init_target(), __toCommonJS3(target_exports)).default;
|
152969
153549
|
break;
|
152970
153550
|
case "teams":
|
152971
|
-
func = (
|
153551
|
+
func = (init_teams2(), __toCommonJS3(teams_exports)).default;
|
152972
153552
|
break;
|
152973
153553
|
case "telemetry":
|
153554
|
+
telemetry2.trackCliCommandTeams(userSuppliedSubCommand);
|
152974
153555
|
func = (init_telemetry2(), __toCommonJS3(telemetry_exports)).default;
|
152975
153556
|
break;
|
152976
153557
|
case "whoami":
|
153558
|
+
telemetry2.trackCliCommandWhoami(userSuppliedSubCommand);
|
152977
153559
|
func = (init_whoami(), __toCommonJS3(whoami_exports)).default;
|
152978
153560
|
break;
|
152979
153561
|
default:
|
@@ -153077,20 +153659,20 @@ main14().then(async (exitCode2) => {
|
|
153077
153659
|
});
|
153078
153660
|
if (latest) {
|
153079
153661
|
const changelog = "https://github.com/vercel/vercel/releases";
|
153080
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
153662
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk116.default.magenta(
|
153081
153663
|
`
|
153082
153664
|
|
153083
|
-
The latest update ${
|
153665
|
+
The latest update ${import_chalk116.default.italic(
|
153084
153666
|
"may"
|
153085
153667
|
)} fix any errors that occurred.`
|
153086
153668
|
) : "";
|
153087
153669
|
output.print(
|
153088
153670
|
box(
|
153089
|
-
`Update available! ${
|
153671
|
+
`Update available! ${import_chalk116.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk116.default.green(
|
153090
153672
|
`v${latest}`
|
153091
153673
|
)}
|
153092
153674
|
Changelog: ${output.link(changelog, changelog, { fallback: false })}
|
153093
|
-
Run ${
|
153675
|
+
Run ${import_chalk116.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
153094
153676
|
)
|
153095
153677
|
);
|
153096
153678
|
output.print("\n\n");
|