npm-pkg-lint 3.2.0 → 3.2.2

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 CHANGED
@@ -3268,2664 +3268,6 @@ var require_argparse = __commonJS({
3268
3268
  }
3269
3269
  });
3270
3270
 
3271
- // node_modules/fs.realpath/old.js
3272
- var require_old = __commonJS({
3273
- "node_modules/fs.realpath/old.js"(exports) {
3274
- var pathModule = __require("path");
3275
- var isWindows = process.platform === "win32";
3276
- var fs5 = __require("fs");
3277
- var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
3278
- function rethrow() {
3279
- var callback;
3280
- if (DEBUG) {
3281
- var backtrace = new Error();
3282
- callback = debugCallback;
3283
- } else
3284
- callback = missingCallback;
3285
- return callback;
3286
- function debugCallback(err) {
3287
- if (err) {
3288
- backtrace.message = err.message;
3289
- err = backtrace;
3290
- missingCallback(err);
3291
- }
3292
- }
3293
- function missingCallback(err) {
3294
- if (err) {
3295
- if (process.throwDeprecation)
3296
- throw err;
3297
- else if (!process.noDeprecation) {
3298
- var msg = "fs: missing callback " + (err.stack || err.message);
3299
- if (process.traceDeprecation)
3300
- console.trace(msg);
3301
- else
3302
- console.error(msg);
3303
- }
3304
- }
3305
- }
3306
- }
3307
- function maybeCallback(cb) {
3308
- return typeof cb === "function" ? cb : rethrow();
3309
- }
3310
- var normalize3 = pathModule.normalize;
3311
- if (isWindows) {
3312
- nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
3313
- } else {
3314
- nextPartRe = /(.*?)(?:[\/]+|$)/g;
3315
- }
3316
- var nextPartRe;
3317
- if (isWindows) {
3318
- splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
3319
- } else {
3320
- splitRootRe = /^[\/]*/;
3321
- }
3322
- var splitRootRe;
3323
- exports.realpathSync = function realpathSync(p, cache2) {
3324
- p = pathModule.resolve(p);
3325
- if (cache2 && Object.prototype.hasOwnProperty.call(cache2, p)) {
3326
- return cache2[p];
3327
- }
3328
- var original = p, seenLinks = {}, knownHard = {};
3329
- var pos;
3330
- var current;
3331
- var base;
3332
- var previous;
3333
- start();
3334
- function start() {
3335
- var m = splitRootRe.exec(p);
3336
- pos = m[0].length;
3337
- current = m[0];
3338
- base = m[0];
3339
- previous = "";
3340
- if (isWindows && !knownHard[base]) {
3341
- fs5.lstatSync(base);
3342
- knownHard[base] = true;
3343
- }
3344
- }
3345
- while (pos < p.length) {
3346
- nextPartRe.lastIndex = pos;
3347
- var result = nextPartRe.exec(p);
3348
- previous = current;
3349
- current += result[0];
3350
- base = previous + result[1];
3351
- pos = nextPartRe.lastIndex;
3352
- if (knownHard[base] || cache2 && cache2[base] === base) {
3353
- continue;
3354
- }
3355
- var resolvedLink;
3356
- if (cache2 && Object.prototype.hasOwnProperty.call(cache2, base)) {
3357
- resolvedLink = cache2[base];
3358
- } else {
3359
- var stat = fs5.lstatSync(base);
3360
- if (!stat.isSymbolicLink()) {
3361
- knownHard[base] = true;
3362
- if (cache2)
3363
- cache2[base] = base;
3364
- continue;
3365
- }
3366
- var linkTarget = null;
3367
- if (!isWindows) {
3368
- var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
3369
- if (seenLinks.hasOwnProperty(id)) {
3370
- linkTarget = seenLinks[id];
3371
- }
3372
- }
3373
- if (linkTarget === null) {
3374
- fs5.statSync(base);
3375
- linkTarget = fs5.readlinkSync(base);
3376
- }
3377
- resolvedLink = pathModule.resolve(previous, linkTarget);
3378
- if (cache2)
3379
- cache2[base] = resolvedLink;
3380
- if (!isWindows)
3381
- seenLinks[id] = linkTarget;
3382
- }
3383
- p = pathModule.resolve(resolvedLink, p.slice(pos));
3384
- start();
3385
- }
3386
- if (cache2)
3387
- cache2[original] = p;
3388
- return p;
3389
- };
3390
- exports.realpath = function realpath(p, cache2, cb) {
3391
- if (typeof cb !== "function") {
3392
- cb = maybeCallback(cache2);
3393
- cache2 = null;
3394
- }
3395
- p = pathModule.resolve(p);
3396
- if (cache2 && Object.prototype.hasOwnProperty.call(cache2, p)) {
3397
- return process.nextTick(cb.bind(null, null, cache2[p]));
3398
- }
3399
- var original = p, seenLinks = {}, knownHard = {};
3400
- var pos;
3401
- var current;
3402
- var base;
3403
- var previous;
3404
- start();
3405
- function start() {
3406
- var m = splitRootRe.exec(p);
3407
- pos = m[0].length;
3408
- current = m[0];
3409
- base = m[0];
3410
- previous = "";
3411
- if (isWindows && !knownHard[base]) {
3412
- fs5.lstat(base, function(err) {
3413
- if (err)
3414
- return cb(err);
3415
- knownHard[base] = true;
3416
- LOOP();
3417
- });
3418
- } else {
3419
- process.nextTick(LOOP);
3420
- }
3421
- }
3422
- function LOOP() {
3423
- if (pos >= p.length) {
3424
- if (cache2)
3425
- cache2[original] = p;
3426
- return cb(null, p);
3427
- }
3428
- nextPartRe.lastIndex = pos;
3429
- var result = nextPartRe.exec(p);
3430
- previous = current;
3431
- current += result[0];
3432
- base = previous + result[1];
3433
- pos = nextPartRe.lastIndex;
3434
- if (knownHard[base] || cache2 && cache2[base] === base) {
3435
- return process.nextTick(LOOP);
3436
- }
3437
- if (cache2 && Object.prototype.hasOwnProperty.call(cache2, base)) {
3438
- return gotResolvedLink(cache2[base]);
3439
- }
3440
- return fs5.lstat(base, gotStat);
3441
- }
3442
- function gotStat(err, stat) {
3443
- if (err)
3444
- return cb(err);
3445
- if (!stat.isSymbolicLink()) {
3446
- knownHard[base] = true;
3447
- if (cache2)
3448
- cache2[base] = base;
3449
- return process.nextTick(LOOP);
3450
- }
3451
- if (!isWindows) {
3452
- var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
3453
- if (seenLinks.hasOwnProperty(id)) {
3454
- return gotTarget(null, seenLinks[id], base);
3455
- }
3456
- }
3457
- fs5.stat(base, function(err2) {
3458
- if (err2)
3459
- return cb(err2);
3460
- fs5.readlink(base, function(err3, target) {
3461
- if (!isWindows)
3462
- seenLinks[id] = target;
3463
- gotTarget(err3, target);
3464
- });
3465
- });
3466
- }
3467
- function gotTarget(err, target, base2) {
3468
- if (err)
3469
- return cb(err);
3470
- var resolvedLink = pathModule.resolve(previous, target);
3471
- if (cache2)
3472
- cache2[base2] = resolvedLink;
3473
- gotResolvedLink(resolvedLink);
3474
- }
3475
- function gotResolvedLink(resolvedLink) {
3476
- p = pathModule.resolve(resolvedLink, p.slice(pos));
3477
- start();
3478
- }
3479
- };
3480
- }
3481
- });
3482
-
3483
- // node_modules/fs.realpath/index.js
3484
- var require_fs = __commonJS({
3485
- "node_modules/fs.realpath/index.js"(exports, module) {
3486
- module.exports = realpath;
3487
- realpath.realpath = realpath;
3488
- realpath.sync = realpathSync;
3489
- realpath.realpathSync = realpathSync;
3490
- realpath.monkeypatch = monkeypatch;
3491
- realpath.unmonkeypatch = unmonkeypatch;
3492
- var fs5 = __require("fs");
3493
- var origRealpath = fs5.realpath;
3494
- var origRealpathSync = fs5.realpathSync;
3495
- var version2 = process.version;
3496
- var ok = /^v[0-5]\./.test(version2);
3497
- var old = require_old();
3498
- function newError(er) {
3499
- return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
3500
- }
3501
- function realpath(p, cache2, cb) {
3502
- if (ok) {
3503
- return origRealpath(p, cache2, cb);
3504
- }
3505
- if (typeof cache2 === "function") {
3506
- cb = cache2;
3507
- cache2 = null;
3508
- }
3509
- origRealpath(p, cache2, function(er, result) {
3510
- if (newError(er)) {
3511
- old.realpath(p, cache2, cb);
3512
- } else {
3513
- cb(er, result);
3514
- }
3515
- });
3516
- }
3517
- function realpathSync(p, cache2) {
3518
- if (ok) {
3519
- return origRealpathSync(p, cache2);
3520
- }
3521
- try {
3522
- return origRealpathSync(p, cache2);
3523
- } catch (er) {
3524
- if (newError(er)) {
3525
- return old.realpathSync(p, cache2);
3526
- } else {
3527
- throw er;
3528
- }
3529
- }
3530
- }
3531
- function monkeypatch() {
3532
- fs5.realpath = realpath;
3533
- fs5.realpathSync = realpathSync;
3534
- }
3535
- function unmonkeypatch() {
3536
- fs5.realpath = origRealpath;
3537
- fs5.realpathSync = origRealpathSync;
3538
- }
3539
- }
3540
- });
3541
-
3542
- // node_modules/concat-map/index.js
3543
- var require_concat_map = __commonJS({
3544
- "node_modules/concat-map/index.js"(exports, module) {
3545
- module.exports = function(xs, fn) {
3546
- var res = [];
3547
- for (var i = 0; i < xs.length; i++) {
3548
- var x = fn(xs[i], i);
3549
- if (isArray(x))
3550
- res.push.apply(res, x);
3551
- else
3552
- res.push(x);
3553
- }
3554
- return res;
3555
- };
3556
- var isArray = Array.isArray || function(xs) {
3557
- return Object.prototype.toString.call(xs) === "[object Array]";
3558
- };
3559
- }
3560
- });
3561
-
3562
- // node_modules/balanced-match/index.js
3563
- var require_balanced_match = __commonJS({
3564
- "node_modules/balanced-match/index.js"(exports, module) {
3565
- "use strict";
3566
- module.exports = balanced;
3567
- function balanced(a, b, str) {
3568
- if (a instanceof RegExp)
3569
- a = maybeMatch(a, str);
3570
- if (b instanceof RegExp)
3571
- b = maybeMatch(b, str);
3572
- var r = range(a, b, str);
3573
- return r && {
3574
- start: r[0],
3575
- end: r[1],
3576
- pre: str.slice(0, r[0]),
3577
- body: str.slice(r[0] + a.length, r[1]),
3578
- post: str.slice(r[1] + b.length)
3579
- };
3580
- }
3581
- function maybeMatch(reg, str) {
3582
- var m = str.match(reg);
3583
- return m ? m[0] : null;
3584
- }
3585
- balanced.range = range;
3586
- function range(a, b, str) {
3587
- var begs, beg, left, right, result;
3588
- var ai = str.indexOf(a);
3589
- var bi = str.indexOf(b, ai + 1);
3590
- var i = ai;
3591
- if (ai >= 0 && bi > 0) {
3592
- if (a === b) {
3593
- return [ai, bi];
3594
- }
3595
- begs = [];
3596
- left = str.length;
3597
- while (i >= 0 && !result) {
3598
- if (i == ai) {
3599
- begs.push(i);
3600
- ai = str.indexOf(a, i + 1);
3601
- } else if (begs.length == 1) {
3602
- result = [begs.pop(), bi];
3603
- } else {
3604
- beg = begs.pop();
3605
- if (beg < left) {
3606
- left = beg;
3607
- right = bi;
3608
- }
3609
- bi = str.indexOf(b, i + 1);
3610
- }
3611
- i = ai < bi && ai >= 0 ? ai : bi;
3612
- }
3613
- if (begs.length) {
3614
- result = [left, right];
3615
- }
3616
- }
3617
- return result;
3618
- }
3619
- }
3620
- });
3621
-
3622
- // node_modules/brace-expansion/index.js
3623
- var require_brace_expansion = __commonJS({
3624
- "node_modules/brace-expansion/index.js"(exports, module) {
3625
- var concatMap = require_concat_map();
3626
- var balanced = require_balanced_match();
3627
- module.exports = expandTop;
3628
- var escSlash = "\0SLASH" + Math.random() + "\0";
3629
- var escOpen = "\0OPEN" + Math.random() + "\0";
3630
- var escClose = "\0CLOSE" + Math.random() + "\0";
3631
- var escComma = "\0COMMA" + Math.random() + "\0";
3632
- var escPeriod = "\0PERIOD" + Math.random() + "\0";
3633
- function numeric(str) {
3634
- return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
3635
- }
3636
- function escapeBraces(str) {
3637
- return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
3638
- }
3639
- function unescapeBraces(str) {
3640
- return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
3641
- }
3642
- function parseCommaParts(str) {
3643
- if (!str)
3644
- return [""];
3645
- var parts = [];
3646
- var m = balanced("{", "}", str);
3647
- if (!m)
3648
- return str.split(",");
3649
- var pre = m.pre;
3650
- var body = m.body;
3651
- var post = m.post;
3652
- var p = pre.split(",");
3653
- p[p.length - 1] += "{" + body + "}";
3654
- var postParts = parseCommaParts(post);
3655
- if (post.length) {
3656
- p[p.length - 1] += postParts.shift();
3657
- p.push.apply(p, postParts);
3658
- }
3659
- parts.push.apply(parts, p);
3660
- return parts;
3661
- }
3662
- function expandTop(str) {
3663
- if (!str)
3664
- return [];
3665
- if (str.substr(0, 2) === "{}") {
3666
- str = "\\{\\}" + str.substr(2);
3667
- }
3668
- return expand(escapeBraces(str), true).map(unescapeBraces);
3669
- }
3670
- function embrace(str) {
3671
- return "{" + str + "}";
3672
- }
3673
- function isPadded(el) {
3674
- return /^-?0\d/.test(el);
3675
- }
3676
- function lte(i, y) {
3677
- return i <= y;
3678
- }
3679
- function gte(i, y) {
3680
- return i >= y;
3681
- }
3682
- function expand(str, isTop) {
3683
- var expansions = [];
3684
- var m = balanced("{", "}", str);
3685
- if (!m || /\$$/.test(m.pre))
3686
- return [str];
3687
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
3688
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
3689
- var isSequence = isNumericSequence || isAlphaSequence;
3690
- var isOptions = m.body.indexOf(",") >= 0;
3691
- if (!isSequence && !isOptions) {
3692
- if (m.post.match(/,.*\}/)) {
3693
- str = m.pre + "{" + m.body + escClose + m.post;
3694
- return expand(str);
3695
- }
3696
- return [str];
3697
- }
3698
- var n;
3699
- if (isSequence) {
3700
- n = m.body.split(/\.\./);
3701
- } else {
3702
- n = parseCommaParts(m.body);
3703
- if (n.length === 1) {
3704
- n = expand(n[0], false).map(embrace);
3705
- if (n.length === 1) {
3706
- var post = m.post.length ? expand(m.post, false) : [""];
3707
- return post.map(function(p) {
3708
- return m.pre + n[0] + p;
3709
- });
3710
- }
3711
- }
3712
- }
3713
- var pre = m.pre;
3714
- var post = m.post.length ? expand(m.post, false) : [""];
3715
- var N;
3716
- if (isSequence) {
3717
- var x = numeric(n[0]);
3718
- var y = numeric(n[1]);
3719
- var width = Math.max(n[0].length, n[1].length);
3720
- var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
3721
- var test = lte;
3722
- var reverse = y < x;
3723
- if (reverse) {
3724
- incr *= -1;
3725
- test = gte;
3726
- }
3727
- var pad = n.some(isPadded);
3728
- N = [];
3729
- for (var i = x; test(i, y); i += incr) {
3730
- var c;
3731
- if (isAlphaSequence) {
3732
- c = String.fromCharCode(i);
3733
- if (c === "\\")
3734
- c = "";
3735
- } else {
3736
- c = String(i);
3737
- if (pad) {
3738
- var need = width - c.length;
3739
- if (need > 0) {
3740
- var z = new Array(need + 1).join("0");
3741
- if (i < 0)
3742
- c = "-" + z + c.slice(1);
3743
- else
3744
- c = z + c;
3745
- }
3746
- }
3747
- }
3748
- N.push(c);
3749
- }
3750
- } else {
3751
- N = concatMap(n, function(el) {
3752
- return expand(el, false);
3753
- });
3754
- }
3755
- for (var j = 0; j < N.length; j++) {
3756
- for (var k = 0; k < post.length; k++) {
3757
- var expansion = pre + N[j] + post[k];
3758
- if (!isTop || isSequence || expansion)
3759
- expansions.push(expansion);
3760
- }
3761
- }
3762
- return expansions;
3763
- }
3764
- }
3765
- });
3766
-
3767
- // node_modules/minimatch/minimatch.js
3768
- var require_minimatch = __commonJS({
3769
- "node_modules/minimatch/minimatch.js"(exports, module) {
3770
- module.exports = minimatch;
3771
- minimatch.Minimatch = Minimatch;
3772
- var path8 = function() {
3773
- try {
3774
- return __require("path");
3775
- } catch (e) {
3776
- }
3777
- }() || {
3778
- sep: "/"
3779
- };
3780
- minimatch.sep = path8.sep;
3781
- var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
3782
- var expand = require_brace_expansion();
3783
- var plTypes = {
3784
- "!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
3785
- "?": { open: "(?:", close: ")?" },
3786
- "+": { open: "(?:", close: ")+" },
3787
- "*": { open: "(?:", close: ")*" },
3788
- "@": { open: "(?:", close: ")" }
3789
- };
3790
- var qmark = "[^/]";
3791
- var star = qmark + "*?";
3792
- var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
3793
- var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
3794
- var reSpecials = charSet("().*{}+?[]^$\\!");
3795
- function charSet(s) {
3796
- return s.split("").reduce(function(set, c) {
3797
- set[c] = true;
3798
- return set;
3799
- }, {});
3800
- }
3801
- var slashSplit = /\/+/;
3802
- minimatch.filter = filter;
3803
- function filter(pattern, options) {
3804
- options = options || {};
3805
- return function(p, i, list) {
3806
- return minimatch(p, pattern, options);
3807
- };
3808
- }
3809
- function ext(a, b) {
3810
- b = b || {};
3811
- var t = {};
3812
- Object.keys(a).forEach(function(k) {
3813
- t[k] = a[k];
3814
- });
3815
- Object.keys(b).forEach(function(k) {
3816
- t[k] = b[k];
3817
- });
3818
- return t;
3819
- }
3820
- minimatch.defaults = function(def) {
3821
- if (!def || typeof def !== "object" || !Object.keys(def).length) {
3822
- return minimatch;
3823
- }
3824
- var orig = minimatch;
3825
- var m = function minimatch2(p, pattern, options) {
3826
- return orig(p, pattern, ext(def, options));
3827
- };
3828
- m.Minimatch = function Minimatch2(pattern, options) {
3829
- return new orig.Minimatch(pattern, ext(def, options));
3830
- };
3831
- m.Minimatch.defaults = function defaults(options) {
3832
- return orig.defaults(ext(def, options)).Minimatch;
3833
- };
3834
- m.filter = function filter2(pattern, options) {
3835
- return orig.filter(pattern, ext(def, options));
3836
- };
3837
- m.defaults = function defaults(options) {
3838
- return orig.defaults(ext(def, options));
3839
- };
3840
- m.makeRe = function makeRe2(pattern, options) {
3841
- return orig.makeRe(pattern, ext(def, options));
3842
- };
3843
- m.braceExpand = function braceExpand2(pattern, options) {
3844
- return orig.braceExpand(pattern, ext(def, options));
3845
- };
3846
- m.match = function(list, pattern, options) {
3847
- return orig.match(list, pattern, ext(def, options));
3848
- };
3849
- return m;
3850
- };
3851
- Minimatch.defaults = function(def) {
3852
- return minimatch.defaults(def).Minimatch;
3853
- };
3854
- function minimatch(p, pattern, options) {
3855
- assertValidPattern(pattern);
3856
- if (!options)
3857
- options = {};
3858
- if (!options.nocomment && pattern.charAt(0) === "#") {
3859
- return false;
3860
- }
3861
- return new Minimatch(pattern, options).match(p);
3862
- }
3863
- function Minimatch(pattern, options) {
3864
- if (!(this instanceof Minimatch)) {
3865
- return new Minimatch(pattern, options);
3866
- }
3867
- assertValidPattern(pattern);
3868
- if (!options)
3869
- options = {};
3870
- pattern = pattern.trim();
3871
- if (!options.allowWindowsEscape && path8.sep !== "/") {
3872
- pattern = pattern.split(path8.sep).join("/");
3873
- }
3874
- this.options = options;
3875
- this.set = [];
3876
- this.pattern = pattern;
3877
- this.regexp = null;
3878
- this.negate = false;
3879
- this.comment = false;
3880
- this.empty = false;
3881
- this.partial = !!options.partial;
3882
- this.make();
3883
- }
3884
- Minimatch.prototype.debug = function() {
3885
- };
3886
- Minimatch.prototype.make = make;
3887
- function make() {
3888
- var pattern = this.pattern;
3889
- var options = this.options;
3890
- if (!options.nocomment && pattern.charAt(0) === "#") {
3891
- this.comment = true;
3892
- return;
3893
- }
3894
- if (!pattern) {
3895
- this.empty = true;
3896
- return;
3897
- }
3898
- this.parseNegate();
3899
- var set = this.globSet = this.braceExpand();
3900
- if (options.debug)
3901
- this.debug = function debug() {
3902
- console.error.apply(console, arguments);
3903
- };
3904
- this.debug(this.pattern, set);
3905
- set = this.globParts = set.map(function(s) {
3906
- return s.split(slashSplit);
3907
- });
3908
- this.debug(this.pattern, set);
3909
- set = set.map(function(s, si, set2) {
3910
- return s.map(this.parse, this);
3911
- }, this);
3912
- this.debug(this.pattern, set);
3913
- set = set.filter(function(s) {
3914
- return s.indexOf(false) === -1;
3915
- });
3916
- this.debug(this.pattern, set);
3917
- this.set = set;
3918
- }
3919
- Minimatch.prototype.parseNegate = parseNegate;
3920
- function parseNegate() {
3921
- var pattern = this.pattern;
3922
- var negate = false;
3923
- var options = this.options;
3924
- var negateOffset = 0;
3925
- if (options.nonegate)
3926
- return;
3927
- for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) {
3928
- negate = !negate;
3929
- negateOffset++;
3930
- }
3931
- if (negateOffset)
3932
- this.pattern = pattern.substr(negateOffset);
3933
- this.negate = negate;
3934
- }
3935
- minimatch.braceExpand = function(pattern, options) {
3936
- return braceExpand(pattern, options);
3937
- };
3938
- Minimatch.prototype.braceExpand = braceExpand;
3939
- function braceExpand(pattern, options) {
3940
- if (!options) {
3941
- if (this instanceof Minimatch) {
3942
- options = this.options;
3943
- } else {
3944
- options = {};
3945
- }
3946
- }
3947
- pattern = typeof pattern === "undefined" ? this.pattern : pattern;
3948
- assertValidPattern(pattern);
3949
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
3950
- return [pattern];
3951
- }
3952
- return expand(pattern);
3953
- }
3954
- var MAX_PATTERN_LENGTH = 1024 * 64;
3955
- var assertValidPattern = function(pattern) {
3956
- if (typeof pattern !== "string") {
3957
- throw new TypeError("invalid pattern");
3958
- }
3959
- if (pattern.length > MAX_PATTERN_LENGTH) {
3960
- throw new TypeError("pattern is too long");
3961
- }
3962
- };
3963
- Minimatch.prototype.parse = parse;
3964
- var SUBPARSE = {};
3965
- function parse(pattern, isSub) {
3966
- assertValidPattern(pattern);
3967
- var options = this.options;
3968
- if (pattern === "**") {
3969
- if (!options.noglobstar)
3970
- return GLOBSTAR;
3971
- else
3972
- pattern = "*";
3973
- }
3974
- if (pattern === "")
3975
- return "";
3976
- var re = "";
3977
- var hasMagic = !!options.nocase;
3978
- var escaping = false;
3979
- var patternListStack = [];
3980
- var negativeLists = [];
3981
- var stateChar;
3982
- var inClass = false;
3983
- var reClassStart = -1;
3984
- var classStart = -1;
3985
- var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
3986
- var self = this;
3987
- function clearStateChar() {
3988
- if (stateChar) {
3989
- switch (stateChar) {
3990
- case "*":
3991
- re += star;
3992
- hasMagic = true;
3993
- break;
3994
- case "?":
3995
- re += qmark;
3996
- hasMagic = true;
3997
- break;
3998
- default:
3999
- re += "\\" + stateChar;
4000
- break;
4001
- }
4002
- self.debug("clearStateChar %j %j", stateChar, re);
4003
- stateChar = false;
4004
- }
4005
- }
4006
- for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
4007
- this.debug("%s %s %s %j", pattern, i, re, c);
4008
- if (escaping && reSpecials[c]) {
4009
- re += "\\" + c;
4010
- escaping = false;
4011
- continue;
4012
- }
4013
- switch (c) {
4014
- case "/": {
4015
- return false;
4016
- }
4017
- case "\\":
4018
- clearStateChar();
4019
- escaping = true;
4020
- continue;
4021
- case "?":
4022
- case "*":
4023
- case "+":
4024
- case "@":
4025
- case "!":
4026
- this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c);
4027
- if (inClass) {
4028
- this.debug(" in class");
4029
- if (c === "!" && i === classStart + 1)
4030
- c = "^";
4031
- re += c;
4032
- continue;
4033
- }
4034
- self.debug("call clearStateChar %j", stateChar);
4035
- clearStateChar();
4036
- stateChar = c;
4037
- if (options.noext)
4038
- clearStateChar();
4039
- continue;
4040
- case "(":
4041
- if (inClass) {
4042
- re += "(";
4043
- continue;
4044
- }
4045
- if (!stateChar) {
4046
- re += "\\(";
4047
- continue;
4048
- }
4049
- patternListStack.push({
4050
- type: stateChar,
4051
- start: i - 1,
4052
- reStart: re.length,
4053
- open: plTypes[stateChar].open,
4054
- close: plTypes[stateChar].close
4055
- });
4056
- re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
4057
- this.debug("plType %j %j", stateChar, re);
4058
- stateChar = false;
4059
- continue;
4060
- case ")":
4061
- if (inClass || !patternListStack.length) {
4062
- re += "\\)";
4063
- continue;
4064
- }
4065
- clearStateChar();
4066
- hasMagic = true;
4067
- var pl = patternListStack.pop();
4068
- re += pl.close;
4069
- if (pl.type === "!") {
4070
- negativeLists.push(pl);
4071
- }
4072
- pl.reEnd = re.length;
4073
- continue;
4074
- case "|":
4075
- if (inClass || !patternListStack.length || escaping) {
4076
- re += "\\|";
4077
- escaping = false;
4078
- continue;
4079
- }
4080
- clearStateChar();
4081
- re += "|";
4082
- continue;
4083
- case "[":
4084
- clearStateChar();
4085
- if (inClass) {
4086
- re += "\\" + c;
4087
- continue;
4088
- }
4089
- inClass = true;
4090
- classStart = i;
4091
- reClassStart = re.length;
4092
- re += c;
4093
- continue;
4094
- case "]":
4095
- if (i === classStart + 1 || !inClass) {
4096
- re += "\\" + c;
4097
- escaping = false;
4098
- continue;
4099
- }
4100
- var cs = pattern.substring(classStart + 1, i);
4101
- try {
4102
- RegExp("[" + cs + "]");
4103
- } catch (er) {
4104
- var sp = this.parse(cs, SUBPARSE);
4105
- re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
4106
- hasMagic = hasMagic || sp[1];
4107
- inClass = false;
4108
- continue;
4109
- }
4110
- hasMagic = true;
4111
- inClass = false;
4112
- re += c;
4113
- continue;
4114
- default:
4115
- clearStateChar();
4116
- if (escaping) {
4117
- escaping = false;
4118
- } else if (reSpecials[c] && !(c === "^" && inClass)) {
4119
- re += "\\";
4120
- }
4121
- re += c;
4122
- }
4123
- }
4124
- if (inClass) {
4125
- cs = pattern.substr(classStart + 1);
4126
- sp = this.parse(cs, SUBPARSE);
4127
- re = re.substr(0, reClassStart) + "\\[" + sp[0];
4128
- hasMagic = hasMagic || sp[1];
4129
- }
4130
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
4131
- var tail = re.slice(pl.reStart + pl.open.length);
4132
- this.debug("setting tail", re, pl);
4133
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $22) {
4134
- if (!$22) {
4135
- $22 = "\\";
4136
- }
4137
- return $1 + $1 + $22 + "|";
4138
- });
4139
- this.debug("tail=%j\n %s", tail, tail, pl, re);
4140
- var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
4141
- hasMagic = true;
4142
- re = re.slice(0, pl.reStart) + t + "\\(" + tail;
4143
- }
4144
- clearStateChar();
4145
- if (escaping) {
4146
- re += "\\\\";
4147
- }
4148
- var addPatternStart = false;
4149
- switch (re.charAt(0)) {
4150
- case "[":
4151
- case ".":
4152
- case "(":
4153
- addPatternStart = true;
4154
- }
4155
- for (var n = negativeLists.length - 1; n > -1; n--) {
4156
- var nl = negativeLists[n];
4157
- var nlBefore = re.slice(0, nl.reStart);
4158
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
4159
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
4160
- var nlAfter = re.slice(nl.reEnd);
4161
- nlLast += nlAfter;
4162
- var openParensBefore = nlBefore.split("(").length - 1;
4163
- var cleanAfter = nlAfter;
4164
- for (i = 0; i < openParensBefore; i++) {
4165
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
4166
- }
4167
- nlAfter = cleanAfter;
4168
- var dollar = "";
4169
- if (nlAfter === "" && isSub !== SUBPARSE) {
4170
- dollar = "$";
4171
- }
4172
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
4173
- re = newRe;
4174
- }
4175
- if (re !== "" && hasMagic) {
4176
- re = "(?=.)" + re;
4177
- }
4178
- if (addPatternStart) {
4179
- re = patternStart + re;
4180
- }
4181
- if (isSub === SUBPARSE) {
4182
- return [re, hasMagic];
4183
- }
4184
- if (!hasMagic) {
4185
- return globUnescape(pattern);
4186
- }
4187
- var flags = options.nocase ? "i" : "";
4188
- try {
4189
- var regExp = new RegExp("^" + re + "$", flags);
4190
- } catch (er) {
4191
- return new RegExp("$.");
4192
- }
4193
- regExp._glob = pattern;
4194
- regExp._src = re;
4195
- return regExp;
4196
- }
4197
- minimatch.makeRe = function(pattern, options) {
4198
- return new Minimatch(pattern, options || {}).makeRe();
4199
- };
4200
- Minimatch.prototype.makeRe = makeRe;
4201
- function makeRe() {
4202
- if (this.regexp || this.regexp === false)
4203
- return this.regexp;
4204
- var set = this.set;
4205
- if (!set.length) {
4206
- this.regexp = false;
4207
- return this.regexp;
4208
- }
4209
- var options = this.options;
4210
- var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
4211
- var flags = options.nocase ? "i" : "";
4212
- var re = set.map(function(pattern) {
4213
- return pattern.map(function(p) {
4214
- return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src;
4215
- }).join("\\/");
4216
- }).join("|");
4217
- re = "^(?:" + re + ")$";
4218
- if (this.negate)
4219
- re = "^(?!" + re + ").*$";
4220
- try {
4221
- this.regexp = new RegExp(re, flags);
4222
- } catch (ex) {
4223
- this.regexp = false;
4224
- }
4225
- return this.regexp;
4226
- }
4227
- minimatch.match = function(list, pattern, options) {
4228
- options = options || {};
4229
- var mm = new Minimatch(pattern, options);
4230
- list = list.filter(function(f) {
4231
- return mm.match(f);
4232
- });
4233
- if (mm.options.nonull && !list.length) {
4234
- list.push(pattern);
4235
- }
4236
- return list;
4237
- };
4238
- Minimatch.prototype.match = function match2(f, partial) {
4239
- if (typeof partial === "undefined")
4240
- partial = this.partial;
4241
- this.debug("match", f, this.pattern);
4242
- if (this.comment)
4243
- return false;
4244
- if (this.empty)
4245
- return f === "";
4246
- if (f === "/" && partial)
4247
- return true;
4248
- var options = this.options;
4249
- if (path8.sep !== "/") {
4250
- f = f.split(path8.sep).join("/");
4251
- }
4252
- f = f.split(slashSplit);
4253
- this.debug(this.pattern, "split", f);
4254
- var set = this.set;
4255
- this.debug(this.pattern, "set", set);
4256
- var filename2;
4257
- var i;
4258
- for (i = f.length - 1; i >= 0; i--) {
4259
- filename2 = f[i];
4260
- if (filename2)
4261
- break;
4262
- }
4263
- for (i = 0; i < set.length; i++) {
4264
- var pattern = set[i];
4265
- var file = f;
4266
- if (options.matchBase && pattern.length === 1) {
4267
- file = [filename2];
4268
- }
4269
- var hit = this.matchOne(file, pattern, partial);
4270
- if (hit) {
4271
- if (options.flipNegate)
4272
- return true;
4273
- return !this.negate;
4274
- }
4275
- }
4276
- if (options.flipNegate)
4277
- return false;
4278
- return this.negate;
4279
- };
4280
- Minimatch.prototype.matchOne = function(file, pattern, partial) {
4281
- var options = this.options;
4282
- this.debug(
4283
- "matchOne",
4284
- { "this": this, file, pattern }
4285
- );
4286
- this.debug("matchOne", file.length, pattern.length);
4287
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4288
- this.debug("matchOne loop");
4289
- var p = pattern[pi];
4290
- var f = file[fi];
4291
- this.debug(pattern, p, f);
4292
- if (p === false)
4293
- return false;
4294
- if (p === GLOBSTAR) {
4295
- this.debug("GLOBSTAR", [pattern, p, f]);
4296
- var fr = fi;
4297
- var pr = pi + 1;
4298
- if (pr === pl) {
4299
- this.debug("** at the end");
4300
- for (; fi < fl; fi++) {
4301
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
4302
- return false;
4303
- }
4304
- return true;
4305
- }
4306
- while (fr < fl) {
4307
- var swallowee = file[fr];
4308
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
4309
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
4310
- this.debug("globstar found match!", fr, fl, swallowee);
4311
- return true;
4312
- } else {
4313
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
4314
- this.debug("dot detected!", file, fr, pattern, pr);
4315
- break;
4316
- }
4317
- this.debug("globstar swallow a segment, and continue");
4318
- fr++;
4319
- }
4320
- }
4321
- if (partial) {
4322
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
4323
- if (fr === fl)
4324
- return true;
4325
- }
4326
- return false;
4327
- }
4328
- var hit;
4329
- if (typeof p === "string") {
4330
- hit = f === p;
4331
- this.debug("string match", p, f, hit);
4332
- } else {
4333
- hit = f.match(p);
4334
- this.debug("pattern match", p, f, hit);
4335
- }
4336
- if (!hit)
4337
- return false;
4338
- }
4339
- if (fi === fl && pi === pl) {
4340
- return true;
4341
- } else if (fi === fl) {
4342
- return partial;
4343
- } else if (pi === pl) {
4344
- return fi === fl - 1 && file[fi] === "";
4345
- }
4346
- throw new Error("wtf?");
4347
- };
4348
- function globUnescape(s) {
4349
- return s.replace(/\\(.)/g, "$1");
4350
- }
4351
- function regExpEscape(s) {
4352
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
4353
- }
4354
- }
4355
- });
4356
-
4357
- // node_modules/inherits/inherits_browser.js
4358
- var require_inherits_browser = __commonJS({
4359
- "node_modules/inherits/inherits_browser.js"(exports, module) {
4360
- if (typeof Object.create === "function") {
4361
- module.exports = function inherits(ctor, superCtor) {
4362
- if (superCtor) {
4363
- ctor.super_ = superCtor;
4364
- ctor.prototype = Object.create(superCtor.prototype, {
4365
- constructor: {
4366
- value: ctor,
4367
- enumerable: false,
4368
- writable: true,
4369
- configurable: true
4370
- }
4371
- });
4372
- }
4373
- };
4374
- } else {
4375
- module.exports = function inherits(ctor, superCtor) {
4376
- if (superCtor) {
4377
- ctor.super_ = superCtor;
4378
- var TempCtor = function() {
4379
- };
4380
- TempCtor.prototype = superCtor.prototype;
4381
- ctor.prototype = new TempCtor();
4382
- ctor.prototype.constructor = ctor;
4383
- }
4384
- };
4385
- }
4386
- }
4387
- });
4388
-
4389
- // node_modules/inherits/inherits.js
4390
- var require_inherits = __commonJS({
4391
- "node_modules/inherits/inherits.js"(exports, module) {
4392
- try {
4393
- util = __require("util");
4394
- if (typeof util.inherits !== "function")
4395
- throw "";
4396
- module.exports = util.inherits;
4397
- } catch (e) {
4398
- module.exports = require_inherits_browser();
4399
- }
4400
- var util;
4401
- }
4402
- });
4403
-
4404
- // node_modules/path-is-absolute/index.js
4405
- var require_path_is_absolute = __commonJS({
4406
- "node_modules/path-is-absolute/index.js"(exports, module) {
4407
- "use strict";
4408
- function posix(path8) {
4409
- return path8.charAt(0) === "/";
4410
- }
4411
- function win32(path8) {
4412
- var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
4413
- var result = splitDeviceRe.exec(path8);
4414
- var device = result[1] || "";
4415
- var isUnc = Boolean(device && device.charAt(1) !== ":");
4416
- return Boolean(result[2] || isUnc);
4417
- }
4418
- module.exports = process.platform === "win32" ? win32 : posix;
4419
- module.exports.posix = posix;
4420
- module.exports.win32 = win32;
4421
- }
4422
- });
4423
-
4424
- // node_modules/rimraf/node_modules/glob/common.js
4425
- var require_common = __commonJS({
4426
- "node_modules/rimraf/node_modules/glob/common.js"(exports) {
4427
- exports.setopts = setopts;
4428
- exports.ownProp = ownProp;
4429
- exports.makeAbs = makeAbs;
4430
- exports.finish = finish;
4431
- exports.mark = mark;
4432
- exports.isIgnored = isIgnored;
4433
- exports.childrenIgnored = childrenIgnored;
4434
- function ownProp(obj, field) {
4435
- return Object.prototype.hasOwnProperty.call(obj, field);
4436
- }
4437
- var fs5 = __require("fs");
4438
- var path8 = __require("path");
4439
- var minimatch = require_minimatch();
4440
- var isAbsolute = require_path_is_absolute();
4441
- var Minimatch = minimatch.Minimatch;
4442
- function alphasort(a, b) {
4443
- return a.localeCompare(b, "en");
4444
- }
4445
- function setupIgnores(self, options) {
4446
- self.ignore = options.ignore || [];
4447
- if (!Array.isArray(self.ignore))
4448
- self.ignore = [self.ignore];
4449
- if (self.ignore.length) {
4450
- self.ignore = self.ignore.map(ignoreMap);
4451
- }
4452
- }
4453
- function ignoreMap(pattern) {
4454
- var gmatcher = null;
4455
- if (pattern.slice(-3) === "/**") {
4456
- var gpattern = pattern.replace(/(\/\*\*)+$/, "");
4457
- gmatcher = new Minimatch(gpattern, { dot: true });
4458
- }
4459
- return {
4460
- matcher: new Minimatch(pattern, { dot: true }),
4461
- gmatcher
4462
- };
4463
- }
4464
- function setopts(self, pattern, options) {
4465
- if (!options)
4466
- options = {};
4467
- if (options.matchBase && -1 === pattern.indexOf("/")) {
4468
- if (options.noglobstar) {
4469
- throw new Error("base matching requires globstar");
4470
- }
4471
- pattern = "**/" + pattern;
4472
- }
4473
- self.silent = !!options.silent;
4474
- self.pattern = pattern;
4475
- self.strict = options.strict !== false;
4476
- self.realpath = !!options.realpath;
4477
- self.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null);
4478
- self.follow = !!options.follow;
4479
- self.dot = !!options.dot;
4480
- self.mark = !!options.mark;
4481
- self.nodir = !!options.nodir;
4482
- if (self.nodir)
4483
- self.mark = true;
4484
- self.sync = !!options.sync;
4485
- self.nounique = !!options.nounique;
4486
- self.nonull = !!options.nonull;
4487
- self.nosort = !!options.nosort;
4488
- self.nocase = !!options.nocase;
4489
- self.stat = !!options.stat;
4490
- self.noprocess = !!options.noprocess;
4491
- self.absolute = !!options.absolute;
4492
- self.fs = options.fs || fs5;
4493
- self.maxLength = options.maxLength || Infinity;
4494
- self.cache = options.cache || /* @__PURE__ */ Object.create(null);
4495
- self.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
4496
- self.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null);
4497
- setupIgnores(self, options);
4498
- self.changedCwd = false;
4499
- var cwd = process.cwd();
4500
- if (!ownProp(options, "cwd"))
4501
- self.cwd = cwd;
4502
- else {
4503
- self.cwd = path8.resolve(options.cwd);
4504
- self.changedCwd = self.cwd !== cwd;
4505
- }
4506
- self.root = options.root || path8.resolve(self.cwd, "/");
4507
- self.root = path8.resolve(self.root);
4508
- if (process.platform === "win32")
4509
- self.root = self.root.replace(/\\/g, "/");
4510
- self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
4511
- if (process.platform === "win32")
4512
- self.cwdAbs = self.cwdAbs.replace(/\\/g, "/");
4513
- self.nomount = !!options.nomount;
4514
- options.nonegate = true;
4515
- options.nocomment = true;
4516
- options.allowWindowsEscape = false;
4517
- self.minimatch = new Minimatch(pattern, options);
4518
- self.options = self.minimatch.options;
4519
- }
4520
- function finish(self) {
4521
- var nou = self.nounique;
4522
- var all = nou ? [] : /* @__PURE__ */ Object.create(null);
4523
- for (var i = 0, l = self.matches.length; i < l; i++) {
4524
- var matches = self.matches[i];
4525
- if (!matches || Object.keys(matches).length === 0) {
4526
- if (self.nonull) {
4527
- var literal = self.minimatch.globSet[i];
4528
- if (nou)
4529
- all.push(literal);
4530
- else
4531
- all[literal] = true;
4532
- }
4533
- } else {
4534
- var m = Object.keys(matches);
4535
- if (nou)
4536
- all.push.apply(all, m);
4537
- else
4538
- m.forEach(function(m2) {
4539
- all[m2] = true;
4540
- });
4541
- }
4542
- }
4543
- if (!nou)
4544
- all = Object.keys(all);
4545
- if (!self.nosort)
4546
- all = all.sort(alphasort);
4547
- if (self.mark) {
4548
- for (var i = 0; i < all.length; i++) {
4549
- all[i] = self._mark(all[i]);
4550
- }
4551
- if (self.nodir) {
4552
- all = all.filter(function(e) {
4553
- var notDir = !/\/$/.test(e);
4554
- var c = self.cache[e] || self.cache[makeAbs(self, e)];
4555
- if (notDir && c)
4556
- notDir = c !== "DIR" && !Array.isArray(c);
4557
- return notDir;
4558
- });
4559
- }
4560
- }
4561
- if (self.ignore.length)
4562
- all = all.filter(function(m2) {
4563
- return !isIgnored(self, m2);
4564
- });
4565
- self.found = all;
4566
- }
4567
- function mark(self, p) {
4568
- var abs = makeAbs(self, p);
4569
- var c = self.cache[abs];
4570
- var m = p;
4571
- if (c) {
4572
- var isDir = c === "DIR" || Array.isArray(c);
4573
- var slash = p.slice(-1) === "/";
4574
- if (isDir && !slash)
4575
- m += "/";
4576
- else if (!isDir && slash)
4577
- m = m.slice(0, -1);
4578
- if (m !== p) {
4579
- var mabs = makeAbs(self, m);
4580
- self.statCache[mabs] = self.statCache[abs];
4581
- self.cache[mabs] = self.cache[abs];
4582
- }
4583
- }
4584
- return m;
4585
- }
4586
- function makeAbs(self, f) {
4587
- var abs = f;
4588
- if (f.charAt(0) === "/") {
4589
- abs = path8.join(self.root, f);
4590
- } else if (isAbsolute(f) || f === "") {
4591
- abs = f;
4592
- } else if (self.changedCwd) {
4593
- abs = path8.resolve(self.cwd, f);
4594
- } else {
4595
- abs = path8.resolve(f);
4596
- }
4597
- if (process.platform === "win32")
4598
- abs = abs.replace(/\\/g, "/");
4599
- return abs;
4600
- }
4601
- function isIgnored(self, path9) {
4602
- if (!self.ignore.length)
4603
- return false;
4604
- return self.ignore.some(function(item) {
4605
- return item.matcher.match(path9) || !!(item.gmatcher && item.gmatcher.match(path9));
4606
- });
4607
- }
4608
- function childrenIgnored(self, path9) {
4609
- if (!self.ignore.length)
4610
- return false;
4611
- return self.ignore.some(function(item) {
4612
- return !!(item.gmatcher && item.gmatcher.match(path9));
4613
- });
4614
- }
4615
- }
4616
- });
4617
-
4618
- // node_modules/rimraf/node_modules/glob/sync.js
4619
- var require_sync = __commonJS({
4620
- "node_modules/rimraf/node_modules/glob/sync.js"(exports, module) {
4621
- module.exports = globSync;
4622
- globSync.GlobSync = GlobSync;
4623
- var rp = require_fs();
4624
- var minimatch = require_minimatch();
4625
- var Minimatch = minimatch.Minimatch;
4626
- var Glob = require_glob().Glob;
4627
- var util = __require("util");
4628
- var path8 = __require("path");
4629
- var assert = __require("assert");
4630
- var isAbsolute = require_path_is_absolute();
4631
- var common = require_common();
4632
- var setopts = common.setopts;
4633
- var ownProp = common.ownProp;
4634
- var childrenIgnored = common.childrenIgnored;
4635
- var isIgnored = common.isIgnored;
4636
- function globSync(pattern, options) {
4637
- if (typeof options === "function" || arguments.length === 3)
4638
- throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
4639
- return new GlobSync(pattern, options).found;
4640
- }
4641
- function GlobSync(pattern, options) {
4642
- if (!pattern)
4643
- throw new Error("must provide pattern");
4644
- if (typeof options === "function" || arguments.length === 3)
4645
- throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
4646
- if (!(this instanceof GlobSync))
4647
- return new GlobSync(pattern, options);
4648
- setopts(this, pattern, options);
4649
- if (this.noprocess)
4650
- return this;
4651
- var n = this.minimatch.set.length;
4652
- this.matches = new Array(n);
4653
- for (var i = 0; i < n; i++) {
4654
- this._process(this.minimatch.set[i], i, false);
4655
- }
4656
- this._finish();
4657
- }
4658
- GlobSync.prototype._finish = function() {
4659
- assert.ok(this instanceof GlobSync);
4660
- if (this.realpath) {
4661
- var self = this;
4662
- this.matches.forEach(function(matchset, index) {
4663
- var set = self.matches[index] = /* @__PURE__ */ Object.create(null);
4664
- for (var p in matchset) {
4665
- try {
4666
- p = self._makeAbs(p);
4667
- var real = rp.realpathSync(p, self.realpathCache);
4668
- set[real] = true;
4669
- } catch (er) {
4670
- if (er.syscall === "stat")
4671
- set[self._makeAbs(p)] = true;
4672
- else
4673
- throw er;
4674
- }
4675
- }
4676
- });
4677
- }
4678
- common.finish(this);
4679
- };
4680
- GlobSync.prototype._process = function(pattern, index, inGlobStar) {
4681
- assert.ok(this instanceof GlobSync);
4682
- var n = 0;
4683
- while (typeof pattern[n] === "string") {
4684
- n++;
4685
- }
4686
- var prefix2;
4687
- switch (n) {
4688
- case pattern.length:
4689
- this._processSimple(pattern.join("/"), index);
4690
- return;
4691
- case 0:
4692
- prefix2 = null;
4693
- break;
4694
- default:
4695
- prefix2 = pattern.slice(0, n).join("/");
4696
- break;
4697
- }
4698
- var remain = pattern.slice(n);
4699
- var read;
4700
- if (prefix2 === null)
4701
- read = ".";
4702
- else if (isAbsolute(prefix2) || isAbsolute(pattern.map(function(p) {
4703
- return typeof p === "string" ? p : "[*]";
4704
- }).join("/"))) {
4705
- if (!prefix2 || !isAbsolute(prefix2))
4706
- prefix2 = "/" + prefix2;
4707
- read = prefix2;
4708
- } else
4709
- read = prefix2;
4710
- var abs = this._makeAbs(read);
4711
- if (childrenIgnored(this, read))
4712
- return;
4713
- var isGlobStar = remain[0] === minimatch.GLOBSTAR;
4714
- if (isGlobStar)
4715
- this._processGlobStar(prefix2, read, abs, remain, index, inGlobStar);
4716
- else
4717
- this._processReaddir(prefix2, read, abs, remain, index, inGlobStar);
4718
- };
4719
- GlobSync.prototype._processReaddir = function(prefix2, read, abs, remain, index, inGlobStar) {
4720
- var entries = this._readdir(abs, inGlobStar);
4721
- if (!entries)
4722
- return;
4723
- var pn = remain[0];
4724
- var negate = !!this.minimatch.negate;
4725
- var rawGlob = pn._glob;
4726
- var dotOk = this.dot || rawGlob.charAt(0) === ".";
4727
- var matchedEntries = [];
4728
- for (var i = 0; i < entries.length; i++) {
4729
- var e = entries[i];
4730
- if (e.charAt(0) !== "." || dotOk) {
4731
- var m;
4732
- if (negate && !prefix2) {
4733
- m = !e.match(pn);
4734
- } else {
4735
- m = e.match(pn);
4736
- }
4737
- if (m)
4738
- matchedEntries.push(e);
4739
- }
4740
- }
4741
- var len = matchedEntries.length;
4742
- if (len === 0)
4743
- return;
4744
- if (remain.length === 1 && !this.mark && !this.stat) {
4745
- if (!this.matches[index])
4746
- this.matches[index] = /* @__PURE__ */ Object.create(null);
4747
- for (var i = 0; i < len; i++) {
4748
- var e = matchedEntries[i];
4749
- if (prefix2) {
4750
- if (prefix2.slice(-1) !== "/")
4751
- e = prefix2 + "/" + e;
4752
- else
4753
- e = prefix2 + e;
4754
- }
4755
- if (e.charAt(0) === "/" && !this.nomount) {
4756
- e = path8.join(this.root, e);
4757
- }
4758
- this._emitMatch(index, e);
4759
- }
4760
- return;
4761
- }
4762
- remain.shift();
4763
- for (var i = 0; i < len; i++) {
4764
- var e = matchedEntries[i];
4765
- var newPattern;
4766
- if (prefix2)
4767
- newPattern = [prefix2, e];
4768
- else
4769
- newPattern = [e];
4770
- this._process(newPattern.concat(remain), index, inGlobStar);
4771
- }
4772
- };
4773
- GlobSync.prototype._emitMatch = function(index, e) {
4774
- if (isIgnored(this, e))
4775
- return;
4776
- var abs = this._makeAbs(e);
4777
- if (this.mark)
4778
- e = this._mark(e);
4779
- if (this.absolute) {
4780
- e = abs;
4781
- }
4782
- if (this.matches[index][e])
4783
- return;
4784
- if (this.nodir) {
4785
- var c = this.cache[abs];
4786
- if (c === "DIR" || Array.isArray(c))
4787
- return;
4788
- }
4789
- this.matches[index][e] = true;
4790
- if (this.stat)
4791
- this._stat(e);
4792
- };
4793
- GlobSync.prototype._readdirInGlobStar = function(abs) {
4794
- if (this.follow)
4795
- return this._readdir(abs, false);
4796
- var entries;
4797
- var lstat;
4798
- var stat;
4799
- try {
4800
- lstat = this.fs.lstatSync(abs);
4801
- } catch (er) {
4802
- if (er.code === "ENOENT") {
4803
- return null;
4804
- }
4805
- }
4806
- var isSym = lstat && lstat.isSymbolicLink();
4807
- this.symlinks[abs] = isSym;
4808
- if (!isSym && lstat && !lstat.isDirectory())
4809
- this.cache[abs] = "FILE";
4810
- else
4811
- entries = this._readdir(abs, false);
4812
- return entries;
4813
- };
4814
- GlobSync.prototype._readdir = function(abs, inGlobStar) {
4815
- var entries;
4816
- if (inGlobStar && !ownProp(this.symlinks, abs))
4817
- return this._readdirInGlobStar(abs);
4818
- if (ownProp(this.cache, abs)) {
4819
- var c = this.cache[abs];
4820
- if (!c || c === "FILE")
4821
- return null;
4822
- if (Array.isArray(c))
4823
- return c;
4824
- }
4825
- try {
4826
- return this._readdirEntries(abs, this.fs.readdirSync(abs));
4827
- } catch (er) {
4828
- this._readdirError(abs, er);
4829
- return null;
4830
- }
4831
- };
4832
- GlobSync.prototype._readdirEntries = function(abs, entries) {
4833
- if (!this.mark && !this.stat) {
4834
- for (var i = 0; i < entries.length; i++) {
4835
- var e = entries[i];
4836
- if (abs === "/")
4837
- e = abs + e;
4838
- else
4839
- e = abs + "/" + e;
4840
- this.cache[e] = true;
4841
- }
4842
- }
4843
- this.cache[abs] = entries;
4844
- return entries;
4845
- };
4846
- GlobSync.prototype._readdirError = function(f, er) {
4847
- switch (er.code) {
4848
- case "ENOTSUP":
4849
- case "ENOTDIR":
4850
- var abs = this._makeAbs(f);
4851
- this.cache[abs] = "FILE";
4852
- if (abs === this.cwdAbs) {
4853
- var error = new Error(er.code + " invalid cwd " + this.cwd);
4854
- error.path = this.cwd;
4855
- error.code = er.code;
4856
- throw error;
4857
- }
4858
- break;
4859
- case "ENOENT":
4860
- case "ELOOP":
4861
- case "ENAMETOOLONG":
4862
- case "UNKNOWN":
4863
- this.cache[this._makeAbs(f)] = false;
4864
- break;
4865
- default:
4866
- this.cache[this._makeAbs(f)] = false;
4867
- if (this.strict)
4868
- throw er;
4869
- if (!this.silent)
4870
- console.error("glob error", er);
4871
- break;
4872
- }
4873
- };
4874
- GlobSync.prototype._processGlobStar = function(prefix2, read, abs, remain, index, inGlobStar) {
4875
- var entries = this._readdir(abs, inGlobStar);
4876
- if (!entries)
4877
- return;
4878
- var remainWithoutGlobStar = remain.slice(1);
4879
- var gspref = prefix2 ? [prefix2] : [];
4880
- var noGlobStar = gspref.concat(remainWithoutGlobStar);
4881
- this._process(noGlobStar, index, false);
4882
- var len = entries.length;
4883
- var isSym = this.symlinks[abs];
4884
- if (isSym && inGlobStar)
4885
- return;
4886
- for (var i = 0; i < len; i++) {
4887
- var e = entries[i];
4888
- if (e.charAt(0) === "." && !this.dot)
4889
- continue;
4890
- var instead = gspref.concat(entries[i], remainWithoutGlobStar);
4891
- this._process(instead, index, true);
4892
- var below = gspref.concat(entries[i], remain);
4893
- this._process(below, index, true);
4894
- }
4895
- };
4896
- GlobSync.prototype._processSimple = function(prefix2, index) {
4897
- var exists = this._stat(prefix2);
4898
- if (!this.matches[index])
4899
- this.matches[index] = /* @__PURE__ */ Object.create(null);
4900
- if (!exists)
4901
- return;
4902
- if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
4903
- var trail = /[\/\\]$/.test(prefix2);
4904
- if (prefix2.charAt(0) === "/") {
4905
- prefix2 = path8.join(this.root, prefix2);
4906
- } else {
4907
- prefix2 = path8.resolve(this.root, prefix2);
4908
- if (trail)
4909
- prefix2 += "/";
4910
- }
4911
- }
4912
- if (process.platform === "win32")
4913
- prefix2 = prefix2.replace(/\\/g, "/");
4914
- this._emitMatch(index, prefix2);
4915
- };
4916
- GlobSync.prototype._stat = function(f) {
4917
- var abs = this._makeAbs(f);
4918
- var needDir = f.slice(-1) === "/";
4919
- if (f.length > this.maxLength)
4920
- return false;
4921
- if (!this.stat && ownProp(this.cache, abs)) {
4922
- var c = this.cache[abs];
4923
- if (Array.isArray(c))
4924
- c = "DIR";
4925
- if (!needDir || c === "DIR")
4926
- return c;
4927
- if (needDir && c === "FILE")
4928
- return false;
4929
- }
4930
- var exists;
4931
- var stat = this.statCache[abs];
4932
- if (!stat) {
4933
- var lstat;
4934
- try {
4935
- lstat = this.fs.lstatSync(abs);
4936
- } catch (er) {
4937
- if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
4938
- this.statCache[abs] = false;
4939
- return false;
4940
- }
4941
- }
4942
- if (lstat && lstat.isSymbolicLink()) {
4943
- try {
4944
- stat = this.fs.statSync(abs);
4945
- } catch (er) {
4946
- stat = lstat;
4947
- }
4948
- } else {
4949
- stat = lstat;
4950
- }
4951
- }
4952
- this.statCache[abs] = stat;
4953
- var c = true;
4954
- if (stat)
4955
- c = stat.isDirectory() ? "DIR" : "FILE";
4956
- this.cache[abs] = this.cache[abs] || c;
4957
- if (needDir && c === "FILE")
4958
- return false;
4959
- return c;
4960
- };
4961
- GlobSync.prototype._mark = function(p) {
4962
- return common.mark(this, p);
4963
- };
4964
- GlobSync.prototype._makeAbs = function(f) {
4965
- return common.makeAbs(this, f);
4966
- };
4967
- }
4968
- });
4969
-
4970
- // node_modules/wrappy/wrappy.js
4971
- var require_wrappy = __commonJS({
4972
- "node_modules/wrappy/wrappy.js"(exports, module) {
4973
- module.exports = wrappy;
4974
- function wrappy(fn, cb) {
4975
- if (fn && cb)
4976
- return wrappy(fn)(cb);
4977
- if (typeof fn !== "function")
4978
- throw new TypeError("need wrapper function");
4979
- Object.keys(fn).forEach(function(k) {
4980
- wrapper[k] = fn[k];
4981
- });
4982
- return wrapper;
4983
- function wrapper() {
4984
- var args = new Array(arguments.length);
4985
- for (var i = 0; i < args.length; i++) {
4986
- args[i] = arguments[i];
4987
- }
4988
- var ret = fn.apply(this, args);
4989
- var cb2 = args[args.length - 1];
4990
- if (typeof ret === "function" && ret !== cb2) {
4991
- Object.keys(cb2).forEach(function(k) {
4992
- ret[k] = cb2[k];
4993
- });
4994
- }
4995
- return ret;
4996
- }
4997
- }
4998
- }
4999
- });
5000
-
5001
- // node_modules/once/once.js
5002
- var require_once = __commonJS({
5003
- "node_modules/once/once.js"(exports, module) {
5004
- var wrappy = require_wrappy();
5005
- module.exports = wrappy(once);
5006
- module.exports.strict = wrappy(onceStrict);
5007
- once.proto = once(function() {
5008
- Object.defineProperty(Function.prototype, "once", {
5009
- value: function() {
5010
- return once(this);
5011
- },
5012
- configurable: true
5013
- });
5014
- Object.defineProperty(Function.prototype, "onceStrict", {
5015
- value: function() {
5016
- return onceStrict(this);
5017
- },
5018
- configurable: true
5019
- });
5020
- });
5021
- function once(fn) {
5022
- var f = function() {
5023
- if (f.called)
5024
- return f.value;
5025
- f.called = true;
5026
- return f.value = fn.apply(this, arguments);
5027
- };
5028
- f.called = false;
5029
- return f;
5030
- }
5031
- function onceStrict(fn) {
5032
- var f = function() {
5033
- if (f.called)
5034
- throw new Error(f.onceError);
5035
- f.called = true;
5036
- return f.value = fn.apply(this, arguments);
5037
- };
5038
- var name = fn.name || "Function wrapped with `once`";
5039
- f.onceError = name + " shouldn't be called more than once";
5040
- f.called = false;
5041
- return f;
5042
- }
5043
- }
5044
- });
5045
-
5046
- // node_modules/inflight/inflight.js
5047
- var require_inflight = __commonJS({
5048
- "node_modules/inflight/inflight.js"(exports, module) {
5049
- var wrappy = require_wrappy();
5050
- var reqs = /* @__PURE__ */ Object.create(null);
5051
- var once = require_once();
5052
- module.exports = wrappy(inflight);
5053
- function inflight(key, cb) {
5054
- if (reqs[key]) {
5055
- reqs[key].push(cb);
5056
- return null;
5057
- } else {
5058
- reqs[key] = [cb];
5059
- return makeres(key);
5060
- }
5061
- }
5062
- function makeres(key) {
5063
- return once(function RES() {
5064
- var cbs = reqs[key];
5065
- var len = cbs.length;
5066
- var args = slice(arguments);
5067
- try {
5068
- for (var i = 0; i < len; i++) {
5069
- cbs[i].apply(null, args);
5070
- }
5071
- } finally {
5072
- if (cbs.length > len) {
5073
- cbs.splice(0, len);
5074
- process.nextTick(function() {
5075
- RES.apply(null, args);
5076
- });
5077
- } else {
5078
- delete reqs[key];
5079
- }
5080
- }
5081
- });
5082
- }
5083
- function slice(args) {
5084
- var length = args.length;
5085
- var array = [];
5086
- for (var i = 0; i < length; i++)
5087
- array[i] = args[i];
5088
- return array;
5089
- }
5090
- }
5091
- });
5092
-
5093
- // node_modules/rimraf/node_modules/glob/glob.js
5094
- var require_glob = __commonJS({
5095
- "node_modules/rimraf/node_modules/glob/glob.js"(exports, module) {
5096
- module.exports = glob;
5097
- var rp = require_fs();
5098
- var minimatch = require_minimatch();
5099
- var Minimatch = minimatch.Minimatch;
5100
- var inherits = require_inherits();
5101
- var EE = __require("events").EventEmitter;
5102
- var path8 = __require("path");
5103
- var assert = __require("assert");
5104
- var isAbsolute = require_path_is_absolute();
5105
- var globSync = require_sync();
5106
- var common = require_common();
5107
- var setopts = common.setopts;
5108
- var ownProp = common.ownProp;
5109
- var inflight = require_inflight();
5110
- var util = __require("util");
5111
- var childrenIgnored = common.childrenIgnored;
5112
- var isIgnored = common.isIgnored;
5113
- var once = require_once();
5114
- function glob(pattern, options, cb) {
5115
- if (typeof options === "function")
5116
- cb = options, options = {};
5117
- if (!options)
5118
- options = {};
5119
- if (options.sync) {
5120
- if (cb)
5121
- throw new TypeError("callback provided to sync glob");
5122
- return globSync(pattern, options);
5123
- }
5124
- return new Glob(pattern, options, cb);
5125
- }
5126
- glob.sync = globSync;
5127
- var GlobSync = glob.GlobSync = globSync.GlobSync;
5128
- glob.glob = glob;
5129
- function extend(origin, add) {
5130
- if (add === null || typeof add !== "object") {
5131
- return origin;
5132
- }
5133
- var keys = Object.keys(add);
5134
- var i = keys.length;
5135
- while (i--) {
5136
- origin[keys[i]] = add[keys[i]];
5137
- }
5138
- return origin;
5139
- }
5140
- glob.hasMagic = function(pattern, options_) {
5141
- var options = extend({}, options_);
5142
- options.noprocess = true;
5143
- var g = new Glob(pattern, options);
5144
- var set = g.minimatch.set;
5145
- if (!pattern)
5146
- return false;
5147
- if (set.length > 1)
5148
- return true;
5149
- for (var j = 0; j < set[0].length; j++) {
5150
- if (typeof set[0][j] !== "string")
5151
- return true;
5152
- }
5153
- return false;
5154
- };
5155
- glob.Glob = Glob;
5156
- inherits(Glob, EE);
5157
- function Glob(pattern, options, cb) {
5158
- if (typeof options === "function") {
5159
- cb = options;
5160
- options = null;
5161
- }
5162
- if (options && options.sync) {
5163
- if (cb)
5164
- throw new TypeError("callback provided to sync glob");
5165
- return new GlobSync(pattern, options);
5166
- }
5167
- if (!(this instanceof Glob))
5168
- return new Glob(pattern, options, cb);
5169
- setopts(this, pattern, options);
5170
- this._didRealPath = false;
5171
- var n = this.minimatch.set.length;
5172
- this.matches = new Array(n);
5173
- if (typeof cb === "function") {
5174
- cb = once(cb);
5175
- this.on("error", cb);
5176
- this.on("end", function(matches) {
5177
- cb(null, matches);
5178
- });
5179
- }
5180
- var self = this;
5181
- this._processing = 0;
5182
- this._emitQueue = [];
5183
- this._processQueue = [];
5184
- this.paused = false;
5185
- if (this.noprocess)
5186
- return this;
5187
- if (n === 0)
5188
- return done();
5189
- var sync = true;
5190
- for (var i = 0; i < n; i++) {
5191
- this._process(this.minimatch.set[i], i, false, done);
5192
- }
5193
- sync = false;
5194
- function done() {
5195
- --self._processing;
5196
- if (self._processing <= 0) {
5197
- if (sync) {
5198
- process.nextTick(function() {
5199
- self._finish();
5200
- });
5201
- } else {
5202
- self._finish();
5203
- }
5204
- }
5205
- }
5206
- }
5207
- Glob.prototype._finish = function() {
5208
- assert(this instanceof Glob);
5209
- if (this.aborted)
5210
- return;
5211
- if (this.realpath && !this._didRealpath)
5212
- return this._realpath();
5213
- common.finish(this);
5214
- this.emit("end", this.found);
5215
- };
5216
- Glob.prototype._realpath = function() {
5217
- if (this._didRealpath)
5218
- return;
5219
- this._didRealpath = true;
5220
- var n = this.matches.length;
5221
- if (n === 0)
5222
- return this._finish();
5223
- var self = this;
5224
- for (var i = 0; i < this.matches.length; i++)
5225
- this._realpathSet(i, next);
5226
- function next() {
5227
- if (--n === 0)
5228
- self._finish();
5229
- }
5230
- };
5231
- Glob.prototype._realpathSet = function(index, cb) {
5232
- var matchset = this.matches[index];
5233
- if (!matchset)
5234
- return cb();
5235
- var found = Object.keys(matchset);
5236
- var self = this;
5237
- var n = found.length;
5238
- if (n === 0)
5239
- return cb();
5240
- var set = this.matches[index] = /* @__PURE__ */ Object.create(null);
5241
- found.forEach(function(p, i) {
5242
- p = self._makeAbs(p);
5243
- rp.realpath(p, self.realpathCache, function(er, real) {
5244
- if (!er)
5245
- set[real] = true;
5246
- else if (er.syscall === "stat")
5247
- set[p] = true;
5248
- else
5249
- self.emit("error", er);
5250
- if (--n === 0) {
5251
- self.matches[index] = set;
5252
- cb();
5253
- }
5254
- });
5255
- });
5256
- };
5257
- Glob.prototype._mark = function(p) {
5258
- return common.mark(this, p);
5259
- };
5260
- Glob.prototype._makeAbs = function(f) {
5261
- return common.makeAbs(this, f);
5262
- };
5263
- Glob.prototype.abort = function() {
5264
- this.aborted = true;
5265
- this.emit("abort");
5266
- };
5267
- Glob.prototype.pause = function() {
5268
- if (!this.paused) {
5269
- this.paused = true;
5270
- this.emit("pause");
5271
- }
5272
- };
5273
- Glob.prototype.resume = function() {
5274
- if (this.paused) {
5275
- this.emit("resume");
5276
- this.paused = false;
5277
- if (this._emitQueue.length) {
5278
- var eq = this._emitQueue.slice(0);
5279
- this._emitQueue.length = 0;
5280
- for (var i = 0; i < eq.length; i++) {
5281
- var e = eq[i];
5282
- this._emitMatch(e[0], e[1]);
5283
- }
5284
- }
5285
- if (this._processQueue.length) {
5286
- var pq = this._processQueue.slice(0);
5287
- this._processQueue.length = 0;
5288
- for (var i = 0; i < pq.length; i++) {
5289
- var p = pq[i];
5290
- this._processing--;
5291
- this._process(p[0], p[1], p[2], p[3]);
5292
- }
5293
- }
5294
- }
5295
- };
5296
- Glob.prototype._process = function(pattern, index, inGlobStar, cb) {
5297
- assert(this instanceof Glob);
5298
- assert(typeof cb === "function");
5299
- if (this.aborted)
5300
- return;
5301
- this._processing++;
5302
- if (this.paused) {
5303
- this._processQueue.push([pattern, index, inGlobStar, cb]);
5304
- return;
5305
- }
5306
- var n = 0;
5307
- while (typeof pattern[n] === "string") {
5308
- n++;
5309
- }
5310
- var prefix2;
5311
- switch (n) {
5312
- case pattern.length:
5313
- this._processSimple(pattern.join("/"), index, cb);
5314
- return;
5315
- case 0:
5316
- prefix2 = null;
5317
- break;
5318
- default:
5319
- prefix2 = pattern.slice(0, n).join("/");
5320
- break;
5321
- }
5322
- var remain = pattern.slice(n);
5323
- var read;
5324
- if (prefix2 === null)
5325
- read = ".";
5326
- else if (isAbsolute(prefix2) || isAbsolute(pattern.map(function(p) {
5327
- return typeof p === "string" ? p : "[*]";
5328
- }).join("/"))) {
5329
- if (!prefix2 || !isAbsolute(prefix2))
5330
- prefix2 = "/" + prefix2;
5331
- read = prefix2;
5332
- } else
5333
- read = prefix2;
5334
- var abs = this._makeAbs(read);
5335
- if (childrenIgnored(this, read))
5336
- return cb();
5337
- var isGlobStar = remain[0] === minimatch.GLOBSTAR;
5338
- if (isGlobStar)
5339
- this._processGlobStar(prefix2, read, abs, remain, index, inGlobStar, cb);
5340
- else
5341
- this._processReaddir(prefix2, read, abs, remain, index, inGlobStar, cb);
5342
- };
5343
- Glob.prototype._processReaddir = function(prefix2, read, abs, remain, index, inGlobStar, cb) {
5344
- var self = this;
5345
- this._readdir(abs, inGlobStar, function(er, entries) {
5346
- return self._processReaddir2(prefix2, read, abs, remain, index, inGlobStar, entries, cb);
5347
- });
5348
- };
5349
- Glob.prototype._processReaddir2 = function(prefix2, read, abs, remain, index, inGlobStar, entries, cb) {
5350
- if (!entries)
5351
- return cb();
5352
- var pn = remain[0];
5353
- var negate = !!this.minimatch.negate;
5354
- var rawGlob = pn._glob;
5355
- var dotOk = this.dot || rawGlob.charAt(0) === ".";
5356
- var matchedEntries = [];
5357
- for (var i = 0; i < entries.length; i++) {
5358
- var e = entries[i];
5359
- if (e.charAt(0) !== "." || dotOk) {
5360
- var m;
5361
- if (negate && !prefix2) {
5362
- m = !e.match(pn);
5363
- } else {
5364
- m = e.match(pn);
5365
- }
5366
- if (m)
5367
- matchedEntries.push(e);
5368
- }
5369
- }
5370
- var len = matchedEntries.length;
5371
- if (len === 0)
5372
- return cb();
5373
- if (remain.length === 1 && !this.mark && !this.stat) {
5374
- if (!this.matches[index])
5375
- this.matches[index] = /* @__PURE__ */ Object.create(null);
5376
- for (var i = 0; i < len; i++) {
5377
- var e = matchedEntries[i];
5378
- if (prefix2) {
5379
- if (prefix2 !== "/")
5380
- e = prefix2 + "/" + e;
5381
- else
5382
- e = prefix2 + e;
5383
- }
5384
- if (e.charAt(0) === "/" && !this.nomount) {
5385
- e = path8.join(this.root, e);
5386
- }
5387
- this._emitMatch(index, e);
5388
- }
5389
- return cb();
5390
- }
5391
- remain.shift();
5392
- for (var i = 0; i < len; i++) {
5393
- var e = matchedEntries[i];
5394
- var newPattern;
5395
- if (prefix2) {
5396
- if (prefix2 !== "/")
5397
- e = prefix2 + "/" + e;
5398
- else
5399
- e = prefix2 + e;
5400
- }
5401
- this._process([e].concat(remain), index, inGlobStar, cb);
5402
- }
5403
- cb();
5404
- };
5405
- Glob.prototype._emitMatch = function(index, e) {
5406
- if (this.aborted)
5407
- return;
5408
- if (isIgnored(this, e))
5409
- return;
5410
- if (this.paused) {
5411
- this._emitQueue.push([index, e]);
5412
- return;
5413
- }
5414
- var abs = isAbsolute(e) ? e : this._makeAbs(e);
5415
- if (this.mark)
5416
- e = this._mark(e);
5417
- if (this.absolute)
5418
- e = abs;
5419
- if (this.matches[index][e])
5420
- return;
5421
- if (this.nodir) {
5422
- var c = this.cache[abs];
5423
- if (c === "DIR" || Array.isArray(c))
5424
- return;
5425
- }
5426
- this.matches[index][e] = true;
5427
- var st = this.statCache[abs];
5428
- if (st)
5429
- this.emit("stat", e, st);
5430
- this.emit("match", e);
5431
- };
5432
- Glob.prototype._readdirInGlobStar = function(abs, cb) {
5433
- if (this.aborted)
5434
- return;
5435
- if (this.follow)
5436
- return this._readdir(abs, false, cb);
5437
- var lstatkey = "lstat\0" + abs;
5438
- var self = this;
5439
- var lstatcb = inflight(lstatkey, lstatcb_);
5440
- if (lstatcb)
5441
- self.fs.lstat(abs, lstatcb);
5442
- function lstatcb_(er, lstat) {
5443
- if (er && er.code === "ENOENT")
5444
- return cb();
5445
- var isSym = lstat && lstat.isSymbolicLink();
5446
- self.symlinks[abs] = isSym;
5447
- if (!isSym && lstat && !lstat.isDirectory()) {
5448
- self.cache[abs] = "FILE";
5449
- cb();
5450
- } else
5451
- self._readdir(abs, false, cb);
5452
- }
5453
- };
5454
- Glob.prototype._readdir = function(abs, inGlobStar, cb) {
5455
- if (this.aborted)
5456
- return;
5457
- cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb);
5458
- if (!cb)
5459
- return;
5460
- if (inGlobStar && !ownProp(this.symlinks, abs))
5461
- return this._readdirInGlobStar(abs, cb);
5462
- if (ownProp(this.cache, abs)) {
5463
- var c = this.cache[abs];
5464
- if (!c || c === "FILE")
5465
- return cb();
5466
- if (Array.isArray(c))
5467
- return cb(null, c);
5468
- }
5469
- var self = this;
5470
- self.fs.readdir(abs, readdirCb(this, abs, cb));
5471
- };
5472
- function readdirCb(self, abs, cb) {
5473
- return function(er, entries) {
5474
- if (er)
5475
- self._readdirError(abs, er, cb);
5476
- else
5477
- self._readdirEntries(abs, entries, cb);
5478
- };
5479
- }
5480
- Glob.prototype._readdirEntries = function(abs, entries, cb) {
5481
- if (this.aborted)
5482
- return;
5483
- if (!this.mark && !this.stat) {
5484
- for (var i = 0; i < entries.length; i++) {
5485
- var e = entries[i];
5486
- if (abs === "/")
5487
- e = abs + e;
5488
- else
5489
- e = abs + "/" + e;
5490
- this.cache[e] = true;
5491
- }
5492
- }
5493
- this.cache[abs] = entries;
5494
- return cb(null, entries);
5495
- };
5496
- Glob.prototype._readdirError = function(f, er, cb) {
5497
- if (this.aborted)
5498
- return;
5499
- switch (er.code) {
5500
- case "ENOTSUP":
5501
- case "ENOTDIR":
5502
- var abs = this._makeAbs(f);
5503
- this.cache[abs] = "FILE";
5504
- if (abs === this.cwdAbs) {
5505
- var error = new Error(er.code + " invalid cwd " + this.cwd);
5506
- error.path = this.cwd;
5507
- error.code = er.code;
5508
- this.emit("error", error);
5509
- this.abort();
5510
- }
5511
- break;
5512
- case "ENOENT":
5513
- case "ELOOP":
5514
- case "ENAMETOOLONG":
5515
- case "UNKNOWN":
5516
- this.cache[this._makeAbs(f)] = false;
5517
- break;
5518
- default:
5519
- this.cache[this._makeAbs(f)] = false;
5520
- if (this.strict) {
5521
- this.emit("error", er);
5522
- this.abort();
5523
- }
5524
- if (!this.silent)
5525
- console.error("glob error", er);
5526
- break;
5527
- }
5528
- return cb();
5529
- };
5530
- Glob.prototype._processGlobStar = function(prefix2, read, abs, remain, index, inGlobStar, cb) {
5531
- var self = this;
5532
- this._readdir(abs, inGlobStar, function(er, entries) {
5533
- self._processGlobStar2(prefix2, read, abs, remain, index, inGlobStar, entries, cb);
5534
- });
5535
- };
5536
- Glob.prototype._processGlobStar2 = function(prefix2, read, abs, remain, index, inGlobStar, entries, cb) {
5537
- if (!entries)
5538
- return cb();
5539
- var remainWithoutGlobStar = remain.slice(1);
5540
- var gspref = prefix2 ? [prefix2] : [];
5541
- var noGlobStar = gspref.concat(remainWithoutGlobStar);
5542
- this._process(noGlobStar, index, false, cb);
5543
- var isSym = this.symlinks[abs];
5544
- var len = entries.length;
5545
- if (isSym && inGlobStar)
5546
- return cb();
5547
- for (var i = 0; i < len; i++) {
5548
- var e = entries[i];
5549
- if (e.charAt(0) === "." && !this.dot)
5550
- continue;
5551
- var instead = gspref.concat(entries[i], remainWithoutGlobStar);
5552
- this._process(instead, index, true, cb);
5553
- var below = gspref.concat(entries[i], remain);
5554
- this._process(below, index, true, cb);
5555
- }
5556
- cb();
5557
- };
5558
- Glob.prototype._processSimple = function(prefix2, index, cb) {
5559
- var self = this;
5560
- this._stat(prefix2, function(er, exists) {
5561
- self._processSimple2(prefix2, index, er, exists, cb);
5562
- });
5563
- };
5564
- Glob.prototype._processSimple2 = function(prefix2, index, er, exists, cb) {
5565
- if (!this.matches[index])
5566
- this.matches[index] = /* @__PURE__ */ Object.create(null);
5567
- if (!exists)
5568
- return cb();
5569
- if (prefix2 && isAbsolute(prefix2) && !this.nomount) {
5570
- var trail = /[\/\\]$/.test(prefix2);
5571
- if (prefix2.charAt(0) === "/") {
5572
- prefix2 = path8.join(this.root, prefix2);
5573
- } else {
5574
- prefix2 = path8.resolve(this.root, prefix2);
5575
- if (trail)
5576
- prefix2 += "/";
5577
- }
5578
- }
5579
- if (process.platform === "win32")
5580
- prefix2 = prefix2.replace(/\\/g, "/");
5581
- this._emitMatch(index, prefix2);
5582
- cb();
5583
- };
5584
- Glob.prototype._stat = function(f, cb) {
5585
- var abs = this._makeAbs(f);
5586
- var needDir = f.slice(-1) === "/";
5587
- if (f.length > this.maxLength)
5588
- return cb();
5589
- if (!this.stat && ownProp(this.cache, abs)) {
5590
- var c = this.cache[abs];
5591
- if (Array.isArray(c))
5592
- c = "DIR";
5593
- if (!needDir || c === "DIR")
5594
- return cb(null, c);
5595
- if (needDir && c === "FILE")
5596
- return cb();
5597
- }
5598
- var exists;
5599
- var stat = this.statCache[abs];
5600
- if (stat !== void 0) {
5601
- if (stat === false)
5602
- return cb(null, stat);
5603
- else {
5604
- var type = stat.isDirectory() ? "DIR" : "FILE";
5605
- if (needDir && type === "FILE")
5606
- return cb();
5607
- else
5608
- return cb(null, type, stat);
5609
- }
5610
- }
5611
- var self = this;
5612
- var statcb = inflight("stat\0" + abs, lstatcb_);
5613
- if (statcb)
5614
- self.fs.lstat(abs, statcb);
5615
- function lstatcb_(er, lstat) {
5616
- if (lstat && lstat.isSymbolicLink()) {
5617
- return self.fs.stat(abs, function(er2, stat2) {
5618
- if (er2)
5619
- self._stat2(f, abs, null, lstat, cb);
5620
- else
5621
- self._stat2(f, abs, er2, stat2, cb);
5622
- });
5623
- } else {
5624
- self._stat2(f, abs, er, lstat, cb);
5625
- }
5626
- }
5627
- };
5628
- Glob.prototype._stat2 = function(f, abs, er, stat, cb) {
5629
- if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
5630
- this.statCache[abs] = false;
5631
- return cb();
5632
- }
5633
- var needDir = f.slice(-1) === "/";
5634
- this.statCache[abs] = stat;
5635
- if (abs.slice(-1) === "/" && stat && !stat.isDirectory())
5636
- return cb(null, false, stat);
5637
- var c = true;
5638
- if (stat)
5639
- c = stat.isDirectory() ? "DIR" : "FILE";
5640
- this.cache[abs] = this.cache[abs] || c;
5641
- if (needDir && c === "FILE")
5642
- return cb();
5643
- return cb(null, c, stat);
5644
- };
5645
- }
5646
- });
5647
-
5648
- // node_modules/rimraf/rimraf.js
5649
- var require_rimraf = __commonJS({
5650
- "node_modules/rimraf/rimraf.js"(exports, module) {
5651
- var assert = __require("assert");
5652
- var path8 = __require("path");
5653
- var fs5 = __require("fs");
5654
- var glob = void 0;
5655
- try {
5656
- glob = require_glob();
5657
- } catch (_err) {
5658
- }
5659
- var defaultGlobOpts = {
5660
- nosort: true,
5661
- silent: true
5662
- };
5663
- var timeout = 0;
5664
- var isWindows = process.platform === "win32";
5665
- var defaults = (options) => {
5666
- const methods = [
5667
- "unlink",
5668
- "chmod",
5669
- "stat",
5670
- "lstat",
5671
- "rmdir",
5672
- "readdir"
5673
- ];
5674
- methods.forEach((m) => {
5675
- options[m] = options[m] || fs5[m];
5676
- m = m + "Sync";
5677
- options[m] = options[m] || fs5[m];
5678
- });
5679
- options.maxBusyTries = options.maxBusyTries || 3;
5680
- options.emfileWait = options.emfileWait || 1e3;
5681
- if (options.glob === false) {
5682
- options.disableGlob = true;
5683
- }
5684
- if (options.disableGlob !== true && glob === void 0) {
5685
- throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");
5686
- }
5687
- options.disableGlob = options.disableGlob || false;
5688
- options.glob = options.glob || defaultGlobOpts;
5689
- };
5690
- var rimraf = (p, options, cb) => {
5691
- if (typeof options === "function") {
5692
- cb = options;
5693
- options = {};
5694
- }
5695
- assert(p, "rimraf: missing path");
5696
- assert.equal(typeof p, "string", "rimraf: path should be a string");
5697
- assert.equal(typeof cb, "function", "rimraf: callback function required");
5698
- assert(options, "rimraf: invalid options argument provided");
5699
- assert.equal(typeof options, "object", "rimraf: options should be object");
5700
- defaults(options);
5701
- let busyTries = 0;
5702
- let errState = null;
5703
- let n = 0;
5704
- const next = (er) => {
5705
- errState = errState || er;
5706
- if (--n === 0)
5707
- cb(errState);
5708
- };
5709
- const afterGlob = (er, results) => {
5710
- if (er)
5711
- return cb(er);
5712
- n = results.length;
5713
- if (n === 0)
5714
- return cb();
5715
- results.forEach((p2) => {
5716
- const CB = (er2) => {
5717
- if (er2) {
5718
- if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) {
5719
- busyTries++;
5720
- return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100);
5721
- }
5722
- if (er2.code === "EMFILE" && timeout < options.emfileWait) {
5723
- return setTimeout(() => rimraf_(p2, options, CB), timeout++);
5724
- }
5725
- if (er2.code === "ENOENT")
5726
- er2 = null;
5727
- }
5728
- timeout = 0;
5729
- next(er2);
5730
- };
5731
- rimraf_(p2, options, CB);
5732
- });
5733
- };
5734
- if (options.disableGlob || !glob.hasMagic(p))
5735
- return afterGlob(null, [p]);
5736
- options.lstat(p, (er, stat) => {
5737
- if (!er)
5738
- return afterGlob(null, [p]);
5739
- glob(p, options.glob, afterGlob);
5740
- });
5741
- };
5742
- var rimraf_ = (p, options, cb) => {
5743
- assert(p);
5744
- assert(options);
5745
- assert(typeof cb === "function");
5746
- options.lstat(p, (er, st) => {
5747
- if (er && er.code === "ENOENT")
5748
- return cb(null);
5749
- if (er && er.code === "EPERM" && isWindows)
5750
- fixWinEPERM(p, options, er, cb);
5751
- if (st && st.isDirectory())
5752
- return rmdir(p, options, er, cb);
5753
- options.unlink(p, (er2) => {
5754
- if (er2) {
5755
- if (er2.code === "ENOENT")
5756
- return cb(null);
5757
- if (er2.code === "EPERM")
5758
- return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb);
5759
- if (er2.code === "EISDIR")
5760
- return rmdir(p, options, er2, cb);
5761
- }
5762
- return cb(er2);
5763
- });
5764
- });
5765
- };
5766
- var fixWinEPERM = (p, options, er, cb) => {
5767
- assert(p);
5768
- assert(options);
5769
- assert(typeof cb === "function");
5770
- options.chmod(p, 438, (er2) => {
5771
- if (er2)
5772
- cb(er2.code === "ENOENT" ? null : er);
5773
- else
5774
- options.stat(p, (er3, stats) => {
5775
- if (er3)
5776
- cb(er3.code === "ENOENT" ? null : er);
5777
- else if (stats.isDirectory())
5778
- rmdir(p, options, er, cb);
5779
- else
5780
- options.unlink(p, cb);
5781
- });
5782
- });
5783
- };
5784
- var fixWinEPERMSync = (p, options, er) => {
5785
- assert(p);
5786
- assert(options);
5787
- try {
5788
- options.chmodSync(p, 438);
5789
- } catch (er2) {
5790
- if (er2.code === "ENOENT")
5791
- return;
5792
- else
5793
- throw er;
5794
- }
5795
- let stats;
5796
- try {
5797
- stats = options.statSync(p);
5798
- } catch (er3) {
5799
- if (er3.code === "ENOENT")
5800
- return;
5801
- else
5802
- throw er;
5803
- }
5804
- if (stats.isDirectory())
5805
- rmdirSync(p, options, er);
5806
- else
5807
- options.unlinkSync(p);
5808
- };
5809
- var rmdir = (p, options, originalEr, cb) => {
5810
- assert(p);
5811
- assert(options);
5812
- assert(typeof cb === "function");
5813
- options.rmdir(p, (er) => {
5814
- if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
5815
- rmkids(p, options, cb);
5816
- else if (er && er.code === "ENOTDIR")
5817
- cb(originalEr);
5818
- else
5819
- cb(er);
5820
- });
5821
- };
5822
- var rmkids = (p, options, cb) => {
5823
- assert(p);
5824
- assert(options);
5825
- assert(typeof cb === "function");
5826
- options.readdir(p, (er, files) => {
5827
- if (er)
5828
- return cb(er);
5829
- let n = files.length;
5830
- if (n === 0)
5831
- return options.rmdir(p, cb);
5832
- let errState;
5833
- files.forEach((f) => {
5834
- rimraf(path8.join(p, f), options, (er2) => {
5835
- if (errState)
5836
- return;
5837
- if (er2)
5838
- return cb(errState = er2);
5839
- if (--n === 0)
5840
- options.rmdir(p, cb);
5841
- });
5842
- });
5843
- });
5844
- };
5845
- var rimrafSync = (p, options) => {
5846
- options = options || {};
5847
- defaults(options);
5848
- assert(p, "rimraf: missing path");
5849
- assert.equal(typeof p, "string", "rimraf: path should be a string");
5850
- assert(options, "rimraf: missing options");
5851
- assert.equal(typeof options, "object", "rimraf: options should be object");
5852
- let results;
5853
- if (options.disableGlob || !glob.hasMagic(p)) {
5854
- results = [p];
5855
- } else {
5856
- try {
5857
- options.lstatSync(p);
5858
- results = [p];
5859
- } catch (er) {
5860
- results = glob.sync(p, options.glob);
5861
- }
5862
- }
5863
- if (!results.length)
5864
- return;
5865
- for (let i = 0; i < results.length; i++) {
5866
- const p2 = results[i];
5867
- let st;
5868
- try {
5869
- st = options.lstatSync(p2);
5870
- } catch (er) {
5871
- if (er.code === "ENOENT")
5872
- return;
5873
- if (er.code === "EPERM" && isWindows)
5874
- fixWinEPERMSync(p2, options, er);
5875
- }
5876
- try {
5877
- if (st && st.isDirectory())
5878
- rmdirSync(p2, options, null);
5879
- else
5880
- options.unlinkSync(p2);
5881
- } catch (er) {
5882
- if (er.code === "ENOENT")
5883
- return;
5884
- if (er.code === "EPERM")
5885
- return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er);
5886
- if (er.code !== "EISDIR")
5887
- throw er;
5888
- rmdirSync(p2, options, er);
5889
- }
5890
- }
5891
- };
5892
- var rmdirSync = (p, options, originalEr) => {
5893
- assert(p);
5894
- assert(options);
5895
- try {
5896
- options.rmdirSync(p);
5897
- } catch (er) {
5898
- if (er.code === "ENOENT")
5899
- return;
5900
- if (er.code === "ENOTDIR")
5901
- throw originalEr;
5902
- if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
5903
- rmkidsSync(p, options);
5904
- }
5905
- };
5906
- var rmkidsSync = (p, options) => {
5907
- assert(p);
5908
- assert(options);
5909
- options.readdirSync(p).forEach((f) => rimrafSync(path8.join(p, f), options));
5910
- const retries = isWindows ? 100 : 1;
5911
- let i = 0;
5912
- do {
5913
- let threw = true;
5914
- try {
5915
- const ret = options.rmdirSync(p, options);
5916
- threw = false;
5917
- return ret;
5918
- } finally {
5919
- if (++i < retries && threw)
5920
- continue;
5921
- }
5922
- } while (true);
5923
- };
5924
- module.exports = rimraf;
5925
- rimraf.sync = rimrafSync;
5926
- }
5927
- });
5928
-
5929
3271
  // node_modules/tmp/lib/tmp.js
