vercel 49.0.0 → 49.1.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 +1826 -510
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1954,7 +1954,7 @@ var require_remove = __commonJS2({
|
|
|
1954
1954
|
var fs15 = require_graceful_fs();
|
|
1955
1955
|
var u = require_universalify().fromCallback;
|
|
1956
1956
|
var rimraf = require_rimraf();
|
|
1957
|
-
function
|
|
1957
|
+
function remove7(path11, callback) {
|
|
1958
1958
|
if (fs15.rm)
|
|
1959
1959
|
return fs15.rm(path11, { recursive: true, force: true }, callback);
|
|
1960
1960
|
rimraf(path11, callback);
|
|
@@ -1965,7 +1965,7 @@ var require_remove = __commonJS2({
|
|
|
1965
1965
|
rimraf.sync(path11);
|
|
1966
1966
|
}
|
|
1967
1967
|
module2.exports = {
|
|
1968
|
-
remove: u(
|
|
1968
|
+
remove: u(remove7),
|
|
1969
1969
|
removeSync
|
|
1970
1970
|
};
|
|
1971
1971
|
}
|
|
@@ -1979,7 +1979,7 @@ var require_empty = __commonJS2({
|
|
|
1979
1979
|
var fs15 = require_fs();
|
|
1980
1980
|
var path11 = require("path");
|
|
1981
1981
|
var mkdir4 = require_mkdirs();
|
|
1982
|
-
var
|
|
1982
|
+
var remove7 = require_remove();
|
|
1983
1983
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
1984
1984
|
let items;
|
|
1985
1985
|
try {
|
|
@@ -1987,7 +1987,7 @@ var require_empty = __commonJS2({
|
|
|
1987
1987
|
} catch {
|
|
1988
1988
|
return mkdir4.mkdirs(dir);
|
|
1989
1989
|
}
|
|
1990
|
-
return Promise.all(items.map((item) =>
|
|
1990
|
+
return Promise.all(items.map((item) => remove7.remove(path11.join(dir, item))));
|
|
1991
1991
|
});
|
|
1992
1992
|
function emptyDirSync(dir) {
|
|
1993
1993
|
let items;
|
|
@@ -1998,7 +1998,7 @@ var require_empty = __commonJS2({
|
|
|
1998
1998
|
}
|
|
1999
1999
|
items.forEach((item) => {
|
|
2000
2000
|
item = path11.join(dir, item);
|
|
2001
|
-
|
|
2001
|
+
remove7.removeSync(item);
|
|
2002
2002
|
});
|
|
2003
2003
|
}
|
|
2004
2004
|
module2.exports = {
|
|
@@ -2646,7 +2646,7 @@ var require_move = __commonJS2({
|
|
|
2646
2646
|
var fs15 = require_graceful_fs();
|
|
2647
2647
|
var path11 = require("path");
|
|
2648
2648
|
var copy3 = require_copy2().copy;
|
|
2649
|
-
var
|
|
2649
|
+
var remove7 = require_remove().remove;
|
|
2650
2650
|
var mkdirp4 = require_mkdirs().mkdirp;
|
|
2651
2651
|
var pathExists = require_path_exists().pathExists;
|
|
2652
2652
|
var stat2 = require_stat();
|
|
@@ -2682,7 +2682,7 @@ var require_move = __commonJS2({
|
|
|
2682
2682
|
if (isChangingCase)
|
|
2683
2683
|
return rename(src, dest, overwrite, cb);
|
|
2684
2684
|
if (overwrite) {
|
|
2685
|
-
return
|
|
2685
|
+
return remove7(dest, (err) => {
|
|
2686
2686
|
if (err)
|
|
2687
2687
|
return cb(err);
|
|
2688
2688
|
return rename(src, dest, overwrite, cb);
|
|
@@ -2713,7 +2713,7 @@ var require_move = __commonJS2({
|
|
|
2713
2713
|
copy3(src, dest, opts, (err) => {
|
|
2714
2714
|
if (err)
|
|
2715
2715
|
return cb(err);
|
|
2716
|
-
return
|
|
2716
|
+
return remove7(src, cb);
|
|
2717
2717
|
});
|
|
2718
2718
|
}
|
|
2719
2719
|
module2.exports = move3;
|
|
@@ -4071,14 +4071,14 @@ var require_templates = __commonJS2({
|
|
|
4071
4071
|
}
|
|
4072
4072
|
return results;
|
|
4073
4073
|
}
|
|
4074
|
-
function buildStyle(
|
|
4074
|
+
function buildStyle(chalk137, styles) {
|
|
4075
4075
|
const enabled = {};
|
|
4076
4076
|
for (const layer of styles) {
|
|
4077
4077
|
for (const style of layer.styles) {
|
|
4078
4078
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
4079
4079
|
}
|
|
4080
4080
|
}
|
|
4081
|
-
let current =
|
|
4081
|
+
let current = chalk137;
|
|
4082
4082
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
4083
4083
|
if (!Array.isArray(styles2)) {
|
|
4084
4084
|
continue;
|
|
@@ -4090,7 +4090,7 @@ var require_templates = __commonJS2({
|
|
|
4090
4090
|
}
|
|
4091
4091
|
return current;
|
|
4092
4092
|
}
|
|
4093
|
-
module2.exports = (
|
|
4093
|
+
module2.exports = (chalk137, temporary) => {
|
|
4094
4094
|
const styles = [];
|
|
4095
4095
|
const chunks = [];
|
|
4096
4096
|
let chunk = [];
|
|
@@ -4100,13 +4100,13 @@ var require_templates = __commonJS2({
|
|
|
4100
4100
|
} else if (style) {
|
|
4101
4101
|
const string = chunk.join("");
|
|
4102
4102
|
chunk = [];
|
|
4103
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
4103
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk137, styles)(string));
|
|
4104
4104
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
4105
4105
|
} else if (close2) {
|
|
4106
4106
|
if (styles.length === 0) {
|
|
4107
4107
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
4108
4108
|
}
|
|
4109
|
-
chunks.push(buildStyle(
|
|
4109
|
+
chunks.push(buildStyle(chalk137, styles)(chunk.join("")));
|
|
4110
4110
|
chunk = [];
|
|
4111
4111
|
styles.pop();
|
|
4112
4112
|
} else {
|
|
@@ -4154,16 +4154,16 @@ var require_source = __commonJS2({
|
|
|
4154
4154
|
}
|
|
4155
4155
|
};
|
|
4156
4156
|
var chalkFactory = (options) => {
|
|
4157
|
-
const
|
|
4158
|
-
applyOptions(
|
|
4159
|
-
|
|
4160
|
-
Object.setPrototypeOf(
|
|
4161
|
-
Object.setPrototypeOf(
|
|
4162
|
-
|
|
4157
|
+
const chalk138 = {};
|
|
4158
|
+
applyOptions(chalk138, options);
|
|
4159
|
+
chalk138.template = (...arguments_) => chalkTag(chalk138.template, ...arguments_);
|
|
4160
|
+
Object.setPrototypeOf(chalk138, Chalk.prototype);
|
|
4161
|
+
Object.setPrototypeOf(chalk138.template, chalk138);
|
|
4162
|
+
chalk138.template.constructor = () => {
|
|
4163
4163
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
4164
4164
|
};
|
|
4165
|
-
|
|
4166
|
-
return
|
|
4165
|
+
chalk138.template.Instance = ChalkClass;
|
|
4166
|
+
return chalk138.template;
|
|
4167
4167
|
};
|
|
4168
4168
|
function Chalk(options) {
|
|
4169
4169
|
return chalkFactory(options);
|
|
@@ -4274,7 +4274,7 @@ var require_source = __commonJS2({
|
|
|
4274
4274
|
return openAll + string + closeAll;
|
|
4275
4275
|
};
|
|
4276
4276
|
var template;
|
|
4277
|
-
var chalkTag = (
|
|
4277
|
+
var chalkTag = (chalk138, ...strings) => {
|
|
4278
4278
|
const [firstString] = strings;
|
|
4279
4279
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
4280
4280
|
return strings.join(" ");
|
|
@@ -4290,14 +4290,14 @@ var require_source = __commonJS2({
|
|
|
4290
4290
|
if (template === void 0) {
|
|
4291
4291
|
template = require_templates();
|
|
4292
4292
|
}
|
|
4293
|
-
return template(
|
|
4293
|
+
return template(chalk138, parts.join(""));
|
|
4294
4294
|
};
|
|
4295
4295
|
Object.defineProperties(Chalk.prototype, styles);
|
|
4296
|
-
var
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
module2.exports =
|
|
4296
|
+
var chalk137 = Chalk();
|
|
4297
|
+
chalk137.supportsColor = stdoutColor;
|
|
4298
|
+
chalk137.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
4299
|
+
chalk137.stderr.supportsColor = stderrColor;
|
|
4300
|
+
module2.exports = chalk137;
|
|
4301
4301
|
}
|
|
4302
4302
|
});
|
|
4303
4303
|
|
|
@@ -4753,14 +4753,14 @@ var require_semver = __commonJS2({
|
|
|
4753
4753
|
return compare(b, a, loose);
|
|
4754
4754
|
}
|
|
4755
4755
|
exports2.sort = sort;
|
|
4756
|
-
function sort(
|
|
4757
|
-
return
|
|
4756
|
+
function sort(list10, loose) {
|
|
4757
|
+
return list10.sort(function(a, b) {
|
|
4758
4758
|
return exports2.compare(a, b, loose);
|
|
4759
4759
|
});
|
|
4760
4760
|
}
|
|
4761
4761
|
exports2.rsort = rsort;
|
|
4762
|
-
function rsort(
|
|
4763
|
-
return
|
|
4762
|
+
function rsort(list10, loose) {
|
|
4763
|
+
return list10.sort(function(a, b) {
|
|
4764
4764
|
return exports2.rcompare(a, b, loose);
|
|
4765
4765
|
});
|
|
4766
4766
|
}
|
|
@@ -7208,14 +7208,14 @@ var require_templates2 = __commonJS2({
|
|
|
7208
7208
|
}
|
|
7209
7209
|
return results;
|
|
7210
7210
|
}
|
|
7211
|
-
function buildStyle(
|
|
7211
|
+
function buildStyle(chalk137, styles) {
|
|
7212
7212
|
const enabled = {};
|
|
7213
7213
|
for (const layer of styles) {
|
|
7214
7214
|
for (const style of layer.styles) {
|
|
7215
7215
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
7216
7216
|
}
|
|
7217
7217
|
}
|
|
7218
|
-
let current =
|
|
7218
|
+
let current = chalk137;
|
|
7219
7219
|
for (const styleName of Object.keys(enabled)) {
|
|
7220
7220
|
if (Array.isArray(enabled[styleName])) {
|
|
7221
7221
|
if (!(styleName in current)) {
|
|
@@ -7230,7 +7230,7 @@ var require_templates2 = __commonJS2({
|
|
|
7230
7230
|
}
|
|
7231
7231
|
return current;
|
|
7232
7232
|
}
|
|
7233
|
-
module2.exports = (
|
|
7233
|
+
module2.exports = (chalk137, tmp) => {
|
|
7234
7234
|
const styles = [];
|
|
7235
7235
|
const chunks = [];
|
|
7236
7236
|
let chunk = [];
|
|
@@ -7240,13 +7240,13 @@ var require_templates2 = __commonJS2({
|
|
|
7240
7240
|
} else if (style) {
|
|
7241
7241
|
const str = chunk.join("");
|
|
7242
7242
|
chunk = [];
|
|
7243
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
|
7243
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk137, styles)(str));
|
|
7244
7244
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
7245
7245
|
} else if (close2) {
|
|
7246
7246
|
if (styles.length === 0) {
|
|
7247
7247
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
7248
7248
|
}
|
|
7249
|
-
chunks.push(buildStyle(
|
|
7249
|
+
chunks.push(buildStyle(chalk137, styles)(chunk.join("")));
|
|
7250
7250
|
chunk = [];
|
|
7251
7251
|
styles.pop();
|
|
7252
7252
|
} else {
|
|
@@ -7283,16 +7283,16 @@ var require_chalk = __commonJS2({
|
|
|
7283
7283
|
}
|
|
7284
7284
|
function Chalk(options) {
|
|
7285
7285
|
if (!this || !(this instanceof Chalk) || this.template) {
|
|
7286
|
-
const
|
|
7287
|
-
applyOptions(
|
|
7288
|
-
|
|
7286
|
+
const chalk137 = {};
|
|
7287
|
+
applyOptions(chalk137, options);
|
|
7288
|
+
chalk137.template = function() {
|
|
7289
7289
|
const args2 = [].slice.call(arguments);
|
|
7290
|
-
return chalkTag.apply(null, [
|
|
7290
|
+
return chalkTag.apply(null, [chalk137.template].concat(args2));
|
|
7291
7291
|
};
|
|
7292
|
-
Object.setPrototypeOf(
|
|
7293
|
-
Object.setPrototypeOf(
|
|
7294
|
-
|
|
7295
|
-
return
|
|
7292
|
+
Object.setPrototypeOf(chalk137, Chalk.prototype);
|
|
7293
|
+
Object.setPrototypeOf(chalk137.template, chalk137);
|
|
7294
|
+
chalk137.template.constructor = Chalk;
|
|
7295
|
+
return chalk137.template;
|
|
7296
7296
|
}
|
|
7297
7297
|
applyOptions(this, options);
|
|
7298
7298
|
}
|
|
@@ -7411,7 +7411,7 @@ var require_chalk = __commonJS2({
|
|
|
7411
7411
|
ansiStyles.dim.open = originalDim;
|
|
7412
7412
|
return str;
|
|
7413
7413
|
}
|
|
7414
|
-
function chalkTag(
|
|
7414
|
+
function chalkTag(chalk137, strings) {
|
|
7415
7415
|
if (!Array.isArray(strings)) {
|
|
7416
7416
|
return [].slice.call(arguments, 1).join(" ");
|
|
7417
7417
|
}
|
|
@@ -7421,7 +7421,7 @@ var require_chalk = __commonJS2({
|
|
|
7421
7421
|
parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
|
7422
7422
|
parts.push(String(strings.raw[i]));
|
|
7423
7423
|
}
|
|
7424
|
-
return template(
|
|
7424
|
+
return template(chalk137, parts.join(""));
|
|
7425
7425
|
}
|
|
7426
7426
|
Object.defineProperties(Chalk.prototype, styles);
|
|
7427
7427
|
module2.exports = Chalk();
|
|
@@ -7558,14 +7558,14 @@ var require_signal_exit = __commonJS2({
|
|
|
7558
7558
|
if (opts && opts.alwaysLast) {
|
|
7559
7559
|
ev = "afterexit";
|
|
7560
7560
|
}
|
|
7561
|
-
var
|
|
7561
|
+
var remove7 = function() {
|
|
7562
7562
|
emitter.removeListener(ev, cb);
|
|
7563
7563
|
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
|
|
7564
7564
|
unload2();
|
|
7565
7565
|
}
|
|
7566
7566
|
};
|
|
7567
7567
|
emitter.on(ev, cb);
|
|
7568
|
-
return
|
|
7568
|
+
return remove7;
|
|
7569
7569
|
};
|
|
7570
7570
|
unload2 = function unload3() {
|
|
7571
7571
|
if (!loaded || !processOk2(global.process)) {
|
|
@@ -9372,21 +9372,21 @@ var require_cli_spinners = __commonJS2({
|
|
|
9372
9372
|
var require_log_symbols = __commonJS2({
|
|
9373
9373
|
"../../node_modules/.pnpm/log-symbols@2.2.0/node_modules/log-symbols/index.js"(exports2, module2) {
|
|
9374
9374
|
"use strict";
|
|
9375
|
-
var
|
|
9375
|
+
var chalk137 = require_chalk();
|
|
9376
9376
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
|
9377
|
-
var
|
|
9378
|
-
info:
|
|
9379
|
-
success:
|
|
9380
|
-
warning:
|
|
9381
|
-
error:
|
|
9377
|
+
var main19 = {
|
|
9378
|
+
info: chalk137.blue("\u2139"),
|
|
9379
|
+
success: chalk137.green("\u2714"),
|
|
9380
|
+
warning: chalk137.yellow("\u26A0"),
|
|
9381
|
+
error: chalk137.red("\u2716")
|
|
9382
9382
|
};
|
|
9383
9383
|
var fallbacks = {
|
|
9384
|
-
info:
|
|
9385
|
-
success:
|
|
9386
|
-
warning:
|
|
9387
|
-
error:
|
|
9384
|
+
info: chalk137.blue("i"),
|
|
9385
|
+
success: chalk137.green("\u221A"),
|
|
9386
|
+
warning: chalk137.yellow("\u203C"),
|
|
9387
|
+
error: chalk137.red("\xD7")
|
|
9388
9388
|
};
|
|
9389
|
-
module2.exports = isSupported ?
|
|
9389
|
+
module2.exports = isSupported ? main19 : fallbacks;
|
|
9390
9390
|
}
|
|
9391
9391
|
});
|
|
9392
9392
|
|
|
@@ -9780,7 +9780,7 @@ var require_wcwidth = __commonJS2({
|
|
|
9780
9780
|
var require_ora = __commonJS2({
|
|
9781
9781
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
|
9782
9782
|
"use strict";
|
|
9783
|
-
var
|
|
9783
|
+
var chalk137 = require_chalk();
|
|
9784
9784
|
var cliCursor = require_cli_cursor();
|
|
9785
9785
|
var cliSpinners = require_cli_spinners();
|
|
9786
9786
|
var logSymbols = require_log_symbols();
|
|
@@ -9869,7 +9869,7 @@ var require_ora = __commonJS2({
|
|
|
9869
9869
|
const { frames } = this.spinner;
|
|
9870
9870
|
let frame = frames[this.frameIndex];
|
|
9871
9871
|
if (this.color) {
|
|
9872
|
-
frame =
|
|
9872
|
+
frame = chalk137[this.color](frame);
|
|
9873
9873
|
}
|
|
9874
9874
|
this.frameIndex = ++this.frameIndex % frames.length;
|
|
9875
9875
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
|
@@ -12624,10 +12624,10 @@ var require_promisebuffer = __commonJS2({
|
|
|
12624
12624
|
function isReady2() {
|
|
12625
12625
|
return limit === void 0 || buffer.length < limit;
|
|
12626
12626
|
}
|
|
12627
|
-
function
|
|
12627
|
+
function remove7(task) {
|
|
12628
12628
|
return buffer.splice(buffer.indexOf(task), 1)[0];
|
|
12629
12629
|
}
|
|
12630
|
-
function
|
|
12630
|
+
function add9(taskProducer) {
|
|
12631
12631
|
if (!isReady2()) {
|
|
12632
12632
|
return syncpromise.rejectedSyncPromise(new error3.SentryError("Not adding Promise because buffer limit was reached."));
|
|
12633
12633
|
}
|
|
@@ -12635,9 +12635,9 @@ var require_promisebuffer = __commonJS2({
|
|
|
12635
12635
|
if (buffer.indexOf(task) === -1) {
|
|
12636
12636
|
buffer.push(task);
|
|
12637
12637
|
}
|
|
12638
|
-
void task.then(() =>
|
|
12638
|
+
void task.then(() => remove7(task)).then(
|
|
12639
12639
|
null,
|
|
12640
|
-
() =>
|
|
12640
|
+
() => remove7(task).then(null, () => {
|
|
12641
12641
|
})
|
|
12642
12642
|
);
|
|
12643
12643
|
return task;
|
|
@@ -12665,7 +12665,7 @@ var require_promisebuffer = __commonJS2({
|
|
|
12665
12665
|
}
|
|
12666
12666
|
return {
|
|
12667
12667
|
$: buffer,
|
|
12668
|
-
add:
|
|
12668
|
+
add: add9,
|
|
12669
12669
|
drain
|
|
12670
12670
|
};
|
|
12671
12671
|
}
|
|
@@ -22043,8 +22043,8 @@ var require_observe = __commonJS2({
|
|
|
22043
22043
|
var observe = (type, callback, opts) => {
|
|
22044
22044
|
try {
|
|
22045
22045
|
if (PerformanceObserver.supportedEntryTypes.includes(type)) {
|
|
22046
|
-
const po = new PerformanceObserver((
|
|
22047
|
-
callback(
|
|
22046
|
+
const po = new PerformanceObserver((list10) => {
|
|
22047
|
+
callback(list10.getEntries());
|
|
22048
22048
|
});
|
|
22049
22049
|
po.observe(
|
|
22050
22050
|
Object.assign(
|
|
@@ -25746,7 +25746,7 @@ var require_local_variables_sync = __commonJS2({
|
|
|
25746
25746
|
complete(result);
|
|
25747
25747
|
}
|
|
25748
25748
|
callbacks.push(checkedComplete);
|
|
25749
|
-
function
|
|
25749
|
+
function add9(fn2) {
|
|
25750
25750
|
callbacks.push(fn2);
|
|
25751
25751
|
}
|
|
25752
25752
|
function next(result) {
|
|
@@ -25757,7 +25757,7 @@ var require_local_variables_sync = __commonJS2({
|
|
|
25757
25757
|
checkedComplete(result);
|
|
25758
25758
|
}
|
|
25759
25759
|
}
|
|
25760
|
-
return { add:
|
|
25760
|
+
return { add: add9, next };
|
|
25761
25761
|
}
|
|
25762
25762
|
var AsyncSession = class {
|
|
25763
25763
|
/** Throws if inspector API is not available */
|
|
@@ -25782,16 +25782,16 @@ var require_local_variables_sync = __commonJS2({
|
|
|
25782
25782
|
/** @inheritdoc */
|
|
25783
25783
|
getLocalVariables(objectId, complete) {
|
|
25784
25784
|
this._getProperties(objectId, (props) => {
|
|
25785
|
-
const { add:
|
|
25785
|
+
const { add: add9, next } = createCallbackList(complete);
|
|
25786
25786
|
for (const prop of props) {
|
|
25787
25787
|
if (_optionalChain([prop, "optionalAccess", (_2) => _2.value, "optionalAccess", (_3) => _3.objectId]) && _optionalChain([prop, "optionalAccess", (_4) => _4.value, "access", (_5) => _5.className]) === "Array") {
|
|
25788
25788
|
const id = prop.value.objectId;
|
|
25789
|
-
|
|
25789
|
+
add9((vars) => this._unrollArray(id, prop.name, vars, next));
|
|
25790
25790
|
} else if (_optionalChain([prop, "optionalAccess", (_6) => _6.value, "optionalAccess", (_7) => _7.objectId]) && _optionalChain([prop, "optionalAccess", (_8) => _8.value, "optionalAccess", (_9) => _9.className]) === "Object") {
|
|
25791
25791
|
const id = prop.value.objectId;
|
|
25792
|
-
|
|
25792
|
+
add9((vars) => this._unrollObject(id, prop.name, vars, next));
|
|
25793
25793
|
} else if (_optionalChain([prop, "optionalAccess", (_10) => _10.value, "optionalAccess", (_11) => _11.value]) != null || _optionalChain([prop, "optionalAccess", (_12) => _12.value, "optionalAccess", (_13) => _13.description]) != null) {
|
|
25794
|
-
|
|
25794
|
+
add9((vars) => this._unrollOther(prop, vars, next));
|
|
25795
25795
|
}
|
|
25796
25796
|
}
|
|
25797
25797
|
next({});
|
|
@@ -25872,7 +25872,7 @@ var require_local_variables_sync = __commonJS2({
|
|
|
25872
25872
|
complete();
|
|
25873
25873
|
return;
|
|
25874
25874
|
}
|
|
25875
|
-
const { add:
|
|
25875
|
+
const { add: add9, next } = createCallbackList((frames) => {
|
|
25876
25876
|
cachedFrames.set(exceptionHash, frames);
|
|
25877
25877
|
complete();
|
|
25878
25878
|
});
|
|
@@ -25881,13 +25881,13 @@ var require_local_variables_sync = __commonJS2({
|
|
|
25881
25881
|
const localScope = scopeChain.find((scope) => scope.type === "local");
|
|
25882
25882
|
const fn2 = obj.className === "global" || !obj.className ? functionName : `${obj.className}.${functionName}`;
|
|
25883
25883
|
if (_optionalChain([localScope, "optionalAccess", (_26) => _26.object, "access", (_27) => _27.objectId]) === void 0) {
|
|
25884
|
-
|
|
25884
|
+
add9((frames) => {
|
|
25885
25885
|
frames[i] = { function: fn2 };
|
|
25886
25886
|
next(frames);
|
|
25887
25887
|
});
|
|
25888
25888
|
} else {
|
|
25889
25889
|
const id = localScope.object.objectId;
|
|
25890
|
-
|
|
25890
|
+
add9(
|
|
25891
25891
|
(frames) => _optionalChain([session, "optionalAccess", (_28) => _28.getLocalVariables, "call", (_29) => _29(id, (vars) => {
|
|
25892
25892
|
frames[i] = { function: fn2, vars };
|
|
25893
25893
|
next(frames);
|
|
@@ -34125,9 +34125,204 @@ var init_command31 = __esm({
|
|
|
34125
34125
|
}
|
|
34126
34126
|
});
|
|
34127
34127
|
|
|
34128
|
+
// src/commands/redirects/command.ts
|
|
34129
|
+
var listSubcommand8, listVersionsSubcommand, addSubcommand7, removeSubcommand9, promoteSubcommand, restoreSubcommand, redirectsCommand;
|
|
34130
|
+
var init_command32 = __esm({
|
|
34131
|
+
"src/commands/redirects/command.ts"() {
|
|
34132
|
+
"use strict";
|
|
34133
|
+
init_pkg_name();
|
|
34134
|
+
init_arg_common();
|
|
34135
|
+
listSubcommand8 = {
|
|
34136
|
+
name: "list",
|
|
34137
|
+
aliases: ["ls"],
|
|
34138
|
+
description: "List all redirects for the current project. These redirects apply to all deployments and environments. There may also be redirects defined in a deployment that are not listed here.",
|
|
34139
|
+
arguments: [],
|
|
34140
|
+
options: [
|
|
34141
|
+
{
|
|
34142
|
+
name: "search",
|
|
34143
|
+
description: "Search for redirects by source or destination",
|
|
34144
|
+
shorthand: "s",
|
|
34145
|
+
type: String,
|
|
34146
|
+
argument: "QUERY",
|
|
34147
|
+
deprecated: false
|
|
34148
|
+
},
|
|
34149
|
+
{
|
|
34150
|
+
name: "page",
|
|
34151
|
+
description: "Page number to display",
|
|
34152
|
+
shorthand: null,
|
|
34153
|
+
type: Number,
|
|
34154
|
+
argument: "NUMBER",
|
|
34155
|
+
deprecated: false
|
|
34156
|
+
},
|
|
34157
|
+
{
|
|
34158
|
+
name: "per-page",
|
|
34159
|
+
description: "Number of redirects per page (default: 50)",
|
|
34160
|
+
shorthand: null,
|
|
34161
|
+
type: Number,
|
|
34162
|
+
argument: "NUMBER",
|
|
34163
|
+
deprecated: false
|
|
34164
|
+
},
|
|
34165
|
+
{
|
|
34166
|
+
name: "staged",
|
|
34167
|
+
description: "List redirects from the staging version",
|
|
34168
|
+
shorthand: null,
|
|
34169
|
+
type: Boolean,
|
|
34170
|
+
deprecated: false
|
|
34171
|
+
},
|
|
34172
|
+
{
|
|
34173
|
+
name: "version",
|
|
34174
|
+
description: "List redirects from a specific version ID",
|
|
34175
|
+
shorthand: null,
|
|
34176
|
+
type: String,
|
|
34177
|
+
argument: "VERSION_ID",
|
|
34178
|
+
deprecated: false
|
|
34179
|
+
}
|
|
34180
|
+
],
|
|
34181
|
+
examples: [
|
|
34182
|
+
{
|
|
34183
|
+
name: "List all redirects",
|
|
34184
|
+
value: `${packageName} redirects list`
|
|
34185
|
+
},
|
|
34186
|
+
{
|
|
34187
|
+
name: "Search for redirects",
|
|
34188
|
+
value: `${packageName} redirects list --search "/old-path"`
|
|
34189
|
+
},
|
|
34190
|
+
{
|
|
34191
|
+
name: "List redirects on page 2",
|
|
34192
|
+
value: `${packageName} redirects list --page 2`
|
|
34193
|
+
},
|
|
34194
|
+
{
|
|
34195
|
+
name: "List redirects with custom page size",
|
|
34196
|
+
value: `${packageName} redirects list --per-page 25`
|
|
34197
|
+
}
|
|
34198
|
+
]
|
|
34199
|
+
};
|
|
34200
|
+
listVersionsSubcommand = {
|
|
34201
|
+
name: "list-versions",
|
|
34202
|
+
aliases: ["ls-versions"],
|
|
34203
|
+
description: "List all versions of redirects",
|
|
34204
|
+
arguments: [],
|
|
34205
|
+
options: [],
|
|
34206
|
+
examples: [
|
|
34207
|
+
{
|
|
34208
|
+
name: "List all redirect versions",
|
|
34209
|
+
value: `${packageName} redirects list-versions`
|
|
34210
|
+
}
|
|
34211
|
+
]
|
|
34212
|
+
};
|
|
34213
|
+
addSubcommand7 = {
|
|
34214
|
+
name: "add",
|
|
34215
|
+
aliases: [],
|
|
34216
|
+
description: "Add a new redirect",
|
|
34217
|
+
arguments: [
|
|
34218
|
+
{
|
|
34219
|
+
name: "source",
|
|
34220
|
+
required: true
|
|
34221
|
+
},
|
|
34222
|
+
{
|
|
34223
|
+
name: "destination",
|
|
34224
|
+
required: true
|
|
34225
|
+
}
|
|
34226
|
+
],
|
|
34227
|
+
options: [],
|
|
34228
|
+
examples: [
|
|
34229
|
+
{
|
|
34230
|
+
name: "Add a new redirect",
|
|
34231
|
+
value: `${packageName} redirects add /old-path /new-path`
|
|
34232
|
+
}
|
|
34233
|
+
]
|
|
34234
|
+
};
|
|
34235
|
+
removeSubcommand9 = {
|
|
34236
|
+
name: "remove",
|
|
34237
|
+
aliases: ["rm"],
|
|
34238
|
+
description: "Remove a redirect",
|
|
34239
|
+
arguments: [
|
|
34240
|
+
{
|
|
34241
|
+
name: "source",
|
|
34242
|
+
required: true
|
|
34243
|
+
}
|
|
34244
|
+
],
|
|
34245
|
+
options: [
|
|
34246
|
+
{
|
|
34247
|
+
...yesOption,
|
|
34248
|
+
description: "Skip the confirmation prompt when removing a redirect"
|
|
34249
|
+
}
|
|
34250
|
+
],
|
|
34251
|
+
examples: [
|
|
34252
|
+
{
|
|
34253
|
+
name: "Remove a redirect",
|
|
34254
|
+
value: `${packageName} redirects remove /old-path`
|
|
34255
|
+
}
|
|
34256
|
+
]
|
|
34257
|
+
};
|
|
34258
|
+
promoteSubcommand = {
|
|
34259
|
+
name: "promote",
|
|
34260
|
+
aliases: [],
|
|
34261
|
+
description: "Promote a staged redirects version to production",
|
|
34262
|
+
arguments: [
|
|
34263
|
+
{
|
|
34264
|
+
name: "version-id",
|
|
34265
|
+
required: true
|
|
34266
|
+
}
|
|
34267
|
+
],
|
|
34268
|
+
options: [
|
|
34269
|
+
{
|
|
34270
|
+
...yesOption,
|
|
34271
|
+
description: "Skip the confirmation prompt when promoting"
|
|
34272
|
+
}
|
|
34273
|
+
],
|
|
34274
|
+
examples: [
|
|
34275
|
+
{
|
|
34276
|
+
name: "Promote a redirect version",
|
|
34277
|
+
value: `${packageName} redirects promote <version-id>`
|
|
34278
|
+
}
|
|
34279
|
+
]
|
|
34280
|
+
};
|
|
34281
|
+
restoreSubcommand = {
|
|
34282
|
+
name: "restore",
|
|
34283
|
+
aliases: [],
|
|
34284
|
+
description: "Restore a previous redirects version",
|
|
34285
|
+
arguments: [
|
|
34286
|
+
{
|
|
34287
|
+
name: "version-id",
|
|
34288
|
+
required: true
|
|
34289
|
+
}
|
|
34290
|
+
],
|
|
34291
|
+
options: [
|
|
34292
|
+
{
|
|
34293
|
+
...yesOption,
|
|
34294
|
+
description: "Skip the confirmation prompt when restoring"
|
|
34295
|
+
}
|
|
34296
|
+
],
|
|
34297
|
+
examples: [
|
|
34298
|
+
{
|
|
34299
|
+
name: "Restore a redirects version",
|
|
34300
|
+
value: `${packageName} redirects restore <version-id>`
|
|
34301
|
+
}
|
|
34302
|
+
]
|
|
34303
|
+
};
|
|
34304
|
+
redirectsCommand = {
|
|
34305
|
+
name: "redirects",
|
|
34306
|
+
aliases: ["redirect"],
|
|
34307
|
+
description: "Manage redirects for a project. Redirects managed at the project level apply to all deployments and environments and take effect immediately after being created and promoted to production.",
|
|
34308
|
+
arguments: [],
|
|
34309
|
+
subcommands: [
|
|
34310
|
+
listSubcommand8,
|
|
34311
|
+
listVersionsSubcommand,
|
|
34312
|
+
addSubcommand7,
|
|
34313
|
+
removeSubcommand9,
|
|
34314
|
+
promoteSubcommand,
|
|
34315
|
+
restoreSubcommand
|
|
34316
|
+
],
|
|
34317
|
+
options: [],
|
|
34318
|
+
examples: []
|
|
34319
|
+
};
|
|
34320
|
+
}
|
|
34321
|
+
});
|
|
34322
|
+
|
|
34128
34323
|
// src/commands/remove/command.ts
|
|
34129
34324
|
var removeCommand;
|
|
34130
|
-
var
|
|
34325
|
+
var init_command33 = __esm({
|
|
34131
34326
|
"src/commands/remove/command.ts"() {
|
|
34132
34327
|
"use strict";
|
|
34133
34328
|
init_pkg_name();
|
|
@@ -34177,7 +34372,7 @@ var init_command32 = __esm({
|
|
|
34177
34372
|
|
|
34178
34373
|
// src/commands/rollback/command.ts
|
|
34179
34374
|
var statusSubcommand3, rollbackCommand;
|
|
34180
|
-
var
|
|
34375
|
+
var init_command34 = __esm({
|
|
34181
34376
|
"src/commands/rollback/command.ts"() {
|
|
34182
34377
|
"use strict";
|
|
34183
34378
|
init_pkg_name();
|
|
@@ -34238,7 +34433,7 @@ var init_command33 = __esm({
|
|
|
34238
34433
|
|
|
34239
34434
|
// src/commands/rolling-release/command.ts
|
|
34240
34435
|
var configureSubcommand, startSubcommand, approveSubcommand, abortSubcommand, completeSubcommand, fetchSubcommand, rollingReleaseCommand;
|
|
34241
|
-
var
|
|
34436
|
+
var init_command35 = __esm({
|
|
34242
34437
|
"src/commands/rolling-release/command.ts"() {
|
|
34243
34438
|
"use strict";
|
|
34244
34439
|
init_arg_common();
|
|
@@ -34431,12 +34626,12 @@ var init_command34 = __esm({
|
|
|
34431
34626
|
});
|
|
34432
34627
|
|
|
34433
34628
|
// src/commands/target/command.ts
|
|
34434
|
-
var
|
|
34435
|
-
var
|
|
34629
|
+
var listSubcommand9, targetCommand;
|
|
34630
|
+
var init_command36 = __esm({
|
|
34436
34631
|
"src/commands/target/command.ts"() {
|
|
34437
34632
|
"use strict";
|
|
34438
34633
|
init_pkg_name();
|
|
34439
|
-
|
|
34634
|
+
listSubcommand9 = {
|
|
34440
34635
|
name: "list",
|
|
34441
34636
|
aliases: ["ls"],
|
|
34442
34637
|
description: "List targets defined for the current Project",
|
|
@@ -34454,7 +34649,7 @@ var init_command35 = __esm({
|
|
|
34454
34649
|
aliases: ["targets"],
|
|
34455
34650
|
description: `Manage your Vercel Project's "targets" (custom environments).`,
|
|
34456
34651
|
arguments: [],
|
|
34457
|
-
subcommands: [
|
|
34652
|
+
subcommands: [listSubcommand9],
|
|
34458
34653
|
options: [],
|
|
34459
34654
|
examples: []
|
|
34460
34655
|
};
|
|
@@ -34462,13 +34657,13 @@ var init_command35 = __esm({
|
|
|
34462
34657
|
});
|
|
34463
34658
|
|
|
34464
34659
|
// src/commands/teams/command.ts
|
|
34465
|
-
var
|
|
34466
|
-
var
|
|
34660
|
+
var addSubcommand8, listSubcommand10, switchSubcommand, inviteSubcommand, teamsCommand;
|
|
34661
|
+
var init_command37 = __esm({
|
|
34467
34662
|
"src/commands/teams/command.ts"() {
|
|
34468
34663
|
"use strict";
|
|
34469
34664
|
init_pkg_name();
|
|
34470
34665
|
init_arg_common();
|
|
34471
|
-
|
|
34666
|
+
addSubcommand8 = {
|
|
34472
34667
|
name: "add",
|
|
34473
34668
|
aliases: ["create"],
|
|
34474
34669
|
description: "Create a new team",
|
|
@@ -34476,7 +34671,7 @@ var init_command36 = __esm({
|
|
|
34476
34671
|
options: [],
|
|
34477
34672
|
examples: []
|
|
34478
34673
|
};
|
|
34479
|
-
|
|
34674
|
+
listSubcommand10 = {
|
|
34480
34675
|
name: "list",
|
|
34481
34676
|
aliases: ["ls"],
|
|
34482
34677
|
description: "Show all teams that you're a member of",
|
|
@@ -34541,9 +34736,9 @@ var init_command36 = __esm({
|
|
|
34541
34736
|
description: "Manage Teams under your Vercel account",
|
|
34542
34737
|
arguments: [],
|
|
34543
34738
|
subcommands: [
|
|
34544
|
-
|
|
34739
|
+
addSubcommand8,
|
|
34545
34740
|
inviteSubcommand,
|
|
34546
|
-
|
|
34741
|
+
listSubcommand10,
|
|
34547
34742
|
switchSubcommand
|
|
34548
34743
|
],
|
|
34549
34744
|
options: [],
|
|
@@ -34554,7 +34749,7 @@ var init_command36 = __esm({
|
|
|
34554
34749
|
|
|
34555
34750
|
// src/commands/telemetry/command.ts
|
|
34556
34751
|
var statusSubcommand4, enableSubcommand2, flushSubcommand, disableSubcommand2, telemetryCommand;
|
|
34557
|
-
var
|
|
34752
|
+
var init_command38 = __esm({
|
|
34558
34753
|
"src/commands/telemetry/command.ts"() {
|
|
34559
34754
|
"use strict";
|
|
34560
34755
|
statusSubcommand4 = {
|
|
@@ -34609,7 +34804,7 @@ var init_command37 = __esm({
|
|
|
34609
34804
|
|
|
34610
34805
|
// src/commands/whoami/command.ts
|
|
34611
34806
|
var whoamiCommand;
|
|
34612
|
-
var
|
|
34807
|
+
var init_command39 = __esm({
|
|
34613
34808
|
"src/commands/whoami/command.ts"() {
|
|
34614
34809
|
"use strict";
|
|
34615
34810
|
init_pkg_name();
|
|
@@ -34630,11 +34825,11 @@ var init_command38 = __esm({
|
|
|
34630
34825
|
});
|
|
34631
34826
|
|
|
34632
34827
|
// src/commands/blob/command.ts
|
|
34633
|
-
var
|
|
34634
|
-
var
|
|
34828
|
+
var listSubcommand11, putSubcommand, delSubcommand, copySubcommand, addStoreSubcommand, removeStoreSubcommand, getStoreSubcommand, storeSubcommand, blobCommand;
|
|
34829
|
+
var init_command40 = __esm({
|
|
34635
34830
|
"src/commands/blob/command.ts"() {
|
|
34636
34831
|
"use strict";
|
|
34637
|
-
|
|
34832
|
+
listSubcommand11 = {
|
|
34638
34833
|
name: "list",
|
|
34639
34834
|
aliases: ["ls"],
|
|
34640
34835
|
description: "List all files in the Blob store",
|
|
@@ -34865,7 +35060,7 @@ var init_command39 = __esm({
|
|
|
34865
35060
|
description: "Interact with Vercel Blob",
|
|
34866
35061
|
arguments: [],
|
|
34867
35062
|
subcommands: [
|
|
34868
|
-
|
|
35063
|
+
listSubcommand11,
|
|
34869
35064
|
putSubcommand,
|
|
34870
35065
|
delSubcommand,
|
|
34871
35066
|
copySubcommand,
|
|
@@ -34933,6 +35128,7 @@ var init_commands = __esm({
|
|
|
34933
35128
|
init_command37();
|
|
34934
35129
|
init_command38();
|
|
34935
35130
|
init_command39();
|
|
35131
|
+
init_command40();
|
|
34936
35132
|
init_output_manager();
|
|
34937
35133
|
commandsStructs = [
|
|
34938
35134
|
aliasCommand,
|
|
@@ -34966,6 +35162,7 @@ var init_commands = __esm({
|
|
|
34966
35162
|
promoteCommand,
|
|
34967
35163
|
pullCommand,
|
|
34968
35164
|
redeployCommand,
|
|
35165
|
+
redirectsCommand,
|
|
34969
35166
|
removeCommand,
|
|
34970
35167
|
rollbackCommand,
|
|
34971
35168
|
rollingReleaseCommand,
|
|
@@ -36252,14 +36449,14 @@ var require_templates3 = __commonJS2({
|
|
|
36252
36449
|
}
|
|
36253
36450
|
return results;
|
|
36254
36451
|
}
|
|
36255
|
-
function buildStyle(
|
|
36452
|
+
function buildStyle(chalk137, styles) {
|
|
36256
36453
|
const enabled = {};
|
|
36257
36454
|
for (const layer of styles) {
|
|
36258
36455
|
for (const style of layer.styles) {
|
|
36259
36456
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
36260
36457
|
}
|
|
36261
36458
|
}
|
|
36262
|
-
let current =
|
|
36459
|
+
let current = chalk137;
|
|
36263
36460
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
36264
36461
|
if (!Array.isArray(styles2)) {
|
|
36265
36462
|
continue;
|
|
@@ -36271,7 +36468,7 @@ var require_templates3 = __commonJS2({
|
|
|
36271
36468
|
}
|
|
36272
36469
|
return current;
|
|
36273
36470
|
}
|
|
36274
|
-
module2.exports = (
|
|
36471
|
+
module2.exports = (chalk137, temporary) => {
|
|
36275
36472
|
const styles = [];
|
|
36276
36473
|
const chunks = [];
|
|
36277
36474
|
let chunk = [];
|
|
@@ -36281,13 +36478,13 @@ var require_templates3 = __commonJS2({
|
|
|
36281
36478
|
} else if (style) {
|
|
36282
36479
|
const string = chunk.join("");
|
|
36283
36480
|
chunk = [];
|
|
36284
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
36481
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk137, styles)(string));
|
|
36285
36482
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
36286
36483
|
} else if (close2) {
|
|
36287
36484
|
if (styles.length === 0) {
|
|
36288
36485
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
36289
36486
|
}
|
|
36290
|
-
chunks.push(buildStyle(
|
|
36487
|
+
chunks.push(buildStyle(chalk137, styles)(chunk.join("")));
|
|
36291
36488
|
chunk = [];
|
|
36292
36489
|
styles.pop();
|
|
36293
36490
|
} else {
|
|
@@ -36335,16 +36532,16 @@ var require_source2 = __commonJS2({
|
|
|
36335
36532
|
}
|
|
36336
36533
|
};
|
|
36337
36534
|
var chalkFactory = (options) => {
|
|
36338
|
-
const
|
|
36339
|
-
applyOptions(
|
|
36340
|
-
|
|
36341
|
-
Object.setPrototypeOf(
|
|
36342
|
-
Object.setPrototypeOf(
|
|
36343
|
-
|
|
36535
|
+
const chalk138 = {};
|
|
36536
|
+
applyOptions(chalk138, options);
|
|
36537
|
+
chalk138.template = (...arguments_) => chalkTag(chalk138.template, ...arguments_);
|
|
36538
|
+
Object.setPrototypeOf(chalk138, Chalk.prototype);
|
|
36539
|
+
Object.setPrototypeOf(chalk138.template, chalk138);
|
|
36540
|
+
chalk138.template.constructor = () => {
|
|
36344
36541
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
36345
36542
|
};
|
|
36346
|
-
|
|
36347
|
-
return
|
|
36543
|
+
chalk138.template.Instance = ChalkClass;
|
|
36544
|
+
return chalk138.template;
|
|
36348
36545
|
};
|
|
36349
36546
|
function Chalk(options) {
|
|
36350
36547
|
return chalkFactory(options);
|
|
@@ -36455,7 +36652,7 @@ var require_source2 = __commonJS2({
|
|
|
36455
36652
|
return openAll + string + closeAll;
|
|
36456
36653
|
};
|
|
36457
36654
|
var template;
|
|
36458
|
-
var chalkTag = (
|
|
36655
|
+
var chalkTag = (chalk138, ...strings) => {
|
|
36459
36656
|
const [firstString] = strings;
|
|
36460
36657
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
36461
36658
|
return strings.join(" ");
|
|
@@ -36471,14 +36668,14 @@ var require_source2 = __commonJS2({
|
|
|
36471
36668
|
if (template === void 0) {
|
|
36472
36669
|
template = require_templates3();
|
|
36473
36670
|
}
|
|
36474
|
-
return template(
|
|
36671
|
+
return template(chalk138, parts.join(""));
|
|
36475
36672
|
};
|
|
36476
36673
|
Object.defineProperties(Chalk.prototype, styles);
|
|
36477
|
-
var
|
|
36478
|
-
|
|
36479
|
-
|
|
36480
|
-
|
|
36481
|
-
module2.exports =
|
|
36674
|
+
var chalk137 = Chalk();
|
|
36675
|
+
chalk137.supportsColor = stdoutColor;
|
|
36676
|
+
chalk137.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
36677
|
+
chalk137.stderr.supportsColor = stderrColor;
|
|
36678
|
+
module2.exports = chalk137;
|
|
36482
36679
|
}
|
|
36483
36680
|
});
|
|
36484
36681
|
|
|
@@ -37233,15 +37430,15 @@ var init_mjs = __esm({
|
|
|
37233
37430
|
this.listeners[ev].push(fn2);
|
|
37234
37431
|
}
|
|
37235
37432
|
removeListener(ev, fn2) {
|
|
37236
|
-
const
|
|
37237
|
-
const i =
|
|
37433
|
+
const list10 = this.listeners[ev];
|
|
37434
|
+
const i = list10.indexOf(fn2);
|
|
37238
37435
|
if (i === -1) {
|
|
37239
37436
|
return;
|
|
37240
37437
|
}
|
|
37241
|
-
if (i === 0 &&
|
|
37242
|
-
|
|
37438
|
+
if (i === 0 && list10.length === 1) {
|
|
37439
|
+
list10.length = 0;
|
|
37243
37440
|
} else {
|
|
37244
|
-
|
|
37441
|
+
list10.splice(i, 1);
|
|
37245
37442
|
}
|
|
37246
37443
|
}
|
|
37247
37444
|
emit(ev, code2, signal) {
|
|
@@ -37957,7 +38154,7 @@ var require_figures = __commonJS2({
|
|
|
37957
38154
|
"use strict";
|
|
37958
38155
|
var escapeStringRegexp = require_escape_string_regexp();
|
|
37959
38156
|
var { platform } = process;
|
|
37960
|
-
var
|
|
38157
|
+
var main19 = {
|
|
37961
38158
|
tick: "\u2714",
|
|
37962
38159
|
cross: "\u2716",
|
|
37963
38160
|
star: "\u2605",
|
|
@@ -38043,12 +38240,12 @@ var require_figures = __commonJS2({
|
|
|
38043
38240
|
hamburger: "\u2261",
|
|
38044
38241
|
smiley: "\u263A",
|
|
38045
38242
|
mustache: "\u250C\u2500\u2510",
|
|
38046
|
-
heart:
|
|
38243
|
+
heart: main19.heart,
|
|
38047
38244
|
nodejs: "\u2666",
|
|
38048
|
-
arrowUp:
|
|
38049
|
-
arrowDown:
|
|
38050
|
-
arrowLeft:
|
|
38051
|
-
arrowRight:
|
|
38245
|
+
arrowUp: main19.arrowUp,
|
|
38246
|
+
arrowDown: main19.arrowDown,
|
|
38247
|
+
arrowLeft: main19.arrowLeft,
|
|
38248
|
+
arrowRight: main19.arrowRight,
|
|
38052
38249
|
radioOn: "(*)",
|
|
38053
38250
|
radioOff: "( )",
|
|
38054
38251
|
checkboxOn: "[\xD7]",
|
|
@@ -38076,14 +38273,14 @@ var require_figures = __commonJS2({
|
|
|
38076
38273
|
sevenEighths: "7/8"
|
|
38077
38274
|
};
|
|
38078
38275
|
if (platform === "linux") {
|
|
38079
|
-
|
|
38276
|
+
main19.questionMarkPrefix = "?";
|
|
38080
38277
|
}
|
|
38081
|
-
var figures4 = platform === "win32" ? windows :
|
|
38278
|
+
var figures4 = platform === "win32" ? windows : main19;
|
|
38082
38279
|
var fn2 = (string) => {
|
|
38083
|
-
if (figures4 ===
|
|
38280
|
+
if (figures4 === main19) {
|
|
38084
38281
|
return string;
|
|
38085
38282
|
}
|
|
38086
|
-
for (const [key, value] of Object.entries(
|
|
38283
|
+
for (const [key, value] of Object.entries(main19)) {
|
|
38087
38284
|
if (value === figures4[key]) {
|
|
38088
38285
|
continue;
|
|
38089
38286
|
}
|
|
@@ -38092,7 +38289,7 @@ var require_figures = __commonJS2({
|
|
|
38092
38289
|
return string;
|
|
38093
38290
|
};
|
|
38094
38291
|
module2.exports = Object.assign(fn2, figures4);
|
|
38095
|
-
module2.exports.main =
|
|
38292
|
+
module2.exports.main = main19;
|
|
38096
38293
|
module2.exports.windows = windows;
|
|
38097
38294
|
}
|
|
38098
38295
|
});
|
|
@@ -46945,7 +47142,7 @@ var require_write_json_file = __commonJS2({
|
|
|
46945
47142
|
};
|
|
46946
47143
|
var readFile6 = (fp) => pify(fs15.readFile)(fp, "utf8").catch(() => {
|
|
46947
47144
|
});
|
|
46948
|
-
var
|
|
47145
|
+
var main19 = (fp, data, opts) => {
|
|
46949
47146
|
return (opts.detectIndent ? readFile6(fp) : Promise.resolve()).then((str) => {
|
|
46950
47147
|
const indent = str ? detectIndent(str).indent : opts.indent;
|
|
46951
47148
|
const json = JSON.stringify(data, opts.replacer, indent);
|
|
@@ -46970,7 +47167,7 @@ var require_write_json_file = __commonJS2({
|
|
|
46970
47167
|
`, { mode: opts.mode });
|
|
46971
47168
|
};
|
|
46972
47169
|
module2.exports = (fp, data, opts) => {
|
|
46973
|
-
return makeDir(path11.dirname(fp), { fs: fs15 }).then(() => init3(
|
|
47170
|
+
return makeDir(path11.dirname(fp), { fs: fs15 }).then(() => init3(main19, fp, data, opts));
|
|
46974
47171
|
};
|
|
46975
47172
|
module2.exports.sync = (fp, data, opts) => {
|
|
46976
47173
|
makeDir.sync(path11.dirname(fp), { fs: fs15 });
|
|
@@ -48185,7 +48382,7 @@ var require_empty2 = __commonJS2({
|
|
|
48185
48382
|
var fs15 = require("fs");
|
|
48186
48383
|
var path11 = require("path");
|
|
48187
48384
|
var mkdir4 = require_mkdirs3();
|
|
48188
|
-
var
|
|
48385
|
+
var remove7 = require_remove2();
|
|
48189
48386
|
var emptyDir = u(function emptyDir2(dir, callback) {
|
|
48190
48387
|
callback = callback || function() {
|
|
48191
48388
|
};
|
|
@@ -48198,7 +48395,7 @@ var require_empty2 = __commonJS2({
|
|
|
48198
48395
|
const item = items.pop();
|
|
48199
48396
|
if (!item)
|
|
48200
48397
|
return callback();
|
|
48201
|
-
|
|
48398
|
+
remove7.remove(item, (err2) => {
|
|
48202
48399
|
if (err2)
|
|
48203
48400
|
return callback(err2);
|
|
48204
48401
|
deleteItem();
|
|
@@ -48215,7 +48412,7 @@ var require_empty2 = __commonJS2({
|
|
|
48215
48412
|
}
|
|
48216
48413
|
items.forEach((item) => {
|
|
48217
48414
|
item = path11.join(dir, item);
|
|
48218
|
-
|
|
48415
|
+
remove7.removeSync(item);
|
|
48219
48416
|
});
|
|
48220
48417
|
}
|
|
48221
48418
|
module2.exports = {
|
|
@@ -48826,7 +49023,7 @@ var require_move3 = __commonJS2({
|
|
|
48826
49023
|
var fs15 = require("fs");
|
|
48827
49024
|
var path11 = require("path");
|
|
48828
49025
|
var copy3 = require_copy4().copy;
|
|
48829
|
-
var
|
|
49026
|
+
var remove7 = require_remove2().remove;
|
|
48830
49027
|
var mkdirp4 = require_mkdirs3().mkdirp;
|
|
48831
49028
|
var pathExists = require_path_exists2().pathExists;
|
|
48832
49029
|
var stat2 = require_stat2();
|
|
@@ -48853,7 +49050,7 @@ var require_move3 = __commonJS2({
|
|
|
48853
49050
|
}
|
|
48854
49051
|
function doRename(src, dest, overwrite, cb) {
|
|
48855
49052
|
if (overwrite) {
|
|
48856
|
-
return
|
|
49053
|
+
return remove7(dest, (err) => {
|
|
48857
49054
|
if (err)
|
|
48858
49055
|
return cb(err);
|
|
48859
49056
|
return rename(src, dest, overwrite, cb);
|
|
@@ -48884,7 +49081,7 @@ var require_move3 = __commonJS2({
|
|
|
48884
49081
|
copy3(src, dest, opts, (err) => {
|
|
48885
49082
|
if (err)
|
|
48886
49083
|
return cb(err);
|
|
48887
|
-
return
|
|
49084
|
+
return remove7(src, cb);
|
|
48888
49085
|
});
|
|
48889
49086
|
}
|
|
48890
49087
|
module2.exports = move3;
|
|
@@ -50130,7 +50327,7 @@ var require_minimatch = __commonJS2({
|
|
|
50130
50327
|
var reSpecials = charSet("().*{}+?[]^$\\!");
|
|
50131
50328
|
var addPatternStartSet = charSet("[.(");
|
|
50132
50329
|
var slashSplit = /\/+/;
|
|
50133
|
-
minimatch5.filter = (pattern, options = {}) => (p, i,
|
|
50330
|
+
minimatch5.filter = (pattern, options = {}) => (p, i, list10) => minimatch5(p, pattern, options);
|
|
50134
50331
|
var ext = (a, b = {}) => {
|
|
50135
50332
|
const t = {};
|
|
50136
50333
|
Object.keys(a).forEach((k) => t[k] = a[k]);
|
|
@@ -50153,7 +50350,7 @@ var require_minimatch = __commonJS2({
|
|
|
50153
50350
|
m.defaults = (options) => orig.defaults(ext(def, options));
|
|
50154
50351
|
m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options));
|
|
50155
50352
|
m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options));
|
|
50156
|
-
m.match = (
|
|
50353
|
+
m.match = (list10, pattern, options) => orig.match(list10, pattern, ext(def, options));
|
|
50157
50354
|
return m;
|
|
50158
50355
|
};
|
|
50159
50356
|
minimatch5.braceExpand = (pattern, options) => braceExpand(pattern, options);
|
|
@@ -50175,13 +50372,13 @@ var require_minimatch = __commonJS2({
|
|
|
50175
50372
|
};
|
|
50176
50373
|
var SUBPARSE = Symbol("subparse");
|
|
50177
50374
|
minimatch5.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe();
|
|
50178
|
-
minimatch5.match = (
|
|
50375
|
+
minimatch5.match = (list10, pattern, options = {}) => {
|
|
50179
50376
|
const mm = new Minimatch(pattern, options);
|
|
50180
|
-
|
|
50181
|
-
if (mm.options.nonull && !
|
|
50182
|
-
|
|
50377
|
+
list10 = list10.filter((f) => mm.match(f));
|
|
50378
|
+
if (mm.options.nonull && !list10.length) {
|
|
50379
|
+
list10.push(pattern);
|
|
50183
50380
|
}
|
|
50184
|
-
return
|
|
50381
|
+
return list10;
|
|
50185
50382
|
};
|
|
50186
50383
|
var globUnescape = (s) => s.replace(/\\(.)/g, "$1");
|
|
50187
50384
|
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
@@ -50693,7 +50890,7 @@ var require_readdir_recursive = __commonJS2({
|
|
|
50693
50890
|
}
|
|
50694
50891
|
function readdir2(path11, ignores) {
|
|
50695
50892
|
ignores = ignores.map(toMatcherFunction);
|
|
50696
|
-
let
|
|
50893
|
+
let list10 = [];
|
|
50697
50894
|
return new Promise(function(resolve13, reject) {
|
|
50698
50895
|
import_fs9.default.readdir(path11, function(err, files) {
|
|
50699
50896
|
if (err) {
|
|
@@ -50701,7 +50898,7 @@ var require_readdir_recursive = __commonJS2({
|
|
|
50701
50898
|
}
|
|
50702
50899
|
let pending = files.length;
|
|
50703
50900
|
if (!pending) {
|
|
50704
|
-
return resolve13(
|
|
50901
|
+
return resolve13(list10);
|
|
50705
50902
|
}
|
|
50706
50903
|
files.forEach(function(file) {
|
|
50707
50904
|
const filePath = import_path42.default.join(path11, file);
|
|
@@ -50713,26 +50910,26 @@ var require_readdir_recursive = __commonJS2({
|
|
|
50713
50910
|
if (matches) {
|
|
50714
50911
|
pending -= 1;
|
|
50715
50912
|
if (!pending) {
|
|
50716
|
-
return resolve13(
|
|
50913
|
+
return resolve13(list10);
|
|
50717
50914
|
}
|
|
50718
50915
|
return null;
|
|
50719
50916
|
}
|
|
50720
50917
|
if (stats.isDirectory()) {
|
|
50721
50918
|
readdir2(filePath, ignores).then(function(res) {
|
|
50722
50919
|
if (res.length === 0) {
|
|
50723
|
-
|
|
50920
|
+
list10.push(filePath);
|
|
50724
50921
|
}
|
|
50725
|
-
|
|
50922
|
+
list10 = list10.concat(res);
|
|
50726
50923
|
pending -= 1;
|
|
50727
50924
|
if (!pending) {
|
|
50728
|
-
return resolve13(
|
|
50925
|
+
return resolve13(list10);
|
|
50729
50926
|
}
|
|
50730
50927
|
}).catch(reject);
|
|
50731
50928
|
} else {
|
|
50732
|
-
|
|
50929
|
+
list10.push(filePath);
|
|
50733
50930
|
pending -= 1;
|
|
50734
50931
|
if (!pending) {
|
|
50735
|
-
return resolve13(
|
|
50932
|
+
return resolve13(list10);
|
|
50736
50933
|
}
|
|
50737
50934
|
}
|
|
50738
50935
|
});
|
|
@@ -55347,9 +55544,9 @@ var require_micromatch = __commonJS2({
|
|
|
55347
55544
|
const index = v.indexOf("{");
|
|
55348
55545
|
return index > -1 && v.indexOf("}", index) > -1;
|
|
55349
55546
|
};
|
|
55350
|
-
var micromatch = (
|
|
55547
|
+
var micromatch = (list10, patterns, options) => {
|
|
55351
55548
|
patterns = [].concat(patterns);
|
|
55352
|
-
|
|
55549
|
+
list10 = [].concat(list10);
|
|
55353
55550
|
let omit = /* @__PURE__ */ new Set();
|
|
55354
55551
|
let keep = /* @__PURE__ */ new Set();
|
|
55355
55552
|
let items = /* @__PURE__ */ new Set();
|
|
@@ -55365,7 +55562,7 @@ var require_micromatch = __commonJS2({
|
|
|
55365
55562
|
let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
55366
55563
|
if (negated)
|
|
55367
55564
|
negatives++;
|
|
55368
|
-
for (let item of
|
|
55565
|
+
for (let item of list10) {
|
|
55369
55566
|
let matched = isMatch(item, true);
|
|
55370
55567
|
let match = negated ? !matched.isMatch : matched.isMatch;
|
|
55371
55568
|
if (!match)
|
|
@@ -55394,7 +55591,7 @@ var require_micromatch = __commonJS2({
|
|
|
55394
55591
|
micromatch.matcher = (pattern, options) => picomatch(pattern, options);
|
|
55395
55592
|
micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
55396
55593
|
micromatch.any = micromatch.isMatch;
|
|
55397
|
-
micromatch.not = (
|
|
55594
|
+
micromatch.not = (list10, patterns, options = {}) => {
|
|
55398
55595
|
patterns = [].concat(patterns).map(String);
|
|
55399
55596
|
let result = /* @__PURE__ */ new Set();
|
|
55400
55597
|
let items = [];
|
|
@@ -55403,7 +55600,7 @@ var require_micromatch = __commonJS2({
|
|
|
55403
55600
|
options.onResult(state);
|
|
55404
55601
|
items.push(state.output);
|
|
55405
55602
|
};
|
|
55406
|
-
let matches = new Set(micromatch(
|
|
55603
|
+
let matches = new Set(micromatch(list10, patterns, { ...options, onResult }));
|
|
55407
55604
|
for (let item of items) {
|
|
55408
55605
|
if (!matches.has(item)) {
|
|
55409
55606
|
result.add(item);
|
|
@@ -55438,8 +55635,8 @@ var require_micromatch = __commonJS2({
|
|
|
55438
55635
|
res[key] = obj[key];
|
|
55439
55636
|
return res;
|
|
55440
55637
|
};
|
|
55441
|
-
micromatch.some = (
|
|
55442
|
-
let items = [].concat(
|
|
55638
|
+
micromatch.some = (list10, patterns, options) => {
|
|
55639
|
+
let items = [].concat(list10);
|
|
55443
55640
|
for (let pattern of [].concat(patterns)) {
|
|
55444
55641
|
let isMatch = picomatch(String(pattern), options);
|
|
55445
55642
|
if (items.some((item) => isMatch(item))) {
|
|
@@ -55448,8 +55645,8 @@ var require_micromatch = __commonJS2({
|
|
|
55448
55645
|
}
|
|
55449
55646
|
return false;
|
|
55450
55647
|
};
|
|
55451
|
-
micromatch.every = (
|
|
55452
|
-
let items = [].concat(
|
|
55648
|
+
micromatch.every = (list10, patterns, options) => {
|
|
55649
|
+
let items = [].concat(list10);
|
|
55453
55650
|
for (let pattern of [].concat(patterns)) {
|
|
55454
55651
|
let isMatch = picomatch(String(pattern), options);
|
|
55455
55652
|
if (!items.every((item) => isMatch(item))) {
|
|
@@ -58737,41 +58934,41 @@ var require_ms = __commonJS2({
|
|
|
58737
58934
|
return void 0;
|
|
58738
58935
|
}
|
|
58739
58936
|
}
|
|
58740
|
-
function fmtShort(
|
|
58741
|
-
var msAbs = Math.abs(
|
|
58937
|
+
function fmtShort(ms33) {
|
|
58938
|
+
var msAbs = Math.abs(ms33);
|
|
58742
58939
|
if (msAbs >= d) {
|
|
58743
|
-
return Math.round(
|
|
58940
|
+
return Math.round(ms33 / d) + "d";
|
|
58744
58941
|
}
|
|
58745
58942
|
if (msAbs >= h) {
|
|
58746
|
-
return Math.round(
|
|
58943
|
+
return Math.round(ms33 / h) + "h";
|
|
58747
58944
|
}
|
|
58748
58945
|
if (msAbs >= m) {
|
|
58749
|
-
return Math.round(
|
|
58946
|
+
return Math.round(ms33 / m) + "m";
|
|
58750
58947
|
}
|
|
58751
58948
|
if (msAbs >= s) {
|
|
58752
|
-
return Math.round(
|
|
58949
|
+
return Math.round(ms33 / s) + "s";
|
|
58753
58950
|
}
|
|
58754
|
-
return
|
|
58951
|
+
return ms33 + "ms";
|
|
58755
58952
|
}
|
|
58756
|
-
function fmtLong(
|
|
58757
|
-
var msAbs = Math.abs(
|
|
58953
|
+
function fmtLong(ms33) {
|
|
58954
|
+
var msAbs = Math.abs(ms33);
|
|
58758
58955
|
if (msAbs >= d) {
|
|
58759
|
-
return
|
|
58956
|
+
return plural15(ms33, msAbs, d, "day");
|
|
58760
58957
|
}
|
|
58761
58958
|
if (msAbs >= h) {
|
|
58762
|
-
return
|
|
58959
|
+
return plural15(ms33, msAbs, h, "hour");
|
|
58763
58960
|
}
|
|
58764
58961
|
if (msAbs >= m) {
|
|
58765
|
-
return
|
|
58962
|
+
return plural15(ms33, msAbs, m, "minute");
|
|
58766
58963
|
}
|
|
58767
58964
|
if (msAbs >= s) {
|
|
58768
|
-
return
|
|
58965
|
+
return plural15(ms33, msAbs, s, "second");
|
|
58769
58966
|
}
|
|
58770
|
-
return
|
|
58967
|
+
return ms33 + " ms";
|
|
58771
58968
|
}
|
|
58772
|
-
function
|
|
58969
|
+
function plural15(ms33, msAbs, n, name) {
|
|
58773
58970
|
var isPlural = msAbs >= n * 1.5;
|
|
58774
|
-
return Math.round(
|
|
58971
|
+
return Math.round(ms33 / n) + " " + name + (isPlural ? "s" : "");
|
|
58775
58972
|
}
|
|
58776
58973
|
}
|
|
58777
58974
|
});
|
|
@@ -58812,18 +59009,18 @@ var require_get_polling_delay = __commonJS2({
|
|
|
58812
59009
|
getPollingDelay: () => getPollingDelay
|
|
58813
59010
|
});
|
|
58814
59011
|
module2.exports = __toCommonJS4(get_polling_delay_exports);
|
|
58815
|
-
var
|
|
59012
|
+
var import_ms33 = __toESM4(require_ms());
|
|
58816
59013
|
function getPollingDelay(elapsed2) {
|
|
58817
|
-
if (elapsed2 <= (0,
|
|
58818
|
-
return (0,
|
|
59014
|
+
if (elapsed2 <= (0, import_ms33.default)("15s")) {
|
|
59015
|
+
return (0, import_ms33.default)("1s");
|
|
58819
59016
|
}
|
|
58820
|
-
if (elapsed2 <= (0,
|
|
58821
|
-
return (0,
|
|
59017
|
+
if (elapsed2 <= (0, import_ms33.default)("1m")) {
|
|
59018
|
+
return (0, import_ms33.default)("5s");
|
|
58822
59019
|
}
|
|
58823
|
-
if (elapsed2 <= (0,
|
|
58824
|
-
return (0,
|
|
59020
|
+
if (elapsed2 <= (0, import_ms33.default)("5m")) {
|
|
59021
|
+
return (0, import_ms33.default)("15s");
|
|
58825
59022
|
}
|
|
58826
|
-
return (0,
|
|
59023
|
+
return (0, import_ms33.default)("30s");
|
|
58827
59024
|
}
|
|
58828
59025
|
}
|
|
58829
59026
|
});
|
|
@@ -61420,20 +61617,20 @@ var require_stream_readable = __commonJS2({
|
|
|
61420
61617
|
}
|
|
61421
61618
|
return ret;
|
|
61422
61619
|
}
|
|
61423
|
-
function fromListPartial(n,
|
|
61620
|
+
function fromListPartial(n, list10, hasStrings) {
|
|
61424
61621
|
var ret;
|
|
61425
|
-
if (n <
|
|
61426
|
-
ret =
|
|
61427
|
-
|
|
61428
|
-
} else if (n ===
|
|
61429
|
-
ret =
|
|
61622
|
+
if (n < list10.head.data.length) {
|
|
61623
|
+
ret = list10.head.data.slice(0, n);
|
|
61624
|
+
list10.head.data = list10.head.data.slice(n);
|
|
61625
|
+
} else if (n === list10.head.data.length) {
|
|
61626
|
+
ret = list10.shift();
|
|
61430
61627
|
} else {
|
|
61431
|
-
ret = hasStrings ? copyFromBufferString(n,
|
|
61628
|
+
ret = hasStrings ? copyFromBufferString(n, list10) : copyFromBuffer(n, list10);
|
|
61432
61629
|
}
|
|
61433
61630
|
return ret;
|
|
61434
61631
|
}
|
|
61435
|
-
function copyFromBufferString(n,
|
|
61436
|
-
var p =
|
|
61632
|
+
function copyFromBufferString(n, list10) {
|
|
61633
|
+
var p = list10.head;
|
|
61437
61634
|
var c = 1;
|
|
61438
61635
|
var ret = p.data;
|
|
61439
61636
|
n -= ret.length;
|
|
@@ -61449,23 +61646,23 @@ var require_stream_readable = __commonJS2({
|
|
|
61449
61646
|
if (nb === str.length) {
|
|
61450
61647
|
++c;
|
|
61451
61648
|
if (p.next)
|
|
61452
|
-
|
|
61649
|
+
list10.head = p.next;
|
|
61453
61650
|
else
|
|
61454
|
-
|
|
61651
|
+
list10.head = list10.tail = null;
|
|
61455
61652
|
} else {
|
|
61456
|
-
|
|
61653
|
+
list10.head = p;
|
|
61457
61654
|
p.data = str.slice(nb);
|
|
61458
61655
|
}
|
|
61459
61656
|
break;
|
|
61460
61657
|
}
|
|
61461
61658
|
++c;
|
|
61462
61659
|
}
|
|
61463
|
-
|
|
61660
|
+
list10.length -= c;
|
|
61464
61661
|
return ret;
|
|
61465
61662
|
}
|
|
61466
|
-
function copyFromBuffer(n,
|
|
61663
|
+
function copyFromBuffer(n, list10) {
|
|
61467
61664
|
var ret = Buffer2.allocUnsafe(n);
|
|
61468
|
-
var p =
|
|
61665
|
+
var p = list10.head;
|
|
61469
61666
|
var c = 1;
|
|
61470
61667
|
p.data.copy(ret);
|
|
61471
61668
|
n -= p.data.length;
|
|
@@ -61478,18 +61675,18 @@ var require_stream_readable = __commonJS2({
|
|
|
61478
61675
|
if (nb === buf.length) {
|
|
61479
61676
|
++c;
|
|
61480
61677
|
if (p.next)
|
|
61481
|
-
|
|
61678
|
+
list10.head = p.next;
|
|
61482
61679
|
else
|
|
61483
|
-
|
|
61680
|
+
list10.head = list10.tail = null;
|
|
61484
61681
|
} else {
|
|
61485
|
-
|
|
61682
|
+
list10.head = p;
|
|
61486
61683
|
p.data = buf.slice(nb);
|
|
61487
61684
|
}
|
|
61488
61685
|
break;
|
|
61489
61686
|
}
|
|
61490
61687
|
++c;
|
|
61491
61688
|
}
|
|
61492
|
-
|
|
61689
|
+
list10.length -= c;
|
|
61493
61690
|
return ret;
|
|
61494
61691
|
}
|
|
61495
61692
|
function endReadable(stream) {
|
|
@@ -63366,8 +63563,8 @@ var require_tar_fs = __commonJS2({
|
|
|
63366
63563
|
onnextentry();
|
|
63367
63564
|
return pack;
|
|
63368
63565
|
};
|
|
63369
|
-
var head = function(
|
|
63370
|
-
return
|
|
63566
|
+
var head = function(list10) {
|
|
63567
|
+
return list10.length ? list10[list10.length - 1] : null;
|
|
63371
63568
|
};
|
|
63372
63569
|
var processGetuid = function() {
|
|
63373
63570
|
return process.getuid ? process.getuid() : -1;
|
|
@@ -70336,11 +70533,11 @@ var require_pluralize = __commonJS2({
|
|
|
70336
70533
|
pluralize2.addPluralRule(word, "$0");
|
|
70337
70534
|
pluralize2.addSingularRule(word, "$0");
|
|
70338
70535
|
};
|
|
70339
|
-
pluralize2.addIrregularRule = function(single,
|
|
70340
|
-
|
|
70536
|
+
pluralize2.addIrregularRule = function(single, plural15) {
|
|
70537
|
+
plural15 = plural15.toLowerCase();
|
|
70341
70538
|
single = single.toLowerCase();
|
|
70342
|
-
irregularSingles[single] =
|
|
70343
|
-
irregularPlurals[
|
|
70539
|
+
irregularSingles[single] = plural15;
|
|
70540
|
+
irregularPlurals[plural15] = single;
|
|
70344
70541
|
};
|
|
70345
70542
|
[
|
|
70346
70543
|
// Pronouns.
|
|
@@ -71786,7 +71983,7 @@ var require_ini = __commonJS2({
|
|
|
71786
71983
|
p[key] = value;
|
|
71787
71984
|
}
|
|
71788
71985
|
}
|
|
71789
|
-
const
|
|
71986
|
+
const remove7 = [];
|
|
71790
71987
|
for (const k of Object.keys(out)) {
|
|
71791
71988
|
if (!hasOwnProperty3.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) {
|
|
71792
71989
|
continue;
|
|
@@ -71808,9 +72005,9 @@ var require_ini = __commonJS2({
|
|
|
71808
72005
|
continue;
|
|
71809
72006
|
}
|
|
71810
72007
|
p[nl] = out[k];
|
|
71811
|
-
|
|
72008
|
+
remove7.push(k);
|
|
71812
72009
|
}
|
|
71813
|
-
for (const del3 of
|
|
72010
|
+
for (const del3 of remove7) {
|
|
71814
72011
|
delete out[del3];
|
|
71815
72012
|
}
|
|
71816
72013
|
return out;
|
|
@@ -80894,7 +81091,7 @@ var require_minimatch2 = __commonJS2({
|
|
|
80894
81091
|
minimatch5.filter = filter;
|
|
80895
81092
|
function filter(pattern, options) {
|
|
80896
81093
|
options = options || {};
|
|
80897
|
-
return function(p, i,
|
|
81094
|
+
return function(p, i, list10) {
|
|
80898
81095
|
return minimatch5(p, pattern, options);
|
|
80899
81096
|
};
|
|
80900
81097
|
}
|
|
@@ -80935,8 +81132,8 @@ var require_minimatch2 = __commonJS2({
|
|
|
80935
81132
|
m.braceExpand = function braceExpand2(pattern, options) {
|
|
80936
81133
|
return orig.braceExpand(pattern, ext(def, options));
|
|
80937
81134
|
};
|
|
80938
|
-
m.match = function(
|
|
80939
|
-
return orig.match(
|
|
81135
|
+
m.match = function(list10, pattern, options) {
|
|
81136
|
+
return orig.match(list10, pattern, ext(def, options));
|
|
80940
81137
|
};
|
|
80941
81138
|
return m;
|
|
80942
81139
|
};
|
|
@@ -81316,16 +81513,16 @@ var require_minimatch2 = __commonJS2({
|
|
|
81316
81513
|
}
|
|
81317
81514
|
return this.regexp;
|
|
81318
81515
|
}
|
|
81319
|
-
minimatch5.match = function(
|
|
81516
|
+
minimatch5.match = function(list10, pattern, options) {
|
|
81320
81517
|
options = options || {};
|
|
81321
81518
|
var mm = new Minimatch(pattern, options);
|
|
81322
|
-
|
|
81519
|
+
list10 = list10.filter(function(f) {
|
|
81323
81520
|
return mm.match(f);
|
|
81324
81521
|
});
|
|
81325
|
-
if (mm.options.nonull && !
|
|
81326
|
-
|
|
81522
|
+
if (mm.options.nonull && !list10.length) {
|
|
81523
|
+
list10.push(pattern);
|
|
81327
81524
|
}
|
|
81328
|
-
return
|
|
81525
|
+
return list10;
|
|
81329
81526
|
};
|
|
81330
81527
|
Minimatch.prototype.match = function match(f, partial) {
|
|
81331
81528
|
if (typeof partial === "undefined")
|
|
@@ -81912,14 +82109,14 @@ var require_semver2 = __commonJS2({
|
|
|
81912
82109
|
return compare(b, a, loose);
|
|
81913
82110
|
}
|
|
81914
82111
|
exports2.sort = sort;
|
|
81915
|
-
function sort(
|
|
81916
|
-
return
|
|
82112
|
+
function sort(list10, loose) {
|
|
82113
|
+
return list10.sort(function(a, b) {
|
|
81917
82114
|
return exports2.compareBuild(a, b, loose);
|
|
81918
82115
|
});
|
|
81919
82116
|
}
|
|
81920
82117
|
exports2.rsort = rsort;
|
|
81921
|
-
function rsort(
|
|
81922
|
-
return
|
|
82118
|
+
function rsort(list10, loose) {
|
|
82119
|
+
return list10.sort(function(a, b) {
|
|
81923
82120
|
return exports2.compareBuild(b, a, loose);
|
|
81924
82121
|
});
|
|
81925
82122
|
}
|
|
@@ -83485,7 +83682,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
83485
83682
|
});
|
|
83486
83683
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
|
83487
83684
|
var import_semver4 = __toESM4(require_semver2());
|
|
83488
|
-
var
|
|
83685
|
+
var import__106 = require_dist8();
|
|
83489
83686
|
async function detectFileSystemAPI2({
|
|
83490
83687
|
files,
|
|
83491
83688
|
projectSettings,
|
|
@@ -83551,7 +83748,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
83551
83748
|
};
|
|
83552
83749
|
}
|
|
83553
83750
|
const invalidBuilder = builders.find(({ use }) => {
|
|
83554
|
-
const valid = (0,
|
|
83751
|
+
const valid = (0, import__106.isOfficialRuntime)("go", use) || (0, import__106.isOfficialRuntime)("python", use) || (0, import__106.isOfficialRuntime)("ruby", use) || (0, import__106.isOfficialRuntime)("node", use) || (0, import__106.isOfficialRuntime)("next", use) || (0, import__106.isOfficialRuntime)("static", use) || (0, import__106.isOfficialRuntime)("static-build", use);
|
|
83555
83752
|
return !valid;
|
|
83556
83753
|
});
|
|
83557
83754
|
if (invalidBuilder) {
|
|
@@ -83564,7 +83761,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
83564
83761
|
for (const lang of ["go", "python", "ruby"]) {
|
|
83565
83762
|
for (const { use } of builders) {
|
|
83566
83763
|
const plugin = "vercel-plugin-" + lang;
|
|
83567
|
-
if ((0,
|
|
83764
|
+
if ((0, import__106.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
|
83568
83765
|
return {
|
|
83569
83766
|
metadata,
|
|
83570
83767
|
fsApiBuilder: null,
|
|
@@ -83621,7 +83818,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
|
83621
83818
|
}
|
|
83622
83819
|
}
|
|
83623
83820
|
const frontendBuilder = builders.find(
|
|
83624
|
-
({ use }) => (0,
|
|
83821
|
+
({ use }) => (0, import__106.isOfficialRuntime)("next", use) || (0, import__106.isOfficialRuntime)("static", use) || (0, import__106.isOfficialRuntime)("static-build", use)
|
|
83625
83822
|
);
|
|
83626
83823
|
const config2 = frontendBuilder?.config || {};
|
|
83627
83824
|
const withTag = tag ? `@${tag}` : "";
|
|
@@ -88092,14 +88289,14 @@ var require_glob = __commonJS2({
|
|
|
88092
88289
|
glob.sync = globSync;
|
|
88093
88290
|
var GlobSync = glob.GlobSync = globSync.GlobSync;
|
|
88094
88291
|
glob.glob = glob;
|
|
88095
|
-
function extend(origin,
|
|
88096
|
-
if (
|
|
88292
|
+
function extend(origin, add9) {
|
|
88293
|
+
if (add9 === null || typeof add9 !== "object") {
|
|
88097
88294
|
return origin;
|
|
88098
88295
|
}
|
|
88099
|
-
var keys = Object.keys(
|
|
88296
|
+
var keys = Object.keys(add9);
|
|
88100
88297
|
var i = keys.length;
|
|
88101
88298
|
while (i--) {
|
|
88102
|
-
origin[keys[i]] =
|
|
88299
|
+
origin[keys[i]] = add9[keys[i]];
|
|
88103
88300
|
}
|
|
88104
88301
|
return origin;
|
|
88105
88302
|
}
|
|
@@ -92201,9 +92398,9 @@ var init_promise = __esm({
|
|
|
92201
92398
|
});
|
|
92202
92399
|
|
|
92203
92400
|
// src/util/sleep.ts
|
|
92204
|
-
function sleep(
|
|
92401
|
+
function sleep(ms33) {
|
|
92205
92402
|
return new Promise((resolve13) => {
|
|
92206
|
-
setTimeout(resolve13,
|
|
92403
|
+
setTimeout(resolve13, ms33);
|
|
92207
92404
|
});
|
|
92208
92405
|
}
|
|
92209
92406
|
var init_sleep = __esm({
|
|
@@ -94195,41 +94392,41 @@ var require_ms2 = __commonJS2({
|
|
|
94195
94392
|
return void 0;
|
|
94196
94393
|
}
|
|
94197
94394
|
}
|
|
94198
|
-
function fmtShort(
|
|
94199
|
-
var msAbs = Math.abs(
|
|
94395
|
+
function fmtShort(ms33) {
|
|
94396
|
+
var msAbs = Math.abs(ms33);
|
|
94200
94397
|
if (msAbs >= d) {
|
|
94201
|
-
return Math.round(
|
|
94398
|
+
return Math.round(ms33 / d) + "d";
|
|
94202
94399
|
}
|
|
94203
94400
|
if (msAbs >= h) {
|
|
94204
|
-
return Math.round(
|
|
94401
|
+
return Math.round(ms33 / h) + "h";
|
|
94205
94402
|
}
|
|
94206
94403
|
if (msAbs >= m) {
|
|
94207
|
-
return Math.round(
|
|
94404
|
+
return Math.round(ms33 / m) + "m";
|
|
94208
94405
|
}
|
|
94209
94406
|
if (msAbs >= s) {
|
|
94210
|
-
return Math.round(
|
|
94407
|
+
return Math.round(ms33 / s) + "s";
|
|
94211
94408
|
}
|
|
94212
|
-
return
|
|
94409
|
+
return ms33 + "ms";
|
|
94213
94410
|
}
|
|
94214
|
-
function fmtLong(
|
|
94215
|
-
var msAbs = Math.abs(
|
|
94411
|
+
function fmtLong(ms33) {
|
|
94412
|
+
var msAbs = Math.abs(ms33);
|
|
94216
94413
|
if (msAbs >= d) {
|
|
94217
|
-
return
|
|
94414
|
+
return plural15(ms33, msAbs, d, "day");
|
|
94218
94415
|
}
|
|
94219
94416
|
if (msAbs >= h) {
|
|
94220
|
-
return
|
|
94417
|
+
return plural15(ms33, msAbs, h, "hour");
|
|
94221
94418
|
}
|
|
94222
94419
|
if (msAbs >= m) {
|
|
94223
|
-
return
|
|
94420
|
+
return plural15(ms33, msAbs, m, "minute");
|
|
94224
94421
|
}
|
|
94225
94422
|
if (msAbs >= s) {
|
|
94226
|
-
return
|
|
94423
|
+
return plural15(ms33, msAbs, s, "second");
|
|
94227
94424
|
}
|
|
94228
|
-
return
|
|
94425
|
+
return ms33 + " ms";
|
|
94229
94426
|
}
|
|
94230
|
-
function
|
|
94427
|
+
function plural15(ms33, msAbs, n, name) {
|
|
94231
94428
|
var isPlural = msAbs >= n * 1.5;
|
|
94232
|
-
return Math.round(
|
|
94429
|
+
return Math.round(ms33 / n) + " " + name + (isPlural ? "s" : "");
|
|
94233
94430
|
}
|
|
94234
94431
|
}
|
|
94235
94432
|
});
|
|
@@ -94272,8 +94469,8 @@ var require_common8 = __commonJS2({
|
|
|
94272
94469
|
}
|
|
94273
94470
|
const self2 = debug2;
|
|
94274
94471
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
94275
|
-
const
|
|
94276
|
-
self2.diff =
|
|
94472
|
+
const ms33 = curr - (prevTime || curr);
|
|
94473
|
+
self2.diff = ms33;
|
|
94277
94474
|
self2.prev = prevTime;
|
|
94278
94475
|
self2.curr = curr;
|
|
94279
94476
|
prevTime = curr;
|
|
@@ -94874,8 +95071,8 @@ var require_common9 = __commonJS2({
|
|
|
94874
95071
|
}
|
|
94875
95072
|
const self2 = debug2;
|
|
94876
95073
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
94877
|
-
const
|
|
94878
|
-
self2.diff =
|
|
95074
|
+
const ms33 = curr - (prevTime || curr);
|
|
95075
|
+
self2.diff = ms33;
|
|
94879
95076
|
self2.prev = prevTime;
|
|
94880
95077
|
self2.curr = curr;
|
|
94881
95078
|
prevTime = curr;
|
|
@@ -97565,9 +97762,9 @@ var require_ftp = __commonJS2({
|
|
|
97565
97762
|
}
|
|
97566
97763
|
}
|
|
97567
97764
|
if (!lastModified) {
|
|
97568
|
-
const
|
|
97765
|
+
const list10 = await client2.list((0, path_1.dirname)(filepath));
|
|
97569
97766
|
const name = (0, path_1.basename)(filepath);
|
|
97570
|
-
const entry =
|
|
97767
|
+
const entry = list10.find((e2) => e2.name === name);
|
|
97571
97768
|
if (entry) {
|
|
97572
97769
|
lastModified = entry.modifiedAt;
|
|
97573
97770
|
}
|
|
@@ -98048,7 +98245,7 @@ var require_estraverse = __commonJS2({
|
|
|
98048
98245
|
Reference.prototype.replace = function replace2(node) {
|
|
98049
98246
|
this.parent[this.key] = node;
|
|
98050
98247
|
};
|
|
98051
|
-
Reference.prototype.remove = function
|
|
98248
|
+
Reference.prototype.remove = function remove7() {
|
|
98052
98249
|
if (Array.isArray(this.parent)) {
|
|
98053
98250
|
this.parent.splice(this.key, 1);
|
|
98054
98251
|
return true;
|
|
@@ -105734,15 +105931,15 @@ var require_esprima = __commonJS2({
|
|
|
105734
105931
|
this.context.isAssignmentTarget = false;
|
|
105735
105932
|
this.context.isBindingElement = false;
|
|
105736
105933
|
var isAsync = expr.async;
|
|
105737
|
-
var
|
|
105738
|
-
if (
|
|
105934
|
+
var list10 = this.reinterpretAsCoverFormalsList(expr);
|
|
105935
|
+
if (list10) {
|
|
105739
105936
|
if (this.hasLineTerminator) {
|
|
105740
105937
|
this.tolerateUnexpectedToken(this.lookahead);
|
|
105741
105938
|
}
|
|
105742
105939
|
this.context.firstCoverInitializedNameError = null;
|
|
105743
105940
|
var previousStrict = this.context.strict;
|
|
105744
105941
|
var previousAllowStrictDirective = this.context.allowStrictDirective;
|
|
105745
|
-
this.context.allowStrictDirective =
|
|
105942
|
+
this.context.allowStrictDirective = list10.simple;
|
|
105746
105943
|
var previousAllowYield = this.context.allowYield;
|
|
105747
105944
|
var previousAwait = this.context.await;
|
|
105748
105945
|
this.context.allowYield = true;
|
|
@@ -105759,13 +105956,13 @@ var require_esprima = __commonJS2({
|
|
|
105759
105956
|
body = this.isolateCoverGrammar(this.parseAssignmentExpression);
|
|
105760
105957
|
}
|
|
105761
105958
|
var expression = body.type !== syntax_1.Syntax.BlockStatement;
|
|
105762
|
-
if (this.context.strict &&
|
|
105763
|
-
this.throwUnexpectedToken(
|
|
105959
|
+
if (this.context.strict && list10.firstRestricted) {
|
|
105960
|
+
this.throwUnexpectedToken(list10.firstRestricted, list10.message);
|
|
105764
105961
|
}
|
|
105765
|
-
if (this.context.strict &&
|
|
105766
|
-
this.tolerateUnexpectedToken(
|
|
105962
|
+
if (this.context.strict && list10.stricted) {
|
|
105963
|
+
this.tolerateUnexpectedToken(list10.stricted, list10.message);
|
|
105767
105964
|
}
|
|
105768
|
-
expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(
|
|
105965
|
+
expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list10.params, body, expression)) : this.finalize(node, new Node.ArrowFunctionExpression(list10.params, body, expression));
|
|
105769
105966
|
this.context.strict = previousStrict;
|
|
105770
105967
|
this.context.allowStrictDirective = previousAllowStrictDirective;
|
|
105771
105968
|
this.context.allowYield = previousAllowYield;
|
|
@@ -105896,12 +106093,12 @@ var require_esprima = __commonJS2({
|
|
|
105896
106093
|
return this.finalize(node, new Node.VariableDeclarator(id, init3));
|
|
105897
106094
|
};
|
|
105898
106095
|
Parser2.prototype.parseBindingList = function(kind, options) {
|
|
105899
|
-
var
|
|
106096
|
+
var list10 = [this.parseLexicalBinding(kind, options)];
|
|
105900
106097
|
while (this.match(",")) {
|
|
105901
106098
|
this.nextToken();
|
|
105902
|
-
|
|
106099
|
+
list10.push(this.parseLexicalBinding(kind, options));
|
|
105903
106100
|
}
|
|
105904
|
-
return
|
|
106101
|
+
return list10;
|
|
105905
106102
|
};
|
|
105906
106103
|
Parser2.prototype.isLexicalDeclaration = function() {
|
|
105907
106104
|
var state = this.scanner.saveState();
|
|
@@ -106063,13 +106260,13 @@ var require_esprima = __commonJS2({
|
|
|
106063
106260
|
};
|
|
106064
106261
|
Parser2.prototype.parseVariableDeclarationList = function(options) {
|
|
106065
106262
|
var opt = { inFor: options.inFor };
|
|
106066
|
-
var
|
|
106067
|
-
|
|
106263
|
+
var list10 = [];
|
|
106264
|
+
list10.push(this.parseVariableDeclaration(opt));
|
|
106068
106265
|
while (this.match(",")) {
|
|
106069
106266
|
this.nextToken();
|
|
106070
|
-
|
|
106267
|
+
list10.push(this.parseVariableDeclaration(opt));
|
|
106071
106268
|
}
|
|
106072
|
-
return
|
|
106269
|
+
return list10;
|
|
106073
106270
|
};
|
|
106074
106271
|
Parser2.prototype.parseVariableStatement = function() {
|
|
106075
106272
|
var node = this.createNode();
|
|
@@ -107837,10 +108034,10 @@ var require_esprima = __commonJS2({
|
|
|
107837
108034
|
type = 3;
|
|
107838
108035
|
}
|
|
107839
108036
|
if (type !== 3 && start + id.length !== this.index) {
|
|
107840
|
-
var
|
|
108037
|
+
var restore2 = this.index;
|
|
107841
108038
|
this.index = start;
|
|
107842
108039
|
this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord);
|
|
107843
|
-
this.index =
|
|
108040
|
+
this.index = restore2;
|
|
107844
108041
|
}
|
|
107845
108042
|
return {
|
|
107846
108043
|
type,
|
|
@@ -108210,12 +108407,12 @@ var require_esprima = __commonJS2({
|
|
|
108210
108407
|
++this.index;
|
|
108211
108408
|
cooked += this.scanUnicodeCodePointEscape();
|
|
108212
108409
|
} else {
|
|
108213
|
-
var
|
|
108410
|
+
var restore2 = this.index;
|
|
108214
108411
|
var unescaped_2 = this.scanHexEscape(ch);
|
|
108215
108412
|
if (unescaped_2 !== null) {
|
|
108216
108413
|
cooked += unescaped_2;
|
|
108217
108414
|
} else {
|
|
108218
|
-
this.index =
|
|
108415
|
+
this.index = restore2;
|
|
108219
108416
|
cooked += ch;
|
|
108220
108417
|
}
|
|
108221
108418
|
}
|
|
@@ -108360,15 +108557,15 @@ var require_esprima = __commonJS2({
|
|
|
108360
108557
|
ch = this.source[this.index];
|
|
108361
108558
|
if (ch === "u") {
|
|
108362
108559
|
++this.index;
|
|
108363
|
-
var
|
|
108560
|
+
var restore2 = this.index;
|
|
108364
108561
|
var char = this.scanHexEscape("u");
|
|
108365
108562
|
if (char !== null) {
|
|
108366
108563
|
flags += char;
|
|
108367
|
-
for (str += "\\u";
|
|
108368
|
-
str += this.source[
|
|
108564
|
+
for (str += "\\u"; restore2 < this.index; ++restore2) {
|
|
108565
|
+
str += this.source[restore2];
|
|
108369
108566
|
}
|
|
108370
108567
|
} else {
|
|
108371
|
-
this.index =
|
|
108568
|
+
this.index = restore2;
|
|
108372
108569
|
flags += "u";
|
|
108373
108570
|
str += "\\u";
|
|
108374
108571
|
}
|
|
@@ -110174,28 +110371,28 @@ var require_types4 = __commonJS2({
|
|
|
110174
110371
|
};
|
|
110175
110372
|
builders[wrapperName] = builder;
|
|
110176
110373
|
}
|
|
110177
|
-
function populateSupertypeList(typeName,
|
|
110178
|
-
|
|
110179
|
-
|
|
110374
|
+
function populateSupertypeList(typeName, list10) {
|
|
110375
|
+
list10.length = 0;
|
|
110376
|
+
list10.push(typeName);
|
|
110180
110377
|
var lastSeen = /* @__PURE__ */ Object.create(null);
|
|
110181
|
-
for (var pos = 0; pos <
|
|
110182
|
-
typeName =
|
|
110378
|
+
for (var pos = 0; pos < list10.length; ++pos) {
|
|
110379
|
+
typeName = list10[pos];
|
|
110183
110380
|
var d = defCache[typeName];
|
|
110184
110381
|
if (d.finalized !== true) {
|
|
110185
110382
|
throw new Error("");
|
|
110186
110383
|
}
|
|
110187
110384
|
if (hasOwn.call(lastSeen, typeName)) {
|
|
110188
|
-
delete
|
|
110385
|
+
delete list10[lastSeen[typeName]];
|
|
110189
110386
|
}
|
|
110190
110387
|
lastSeen[typeName] = pos;
|
|
110191
|
-
|
|
110388
|
+
list10.push.apply(list10, d.baseNames);
|
|
110192
110389
|
}
|
|
110193
|
-
for (var to = 0, from = to, len =
|
|
110194
|
-
if (hasOwn.call(
|
|
110195
|
-
|
|
110390
|
+
for (var to = 0, from = to, len = list10.length; from < len; ++from) {
|
|
110391
|
+
if (hasOwn.call(list10, from)) {
|
|
110392
|
+
list10[to++] = list10[from];
|
|
110196
110393
|
}
|
|
110197
110394
|
}
|
|
110198
|
-
|
|
110395
|
+
list10.length = to;
|
|
110199
110396
|
}
|
|
110200
110397
|
function extend(into, from) {
|
|
110201
110398
|
Object.keys(from).forEach(function(name) {
|
|
@@ -118272,7 +118469,7 @@ var require_jsbn = __commonJS2({
|
|
|
118272
118469
|
}
|
|
118273
118470
|
if (r == null)
|
|
118274
118471
|
r = nbi();
|
|
118275
|
-
var y = nbi(), ts = this.s,
|
|
118472
|
+
var y = nbi(), ts = this.s, ms33 = m.s;
|
|
118276
118473
|
var nsh = this.DB - nbits(pm[pm.t - 1]);
|
|
118277
118474
|
if (nsh > 0) {
|
|
118278
118475
|
pm.lShiftTo(nsh, y);
|
|
@@ -118308,7 +118505,7 @@ var require_jsbn = __commonJS2({
|
|
|
118308
118505
|
}
|
|
118309
118506
|
if (q != null) {
|
|
118310
118507
|
r.drShiftTo(ys, q);
|
|
118311
|
-
if (ts !=
|
|
118508
|
+
if (ts != ms33)
|
|
118312
118509
|
BigInteger.ZERO.subTo(q, q);
|
|
118313
118510
|
}
|
|
118314
118511
|
r.t = ys;
|
|
@@ -124342,18 +124539,18 @@ var require_merge_stream = __commonJS2({
|
|
|
124342
124539
|
var sources = [];
|
|
124343
124540
|
var output2 = new PassThrough({ objectMode: true });
|
|
124344
124541
|
output2.setMaxListeners(0);
|
|
124345
|
-
output2.add =
|
|
124542
|
+
output2.add = add9;
|
|
124346
124543
|
output2.isEmpty = isEmpty;
|
|
124347
|
-
output2.on("unpipe",
|
|
124348
|
-
Array.prototype.slice.call(arguments).forEach(
|
|
124544
|
+
output2.on("unpipe", remove7);
|
|
124545
|
+
Array.prototype.slice.call(arguments).forEach(add9);
|
|
124349
124546
|
return output2;
|
|
124350
|
-
function
|
|
124547
|
+
function add9(source) {
|
|
124351
124548
|
if (Array.isArray(source)) {
|
|
124352
|
-
source.forEach(
|
|
124549
|
+
source.forEach(add9);
|
|
124353
124550
|
return this;
|
|
124354
124551
|
}
|
|
124355
124552
|
sources.push(source);
|
|
124356
|
-
source.once("end",
|
|
124553
|
+
source.once("end", remove7.bind(null, source));
|
|
124357
124554
|
source.once("error", output2.emit.bind(output2, "error"));
|
|
124358
124555
|
source.pipe(output2, { end: false });
|
|
124359
124556
|
return this;
|
|
@@ -124361,7 +124558,7 @@ var require_merge_stream = __commonJS2({
|
|
|
124361
124558
|
function isEmpty() {
|
|
124362
124559
|
return sources.length == 0;
|
|
124363
124560
|
}
|
|
124364
|
-
function
|
|
124561
|
+
function remove7(source) {
|
|
124365
124562
|
sources = sources.filter(function(it) {
|
|
124366
124563
|
return it !== source;
|
|
124367
124564
|
});
|
|
@@ -129927,7 +130124,7 @@ async function list3(client2, argv, rwToken) {
|
|
|
129927
130124
|
store: client2.telemetryEventStore
|
|
129928
130125
|
}
|
|
129929
130126
|
});
|
|
129930
|
-
const flagsSpecification = getFlagsSpecification(
|
|
130127
|
+
const flagsSpecification = getFlagsSpecification(listSubcommand11.options);
|
|
129931
130128
|
let parsedArgs;
|
|
129932
130129
|
try {
|
|
129933
130130
|
parsedArgs = parseArguments(argv, flagsSpecification);
|
|
@@ -129960,11 +130157,11 @@ async function list3(client2, argv, rwToken) {
|
|
|
129960
130157
|
);
|
|
129961
130158
|
return 1;
|
|
129962
130159
|
}
|
|
129963
|
-
let
|
|
130160
|
+
let list10;
|
|
129964
130161
|
try {
|
|
129965
130162
|
output_manager_default.debug("Fetching blobs");
|
|
129966
130163
|
output_manager_default.spinner("Fetching blobs");
|
|
129967
|
-
|
|
130164
|
+
list10 = await blob.list({
|
|
129968
130165
|
token: rwToken,
|
|
129969
130166
|
limit: limit ?? 10,
|
|
129970
130167
|
cursor,
|
|
@@ -129981,7 +130178,7 @@ async function list3(client2, argv, rwToken) {
|
|
|
129981
130178
|
const tablePrint = table(
|
|
129982
130179
|
[
|
|
129983
130180
|
headers.map((header) => import_chalk44.default.dim(header)),
|
|
129984
|
-
...
|
|
130181
|
+
...list10.blobs.map((blob5) => {
|
|
129985
130182
|
urls.push(blob5.url);
|
|
129986
130183
|
const uploadedAt = (0, import_ms6.default)(Date.now() - new Date(blob5.uploadedAt).getTime());
|
|
129987
130184
|
return [uploadedAt, String(blob5.size), blob5.pathname, blob5.url];
|
|
@@ -129989,7 +130186,7 @@ async function list3(client2, argv, rwToken) {
|
|
|
129989
130186
|
],
|
|
129990
130187
|
{ hsep: 5 }
|
|
129991
130188
|
).replace(/^/gm, " ");
|
|
129992
|
-
if (
|
|
130189
|
+
if (list10.blobs.length > 0) {
|
|
129993
130190
|
output_manager_default.print(`
|
|
129994
130191
|
${tablePrint}
|
|
129995
130192
|
|
|
@@ -129997,11 +130194,11 @@ ${tablePrint}
|
|
|
129997
130194
|
} else {
|
|
129998
130195
|
output_manager_default.log("No blobs in this store");
|
|
129999
130196
|
}
|
|
130000
|
-
if (
|
|
130197
|
+
if (list10.cursor) {
|
|
130001
130198
|
const nextFlags = getCommandFlags(flags, ["_", "--cursor"]);
|
|
130002
130199
|
output_manager_default.log(
|
|
130003
130200
|
`To display the next page run ${getCommandName(
|
|
130004
|
-
`blob list${nextFlags} --cursor ${
|
|
130201
|
+
`blob list${nextFlags} --cursor ${list10.cursor}`
|
|
130005
130202
|
)}`
|
|
130006
130203
|
);
|
|
130007
130204
|
}
|
|
@@ -130019,7 +130216,7 @@ var init_list4 = __esm({
|
|
|
130019
130216
|
init_get_command_flags();
|
|
130020
130217
|
init_get_args();
|
|
130021
130218
|
init_get_flags_specification();
|
|
130022
|
-
|
|
130219
|
+
init_command40();
|
|
130023
130220
|
init_pkg_name();
|
|
130024
130221
|
init_list3();
|
|
130025
130222
|
init_error2();
|
|
@@ -130257,7 +130454,7 @@ var init_put2 = __esm({
|
|
|
130257
130454
|
blob2 = __toESM3(require("@vercel/blob"));
|
|
130258
130455
|
init_get_args();
|
|
130259
130456
|
init_get_flags_specification();
|
|
130260
|
-
|
|
130457
|
+
init_command40();
|
|
130261
130458
|
import_node_fs = require("fs");
|
|
130262
130459
|
import_promises2 = require("fs/promises");
|
|
130263
130460
|
import_error_utils13 = __toESM3(require_dist2());
|
|
@@ -130331,7 +130528,7 @@ var init_del2 = __esm({
|
|
|
130331
130528
|
blob3 = __toESM3(require("@vercel/blob"));
|
|
130332
130529
|
init_get_args();
|
|
130333
130530
|
init_get_flags_specification();
|
|
130334
|
-
|
|
130531
|
+
init_command40();
|
|
130335
130532
|
init_del();
|
|
130336
130533
|
init_error2();
|
|
130337
130534
|
init_pkg_name();
|
|
@@ -130450,7 +130647,7 @@ var init_copy2 = __esm({
|
|
|
130450
130647
|
blob4 = __toESM3(require("@vercel/blob"));
|
|
130451
130648
|
init_get_args();
|
|
130452
130649
|
init_get_flags_specification();
|
|
130453
|
-
|
|
130650
|
+
init_command40();
|
|
130454
130651
|
init_copy();
|
|
130455
130652
|
init_pkg_name();
|
|
130456
130653
|
}
|
|
@@ -130608,7 +130805,7 @@ var init_store_add2 = __esm({
|
|
|
130608
130805
|
init_pkg_name();
|
|
130609
130806
|
init_get_flags_specification();
|
|
130610
130807
|
init_get_args();
|
|
130611
|
-
|
|
130808
|
+
init_command40();
|
|
130612
130809
|
init_store_add();
|
|
130613
130810
|
init_error2();
|
|
130614
130811
|
}
|
|
@@ -130684,7 +130881,7 @@ var init_store_remove = __esm({
|
|
|
130684
130881
|
init_error2();
|
|
130685
130882
|
init_output_manager();
|
|
130686
130883
|
init_get_flags_specification();
|
|
130687
|
-
|
|
130884
|
+
init_command40();
|
|
130688
130885
|
init_get_args();
|
|
130689
130886
|
init_link2();
|
|
130690
130887
|
}
|
|
@@ -133108,7 +133305,7 @@ var init_store_get2 = __esm({
|
|
|
133108
133305
|
init_get_args();
|
|
133109
133306
|
init_get_flags_specification();
|
|
133110
133307
|
init_link2();
|
|
133111
|
-
|
|
133308
|
+
init_command40();
|
|
133112
133309
|
import_date_fns = __toESM3(require_date_fns());
|
|
133113
133310
|
import_chalk47 = __toESM3(require_source());
|
|
133114
133311
|
init_store_get();
|
|
@@ -133187,7 +133384,7 @@ var init_store2 = __esm({
|
|
|
133187
133384
|
init_get_invalid_subcommand();
|
|
133188
133385
|
init_get_subcommand();
|
|
133189
133386
|
init_help();
|
|
133190
|
-
|
|
133387
|
+
init_command40();
|
|
133191
133388
|
init_get_flags_specification();
|
|
133192
133389
|
init_output_manager();
|
|
133193
133390
|
init_commands();
|
|
@@ -133260,7 +133457,7 @@ var init_token = __esm({
|
|
|
133260
133457
|
import_node_path2 = require("path");
|
|
133261
133458
|
init_diff_env_files();
|
|
133262
133459
|
init_get_flags_specification();
|
|
133263
|
-
|
|
133460
|
+
init_command40();
|
|
133264
133461
|
init_get_args();
|
|
133265
133462
|
init_pkg_name();
|
|
133266
133463
|
init_cmd();
|
|
@@ -133315,7 +133512,7 @@ async function main(client2) {
|
|
|
133315
133512
|
case "list":
|
|
133316
133513
|
if (needHelp) {
|
|
133317
133514
|
telemetry2.trackCliFlagHelp("blob", subcommandOriginal);
|
|
133318
|
-
printHelp(
|
|
133515
|
+
printHelp(listSubcommand11);
|
|
133319
133516
|
return 2;
|
|
133320
133517
|
}
|
|
133321
133518
|
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
|
@@ -133378,7 +133575,7 @@ var init_blob2 = __esm({
|
|
|
133378
133575
|
init_get_subcommand();
|
|
133379
133576
|
init_help();
|
|
133380
133577
|
init_list4();
|
|
133381
|
-
|
|
133578
|
+
init_command40();
|
|
133382
133579
|
init_get_flags_specification();
|
|
133383
133580
|
init_output_manager();
|
|
133384
133581
|
init_commands();
|
|
@@ -133390,7 +133587,7 @@ var init_blob2 = __esm({
|
|
|
133390
133587
|
init_error2();
|
|
133391
133588
|
init_token();
|
|
133392
133589
|
COMMAND_CONFIG3 = {
|
|
133393
|
-
list: getCommandAliases(
|
|
133590
|
+
list: getCommandAliases(listSubcommand11),
|
|
133394
133591
|
put: getCommandAliases(putSubcommand),
|
|
133395
133592
|
del: getCommandAliases(delSubcommand),
|
|
133396
133593
|
copy: getCommandAliases(copySubcommand),
|
|
@@ -146547,18 +146744,18 @@ var require_events_intercept = __commonJS2({
|
|
|
146547
146744
|
return ret;
|
|
146548
146745
|
}
|
|
146549
146746
|
function removeInterceptor(type, interceptor) {
|
|
146550
|
-
var
|
|
146747
|
+
var list10, position, length, i;
|
|
146551
146748
|
if (typeof interceptor !== "function") {
|
|
146552
146749
|
throw new TypeError("interceptor must be a function");
|
|
146553
146750
|
}
|
|
146554
146751
|
if (!this._interceptors || !this._interceptors[type]) {
|
|
146555
146752
|
return this;
|
|
146556
146753
|
}
|
|
146557
|
-
|
|
146558
|
-
length =
|
|
146754
|
+
list10 = this._interceptors[type];
|
|
146755
|
+
length = list10.length;
|
|
146559
146756
|
position = -1;
|
|
146560
146757
|
for (i = length - 1; i >= 0; i--) {
|
|
146561
|
-
if (
|
|
146758
|
+
if (list10[i] === interceptor) {
|
|
146562
146759
|
position = i;
|
|
146563
146760
|
break;
|
|
146564
146761
|
}
|
|
@@ -146569,7 +146766,7 @@ var require_events_intercept = __commonJS2({
|
|
|
146569
146766
|
if (length === 1) {
|
|
146570
146767
|
delete this._interceptors[type];
|
|
146571
146768
|
} else {
|
|
146572
|
-
|
|
146769
|
+
list10.splice(position, 1);
|
|
146573
146770
|
}
|
|
146574
146771
|
this.emit("removeInterceptor", type, interceptor);
|
|
146575
146772
|
return this;
|
|
@@ -147659,7 +147856,7 @@ async function staticFiles(path11, { src }) {
|
|
|
147659
147856
|
}
|
|
147660
147857
|
async function explode(paths, { accepts }) {
|
|
147661
147858
|
const { debug: debug2 } = output_manager_default;
|
|
147662
|
-
const
|
|
147859
|
+
const list10 = async (file) => {
|
|
147663
147860
|
let path11 = file;
|
|
147664
147861
|
let s;
|
|
147665
147862
|
if (!accepts(file)) {
|
|
@@ -147687,7 +147884,7 @@ async function explode(paths, { accepts }) {
|
|
|
147687
147884
|
}
|
|
147688
147885
|
return path11;
|
|
147689
147886
|
};
|
|
147690
|
-
const many = (all) => Promise.all(all.map((file) =>
|
|
147887
|
+
const many = (all) => Promise.all(all.map((file) => list10(file)));
|
|
147691
147888
|
const arrayOfArrays = await many(paths);
|
|
147692
147889
|
return flatten(arrayOfArrays).filter(notNull);
|
|
147693
147890
|
}
|
|
@@ -151713,22 +151910,22 @@ var require_split2 = __commonJS2({
|
|
|
151713
151910
|
var kLast = Symbol("last");
|
|
151714
151911
|
var kDecoder = Symbol("decoder");
|
|
151715
151912
|
function transform(chunk, enc, cb) {
|
|
151716
|
-
let
|
|
151913
|
+
let list10;
|
|
151717
151914
|
if (this.overflow) {
|
|
151718
151915
|
const buf = this[kDecoder].write(chunk);
|
|
151719
|
-
|
|
151720
|
-
if (
|
|
151916
|
+
list10 = buf.split(this.matcher);
|
|
151917
|
+
if (list10.length === 1)
|
|
151721
151918
|
return cb();
|
|
151722
|
-
|
|
151919
|
+
list10.shift();
|
|
151723
151920
|
this.overflow = false;
|
|
151724
151921
|
} else {
|
|
151725
151922
|
this[kLast] += this[kDecoder].write(chunk);
|
|
151726
|
-
|
|
151923
|
+
list10 = this[kLast].split(this.matcher);
|
|
151727
151924
|
}
|
|
151728
|
-
this[kLast] =
|
|
151729
|
-
for (let i = 0; i <
|
|
151925
|
+
this[kLast] = list10.pop();
|
|
151926
|
+
for (let i = 0; i < list10.length; i++) {
|
|
151730
151927
|
try {
|
|
151731
|
-
push(this, this.mapper(
|
|
151928
|
+
push(this, this.mapper(list10[i]));
|
|
151732
151929
|
} catch (error3) {
|
|
151733
151930
|
return cb(error3);
|
|
151734
151931
|
}
|
|
@@ -158882,32 +159079,32 @@ var require_ms3 = __commonJS2({
|
|
|
158882
159079
|
return void 0;
|
|
158883
159080
|
}
|
|
158884
159081
|
}
|
|
158885
|
-
function fmtShort(
|
|
158886
|
-
if (
|
|
158887
|
-
return Math.round(
|
|
159082
|
+
function fmtShort(ms33) {
|
|
159083
|
+
if (ms33 >= d) {
|
|
159084
|
+
return Math.round(ms33 / d) + "d";
|
|
158888
159085
|
}
|
|
158889
|
-
if (
|
|
158890
|
-
return Math.round(
|
|
159086
|
+
if (ms33 >= h) {
|
|
159087
|
+
return Math.round(ms33 / h) + "h";
|
|
158891
159088
|
}
|
|
158892
|
-
if (
|
|
158893
|
-
return Math.round(
|
|
159089
|
+
if (ms33 >= m) {
|
|
159090
|
+
return Math.round(ms33 / m) + "m";
|
|
158894
159091
|
}
|
|
158895
|
-
if (
|
|
158896
|
-
return Math.round(
|
|
159092
|
+
if (ms33 >= s) {
|
|
159093
|
+
return Math.round(ms33 / s) + "s";
|
|
158897
159094
|
}
|
|
158898
|
-
return
|
|
159095
|
+
return ms33 + "ms";
|
|
158899
159096
|
}
|
|
158900
|
-
function fmtLong(
|
|
158901
|
-
return
|
|
159097
|
+
function fmtLong(ms33) {
|
|
159098
|
+
return plural15(ms33, d, "day") || plural15(ms33, h, "hour") || plural15(ms33, m, "minute") || plural15(ms33, s, "second") || ms33 + " ms";
|
|
158902
159099
|
}
|
|
158903
|
-
function
|
|
158904
|
-
if (
|
|
159100
|
+
function plural15(ms33, n, name) {
|
|
159101
|
+
if (ms33 < n) {
|
|
158905
159102
|
return;
|
|
158906
159103
|
}
|
|
158907
|
-
if (
|
|
158908
|
-
return Math.floor(
|
|
159104
|
+
if (ms33 < n * 1.5) {
|
|
159105
|
+
return Math.floor(ms33 / n) + " " + name;
|
|
158909
159106
|
}
|
|
158910
|
-
return Math.ceil(
|
|
159107
|
+
return Math.ceil(ms33 / n) + " " + name + "s";
|
|
158911
159108
|
}
|
|
158912
159109
|
}
|
|
158913
159110
|
});
|
|
@@ -158940,8 +159137,8 @@ var require_debug4 = __commonJS2({
|
|
|
158940
159137
|
return;
|
|
158941
159138
|
var self2 = debug2;
|
|
158942
159139
|
var curr = +/* @__PURE__ */ new Date();
|
|
158943
|
-
var
|
|
158944
|
-
self2.diff =
|
|
159140
|
+
var ms33 = curr - (prevTime || curr);
|
|
159141
|
+
self2.diff = ms33;
|
|
158945
159142
|
self2.prev = prevTime;
|
|
158946
159143
|
self2.curr = curr;
|
|
158947
159144
|
prevTime = curr;
|
|
@@ -161201,7 +161398,7 @@ var require_minimatch3 = __commonJS2({
|
|
|
161201
161398
|
minimatch5.filter = filter;
|
|
161202
161399
|
function filter(pattern, options) {
|
|
161203
161400
|
options = options || {};
|
|
161204
|
-
return function(p, i,
|
|
161401
|
+
return function(p, i, list10) {
|
|
161205
161402
|
return minimatch5(p, pattern, options);
|
|
161206
161403
|
};
|
|
161207
161404
|
}
|
|
@@ -161604,16 +161801,16 @@ var require_minimatch3 = __commonJS2({
|
|
|
161604
161801
|
}
|
|
161605
161802
|
return this.regexp;
|
|
161606
161803
|
}
|
|
161607
|
-
minimatch5.match = function(
|
|
161804
|
+
minimatch5.match = function(list10, pattern, options) {
|
|
161608
161805
|
options = options || {};
|
|
161609
161806
|
var mm = new Minimatch(pattern, options);
|
|
161610
|
-
|
|
161807
|
+
list10 = list10.filter(function(f) {
|
|
161611
161808
|
return mm.match(f);
|
|
161612
161809
|
});
|
|
161613
|
-
if (mm.options.nonull && !
|
|
161614
|
-
|
|
161810
|
+
if (mm.options.nonull && !list10.length) {
|
|
161811
|
+
list10.push(pattern);
|
|
161615
161812
|
}
|
|
161616
|
-
return
|
|
161813
|
+
return list10;
|
|
161617
161814
|
};
|
|
161618
161815
|
Minimatch.prototype.match = match;
|
|
161619
161816
|
function match(f, partial) {
|
|
@@ -178936,8 +179133,8 @@ var require_jaro_winkler = __commonJS2({
|
|
|
178936
179133
|
});
|
|
178937
179134
|
|
|
178938
179135
|
// src/util/init/did-you-mean.ts
|
|
178939
|
-
function didYouMean(input,
|
|
178940
|
-
const rated =
|
|
179136
|
+
function didYouMean(input, list10, threshold = 0.5) {
|
|
179137
|
+
const rated = list10.map((item) => [dashAwareDistance(input, item), item]);
|
|
178941
179138
|
const found = rated.filter((item) => item[0] > threshold);
|
|
178942
179139
|
if (found.length) {
|
|
178943
179140
|
const highestRated = found.reduce((accu, curr) => {
|
|
@@ -179296,8 +179493,8 @@ var init_builds = __esm({
|
|
|
179296
179493
|
}
|
|
179297
179494
|
}
|
|
179298
179495
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
|
179299
|
-
const
|
|
179300
|
-
return `${import_chalk101.default.grey(corner)} ${color(
|
|
179496
|
+
const main19 = prefix + path11 + finalSize + finalRegion;
|
|
179497
|
+
return `${import_chalk101.default.grey(corner)} ${color(main19)}`;
|
|
179301
179498
|
};
|
|
179302
179499
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
|
179303
179500
|
const parts = path11.split("/").slice(0, -1);
|
|
@@ -185495,6 +185692,1115 @@ var init_redeploy2 = __esm({
|
|
|
185495
185692
|
}
|
|
185496
185693
|
});
|
|
185497
185694
|
|
|
185695
|
+
// src/commands/redirects/shared.ts
|
|
185696
|
+
async function parseSubcommandArgs(argv, command) {
|
|
185697
|
+
let parsedArgs;
|
|
185698
|
+
const flagsSpecification = getFlagsSpecification(command.options);
|
|
185699
|
+
try {
|
|
185700
|
+
parsedArgs = parseArguments(argv, flagsSpecification);
|
|
185701
|
+
} catch (err) {
|
|
185702
|
+
printError(err);
|
|
185703
|
+
return 1;
|
|
185704
|
+
}
|
|
185705
|
+
return parsedArgs;
|
|
185706
|
+
}
|
|
185707
|
+
function validateRequiredArgs(args2, required) {
|
|
185708
|
+
for (let i = 0; i < required.length; i++) {
|
|
185709
|
+
if (!args2[i]) {
|
|
185710
|
+
return `Missing required argument: ${required[i]}`;
|
|
185711
|
+
}
|
|
185712
|
+
}
|
|
185713
|
+
return null;
|
|
185714
|
+
}
|
|
185715
|
+
async function ensureProjectLink(client2) {
|
|
185716
|
+
const link4 = await getLinkedProject(client2);
|
|
185717
|
+
if (link4.status === "error") {
|
|
185718
|
+
return link4.exitCode;
|
|
185719
|
+
} else if (link4.status === "not_linked") {
|
|
185720
|
+
output_manager_default.error(
|
|
185721
|
+
`Your codebase isn't linked to a project on Vercel. Run ${getCommandName("link")} to begin.`
|
|
185722
|
+
);
|
|
185723
|
+
return 1;
|
|
185724
|
+
}
|
|
185725
|
+
client2.config.currentTeam = link4.org.type === "team" ? link4.org.id : void 0;
|
|
185726
|
+
return link4;
|
|
185727
|
+
}
|
|
185728
|
+
async function confirmAction(client2, skipConfirmation, message2, details) {
|
|
185729
|
+
if (skipConfirmation)
|
|
185730
|
+
return true;
|
|
185731
|
+
if (details) {
|
|
185732
|
+
output_manager_default.print(` ${details}
|
|
185733
|
+
`);
|
|
185734
|
+
}
|
|
185735
|
+
return await client2.input.confirm(message2, false);
|
|
185736
|
+
}
|
|
185737
|
+
function isValidUrl(url3) {
|
|
185738
|
+
try {
|
|
185739
|
+
new URL(url3, "https://vercel.com");
|
|
185740
|
+
return true;
|
|
185741
|
+
} catch {
|
|
185742
|
+
return false;
|
|
185743
|
+
}
|
|
185744
|
+
}
|
|
185745
|
+
var init_shared2 = __esm({
|
|
185746
|
+
"src/commands/redirects/shared.ts"() {
|
|
185747
|
+
"use strict";
|
|
185748
|
+
init_get_args();
|
|
185749
|
+
init_get_flags_specification();
|
|
185750
|
+
init_error2();
|
|
185751
|
+
init_link2();
|
|
185752
|
+
init_pkg_name();
|
|
185753
|
+
init_output_manager();
|
|
185754
|
+
}
|
|
185755
|
+
});
|
|
185756
|
+
|
|
185757
|
+
// src/util/redirects/get-redirects.ts
|
|
185758
|
+
async function getRedirects(client2, projectId, options = {}) {
|
|
185759
|
+
const { teamId, search, page, perPage = 50, versionId, diff } = options;
|
|
185760
|
+
const params2 = new URLSearchParams();
|
|
185761
|
+
params2.set("projectId", projectId);
|
|
185762
|
+
if (teamId) {
|
|
185763
|
+
params2.set("teamId", teamId);
|
|
185764
|
+
}
|
|
185765
|
+
if (versionId) {
|
|
185766
|
+
params2.set("versionId", versionId);
|
|
185767
|
+
}
|
|
185768
|
+
if (diff) {
|
|
185769
|
+
params2.set("diff", "true");
|
|
185770
|
+
} else {
|
|
185771
|
+
params2.set("per_page", perPage.toString());
|
|
185772
|
+
if (search) {
|
|
185773
|
+
params2.set("q", search);
|
|
185774
|
+
}
|
|
185775
|
+
if (page) {
|
|
185776
|
+
params2.set("page", page.toString());
|
|
185777
|
+
}
|
|
185778
|
+
}
|
|
185779
|
+
const url3 = `/v1/bulk-redirects?${params2}`;
|
|
185780
|
+
return await client2.fetch(url3);
|
|
185781
|
+
}
|
|
185782
|
+
var init_get_redirects = __esm({
|
|
185783
|
+
"src/util/redirects/get-redirects.ts"() {
|
|
185784
|
+
"use strict";
|
|
185785
|
+
}
|
|
185786
|
+
});
|
|
185787
|
+
|
|
185788
|
+
// src/util/redirects/get-redirect-versions.ts
|
|
185789
|
+
async function getRedirectVersions(client2, projectId, teamId) {
|
|
185790
|
+
const params2 = new URLSearchParams();
|
|
185791
|
+
params2.set("projectId", projectId);
|
|
185792
|
+
if (teamId) {
|
|
185793
|
+
params2.set("teamId", teamId);
|
|
185794
|
+
}
|
|
185795
|
+
const url3 = `/v1/bulk-redirects/versions?${params2}`;
|
|
185796
|
+
return await client2.fetch(url3);
|
|
185797
|
+
}
|
|
185798
|
+
var init_get_redirect_versions = __esm({
|
|
185799
|
+
"src/util/redirects/get-redirect-versions.ts"() {
|
|
185800
|
+
"use strict";
|
|
185801
|
+
}
|
|
185802
|
+
});
|
|
185803
|
+
|
|
185804
|
+
// src/commands/redirects/list.ts
|
|
185805
|
+
async function list7(client2, argv) {
|
|
185806
|
+
const parsed = await parseSubcommandArgs(argv, listSubcommand8);
|
|
185807
|
+
if (typeof parsed === "number")
|
|
185808
|
+
return parsed;
|
|
185809
|
+
const link4 = await ensureProjectLink(client2);
|
|
185810
|
+
if (typeof link4 === "number")
|
|
185811
|
+
return link4;
|
|
185812
|
+
const { project, org } = link4;
|
|
185813
|
+
const { flags } = parsed;
|
|
185814
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
185815
|
+
const search = flags["--search"];
|
|
185816
|
+
const page = flags["--page"];
|
|
185817
|
+
const perPage = flags["--per-page"];
|
|
185818
|
+
const staged = flags["--staged"];
|
|
185819
|
+
const versionIdFlag = flags["--version"];
|
|
185820
|
+
let versionId;
|
|
185821
|
+
let versionName;
|
|
185822
|
+
if (staged) {
|
|
185823
|
+
output_manager_default.spinner("Fetching staging version");
|
|
185824
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
185825
|
+
const stagingVersion = versions.find((v) => v.isStaging);
|
|
185826
|
+
if (!stagingVersion) {
|
|
185827
|
+
output_manager_default.error(
|
|
185828
|
+
`No staging version found for ${import_chalk125.default.bold(project.name)}. Run ${import_chalk125.default.cyan(
|
|
185829
|
+
"vercel redirects list-versions"
|
|
185830
|
+
)} to see available versions.`
|
|
185831
|
+
);
|
|
185832
|
+
return 1;
|
|
185833
|
+
}
|
|
185834
|
+
versionId = stagingVersion.id;
|
|
185835
|
+
versionName = stagingVersion.name || stagingVersion.id;
|
|
185836
|
+
}
|
|
185837
|
+
if (versionIdFlag) {
|
|
185838
|
+
if (staged) {
|
|
185839
|
+
output_manager_default.error("Cannot use both --staged and --version flags together");
|
|
185840
|
+
return 1;
|
|
185841
|
+
}
|
|
185842
|
+
output_manager_default.spinner("Fetching version");
|
|
185843
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
185844
|
+
const version2 = versions.find(
|
|
185845
|
+
(v) => v.id === versionIdFlag || v.name === versionIdFlag
|
|
185846
|
+
);
|
|
185847
|
+
if (!version2) {
|
|
185848
|
+
output_manager_default.error(
|
|
185849
|
+
`Version "${versionIdFlag}" not found. Run ${import_chalk125.default.cyan(
|
|
185850
|
+
"vercel redirects list-versions"
|
|
185851
|
+
)} to see available versions.`
|
|
185852
|
+
);
|
|
185853
|
+
return 1;
|
|
185854
|
+
}
|
|
185855
|
+
versionId = version2.id;
|
|
185856
|
+
versionName = version2.name || version2.id;
|
|
185857
|
+
}
|
|
185858
|
+
const lsStamp = stamp_default();
|
|
185859
|
+
let spinnerMessage = `Fetching redirects for ${import_chalk125.default.bold(project.name)}`;
|
|
185860
|
+
if (versionName) {
|
|
185861
|
+
spinnerMessage += ` (version: ${versionName})`;
|
|
185862
|
+
}
|
|
185863
|
+
if (search) {
|
|
185864
|
+
spinnerMessage += ` matching "${search}"`;
|
|
185865
|
+
}
|
|
185866
|
+
output_manager_default.spinner(spinnerMessage);
|
|
185867
|
+
const { redirects, pagination } = await getRedirects(client2, project.id, {
|
|
185868
|
+
teamId,
|
|
185869
|
+
search,
|
|
185870
|
+
page,
|
|
185871
|
+
perPage,
|
|
185872
|
+
versionId
|
|
185873
|
+
});
|
|
185874
|
+
let resultMessage = `${(0, import_pluralize13.default)("Redirect", redirects.length, true)} found for ${import_chalk125.default.bold(
|
|
185875
|
+
project.name
|
|
185876
|
+
)}`;
|
|
185877
|
+
if (versionName) {
|
|
185878
|
+
resultMessage += ` ${import_chalk125.default.gray(`(version: ${versionName})`)}`;
|
|
185879
|
+
}
|
|
185880
|
+
if (search) {
|
|
185881
|
+
resultMessage += ` matching "${search}"`;
|
|
185882
|
+
}
|
|
185883
|
+
if (pagination) {
|
|
185884
|
+
resultMessage += ` ${import_chalk125.default.gray(`(page ${pagination.page} of ${pagination.numPages})`)}`;
|
|
185885
|
+
}
|
|
185886
|
+
resultMessage += ` ${import_chalk125.default.gray(lsStamp())}`;
|
|
185887
|
+
output_manager_default.log(resultMessage);
|
|
185888
|
+
if (redirects.length > 0) {
|
|
185889
|
+
output_manager_default.print(formatRedirectsTable(redirects));
|
|
185890
|
+
output_manager_default.print("\n");
|
|
185891
|
+
}
|
|
185892
|
+
if (pagination && pagination.page < pagination.numPages) {
|
|
185893
|
+
const nextPage = pagination.page + 1;
|
|
185894
|
+
let command = `redirects list --page ${nextPage}`;
|
|
185895
|
+
if (search) {
|
|
185896
|
+
command += ` --search "${search}"`;
|
|
185897
|
+
}
|
|
185898
|
+
if (perPage) {
|
|
185899
|
+
command += ` --per-page ${perPage}`;
|
|
185900
|
+
}
|
|
185901
|
+
output_manager_default.log(`To display the next page, run ${getCommandName(command)}`);
|
|
185902
|
+
}
|
|
185903
|
+
return 0;
|
|
185904
|
+
}
|
|
185905
|
+
function formatRedirectsTable(redirects) {
|
|
185906
|
+
const rows = redirects.map((redirect2) => {
|
|
185907
|
+
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
185908
|
+
return [
|
|
185909
|
+
redirect2.source,
|
|
185910
|
+
redirect2.destination,
|
|
185911
|
+
import_chalk125.default.cyan(status3.toString())
|
|
185912
|
+
];
|
|
185913
|
+
});
|
|
185914
|
+
return formatTable(
|
|
185915
|
+
["Source", "Destination", "Status"],
|
|
185916
|
+
["l", "l", "l"],
|
|
185917
|
+
[{ rows }]
|
|
185918
|
+
);
|
|
185919
|
+
}
|
|
185920
|
+
var import_chalk125, import_pluralize13;
|
|
185921
|
+
var init_list11 = __esm({
|
|
185922
|
+
"src/commands/redirects/list.ts"() {
|
|
185923
|
+
"use strict";
|
|
185924
|
+
import_chalk125 = __toESM3(require_source());
|
|
185925
|
+
import_pluralize13 = __toESM3(require_pluralize());
|
|
185926
|
+
init_output_manager();
|
|
185927
|
+
init_command32();
|
|
185928
|
+
init_shared2();
|
|
185929
|
+
init_get_redirects();
|
|
185930
|
+
init_get_redirect_versions();
|
|
185931
|
+
init_stamp();
|
|
185932
|
+
init_format_table();
|
|
185933
|
+
init_pkg_name();
|
|
185934
|
+
}
|
|
185935
|
+
});
|
|
185936
|
+
|
|
185937
|
+
// src/commands/redirects/list-versions.ts
|
|
185938
|
+
async function listVersions(client2, argv) {
|
|
185939
|
+
const parsed = await parseSubcommandArgs(argv, listVersionsSubcommand);
|
|
185940
|
+
if (typeof parsed === "number")
|
|
185941
|
+
return parsed;
|
|
185942
|
+
const link4 = await ensureProjectLink(client2);
|
|
185943
|
+
if (typeof link4 === "number")
|
|
185944
|
+
return link4;
|
|
185945
|
+
const { project, org } = link4;
|
|
185946
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
185947
|
+
const lsStamp = stamp_default();
|
|
185948
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk126.default.bold(project.name)}`);
|
|
185949
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
185950
|
+
const sortedVersions = sortVersions(versions).slice(0, 20);
|
|
185951
|
+
output_manager_default.log(
|
|
185952
|
+
`${(0, import_pluralize14.default)("Version", sortedVersions.length, true)} found for ${import_chalk126.default.bold(
|
|
185953
|
+
project.name
|
|
185954
|
+
)} ${import_chalk126.default.gray(lsStamp())}`
|
|
185955
|
+
);
|
|
185956
|
+
if (sortedVersions.length > 0) {
|
|
185957
|
+
output_manager_default.print(formatVersionsTable(sortedVersions));
|
|
185958
|
+
output_manager_default.print("\n");
|
|
185959
|
+
}
|
|
185960
|
+
return 0;
|
|
185961
|
+
}
|
|
185962
|
+
function sortVersions(versions) {
|
|
185963
|
+
return versions.slice().sort((a, b) => {
|
|
185964
|
+
if (a.isStaging && !b.isStaging)
|
|
185965
|
+
return -1;
|
|
185966
|
+
if (!a.isStaging && b.isStaging)
|
|
185967
|
+
return 1;
|
|
185968
|
+
if (a.isLive && !b.isLive)
|
|
185969
|
+
return -1;
|
|
185970
|
+
if (!a.isLive && b.isLive)
|
|
185971
|
+
return 1;
|
|
185972
|
+
return b.lastModified - a.lastModified;
|
|
185973
|
+
});
|
|
185974
|
+
}
|
|
185975
|
+
function formatVersionsTable(versions) {
|
|
185976
|
+
const now = Date.now();
|
|
185977
|
+
const rows = versions.map((version2) => {
|
|
185978
|
+
const age = (0, import_ms27.default)(now - version2.lastModified);
|
|
185979
|
+
let status3 = "";
|
|
185980
|
+
if (version2.isStaging) {
|
|
185981
|
+
status3 = import_chalk126.default.yellow("Staging");
|
|
185982
|
+
} else if (version2.isLive) {
|
|
185983
|
+
status3 = import_chalk126.default.green("Live");
|
|
185984
|
+
} else {
|
|
185985
|
+
status3 = import_chalk126.default.gray("Previous");
|
|
185986
|
+
}
|
|
185987
|
+
const name = version2.name || import_chalk126.default.gray("(unnamed)");
|
|
185988
|
+
const redirectCountStr = version2.redirectCount !== void 0 && version2.redirectCount !== null ? version2.redirectCount.toString() : import_chalk126.default.gray("-");
|
|
185989
|
+
return [
|
|
185990
|
+
status3,
|
|
185991
|
+
name,
|
|
185992
|
+
version2.id,
|
|
185993
|
+
redirectCountStr,
|
|
185994
|
+
version2.createdBy || import_chalk126.default.gray("(unknown)"),
|
|
185995
|
+
import_chalk126.default.gray(age + " ago")
|
|
185996
|
+
];
|
|
185997
|
+
});
|
|
185998
|
+
return formatTable(
|
|
185999
|
+
["Status", "Name", "ID", "Redirects", "Created By", "Age"],
|
|
186000
|
+
["l", "l", "l", "r", "l", "l"],
|
|
186001
|
+
[{ rows }]
|
|
186002
|
+
);
|
|
186003
|
+
}
|
|
186004
|
+
var import_chalk126, import_ms27, import_pluralize14;
|
|
186005
|
+
var init_list_versions = __esm({
|
|
186006
|
+
"src/commands/redirects/list-versions.ts"() {
|
|
186007
|
+
"use strict";
|
|
186008
|
+
import_chalk126 = __toESM3(require_source());
|
|
186009
|
+
import_ms27 = __toESM3(require_ms());
|
|
186010
|
+
import_pluralize14 = __toESM3(require_pluralize());
|
|
186011
|
+
init_output_manager();
|
|
186012
|
+
init_command32();
|
|
186013
|
+
init_shared2();
|
|
186014
|
+
init_get_redirect_versions();
|
|
186015
|
+
init_stamp();
|
|
186016
|
+
init_format_table();
|
|
186017
|
+
}
|
|
186018
|
+
});
|
|
186019
|
+
|
|
186020
|
+
// src/util/redirects/put-redirects.ts
|
|
186021
|
+
async function putRedirects(client2, projectId, redirects, teamId, name) {
|
|
186022
|
+
const url3 = `/v1/bulk-redirects`;
|
|
186023
|
+
const body = {
|
|
186024
|
+
projectId,
|
|
186025
|
+
redirects
|
|
186026
|
+
};
|
|
186027
|
+
if (teamId) {
|
|
186028
|
+
body.teamId = teamId;
|
|
186029
|
+
}
|
|
186030
|
+
if (name) {
|
|
186031
|
+
body.name = name;
|
|
186032
|
+
}
|
|
186033
|
+
return await client2.fetch(url3, {
|
|
186034
|
+
method: "PUT",
|
|
186035
|
+
headers: {
|
|
186036
|
+
"Content-Type": "application/json"
|
|
186037
|
+
},
|
|
186038
|
+
body: JSON.stringify(body)
|
|
186039
|
+
});
|
|
186040
|
+
}
|
|
186041
|
+
var init_put_redirects = __esm({
|
|
186042
|
+
"src/util/redirects/put-redirects.ts"() {
|
|
186043
|
+
"use strict";
|
|
186044
|
+
}
|
|
186045
|
+
});
|
|
186046
|
+
|
|
186047
|
+
// src/util/redirects/update-redirect-version.ts
|
|
186048
|
+
async function updateRedirectVersion(client2, projectId, versionId, action, teamId) {
|
|
186049
|
+
const params2 = new URLSearchParams();
|
|
186050
|
+
params2.set("projectId", projectId);
|
|
186051
|
+
if (teamId) {
|
|
186052
|
+
params2.set("teamId", teamId);
|
|
186053
|
+
}
|
|
186054
|
+
const url3 = `/v1/bulk-redirects/versions?${params2}`;
|
|
186055
|
+
return await client2.fetch(url3, {
|
|
186056
|
+
method: "POST",
|
|
186057
|
+
headers: {
|
|
186058
|
+
"Content-Type": "application/json"
|
|
186059
|
+
},
|
|
186060
|
+
body: JSON.stringify({
|
|
186061
|
+
id: versionId,
|
|
186062
|
+
action
|
|
186063
|
+
})
|
|
186064
|
+
});
|
|
186065
|
+
}
|
|
186066
|
+
var init_update_redirect_version = __esm({
|
|
186067
|
+
"src/util/redirects/update-redirect-version.ts"() {
|
|
186068
|
+
"use strict";
|
|
186069
|
+
}
|
|
186070
|
+
});
|
|
186071
|
+
|
|
186072
|
+
// src/commands/redirects/add.ts
|
|
186073
|
+
async function add7(client2, argv) {
|
|
186074
|
+
const parsed = await parseSubcommandArgs(argv, addSubcommand7);
|
|
186075
|
+
if (typeof parsed === "number")
|
|
186076
|
+
return parsed;
|
|
186077
|
+
const link4 = await ensureProjectLink(client2);
|
|
186078
|
+
if (typeof link4 === "number")
|
|
186079
|
+
return link4;
|
|
186080
|
+
const { project, org } = link4;
|
|
186081
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
186082
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
186083
|
+
const existingStagingVersion = versions.find((v) => v.isStaging);
|
|
186084
|
+
output_manager_default.log("Add a new redirect\n");
|
|
186085
|
+
const source = await client2.input.text({
|
|
186086
|
+
message: "What is the source URL?",
|
|
186087
|
+
validate: (val) => {
|
|
186088
|
+
if (!val) {
|
|
186089
|
+
return "Source URL cannot be empty";
|
|
186090
|
+
}
|
|
186091
|
+
if (!isValidUrl(val)) {
|
|
186092
|
+
return "Must be a relative path (starting with /) or an absolute URL";
|
|
186093
|
+
}
|
|
186094
|
+
return true;
|
|
186095
|
+
}
|
|
186096
|
+
});
|
|
186097
|
+
const destination = await client2.input.text({
|
|
186098
|
+
message: "What is the destination URL?",
|
|
186099
|
+
validate: (val) => {
|
|
186100
|
+
if (!val) {
|
|
186101
|
+
return "Destination URL cannot be empty";
|
|
186102
|
+
}
|
|
186103
|
+
if (!isValidUrl(val)) {
|
|
186104
|
+
return "Must be a relative path (starting with /) or an absolute URL";
|
|
186105
|
+
}
|
|
186106
|
+
return true;
|
|
186107
|
+
}
|
|
186108
|
+
});
|
|
186109
|
+
const statusCode = await client2.input.select({
|
|
186110
|
+
message: "Select the status code:",
|
|
186111
|
+
choices: [
|
|
186112
|
+
{
|
|
186113
|
+
name: "301 - Moved Permanently (cached by browsers)",
|
|
186114
|
+
value: 301
|
|
186115
|
+
},
|
|
186116
|
+
{
|
|
186117
|
+
name: "302 - Found (temporary redirect, not cached)",
|
|
186118
|
+
value: 302
|
|
186119
|
+
},
|
|
186120
|
+
{
|
|
186121
|
+
name: "307 - Temporary Redirect (preserves request method)",
|
|
186122
|
+
value: 307
|
|
186123
|
+
},
|
|
186124
|
+
{
|
|
186125
|
+
name: "308 - Permanent Redirect (preserves request method)",
|
|
186126
|
+
value: 308
|
|
186127
|
+
}
|
|
186128
|
+
]
|
|
186129
|
+
});
|
|
186130
|
+
const caseSensitive = await client2.input.confirm(
|
|
186131
|
+
"Should the redirect be case sensitive?",
|
|
186132
|
+
false
|
|
186133
|
+
);
|
|
186134
|
+
const provideName = await client2.input.confirm(
|
|
186135
|
+
"Do you want to provide a name for this version?",
|
|
186136
|
+
false
|
|
186137
|
+
);
|
|
186138
|
+
let versionName;
|
|
186139
|
+
if (provideName) {
|
|
186140
|
+
versionName = await client2.input.text({
|
|
186141
|
+
message: "Version name (max 256 characters):",
|
|
186142
|
+
validate: (val) => {
|
|
186143
|
+
if (val && val.length > 256) {
|
|
186144
|
+
return "Name must be 256 characters or less";
|
|
186145
|
+
}
|
|
186146
|
+
return true;
|
|
186147
|
+
}
|
|
186148
|
+
});
|
|
186149
|
+
if (!versionName) {
|
|
186150
|
+
versionName = void 0;
|
|
186151
|
+
}
|
|
186152
|
+
}
|
|
186153
|
+
const addStamp = stamp_default();
|
|
186154
|
+
output_manager_default.spinner("Adding redirect");
|
|
186155
|
+
const { alias: alias2, version: version2 } = await putRedirects(
|
|
186156
|
+
client2,
|
|
186157
|
+
project.id,
|
|
186158
|
+
[
|
|
186159
|
+
{
|
|
186160
|
+
source,
|
|
186161
|
+
destination,
|
|
186162
|
+
statusCode,
|
|
186163
|
+
caseSensitive
|
|
186164
|
+
}
|
|
186165
|
+
],
|
|
186166
|
+
teamId,
|
|
186167
|
+
versionName
|
|
186168
|
+
);
|
|
186169
|
+
output_manager_default.log(`${import_chalk127.default.cyan("\u2713")} Redirect added ${import_chalk127.default.gray(addStamp())}`);
|
|
186170
|
+
output_manager_default.print(`
|
|
186171
|
+
${import_chalk127.default.bold("Redirect:")}
|
|
186172
|
+
`);
|
|
186173
|
+
output_manager_default.print(` ${import_chalk127.default.cyan(source)} \u2192 ${import_chalk127.default.cyan(destination)}
|
|
186174
|
+
`);
|
|
186175
|
+
output_manager_default.print(` Status: ${statusCode}
|
|
186176
|
+
`);
|
|
186177
|
+
output_manager_default.print(` Case sensitive: ${caseSensitive ? "Yes" : "No"}
|
|
186178
|
+
`);
|
|
186179
|
+
if (alias2) {
|
|
186180
|
+
const testUrl = source.startsWith("/") ? `https://${alias2}${source}` : `https://${alias2}`;
|
|
186181
|
+
output_manager_default.print(
|
|
186182
|
+
`
|
|
186183
|
+
${import_chalk127.default.bold("Test your changes:")} ${import_chalk127.default.cyan(testUrl)}
|
|
186184
|
+
`
|
|
186185
|
+
);
|
|
186186
|
+
}
|
|
186187
|
+
const newVersionName = version2.name || version2.id;
|
|
186188
|
+
output_manager_default.print(` ${import_chalk127.default.bold("New staging version:")} ${newVersionName}
|
|
186189
|
+
|
|
186190
|
+
`);
|
|
186191
|
+
if (!existingStagingVersion) {
|
|
186192
|
+
const shouldPromote = await client2.input.confirm(
|
|
186193
|
+
"This is the only staged change. Do you want to promote it to production now?",
|
|
186194
|
+
false
|
|
186195
|
+
);
|
|
186196
|
+
if (shouldPromote) {
|
|
186197
|
+
const promoteStamp = stamp_default();
|
|
186198
|
+
output_manager_default.spinner("Promoting to production");
|
|
186199
|
+
await updateRedirectVersion(
|
|
186200
|
+
client2,
|
|
186201
|
+
project.id,
|
|
186202
|
+
version2.id,
|
|
186203
|
+
"promote",
|
|
186204
|
+
teamId
|
|
186205
|
+
);
|
|
186206
|
+
output_manager_default.log(
|
|
186207
|
+
`${import_chalk127.default.cyan("\u2713")} Version promoted to production ${import_chalk127.default.gray(promoteStamp())}`
|
|
186208
|
+
);
|
|
186209
|
+
}
|
|
186210
|
+
} else {
|
|
186211
|
+
output_manager_default.warn(
|
|
186212
|
+
`There are other staged changes. Please review all changes with ${import_chalk127.default.cyan("vercel redirects list --staged")} before promoting to production.`
|
|
186213
|
+
);
|
|
186214
|
+
}
|
|
186215
|
+
return 0;
|
|
186216
|
+
}
|
|
186217
|
+
var import_chalk127;
|
|
186218
|
+
var init_add13 = __esm({
|
|
186219
|
+
"src/commands/redirects/add.ts"() {
|
|
186220
|
+
"use strict";
|
|
186221
|
+
import_chalk127 = __toESM3(require_source());
|
|
186222
|
+
init_output_manager();
|
|
186223
|
+
init_command32();
|
|
186224
|
+
init_shared2();
|
|
186225
|
+
init_put_redirects();
|
|
186226
|
+
init_update_redirect_version();
|
|
186227
|
+
init_get_redirect_versions();
|
|
186228
|
+
init_stamp();
|
|
186229
|
+
}
|
|
186230
|
+
});
|
|
186231
|
+
|
|
186232
|
+
// src/util/redirects/delete-redirects.ts
|
|
186233
|
+
async function deleteRedirects(client2, projectId, sources, teamId) {
|
|
186234
|
+
const params2 = new URLSearchParams();
|
|
186235
|
+
params2.set("projectId", projectId);
|
|
186236
|
+
if (teamId) {
|
|
186237
|
+
params2.set("teamId", teamId);
|
|
186238
|
+
}
|
|
186239
|
+
const url3 = `/v1/bulk-redirects?${params2}`;
|
|
186240
|
+
return await client2.fetch(url3, {
|
|
186241
|
+
method: "DELETE",
|
|
186242
|
+
headers: {
|
|
186243
|
+
"Content-Type": "application/json"
|
|
186244
|
+
},
|
|
186245
|
+
body: JSON.stringify({
|
|
186246
|
+
redirects: sources
|
|
186247
|
+
})
|
|
186248
|
+
});
|
|
186249
|
+
}
|
|
186250
|
+
var init_delete_redirects = __esm({
|
|
186251
|
+
"src/util/redirects/delete-redirects.ts"() {
|
|
186252
|
+
"use strict";
|
|
186253
|
+
}
|
|
186254
|
+
});
|
|
186255
|
+
|
|
186256
|
+
// src/commands/redirects/remove.ts
|
|
186257
|
+
async function remove5(client2, argv) {
|
|
186258
|
+
const parsed = await parseSubcommandArgs(argv, removeSubcommand9);
|
|
186259
|
+
if (typeof parsed === "number")
|
|
186260
|
+
return parsed;
|
|
186261
|
+
const error3 = validateRequiredArgs(parsed.args, ["source"]);
|
|
186262
|
+
if (error3) {
|
|
186263
|
+
output_manager_default.error(error3);
|
|
186264
|
+
return 1;
|
|
186265
|
+
}
|
|
186266
|
+
const link4 = await ensureProjectLink(client2);
|
|
186267
|
+
if (typeof link4 === "number")
|
|
186268
|
+
return link4;
|
|
186269
|
+
const { project, org } = link4;
|
|
186270
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
186271
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
186272
|
+
const existingStagingVersion = versions.find((v) => v.isStaging);
|
|
186273
|
+
const [source] = parsed.args;
|
|
186274
|
+
output_manager_default.spinner("Fetching redirect information");
|
|
186275
|
+
const { redirects } = await getRedirects(client2, project.id, { teamId });
|
|
186276
|
+
const redirectToRemove = redirects.find((r) => r.source === source);
|
|
186277
|
+
if (!redirectToRemove) {
|
|
186278
|
+
output_manager_default.error(
|
|
186279
|
+
`Redirect with source "${source}" not found. Run ${import_chalk128.default.cyan(
|
|
186280
|
+
"vercel redirects list"
|
|
186281
|
+
)} to see available redirects.`
|
|
186282
|
+
);
|
|
186283
|
+
return 1;
|
|
186284
|
+
}
|
|
186285
|
+
output_manager_default.print(`
|
|
186286
|
+
${import_chalk128.default.bold("Removing redirect:")}
|
|
186287
|
+
`);
|
|
186288
|
+
output_manager_default.print(
|
|
186289
|
+
` ${import_chalk128.default.cyan(redirectToRemove.source)} \u2192 ${import_chalk128.default.cyan(redirectToRemove.destination)}
|
|
186290
|
+
`
|
|
186291
|
+
);
|
|
186292
|
+
const status3 = redirectToRemove.statusCode || (redirectToRemove.permanent ? 308 : 307);
|
|
186293
|
+
output_manager_default.print(` Status: ${status3}
|
|
186294
|
+
|
|
186295
|
+
`);
|
|
186296
|
+
const confirmed = await confirmAction(
|
|
186297
|
+
client2,
|
|
186298
|
+
parsed.flags["--yes"],
|
|
186299
|
+
`Remove this redirect?`,
|
|
186300
|
+
`This will create a new staging version without this redirect.`
|
|
186301
|
+
);
|
|
186302
|
+
if (!confirmed) {
|
|
186303
|
+
output_manager_default.log("Canceled");
|
|
186304
|
+
return 0;
|
|
186305
|
+
}
|
|
186306
|
+
const removeStamp = stamp_default();
|
|
186307
|
+
output_manager_default.spinner(`Removing redirect for ${import_chalk128.default.bold(source)}`);
|
|
186308
|
+
const { alias: alias2, version: version2 } = await deleteRedirects(
|
|
186309
|
+
client2,
|
|
186310
|
+
project.id,
|
|
186311
|
+
[source],
|
|
186312
|
+
teamId
|
|
186313
|
+
);
|
|
186314
|
+
output_manager_default.log(
|
|
186315
|
+
`${import_chalk128.default.cyan("\u2713")} Redirect removed ${import_chalk128.default.gray(removeStamp())}`
|
|
186316
|
+
);
|
|
186317
|
+
if (alias2) {
|
|
186318
|
+
const testUrl = source.startsWith("/") ? `https://${alias2}${source}` : `https://${alias2}`;
|
|
186319
|
+
output_manager_default.print(
|
|
186320
|
+
`
|
|
186321
|
+
${import_chalk128.default.bold("Test your changes:")} ${import_chalk128.default.cyan(testUrl)}
|
|
186322
|
+
`
|
|
186323
|
+
);
|
|
186324
|
+
output_manager_default.print(
|
|
186325
|
+
` This URL should no longer redirect to the above destination.
|
|
186326
|
+
`
|
|
186327
|
+
);
|
|
186328
|
+
}
|
|
186329
|
+
const versionName = version2.name || version2.id;
|
|
186330
|
+
output_manager_default.print(` ${import_chalk128.default.bold("New staging version:")} ${versionName}
|
|
186331
|
+
|
|
186332
|
+
`);
|
|
186333
|
+
if (!existingStagingVersion) {
|
|
186334
|
+
const shouldPromote = await client2.input.confirm(
|
|
186335
|
+
"This is the only staged change. Do you want to promote it to production now?",
|
|
186336
|
+
false
|
|
186337
|
+
);
|
|
186338
|
+
if (shouldPromote) {
|
|
186339
|
+
const promoteStamp = stamp_default();
|
|
186340
|
+
output_manager_default.spinner("Promoting to production");
|
|
186341
|
+
await updateRedirectVersion(
|
|
186342
|
+
client2,
|
|
186343
|
+
project.id,
|
|
186344
|
+
version2.id,
|
|
186345
|
+
"promote",
|
|
186346
|
+
teamId
|
|
186347
|
+
);
|
|
186348
|
+
output_manager_default.log(
|
|
186349
|
+
`${import_chalk128.default.cyan("\u2713")} Version promoted to production ${import_chalk128.default.gray(promoteStamp())}`
|
|
186350
|
+
);
|
|
186351
|
+
}
|
|
186352
|
+
} else {
|
|
186353
|
+
output_manager_default.warn(
|
|
186354
|
+
`There are other staged changes. Review them with ${import_chalk128.default.cyan("vercel redirects list --staged")} before promoting to production.`
|
|
186355
|
+
);
|
|
186356
|
+
}
|
|
186357
|
+
return 0;
|
|
186358
|
+
}
|
|
186359
|
+
var import_chalk128;
|
|
186360
|
+
var init_remove5 = __esm({
|
|
186361
|
+
"src/commands/redirects/remove.ts"() {
|
|
186362
|
+
"use strict";
|
|
186363
|
+
import_chalk128 = __toESM3(require_source());
|
|
186364
|
+
init_output_manager();
|
|
186365
|
+
init_command32();
|
|
186366
|
+
init_shared2();
|
|
186367
|
+
init_delete_redirects();
|
|
186368
|
+
init_get_redirects();
|
|
186369
|
+
init_get_redirect_versions();
|
|
186370
|
+
init_update_redirect_version();
|
|
186371
|
+
init_stamp();
|
|
186372
|
+
}
|
|
186373
|
+
});
|
|
186374
|
+
|
|
186375
|
+
// src/commands/redirects/promote.ts
|
|
186376
|
+
async function promote(client2, argv) {
|
|
186377
|
+
const parsed = await parseSubcommandArgs(argv, promoteSubcommand);
|
|
186378
|
+
if (typeof parsed === "number")
|
|
186379
|
+
return parsed;
|
|
186380
|
+
const error3 = validateRequiredArgs(parsed.args, ["version-id"]);
|
|
186381
|
+
if (error3) {
|
|
186382
|
+
output_manager_default.error(error3);
|
|
186383
|
+
return 1;
|
|
186384
|
+
}
|
|
186385
|
+
const link4 = await ensureProjectLink(client2);
|
|
186386
|
+
if (typeof link4 === "number")
|
|
186387
|
+
return link4;
|
|
186388
|
+
const { project, org } = link4;
|
|
186389
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
186390
|
+
const [versionIdentifier] = parsed.args;
|
|
186391
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk129.default.bold(project.name)}`);
|
|
186392
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
186393
|
+
const version2 = versions.find(
|
|
186394
|
+
(v) => v.id === versionIdentifier || v.name === versionIdentifier
|
|
186395
|
+
);
|
|
186396
|
+
if (!version2) {
|
|
186397
|
+
output_manager_default.error(
|
|
186398
|
+
`Version with ID or name "${versionIdentifier}" not found. Run ${import_chalk129.default.cyan(
|
|
186399
|
+
"vercel redirects list-versions"
|
|
186400
|
+
)} to see available versions.`
|
|
186401
|
+
);
|
|
186402
|
+
return 1;
|
|
186403
|
+
}
|
|
186404
|
+
if (version2.isLive) {
|
|
186405
|
+
output_manager_default.error(
|
|
186406
|
+
`Version ${import_chalk129.default.bold(version2.name || version2.id)} is already live.`
|
|
186407
|
+
);
|
|
186408
|
+
return 1;
|
|
186409
|
+
}
|
|
186410
|
+
if (!version2.isStaging) {
|
|
186411
|
+
output_manager_default.error(
|
|
186412
|
+
`Version ${import_chalk129.default.bold(
|
|
186413
|
+
version2.name || version2.id
|
|
186414
|
+
)} is not staged. Only staging versions can be promoted to production.
|
|
186415
|
+
Run ${import_chalk129.default.cyan(
|
|
186416
|
+
"vercel redirects list-versions"
|
|
186417
|
+
)} to see which version is currently staged.`
|
|
186418
|
+
);
|
|
186419
|
+
return 1;
|
|
186420
|
+
}
|
|
186421
|
+
const versionName = version2.name || version2.id;
|
|
186422
|
+
output_manager_default.spinner("Fetching changes");
|
|
186423
|
+
const { redirects: diffRedirects } = await getRedirects(client2, project.id, {
|
|
186424
|
+
teamId,
|
|
186425
|
+
versionId: version2.id,
|
|
186426
|
+
diff: true
|
|
186427
|
+
});
|
|
186428
|
+
const changedRedirects = diffRedirects.filter(
|
|
186429
|
+
(r) => r.action === "+" || r.action === "-"
|
|
186430
|
+
);
|
|
186431
|
+
if (changedRedirects.length > 0) {
|
|
186432
|
+
output_manager_default.print(`
|
|
186433
|
+
${import_chalk129.default.bold("Changes to be promoted:")}
|
|
186434
|
+
|
|
186435
|
+
`);
|
|
186436
|
+
const displayRedirects = changedRedirects.slice(0, 20);
|
|
186437
|
+
for (const redirect2 of displayRedirects) {
|
|
186438
|
+
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
186439
|
+
const symbol = redirect2.action === "+" ? import_chalk129.default.green("+") : import_chalk129.default.red("-");
|
|
186440
|
+
output_manager_default.print(
|
|
186441
|
+
` ${symbol} ${redirect2.source} \u2192 ${redirect2.destination} (${status3})
|
|
186442
|
+
`
|
|
186443
|
+
);
|
|
186444
|
+
}
|
|
186445
|
+
if (changedRedirects.length > 20) {
|
|
186446
|
+
output_manager_default.print(
|
|
186447
|
+
import_chalk129.default.gray(`
|
|
186448
|
+
... and ${changedRedirects.length - 20} more changes
|
|
186449
|
+
`)
|
|
186450
|
+
);
|
|
186451
|
+
}
|
|
186452
|
+
output_manager_default.print("\n");
|
|
186453
|
+
} else {
|
|
186454
|
+
output_manager_default.print(
|
|
186455
|
+
`
|
|
186456
|
+
${import_chalk129.default.gray("No changes detected from current production version.")}
|
|
186457
|
+
|
|
186458
|
+
`
|
|
186459
|
+
);
|
|
186460
|
+
}
|
|
186461
|
+
const confirmed = await confirmAction(
|
|
186462
|
+
client2,
|
|
186463
|
+
parsed.flags["--yes"],
|
|
186464
|
+
`Promote version ${import_chalk129.default.bold(versionName)} to production?`,
|
|
186465
|
+
`This will make it the live version for ${import_chalk129.default.bold(project.name)}.`
|
|
186466
|
+
);
|
|
186467
|
+
if (!confirmed) {
|
|
186468
|
+
output_manager_default.log("Canceled");
|
|
186469
|
+
return 0;
|
|
186470
|
+
}
|
|
186471
|
+
const updateStamp = stamp_default();
|
|
186472
|
+
output_manager_default.spinner(`Promoting version ${import_chalk129.default.bold(versionName)} to production`);
|
|
186473
|
+
const { version: newVersion } = await updateRedirectVersion(
|
|
186474
|
+
client2,
|
|
186475
|
+
project.id,
|
|
186476
|
+
version2.id,
|
|
186477
|
+
"promote",
|
|
186478
|
+
teamId
|
|
186479
|
+
);
|
|
186480
|
+
output_manager_default.log(
|
|
186481
|
+
`${import_chalk129.default.cyan("\u2713")} Version ${import_chalk129.default.bold(
|
|
186482
|
+
newVersion.name || newVersion.id
|
|
186483
|
+
)} promoted to production ${import_chalk129.default.gray(updateStamp())}`
|
|
186484
|
+
);
|
|
186485
|
+
return 0;
|
|
186486
|
+
}
|
|
186487
|
+
var import_chalk129;
|
|
186488
|
+
var init_promote3 = __esm({
|
|
186489
|
+
"src/commands/redirects/promote.ts"() {
|
|
186490
|
+
"use strict";
|
|
186491
|
+
import_chalk129 = __toESM3(require_source());
|
|
186492
|
+
init_output_manager();
|
|
186493
|
+
init_command32();
|
|
186494
|
+
init_shared2();
|
|
186495
|
+
init_get_redirect_versions();
|
|
186496
|
+
init_update_redirect_version();
|
|
186497
|
+
init_get_redirects();
|
|
186498
|
+
init_stamp();
|
|
186499
|
+
}
|
|
186500
|
+
});
|
|
186501
|
+
|
|
186502
|
+
// src/commands/redirects/restore.ts
|
|
186503
|
+
async function restore(client2, argv) {
|
|
186504
|
+
const parsed = await parseSubcommandArgs(argv, restoreSubcommand);
|
|
186505
|
+
if (typeof parsed === "number")
|
|
186506
|
+
return parsed;
|
|
186507
|
+
const error3 = validateRequiredArgs(parsed.args, ["version-id"]);
|
|
186508
|
+
if (error3) {
|
|
186509
|
+
output_manager_default.error(error3);
|
|
186510
|
+
return 1;
|
|
186511
|
+
}
|
|
186512
|
+
const link4 = await ensureProjectLink(client2);
|
|
186513
|
+
if (typeof link4 === "number")
|
|
186514
|
+
return link4;
|
|
186515
|
+
const { project, org } = link4;
|
|
186516
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
186517
|
+
const [versionIdentifier] = parsed.args;
|
|
186518
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk130.default.bold(project.name)}`);
|
|
186519
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
186520
|
+
const version2 = versions.find(
|
|
186521
|
+
(v) => v.id === versionIdentifier || v.name === versionIdentifier
|
|
186522
|
+
);
|
|
186523
|
+
if (!version2) {
|
|
186524
|
+
output_manager_default.error(
|
|
186525
|
+
`Version with ID or name "${versionIdentifier}" not found. Run ${import_chalk130.default.cyan(
|
|
186526
|
+
"vercel redirects list-versions"
|
|
186527
|
+
)} to see available versions.`
|
|
186528
|
+
);
|
|
186529
|
+
return 1;
|
|
186530
|
+
}
|
|
186531
|
+
if (version2.isLive) {
|
|
186532
|
+
output_manager_default.error(
|
|
186533
|
+
`Version ${import_chalk130.default.bold(
|
|
186534
|
+
version2.name || version2.id
|
|
186535
|
+
)} is currently live. You cannot restore the live version.
|
|
186536
|
+
Run ${import_chalk130.default.cyan(
|
|
186537
|
+
"vercel redirects list-versions"
|
|
186538
|
+
)} to see previous versions you can restore.`
|
|
186539
|
+
);
|
|
186540
|
+
return 1;
|
|
186541
|
+
}
|
|
186542
|
+
if (version2.isStaging) {
|
|
186543
|
+
output_manager_default.error(
|
|
186544
|
+
`Version ${import_chalk130.default.bold(
|
|
186545
|
+
version2.name || version2.id
|
|
186546
|
+
)} is staged. You can only restore previous versions.`
|
|
186547
|
+
);
|
|
186548
|
+
return 1;
|
|
186549
|
+
}
|
|
186550
|
+
const versionName = version2.name || version2.id;
|
|
186551
|
+
output_manager_default.spinner("Fetching changes");
|
|
186552
|
+
const { redirects: diffRedirects } = await getRedirects(client2, project.id, {
|
|
186553
|
+
teamId,
|
|
186554
|
+
versionId: version2.id,
|
|
186555
|
+
diff: true
|
|
186556
|
+
});
|
|
186557
|
+
const changedRedirects = diffRedirects.filter(
|
|
186558
|
+
(r) => r.action === "+" || r.action === "-"
|
|
186559
|
+
);
|
|
186560
|
+
if (changedRedirects.length > 0) {
|
|
186561
|
+
output_manager_default.print(`
|
|
186562
|
+
${import_chalk130.default.bold("Changes to be restored:")}
|
|
186563
|
+
|
|
186564
|
+
`);
|
|
186565
|
+
const displayRedirects = changedRedirects.slice(0, 20);
|
|
186566
|
+
for (const redirect2 of displayRedirects) {
|
|
186567
|
+
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
186568
|
+
const symbol = redirect2.action === "+" ? import_chalk130.default.green("+") : import_chalk130.default.red("-");
|
|
186569
|
+
output_manager_default.print(
|
|
186570
|
+
` ${symbol} ${redirect2.source} \u2192 ${redirect2.destination} (${status3})
|
|
186571
|
+
`
|
|
186572
|
+
);
|
|
186573
|
+
}
|
|
186574
|
+
if (changedRedirects.length > 20) {
|
|
186575
|
+
output_manager_default.print(
|
|
186576
|
+
import_chalk130.default.gray(`
|
|
186577
|
+
... and ${changedRedirects.length - 20} more changes
|
|
186578
|
+
`)
|
|
186579
|
+
);
|
|
186580
|
+
}
|
|
186581
|
+
output_manager_default.print("\n");
|
|
186582
|
+
} else {
|
|
186583
|
+
output_manager_default.print(
|
|
186584
|
+
`
|
|
186585
|
+
${import_chalk130.default.gray("No changes detected from current production version.")}
|
|
186586
|
+
|
|
186587
|
+
`
|
|
186588
|
+
);
|
|
186589
|
+
}
|
|
186590
|
+
const confirmed = await confirmAction(
|
|
186591
|
+
client2,
|
|
186592
|
+
parsed.flags["--yes"],
|
|
186593
|
+
`Restore version ${import_chalk130.default.bold(versionName)}?`,
|
|
186594
|
+
`This will make it the live version for ${import_chalk130.default.bold(project.name)}.`
|
|
186595
|
+
);
|
|
186596
|
+
if (!confirmed) {
|
|
186597
|
+
output_manager_default.log("Canceled");
|
|
186598
|
+
return 0;
|
|
186599
|
+
}
|
|
186600
|
+
const updateStamp = stamp_default();
|
|
186601
|
+
output_manager_default.spinner(`Restoring version ${import_chalk130.default.bold(versionName)}`);
|
|
186602
|
+
const { version: newVersion } = await updateRedirectVersion(
|
|
186603
|
+
client2,
|
|
186604
|
+
project.id,
|
|
186605
|
+
version2.id,
|
|
186606
|
+
"restore",
|
|
186607
|
+
teamId
|
|
186608
|
+
);
|
|
186609
|
+
output_manager_default.log(
|
|
186610
|
+
`${import_chalk130.default.cyan("\u2713")} Version ${import_chalk130.default.bold(
|
|
186611
|
+
newVersion.name || newVersion.id
|
|
186612
|
+
)} restored to production ${import_chalk130.default.gray(updateStamp())}`
|
|
186613
|
+
);
|
|
186614
|
+
return 0;
|
|
186615
|
+
}
|
|
186616
|
+
var import_chalk130;
|
|
186617
|
+
var init_restore = __esm({
|
|
186618
|
+
"src/commands/redirects/restore.ts"() {
|
|
186619
|
+
"use strict";
|
|
186620
|
+
import_chalk130 = __toESM3(require_source());
|
|
186621
|
+
init_output_manager();
|
|
186622
|
+
init_command32();
|
|
186623
|
+
init_shared2();
|
|
186624
|
+
init_get_redirect_versions();
|
|
186625
|
+
init_update_redirect_version();
|
|
186626
|
+
init_get_redirects();
|
|
186627
|
+
init_stamp();
|
|
186628
|
+
}
|
|
186629
|
+
});
|
|
186630
|
+
|
|
186631
|
+
// src/util/telemetry/commands/redirects/index.ts
|
|
186632
|
+
var RedirectsTelemetryClient;
|
|
186633
|
+
var init_redirects = __esm({
|
|
186634
|
+
"src/util/telemetry/commands/redirects/index.ts"() {
|
|
186635
|
+
"use strict";
|
|
186636
|
+
init_telemetry();
|
|
186637
|
+
RedirectsTelemetryClient = class extends TelemetryClient {
|
|
186638
|
+
trackCliSubcommandList(actual) {
|
|
186639
|
+
this.trackCliSubcommand({
|
|
186640
|
+
subcommand: "list",
|
|
186641
|
+
value: actual
|
|
186642
|
+
});
|
|
186643
|
+
}
|
|
186644
|
+
trackCliSubcommandListVersions(actual) {
|
|
186645
|
+
this.trackCliSubcommand({
|
|
186646
|
+
subcommand: "list-versions",
|
|
186647
|
+
value: actual
|
|
186648
|
+
});
|
|
186649
|
+
}
|
|
186650
|
+
trackCliSubcommandAdd(actual) {
|
|
186651
|
+
this.trackCliSubcommand({
|
|
186652
|
+
subcommand: "add",
|
|
186653
|
+
value: actual
|
|
186654
|
+
});
|
|
186655
|
+
}
|
|
186656
|
+
trackCliSubcommandRemove(actual) {
|
|
186657
|
+
this.trackCliSubcommand({
|
|
186658
|
+
subcommand: "remove",
|
|
186659
|
+
value: actual
|
|
186660
|
+
});
|
|
186661
|
+
}
|
|
186662
|
+
trackCliSubcommandPromote(actual) {
|
|
186663
|
+
this.trackCliSubcommand({
|
|
186664
|
+
subcommand: "promote",
|
|
186665
|
+
value: actual
|
|
186666
|
+
});
|
|
186667
|
+
}
|
|
186668
|
+
trackCliSubcommandRestore(actual) {
|
|
186669
|
+
this.trackCliSubcommand({
|
|
186670
|
+
subcommand: "restore",
|
|
186671
|
+
value: actual
|
|
186672
|
+
});
|
|
186673
|
+
}
|
|
186674
|
+
};
|
|
186675
|
+
}
|
|
186676
|
+
});
|
|
186677
|
+
|
|
186678
|
+
// src/commands/redirects/index.ts
|
|
186679
|
+
var redirects_exports = {};
|
|
186680
|
+
__export3(redirects_exports, {
|
|
186681
|
+
default: () => main16
|
|
186682
|
+
});
|
|
186683
|
+
async function main16(client2) {
|
|
186684
|
+
const telemetry2 = new RedirectsTelemetryClient({
|
|
186685
|
+
opts: {
|
|
186686
|
+
store: client2.telemetryEventStore
|
|
186687
|
+
}
|
|
186688
|
+
});
|
|
186689
|
+
let parsedArgs;
|
|
186690
|
+
const flagsSpecification = getFlagsSpecification(redirectsCommand.options);
|
|
186691
|
+
try {
|
|
186692
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification, {
|
|
186693
|
+
permissive: true
|
|
186694
|
+
});
|
|
186695
|
+
} catch (err) {
|
|
186696
|
+
printError(err);
|
|
186697
|
+
return 1;
|
|
186698
|
+
}
|
|
186699
|
+
const subArgs = parsedArgs.args.slice(1);
|
|
186700
|
+
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
|
186701
|
+
subArgs,
|
|
186702
|
+
COMMAND_CONFIG17
|
|
186703
|
+
);
|
|
186704
|
+
const needHelp = parsedArgs.flags["--help"];
|
|
186705
|
+
if (!subcommand && needHelp) {
|
|
186706
|
+
telemetry2.trackCliFlagHelp("redirects");
|
|
186707
|
+
output_manager_default.print(help(redirectsCommand, { columns: client2.stderr.columns }));
|
|
186708
|
+
return 2;
|
|
186709
|
+
}
|
|
186710
|
+
function printHelp(command) {
|
|
186711
|
+
output_manager_default.print(
|
|
186712
|
+
help(command, {
|
|
186713
|
+
parent: redirectsCommand,
|
|
186714
|
+
columns: client2.stderr.columns
|
|
186715
|
+
})
|
|
186716
|
+
);
|
|
186717
|
+
}
|
|
186718
|
+
switch (subcommand) {
|
|
186719
|
+
case "list":
|
|
186720
|
+
if (needHelp) {
|
|
186721
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186722
|
+
printHelp(listSubcommand8);
|
|
186723
|
+
return 2;
|
|
186724
|
+
}
|
|
186725
|
+
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
|
186726
|
+
return list7(client2, args2);
|
|
186727
|
+
case "list-versions":
|
|
186728
|
+
if (needHelp) {
|
|
186729
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186730
|
+
printHelp(listVersionsSubcommand);
|
|
186731
|
+
return 2;
|
|
186732
|
+
}
|
|
186733
|
+
telemetry2.trackCliSubcommandListVersions(subcommandOriginal);
|
|
186734
|
+
return listVersions(client2, args2);
|
|
186735
|
+
case "add":
|
|
186736
|
+
if (needHelp) {
|
|
186737
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186738
|
+
printHelp(addSubcommand7);
|
|
186739
|
+
return 2;
|
|
186740
|
+
}
|
|
186741
|
+
telemetry2.trackCliSubcommandAdd(subcommandOriginal);
|
|
186742
|
+
return add7(client2, args2);
|
|
186743
|
+
case "remove":
|
|
186744
|
+
if (needHelp) {
|
|
186745
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186746
|
+
printHelp(removeSubcommand9);
|
|
186747
|
+
return 2;
|
|
186748
|
+
}
|
|
186749
|
+
telemetry2.trackCliSubcommandRemove(subcommandOriginal);
|
|
186750
|
+
return remove5(client2, args2);
|
|
186751
|
+
case "promote":
|
|
186752
|
+
if (needHelp) {
|
|
186753
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186754
|
+
printHelp(promoteSubcommand);
|
|
186755
|
+
return 2;
|
|
186756
|
+
}
|
|
186757
|
+
telemetry2.trackCliSubcommandPromote(subcommandOriginal);
|
|
186758
|
+
return promote(client2, args2);
|
|
186759
|
+
case "restore":
|
|
186760
|
+
if (needHelp) {
|
|
186761
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186762
|
+
printHelp(restoreSubcommand);
|
|
186763
|
+
return 2;
|
|
186764
|
+
}
|
|
186765
|
+
telemetry2.trackCliSubcommandRestore(subcommandOriginal);
|
|
186766
|
+
return restore(client2, args2);
|
|
186767
|
+
default:
|
|
186768
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG17));
|
|
186769
|
+
output_manager_default.print(help(redirectsCommand, { columns: client2.stderr.columns }));
|
|
186770
|
+
return 2;
|
|
186771
|
+
}
|
|
186772
|
+
}
|
|
186773
|
+
var COMMAND_CONFIG17;
|
|
186774
|
+
var init_redirects2 = __esm({
|
|
186775
|
+
"src/commands/redirects/index.ts"() {
|
|
186776
|
+
"use strict";
|
|
186777
|
+
init_get_args();
|
|
186778
|
+
init_get_invalid_subcommand();
|
|
186779
|
+
init_get_subcommand();
|
|
186780
|
+
init_error2();
|
|
186781
|
+
init_help();
|
|
186782
|
+
init_list11();
|
|
186783
|
+
init_list_versions();
|
|
186784
|
+
init_add13();
|
|
186785
|
+
init_remove5();
|
|
186786
|
+
init_promote3();
|
|
186787
|
+
init_restore();
|
|
186788
|
+
init_command32();
|
|
186789
|
+
init_get_flags_specification();
|
|
186790
|
+
init_output_manager();
|
|
186791
|
+
init_commands();
|
|
186792
|
+
init_redirects();
|
|
186793
|
+
COMMAND_CONFIG17 = {
|
|
186794
|
+
list: getCommandAliases(listSubcommand8),
|
|
186795
|
+
"list-versions": getCommandAliases(listVersionsSubcommand),
|
|
186796
|
+
add: getCommandAliases(addSubcommand7),
|
|
186797
|
+
remove: getCommandAliases(removeSubcommand9),
|
|
186798
|
+
promote: getCommandAliases(promoteSubcommand),
|
|
186799
|
+
restore: getCommandAliases(restoreSubcommand)
|
|
186800
|
+
};
|
|
186801
|
+
}
|
|
186802
|
+
});
|
|
186803
|
+
|
|
185498
186804
|
// src/util/url.ts
|
|
185499
186805
|
var normalizeURL2;
|
|
185500
186806
|
var init_url = __esm({
|
|
@@ -185598,7 +186904,7 @@ var init_get_deployments_by_project_id = __esm({
|
|
|
185598
186904
|
|
|
185599
186905
|
// src/util/telemetry/commands/remove/index.ts
|
|
185600
186906
|
var RemoveTelemetryClient;
|
|
185601
|
-
var
|
|
186907
|
+
var init_remove6 = __esm({
|
|
185602
186908
|
"src/util/telemetry/commands/remove/index.ts"() {
|
|
185603
186909
|
"use strict";
|
|
185604
186910
|
init_telemetry();
|
|
@@ -185633,9 +186939,9 @@ var init_remove5 = __esm({
|
|
|
185633
186939
|
// src/commands/remove/index.ts
|
|
185634
186940
|
var remove_exports = {};
|
|
185635
186941
|
__export3(remove_exports, {
|
|
185636
|
-
default: () =>
|
|
186942
|
+
default: () => remove6
|
|
185637
186943
|
});
|
|
185638
|
-
async function
|
|
186944
|
+
async function remove6(client2) {
|
|
185639
186945
|
const telemetryClient = new RemoveTelemetryClient({
|
|
185640
186946
|
opts: {
|
|
185641
186947
|
store: client2.telemetryEventStore
|
|
@@ -185680,7 +186986,7 @@ async function remove5(client2) {
|
|
|
185680
186986
|
}
|
|
185681
186987
|
const { contextName } = await getScope(client2);
|
|
185682
186988
|
output_manager_default.spinner(
|
|
185683
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
|
186989
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk131.default.bold(contextName)}`
|
|
185684
186990
|
);
|
|
185685
186991
|
let aliases;
|
|
185686
186992
|
let projects;
|
|
@@ -185746,7 +187052,7 @@ async function remove5(client2) {
|
|
|
185746
187052
|
});
|
|
185747
187053
|
if (deployments.length === 0 && projects.length === 0) {
|
|
185748
187054
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
|
185749
|
-
const stylizedIds = ids.map((id) =>
|
|
187055
|
+
const stylizedIds = ids.map((id) => import_chalk131.default.bold(`"${id}"`)).join(", ");
|
|
185750
187056
|
const commandName = getCommandName("projects ls");
|
|
185751
187057
|
log2(
|
|
185752
187058
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
|
@@ -185754,7 +187060,7 @@ async function remove5(client2) {
|
|
|
185754
187060
|
return 1;
|
|
185755
187061
|
}
|
|
185756
187062
|
log2(
|
|
185757
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
|
187063
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk131.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
|
185758
187064
|
);
|
|
185759
187065
|
if (deployments.length > 200) {
|
|
185760
187066
|
output_manager_default.warn(
|
|
@@ -185781,11 +187087,11 @@ async function remove5(client2) {
|
|
|
185781
187087
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
|
185782
187088
|
);
|
|
185783
187089
|
deployments.forEach((depl) => {
|
|
185784
|
-
output_manager_default.print(`${
|
|
187090
|
+
output_manager_default.print(`${import_chalk131.default.gray("-")} ${import_chalk131.default.bold(depl.url)}
|
|
185785
187091
|
`);
|
|
185786
187092
|
});
|
|
185787
187093
|
projects.forEach((project) => {
|
|
185788
|
-
output_manager_default.print(`${
|
|
187094
|
+
output_manager_default.print(`${import_chalk131.default.gray("-")} ${import_chalk131.default.bold(project.name)}
|
|
185789
187095
|
`);
|
|
185790
187096
|
});
|
|
185791
187097
|
return 0;
|
|
@@ -185794,7 +187100,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
185794
187100
|
return new Promise((resolve13) => {
|
|
185795
187101
|
if (deployments.length > 0) {
|
|
185796
187102
|
output_manager_default.log(
|
|
185797
|
-
`The following ${(0,
|
|
187103
|
+
`The following ${(0, import_pluralize15.default)(
|
|
185798
187104
|
"deployment",
|
|
185799
187105
|
deployments.length,
|
|
185800
187106
|
deployments.length > 1
|
|
@@ -185802,8 +187108,8 @@ function readConfirmation4(deployments, projects) {
|
|
|
185802
187108
|
);
|
|
185803
187109
|
const deploymentTable = table(
|
|
185804
187110
|
deployments.map((depl) => {
|
|
185805
|
-
const time =
|
|
185806
|
-
const url3 = depl.url ?
|
|
187111
|
+
const time = import_chalk131.default.gray(`${(0, import_ms28.default)(Date.now() - depl.createdAt)} ago`);
|
|
187112
|
+
const url3 = depl.url ? import_chalk131.default.underline(`https://${depl.url}`) : "";
|
|
185807
187113
|
return [` ${depl.id}`, url3, time];
|
|
185808
187114
|
}),
|
|
185809
187115
|
{ align: ["l", "r", "l"], hsep: 6 }
|
|
@@ -185814,13 +187120,13 @@ function readConfirmation4(deployments, projects) {
|
|
|
185814
187120
|
for (const depl of deployments) {
|
|
185815
187121
|
for (const { alias: alias2 } of depl.aliases) {
|
|
185816
187122
|
output_manager_default.warn(
|
|
185817
|
-
`${
|
|
187123
|
+
`${import_chalk131.default.underline(`https://${alias2}`)} is an alias for ${import_chalk131.default.bold(depl.url)} and will be removed`
|
|
185818
187124
|
);
|
|
185819
187125
|
}
|
|
185820
187126
|
}
|
|
185821
187127
|
if (projects.length > 0) {
|
|
185822
187128
|
output_manager_default.print(
|
|
185823
|
-
`The following ${(0,
|
|
187129
|
+
`The following ${(0, import_pluralize15.default)(
|
|
185824
187130
|
"project",
|
|
185825
187131
|
projects.length,
|
|
185826
187132
|
projects.length > 1
|
|
@@ -185828,12 +187134,12 @@ function readConfirmation4(deployments, projects) {
|
|
|
185828
187134
|
`
|
|
185829
187135
|
);
|
|
185830
187136
|
for (const project of projects) {
|
|
185831
|
-
output_manager_default.print(`${
|
|
187137
|
+
output_manager_default.print(`${import_chalk131.default.gray("-")} ${import_chalk131.default.bold(project.name)}
|
|
185832
187138
|
`);
|
|
185833
187139
|
}
|
|
185834
187140
|
}
|
|
185835
187141
|
output_manager_default.print(
|
|
185836
|
-
`${
|
|
187142
|
+
`${import_chalk131.default.bold.red("> Are you sure?")} ${import_chalk131.default.gray("(y/N) ")}`
|
|
185837
187143
|
);
|
|
185838
187144
|
process.stdin.on("data", (d) => {
|
|
185839
187145
|
process.stdin.pause();
|
|
@@ -185843,20 +187149,20 @@ function readConfirmation4(deployments, projects) {
|
|
|
185843
187149
|
}
|
|
185844
187150
|
function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
185845
187151
|
if (!projects || projects.length === 0) {
|
|
185846
|
-
return `${(0,
|
|
187152
|
+
return `${(0, import_pluralize15.default)("deployment", deployments.length, true)}`;
|
|
185847
187153
|
}
|
|
185848
187154
|
if (!deployments || deployments.length === 0) {
|
|
185849
|
-
return `${(0,
|
|
187155
|
+
return `${(0, import_pluralize15.default)("project", projects.length, true)}`;
|
|
185850
187156
|
}
|
|
185851
|
-
return `${(0,
|
|
187157
|
+
return `${(0, import_pluralize15.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize15.default)("project", projects.length, true)}`;
|
|
185852
187158
|
}
|
|
185853
|
-
var
|
|
185854
|
-
var
|
|
187159
|
+
var import_chalk131, import_ms28, import_pluralize15;
|
|
187160
|
+
var init_remove7 = __esm({
|
|
185855
187161
|
"src/commands/remove/index.ts"() {
|
|
185856
187162
|
"use strict";
|
|
185857
|
-
|
|
185858
|
-
|
|
185859
|
-
|
|
187163
|
+
import_chalk131 = __toESM3(require_source());
|
|
187164
|
+
import_ms28 = __toESM3(require_ms());
|
|
187165
|
+
import_pluralize15 = __toESM3(require_pluralize());
|
|
185860
187166
|
init_table();
|
|
185861
187167
|
init_util();
|
|
185862
187168
|
init_get_aliases();
|
|
@@ -185873,9 +187179,9 @@ var init_remove6 = __esm({
|
|
|
185873
187179
|
init_error2();
|
|
185874
187180
|
init_now_error();
|
|
185875
187181
|
init_help();
|
|
185876
|
-
|
|
187182
|
+
init_command33();
|
|
185877
187183
|
init_get_flags_specification();
|
|
185878
|
-
|
|
187184
|
+
init_remove6();
|
|
185879
187185
|
init_output_manager();
|
|
185880
187186
|
}
|
|
185881
187187
|
});
|
|
@@ -185888,8 +187194,8 @@ async function rollbackStatus({
|
|
|
185888
187194
|
project,
|
|
185889
187195
|
timeout = "3m"
|
|
185890
187196
|
}) {
|
|
185891
|
-
const recentThreshold = Date.now() - (0,
|
|
185892
|
-
const rollbackTimeout = Date.now() + (0,
|
|
187197
|
+
const recentThreshold = Date.now() - (0, import_ms29.default)("3m");
|
|
187198
|
+
const rollbackTimeout = Date.now() + (0, import_ms29.default)(timeout);
|
|
185893
187199
|
let counter = 0;
|
|
185894
187200
|
let spinnerMessage = deployment ? "Rollback in progress" : `Checking rollback status of ${project.name}`;
|
|
185895
187201
|
if (!contextName) {
|
|
@@ -185950,7 +187256,7 @@ async function rollbackStatus({
|
|
|
185950
187256
|
}
|
|
185951
187257
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
|
185952
187258
|
output_manager_default.log(
|
|
185953
|
-
`The rollback exceeded its deadline - rerun ${
|
|
187259
|
+
`The rollback exceeded its deadline - rerun ${import_chalk132.default.bold(
|
|
185954
187260
|
`${packageName} rollback ${toDeploymentId}`
|
|
185955
187261
|
)} to try again`
|
|
185956
187262
|
);
|
|
@@ -186014,33 +187320,33 @@ async function renderJobSucceeded2({
|
|
|
186014
187320
|
let deploymentInfo = "";
|
|
186015
187321
|
try {
|
|
186016
187322
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
186017
|
-
deploymentInfo = `${
|
|
187323
|
+
deploymentInfo = `${import_chalk132.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
186018
187324
|
} catch (err) {
|
|
186019
187325
|
output_manager_default.debug(
|
|
186020
187326
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
186021
187327
|
);
|
|
186022
|
-
deploymentInfo =
|
|
187328
|
+
deploymentInfo = import_chalk132.default.bold(toDeploymentId);
|
|
186023
187329
|
}
|
|
186024
187330
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
|
186025
187331
|
output_manager_default.log(
|
|
186026
|
-
`Success! ${
|
|
187332
|
+
`Success! ${import_chalk132.default.bold(
|
|
186027
187333
|
project.name
|
|
186028
187334
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
|
186029
187335
|
);
|
|
186030
187336
|
return 0;
|
|
186031
187337
|
}
|
|
186032
|
-
var
|
|
187338
|
+
var import_chalk132, import_ms29;
|
|
186033
187339
|
var init_status3 = __esm({
|
|
186034
187340
|
"src/commands/rollback/status.ts"() {
|
|
186035
187341
|
"use strict";
|
|
186036
|
-
|
|
187342
|
+
import_chalk132 = __toESM3(require_source());
|
|
186037
187343
|
init_elapsed();
|
|
186038
187344
|
init_format_date();
|
|
186039
187345
|
init_get_deployment();
|
|
186040
187346
|
init_pkg_name();
|
|
186041
187347
|
init_get_project_by_id_or_name();
|
|
186042
187348
|
init_get_scope();
|
|
186043
|
-
|
|
187349
|
+
import_ms29 = __toESM3(require_ms());
|
|
186044
187350
|
init_errors_ts();
|
|
186045
187351
|
init_render_alias_status();
|
|
186046
187352
|
init_sleep();
|
|
@@ -186063,9 +187369,9 @@ async function requestRollback({
|
|
|
186063
187369
|
// required
|
|
186064
187370
|
method: "POST"
|
|
186065
187371
|
});
|
|
186066
|
-
if (timeout !== void 0 && (0,
|
|
187372
|
+
if (timeout !== void 0 && (0, import_ms30.default)(timeout) === 0) {
|
|
186067
187373
|
output_manager_default.log(
|
|
186068
|
-
`Successfully requested rollback of ${
|
|
187374
|
+
`Successfully requested rollback of ${import_chalk133.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
186069
187375
|
);
|
|
186070
187376
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
|
186071
187377
|
return 0;
|
|
@@ -186078,14 +187384,14 @@ async function requestRollback({
|
|
|
186078
187384
|
timeout
|
|
186079
187385
|
});
|
|
186080
187386
|
}
|
|
186081
|
-
var
|
|
187387
|
+
var import_chalk133, import_ms30;
|
|
186082
187388
|
var init_request_rollback = __esm({
|
|
186083
187389
|
"src/commands/rollback/request-rollback.ts"() {
|
|
186084
187390
|
"use strict";
|
|
186085
|
-
|
|
187391
|
+
import_chalk133 = __toESM3(require_source());
|
|
186086
187392
|
init_pkg_name();
|
|
186087
187393
|
init_get_project_by_deployment();
|
|
186088
|
-
|
|
187394
|
+
import_ms30 = __toESM3(require_ms());
|
|
186089
187395
|
init_status3();
|
|
186090
187396
|
init_output_manager();
|
|
186091
187397
|
}
|
|
@@ -186134,7 +187440,7 @@ var rollback_exports = {};
|
|
|
186134
187440
|
__export3(rollback_exports, {
|
|
186135
187441
|
default: () => rollback_default
|
|
186136
187442
|
});
|
|
186137
|
-
var import_error_utils34,
|
|
187443
|
+
var import_error_utils34, import_ms31, rollback_default;
|
|
186138
187444
|
var init_rollback2 = __esm({
|
|
186139
187445
|
"src/commands/rollback/index.ts"() {
|
|
186140
187446
|
"use strict";
|
|
@@ -186142,11 +187448,11 @@ var init_rollback2 = __esm({
|
|
|
186142
187448
|
init_get_project_by_cwd_or_link();
|
|
186143
187449
|
init_error2();
|
|
186144
187450
|
import_error_utils34 = __toESM3(require_dist2());
|
|
186145
|
-
|
|
187451
|
+
import_ms31 = __toESM3(require_ms());
|
|
186146
187452
|
init_request_rollback();
|
|
186147
187453
|
init_status3();
|
|
186148
187454
|
init_help();
|
|
186149
|
-
|
|
187455
|
+
init_command34();
|
|
186150
187456
|
init_get_flags_specification();
|
|
186151
187457
|
init_rollback();
|
|
186152
187458
|
init_output_manager();
|
|
@@ -186173,7 +187479,7 @@ var init_rollback2 = __esm({
|
|
|
186173
187479
|
return 2;
|
|
186174
187480
|
}
|
|
186175
187481
|
const timeout = parsedArgs.flags["--timeout"];
|
|
186176
|
-
if (timeout && (0,
|
|
187482
|
+
if (timeout && (0, import_ms31.default)(timeout) === void 0) {
|
|
186177
187483
|
output_manager_default.error(`Invalid timeout "${timeout}"`);
|
|
186178
187484
|
return 1;
|
|
186179
187485
|
}
|
|
@@ -186513,7 +187819,7 @@ async function rollingRelease(client2) {
|
|
|
186513
187819
|
subcommand,
|
|
186514
187820
|
args: subcommandArgs,
|
|
186515
187821
|
subcommandOriginal
|
|
186516
|
-
} = getSubcommand(client2.argv.slice(3),
|
|
187822
|
+
} = getSubcommand(client2.argv.slice(3), COMMAND_CONFIG18);
|
|
186517
187823
|
const needHelp = client2.argv.includes("--help") || client2.argv.includes("-h");
|
|
186518
187824
|
if (!subcommand && needHelp) {
|
|
186519
187825
|
telemetry2.trackCliFlagHelp("rolling-release");
|
|
@@ -186702,7 +188008,7 @@ async function rollingRelease(client2) {
|
|
|
186702
188008
|
}
|
|
186703
188009
|
default: {
|
|
186704
188010
|
output_manager_default.debug(`Invalid subcommand: ${subcommand}`);
|
|
186705
|
-
output_manager_default.error(getInvalidSubcommand(
|
|
188011
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG18));
|
|
186706
188012
|
output_manager_default.print(
|
|
186707
188013
|
help(rollingReleaseCommand, { columns: client2.stderr.columns })
|
|
186708
188014
|
);
|
|
@@ -186715,14 +188021,14 @@ async function rollingRelease(client2) {
|
|
|
186715
188021
|
return 1;
|
|
186716
188022
|
}
|
|
186717
188023
|
}
|
|
186718
|
-
var
|
|
188024
|
+
var COMMAND_CONFIG18;
|
|
186719
188025
|
var init_rolling_release2 = __esm({
|
|
186720
188026
|
"src/commands/rolling-release/index.ts"() {
|
|
186721
188027
|
"use strict";
|
|
186722
188028
|
init_get_args();
|
|
186723
188029
|
init_get_flags_specification();
|
|
186724
188030
|
init_help();
|
|
186725
|
-
|
|
188031
|
+
init_command35();
|
|
186726
188032
|
init_request_rolling_release();
|
|
186727
188033
|
init_start_rolling_release();
|
|
186728
188034
|
init_configure_rolling_release();
|
|
@@ -186736,7 +188042,7 @@ var init_rolling_release2 = __esm({
|
|
|
186736
188042
|
init_get_subcommand();
|
|
186737
188043
|
init_commands();
|
|
186738
188044
|
init_get_invalid_subcommand();
|
|
186739
|
-
|
|
188045
|
+
COMMAND_CONFIG18 = {
|
|
186740
188046
|
configure: getCommandAliases(configureSubcommand),
|
|
186741
188047
|
start: getCommandAliases(startSubcommand),
|
|
186742
188048
|
approve: getCommandAliases(approveSubcommand),
|
|
@@ -186752,13 +188058,13 @@ function formatBranchMatcher(branchMatcher) {
|
|
|
186752
188058
|
if (branchMatcher?.type === "equals") {
|
|
186753
188059
|
return branchMatcher.pattern;
|
|
186754
188060
|
} else if (branchMatcher?.type === "startsWith") {
|
|
186755
|
-
return `${branchMatcher.pattern}${
|
|
188061
|
+
return `${branchMatcher.pattern}${import_chalk134.default.dim("*")}`;
|
|
186756
188062
|
} else if (branchMatcher?.type === "endsWith") {
|
|
186757
|
-
return `${
|
|
188063
|
+
return `${import_chalk134.default.dim("*")}${branchMatcher.pattern}`;
|
|
186758
188064
|
}
|
|
186759
|
-
return
|
|
188065
|
+
return import_chalk134.default.dim("No branch configuration");
|
|
186760
188066
|
}
|
|
186761
|
-
async function
|
|
188067
|
+
async function list8(client2, argv) {
|
|
186762
188068
|
const { cwd } = client2;
|
|
186763
188069
|
const validationResult = validateLsArgs({
|
|
186764
188070
|
commandName: "target ls",
|
|
@@ -186784,15 +188090,15 @@ async function list7(client2, argv) {
|
|
|
186784
188090
|
accountId: link4.org.id
|
|
186785
188091
|
});
|
|
186786
188092
|
output_manager_default.stopSpinner();
|
|
186787
|
-
const elapsed2 = (0,
|
|
188093
|
+
const elapsed2 = (0, import_ms32.default)(Date.now() - start);
|
|
186788
188094
|
result = withDefaultEnvironmentsIncluded(result);
|
|
186789
188095
|
output_manager_default.log(
|
|
186790
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
|
188096
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk134.default.gray(`[${elapsed2}]`)}`
|
|
186791
188097
|
);
|
|
186792
188098
|
const tablePrint = table(
|
|
186793
188099
|
[
|
|
186794
188100
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
|
186795
|
-
(header) =>
|
|
188101
|
+
(header) => import_chalk134.default.bold(import_chalk134.default.cyan(header))
|
|
186796
188102
|
),
|
|
186797
188103
|
...result.flatMap((target) => {
|
|
186798
188104
|
return [
|
|
@@ -186800,8 +188106,8 @@ async function list7(client2, argv) {
|
|
|
186800
188106
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
|
186801
188107
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
|
186802
188108
|
TYPE_MAP[target.type],
|
|
186803
|
-
|
|
186804
|
-
target.updatedAt > 0 ? (0,
|
|
188109
|
+
import_chalk134.default.gray(
|
|
188110
|
+
target.updatedAt > 0 ? (0, import_ms32.default)(Date.now() - target.updatedAt) : "-"
|
|
186805
188111
|
)
|
|
186806
188112
|
]
|
|
186807
188113
|
];
|
|
@@ -186847,15 +188153,15 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
|
186847
188153
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
|
186848
188154
|
];
|
|
186849
188155
|
}
|
|
186850
|
-
var
|
|
186851
|
-
var
|
|
188156
|
+
var import_ms32, import_chalk134, TYPE_MAP, BRANCH_TRACKING_MAP;
|
|
188157
|
+
var init_list12 = __esm({
|
|
186852
188158
|
"src/commands/target/list.ts"() {
|
|
186853
188159
|
"use strict";
|
|
186854
|
-
|
|
186855
|
-
|
|
188160
|
+
import_ms32 = __toESM3(require_ms());
|
|
188161
|
+
import_chalk134 = __toESM3(require_source());
|
|
186856
188162
|
init_table();
|
|
186857
188163
|
init_output_manager();
|
|
186858
|
-
|
|
188164
|
+
init_command36();
|
|
186859
188165
|
init_validate_ls_args();
|
|
186860
188166
|
init_ensure_link();
|
|
186861
188167
|
init_format_project();
|
|
@@ -186867,8 +188173,8 @@ var init_list11 = __esm({
|
|
|
186867
188173
|
};
|
|
186868
188174
|
BRANCH_TRACKING_MAP = {
|
|
186869
188175
|
production: (project) => project.link?.productionBranch ?? "main",
|
|
186870
|
-
preview: (_, env) => env.slug === "preview" ?
|
|
186871
|
-
development: () =>
|
|
188176
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk134.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
|
188177
|
+
development: () => import_chalk134.default.dim("Accessible via CLI")
|
|
186872
188178
|
};
|
|
186873
188179
|
}
|
|
186874
188180
|
});
|
|
@@ -186893,9 +188199,9 @@ var init_target = __esm({
|
|
|
186893
188199
|
// src/commands/target/index.ts
|
|
186894
188200
|
var target_exports = {};
|
|
186895
188201
|
__export3(target_exports, {
|
|
186896
|
-
default: () =>
|
|
188202
|
+
default: () => main17
|
|
186897
188203
|
});
|
|
186898
|
-
async function
|
|
188204
|
+
async function main17(client2) {
|
|
186899
188205
|
let parsedArgs;
|
|
186900
188206
|
const flagsSpecification = getFlagsSpecification(targetCommand.options);
|
|
186901
188207
|
try {
|
|
@@ -186929,40 +188235,40 @@ async function main16(client2) {
|
|
|
186929
188235
|
case "list":
|
|
186930
188236
|
if (needHelp) {
|
|
186931
188237
|
telemetry2.trackCliFlagHelp("target", "list");
|
|
186932
|
-
printHelp(
|
|
188238
|
+
printHelp(listSubcommand9);
|
|
186933
188239
|
return 2;
|
|
186934
188240
|
}
|
|
186935
188241
|
telemetry2.trackCliSubcommandList(subcommand);
|
|
186936
|
-
return await
|
|
188242
|
+
return await list8(client2, args2);
|
|
186937
188243
|
default:
|
|
186938
|
-
output_manager_default.error(getInvalidSubcommand(
|
|
188244
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG19));
|
|
186939
188245
|
output_manager_default.print(help(targetCommand, { columns: client2.stderr.columns }));
|
|
186940
188246
|
return 2;
|
|
186941
188247
|
}
|
|
186942
188248
|
}
|
|
186943
|
-
var
|
|
188249
|
+
var COMMAND_CONFIG19;
|
|
186944
188250
|
var init_target2 = __esm({
|
|
186945
188251
|
"src/commands/target/index.ts"() {
|
|
186946
188252
|
"use strict";
|
|
186947
188253
|
init_get_args();
|
|
186948
188254
|
init_get_invalid_subcommand();
|
|
186949
188255
|
init_help();
|
|
186950
|
-
|
|
186951
|
-
|
|
188256
|
+
init_list12();
|
|
188257
|
+
init_command36();
|
|
186952
188258
|
init_get_flags_specification();
|
|
186953
188259
|
init_error2();
|
|
186954
188260
|
init_output_manager();
|
|
186955
188261
|
init_target();
|
|
186956
188262
|
init_commands();
|
|
186957
|
-
|
|
186958
|
-
ls: getCommandAliases(
|
|
188263
|
+
COMMAND_CONFIG19 = {
|
|
188264
|
+
ls: getCommandAliases(listSubcommand9)
|
|
186959
188265
|
};
|
|
186960
188266
|
}
|
|
186961
188267
|
});
|
|
186962
188268
|
|
|
186963
188269
|
// src/util/telemetry/commands/teams/list.ts
|
|
186964
188270
|
var TeamsListTelemetryClient;
|
|
186965
|
-
var
|
|
188271
|
+
var init_list13 = __esm({
|
|
186966
188272
|
"src/util/telemetry/commands/teams/list.ts"() {
|
|
186967
188273
|
"use strict";
|
|
186968
188274
|
init_telemetry();
|
|
@@ -187004,7 +188310,7 @@ var init_list12 = __esm({
|
|
|
187004
188310
|
});
|
|
187005
188311
|
|
|
187006
188312
|
// src/commands/teams/list.ts
|
|
187007
|
-
async function
|
|
188313
|
+
async function list9(client2, argv) {
|
|
187008
188314
|
const { config: config2, telemetryEventStore } = client2;
|
|
187009
188315
|
const telemetry2 = new TeamsListTelemetryClient({
|
|
187010
188316
|
opts: {
|
|
@@ -187012,7 +188318,7 @@ async function list8(client2, argv) {
|
|
|
187012
188318
|
}
|
|
187013
188319
|
});
|
|
187014
188320
|
let parsedArgs;
|
|
187015
|
-
const flagsSpecification = getFlagsSpecification(
|
|
188321
|
+
const flagsSpecification = getFlagsSpecification(listSubcommand10.options);
|
|
187016
188322
|
try {
|
|
187017
188323
|
parsedArgs = parseArguments(argv, flagsSpecification);
|
|
187018
188324
|
} catch (error3) {
|
|
@@ -187072,7 +188378,7 @@ async function list8(client2, argv) {
|
|
|
187072
188378
|
client2.stdout.write("\n");
|
|
187073
188379
|
const teamTable = table(
|
|
187074
188380
|
[
|
|
187075
|
-
["id", "Team name"].map((str) => (0,
|
|
188381
|
+
["id", "Team name"].map((str) => (0, import_chalk135.gray)(str)),
|
|
187076
188382
|
...teamList.map((team) => [team.value, team.name])
|
|
187077
188383
|
],
|
|
187078
188384
|
{ hsep: 5 }
|
|
@@ -187089,13 +188395,13 @@ async function list8(client2, argv) {
|
|
|
187089
188395
|
}
|
|
187090
188396
|
return 0;
|
|
187091
188397
|
}
|
|
187092
|
-
var
|
|
187093
|
-
var
|
|
188398
|
+
var import_chalk135;
|
|
188399
|
+
var init_list14 = __esm({
|
|
187094
188400
|
"src/commands/teams/list.ts"() {
|
|
187095
188401
|
"use strict";
|
|
187096
188402
|
init_chars();
|
|
187097
188403
|
init_table();
|
|
187098
|
-
|
|
188404
|
+
import_chalk135 = __toESM3(require_source());
|
|
187099
188405
|
init_get_user();
|
|
187100
188406
|
init_get_teams();
|
|
187101
188407
|
init_pkg_name();
|
|
@@ -187104,9 +188410,9 @@ var init_list13 = __esm({
|
|
|
187104
188410
|
init_get_args();
|
|
187105
188411
|
init_error2();
|
|
187106
188412
|
init_get_flags_specification();
|
|
187107
|
-
|
|
188413
|
+
init_command37();
|
|
187108
188414
|
init_output_manager();
|
|
187109
|
-
|
|
188415
|
+
init_list13();
|
|
187110
188416
|
init_validate_ls_args();
|
|
187111
188417
|
}
|
|
187112
188418
|
});
|
|
@@ -187191,7 +188497,7 @@ Please select a team scope using ${getCommandName(
|
|
|
187191
188497
|
return 1;
|
|
187192
188498
|
}
|
|
187193
188499
|
output_manager_default.log(
|
|
187194
|
-
introMsg || `Inviting team members to ${
|
|
188500
|
+
introMsg || `Inviting team members to ${import_chalk136.default.bold(currentTeam.name)}`
|
|
187195
188501
|
);
|
|
187196
188502
|
telemetry2.trackCliArgumentEmail(emails);
|
|
187197
188503
|
if (emails.length > 0) {
|
|
@@ -187211,10 +188517,10 @@ Please select a team scope using ${getCommandName(
|
|
|
187211
188517
|
throw err;
|
|
187212
188518
|
}
|
|
187213
188519
|
output_manager_default.log(
|
|
187214
|
-
`${
|
|
188520
|
+
`${import_chalk136.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
|
187215
188521
|
);
|
|
187216
188522
|
} else {
|
|
187217
|
-
output_manager_default.log(`${
|
|
188523
|
+
output_manager_default.log(`${import_chalk136.default.red(`\u2716 ${email3}`)} ${import_chalk136.default.gray("[invalid]")}`);
|
|
187218
188524
|
}
|
|
187219
188525
|
}
|
|
187220
188526
|
return 0;
|
|
@@ -187247,15 +188553,15 @@ Please select a team scope using ${getCommandName(
|
|
|
187247
188553
|
);
|
|
187248
188554
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
|
187249
188555
|
emails.push(email2);
|
|
187250
|
-
output_manager_default.log(`${
|
|
188556
|
+
output_manager_default.log(`${import_chalk136.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
|
187251
188557
|
if (hasError) {
|
|
187252
188558
|
hasError = false;
|
|
187253
188559
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
187254
188560
|
output_manager_default.log(
|
|
187255
|
-
introMsg || `Inviting team members to ${
|
|
188561
|
+
introMsg || `Inviting team members to ${import_chalk136.default.bold(currentTeam.name)}`
|
|
187256
188562
|
);
|
|
187257
188563
|
for (const email3 of emails) {
|
|
187258
|
-
output_manager_default.log(`${
|
|
188564
|
+
output_manager_default.log(`${import_chalk136.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
187259
188565
|
}
|
|
187260
188566
|
}
|
|
187261
188567
|
} catch (err) {
|
|
@@ -187264,7 +188570,7 @@ Please select a team scope using ${getCommandName(
|
|
|
187264
188570
|
output_manager_default.error((0, import_error_utils35.errorToString)(err));
|
|
187265
188571
|
hasError = true;
|
|
187266
188572
|
for (const email3 of emails) {
|
|
187267
|
-
output_manager_default.log(`${
|
|
188573
|
+
output_manager_default.log(`${import_chalk136.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
|
187268
188574
|
}
|
|
187269
188575
|
}
|
|
187270
188576
|
}
|
|
@@ -187277,16 +188583,16 @@ Please select a team scope using ${getCommandName(
|
|
|
187277
188583
|
} else {
|
|
187278
188584
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
|
187279
188585
|
for (const email3 of emails) {
|
|
187280
|
-
output_manager_default.log(`${
|
|
188586
|
+
output_manager_default.log(`${import_chalk136.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
187281
188587
|
}
|
|
187282
188588
|
}
|
|
187283
188589
|
return 0;
|
|
187284
188590
|
}
|
|
187285
|
-
var
|
|
188591
|
+
var import_chalk136, import_error_utils35, validateEmail, domains;
|
|
187286
188592
|
var init_invite2 = __esm({
|
|
187287
188593
|
"src/commands/teams/invite.ts"() {
|
|
187288
188594
|
"use strict";
|
|
187289
|
-
|
|
188595
|
+
import_chalk136 = __toESM3(require_source());
|
|
187290
188596
|
init_cmd();
|
|
187291
188597
|
init_stamp();
|
|
187292
188598
|
init_param();
|
|
@@ -187304,7 +188610,7 @@ var init_invite2 = __esm({
|
|
|
187304
188610
|
init_get_args();
|
|
187305
188611
|
init_get_flags_specification();
|
|
187306
188612
|
init_error2();
|
|
187307
|
-
|
|
188613
|
+
init_command37();
|
|
187308
188614
|
validateEmail = (data) => email.test(data.trim()) || data.length === 0;
|
|
187309
188615
|
domains = Array.from(
|
|
187310
188616
|
/* @__PURE__ */ new Set([
|
|
@@ -187357,12 +188663,12 @@ var init_patch_team = __esm({
|
|
|
187357
188663
|
});
|
|
187358
188664
|
|
|
187359
188665
|
// src/commands/teams/add.ts
|
|
187360
|
-
async function
|
|
188666
|
+
async function add8(client2) {
|
|
187361
188667
|
let slug;
|
|
187362
188668
|
let team;
|
|
187363
188669
|
let elapsed2;
|
|
187364
188670
|
output_manager_default.log(
|
|
187365
|
-
`Pick a team identifier for its URL (e.g.: ${
|
|
188671
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk137.default.cyan(
|
|
187366
188672
|
"`vercel.com/acme`"
|
|
187367
188673
|
)})`
|
|
187368
188674
|
);
|
|
@@ -187393,7 +188699,7 @@ async function add7(client2) {
|
|
|
187393
188699
|
output_manager_default.stopSpinner();
|
|
187394
188700
|
process.stdout.write(eraseLines(2));
|
|
187395
188701
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
|
187396
|
-
output_manager_default.log(`${
|
|
188702
|
+
output_manager_default.log(`${import_chalk137.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
|
187397
188703
|
`);
|
|
187398
188704
|
output_manager_default.log("Pick a display name for your team");
|
|
187399
188705
|
let name;
|
|
@@ -187416,7 +188722,7 @@ async function add7(client2) {
|
|
|
187416
188722
|
process.stdout.write(eraseLines(2));
|
|
187417
188723
|
team = Object.assign(team, res);
|
|
187418
188724
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
|
187419
|
-
output_manager_default.log(`${
|
|
188725
|
+
output_manager_default.log(`${import_chalk137.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
|
187420
188726
|
`);
|
|
187421
188727
|
output_manager_default.spinner("Saving");
|
|
187422
188728
|
client2.config.currentTeam = team.id;
|
|
@@ -187430,11 +188736,11 @@ async function add7(client2) {
|
|
|
187430
188736
|
});
|
|
187431
188737
|
return 0;
|
|
187432
188738
|
}
|
|
187433
|
-
var
|
|
187434
|
-
var
|
|
188739
|
+
var import_chalk137, import_error_utils36, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
|
188740
|
+
var init_add14 = __esm({
|
|
187435
188741
|
"src/commands/teams/add.ts"() {
|
|
187436
188742
|
"use strict";
|
|
187437
|
-
|
|
188743
|
+
import_chalk137 = __toESM3(require_source());
|
|
187438
188744
|
init_stamp();
|
|
187439
188745
|
init_erase_lines();
|
|
187440
188746
|
init_chars();
|
|
@@ -187447,7 +188753,7 @@ var init_add13 = __esm({
|
|
|
187447
188753
|
init_output_manager();
|
|
187448
188754
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
|
187449
188755
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
|
187450
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
|
188756
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk137.default.gray("vercel.com/");
|
|
187451
188757
|
teamNamePrefix = "Team Name".padEnd(14);
|
|
187452
188758
|
}
|
|
187453
188759
|
});
|
|
@@ -187506,7 +188812,7 @@ async function change(client2, argv) {
|
|
|
187506
188812
|
let title9 = `${team.name} (${team.slug})`;
|
|
187507
188813
|
const selected = team.id === currentTeam?.id;
|
|
187508
188814
|
if (selected) {
|
|
187509
|
-
title9 += ` ${
|
|
188815
|
+
title9 += ` ${import_chalk138.default.bold("(current)")}`;
|
|
187510
188816
|
}
|
|
187511
188817
|
if (team.limited) {
|
|
187512
188818
|
title9 += ` ${emoji("locked")}`;
|
|
@@ -187518,7 +188824,7 @@ async function change(client2, argv) {
|
|
|
187518
188824
|
selected
|
|
187519
188825
|
};
|
|
187520
188826
|
});
|
|
187521
|
-
let suffix = personalScopeSelected ? ` ${
|
|
188827
|
+
let suffix = personalScopeSelected ? ` ${import_chalk138.default.bold("(current)")}` : "";
|
|
187522
188828
|
if (user.limited) {
|
|
187523
188829
|
suffix += ` ${emoji("locked")}`;
|
|
187524
188830
|
}
|
|
@@ -187564,14 +188870,14 @@ async function change(client2, argv) {
|
|
|
187564
188870
|
}
|
|
187565
188871
|
updateCurrentTeam(config2);
|
|
187566
188872
|
output_manager_default.success(
|
|
187567
|
-
`Your account (${
|
|
188873
|
+
`Your account (${import_chalk138.default.bold(user.username)}) is now active!`
|
|
187568
188874
|
);
|
|
187569
188875
|
return 0;
|
|
187570
188876
|
}
|
|
187571
188877
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
|
187572
188878
|
if (!newTeam) {
|
|
187573
188879
|
output_manager_default.error(
|
|
187574
|
-
`You do not have permission to access scope ${
|
|
188880
|
+
`You do not have permission to access scope ${import_chalk138.default.bold(desiredSlug)}.`
|
|
187575
188881
|
);
|
|
187576
188882
|
return 1;
|
|
187577
188883
|
}
|
|
@@ -187589,15 +188895,15 @@ async function change(client2, argv) {
|
|
|
187589
188895
|
}
|
|
187590
188896
|
updateCurrentTeam(config2, newTeam);
|
|
187591
188897
|
output_manager_default.success(
|
|
187592
|
-
`The team ${
|
|
188898
|
+
`The team ${import_chalk138.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
|
187593
188899
|
);
|
|
187594
188900
|
return 0;
|
|
187595
188901
|
}
|
|
187596
|
-
var
|
|
188902
|
+
var import_chalk138, updateCurrentTeam;
|
|
187597
188903
|
var init_switch2 = __esm({
|
|
187598
188904
|
"src/commands/teams/switch.ts"() {
|
|
187599
188905
|
"use strict";
|
|
187600
|
-
|
|
188906
|
+
import_chalk138 = __toESM3(require_source());
|
|
187601
188907
|
init_emoji();
|
|
187602
188908
|
init_get_user();
|
|
187603
188909
|
init_get_teams();
|
|
@@ -187605,7 +188911,7 @@ var init_switch2 = __esm({
|
|
|
187605
188911
|
init_files();
|
|
187606
188912
|
init_output_manager();
|
|
187607
188913
|
init_switch();
|
|
187608
|
-
|
|
188914
|
+
init_command37();
|
|
187609
188915
|
init_get_args();
|
|
187610
188916
|
init_get_flags_specification();
|
|
187611
188917
|
init_error2();
|
|
@@ -187689,7 +188995,7 @@ async function teams(client2) {
|
|
|
187689
188995
|
}
|
|
187690
188996
|
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
|
187691
188997
|
parsedArgs.args.slice(1),
|
|
187692
|
-
|
|
188998
|
+
COMMAND_CONFIG20
|
|
187693
188999
|
);
|
|
187694
189000
|
const needHelp = parsedArgs.flags["--help"];
|
|
187695
189001
|
if (!subcommand && needHelp) {
|
|
@@ -187706,11 +189012,11 @@ async function teams(client2) {
|
|
|
187706
189012
|
case "list": {
|
|
187707
189013
|
if (needHelp) {
|
|
187708
189014
|
telemetry2.trackCliFlagHelp("teams", subcommandOriginal);
|
|
187709
|
-
printHelp(
|
|
189015
|
+
printHelp(listSubcommand10);
|
|
187710
189016
|
return 2;
|
|
187711
189017
|
}
|
|
187712
189018
|
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
|
187713
|
-
return
|
|
189019
|
+
return list9(client2, args2);
|
|
187714
189020
|
}
|
|
187715
189021
|
case "switch": {
|
|
187716
189022
|
if (needHelp) {
|
|
@@ -187724,11 +189030,11 @@ async function teams(client2) {
|
|
|
187724
189030
|
case "add": {
|
|
187725
189031
|
if (needHelp) {
|
|
187726
189032
|
telemetry2.trackCliFlagHelp("teams", subcommandOriginal);
|
|
187727
|
-
printHelp(
|
|
189033
|
+
printHelp(addSubcommand8);
|
|
187728
189034
|
return 2;
|
|
187729
189035
|
}
|
|
187730
189036
|
telemetry2.trackCliSubcommandAdd(subcommandOriginal);
|
|
187731
|
-
return
|
|
189037
|
+
return add8(client2);
|
|
187732
189038
|
}
|
|
187733
189039
|
case "invite": {
|
|
187734
189040
|
if (needHelp) {
|
|
@@ -187748,23 +189054,23 @@ async function teams(client2) {
|
|
|
187748
189054
|
}
|
|
187749
189055
|
}
|
|
187750
189056
|
}
|
|
187751
|
-
var
|
|
189057
|
+
var COMMAND_CONFIG20;
|
|
187752
189058
|
var init_teams2 = __esm({
|
|
187753
189059
|
"src/commands/teams/index.ts"() {
|
|
187754
189060
|
"use strict";
|
|
187755
|
-
|
|
187756
|
-
|
|
189061
|
+
init_list14();
|
|
189062
|
+
init_add14();
|
|
187757
189063
|
init_switch2();
|
|
187758
189064
|
init_invite2();
|
|
187759
189065
|
init_get_args();
|
|
187760
|
-
|
|
189066
|
+
init_command37();
|
|
187761
189067
|
init_help();
|
|
187762
189068
|
init_get_flags_specification();
|
|
187763
189069
|
init_error2();
|
|
187764
189070
|
init_teams();
|
|
187765
189071
|
init_output_manager();
|
|
187766
189072
|
init_get_subcommand();
|
|
187767
|
-
|
|
189073
|
+
COMMAND_CONFIG20 = {
|
|
187768
189074
|
list: ["ls", "list"],
|
|
187769
189075
|
switch: ["switch", "change"],
|
|
187770
189076
|
add: ["create", "add"],
|
|
@@ -187776,13 +189082,13 @@ var init_teams2 = __esm({
|
|
|
187776
189082
|
// src/commands/telemetry/status.ts
|
|
187777
189083
|
async function status2(client2) {
|
|
187778
189084
|
const enabled = client2.config.telemetry?.enabled !== false;
|
|
187779
|
-
const status3 = enabled ?
|
|
189085
|
+
const status3 = enabled ? import_chalk139.default.green("Enabled") : import_chalk139.default.red("Disabled");
|
|
187780
189086
|
output_manager_default.print("\n");
|
|
187781
|
-
output_manager_default.log(`${
|
|
189087
|
+
output_manager_default.log(`${import_chalk139.default.bold("Telemetry status")}: ${status3}
|
|
187782
189088
|
`);
|
|
187783
189089
|
const learnMoreMessage = `
|
|
187784
189090
|
|
|
187785
|
-
Learn more: ${
|
|
189091
|
+
Learn more: ${import_chalk139.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
|
187786
189092
|
if (enabled) {
|
|
187787
189093
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
|
187788
189094
|
} else {
|
|
@@ -187793,11 +189099,11 @@ Learn more: ${import_chalk133.default.cyan("https://vercel.com/docs/cli/about-te
|
|
|
187793
189099
|
}
|
|
187794
189100
|
return 0;
|
|
187795
189101
|
}
|
|
187796
|
-
var
|
|
189102
|
+
var import_chalk139;
|
|
187797
189103
|
var init_status4 = __esm({
|
|
187798
189104
|
"src/commands/telemetry/status.ts"() {
|
|
187799
189105
|
"use strict";
|
|
187800
|
-
|
|
189106
|
+
import_chalk139 = __toESM3(require_source());
|
|
187801
189107
|
init_output_manager();
|
|
187802
189108
|
}
|
|
187803
189109
|
});
|
|
@@ -187933,7 +189239,7 @@ async function telemetry(client2) {
|
|
|
187933
189239
|
}
|
|
187934
189240
|
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
|
187935
189241
|
parsedArguments.args.slice(1),
|
|
187936
|
-
|
|
189242
|
+
COMMAND_CONFIG21
|
|
187937
189243
|
);
|
|
187938
189244
|
const needHelp = parsedArguments.flags["--help"];
|
|
187939
189245
|
function printHelp(command) {
|
|
@@ -187978,7 +189284,7 @@ async function telemetry(client2) {
|
|
|
187978
189284
|
default: {
|
|
187979
189285
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
|
187980
189286
|
output_manager_default.print(
|
|
187981
|
-
`${
|
|
189287
|
+
`${import_chalk140.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
|
187982
189288
|
`
|
|
187983
189289
|
);
|
|
187984
189290
|
output_manager_default.print(help(telemetryCommand, { columns: client2.stderr.columns }));
|
|
@@ -187986,7 +189292,7 @@ async function telemetry(client2) {
|
|
|
187986
189292
|
}
|
|
187987
189293
|
}
|
|
187988
189294
|
}
|
|
187989
|
-
var
|
|
189295
|
+
var import_chalk140, COMMAND_CONFIG21;
|
|
187990
189296
|
var init_telemetry3 = __esm({
|
|
187991
189297
|
"src/commands/telemetry/index.ts"() {
|
|
187992
189298
|
"use strict";
|
|
@@ -187998,13 +189304,13 @@ var init_telemetry3 = __esm({
|
|
|
187998
189304
|
init_enable2();
|
|
187999
189305
|
init_disable2();
|
|
188000
189306
|
init_flush();
|
|
188001
|
-
|
|
189307
|
+
init_command38();
|
|
188002
189308
|
init_get_flags_specification();
|
|
188003
189309
|
init_telemetry2();
|
|
188004
|
-
|
|
189310
|
+
import_chalk140 = __toESM3(require_source());
|
|
188005
189311
|
init_output_manager();
|
|
188006
189312
|
init_commands();
|
|
188007
|
-
|
|
189313
|
+
COMMAND_CONFIG21 = {
|
|
188008
189314
|
status: getCommandAliases(statusSubcommand4),
|
|
188009
189315
|
enable: getCommandAliases(enableSubcommand2),
|
|
188010
189316
|
disable: getCommandAliases(disableSubcommand2),
|
|
@@ -188061,7 +189367,7 @@ var init_whoami2 = __esm({
|
|
|
188061
189367
|
"src/commands/whoami/index.ts"() {
|
|
188062
189368
|
"use strict";
|
|
188063
189369
|
init_help();
|
|
188064
|
-
|
|
189370
|
+
init_command39();
|
|
188065
189371
|
init_get_scope();
|
|
188066
189372
|
init_get_args();
|
|
188067
189373
|
init_get_flags_specification();
|
|
@@ -188076,7 +189382,7 @@ var import_error_utils37 = __toESM3(require_dist2());
|
|
|
188076
189382
|
var import_path41 = require("path");
|
|
188077
189383
|
var import_fs8 = require("fs");
|
|
188078
189384
|
var import_fs_extra24 = __toESM3(require_lib());
|
|
188079
|
-
var
|
|
189385
|
+
var import_chalk141 = __toESM3(require_source());
|
|
188080
189386
|
var import_epipebomb = __toESM3(require_epipebomb());
|
|
188081
189387
|
|
|
188082
189388
|
// src/util/get-latest-version/index.ts
|
|
@@ -188710,6 +190016,12 @@ var RootTelemetryClient = class extends TelemetryClient {
|
|
|
188710
190016
|
value: actual
|
|
188711
190017
|
});
|
|
188712
190018
|
}
|
|
190019
|
+
trackCliCommandRedirects(actual) {
|
|
190020
|
+
this.trackCliCommand({
|
|
190021
|
+
command: "redirects",
|
|
190022
|
+
value: actual
|
|
190023
|
+
});
|
|
190024
|
+
}
|
|
188713
190025
|
trackCliCommandRemove(actual) {
|
|
188714
190026
|
this.trackCliCommand({
|
|
188715
190027
|
command: "remove",
|
|
@@ -189009,7 +190321,7 @@ Sentry.init({
|
|
|
189009
190321
|
var client;
|
|
189010
190322
|
var { isTTY: isTTY2 } = process.stdout;
|
|
189011
190323
|
var apiUrl = "https://api.vercel.com";
|
|
189012
|
-
var
|
|
190324
|
+
var main18 = async () => {
|
|
189013
190325
|
if (process.env.FORCE_TTY === "1") {
|
|
189014
190326
|
isTTY2 = true;
|
|
189015
190327
|
process.stdout.isTTY = true;
|
|
@@ -189060,13 +190372,13 @@ var main17 = async () => {
|
|
|
189060
190372
|
const betaCommands = ["curl"];
|
|
189061
190373
|
if (betaCommands.includes(targetOrSubcommand)) {
|
|
189062
190374
|
output_manager_default.print(
|
|
189063
|
-
`${
|
|
190375
|
+
`${import_chalk141.default.grey(
|
|
189064
190376
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
|
189065
190377
|
)}
|
|
189066
190378
|
`
|
|
189067
190379
|
);
|
|
189068
190380
|
} else {
|
|
189069
|
-
output_manager_default.print(`${
|
|
190381
|
+
output_manager_default.print(`${import_chalk141.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
|
189070
190382
|
`);
|
|
189071
190383
|
}
|
|
189072
190384
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
|
@@ -189519,9 +190831,13 @@ var main17 = async () => {
|
|
|
189519
190831
|
telemetry2.trackCliCommandRedeploy(userSuppliedSubCommand);
|
|
189520
190832
|
func = (init_redeploy2(), __toCommonJS3(redeploy_exports)).default;
|
|
189521
190833
|
break;
|
|
190834
|
+
case "redirects":
|
|
190835
|
+
telemetry2.trackCliCommandRedirects(userSuppliedSubCommand);
|
|
190836
|
+
func = (init_redirects2(), __toCommonJS3(redirects_exports)).default;
|
|
190837
|
+
break;
|
|
189522
190838
|
case "remove":
|
|
189523
190839
|
telemetry2.trackCliCommandRemove(userSuppliedSubCommand);
|
|
189524
|
-
func = (
|
|
190840
|
+
func = (init_remove7(), __toCommonJS3(remove_exports)).default;
|
|
189525
190841
|
break;
|
|
189526
190842
|
case "rollback":
|
|
189527
190843
|
telemetry2.trackCliCommandRollback(userSuppliedSubCommand);
|
|
@@ -189642,27 +190958,27 @@ ${err.stack}`);
|
|
|
189642
190958
|
};
|
|
189643
190959
|
process.on("unhandledRejection", handleRejection);
|
|
189644
190960
|
process.on("uncaughtException", handleUnexpected);
|
|
189645
|
-
|
|
190961
|
+
main18().then(async (exitCode2) => {
|
|
189646
190962
|
if (isTTY2 && !process.env.NO_UPDATE_NOTIFIER) {
|
|
189647
190963
|
const latest = getLatestVersion({
|
|
189648
190964
|
pkg: pkg_default
|
|
189649
190965
|
});
|
|
189650
190966
|
if (latest) {
|
|
189651
190967
|
const changelog = "https://github.com/vercel/vercel/releases";
|
|
189652
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
190968
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk141.default.magenta(
|
|
189653
190969
|
`
|
|
189654
190970
|
|
|
189655
|
-
The latest update ${
|
|
190971
|
+
The latest update ${import_chalk141.default.italic(
|
|
189656
190972
|
"may"
|
|
189657
190973
|
)} fix any errors that occurred.`
|
|
189658
190974
|
) : "";
|
|
189659
190975
|
output_manager_default.print(
|
|
189660
190976
|
box(
|
|
189661
|
-
`Update available! ${
|
|
190977
|
+
`Update available! ${import_chalk141.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk141.default.green(
|
|
189662
190978
|
`v${latest}`
|
|
189663
190979
|
)}
|
|
189664
190980
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
189665
|
-
Run ${
|
|
190981
|
+
Run ${import_chalk141.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
|
189666
190982
|
)
|
|
189667
190983
|
);
|
|
189668
190984
|
output_manager_default.print("\n\n");
|