vercel 37.13.0 → 37.14.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 +1289 -412
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -1956,7 +1956,7 @@ var require_remove = __commonJS2({
|
|
1956
1956
|
var fs15 = require_graceful_fs();
|
1957
1957
|
var u = require_universalify().fromCallback;
|
1958
1958
|
var rimraf = require_rimraf();
|
1959
|
-
function
|
1959
|
+
function remove6(path11, callback) {
|
1960
1960
|
if (fs15.rm)
|
1961
1961
|
return fs15.rm(path11, { recursive: true, force: true }, callback);
|
1962
1962
|
rimraf(path11, callback);
|
@@ -1967,7 +1967,7 @@ var require_remove = __commonJS2({
|
|
1967
1967
|
rimraf.sync(path11);
|
1968
1968
|
}
|
1969
1969
|
module2.exports = {
|
1970
|
-
remove: u(
|
1970
|
+
remove: u(remove6),
|
1971
1971
|
removeSync
|
1972
1972
|
};
|
1973
1973
|
}
|
@@ -1981,7 +1981,7 @@ var require_empty = __commonJS2({
|
|
1981
1981
|
var fs15 = require_fs();
|
1982
1982
|
var path11 = require("path");
|
1983
1983
|
var mkdir2 = require_mkdirs();
|
1984
|
-
var
|
1984
|
+
var remove6 = require_remove();
|
1985
1985
|
var emptyDir = u(async function emptyDir2(dir) {
|
1986
1986
|
let items;
|
1987
1987
|
try {
|
@@ -1989,7 +1989,7 @@ var require_empty = __commonJS2({
|
|
1989
1989
|
} catch {
|
1990
1990
|
return mkdir2.mkdirs(dir);
|
1991
1991
|
}
|
1992
|
-
return Promise.all(items.map((item) =>
|
1992
|
+
return Promise.all(items.map((item) => remove6.remove(path11.join(dir, item))));
|
1993
1993
|
});
|
1994
1994
|
function emptyDirSync(dir) {
|
1995
1995
|
let items;
|
@@ -2000,7 +2000,7 @@ var require_empty = __commonJS2({
|
|
2000
2000
|
}
|
2001
2001
|
items.forEach((item) => {
|
2002
2002
|
item = path11.join(dir, item);
|
2003
|
-
|
2003
|
+
remove6.removeSync(item);
|
2004
2004
|
});
|
2005
2005
|
}
|
2006
2006
|
module2.exports = {
|
@@ -2648,7 +2648,7 @@ var require_move = __commonJS2({
|
|
2648
2648
|
var fs15 = require_graceful_fs();
|
2649
2649
|
var path11 = require("path");
|
2650
2650
|
var copy = require_copy2().copy;
|
2651
|
-
var
|
2651
|
+
var remove6 = require_remove().remove;
|
2652
2652
|
var mkdirp4 = require_mkdirs().mkdirp;
|
2653
2653
|
var pathExists = require_path_exists().pathExists;
|
2654
2654
|
var stat2 = require_stat();
|
@@ -2684,7 +2684,7 @@ var require_move = __commonJS2({
|
|
2684
2684
|
if (isChangingCase)
|
2685
2685
|
return rename(src, dest, overwrite, cb);
|
2686
2686
|
if (overwrite) {
|
2687
|
-
return
|
2687
|
+
return remove6(dest, (err) => {
|
2688
2688
|
if (err)
|
2689
2689
|
return cb(err);
|
2690
2690
|
return rename(src, dest, overwrite, cb);
|
@@ -2715,7 +2715,7 @@ var require_move = __commonJS2({
|
|
2715
2715
|
copy(src, dest, opts, (err) => {
|
2716
2716
|
if (err)
|
2717
2717
|
return cb(err);
|
2718
|
-
return
|
2718
|
+
return remove6(src, cb);
|
2719
2719
|
});
|
2720
2720
|
}
|
2721
2721
|
module2.exports = move3;
|
@@ -4073,14 +4073,14 @@ var require_templates = __commonJS2({
|
|
4073
4073
|
}
|
4074
4074
|
return results;
|
4075
4075
|
}
|
4076
|
-
function buildStyle(
|
4076
|
+
function buildStyle(chalk115, 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 = chalk115;
|
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 = (chalk115, 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(chalk115, 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(chalk115, 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 chalk116 = {};
|
4160
|
+
applyOptions(chalk116, options);
|
4161
|
+
chalk116.template = (...arguments_) => chalkTag(chalk116.template, ...arguments_);
|
4162
|
+
Object.setPrototypeOf(chalk116, Chalk3.prototype);
|
4163
|
+
Object.setPrototypeOf(chalk116.template, chalk116);
|
4164
|
+
chalk116.template.constructor = () => {
|
4165
4165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4166
4166
|
};
|
4167
|
-
|
4168
|
-
return
|
4167
|
+
chalk116.template.Instance = ChalkClass;
|
4168
|
+
return chalk116.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 = (chalk116, ...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(chalk116, parts.join(""));
|
4296
4296
|
};
|
4297
4297
|
Object.defineProperties(Chalk3.prototype, styles);
|
4298
|
-
var
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
module2.exports =
|
4298
|
+
var chalk115 = Chalk3();
|
4299
|
+
chalk115.supportsColor = stdoutColor;
|
4300
|
+
chalk115.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
4301
|
+
chalk115.stderr.supportsColor = stderrColor;
|
4302
|
+
module2.exports = chalk115;
|
4303
4303
|
}
|
4304
4304
|
});
|
4305
4305
|
|
@@ -7210,14 +7210,14 @@ var require_templates2 = __commonJS2({
|
|
7210
7210
|
}
|
7211
7211
|
return results;
|
7212
7212
|
}
|
7213
|
-
function buildStyle(
|
7213
|
+
function buildStyle(chalk115, styles) {
|
7214
7214
|
const enabled = {};
|
7215
7215
|
for (const layer of styles) {
|
7216
7216
|
for (const style of layer.styles) {
|
7217
7217
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
7218
7218
|
}
|
7219
7219
|
}
|
7220
|
-
let current =
|
7220
|
+
let current = chalk115;
|
7221
7221
|
for (const styleName of Object.keys(enabled)) {
|
7222
7222
|
if (Array.isArray(enabled[styleName])) {
|
7223
7223
|
if (!(styleName in current)) {
|
@@ -7232,7 +7232,7 @@ var require_templates2 = __commonJS2({
|
|
7232
7232
|
}
|
7233
7233
|
return current;
|
7234
7234
|
}
|
7235
|
-
module2.exports = (
|
7235
|
+
module2.exports = (chalk115, tmp) => {
|
7236
7236
|
const styles = [];
|
7237
7237
|
const chunks = [];
|
7238
7238
|
let chunk = [];
|
@@ -7242,13 +7242,13 @@ var require_templates2 = __commonJS2({
|
|
7242
7242
|
} else if (style) {
|
7243
7243
|
const str = chunk.join("");
|
7244
7244
|
chunk = [];
|
7245
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
7245
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk115, styles)(str));
|
7246
7246
|
styles.push({ inverse, styles: parseStyle(style) });
|
7247
7247
|
} else if (close2) {
|
7248
7248
|
if (styles.length === 0) {
|
7249
7249
|
throw new Error("Found extraneous } in Chalk template literal");
|
7250
7250
|
}
|
7251
|
-
chunks.push(buildStyle(
|
7251
|
+
chunks.push(buildStyle(chalk115, styles)(chunk.join("")));
|
7252
7252
|
chunk = [];
|
7253
7253
|
styles.pop();
|
7254
7254
|
} else {
|
@@ -7285,16 +7285,16 @@ var require_chalk = __commonJS2({
|
|
7285
7285
|
}
|
7286
7286
|
function Chalk3(options) {
|
7287
7287
|
if (!this || !(this instanceof Chalk3) || this.template) {
|
7288
|
-
const
|
7289
|
-
applyOptions(
|
7290
|
-
|
7288
|
+
const chalk115 = {};
|
7289
|
+
applyOptions(chalk115, options);
|
7290
|
+
chalk115.template = function() {
|
7291
7291
|
const args2 = [].slice.call(arguments);
|
7292
|
-
return chalkTag.apply(null, [
|
7292
|
+
return chalkTag.apply(null, [chalk115.template].concat(args2));
|
7293
7293
|
};
|
7294
|
-
Object.setPrototypeOf(
|
7295
|
-
Object.setPrototypeOf(
|
7296
|
-
|
7297
|
-
return
|
7294
|
+
Object.setPrototypeOf(chalk115, Chalk3.prototype);
|
7295
|
+
Object.setPrototypeOf(chalk115.template, chalk115);
|
7296
|
+
chalk115.template.constructor = Chalk3;
|
7297
|
+
return chalk115.template;
|
7298
7298
|
}
|
7299
7299
|
applyOptions(this, options);
|
7300
7300
|
}
|
@@ -7413,7 +7413,7 @@ var require_chalk = __commonJS2({
|
|
7413
7413
|
ansiStyles.dim.open = originalDim;
|
7414
7414
|
return str;
|
7415
7415
|
}
|
7416
|
-
function chalkTag(
|
7416
|
+
function chalkTag(chalk115, strings) {
|
7417
7417
|
if (!Array.isArray(strings)) {
|
7418
7418
|
return [].slice.call(arguments, 1).join(" ");
|
7419
7419
|
}
|
@@ -7423,7 +7423,7 @@ var require_chalk = __commonJS2({
|
|
7423
7423
|
parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
7424
7424
|
parts.push(String(strings.raw[i]));
|
7425
7425
|
}
|
7426
|
-
return template(
|
7426
|
+
return template(chalk115, parts.join(""));
|
7427
7427
|
}
|
7428
7428
|
Object.defineProperties(Chalk3.prototype, styles);
|
7429
7429
|
module2.exports = Chalk3();
|
@@ -7560,14 +7560,14 @@ var require_signal_exit = __commonJS2({
|
|
7560
7560
|
if (opts && opts.alwaysLast) {
|
7561
7561
|
ev = "afterexit";
|
7562
7562
|
}
|
7563
|
-
var
|
7563
|
+
var remove6 = function() {
|
7564
7564
|
emitter.removeListener(ev, cb);
|
7565
7565
|
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
|
7566
7566
|
unload2();
|
7567
7567
|
}
|
7568
7568
|
};
|
7569
7569
|
emitter.on(ev, cb);
|
7570
|
-
return
|
7570
|
+
return remove6;
|
7571
7571
|
};
|
7572
7572
|
unload2 = function unload3() {
|
7573
7573
|
if (!loaded || !processOk2(global.process)) {
|
@@ -9220,21 +9220,21 @@ var require_cli_spinners = __commonJS2({
|
|
9220
9220
|
var require_log_symbols = __commonJS2({
|
9221
9221
|
"../../node_modules/.pnpm/log-symbols@2.2.0/node_modules/log-symbols/index.js"(exports2, module2) {
|
9222
9222
|
"use strict";
|
9223
|
-
var
|
9223
|
+
var chalk115 = require_chalk();
|
9224
9224
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
9225
|
-
var
|
9226
|
-
info:
|
9227
|
-
success:
|
9228
|
-
warning:
|
9229
|
-
error:
|
9225
|
+
var main16 = {
|
9226
|
+
info: chalk115.blue("\u2139"),
|
9227
|
+
success: chalk115.green("\u2714"),
|
9228
|
+
warning: chalk115.yellow("\u26A0"),
|
9229
|
+
error: chalk115.red("\u2716")
|
9230
9230
|
};
|
9231
9231
|
var fallbacks = {
|
9232
|
-
info:
|
9233
|
-
success:
|
9234
|
-
warning:
|
9235
|
-
error:
|
9232
|
+
info: chalk115.blue("i"),
|
9233
|
+
success: chalk115.green("\u221A"),
|
9234
|
+
warning: chalk115.yellow("\u203C"),
|
9235
|
+
error: chalk115.red("\xD7")
|
9236
9236
|
};
|
9237
|
-
module2.exports = isSupported ?
|
9237
|
+
module2.exports = isSupported ? main16 : fallbacks;
|
9238
9238
|
}
|
9239
9239
|
});
|
9240
9240
|
|
@@ -9628,7 +9628,7 @@ var require_wcwidth = __commonJS2({
|
|
9628
9628
|
var require_ora = __commonJS2({
|
9629
9629
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
9630
9630
|
"use strict";
|
9631
|
-
var
|
9631
|
+
var chalk115 = require_chalk();
|
9632
9632
|
var cliCursor = require_cli_cursor();
|
9633
9633
|
var cliSpinners = require_cli_spinners();
|
9634
9634
|
var logSymbols = require_log_symbols();
|
@@ -9717,7 +9717,7 @@ var require_ora = __commonJS2({
|
|
9717
9717
|
const { frames } = this.spinner;
|
9718
9718
|
let frame = frames[this.frameIndex];
|
9719
9719
|
if (this.color) {
|
9720
|
-
frame =
|
9720
|
+
frame = chalk115[this.color](frame);
|
9721
9721
|
}
|
9722
9722
|
this.frameIndex = ++this.frameIndex % frames.length;
|
9723
9723
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
@@ -18005,14 +18005,14 @@ var require_templates3 = __commonJS2({
|
|
18005
18005
|
}
|
18006
18006
|
return results;
|
18007
18007
|
}
|
18008
|
-
function buildStyle(
|
18008
|
+
function buildStyle(chalk115, styles) {
|
18009
18009
|
const enabled = {};
|
18010
18010
|
for (const layer of styles) {
|
18011
18011
|
for (const style of layer.styles) {
|
18012
18012
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
18013
18013
|
}
|
18014
18014
|
}
|
18015
|
-
let current =
|
18015
|
+
let current = chalk115;
|
18016
18016
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
18017
18017
|
if (!Array.isArray(styles2)) {
|
18018
18018
|
continue;
|
@@ -18024,7 +18024,7 @@ var require_templates3 = __commonJS2({
|
|
18024
18024
|
}
|
18025
18025
|
return current;
|
18026
18026
|
}
|
18027
|
-
module2.exports = (
|
18027
|
+
module2.exports = (chalk115, temporary) => {
|
18028
18028
|
const styles = [];
|
18029
18029
|
const chunks = [];
|
18030
18030
|
let chunk = [];
|
@@ -18034,13 +18034,13 @@ var require_templates3 = __commonJS2({
|
|
18034
18034
|
} else if (style) {
|
18035
18035
|
const string = chunk.join("");
|
18036
18036
|
chunk = [];
|
18037
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
18037
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk115, styles)(string));
|
18038
18038
|
styles.push({ inverse, styles: parseStyle(style) });
|
18039
18039
|
} else if (close2) {
|
18040
18040
|
if (styles.length === 0) {
|
18041
18041
|
throw new Error("Found extraneous } in Chalk template literal");
|
18042
18042
|
}
|
18043
|
-
chunks.push(buildStyle(
|
18043
|
+
chunks.push(buildStyle(chalk115, styles)(chunk.join("")));
|
18044
18044
|
chunk = [];
|
18045
18045
|
styles.pop();
|
18046
18046
|
} else {
|
@@ -18088,16 +18088,16 @@ var require_source2 = __commonJS2({
|
|
18088
18088
|
}
|
18089
18089
|
};
|
18090
18090
|
var chalkFactory = (options) => {
|
18091
|
-
const
|
18092
|
-
applyOptions(
|
18093
|
-
|
18094
|
-
Object.setPrototypeOf(
|
18095
|
-
Object.setPrototypeOf(
|
18096
|
-
|
18091
|
+
const chalk116 = {};
|
18092
|
+
applyOptions(chalk116, options);
|
18093
|
+
chalk116.template = (...arguments_) => chalkTag(chalk116.template, ...arguments_);
|
18094
|
+
Object.setPrototypeOf(chalk116, Chalk3.prototype);
|
18095
|
+
Object.setPrototypeOf(chalk116.template, chalk116);
|
18096
|
+
chalk116.template.constructor = () => {
|
18097
18097
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
18098
18098
|
};
|
18099
|
-
|
18100
|
-
return
|
18099
|
+
chalk116.template.Instance = ChalkClass;
|
18100
|
+
return chalk116.template;
|
18101
18101
|
};
|
18102
18102
|
function Chalk3(options) {
|
18103
18103
|
return chalkFactory(options);
|
@@ -18208,7 +18208,7 @@ var require_source2 = __commonJS2({
|
|
18208
18208
|
return openAll + string + closeAll;
|
18209
18209
|
};
|
18210
18210
|
var template;
|
18211
|
-
var chalkTag = (
|
18211
|
+
var chalkTag = (chalk116, ...strings) => {
|
18212
18212
|
const [firstString] = strings;
|
18213
18213
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
18214
18214
|
return strings.join(" ");
|
@@ -18224,14 +18224,14 @@ var require_source2 = __commonJS2({
|
|
18224
18224
|
if (template === void 0) {
|
18225
18225
|
template = require_templates3();
|
18226
18226
|
}
|
18227
|
-
return template(
|
18227
|
+
return template(chalk116, parts.join(""));
|
18228
18228
|
};
|
18229
18229
|
Object.defineProperties(Chalk3.prototype, styles);
|
18230
|
-
var
|
18231
|
-
|
18232
|
-
|
18233
|
-
|
18234
|
-
module2.exports =
|
18230
|
+
var chalk115 = Chalk3();
|
18231
|
+
chalk115.supportsColor = stdoutColor;
|
18232
|
+
chalk115.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
18233
|
+
chalk115.stderr.supportsColor = stderrColor;
|
18234
|
+
module2.exports = chalk115;
|
18235
18235
|
}
|
18236
18236
|
});
|
18237
18237
|
|
@@ -20999,7 +20999,7 @@ var require_figures = __commonJS2({
|
|
20999
20999
|
"use strict";
|
21000
21000
|
var escapeStringRegexp = require_escape_string_regexp();
|
21001
21001
|
var { platform } = process;
|
21002
|
-
var
|
21002
|
+
var main16 = {
|
21003
21003
|
tick: "\u2714",
|
21004
21004
|
cross: "\u2716",
|
21005
21005
|
star: "\u2605",
|
@@ -21085,12 +21085,12 @@ var require_figures = __commonJS2({
|
|
21085
21085
|
hamburger: "\u2261",
|
21086
21086
|
smiley: "\u263A",
|
21087
21087
|
mustache: "\u250C\u2500\u2510",
|
21088
|
-
heart:
|
21088
|
+
heart: main16.heart,
|
21089
21089
|
nodejs: "\u2666",
|
21090
|
-
arrowUp:
|
21091
|
-
arrowDown:
|
21092
|
-
arrowLeft:
|
21093
|
-
arrowRight:
|
21090
|
+
arrowUp: main16.arrowUp,
|
21091
|
+
arrowDown: main16.arrowDown,
|
21092
|
+
arrowLeft: main16.arrowLeft,
|
21093
|
+
arrowRight: main16.arrowRight,
|
21094
21094
|
radioOn: "(*)",
|
21095
21095
|
radioOff: "( )",
|
21096
21096
|
checkboxOn: "[\xD7]",
|
@@ -21118,14 +21118,14 @@ var require_figures = __commonJS2({
|
|
21118
21118
|
sevenEighths: "7/8"
|
21119
21119
|
};
|
21120
21120
|
if (platform === "linux") {
|
21121
|
-
|
21121
|
+
main16.questionMarkPrefix = "?";
|
21122
21122
|
}
|
21123
|
-
var figures4 = platform === "win32" ? windows :
|
21123
|
+
var figures4 = platform === "win32" ? windows : main16;
|
21124
21124
|
var fn2 = (string) => {
|
21125
|
-
if (figures4 ===
|
21125
|
+
if (figures4 === main16) {
|
21126
21126
|
return string;
|
21127
21127
|
}
|
21128
|
-
for (const [key, value] of Object.entries(
|
21128
|
+
for (const [key, value] of Object.entries(main16)) {
|
21129
21129
|
if (value === figures4[key]) {
|
21130
21130
|
continue;
|
21131
21131
|
}
|
@@ -21134,7 +21134,7 @@ var require_figures = __commonJS2({
|
|
21134
21134
|
return string;
|
21135
21135
|
};
|
21136
21136
|
module2.exports = Object.assign(fn2, figures4);
|
21137
|
-
module2.exports.main =
|
21137
|
+
module2.exports.main = main16;
|
21138
21138
|
module2.exports.windows = windows;
|
21139
21139
|
}
|
21140
21140
|
});
|
@@ -28275,7 +28275,7 @@ var require_write_json_file = __commonJS2({
|
|
28275
28275
|
};
|
28276
28276
|
var readFile6 = (fp) => pify(fs15.readFile)(fp, "utf8").catch(() => {
|
28277
28277
|
});
|
28278
|
-
var
|
28278
|
+
var main16 = (fp, data, opts) => {
|
28279
28279
|
return (opts.detectIndent ? readFile6(fp) : Promise.resolve()).then((str) => {
|
28280
28280
|
const indent = str ? detectIndent(str).indent : opts.indent;
|
28281
28281
|
const json = JSON.stringify(data, opts.replacer, indent);
|
@@ -28300,7 +28300,7 @@ var require_write_json_file = __commonJS2({
|
|
28300
28300
|
`, { mode: opts.mode });
|
28301
28301
|
};
|
28302
28302
|
module2.exports = (fp, data, opts) => {
|
28303
|
-
return makeDir(path11.dirname(fp), { fs: fs15 }).then(() => init3(
|
28303
|
+
return makeDir(path11.dirname(fp), { fs: fs15 }).then(() => init3(main16, fp, data, opts));
|
28304
28304
|
};
|
28305
28305
|
module2.exports.sync = (fp, data, opts) => {
|
28306
28306
|
makeDir.sync(path11.dirname(fp), { fs: fs15 });
|
@@ -29515,7 +29515,7 @@ var require_empty2 = __commonJS2({
|
|
29515
29515
|
var fs15 = require("fs");
|
29516
29516
|
var path11 = require("path");
|
29517
29517
|
var mkdir2 = require_mkdirs3();
|
29518
|
-
var
|
29518
|
+
var remove6 = require_remove2();
|
29519
29519
|
var emptyDir = u(function emptyDir2(dir, callback) {
|
29520
29520
|
callback = callback || function() {
|
29521
29521
|
};
|
@@ -29528,7 +29528,7 @@ var require_empty2 = __commonJS2({
|
|
29528
29528
|
const item = items.pop();
|
29529
29529
|
if (!item)
|
29530
29530
|
return callback();
|
29531
|
-
|
29531
|
+
remove6.remove(item, (err2) => {
|
29532
29532
|
if (err2)
|
29533
29533
|
return callback(err2);
|
29534
29534
|
deleteItem();
|
@@ -29545,7 +29545,7 @@ var require_empty2 = __commonJS2({
|
|
29545
29545
|
}
|
29546
29546
|
items.forEach((item) => {
|
29547
29547
|
item = path11.join(dir, item);
|
29548
|
-
|
29548
|
+
remove6.removeSync(item);
|
29549
29549
|
});
|
29550
29550
|
}
|
29551
29551
|
module2.exports = {
|
@@ -30156,7 +30156,7 @@ var require_move3 = __commonJS2({
|
|
30156
30156
|
var fs15 = require("fs");
|
30157
30157
|
var path11 = require("path");
|
30158
30158
|
var copy = require_copy4().copy;
|
30159
|
-
var
|
30159
|
+
var remove6 = require_remove2().remove;
|
30160
30160
|
var mkdirp4 = require_mkdirs3().mkdirp;
|
30161
30161
|
var pathExists = require_path_exists2().pathExists;
|
30162
30162
|
var stat2 = require_stat2();
|
@@ -30183,7 +30183,7 @@ var require_move3 = __commonJS2({
|
|
30183
30183
|
}
|
30184
30184
|
function doRename(src, dest, overwrite, cb) {
|
30185
30185
|
if (overwrite) {
|
30186
|
-
return
|
30186
|
+
return remove6(dest, (err) => {
|
30187
30187
|
if (err)
|
30188
30188
|
return cb(err);
|
30189
30189
|
return rename(src, dest, overwrite, cb);
|
@@ -30214,7 +30214,7 @@ var require_move3 = __commonJS2({
|
|
30214
30214
|
copy(src, dest, opts, (err) => {
|
30215
30215
|
if (err)
|
30216
30216
|
return cb(err);
|
30217
|
-
return
|
30217
|
+
return remove6(src, cb);
|
30218
30218
|
});
|
30219
30219
|
}
|
30220
30220
|
module2.exports = move3;
|
@@ -31118,7 +31118,7 @@ var require_package = __commonJS2({
|
|
31118
31118
|
"../client/package.json"(exports2, module2) {
|
31119
31119
|
module2.exports = {
|
31120
31120
|
name: "@vercel/client",
|
31121
|
-
version: "13.4.
|
31121
|
+
version: "13.4.16",
|
31122
31122
|
main: "dist/index.js",
|
31123
31123
|
typings: "dist/index.d.ts",
|
31124
31124
|
homepage: "https://vercel.com",
|
@@ -31155,7 +31155,7 @@ var require_package = __commonJS2({
|
|
31155
31155
|
typescript: "4.9.5"
|
31156
31156
|
},
|
31157
31157
|
dependencies: {
|
31158
|
-
"@vercel/build-utils": "8.4.
|
31158
|
+
"@vercel/build-utils": "8.4.12",
|
31159
31159
|
"@vercel/error-utils": "2.0.2",
|
31160
31160
|
"@vercel/routing-utils": "3.1.0",
|
31161
31161
|
"async-retry": "1.2.3",
|
@@ -44791,7 +44791,7 @@ var require_empty3 = __commonJS2({
|
|
44791
44791
|
var fs15 = require_graceful_fs();
|
44792
44792
|
var path11 = require("path");
|
44793
44793
|
var mkdir2 = require_mkdirs5();
|
44794
|
-
var
|
44794
|
+
var remove6 = require_remove3();
|
44795
44795
|
var emptyDir = u(function emptyDir2(dir, callback) {
|
44796
44796
|
callback = callback || function() {
|
44797
44797
|
};
|
@@ -44804,7 +44804,7 @@ var require_empty3 = __commonJS2({
|
|
44804
44804
|
const item = items.pop();
|
44805
44805
|
if (!item)
|
44806
44806
|
return callback();
|
44807
|
-
|
44807
|
+
remove6.remove(item, (err2) => {
|
44808
44808
|
if (err2)
|
44809
44809
|
return callback(err2);
|
44810
44810
|
deleteItem();
|
@@ -44821,7 +44821,7 @@ var require_empty3 = __commonJS2({
|
|
44821
44821
|
}
|
44822
44822
|
items.forEach((item) => {
|
44823
44823
|
item = path11.join(dir, item);
|
44824
|
-
|
44824
|
+
remove6.removeSync(item);
|
44825
44825
|
});
|
44826
44826
|
}
|
44827
44827
|
module2.exports = {
|
@@ -45315,7 +45315,7 @@ var require_move5 = __commonJS2({
|
|
45315
45315
|
var fs15 = require_graceful_fs();
|
45316
45316
|
var path11 = require("path");
|
45317
45317
|
var copy = require_copy6().copy;
|
45318
|
-
var
|
45318
|
+
var remove6 = require_remove3().remove;
|
45319
45319
|
var mkdirp4 = require_mkdirs5().mkdirp;
|
45320
45320
|
var pathExists = require_path_exists3().pathExists;
|
45321
45321
|
var stat2 = require_stat3();
|
@@ -45342,7 +45342,7 @@ var require_move5 = __commonJS2({
|
|
45342
45342
|
}
|
45343
45343
|
function doRename(src, dest, overwrite, cb) {
|
45344
45344
|
if (overwrite) {
|
45345
|
-
return
|
45345
|
+
return remove6(dest, (err) => {
|
45346
45346
|
if (err)
|
45347
45347
|
return cb(err);
|
45348
45348
|
return rename(src, dest, overwrite, cb);
|
@@ -45373,7 +45373,7 @@ var require_move5 = __commonJS2({
|
|
45373
45373
|
copy(src, dest, opts, (err) => {
|
45374
45374
|
if (err)
|
45375
45375
|
return cb(err);
|
45376
|
-
return
|
45376
|
+
return remove6(src, cb);
|
45377
45377
|
});
|
45378
45378
|
}
|
45379
45379
|
module2.exports = move3;
|
@@ -48040,7 +48040,7 @@ var require_estraverse = __commonJS2({
|
|
48040
48040
|
Reference.prototype.replace = function replace2(node) {
|
48041
48041
|
this.parent[this.key] = node;
|
48042
48042
|
};
|
48043
|
-
Reference.prototype.remove = function
|
48043
|
+
Reference.prototype.remove = function remove6() {
|
48044
48044
|
if (Array.isArray(this.parent)) {
|
48045
48045
|
this.parent.splice(this.key, 1);
|
48046
48046
|
return true;
|
@@ -68544,7 +68544,7 @@ var require_merge_stream = __commonJS2({
|
|
68544
68544
|
output2.setMaxListeners(0);
|
68545
68545
|
output2.add = add9;
|
68546
68546
|
output2.isEmpty = isEmpty;
|
68547
|
-
output2.on("unpipe",
|
68547
|
+
output2.on("unpipe", remove6);
|
68548
68548
|
Array.prototype.slice.call(arguments).forEach(add9);
|
68549
68549
|
return output2;
|
68550
68550
|
function add9(source) {
|
@@ -68553,7 +68553,7 @@ var require_merge_stream = __commonJS2({
|
|
68553
68553
|
return this;
|
68554
68554
|
}
|
68555
68555
|
sources.push(source);
|
68556
|
-
source.once("end",
|
68556
|
+
source.once("end", remove6.bind(null, source));
|
68557
68557
|
source.once("error", output2.emit.bind(output2, "error"));
|
68558
68558
|
source.pipe(output2, { end: false });
|
68559
68559
|
return this;
|
@@ -68561,7 +68561,7 @@ var require_merge_stream = __commonJS2({
|
|
68561
68561
|
function isEmpty() {
|
68562
68562
|
return sources.length == 0;
|
68563
68563
|
}
|
68564
|
-
function
|
68564
|
+
function remove6(source) {
|
68565
68565
|
sources = sources.filter(function(it) {
|
68566
68566
|
return it !== source;
|
68567
68567
|
});
|
@@ -70100,7 +70100,8 @@ var init_telemetry = __esm({
|
|
70100
70100
|
this.redactedArgumentsLength = (args2) => {
|
70101
70101
|
if (args2 && args2.length === 1) {
|
70102
70102
|
return "ONE";
|
70103
|
-
}
|
70103
|
+
}
|
70104
|
+
if (args2.length > 1) {
|
70104
70105
|
return "MANY";
|
70105
70106
|
}
|
70106
70107
|
return "NONE";
|
@@ -70232,14 +70233,14 @@ var init_telemetry = __esm({
|
|
70232
70233
|
if (process.env.VERCEL_TELEMETRY_DISABLED) {
|
70233
70234
|
return false;
|
70234
70235
|
}
|
70235
|
-
return this.config?.enabled
|
70236
|
+
return this.config?.enabled ?? true;
|
70236
70237
|
}
|
70237
70238
|
save() {
|
70238
70239
|
if (this.isDebug) {
|
70239
70240
|
output_manager_default.log(`${LogLabel} Flushing Events`);
|
70240
|
-
this.events
|
70241
|
+
for (const event of this.events) {
|
70241
70242
|
output_manager_default.log(JSON.stringify(event));
|
70242
|
-
}
|
70243
|
+
}
|
70243
70244
|
return;
|
70244
70245
|
}
|
70245
70246
|
if (this.enabled) {
|
@@ -85945,7 +85946,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
85945
85946
|
});
|
85946
85947
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
85947
85948
|
var import_semver4 = __toESM4(require_semver2());
|
85948
|
-
var
|
85949
|
+
var import__61 = require_dist27();
|
85949
85950
|
async function detectFileSystemAPI2({
|
85950
85951
|
files,
|
85951
85952
|
projectSettings,
|
@@ -86011,7 +86012,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
86011
86012
|
};
|
86012
86013
|
}
|
86013
86014
|
const invalidBuilder = builders.find(({ use }) => {
|
86014
|
-
const valid = (0,
|
86015
|
+
const valid = (0, import__61.isOfficialRuntime)("go", use) || (0, import__61.isOfficialRuntime)("python", use) || (0, import__61.isOfficialRuntime)("ruby", use) || (0, import__61.isOfficialRuntime)("node", use) || (0, import__61.isOfficialRuntime)("next", use) || (0, import__61.isOfficialRuntime)("static", use) || (0, import__61.isOfficialRuntime)("static-build", use);
|
86015
86016
|
return !valid;
|
86016
86017
|
});
|
86017
86018
|
if (invalidBuilder) {
|
@@ -86024,7 +86025,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
86024
86025
|
for (const lang of ["go", "python", "ruby"]) {
|
86025
86026
|
for (const { use } of builders) {
|
86026
86027
|
const plugin = "vercel-plugin-" + lang;
|
86027
|
-
if ((0,
|
86028
|
+
if ((0, import__61.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
86028
86029
|
return {
|
86029
86030
|
metadata,
|
86030
86031
|
fsApiBuilder: null,
|
@@ -86081,7 +86082,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
86081
86082
|
}
|
86082
86083
|
}
|
86083
86084
|
const frontendBuilder = builders.find(
|
86084
|
-
({ use }) => (0,
|
86085
|
+
({ use }) => (0, import__61.isOfficialRuntime)("next", use) || (0, import__61.isOfficialRuntime)("static", use) || (0, import__61.isOfficialRuntime)("static-build", use)
|
86085
86086
|
);
|
86086
86087
|
const config2 = frontendBuilder?.config || {};
|
86087
86088
|
const withTag = tag ? `@${tag}` : "";
|
@@ -102697,7 +102698,7 @@ var require_ini = __commonJS2({
|
|
102697
102698
|
p[key] = value;
|
102698
102699
|
}
|
102699
102700
|
}
|
102700
|
-
const
|
102701
|
+
const remove6 = [];
|
102701
102702
|
for (const k of Object.keys(out)) {
|
102702
102703
|
if (!hasOwnProperty3.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) {
|
102703
102704
|
continue;
|
@@ -102719,9 +102720,9 @@ var require_ini = __commonJS2({
|
|
102719
102720
|
continue;
|
102720
102721
|
}
|
102721
102722
|
p[nl] = out[k];
|
102722
|
-
|
102723
|
+
remove6.push(k);
|
102723
102724
|
}
|
102724
|
-
for (const del of
|
102725
|
+
for (const del of remove6) {
|
102725
102726
|
delete out[del];
|
102726
102727
|
}
|
102727
102728
|
return out;
|
@@ -107212,7 +107213,7 @@ var require_split2 = __commonJS2({
|
|
107212
107213
|
});
|
107213
107214
|
|
107214
107215
|
// src/util/events.ts
|
107215
|
-
async function printEvents(client2,
|
107216
|
+
async function printEvents(client2, urlOrDeploymentId, { mode, onEvent, quiet, findOpts }, abortController) {
|
107216
107217
|
const { log: log2, debug: debug2 } = output_manager_default;
|
107217
107218
|
const { contextName } = await getScope(client2);
|
107218
107219
|
let o = 0;
|
@@ -107232,7 +107233,7 @@ async function printEvents(client2, deploymentIdOrURL, { mode, onEvent, quiet, f
|
|
107232
107233
|
query.set("since", String(findOpts.since));
|
107233
107234
|
if (findOpts.until)
|
107234
107235
|
query.set("until", String(findOpts.until));
|
107235
|
-
const eventsUrl = `/v3/now/deployments/${
|
107236
|
+
const eventsUrl = `/v3/now/deployments/${urlOrDeploymentId}/events?${query}`;
|
107236
107237
|
try {
|
107237
107238
|
const eventsRes = await client2.fetch(eventsUrl, {
|
107238
107239
|
json: false,
|
@@ -107251,7 +107252,7 @@ async function printEvents(client2, deploymentIdOrURL, { mode, onEvent, quiet, f
|
|
107251
107252
|
const json = await getDeployment(
|
107252
107253
|
client2,
|
107253
107254
|
contextName,
|
107254
|
-
|
107255
|
+
urlOrDeploymentId
|
107255
107256
|
);
|
107256
107257
|
if (json.readyState === "READY") {
|
107257
107258
|
stream.end();
|
@@ -107316,7 +107317,7 @@ async function printEvents(client2, deploymentIdOrURL, { mode, onEvent, quiet, f
|
|
107316
107317
|
setTimeout(() => {
|
107317
107318
|
if (abortController?.signal.aborted)
|
107318
107319
|
return;
|
107319
|
-
printEvents(client2,
|
107320
|
+
printEvents(client2, urlOrDeploymentId, {
|
107320
107321
|
mode,
|
107321
107322
|
onEvent,
|
107322
107323
|
quiet,
|
@@ -108537,6 +108538,14 @@ var init_pull3 = __esm({
|
|
108537
108538
|
"use strict";
|
108538
108539
|
init_telemetry();
|
108539
108540
|
PullTelemetryClient = class extends TelemetryClient {
|
108541
|
+
trackCliArgumentProjectPath(value) {
|
108542
|
+
if (value) {
|
108543
|
+
this.trackCliArgument({
|
108544
|
+
arg: "projectPath",
|
108545
|
+
value: this.redactedValue
|
108546
|
+
});
|
108547
|
+
}
|
108548
|
+
}
|
108540
108549
|
trackCliOptionEnvironment(environment) {
|
108541
108550
|
if (environment) {
|
108542
108551
|
const standardEnvironments = ["production", "preview", "development"];
|
@@ -108622,6 +108631,7 @@ async function main(client2) {
|
|
108622
108631
|
store: client2.telemetryEventStore
|
108623
108632
|
}
|
108624
108633
|
});
|
108634
|
+
telemetryClient.trackCliArgumentProjectPath(parsedArgs.args[1]);
|
108625
108635
|
telemetryClient.trackCliFlagYes(autoConfirm);
|
108626
108636
|
telemetryClient.trackCliFlagProd(isProduction);
|
108627
108637
|
telemetryClient.trackCliOptionGitBranch(parsedArgs.flags["--git-branch"]);
|
@@ -122781,7 +122791,7 @@ var init_deploy = __esm({
|
|
122781
122791
|
init_telemetry();
|
122782
122792
|
DeployTelemetryClient = class extends TelemetryClient {
|
122783
122793
|
trackCliArgumentProjectPath(projectPaths) {
|
122784
|
-
if (projectPaths
|
122794
|
+
if (projectPaths) {
|
122785
122795
|
this.trackCliArgument({
|
122786
122796
|
arg: "project-path",
|
122787
122797
|
value: this.redactedValue
|
@@ -123069,7 +123079,7 @@ var init_deploy2 = __esm({
|
|
123069
123079
|
let paths;
|
123070
123080
|
if (parsedArguments.args.length > 0) {
|
123071
123081
|
paths = parsedArguments.args.map((item) => (0, import_path32.resolve)(client2.cwd, item));
|
123072
|
-
telemetryClient.trackCliArgumentProjectPath(paths);
|
123082
|
+
telemetryClient.trackCliArgumentProjectPath(paths[0]);
|
123073
123083
|
} else {
|
123074
123084
|
paths = [client2.cwd];
|
123075
123085
|
}
|
@@ -142574,7 +142584,7 @@ var init_dev2 = __esm({
|
|
142574
142584
|
}
|
142575
142585
|
trackCliFlagHelp(help3) {
|
142576
142586
|
if (help3) {
|
142577
|
-
this.
|
142587
|
+
this.trackCliFlag("help");
|
142578
142588
|
}
|
142579
142589
|
}
|
142580
142590
|
};
|
@@ -142952,7 +142962,7 @@ var init_add3 = __esm({
|
|
142952
142962
|
}
|
142953
142963
|
}
|
142954
142964
|
trackCliArgumentValues(values) {
|
142955
|
-
if (values
|
142965
|
+
if (values?.length) {
|
142956
142966
|
this.trackCliArgument({
|
142957
142967
|
arg: "values",
|
142958
142968
|
value: this.redactedValue
|
@@ -144108,7 +144118,8 @@ async function add4(client2, opts, args2) {
|
|
144108
144118
|
`${getCommandName("domains add <domain>")} expects one argument.`
|
144109
144119
|
);
|
144110
144120
|
return 1;
|
144111
|
-
}
|
144121
|
+
}
|
144122
|
+
if (!project && args2.length !== 2) {
|
144112
144123
|
output_manager_default.error(
|
144113
144124
|
`${getCommandName(
|
144114
144125
|
"domains add <domain> <project>"
|
@@ -144149,7 +144160,7 @@ async function add4(client2, opts, args2) {
|
|
144149
144160
|
);
|
144150
144161
|
if (isPublicSuffix(domainName)) {
|
144151
144162
|
output_manager_default.log(
|
144152
|
-
|
144163
|
+
"The domain will automatically get assigned to your latest production deployment."
|
144153
144164
|
);
|
144154
144165
|
return 0;
|
144155
144166
|
}
|
@@ -144161,7 +144172,7 @@ async function add4(client2, opts, args2) {
|
|
144161
144172
|
const domainConfig = await getDomainConfig(client2, domainName);
|
144162
144173
|
if (domainConfig.misconfigured) {
|
144163
144174
|
output_manager_default.warn(
|
144164
|
-
|
144175
|
+
"This domain is not configured properly. To configure it you should either:"
|
144165
144176
|
);
|
144166
144177
|
output_manager_default.print(
|
144167
144178
|
` ${import_chalk73.default.grey("a)")} Set the following record on your DNS provider to continue: ${code(`A ${domainName} 76.76.21.21`)} ${import_chalk73.default.grey("[recommended]")}
|
@@ -144181,13 +144192,12 @@ ${formatNSTable(
|
|
144181
144192
|
`
|
144182
144193
|
);
|
144183
144194
|
output_manager_default.print(
|
144184
|
-
|
144185
|
-
`
|
144195
|
+
" We will run a verification for you and you will receive an email upon completion.\n"
|
144186
144196
|
);
|
144187
144197
|
output_manager_default.print(" Read more: https://vercel.link/domain-configuration\n\n");
|
144188
144198
|
} else {
|
144189
144199
|
output_manager_default.log(
|
144190
|
-
|
144200
|
+
"The domain will automatically get assigned to your latest production deployment."
|
144191
144201
|
);
|
144192
144202
|
}
|
144193
144203
|
return 0;
|
@@ -146893,16 +146903,6 @@ var init_connect = __esm({
|
|
146893
146903
|
});
|
146894
146904
|
}
|
146895
146905
|
}
|
146896
|
-
trackCliFlagYes(yes) {
|
146897
|
-
if (yes) {
|
146898
|
-
this.trackCliFlag("yes");
|
146899
|
-
}
|
146900
|
-
}
|
146901
|
-
trackCliFlagConfirm(confirm2) {
|
146902
|
-
if (confirm2) {
|
146903
|
-
this.trackCliFlag("confirm");
|
146904
|
-
}
|
146905
|
-
}
|
146906
146906
|
};
|
146907
146907
|
}
|
146908
146908
|
});
|
@@ -146915,8 +146915,6 @@ async function connect(client2, argv, args2, project, org) {
|
|
146915
146915
|
store: client2.telemetryEventStore
|
146916
146916
|
}
|
146917
146917
|
});
|
146918
|
-
telemetry2.trackCliFlagYes(argv["--yes"]);
|
146919
|
-
telemetry2.trackCliFlagConfirm(argv["--confirm"]);
|
146920
146918
|
const confirm2 = Boolean(argv["--yes"]);
|
146921
146919
|
const repoArg = args2[0];
|
146922
146920
|
if (args2.length > 1) {
|
@@ -147385,6 +147383,16 @@ var init_git = __esm({
|
|
147385
147383
|
value: actual
|
147386
147384
|
});
|
147387
147385
|
}
|
147386
|
+
trackCliFlagConfirm(confirm2) {
|
147387
|
+
if (confirm2) {
|
147388
|
+
this.trackCliFlag("confirm");
|
147389
|
+
}
|
147390
|
+
}
|
147391
|
+
trackCliFlagYes(yes) {
|
147392
|
+
if (yes) {
|
147393
|
+
this.trackCliFlag("yes");
|
147394
|
+
}
|
147395
|
+
}
|
147388
147396
|
};
|
147389
147397
|
}
|
147390
147398
|
});
|
@@ -147413,6 +147421,8 @@ async function main7(client2) {
|
|
147413
147421
|
output_manager_default.print(help2(gitCommand, { columns: client2.stderr.columns }));
|
147414
147422
|
return 2;
|
147415
147423
|
}
|
147424
|
+
telemetry2.trackCliFlagConfirm(parsedArgs.flags["--confirm"]);
|
147425
|
+
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
147416
147426
|
if ("--confirm" in parsedArgs.flags) {
|
147417
147427
|
output_manager_default.warn("`--confirm` is deprecated, please use `--yes` instead");
|
147418
147428
|
parsedArgs.flags["--yes"] = parsedArgs.flags["--confirm"];
|
@@ -147979,8 +147989,8 @@ var init_builds = __esm({
|
|
147979
147989
|
}
|
147980
147990
|
}
|
147981
147991
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
147982
|
-
const
|
147983
|
-
return `${import_chalk88.default.grey(corner)} ${color(
|
147992
|
+
const main16 = prefix + path11 + finalSize + finalRegion;
|
147993
|
+
return `${import_chalk88.default.grey(corner)} ${color(main16)}`;
|
147984
147994
|
};
|
147985
147995
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
147986
147996
|
const parts = path11.split("/").slice(0, -1);
|
@@ -148223,7 +148233,7 @@ var init_command14 = __esm({
|
|
148223
148233
|
description: "Show information about a deployment.",
|
148224
148234
|
arguments: [
|
148225
148235
|
{
|
148226
|
-
name: "url",
|
148236
|
+
name: "url|deploymentId",
|
148227
148237
|
required: true
|
148228
148238
|
}
|
148229
148239
|
],
|
@@ -148284,7 +148294,7 @@ var init_inspect3 = __esm({
|
|
148284
148294
|
"use strict";
|
148285
148295
|
init_telemetry();
|
148286
148296
|
InspectTelemetryClient = class extends TelemetryClient {
|
148287
|
-
|
148297
|
+
trackCliArgumentUrlOrDeploymentId(idOrHost) {
|
148288
148298
|
if (idOrHost) {
|
148289
148299
|
this.trackCliArgument({
|
148290
148300
|
arg: "deploymentIdOrHost",
|
@@ -148353,7 +148363,7 @@ async function inspect3(client2) {
|
|
148353
148363
|
print(help2(inspectCommand, { columns: client2.stderr.columns }));
|
148354
148364
|
return 1;
|
148355
148365
|
}
|
148356
|
-
telemetry2.
|
148366
|
+
telemetry2.trackCliArgumentUrlOrDeploymentId(deploymentIdOrHost);
|
148357
148367
|
telemetry2.trackCliOptionTimeout(parsedArguments.flags["--timeout"]);
|
148358
148368
|
telemetry2.trackCliFlagLogs(parsedArguments.flags["--logs"]);
|
148359
148369
|
telemetry2.trackCliFlagWait(parsedArguments.flags["--wait"]);
|
@@ -148780,7 +148790,7 @@ var init_provision_store_resource = __esm({
|
|
148780
148790
|
}
|
148781
148791
|
});
|
148782
148792
|
|
148783
|
-
// src/util/integration/connect-resource-to-project.ts
|
148793
|
+
// src/util/integration-resource/connect-resource-to-project.ts
|
148784
148794
|
async function connectResourceToProject(client2, projectId, storeId, environments) {
|
148785
148795
|
return client2.fetch(`/v1/storage/stores/${storeId}/connections`, {
|
148786
148796
|
json: true,
|
@@ -148793,7 +148803,7 @@ async function connectResourceToProject(client2, projectId, storeId, environment
|
|
148793
148803
|
});
|
148794
148804
|
}
|
148795
148805
|
var init_connect_resource_to_project = __esm({
|
148796
|
-
"src/util/integration/connect-resource-to-project.ts"() {
|
148806
|
+
"src/util/integration-resource/connect-resource-to-project.ts"() {
|
148797
148807
|
"use strict";
|
148798
148808
|
}
|
148799
148809
|
});
|
@@ -149264,13 +149274,49 @@ var init_install = __esm({
|
|
149264
149274
|
}
|
149265
149275
|
});
|
149266
149276
|
|
149277
|
+
// src/util/telemetry/commands/integration/index.ts
|
149278
|
+
var IntegrationTelemetryClient;
|
149279
|
+
var init_integration = __esm({
|
149280
|
+
"src/util/telemetry/commands/integration/index.ts"() {
|
149281
|
+
"use strict";
|
149282
|
+
init_telemetry();
|
149283
|
+
IntegrationTelemetryClient = class extends TelemetryClient {
|
149284
|
+
trackCliSubcommandAdd(actual) {
|
149285
|
+
this.trackCliSubcommand({
|
149286
|
+
subcommand: "add",
|
149287
|
+
value: actual
|
149288
|
+
});
|
149289
|
+
}
|
149290
|
+
trackCliSubcommandList(actual) {
|
149291
|
+
this.trackCliSubcommand({
|
149292
|
+
subcommand: "list",
|
149293
|
+
value: actual
|
149294
|
+
});
|
149295
|
+
}
|
149296
|
+
trackCliSubcommandOpen(actual) {
|
149297
|
+
this.trackCliSubcommand({
|
149298
|
+
subcommand: "open",
|
149299
|
+
value: actual
|
149300
|
+
});
|
149301
|
+
}
|
149302
|
+
trackCliSubcommandRemove(actual) {
|
149303
|
+
this.trackCliSubcommand({
|
149304
|
+
subcommand: "remove",
|
149305
|
+
value: actual
|
149306
|
+
});
|
149307
|
+
}
|
149308
|
+
};
|
149309
|
+
}
|
149310
|
+
});
|
149311
|
+
|
149267
149312
|
// src/commands/integration/command.ts
|
149268
|
-
var
|
149313
|
+
var addSubcommand, openSubcommand, listSubcommand, removeSubcommand, integrationCommand;
|
149269
149314
|
var init_command16 = __esm({
|
149270
149315
|
"src/commands/integration/command.ts"() {
|
149271
149316
|
"use strict";
|
149317
|
+
init_arg_common();
|
149272
149318
|
init_pkg_name();
|
149273
|
-
|
149319
|
+
addSubcommand = {
|
149274
149320
|
name: "add",
|
149275
149321
|
description: "Installs a marketplace integration",
|
149276
149322
|
arguments: [
|
@@ -149290,7 +149336,7 @@ var init_command16 = __esm({
|
|
149290
149336
|
}
|
149291
149337
|
]
|
149292
149338
|
};
|
149293
|
-
|
149339
|
+
openSubcommand = {
|
149294
149340
|
name: "open",
|
149295
149341
|
description: "Opens a marketplace integration's dashboard",
|
149296
149342
|
arguments: [
|
@@ -149344,16 +149390,41 @@ var init_command16 = __esm({
|
|
149344
149390
|
{
|
149345
149391
|
name: "Filter the resources to a single integration",
|
149346
149392
|
value: [
|
149347
|
-
`${packageName}
|
149348
|
-
`${packageName}
|
149349
|
-
`${packageName}
|
149393
|
+
`${packageName} integration list --integration <integration>`,
|
149394
|
+
`${packageName} integration list --integration acme`,
|
149395
|
+
`${packageName} integration list -i acme`
|
149350
149396
|
]
|
149351
149397
|
},
|
149352
149398
|
{
|
149353
149399
|
name: "List all marketplace resources for the current team",
|
149354
149400
|
value: [
|
149355
|
-
`${packageName}
|
149356
|
-
`${packageName}
|
149401
|
+
`${packageName} integration list --all`,
|
149402
|
+
`${packageName} integration list -a`
|
149403
|
+
]
|
149404
|
+
}
|
149405
|
+
]
|
149406
|
+
};
|
149407
|
+
removeSubcommand = {
|
149408
|
+
name: "remove",
|
149409
|
+
description: "Uninstalls a marketplace integration",
|
149410
|
+
arguments: [
|
149411
|
+
{
|
149412
|
+
name: "integration",
|
149413
|
+
required: true
|
149414
|
+
}
|
149415
|
+
],
|
149416
|
+
options: [
|
149417
|
+
{
|
149418
|
+
...yesOption,
|
149419
|
+
description: "Skip the confirmation prompt when uninstalling an integration"
|
149420
|
+
}
|
149421
|
+
],
|
149422
|
+
examples: [
|
149423
|
+
{
|
149424
|
+
name: "Uninstall an integration",
|
149425
|
+
value: [
|
149426
|
+
`${packageName} integration remove <inegration>`,
|
149427
|
+
`${packageName} integration remove acme`
|
149357
149428
|
]
|
149358
149429
|
}
|
149359
149430
|
]
|
@@ -149368,13 +149439,18 @@ var init_command16 = __esm({
|
|
149368
149439
|
required: true
|
149369
149440
|
}
|
149370
149441
|
],
|
149371
|
-
subcommands: [
|
149442
|
+
subcommands: [
|
149443
|
+
addSubcommand,
|
149444
|
+
listSubcommand,
|
149445
|
+
openSubcommand,
|
149446
|
+
removeSubcommand
|
149447
|
+
],
|
149372
149448
|
examples: []
|
149373
149449
|
};
|
149374
149450
|
}
|
149375
149451
|
});
|
149376
149452
|
|
149377
|
-
// src/util/integration/get-resources.ts
|
149453
|
+
// src/util/integration-resource/get-resources.ts
|
149378
149454
|
async function getResources(client2, teamId) {
|
149379
149455
|
const searchParams = new URLSearchParams();
|
149380
149456
|
searchParams.set("teamId", teamId);
|
@@ -149387,7 +149463,7 @@ async function getResources(client2, teamId) {
|
|
149387
149463
|
return storesResponse.stores;
|
149388
149464
|
}
|
149389
149465
|
var init_get_resources = __esm({
|
149390
|
-
"src/util/integration/get-resources.ts"() {
|
149466
|
+
"src/util/integration-resource/get-resources.ts"() {
|
149391
149467
|
"use strict";
|
149392
149468
|
}
|
149393
149469
|
});
|
@@ -149631,6 +149707,13 @@ async function fetchMarketplaceIntegrations(client2, slug) {
|
|
149631
149707
|
}
|
149632
149708
|
);
|
149633
149709
|
}
|
149710
|
+
async function getFirstConfiguration(client2, integrationSlug) {
|
149711
|
+
const configurations = await fetchMarketplaceIntegrations(
|
149712
|
+
client2,
|
149713
|
+
integrationSlug
|
149714
|
+
);
|
149715
|
+
return configurations.length > 0 ? configurations[0] : void 0;
|
149716
|
+
}
|
149634
149717
|
var init_fetch_marketplace_integrations = __esm({
|
149635
149718
|
"src/util/integration/fetch-marketplace-integrations.ts"() {
|
149636
149719
|
"use strict";
|
@@ -149698,13 +149781,6 @@ async function openIntegration(client2, args2) {
|
|
149698
149781
|
(0, import_open4.default)(buildSSOLink(team, configuration.id));
|
149699
149782
|
return 0;
|
149700
149783
|
}
|
149701
|
-
async function getFirstConfiguration(client2, integrationSlug) {
|
149702
|
-
const configurations = await fetchMarketplaceIntegrations(
|
149703
|
-
client2,
|
149704
|
-
integrationSlug
|
149705
|
-
);
|
149706
|
-
return configurations.length > 0 ? configurations[0] : void 0;
|
149707
|
-
}
|
149708
149784
|
var import_chalk93, import_open4;
|
149709
149785
|
var init_open_integration = __esm({
|
149710
149786
|
"src/commands/integration/open-integration.ts"() {
|
@@ -149719,35 +149795,141 @@ var init_open_integration = __esm({
|
|
149719
149795
|
}
|
149720
149796
|
});
|
149721
149797
|
|
149722
|
-
// src/util/
|
149723
|
-
|
149724
|
-
|
149725
|
-
"
|
149798
|
+
// src/util/integration/remove-integration.ts
|
149799
|
+
async function removeIntegration(client2, configuration, team) {
|
149800
|
+
const params2 = new URLSearchParams();
|
149801
|
+
params2.set("teamId", team.id);
|
149802
|
+
return client2.fetch(
|
149803
|
+
`/v2/integrations/installations/${configuration.id}/uninstall?${params2}`,
|
149804
|
+
{
|
149805
|
+
json: true,
|
149806
|
+
body: {},
|
149807
|
+
method: "POST"
|
149808
|
+
}
|
149809
|
+
);
|
149810
|
+
}
|
149811
|
+
var init_remove_integration = __esm({
|
149812
|
+
"src/util/integration/remove-integration.ts"() {
|
149813
|
+
"use strict";
|
149814
|
+
}
|
149815
|
+
});
|
149816
|
+
|
149817
|
+
// src/util/telemetry/commands/integration/remove.ts
|
149818
|
+
var IntegrationRemoveTelemetryClient;
|
149819
|
+
var init_remove3 = __esm({
|
149820
|
+
"src/util/telemetry/commands/integration/remove.ts"() {
|
149726
149821
|
"use strict";
|
149727
149822
|
init_telemetry();
|
149728
|
-
|
149729
|
-
|
149730
|
-
|
149731
|
-
|
149732
|
-
|
149733
|
-
|
149734
|
-
|
149735
|
-
|
149736
|
-
this.trackCliSubcommand({
|
149737
|
-
subcommand: "list",
|
149738
|
-
value: actual
|
149739
|
-
});
|
149823
|
+
IntegrationRemoveTelemetryClient = class extends TelemetryClient {
|
149824
|
+
trackCliArgumentIntegration(v, known) {
|
149825
|
+
if (v) {
|
149826
|
+
this.trackCliArgument({
|
149827
|
+
arg: "integration",
|
149828
|
+
value: known ? v : this.redactedValue
|
149829
|
+
});
|
149830
|
+
}
|
149740
149831
|
}
|
149741
|
-
|
149742
|
-
|
149743
|
-
|
149744
|
-
|
149745
|
-
});
|
149832
|
+
trackCliFlagYes(v) {
|
149833
|
+
if (v) {
|
149834
|
+
this.trackCliFlag("yes");
|
149835
|
+
}
|
149746
149836
|
}
|
149747
149837
|
};
|
149748
149838
|
}
|
149749
149839
|
});
|
149750
149840
|
|
149841
|
+
// src/commands/integration/remove-integration.ts
|
149842
|
+
async function remove3(client2) {
|
149843
|
+
const telemetry2 = new IntegrationRemoveTelemetryClient({
|
149844
|
+
opts: {
|
149845
|
+
store: client2.telemetryEventStore
|
149846
|
+
}
|
149847
|
+
});
|
149848
|
+
let parsedArguments = null;
|
149849
|
+
const flagsSpecification = getFlagsSpecification(removeSubcommand.options);
|
149850
|
+
try {
|
149851
|
+
parsedArguments = parseArguments(client2.argv.slice(3), flagsSpecification);
|
149852
|
+
} catch (error3) {
|
149853
|
+
handleError(error3);
|
149854
|
+
return 1;
|
149855
|
+
}
|
149856
|
+
const { team } = await getScope(client2);
|
149857
|
+
if (!team) {
|
149858
|
+
output_manager_default.error("Team not found.");
|
149859
|
+
return 1;
|
149860
|
+
}
|
149861
|
+
const isMissingResourceOrIntegration = parsedArguments.args.length < 2;
|
149862
|
+
if (isMissingResourceOrIntegration) {
|
149863
|
+
output_manager_default.error("You must specify an integration. See `--help` for details.");
|
149864
|
+
return 1;
|
149865
|
+
}
|
149866
|
+
const hasTooManyArguments = parsedArguments.args.length > 2;
|
149867
|
+
if (hasTooManyArguments) {
|
149868
|
+
output_manager_default.error("Cannot specify more than one integration at a time.");
|
149869
|
+
return 1;
|
149870
|
+
}
|
149871
|
+
const integrationName = parsedArguments.args[1];
|
149872
|
+
const skipConfirmation = !!parsedArguments.flags["--yes"];
|
149873
|
+
telemetry2.trackCliFlagYes(skipConfirmation);
|
149874
|
+
output_manager_default.spinner("Retrieving integration\u2026", 500);
|
149875
|
+
const integrationConfiguration = await getFirstConfiguration(
|
149876
|
+
client2,
|
149877
|
+
integrationName
|
149878
|
+
);
|
149879
|
+
output_manager_default.stopSpinner();
|
149880
|
+
if (!integrationConfiguration) {
|
149881
|
+
output_manager_default.error(`No integration ${import_chalk94.default.bold(integrationName)} found.`);
|
149882
|
+
telemetry2.trackCliArgumentIntegration(integrationName, false);
|
149883
|
+
return 0;
|
149884
|
+
}
|
149885
|
+
telemetry2.trackCliArgumentIntegration(integrationName, true);
|
149886
|
+
const userDidNotConfirm = !skipConfirmation && !await confirmIntegrationRemoval(
|
149887
|
+
client2,
|
149888
|
+
integrationConfiguration.slug,
|
149889
|
+
team
|
149890
|
+
);
|
149891
|
+
if (userDidNotConfirm) {
|
149892
|
+
output_manager_default.log("Canceled");
|
149893
|
+
return 0;
|
149894
|
+
}
|
149895
|
+
try {
|
149896
|
+
output_manager_default.spinner("Uninstalling integration\u2026", 1e3);
|
149897
|
+
await removeIntegration(client2, integrationConfiguration, team);
|
149898
|
+
} catch (error3) {
|
149899
|
+
output_manager_default.error(
|
149900
|
+
import_chalk94.default.red(
|
149901
|
+
`Failed to remove ${import_chalk94.default.bold(integrationName)}: ${error3.message}`
|
149902
|
+
)
|
149903
|
+
);
|
149904
|
+
return 1;
|
149905
|
+
}
|
149906
|
+
output_manager_default.success(`${import_chalk94.default.bold(integrationName)} successfully removed.`);
|
149907
|
+
return 0;
|
149908
|
+
}
|
149909
|
+
async function confirmIntegrationRemoval(client2, integration, team) {
|
149910
|
+
output_manager_default.log(
|
149911
|
+
`The ${import_chalk94.default.bold(integration)} integration will be removed permanently from team ${import_chalk94.default.bold(team.name)}.`
|
149912
|
+
);
|
149913
|
+
return confirm(client2, `${import_chalk94.default.red("Are you sure?")}`, false);
|
149914
|
+
}
|
149915
|
+
var import_chalk94;
|
149916
|
+
var init_remove_integration2 = __esm({
|
149917
|
+
"src/commands/integration/remove-integration.ts"() {
|
149918
|
+
"use strict";
|
149919
|
+
import_chalk94 = __toESM3(require_source());
|
149920
|
+
init_output_manager();
|
149921
|
+
init_get_args();
|
149922
|
+
init_get_flags_specification();
|
149923
|
+
init_get_scope();
|
149924
|
+
init_handle_error();
|
149925
|
+
init_confirm();
|
149926
|
+
init_fetch_marketplace_integrations();
|
149927
|
+
init_remove_integration();
|
149928
|
+
init_command16();
|
149929
|
+
init_remove3();
|
149930
|
+
}
|
149931
|
+
});
|
149932
|
+
|
149751
149933
|
// src/commands/integration/index.ts
|
149752
149934
|
var integration_exports = {};
|
149753
149935
|
__export3(integration_exports, {
|
@@ -149769,23 +149951,47 @@ async function main9(client2) {
|
|
149769
149951
|
subcommandOriginal,
|
149770
149952
|
args: subArgs
|
149771
149953
|
} = getSubcommand(args2.slice(1), COMMAND_CONFIG9);
|
149772
|
-
|
149954
|
+
const needHelp = flags["--help"];
|
149955
|
+
if (!subcommand && needHelp) {
|
149773
149956
|
output_manager_default.print(help2(integrationCommand, { columns: client2.stderr.columns }));
|
149774
149957
|
return 2;
|
149775
149958
|
}
|
149959
|
+
function printHelp(command) {
|
149960
|
+
output_manager_default.print(help2(command, { columns: client2.stderr.columns }));
|
149961
|
+
}
|
149776
149962
|
switch (subcommand) {
|
149777
149963
|
case "add": {
|
149964
|
+
if (needHelp) {
|
149965
|
+
printHelp(addSubcommand);
|
149966
|
+
return 2;
|
149967
|
+
}
|
149778
149968
|
telemetry2.trackCliSubcommandAdd(subcommandOriginal);
|
149779
149969
|
return add6(client2, subArgs);
|
149780
149970
|
}
|
149781
149971
|
case "list": {
|
149972
|
+
if (needHelp) {
|
149973
|
+
printHelp(listSubcommand);
|
149974
|
+
return 2;
|
149975
|
+
}
|
149782
149976
|
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
149783
149977
|
return list2(client2);
|
149784
149978
|
}
|
149785
149979
|
case "open": {
|
149980
|
+
if (needHelp) {
|
149981
|
+
printHelp(openSubcommand);
|
149982
|
+
return 2;
|
149983
|
+
}
|
149786
149984
|
telemetry2.trackCliSubcommandOpen(subcommandOriginal);
|
149787
149985
|
return openIntegration(client2, subArgs);
|
149788
149986
|
}
|
149987
|
+
case "remove": {
|
149988
|
+
if (needHelp) {
|
149989
|
+
printHelp(removeSubcommand);
|
149990
|
+
return 2;
|
149991
|
+
}
|
149992
|
+
telemetry2.trackCliSubcommandRemove(subcommandOriginal);
|
149993
|
+
return remove3(client2);
|
149994
|
+
}
|
149789
149995
|
default: {
|
149790
149996
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG9));
|
149791
149997
|
return 2;
|
@@ -149796,28 +150002,664 @@ var COMMAND_CONFIG9;
|
|
149796
150002
|
var init_integration2 = __esm({
|
149797
150003
|
"src/commands/integration/index.ts"() {
|
149798
150004
|
"use strict";
|
150005
|
+
init_output_manager();
|
149799
150006
|
init_get_args();
|
149800
150007
|
init_get_flags_specification();
|
149801
150008
|
init_get_invalid_subcommand();
|
149802
150009
|
init_get_subcommand();
|
150010
|
+
init_integration();
|
149803
150011
|
init_help();
|
149804
150012
|
init_add10();
|
149805
150013
|
init_command16();
|
149806
150014
|
init_list3();
|
149807
150015
|
init_open_integration();
|
149808
|
-
|
149809
|
-
init_integration();
|
150016
|
+
init_remove_integration2();
|
149810
150017
|
COMMAND_CONFIG9 = {
|
149811
150018
|
add: ["add"],
|
149812
150019
|
open: ["open"],
|
149813
|
-
list: ["list", "ls"]
|
150020
|
+
list: ["list", "ls"],
|
150021
|
+
remove: ["remove"]
|
150022
|
+
};
|
150023
|
+
}
|
150024
|
+
});
|
150025
|
+
|
150026
|
+
// src/util/telemetry/commands/integration-resource/index.ts
|
150027
|
+
var IntegrationResourceTelemetryClient;
|
150028
|
+
var init_integration_resource = __esm({
|
150029
|
+
"src/util/telemetry/commands/integration-resource/index.ts"() {
|
150030
|
+
"use strict";
|
150031
|
+
init_telemetry();
|
150032
|
+
IntegrationResourceTelemetryClient = class extends TelemetryClient {
|
150033
|
+
trackCliSubcommandRemove(actual) {
|
150034
|
+
this.trackCliSubcommand({
|
150035
|
+
subcommand: "remove",
|
150036
|
+
value: actual
|
150037
|
+
});
|
150038
|
+
}
|
150039
|
+
trackCliSubcommandDisconnect(actual) {
|
150040
|
+
this.trackCliSubcommand({
|
150041
|
+
subcommand: "disconnect",
|
150042
|
+
value: actual
|
150043
|
+
});
|
150044
|
+
}
|
150045
|
+
};
|
150046
|
+
}
|
150047
|
+
});
|
150048
|
+
|
150049
|
+
// src/commands/integration-resource/command.ts
|
150050
|
+
var removeSubcommand2, disconnectSubcommand, integrationResourceCommand;
|
150051
|
+
var init_command17 = __esm({
|
150052
|
+
"src/commands/integration-resource/command.ts"() {
|
150053
|
+
"use strict";
|
150054
|
+
init_arg_common();
|
150055
|
+
init_pkg_name();
|
150056
|
+
removeSubcommand2 = {
|
150057
|
+
name: "remove",
|
150058
|
+
description: "Delete an integration resource",
|
150059
|
+
arguments: [
|
150060
|
+
{
|
150061
|
+
name: "resource",
|
150062
|
+
required: true
|
150063
|
+
}
|
150064
|
+
],
|
150065
|
+
options: [
|
150066
|
+
{
|
150067
|
+
name: "disconnect-all",
|
150068
|
+
description: "disconnects all projects from the specified resource before deletion",
|
150069
|
+
shorthand: "a",
|
150070
|
+
type: Boolean,
|
150071
|
+
deprecated: false
|
150072
|
+
},
|
150073
|
+
{
|
150074
|
+
...yesOption,
|
150075
|
+
description: "Skip the confirmation prompt when deleting a resource"
|
150076
|
+
}
|
150077
|
+
],
|
150078
|
+
examples: [
|
150079
|
+
{
|
150080
|
+
name: "Delete a resource",
|
150081
|
+
value: [
|
150082
|
+
`${packageName} integration-resource remove <resource>`,
|
150083
|
+
`${packageName} integration-resource remove my-acme-resource`
|
150084
|
+
]
|
150085
|
+
},
|
150086
|
+
{
|
150087
|
+
name: "Disconnect all projects from a resource, then delete it",
|
150088
|
+
value: [
|
150089
|
+
`${packageName} integration-resource remove <resource> --disconnect-all`,
|
150090
|
+
`${packageName} integration-resource remove my-acme-resource --disconnect-all`,
|
150091
|
+
`${packageName} integration-resource remove my-acme-resource -a`
|
150092
|
+
]
|
150093
|
+
}
|
150094
|
+
]
|
150095
|
+
};
|
150096
|
+
disconnectSubcommand = {
|
150097
|
+
name: "disconnect",
|
150098
|
+
description: "Disconnect a resource from a project, or the current project",
|
150099
|
+
arguments: [
|
150100
|
+
{
|
150101
|
+
name: "resource",
|
150102
|
+
required: true
|
150103
|
+
},
|
150104
|
+
{
|
150105
|
+
name: "project",
|
150106
|
+
required: false
|
150107
|
+
}
|
150108
|
+
],
|
150109
|
+
options: [
|
150110
|
+
{
|
150111
|
+
name: "all",
|
150112
|
+
description: "disconnects all projects from the specified resource",
|
150113
|
+
shorthand: "a",
|
150114
|
+
type: Boolean,
|
150115
|
+
deprecated: false
|
150116
|
+
},
|
150117
|
+
{
|
150118
|
+
...yesOption,
|
150119
|
+
description: "Skip the confirmation prompt when disconnecting a resource"
|
150120
|
+
}
|
150121
|
+
],
|
150122
|
+
examples: [
|
150123
|
+
{
|
150124
|
+
name: "Disconnect a resource from the current projecct",
|
150125
|
+
value: [
|
150126
|
+
`${packageName} integration-resource disconnect <resource>`,
|
150127
|
+
`${packageName} integration-resource disconnect my-acme-resource`
|
150128
|
+
]
|
150129
|
+
},
|
150130
|
+
{
|
150131
|
+
name: "Disconnect all projects from a resource",
|
150132
|
+
value: [
|
150133
|
+
`${packageName} integration-resource disconnect <resource> --unlink-all`,
|
150134
|
+
`${packageName} integration-resource disconnect my-acme-resource --all`,
|
150135
|
+
`${packageName} integration-resource disconnect my-acme-resource -a`
|
150136
|
+
]
|
150137
|
+
},
|
150138
|
+
{
|
150139
|
+
name: "Disconnect a resource from a specified project",
|
150140
|
+
value: [
|
150141
|
+
`${packageName} integration-resource disconnect <resource> <project>`,
|
150142
|
+
`${packageName} integration-resource disconnect my-acme-resource my-project`
|
150143
|
+
]
|
150144
|
+
}
|
150145
|
+
]
|
150146
|
+
};
|
150147
|
+
integrationResourceCommand = {
|
150148
|
+
name: "integration-resource",
|
150149
|
+
description: "Manage marketplace integration resources",
|
150150
|
+
options: [],
|
150151
|
+
arguments: [
|
150152
|
+
{
|
150153
|
+
name: "command",
|
150154
|
+
required: true
|
150155
|
+
}
|
150156
|
+
],
|
150157
|
+
subcommands: [disconnectSubcommand, removeSubcommand2],
|
150158
|
+
examples: []
|
150159
|
+
};
|
150160
|
+
}
|
150161
|
+
});
|
150162
|
+
|
150163
|
+
// src/util/integration-resource/disconnect-resource-from-project.ts
|
150164
|
+
async function disconnectResourceFromProject(client2, resource, connection) {
|
150165
|
+
return client2.fetch(
|
150166
|
+
`/v1/storage/stores/${resource.id}/connections/${connection.id}`,
|
150167
|
+
{
|
150168
|
+
json: true,
|
150169
|
+
method: "DELETE"
|
150170
|
+
}
|
150171
|
+
);
|
150172
|
+
}
|
150173
|
+
async function disconnectResourceFromAllProjects(client2, resource) {
|
150174
|
+
return client2.fetch(`/v1/storage/stores/${resource.id}/connections`, {
|
150175
|
+
json: true,
|
150176
|
+
method: "DELETE"
|
150177
|
+
});
|
150178
|
+
}
|
150179
|
+
var init_disconnect_resource_from_project = __esm({
|
150180
|
+
"src/util/integration-resource/disconnect-resource-from-project.ts"() {
|
150181
|
+
"use strict";
|
150182
|
+
}
|
150183
|
+
});
|
150184
|
+
|
150185
|
+
// src/util/telemetry/commands/integration-resource/disconnect.ts
|
150186
|
+
var IntegrationResourceDisconnectTelemetryClient;
|
150187
|
+
var init_disconnect2 = __esm({
|
150188
|
+
"src/util/telemetry/commands/integration-resource/disconnect.ts"() {
|
150189
|
+
"use strict";
|
150190
|
+
init_telemetry();
|
150191
|
+
IntegrationResourceDisconnectTelemetryClient = class extends TelemetryClient {
|
150192
|
+
trackCliArgumentResource(v) {
|
150193
|
+
if (v) {
|
150194
|
+
this.trackCliArgument({
|
150195
|
+
arg: "resource",
|
150196
|
+
value: this.redactedValue
|
150197
|
+
});
|
150198
|
+
}
|
150199
|
+
}
|
150200
|
+
trackCliArgumentProject(v) {
|
150201
|
+
if (v) {
|
150202
|
+
this.trackCliArgument({
|
150203
|
+
arg: "project",
|
150204
|
+
value: this.redactedValue
|
150205
|
+
});
|
150206
|
+
}
|
150207
|
+
}
|
150208
|
+
trackCliFlagAll(v) {
|
150209
|
+
if (v) {
|
150210
|
+
this.trackCliFlag("all");
|
150211
|
+
}
|
150212
|
+
}
|
150213
|
+
trackCliFlagYes(v) {
|
150214
|
+
if (v) {
|
150215
|
+
this.trackCliFlag("yes");
|
150216
|
+
}
|
150217
|
+
}
|
150218
|
+
};
|
150219
|
+
}
|
150220
|
+
});
|
150221
|
+
|
150222
|
+
// src/util/integration-resource/types.ts
|
150223
|
+
var CancelledError, FailedError;
|
150224
|
+
var init_types = __esm({
|
150225
|
+
"src/util/integration-resource/types.ts"() {
|
150226
|
+
"use strict";
|
150227
|
+
CancelledError = class extends Error {
|
150228
|
+
};
|
150229
|
+
FailedError = class extends Error {
|
150230
|
+
};
|
150231
|
+
}
|
150232
|
+
});
|
150233
|
+
|
150234
|
+
// src/commands/integration-resource/disconnect.ts
|
150235
|
+
async function disconnect2(client2) {
|
150236
|
+
const telemetry2 = new IntegrationResourceDisconnectTelemetryClient({
|
150237
|
+
opts: {
|
150238
|
+
store: client2.telemetryEventStore
|
150239
|
+
}
|
150240
|
+
});
|
150241
|
+
let parsedArguments = null;
|
150242
|
+
const flagsSpecification = getFlagsSpecification(
|
150243
|
+
disconnectSubcommand.options
|
150244
|
+
);
|
150245
|
+
try {
|
150246
|
+
parsedArguments = parseArguments(client2.argv.slice(3), flagsSpecification);
|
150247
|
+
} catch (error3) {
|
150248
|
+
handleError(error3);
|
150249
|
+
return 1;
|
150250
|
+
}
|
150251
|
+
const { team } = await getScope(client2);
|
150252
|
+
if (!team) {
|
150253
|
+
output_manager_default.error("Team not found.");
|
150254
|
+
return 1;
|
150255
|
+
}
|
150256
|
+
const isMissingResourceOrIntegration = parsedArguments.args.length < 2;
|
150257
|
+
if (isMissingResourceOrIntegration) {
|
150258
|
+
output_manager_default.error("You must specify a resource. See `--help` for details.");
|
150259
|
+
return 1;
|
150260
|
+
}
|
150261
|
+
const hasTooManyArguments = parsedArguments.args.length > 3;
|
150262
|
+
if (hasTooManyArguments) {
|
150263
|
+
output_manager_default.error(
|
150264
|
+
"Cannot specify more than one project at a time. Use `--all` to disconnect the specified resource from all projects."
|
150265
|
+
);
|
150266
|
+
return 1;
|
150267
|
+
}
|
150268
|
+
const skipConfirmation = !!parsedArguments.flags["--yes"];
|
150269
|
+
const shouldDisconnectAll = parsedArguments.flags["--all"];
|
150270
|
+
const isProjectSpecified = parsedArguments.args.length === 3;
|
150271
|
+
if (isProjectSpecified && shouldDisconnectAll) {
|
150272
|
+
output_manager_default.error("Cannot specify a project while using the `--all` flag.");
|
150273
|
+
return 1;
|
150274
|
+
}
|
150275
|
+
const resourceName = parsedArguments.args[1];
|
150276
|
+
let specifiedProject;
|
150277
|
+
if (isProjectSpecified) {
|
150278
|
+
specifiedProject = parsedArguments.args[2];
|
150279
|
+
}
|
150280
|
+
telemetry2.trackCliArgumentResource(resourceName);
|
150281
|
+
telemetry2.trackCliArgumentProject(specifiedProject);
|
150282
|
+
telemetry2.trackCliFlagYes(skipConfirmation);
|
150283
|
+
telemetry2.trackCliFlagAll(shouldDisconnectAll);
|
150284
|
+
output_manager_default.spinner("Retrieving resource\u2026", 500);
|
150285
|
+
const resources = await getResources(client2, team.id);
|
150286
|
+
const targetedResource = resources.find(
|
150287
|
+
(resource) => resource.name === resourceName
|
150288
|
+
);
|
150289
|
+
output_manager_default.stopSpinner();
|
150290
|
+
if (!targetedResource) {
|
150291
|
+
output_manager_default.error(`No resource ${import_chalk95.default.bold(resourceName)} found.`);
|
150292
|
+
return 0;
|
150293
|
+
}
|
150294
|
+
if (parsedArguments.flags["--all"]) {
|
150295
|
+
try {
|
150296
|
+
await handleDisconnectAllProjects(
|
150297
|
+
client2,
|
150298
|
+
targetedResource,
|
150299
|
+
!!parsedArguments.flags["--yes"]
|
150300
|
+
);
|
150301
|
+
return 0;
|
150302
|
+
} catch (error3) {
|
150303
|
+
if (error3 instanceof CancelledError) {
|
150304
|
+
output_manager_default.log(error3.message);
|
150305
|
+
return 0;
|
150306
|
+
}
|
150307
|
+
if (error3 instanceof FailedError) {
|
150308
|
+
output_manager_default.error(error3.message);
|
150309
|
+
return 1;
|
150310
|
+
}
|
150311
|
+
throw error3;
|
150312
|
+
}
|
150313
|
+
}
|
150314
|
+
if (!specifiedProject) {
|
150315
|
+
specifiedProject = await getLinkedProject(client2).then((result) => {
|
150316
|
+
if (result.status === "linked") {
|
150317
|
+
return result.project.name;
|
150318
|
+
}
|
150319
|
+
return;
|
150320
|
+
});
|
150321
|
+
if (!specifiedProject) {
|
150322
|
+
output_manager_default.error(
|
150323
|
+
"No project linked. Either use `vc link` to link a project, or specify the project name."
|
150324
|
+
);
|
150325
|
+
return 1;
|
150326
|
+
}
|
150327
|
+
}
|
150328
|
+
return await handleDisconnectProject(
|
150329
|
+
client2,
|
150330
|
+
targetedResource,
|
150331
|
+
specifiedProject,
|
150332
|
+
skipConfirmation
|
150333
|
+
);
|
150334
|
+
}
|
150335
|
+
async function handleDisconnectProject(client2, resource, projectName, skipConfirmation) {
|
150336
|
+
const project = resource.projectsMetadata?.find(
|
150337
|
+
(project2) => projectName === project2.name
|
150338
|
+
);
|
150339
|
+
if (!project) {
|
150340
|
+
output_manager_default.log(
|
150341
|
+
`Could not find project ${import_chalk95.default.bold(projectName)} connected to resource ${import_chalk95.default.bold(resource.name)}.`
|
150342
|
+
);
|
150343
|
+
return 0;
|
150344
|
+
}
|
150345
|
+
if (!skipConfirmation && !await confirmDisconnectProject(client2, resource, project)) {
|
150346
|
+
output_manager_default.log("Canceled");
|
150347
|
+
return 0;
|
150348
|
+
}
|
150349
|
+
try {
|
150350
|
+
output_manager_default.spinner("Disconnecting resource\u2026", 500);
|
150351
|
+
await disconnectResourceFromProject(client2, resource, project);
|
150352
|
+
output_manager_default.success(
|
150353
|
+
`Disconnected ${import_chalk95.default.bold(project.name)} from ${import_chalk95.default.bold(resource.name)}`
|
150354
|
+
);
|
150355
|
+
} catch (error3) {
|
150356
|
+
output_manager_default.error(
|
150357
|
+
`A problem occurred while disconnecting: ${error3.message}`
|
150358
|
+
);
|
150359
|
+
return 1;
|
150360
|
+
}
|
150361
|
+
return 0;
|
150362
|
+
}
|
150363
|
+
async function handleDisconnectAllProjects(client2, resource, skipConfirmation) {
|
150364
|
+
if (resource.projectsMetadata?.length === 0) {
|
150365
|
+
output_manager_default.log(`${import_chalk95.default.bold(resource.name)} has no projects to disconnect.`);
|
150366
|
+
return;
|
150367
|
+
}
|
150368
|
+
if (!skipConfirmation && !await confirmDisconnectAllProjects(client2, resource)) {
|
150369
|
+
throw new CancelledError("Canceled");
|
150370
|
+
}
|
150371
|
+
try {
|
150372
|
+
output_manager_default.spinner("Disconnecting projects from resource\u2026", 500);
|
150373
|
+
await disconnectResourceFromAllProjects(client2, resource);
|
150374
|
+
output_manager_default.success(
|
150375
|
+
`Disconnected all projects from ${import_chalk95.default.bold(resource.name)}`
|
150376
|
+
);
|
150377
|
+
} catch (error3) {
|
150378
|
+
throw new FailedError(
|
150379
|
+
`A problem occurred while disconnecting all projects: ${error3.message}`
|
150380
|
+
);
|
150381
|
+
}
|
150382
|
+
return;
|
150383
|
+
}
|
150384
|
+
async function confirmDisconnectProject(client2, resource, project) {
|
150385
|
+
output_manager_default.log(
|
150386
|
+
`The resource ${import_chalk95.default.bold(resource.name)} will be disconnected from project ${import_chalk95.default.bold(project.name)}.`
|
150387
|
+
);
|
150388
|
+
return confirm(client2, `${import_chalk95.default.red("Are you sure?")}`, false);
|
150389
|
+
}
|
150390
|
+
async function confirmDisconnectAllProjects(client2, resource) {
|
150391
|
+
output_manager_default.log("The following projects will be disconnected:");
|
150392
|
+
if (!resource.projectsMetadata) {
|
150393
|
+
return false;
|
150394
|
+
}
|
150395
|
+
for (const project of resource.projectsMetadata) {
|
150396
|
+
output_manager_default.print(` ${project.name}
|
150397
|
+
`);
|
150398
|
+
}
|
150399
|
+
return confirm(client2, import_chalk95.default.red("Are you sure?"), false);
|
150400
|
+
}
|
150401
|
+
var import_chalk95;
|
150402
|
+
var init_disconnect3 = __esm({
|
150403
|
+
"src/commands/integration-resource/disconnect.ts"() {
|
150404
|
+
"use strict";
|
150405
|
+
import_chalk95 = __toESM3(require_source());
|
150406
|
+
init_output_manager();
|
150407
|
+
init_get_args();
|
150408
|
+
init_get_flags_specification();
|
150409
|
+
init_get_scope();
|
150410
|
+
init_handle_error();
|
150411
|
+
init_confirm();
|
150412
|
+
init_disconnect_resource_from_project();
|
150413
|
+
init_get_resources();
|
150414
|
+
init_link2();
|
150415
|
+
init_disconnect2();
|
150416
|
+
init_types();
|
150417
|
+
init_command17();
|
150418
|
+
}
|
150419
|
+
});
|
150420
|
+
|
150421
|
+
// src/util/integration-resource/delete-resource.ts
|
150422
|
+
async function deleteResource(client2, resource, team) {
|
150423
|
+
const params2 = new URLSearchParams();
|
150424
|
+
params2.set("teamId", team.id);
|
150425
|
+
return client2.fetch(
|
150426
|
+
`/v1/storage/stores/integration/${resource.id}?${params2}`,
|
150427
|
+
{
|
150428
|
+
json: true,
|
150429
|
+
method: "DELETE"
|
150430
|
+
}
|
150431
|
+
);
|
150432
|
+
}
|
150433
|
+
var init_delete_resource = __esm({
|
150434
|
+
"src/util/integration-resource/delete-resource.ts"() {
|
150435
|
+
"use strict";
|
150436
|
+
}
|
150437
|
+
});
|
150438
|
+
|
150439
|
+
// src/util/telemetry/commands/integration-resource/remove.ts
|
150440
|
+
var IntegrationResourceRemoveTelemetryClient;
|
150441
|
+
var init_remove4 = __esm({
|
150442
|
+
"src/util/telemetry/commands/integration-resource/remove.ts"() {
|
150443
|
+
"use strict";
|
150444
|
+
init_telemetry();
|
150445
|
+
IntegrationResourceRemoveTelemetryClient = class extends TelemetryClient {
|
150446
|
+
trackCliArgumentResource(v, known) {
|
150447
|
+
if (v) {
|
150448
|
+
this.trackCliArgument({
|
150449
|
+
arg: "resource",
|
150450
|
+
value: known ? v : this.redactedValue
|
150451
|
+
});
|
150452
|
+
}
|
150453
|
+
}
|
150454
|
+
trackCliFlagDisconnectAll(v) {
|
150455
|
+
if (v) {
|
150456
|
+
this.trackCliFlag("disconnect-all");
|
150457
|
+
}
|
150458
|
+
}
|
150459
|
+
trackCliFlagYes(v) {
|
150460
|
+
if (v) {
|
150461
|
+
this.trackCliFlag("yes");
|
150462
|
+
}
|
150463
|
+
}
|
150464
|
+
};
|
150465
|
+
}
|
150466
|
+
});
|
150467
|
+
|
150468
|
+
// src/commands/integration-resource/remove-resource.ts
|
150469
|
+
async function remove4(client2) {
|
150470
|
+
const telemetry2 = new IntegrationResourceRemoveTelemetryClient({
|
150471
|
+
opts: {
|
150472
|
+
store: client2.telemetryEventStore
|
150473
|
+
}
|
150474
|
+
});
|
150475
|
+
let parsedArguments = null;
|
150476
|
+
const flagsSpecification = getFlagsSpecification(removeSubcommand2.options);
|
150477
|
+
try {
|
150478
|
+
parsedArguments = parseArguments(client2.argv.slice(3), flagsSpecification);
|
150479
|
+
} catch (error3) {
|
150480
|
+
handleError(error3);
|
150481
|
+
return 1;
|
150482
|
+
}
|
150483
|
+
const { team } = await getScope(client2);
|
150484
|
+
if (!team) {
|
150485
|
+
output_manager_default.error("Team not found.");
|
150486
|
+
return 1;
|
150487
|
+
}
|
150488
|
+
const isMissingResourceOrIntegration = parsedArguments.args.length < 2;
|
150489
|
+
if (isMissingResourceOrIntegration) {
|
150490
|
+
output_manager_default.error("You must specify a resource. See `--help` for details.");
|
150491
|
+
return 1;
|
150492
|
+
}
|
150493
|
+
const hasTooManyArguments = parsedArguments.args.length > 2;
|
150494
|
+
if (hasTooManyArguments) {
|
150495
|
+
output_manager_default.error("Cannot specify more than one resource at a time.");
|
150496
|
+
return 1;
|
150497
|
+
}
|
150498
|
+
const skipConfirmation = !!parsedArguments.flags["--yes"];
|
150499
|
+
const disconnectAll = !!parsedArguments.flags["--disconnect-all"];
|
150500
|
+
const resourceName = parsedArguments.args[1];
|
150501
|
+
telemetry2.trackCliArgumentResource(resourceName);
|
150502
|
+
telemetry2.trackCliFlagDisconnectAll(disconnectAll);
|
150503
|
+
telemetry2.trackCliFlagYes(skipConfirmation);
|
150504
|
+
output_manager_default.spinner("Retrieving resource\u2026", 500);
|
150505
|
+
const resources = await getResources(client2, team.id);
|
150506
|
+
const targetedResource = resources.find(
|
150507
|
+
(resource) => resource.name === resourceName
|
150508
|
+
);
|
150509
|
+
output_manager_default.stopSpinner();
|
150510
|
+
if (!targetedResource) {
|
150511
|
+
output_manager_default.error(`No resource ${import_chalk96.default.bold(resourceName)} found.`);
|
150512
|
+
return 0;
|
150513
|
+
}
|
150514
|
+
if (disconnectAll) {
|
150515
|
+
try {
|
150516
|
+
await handleDisconnectAllProjects(
|
150517
|
+
client2,
|
150518
|
+
targetedResource,
|
150519
|
+
skipConfirmation
|
150520
|
+
);
|
150521
|
+
} catch (error3) {
|
150522
|
+
if (error3 instanceof CancelledError) {
|
150523
|
+
output_manager_default.log(error3.message);
|
150524
|
+
return 0;
|
150525
|
+
}
|
150526
|
+
if (error3 instanceof FailedError) {
|
150527
|
+
output_manager_default.error(error3.message);
|
150528
|
+
return 1;
|
150529
|
+
}
|
150530
|
+
throw error3;
|
150531
|
+
}
|
150532
|
+
}
|
150533
|
+
return await handleDeleteResource(client2, team, targetedResource, {
|
150534
|
+
skipConfirmation,
|
150535
|
+
skipProjectCheck: disconnectAll
|
150536
|
+
});
|
150537
|
+
}
|
150538
|
+
async function handleDeleteResource(client2, team, resource, options) {
|
150539
|
+
const hasProjects = resource.projectsMetadata && resource.projectsMetadata?.length > 0;
|
150540
|
+
if (!options?.skipProjectCheck && hasProjects) {
|
150541
|
+
output_manager_default.error(
|
150542
|
+
`Cannot delete resource ${import_chalk96.default.bold(resource.name)} while it has connected projects. Please disconnect any projects using this resource first or use the \`--disconnect-all\` flag.`
|
150543
|
+
);
|
150544
|
+
return 1;
|
150545
|
+
}
|
150546
|
+
if (!options?.skipConfirmation && !await confirmDeleteResource(client2, resource)) {
|
150547
|
+
output_manager_default.log("Canceled");
|
150548
|
+
return 0;
|
150549
|
+
}
|
150550
|
+
try {
|
150551
|
+
output_manager_default.spinner("Deleting resource\u2026", 500);
|
150552
|
+
await deleteResource(client2, resource, team);
|
150553
|
+
output_manager_default.success(`${import_chalk96.default.bold(resource.name)} successfully deleted.`);
|
150554
|
+
} catch (error3) {
|
150555
|
+
output_manager_default.error(
|
150556
|
+
`A problem occurred when attempting to delete ${import_chalk96.default.bold(resource.name)}: ${error3.message}`
|
150557
|
+
);
|
150558
|
+
return 1;
|
150559
|
+
}
|
150560
|
+
return 0;
|
150561
|
+
}
|
150562
|
+
async function confirmDeleteResource(client2, resource) {
|
150563
|
+
output_manager_default.log(`${import_chalk96.default.bold(resource.name)} will be deleted permanently.`);
|
150564
|
+
return confirm(client2, `${import_chalk96.default.red("Are you sure?")}`, false);
|
150565
|
+
}
|
150566
|
+
var import_chalk96;
|
150567
|
+
var init_remove_resource = __esm({
|
150568
|
+
"src/commands/integration-resource/remove-resource.ts"() {
|
150569
|
+
"use strict";
|
150570
|
+
import_chalk96 = __toESM3(require_source());
|
150571
|
+
init_output_manager();
|
150572
|
+
init_get_args();
|
150573
|
+
init_get_flags_specification();
|
150574
|
+
init_get_scope();
|
150575
|
+
init_handle_error();
|
150576
|
+
init_confirm();
|
150577
|
+
init_delete_resource();
|
150578
|
+
init_get_resources();
|
150579
|
+
init_types();
|
150580
|
+
init_remove4();
|
150581
|
+
init_command17();
|
150582
|
+
init_disconnect3();
|
150583
|
+
}
|
150584
|
+
});
|
150585
|
+
|
150586
|
+
// src/commands/integration-resource/index.ts
|
150587
|
+
var integration_resource_exports = {};
|
150588
|
+
__export3(integration_resource_exports, {
|
150589
|
+
default: () => main10
|
150590
|
+
});
|
150591
|
+
async function main10(client2) {
|
150592
|
+
const telemetry2 = new IntegrationResourceTelemetryClient({
|
150593
|
+
opts: {
|
150594
|
+
store: client2.telemetryEventStore
|
150595
|
+
}
|
150596
|
+
});
|
150597
|
+
const { args: args2, flags } = parseArguments(
|
150598
|
+
client2.argv.slice(2),
|
150599
|
+
getFlagsSpecification(integrationResourceCommand.options),
|
150600
|
+
{ permissive: true }
|
150601
|
+
);
|
150602
|
+
const { subcommand, subcommandOriginal } = getSubcommand(
|
150603
|
+
args2.slice(1),
|
150604
|
+
COMMAND_CONFIG10
|
150605
|
+
);
|
150606
|
+
const needHelp = flags["--help"];
|
150607
|
+
if (!subcommand && needHelp) {
|
150608
|
+
output_manager_default.print(
|
150609
|
+
help2(integrationResourceCommand, { columns: client2.stderr.columns })
|
150610
|
+
);
|
150611
|
+
return 2;
|
150612
|
+
}
|
150613
|
+
function printHelp(command) {
|
150614
|
+
output_manager_default.print(help2(command, { columns: client2.stderr.columns }));
|
150615
|
+
}
|
150616
|
+
switch (subcommand) {
|
150617
|
+
case "remove": {
|
150618
|
+
if (needHelp) {
|
150619
|
+
printHelp(removeSubcommand2);
|
150620
|
+
return 2;
|
150621
|
+
}
|
150622
|
+
telemetry2.trackCliSubcommandRemove(subcommandOriginal);
|
150623
|
+
return remove4(client2);
|
150624
|
+
}
|
150625
|
+
case "disconnect": {
|
150626
|
+
if (needHelp) {
|
150627
|
+
printHelp(disconnectSubcommand);
|
150628
|
+
return 2;
|
150629
|
+
}
|
150630
|
+
telemetry2.trackCliSubcommandDisconnect(subcommandOriginal);
|
150631
|
+
return disconnect2(client2);
|
150632
|
+
}
|
150633
|
+
default: {
|
150634
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG10));
|
150635
|
+
return 2;
|
150636
|
+
}
|
150637
|
+
}
|
150638
|
+
}
|
150639
|
+
var COMMAND_CONFIG10;
|
150640
|
+
var init_integration_resource2 = __esm({
|
150641
|
+
"src/commands/integration-resource/index.ts"() {
|
150642
|
+
"use strict";
|
150643
|
+
init_output_manager();
|
150644
|
+
init_get_args();
|
150645
|
+
init_get_flags_specification();
|
150646
|
+
init_get_invalid_subcommand();
|
150647
|
+
init_get_subcommand();
|
150648
|
+
init_integration_resource();
|
150649
|
+
init_help();
|
150650
|
+
init_command17();
|
150651
|
+
init_disconnect3();
|
150652
|
+
init_remove_resource();
|
150653
|
+
COMMAND_CONFIG10 = {
|
150654
|
+
remove: ["remove", "rm"],
|
150655
|
+
disconnect: ["disconnect"]
|
149814
150656
|
};
|
149815
150657
|
}
|
149816
150658
|
});
|
149817
150659
|
|
149818
150660
|
// src/commands/link/command.ts
|
149819
150661
|
var linkCommand;
|
149820
|
-
var
|
150662
|
+
var init_command18 = __esm({
|
149821
150663
|
"src/commands/link/command.ts"() {
|
149822
150664
|
"use strict";
|
149823
150665
|
init_pkg_name();
|
@@ -149977,7 +150819,7 @@ var init_link4 = __esm({
|
|
149977
150819
|
init_ensure_link();
|
149978
150820
|
init_repo();
|
149979
150821
|
init_help();
|
149980
|
-
|
150822
|
+
init_command18();
|
149981
150823
|
init_get_flags_specification();
|
149982
150824
|
init_handle_error();
|
149983
150825
|
init_output_manager();
|
@@ -150008,7 +150850,7 @@ var init_parse_policy = __esm({
|
|
150008
150850
|
|
150009
150851
|
// src/commands/list/command.ts
|
150010
150852
|
var listCommand;
|
150011
|
-
var
|
150853
|
+
var init_command19 = __esm({
|
150012
150854
|
"src/commands/list/command.ts"() {
|
150013
150855
|
"use strict";
|
150014
150856
|
init_pkg_name();
|
@@ -150104,12 +150946,15 @@ var init_list4 = __esm({
|
|
150104
150946
|
}
|
150105
150947
|
trackCliOptionEnvironment(environment) {
|
150106
150948
|
if (environment) {
|
150107
|
-
|
150108
|
-
|
150109
|
-
|
150949
|
+
const redactUnknownEnvironment = (environment2) => {
|
150950
|
+
if (environment2 !== "production" && environment2 !== "preview") {
|
150951
|
+
return this.redactedValue;
|
150952
|
+
}
|
150953
|
+
return environment2;
|
150954
|
+
};
|
150110
150955
|
this.trackCliOption({
|
150111
150956
|
option: "environment",
|
150112
|
-
value: environment
|
150957
|
+
value: redactUnknownEnvironment(environment)
|
150113
150958
|
});
|
150114
150959
|
}
|
150115
150960
|
}
|
@@ -150277,7 +151122,7 @@ async function list3(client2) {
|
|
150277
151122
|
}
|
150278
151123
|
const projectSlugLink = formatProject(contextName, project.name);
|
150279
151124
|
if (!singleDeployment) {
|
150280
|
-
spinner(`Fetching deployments in ${
|
151125
|
+
spinner(`Fetching deployments in ${import_chalk97.default.bold(contextName)}`);
|
150281
151126
|
const start = Date.now();
|
150282
151127
|
debug2("Fetching deployments");
|
150283
151128
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
@@ -150317,7 +151162,7 @@ async function list3(client2) {
|
|
150317
151162
|
const urls = [];
|
150318
151163
|
const tablePrint = table(
|
150319
151164
|
[
|
150320
|
-
headers.map((header) =>
|
151165
|
+
headers.map((header) => import_chalk97.default.bold(import_chalk97.default.cyan(header))),
|
150321
151166
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
150322
151167
|
urls.push(`https://${dep.url}`);
|
150323
151168
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
@@ -150327,16 +151172,16 @@ async function list3(client2) {
|
|
150327
151172
|
const targetName = dep.customEnvironment?.name || (dep.target === "production" ? "Production" : "Preview");
|
150328
151173
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
150329
151174
|
return [
|
150330
|
-
|
151175
|
+
import_chalk97.default.gray(createdAt),
|
150331
151176
|
`https://${dep.url}`,
|
150332
151177
|
stateString2(dep.readyState || ""),
|
150333
151178
|
formatEnvironment(contextName, project.name, {
|
150334
151179
|
id: targetSlug,
|
150335
151180
|
name: targetName
|
150336
151181
|
}),
|
150337
|
-
...!showPolicy ? [
|
150338
|
-
...!showPolicy ? [
|
150339
|
-
...showPolicy ? [
|
151182
|
+
...!showPolicy ? [import_chalk97.default.gray(getDeploymentDuration(dep))] : [],
|
151183
|
+
...!showPolicy ? [import_chalk97.default.gray(dep.creator?.username)] : [],
|
151184
|
+
...showPolicy ? [import_chalk97.default.gray(proposedExp)] : []
|
150340
151185
|
];
|
150341
151186
|
}).filter(
|
150342
151187
|
(app2) => (
|
@@ -150383,17 +151228,17 @@ function stateString2(s) {
|
|
150383
151228
|
case "BUILDING":
|
150384
151229
|
case "DEPLOYING":
|
150385
151230
|
case "ANALYZING":
|
150386
|
-
return
|
151231
|
+
return import_chalk97.default.yellow(CIRCLE) + sTitle;
|
150387
151232
|
case "ERROR":
|
150388
|
-
return
|
151233
|
+
return import_chalk97.default.red(CIRCLE) + sTitle;
|
150389
151234
|
case "READY":
|
150390
|
-
return
|
151235
|
+
return import_chalk97.default.green(CIRCLE) + sTitle;
|
150391
151236
|
case "QUEUED":
|
150392
|
-
return
|
151237
|
+
return import_chalk97.default.white(CIRCLE) + sTitle;
|
150393
151238
|
case "CANCELED":
|
150394
|
-
return
|
151239
|
+
return import_chalk97.default.gray(sTitle);
|
150395
151240
|
default:
|
150396
|
-
return
|
151241
|
+
return import_chalk97.default.gray("UNKNOWN");
|
150397
151242
|
}
|
150398
151243
|
}
|
150399
151244
|
function sortByCreatedAt(a, b) {
|
@@ -150409,12 +151254,12 @@ function filterUniqueApps() {
|
|
150409
151254
|
return true;
|
150410
151255
|
};
|
150411
151256
|
}
|
150412
|
-
var import_ms19,
|
151257
|
+
var import_ms19, import_chalk97, import_title7, import_error_utils26;
|
150413
151258
|
var init_list5 = __esm({
|
150414
151259
|
"src/commands/list/index.ts"() {
|
150415
151260
|
"use strict";
|
150416
151261
|
import_ms19 = __toESM3(require_ms2());
|
150417
|
-
|
151262
|
+
import_chalk97 = __toESM3(require_source());
|
150418
151263
|
import_title7 = __toESM3(require_lib4());
|
150419
151264
|
init_table();
|
150420
151265
|
init_get_args();
|
@@ -150431,7 +151276,7 @@ var init_list5 = __esm({
|
|
150431
151276
|
init_errors_ts();
|
150432
151277
|
import_error_utils26 = __toESM3(require_dist2());
|
150433
151278
|
init_help();
|
150434
|
-
|
151279
|
+
init_command19();
|
150435
151280
|
init_parse_target();
|
150436
151281
|
init_get_flags_specification();
|
150437
151282
|
init_get_deployment();
|
@@ -150450,10 +151295,10 @@ var init_logs2 = __esm({
|
|
150450
151295
|
"use strict";
|
150451
151296
|
init_telemetry();
|
150452
151297
|
LogsTelemetryClient = class extends TelemetryClient {
|
150453
|
-
|
151298
|
+
trackCliArgumentUrlOrDeploymentId(path11) {
|
150454
151299
|
if (path11) {
|
150455
151300
|
this.trackCliArgument({
|
150456
|
-
arg: "
|
151301
|
+
arg: "urlOrDeploymentId",
|
150457
151302
|
value: this.redactedValue
|
150458
151303
|
});
|
150459
151304
|
}
|
@@ -150553,7 +151398,7 @@ async function logs(client2) {
|
|
150553
151398
|
print(help2(logsCommand, { columns: client2.stderr.columns }));
|
150554
151399
|
return 1;
|
150555
151400
|
}
|
150556
|
-
telemetry2.
|
151401
|
+
telemetry2.trackCliArgumentUrlOrDeploymentId(deploymentIdOrHost);
|
150557
151402
|
telemetry2.trackCliFlagJson(asJson);
|
150558
151403
|
telemetry2.trackCliFlagFollow(parsedArguments.flags["--follow"]);
|
150559
151404
|
telemetry2.trackCliOptionLimit(parsedArguments.flags["--limit"]);
|
@@ -150579,7 +151424,7 @@ async function logs(client2) {
|
|
150579
151424
|
} catch {
|
150580
151425
|
}
|
150581
151426
|
spinner(
|
150582
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
151427
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk98.default.bold(contextName)}`
|
150583
151428
|
);
|
150584
151429
|
let deployment;
|
150585
151430
|
try {
|
@@ -150615,19 +151460,19 @@ function printDisclaimer(deployment) {
|
|
150615
151460
|
`This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
|
150616
151461
|
);
|
150617
151462
|
output_manager_default.print(
|
150618
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
151463
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk98.default.dim(
|
150619
151464
|
deployment.id
|
150620
|
-
)}) starting from ${
|
151465
|
+
)}) starting from ${import_chalk98.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
|
150621
151466
|
|
150622
151467
|
`
|
150623
151468
|
);
|
150624
151469
|
}
|
150625
|
-
var import_error_utils27,
|
151470
|
+
var import_error_utils27, import_chalk98, import_format2, deprecatedFlags, dateTimeFormat2;
|
150626
151471
|
var init_logs3 = __esm({
|
150627
151472
|
"src/commands/logs/index.ts"() {
|
150628
151473
|
"use strict";
|
150629
151474
|
import_error_utils27 = __toESM3(require_dist2());
|
150630
|
-
|
151475
|
+
import_chalk98 = __toESM3(require_source());
|
150631
151476
|
import_format2 = __toESM3(require_format());
|
150632
151477
|
init_build_state();
|
150633
151478
|
init_is_deploying();
|
@@ -150684,7 +151529,7 @@ var require_email_validator = __commonJS2({
|
|
150684
151529
|
|
150685
151530
|
// src/commands/login/command.ts
|
150686
151531
|
var loginCommand;
|
150687
|
-
var
|
151532
|
+
var init_command20 = __esm({
|
150688
151533
|
"src/commands/login/command.ts"() {
|
150689
151534
|
"use strict";
|
150690
151535
|
init_pkg_name();
|
@@ -150793,7 +151638,7 @@ async function login2(client2) {
|
|
150793
151638
|
writeToConfigFile(client2.config);
|
150794
151639
|
output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
150795
151640
|
output_manager_default.print(
|
150796
|
-
`${
|
151641
|
+
`${import_chalk99.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
150797
151642
|
`
|
150798
151643
|
);
|
150799
151644
|
output_manager_default.print(
|
@@ -150805,12 +151650,12 @@ async function login2(client2) {
|
|
150805
151650
|
);
|
150806
151651
|
return 0;
|
150807
151652
|
}
|
150808
|
-
var import_email_validator,
|
151653
|
+
var import_email_validator, import_chalk99;
|
150809
151654
|
var init_login2 = __esm({
|
150810
151655
|
"src/commands/login/index.ts"() {
|
150811
151656
|
"use strict";
|
150812
151657
|
import_email_validator = __toESM3(require_email_validator());
|
150813
|
-
|
151658
|
+
import_chalk99 = __toESM3(require_source());
|
150814
151659
|
init_humanize_path();
|
150815
151660
|
init_get_args();
|
150816
151661
|
init_prompt();
|
@@ -150824,7 +151669,7 @@ var init_login2 = __esm({
|
|
150824
151669
|
init_global_path();
|
150825
151670
|
init_files();
|
150826
151671
|
init_help();
|
150827
|
-
|
151672
|
+
init_command20();
|
150828
151673
|
init_update_current_team_after_login();
|
150829
151674
|
init_get_flags_specification();
|
150830
151675
|
init_handle_error();
|
@@ -150834,7 +151679,7 @@ var init_login2 = __esm({
|
|
150834
151679
|
|
150835
151680
|
// src/commands/logout/command.ts
|
150836
151681
|
var logoutCommand;
|
150837
|
-
var
|
151682
|
+
var init_command21 = __esm({
|
150838
151683
|
"src/commands/logout/command.ts"() {
|
150839
151684
|
"use strict";
|
150840
151685
|
init_pkg_name();
|
@@ -150856,9 +151701,9 @@ var init_command20 = __esm({
|
|
150856
151701
|
// src/commands/logout/index.ts
|
150857
151702
|
var logout_exports = {};
|
150858
151703
|
__export3(logout_exports, {
|
150859
|
-
default: () =>
|
151704
|
+
default: () => main11
|
150860
151705
|
});
|
150861
|
-
async function
|
151706
|
+
async function main11(client2) {
|
150862
151707
|
const { authConfig, config: config2 } = client2;
|
150863
151708
|
let parsedArgs = null;
|
150864
151709
|
const flagsSpecification = getFlagsSpecification(logoutCommand.options);
|
@@ -150926,7 +151771,7 @@ var init_logout = __esm({
|
|
150926
151771
|
init_errors_ts();
|
150927
151772
|
import_error_utils28 = __toESM3(require_dist2());
|
150928
151773
|
init_help();
|
150929
|
-
|
151774
|
+
init_command21();
|
150930
151775
|
init_get_flags_specification();
|
150931
151776
|
init_output_manager();
|
150932
151777
|
}
|
@@ -150960,12 +151805,12 @@ async function add7(client2, args2, contextName) {
|
|
150960
151805
|
});
|
150961
151806
|
if (args2.length !== 1) {
|
150962
151807
|
output_manager_default.error(
|
150963
|
-
`Invalid number of arguments. Usage: ${
|
151808
|
+
`Invalid number of arguments. Usage: ${import_chalk100.default.cyan(
|
150964
151809
|
`${getCommandName("project add <name>")}`
|
150965
151810
|
)}`
|
150966
151811
|
);
|
150967
151812
|
if (args2.length > 1) {
|
150968
|
-
const example =
|
151813
|
+
const example = import_chalk100.default.cyan(
|
150969
151814
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
150970
151815
|
);
|
150971
151816
|
output_manager_default.log(
|
@@ -150992,17 +151837,17 @@ async function add7(client2, args2, contextName) {
|
|
150992
151837
|
}
|
150993
151838
|
const elapsed2 = (0, import_ms20.default)(Date.now() - start);
|
150994
151839
|
output_manager_default.log(
|
150995
|
-
`${
|
151840
|
+
`${import_chalk100.default.cyan("Success!")} Project ${import_chalk100.default.bold(
|
150996
151841
|
name.toLowerCase()
|
150997
|
-
)} added (${
|
151842
|
+
)} added (${import_chalk100.default.bold(contextName)}) ${import_chalk100.default.gray(`[${elapsed2}]`)}`
|
150998
151843
|
);
|
150999
151844
|
return;
|
151000
151845
|
}
|
151001
|
-
var
|
151846
|
+
var import_chalk100, import_ms20;
|
151002
151847
|
var init_add12 = __esm({
|
151003
151848
|
"src/commands/project/add.ts"() {
|
151004
151849
|
"use strict";
|
151005
|
-
|
151850
|
+
import_chalk100 = __toESM3(require_source());
|
151006
151851
|
import_ms20 = __toESM3(require_ms2());
|
151007
151852
|
init_errors_ts();
|
151008
151853
|
init_pkg_name();
|
@@ -151045,14 +151890,14 @@ async function list4(client2, argv, args2, contextName) {
|
|
151045
151890
|
});
|
151046
151891
|
if (args2.length !== 0) {
|
151047
151892
|
output_manager_default.error(
|
151048
|
-
`Invalid number of arguments. Usage: ${
|
151893
|
+
`Invalid number of arguments. Usage: ${import_chalk101.default.cyan(
|
151049
151894
|
`${getCommandName("project ls")}`
|
151050
151895
|
)}`
|
151051
151896
|
);
|
151052
151897
|
return 2;
|
151053
151898
|
}
|
151054
151899
|
const start = Date.now();
|
151055
|
-
output_manager_default.spinner(`Fetching projects in ${
|
151900
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk101.default.bold(contextName)}`);
|
151056
151901
|
let projectsUrl = `/v9/projects?limit=20`;
|
151057
151902
|
const deprecated = argv["--update-required"] || false;
|
151058
151903
|
telemetryClient.trackCliFlagUpdateRequired(deprecated);
|
@@ -151089,19 +151934,19 @@ async function list4(client2, argv, args2, contextName) {
|
|
151089
151934
|
);
|
151090
151935
|
}
|
151091
151936
|
output_manager_default.log(
|
151092
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
151937
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk101.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk101.default.gray(`[${elapsed2}]`)}`
|
151093
151938
|
);
|
151094
151939
|
if (projectList.length > 0) {
|
151095
151940
|
const tablePrint = table(
|
151096
151941
|
[
|
151097
151942
|
["Project Name", "Latest Production URL", "Updated"].map(
|
151098
|
-
(header) =>
|
151943
|
+
(header) => import_chalk101.default.bold(import_chalk101.default.cyan(header))
|
151099
151944
|
),
|
151100
151945
|
...projectList.map((project) => [
|
151101
151946
|
[
|
151102
|
-
|
151947
|
+
import_chalk101.default.bold(project.name),
|
151103
151948
|
getLatestProdUrl(project),
|
151104
|
-
|
151949
|
+
import_chalk101.default.gray((0, import_ms21.default)(Date.now() - project.updatedAt))
|
151105
151950
|
]
|
151106
151951
|
]).flat()
|
151107
151952
|
],
|
@@ -151125,11 +151970,11 @@ function getLatestProdUrl(project) {
|
|
151125
151970
|
return "https://" + alias2;
|
151126
151971
|
return "--";
|
151127
151972
|
}
|
151128
|
-
var
|
151973
|
+
var import_chalk101, import_ms21, import_build_utils17;
|
151129
151974
|
var init_list7 = __esm({
|
151130
151975
|
"src/commands/project/list.ts"() {
|
151131
151976
|
"use strict";
|
151132
|
-
|
151977
|
+
import_chalk101 = __toESM3(require_source());
|
151133
151978
|
import_ms21 = __toESM3(require_ms2());
|
151134
151979
|
init_table();
|
151135
151980
|
init_get_command_flags();
|
@@ -151168,7 +152013,7 @@ async function rm6(client2, args2) {
|
|
151168
152013
|
});
|
151169
152014
|
if (args2.length !== 1) {
|
151170
152015
|
output_manager_default.error(
|
151171
|
-
`Invalid number of arguments. Usage: ${
|
152016
|
+
`Invalid number of arguments. Usage: ${import_chalk102.default.cyan(
|
151172
152017
|
`${getCommandName("project rm <name>")}`
|
151173
152018
|
)}`
|
151174
152019
|
);
|
@@ -151198,7 +152043,7 @@ async function rm6(client2, args2) {
|
|
151198
152043
|
}
|
151199
152044
|
const elapsed2 = (0, import_ms22.default)(Date.now() - start);
|
151200
152045
|
output_manager_default.log(
|
151201
|
-
`${
|
152046
|
+
`${import_chalk102.default.cyan("Success!")} Project ${import_chalk102.default.bold(name)} removed ${import_chalk102.default.gray(
|
151202
152047
|
`[${elapsed2}]`
|
151203
152048
|
)}`
|
151204
152049
|
);
|
@@ -151207,19 +152052,19 @@ async function rm6(client2, args2) {
|
|
151207
152052
|
async function readConfirmation3(client2, projectName) {
|
151208
152053
|
output_manager_default.print(
|
151209
152054
|
prependEmoji(
|
151210
|
-
`The project ${
|
152055
|
+
`The project ${import_chalk102.default.bold(projectName)} will be removed permanently.
|
151211
152056
|
It will also delete everything under the project including deployments.
|
151212
152057
|
`,
|
151213
152058
|
emoji("warning")
|
151214
152059
|
)
|
151215
152060
|
);
|
151216
|
-
return await confirm(client2, `${
|
152061
|
+
return await confirm(client2, `${import_chalk102.default.bold.red("Are you sure?")}`, false);
|
151217
152062
|
}
|
151218
|
-
var
|
152063
|
+
var import_chalk102, import_ms22, e;
|
151219
152064
|
var init_rm10 = __esm({
|
151220
152065
|
"src/commands/project/rm.ts"() {
|
151221
152066
|
"use strict";
|
151222
|
-
|
152067
|
+
import_chalk102 = __toESM3(require_source());
|
151223
152068
|
import_ms22 = __toESM3(require_ms2());
|
151224
152069
|
init_emoji();
|
151225
152070
|
init_errors_ts();
|
@@ -151233,7 +152078,7 @@ var init_rm10 = __esm({
|
|
151233
152078
|
|
151234
152079
|
// src/commands/project/command.ts
|
151235
152080
|
var projectCommand;
|
151236
|
-
var
|
152081
|
+
var init_command22 = __esm({
|
151237
152082
|
"src/commands/project/command.ts"() {
|
151238
152083
|
"use strict";
|
151239
152084
|
init_pkg_name();
|
@@ -151348,9 +152193,9 @@ var init_project = __esm({
|
|
151348
152193
|
// src/commands/project/index.ts
|
151349
152194
|
var project_exports = {};
|
151350
152195
|
__export3(project_exports, {
|
151351
|
-
default: () =>
|
152196
|
+
default: () => main12
|
151352
152197
|
});
|
151353
|
-
async function
|
152198
|
+
async function main12(client2) {
|
151354
152199
|
const telemetryClient = new ProjectTelemetryClient({
|
151355
152200
|
opts: {
|
151356
152201
|
store: client2.telemetryEventStore
|
@@ -151386,12 +152231,12 @@ async function main11(client2) {
|
|
151386
152231
|
telemetryClient.trackCliSubcommandRm(subcommand);
|
151387
152232
|
return await rm6(client2, args2);
|
151388
152233
|
default:
|
151389
|
-
output_manager_default.error(getInvalidSubcommand(
|
152234
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG11));
|
151390
152235
|
output_manager_default.print(help2(projectCommand, { columns: client2.stderr.columns }));
|
151391
152236
|
return 2;
|
151392
152237
|
}
|
151393
152238
|
}
|
151394
|
-
var
|
152239
|
+
var COMMAND_CONFIG11;
|
151395
152240
|
var init_project2 = __esm({
|
151396
152241
|
"src/commands/project/index.ts"() {
|
151397
152242
|
"use strict";
|
@@ -151403,11 +152248,11 @@ var init_project2 = __esm({
|
|
151403
152248
|
init_add12();
|
151404
152249
|
init_list7();
|
151405
152250
|
init_rm10();
|
151406
|
-
|
152251
|
+
init_command22();
|
151407
152252
|
init_get_flags_specification();
|
151408
152253
|
init_project();
|
151409
152254
|
init_output_manager();
|
151410
|
-
|
152255
|
+
COMMAND_CONFIG11 = {
|
151411
152256
|
ls: ["ls", "list"],
|
151412
152257
|
add: ["add"],
|
151413
152258
|
rm: ["rm", "remove"]
|
@@ -151465,7 +152310,7 @@ async function getProjectByDeployment({
|
|
151465
152310
|
let team;
|
151466
152311
|
try {
|
151467
152312
|
output_manager_default?.spinner(
|
151468
|
-
`Fetching deployment "${deployId}" in ${
|
152313
|
+
`Fetching deployment "${deployId}" in ${import_chalk103.default.bold(contextName)}\u2026`
|
151469
152314
|
);
|
151470
152315
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
151471
152316
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -151482,12 +152327,12 @@ async function getProjectByDeployment({
|
|
151482
152327
|
team = teamResult.value;
|
151483
152328
|
deployment = deploymentResult.value;
|
151484
152329
|
output_manager_default?.log(
|
151485
|
-
`Fetching deployment "${deployId}" in ${
|
152330
|
+
`Fetching deployment "${deployId}" in ${import_chalk103.default.bold(contextName)}\u2026`
|
151486
152331
|
);
|
151487
152332
|
if (deployment.team?.id) {
|
151488
152333
|
if (!team || deployment.team.id !== team.id) {
|
151489
152334
|
const err = new Error(
|
151490
|
-
team ? `Deployment doesn't belong to current team ${
|
152335
|
+
team ? `Deployment doesn't belong to current team ${import_chalk103.default.bold(
|
151491
152336
|
contextName
|
151492
152337
|
)}` : `Deployment belongs to a different team`
|
151493
152338
|
);
|
@@ -151496,7 +152341,7 @@ async function getProjectByDeployment({
|
|
151496
152341
|
}
|
151497
152342
|
} else if (team) {
|
151498
152343
|
const err = new Error(
|
151499
|
-
`Deployment doesn't belong to current team ${
|
152344
|
+
`Deployment doesn't belong to current team ${import_chalk103.default.bold(contextName)}`
|
151500
152345
|
);
|
151501
152346
|
err.code = "ERR_INVALID_TEAM";
|
151502
152347
|
throw err;
|
@@ -151517,11 +152362,11 @@ async function getProjectByDeployment({
|
|
151517
152362
|
output_manager_default?.stopSpinner();
|
151518
152363
|
}
|
151519
152364
|
}
|
151520
|
-
var
|
152365
|
+
var import_chalk103;
|
151521
152366
|
var init_get_project_by_deployment = __esm({
|
151522
152367
|
"src/util/projects/get-project-by-deployment.ts"() {
|
151523
152368
|
"use strict";
|
151524
|
-
|
152369
|
+
import_chalk103 = __toESM3(require_source());
|
151525
152370
|
init_get_deployment();
|
151526
152371
|
init_get_project_by_id_or_name();
|
151527
152372
|
init_get_scope();
|
@@ -151535,21 +152380,21 @@ var init_get_project_by_deployment = __esm({
|
|
151535
152380
|
// src/util/alias/render-alias-status.ts
|
151536
152381
|
function renderAliasStatus(status2) {
|
151537
152382
|
if (status2 === "completed") {
|
151538
|
-
return
|
152383
|
+
return import_chalk104.default.green(status2);
|
151539
152384
|
}
|
151540
152385
|
if (status2 === "failed") {
|
151541
|
-
return
|
152386
|
+
return import_chalk104.default.red(status2);
|
151542
152387
|
}
|
151543
152388
|
if (status2 === "skipped") {
|
151544
|
-
return
|
152389
|
+
return import_chalk104.default.gray(status2);
|
151545
152390
|
}
|
151546
|
-
return
|
152391
|
+
return import_chalk104.default.yellow(status2);
|
151547
152392
|
}
|
151548
|
-
var
|
152393
|
+
var import_chalk104;
|
151549
152394
|
var init_render_alias_status = __esm({
|
151550
152395
|
"src/util/alias/render-alias-status.ts"() {
|
151551
152396
|
"use strict";
|
151552
|
-
|
152397
|
+
import_chalk104 = __toESM3(require_source());
|
151553
152398
|
}
|
151554
152399
|
});
|
151555
152400
|
|
@@ -151623,7 +152468,7 @@ async function promoteStatus({
|
|
151623
152468
|
}
|
151624
152469
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
151625
152470
|
output_manager_default.log(
|
151626
|
-
`The promotion exceeded its deadline - rerun ${
|
152471
|
+
`The promotion exceeded its deadline - rerun ${import_chalk105.default.bold(
|
151627
152472
|
`${packageName} promote ${toDeploymentId}`
|
151628
152473
|
)} to try again`
|
151629
152474
|
);
|
@@ -151687,26 +152532,26 @@ async function renderJobSucceeded({
|
|
151687
152532
|
let deploymentInfo = "";
|
151688
152533
|
try {
|
151689
152534
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
151690
|
-
deploymentInfo = `${
|
152535
|
+
deploymentInfo = `${import_chalk105.default.bold(deployment.url)} (${toDeploymentId})`;
|
151691
152536
|
} catch (err) {
|
151692
152537
|
output_manager_default.debug(
|
151693
152538
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
151694
152539
|
);
|
151695
|
-
deploymentInfo =
|
152540
|
+
deploymentInfo = import_chalk105.default.bold(toDeploymentId);
|
151696
152541
|
}
|
151697
152542
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
151698
152543
|
output_manager_default.log(
|
151699
|
-
`Success! ${
|
152544
|
+
`Success! ${import_chalk105.default.bold(
|
151700
152545
|
project.name
|
151701
152546
|
)} was promoted to ${deploymentInfo} ${duration}`
|
151702
152547
|
);
|
151703
152548
|
return 0;
|
151704
152549
|
}
|
151705
|
-
var
|
152550
|
+
var import_chalk105, import_ms23;
|
151706
152551
|
var init_status = __esm({
|
151707
152552
|
"src/commands/promote/status.ts"() {
|
151708
152553
|
"use strict";
|
151709
|
-
|
152554
|
+
import_chalk105 = __toESM3(require_source());
|
151710
152555
|
init_elapsed();
|
151711
152556
|
init_format_date();
|
151712
152557
|
init_get_deployment();
|
@@ -151762,7 +152607,7 @@ async function requestPromote({
|
|
151762
152607
|
}
|
151763
152608
|
);
|
151764
152609
|
output_manager_default.log(
|
151765
|
-
`Successfully created new deployment of ${
|
152610
|
+
`Successfully created new deployment of ${import_chalk106.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
151766
152611
|
);
|
151767
152612
|
return 0;
|
151768
152613
|
} else {
|
@@ -151775,7 +152620,7 @@ async function requestPromote({
|
|
151775
152620
|
}
|
151776
152621
|
if (timeout !== void 0 && (0, import_ms24.default)(timeout) === 0) {
|
151777
152622
|
output_manager_default.log(
|
151778
|
-
`Successfully requested promote of ${
|
152623
|
+
`Successfully requested promote of ${import_chalk106.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
151779
152624
|
);
|
151780
152625
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
151781
152626
|
return 0;
|
@@ -151788,11 +152633,11 @@ async function requestPromote({
|
|
151788
152633
|
timeout
|
151789
152634
|
});
|
151790
152635
|
}
|
151791
|
-
var
|
152636
|
+
var import_chalk106, import_ms24;
|
151792
152637
|
var init_request_promote = __esm({
|
151793
152638
|
"src/commands/promote/request-promote.ts"() {
|
151794
152639
|
"use strict";
|
151795
|
-
|
152640
|
+
import_chalk106 = __toESM3(require_source());
|
151796
152641
|
init_pkg_name();
|
151797
152642
|
init_get_project_by_deployment();
|
151798
152643
|
import_ms24 = __toESM3(require_ms2());
|
@@ -151804,7 +152649,7 @@ var init_request_promote = __esm({
|
|
151804
152649
|
|
151805
152650
|
// src/commands/promote/command.ts
|
151806
152651
|
var promoteCommand;
|
151807
|
-
var
|
152652
|
+
var init_command23 = __esm({
|
151808
152653
|
"src/commands/promote/command.ts"() {
|
151809
152654
|
"use strict";
|
151810
152655
|
init_pkg_name();
|
@@ -151814,7 +152659,7 @@ var init_command22 = __esm({
|
|
151814
152659
|
description: "Promote an existing deployment to current.",
|
151815
152660
|
arguments: [
|
151816
152661
|
{
|
151817
|
-
name: "
|
152662
|
+
name: "url|deploymentId",
|
151818
152663
|
required: true
|
151819
152664
|
}
|
151820
152665
|
],
|
@@ -151869,6 +152714,14 @@ var init_promote = __esm({
|
|
151869
152714
|
"use strict";
|
151870
152715
|
init_telemetry();
|
151871
152716
|
PromoteTelemetryClient = class extends TelemetryClient {
|
152717
|
+
trackCliArgumentUrlOrDeploymentId(value) {
|
152718
|
+
if (value) {
|
152719
|
+
this.trackCliArgument({
|
152720
|
+
arg: "urlOrDeploymentId",
|
152721
|
+
value: this.redactedValue
|
152722
|
+
});
|
152723
|
+
}
|
152724
|
+
}
|
151872
152725
|
trackCliSubcommandStatus() {
|
151873
152726
|
this.trackCliSubcommand({
|
151874
152727
|
subcommand: "status",
|
@@ -151908,7 +152761,7 @@ var init_promote2 = __esm({
|
|
151908
152761
|
import_ms25 = __toESM3(require_ms2());
|
151909
152762
|
init_request_promote();
|
151910
152763
|
init_status();
|
151911
|
-
|
152764
|
+
init_command23();
|
151912
152765
|
init_help();
|
151913
152766
|
init_get_flags_specification();
|
151914
152767
|
init_promote();
|
@@ -151956,6 +152809,7 @@ var init_promote2 = __esm({
|
|
151956
152809
|
timeout
|
151957
152810
|
});
|
151958
152811
|
}
|
152812
|
+
telemetry2.trackCliArgumentUrlOrDeploymentId(actionOrDeployId);
|
151959
152813
|
return await requestPromote({
|
151960
152814
|
client: client2,
|
151961
152815
|
deployId: actionOrDeployId,
|
@@ -151994,7 +152848,7 @@ async function getDeploymentByIdOrURL({
|
|
151994
152848
|
let team;
|
151995
152849
|
try {
|
151996
152850
|
output_manager_default.spinner(
|
151997
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
152851
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk107.default.bold(contextName)}\u2026`
|
151998
152852
|
);
|
151999
152853
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
152000
152854
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -152011,7 +152865,7 @@ async function getDeploymentByIdOrURL({
|
|
152011
152865
|
team = teamResult.value;
|
152012
152866
|
deployment = deploymentResult.value;
|
152013
152867
|
output_manager_default.log(
|
152014
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
152868
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk107.default.bold(contextName)}\u2026`
|
152015
152869
|
);
|
152016
152870
|
} finally {
|
152017
152871
|
output_manager_default.stopSpinner();
|
@@ -152019,7 +152873,7 @@ async function getDeploymentByIdOrURL({
|
|
152019
152873
|
if (deployment.team?.id) {
|
152020
152874
|
if (!team || deployment.team.id !== team.id) {
|
152021
152875
|
const err = new Error(
|
152022
|
-
team ? `Deployment doesn't belong to current team ${
|
152876
|
+
team ? `Deployment doesn't belong to current team ${import_chalk107.default.bold(
|
152023
152877
|
contextName
|
152024
152878
|
)}` : `Deployment belongs to a different team`
|
152025
152879
|
);
|
@@ -152028,18 +152882,18 @@ async function getDeploymentByIdOrURL({
|
|
152028
152882
|
}
|
152029
152883
|
} else if (team) {
|
152030
152884
|
const err = new Error(
|
152031
|
-
`Deployment doesn't belong to current team ${
|
152885
|
+
`Deployment doesn't belong to current team ${import_chalk107.default.bold(contextName)}`
|
152032
152886
|
);
|
152033
152887
|
err.code = "ERR_INVALID_TEAM";
|
152034
152888
|
throw err;
|
152035
152889
|
}
|
152036
152890
|
return deployment;
|
152037
152891
|
}
|
152038
|
-
var
|
152892
|
+
var import_chalk107;
|
152039
152893
|
var init_get_deployment_by_id_or_url = __esm({
|
152040
152894
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
152041
152895
|
"use strict";
|
152042
|
-
|
152896
|
+
import_chalk107 = __toESM3(require_source());
|
152043
152897
|
init_get_deployment();
|
152044
152898
|
init_get_team_by_id();
|
152045
152899
|
init_is_valid_name();
|
@@ -152049,7 +152903,7 @@ var init_get_deployment_by_id_or_url = __esm({
|
|
152049
152903
|
|
152050
152904
|
// src/commands/redeploy/command.ts
|
152051
152905
|
var redeployCommand;
|
152052
|
-
var
|
152906
|
+
var init_command24 = __esm({
|
152053
152907
|
"src/commands/redeploy/command.ts"() {
|
152054
152908
|
"use strict";
|
152055
152909
|
init_pkg_name();
|
@@ -152058,7 +152912,7 @@ var init_command23 = __esm({
|
|
152058
152912
|
description: "Rebuild and deploy a previous deployment.",
|
152059
152913
|
arguments: [
|
152060
152914
|
{
|
152061
|
-
name: "deploymentId
|
152915
|
+
name: "url|deploymentId",
|
152062
152916
|
required: false
|
152063
152917
|
}
|
152064
152918
|
],
|
@@ -152092,10 +152946,10 @@ var init_redeploy = __esm({
|
|
152092
152946
|
"use strict";
|
152093
152947
|
init_telemetry();
|
152094
152948
|
RedeployTelemetryClient = class extends TelemetryClient {
|
152095
|
-
|
152096
|
-
if (
|
152949
|
+
trackCliArgumentUrlOrDeploymentId(value) {
|
152950
|
+
if (value) {
|
152097
152951
|
this.trackCliArgument({
|
152098
|
-
arg: "
|
152952
|
+
arg: "urlOrDeploymentId",
|
152099
152953
|
value: this.redactedValue
|
152100
152954
|
});
|
152101
152955
|
}
|
@@ -152141,7 +152995,7 @@ async function redeploy(client2) {
|
|
152141
152995
|
);
|
152142
152996
|
return 1;
|
152143
152997
|
}
|
152144
|
-
telemetry2.
|
152998
|
+
telemetry2.trackCliArgumentUrlOrDeploymentId(deployIdOrUrl);
|
152145
152999
|
telemetry2.trackCliFlagNoWait(parsedArgs.flags["--no-wait"]);
|
152146
153000
|
const { contextName } = await getScope(client2);
|
152147
153001
|
const noWait = !!parsedArgs.flags["--no-wait"];
|
@@ -152169,14 +153023,14 @@ async function redeploy(client2) {
|
|
152169
153023
|
const previewUrl = `https://${deployment.url}`;
|
152170
153024
|
output_manager_default.print(
|
152171
153025
|
`${prependEmoji(
|
152172
|
-
`Inspect: ${
|
153026
|
+
`Inspect: ${import_chalk108.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
152173
153027
|
emoji("inspect")
|
152174
153028
|
)}
|
152175
153029
|
`
|
152176
153030
|
);
|
152177
153031
|
output_manager_default.print(
|
152178
153032
|
prependEmoji(
|
152179
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
153033
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk108.default.bold(
|
152180
153034
|
previewUrl
|
152181
153035
|
)} ${deployStamp()}`,
|
152182
153036
|
emoji("success")
|
@@ -152246,17 +153100,17 @@ async function redeploy(client2) {
|
|
152246
153100
|
output_manager_default.prettyError(err);
|
152247
153101
|
if ((0, import_error_utils30.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
152248
153102
|
output_manager_default.error(
|
152249
|
-
`Use ${
|
153103
|
+
`Use ${import_chalk108.default.bold("vc switch")} to change your current team`
|
152250
153104
|
);
|
152251
153105
|
}
|
152252
153106
|
return 1;
|
152253
153107
|
}
|
152254
153108
|
}
|
152255
|
-
var
|
153109
|
+
var import_chalk108, import_client12, import_error_utils30;
|
152256
153110
|
var init_redeploy2 = __esm({
|
152257
153111
|
"src/commands/redeploy/index.ts"() {
|
152258
153112
|
"use strict";
|
152259
|
-
|
153113
|
+
import_chalk108 = __toESM3(require_source());
|
152260
153114
|
import_client12 = __toESM3(require_dist12());
|
152261
153115
|
init_emoji();
|
152262
153116
|
init_get_args();
|
@@ -152270,7 +153124,7 @@ var init_redeploy2 = __esm({
|
|
152270
153124
|
init_stamp();
|
152271
153125
|
init_ua();
|
152272
153126
|
init_help();
|
152273
|
-
|
153127
|
+
init_command24();
|
152274
153128
|
init_get_flags_specification();
|
152275
153129
|
init_output_manager();
|
152276
153130
|
init_redeploy();
|
@@ -152380,17 +153234,17 @@ var init_get_deployments_by_project_id = __esm({
|
|
152380
153234
|
|
152381
153235
|
// src/commands/remove/command.ts
|
152382
153236
|
var removeCommand;
|
152383
|
-
var
|
153237
|
+
var init_command25 = __esm({
|
152384
153238
|
"src/commands/remove/command.ts"() {
|
152385
153239
|
"use strict";
|
152386
153240
|
init_pkg_name();
|
152387
153241
|
init_arg_common();
|
152388
153242
|
removeCommand = {
|
152389
153243
|
name: "remove",
|
152390
|
-
description: "Remove
|
153244
|
+
description: "Remove deployment(s) by project name or deployment ID.",
|
152391
153245
|
arguments: [
|
152392
153246
|
{
|
152393
|
-
name: "
|
153247
|
+
name: "name|deploymentId",
|
152394
153248
|
required: true
|
152395
153249
|
}
|
152396
153250
|
],
|
@@ -152410,16 +153264,16 @@ var init_command24 = __esm({
|
|
152410
153264
|
],
|
152411
153265
|
examples: [
|
152412
153266
|
{
|
152413
|
-
name: "Remove a deployment identified by
|
152414
|
-
value: `${packageName} remove
|
153267
|
+
name: "Remove a deployment identified by Deployment ID",
|
153268
|
+
value: `${packageName} remove dpl_abcdef123456890`
|
152415
153269
|
},
|
152416
153270
|
{
|
152417
|
-
name: "Remove all deployments with name `my-app`",
|
152418
|
-
value: `${packageName} remove
|
153271
|
+
name: "Remove all deployments with Project name `my-app`",
|
153272
|
+
value: `${packageName} remove my-app`
|
152419
153273
|
},
|
152420
153274
|
{
|
152421
|
-
name: "Remove two deployments with IDs
|
152422
|
-
value: `${packageName} remove
|
153275
|
+
name: "Remove two deployments with Deployment IDs",
|
153276
|
+
value: `${packageName} remove dpl_eyWt6zuSdeus dpl_uWHoA9RQ1d1o`
|
152423
153277
|
}
|
152424
153278
|
]
|
152425
153279
|
};
|
@@ -152428,11 +153282,19 @@ var init_command24 = __esm({
|
|
152428
153282
|
|
152429
153283
|
// src/util/telemetry/commands/remove/index.ts
|
152430
153284
|
var RemoveTelemetryClient;
|
152431
|
-
var
|
153285
|
+
var init_remove5 = __esm({
|
152432
153286
|
"src/util/telemetry/commands/remove/index.ts"() {
|
152433
153287
|
"use strict";
|
152434
153288
|
init_telemetry();
|
152435
153289
|
RemoveTelemetryClient = class extends TelemetryClient {
|
153290
|
+
trackCliArgumentNameOrDeploymentId(value) {
|
153291
|
+
if (value) {
|
153292
|
+
this.trackCliArgument({
|
153293
|
+
arg: "nameOrDeploymentId",
|
153294
|
+
value: this.redactedValue
|
153295
|
+
});
|
153296
|
+
}
|
153297
|
+
}
|
152436
153298
|
trackCliFlagHard(flag) {
|
152437
153299
|
if (flag) {
|
152438
153300
|
this.trackCliFlag("hard");
|
@@ -152455,9 +153317,9 @@ var init_remove3 = __esm({
|
|
152455
153317
|
// src/commands/remove/index.ts
|
152456
153318
|
var remove_exports = {};
|
152457
153319
|
__export3(remove_exports, {
|
152458
|
-
default: () =>
|
153320
|
+
default: () => remove5
|
152459
153321
|
});
|
152460
|
-
async function
|
153322
|
+
async function remove5(client2) {
|
152461
153323
|
const telemetryClient = new RemoveTelemetryClient({
|
152462
153324
|
opts: {
|
152463
153325
|
store: client2.telemetryEventStore
|
@@ -152467,6 +153329,7 @@ async function remove3(client2) {
|
|
152467
153329
|
const flagsSpecification = getFlagsSpecification(removeCommand.options);
|
152468
153330
|
try {
|
152469
153331
|
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
|
153332
|
+
telemetryClient.trackCliArgumentNameOrDeploymentId(parsedArgs.args[0]);
|
152470
153333
|
telemetryClient.trackCliFlagSafe(parsedArgs.flags["--safe"]);
|
152471
153334
|
telemetryClient.trackCliFlagHard(parsedArgs.flags["--hard"]);
|
152472
153335
|
telemetryClient.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
@@ -152501,7 +153364,7 @@ async function remove3(client2) {
|
|
152501
153364
|
}
|
152502
153365
|
const { contextName } = await getScope(client2);
|
152503
153366
|
output_manager_default.spinner(
|
152504
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
153367
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk109.default.bold(contextName)}`
|
152505
153368
|
);
|
152506
153369
|
let aliases;
|
152507
153370
|
let projects;
|
@@ -152567,12 +153430,12 @@ async function remove3(client2) {
|
|
152567
153430
|
});
|
152568
153431
|
if (deployments.length === 0 && projects.length === 0) {
|
152569
153432
|
log2(
|
152570
|
-
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) =>
|
153433
|
+
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) => import_chalk109.default.bold(`"${id}"`)).join(", ")}. Run ${getCommandName("projects ls")} to list.`
|
152571
153434
|
);
|
152572
153435
|
return 1;
|
152573
153436
|
}
|
152574
153437
|
log2(
|
152575
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
153438
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk109.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
152576
153439
|
);
|
152577
153440
|
if (deployments.length > 200) {
|
152578
153441
|
output_manager_default.warn(
|
@@ -152599,11 +153462,11 @@ async function remove3(client2) {
|
|
152599
153462
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
152600
153463
|
);
|
152601
153464
|
deployments.forEach((depl) => {
|
152602
|
-
output_manager_default.print(`${
|
153465
|
+
output_manager_default.print(`${import_chalk109.default.gray("-")} ${import_chalk109.default.bold(depl.url)}
|
152603
153466
|
`);
|
152604
153467
|
});
|
152605
153468
|
projects.forEach((project) => {
|
152606
|
-
output_manager_default.print(`${
|
153469
|
+
output_manager_default.print(`${import_chalk109.default.gray("-")} ${import_chalk109.default.bold(project.name)}
|
152607
153470
|
`);
|
152608
153471
|
});
|
152609
153472
|
return 0;
|
@@ -152620,8 +153483,8 @@ function readConfirmation4(deployments, projects) {
|
|
152620
153483
|
);
|
152621
153484
|
const deploymentTable = table(
|
152622
153485
|
deployments.map((depl) => {
|
152623
|
-
const time =
|
152624
|
-
const url3 = depl.url ?
|
153486
|
+
const time = import_chalk109.default.gray(`${(0, import_ms26.default)(Date.now() - depl.createdAt)} ago`);
|
153487
|
+
const url3 = depl.url ? import_chalk109.default.underline(`https://${depl.url}`) : "";
|
152625
153488
|
return [` ${depl.id}`, url3, time];
|
152626
153489
|
}),
|
152627
153490
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -152632,7 +153495,7 @@ function readConfirmation4(deployments, projects) {
|
|
152632
153495
|
for (const depl of deployments) {
|
152633
153496
|
for (const { alias: alias2 } of depl.aliases) {
|
152634
153497
|
output_manager_default.warn(
|
152635
|
-
`${
|
153498
|
+
`${import_chalk109.default.underline(`https://${alias2}`)} is an alias for ${import_chalk109.default.bold(depl.url)} and will be removed`
|
152636
153499
|
);
|
152637
153500
|
}
|
152638
153501
|
}
|
@@ -152646,12 +153509,12 @@ function readConfirmation4(deployments, projects) {
|
|
152646
153509
|
`
|
152647
153510
|
);
|
152648
153511
|
for (const project of projects) {
|
152649
|
-
output_manager_default.print(`${
|
153512
|
+
output_manager_default.print(`${import_chalk109.default.gray("-")} ${import_chalk109.default.bold(project.name)}
|
152650
153513
|
`);
|
152651
153514
|
}
|
152652
153515
|
}
|
152653
153516
|
output_manager_default.print(
|
152654
|
-
`${
|
153517
|
+
`${import_chalk109.default.bold.red("> Are you sure?")} ${import_chalk109.default.gray("(y/N) ")}`
|
152655
153518
|
);
|
152656
153519
|
process.stdin.on("data", (d) => {
|
152657
153520
|
process.stdin.pause();
|
@@ -152668,11 +153531,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
152668
153531
|
}
|
152669
153532
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
152670
153533
|
}
|
152671
|
-
var
|
152672
|
-
var
|
153534
|
+
var import_chalk109, import_ms26, import_pluralize11;
|
153535
|
+
var init_remove6 = __esm({
|
152673
153536
|
"src/commands/remove/index.ts"() {
|
152674
153537
|
"use strict";
|
152675
|
-
|
153538
|
+
import_chalk109 = __toESM3(require_source());
|
152676
153539
|
import_ms26 = __toESM3(require_ms2());
|
152677
153540
|
import_pluralize11 = __toESM3(require_pluralize());
|
152678
153541
|
init_table();
|
@@ -152691,9 +153554,9 @@ var init_remove4 = __esm({
|
|
152691
153554
|
init_handle_error();
|
152692
153555
|
init_now_error();
|
152693
153556
|
init_help();
|
152694
|
-
|
153557
|
+
init_command25();
|
152695
153558
|
init_get_flags_specification();
|
152696
|
-
|
153559
|
+
init_remove5();
|
152697
153560
|
init_output_manager();
|
152698
153561
|
}
|
152699
153562
|
});
|
@@ -152768,7 +153631,7 @@ async function rollbackStatus({
|
|
152768
153631
|
}
|
152769
153632
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
152770
153633
|
output_manager_default.log(
|
152771
|
-
`The rollback exceeded its deadline - rerun ${
|
153634
|
+
`The rollback exceeded its deadline - rerun ${import_chalk110.default.bold(
|
152772
153635
|
`${packageName} rollback ${toDeploymentId}`
|
152773
153636
|
)} to try again`
|
152774
153637
|
);
|
@@ -152832,26 +153695,26 @@ async function renderJobSucceeded2({
|
|
152832
153695
|
let deploymentInfo = "";
|
152833
153696
|
try {
|
152834
153697
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
152835
|
-
deploymentInfo = `${
|
153698
|
+
deploymentInfo = `${import_chalk110.default.bold(deployment.url)} (${toDeploymentId})`;
|
152836
153699
|
} catch (err) {
|
152837
153700
|
output_manager_default.debug(
|
152838
153701
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
152839
153702
|
);
|
152840
|
-
deploymentInfo =
|
153703
|
+
deploymentInfo = import_chalk110.default.bold(toDeploymentId);
|
152841
153704
|
}
|
152842
153705
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
152843
153706
|
output_manager_default.log(
|
152844
|
-
`Success! ${
|
153707
|
+
`Success! ${import_chalk110.default.bold(
|
152845
153708
|
project.name
|
152846
153709
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
152847
153710
|
);
|
152848
153711
|
return 0;
|
152849
153712
|
}
|
152850
|
-
var
|
153713
|
+
var import_chalk110, import_ms27;
|
152851
153714
|
var init_status2 = __esm({
|
152852
153715
|
"src/commands/rollback/status.ts"() {
|
152853
153716
|
"use strict";
|
152854
|
-
|
153717
|
+
import_chalk110 = __toESM3(require_source());
|
152855
153718
|
init_elapsed();
|
152856
153719
|
init_format_date();
|
152857
153720
|
init_get_deployment();
|
@@ -152883,7 +153746,7 @@ async function requestRollback({
|
|
152883
153746
|
});
|
152884
153747
|
if (timeout !== void 0 && (0, import_ms28.default)(timeout) === 0) {
|
152885
153748
|
output_manager_default.log(
|
152886
|
-
`Successfully requested rollback of ${
|
153749
|
+
`Successfully requested rollback of ${import_chalk111.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
152887
153750
|
);
|
152888
153751
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
152889
153752
|
return 0;
|
@@ -152896,11 +153759,11 @@ async function requestRollback({
|
|
152896
153759
|
timeout
|
152897
153760
|
});
|
152898
153761
|
}
|
152899
|
-
var
|
153762
|
+
var import_chalk111, import_ms28;
|
152900
153763
|
var init_request_rollback = __esm({
|
152901
153764
|
"src/commands/rollback/request-rollback.ts"() {
|
152902
153765
|
"use strict";
|
152903
|
-
|
153766
|
+
import_chalk111 = __toESM3(require_source());
|
152904
153767
|
init_pkg_name();
|
152905
153768
|
init_get_project_by_deployment();
|
152906
153769
|
import_ms28 = __toESM3(require_ms2());
|
@@ -152911,7 +153774,7 @@ var init_request_rollback = __esm({
|
|
152911
153774
|
|
152912
153775
|
// src/commands/rollback/command.ts
|
152913
153776
|
var rollbackCommand;
|
152914
|
-
var
|
153777
|
+
var init_command26 = __esm({
|
152915
153778
|
"src/commands/rollback/command.ts"() {
|
152916
153779
|
"use strict";
|
152917
153780
|
init_pkg_name();
|
@@ -152921,7 +153784,7 @@ var init_command25 = __esm({
|
|
152921
153784
|
description: "Quickly revert back to a previous deployment.",
|
152922
153785
|
arguments: [
|
152923
153786
|
{
|
152924
|
-
name: "
|
153787
|
+
name: "url|deploymentId",
|
152925
153788
|
required: true
|
152926
153789
|
}
|
152927
153790
|
],
|
@@ -152976,6 +153839,14 @@ var init_rollback = __esm({
|
|
152976
153839
|
"use strict";
|
152977
153840
|
init_telemetry();
|
152978
153841
|
RollbackTelemetryClient = class extends TelemetryClient {
|
153842
|
+
trackCliArgumentUrlOrDeploymentId(value) {
|
153843
|
+
if (value) {
|
153844
|
+
this.trackCliArgument({
|
153845
|
+
arg: "urlOrDeploymentId",
|
153846
|
+
value: this.redactedValue
|
153847
|
+
});
|
153848
|
+
}
|
153849
|
+
}
|
152979
153850
|
trackCliSubcommandStatus() {
|
152980
153851
|
this.trackCliSubcommand({
|
152981
153852
|
subcommand: "status",
|
@@ -153016,7 +153887,7 @@ var init_rollback2 = __esm({
|
|
153016
153887
|
init_request_rollback();
|
153017
153888
|
init_status2();
|
153018
153889
|
init_help();
|
153019
|
-
|
153890
|
+
init_command26();
|
153020
153891
|
init_get_flags_specification();
|
153021
153892
|
init_rollback();
|
153022
153893
|
init_output_manager();
|
@@ -153085,7 +153956,7 @@ var init_rollback2 = __esm({
|
|
153085
153956
|
|
153086
153957
|
// src/commands/target/command.ts
|
153087
153958
|
var targetCommand;
|
153088
|
-
var
|
153959
|
+
var init_command27 = __esm({
|
153089
153960
|
"src/commands/target/command.ts"() {
|
153090
153961
|
"use strict";
|
153091
153962
|
init_pkg_name();
|
@@ -153123,7 +153994,7 @@ async function list5(client2, args2) {
|
|
153123
153994
|
const { cwd } = client2;
|
153124
153995
|
if (args2.length !== 0) {
|
153125
153996
|
output_manager_default.error(
|
153126
|
-
`Invalid number of arguments. Usage: ${
|
153997
|
+
`Invalid number of arguments. Usage: ${import_chalk112.default.cyan(
|
153127
153998
|
`${getCommandName("target ls")}`
|
153128
153999
|
)}`
|
153129
154000
|
);
|
@@ -153147,12 +154018,12 @@ async function list5(client2, args2) {
|
|
153147
154018
|
const elapsed2 = (0, import_ms30.default)(Date.now() - start);
|
153148
154019
|
result = withDefaultEnvironmentsIncluded(result);
|
153149
154020
|
output_manager_default.log(
|
153150
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
154021
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk112.default.gray(`[${elapsed2}]`)}`
|
153151
154022
|
);
|
153152
154023
|
const tablePrint = table(
|
153153
154024
|
[
|
153154
154025
|
["Target Name", "Target Slug", "Target ID", "Type", "Updated"].map(
|
153155
|
-
(header) =>
|
154026
|
+
(header) => import_chalk112.default.bold(import_chalk112.default.cyan(header))
|
153156
154027
|
),
|
153157
154028
|
...result.map((target) => {
|
153158
154029
|
const type = target.type === "production" ? "Production" : target.type === "development" ? "Development" : "Preview";
|
@@ -153162,7 +154033,7 @@ async function list5(client2, args2) {
|
|
153162
154033
|
target.slug,
|
153163
154034
|
target.id,
|
153164
154035
|
type,
|
153165
|
-
|
154036
|
+
import_chalk112.default.gray(
|
153166
154037
|
target.updatedAt > 0 ? (0, import_ms30.default)(Date.now() - target.updatedAt) : "-"
|
153167
154038
|
)
|
153168
154039
|
]
|
@@ -153212,14 +154083,14 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
153212
154083
|
}
|
153213
154084
|
];
|
153214
154085
|
}
|
153215
|
-
var import_ms30,
|
154086
|
+
var import_ms30, import_chalk112;
|
153216
154087
|
var init_list8 = __esm({
|
153217
154088
|
"src/commands/target/list.ts"() {
|
153218
154089
|
"use strict";
|
153219
154090
|
import_ms30 = __toESM3(require_ms2());
|
153220
|
-
|
154091
|
+
import_chalk112 = __toESM3(require_source());
|
153221
154092
|
init_table();
|
153222
|
-
|
154093
|
+
init_command27();
|
153223
154094
|
init_pkg_name();
|
153224
154095
|
init_ensure_link();
|
153225
154096
|
init_format_project();
|
@@ -153248,9 +154119,9 @@ var init_target = __esm({
|
|
153248
154119
|
// src/commands/target/index.ts
|
153249
154120
|
var target_exports = {};
|
153250
154121
|
__export3(target_exports, {
|
153251
|
-
default: () =>
|
154122
|
+
default: () => main13
|
153252
154123
|
});
|
153253
|
-
async function
|
154124
|
+
async function main13(client2) {
|
153254
154125
|
let parsedArgs = null;
|
153255
154126
|
const flagsSpecification = getFlagsSpecification(targetCommand.options);
|
153256
154127
|
try {
|
@@ -153278,12 +154149,12 @@ async function main12(client2) {
|
|
153278
154149
|
telemetry2.trackCliSubcommandList(subcommand);
|
153279
154150
|
return await list5(client2, args2);
|
153280
154151
|
default:
|
153281
|
-
output_manager_default.error(getInvalidSubcommand(
|
154152
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG12));
|
153282
154153
|
output_manager_default.print(help2(targetCommand, { columns: client2.stderr.columns }));
|
153283
154154
|
return 2;
|
153284
154155
|
}
|
153285
154156
|
}
|
153286
|
-
var
|
154157
|
+
var COMMAND_CONFIG12;
|
153287
154158
|
var init_target2 = __esm({
|
153288
154159
|
"src/commands/target/index.ts"() {
|
153289
154160
|
"use strict";
|
@@ -153291,12 +154162,12 @@ var init_target2 = __esm({
|
|
153291
154162
|
init_get_invalid_subcommand();
|
153292
154163
|
init_help();
|
153293
154164
|
init_list8();
|
153294
|
-
|
154165
|
+
init_command27();
|
153295
154166
|
init_get_flags_specification();
|
153296
154167
|
init_handle_error();
|
153297
154168
|
init_output_manager();
|
153298
154169
|
init_target();
|
153299
|
-
|
154170
|
+
COMMAND_CONFIG12 = {
|
153300
154171
|
ls: ["ls", "list"]
|
153301
154172
|
};
|
153302
154173
|
}
|
@@ -153304,7 +154175,7 @@ var init_target2 = __esm({
|
|
153304
154175
|
|
153305
154176
|
// src/commands/teams/command.ts
|
153306
154177
|
var listSubcommand2, teamsCommand;
|
153307
|
-
var
|
154178
|
+
var init_command28 = __esm({
|
153308
154179
|
"src/commands/teams/command.ts"() {
|
153309
154180
|
"use strict";
|
153310
154181
|
init_pkg_name();
|
@@ -153447,7 +154318,7 @@ async function list6(client2) {
|
|
153447
154318
|
client2.stdout.write("\n");
|
153448
154319
|
const teamTable = table(
|
153449
154320
|
[
|
153450
|
-
["id", "email / name"].map((str) => (0,
|
154321
|
+
["id", "email / name"].map((str) => (0, import_chalk113.gray)(str)),
|
153451
154322
|
...teamList.map((team) => [team.value, team.name])
|
153452
154323
|
],
|
153453
154324
|
{ hsep: 5 }
|
@@ -153464,13 +154335,13 @@ async function list6(client2) {
|
|
153464
154335
|
}
|
153465
154336
|
return 0;
|
153466
154337
|
}
|
153467
|
-
var
|
154338
|
+
var import_chalk113;
|
153468
154339
|
var init_list9 = __esm({
|
153469
154340
|
"src/commands/teams/list.ts"() {
|
153470
154341
|
"use strict";
|
153471
154342
|
init_chars();
|
153472
154343
|
init_table();
|
153473
|
-
|
154344
|
+
import_chalk113 = __toESM3(require_source());
|
153474
154345
|
init_get_user();
|
153475
154346
|
init_get_teams();
|
153476
154347
|
init_pkg_name();
|
@@ -153479,7 +154350,7 @@ var init_list9 = __esm({
|
|
153479
154350
|
init_get_args();
|
153480
154351
|
init_handle_error();
|
153481
154352
|
init_get_flags_specification();
|
153482
|
-
|
154353
|
+
init_command28();
|
153483
154354
|
init_output_manager();
|
153484
154355
|
}
|
153485
154356
|
});
|
@@ -153555,7 +154426,7 @@ Please select a team scope using ${getCommandName(
|
|
153555
154426
|
return 1;
|
153556
154427
|
}
|
153557
154428
|
output_manager_default.log(
|
153558
|
-
introMsg || `Inviting team members to ${
|
154429
|
+
introMsg || `Inviting team members to ${import_chalk114.default.bold(currentTeam.name)}`
|
153559
154430
|
);
|
153560
154431
|
telemetry2.trackCliArgumentEmail(emails.length);
|
153561
154432
|
if (emails.length > 0) {
|
@@ -153575,10 +154446,10 @@ Please select a team scope using ${getCommandName(
|
|
153575
154446
|
throw err;
|
153576
154447
|
}
|
153577
154448
|
output_manager_default.log(
|
153578
|
-
`${
|
154449
|
+
`${import_chalk114.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
153579
154450
|
);
|
153580
154451
|
} else {
|
153581
|
-
output_manager_default.log(`${
|
154452
|
+
output_manager_default.log(`${import_chalk114.default.red(`\u2716 ${email3}`)} ${import_chalk114.default.gray("[invalid]")}`);
|
153582
154453
|
}
|
153583
154454
|
}
|
153584
154455
|
return 0;
|
@@ -153611,15 +154482,15 @@ Please select a team scope using ${getCommandName(
|
|
153611
154482
|
);
|
153612
154483
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
153613
154484
|
emails.push(email2);
|
153614
|
-
output_manager_default.log(`${
|
154485
|
+
output_manager_default.log(`${import_chalk114.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
153615
154486
|
if (hasError) {
|
153616
154487
|
hasError = false;
|
153617
154488
|
process.stderr.write(eraseLines(emails.length + 2));
|
153618
154489
|
output_manager_default.log(
|
153619
|
-
introMsg || `Inviting team members to ${
|
154490
|
+
introMsg || `Inviting team members to ${import_chalk114.default.bold(currentTeam.name)}`
|
153620
154491
|
);
|
153621
154492
|
for (const email3 of emails) {
|
153622
|
-
output_manager_default.log(`${
|
154493
|
+
output_manager_default.log(`${import_chalk114.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
153623
154494
|
}
|
153624
154495
|
}
|
153625
154496
|
} catch (err) {
|
@@ -153628,7 +154499,7 @@ Please select a team scope using ${getCommandName(
|
|
153628
154499
|
output_manager_default.error((0, import_error_utils32.errorToString)(err));
|
153629
154500
|
hasError = true;
|
153630
154501
|
for (const email3 of emails) {
|
153631
|
-
output_manager_default.log(`${
|
154502
|
+
output_manager_default.log(`${import_chalk114.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
153632
154503
|
}
|
153633
154504
|
}
|
153634
154505
|
}
|
@@ -153641,16 +154512,16 @@ Please select a team scope using ${getCommandName(
|
|
153641
154512
|
} else {
|
153642
154513
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
153643
154514
|
for (const email3 of emails) {
|
153644
|
-
output_manager_default.log(`${
|
154515
|
+
output_manager_default.log(`${import_chalk114.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
153645
154516
|
}
|
153646
154517
|
}
|
153647
154518
|
return 0;
|
153648
154519
|
}
|
153649
|
-
var
|
154520
|
+
var import_chalk114, import_error_utils32, validateEmail2, domains;
|
153650
154521
|
var init_invite2 = __esm({
|
153651
154522
|
"src/commands/teams/invite.ts"() {
|
153652
154523
|
"use strict";
|
153653
|
-
|
154524
|
+
import_chalk114 = __toESM3(require_source());
|
153654
154525
|
init_cmd();
|
153655
154526
|
init_stamp();
|
153656
154527
|
init_param();
|
@@ -153722,7 +154593,7 @@ async function add8(client2) {
|
|
153722
154593
|
let team;
|
153723
154594
|
let elapsed2;
|
153724
154595
|
output_manager_default.log(
|
153725
|
-
`Pick a team identifier for its URL (e.g.: ${
|
154596
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk115.default.cyan(
|
153726
154597
|
"`vercel.com/acme`"
|
153727
154598
|
)})`
|
153728
154599
|
);
|
@@ -153753,7 +154624,7 @@ async function add8(client2) {
|
|
153753
154624
|
output_manager_default.stopSpinner();
|
153754
154625
|
process.stdout.write(eraseLines(2));
|
153755
154626
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
153756
|
-
output_manager_default.log(`${
|
154627
|
+
output_manager_default.log(`${import_chalk115.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
153757
154628
|
`);
|
153758
154629
|
output_manager_default.log("Pick a display name for your team");
|
153759
154630
|
let name;
|
@@ -153776,7 +154647,7 @@ async function add8(client2) {
|
|
153776
154647
|
process.stdout.write(eraseLines(2));
|
153777
154648
|
team = Object.assign(team, res);
|
153778
154649
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
153779
|
-
output_manager_default.log(`${
|
154650
|
+
output_manager_default.log(`${import_chalk115.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
153780
154651
|
`);
|
153781
154652
|
output_manager_default.spinner("Saving");
|
153782
154653
|
client2.config.currentTeam = team.id;
|
@@ -153790,11 +154661,11 @@ async function add8(client2) {
|
|
153790
154661
|
});
|
153791
154662
|
return 0;
|
153792
154663
|
}
|
153793
|
-
var
|
154664
|
+
var import_chalk115, import_error_utils33, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
153794
154665
|
var init_add13 = __esm({
|
153795
154666
|
"src/commands/teams/add.ts"() {
|
153796
154667
|
"use strict";
|
153797
|
-
|
154668
|
+
import_chalk115 = __toESM3(require_source());
|
153798
154669
|
init_stamp();
|
153799
154670
|
init_erase_lines();
|
153800
154671
|
init_chars();
|
@@ -153807,13 +154678,13 @@ var init_add13 = __esm({
|
|
153807
154678
|
init_output_manager();
|
153808
154679
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
153809
154680
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
153810
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
154681
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk115.default.gray("vercel.com/");
|
153811
154682
|
teamNamePrefix = "Team Name".padEnd(14);
|
153812
154683
|
}
|
153813
154684
|
});
|
153814
154685
|
|
153815
154686
|
// src/commands/teams/switch.ts
|
153816
|
-
async function
|
154687
|
+
async function main14(client2, desiredSlug) {
|
153817
154688
|
const { config: config2 } = client2;
|
153818
154689
|
const personalScopeSelected = !config2.currentTeam;
|
153819
154690
|
output_manager_default.spinner("Fetching teams information");
|
@@ -153830,7 +154701,7 @@ async function main13(client2, desiredSlug) {
|
|
153830
154701
|
let title8 = `${team.name} (${team.slug})`;
|
153831
154702
|
const selected = team.id === currentTeam?.id;
|
153832
154703
|
if (selected) {
|
153833
|
-
title8 += ` ${
|
154704
|
+
title8 += ` ${import_chalk116.default.bold("(current)")}`;
|
153834
154705
|
}
|
153835
154706
|
if (team.limited) {
|
153836
154707
|
title8 += ` ${emoji("locked")}`;
|
@@ -153842,7 +154713,7 @@ async function main13(client2, desiredSlug) {
|
|
153842
154713
|
selected
|
153843
154714
|
};
|
153844
154715
|
});
|
153845
|
-
let suffix = personalScopeSelected ? ` ${
|
154716
|
+
let suffix = personalScopeSelected ? ` ${import_chalk116.default.bold("(current)")}` : "";
|
153846
154717
|
if (user.limited) {
|
153847
154718
|
suffix += ` ${emoji("locked")}`;
|
153848
154719
|
}
|
@@ -153888,14 +154759,14 @@ async function main13(client2, desiredSlug) {
|
|
153888
154759
|
}
|
153889
154760
|
updateCurrentTeam(config2);
|
153890
154761
|
output_manager_default.success(
|
153891
|
-
`Your account (${
|
154762
|
+
`Your account (${import_chalk116.default.bold(user.username)}) is now active!`
|
153892
154763
|
);
|
153893
154764
|
return 0;
|
153894
154765
|
}
|
153895
154766
|
const newTeam = teams.find((team) => team.slug === desiredSlug);
|
153896
154767
|
if (!newTeam) {
|
153897
154768
|
output_manager_default.error(
|
153898
|
-
`You do not have permission to access scope ${
|
154769
|
+
`You do not have permission to access scope ${import_chalk116.default.bold(desiredSlug)}.`
|
153899
154770
|
);
|
153900
154771
|
return 1;
|
153901
154772
|
}
|
@@ -153913,15 +154784,15 @@ async function main13(client2, desiredSlug) {
|
|
153913
154784
|
}
|
153914
154785
|
updateCurrentTeam(config2, newTeam);
|
153915
154786
|
output_manager_default.success(
|
153916
|
-
`The team ${
|
154787
|
+
`The team ${import_chalk116.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
153917
154788
|
);
|
153918
154789
|
return 0;
|
153919
154790
|
}
|
153920
|
-
var
|
154791
|
+
var import_chalk116, updateCurrentTeam;
|
153921
154792
|
var init_switch = __esm({
|
153922
154793
|
"src/commands/teams/switch.ts"() {
|
153923
154794
|
"use strict";
|
153924
|
-
|
154795
|
+
import_chalk116 = __toESM3(require_source());
|
153925
154796
|
init_emoji();
|
153926
154797
|
init_get_user();
|
153927
154798
|
init_get_teams();
|
@@ -153988,7 +154859,7 @@ var init_teams2 = __esm({
|
|
153988
154859
|
init_switch();
|
153989
154860
|
init_invite2();
|
153990
154861
|
init_get_args();
|
153991
|
-
|
154862
|
+
init_command28();
|
153992
154863
|
init_help();
|
153993
154864
|
init_get_flags_specification();
|
153994
154865
|
init_handle_error();
|
@@ -154033,7 +154904,7 @@ var init_teams2 = __esm({
|
|
154033
154904
|
case "switch":
|
154034
154905
|
case "change": {
|
154035
154906
|
telemetryClient.trackCliSubcommandSwitch(parsedArgs.args[0]);
|
154036
|
-
exitCode2 = await
|
154907
|
+
exitCode2 = await main14(client2, parsedArgs.args[0]);
|
154037
154908
|
break;
|
154038
154909
|
}
|
154039
154910
|
case "add":
|
@@ -154065,9 +154936,9 @@ var init_teams2 = __esm({
|
|
154065
154936
|
// src/commands/telemetry/status.ts
|
154066
154937
|
async function status(client2) {
|
154067
154938
|
const status2 = client2.config.telemetry?.enabled === false ? "disabled" : "enabled";
|
154068
|
-
const message2 = status2 === "disabled" ?
|
154939
|
+
const message2 = status2 === "disabled" ? import_chalk117.default.red("Disabled") : import_chalk117.default.green("Enabled");
|
154069
154940
|
output_manager_default.print(`
|
154070
|
-
${
|
154941
|
+
${import_chalk117.default.bold("Telemetry status")}: ${message2}
|
154071
154942
|
|
154072
154943
|
`);
|
154073
154944
|
const learnMoreMessage = ``;
|
@@ -154078,11 +154949,11 @@ No data will be collected from your machine${learnMoreMessage}`;
|
|
154078
154949
|
output_manager_default.print(optedInorOutMessage);
|
154079
154950
|
return 0;
|
154080
154951
|
}
|
154081
|
-
var
|
154952
|
+
var import_chalk117;
|
154082
154953
|
var init_status3 = __esm({
|
154083
154954
|
"src/commands/telemetry/status.ts"() {
|
154084
154955
|
"use strict";
|
154085
|
-
|
154956
|
+
import_chalk117 = __toESM3(require_source());
|
154086
154957
|
init_output_manager();
|
154087
154958
|
}
|
154088
154959
|
});
|
@@ -154131,7 +155002,7 @@ var init_disable = __esm({
|
|
154131
155002
|
|
154132
155003
|
// src/commands/telemetry/command.ts
|
154133
155004
|
var telemetryCommand;
|
154134
|
-
var
|
155005
|
+
var init_command29 = __esm({
|
154135
155006
|
"src/commands/telemetry/command.ts"() {
|
154136
155007
|
"use strict";
|
154137
155008
|
telemetryCommand = {
|
@@ -154219,7 +155090,7 @@ async function telemetry(client2) {
|
|
154219
155090
|
}
|
154220
155091
|
const { subcommand } = getSubcommand(
|
154221
155092
|
parsedArguments.args.slice(1),
|
154222
|
-
|
155093
|
+
COMMAND_CONFIG13
|
154223
155094
|
);
|
154224
155095
|
switch (subcommand) {
|
154225
155096
|
case "status":
|
@@ -154233,7 +155104,7 @@ async function telemetry(client2) {
|
|
154233
155104
|
default: {
|
154234
155105
|
const errorMessage = parsedArguments.args.length !== 2 ? `Invalid number of arguments` : `Invalid subcommand`;
|
154235
155106
|
output_manager_default.print(
|
154236
|
-
`${
|
155107
|
+
`${import_chalk118.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
154237
155108
|
`
|
154238
155109
|
);
|
154239
155110
|
output_manager_default.print(help2(telemetryCommand, { columns: client2.stderr.columns }));
|
@@ -154241,7 +155112,7 @@ async function telemetry(client2) {
|
|
154241
155112
|
}
|
154242
155113
|
}
|
154243
155114
|
}
|
154244
|
-
var
|
155115
|
+
var import_chalk118, COMMAND_CONFIG13;
|
154245
155116
|
var init_telemetry3 = __esm({
|
154246
155117
|
"src/commands/telemetry/index.ts"() {
|
154247
155118
|
"use strict";
|
@@ -154252,12 +155123,12 @@ var init_telemetry3 = __esm({
|
|
154252
155123
|
init_status3();
|
154253
155124
|
init_enable();
|
154254
155125
|
init_disable();
|
154255
|
-
|
155126
|
+
init_command29();
|
154256
155127
|
init_get_flags_specification();
|
154257
155128
|
init_telemetry2();
|
154258
|
-
|
155129
|
+
import_chalk118 = __toESM3(require_source());
|
154259
155130
|
init_output_manager();
|
154260
|
-
|
155131
|
+
COMMAND_CONFIG13 = {
|
154261
155132
|
status: ["status"],
|
154262
155133
|
enable: ["enable"],
|
154263
155134
|
disable: ["disable"]
|
@@ -154267,7 +155138,7 @@ var init_telemetry3 = __esm({
|
|
154267
155138
|
|
154268
155139
|
// src/commands/whoami/command.ts
|
154269
155140
|
var whoamiCommand;
|
154270
|
-
var
|
155141
|
+
var init_command30 = __esm({
|
154271
155142
|
"src/commands/whoami/command.ts"() {
|
154272
155143
|
"use strict";
|
154273
155144
|
init_pkg_name();
|
@@ -154317,7 +155188,7 @@ var init_whoami = __esm({
|
|
154317
155188
|
"src/commands/whoami/index.ts"() {
|
154318
155189
|
"use strict";
|
154319
155190
|
init_help();
|
154320
|
-
|
155191
|
+
init_command30();
|
154321
155192
|
init_get_scope();
|
154322
155193
|
init_get_args();
|
154323
155194
|
init_get_flags_specification();
|
@@ -154331,7 +155202,7 @@ var import_error_utils34 = __toESM3(require_dist2());
|
|
154331
155202
|
var import_path43 = require("path");
|
154332
155203
|
var import_fs9 = require("fs");
|
154333
155204
|
var import_fs_extra23 = __toESM3(require_lib());
|
154334
|
-
var
|
155205
|
+
var import_chalk119 = __toESM3(require_source());
|
154335
155206
|
var import_epipebomb = __toESM3(require_epipebomb());
|
154336
155207
|
|
154337
155208
|
// src/util/get-latest-version/index.ts
|
@@ -154451,6 +155322,8 @@ var commands_default = /* @__PURE__ */ new Map([
|
|
154451
155322
|
["inspect", "inspect"],
|
154452
155323
|
["install", "install"],
|
154453
155324
|
["integration", "integration"],
|
155325
|
+
["integration-resource", "integration-resource"],
|
155326
|
+
["ir", "integration-resource"],
|
154454
155327
|
["link", "link"],
|
154455
155328
|
["list", "list"],
|
154456
155329
|
["ln", "alias"],
|
@@ -155537,7 +156410,7 @@ Sentry.init({
|
|
155537
156410
|
var client;
|
155538
156411
|
var { isTTY: isTTY2 } = process.stdout;
|
155539
156412
|
var apiUrl = "https://api.vercel.com";
|
155540
|
-
var
|
156413
|
+
var main15 = async () => {
|
155541
156414
|
if (process.env.FORCE_TTY === "1") {
|
155542
156415
|
isTTY2 = true;
|
155543
156416
|
process.stdout.isTTY = true;
|
@@ -155588,13 +156461,13 @@ var main14 = async () => {
|
|
155588
156461
|
const betaCommands = [];
|
155589
156462
|
if (betaCommands.includes(targetOrSubcommand)) {
|
155590
156463
|
output_manager_default.print(
|
155591
|
-
`${
|
156464
|
+
`${import_chalk119.default.grey(
|
155592
156465
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
155593
156466
|
)}
|
155594
156467
|
`
|
155595
156468
|
);
|
155596
156469
|
} else {
|
155597
|
-
output_manager_default.print(`${
|
156470
|
+
output_manager_default.print(`${import_chalk119.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
155598
156471
|
`);
|
155599
156472
|
}
|
155600
156473
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
@@ -155949,6 +156822,10 @@ var main14 = async () => {
|
|
155949
156822
|
telemetry2.trackCliCommandIntegration(userSuppliedSubCommand);
|
155950
156823
|
func = (init_integration2(), __toCommonJS3(integration_exports)).default;
|
155951
156824
|
break;
|
156825
|
+
case "integration-resource":
|
156826
|
+
telemetry2.trackCliCommandIntegration(userSuppliedSubCommand);
|
156827
|
+
func = (init_integration_resource2(), __toCommonJS3(integration_resource_exports)).default;
|
156828
|
+
break;
|
155952
156829
|
case "link":
|
155953
156830
|
telemetry2.trackCliCommandLink(userSuppliedSubCommand);
|
155954
156831
|
func = (init_link4(), __toCommonJS3(link_exports)).default;
|
@@ -155987,7 +156864,7 @@ var main14 = async () => {
|
|
155987
156864
|
break;
|
155988
156865
|
case "remove":
|
155989
156866
|
telemetry2.trackCliCommandRemove(userSuppliedSubCommand);
|
155990
|
-
func = (
|
156867
|
+
func = (init_remove6(), __toCommonJS3(remove_exports)).default;
|
155991
156868
|
break;
|
155992
156869
|
case "rollback":
|
155993
156870
|
telemetry2.trackCliCommandRollback(userSuppliedSubCommand);
|
@@ -156101,27 +156978,27 @@ ${err.stack}`);
|
|
156101
156978
|
};
|
156102
156979
|
process.on("unhandledRejection", handleRejection);
|
156103
156980
|
process.on("uncaughtException", handleUnexpected);
|
156104
|
-
|
156981
|
+
main15().then(async (exitCode2) => {
|
156105
156982
|
if (isTTY2 && !process.env.NO_UPDATE_NOTIFIER) {
|
156106
156983
|
const latest = getLatestVersion({
|
156107
156984
|
pkg: pkg_default
|
156108
156985
|
});
|
156109
156986
|
if (latest) {
|
156110
156987
|
const changelog = "https://github.com/vercel/vercel/releases";
|
156111
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
156988
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk119.default.magenta(
|
156112
156989
|
`
|
156113
156990
|
|
156114
|
-
The latest update ${
|
156991
|
+
The latest update ${import_chalk119.default.italic(
|
156115
156992
|
"may"
|
156116
156993
|
)} fix any errors that occurred.`
|
156117
156994
|
) : "";
|
156118
156995
|
output_manager_default.print(
|
156119
156996
|
box(
|
156120
|
-
`Update available! ${
|
156997
|
+
`Update available! ${import_chalk119.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk119.default.green(
|
156121
156998
|
`v${latest}`
|
156122
156999
|
)}
|
156123
157000
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
156124
|
-
Run ${
|
157001
|
+
Run ${import_chalk119.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
156125
157002
|
)
|
156126
157003
|
);
|
156127
157004
|
output_manager_default.print("\n\n");
|