5930
3272
  var require_tmp = __commonJS({
5931
3273
  "node_modules/tmp/lib/tmp.js"(exports, module) {
@@ -5934,7 +3276,6 @@ var require_tmp = __commonJS({
5934
3276
  var path8 = __require("path");
5935
3277
  var crypto2 = __require("crypto");
5936
3278
  var _c = { fs: fs5.constants, os: os3.constants };
5937
- var rimraf = require_rimraf();
5938
3279
  var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
5939
3280
  var TEMPLATE_PATTERN = /XXXXXX/;
5940
3281
  var DEFAULT_TRIES = 3;
@@ -5947,8 +3288,13 @@ var require_tmp = __commonJS({
5947
3288
  var EXIT = "exit";
5948
3289
  var _removeObjects = [];
5949
3290
  var FN_RMDIR_SYNC = fs5.rmdirSync.bind(fs5);
5950
- var FN_RIMRAF_SYNC = rimraf.sync;
5951
3291
  var _gracefulCleanup = false;
3292
+ function rimraf(dirPath, callback) {
3293
+ return fs5.rm(dirPath, { recursive: true }, callback);
3294
+ }
3295
+ function FN_RIMRAF_SYNC(dirPath) {
3296
+ return fs5.rmSync(dirPath, { recursive: true });
3297
+ }
5952
3298
  function tmpName(options, callback) {
5953
3299
  const args = _parseArguments(options, callback), opts = args[0], cb = args[1];
5954
3300
  try {
@@ -6189,23 +3535,16 @@ var require_tmp = __commonJS({
6189
3535
  options.dir = _isUndefined(options.dir) ? "" : path8.relative(tmpDir, _resolvePath(options.dir, tmpDir));
6190
3536
  options.template = _isUndefined(options.template) ? void 0 : path8.relative(tmpDir, _resolvePath(options.template, tmpDir));
6191
3537
  options.template = _isBlank(options.template) ? void 0 : path8.relative(options.dir, options.template);
6192
- options.name = _isUndefined(options.name) ? void 0 : _sanitizeName(options.name);
3538
+ options.name = _isUndefined(options.name) ? void 0 : options.name;
6193
3539
  options.prefix = _isUndefined(options.prefix) ? "" : options.prefix;
6194
3540
  options.postfix = _isUndefined(options.postfix) ? "" : options.postfix;
6195
3541
  }
6196
3542
  function _resolvePath(name, tmpDir) {
6197
- const sanitizedName = _sanitizeName(name);
6198
- if (sanitizedName.startsWith(tmpDir)) {
6199
- return path8.resolve(sanitizedName);
3543
+ if (name.startsWith(tmpDir)) {
3544
+ return path8.resolve(name);
6200
3545
  } else {
6201
- return path8.resolve(path8.join(tmpDir, sanitizedName));
6202
- }
6203
- }
6204
- function _sanitizeName(name) {
6205
- if (_isBlank(name)) {
6206
- return name;
3546
+ return path8.resolve(path8.join(tmpDir, name));
6207
3547
  }
6208
- return name.replace(/["']/g, "");
6209
3548
  }
6210
3549
  function _assertIsRelative(name, option, tmpDir) {
6211
3550
  if (option === "name") {
@@ -6236,7 +3575,7 @@ var require_tmp = __commonJS({
6236
3575
  _gracefulCleanup = true;
6237
3576
  }
6238
3577
  function _getTmpDir(options) {
6239
- return path8.resolve(_sanitizeName(options && options.tmpdir || os3.tmpdir()));
3578
+ return path8.resolve(options && options.tmpdir || os3.tmpdir());
6240
3579
  }
6241
3580
  process.addListener(EXIT, _garbageCollector);
6242
3581
  Object.defineProperty(module.exports, "tmpdir", {