npm-pkg-lint 3.6.7 → 3.6.8
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 +253 -234
- package/dist/index.js.map +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -369,7 +369,7 @@ var require_argparse = __commonJS({
|
|
|
369
369
|
var util = __require("util");
|
|
370
370
|
var fs15 = __require("fs");
|
|
371
371
|
var sub = require_sub();
|
|
372
|
-
var
|
|
372
|
+
var path17 = __require("path");
|
|
373
373
|
var repr = util.inspect;
|
|
374
374
|
function get_argv() {
|
|
375
375
|
return process.argv.slice(1);
|
|
@@ -2397,7 +2397,7 @@ var require_argparse = __commonJS({
|
|
|
2397
2397
|
conflict_handler
|
|
2398
2398
|
});
|
|
2399
2399
|
if (prog === void 0) {
|
|
2400
|
-
prog =
|
|
2400
|
+
prog = path17.basename(get_argv()[0] || "");
|
|
2401
2401
|
}
|
|
2402
2402
|
this.prog = prog;
|
|
2403
2403
|
this.usage = usage;
|
|
@@ -3223,7 +3223,7 @@ var require_tmp = __commonJS({
|
|
|
3223
3223
|
"node_modules/tmp/lib/tmp.js"(exports, module) {
|
|
3224
3224
|
var fs15 = __require("fs");
|
|
3225
3225
|
var os2 = __require("os");
|
|
3226
|
-
var
|
|
3226
|
+
var path17 = __require("path");
|
|
3227
3227
|
var crypto2 = __require("crypto");
|
|
3228
3228
|
var _c = { fs: fs15.constants, os: os2.constants };
|
|
3229
3229
|
var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
@@ -3437,9 +3437,9 @@ var require_tmp = __commonJS({
|
|
|
3437
3437
|
function _generateTmpName(opts) {
|
|
3438
3438
|
const tmpDir = opts.tmpdir;
|
|
3439
3439
|
if (!_isUndefined(opts.name))
|
|
3440
|
-
return
|
|
3440
|
+
return path17.join(tmpDir, opts.dir, opts.name);
|
|
3441
3441
|
if (!_isUndefined(opts.template))
|
|
3442
|
-
return
|
|
3442
|
+
return path17.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
3443
3443
|
const name2 = [
|
|
3444
3444
|
opts.prefix ? opts.prefix : "tmp",
|
|
3445
3445
|
"-",
|
|
@@ -3448,7 +3448,7 @@ var require_tmp = __commonJS({
|
|
|
3448
3448
|
_randomChars(12),
|
|
3449
3449
|
opts.postfix ? "-" + opts.postfix : ""
|
|
3450
3450
|
].join("");
|
|
3451
|
-
return
|
|
3451
|
+
return path17.join(tmpDir, opts.dir, name2);
|
|
3452
3452
|
}
|
|
3453
3453
|
function _assertAndSanitizeOptions(options) {
|
|
3454
3454
|
options.tmpdir = _getTmpDir(options);
|
|
@@ -3469,29 +3469,29 @@ var require_tmp = __commonJS({
|
|
|
3469
3469
|
options.detachDescriptor = !!options.detachDescriptor;
|
|
3470
3470
|
options.discardDescriptor = !!options.discardDescriptor;
|
|
3471
3471
|
options.unsafeCleanup = !!options.unsafeCleanup;
|
|
3472
|
-
options.dir = _isUndefined(options.dir) ? "" :
|
|
3473
|
-
options.template = _isUndefined(options.template) ? void 0 :
|
|
3474
|
-
options.template = _isBlank(options.template) ? void 0 :
|
|
3472
|
+
options.dir = _isUndefined(options.dir) ? "" : path17.relative(tmpDir, _resolvePath(options.dir, tmpDir));
|
|
3473
|
+
options.template = _isUndefined(options.template) ? void 0 : path17.relative(tmpDir, _resolvePath(options.template, tmpDir));
|
|
3474
|
+
options.template = _isBlank(options.template) ? void 0 : path17.relative(options.dir, options.template);
|
|
3475
3475
|
options.name = _isUndefined(options.name) ? void 0 : options.name;
|
|
3476
3476
|
options.prefix = _isUndefined(options.prefix) ? "" : options.prefix;
|
|
3477
3477
|
options.postfix = _isUndefined(options.postfix) ? "" : options.postfix;
|
|
3478
3478
|
}
|
|
3479
3479
|
function _resolvePath(name2, tmpDir) {
|
|
3480
3480
|
if (name2.startsWith(tmpDir)) {
|
|
3481
|
-
return
|
|
3481
|
+
return path17.resolve(name2);
|
|
3482
3482
|
} else {
|
|
3483
|
-
return
|
|
3483
|
+
return path17.resolve(path17.join(tmpDir, name2));
|
|
3484
3484
|
}
|
|
3485
3485
|
}
|
|
3486
3486
|
function _assertIsRelative(name2, option, tmpDir) {
|
|
3487
3487
|
if (option === "name") {
|
|
3488
|
-
if (
|
|
3488
|
+
if (path17.isAbsolute(name2))
|
|
3489
3489
|
throw new Error(`${option} option must not contain an absolute path, found "${name2}".`);
|
|
3490
|
-
let
|
|
3491
|
-
if (
|
|
3490
|
+
let basename2 = path17.basename(name2);
|
|
3491
|
+
if (basename2 === ".." || basename2 === "." || basename2 !== name2)
|
|
3492
3492
|
throw new Error(`${option} option must not contain a path, found "${name2}".`);
|
|
3493
3493
|
} else {
|
|
3494
|
-
if (
|
|
3494
|
+
if (path17.isAbsolute(name2) && !name2.startsWith(tmpDir)) {
|
|
3495
3495
|
throw new Error(`${option} option must be relative to "${tmpDir}", found "${name2}".`);
|
|
3496
3496
|
}
|
|
3497
3497
|
let resolvedPath = _resolvePath(name2, tmpDir);
|
|
@@ -3512,7 +3512,7 @@ var require_tmp = __commonJS({
|
|
|
3512
3512
|
_gracefulCleanup = true;
|
|
3513
3513
|
}
|
|
3514
3514
|
function _getTmpDir(options) {
|
|
3515
|
-
return
|
|
3515
|
+
return path17.resolve(options && options.tmpdir || os2.tmpdir());
|
|
3516
3516
|
}
|
|
3517
3517
|
process.addListener(EXIT, _garbageCollector);
|
|
3518
3518
|
Object.defineProperty(module.exports, "tmpdir", {
|
|
@@ -3860,6 +3860,8 @@ var require_semver = __commonJS({
|
|
|
3860
3860
|
this.inc("patch", identifier, identifierBase);
|
|
3861
3861
|
this.inc("pre", identifier, identifierBase);
|
|
3862
3862
|
break;
|
|
3863
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
3864
|
+
// prepatch.
|
|
3863
3865
|
case "prerelease":
|
|
3864
3866
|
if (this.prerelease.length === 0) {
|
|
3865
3867
|
this.inc("patch", identifier, identifierBase);
|
|
@@ -3887,6 +3889,8 @@ var require_semver = __commonJS({
|
|
|
3887
3889
|
}
|
|
3888
3890
|
this.prerelease = [];
|
|
3889
3891
|
break;
|
|
3892
|
+
// This probably shouldn't be used publicly.
|
|
3893
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
3890
3894
|
case "pre": {
|
|
3891
3895
|
const base = Number(identifierBase) ? 1 : 0;
|
|
3892
3896
|
if (!identifier && identifierBase === false) {
|
|
@@ -4930,6 +4934,7 @@ var require_min_version = __commonJS({
|
|
|
4930
4934
|
compver.prerelease.push(0);
|
|
4931
4935
|
}
|
|
4932
4936
|
compver.raw = compver.format();
|
|
4937
|
+
/* fallthrough */
|
|
4933
4938
|
case "":
|
|
4934
4939
|
case ">=":
|
|
4935
4940
|
if (!setMin || gt(compver, setMin)) {
|
|
@@ -4939,6 +4944,7 @@ var require_min_version = __commonJS({
|
|
|
4939
4944
|
case "<":
|
|
4940
4945
|
case "<=":
|
|
4941
4946
|
break;
|
|
4947
|
+
/* istanbul ignore next */
|
|
4942
4948
|
default:
|
|
4943
4949
|
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
4944
4950
|
}
|
|
@@ -5380,7 +5386,7 @@ var require_windows = __commonJS({
|
|
|
5380
5386
|
module.exports = isexe;
|
|
5381
5387
|
isexe.sync = sync;
|
|
5382
5388
|
var fs15 = __require("fs");
|
|
5383
|
-
function checkPathExt(
|
|
5389
|
+
function checkPathExt(path17, options) {
|
|
5384
5390
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
5385
5391
|
if (!pathext) {
|
|
5386
5392
|
return true;
|
|
@@ -5391,25 +5397,25 @@ var require_windows = __commonJS({
|
|
|
5391
5397
|
}
|
|
5392
5398
|
for (var i2 = 0; i2 < pathext.length; i2++) {
|
|
5393
5399
|
var p = pathext[i2].toLowerCase();
|
|
5394
|
-
if (p &&
|
|
5400
|
+
if (p && path17.substr(-p.length).toLowerCase() === p) {
|
|
5395
5401
|
return true;
|
|
5396
5402
|
}
|
|
5397
5403
|
}
|
|
5398
5404
|
return false;
|
|
5399
5405
|
}
|
|
5400
|
-
function checkStat(stat2,
|
|
5406
|
+
function checkStat(stat2, path17, options) {
|
|
5401
5407
|
if (!stat2.isSymbolicLink() && !stat2.isFile()) {
|
|
5402
5408
|
return false;
|
|
5403
5409
|
}
|
|
5404
|
-
return checkPathExt(
|
|
5410
|
+
return checkPathExt(path17, options);
|
|
5405
5411
|
}
|
|
5406
|
-
function isexe(
|
|
5407
|
-
fs15.stat(
|
|
5408
|
-
cb(er, er ? false : checkStat(stat2,
|
|
5412
|
+
function isexe(path17, options, cb) {
|
|
5413
|
+
fs15.stat(path17, function(er, stat2) {
|
|
5414
|
+
cb(er, er ? false : checkStat(stat2, path17, options));
|
|
5409
5415
|
});
|
|
5410
5416
|
}
|
|
5411
|
-
function sync(
|
|
5412
|
-
return checkStat(fs15.statSync(
|
|
5417
|
+
function sync(path17, options) {
|
|
5418
|
+
return checkStat(fs15.statSync(path17), path17, options);
|
|
5413
5419
|
}
|
|
5414
5420
|
}
|
|
5415
5421
|
});
|
|
@@ -5420,13 +5426,13 @@ var require_mode = __commonJS({
|
|
|
5420
5426
|
module.exports = isexe;
|
|
5421
5427
|
isexe.sync = sync;
|
|
5422
5428
|
var fs15 = __require("fs");
|
|
5423
|
-
function isexe(
|
|
5424
|
-
fs15.stat(
|
|
5429
|
+
function isexe(path17, options, cb) {
|
|
5430
|
+
fs15.stat(path17, function(er, stat2) {
|
|
5425
5431
|
cb(er, er ? false : checkStat(stat2, options));
|
|
5426
5432
|
});
|
|
5427
5433
|
}
|
|
5428
|
-
function sync(
|
|
5429
|
-
return checkStat(fs15.statSync(
|
|
5434
|
+
function sync(path17, options) {
|
|
5435
|
+
return checkStat(fs15.statSync(path17), options);
|
|
5430
5436
|
}
|
|
5431
5437
|
function checkStat(stat2, options) {
|
|
5432
5438
|
return stat2.isFile() && checkMode(stat2, options);
|
|
@@ -5459,7 +5465,7 @@ var require_isexe = __commonJS({
|
|
|
5459
5465
|
}
|
|
5460
5466
|
module.exports = isexe;
|
|
5461
5467
|
isexe.sync = sync;
|
|
5462
|
-
function isexe(
|
|
5468
|
+
function isexe(path17, options, cb) {
|
|
5463
5469
|
if (typeof options === "function") {
|
|
5464
5470
|
cb = options;
|
|
5465
5471
|
options = {};
|
|
@@ -5468,17 +5474,17 @@ var require_isexe = __commonJS({
|
|
|
5468
5474
|
if (typeof Promise !== "function") {
|
|
5469
5475
|
throw new TypeError("callback not provided");
|
|
5470
5476
|
}
|
|
5471
|
-
return new Promise(function(
|
|
5472
|
-
isexe(
|
|
5477
|
+
return new Promise(function(resolve2, reject) {
|
|
5478
|
+
isexe(path17, options || {}, function(er, is) {
|
|
5473
5479
|
if (er) {
|
|
5474
5480
|
reject(er);
|
|
5475
5481
|
} else {
|
|
5476
|
-
|
|
5482
|
+
resolve2(is);
|
|
5477
5483
|
}
|
|
5478
5484
|
});
|
|
5479
5485
|
});
|
|
5480
5486
|
}
|
|
5481
|
-
core(
|
|
5487
|
+
core(path17, options || {}, function(er, is) {
|
|
5482
5488
|
if (er) {
|
|
5483
5489
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
5484
5490
|
er = null;
|
|
@@ -5488,9 +5494,9 @@ var require_isexe = __commonJS({
|
|
|
5488
5494
|
cb(er, is);
|
|
5489
5495
|
});
|
|
5490
5496
|
}
|
|
5491
|
-
function sync(
|
|
5497
|
+
function sync(path17, options) {
|
|
5492
5498
|
try {
|
|
5493
|
-
return core.sync(
|
|
5499
|
+
return core.sync(path17, options || {});
|
|
5494
5500
|
} catch (er) {
|
|
5495
5501
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
5496
5502
|
return false;
|
|
@@ -5506,7 +5512,7 @@ var require_isexe = __commonJS({
|
|
|
5506
5512
|
var require_which = __commonJS({
|
|
5507
5513
|
"node_modules/which/which.js"(exports, module) {
|
|
5508
5514
|
var isWindows4 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
5509
|
-
var
|
|
5515
|
+
var path17 = __require("path");
|
|
5510
5516
|
var COLON = isWindows4 ? ";" : ":";
|
|
5511
5517
|
var isexe = require_isexe();
|
|
5512
5518
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -5539,27 +5545,27 @@ var require_which = __commonJS({
|
|
|
5539
5545
|
opt = {};
|
|
5540
5546
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
5541
5547
|
const found = [];
|
|
5542
|
-
const step = (i2) => new Promise((
|
|
5548
|
+
const step = (i2) => new Promise((resolve2, reject) => {
|
|
5543
5549
|
if (i2 === pathEnv.length)
|
|
5544
|
-
return opt.all && found.length ?
|
|
5550
|
+
return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
|
|
5545
5551
|
const ppRaw = pathEnv[i2];
|
|
5546
5552
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
5547
|
-
const pCmd =
|
|
5553
|
+
const pCmd = path17.join(pathPart, cmd);
|
|
5548
5554
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
5549
|
-
|
|
5555
|
+
resolve2(subStep(p, i2, 0));
|
|
5550
5556
|
});
|
|
5551
|
-
const subStep = (p, i2, ii) => new Promise((
|
|
5557
|
+
const subStep = (p, i2, ii) => new Promise((resolve2, reject) => {
|
|
5552
5558
|
if (ii === pathExt.length)
|
|
5553
|
-
return
|
|
5559
|
+
return resolve2(step(i2 + 1));
|
|
5554
5560
|
const ext = pathExt[ii];
|
|
5555
5561
|
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
5556
5562
|
if (!er && is) {
|
|
5557
5563
|
if (opt.all)
|
|
5558
5564
|
found.push(p + ext);
|
|
5559
5565
|
else
|
|
5560
|
-
return
|
|
5566
|
+
return resolve2(p + ext);
|
|
5561
5567
|
}
|
|
5562
|
-
return
|
|
5568
|
+
return resolve2(subStep(p, i2, ii + 1));
|
|
5563
5569
|
});
|
|
5564
5570
|
});
|
|
5565
5571
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -5571,7 +5577,7 @@ var require_which = __commonJS({
|
|
|
5571
5577
|
for (let i2 = 0; i2 < pathEnv.length; i2++) {
|
|
5572
5578
|
const ppRaw = pathEnv[i2];
|
|
5573
5579
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
5574
|
-
const pCmd =
|
|
5580
|
+
const pCmd = path17.join(pathPart, cmd);
|
|
5575
5581
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
5576
5582
|
for (let j = 0; j < pathExt.length; j++) {
|
|
5577
5583
|
const cur = p + pathExt[j];
|
|
@@ -5619,7 +5625,7 @@ var require_path_key = __commonJS({
|
|
|
5619
5625
|
var require_resolveCommand = __commonJS({
|
|
5620
5626
|
"node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
5621
5627
|
"use strict";
|
|
5622
|
-
var
|
|
5628
|
+
var path17 = __require("path");
|
|
5623
5629
|
var which = require_which();
|
|
5624
5630
|
var getPathKey = require_path_key();
|
|
5625
5631
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -5637,7 +5643,7 @@ var require_resolveCommand = __commonJS({
|
|
|
5637
5643
|
try {
|
|
5638
5644
|
resolved = which.sync(parsed.command, {
|
|
5639
5645
|
path: env[getPathKey({ env })],
|
|
5640
|
-
pathExt: withoutPathExt ?
|
|
5646
|
+
pathExt: withoutPathExt ? path17.delimiter : void 0
|
|
5641
5647
|
});
|
|
5642
5648
|
} catch (e) {
|
|
5643
5649
|
} finally {
|
|
@@ -5646,7 +5652,7 @@ var require_resolveCommand = __commonJS({
|
|
|
5646
5652
|
}
|
|
5647
5653
|
}
|
|
5648
5654
|
if (resolved) {
|
|
5649
|
-
resolved =
|
|
5655
|
+
resolved = path17.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
5650
5656
|
}
|
|
5651
5657
|
return resolved;
|
|
5652
5658
|
}
|
|
@@ -5700,8 +5706,8 @@ var require_shebang_command = __commonJS({
|
|
|
5700
5706
|
if (!match2) {
|
|
5701
5707
|
return null;
|
|
5702
5708
|
}
|
|
5703
|
-
const [
|
|
5704
|
-
const binary =
|
|
5709
|
+
const [path17, argument] = match2[0].replace(/#! ?/, "").split(" ");
|
|
5710
|
+
const binary = path17.split("/").pop();
|
|
5705
5711
|
if (binary === "env") {
|
|
5706
5712
|
return argument;
|
|
5707
5713
|
}
|
|
@@ -5736,7 +5742,7 @@ var require_readShebang = __commonJS({
|
|
|
5736
5742
|
var require_parse2 = __commonJS({
|
|
5737
5743
|
"node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
5738
5744
|
"use strict";
|
|
5739
|
-
var
|
|
5745
|
+
var path17 = __require("path");
|
|
5740
5746
|
var resolveCommand = require_resolveCommand();
|
|
5741
5747
|
var escape2 = require_escape();
|
|
5742
5748
|
var readShebang = require_readShebang();
|
|
@@ -5761,7 +5767,7 @@ var require_parse2 = __commonJS({
|
|
|
5761
5767
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
5762
5768
|
if (parsed.options.forceShell || needsShell) {
|
|
5763
5769
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
5764
|
-
parsed.command =
|
|
5770
|
+
parsed.command = path17.normalize(parsed.command);
|
|
5765
5771
|
parsed.command = escape2.command(parsed.command);
|
|
5766
5772
|
parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
|
|
5767
5773
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -5874,7 +5880,7 @@ var require_cross_spawn = __commonJS({
|
|
|
5874
5880
|
// src/index.ts
|
|
5875
5881
|
var import_argparse = __toESM(require_argparse(), 1);
|
|
5876
5882
|
import { existsSync, createWriteStream as createWriteStream2, readFileSync as readFileSync3, promises as fs14 } from "fs";
|
|
5877
|
-
import
|
|
5883
|
+
import path16 from "path";
|
|
5878
5884
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
5879
5885
|
|
|
5880
5886
|
// node_modules/find-up/index.js
|
|
@@ -5955,18 +5961,18 @@ function pLimit(concurrency) {
|
|
|
5955
5961
|
queue.dequeue()();
|
|
5956
5962
|
}
|
|
5957
5963
|
};
|
|
5958
|
-
const run2 = async (fn,
|
|
5964
|
+
const run2 = async (fn, resolve2, args) => {
|
|
5959
5965
|
activeCount++;
|
|
5960
5966
|
const result = (async () => fn(...args))();
|
|
5961
|
-
|
|
5967
|
+
resolve2(result);
|
|
5962
5968
|
try {
|
|
5963
5969
|
await result;
|
|
5964
5970
|
} catch {
|
|
5965
5971
|
}
|
|
5966
5972
|
next();
|
|
5967
5973
|
};
|
|
5968
|
-
const enqueue = (fn,
|
|
5969
|
-
queue.enqueue(run2.bind(void 0, fn,
|
|
5974
|
+
const enqueue = (fn, resolve2, args) => {
|
|
5975
|
+
queue.enqueue(run2.bind(void 0, fn, resolve2, args));
|
|
5970
5976
|
(async () => {
|
|
5971
5977
|
await Promise.resolve();
|
|
5972
5978
|
if (activeCount < concurrency && queue.size > 0) {
|
|
@@ -5974,8 +5980,8 @@ function pLimit(concurrency) {
|
|
|
5974
5980
|
}
|
|
5975
5981
|
})();
|
|
5976
5982
|
};
|
|
5977
|
-
const generator = (fn, ...args) => new Promise((
|
|
5978
|
-
enqueue(fn,
|
|
5983
|
+
const generator = (fn, ...args) => new Promise((resolve2) => {
|
|
5984
|
+
enqueue(fn, resolve2, args);
|
|
5979
5985
|
});
|
|
5980
5986
|
Object.defineProperties(generator, {
|
|
5981
5987
|
activeCount: {
|
|
@@ -6372,14 +6378,14 @@ function stylish(results) {
|
|
|
6372
6378
|
function escape(text) {
|
|
6373
6379
|
return text.replace(/\./, "\\.");
|
|
6374
6380
|
}
|
|
6375
|
-
function directory(
|
|
6376
|
-
return new RegExp(`(^|/)${
|
|
6381
|
+
function directory(path17) {
|
|
6382
|
+
return new RegExp(`(^|/)${path17}/`);
|
|
6377
6383
|
}
|
|
6378
6384
|
function extension(ext) {
|
|
6379
6385
|
return new RegExp(`${escape(ext)}$`);
|
|
6380
6386
|
}
|
|
6381
|
-
function filename(
|
|
6382
|
-
return new RegExp(`(^|/)${escape(
|
|
6387
|
+
function filename(path17) {
|
|
6388
|
+
return new RegExp(`(^|/)${escape(path17)}$`);
|
|
6383
6389
|
}
|
|
6384
6390
|
function rcfile(base) {
|
|
6385
6391
|
return new RegExp(`${escape(base)}(\\.(js|cjs|mjs|ts|yaml|yml|json))?$`);
|
|
@@ -7333,10 +7339,10 @@ var Minipass = class extends EventEmitter {
|
|
|
7333
7339
|
* Return a void Promise that resolves once the stream ends.
|
|
7334
7340
|
*/
|
|
7335
7341
|
async promise() {
|
|
7336
|
-
return new Promise((
|
|
7342
|
+
return new Promise((resolve2, reject) => {
|
|
7337
7343
|
this.on(DESTROYED, () => reject(new Error("stream destroyed")));
|
|
7338
7344
|
this.on("error", (er) => reject(er));
|
|
7339
|
-
this.on("end", () =>
|
|
7345
|
+
this.on("end", () => resolve2());
|
|
7340
7346
|
});
|
|
7341
7347
|
}
|
|
7342
7348
|
/**
|
|
@@ -7360,7 +7366,7 @@ var Minipass = class extends EventEmitter {
|
|
|
7360
7366
|
return Promise.resolve({ done: false, value: res });
|
|
7361
7367
|
if (this[EOF])
|
|
7362
7368
|
return stop();
|
|
7363
|
-
let
|
|
7369
|
+
let resolve2;
|
|
7364
7370
|
let reject;
|
|
7365
7371
|
const onerr = (er) => {
|
|
7366
7372
|
this.off("data", ondata);
|
|
@@ -7374,19 +7380,19 @@ var Minipass = class extends EventEmitter {
|
|
|
7374
7380
|
this.off("end", onend);
|
|
7375
7381
|
this.off(DESTROYED, ondestroy);
|
|
7376
7382
|
this.pause();
|
|
7377
|
-
|
|
7383
|
+
resolve2({ value, done: !!this[EOF] });
|
|
7378
7384
|
};
|
|
7379
7385
|
const onend = () => {
|
|
7380
7386
|
this.off("error", onerr);
|
|
7381
7387
|
this.off("data", ondata);
|
|
7382
7388
|
this.off(DESTROYED, ondestroy);
|
|
7383
7389
|
stop();
|
|
7384
|
-
|
|
7390
|
+
resolve2({ done: true, value: void 0 });
|
|
7385
7391
|
};
|
|
7386
7392
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
7387
7393
|
return new Promise((res2, rej) => {
|
|
7388
7394
|
reject = rej;
|
|
7389
|
-
|
|
7395
|
+
resolve2 = res2;
|
|
7390
7396
|
this.once(DESTROYED, ondestroy);
|
|
7391
7397
|
this.once("error", onerr);
|
|
7392
7398
|
this.once("end", onend);
|
|
@@ -7521,17 +7527,17 @@ var ReadStream = class extends Minipass {
|
|
|
7521
7527
|
[_size2];
|
|
7522
7528
|
[_remain];
|
|
7523
7529
|
[_autoClose];
|
|
7524
|
-
constructor(
|
|
7530
|
+
constructor(path17, opt) {
|
|
7525
7531
|
opt = opt || {};
|
|
7526
7532
|
super(opt);
|
|
7527
7533
|
this.readable = true;
|
|
7528
7534
|
this.writable = false;
|
|
7529
|
-
if (typeof
|
|
7535
|
+
if (typeof path17 !== "string") {
|
|
7530
7536
|
throw new TypeError("path must be a string");
|
|
7531
7537
|
}
|
|
7532
7538
|
this[_errored] = false;
|
|
7533
7539
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
7534
|
-
this[_path] =
|
|
7540
|
+
this[_path] = path17;
|
|
7535
7541
|
this[_readSize] = opt.readSize || 16 * 1024 * 1024;
|
|
7536
7542
|
this[_reading] = false;
|
|
7537
7543
|
this[_size2] = typeof opt.size === "number" ? opt.size : Infinity;
|
|
@@ -7694,10 +7700,10 @@ var WriteStream = class extends EE {
|
|
|
7694
7700
|
[_flags];
|
|
7695
7701
|
[_finished] = false;
|
|
7696
7702
|
[_pos];
|
|
7697
|
-
constructor(
|
|
7703
|
+
constructor(path17, opt) {
|
|
7698
7704
|
opt = opt || {};
|
|
7699
7705
|
super(opt);
|
|
7700
|
-
this[_path] =
|
|
7706
|
+
this[_path] = path17;
|
|
7701
7707
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
7702
7708
|
this[_mode] = opt.mode === void 0 ? 438 : opt.mode;
|
|
7703
7709
|
this[_pos] = typeof opt.start === "number" ? opt.start : void 0;
|
|
@@ -8943,10 +8949,10 @@ var Header = class {
|
|
|
8943
8949
|
}
|
|
8944
8950
|
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
|
8945
8951
|
const split = splitPrefix(this.path || "", prefixSize);
|
|
8946
|
-
const
|
|
8952
|
+
const path17 = split[0];
|
|
8947
8953
|
const prefix2 = split[1];
|
|
8948
8954
|
this.needPax = !!split[2];
|
|
8949
|
-
this.needPax = encString(buf, off, 100,
|
|
8955
|
+
this.needPax = encString(buf, off, 100, path17) || this.needPax;
|
|
8950
8956
|
this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax;
|
|
8951
8957
|
this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax;
|
|
8952
8958
|
this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax;
|
|
@@ -9229,6 +9235,8 @@ var ReadEntry = class extends Minipass {
|
|
|
9229
9235
|
case "OldExtendedHeader":
|
|
9230
9236
|
this.meta = true;
|
|
9231
9237
|
break;
|
|
9238
|
+
// NOTE: gnutar and bsdtar treat unrecognized types as 'File'
|
|
9239
|
+
// it may be worth doing the same, but with a warning.
|
|
9232
9240
|
default:
|
|
9233
9241
|
this.ignore = true;
|
|
9234
9242
|
}
|
|
@@ -9579,6 +9587,7 @@ var Parser = class extends EE2 {
|
|
|
9579
9587
|
ex.linkpath = this[META].replace(/\0.*/, "");
|
|
9580
9588
|
break;
|
|
9581
9589
|
}
|
|
9590
|
+
/* c8 ignore start */
|
|
9582
9591
|
default:
|
|
9583
9592
|
throw new Error("unknown meta: " + entry.type);
|
|
9584
9593
|
}
|
|
@@ -9735,6 +9744,7 @@ var Parser = class extends EE2 {
|
|
|
9735
9744
|
case "meta":
|
|
9736
9745
|
position += this[CONSUMEMETA](chunk, position);
|
|
9737
9746
|
break;
|
|
9747
|
+
/* c8 ignore start */
|
|
9738
9748
|
default:
|
|
9739
9749
|
throw new Error("invalid state: " + this[STATE]);
|
|
9740
9750
|
}
|
|
@@ -9856,9 +9866,9 @@ var listFile = (opt, _files) => {
|
|
|
9856
9866
|
const parse5 = new Parser(opt);
|
|
9857
9867
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
9858
9868
|
const file = opt.file;
|
|
9859
|
-
const p = new Promise((
|
|
9869
|
+
const p = new Promise((resolve2, reject) => {
|
|
9860
9870
|
parse5.on("error", reject);
|
|
9861
|
-
parse5.on("end",
|
|
9871
|
+
parse5.on("end", resolve2);
|
|
9862
9872
|
fs3.stat(file, (er, stat2) => {
|
|
9863
9873
|
if (er) {
|
|
9864
9874
|
reject(er);
|
|
@@ -9911,16 +9921,16 @@ var modeFix = (mode, isDir, portable) => {
|
|
|
9911
9921
|
// node_modules/tar/dist/esm/strip-absolute-path.js
|
|
9912
9922
|
import { win32 } from "path";
|
|
9913
9923
|
var { isAbsolute, parse: parse3 } = win32;
|
|
9914
|
-
var stripAbsolutePath = (
|
|
9924
|
+
var stripAbsolutePath = (path17) => {
|
|
9915
9925
|
let r = "";
|
|
9916
|
-
let parsed = parse3(
|
|
9917
|
-
while (isAbsolute(
|
|
9918
|
-
const root =
|
|
9919
|
-
|
|
9926
|
+
let parsed = parse3(path17);
|
|
9927
|
+
while (isAbsolute(path17) || parsed.root) {
|
|
9928
|
+
const root = path17.charAt(0) === "/" && path17.slice(0, 4) !== "//?/" ? "/" : parsed.root;
|
|
9929
|
+
path17 = path17.slice(root.length);
|
|
9920
9930
|
r += root;
|
|
9921
|
-
parsed = parse3(
|
|
9931
|
+
parsed = parse3(path17);
|
|
9922
9932
|
}
|
|
9923
|
-
return [r,
|
|
9933
|
+
return [r, path17];
|
|
9924
9934
|
};
|
|
9925
9935
|
|
|
9926
9936
|
// node_modules/tar/dist/esm/winchars.js
|
|
@@ -9932,12 +9942,12 @@ var encode2 = (s) => raw.reduce((s2, c3) => s2.split(c3).join(toWin.get(c3)), s)
|
|
|
9932
9942
|
var decode = (s) => win.reduce((s2, c3) => s2.split(c3).join(toRaw.get(c3)), s);
|
|
9933
9943
|
|
|
9934
9944
|
// node_modules/tar/dist/esm/write-entry.js
|
|
9935
|
-
var prefixPath = (
|
|
9945
|
+
var prefixPath = (path17, prefix2) => {
|
|
9936
9946
|
if (!prefix2) {
|
|
9937
|
-
return normalizeWindowsPath(
|
|
9947
|
+
return normalizeWindowsPath(path17);
|
|
9938
9948
|
}
|
|
9939
|
-
|
|
9940
|
-
return stripTrailingSlashes(prefix2) + "/" +
|
|
9949
|
+
path17 = normalizeWindowsPath(path17).replace(/^\.(\/|$)/, "");
|
|
9950
|
+
return stripTrailingSlashes(prefix2) + "/" + path17;
|
|
9941
9951
|
};
|
|
9942
9952
|
var maxReadSize = 16 * 1024 * 1024;
|
|
9943
9953
|
var PROCESS = Symbol("process");
|
|
@@ -10075,6 +10085,7 @@ var WriteEntry = class extends Minipass {
|
|
|
10075
10085
|
return this[DIRECTORY]();
|
|
10076
10086
|
case "SymbolicLink":
|
|
10077
10087
|
return this[SYMLINK]();
|
|
10088
|
+
// unsupported types are ignored.
|
|
10078
10089
|
default:
|
|
10079
10090
|
return this.end();
|
|
10080
10091
|
}
|
|
@@ -10082,8 +10093,8 @@ var WriteEntry = class extends Minipass {
|
|
|
10082
10093
|
[MODE](mode) {
|
|
10083
10094
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
10084
10095
|
}
|
|
10085
|
-
[PREFIX](
|
|
10086
|
-
return prefixPath(
|
|
10096
|
+
[PREFIX](path17) {
|
|
10097
|
+
return prefixPath(path17, this.prefix);
|
|
10087
10098
|
}
|
|
10088
10099
|
[HEADER]() {
|
|
10089
10100
|
var _a, _b;
|
|
@@ -10467,8 +10478,8 @@ var WriteEntryTar = class extends Minipass {
|
|
|
10467
10478
|
super.write(b);
|
|
10468
10479
|
readEntry.pipe(this);
|
|
10469
10480
|
}
|
|
10470
|
-
[PREFIX](
|
|
10471
|
-
return prefixPath(
|
|
10481
|
+
[PREFIX](path17) {
|
|
10482
|
+
return prefixPath(path17, this.prefix);
|
|
10472
10483
|
}
|
|
10473
10484
|
[MODE](mode) {
|
|
10474
10485
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
@@ -10523,8 +10534,8 @@ var PackJob = class {
|
|
|
10523
10534
|
pending = false;
|
|
10524
10535
|
ignore = false;
|
|
10525
10536
|
piped = false;
|
|
10526
|
-
constructor(
|
|
10527
|
-
this.path =
|
|
10537
|
+
constructor(path17, absolute) {
|
|
10538
|
+
this.path = path17 || "./";
|
|
10528
10539
|
this.absolute = absolute;
|
|
10529
10540
|
}
|
|
10530
10541
|
};
|
|
@@ -10638,21 +10649,21 @@ var Pack = class extends Minipass {
|
|
|
10638
10649
|
[WRITE](chunk) {
|
|
10639
10650
|
return super.write(chunk);
|
|
10640
10651
|
}
|
|
10641
|
-
add(
|
|
10642
|
-
this.write(
|
|
10652
|
+
add(path17) {
|
|
10653
|
+
this.write(path17);
|
|
10643
10654
|
return this;
|
|
10644
10655
|
}
|
|
10645
|
-
end(
|
|
10646
|
-
if (typeof
|
|
10647
|
-
cb =
|
|
10648
|
-
|
|
10656
|
+
end(path17, encoding, cb) {
|
|
10657
|
+
if (typeof path17 === "function") {
|
|
10658
|
+
cb = path17;
|
|
10659
|
+
path17 = void 0;
|
|
10649
10660
|
}
|
|
10650
10661
|
if (typeof encoding === "function") {
|
|
10651
10662
|
cb = encoding;
|
|
10652
10663
|
encoding = void 0;
|
|
10653
10664
|
}
|
|
10654
|
-
if (
|
|
10655
|
-
this.add(
|
|
10665
|
+
if (path17) {
|
|
10666
|
+
this.add(path17);
|
|
10656
10667
|
}
|
|
10657
10668
|
this[ENDED2] = true;
|
|
10658
10669
|
this[PROCESS2]();
|
|
@@ -10660,14 +10671,14 @@ var Pack = class extends Minipass {
|
|
|
10660
10671
|
cb();
|
|
10661
10672
|
return this;
|
|
10662
10673
|
}
|
|
10663
|
-
write(
|
|
10674
|
+
write(path17) {
|
|
10664
10675
|
if (this[ENDED2]) {
|
|
10665
10676
|
throw new Error("write after end");
|
|
10666
10677
|
}
|
|
10667
|
-
if (
|
|
10668
|
-
this[ADDTARENTRY](
|
|
10678
|
+
if (path17 instanceof ReadEntry) {
|
|
10679
|
+
this[ADDTARENTRY](path17);
|
|
10669
10680
|
} else {
|
|
10670
|
-
this[ADDFSENTRY](
|
|
10681
|
+
this[ADDFSENTRY](path17);
|
|
10671
10682
|
}
|
|
10672
10683
|
return this.flowing;
|
|
10673
10684
|
}
|
|
@@ -11010,9 +11021,9 @@ var getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMapF
|
|
|
11010
11021
|
// node_modules/chownr/dist/esm/index.js
|
|
11011
11022
|
import fs7 from "fs";
|
|
11012
11023
|
import path6 from "path";
|
|
11013
|
-
var lchownSync = (
|
|
11024
|
+
var lchownSync = (path17, uid, gid) => {
|
|
11014
11025
|
try {
|
|
11015
|
-
return fs7.lchownSync(
|
|
11026
|
+
return fs7.lchownSync(path17, uid, gid);
|
|
11016
11027
|
} catch (er) {
|
|
11017
11028
|
if ((er == null ? void 0 : er.code) !== "ENOENT")
|
|
11018
11029
|
throw er;
|
|
@@ -11108,23 +11119,23 @@ var optsArg = (opts) => {
|
|
|
11108
11119
|
const resolved = opts;
|
|
11109
11120
|
const optsFs = opts.fs || {};
|
|
11110
11121
|
opts.mkdir = opts.mkdir || optsFs.mkdir || mkdir;
|
|
11111
|
-
opts.mkdirAsync = opts.mkdirAsync ? opts.mkdirAsync : async (
|
|
11112
|
-
return new Promise((res, rej) => resolved.mkdir(
|
|
11122
|
+
opts.mkdirAsync = opts.mkdirAsync ? opts.mkdirAsync : async (path17, options) => {
|
|
11123
|
+
return new Promise((res, rej) => resolved.mkdir(path17, options, (er, made) => er ? rej(er) : res(made)));
|
|
11113
11124
|
};
|
|
11114
11125
|
opts.stat = opts.stat || optsFs.stat || stat;
|
|
11115
|
-
opts.statAsync = opts.statAsync ? opts.statAsync : async (
|
|
11126
|
+
opts.statAsync = opts.statAsync ? opts.statAsync : async (path17) => new Promise((res, rej) => resolved.stat(path17, (err, stats) => err ? rej(err) : res(stats)));
|
|
11116
11127
|
opts.statSync = opts.statSync || optsFs.statSync || statSync;
|
|
11117
11128
|
opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || mkdirSync;
|
|
11118
11129
|
return resolved;
|
|
11119
11130
|
};
|
|
11120
11131
|
|
|
11121
11132
|
// node_modules/tar/node_modules/mkdirp/dist/mjs/mkdirp-manual.js
|
|
11122
|
-
var mkdirpManualSync = (
|
|
11123
|
-
const parent = dirname2(
|
|
11133
|
+
var mkdirpManualSync = (path17, options, made) => {
|
|
11134
|
+
const parent = dirname2(path17);
|
|
11124
11135
|
const opts = { ...optsArg(options), recursive: false };
|
|
11125
|
-
if (parent ===
|
|
11136
|
+
if (parent === path17) {
|
|
11126
11137
|
try {
|
|
11127
|
-
return opts.mkdirSync(
|
|
11138
|
+
return opts.mkdirSync(path17, opts);
|
|
11128
11139
|
} catch (er) {
|
|
11129
11140
|
const fer = er;
|
|
11130
11141
|
if (fer && fer.code !== "EISDIR") {
|
|
@@ -11134,45 +11145,45 @@ var mkdirpManualSync = (path14, options, made) => {
|
|
|
11134
11145
|
}
|
|
11135
11146
|
}
|
|
11136
11147
|
try {
|
|
11137
|
-
opts.mkdirSync(
|
|
11138
|
-
return made ||
|
|
11148
|
+
opts.mkdirSync(path17, opts);
|
|
11149
|
+
return made || path17;
|
|
11139
11150
|
} catch (er) {
|
|
11140
11151
|
const fer = er;
|
|
11141
11152
|
if (fer && fer.code === "ENOENT") {
|
|
11142
|
-
return mkdirpManualSync(
|
|
11153
|
+
return mkdirpManualSync(path17, opts, mkdirpManualSync(parent, opts, made));
|
|
11143
11154
|
}
|
|
11144
11155
|
if (fer && fer.code !== "EEXIST" && fer && fer.code !== "EROFS") {
|
|
11145
11156
|
throw er;
|
|
11146
11157
|
}
|
|
11147
11158
|
try {
|
|
11148
|
-
if (!opts.statSync(
|
|
11159
|
+
if (!opts.statSync(path17).isDirectory())
|
|
11149
11160
|
throw er;
|
|
11150
11161
|
} catch (_) {
|
|
11151
11162
|
throw er;
|
|
11152
11163
|
}
|
|
11153
11164
|
}
|
|
11154
11165
|
};
|
|
11155
|
-
var mkdirpManual = Object.assign(async (
|
|
11166
|
+
var mkdirpManual = Object.assign(async (path17, options, made) => {
|
|
11156
11167
|
const opts = optsArg(options);
|
|
11157
11168
|
opts.recursive = false;
|
|
11158
|
-
const parent = dirname2(
|
|
11159
|
-
if (parent ===
|
|
11160
|
-
return opts.mkdirAsync(
|
|
11169
|
+
const parent = dirname2(path17);
|
|
11170
|
+
if (parent === path17) {
|
|
11171
|
+
return opts.mkdirAsync(path17, opts).catch((er) => {
|
|
11161
11172
|
const fer = er;
|
|
11162
11173
|
if (fer && fer.code !== "EISDIR") {
|
|
11163
11174
|
throw er;
|
|
11164
11175
|
}
|
|
11165
11176
|
});
|
|
11166
11177
|
}
|
|
11167
|
-
return opts.mkdirAsync(
|
|
11178
|
+
return opts.mkdirAsync(path17, opts).then(() => made || path17, async (er) => {
|
|
11168
11179
|
const fer = er;
|
|
11169
11180
|
if (fer && fer.code === "ENOENT") {
|
|
11170
|
-
return mkdirpManual(parent, opts).then((made2) => mkdirpManual(
|
|
11181
|
+
return mkdirpManual(parent, opts).then((made2) => mkdirpManual(path17, opts, made2));
|
|
11171
11182
|
}
|
|
11172
11183
|
if (fer && fer.code !== "EEXIST" && fer.code !== "EROFS") {
|
|
11173
11184
|
throw er;
|
|
11174
11185
|
}
|
|
11175
|
-
return opts.statAsync(
|
|
11186
|
+
return opts.statAsync(path17).then((st) => {
|
|
11176
11187
|
if (st.isDirectory()) {
|
|
11177
11188
|
return made;
|
|
11178
11189
|
} else {
|
|
@@ -11189,12 +11200,12 @@ import { dirname as dirname4 } from "path";
|
|
|
11189
11200
|
|
|
11190
11201
|
// node_modules/tar/node_modules/mkdirp/dist/mjs/find-made.js
|
|
11191
11202
|
import { dirname as dirname3 } from "path";
|
|
11192
|
-
var findMade = async (opts, parent,
|
|
11193
|
-
if (
|
|
11203
|
+
var findMade = async (opts, parent, path17) => {
|
|
11204
|
+
if (path17 === parent) {
|
|
11194
11205
|
return;
|
|
11195
11206
|
}
|
|
11196
11207
|
return opts.statAsync(parent).then(
|
|
11197
|
-
(st) => st.isDirectory() ?
|
|
11208
|
+
(st) => st.isDirectory() ? path17 : void 0,
|
|
11198
11209
|
// will fail later
|
|
11199
11210
|
// will fail later
|
|
11200
11211
|
(er) => {
|
|
@@ -11203,12 +11214,12 @@ var findMade = async (opts, parent, path14) => {
|
|
|
11203
11214
|
}
|
|
11204
11215
|
);
|
|
11205
11216
|
};
|
|
11206
|
-
var findMadeSync = (opts, parent,
|
|
11207
|
-
if (
|
|
11217
|
+
var findMadeSync = (opts, parent, path17) => {
|
|
11218
|
+
if (path17 === parent) {
|
|
11208
11219
|
return void 0;
|
|
11209
11220
|
}
|
|
11210
11221
|
try {
|
|
11211
|
-
return opts.statSync(parent).isDirectory() ?
|
|
11222
|
+
return opts.statSync(parent).isDirectory() ? path17 : void 0;
|
|
11212
11223
|
} catch (er) {
|
|
11213
11224
|
const fer = er;
|
|
11214
11225
|
return fer && fer.code === "ENOENT" ? findMadeSync(opts, dirname3(parent), parent) : void 0;
|
|
@@ -11216,36 +11227,36 @@ var findMadeSync = (opts, parent, path14) => {
|
|
|
11216
11227
|
};
|
|
11217
11228
|
|
|
11218
11229
|
// node_modules/tar/node_modules/mkdirp/dist/mjs/mkdirp-native.js
|
|
11219
|
-
var mkdirpNativeSync = (
|
|
11230
|
+
var mkdirpNativeSync = (path17, options) => {
|
|
11220
11231
|
const opts = optsArg(options);
|
|
11221
11232
|
opts.recursive = true;
|
|
11222
|
-
const parent = dirname4(
|
|
11223
|
-
if (parent ===
|
|
11224
|
-
return opts.mkdirSync(
|
|
11233
|
+
const parent = dirname4(path17);
|
|
11234
|
+
if (parent === path17) {
|
|
11235
|
+
return opts.mkdirSync(path17, opts);
|
|
11225
11236
|
}
|
|
11226
|
-
const made = findMadeSync(opts,
|
|
11237
|
+
const made = findMadeSync(opts, path17);
|
|
11227
11238
|
try {
|
|
11228
|
-
opts.mkdirSync(
|
|
11239
|
+
opts.mkdirSync(path17, opts);
|
|
11229
11240
|
return made;
|
|
11230
11241
|
} catch (er) {
|
|
11231
11242
|
const fer = er;
|
|
11232
11243
|
if (fer && fer.code === "ENOENT") {
|
|
11233
|
-
return mkdirpManualSync(
|
|
11244
|
+
return mkdirpManualSync(path17, opts);
|
|
11234
11245
|
} else {
|
|
11235
11246
|
throw er;
|
|
11236
11247
|
}
|
|
11237
11248
|
}
|
|
11238
11249
|
};
|
|
11239
|
-
var mkdirpNative = Object.assign(async (
|
|
11250
|
+
var mkdirpNative = Object.assign(async (path17, options) => {
|
|
11240
11251
|
const opts = { ...optsArg(options), recursive: true };
|
|
11241
|
-
const parent = dirname4(
|
|
11242
|
-
if (parent ===
|
|
11243
|
-
return await opts.mkdirAsync(
|
|
11252
|
+
const parent = dirname4(path17);
|
|
11253
|
+
if (parent === path17) {
|
|
11254
|
+
return await opts.mkdirAsync(path17, opts);
|
|
11244
11255
|
}
|
|
11245
|
-
return findMade(opts,
|
|
11256
|
+
return findMade(opts, path17).then((made) => opts.mkdirAsync(path17, opts).then((m) => made || m).catch((er) => {
|
|
11246
11257
|
const fer = er;
|
|
11247
11258
|
if (fer && fer.code === "ENOENT") {
|
|
11248
|
-
return mkdirpManual(
|
|
11259
|
+
return mkdirpManual(path17, opts);
|
|
11249
11260
|
} else {
|
|
11250
11261
|
throw er;
|
|
11251
11262
|
}
|
|
@@ -11255,25 +11266,25 @@ var mkdirpNative = Object.assign(async (path14, options) => {
|
|
|
11255
11266
|
// node_modules/tar/node_modules/mkdirp/dist/mjs/path-arg.js
|
|
11256
11267
|
import { parse as parse4, resolve } from "path";
|
|
11257
11268
|
var platform3 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
11258
|
-
var pathArg = (
|
|
11259
|
-
if (/\0/.test(
|
|
11269
|
+
var pathArg = (path17) => {
|
|
11270
|
+
if (/\0/.test(path17)) {
|
|
11260
11271
|
throw Object.assign(new TypeError("path must be a string without null bytes"), {
|
|
11261
|
-
path:
|
|
11272
|
+
path: path17,
|
|
11262
11273
|
code: "ERR_INVALID_ARG_VALUE"
|
|
11263
11274
|
});
|
|
11264
11275
|
}
|
|
11265
|
-
|
|
11276
|
+
path17 = resolve(path17);
|
|
11266
11277
|
if (platform3 === "win32") {
|
|
11267
11278
|
const badWinChars = /[*|"<>?:]/;
|
|
11268
|
-
const { root } = parse4(
|
|
11269
|
-
if (badWinChars.test(
|
|
11279
|
+
const { root } = parse4(path17);
|
|
11280
|
+
if (badWinChars.test(path17.substring(root.length))) {
|
|
11270
11281
|
throw Object.assign(new Error("Illegal characters in path."), {
|
|
11271
|
-
path:
|
|
11282
|
+
path: path17,
|
|
11272
11283
|
code: "EINVAL"
|
|
11273
11284
|
});
|
|
11274
11285
|
}
|
|
11275
11286
|
}
|
|
11276
|
-
return
|
|
11287
|
+
return path17;
|
|
11277
11288
|
};
|
|
11278
11289
|
|
|
11279
11290
|
// node_modules/tar/node_modules/mkdirp/dist/mjs/use-native.js
|
|
@@ -11287,15 +11298,15 @@ var useNative = Object.assign(!hasNative ? () => false : (opts) => optsArg(opts)
|
|
|
11287
11298
|
});
|
|
11288
11299
|
|
|
11289
11300
|
// node_modules/tar/node_modules/mkdirp/dist/mjs/index.js
|
|
11290
|
-
var mkdirpSync = (
|
|
11291
|
-
|
|
11301
|
+
var mkdirpSync = (path17, opts) => {
|
|
11302
|
+
path17 = pathArg(path17);
|
|
11292
11303
|
const resolved = optsArg(opts);
|
|
11293
|
-
return useNativeSync(resolved) ? mkdirpNativeSync(
|
|
11304
|
+
return useNativeSync(resolved) ? mkdirpNativeSync(path17, resolved) : mkdirpManualSync(path17, resolved);
|
|
11294
11305
|
};
|
|
11295
|
-
var mkdirp = Object.assign(async (
|
|
11296
|
-
|
|
11306
|
+
var mkdirp = Object.assign(async (path17, opts) => {
|
|
11307
|
+
path17 = pathArg(path17);
|
|
11297
11308
|
const resolved = optsArg(opts);
|
|
11298
|
-
return useNative(resolved) ? mkdirpNative(
|
|
11309
|
+
return useNative(resolved) ? mkdirpNative(path17, resolved) : mkdirpManual(path17, resolved);
|
|
11299
11310
|
}, {
|
|
11300
11311
|
mkdirpSync,
|
|
11301
11312
|
mkdirpNative,
|
|
@@ -11319,9 +11330,9 @@ var CwdError = class extends Error {
|
|
|
11319
11330
|
path;
|
|
11320
11331
|
code;
|
|
11321
11332
|
syscall = "chdir";
|
|
11322
|
-
constructor(
|
|
11323
|
-
super(`${code2}: Cannot cd into '${
|
|
11324
|
-
this.path =
|
|
11333
|
+
constructor(path17, code2) {
|
|
11334
|
+
super(`${code2}: Cannot cd into '${path17}'`);
|
|
11335
|
+
this.path = path17;
|
|
11325
11336
|
this.code = code2;
|
|
11326
11337
|
}
|
|
11327
11338
|
get name() {
|
|
@@ -11335,10 +11346,10 @@ var SymlinkError = class extends Error {
|
|
|
11335
11346
|
symlink;
|
|
11336
11347
|
syscall = "symlink";
|
|
11337
11348
|
code = "TAR_SYMLINK_ERROR";
|
|
11338
|
-
constructor(symlink,
|
|
11349
|
+
constructor(symlink, path17) {
|
|
11339
11350
|
super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");
|
|
11340
11351
|
this.symlink = symlink;
|
|
11341
|
-
this.path =
|
|
11352
|
+
this.path = path17;
|
|
11342
11353
|
}
|
|
11343
11354
|
get name() {
|
|
11344
11355
|
return "SymlinkError";
|
|
@@ -11525,13 +11536,13 @@ var normalizeUnicode = (s) => {
|
|
|
11525
11536
|
import { join } from "path";
|
|
11526
11537
|
var platform4 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
11527
11538
|
var isWindows2 = platform4 === "win32";
|
|
11528
|
-
var getDirs = (
|
|
11529
|
-
const dirs =
|
|
11539
|
+
var getDirs = (path17) => {
|
|
11540
|
+
const dirs = path17.split("/").slice(0, -1).reduce((set, path18) => {
|
|
11530
11541
|
const s = set[set.length - 1];
|
|
11531
11542
|
if (s !== void 0) {
|
|
11532
|
-
|
|
11543
|
+
path18 = join(s, path18);
|
|
11533
11544
|
}
|
|
11534
|
-
set.push(
|
|
11545
|
+
set.push(path18 || "/");
|
|
11535
11546
|
return set;
|
|
11536
11547
|
}, []);
|
|
11537
11548
|
return dirs;
|
|
@@ -11553,7 +11564,7 @@ var PathReservations = class {
|
|
|
11553
11564
|
paths = isWindows2 ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
11554
11565
|
return stripTrailingSlashes(join(normalizeUnicode(p))).toLowerCase();
|
|
11555
11566
|
});
|
|
11556
|
-
const dirs = new Set(paths.map((
|
|
11567
|
+
const dirs = new Set(paths.map((path17) => getDirs(path17)).reduce((a2, b) => a2.concat(b)));
|
|
11557
11568
|
__privateGet(this, _reservations).set(fn, { dirs, paths });
|
|
11558
11569
|
for (const p of paths) {
|
|
11559
11570
|
const q = __privateGet(this, _queues).get(p);
|
|
@@ -11597,8 +11608,8 @@ getQueues_fn = function(fn) {
|
|
|
11597
11608
|
throw new Error("function does not have any path reservations");
|
|
11598
11609
|
}
|
|
11599
11610
|
return {
|
|
11600
|
-
paths: res.paths.map((
|
|
11601
|
-
dirs: [...res.dirs].map((
|
|
11611
|
+
paths: res.paths.map((path17) => __privateGet(this, _queues).get(path17)),
|
|
11612
|
+
dirs: [...res.dirs].map((path17) => __privateGet(this, _queues).get(path17))
|
|
11602
11613
|
};
|
|
11603
11614
|
};
|
|
11604
11615
|
// run the function if it's first in line and not already running
|
|
@@ -11620,14 +11631,14 @@ clear_fn = function(fn) {
|
|
|
11620
11631
|
}
|
|
11621
11632
|
const { paths, dirs } = res;
|
|
11622
11633
|
const next = /* @__PURE__ */ new Set();
|
|
11623
|
-
for (const
|
|
11624
|
-
const q = __privateGet(this, _queues).get(
|
|
11634
|
+
for (const path17 of paths) {
|
|
11635
|
+
const q = __privateGet(this, _queues).get(path17);
|
|
11625
11636
|
if (!q || (q == null ? void 0 : q[0]) !== fn) {
|
|
11626
11637
|
continue;
|
|
11627
11638
|
}
|
|
11628
11639
|
const q0 = q[1];
|
|
11629
11640
|
if (!q0) {
|
|
11630
|
-
__privateGet(this, _queues).delete(
|
|
11641
|
+
__privateGet(this, _queues).delete(path17);
|
|
11631
11642
|
continue;
|
|
11632
11643
|
}
|
|
11633
11644
|
q.shift();
|
|
@@ -11691,34 +11702,34 @@ var CHECKED_CWD = Symbol("checkedCwd");
|
|
|
11691
11702
|
var platform5 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
11692
11703
|
var isWindows3 = platform5 === "win32";
|
|
11693
11704
|
var DEFAULT_MAX_DEPTH = 1024;
|
|
11694
|
-
var unlinkFile = (
|
|
11705
|
+
var unlinkFile = (path17, cb) => {
|
|
11695
11706
|
if (!isWindows3) {
|
|
11696
|
-
return fs9.unlink(
|
|
11707
|
+
return fs9.unlink(path17, cb);
|
|
11697
11708
|
}
|
|
11698
|
-
const name2 =
|
|
11699
|
-
fs9.rename(
|
|
11709
|
+
const name2 = path17 + ".DELETE." + randomBytes(16).toString("hex");
|
|
11710
|
+
fs9.rename(path17, name2, (er) => {
|
|
11700
11711
|
if (er) {
|
|
11701
11712
|
return cb(er);
|
|
11702
11713
|
}
|
|
11703
11714
|
fs9.unlink(name2, cb);
|
|
11704
11715
|
});
|
|
11705
11716
|
};
|
|
11706
|
-
var unlinkFileSync = (
|
|
11717
|
+
var unlinkFileSync = (path17) => {
|
|
11707
11718
|
if (!isWindows3) {
|
|
11708
|
-
return fs9.unlinkSync(
|
|
11719
|
+
return fs9.unlinkSync(path17);
|
|
11709
11720
|
}
|
|
11710
|
-
const name2 =
|
|
11711
|
-
fs9.renameSync(
|
|
11721
|
+
const name2 = path17 + ".DELETE." + randomBytes(16).toString("hex");
|
|
11722
|
+
fs9.renameSync(path17, name2);
|
|
11712
11723
|
fs9.unlinkSync(name2);
|
|
11713
11724
|
};
|
|
11714
11725
|
var uint32 = (a2, b, c3) => a2 !== void 0 && a2 === a2 >>> 0 ? a2 : b !== void 0 && b === b >>> 0 ? b : c3;
|
|
11715
|
-
var cacheKeyNormalize = (
|
|
11726
|
+
var cacheKeyNormalize = (path17) => stripTrailingSlashes(normalizeWindowsPath(normalizeUnicode(path17))).toLowerCase();
|
|
11716
11727
|
var pruneCache = (cache2, abs) => {
|
|
11717
11728
|
abs = cacheKeyNormalize(abs);
|
|
11718
|
-
for (const
|
|
11719
|
-
const pnorm = cacheKeyNormalize(
|
|
11729
|
+
for (const path17 of cache2.keys()) {
|
|
11730
|
+
const pnorm = cacheKeyNormalize(path17);
|
|
11720
11731
|
if (pnorm === abs || pnorm.indexOf(abs + "/") === 0) {
|
|
11721
|
-
cache2.delete(
|
|
11732
|
+
cache2.delete(path17);
|
|
11722
11733
|
}
|
|
11723
11734
|
}
|
|
11724
11735
|
};
|
|
@@ -11901,6 +11912,7 @@ var Unpack = class extends Parser {
|
|
|
11901
11912
|
if (entry.mode) {
|
|
11902
11913
|
entry.mode = entry.mode | 448;
|
|
11903
11914
|
}
|
|
11915
|
+
// eslint-disable-next-line no-fallthrough
|
|
11904
11916
|
case "File":
|
|
11905
11917
|
case "OldFile":
|
|
11906
11918
|
case "ContiguousFile":
|
|
@@ -12374,9 +12386,9 @@ var extractFile = (opt, _) => {
|
|
|
12374
12386
|
const u2 = new Unpack(opt);
|
|
12375
12387
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
12376
12388
|
const file = opt.file;
|
|
12377
|
-
const p = new Promise((
|
|
12389
|
+
const p = new Promise((resolve2, reject) => {
|
|
12378
12390
|
u2.on("error", reject);
|
|
12379
|
-
u2.on("close",
|
|
12391
|
+
u2.on("close", resolve2);
|
|
12380
12392
|
fs10.stat(file, (er, stat2) => {
|
|
12381
12393
|
if (er) {
|
|
12382
12394
|
reject(er);
|
|
@@ -12510,7 +12522,7 @@ var replaceAsync = (opt, files) => {
|
|
|
12510
12522
|
};
|
|
12511
12523
|
fs11.read(fd, headBuf, 0, 512, position, onread);
|
|
12512
12524
|
};
|
|
12513
|
-
const promise = new Promise((
|
|
12525
|
+
const promise = new Promise((resolve2, reject) => {
|
|
12514
12526
|
p.on("error", reject);
|
|
12515
12527
|
let flag = "r+";
|
|
12516
12528
|
const onopen = (er, fd) => {
|
|
@@ -12535,7 +12547,7 @@ var replaceAsync = (opt, files) => {
|
|
|
12535
12547
|
});
|
|
12536
12548
|
p.pipe(stream);
|
|
12537
12549
|
stream.on("error", reject);
|
|
12538
|
-
stream.on("close",
|
|
12550
|
+
stream.on("close", resolve2);
|
|
12539
12551
|
addFilesAsync2(p, files);
|
|
12540
12552
|
});
|
|
12541
12553
|
});
|
|
@@ -12609,14 +12621,14 @@ var mtimeFilter = (opt) => {
|
|
|
12609
12621
|
if (!opt.mtimeCache) {
|
|
12610
12622
|
opt.mtimeCache = /* @__PURE__ */ new Map();
|
|
12611
12623
|
}
|
|
12612
|
-
opt.filter = filter ? (
|
|
12624
|
+
opt.filter = filter ? (path17, stat2) => {
|
|
12613
12625
|
var _a;
|
|
12614
|
-
return filter(
|
|
12615
|
-
((((_a = opt.mtimeCache) == null ? void 0 : _a.get(
|
|
12616
|
-
} : (
|
|
12626
|
+
return filter(path17, stat2) && !/* c8 ignore start */
|
|
12627
|
+
((((_a = opt.mtimeCache) == null ? void 0 : _a.get(path17)) ?? stat2.mtime ?? 0) > (stat2.mtime ?? 0));
|
|
12628
|
+
} : (path17, stat2) => {
|
|
12617
12629
|
var _a;
|
|
12618
12630
|
return !/* c8 ignore start */
|
|
12619
|
-
((((_a = opt.mtimeCache) == null ? void 0 : _a.get(
|
|
12631
|
+
((((_a = opt.mtimeCache) == null ? void 0 : _a.get(path17)) ?? stat2.mtime ?? 0) > (stat2.mtime ?? 0));
|
|
12620
12632
|
};
|
|
12621
12633
|
};
|
|
12622
12634
|
|
|
@@ -12639,10 +12651,10 @@ async function getFileList(filename2) {
|
|
|
12639
12651
|
}
|
|
12640
12652
|
async function getFileContent(tarball, filenames) {
|
|
12641
12653
|
const contents = {};
|
|
12642
|
-
return new Promise((
|
|
12654
|
+
return new Promise((resolve2, reject) => {
|
|
12643
12655
|
const t = new Parser({
|
|
12644
|
-
filter(
|
|
12645
|
-
return filenames.includes(normalize(
|
|
12656
|
+
filter(path17) {
|
|
12657
|
+
return filenames.includes(normalize(path17));
|
|
12646
12658
|
}
|
|
12647
12659
|
});
|
|
12648
12660
|
t.on("entry", (entry) => {
|
|
@@ -12656,7 +12668,7 @@ async function getFileContent(tarball, filenames) {
|
|
|
12656
12668
|
});
|
|
12657
12669
|
});
|
|
12658
12670
|
t.on("end", () => {
|
|
12659
|
-
|
|
12671
|
+
resolve2(contents);
|
|
12660
12672
|
});
|
|
12661
12673
|
const rs = fs12.createReadStream(tarball.filePath);
|
|
12662
12674
|
rs.pipe(t);
|
|
@@ -13223,7 +13235,14 @@ var escapeControlCharacter = (character) => {
|
|
|
13223
13235
|
const codepointHex = codepoint.toString(16);
|
|
13224
13236
|
return codepoint <= ASTRAL_START ? `\\u${codepointHex.padStart(4, "0")}` : `\\U${codepointHex}`;
|
|
13225
13237
|
};
|
|
13226
|
-
var
|
|
13238
|
+
var getSpecialCharRegExp = () => {
|
|
13239
|
+
try {
|
|
13240
|
+
return new RegExp("\\p{Separator}|\\p{Other}", "gu");
|
|
13241
|
+
} catch {
|
|
13242
|
+
return /[\s\u0000-\u001F\u007F-\u009F\u00AD]/g;
|
|
13243
|
+
}
|
|
13244
|
+
};
|
|
13245
|
+
var SPECIAL_CHAR_REGEXP = getSpecialCharRegExp();
|
|
13227
13246
|
var COMMON_ESCAPES = {
|
|
13228
13247
|
" ": " ",
|
|
13229
13248
|
"\b": "\\b",
|
|
@@ -13745,7 +13764,7 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
13745
13764
|
|
|
13746
13765
|
// node_modules/execa/lib/arguments/options.js
|
|
13747
13766
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
13748
|
-
import
|
|
13767
|
+
import path13 from "path";
|
|
13749
13768
|
import process7 from "process";
|
|
13750
13769
|
|
|
13751
13770
|
// node_modules/execa/node_modules/npm-run-path/index.js
|
|
@@ -14423,8 +14442,8 @@ var disconnect = (anyProcess) => {
|
|
|
14423
14442
|
// node_modules/execa/lib/utils/deferred.js
|
|
14424
14443
|
var createDeferred = () => {
|
|
14425
14444
|
const methods = {};
|
|
14426
|
-
const promise = new Promise((
|
|
14427
|
-
Object.assign(methods, { resolve:
|
|
14445
|
+
const promise = new Promise((resolve2, reject) => {
|
|
14446
|
+
Object.assign(methods, { resolve: resolve2, reject });
|
|
14428
14447
|
});
|
|
14429
14448
|
return Object.assign(promise, methods);
|
|
14430
14449
|
};
|
|
@@ -14948,7 +14967,7 @@ var killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
14948
14967
|
|
|
14949
14968
|
// node_modules/execa/lib/methods/node.js
|
|
14950
14969
|
import { execPath, execArgv } from "process";
|
|
14951
|
-
import
|
|
14970
|
+
import path11 from "path";
|
|
14952
14971
|
var mapNode = ({ options }) => {
|
|
14953
14972
|
if (options.node === false) {
|
|
14954
14973
|
throw new TypeError('The "node" option cannot be false with `execaNode()`.');
|
|
@@ -14967,7 +14986,7 @@ var handleNodeOption = (file, commandArguments, {
|
|
|
14967
14986
|
throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
|
|
14968
14987
|
}
|
|
14969
14988
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, 'The "nodePath" option');
|
|
14970
|
-
const resolvedNodePath =
|
|
14989
|
+
const resolvedNodePath = path11.resolve(cwd, normalizedNodePath);
|
|
14971
14990
|
const newOptions = {
|
|
14972
14991
|
...options,
|
|
14973
14992
|
nodePath: resolvedNodePath,
|
|
@@ -14977,7 +14996,7 @@ var handleNodeOption = (file, commandArguments, {
|
|
|
14977
14996
|
if (!shouldHandleNode) {
|
|
14978
14997
|
return [file, commandArguments, newOptions];
|
|
14979
14998
|
}
|
|
14980
|
-
if (
|
|
14999
|
+
if (path11.basename(file, ".exe") === "node") {
|
|
14981
15000
|
throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
|
|
14982
15001
|
}
|
|
14983
15002
|
return [
|
|
@@ -15067,11 +15086,11 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
|
|
|
15067
15086
|
|
|
15068
15087
|
// node_modules/execa/lib/arguments/cwd.js
|
|
15069
15088
|
import { statSync as statSync2 } from "fs";
|
|
15070
|
-
import
|
|
15089
|
+
import path12 from "path";
|
|
15071
15090
|
import process6 from "process";
|
|
15072
15091
|
var normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
15073
15092
|
const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
|
|
15074
|
-
return
|
|
15093
|
+
return path12.resolve(cwdString);
|
|
15075
15094
|
};
|
|
15076
15095
|
var getDefaultCwd = () => {
|
|
15077
15096
|
try {
|
|
@@ -15118,7 +15137,7 @@ var normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
15118
15137
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
15119
15138
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
15120
15139
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
15121
|
-
if (process7.platform === "win32" &&
|
|
15140
|
+
if (process7.platform === "win32" && path13.basename(file, ".exe") === "cmd") {
|
|
15122
15141
|
commandArguments.unshift("/q");
|
|
15123
15142
|
}
|
|
15124
15143
|
return { file, commandArguments, options };
|
|
@@ -17253,13 +17272,13 @@ var logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encoding,
|
|
|
17253
17272
|
}
|
|
17254
17273
|
};
|
|
17255
17274
|
var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
17256
|
-
for (const { path:
|
|
17257
|
-
const pathString = typeof
|
|
17275
|
+
for (const { path: path17 } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
17276
|
+
const pathString = typeof path17 === "string" ? path17 : path17.toString();
|
|
17258
17277
|
if (outputFiles.has(pathString)) {
|
|
17259
|
-
appendFileSync(
|
|
17278
|
+
appendFileSync(path17, serializedResult);
|
|
17260
17279
|
} else {
|
|
17261
17280
|
outputFiles.add(pathString);
|
|
17262
|
-
writeFileSync2(
|
|
17281
|
+
writeFileSync2(path17, serializedResult);
|
|
17263
17282
|
}
|
|
17264
17283
|
}
|
|
17265
17284
|
};
|
|
@@ -19084,11 +19103,11 @@ var addConcurrentStream = (concurrentStreams, stream, waitName) => {
|
|
|
19084
19103
|
const promises = weakMap.get(stream);
|
|
19085
19104
|
const promise = createDeferred();
|
|
19086
19105
|
promises.push(promise);
|
|
19087
|
-
const
|
|
19088
|
-
return { resolve:
|
|
19106
|
+
const resolve2 = promise.resolve.bind(promise);
|
|
19107
|
+
return { resolve: resolve2, promises };
|
|
19089
19108
|
};
|
|
19090
|
-
var waitForConcurrentStreams = async ({ resolve:
|
|
19091
|
-
|
|
19109
|
+
var waitForConcurrentStreams = async ({ resolve: resolve2, promises }, subprocess) => {
|
|
19110
|
+
resolve2();
|
|
19092
19111
|
const [isSubprocessExit] = await Promise.race([
|
|
19093
19112
|
Promise.allSettled([true, subprocess]),
|
|
19094
19113
|
Promise.all([false, ...promises])
|
|
@@ -19675,16 +19694,16 @@ var {
|
|
|
19675
19694
|
|
|
19676
19695
|
// src/utils/persistent-cache.ts
|
|
19677
19696
|
import fs13 from "fs/promises";
|
|
19678
|
-
import
|
|
19697
|
+
import path14 from "path";
|
|
19679
19698
|
import crypto from "crypto";
|
|
19680
19699
|
import os from "os";
|
|
19681
19700
|
var enabled = os.platform() === "linux";
|
|
19682
|
-
var cacheRoot = process.env.XDG_CACHE_HOME ??
|
|
19683
|
-
var cacheDir =
|
|
19701
|
+
var cacheRoot = process.env.XDG_CACHE_HOME ?? path14.join(os.homedir(), ".cache");
|
|
19702
|
+
var cacheDir = path14.join(cacheRoot, "npm-pkg-lint");
|
|
19684
19703
|
function getFilePath(key) {
|
|
19685
19704
|
const hash = crypto.createHash("md5").update(key).digest("hex");
|
|
19686
19705
|
const filename2 = `${hash.slice(0, 2)}/${hash.slice(2)}.json`;
|
|
19687
|
-
return
|
|
19706
|
+
return path14.join(cacheDir, filename2);
|
|
19688
19707
|
}
|
|
19689
19708
|
async function setCacheDirecory(directory2) {
|
|
19690
19709
|
await fs13.mkdir(directory2, { recursive: true });
|
|
@@ -19711,7 +19730,7 @@ async function persistentCacheSet(key, data) {
|
|
|
19711
19730
|
}
|
|
19712
19731
|
const filePath = getFilePath(key);
|
|
19713
19732
|
const content = JSON.stringify(data, null, 2);
|
|
19714
|
-
await fs13.mkdir(
|
|
19733
|
+
await fs13.mkdir(path14.dirname(filePath), { recursive: true });
|
|
19715
19734
|
await fs13.writeFile(filePath, content, "utf-8");
|
|
19716
19735
|
}
|
|
19717
19736
|
|
|
@@ -19917,7 +19936,7 @@ function isObsoleteDependency(dependency) {
|
|
|
19917
19936
|
// src/rules/exports-types-order.ts
|
|
19918
19937
|
var ruleId3 = "exports-types-order";
|
|
19919
19938
|
var severity = Severity.ERROR;
|
|
19920
|
-
function* validateOrder(value,
|
|
19939
|
+
function* validateOrder(value, path17) {
|
|
19921
19940
|
if (!value || typeof value === "string") {
|
|
19922
19941
|
return;
|
|
19923
19942
|
}
|
|
@@ -19926,7 +19945,7 @@ function* validateOrder(value, path14) {
|
|
|
19926
19945
|
return;
|
|
19927
19946
|
}
|
|
19928
19947
|
if (keys.includes("types") && keys[0] !== "types") {
|
|
19929
|
-
const property =
|
|
19948
|
+
const property = path17.map((it) => `["${it}"]`).join("");
|
|
19930
19949
|
yield {
|
|
19931
19950
|
ruleId: ruleId3,
|
|
19932
19951
|
severity,
|
|
@@ -19936,7 +19955,7 @@ function* validateOrder(value, path14) {
|
|
|
19936
19955
|
};
|
|
19937
19956
|
}
|
|
19938
19957
|
for (const key of keys) {
|
|
19939
|
-
yield* validateOrder(value[key], [...
|
|
19958
|
+
yield* validateOrder(value[key], [...path17, key]);
|
|
19940
19959
|
}
|
|
19941
19960
|
}
|
|
19942
19961
|
function* exportsTypesOrder(pkg) {
|
|
@@ -20314,13 +20333,13 @@ async function verify(pkg, pkgPath, tarball, options) {
|
|
|
20314
20333
|
}
|
|
20315
20334
|
|
|
20316
20335
|
// src/tarball-location.ts
|
|
20317
|
-
import
|
|
20336
|
+
import path15 from "path";
|
|
20318
20337
|
function normalize2(name2) {
|
|
20319
20338
|
return name2.replace("/", "-").replace(/^@/, "");
|
|
20320
20339
|
}
|
|
20321
20340
|
function tarballLocation(pkg, pkgPath) {
|
|
20322
20341
|
const name2 = normalize2(pkg.name);
|
|
20323
|
-
return
|
|
20342
|
+
return path15.join(path15.dirname(pkgPath), `${name2}-${pkg.version}.tgz`);
|
|
20324
20343
|
}
|
|
20325
20344
|
|
|
20326
20345
|
// src/index.ts
|
|
@@ -20328,8 +20347,8 @@ var pkgFilepath = fileURLToPath5(new URL("../package.json", import.meta.url));
|
|
|
20328
20347
|
var { version: version2 } = JSON.parse(readFileSync3(pkgFilepath, "utf-8"));
|
|
20329
20348
|
var PACKAGE_JSON = "package.json";
|
|
20330
20349
|
async function preloadStdin() {
|
|
20331
|
-
return new Promise((
|
|
20332
|
-
import_tmp.default.file((err,
|
|
20350
|
+
return new Promise((resolve2, reject) => {
|
|
20351
|
+
import_tmp.default.file((err, path17, fd) => {
|
|
20333
20352
|
if (err) {
|
|
20334
20353
|
reject(err);
|
|
20335
20354
|
return;
|
|
@@ -20337,7 +20356,7 @@ async function preloadStdin() {
|
|
|
20337
20356
|
const st = createWriteStream2("", { fd, autoClose: true });
|
|
20338
20357
|
process.stdin.pipe(st);
|
|
20339
20358
|
st.on("finish", () => {
|
|
20340
|
-
|
|
20359
|
+
resolve2(path17);
|
|
20341
20360
|
});
|
|
20342
20361
|
st.on("error", (err2) => {
|
|
20343
20362
|
reject(err2);
|
|
@@ -20357,7 +20376,7 @@ async function getPackageJson(args, regenerateReportName) {
|
|
|
20357
20376
|
const pkg = JSON.parse(contents[PACKAGE_JSON].toString("utf-8"));
|
|
20358
20377
|
return {
|
|
20359
20378
|
pkg,
|
|
20360
|
-
pkgPath:
|
|
20379
|
+
pkgPath: path16.join(
|
|
20361
20380
|
regenerateReportName ? `${pkg.name}-${pkg.version}.tgz` : args.tarball,
|
|
20362
20381
|
PACKAGE_JSON
|
|
20363
20382
|
)
|
|
@@ -20365,7 +20384,7 @@ async function getPackageJson(args, regenerateReportName) {
|
|
|
20365
20384
|
}
|
|
20366
20385
|
const pkgPath = await findUp(PACKAGE_JSON);
|
|
20367
20386
|
if (pkgPath) {
|
|
20368
|
-
const relPath =
|
|
20387
|
+
const relPath = path16.relative(process.cwd(), pkgPath);
|
|
20369
20388
|
return {
|
|
20370
20389
|
pkg: JSON.parse(await fs14.readFile(relPath, "utf-8")),
|
|
20371
20390
|
pkgPath: relPath
|