vercel 49.0.0 → 49.1.1
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 +1994 -631
- package/package.json +4 -4
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 = {
|
|
@@ -2302,11 +2302,11 @@ var require_symlink = __commonJS2({
|
|
|
2302
2302
|
});
|
|
2303
2303
|
}
|
|
2304
2304
|
function _createSymlink(srcpath, dstpath, type, callback) {
|
|
2305
|
-
symlinkPaths(srcpath, dstpath, (err,
|
|
2305
|
+
symlinkPaths(srcpath, dstpath, (err, relative8) => {
|
|
2306
2306
|
if (err)
|
|
2307
2307
|
return callback(err);
|
|
2308
|
-
srcpath =
|
|
2309
|
-
symlinkType(
|
|
2308
|
+
srcpath = relative8.toDst;
|
|
2309
|
+
symlinkType(relative8.toCwd, type, (err2, type2) => {
|
|
2310
2310
|
if (err2)
|
|
2311
2311
|
return callback(err2);
|
|
2312
2312
|
const dir = path11.dirname(dstpath);
|
|
@@ -2336,9 +2336,9 @@ var require_symlink = __commonJS2({
|
|
|
2336
2336
|
if (areIdentical(srcStat, dstStat))
|
|
2337
2337
|
return;
|
|
2338
2338
|
}
|
|
2339
|
-
const
|
|
2340
|
-
srcpath =
|
|
2341
|
-
type = symlinkTypeSync(
|
|
2339
|
+
const relative8 = symlinkPathsSync(srcpath, dstpath);
|
|
2340
|
+
srcpath = relative8.toDst;
|
|
2341
|
+
type = symlinkTypeSync(relative8.toCwd, type);
|
|
2342
2342
|
const dir = path11.dirname(dstpath);
|
|
2343
2343
|
const exists = fs15.existsSync(dir);
|
|
2344
2344
|
if (exists)
|
|
@@ -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 + " " : "";
|
|
@@ -12385,7 +12385,7 @@ var require_path = __commonJS2({
|
|
|
12385
12385
|
}
|
|
12386
12386
|
return arr.slice(start, end - start + 1);
|
|
12387
12387
|
}
|
|
12388
|
-
function
|
|
12388
|
+
function relative8(from, to) {
|
|
12389
12389
|
from = resolve13(from).slice(1);
|
|
12390
12390
|
to = resolve13(to).slice(1);
|
|
12391
12391
|
const fromParts = trim(from.split("/"));
|
|
@@ -12450,7 +12450,7 @@ var require_path = __commonJS2({
|
|
|
12450
12450
|
exports2.isAbsolute = isAbsolute2;
|
|
12451
12451
|
exports2.join = join25;
|
|
12452
12452
|
exports2.normalizePath = normalizePath6;
|
|
12453
|
-
exports2.relative =
|
|
12453
|
+
exports2.relative = relative8;
|
|
12454
12454
|
exports2.resolve = resolve13;
|
|
12455
12455
|
}
|
|
12456
12456
|
});
|
|
@@ -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 = {
|
|
@@ -48490,11 +48687,11 @@ var require_symlink2 = __commonJS2({
|
|
|
48490
48687
|
return callback(err);
|
|
48491
48688
|
if (destinationExists)
|
|
48492
48689
|
return callback(null);
|
|
48493
|
-
symlinkPaths(srcpath, dstpath, (err2,
|
|
48690
|
+
symlinkPaths(srcpath, dstpath, (err2, relative8) => {
|
|
48494
48691
|
if (err2)
|
|
48495
48692
|
return callback(err2);
|
|
48496
|
-
srcpath =
|
|
48497
|
-
symlinkType(
|
|
48693
|
+
srcpath = relative8.toDst;
|
|
48694
|
+
symlinkType(relative8.toCwd, type, (err3, type2) => {
|
|
48498
48695
|
if (err3)
|
|
48499
48696
|
return callback(err3);
|
|
48500
48697
|
const dir = path11.dirname(dstpath);
|
|
@@ -48517,9 +48714,9 @@ var require_symlink2 = __commonJS2({
|
|
|
48517
48714
|
const destinationExists = fs15.existsSync(dstpath);
|
|
48518
48715
|
if (destinationExists)
|
|
48519
48716
|
return void 0;
|
|
48520
|
-
const
|
|
48521
|
-
srcpath =
|
|
48522
|
-
type = symlinkTypeSync(
|
|
48717
|
+
const relative8 = symlinkPathsSync(srcpath, dstpath);
|
|
48718
|
+
srcpath = relative8.toDst;
|
|
48719
|
+
type = symlinkTypeSync(relative8.toCwd, type);
|
|
48523
48720
|
const dir = path11.dirname(dstpath);
|
|
48524
48721
|
const exists = fs15.existsSync(dir);
|
|
48525
48722
|
if (exists)
|
|
@@ -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;
|
|
@@ -49788,7 +49985,7 @@ var require_package = __commonJS2({
|
|
|
49788
49985
|
"../client/package.json"(exports2, module2) {
|
|
49789
49986
|
module2.exports = {
|
|
49790
49987
|
name: "@vercel/client",
|
|
49791
|
-
version: "17.2.
|
|
49988
|
+
version: "17.2.15",
|
|
49792
49989
|
main: "dist/index.js",
|
|
49793
49990
|
typings: "dist/index.d.ts",
|
|
49794
49991
|
homepage: "https://vercel.com",
|
|
@@ -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))) {
|
|
@@ -55648,15 +55845,15 @@ var require_pattern = __commonJS2({
|
|
|
55648
55845
|
exports2.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
55649
55846
|
function partitionAbsoluteAndRelative(patterns) {
|
|
55650
55847
|
const absolute = [];
|
|
55651
|
-
const
|
|
55848
|
+
const relative8 = [];
|
|
55652
55849
|
for (const pattern of patterns) {
|
|
55653
55850
|
if (isAbsolute2(pattern)) {
|
|
55654
55851
|
absolute.push(pattern);
|
|
55655
55852
|
} else {
|
|
55656
|
-
|
|
55853
|
+
relative8.push(pattern);
|
|
55657
55854
|
}
|
|
55658
55855
|
}
|
|
55659
|
-
return [absolute,
|
|
55856
|
+
return [absolute, relative8];
|
|
55660
55857
|
}
|
|
55661
55858
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
55662
55859
|
function isAbsolute2(pattern) {
|
|
@@ -58208,7 +58405,7 @@ var require_utils14 = __commonJS2({
|
|
|
58208
58405
|
createDebug: () => createDebug,
|
|
58209
58406
|
fetch: () => fetch6,
|
|
58210
58407
|
getApiDeploymentsUrl: () => getApiDeploymentsUrl,
|
|
58211
|
-
getVercelIgnore: () =>
|
|
58408
|
+
getVercelIgnore: () => getVercelIgnore5,
|
|
58212
58409
|
parseVercelConfig: () => parseVercelConfig,
|
|
58213
58410
|
prepareFiles: () => prepareFiles
|
|
58214
58411
|
});
|
|
@@ -58282,7 +58479,7 @@ var require_utils14 = __commonJS2({
|
|
|
58282
58479
|
}, debug2) {
|
|
58283
58480
|
const ignoreList = [];
|
|
58284
58481
|
let fileList;
|
|
58285
|
-
let { ig, ignores } = await
|
|
58482
|
+
let { ig, ignores } = await getVercelIgnore5(path11, prebuilt, vercelOutputDir);
|
|
58286
58483
|
debug2(`Found ${ignores.length} rules in .vercelignore`);
|
|
58287
58484
|
debug2("Building file tree...");
|
|
58288
58485
|
if (isDirectory2 && !Array.isArray(path11)) {
|
|
@@ -58353,7 +58550,7 @@ var require_utils14 = __commonJS2({
|
|
|
58353
58550
|
}
|
|
58354
58551
|
return { fileList, ignoreList };
|
|
58355
58552
|
}
|
|
58356
|
-
async function
|
|
58553
|
+
async function getVercelIgnore5(cwd, prebuilt, vercelOutputDir) {
|
|
58357
58554
|
const ig = (0, import_ignore.default)();
|
|
58358
58555
|
let ignores;
|
|
58359
58556
|
if (prebuilt) {
|
|
@@ -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;
|
|
@@ -64497,51 +64694,51 @@ var require_uri_all = __commonJS2({
|
|
|
64497
64694
|
}
|
|
64498
64695
|
return uriTokens.join("");
|
|
64499
64696
|
}
|
|
64500
|
-
function resolveComponents(base2,
|
|
64697
|
+
function resolveComponents(base2, relative8) {
|
|
64501
64698
|
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
64502
64699
|
var skipNormalization = arguments[3];
|
|
64503
64700
|
var target = {};
|
|
64504
64701
|
if (!skipNormalization) {
|
|
64505
64702
|
base2 = parse11(serialize(base2, options), options);
|
|
64506
|
-
|
|
64703
|
+
relative8 = parse11(serialize(relative8, options), options);
|
|
64507
64704
|
}
|
|
64508
64705
|
options = options || {};
|
|
64509
|
-
if (!options.tolerant &&
|
|
64510
|
-
target.scheme =
|
|
64511
|
-
target.userinfo =
|
|
64512
|
-
target.host =
|
|
64513
|
-
target.port =
|
|
64514
|
-
target.path = removeDotSegments(
|
|
64515
|
-
target.query =
|
|
64706
|
+
if (!options.tolerant && relative8.scheme) {
|
|
64707
|
+
target.scheme = relative8.scheme;
|
|
64708
|
+
target.userinfo = relative8.userinfo;
|
|
64709
|
+
target.host = relative8.host;
|
|
64710
|
+
target.port = relative8.port;
|
|
64711
|
+
target.path = removeDotSegments(relative8.path || "");
|
|
64712
|
+
target.query = relative8.query;
|
|
64516
64713
|
} else {
|
|
64517
|
-
if (
|
|
64518
|
-
target.userinfo =
|
|
64519
|
-
target.host =
|
|
64520
|
-
target.port =
|
|
64521
|
-
target.path = removeDotSegments(
|
|
64522
|
-
target.query =
|
|
64714
|
+
if (relative8.userinfo !== void 0 || relative8.host !== void 0 || relative8.port !== void 0) {
|
|
64715
|
+
target.userinfo = relative8.userinfo;
|
|
64716
|
+
target.host = relative8.host;
|
|
64717
|
+
target.port = relative8.port;
|
|
64718
|
+
target.path = removeDotSegments(relative8.path || "");
|
|
64719
|
+
target.query = relative8.query;
|
|
64523
64720
|
} else {
|
|
64524
|
-
if (!
|
|
64721
|
+
if (!relative8.path) {
|
|
64525
64722
|
target.path = base2.path;
|
|
64526
|
-
if (
|
|
64527
|
-
target.query =
|
|
64723
|
+
if (relative8.query !== void 0) {
|
|
64724
|
+
target.query = relative8.query;
|
|
64528
64725
|
} else {
|
|
64529
64726
|
target.query = base2.query;
|
|
64530
64727
|
}
|
|
64531
64728
|
} else {
|
|
64532
|
-
if (
|
|
64533
|
-
target.path = removeDotSegments(
|
|
64729
|
+
if (relative8.path.charAt(0) === "/") {
|
|
64730
|
+
target.path = removeDotSegments(relative8.path);
|
|
64534
64731
|
} else {
|
|
64535
64732
|
if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) {
|
|
64536
|
-
target.path = "/" +
|
|
64733
|
+
target.path = "/" + relative8.path;
|
|
64537
64734
|
} else if (!base2.path) {
|
|
64538
|
-
target.path =
|
|
64735
|
+
target.path = relative8.path;
|
|
64539
64736
|
} else {
|
|
64540
|
-
target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) +
|
|
64737
|
+
target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative8.path;
|
|
64541
64738
|
}
|
|
64542
64739
|
target.path = removeDotSegments(target.path);
|
|
64543
64740
|
}
|
|
64544
|
-
target.query =
|
|
64741
|
+
target.query = relative8.query;
|
|
64545
64742
|
}
|
|
64546
64743
|
target.userinfo = base2.userinfo;
|
|
64547
64744
|
target.host = base2.host;
|
|
@@ -64549,7 +64746,7 @@ var require_uri_all = __commonJS2({
|
|
|
64549
64746
|
}
|
|
64550
64747
|
target.scheme = base2.scheme;
|
|
64551
64748
|
}
|
|
64552
|
-
target.fragment =
|
|
64749
|
+
target.fragment = relative8.fragment;
|
|
64553
64750
|
return target;
|
|
64554
64751
|
}
|
|
64555
64752
|
function resolve13(baseURI, relativeURI, options) {
|
|
@@ -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;
|
|
@@ -99031,7 +99228,7 @@ var require_util6 = __commonJS2({
|
|
|
99031
99228
|
exports2.isAbsolute = function(aPath) {
|
|
99032
99229
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
99033
99230
|
};
|
|
99034
|
-
function
|
|
99231
|
+
function relative8(aRoot, aPath) {
|
|
99035
99232
|
if (aRoot === "") {
|
|
99036
99233
|
aRoot = ".";
|
|
99037
99234
|
}
|
|
@@ -99050,7 +99247,7 @@ var require_util6 = __commonJS2({
|
|
|
99050
99247
|
}
|
|
99051
99248
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
99052
99249
|
}
|
|
99053
|
-
exports2.relative =
|
|
99250
|
+
exports2.relative = relative8;
|
|
99054
99251
|
var supportsNullProto = function() {
|
|
99055
99252
|
var obj = /* @__PURE__ */ Object.create(null);
|
|
99056
99253
|
return !("__proto__" in obj);
|
|
@@ -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),
|
|
@@ -145105,7 +145302,15 @@ var require_promisepipe = __commonJS2({
|
|
|
145105
145302
|
});
|
|
145106
145303
|
|
|
145107
145304
|
// src/util/build/merge.ts
|
|
145108
|
-
async function merge(source, destination) {
|
|
145305
|
+
async function merge(source, destination, ignoreFilter, sourceRoot) {
|
|
145306
|
+
const root = sourceRoot || source;
|
|
145307
|
+
if (ignoreFilter) {
|
|
145308
|
+
const relPath = (0, import_path21.relative)(root, source);
|
|
145309
|
+
if (relPath && !ignoreFilter(relPath)) {
|
|
145310
|
+
await (0, import_fs_extra12.remove)(source);
|
|
145311
|
+
return;
|
|
145312
|
+
}
|
|
145313
|
+
}
|
|
145109
145314
|
const destStat = await (0, import_fs_extra12.stat)(destination).catch(
|
|
145110
145315
|
(err) => err
|
|
145111
145316
|
);
|
|
@@ -145125,7 +145330,9 @@ async function merge(source, destination) {
|
|
|
145125
145330
|
}
|
|
145126
145331
|
} else {
|
|
145127
145332
|
await Promise.all(
|
|
145128
|
-
contents.map(
|
|
145333
|
+
contents.map(
|
|
145334
|
+
(name) => merge((0, import_path21.join)(source, name), (0, import_path21.join)(destination, name), ignoreFilter, root)
|
|
145335
|
+
)
|
|
145129
145336
|
);
|
|
145130
145337
|
await (0, import_fs_extra12.rmdir)(source);
|
|
145131
145338
|
return;
|
|
@@ -146547,18 +146754,18 @@ var require_events_intercept = __commonJS2({
|
|
|
146547
146754
|
return ret;
|
|
146548
146755
|
}
|
|
146549
146756
|
function removeInterceptor(type, interceptor) {
|
|
146550
|
-
var
|
|
146757
|
+
var list10, position, length, i;
|
|
146551
146758
|
if (typeof interceptor !== "function") {
|
|
146552
146759
|
throw new TypeError("interceptor must be a function");
|
|
146553
146760
|
}
|
|
146554
146761
|
if (!this._interceptors || !this._interceptors[type]) {
|
|
146555
146762
|
return this;
|
|
146556
146763
|
}
|
|
146557
|
-
|
|
146558
|
-
length =
|
|
146764
|
+
list10 = this._interceptors[type];
|
|
146765
|
+
length = list10.length;
|
|
146559
146766
|
position = -1;
|
|
146560
146767
|
for (i = length - 1; i >= 0; i--) {
|
|
146561
|
-
if (
|
|
146768
|
+
if (list10[i] === interceptor) {
|
|
146562
146769
|
position = i;
|
|
146563
146770
|
break;
|
|
146564
146771
|
}
|
|
@@ -146569,7 +146776,7 @@ var require_events_intercept = __commonJS2({
|
|
|
146569
146776
|
if (length === 1) {
|
|
146570
146777
|
delete this._interceptors[type];
|
|
146571
146778
|
} else {
|
|
146572
|
-
|
|
146779
|
+
list10.splice(position, 1);
|
|
146573
146780
|
}
|
|
146574
146781
|
this.emit("removeInterceptor", type, interceptor);
|
|
146575
146782
|
return this;
|
|
@@ -147176,10 +147383,11 @@ async function writeBuildResultV2(args2) {
|
|
|
147176
147383
|
buildResult,
|
|
147177
147384
|
build: build2,
|
|
147178
147385
|
vercelConfig,
|
|
147179
|
-
standalone
|
|
147386
|
+
standalone,
|
|
147387
|
+
workPath
|
|
147180
147388
|
} = args2;
|
|
147181
147389
|
if ("buildOutputPath" in buildResult) {
|
|
147182
|
-
await mergeBuilderOutput(outputDir, buildResult);
|
|
147390
|
+
await mergeBuilderOutput(outputDir, buildResult, workPath);
|
|
147183
147391
|
return;
|
|
147184
147392
|
}
|
|
147185
147393
|
if (!buildResult.output) {
|
|
@@ -147509,12 +147717,48 @@ async function writeLambda(repoRootPath, outputDir, lambda, path11, functionConf
|
|
|
147509
147717
|
}
|
|
147510
147718
|
}
|
|
147511
147719
|
}
|
|
147512
|
-
async function mergeBuilderOutput(outputDir, buildResult) {
|
|
147720
|
+
async function mergeBuilderOutput(outputDir, buildResult, workPath) {
|
|
147513
147721
|
const absOutputDir = (0, import_path23.resolve)(outputDir);
|
|
147722
|
+
const { ig } = await (0, import_client3.getVercelIgnore)(workPath);
|
|
147723
|
+
const filter = ig.createFilter();
|
|
147514
147724
|
if (absOutputDir === buildResult.buildOutputPath) {
|
|
147725
|
+
const staticDir = (0, import_path23.join)(outputDir, "static");
|
|
147726
|
+
try {
|
|
147727
|
+
await cleanIgnoredFiles(staticDir, staticDir, filter);
|
|
147728
|
+
} catch (err) {
|
|
147729
|
+
if (err.code !== "ENOENT")
|
|
147730
|
+
throw err;
|
|
147731
|
+
}
|
|
147515
147732
|
return;
|
|
147516
147733
|
}
|
|
147517
|
-
|
|
147734
|
+
const ignoreFilter = (path11) => {
|
|
147735
|
+
const normalizedPath = path11.replace(/\\/g, "/");
|
|
147736
|
+
if (normalizedPath.startsWith("static/")) {
|
|
147737
|
+
return filter(normalizedPath.substring("static/".length));
|
|
147738
|
+
}
|
|
147739
|
+
return true;
|
|
147740
|
+
};
|
|
147741
|
+
await merge(buildResult.buildOutputPath, outputDir, ignoreFilter);
|
|
147742
|
+
}
|
|
147743
|
+
async function cleanIgnoredFiles(dir, staticRoot, filter) {
|
|
147744
|
+
const entries = await import_fs_extra13.default.readdir(dir);
|
|
147745
|
+
await Promise.all(
|
|
147746
|
+
entries.map(async (entry) => {
|
|
147747
|
+
const entryPath = (0, import_path23.join)(dir, entry);
|
|
147748
|
+
const stat2 = await import_fs_extra13.default.stat(entryPath);
|
|
147749
|
+
const relativePath = (0, import_path23.relative)(staticRoot, entryPath);
|
|
147750
|
+
if (stat2.isDirectory()) {
|
|
147751
|
+
await cleanIgnoredFiles(entryPath, staticRoot, filter);
|
|
147752
|
+
const remaining = await import_fs_extra13.default.readdir(entryPath);
|
|
147753
|
+
if (remaining.length === 0) {
|
|
147754
|
+
await import_fs_extra13.default.rmdir(entryPath);
|
|
147755
|
+
}
|
|
147756
|
+
} else if (!filter(relativePath)) {
|
|
147757
|
+
output_manager_default.debug(`Removing ignored file: ${relativePath}`);
|
|
147758
|
+
await import_fs_extra13.default.remove(entryPath);
|
|
147759
|
+
}
|
|
147760
|
+
})
|
|
147761
|
+
);
|
|
147518
147762
|
}
|
|
147519
147763
|
function getFileExtension(file) {
|
|
147520
147764
|
let ext = "";
|
|
@@ -147659,7 +147903,7 @@ async function staticFiles(path11, { src }) {
|
|
|
147659
147903
|
}
|
|
147660
147904
|
async function explode(paths, { accepts }) {
|
|
147661
147905
|
const { debug: debug2 } = output_manager_default;
|
|
147662
|
-
const
|
|
147906
|
+
const list10 = async (file) => {
|
|
147663
147907
|
let path11 = file;
|
|
147664
147908
|
let s;
|
|
147665
147909
|
if (!accepts(file)) {
|
|
@@ -147687,7 +147931,7 @@ async function explode(paths, { accepts }) {
|
|
|
147687
147931
|
}
|
|
147688
147932
|
return path11;
|
|
147689
147933
|
};
|
|
147690
|
-
const many = (all) => Promise.all(all.map((file) =>
|
|
147934
|
+
const many = (all) => Promise.all(all.map((file) => list10(file)));
|
|
147691
147935
|
const arrayOfArrays = await many(paths);
|
|
147692
147936
|
return flatten(arrayOfArrays).filter(notNull);
|
|
147693
147937
|
}
|
|
@@ -151713,22 +151957,22 @@ var require_split2 = __commonJS2({
|
|
|
151713
151957
|
var kLast = Symbol("last");
|
|
151714
151958
|
var kDecoder = Symbol("decoder");
|
|
151715
151959
|
function transform(chunk, enc, cb) {
|
|
151716
|
-
let
|
|
151960
|
+
let list10;
|
|
151717
151961
|
if (this.overflow) {
|
|
151718
151962
|
const buf = this[kDecoder].write(chunk);
|
|
151719
|
-
|
|
151720
|
-
if (
|
|
151963
|
+
list10 = buf.split(this.matcher);
|
|
151964
|
+
if (list10.length === 1)
|
|
151721
151965
|
return cb();
|
|
151722
|
-
|
|
151966
|
+
list10.shift();
|
|
151723
151967
|
this.overflow = false;
|
|
151724
151968
|
} else {
|
|
151725
151969
|
this[kLast] += this[kDecoder].write(chunk);
|
|
151726
|
-
|
|
151970
|
+
list10 = this[kLast].split(this.matcher);
|
|
151727
151971
|
}
|
|
151728
|
-
this[kLast] =
|
|
151729
|
-
for (let i = 0; i <
|
|
151972
|
+
this[kLast] = list10.pop();
|
|
151973
|
+
for (let i = 0; i < list10.length; i++) {
|
|
151730
151974
|
try {
|
|
151731
|
-
push(this, this.mapper(
|
|
151975
|
+
push(this, this.mapper(list10[i]));
|
|
151732
151976
|
} catch (error3) {
|
|
151733
151977
|
return cb(error3);
|
|
151734
151978
|
}
|
|
@@ -158882,32 +159126,32 @@ var require_ms3 = __commonJS2({
|
|
|
158882
159126
|
return void 0;
|
|
158883
159127
|
}
|
|
158884
159128
|
}
|
|
158885
|
-
function fmtShort(
|
|
158886
|
-
if (
|
|
158887
|
-
return Math.round(
|
|
159129
|
+
function fmtShort(ms33) {
|
|
159130
|
+
if (ms33 >= d) {
|
|
159131
|
+
return Math.round(ms33 / d) + "d";
|
|
158888
159132
|
}
|
|
158889
|
-
if (
|
|
158890
|
-
return Math.round(
|
|
159133
|
+
if (ms33 >= h) {
|
|
159134
|
+
return Math.round(ms33 / h) + "h";
|
|
158891
159135
|
}
|
|
158892
|
-
if (
|
|
158893
|
-
return Math.round(
|
|
159136
|
+
if (ms33 >= m) {
|
|
159137
|
+
return Math.round(ms33 / m) + "m";
|
|
158894
159138
|
}
|
|
158895
|
-
if (
|
|
158896
|
-
return Math.round(
|
|
159139
|
+
if (ms33 >= s) {
|
|
159140
|
+
return Math.round(ms33 / s) + "s";
|
|
158897
159141
|
}
|
|
158898
|
-
return
|
|
159142
|
+
return ms33 + "ms";
|
|
158899
159143
|
}
|
|
158900
|
-
function fmtLong(
|
|
158901
|
-
return
|
|
159144
|
+
function fmtLong(ms33) {
|
|
159145
|
+
return plural15(ms33, d, "day") || plural15(ms33, h, "hour") || plural15(ms33, m, "minute") || plural15(ms33, s, "second") || ms33 + " ms";
|
|
158902
159146
|
}
|
|
158903
|
-
function
|
|
158904
|
-
if (
|
|
159147
|
+
function plural15(ms33, n, name) {
|
|
159148
|
+
if (ms33 < n) {
|
|
158905
159149
|
return;
|
|
158906
159150
|
}
|
|
158907
|
-
if (
|
|
158908
|
-
return Math.floor(
|
|
159151
|
+
if (ms33 < n * 1.5) {
|
|
159152
|
+
return Math.floor(ms33 / n) + " " + name;
|
|
158909
159153
|
}
|
|
158910
|
-
return Math.ceil(
|
|
159154
|
+
return Math.ceil(ms33 / n) + " " + name + "s";
|
|
158911
159155
|
}
|
|
158912
159156
|
}
|
|
158913
159157
|
});
|
|
@@ -158940,8 +159184,8 @@ var require_debug4 = __commonJS2({
|
|
|
158940
159184
|
return;
|
|
158941
159185
|
var self2 = debug2;
|
|
158942
159186
|
var curr = +/* @__PURE__ */ new Date();
|
|
158943
|
-
var
|
|
158944
|
-
self2.diff =
|
|
159187
|
+
var ms33 = curr - (prevTime || curr);
|
|
159188
|
+
self2.diff = ms33;
|
|
158945
159189
|
self2.prev = prevTime;
|
|
158946
159190
|
self2.curr = curr;
|
|
158947
159191
|
prevTime = curr;
|
|
@@ -159815,8 +160059,8 @@ var require_follow_redirects = __commonJS2({
|
|
|
159815
160059
|
}
|
|
159816
160060
|
return parsed;
|
|
159817
160061
|
}
|
|
159818
|
-
function resolveUrl(
|
|
159819
|
-
return useNativeURL ? new URL11(
|
|
160062
|
+
function resolveUrl(relative8, base) {
|
|
160063
|
+
return useNativeURL ? new URL11(relative8, base) : parseUrl2(url3.resolve(base, relative8));
|
|
159820
160064
|
}
|
|
159821
160065
|
function validateUrl(input) {
|
|
159822
160066
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -160394,8 +160638,8 @@ var require_urlparser = __commonJS2({
|
|
|
160394
160638
|
this.query = Url.queryString.parse(search);
|
|
160395
160639
|
}
|
|
160396
160640
|
};
|
|
160397
|
-
Url.prototype.resolve = function Url$resolve(
|
|
160398
|
-
return this.resolveObject(Url.parse(
|
|
160641
|
+
Url.prototype.resolve = function Url$resolve(relative8) {
|
|
160642
|
+
return this.resolveObject(Url.parse(relative8, false, true)).format();
|
|
160399
160643
|
};
|
|
160400
160644
|
Url.prototype.format = function Url$format() {
|
|
160401
160645
|
var auth = this.auth || "";
|
|
@@ -160446,61 +160690,61 @@ var require_urlparser = __commonJS2({
|
|
|
160446
160690
|
search = escapeSearch(search);
|
|
160447
160691
|
return scheme + (host === false ? "" : host) + pathname + search + hash;
|
|
160448
160692
|
};
|
|
160449
|
-
Url.prototype.resolveObject = function Url$resolveObject(
|
|
160450
|
-
if (typeof
|
|
160451
|
-
|
|
160693
|
+
Url.prototype.resolveObject = function Url$resolveObject(relative8) {
|
|
160694
|
+
if (typeof relative8 === "string")
|
|
160695
|
+
relative8 = Url.parse(relative8, false, true);
|
|
160452
160696
|
var result = this._clone();
|
|
160453
|
-
result.hash =
|
|
160454
|
-
if (!
|
|
160697
|
+
result.hash = relative8.hash;
|
|
160698
|
+
if (!relative8.href) {
|
|
160455
160699
|
result._href = "";
|
|
160456
160700
|
return result;
|
|
160457
160701
|
}
|
|
160458
|
-
if (
|
|
160459
|
-
|
|
160702
|
+
if (relative8.slashes && !relative8._protocol) {
|
|
160703
|
+
relative8._copyPropsTo(result, true);
|
|
160460
160704
|
if (slashProtocols[result._protocol] && result.hostname && !result.pathname) {
|
|
160461
160705
|
result.pathname = "/";
|
|
160462
160706
|
}
|
|
160463
160707
|
result._href = "";
|
|
160464
160708
|
return result;
|
|
160465
160709
|
}
|
|
160466
|
-
if (
|
|
160467
|
-
if (!slashProtocols[
|
|
160468
|
-
|
|
160710
|
+
if (relative8._protocol && relative8._protocol !== result._protocol) {
|
|
160711
|
+
if (!slashProtocols[relative8._protocol]) {
|
|
160712
|
+
relative8._copyPropsTo(result, false);
|
|
160469
160713
|
result._href = "";
|
|
160470
160714
|
return result;
|
|
160471
160715
|
}
|
|
160472
|
-
result._protocol =
|
|
160473
|
-
if (!
|
|
160474
|
-
var relPath = (
|
|
160475
|
-
while (relPath.length && !(
|
|
160716
|
+
result._protocol = relative8._protocol;
|
|
160717
|
+
if (!relative8.host && relative8._protocol !== "javascript") {
|
|
160718
|
+
var relPath = (relative8.pathname || "").split("/");
|
|
160719
|
+
while (relPath.length && !(relative8.host = relPath.shift()))
|
|
160476
160720
|
;
|
|
160477
|
-
if (!
|
|
160478
|
-
|
|
160479
|
-
if (!
|
|
160480
|
-
|
|
160721
|
+
if (!relative8.host)
|
|
160722
|
+
relative8.host = "";
|
|
160723
|
+
if (!relative8.hostname)
|
|
160724
|
+
relative8.hostname = "";
|
|
160481
160725
|
if (relPath[0] !== "")
|
|
160482
160726
|
relPath.unshift("");
|
|
160483
160727
|
if (relPath.length < 2)
|
|
160484
160728
|
relPath.unshift("");
|
|
160485
160729
|
result.pathname = relPath.join("/");
|
|
160486
160730
|
} else {
|
|
160487
|
-
result.pathname =
|
|
160488
|
-
}
|
|
160489
|
-
result.search =
|
|
160490
|
-
result.host =
|
|
160491
|
-
result.auth =
|
|
160492
|
-
result.hostname =
|
|
160493
|
-
result._port =
|
|
160494
|
-
result.slashes = result.slashes ||
|
|
160731
|
+
result.pathname = relative8.pathname;
|
|
160732
|
+
}
|
|
160733
|
+
result.search = relative8.search;
|
|
160734
|
+
result.host = relative8.host || "";
|
|
160735
|
+
result.auth = relative8.auth;
|
|
160736
|
+
result.hostname = relative8.hostname || relative8.host;
|
|
160737
|
+
result._port = relative8._port;
|
|
160738
|
+
result.slashes = result.slashes || relative8.slashes;
|
|
160495
160739
|
result._href = "";
|
|
160496
160740
|
return result;
|
|
160497
160741
|
}
|
|
160498
160742
|
var isSourceAbs = result.pathname && result.pathname.charCodeAt(0) === 47;
|
|
160499
|
-
var isRelAbs =
|
|
160500
|
-
var mustEndAbs = isRelAbs || isSourceAbs || result.host &&
|
|
160743
|
+
var isRelAbs = relative8.host || relative8.pathname && relative8.pathname.charCodeAt(0) === 47;
|
|
160744
|
+
var mustEndAbs = isRelAbs || isSourceAbs || result.host && relative8.pathname;
|
|
160501
160745
|
var removeAllDots = mustEndAbs;
|
|
160502
160746
|
var srcPath = result.pathname && result.pathname.split("/") || [];
|
|
160503
|
-
var relPath =
|
|
160747
|
+
var relPath = relative8.pathname && relative8.pathname.split("/") || [];
|
|
160504
160748
|
var psychotic = result._protocol && !slashProtocols[result._protocol];
|
|
160505
160749
|
if (psychotic) {
|
|
160506
160750
|
result.hostname = "";
|
|
@@ -160512,31 +160756,31 @@ var require_urlparser = __commonJS2({
|
|
|
160512
160756
|
srcPath.unshift(result.host);
|
|
160513
160757
|
}
|
|
160514
160758
|
result.host = "";
|
|
160515
|
-
if (
|
|
160516
|
-
|
|
160517
|
-
|
|
160518
|
-
if (
|
|
160759
|
+
if (relative8._protocol) {
|
|
160760
|
+
relative8.hostname = "";
|
|
160761
|
+
relative8._port = -1;
|
|
160762
|
+
if (relative8.host) {
|
|
160519
160763
|
if (relPath[0] === "")
|
|
160520
|
-
relPath[0] =
|
|
160764
|
+
relPath[0] = relative8.host;
|
|
160521
160765
|
else
|
|
160522
|
-
relPath.unshift(
|
|
160766
|
+
relPath.unshift(relative8.host);
|
|
160523
160767
|
}
|
|
160524
|
-
|
|
160768
|
+
relative8.host = "";
|
|
160525
160769
|
}
|
|
160526
160770
|
mustEndAbs = mustEndAbs && (relPath[0] === "" || srcPath[0] === "");
|
|
160527
160771
|
}
|
|
160528
160772
|
if (isRelAbs) {
|
|
160529
|
-
result.host =
|
|
160530
|
-
result.hostname =
|
|
160531
|
-
result.search =
|
|
160773
|
+
result.host = relative8.host ? relative8.host : result.host;
|
|
160774
|
+
result.hostname = relative8.hostname ? relative8.hostname : result.hostname;
|
|
160775
|
+
result.search = relative8.search;
|
|
160532
160776
|
srcPath = relPath;
|
|
160533
160777
|
} else if (relPath.length) {
|
|
160534
160778
|
if (!srcPath)
|
|
160535
160779
|
srcPath = [];
|
|
160536
160780
|
srcPath.pop();
|
|
160537
160781
|
srcPath = srcPath.concat(relPath);
|
|
160538
|
-
result.search =
|
|
160539
|
-
} else if (
|
|
160782
|
+
result.search = relative8.search;
|
|
160783
|
+
} else if (relative8.search) {
|
|
160540
160784
|
if (psychotic) {
|
|
160541
160785
|
result.hostname = result.host = srcPath.shift();
|
|
160542
160786
|
var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false;
|
|
@@ -160545,7 +160789,7 @@ var require_urlparser = __commonJS2({
|
|
|
160545
160789
|
result.host = result.hostname = authInHost.shift();
|
|
160546
160790
|
}
|
|
160547
160791
|
}
|
|
160548
|
-
result.search =
|
|
160792
|
+
result.search = relative8.search;
|
|
160549
160793
|
result._href = "";
|
|
160550
160794
|
return result;
|
|
160551
160795
|
}
|
|
@@ -160555,7 +160799,7 @@ var require_urlparser = __commonJS2({
|
|
|
160555
160799
|
return result;
|
|
160556
160800
|
}
|
|
160557
160801
|
var last = srcPath.slice(-1)[0];
|
|
160558
|
-
var hasTrailingSlash = (result.host ||
|
|
160802
|
+
var hasTrailingSlash = (result.host || relative8.host) && (last === "." || last === "..") || last === "";
|
|
160559
160803
|
var up = 0;
|
|
160560
160804
|
for (var i2 = srcPath.length; i2 >= 0; i2--) {
|
|
160561
160805
|
last = srcPath[i2];
|
|
@@ -160594,8 +160838,8 @@ var require_urlparser = __commonJS2({
|
|
|
160594
160838
|
srcPath.unshift("");
|
|
160595
160839
|
}
|
|
160596
160840
|
result.pathname = srcPath.length === 0 ? null : srcPath.join("/");
|
|
160597
|
-
result.auth =
|
|
160598
|
-
result.slashes = result.slashes ||
|
|
160841
|
+
result.auth = relative8.auth || result.auth;
|
|
160842
|
+
result.slashes = result.slashes || relative8.slashes;
|
|
160599
160843
|
result._href = "";
|
|
160600
160844
|
return result;
|
|
160601
160845
|
};
|
|
@@ -160988,13 +161232,13 @@ var require_urlparser = __commonJS2({
|
|
|
160988
161232
|
}
|
|
160989
161233
|
return obj.format();
|
|
160990
161234
|
};
|
|
160991
|
-
Url.resolve = function Url$Resolve(source,
|
|
160992
|
-
return Url.parse(source, false, true).resolve(
|
|
161235
|
+
Url.resolve = function Url$Resolve(source, relative8) {
|
|
161236
|
+
return Url.parse(source, false, true).resolve(relative8);
|
|
160993
161237
|
};
|
|
160994
|
-
Url.resolveObject = function Url$ResolveObject(source,
|
|
161238
|
+
Url.resolveObject = function Url$ResolveObject(source, relative8) {
|
|
160995
161239
|
if (!source)
|
|
160996
|
-
return
|
|
160997
|
-
return Url.parse(source, false, true).resolveObject(
|
|
161240
|
+
return relative8;
|
|
161241
|
+
return Url.parse(source, false, true).resolveObject(relative8);
|
|
160998
161242
|
};
|
|
160999
161243
|
function _escapePath(pathname) {
|
|
161000
161244
|
return pathname.replace(/[?#]/g, function(match) {
|
|
@@ -161201,7 +161445,7 @@ var require_minimatch3 = __commonJS2({
|
|
|
161201
161445
|
minimatch5.filter = filter;
|
|
161202
161446
|
function filter(pattern, options) {
|
|
161203
161447
|
options = options || {};
|
|
161204
|
-
return function(p, i,
|
|
161448
|
+
return function(p, i, list10) {
|
|
161205
161449
|
return minimatch5(p, pattern, options);
|
|
161206
161450
|
};
|
|
161207
161451
|
}
|
|
@@ -161604,16 +161848,16 @@ var require_minimatch3 = __commonJS2({
|
|
|
161604
161848
|
}
|
|
161605
161849
|
return this.regexp;
|
|
161606
161850
|
}
|
|
161607
|
-
minimatch5.match = function(
|
|
161851
|
+
minimatch5.match = function(list10, pattern, options) {
|
|
161608
161852
|
options = options || {};
|
|
161609
161853
|
var mm = new Minimatch(pattern, options);
|
|
161610
|
-
|
|
161854
|
+
list10 = list10.filter(function(f) {
|
|
161611
161855
|
return mm.match(f);
|
|
161612
161856
|
});
|
|
161613
|
-
if (mm.options.nonull && !
|
|
161614
|
-
|
|
161857
|
+
if (mm.options.nonull && !list10.length) {
|
|
161858
|
+
list10.push(pattern);
|
|
161615
161859
|
}
|
|
161616
|
-
return
|
|
161860
|
+
return list10;
|
|
161617
161861
|
};
|
|
161618
161862
|
Minimatch.prototype.match = match;
|
|
161619
161863
|
function match(f, partial) {
|
|
@@ -169830,12 +170074,12 @@ var require_src4 = __commonJS2({
|
|
|
169830
170074
|
}).filter(Boolean);
|
|
169831
170075
|
if (toRoot.length > 0) {
|
|
169832
170076
|
const directoryPath = [...pathParts].slice(1);
|
|
169833
|
-
const
|
|
170077
|
+
const relative8 = path11.join("/", ...directoryPath, "..", slashSuffix);
|
|
169834
170078
|
files.unshift({
|
|
169835
170079
|
type: "directory",
|
|
169836
170080
|
base: "..",
|
|
169837
|
-
relative:
|
|
169838
|
-
title:
|
|
170081
|
+
relative: relative8,
|
|
170082
|
+
title: relative8,
|
|
169839
170083
|
ext: ""
|
|
169840
170084
|
});
|
|
169841
170085
|
}
|
|
@@ -170230,7 +170474,7 @@ var require_is_port_reachable = __commonJS2({
|
|
|
170230
170474
|
});
|
|
170231
170475
|
|
|
170232
170476
|
// src/util/path-helpers.ts
|
|
170233
|
-
function
|
|
170477
|
+
function relative7(a, b) {
|
|
170234
170478
|
return (0, import_build_utils16.normalizePath)((0, import_path33.relative)(a, b));
|
|
170235
170479
|
}
|
|
170236
170480
|
var import_path33, import_build_utils16;
|
|
@@ -171018,7 +171262,7 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
|
|
|
171018
171262
|
noMatches.push(buildConfig);
|
|
171019
171263
|
}
|
|
171020
171264
|
for (const file of files) {
|
|
171021
|
-
src =
|
|
171265
|
+
src = relative7(cwd, file);
|
|
171022
171266
|
const entrypoint = mapToEntrypoint.get(src) || src;
|
|
171023
171267
|
if (config2.zeroConfig && config2.outputDirectory) {
|
|
171024
171268
|
const outputMatch = config2.outputDirectory + "/";
|
|
@@ -172486,7 +172730,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
172486
172730
|
}
|
|
172487
172731
|
}
|
|
172488
172732
|
async handleFileCreated(fsPath, changed, removed) {
|
|
172489
|
-
const name =
|
|
172733
|
+
const name = relative7(this.cwd, fsPath);
|
|
172490
172734
|
try {
|
|
172491
172735
|
await this.getVercelConfig();
|
|
172492
172736
|
this.files[name] = await import_build_utils18.FileFsRef.fromFsPath({ fsPath });
|
|
@@ -172506,7 +172750,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
172506
172750
|
}
|
|
172507
172751
|
}
|
|
172508
172752
|
handleFileDeleted(fsPath, changed, removed) {
|
|
172509
|
-
const name =
|
|
172753
|
+
const name = relative7(this.cwd, fsPath);
|
|
172510
172754
|
output_manager_default.debug(`File deleted: ${name}`);
|
|
172511
172755
|
fileRemoved(name, this.files, changed, removed);
|
|
172512
172756
|
const extensionless = this.getExtensionlessFile(name);
|
|
@@ -172516,7 +172760,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
172516
172760
|
}
|
|
172517
172761
|
}
|
|
172518
172762
|
async handleFileModified(fsPath, changed, removed) {
|
|
172519
|
-
const name =
|
|
172763
|
+
const name = relative7(this.cwd, fsPath);
|
|
172520
172764
|
try {
|
|
172521
172765
|
this.files[name] = await import_build_utils18.FileFsRef.fromFsPath({ fsPath });
|
|
172522
172766
|
fileChanged(name, changed, removed);
|
|
@@ -172680,7 +172924,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
172680
172924
|
const featHandleMiss = true;
|
|
172681
172925
|
const { projectSettings, cleanUrls, trailingSlash } = vercelConfig;
|
|
172682
172926
|
const files = (await staticFiles(this.cwd, {})).map(
|
|
172683
|
-
(f) =>
|
|
172927
|
+
(f) => relative7(this.cwd, f)
|
|
172684
172928
|
);
|
|
172685
172929
|
let {
|
|
172686
172930
|
builders,
|
|
@@ -172932,7 +173176,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
172932
173176
|
const files = await staticFiles(this.cwd, {});
|
|
172933
173177
|
this.files = {};
|
|
172934
173178
|
for (const fsPath of files) {
|
|
172935
|
-
const path11 =
|
|
173179
|
+
const path11 = relative7(this.cwd, fsPath);
|
|
172936
173180
|
const { mode } = await import_fs_extra21.default.stat(fsPath);
|
|
172937
173181
|
this.files[path11] = new import_build_utils18.FileFsRef({ mode, fsPath });
|
|
172938
173182
|
const extensionless = this.getExtensionlessFile(path11);
|
|
@@ -173223,7 +173467,7 @@ ${error_code}
|
|
|
173223
173467
|
if (base === "now.json" || base === "vercel.json" || base === ".nowignore" || base === ".vercelignore" || !p.startsWith(prefix)) {
|
|
173224
173468
|
return false;
|
|
173225
173469
|
}
|
|
173226
|
-
const rel =
|
|
173470
|
+
const rel = relative7(prefix, p);
|
|
173227
173471
|
if (rel.includes("/")) {
|
|
173228
173472
|
const dir = rel.split("/")[0];
|
|
173229
173473
|
if (dirs.has(dir)) {
|
|
@@ -173237,7 +173481,7 @@ ${error_code}
|
|
|
173237
173481
|
let ext = "";
|
|
173238
173482
|
let type = "file";
|
|
173239
173483
|
let href;
|
|
173240
|
-
const rel =
|
|
173484
|
+
const rel = relative7(prefix, p);
|
|
173241
173485
|
if (rel.includes("/")) {
|
|
173242
173486
|
type = "folder";
|
|
173243
173487
|
base = rel.split("/")[0];
|
|
@@ -178936,8 +179180,8 @@ var require_jaro_winkler = __commonJS2({
|
|
|
178936
179180
|
});
|
|
178937
179181
|
|
|
178938
179182
|
// src/util/init/did-you-mean.ts
|
|
178939
|
-
function didYouMean(input,
|
|
178940
|
-
const rated =
|
|
179183
|
+
function didYouMean(input, list10, threshold = 0.5) {
|
|
179184
|
+
const rated = list10.map((item) => [dashAwareDistance(input, item), item]);
|
|
178941
179185
|
const found = rated.filter((item) => item[0] > threshold);
|
|
178942
179186
|
if (found.length) {
|
|
178943
179187
|
const highestRated = found.reduce((accu, curr) => {
|
|
@@ -179115,7 +179359,7 @@ var init_init = __esm({
|
|
|
179115
179359
|
init_did_you_mean();
|
|
179116
179360
|
init_pkg_name();
|
|
179117
179361
|
init_output_manager();
|
|
179118
|
-
EXAMPLE_API = "https://
|
|
179362
|
+
EXAMPLE_API = "https://examples.vercel.sh";
|
|
179119
179363
|
}
|
|
179120
179364
|
});
|
|
179121
179365
|
|
|
@@ -179296,8 +179540,8 @@ var init_builds = __esm({
|
|
|
179296
179540
|
}
|
|
179297
179541
|
}
|
|
179298
179542
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
|
179299
|
-
const
|
|
179300
|
-
return `${import_chalk101.default.grey(corner)} ${color(
|
|
179543
|
+
const main19 = prefix + path11 + finalSize + finalRegion;
|
|
179544
|
+
return `${import_chalk101.default.grey(corner)} ${color(main19)}`;
|
|
179301
179545
|
};
|
|
179302
179546
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
|
179303
179547
|
const parts = path11.split("/").slice(0, -1);
|
|
@@ -185495,6 +185739,1115 @@ var init_redeploy2 = __esm({
|
|
|
185495
185739
|
}
|
|
185496
185740
|
});
|
|
185497
185741
|
|
|
185742
|
+
// src/commands/redirects/shared.ts
|
|
185743
|
+
async function parseSubcommandArgs(argv, command) {
|
|
185744
|
+
let parsedArgs;
|
|
185745
|
+
const flagsSpecification = getFlagsSpecification(command.options);
|
|
185746
|
+
try {
|
|
185747
|
+
parsedArgs = parseArguments(argv, flagsSpecification);
|
|
185748
|
+
} catch (err) {
|
|
185749
|
+
printError(err);
|
|
185750
|
+
return 1;
|
|
185751
|
+
}
|
|
185752
|
+
return parsedArgs;
|
|
185753
|
+
}
|
|
185754
|
+
function validateRequiredArgs(args2, required) {
|
|
185755
|
+
for (let i = 0; i < required.length; i++) {
|
|
185756
|
+
if (!args2[i]) {
|
|
185757
|
+
return `Missing required argument: ${required[i]}`;
|
|
185758
|
+
}
|
|
185759
|
+
}
|
|
185760
|
+
return null;
|
|
185761
|
+
}
|
|
185762
|
+
async function ensureProjectLink(client2) {
|
|
185763
|
+
const link4 = await getLinkedProject(client2);
|
|
185764
|
+
if (link4.status === "error") {
|
|
185765
|
+
return link4.exitCode;
|
|
185766
|
+
} else if (link4.status === "not_linked") {
|
|
185767
|
+
output_manager_default.error(
|
|
185768
|
+
`Your codebase isn't linked to a project on Vercel. Run ${getCommandName("link")} to begin.`
|
|
185769
|
+
);
|
|
185770
|
+
return 1;
|
|
185771
|
+
}
|
|
185772
|
+
client2.config.currentTeam = link4.org.type === "team" ? link4.org.id : void 0;
|
|
185773
|
+
return link4;
|
|
185774
|
+
}
|
|
185775
|
+
async function confirmAction(client2, skipConfirmation, message2, details) {
|
|
185776
|
+
if (skipConfirmation)
|
|
185777
|
+
return true;
|
|
185778
|
+
if (details) {
|
|
185779
|
+
output_manager_default.print(` ${details}
|
|
185780
|
+
`);
|
|
185781
|
+
}
|
|
185782
|
+
return await client2.input.confirm(message2, false);
|
|
185783
|
+
}
|
|
185784
|
+
function isValidUrl(url3) {
|
|
185785
|
+
try {
|
|
185786
|
+
new URL(url3, "https://vercel.com");
|
|
185787
|
+
return true;
|
|
185788
|
+
} catch {
|
|
185789
|
+
return false;
|
|
185790
|
+
}
|
|
185791
|
+
}
|
|
185792
|
+
var init_shared2 = __esm({
|
|
185793
|
+
"src/commands/redirects/shared.ts"() {
|
|
185794
|
+
"use strict";
|
|
185795
|
+
init_get_args();
|
|
185796
|
+
init_get_flags_specification();
|
|
185797
|
+
init_error2();
|
|
185798
|
+
init_link2();
|
|
185799
|
+
init_pkg_name();
|
|
185800
|
+
init_output_manager();
|
|
185801
|
+
}
|
|
185802
|
+
});
|
|
185803
|
+
|
|
185804
|
+
// src/util/redirects/get-redirects.ts
|
|
185805
|
+
async function getRedirects(client2, projectId, options = {}) {
|
|
185806
|
+
const { teamId, search, page, perPage = 50, versionId, diff } = options;
|
|
185807
|
+
const params2 = new URLSearchParams();
|
|
185808
|
+
params2.set("projectId", projectId);
|
|
185809
|
+
if (teamId) {
|
|
185810
|
+
params2.set("teamId", teamId);
|
|
185811
|
+
}
|
|
185812
|
+
if (versionId) {
|
|
185813
|
+
params2.set("versionId", versionId);
|
|
185814
|
+
}
|
|
185815
|
+
if (diff) {
|
|
185816
|
+
params2.set("diff", "true");
|
|
185817
|
+
} else {
|
|
185818
|
+
params2.set("per_page", perPage.toString());
|
|
185819
|
+
if (search) {
|
|
185820
|
+
params2.set("q", search);
|
|
185821
|
+
}
|
|
185822
|
+
if (page) {
|
|
185823
|
+
params2.set("page", page.toString());
|
|
185824
|
+
}
|
|
185825
|
+
}
|
|
185826
|
+
const url3 = `/v1/bulk-redirects?${params2}`;
|
|
185827
|
+
return await client2.fetch(url3);
|
|
185828
|
+
}
|
|
185829
|
+
var init_get_redirects = __esm({
|
|
185830
|
+
"src/util/redirects/get-redirects.ts"() {
|
|
185831
|
+
"use strict";
|
|
185832
|
+
}
|
|
185833
|
+
});
|
|
185834
|
+
|
|
185835
|
+
// src/util/redirects/get-redirect-versions.ts
|
|
185836
|
+
async function getRedirectVersions(client2, projectId, teamId) {
|
|
185837
|
+
const params2 = new URLSearchParams();
|
|
185838
|
+
params2.set("projectId", projectId);
|
|
185839
|
+
if (teamId) {
|
|
185840
|
+
params2.set("teamId", teamId);
|
|
185841
|
+
}
|
|
185842
|
+
const url3 = `/v1/bulk-redirects/versions?${params2}`;
|
|
185843
|
+
return await client2.fetch(url3);
|
|
185844
|
+
}
|
|
185845
|
+
var init_get_redirect_versions = __esm({
|
|
185846
|
+
"src/util/redirects/get-redirect-versions.ts"() {
|
|
185847
|
+
"use strict";
|
|
185848
|
+
}
|
|
185849
|
+
});
|
|
185850
|
+
|
|
185851
|
+
// src/commands/redirects/list.ts
|
|
185852
|
+
async function list7(client2, argv) {
|
|
185853
|
+
const parsed = await parseSubcommandArgs(argv, listSubcommand8);
|
|
185854
|
+
if (typeof parsed === "number")
|
|
185855
|
+
return parsed;
|
|
185856
|
+
const link4 = await ensureProjectLink(client2);
|
|
185857
|
+
if (typeof link4 === "number")
|
|
185858
|
+
return link4;
|
|
185859
|
+
const { project, org } = link4;
|
|
185860
|
+
const { flags } = parsed;
|
|
185861
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
185862
|
+
const search = flags["--search"];
|
|
185863
|
+
const page = flags["--page"];
|
|
185864
|
+
const perPage = flags["--per-page"];
|
|
185865
|
+
const staged = flags["--staged"];
|
|
185866
|
+
const versionIdFlag = flags["--version"];
|
|
185867
|
+
let versionId;
|
|
185868
|
+
let versionName;
|
|
185869
|
+
if (staged) {
|
|
185870
|
+
output_manager_default.spinner("Fetching staging version");
|
|
185871
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
185872
|
+
const stagingVersion = versions.find((v) => v.isStaging);
|
|
185873
|
+
if (!stagingVersion) {
|
|
185874
|
+
output_manager_default.error(
|
|
185875
|
+
`No staging version found for ${import_chalk125.default.bold(project.name)}. Run ${import_chalk125.default.cyan(
|
|
185876
|
+
"vercel redirects list-versions"
|
|
185877
|
+
)} to see available versions.`
|
|
185878
|
+
);
|
|
185879
|
+
return 1;
|
|
185880
|
+
}
|
|
185881
|
+
versionId = stagingVersion.id;
|
|
185882
|
+
versionName = stagingVersion.name || stagingVersion.id;
|
|
185883
|
+
}
|
|
185884
|
+
if (versionIdFlag) {
|
|
185885
|
+
if (staged) {
|
|
185886
|
+
output_manager_default.error("Cannot use both --staged and --version flags together");
|
|
185887
|
+
return 1;
|
|
185888
|
+
}
|
|
185889
|
+
output_manager_default.spinner("Fetching version");
|
|
185890
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
185891
|
+
const version2 = versions.find(
|
|
185892
|
+
(v) => v.id === versionIdFlag || v.name === versionIdFlag
|
|
185893
|
+
);
|
|
185894
|
+
if (!version2) {
|
|
185895
|
+
output_manager_default.error(
|
|
185896
|
+
`Version "${versionIdFlag}" not found. Run ${import_chalk125.default.cyan(
|
|
185897
|
+
"vercel redirects list-versions"
|
|
185898
|
+
)} to see available versions.`
|
|
185899
|
+
);
|
|
185900
|
+
return 1;
|
|
185901
|
+
}
|
|
185902
|
+
versionId = version2.id;
|
|
185903
|
+
versionName = version2.name || version2.id;
|
|
185904
|
+
}
|
|
185905
|
+
const lsStamp = stamp_default();
|
|
185906
|
+
let spinnerMessage = `Fetching redirects for ${import_chalk125.default.bold(project.name)}`;
|
|
185907
|
+
if (versionName) {
|
|
185908
|
+
spinnerMessage += ` (version: ${versionName})`;
|
|
185909
|
+
}
|
|
185910
|
+
if (search) {
|
|
185911
|
+
spinnerMessage += ` matching "${search}"`;
|
|
185912
|
+
}
|
|
185913
|
+
output_manager_default.spinner(spinnerMessage);
|
|
185914
|
+
const { redirects, pagination } = await getRedirects(client2, project.id, {
|
|
185915
|
+
teamId,
|
|
185916
|
+
search,
|
|
185917
|
+
page,
|
|
185918
|
+
perPage,
|
|
185919
|
+
versionId
|
|
185920
|
+
});
|
|
185921
|
+
let resultMessage = `${(0, import_pluralize13.default)("Redirect", redirects.length, true)} found for ${import_chalk125.default.bold(
|
|
185922
|
+
project.name
|
|
185923
|
+
)}`;
|
|
185924
|
+
if (versionName) {
|
|
185925
|
+
resultMessage += ` ${import_chalk125.default.gray(`(version: ${versionName})`)}`;
|
|
185926
|
+
}
|
|
185927
|
+
if (search) {
|
|
185928
|
+
resultMessage += ` matching "${search}"`;
|
|
185929
|
+
}
|
|
185930
|
+
if (pagination) {
|
|
185931
|
+
resultMessage += ` ${import_chalk125.default.gray(`(page ${pagination.page} of ${pagination.numPages})`)}`;
|
|
185932
|
+
}
|
|
185933
|
+
resultMessage += ` ${import_chalk125.default.gray(lsStamp())}`;
|
|
185934
|
+
output_manager_default.log(resultMessage);
|
|
185935
|
+
if (redirects.length > 0) {
|
|
185936
|
+
output_manager_default.print(formatRedirectsTable(redirects));
|
|
185937
|
+
output_manager_default.print("\n");
|
|
185938
|
+
}
|
|
185939
|
+
if (pagination && pagination.page < pagination.numPages) {
|
|
185940
|
+
const nextPage = pagination.page + 1;
|
|
185941
|
+
let command = `redirects list --page ${nextPage}`;
|
|
185942
|
+
if (search) {
|
|
185943
|
+
command += ` --search "${search}"`;
|
|
185944
|
+
}
|
|
185945
|
+
if (perPage) {
|
|
185946
|
+
command += ` --per-page ${perPage}`;
|
|
185947
|
+
}
|
|
185948
|
+
output_manager_default.log(`To display the next page, run ${getCommandName(command)}`);
|
|
185949
|
+
}
|
|
185950
|
+
return 0;
|
|
185951
|
+
}
|
|
185952
|
+
function formatRedirectsTable(redirects) {
|
|
185953
|
+
const rows = redirects.map((redirect2) => {
|
|
185954
|
+
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
185955
|
+
return [
|
|
185956
|
+
redirect2.source,
|
|
185957
|
+
redirect2.destination,
|
|
185958
|
+
import_chalk125.default.cyan(status3.toString())
|
|
185959
|
+
];
|
|
185960
|
+
});
|
|
185961
|
+
return formatTable(
|
|
185962
|
+
["Source", "Destination", "Status"],
|
|
185963
|
+
["l", "l", "l"],
|
|
185964
|
+
[{ rows }]
|
|
185965
|
+
);
|
|
185966
|
+
}
|
|
185967
|
+
var import_chalk125, import_pluralize13;
|
|
185968
|
+
var init_list11 = __esm({
|
|
185969
|
+
"src/commands/redirects/list.ts"() {
|
|
185970
|
+
"use strict";
|
|
185971
|
+
import_chalk125 = __toESM3(require_source());
|
|
185972
|
+
import_pluralize13 = __toESM3(require_pluralize());
|
|
185973
|
+
init_output_manager();
|
|
185974
|
+
init_command32();
|
|
185975
|
+
init_shared2();
|
|
185976
|
+
init_get_redirects();
|
|
185977
|
+
init_get_redirect_versions();
|
|
185978
|
+
init_stamp();
|
|
185979
|
+
init_format_table();
|
|
185980
|
+
init_pkg_name();
|
|
185981
|
+
}
|
|
185982
|
+
});
|
|
185983
|
+
|
|
185984
|
+
// src/commands/redirects/list-versions.ts
|
|
185985
|
+
async function listVersions(client2, argv) {
|
|
185986
|
+
const parsed = await parseSubcommandArgs(argv, listVersionsSubcommand);
|
|
185987
|
+
if (typeof parsed === "number")
|
|
185988
|
+
return parsed;
|
|
185989
|
+
const link4 = await ensureProjectLink(client2);
|
|
185990
|
+
if (typeof link4 === "number")
|
|
185991
|
+
return link4;
|
|
185992
|
+
const { project, org } = link4;
|
|
185993
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
185994
|
+
const lsStamp = stamp_default();
|
|
185995
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk126.default.bold(project.name)}`);
|
|
185996
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
185997
|
+
const sortedVersions = sortVersions(versions).slice(0, 20);
|
|
185998
|
+
output_manager_default.log(
|
|
185999
|
+
`${(0, import_pluralize14.default)("Version", sortedVersions.length, true)} found for ${import_chalk126.default.bold(
|
|
186000
|
+
project.name
|
|
186001
|
+
)} ${import_chalk126.default.gray(lsStamp())}`
|
|
186002
|
+
);
|
|
186003
|
+
if (sortedVersions.length > 0) {
|
|
186004
|
+
output_manager_default.print(formatVersionsTable(sortedVersions));
|
|
186005
|
+
output_manager_default.print("\n");
|
|
186006
|
+
}
|
|
186007
|
+
return 0;
|
|
186008
|
+
}
|
|
186009
|
+
function sortVersions(versions) {
|
|
186010
|
+
return versions.slice().sort((a, b) => {
|
|
186011
|
+
if (a.isStaging && !b.isStaging)
|
|
186012
|
+
return -1;
|
|
186013
|
+
if (!a.isStaging && b.isStaging)
|
|
186014
|
+
return 1;
|
|
186015
|
+
if (a.isLive && !b.isLive)
|
|
186016
|
+
return -1;
|
|
186017
|
+
if (!a.isLive && b.isLive)
|
|
186018
|
+
return 1;
|
|
186019
|
+
return b.lastModified - a.lastModified;
|
|
186020
|
+
});
|
|
186021
|
+
}
|
|
186022
|
+
function formatVersionsTable(versions) {
|
|
186023
|
+
const now = Date.now();
|
|
186024
|
+
const rows = versions.map((version2) => {
|
|
186025
|
+
const age = (0, import_ms27.default)(now - version2.lastModified);
|
|
186026
|
+
let status3 = "";
|
|
186027
|
+
if (version2.isStaging) {
|
|
186028
|
+
status3 = import_chalk126.default.yellow("Staging");
|
|
186029
|
+
} else if (version2.isLive) {
|
|
186030
|
+
status3 = import_chalk126.default.green("Live");
|
|
186031
|
+
} else {
|
|
186032
|
+
status3 = import_chalk126.default.gray("Previous");
|
|
186033
|
+
}
|
|
186034
|
+
const name = version2.name || import_chalk126.default.gray("(unnamed)");
|
|
186035
|
+
const redirectCountStr = version2.redirectCount !== void 0 && version2.redirectCount !== null ? version2.redirectCount.toString() : import_chalk126.default.gray("-");
|
|
186036
|
+
return [
|
|
186037
|
+
status3,
|
|
186038
|
+
name,
|
|
186039
|
+
version2.id,
|
|
186040
|
+
redirectCountStr,
|
|
186041
|
+
version2.createdBy || import_chalk126.default.gray("(unknown)"),
|
|
186042
|
+
import_chalk126.default.gray(age + " ago")
|
|
186043
|
+
];
|
|
186044
|
+
});
|
|
186045
|
+
return formatTable(
|
|
186046
|
+
["Status", "Name", "ID", "Redirects", "Created By", "Age"],
|
|
186047
|
+
["l", "l", "l", "r", "l", "l"],
|
|
186048
|
+
[{ rows }]
|
|
186049
|
+
);
|
|
186050
|
+
}
|
|
186051
|
+
var import_chalk126, import_ms27, import_pluralize14;
|
|
186052
|
+
var init_list_versions = __esm({
|
|
186053
|
+
"src/commands/redirects/list-versions.ts"() {
|
|
186054
|
+
"use strict";
|
|
186055
|
+
import_chalk126 = __toESM3(require_source());
|
|
186056
|
+
import_ms27 = __toESM3(require_ms());
|
|
186057
|
+
import_pluralize14 = __toESM3(require_pluralize());
|
|
186058
|
+
init_output_manager();
|
|
186059
|
+
init_command32();
|
|
186060
|
+
init_shared2();
|
|
186061
|
+
init_get_redirect_versions();
|
|
186062
|
+
init_stamp();
|
|
186063
|
+
init_format_table();
|
|
186064
|
+
}
|
|
186065
|
+
});
|
|
186066
|
+
|
|
186067
|
+
// src/util/redirects/put-redirects.ts
|
|
186068
|
+
async function putRedirects(client2, projectId, redirects, teamId, name) {
|
|
186069
|
+
const url3 = `/v1/bulk-redirects`;
|
|
186070
|
+
const body = {
|
|
186071
|
+
projectId,
|
|
186072
|
+
redirects
|
|
186073
|
+
};
|
|
186074
|
+
if (teamId) {
|
|
186075
|
+
body.teamId = teamId;
|
|
186076
|
+
}
|
|
186077
|
+
if (name) {
|
|
186078
|
+
body.name = name;
|
|
186079
|
+
}
|
|
186080
|
+
return await client2.fetch(url3, {
|
|
186081
|
+
method: "PUT",
|
|
186082
|
+
headers: {
|
|
186083
|
+
"Content-Type": "application/json"
|
|
186084
|
+
},
|
|
186085
|
+
body: JSON.stringify(body)
|
|
186086
|
+
});
|
|
186087
|
+
}
|
|
186088
|
+
var init_put_redirects = __esm({
|
|
186089
|
+
"src/util/redirects/put-redirects.ts"() {
|
|
186090
|
+
"use strict";
|
|
186091
|
+
}
|
|
186092
|
+
});
|
|
186093
|
+
|
|
186094
|
+
// src/util/redirects/update-redirect-version.ts
|
|
186095
|
+
async function updateRedirectVersion(client2, projectId, versionId, action, teamId) {
|
|
186096
|
+
const params2 = new URLSearchParams();
|
|
186097
|
+
params2.set("projectId", projectId);
|
|
186098
|
+
if (teamId) {
|
|
186099
|
+
params2.set("teamId", teamId);
|
|
186100
|
+
}
|
|
186101
|
+
const url3 = `/v1/bulk-redirects/versions?${params2}`;
|
|
186102
|
+
return await client2.fetch(url3, {
|
|
186103
|
+
method: "POST",
|
|
186104
|
+
headers: {
|
|
186105
|
+
"Content-Type": "application/json"
|
|
186106
|
+
},
|
|
186107
|
+
body: JSON.stringify({
|
|
186108
|
+
id: versionId,
|
|
186109
|
+
action
|
|
186110
|
+
})
|
|
186111
|
+
});
|
|
186112
|
+
}
|
|
186113
|
+
var init_update_redirect_version = __esm({
|
|
186114
|
+
"src/util/redirects/update-redirect-version.ts"() {
|
|
186115
|
+
"use strict";
|
|
186116
|
+
}
|
|
186117
|
+
});
|
|
186118
|
+
|
|
186119
|
+
// src/commands/redirects/add.ts
|
|
186120
|
+
async function add7(client2, argv) {
|
|
186121
|
+
const parsed = await parseSubcommandArgs(argv, addSubcommand7);
|
|
186122
|
+
if (typeof parsed === "number")
|
|
186123
|
+
return parsed;
|
|
186124
|
+
const link4 = await ensureProjectLink(client2);
|
|
186125
|
+
if (typeof link4 === "number")
|
|
186126
|
+
return link4;
|
|
186127
|
+
const { project, org } = link4;
|
|
186128
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
186129
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
186130
|
+
const existingStagingVersion = versions.find((v) => v.isStaging);
|
|
186131
|
+
output_manager_default.log("Add a new redirect\n");
|
|
186132
|
+
const source = await client2.input.text({
|
|
186133
|
+
message: "What is the source URL?",
|
|
186134
|
+
validate: (val) => {
|
|
186135
|
+
if (!val) {
|
|
186136
|
+
return "Source URL cannot be empty";
|
|
186137
|
+
}
|
|
186138
|
+
if (!isValidUrl(val)) {
|
|
186139
|
+
return "Must be a relative path (starting with /) or an absolute URL";
|
|
186140
|
+
}
|
|
186141
|
+
return true;
|
|
186142
|
+
}
|
|
186143
|
+
});
|
|
186144
|
+
const destination = await client2.input.text({
|
|
186145
|
+
message: "What is the destination URL?",
|
|
186146
|
+
validate: (val) => {
|
|
186147
|
+
if (!val) {
|
|
186148
|
+
return "Destination URL cannot be empty";
|
|
186149
|
+
}
|
|
186150
|
+
if (!isValidUrl(val)) {
|
|
186151
|
+
return "Must be a relative path (starting with /) or an absolute URL";
|
|
186152
|
+
}
|
|
186153
|
+
return true;
|
|
186154
|
+
}
|
|
186155
|
+
});
|
|
186156
|
+
const statusCode = await client2.input.select({
|
|
186157
|
+
message: "Select the status code:",
|
|
186158
|
+
choices: [
|
|
186159
|
+
{
|
|
186160
|
+
name: "301 - Moved Permanently (cached by browsers)",
|
|
186161
|
+
value: 301
|
|
186162
|
+
},
|
|
186163
|
+
{
|
|
186164
|
+
name: "302 - Found (temporary redirect, not cached)",
|
|
186165
|
+
value: 302
|
|
186166
|
+
},
|
|
186167
|
+
{
|
|
186168
|
+
name: "307 - Temporary Redirect (preserves request method)",
|
|
186169
|
+
value: 307
|
|
186170
|
+
},
|
|
186171
|
+
{
|
|
186172
|
+
name: "308 - Permanent Redirect (preserves request method)",
|
|
186173
|
+
value: 308
|
|
186174
|
+
}
|
|
186175
|
+
]
|
|
186176
|
+
});
|
|
186177
|
+
const caseSensitive = await client2.input.confirm(
|
|
186178
|
+
"Should the redirect be case sensitive?",
|
|
186179
|
+
false
|
|
186180
|
+
);
|
|
186181
|
+
const provideName = await client2.input.confirm(
|
|
186182
|
+
"Do you want to provide a name for this version?",
|
|
186183
|
+
false
|
|
186184
|
+
);
|
|
186185
|
+
let versionName;
|
|
186186
|
+
if (provideName) {
|
|
186187
|
+
versionName = await client2.input.text({
|
|
186188
|
+
message: "Version name (max 256 characters):",
|
|
186189
|
+
validate: (val) => {
|
|
186190
|
+
if (val && val.length > 256) {
|
|
186191
|
+
return "Name must be 256 characters or less";
|
|
186192
|
+
}
|
|
186193
|
+
return true;
|
|
186194
|
+
}
|
|
186195
|
+
});
|
|
186196
|
+
if (!versionName) {
|
|
186197
|
+
versionName = void 0;
|
|
186198
|
+
}
|
|
186199
|
+
}
|
|
186200
|
+
const addStamp = stamp_default();
|
|
186201
|
+
output_manager_default.spinner("Adding redirect");
|
|
186202
|
+
const { alias: alias2, version: version2 } = await putRedirects(
|
|
186203
|
+
client2,
|
|
186204
|
+
project.id,
|
|
186205
|
+
[
|
|
186206
|
+
{
|
|
186207
|
+
source,
|
|
186208
|
+
destination,
|
|
186209
|
+
statusCode,
|
|
186210
|
+
caseSensitive
|
|
186211
|
+
}
|
|
186212
|
+
],
|
|
186213
|
+
teamId,
|
|
186214
|
+
versionName
|
|
186215
|
+
);
|
|
186216
|
+
output_manager_default.log(`${import_chalk127.default.cyan("\u2713")} Redirect added ${import_chalk127.default.gray(addStamp())}`);
|
|
186217
|
+
output_manager_default.print(`
|
|
186218
|
+
${import_chalk127.default.bold("Redirect:")}
|
|
186219
|
+
`);
|
|
186220
|
+
output_manager_default.print(` ${import_chalk127.default.cyan(source)} \u2192 ${import_chalk127.default.cyan(destination)}
|
|
186221
|
+
`);
|
|
186222
|
+
output_manager_default.print(` Status: ${statusCode}
|
|
186223
|
+
`);
|
|
186224
|
+
output_manager_default.print(` Case sensitive: ${caseSensitive ? "Yes" : "No"}
|
|
186225
|
+
`);
|
|
186226
|
+
if (alias2) {
|
|
186227
|
+
const testUrl = source.startsWith("/") ? `https://${alias2}${source}` : `https://${alias2}`;
|
|
186228
|
+
output_manager_default.print(
|
|
186229
|
+
`
|
|
186230
|
+
${import_chalk127.default.bold("Test your changes:")} ${import_chalk127.default.cyan(testUrl)}
|
|
186231
|
+
`
|
|
186232
|
+
);
|
|
186233
|
+
}
|
|
186234
|
+
const newVersionName = version2.name || version2.id;
|
|
186235
|
+
output_manager_default.print(` ${import_chalk127.default.bold("New staging version:")} ${newVersionName}
|
|
186236
|
+
|
|
186237
|
+
`);
|
|
186238
|
+
if (!existingStagingVersion) {
|
|
186239
|
+
const shouldPromote = await client2.input.confirm(
|
|
186240
|
+
"This is the only staged change. Do you want to promote it to production now?",
|
|
186241
|
+
false
|
|
186242
|
+
);
|
|
186243
|
+
if (shouldPromote) {
|
|
186244
|
+
const promoteStamp = stamp_default();
|
|
186245
|
+
output_manager_default.spinner("Promoting to production");
|
|
186246
|
+
await updateRedirectVersion(
|
|
186247
|
+
client2,
|
|
186248
|
+
project.id,
|
|
186249
|
+
version2.id,
|
|
186250
|
+
"promote",
|
|
186251
|
+
teamId
|
|
186252
|
+
);
|
|
186253
|
+
output_manager_default.log(
|
|
186254
|
+
`${import_chalk127.default.cyan("\u2713")} Version promoted to production ${import_chalk127.default.gray(promoteStamp())}`
|
|
186255
|
+
);
|
|
186256
|
+
}
|
|
186257
|
+
} else {
|
|
186258
|
+
output_manager_default.warn(
|
|
186259
|
+
`There are other staged changes. Please review all changes with ${import_chalk127.default.cyan("vercel redirects list --staged")} before promoting to production.`
|
|
186260
|
+
);
|
|
186261
|
+
}
|
|
186262
|
+
return 0;
|
|
186263
|
+
}
|
|
186264
|
+
var import_chalk127;
|
|
186265
|
+
var init_add13 = __esm({
|
|
186266
|
+
"src/commands/redirects/add.ts"() {
|
|
186267
|
+
"use strict";
|
|
186268
|
+
import_chalk127 = __toESM3(require_source());
|
|
186269
|
+
init_output_manager();
|
|
186270
|
+
init_command32();
|
|
186271
|
+
init_shared2();
|
|
186272
|
+
init_put_redirects();
|
|
186273
|
+
init_update_redirect_version();
|
|
186274
|
+
init_get_redirect_versions();
|
|
186275
|
+
init_stamp();
|
|
186276
|
+
}
|
|
186277
|
+
});
|
|
186278
|
+
|
|
186279
|
+
// src/util/redirects/delete-redirects.ts
|
|
186280
|
+
async function deleteRedirects(client2, projectId, sources, teamId) {
|
|
186281
|
+
const params2 = new URLSearchParams();
|
|
186282
|
+
params2.set("projectId", projectId);
|
|
186283
|
+
if (teamId) {
|
|
186284
|
+
params2.set("teamId", teamId);
|
|
186285
|
+
}
|
|
186286
|
+
const url3 = `/v1/bulk-redirects?${params2}`;
|
|
186287
|
+
return await client2.fetch(url3, {
|
|
186288
|
+
method: "DELETE",
|
|
186289
|
+
headers: {
|
|
186290
|
+
"Content-Type": "application/json"
|
|
186291
|
+
},
|
|
186292
|
+
body: JSON.stringify({
|
|
186293
|
+
redirects: sources
|
|
186294
|
+
})
|
|
186295
|
+
});
|
|
186296
|
+
}
|
|
186297
|
+
var init_delete_redirects = __esm({
|
|
186298
|
+
"src/util/redirects/delete-redirects.ts"() {
|
|
186299
|
+
"use strict";
|
|
186300
|
+
}
|
|
186301
|
+
});
|
|
186302
|
+
|
|
186303
|
+
// src/commands/redirects/remove.ts
|
|
186304
|
+
async function remove5(client2, argv) {
|
|
186305
|
+
const parsed = await parseSubcommandArgs(argv, removeSubcommand9);
|
|
186306
|
+
if (typeof parsed === "number")
|
|
186307
|
+
return parsed;
|
|
186308
|
+
const error3 = validateRequiredArgs(parsed.args, ["source"]);
|
|
186309
|
+
if (error3) {
|
|
186310
|
+
output_manager_default.error(error3);
|
|
186311
|
+
return 1;
|
|
186312
|
+
}
|
|
186313
|
+
const link4 = await ensureProjectLink(client2);
|
|
186314
|
+
if (typeof link4 === "number")
|
|
186315
|
+
return link4;
|
|
186316
|
+
const { project, org } = link4;
|
|
186317
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
186318
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
186319
|
+
const existingStagingVersion = versions.find((v) => v.isStaging);
|
|
186320
|
+
const [source] = parsed.args;
|
|
186321
|
+
output_manager_default.spinner("Fetching redirect information");
|
|
186322
|
+
const { redirects } = await getRedirects(client2, project.id, { teamId });
|
|
186323
|
+
const redirectToRemove = redirects.find((r) => r.source === source);
|
|
186324
|
+
if (!redirectToRemove) {
|
|
186325
|
+
output_manager_default.error(
|
|
186326
|
+
`Redirect with source "${source}" not found. Run ${import_chalk128.default.cyan(
|
|
186327
|
+
"vercel redirects list"
|
|
186328
|
+
)} to see available redirects.`
|
|
186329
|
+
);
|
|
186330
|
+
return 1;
|
|
186331
|
+
}
|
|
186332
|
+
output_manager_default.print(`
|
|
186333
|
+
${import_chalk128.default.bold("Removing redirect:")}
|
|
186334
|
+
`);
|
|
186335
|
+
output_manager_default.print(
|
|
186336
|
+
` ${import_chalk128.default.cyan(redirectToRemove.source)} \u2192 ${import_chalk128.default.cyan(redirectToRemove.destination)}
|
|
186337
|
+
`
|
|
186338
|
+
);
|
|
186339
|
+
const status3 = redirectToRemove.statusCode || (redirectToRemove.permanent ? 308 : 307);
|
|
186340
|
+
output_manager_default.print(` Status: ${status3}
|
|
186341
|
+
|
|
186342
|
+
`);
|
|
186343
|
+
const confirmed = await confirmAction(
|
|
186344
|
+
client2,
|
|
186345
|
+
parsed.flags["--yes"],
|
|
186346
|
+
`Remove this redirect?`,
|
|
186347
|
+
`This will create a new staging version without this redirect.`
|
|
186348
|
+
);
|
|
186349
|
+
if (!confirmed) {
|
|
186350
|
+
output_manager_default.log("Canceled");
|
|
186351
|
+
return 0;
|
|
186352
|
+
}
|
|
186353
|
+
const removeStamp = stamp_default();
|
|
186354
|
+
output_manager_default.spinner(`Removing redirect for ${import_chalk128.default.bold(source)}`);
|
|
186355
|
+
const { alias: alias2, version: version2 } = await deleteRedirects(
|
|
186356
|
+
client2,
|
|
186357
|
+
project.id,
|
|
186358
|
+
[source],
|
|
186359
|
+
teamId
|
|
186360
|
+
);
|
|
186361
|
+
output_manager_default.log(
|
|
186362
|
+
`${import_chalk128.default.cyan("\u2713")} Redirect removed ${import_chalk128.default.gray(removeStamp())}`
|
|
186363
|
+
);
|
|
186364
|
+
if (alias2) {
|
|
186365
|
+
const testUrl = source.startsWith("/") ? `https://${alias2}${source}` : `https://${alias2}`;
|
|
186366
|
+
output_manager_default.print(
|
|
186367
|
+
`
|
|
186368
|
+
${import_chalk128.default.bold("Test your changes:")} ${import_chalk128.default.cyan(testUrl)}
|
|
186369
|
+
`
|
|
186370
|
+
);
|
|
186371
|
+
output_manager_default.print(
|
|
186372
|
+
` This URL should no longer redirect to the above destination.
|
|
186373
|
+
`
|
|
186374
|
+
);
|
|
186375
|
+
}
|
|
186376
|
+
const versionName = version2.name || version2.id;
|
|
186377
|
+
output_manager_default.print(` ${import_chalk128.default.bold("New staging version:")} ${versionName}
|
|
186378
|
+
|
|
186379
|
+
`);
|
|
186380
|
+
if (!existingStagingVersion) {
|
|
186381
|
+
const shouldPromote = await client2.input.confirm(
|
|
186382
|
+
"This is the only staged change. Do you want to promote it to production now?",
|
|
186383
|
+
false
|
|
186384
|
+
);
|
|
186385
|
+
if (shouldPromote) {
|
|
186386
|
+
const promoteStamp = stamp_default();
|
|
186387
|
+
output_manager_default.spinner("Promoting to production");
|
|
186388
|
+
await updateRedirectVersion(
|
|
186389
|
+
client2,
|
|
186390
|
+
project.id,
|
|
186391
|
+
version2.id,
|
|
186392
|
+
"promote",
|
|
186393
|
+
teamId
|
|
186394
|
+
);
|
|
186395
|
+
output_manager_default.log(
|
|
186396
|
+
`${import_chalk128.default.cyan("\u2713")} Version promoted to production ${import_chalk128.default.gray(promoteStamp())}`
|
|
186397
|
+
);
|
|
186398
|
+
}
|
|
186399
|
+
} else {
|
|
186400
|
+
output_manager_default.warn(
|
|
186401
|
+
`There are other staged changes. Review them with ${import_chalk128.default.cyan("vercel redirects list --staged")} before promoting to production.`
|
|
186402
|
+
);
|
|
186403
|
+
}
|
|
186404
|
+
return 0;
|
|
186405
|
+
}
|
|
186406
|
+
var import_chalk128;
|
|
186407
|
+
var init_remove5 = __esm({
|
|
186408
|
+
"src/commands/redirects/remove.ts"() {
|
|
186409
|
+
"use strict";
|
|
186410
|
+
import_chalk128 = __toESM3(require_source());
|
|
186411
|
+
init_output_manager();
|
|
186412
|
+
init_command32();
|
|
186413
|
+
init_shared2();
|
|
186414
|
+
init_delete_redirects();
|
|
186415
|
+
init_get_redirects();
|
|
186416
|
+
init_get_redirect_versions();
|
|
186417
|
+
init_update_redirect_version();
|
|
186418
|
+
init_stamp();
|
|
186419
|
+
}
|
|
186420
|
+
});
|
|
186421
|
+
|
|
186422
|
+
// src/commands/redirects/promote.ts
|
|
186423
|
+
async function promote(client2, argv) {
|
|
186424
|
+
const parsed = await parseSubcommandArgs(argv, promoteSubcommand);
|
|
186425
|
+
if (typeof parsed === "number")
|
|
186426
|
+
return parsed;
|
|
186427
|
+
const error3 = validateRequiredArgs(parsed.args, ["version-id"]);
|
|
186428
|
+
if (error3) {
|
|
186429
|
+
output_manager_default.error(error3);
|
|
186430
|
+
return 1;
|
|
186431
|
+
}
|
|
186432
|
+
const link4 = await ensureProjectLink(client2);
|
|
186433
|
+
if (typeof link4 === "number")
|
|
186434
|
+
return link4;
|
|
186435
|
+
const { project, org } = link4;
|
|
186436
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
186437
|
+
const [versionIdentifier] = parsed.args;
|
|
186438
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk129.default.bold(project.name)}`);
|
|
186439
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
186440
|
+
const version2 = versions.find(
|
|
186441
|
+
(v) => v.id === versionIdentifier || v.name === versionIdentifier
|
|
186442
|
+
);
|
|
186443
|
+
if (!version2) {
|
|
186444
|
+
output_manager_default.error(
|
|
186445
|
+
`Version with ID or name "${versionIdentifier}" not found. Run ${import_chalk129.default.cyan(
|
|
186446
|
+
"vercel redirects list-versions"
|
|
186447
|
+
)} to see available versions.`
|
|
186448
|
+
);
|
|
186449
|
+
return 1;
|
|
186450
|
+
}
|
|
186451
|
+
if (version2.isLive) {
|
|
186452
|
+
output_manager_default.error(
|
|
186453
|
+
`Version ${import_chalk129.default.bold(version2.name || version2.id)} is already live.`
|
|
186454
|
+
);
|
|
186455
|
+
return 1;
|
|
186456
|
+
}
|
|
186457
|
+
if (!version2.isStaging) {
|
|
186458
|
+
output_manager_default.error(
|
|
186459
|
+
`Version ${import_chalk129.default.bold(
|
|
186460
|
+
version2.name || version2.id
|
|
186461
|
+
)} is not staged. Only staging versions can be promoted to production.
|
|
186462
|
+
Run ${import_chalk129.default.cyan(
|
|
186463
|
+
"vercel redirects list-versions"
|
|
186464
|
+
)} to see which version is currently staged.`
|
|
186465
|
+
);
|
|
186466
|
+
return 1;
|
|
186467
|
+
}
|
|
186468
|
+
const versionName = version2.name || version2.id;
|
|
186469
|
+
output_manager_default.spinner("Fetching changes");
|
|
186470
|
+
const { redirects: diffRedirects } = await getRedirects(client2, project.id, {
|
|
186471
|
+
teamId,
|
|
186472
|
+
versionId: version2.id,
|
|
186473
|
+
diff: true
|
|
186474
|
+
});
|
|
186475
|
+
const changedRedirects = diffRedirects.filter(
|
|
186476
|
+
(r) => r.action === "+" || r.action === "-"
|
|
186477
|
+
);
|
|
186478
|
+
if (changedRedirects.length > 0) {
|
|
186479
|
+
output_manager_default.print(`
|
|
186480
|
+
${import_chalk129.default.bold("Changes to be promoted:")}
|
|
186481
|
+
|
|
186482
|
+
`);
|
|
186483
|
+
const displayRedirects = changedRedirects.slice(0, 20);
|
|
186484
|
+
for (const redirect2 of displayRedirects) {
|
|
186485
|
+
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
186486
|
+
const symbol = redirect2.action === "+" ? import_chalk129.default.green("+") : import_chalk129.default.red("-");
|
|
186487
|
+
output_manager_default.print(
|
|
186488
|
+
` ${symbol} ${redirect2.source} \u2192 ${redirect2.destination} (${status3})
|
|
186489
|
+
`
|
|
186490
|
+
);
|
|
186491
|
+
}
|
|
186492
|
+
if (changedRedirects.length > 20) {
|
|
186493
|
+
output_manager_default.print(
|
|
186494
|
+
import_chalk129.default.gray(`
|
|
186495
|
+
... and ${changedRedirects.length - 20} more changes
|
|
186496
|
+
`)
|
|
186497
|
+
);
|
|
186498
|
+
}
|
|
186499
|
+
output_manager_default.print("\n");
|
|
186500
|
+
} else {
|
|
186501
|
+
output_manager_default.print(
|
|
186502
|
+
`
|
|
186503
|
+
${import_chalk129.default.gray("No changes detected from current production version.")}
|
|
186504
|
+
|
|
186505
|
+
`
|
|
186506
|
+
);
|
|
186507
|
+
}
|
|
186508
|
+
const confirmed = await confirmAction(
|
|
186509
|
+
client2,
|
|
186510
|
+
parsed.flags["--yes"],
|
|
186511
|
+
`Promote version ${import_chalk129.default.bold(versionName)} to production?`,
|
|
186512
|
+
`This will make it the live version for ${import_chalk129.default.bold(project.name)}.`
|
|
186513
|
+
);
|
|
186514
|
+
if (!confirmed) {
|
|
186515
|
+
output_manager_default.log("Canceled");
|
|
186516
|
+
return 0;
|
|
186517
|
+
}
|
|
186518
|
+
const updateStamp = stamp_default();
|
|
186519
|
+
output_manager_default.spinner(`Promoting version ${import_chalk129.default.bold(versionName)} to production`);
|
|
186520
|
+
const { version: newVersion } = await updateRedirectVersion(
|
|
186521
|
+
client2,
|
|
186522
|
+
project.id,
|
|
186523
|
+
version2.id,
|
|
186524
|
+
"promote",
|
|
186525
|
+
teamId
|
|
186526
|
+
);
|
|
186527
|
+
output_manager_default.log(
|
|
186528
|
+
`${import_chalk129.default.cyan("\u2713")} Version ${import_chalk129.default.bold(
|
|
186529
|
+
newVersion.name || newVersion.id
|
|
186530
|
+
)} promoted to production ${import_chalk129.default.gray(updateStamp())}`
|
|
186531
|
+
);
|
|
186532
|
+
return 0;
|
|
186533
|
+
}
|
|
186534
|
+
var import_chalk129;
|
|
186535
|
+
var init_promote3 = __esm({
|
|
186536
|
+
"src/commands/redirects/promote.ts"() {
|
|
186537
|
+
"use strict";
|
|
186538
|
+
import_chalk129 = __toESM3(require_source());
|
|
186539
|
+
init_output_manager();
|
|
186540
|
+
init_command32();
|
|
186541
|
+
init_shared2();
|
|
186542
|
+
init_get_redirect_versions();
|
|
186543
|
+
init_update_redirect_version();
|
|
186544
|
+
init_get_redirects();
|
|
186545
|
+
init_stamp();
|
|
186546
|
+
}
|
|
186547
|
+
});
|
|
186548
|
+
|
|
186549
|
+
// src/commands/redirects/restore.ts
|
|
186550
|
+
async function restore(client2, argv) {
|
|
186551
|
+
const parsed = await parseSubcommandArgs(argv, restoreSubcommand);
|
|
186552
|
+
if (typeof parsed === "number")
|
|
186553
|
+
return parsed;
|
|
186554
|
+
const error3 = validateRequiredArgs(parsed.args, ["version-id"]);
|
|
186555
|
+
if (error3) {
|
|
186556
|
+
output_manager_default.error(error3);
|
|
186557
|
+
return 1;
|
|
186558
|
+
}
|
|
186559
|
+
const link4 = await ensureProjectLink(client2);
|
|
186560
|
+
if (typeof link4 === "number")
|
|
186561
|
+
return link4;
|
|
186562
|
+
const { project, org } = link4;
|
|
186563
|
+
const teamId = org.type === "team" ? org.id : void 0;
|
|
186564
|
+
const [versionIdentifier] = parsed.args;
|
|
186565
|
+
output_manager_default.spinner(`Fetching redirect versions for ${import_chalk130.default.bold(project.name)}`);
|
|
186566
|
+
const { versions } = await getRedirectVersions(client2, project.id, teamId);
|
|
186567
|
+
const version2 = versions.find(
|
|
186568
|
+
(v) => v.id === versionIdentifier || v.name === versionIdentifier
|
|
186569
|
+
);
|
|
186570
|
+
if (!version2) {
|
|
186571
|
+
output_manager_default.error(
|
|
186572
|
+
`Version with ID or name "${versionIdentifier}" not found. Run ${import_chalk130.default.cyan(
|
|
186573
|
+
"vercel redirects list-versions"
|
|
186574
|
+
)} to see available versions.`
|
|
186575
|
+
);
|
|
186576
|
+
return 1;
|
|
186577
|
+
}
|
|
186578
|
+
if (version2.isLive) {
|
|
186579
|
+
output_manager_default.error(
|
|
186580
|
+
`Version ${import_chalk130.default.bold(
|
|
186581
|
+
version2.name || version2.id
|
|
186582
|
+
)} is currently live. You cannot restore the live version.
|
|
186583
|
+
Run ${import_chalk130.default.cyan(
|
|
186584
|
+
"vercel redirects list-versions"
|
|
186585
|
+
)} to see previous versions you can restore.`
|
|
186586
|
+
);
|
|
186587
|
+
return 1;
|
|
186588
|
+
}
|
|
186589
|
+
if (version2.isStaging) {
|
|
186590
|
+
output_manager_default.error(
|
|
186591
|
+
`Version ${import_chalk130.default.bold(
|
|
186592
|
+
version2.name || version2.id
|
|
186593
|
+
)} is staged. You can only restore previous versions.`
|
|
186594
|
+
);
|
|
186595
|
+
return 1;
|
|
186596
|
+
}
|
|
186597
|
+
const versionName = version2.name || version2.id;
|
|
186598
|
+
output_manager_default.spinner("Fetching changes");
|
|
186599
|
+
const { redirects: diffRedirects } = await getRedirects(client2, project.id, {
|
|
186600
|
+
teamId,
|
|
186601
|
+
versionId: version2.id,
|
|
186602
|
+
diff: true
|
|
186603
|
+
});
|
|
186604
|
+
const changedRedirects = diffRedirects.filter(
|
|
186605
|
+
(r) => r.action === "+" || r.action === "-"
|
|
186606
|
+
);
|
|
186607
|
+
if (changedRedirects.length > 0) {
|
|
186608
|
+
output_manager_default.print(`
|
|
186609
|
+
${import_chalk130.default.bold("Changes to be restored:")}
|
|
186610
|
+
|
|
186611
|
+
`);
|
|
186612
|
+
const displayRedirects = changedRedirects.slice(0, 20);
|
|
186613
|
+
for (const redirect2 of displayRedirects) {
|
|
186614
|
+
const status3 = redirect2.statusCode || (redirect2.permanent ? 308 : 307);
|
|
186615
|
+
const symbol = redirect2.action === "+" ? import_chalk130.default.green("+") : import_chalk130.default.red("-");
|
|
186616
|
+
output_manager_default.print(
|
|
186617
|
+
` ${symbol} ${redirect2.source} \u2192 ${redirect2.destination} (${status3})
|
|
186618
|
+
`
|
|
186619
|
+
);
|
|
186620
|
+
}
|
|
186621
|
+
if (changedRedirects.length > 20) {
|
|
186622
|
+
output_manager_default.print(
|
|
186623
|
+
import_chalk130.default.gray(`
|
|
186624
|
+
... and ${changedRedirects.length - 20} more changes
|
|
186625
|
+
`)
|
|
186626
|
+
);
|
|
186627
|
+
}
|
|
186628
|
+
output_manager_default.print("\n");
|
|
186629
|
+
} else {
|
|
186630
|
+
output_manager_default.print(
|
|
186631
|
+
`
|
|
186632
|
+
${import_chalk130.default.gray("No changes detected from current production version.")}
|
|
186633
|
+
|
|
186634
|
+
`
|
|
186635
|
+
);
|
|
186636
|
+
}
|
|
186637
|
+
const confirmed = await confirmAction(
|
|
186638
|
+
client2,
|
|
186639
|
+
parsed.flags["--yes"],
|
|
186640
|
+
`Restore version ${import_chalk130.default.bold(versionName)}?`,
|
|
186641
|
+
`This will make it the live version for ${import_chalk130.default.bold(project.name)}.`
|
|
186642
|
+
);
|
|
186643
|
+
if (!confirmed) {
|
|
186644
|
+
output_manager_default.log("Canceled");
|
|
186645
|
+
return 0;
|
|
186646
|
+
}
|
|
186647
|
+
const updateStamp = stamp_default();
|
|
186648
|
+
output_manager_default.spinner(`Restoring version ${import_chalk130.default.bold(versionName)}`);
|
|
186649
|
+
const { version: newVersion } = await updateRedirectVersion(
|
|
186650
|
+
client2,
|
|
186651
|
+
project.id,
|
|
186652
|
+
version2.id,
|
|
186653
|
+
"restore",
|
|
186654
|
+
teamId
|
|
186655
|
+
);
|
|
186656
|
+
output_manager_default.log(
|
|
186657
|
+
`${import_chalk130.default.cyan("\u2713")} Version ${import_chalk130.default.bold(
|
|
186658
|
+
newVersion.name || newVersion.id
|
|
186659
|
+
)} restored to production ${import_chalk130.default.gray(updateStamp())}`
|
|
186660
|
+
);
|
|
186661
|
+
return 0;
|
|
186662
|
+
}
|
|
186663
|
+
var import_chalk130;
|
|
186664
|
+
var init_restore = __esm({
|
|
186665
|
+
"src/commands/redirects/restore.ts"() {
|
|
186666
|
+
"use strict";
|
|
186667
|
+
import_chalk130 = __toESM3(require_source());
|
|
186668
|
+
init_output_manager();
|
|
186669
|
+
init_command32();
|
|
186670
|
+
init_shared2();
|
|
186671
|
+
init_get_redirect_versions();
|
|
186672
|
+
init_update_redirect_version();
|
|
186673
|
+
init_get_redirects();
|
|
186674
|
+
init_stamp();
|
|
186675
|
+
}
|
|
186676
|
+
});
|
|
186677
|
+
|
|
186678
|
+
// src/util/telemetry/commands/redirects/index.ts
|
|
186679
|
+
var RedirectsTelemetryClient;
|
|
186680
|
+
var init_redirects = __esm({
|
|
186681
|
+
"src/util/telemetry/commands/redirects/index.ts"() {
|
|
186682
|
+
"use strict";
|
|
186683
|
+
init_telemetry();
|
|
186684
|
+
RedirectsTelemetryClient = class extends TelemetryClient {
|
|
186685
|
+
trackCliSubcommandList(actual) {
|
|
186686
|
+
this.trackCliSubcommand({
|
|
186687
|
+
subcommand: "list",
|
|
186688
|
+
value: actual
|
|
186689
|
+
});
|
|
186690
|
+
}
|
|
186691
|
+
trackCliSubcommandListVersions(actual) {
|
|
186692
|
+
this.trackCliSubcommand({
|
|
186693
|
+
subcommand: "list-versions",
|
|
186694
|
+
value: actual
|
|
186695
|
+
});
|
|
186696
|
+
}
|
|
186697
|
+
trackCliSubcommandAdd(actual) {
|
|
186698
|
+
this.trackCliSubcommand({
|
|
186699
|
+
subcommand: "add",
|
|
186700
|
+
value: actual
|
|
186701
|
+
});
|
|
186702
|
+
}
|
|
186703
|
+
trackCliSubcommandRemove(actual) {
|
|
186704
|
+
this.trackCliSubcommand({
|
|
186705
|
+
subcommand: "remove",
|
|
186706
|
+
value: actual
|
|
186707
|
+
});
|
|
186708
|
+
}
|
|
186709
|
+
trackCliSubcommandPromote(actual) {
|
|
186710
|
+
this.trackCliSubcommand({
|
|
186711
|
+
subcommand: "promote",
|
|
186712
|
+
value: actual
|
|
186713
|
+
});
|
|
186714
|
+
}
|
|
186715
|
+
trackCliSubcommandRestore(actual) {
|
|
186716
|
+
this.trackCliSubcommand({
|
|
186717
|
+
subcommand: "restore",
|
|
186718
|
+
value: actual
|
|
186719
|
+
});
|
|
186720
|
+
}
|
|
186721
|
+
};
|
|
186722
|
+
}
|
|
186723
|
+
});
|
|
186724
|
+
|
|
186725
|
+
// src/commands/redirects/index.ts
|
|
186726
|
+
var redirects_exports = {};
|
|
186727
|
+
__export3(redirects_exports, {
|
|
186728
|
+
default: () => main16
|
|
186729
|
+
});
|
|
186730
|
+
async function main16(client2) {
|
|
186731
|
+
const telemetry2 = new RedirectsTelemetryClient({
|
|
186732
|
+
opts: {
|
|
186733
|
+
store: client2.telemetryEventStore
|
|
186734
|
+
}
|
|
186735
|
+
});
|
|
186736
|
+
let parsedArgs;
|
|
186737
|
+
const flagsSpecification = getFlagsSpecification(redirectsCommand.options);
|
|
186738
|
+
try {
|
|
186739
|
+
parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification, {
|
|
186740
|
+
permissive: true
|
|
186741
|
+
});
|
|
186742
|
+
} catch (err) {
|
|
186743
|
+
printError(err);
|
|
186744
|
+
return 1;
|
|
186745
|
+
}
|
|
186746
|
+
const subArgs = parsedArgs.args.slice(1);
|
|
186747
|
+
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
|
186748
|
+
subArgs,
|
|
186749
|
+
COMMAND_CONFIG17
|
|
186750
|
+
);
|
|
186751
|
+
const needHelp = parsedArgs.flags["--help"];
|
|
186752
|
+
if (!subcommand && needHelp) {
|
|
186753
|
+
telemetry2.trackCliFlagHelp("redirects");
|
|
186754
|
+
output_manager_default.print(help(redirectsCommand, { columns: client2.stderr.columns }));
|
|
186755
|
+
return 2;
|
|
186756
|
+
}
|
|
186757
|
+
function printHelp(command) {
|
|
186758
|
+
output_manager_default.print(
|
|
186759
|
+
help(command, {
|
|
186760
|
+
parent: redirectsCommand,
|
|
186761
|
+
columns: client2.stderr.columns
|
|
186762
|
+
})
|
|
186763
|
+
);
|
|
186764
|
+
}
|
|
186765
|
+
switch (subcommand) {
|
|
186766
|
+
case "list":
|
|
186767
|
+
if (needHelp) {
|
|
186768
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186769
|
+
printHelp(listSubcommand8);
|
|
186770
|
+
return 2;
|
|
186771
|
+
}
|
|
186772
|
+
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
|
186773
|
+
return list7(client2, args2);
|
|
186774
|
+
case "list-versions":
|
|
186775
|
+
if (needHelp) {
|
|
186776
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186777
|
+
printHelp(listVersionsSubcommand);
|
|
186778
|
+
return 2;
|
|
186779
|
+
}
|
|
186780
|
+
telemetry2.trackCliSubcommandListVersions(subcommandOriginal);
|
|
186781
|
+
return listVersions(client2, args2);
|
|
186782
|
+
case "add":
|
|
186783
|
+
if (needHelp) {
|
|
186784
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186785
|
+
printHelp(addSubcommand7);
|
|
186786
|
+
return 2;
|
|
186787
|
+
}
|
|
186788
|
+
telemetry2.trackCliSubcommandAdd(subcommandOriginal);
|
|
186789
|
+
return add7(client2, args2);
|
|
186790
|
+
case "remove":
|
|
186791
|
+
if (needHelp) {
|
|
186792
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186793
|
+
printHelp(removeSubcommand9);
|
|
186794
|
+
return 2;
|
|
186795
|
+
}
|
|
186796
|
+
telemetry2.trackCliSubcommandRemove(subcommandOriginal);
|
|
186797
|
+
return remove5(client2, args2);
|
|
186798
|
+
case "promote":
|
|
186799
|
+
if (needHelp) {
|
|
186800
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186801
|
+
printHelp(promoteSubcommand);
|
|
186802
|
+
return 2;
|
|
186803
|
+
}
|
|
186804
|
+
telemetry2.trackCliSubcommandPromote(subcommandOriginal);
|
|
186805
|
+
return promote(client2, args2);
|
|
186806
|
+
case "restore":
|
|
186807
|
+
if (needHelp) {
|
|
186808
|
+
telemetry2.trackCliFlagHelp("redirects", subcommandOriginal);
|
|
186809
|
+
printHelp(restoreSubcommand);
|
|
186810
|
+
return 2;
|
|
186811
|
+
}
|
|
186812
|
+
telemetry2.trackCliSubcommandRestore(subcommandOriginal);
|
|
186813
|
+
return restore(client2, args2);
|
|
186814
|
+
default:
|
|
186815
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG17));
|
|
186816
|
+
output_manager_default.print(help(redirectsCommand, { columns: client2.stderr.columns }));
|
|
186817
|
+
return 2;
|
|
186818
|
+
}
|
|
186819
|
+
}
|
|
186820
|
+
var COMMAND_CONFIG17;
|
|
186821
|
+
var init_redirects2 = __esm({
|
|
186822
|
+
"src/commands/redirects/index.ts"() {
|
|
186823
|
+
"use strict";
|
|
186824
|
+
init_get_args();
|
|
186825
|
+
init_get_invalid_subcommand();
|
|
186826
|
+
init_get_subcommand();
|
|
186827
|
+
init_error2();
|
|
186828
|
+
init_help();
|
|
186829
|
+
init_list11();
|
|
186830
|
+
init_list_versions();
|
|
186831
|
+
init_add13();
|
|
186832
|
+
init_remove5();
|
|
186833
|
+
init_promote3();
|
|
186834
|
+
init_restore();
|
|
186835
|
+
init_command32();
|
|
186836
|
+
init_get_flags_specification();
|
|
186837
|
+
init_output_manager();
|
|
186838
|
+
init_commands();
|
|
186839
|
+
init_redirects();
|
|
186840
|
+
COMMAND_CONFIG17 = {
|
|
186841
|
+
list: getCommandAliases(listSubcommand8),
|
|
186842
|
+
"list-versions": getCommandAliases(listVersionsSubcommand),
|
|
186843
|
+
add: getCommandAliases(addSubcommand7),
|
|
186844
|
+
remove: getCommandAliases(removeSubcommand9),
|
|
186845
|
+
promote: getCommandAliases(promoteSubcommand),
|
|
186846
|
+
restore: getCommandAliases(restoreSubcommand)
|
|
186847
|
+
};
|
|
186848
|
+
}
|
|
186849
|
+
});
|
|
186850
|
+
|
|
185498
186851
|
// src/util/url.ts
|
|
185499
186852
|
var normalizeURL2;
|
|
185500
186853
|
var init_url = __esm({
|
|
@@ -185598,7 +186951,7 @@ var init_get_deployments_by_project_id = __esm({
|
|
|
185598
186951
|
|
|
185599
186952
|
// src/util/telemetry/commands/remove/index.ts
|
|
185600
186953
|
var RemoveTelemetryClient;
|
|
185601
|
-
var
|
|
186954
|
+
var init_remove6 = __esm({
|
|
185602
186955
|
"src/util/telemetry/commands/remove/index.ts"() {
|
|
185603
186956
|
"use strict";
|
|
185604
186957
|
init_telemetry();
|
|
@@ -185633,9 +186986,9 @@ var init_remove5 = __esm({
|
|
|
185633
186986
|
// src/commands/remove/index.ts
|
|
185634
186987
|
var remove_exports = {};
|
|
185635
186988
|
__export3(remove_exports, {
|
|
185636
|
-
default: () =>
|
|
186989
|
+
default: () => remove6
|
|
185637
186990
|
});
|
|
185638
|
-
async function
|
|
186991
|
+
async function remove6(client2) {
|
|
185639
186992
|
const telemetryClient = new RemoveTelemetryClient({
|
|
185640
186993
|
opts: {
|
|
185641
186994
|
store: client2.telemetryEventStore
|
|
@@ -185680,7 +187033,7 @@ async function remove5(client2) {
|
|
|
185680
187033
|
}
|
|
185681
187034
|
const { contextName } = await getScope(client2);
|
|
185682
187035
|
output_manager_default.spinner(
|
|
185683
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
|
187036
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk131.default.bold(contextName)}`
|
|
185684
187037
|
);
|
|
185685
187038
|
let aliases;
|
|
185686
187039
|
let projects;
|
|
@@ -185746,7 +187099,7 @@ async function remove5(client2) {
|
|
|
185746
187099
|
});
|
|
185747
187100
|
if (deployments.length === 0 && projects.length === 0) {
|
|
185748
187101
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
|
185749
|
-
const stylizedIds = ids.map((id) =>
|
|
187102
|
+
const stylizedIds = ids.map((id) => import_chalk131.default.bold(`"${id}"`)).join(", ");
|
|
185750
187103
|
const commandName = getCommandName("projects ls");
|
|
185751
187104
|
log2(
|
|
185752
187105
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
|
@@ -185754,7 +187107,7 @@ async function remove5(client2) {
|
|
|
185754
187107
|
return 1;
|
|
185755
187108
|
}
|
|
185756
187109
|
log2(
|
|
185757
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
|
187110
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk131.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
|
185758
187111
|
);
|
|
185759
187112
|
if (deployments.length > 200) {
|
|
185760
187113
|
output_manager_default.warn(
|
|
@@ -185781,11 +187134,11 @@ async function remove5(client2) {
|
|
|
185781
187134
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
|
185782
187135
|
);
|
|
185783
187136
|
deployments.forEach((depl) => {
|
|
185784
|
-
output_manager_default.print(`${
|
|
187137
|
+
output_manager_default.print(`${import_chalk131.default.gray("-")} ${import_chalk131.default.bold(depl.url)}
|
|
185785
187138
|
`);
|
|
185786
187139
|
});
|
|
185787
187140
|
projects.forEach((project) => {
|
|
185788
|
-
output_manager_default.print(`${
|
|
187141
|
+
output_manager_default.print(`${import_chalk131.default.gray("-")} ${import_chalk131.default.bold(project.name)}
|
|
185789
187142
|
`);
|
|
185790
187143
|
});
|
|
185791
187144
|
return 0;
|
|
@@ -185794,7 +187147,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
185794
187147
|
return new Promise((resolve13) => {
|
|
185795
187148
|
if (deployments.length > 0) {
|
|
185796
187149
|
output_manager_default.log(
|
|
185797
|
-
`The following ${(0,
|
|
187150
|
+
`The following ${(0, import_pluralize15.default)(
|
|
185798
187151
|
"deployment",
|
|
185799
187152
|
deployments.length,
|
|
185800
187153
|
deployments.length > 1
|
|
@@ -185802,8 +187155,8 @@ function readConfirmation4(deployments, projects) {
|
|
|
185802
187155
|
);
|
|
185803
187156
|
const deploymentTable = table(
|
|
185804
187157
|
deployments.map((depl) => {
|
|
185805
|
-
const time =
|
|
185806
|
-
const url3 = depl.url ?
|
|
187158
|
+
const time = import_chalk131.default.gray(`${(0, import_ms28.default)(Date.now() - depl.createdAt)} ago`);
|
|
187159
|
+
const url3 = depl.url ? import_chalk131.default.underline(`https://${depl.url}`) : "";
|
|
185807
187160
|
return [` ${depl.id}`, url3, time];
|
|
185808
187161
|
}),
|
|
185809
187162
|
{ align: ["l", "r", "l"], hsep: 6 }
|
|
@@ -185814,13 +187167,13 @@ function readConfirmation4(deployments, projects) {
|
|
|
185814
187167
|
for (const depl of deployments) {
|
|
185815
187168
|
for (const { alias: alias2 } of depl.aliases) {
|
|
185816
187169
|
output_manager_default.warn(
|
|
185817
|
-
`${
|
|
187170
|
+
`${import_chalk131.default.underline(`https://${alias2}`)} is an alias for ${import_chalk131.default.bold(depl.url)} and will be removed`
|
|
185818
187171
|
);
|
|
185819
187172
|
}
|
|
185820
187173
|
}
|
|
185821
187174
|
if (projects.length > 0) {
|
|
185822
187175
|
output_manager_default.print(
|
|
185823
|
-
`The following ${(0,
|
|
187176
|
+
`The following ${(0, import_pluralize15.default)(
|
|
185824
187177
|
"project",
|
|
185825
187178
|
projects.length,
|
|
185826
187179
|
projects.length > 1
|
|
@@ -185828,12 +187181,12 @@ function readConfirmation4(deployments, projects) {
|
|
|
185828
187181
|
`
|
|
185829
187182
|
);
|
|
185830
187183
|
for (const project of projects) {
|
|
185831
|
-
output_manager_default.print(`${
|
|
187184
|
+
output_manager_default.print(`${import_chalk131.default.gray("-")} ${import_chalk131.default.bold(project.name)}
|
|
185832
187185
|
`);
|
|
185833
187186
|
}
|
|
185834
187187
|
}
|
|
185835
187188
|
output_manager_default.print(
|
|
185836
|
-
`${
|
|
187189
|
+
`${import_chalk131.default.bold.red("> Are you sure?")} ${import_chalk131.default.gray("(y/N) ")}`
|
|
185837
187190
|
);
|
|
185838
187191
|
process.stdin.on("data", (d) => {
|
|
185839
187192
|
process.stdin.pause();
|
|
@@ -185843,20 +187196,20 @@ function readConfirmation4(deployments, projects) {
|
|
|
185843
187196
|
}
|
|
185844
187197
|
function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
185845
187198
|
if (!projects || projects.length === 0) {
|
|
185846
|
-
return `${(0,
|
|
187199
|
+
return `${(0, import_pluralize15.default)("deployment", deployments.length, true)}`;
|
|
185847
187200
|
}
|
|
185848
187201
|
if (!deployments || deployments.length === 0) {
|
|
185849
|
-
return `${(0,
|
|
187202
|
+
return `${(0, import_pluralize15.default)("project", projects.length, true)}`;
|
|
185850
187203
|
}
|
|
185851
|
-
return `${(0,
|
|
187204
|
+
return `${(0, import_pluralize15.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize15.default)("project", projects.length, true)}`;
|
|
185852
187205
|
}
|
|
185853
|
-
var
|
|
185854
|
-
var
|
|
187206
|
+
var import_chalk131, import_ms28, import_pluralize15;
|
|
187207
|
+
var init_remove7 = __esm({
|
|
185855
187208
|
"src/commands/remove/index.ts"() {
|
|
185856
187209
|
"use strict";
|
|
185857
|
-
|
|
185858
|
-
|
|
185859
|
-
|
|
187210
|
+
import_chalk131 = __toESM3(require_source());
|
|
187211
|
+
import_ms28 = __toESM3(require_ms());
|
|
187212
|
+
import_pluralize15 = __toESM3(require_pluralize());
|
|
185860
187213
|
init_table();
|
|
185861
187214
|
init_util();
|
|
185862
187215
|
init_get_aliases();
|
|
@@ -185873,9 +187226,9 @@ var init_remove6 = __esm({
|
|
|
185873
187226
|
init_error2();
|
|
185874
187227
|
init_now_error();
|
|
185875
187228
|
init_help();
|
|
185876
|
-
|
|
187229
|
+
init_command33();
|
|
185877
187230
|
init_get_flags_specification();
|
|
185878
|
-
|
|
187231
|
+
init_remove6();
|
|
185879
187232
|
init_output_manager();
|
|
185880
187233
|
}
|
|
185881
187234
|
});
|
|
@@ -185888,8 +187241,8 @@ async function rollbackStatus({
|
|
|
185888
187241
|
project,
|
|
185889
187242
|
timeout = "3m"
|
|
185890
187243
|
}) {
|
|
185891
|
-
const recentThreshold = Date.now() - (0,
|
|
185892
|
-
const rollbackTimeout = Date.now() + (0,
|
|
187244
|
+
const recentThreshold = Date.now() - (0, import_ms29.default)("3m");
|
|
187245
|
+
const rollbackTimeout = Date.now() + (0, import_ms29.default)(timeout);
|
|
185893
187246
|
let counter = 0;
|
|
185894
187247
|
let spinnerMessage = deployment ? "Rollback in progress" : `Checking rollback status of ${project.name}`;
|
|
185895
187248
|
if (!contextName) {
|
|
@@ -185950,7 +187303,7 @@ async function rollbackStatus({
|
|
|
185950
187303
|
}
|
|
185951
187304
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
|
185952
187305
|
output_manager_default.log(
|
|
185953
|
-
`The rollback exceeded its deadline - rerun ${
|
|
187306
|
+
`The rollback exceeded its deadline - rerun ${import_chalk132.default.bold(
|
|
185954
187307
|
`${packageName} rollback ${toDeploymentId}`
|
|
185955
187308
|
)} to try again`
|
|
185956
187309
|
);
|
|
@@ -186014,33 +187367,33 @@ async function renderJobSucceeded2({
|
|
|
186014
187367
|
let deploymentInfo = "";
|
|
186015
187368
|
try {
|
|
186016
187369
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
|
186017
|
-
deploymentInfo = `${
|
|
187370
|
+
deploymentInfo = `${import_chalk132.default.bold(deployment.url)} (${toDeploymentId})`;
|
|
186018
187371
|
} catch (err) {
|
|
186019
187372
|
output_manager_default.debug(
|
|
186020
187373
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
|
186021
187374
|
);
|
|
186022
|
-
deploymentInfo =
|
|
187375
|
+
deploymentInfo = import_chalk132.default.bold(toDeploymentId);
|
|
186023
187376
|
}
|
|
186024
187377
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
|
186025
187378
|
output_manager_default.log(
|
|
186026
|
-
`Success! ${
|
|
187379
|
+
`Success! ${import_chalk132.default.bold(
|
|
186027
187380
|
project.name
|
|
186028
187381
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
|
186029
187382
|
);
|
|
186030
187383
|
return 0;
|
|
186031
187384
|
}
|
|
186032
|
-
var
|
|
187385
|
+
var import_chalk132, import_ms29;
|
|
186033
187386
|
var init_status3 = __esm({
|
|
186034
187387
|
"src/commands/rollback/status.ts"() {
|
|
186035
187388
|
"use strict";
|
|
186036
|
-
|
|
187389
|
+
import_chalk132 = __toESM3(require_source());
|
|
186037
187390
|
init_elapsed();
|
|
186038
187391
|
init_format_date();
|
|
186039
187392
|
init_get_deployment();
|
|
186040
187393
|
init_pkg_name();
|
|
186041
187394
|
init_get_project_by_id_or_name();
|
|
186042
187395
|
init_get_scope();
|
|
186043
|
-
|
|
187396
|
+
import_ms29 = __toESM3(require_ms());
|
|
186044
187397
|
init_errors_ts();
|
|
186045
187398
|
init_render_alias_status();
|
|
186046
187399
|
init_sleep();
|
|
@@ -186063,9 +187416,9 @@ async function requestRollback({
|
|
|
186063
187416
|
// required
|
|
186064
187417
|
method: "POST"
|
|
186065
187418
|
});
|
|
186066
|
-
if (timeout !== void 0 && (0,
|
|
187419
|
+
if (timeout !== void 0 && (0, import_ms30.default)(timeout) === 0) {
|
|
186067
187420
|
output_manager_default.log(
|
|
186068
|
-
`Successfully requested rollback of ${
|
|
187421
|
+
`Successfully requested rollback of ${import_chalk133.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
186069
187422
|
);
|
|
186070
187423
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
|
186071
187424
|
return 0;
|
|
@@ -186078,14 +187431,14 @@ async function requestRollback({
|
|
|
186078
187431
|
timeout
|
|
186079
187432
|
});
|
|
186080
187433
|
}
|
|
186081
|
-
var
|
|
187434
|
+
var import_chalk133, import_ms30;
|
|
186082
187435
|
var init_request_rollback = __esm({
|
|
186083
187436
|
"src/commands/rollback/request-rollback.ts"() {
|
|
186084
187437
|
"use strict";
|
|
186085
|
-
|
|
187438
|
+
import_chalk133 = __toESM3(require_source());
|
|
186086
187439
|
init_pkg_name();
|
|
186087
187440
|
init_get_project_by_deployment();
|
|
186088
|
-
|
|
187441
|
+
import_ms30 = __toESM3(require_ms());
|
|
186089
187442
|
init_status3();
|
|
186090
187443
|
init_output_manager();
|
|
186091
187444
|
}
|
|
@@ -186134,7 +187487,7 @@ var rollback_exports = {};
|
|
|
186134
187487
|
__export3(rollback_exports, {
|
|
186135
187488
|
default: () => rollback_default
|
|
186136
187489
|
});
|
|
186137
|
-
var import_error_utils34,
|
|
187490
|
+
var import_error_utils34, import_ms31, rollback_default;
|
|
186138
187491
|
var init_rollback2 = __esm({
|
|
186139
187492
|
"src/commands/rollback/index.ts"() {
|
|
186140
187493
|
"use strict";
|
|
@@ -186142,11 +187495,11 @@ var init_rollback2 = __esm({
|
|
|
186142
187495
|
init_get_project_by_cwd_or_link();
|
|
186143
187496
|
init_error2();
|
|
186144
187497
|
import_error_utils34 = __toESM3(require_dist2());
|
|
186145
|
-
|
|
187498
|
+
import_ms31 = __toESM3(require_ms());
|
|
186146
187499
|
init_request_rollback();
|
|
186147
187500
|
init_status3();
|
|
186148
187501
|
init_help();
|
|
186149
|
-
|
|
187502
|
+
init_command34();
|
|
186150
187503
|
init_get_flags_specification();
|
|
186151
187504
|
init_rollback();
|
|
186152
187505
|
init_output_manager();
|
|
@@ -186173,7 +187526,7 @@ var init_rollback2 = __esm({
|
|
|
186173
187526
|
return 2;
|
|
186174
187527
|
}
|
|
186175
187528
|
const timeout = parsedArgs.flags["--timeout"];
|
|
186176
|
-
if (timeout && (0,
|
|
187529
|
+
if (timeout && (0, import_ms31.default)(timeout) === void 0) {
|
|
186177
187530
|
output_manager_default.error(`Invalid timeout "${timeout}"`);
|
|
186178
187531
|
return 1;
|
|
186179
187532
|
}
|
|
@@ -186513,7 +187866,7 @@ async function rollingRelease(client2) {
|
|
|
186513
187866
|
subcommand,
|
|
186514
187867
|
args: subcommandArgs,
|
|
186515
187868
|
subcommandOriginal
|
|
186516
|
-
} = getSubcommand(client2.argv.slice(3),
|
|
187869
|
+
} = getSubcommand(client2.argv.slice(3), COMMAND_CONFIG18);
|
|
186517
187870
|
const needHelp = client2.argv.includes("--help") || client2.argv.includes("-h");
|
|
186518
187871
|
if (!subcommand && needHelp) {
|
|
186519
187872
|
telemetry2.trackCliFlagHelp("rolling-release");
|
|
@@ -186702,7 +188055,7 @@ async function rollingRelease(client2) {
|
|
|
186702
188055
|
}
|
|
186703
188056
|
default: {
|
|
186704
188057
|
output_manager_default.debug(`Invalid subcommand: ${subcommand}`);
|
|
186705
|
-
output_manager_default.error(getInvalidSubcommand(
|
|
188058
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG18));
|
|
186706
188059
|
output_manager_default.print(
|
|
186707
188060
|
help(rollingReleaseCommand, { columns: client2.stderr.columns })
|
|
186708
188061
|
);
|
|
@@ -186715,14 +188068,14 @@ async function rollingRelease(client2) {
|
|
|
186715
188068
|
return 1;
|
|
186716
188069
|
}
|
|
186717
188070
|
}
|
|
186718
|
-
var
|
|
188071
|
+
var COMMAND_CONFIG18;
|
|
186719
188072
|
var init_rolling_release2 = __esm({
|
|
186720
188073
|
"src/commands/rolling-release/index.ts"() {
|
|
186721
188074
|
"use strict";
|
|
186722
188075
|
init_get_args();
|
|
186723
188076
|
init_get_flags_specification();
|
|
186724
188077
|
init_help();
|
|
186725
|
-
|
|
188078
|
+
init_command35();
|
|
186726
188079
|
init_request_rolling_release();
|
|
186727
188080
|
init_start_rolling_release();
|
|
186728
188081
|
init_configure_rolling_release();
|
|
@@ -186736,7 +188089,7 @@ var init_rolling_release2 = __esm({
|
|
|
186736
188089
|
init_get_subcommand();
|
|
186737
188090
|
init_commands();
|
|
186738
188091
|
init_get_invalid_subcommand();
|
|
186739
|
-
|
|
188092
|
+
COMMAND_CONFIG18 = {
|
|
186740
188093
|
configure: getCommandAliases(configureSubcommand),
|
|
186741
188094
|
start: getCommandAliases(startSubcommand),
|
|
186742
188095
|
approve: getCommandAliases(approveSubcommand),
|
|
@@ -186752,13 +188105,13 @@ function formatBranchMatcher(branchMatcher) {
|
|
|
186752
188105
|
if (branchMatcher?.type === "equals") {
|
|
186753
188106
|
return branchMatcher.pattern;
|
|
186754
188107
|
} else if (branchMatcher?.type === "startsWith") {
|
|
186755
|
-
return `${branchMatcher.pattern}${
|
|
188108
|
+
return `${branchMatcher.pattern}${import_chalk134.default.dim("*")}`;
|
|
186756
188109
|
} else if (branchMatcher?.type === "endsWith") {
|
|
186757
|
-
return `${
|
|
188110
|
+
return `${import_chalk134.default.dim("*")}${branchMatcher.pattern}`;
|
|
186758
188111
|
}
|
|
186759
|
-
return
|
|
188112
|
+
return import_chalk134.default.dim("No branch configuration");
|
|
186760
188113
|
}
|
|
186761
|
-
async function
|
|
188114
|
+
async function list8(client2, argv) {
|
|
186762
188115
|
const { cwd } = client2;
|
|
186763
188116
|
const validationResult = validateLsArgs({
|
|
186764
188117
|
commandName: "target ls",
|
|
@@ -186784,15 +188137,15 @@ async function list7(client2, argv) {
|
|
|
186784
188137
|
accountId: link4.org.id
|
|
186785
188138
|
});
|
|
186786
188139
|
output_manager_default.stopSpinner();
|
|
186787
|
-
const elapsed2 = (0,
|
|
188140
|
+
const elapsed2 = (0, import_ms32.default)(Date.now() - start);
|
|
186788
188141
|
result = withDefaultEnvironmentsIncluded(result);
|
|
186789
188142
|
output_manager_default.log(
|
|
186790
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
|
188143
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk134.default.gray(`[${elapsed2}]`)}`
|
|
186791
188144
|
);
|
|
186792
188145
|
const tablePrint = table(
|
|
186793
188146
|
[
|
|
186794
188147
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
|
186795
|
-
(header) =>
|
|
188148
|
+
(header) => import_chalk134.default.bold(import_chalk134.default.cyan(header))
|
|
186796
188149
|
),
|
|
186797
188150
|
...result.flatMap((target) => {
|
|
186798
188151
|
return [
|
|
@@ -186800,8 +188153,8 @@ async function list7(client2, argv) {
|
|
|
186800
188153
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
|
186801
188154
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
|
186802
188155
|
TYPE_MAP[target.type],
|
|
186803
|
-
|
|
186804
|
-
target.updatedAt > 0 ? (0,
|
|
188156
|
+
import_chalk134.default.gray(
|
|
188157
|
+
target.updatedAt > 0 ? (0, import_ms32.default)(Date.now() - target.updatedAt) : "-"
|
|
186805
188158
|
)
|
|
186806
188159
|
]
|
|
186807
188160
|
];
|
|
@@ -186847,15 +188200,15 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
|
186847
188200
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
|
186848
188201
|
];
|
|
186849
188202
|
}
|
|
186850
|
-
var
|
|
186851
|
-
var
|
|
188203
|
+
var import_ms32, import_chalk134, TYPE_MAP, BRANCH_TRACKING_MAP;
|
|
188204
|
+
var init_list12 = __esm({
|
|
186852
188205
|
"src/commands/target/list.ts"() {
|
|
186853
188206
|
"use strict";
|
|
186854
|
-
|
|
186855
|
-
|
|
188207
|
+
import_ms32 = __toESM3(require_ms());
|
|
188208
|
+
import_chalk134 = __toESM3(require_source());
|
|
186856
188209
|
init_table();
|
|
186857
188210
|
init_output_manager();
|
|
186858
|
-
|
|
188211
|
+
init_command36();
|
|
186859
188212
|
init_validate_ls_args();
|
|
186860
188213
|
init_ensure_link();
|
|
186861
188214
|
init_format_project();
|
|
@@ -186867,8 +188220,8 @@ var init_list11 = __esm({
|
|
|
186867
188220
|
};
|
|
186868
188221
|
BRANCH_TRACKING_MAP = {
|
|
186869
188222
|
production: (project) => project.link?.productionBranch ?? "main",
|
|
186870
|
-
preview: (_, env) => env.slug === "preview" ?
|
|
186871
|
-
development: () =>
|
|
188223
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk134.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
|
188224
|
+
development: () => import_chalk134.default.dim("Accessible via CLI")
|
|
186872
188225
|
};
|
|
186873
188226
|
}
|
|
186874
188227
|
});
|
|
@@ -186893,9 +188246,9 @@ var init_target = __esm({
|
|
|
186893
188246
|
// src/commands/target/index.ts
|
|
186894
188247
|
var target_exports = {};
|
|
186895
188248
|
__export3(target_exports, {
|
|
186896
|
-
default: () =>
|
|
188249
|
+
default: () => main17
|
|
186897
188250
|
});
|
|
186898
|
-
async function
|
|
188251
|
+
async function main17(client2) {
|
|
186899
188252
|
let parsedArgs;
|
|
186900
188253
|
const flagsSpecification = getFlagsSpecification(targetCommand.options);
|
|
186901
188254
|
try {
|
|
@@ -186929,40 +188282,40 @@ async function main16(client2) {
|
|
|
186929
188282
|
case "list":
|
|
186930
188283
|
if (needHelp) {
|
|
186931
188284
|
telemetry2.trackCliFlagHelp("target", "list");
|
|
186932
|
-
printHelp(
|
|
188285
|
+
printHelp(listSubcommand9);
|
|
186933
188286
|
return 2;
|
|
186934
188287
|
}
|
|
186935
188288
|
telemetry2.trackCliSubcommandList(subcommand);
|
|
186936
|
-
return await
|
|
188289
|
+
return await list8(client2, args2);
|
|
186937
188290
|
default:
|
|
186938
|
-
output_manager_default.error(getInvalidSubcommand(
|
|
188291
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG19));
|
|
186939
188292
|
output_manager_default.print(help(targetCommand, { columns: client2.stderr.columns }));
|
|
186940
188293
|
return 2;
|
|
186941
188294
|
}
|
|
186942
188295
|
}
|
|
186943
|
-
var
|
|
188296
|
+
var COMMAND_CONFIG19;
|
|
186944
188297
|
var init_target2 = __esm({
|
|
186945
188298
|
"src/commands/target/index.ts"() {
|
|
186946
188299
|
"use strict";
|
|
186947
188300
|
init_get_args();
|
|
186948
188301
|
init_get_invalid_subcommand();
|
|
186949
188302
|
init_help();
|
|
186950
|
-
|
|
186951
|
-
|
|
188303
|
+
init_list12();
|
|
188304
|
+
init_command36();
|
|
186952
188305
|
init_get_flags_specification();
|
|
186953
188306
|
init_error2();
|
|
186954
188307
|
init_output_manager();
|
|
186955
188308
|
init_target();
|
|
186956
188309
|
init_commands();
|
|
186957
|
-
|
|
186958
|
-
ls: getCommandAliases(
|
|
188310
|
+
COMMAND_CONFIG19 = {
|
|
188311
|
+
ls: getCommandAliases(listSubcommand9)
|
|
186959
188312
|
};
|
|
186960
188313
|
}
|
|
186961
188314
|
});
|
|
186962
188315
|
|
|
186963
188316
|
// src/util/telemetry/commands/teams/list.ts
|
|
186964
188317
|
var TeamsListTelemetryClient;
|
|
186965
|
-
var
|
|
188318
|
+
var init_list13 = __esm({
|
|
186966
188319
|
"src/util/telemetry/commands/teams/list.ts"() {
|
|
186967
188320
|
"use strict";
|
|
186968
188321
|
init_telemetry();
|
|
@@ -187004,7 +188357,7 @@ var init_list12 = __esm({
|
|
|
187004
188357
|
});
|
|
187005
188358
|
|
|
187006
188359
|
// src/commands/teams/list.ts
|
|
187007
|
-
async function
|
|
188360
|
+
async function list9(client2, argv) {
|
|
187008
188361
|
const { config: config2, telemetryEventStore } = client2;
|
|
187009
188362
|
const telemetry2 = new TeamsListTelemetryClient({
|
|
187010
188363
|
opts: {
|
|
@@ -187012,7 +188365,7 @@ async function list8(client2, argv) {
|
|
|
187012
188365
|
}
|
|
187013
188366
|
});
|
|
187014
188367
|
let parsedArgs;
|
|
187015
|
-
const flagsSpecification = getFlagsSpecification(
|
|
188368
|
+
const flagsSpecification = getFlagsSpecification(listSubcommand10.options);
|
|
187016
188369
|
try {
|
|
187017
188370
|
parsedArgs = parseArguments(argv, flagsSpecification);
|
|
187018
188371
|
} catch (error3) {
|
|
@@ -187072,7 +188425,7 @@ async function list8(client2, argv) {
|
|
|
187072
188425
|
client2.stdout.write("\n");
|
|
187073
188426
|
const teamTable = table(
|
|
187074
188427
|
[
|
|
187075
|
-
["id", "Team name"].map((str) => (0,
|
|
188428
|
+
["id", "Team name"].map((str) => (0, import_chalk135.gray)(str)),
|
|
187076
188429
|
...teamList.map((team) => [team.value, team.name])
|
|
187077
188430
|
],
|
|
187078
188431
|
{ hsep: 5 }
|
|
@@ -187089,13 +188442,13 @@ async function list8(client2, argv) {
|
|
|
187089
188442
|
}
|
|
187090
188443
|
return 0;
|
|
187091
188444
|
}
|
|
187092
|
-
var
|
|
187093
|
-
var
|
|
188445
|
+
var import_chalk135;
|
|
188446
|
+
var init_list14 = __esm({
|
|
187094
188447
|
"src/commands/teams/list.ts"() {
|
|
187095
188448
|
"use strict";
|
|
187096
188449
|
init_chars();
|
|
187097
188450
|
init_table();
|
|
187098
|
-
|
|
188451
|
+
import_chalk135 = __toESM3(require_source());
|
|
187099
188452
|
init_get_user();
|
|
187100
188453
|
init_get_teams();
|
|
187101
188454
|
init_pkg_name();
|
|
@@ -187104,9 +188457,9 @@ var init_list13 = __esm({
|
|
|
187104
188457
|
init_get_args();
|
|
187105
188458
|
init_error2();
|
|
187106
188459
|
init_get_flags_specification();
|
|
187107
|
-
|
|
188460
|
+
init_command37();
|
|
187108
188461
|
init_output_manager();
|
|
187109
|
-
|
|
188462
|
+
init_list13();
|
|
187110
188463
|
init_validate_ls_args();
|
|
187111
188464
|
}
|
|
187112
188465
|
});
|
|
@@ -187191,7 +188544,7 @@ Please select a team scope using ${getCommandName(
|
|
|
187191
188544
|
return 1;
|
|
187192
188545
|
}
|
|
187193
188546
|
output_manager_default.log(
|
|
187194
|
-
introMsg || `Inviting team members to ${
|
|
188547
|
+
introMsg || `Inviting team members to ${import_chalk136.default.bold(currentTeam.name)}`
|
|
187195
188548
|
);
|
|
187196
188549
|
telemetry2.trackCliArgumentEmail(emails);
|
|
187197
188550
|
if (emails.length > 0) {
|
|
@@ -187211,10 +188564,10 @@ Please select a team scope using ${getCommandName(
|
|
|
187211
188564
|
throw err;
|
|
187212
188565
|
}
|
|
187213
188566
|
output_manager_default.log(
|
|
187214
|
-
`${
|
|
188567
|
+
`${import_chalk136.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
|
187215
188568
|
);
|
|
187216
188569
|
} else {
|
|
187217
|
-
output_manager_default.log(`${
|
|
188570
|
+
output_manager_default.log(`${import_chalk136.default.red(`\u2716 ${email3}`)} ${import_chalk136.default.gray("[invalid]")}`);
|
|
187218
188571
|
}
|
|
187219
188572
|
}
|
|
187220
188573
|
return 0;
|
|
@@ -187247,15 +188600,15 @@ Please select a team scope using ${getCommandName(
|
|
|
187247
188600
|
);
|
|
187248
188601
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
|
187249
188602
|
emails.push(email2);
|
|
187250
|
-
output_manager_default.log(`${
|
|
188603
|
+
output_manager_default.log(`${import_chalk136.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
|
187251
188604
|
if (hasError) {
|
|
187252
188605
|
hasError = false;
|
|
187253
188606
|
process.stderr.write(eraseLines(emails.length + 2));
|
|
187254
188607
|
output_manager_default.log(
|
|
187255
|
-
introMsg || `Inviting team members to ${
|
|
188608
|
+
introMsg || `Inviting team members to ${import_chalk136.default.bold(currentTeam.name)}`
|
|
187256
188609
|
);
|
|
187257
188610
|
for (const email3 of emails) {
|
|
187258
|
-
output_manager_default.log(`${
|
|
188611
|
+
output_manager_default.log(`${import_chalk136.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
187259
188612
|
}
|
|
187260
188613
|
}
|
|
187261
188614
|
} catch (err) {
|
|
@@ -187264,7 +188617,7 @@ Please select a team scope using ${getCommandName(
|
|
|
187264
188617
|
output_manager_default.error((0, import_error_utils35.errorToString)(err));
|
|
187265
188618
|
hasError = true;
|
|
187266
188619
|
for (const email3 of emails) {
|
|
187267
|
-
output_manager_default.log(`${
|
|
188620
|
+
output_manager_default.log(`${import_chalk136.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
|
187268
188621
|
}
|
|
187269
188622
|
}
|
|
187270
188623
|
}
|
|
@@ -187277,16 +188630,16 @@ Please select a team scope using ${getCommandName(
|
|
|
187277
188630
|
} else {
|
|
187278
188631
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
|
187279
188632
|
for (const email3 of emails) {
|
|
187280
|
-
output_manager_default.log(`${
|
|
188633
|
+
output_manager_default.log(`${import_chalk136.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
|
187281
188634
|
}
|
|
187282
188635
|
}
|
|
187283
188636
|
return 0;
|
|
187284
188637
|
}
|
|
187285
|
-
var
|
|
188638
|
+
var import_chalk136, import_error_utils35, validateEmail, domains;
|
|
187286
188639
|
var init_invite2 = __esm({
|
|
187287
188640
|
"src/commands/teams/invite.ts"() {
|
|
187288
188641
|
"use strict";
|
|
187289
|
-
|
|
188642
|
+
import_chalk136 = __toESM3(require_source());
|
|
187290
188643
|
init_cmd();
|
|
187291
188644
|
init_stamp();
|
|
187292
188645
|
init_param();
|
|
@@ -187304,7 +188657,7 @@ var init_invite2 = __esm({
|
|
|
187304
188657
|
init_get_args();
|
|
187305
188658
|
init_get_flags_specification();
|
|
187306
188659
|
init_error2();
|
|
187307
|
-
|
|
188660
|
+
init_command37();
|
|
187308
188661
|
validateEmail = (data) => email.test(data.trim()) || data.length === 0;
|
|
187309
188662
|
domains = Array.from(
|
|
187310
188663
|
/* @__PURE__ */ new Set([
|
|
@@ -187357,12 +188710,12 @@ var init_patch_team = __esm({
|
|
|
187357
188710
|
});
|
|
187358
188711
|
|
|
187359
188712
|
// src/commands/teams/add.ts
|
|
187360
|
-
async function
|
|
188713
|
+
async function add8(client2) {
|
|
187361
188714
|
let slug;
|
|
187362
188715
|
let team;
|
|
187363
188716
|
let elapsed2;
|
|
187364
188717
|
output_manager_default.log(
|
|
187365
|
-
`Pick a team identifier for its URL (e.g.: ${
|
|
188718
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk137.default.cyan(
|
|
187366
188719
|
"`vercel.com/acme`"
|
|
187367
188720
|
)})`
|
|
187368
188721
|
);
|
|
@@ -187393,7 +188746,7 @@ async function add7(client2) {
|
|
|
187393
188746
|
output_manager_default.stopSpinner();
|
|
187394
188747
|
process.stdout.write(eraseLines(2));
|
|
187395
188748
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
|
187396
|
-
output_manager_default.log(`${
|
|
188749
|
+
output_manager_default.log(`${import_chalk137.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
|
187397
188750
|
`);
|
|
187398
188751
|
output_manager_default.log("Pick a display name for your team");
|
|
187399
188752
|
let name;
|
|
@@ -187416,7 +188769,7 @@ async function add7(client2) {
|
|
|
187416
188769
|
process.stdout.write(eraseLines(2));
|
|
187417
188770
|
team = Object.assign(team, res);
|
|
187418
188771
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
|
187419
|
-
output_manager_default.log(`${
|
|
188772
|
+
output_manager_default.log(`${import_chalk137.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
|
187420
188773
|
`);
|
|
187421
188774
|
output_manager_default.spinner("Saving");
|
|
187422
188775
|
client2.config.currentTeam = team.id;
|
|
@@ -187430,11 +188783,11 @@ async function add7(client2) {
|
|
|
187430
188783
|
});
|
|
187431
188784
|
return 0;
|
|
187432
188785
|
}
|
|
187433
|
-
var
|
|
187434
|
-
var
|
|
188786
|
+
var import_chalk137, import_error_utils36, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
|
188787
|
+
var init_add14 = __esm({
|
|
187435
188788
|
"src/commands/teams/add.ts"() {
|
|
187436
188789
|
"use strict";
|
|
187437
|
-
|
|
188790
|
+
import_chalk137 = __toESM3(require_source());
|
|
187438
188791
|
init_stamp();
|
|
187439
188792
|
init_erase_lines();
|
|
187440
188793
|
init_chars();
|
|
@@ -187447,7 +188800,7 @@ var init_add13 = __esm({
|
|
|
187447
188800
|
init_output_manager();
|
|
187448
188801
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
|
187449
188802
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
|
187450
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
|
188803
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk137.default.gray("vercel.com/");
|
|
187451
188804
|
teamNamePrefix = "Team Name".padEnd(14);
|
|
187452
188805
|
}
|
|
187453
188806
|
});
|
|
@@ -187506,7 +188859,7 @@ async function change(client2, argv) {
|
|
|
187506
188859
|
let title9 = `${team.name} (${team.slug})`;
|
|
187507
188860
|
const selected = team.id === currentTeam?.id;
|
|
187508
188861
|
if (selected) {
|
|
187509
|
-
title9 += ` ${
|
|
188862
|
+
title9 += ` ${import_chalk138.default.bold("(current)")}`;
|
|
187510
188863
|
}
|
|
187511
188864
|
if (team.limited) {
|
|
187512
188865
|
title9 += ` ${emoji("locked")}`;
|
|
@@ -187518,7 +188871,7 @@ async function change(client2, argv) {
|
|
|
187518
188871
|
selected
|
|
187519
188872
|
};
|
|
187520
188873
|
});
|
|
187521
|
-
let suffix = personalScopeSelected ? ` ${
|
|
188874
|
+
let suffix = personalScopeSelected ? ` ${import_chalk138.default.bold("(current)")}` : "";
|
|
187522
188875
|
if (user.limited) {
|
|
187523
188876
|
suffix += ` ${emoji("locked")}`;
|
|
187524
188877
|
}
|
|
@@ -187564,14 +188917,14 @@ async function change(client2, argv) {
|
|
|
187564
188917
|
}
|
|
187565
188918
|
updateCurrentTeam(config2);
|
|
187566
188919
|
output_manager_default.success(
|
|
187567
|
-
`Your account (${
|
|
188920
|
+
`Your account (${import_chalk138.default.bold(user.username)}) is now active!`
|
|
187568
188921
|
);
|
|
187569
188922
|
return 0;
|
|
187570
188923
|
}
|
|
187571
188924
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
|
187572
188925
|
if (!newTeam) {
|
|
187573
188926
|
output_manager_default.error(
|
|
187574
|
-
`You do not have permission to access scope ${
|
|
188927
|
+
`You do not have permission to access scope ${import_chalk138.default.bold(desiredSlug)}.`
|
|
187575
188928
|
);
|
|
187576
188929
|
return 1;
|
|
187577
188930
|
}
|
|
@@ -187589,15 +188942,15 @@ async function change(client2, argv) {
|
|
|
187589
188942
|
}
|
|
187590
188943
|
updateCurrentTeam(config2, newTeam);
|
|
187591
188944
|
output_manager_default.success(
|
|
187592
|
-
`The team ${
|
|
188945
|
+
`The team ${import_chalk138.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
|
187593
188946
|
);
|
|
187594
188947
|
return 0;
|
|
187595
188948
|
}
|
|
187596
|
-
var
|
|
188949
|
+
var import_chalk138, updateCurrentTeam;
|
|
187597
188950
|
var init_switch2 = __esm({
|
|
187598
188951
|
"src/commands/teams/switch.ts"() {
|
|
187599
188952
|
"use strict";
|
|
187600
|
-
|
|
188953
|
+
import_chalk138 = __toESM3(require_source());
|
|
187601
188954
|
init_emoji();
|
|
187602
188955
|
init_get_user();
|
|
187603
188956
|
init_get_teams();
|
|
@@ -187605,7 +188958,7 @@ var init_switch2 = __esm({
|
|
|
187605
188958
|
init_files();
|
|
187606
188959
|
init_output_manager();
|
|
187607
188960
|
init_switch();
|
|
187608
|
-
|
|
188961
|
+
init_command37();
|
|
187609
188962
|
init_get_args();
|
|
187610
188963
|
init_get_flags_specification();
|
|
187611
188964
|
init_error2();
|
|
@@ -187689,7 +189042,7 @@ async function teams(client2) {
|
|
|
187689
189042
|
}
|
|
187690
189043
|
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
|
187691
189044
|
parsedArgs.args.slice(1),
|
|
187692
|
-
|
|
189045
|
+
COMMAND_CONFIG20
|
|
187693
189046
|
);
|
|
187694
189047
|
const needHelp = parsedArgs.flags["--help"];
|
|
187695
189048
|
if (!subcommand && needHelp) {
|
|
@@ -187706,11 +189059,11 @@ async function teams(client2) {
|
|
|
187706
189059
|
case "list": {
|
|
187707
189060
|
if (needHelp) {
|
|
187708
189061
|
telemetry2.trackCliFlagHelp("teams", subcommandOriginal);
|
|
187709
|
-
printHelp(
|
|
189062
|
+
printHelp(listSubcommand10);
|
|
187710
189063
|
return 2;
|
|
187711
189064
|
}
|
|
187712
189065
|
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
|
187713
|
-
return
|
|
189066
|
+
return list9(client2, args2);
|
|
187714
189067
|
}
|
|
187715
189068
|
case "switch": {
|
|
187716
189069
|
if (needHelp) {
|
|
@@ -187724,11 +189077,11 @@ async function teams(client2) {
|
|
|
187724
189077
|
case "add": {
|
|
187725
189078
|
if (needHelp) {
|
|
187726
189079
|
telemetry2.trackCliFlagHelp("teams", subcommandOriginal);
|
|
187727
|
-
printHelp(
|
|
189080
|
+
printHelp(addSubcommand8);
|
|
187728
189081
|
return 2;
|
|
187729
189082
|
}
|
|
187730
189083
|
telemetry2.trackCliSubcommandAdd(subcommandOriginal);
|
|
187731
|
-
return
|
|
189084
|
+
return add8(client2);
|
|
187732
189085
|
}
|
|
187733
189086
|
case "invite": {
|
|
187734
189087
|
if (needHelp) {
|
|
@@ -187748,23 +189101,23 @@ async function teams(client2) {
|
|
|
187748
189101
|
}
|
|
187749
189102
|
}
|
|
187750
189103
|
}
|
|
187751
|
-
var
|
|
189104
|
+
var COMMAND_CONFIG20;
|
|
187752
189105
|
var init_teams2 = __esm({
|
|
187753
189106
|
"src/commands/teams/index.ts"() {
|
|
187754
189107
|
"use strict";
|
|
187755
|
-
|
|
187756
|
-
|
|
189108
|
+
init_list14();
|
|
189109
|
+
init_add14();
|
|
187757
189110
|
init_switch2();
|
|
187758
189111
|
init_invite2();
|
|
187759
189112
|
init_get_args();
|
|
187760
|
-
|
|
189113
|
+
init_command37();
|
|
187761
189114
|
init_help();
|
|
187762
189115
|
init_get_flags_specification();
|
|
187763
189116
|
init_error2();
|
|
187764
189117
|
init_teams();
|
|
187765
189118
|
init_output_manager();
|
|
187766
189119
|
init_get_subcommand();
|
|
187767
|
-
|
|
189120
|
+
COMMAND_CONFIG20 = {
|
|
187768
189121
|
list: ["ls", "list"],
|
|
187769
189122
|
switch: ["switch", "change"],
|
|
187770
189123
|
add: ["create", "add"],
|
|
@@ -187776,13 +189129,13 @@ var init_teams2 = __esm({
|
|
|
187776
189129
|
// src/commands/telemetry/status.ts
|
|
187777
189130
|
async function status2(client2) {
|
|
187778
189131
|
const enabled = client2.config.telemetry?.enabled !== false;
|
|
187779
|
-
const status3 = enabled ?
|
|
189132
|
+
const status3 = enabled ? import_chalk139.default.green("Enabled") : import_chalk139.default.red("Disabled");
|
|
187780
189133
|
output_manager_default.print("\n");
|
|
187781
|
-
output_manager_default.log(`${
|
|
189134
|
+
output_manager_default.log(`${import_chalk139.default.bold("Telemetry status")}: ${status3}
|
|
187782
189135
|
`);
|
|
187783
189136
|
const learnMoreMessage = `
|
|
187784
189137
|
|
|
187785
|
-
Learn more: ${
|
|
189138
|
+
Learn more: ${import_chalk139.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
|
187786
189139
|
if (enabled) {
|
|
187787
189140
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
|
187788
189141
|
} else {
|
|
@@ -187793,11 +189146,11 @@ Learn more: ${import_chalk133.default.cyan("https://vercel.com/docs/cli/about-te
|
|
|
187793
189146
|
}
|
|
187794
189147
|
return 0;
|
|
187795
189148
|
}
|
|
187796
|
-
var
|
|
189149
|
+
var import_chalk139;
|
|
187797
189150
|
var init_status4 = __esm({
|
|
187798
189151
|
"src/commands/telemetry/status.ts"() {
|
|
187799
189152
|
"use strict";
|
|
187800
|
-
|
|
189153
|
+
import_chalk139 = __toESM3(require_source());
|
|
187801
189154
|
init_output_manager();
|
|
187802
189155
|
}
|
|
187803
189156
|
});
|
|
@@ -187933,7 +189286,7 @@ async function telemetry(client2) {
|
|
|
187933
189286
|
}
|
|
187934
189287
|
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
|
187935
189288
|
parsedArguments.args.slice(1),
|
|
187936
|
-
|
|
189289
|
+
COMMAND_CONFIG21
|
|
187937
189290
|
);
|
|
187938
189291
|
const needHelp = parsedArguments.flags["--help"];
|
|
187939
189292
|
function printHelp(command) {
|
|
@@ -187978,7 +189331,7 @@ async function telemetry(client2) {
|
|
|
187978
189331
|
default: {
|
|
187979
189332
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
|
187980
189333
|
output_manager_default.print(
|
|
187981
|
-
`${
|
|
189334
|
+
`${import_chalk140.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
|
187982
189335
|
`
|
|
187983
189336
|
);
|
|
187984
189337
|
output_manager_default.print(help(telemetryCommand, { columns: client2.stderr.columns }));
|
|
@@ -187986,7 +189339,7 @@ async function telemetry(client2) {
|
|
|
187986
189339
|
}
|
|
187987
189340
|
}
|
|
187988
189341
|
}
|
|
187989
|
-
var
|
|
189342
|
+
var import_chalk140, COMMAND_CONFIG21;
|
|
187990
189343
|
var init_telemetry3 = __esm({
|
|
187991
189344
|
"src/commands/telemetry/index.ts"() {
|
|
187992
189345
|
"use strict";
|
|
@@ -187998,13 +189351,13 @@ var init_telemetry3 = __esm({
|
|
|
187998
189351
|
init_enable2();
|
|
187999
189352
|
init_disable2();
|
|
188000
189353
|
init_flush();
|
|
188001
|
-
|
|
189354
|
+
init_command38();
|
|
188002
189355
|
init_get_flags_specification();
|
|
188003
189356
|
init_telemetry2();
|
|
188004
|
-
|
|
189357
|
+
import_chalk140 = __toESM3(require_source());
|
|
188005
189358
|
init_output_manager();
|
|
188006
189359
|
init_commands();
|
|
188007
|
-
|
|
189360
|
+
COMMAND_CONFIG21 = {
|
|
188008
189361
|
status: getCommandAliases(statusSubcommand4),
|
|
188009
189362
|
enable: getCommandAliases(enableSubcommand2),
|
|
188010
189363
|
disable: getCommandAliases(disableSubcommand2),
|
|
@@ -188061,7 +189414,7 @@ var init_whoami2 = __esm({
|
|
|
188061
189414
|
"src/commands/whoami/index.ts"() {
|
|
188062
189415
|
"use strict";
|
|
188063
189416
|
init_help();
|
|
188064
|
-
|
|
189417
|
+
init_command39();
|
|
188065
189418
|
init_get_scope();
|
|
188066
189419
|
init_get_args();
|
|
188067
189420
|
init_get_flags_specification();
|
|
@@ -188076,7 +189429,7 @@ var import_error_utils37 = __toESM3(require_dist2());
|
|
|
188076
189429
|
var import_path41 = require("path");
|
|
188077
189430
|
var import_fs8 = require("fs");
|
|
188078
189431
|
var import_fs_extra24 = __toESM3(require_lib());
|
|
188079
|
-
var
|
|
189432
|
+
var import_chalk141 = __toESM3(require_source());
|
|
188080
189433
|
var import_epipebomb = __toESM3(require_epipebomb());
|
|
188081
189434
|
|
|
188082
189435
|
// src/util/get-latest-version/index.ts
|
|
@@ -188710,6 +190063,12 @@ var RootTelemetryClient = class extends TelemetryClient {
|
|
|
188710
190063
|
value: actual
|
|
188711
190064
|
});
|
|
188712
190065
|
}
|
|
190066
|
+
trackCliCommandRedirects(actual) {
|
|
190067
|
+
this.trackCliCommand({
|
|
190068
|
+
command: "redirects",
|
|
190069
|
+
value: actual
|
|
190070
|
+
});
|
|
190071
|
+
}
|
|
188713
190072
|
trackCliCommandRemove(actual) {
|
|
188714
190073
|
this.trackCliCommand({
|
|
188715
190074
|
command: "remove",
|
|
@@ -189009,7 +190368,7 @@ Sentry.init({
|
|
|
189009
190368
|
var client;
|
|
189010
190369
|
var { isTTY: isTTY2 } = process.stdout;
|
|
189011
190370
|
var apiUrl = "https://api.vercel.com";
|
|
189012
|
-
var
|
|
190371
|
+
var main18 = async () => {
|
|
189013
190372
|
if (process.env.FORCE_TTY === "1") {
|
|
189014
190373
|
isTTY2 = true;
|
|
189015
190374
|
process.stdout.isTTY = true;
|
|
@@ -189060,13 +190419,13 @@ var main17 = async () => {
|
|
|
189060
190419
|
const betaCommands = ["curl"];
|
|
189061
190420
|
if (betaCommands.includes(targetOrSubcommand)) {
|
|
189062
190421
|
output_manager_default.print(
|
|
189063
|
-
`${
|
|
190422
|
+
`${import_chalk141.default.grey(
|
|
189064
190423
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
|
189065
190424
|
)}
|
|
189066
190425
|
`
|
|
189067
190426
|
);
|
|
189068
190427
|
} else {
|
|
189069
|
-
output_manager_default.print(`${
|
|
190428
|
+
output_manager_default.print(`${import_chalk141.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
|
189070
190429
|
`);
|
|
189071
190430
|
}
|
|
189072
190431
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
|
@@ -189519,9 +190878,13 @@ var main17 = async () => {
|
|
|
189519
190878
|
telemetry2.trackCliCommandRedeploy(userSuppliedSubCommand);
|
|
189520
190879
|
func = (init_redeploy2(), __toCommonJS3(redeploy_exports)).default;
|
|
189521
190880
|
break;
|
|
190881
|
+
case "redirects":
|
|
190882
|
+
telemetry2.trackCliCommandRedirects(userSuppliedSubCommand);
|
|
190883
|
+
func = (init_redirects2(), __toCommonJS3(redirects_exports)).default;
|
|
190884
|
+
break;
|
|
189522
190885
|
case "remove":
|
|
189523
190886
|
telemetry2.trackCliCommandRemove(userSuppliedSubCommand);
|
|
189524
|
-
func = (
|
|
190887
|
+
func = (init_remove7(), __toCommonJS3(remove_exports)).default;
|
|
189525
190888
|
break;
|
|
189526
190889
|
case "rollback":
|
|
189527
190890
|
telemetry2.trackCliCommandRollback(userSuppliedSubCommand);
|
|
@@ -189642,27 +191005,27 @@ ${err.stack}`);
|
|
|
189642
191005
|
};
|
|
189643
191006
|
process.on("unhandledRejection", handleRejection);
|
|
189644
191007
|
process.on("uncaughtException", handleUnexpected);
|
|
189645
|
-
|
|
191008
|
+
main18().then(async (exitCode2) => {
|
|
189646
191009
|
if (isTTY2 && !process.env.NO_UPDATE_NOTIFIER) {
|
|
189647
191010
|
const latest = getLatestVersion({
|
|
189648
191011
|
pkg: pkg_default
|
|
189649
191012
|
});
|
|
189650
191013
|
if (latest) {
|
|
189651
191014
|
const changelog = "https://github.com/vercel/vercel/releases";
|
|
189652
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
|
191015
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk141.default.magenta(
|
|
189653
191016
|
`
|
|
189654
191017
|
|
|
189655
|
-
The latest update ${
|
|
191018
|
+
The latest update ${import_chalk141.default.italic(
|
|
189656
191019
|
"may"
|
|
189657
191020
|
)} fix any errors that occurred.`
|
|
189658
191021
|
) : "";
|
|
189659
191022
|
output_manager_default.print(
|
|
189660
191023
|
box(
|
|
189661
|
-
`Update available! ${
|
|
191024
|
+
`Update available! ${import_chalk141.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk141.default.green(
|
|
189662
191025
|
`v${latest}`
|
|
189663
191026
|
)}
|
|
189664
191027
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
189665
|
-
Run ${
|
|
191028
|
+
Run ${import_chalk141.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
|
189666
191029
|
)
|
|
189667
191030
|
);
|
|
189668
191031
|
output_manager_default.print("\n\n");
|