pnpm 6.27.2 → 6.29.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/pnpx.cjs CHANGED
@@ -381,15 +381,2646 @@ var require_lib2 = __commonJS({
381
381
  }
382
382
  });
383
383
 
384
- // ../../node_modules/.pnpm/@zkochan+rimraf@2.1.1/node_modules/@zkochan/rimraf/index.js
384
+ // ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js
385
+ var require_old = __commonJS({
386
+ "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) {
387
+ var pathModule = require("path");
388
+ var isWindows = process.platform === "win32";
389
+ var fs = require("fs");
390
+ var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
391
+ function rethrow() {
392
+ var callback;
393
+ if (DEBUG) {
394
+ var backtrace = new Error();
395
+ callback = debugCallback;
396
+ } else
397
+ callback = missingCallback;
398
+ return callback;
399
+ function debugCallback(err) {
400
+ if (err) {
401
+ backtrace.message = err.message;
402
+ err = backtrace;
403
+ missingCallback(err);
404
+ }
405
+ }
406
+ function missingCallback(err) {
407
+ if (err) {
408
+ if (process.throwDeprecation)
409
+ throw err;
410
+ else if (!process.noDeprecation) {
411
+ var msg = "fs: missing callback " + (err.stack || err.message);
412
+ if (process.traceDeprecation)
413
+ console.trace(msg);
414
+ else
415
+ console.error(msg);
416
+ }
417
+ }
418
+ }
419
+ }
420
+ function maybeCallback(cb) {
421
+ return typeof cb === "function" ? cb : rethrow();
422
+ }
423
+ var normalize = pathModule.normalize;
424
+ if (isWindows) {
425
+ nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
426
+ } else {
427
+ nextPartRe = /(.*?)(?:[\/]+|$)/g;
428
+ }
429
+ var nextPartRe;
430
+ if (isWindows) {
431
+ splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
432
+ } else {
433
+ splitRootRe = /^[\/]*/;
434
+ }
435
+ var splitRootRe;
436
+ exports2.realpathSync = function realpathSync(p, cache) {
437
+ p = pathModule.resolve(p);
438
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
439
+ return cache[p];
440
+ }
441
+ var original = p, seenLinks = {}, knownHard = {};
442
+ var pos;
443
+ var current;
444
+ var base;
445
+ var previous;
446
+ start();
447
+ function start() {
448
+ var m = splitRootRe.exec(p);
449
+ pos = m[0].length;
450
+ current = m[0];
451
+ base = m[0];
452
+ previous = "";
453
+ if (isWindows && !knownHard[base]) {
454
+ fs.lstatSync(base);
455
+ knownHard[base] = true;
456
+ }
457
+ }
458
+ while (pos < p.length) {
459
+ nextPartRe.lastIndex = pos;
460
+ var result = nextPartRe.exec(p);
461
+ previous = current;
462
+ current += result[0];
463
+ base = previous + result[1];
464
+ pos = nextPartRe.lastIndex;
465
+ if (knownHard[base] || cache && cache[base] === base) {
466
+ continue;
467
+ }
468
+ var resolvedLink;
469
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
470
+ resolvedLink = cache[base];
471
+ } else {
472
+ var stat = fs.lstatSync(base);
473
+ if (!stat.isSymbolicLink()) {
474
+ knownHard[base] = true;
475
+ if (cache)
476
+ cache[base] = base;
477
+ continue;
478
+ }
479
+ var linkTarget = null;
480
+ if (!isWindows) {
481
+ var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
482
+ if (seenLinks.hasOwnProperty(id)) {
483
+ linkTarget = seenLinks[id];
484
+ }
485
+ }
486
+ if (linkTarget === null) {
487
+ fs.statSync(base);
488
+ linkTarget = fs.readlinkSync(base);
489
+ }
490
+ resolvedLink = pathModule.resolve(previous, linkTarget);
491
+ if (cache)
492
+ cache[base] = resolvedLink;
493
+ if (!isWindows)
494
+ seenLinks[id] = linkTarget;
495
+ }
496
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
497
+ start();
498
+ }
499
+ if (cache)
500
+ cache[original] = p;
501
+ return p;
502
+ };
503
+ exports2.realpath = function realpath(p, cache, cb) {
504
+ if (typeof cb !== "function") {
505
+ cb = maybeCallback(cache);
506
+ cache = null;
507
+ }
508
+ p = pathModule.resolve(p);
509
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
510
+ return process.nextTick(cb.bind(null, null, cache[p]));
511
+ }
512
+ var original = p, seenLinks = {}, knownHard = {};
513
+ var pos;
514
+ var current;
515
+ var base;
516
+ var previous;
517
+ start();
518
+ function start() {
519
+ var m = splitRootRe.exec(p);
520
+ pos = m[0].length;
521
+ current = m[0];
522
+ base = m[0];
523
+ previous = "";
524
+ if (isWindows && !knownHard[base]) {
525
+ fs.lstat(base, function(err) {
526
+ if (err)
527
+ return cb(err);
528
+ knownHard[base] = true;
529
+ LOOP();
530
+ });
531
+ } else {
532
+ process.nextTick(LOOP);
533
+ }
534
+ }
535
+ function LOOP() {
536
+ if (pos >= p.length) {
537
+ if (cache)
538
+ cache[original] = p;
539
+ return cb(null, p);
540
+ }
541
+ nextPartRe.lastIndex = pos;
542
+ var result = nextPartRe.exec(p);
543
+ previous = current;
544
+ current += result[0];
545
+ base = previous + result[1];
546
+ pos = nextPartRe.lastIndex;
547
+ if (knownHard[base] || cache && cache[base] === base) {
548
+ return process.nextTick(LOOP);
549
+ }
550
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
551
+ return gotResolvedLink(cache[base]);
552
+ }
553
+ return fs.lstat(base, gotStat);
554
+ }
555
+ function gotStat(err, stat) {
556
+ if (err)
557
+ return cb(err);
558
+ if (!stat.isSymbolicLink()) {
559
+ knownHard[base] = true;
560
+ if (cache)
561
+ cache[base] = base;
562
+ return process.nextTick(LOOP);
563
+ }
564
+ if (!isWindows) {
565
+ var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
566
+ if (seenLinks.hasOwnProperty(id)) {
567
+ return gotTarget(null, seenLinks[id], base);
568
+ }
569
+ }
570
+ fs.stat(base, function(err2) {
571
+ if (err2)
572
+ return cb(err2);
573
+ fs.readlink(base, function(err3, target) {
574
+ if (!isWindows)
575
+ seenLinks[id] = target;
576
+ gotTarget(err3, target);
577
+ });
578
+ });
579
+ }
580
+ function gotTarget(err, target, base2) {
581
+ if (err)
582
+ return cb(err);
583
+ var resolvedLink = pathModule.resolve(previous, target);
584
+ if (cache)
585
+ cache[base2] = resolvedLink;
586
+ gotResolvedLink(resolvedLink);
587
+ }
588
+ function gotResolvedLink(resolvedLink) {
589
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
590
+ start();
591
+ }
592
+ };
593
+ }
594
+ });
595
+
596
+ // ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js
597
+ var require_fs = __commonJS({
598
+ "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports2, module2) {
599
+ module2.exports = realpath;
600
+ realpath.realpath = realpath;
601
+ realpath.sync = realpathSync;
602
+ realpath.realpathSync = realpathSync;
603
+ realpath.monkeypatch = monkeypatch;
604
+ realpath.unmonkeypatch = unmonkeypatch;
605
+ var fs = require("fs");
606
+ var origRealpath = fs.realpath;
607
+ var origRealpathSync = fs.realpathSync;
608
+ var version = process.version;
609
+ var ok = /^v[0-5]\./.test(version);
610
+ var old = require_old();
611
+ function newError(er) {
612
+ return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
613
+ }
614
+ function realpath(p, cache, cb) {
615
+ if (ok) {
616
+ return origRealpath(p, cache, cb);
617
+ }
618
+ if (typeof cache === "function") {
619
+ cb = cache;
620
+ cache = null;
621
+ }
622
+ origRealpath(p, cache, function(er, result) {
623
+ if (newError(er)) {
624
+ old.realpath(p, cache, cb);
625
+ } else {
626
+ cb(er, result);
627
+ }
628
+ });
629
+ }
630
+ function realpathSync(p, cache) {
631
+ if (ok) {
632
+ return origRealpathSync(p, cache);
633
+ }
634
+ try {
635
+ return origRealpathSync(p, cache);
636
+ } catch (er) {
637
+ if (newError(er)) {
638
+ return old.realpathSync(p, cache);
639
+ } else {
640
+ throw er;
641
+ }
642
+ }
643
+ }
644
+ function monkeypatch() {
645
+ fs.realpath = realpath;
646
+ fs.realpathSync = realpathSync;
647
+ }
648
+ function unmonkeypatch() {
649
+ fs.realpath = origRealpath;
650
+ fs.realpathSync = origRealpathSync;
651
+ }
652
+ }
653
+ });
654
+
655
+ // ../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js
656
+ var require_concat_map = __commonJS({
657
+ "../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports2, module2) {
658
+ module2.exports = function(xs, fn) {
659
+ var res = [];
660
+ for (var i = 0; i < xs.length; i++) {
661
+ var x = fn(xs[i], i);
662
+ if (isArray(x))
663
+ res.push.apply(res, x);
664
+ else
665
+ res.push(x);
666
+ }
667
+ return res;
668
+ };
669
+ var isArray = Array.isArray || function(xs) {
670
+ return Object.prototype.toString.call(xs) === "[object Array]";
671
+ };
672
+ }
673
+ });
674
+
675
+ // ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js
676
+ var require_balanced_match = __commonJS({
677
+ "../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports2, module2) {
678
+ "use strict";
679
+ module2.exports = balanced;
680
+ function balanced(a, b, str) {
681
+ if (a instanceof RegExp)
682
+ a = maybeMatch(a, str);
683
+ if (b instanceof RegExp)
684
+ b = maybeMatch(b, str);
685
+ var r = range(a, b, str);
686
+ return r && {
687
+ start: r[0],
688
+ end: r[1],
689
+ pre: str.slice(0, r[0]),
690
+ body: str.slice(r[0] + a.length, r[1]),
691
+ post: str.slice(r[1] + b.length)
692
+ };
693
+ }
694
+ function maybeMatch(reg, str) {
695
+ var m = str.match(reg);
696
+ return m ? m[0] : null;
697
+ }
698
+ balanced.range = range;
699
+ function range(a, b, str) {
700
+ var begs, beg, left, right, result;
701
+ var ai = str.indexOf(a);
702
+ var bi = str.indexOf(b, ai + 1);
703
+ var i = ai;
704
+ if (ai >= 0 && bi > 0) {
705
+ if (a === b) {
706
+ return [ai, bi];
707
+ }
708
+ begs = [];
709
+ left = str.length;
710
+ while (i >= 0 && !result) {
711
+ if (i == ai) {
712
+ begs.push(i);
713
+ ai = str.indexOf(a, i + 1);
714
+ } else if (begs.length == 1) {
715
+ result = [begs.pop(), bi];
716
+ } else {
717
+ beg = begs.pop();
718
+ if (beg < left) {
719
+ left = beg;
720
+ right = bi;
721
+ }
722
+ bi = str.indexOf(b, i + 1);
723
+ }
724
+ i = ai < bi && ai >= 0 ? ai : bi;
725
+ }
726
+ if (begs.length) {
727
+ result = [left, right];
728
+ }
729
+ }
730
+ return result;
731
+ }
732
+ }
733
+ });
734
+
735
+ // ../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js
736
+ var require_brace_expansion = __commonJS({
737
+ "../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports2, module2) {
738
+ var concatMap = require_concat_map();
739
+ var balanced = require_balanced_match();
740
+ module2.exports = expandTop;
741
+ var escSlash = "\0SLASH" + Math.random() + "\0";
742
+ var escOpen = "\0OPEN" + Math.random() + "\0";
743
+ var escClose = "\0CLOSE" + Math.random() + "\0";
744
+ var escComma = "\0COMMA" + Math.random() + "\0";
745
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
746
+ function numeric(str) {
747
+ return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
748
+ }
749
+ function escapeBraces(str) {
750
+ return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
751
+ }
752
+ function unescapeBraces(str) {
753
+ return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
754
+ }
755
+ function parseCommaParts(str) {
756
+ if (!str)
757
+ return [""];
758
+ var parts = [];
759
+ var m = balanced("{", "}", str);
760
+ if (!m)
761
+ return str.split(",");
762
+ var pre = m.pre;
763
+ var body = m.body;
764
+ var post = m.post;
765
+ var p = pre.split(",");
766
+ p[p.length - 1] += "{" + body + "}";
767
+ var postParts = parseCommaParts(post);
768
+ if (post.length) {
769
+ p[p.length - 1] += postParts.shift();
770
+ p.push.apply(p, postParts);
771
+ }
772
+ parts.push.apply(parts, p);
773
+ return parts;
774
+ }
775
+ function expandTop(str) {
776
+ if (!str)
777
+ return [];
778
+ if (str.substr(0, 2) === "{}") {
779
+ str = "\\{\\}" + str.substr(2);
780
+ }
781
+ return expand(escapeBraces(str), true).map(unescapeBraces);
782
+ }
783
+ function embrace(str) {
784
+ return "{" + str + "}";
785
+ }
786
+ function isPadded(el) {
787
+ return /^-?0\d/.test(el);
788
+ }
789
+ function lte(i, y) {
790
+ return i <= y;
791
+ }
792
+ function gte(i, y) {
793
+ return i >= y;
794
+ }
795
+ function expand(str, isTop) {
796
+ var expansions = [];
797
+ var m = balanced("{", "}", str);
798
+ if (!m || /\$$/.test(m.pre))
799
+ return [str];
800
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
801
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
802
+ var isSequence = isNumericSequence || isAlphaSequence;
803
+ var isOptions = m.body.indexOf(",") >= 0;
804
+ if (!isSequence && !isOptions) {
805
+ if (m.post.match(/,.*\}/)) {
806
+ str = m.pre + "{" + m.body + escClose + m.post;
807
+ return expand(str);
808
+ }
809
+ return [str];
810
+ }
811
+ var n;
812
+ if (isSequence) {
813
+ n = m.body.split(/\.\./);
814
+ } else {
815
+ n = parseCommaParts(m.body);
816
+ if (n.length === 1) {
817
+ n = expand(n[0], false).map(embrace);
818
+ if (n.length === 1) {
819
+ var post = m.post.length ? expand(m.post, false) : [""];
820
+ return post.map(function(p) {
821
+ return m.pre + n[0] + p;
822
+ });
823
+ }
824
+ }
825
+ }
826
+ var pre = m.pre;
827
+ var post = m.post.length ? expand(m.post, false) : [""];
828
+ var N;
829
+ if (isSequence) {
830
+ var x = numeric(n[0]);
831
+ var y = numeric(n[1]);
832
+ var width = Math.max(n[0].length, n[1].length);
833
+ var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
834
+ var test = lte;
835
+ var reverse = y < x;
836
+ if (reverse) {
837
+ incr *= -1;
838
+ test = gte;
839
+ }
840
+ var pad = n.some(isPadded);
841
+ N = [];
842
+ for (var i = x; test(i, y); i += incr) {
843
+ var c;
844
+ if (isAlphaSequence) {
845
+ c = String.fromCharCode(i);
846
+ if (c === "\\")
847
+ c = "";
848
+ } else {
849
+ c = String(i);
850
+ if (pad) {
851
+ var need = width - c.length;
852
+ if (need > 0) {
853
+ var z = new Array(need + 1).join("0");
854
+ if (i < 0)
855
+ c = "-" + z + c.slice(1);
856
+ else
857
+ c = z + c;
858
+ }
859
+ }
860
+ }
861
+ N.push(c);
862
+ }
863
+ } else {
864
+ N = concatMap(n, function(el) {
865
+ return expand(el, false);
866
+ });
867
+ }
868
+ for (var j = 0; j < N.length; j++) {
869
+ for (var k = 0; k < post.length; k++) {
870
+ var expansion = pre + N[j] + post[k];
871
+ if (!isTop || isSequence || expansion)
872
+ expansions.push(expansion);
873
+ }
874
+ }
875
+ return expansions;
876
+ }
877
+ }
878
+ });
879
+
880
+ // ../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js
881
+ var require_minimatch = __commonJS({
882
+ "../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js"(exports2, module2) {
883
+ module2.exports = minimatch;
884
+ minimatch.Minimatch = Minimatch;
885
+ var path = { sep: "/" };
886
+ try {
887
+ path = require("path");
888
+ } catch (er) {
889
+ }
890
+ var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
891
+ var expand = require_brace_expansion();
892
+ var plTypes = {
893
+ "!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
894
+ "?": { open: "(?:", close: ")?" },
895
+ "+": { open: "(?:", close: ")+" },
896
+ "*": { open: "(?:", close: ")*" },
897
+ "@": { open: "(?:", close: ")" }
898
+ };
899
+ var qmark = "[^/]";
900
+ var star = qmark + "*?";
901
+ var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
902
+ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
903
+ var reSpecials = charSet("().*{}+?[]^$\\!");
904
+ function charSet(s) {
905
+ return s.split("").reduce(function(set, c) {
906
+ set[c] = true;
907
+ return set;
908
+ }, {});
909
+ }
910
+ var slashSplit = /\/+/;
911
+ minimatch.filter = filter;
912
+ function filter(pattern, options) {
913
+ options = options || {};
914
+ return function(p, i, list) {
915
+ return minimatch(p, pattern, options);
916
+ };
917
+ }
918
+ function ext(a, b) {
919
+ a = a || {};
920
+ b = b || {};
921
+ var t = {};
922
+ Object.keys(b).forEach(function(k) {
923
+ t[k] = b[k];
924
+ });
925
+ Object.keys(a).forEach(function(k) {
926
+ t[k] = a[k];
927
+ });
928
+ return t;
929
+ }
930
+ minimatch.defaults = function(def) {
931
+ if (!def || !Object.keys(def).length)
932
+ return minimatch;
933
+ var orig = minimatch;
934
+ var m = function minimatch2(p, pattern, options) {
935
+ return orig.minimatch(p, pattern, ext(def, options));
936
+ };
937
+ m.Minimatch = function Minimatch2(pattern, options) {
938
+ return new orig.Minimatch(pattern, ext(def, options));
939
+ };
940
+ return m;
941
+ };
942
+ Minimatch.defaults = function(def) {
943
+ if (!def || !Object.keys(def).length)
944
+ return Minimatch;
945
+ return minimatch.defaults(def).Minimatch;
946
+ };
947
+ function minimatch(p, pattern, options) {
948
+ if (typeof pattern !== "string") {
949
+ throw new TypeError("glob pattern string required");
950
+ }
951
+ if (!options)
952
+ options = {};
953
+ if (!options.nocomment && pattern.charAt(0) === "#") {
954
+ return false;
955
+ }
956
+ if (pattern.trim() === "")
957
+ return p === "";
958
+ return new Minimatch(pattern, options).match(p);
959
+ }
960
+ function Minimatch(pattern, options) {
961
+ if (!(this instanceof Minimatch)) {
962
+ return new Minimatch(pattern, options);
963
+ }
964
+ if (typeof pattern !== "string") {
965
+ throw new TypeError("glob pattern string required");
966
+ }
967
+ if (!options)
968
+ options = {};
969
+ pattern = pattern.trim();
970
+ if (path.sep !== "/") {
971
+ pattern = pattern.split(path.sep).join("/");
972
+ }
973
+ this.options = options;
974
+ this.set = [];
975
+ this.pattern = pattern;
976
+ this.regexp = null;
977
+ this.negate = false;
978
+ this.comment = false;
979
+ this.empty = false;
980
+ this.make();
981
+ }
982
+ Minimatch.prototype.debug = function() {
983
+ };
984
+ Minimatch.prototype.make = make;
985
+ function make() {
986
+ if (this._made)
987
+ return;
988
+ var pattern = this.pattern;
989
+ var options = this.options;
990
+ if (!options.nocomment && pattern.charAt(0) === "#") {
991
+ this.comment = true;
992
+ return;
993
+ }
994
+ if (!pattern) {
995
+ this.empty = true;
996
+ return;
997
+ }
998
+ this.parseNegate();
999
+ var set = this.globSet = this.braceExpand();
1000
+ if (options.debug)
1001
+ this.debug = console.error;
1002
+ this.debug(this.pattern, set);
1003
+ set = this.globParts = set.map(function(s) {
1004
+ return s.split(slashSplit);
1005
+ });
1006
+ this.debug(this.pattern, set);
1007
+ set = set.map(function(s, si, set2) {
1008
+ return s.map(this.parse, this);
1009
+ }, this);
1010
+ this.debug(this.pattern, set);
1011
+ set = set.filter(function(s) {
1012
+ return s.indexOf(false) === -1;
1013
+ });
1014
+ this.debug(this.pattern, set);
1015
+ this.set = set;
1016
+ }
1017
+ Minimatch.prototype.parseNegate = parseNegate;
1018
+ function parseNegate() {
1019
+ var pattern = this.pattern;
1020
+ var negate = false;
1021
+ var options = this.options;
1022
+ var negateOffset = 0;
1023
+ if (options.nonegate)
1024
+ return;
1025
+ for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) {
1026
+ negate = !negate;
1027
+ negateOffset++;
1028
+ }
1029
+ if (negateOffset)
1030
+ this.pattern = pattern.substr(negateOffset);
1031
+ this.negate = negate;
1032
+ }
1033
+ minimatch.braceExpand = function(pattern, options) {
1034
+ return braceExpand(pattern, options);
1035
+ };
1036
+ Minimatch.prototype.braceExpand = braceExpand;
1037
+ function braceExpand(pattern, options) {
1038
+ if (!options) {
1039
+ if (this instanceof Minimatch) {
1040
+ options = this.options;
1041
+ } else {
1042
+ options = {};
1043
+ }
1044
+ }
1045
+ pattern = typeof pattern === "undefined" ? this.pattern : pattern;
1046
+ if (typeof pattern === "undefined") {
1047
+ throw new TypeError("undefined pattern");
1048
+ }
1049
+ if (options.nobrace || !pattern.match(/\{.*\}/)) {
1050
+ return [pattern];
1051
+ }
1052
+ return expand(pattern);
1053
+ }
1054
+ Minimatch.prototype.parse = parse;
1055
+ var SUBPARSE = {};
1056
+ function parse(pattern, isSub) {
1057
+ if (pattern.length > 1024 * 64) {
1058
+ throw new TypeError("pattern is too long");
1059
+ }
1060
+ var options = this.options;
1061
+ if (!options.noglobstar && pattern === "**")
1062
+ return GLOBSTAR;
1063
+ if (pattern === "")
1064
+ return "";
1065
+ var re = "";
1066
+ var hasMagic = !!options.nocase;
1067
+ var escaping = false;
1068
+ var patternListStack = [];
1069
+ var negativeLists = [];
1070
+ var stateChar;
1071
+ var inClass = false;
1072
+ var reClassStart = -1;
1073
+ var classStart = -1;
1074
+ var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
1075
+ var self = this;
1076
+ function clearStateChar() {
1077
+ if (stateChar) {
1078
+ switch (stateChar) {
1079
+ case "*":
1080
+ re += star;
1081
+ hasMagic = true;
1082
+ break;
1083
+ case "?":
1084
+ re += qmark;
1085
+ hasMagic = true;
1086
+ break;
1087
+ default:
1088
+ re += "\\" + stateChar;
1089
+ break;
1090
+ }
1091
+ self.debug("clearStateChar %j %j", stateChar, re);
1092
+ stateChar = false;
1093
+ }
1094
+ }
1095
+ for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
1096
+ this.debug("%s %s %s %j", pattern, i, re, c);
1097
+ if (escaping && reSpecials[c]) {
1098
+ re += "\\" + c;
1099
+ escaping = false;
1100
+ continue;
1101
+ }
1102
+ switch (c) {
1103
+ case "/":
1104
+ return false;
1105
+ case "\\":
1106
+ clearStateChar();
1107
+ escaping = true;
1108
+ continue;
1109
+ case "?":
1110
+ case "*":
1111
+ case "+":
1112
+ case "@":
1113
+ case "!":
1114
+ this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c);
1115
+ if (inClass) {
1116
+ this.debug(" in class");
1117
+ if (c === "!" && i === classStart + 1)
1118
+ c = "^";
1119
+ re += c;
1120
+ continue;
1121
+ }
1122
+ self.debug("call clearStateChar %j", stateChar);
1123
+ clearStateChar();
1124
+ stateChar = c;
1125
+ if (options.noext)
1126
+ clearStateChar();
1127
+ continue;
1128
+ case "(":
1129
+ if (inClass) {
1130
+ re += "(";
1131
+ continue;
1132
+ }
1133
+ if (!stateChar) {
1134
+ re += "\\(";
1135
+ continue;
1136
+ }
1137
+ patternListStack.push({
1138
+ type: stateChar,
1139
+ start: i - 1,
1140
+ reStart: re.length,
1141
+ open: plTypes[stateChar].open,
1142
+ close: plTypes[stateChar].close
1143
+ });
1144
+ re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
1145
+ this.debug("plType %j %j", stateChar, re);
1146
+ stateChar = false;
1147
+ continue;
1148
+ case ")":
1149
+ if (inClass || !patternListStack.length) {
1150
+ re += "\\)";
1151
+ continue;
1152
+ }
1153
+ clearStateChar();
1154
+ hasMagic = true;
1155
+ var pl = patternListStack.pop();
1156
+ re += pl.close;
1157
+ if (pl.type === "!") {
1158
+ negativeLists.push(pl);
1159
+ }
1160
+ pl.reEnd = re.length;
1161
+ continue;
1162
+ case "|":
1163
+ if (inClass || !patternListStack.length || escaping) {
1164
+ re += "\\|";
1165
+ escaping = false;
1166
+ continue;
1167
+ }
1168
+ clearStateChar();
1169
+ re += "|";
1170
+ continue;
1171
+ case "[":
1172
+ clearStateChar();
1173
+ if (inClass) {
1174
+ re += "\\" + c;
1175
+ continue;
1176
+ }
1177
+ inClass = true;
1178
+ classStart = i;
1179
+ reClassStart = re.length;
1180
+ re += c;
1181
+ continue;
1182
+ case "]":
1183
+ if (i === classStart + 1 || !inClass) {
1184
+ re += "\\" + c;
1185
+ escaping = false;
1186
+ continue;
1187
+ }
1188
+ if (inClass) {
1189
+ var cs = pattern.substring(classStart + 1, i);
1190
+ try {
1191
+ RegExp("[" + cs + "]");
1192
+ } catch (er) {
1193
+ var sp = this.parse(cs, SUBPARSE);
1194
+ re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
1195
+ hasMagic = hasMagic || sp[1];
1196
+ inClass = false;
1197
+ continue;
1198
+ }
1199
+ }
1200
+ hasMagic = true;
1201
+ inClass = false;
1202
+ re += c;
1203
+ continue;
1204
+ default:
1205
+ clearStateChar();
1206
+ if (escaping) {
1207
+ escaping = false;
1208
+ } else if (reSpecials[c] && !(c === "^" && inClass)) {
1209
+ re += "\\";
1210
+ }
1211
+ re += c;
1212
+ }
1213
+ }
1214
+ if (inClass) {
1215
+ cs = pattern.substr(classStart + 1);
1216
+ sp = this.parse(cs, SUBPARSE);
1217
+ re = re.substr(0, reClassStart) + "\\[" + sp[0];
1218
+ hasMagic = hasMagic || sp[1];
1219
+ }
1220
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
1221
+ var tail = re.slice(pl.reStart + pl.open.length);
1222
+ this.debug("setting tail", re, pl);
1223
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) {
1224
+ if (!$2) {
1225
+ $2 = "\\";
1226
+ }
1227
+ return $1 + $1 + $2 + "|";
1228
+ });
1229
+ this.debug("tail=%j\n %s", tail, tail, pl, re);
1230
+ var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
1231
+ hasMagic = true;
1232
+ re = re.slice(0, pl.reStart) + t + "\\(" + tail;
1233
+ }
1234
+ clearStateChar();
1235
+ if (escaping) {
1236
+ re += "\\\\";
1237
+ }
1238
+ var addPatternStart = false;
1239
+ switch (re.charAt(0)) {
1240
+ case ".":
1241
+ case "[":
1242
+ case "(":
1243
+ addPatternStart = true;
1244
+ }
1245
+ for (var n = negativeLists.length - 1; n > -1; n--) {
1246
+ var nl = negativeLists[n];
1247
+ var nlBefore = re.slice(0, nl.reStart);
1248
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
1249
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
1250
+ var nlAfter = re.slice(nl.reEnd);
1251
+ nlLast += nlAfter;
1252
+ var openParensBefore = nlBefore.split("(").length - 1;
1253
+ var cleanAfter = nlAfter;
1254
+ for (i = 0; i < openParensBefore; i++) {
1255
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
1256
+ }
1257
+ nlAfter = cleanAfter;
1258
+ var dollar = "";
1259
+ if (nlAfter === "" && isSub !== SUBPARSE) {
1260
+ dollar = "$";
1261
+ }
1262
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
1263
+ re = newRe;
1264
+ }
1265
+ if (re !== "" && hasMagic) {
1266
+ re = "(?=.)" + re;
1267
+ }
1268
+ if (addPatternStart) {
1269
+ re = patternStart + re;
1270
+ }
1271
+ if (isSub === SUBPARSE) {
1272
+ return [re, hasMagic];
1273
+ }
1274
+ if (!hasMagic) {
1275
+ return globUnescape(pattern);
1276
+ }
1277
+ var flags = options.nocase ? "i" : "";
1278
+ try {
1279
+ var regExp = new RegExp("^" + re + "$", flags);
1280
+ } catch (er) {
1281
+ return new RegExp("$.");
1282
+ }
1283
+ regExp._glob = pattern;
1284
+ regExp._src = re;
1285
+ return regExp;
1286
+ }
1287
+ minimatch.makeRe = function(pattern, options) {
1288
+ return new Minimatch(pattern, options || {}).makeRe();
1289
+ };
1290
+ Minimatch.prototype.makeRe = makeRe;
1291
+ function makeRe() {
1292
+ if (this.regexp || this.regexp === false)
1293
+ return this.regexp;
1294
+ var set = this.set;
1295
+ if (!set.length) {
1296
+ this.regexp = false;
1297
+ return this.regexp;
1298
+ }
1299
+ var options = this.options;
1300
+ var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
1301
+ var flags = options.nocase ? "i" : "";
1302
+ var re = set.map(function(pattern) {
1303
+ return pattern.map(function(p) {
1304
+ return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src;
1305
+ }).join("\\/");
1306
+ }).join("|");
1307
+ re = "^(?:" + re + ")$";
1308
+ if (this.negate)
1309
+ re = "^(?!" + re + ").*$";
1310
+ try {
1311
+ this.regexp = new RegExp(re, flags);
1312
+ } catch (ex) {
1313
+ this.regexp = false;
1314
+ }
1315
+ return this.regexp;
1316
+ }
1317
+ minimatch.match = function(list, pattern, options) {
1318
+ options = options || {};
1319
+ var mm = new Minimatch(pattern, options);
1320
+ list = list.filter(function(f) {
1321
+ return mm.match(f);
1322
+ });
1323
+ if (mm.options.nonull && !list.length) {
1324
+ list.push(pattern);
1325
+ }
1326
+ return list;
1327
+ };
1328
+ Minimatch.prototype.match = match;
1329
+ function match(f, partial) {
1330
+ this.debug("match", f, this.pattern);
1331
+ if (this.comment)
1332
+ return false;
1333
+ if (this.empty)
1334
+ return f === "";
1335
+ if (f === "/" && partial)
1336
+ return true;
1337
+ var options = this.options;
1338
+ if (path.sep !== "/") {
1339
+ f = f.split(path.sep).join("/");
1340
+ }
1341
+ f = f.split(slashSplit);
1342
+ this.debug(this.pattern, "split", f);
1343
+ var set = this.set;
1344
+ this.debug(this.pattern, "set", set);
1345
+ var filename;
1346
+ var i;
1347
+ for (i = f.length - 1; i >= 0; i--) {
1348
+ filename = f[i];
1349
+ if (filename)
1350
+ break;
1351
+ }
1352
+ for (i = 0; i < set.length; i++) {
1353
+ var pattern = set[i];
1354
+ var file = f;
1355
+ if (options.matchBase && pattern.length === 1) {
1356
+ file = [filename];
1357
+ }
1358
+ var hit = this.matchOne(file, pattern, partial);
1359
+ if (hit) {
1360
+ if (options.flipNegate)
1361
+ return true;
1362
+ return !this.negate;
1363
+ }
1364
+ }
1365
+ if (options.flipNegate)
1366
+ return false;
1367
+ return this.negate;
1368
+ }
1369
+ Minimatch.prototype.matchOne = function(file, pattern, partial) {
1370
+ var options = this.options;
1371
+ this.debug("matchOne", { "this": this, file, pattern });
1372
+ this.debug("matchOne", file.length, pattern.length);
1373
+ for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
1374
+ this.debug("matchOne loop");
1375
+ var p = pattern[pi];
1376
+ var f = file[fi];
1377
+ this.debug(pattern, p, f);
1378
+ if (p === false)
1379
+ return false;
1380
+ if (p === GLOBSTAR) {
1381
+ this.debug("GLOBSTAR", [pattern, p, f]);
1382
+ var fr = fi;
1383
+ var pr = pi + 1;
1384
+ if (pr === pl) {
1385
+ this.debug("** at the end");
1386
+ for (; fi < fl; fi++) {
1387
+ if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
1388
+ return false;
1389
+ }
1390
+ return true;
1391
+ }
1392
+ while (fr < fl) {
1393
+ var swallowee = file[fr];
1394
+ this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
1395
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
1396
+ this.debug("globstar found match!", fr, fl, swallowee);
1397
+ return true;
1398
+ } else {
1399
+ if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
1400
+ this.debug("dot detected!", file, fr, pattern, pr);
1401
+ break;
1402
+ }
1403
+ this.debug("globstar swallow a segment, and continue");
1404
+ fr++;
1405
+ }
1406
+ }
1407
+ if (partial) {
1408
+ this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
1409
+ if (fr === fl)
1410
+ return true;
1411
+ }
1412
+ return false;
1413
+ }
1414
+ var hit;
1415
+ if (typeof p === "string") {
1416
+ if (options.nocase) {
1417
+ hit = f.toLowerCase() === p.toLowerCase();
1418
+ } else {
1419
+ hit = f === p;
1420
+ }
1421
+ this.debug("string match", p, f, hit);
1422
+ } else {
1423
+ hit = f.match(p);
1424
+ this.debug("pattern match", p, f, hit);
1425
+ }
1426
+ if (!hit)
1427
+ return false;
1428
+ }
1429
+ if (fi === fl && pi === pl) {
1430
+ return true;
1431
+ } else if (fi === fl) {
1432
+ return partial;
1433
+ } else if (pi === pl) {
1434
+ var emptyFileEnd = fi === fl - 1 && file[fi] === "";
1435
+ return emptyFileEnd;
1436
+ }
1437
+ throw new Error("wtf?");
1438
+ };
1439
+ function globUnescape(s) {
1440
+ return s.replace(/\\(.)/g, "$1");
1441
+ }
1442
+ function regExpEscape(s) {
1443
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1444
+ }
1445
+ }
1446
+ });
1447
+
1448
+ // ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js
1449
+ var require_inherits_browser = __commonJS({
1450
+ "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) {
1451
+ if (typeof Object.create === "function") {
1452
+ module2.exports = function inherits(ctor, superCtor) {
1453
+ if (superCtor) {
1454
+ ctor.super_ = superCtor;
1455
+ ctor.prototype = Object.create(superCtor.prototype, {
1456
+ constructor: {
1457
+ value: ctor,
1458
+ enumerable: false,
1459
+ writable: true,
1460
+ configurable: true
1461
+ }
1462
+ });
1463
+ }
1464
+ };
1465
+ } else {
1466
+ module2.exports = function inherits(ctor, superCtor) {
1467
+ if (superCtor) {
1468
+ ctor.super_ = superCtor;
1469
+ var TempCtor = function() {
1470
+ };
1471
+ TempCtor.prototype = superCtor.prototype;
1472
+ ctor.prototype = new TempCtor();
1473
+ ctor.prototype.constructor = ctor;
1474
+ }
1475
+ };
1476
+ }
1477
+ }
1478
+ });
1479
+
1480
+ // ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js
1481
+ var require_inherits = __commonJS({
1482
+ "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports2, module2) {
1483
+ try {
1484
+ util = require("util");
1485
+ if (typeof util.inherits !== "function")
1486
+ throw "";
1487
+ module2.exports = util.inherits;
1488
+ } catch (e) {
1489
+ module2.exports = require_inherits_browser();
1490
+ }
1491
+ var util;
1492
+ }
1493
+ });
1494
+
1495
+ // ../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js
1496
+ var require_path_is_absolute = __commonJS({
1497
+ "../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports2, module2) {
1498
+ "use strict";
1499
+ function posix(path) {
1500
+ return path.charAt(0) === "/";
1501
+ }
1502
+ function win32(path) {
1503
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
1504
+ var result = splitDeviceRe.exec(path);
1505
+ var device = result[1] || "";
1506
+ var isUnc = Boolean(device && device.charAt(1) !== ":");
1507
+ return Boolean(result[2] || isUnc);
1508
+ }
1509
+ module2.exports = process.platform === "win32" ? win32 : posix;
1510
+ module2.exports.posix = posix;
1511
+ module2.exports.win32 = win32;
1512
+ }
1513
+ });
1514
+
1515
+ // ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/common.js
1516
+ var require_common = __commonJS({
1517
+ "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/common.js"(exports2) {
1518
+ exports2.setopts = setopts;
1519
+ exports2.ownProp = ownProp;
1520
+ exports2.makeAbs = makeAbs;
1521
+ exports2.finish = finish;
1522
+ exports2.mark = mark;
1523
+ exports2.isIgnored = isIgnored;
1524
+ exports2.childrenIgnored = childrenIgnored;
1525
+ function ownProp(obj, field) {
1526
+ return Object.prototype.hasOwnProperty.call(obj, field);
1527
+ }
1528
+ var fs = require("fs");
1529
+ var path = require("path");
1530
+ var minimatch = require_minimatch();
1531
+ var isAbsolute = require_path_is_absolute();
1532
+ var Minimatch = minimatch.Minimatch;
1533
+ function alphasort(a, b) {
1534
+ return a.localeCompare(b, "en");
1535
+ }
1536
+ function setupIgnores(self, options) {
1537
+ self.ignore = options.ignore || [];
1538
+ if (!Array.isArray(self.ignore))
1539
+ self.ignore = [self.ignore];
1540
+ if (self.ignore.length) {
1541
+ self.ignore = self.ignore.map(ignoreMap);
1542
+ }
1543
+ }
1544
+ function ignoreMap(pattern) {
1545
+ var gmatcher = null;
1546
+ if (pattern.slice(-3) === "/**") {
1547
+ var gpattern = pattern.replace(/(\/\*\*)+$/, "");
1548
+ gmatcher = new Minimatch(gpattern, { dot: true });
1549
+ }
1550
+ return {
1551
+ matcher: new Minimatch(pattern, { dot: true }),
1552
+ gmatcher
1553
+ };
1554
+ }
1555
+ function setopts(self, pattern, options) {
1556
+ if (!options)
1557
+ options = {};
1558
+ if (options.matchBase && pattern.indexOf("/") === -1) {
1559
+ if (options.noglobstar) {
1560
+ throw new Error("base matching requires globstar");
1561
+ }
1562
+ pattern = "**/" + pattern;
1563
+ }
1564
+ self.silent = !!options.silent;
1565
+ self.pattern = pattern;
1566
+ self.strict = options.strict !== false;
1567
+ self.realpath = !!options.realpath;
1568
+ self.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null);
1569
+ self.follow = !!options.follow;
1570
+ self.dot = !!options.dot;
1571
+ self.mark = !!options.mark;
1572
+ self.nodir = !!options.nodir;
1573
+ if (self.nodir)
1574
+ self.mark = true;
1575
+ self.sync = !!options.sync;
1576
+ self.nounique = !!options.nounique;
1577
+ self.nonull = !!options.nonull;
1578
+ self.nosort = !!options.nosort;
1579
+ self.nocase = !!options.nocase;
1580
+ self.stat = !!options.stat;
1581
+ self.noprocess = !!options.noprocess;
1582
+ self.absolute = !!options.absolute;
1583
+ self.fs = options.fs || fs;
1584
+ self.maxLength = options.maxLength || Infinity;
1585
+ self.cache = options.cache || /* @__PURE__ */ Object.create(null);
1586
+ self.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
1587
+ self.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null);
1588
+ setupIgnores(self, options);
1589
+ self.changedCwd = false;
1590
+ var cwd = process.cwd();
1591
+ if (!ownProp(options, "cwd"))
1592
+ self.cwd = cwd;
1593
+ else {
1594
+ self.cwd = path.resolve(options.cwd);
1595
+ self.changedCwd = self.cwd !== cwd;
1596
+ }
1597
+ self.root = options.root || path.resolve(self.cwd, "/");
1598
+ self.root = path.resolve(self.root);
1599
+ if (process.platform === "win32")
1600
+ self.root = self.root.replace(/\\/g, "/");
1601
+ self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
1602
+ if (process.platform === "win32")
1603
+ self.cwdAbs = self.cwdAbs.replace(/\\/g, "/");
1604
+ self.nomount = !!options.nomount;
1605
+ options.nonegate = true;
1606
+ options.nocomment = true;
1607
+ self.minimatch = new Minimatch(pattern, options);
1608
+ self.options = self.minimatch.options;
1609
+ }
1610
+ function finish(self) {
1611
+ var nou = self.nounique;
1612
+ var all = nou ? [] : /* @__PURE__ */ Object.create(null);
1613
+ for (var i = 0, l = self.matches.length; i < l; i++) {
1614
+ var matches = self.matches[i];
1615
+ if (!matches || Object.keys(matches).length === 0) {
1616
+ if (self.nonull) {
1617
+ var literal = self.minimatch.globSet[i];
1618
+ if (nou)
1619
+ all.push(literal);
1620
+ else
1621
+ all[literal] = true;
1622
+ }
1623
+ } else {
1624
+ var m = Object.keys(matches);
1625
+ if (nou)
1626
+ all.push.apply(all, m);
1627
+ else
1628
+ m.forEach(function(m2) {
1629
+ all[m2] = true;
1630
+ });
1631
+ }
1632
+ }
1633
+ if (!nou)
1634
+ all = Object.keys(all);
1635
+ if (!self.nosort)
1636
+ all = all.sort(alphasort);
1637
+ if (self.mark) {
1638
+ for (var i = 0; i < all.length; i++) {
1639
+ all[i] = self._mark(all[i]);
1640
+ }
1641
+ if (self.nodir) {
1642
+ all = all.filter(function(e) {
1643
+ var notDir = !/\/$/.test(e);
1644
+ var c = self.cache[e] || self.cache[makeAbs(self, e)];
1645
+ if (notDir && c)
1646
+ notDir = c !== "DIR" && !Array.isArray(c);
1647
+ return notDir;
1648
+ });
1649
+ }
1650
+ }
1651
+ if (self.ignore.length)
1652
+ all = all.filter(function(m2) {
1653
+ return !isIgnored(self, m2);
1654
+ });
1655
+ self.found = all;
1656
+ }
1657
+ function mark(self, p) {
1658
+ var abs = makeAbs(self, p);
1659
+ var c = self.cache[abs];
1660
+ var m = p;
1661
+ if (c) {
1662
+ var isDir = c === "DIR" || Array.isArray(c);
1663
+ var slash = p.slice(-1) === "/";
1664
+ if (isDir && !slash)
1665
+ m += "/";
1666
+ else if (!isDir && slash)
1667
+ m = m.slice(0, -1);
1668
+ if (m !== p) {
1669
+ var mabs = makeAbs(self, m);
1670
+ self.statCache[mabs] = self.statCache[abs];
1671
+ self.cache[mabs] = self.cache[abs];
1672
+ }
1673
+ }
1674
+ return m;
1675
+ }
1676
+ function makeAbs(self, f) {
1677
+ var abs = f;
1678
+ if (f.charAt(0) === "/") {
1679
+ abs = path.join(self.root, f);
1680
+ } else if (isAbsolute(f) || f === "") {
1681
+ abs = f;
1682
+ } else if (self.changedCwd) {
1683
+ abs = path.resolve(self.cwd, f);
1684
+ } else {
1685
+ abs = path.resolve(f);
1686
+ }
1687
+ if (process.platform === "win32")
1688
+ abs = abs.replace(/\\/g, "/");
1689
+ return abs;
1690
+ }
1691
+ function isIgnored(self, path2) {
1692
+ if (!self.ignore.length)
1693
+ return false;
1694
+ return self.ignore.some(function(item) {
1695
+ return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2));
1696
+ });
1697
+ }
1698
+ function childrenIgnored(self, path2) {
1699
+ if (!self.ignore.length)
1700
+ return false;
1701
+ return self.ignore.some(function(item) {
1702
+ return !!(item.gmatcher && item.gmatcher.match(path2));
1703
+ });
1704
+ }
1705
+ }
1706
+ });
1707
+
1708
+ // ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/sync.js
1709
+ var require_sync = __commonJS({
1710
+ "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/sync.js"(exports2, module2) {
1711
+ module2.exports = globSync;
1712
+ globSync.GlobSync = GlobSync;
1713
+ var rp = require_fs();
1714
+ var minimatch = require_minimatch();
1715
+ var Minimatch = minimatch.Minimatch;
1716
+ var Glob = require_glob().Glob;
1717
+ var util = require("util");
1718
+ var path = require("path");
1719
+ var assert = require("assert");
1720
+ var isAbsolute = require_path_is_absolute();
1721
+ var common = require_common();
1722
+ var setopts = common.setopts;
1723
+ var ownProp = common.ownProp;
1724
+ var childrenIgnored = common.childrenIgnored;
1725
+ var isIgnored = common.isIgnored;
1726
+ function globSync(pattern, options) {
1727
+ if (typeof options === "function" || arguments.length === 3)
1728
+ throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
1729
+ return new GlobSync(pattern, options).found;
1730
+ }
1731
+ function GlobSync(pattern, options) {
1732
+ if (!pattern)
1733
+ throw new Error("must provide pattern");
1734
+ if (typeof options === "function" || arguments.length === 3)
1735
+ throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
1736
+ if (!(this instanceof GlobSync))
1737
+ return new GlobSync(pattern, options);
1738
+ setopts(this, pattern, options);
1739
+ if (this.noprocess)
1740
+ return this;
1741
+ var n = this.minimatch.set.length;
1742
+ this.matches = new Array(n);
1743
+ for (var i = 0; i < n; i++) {
1744
+ this._process(this.minimatch.set[i], i, false);
1745
+ }
1746
+ this._finish();
1747
+ }
1748
+ GlobSync.prototype._finish = function() {
1749
+ assert(this instanceof GlobSync);
1750
+ if (this.realpath) {
1751
+ var self = this;
1752
+ this.matches.forEach(function(matchset, index) {
1753
+ var set = self.matches[index] = /* @__PURE__ */ Object.create(null);
1754
+ for (var p in matchset) {
1755
+ try {
1756
+ p = self._makeAbs(p);
1757
+ var real = rp.realpathSync(p, self.realpathCache);
1758
+ set[real] = true;
1759
+ } catch (er) {
1760
+ if (er.syscall === "stat")
1761
+ set[self._makeAbs(p)] = true;
1762
+ else
1763
+ throw er;
1764
+ }
1765
+ }
1766
+ });
1767
+ }
1768
+ common.finish(this);
1769
+ };
1770
+ GlobSync.prototype._process = function(pattern, index, inGlobStar) {
1771
+ assert(this instanceof GlobSync);
1772
+ var n = 0;
1773
+ while (typeof pattern[n] === "string") {
1774
+ n++;
1775
+ }
1776
+ var prefix;
1777
+ switch (n) {
1778
+ case pattern.length:
1779
+ this._processSimple(pattern.join("/"), index);
1780
+ return;
1781
+ case 0:
1782
+ prefix = null;
1783
+ break;
1784
+ default:
1785
+ prefix = pattern.slice(0, n).join("/");
1786
+ break;
1787
+ }
1788
+ var remain = pattern.slice(n);
1789
+ var read;
1790
+ if (prefix === null)
1791
+ read = ".";
1792
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
1793
+ if (!prefix || !isAbsolute(prefix))
1794
+ prefix = "/" + prefix;
1795
+ read = prefix;
1796
+ } else
1797
+ read = prefix;
1798
+ var abs = this._makeAbs(read);
1799
+ if (childrenIgnored(this, read))
1800
+ return;
1801
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR;
1802
+ if (isGlobStar)
1803
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar);
1804
+ else
1805
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar);
1806
+ };
1807
+ GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) {
1808
+ var entries = this._readdir(abs, inGlobStar);
1809
+ if (!entries)
1810
+ return;
1811
+ var pn = remain[0];
1812
+ var negate = !!this.minimatch.negate;
1813
+ var rawGlob = pn._glob;
1814
+ var dotOk = this.dot || rawGlob.charAt(0) === ".";
1815
+ var matchedEntries = [];
1816
+ for (var i = 0; i < entries.length; i++) {
1817
+ var e = entries[i];
1818
+ if (e.charAt(0) !== "." || dotOk) {
1819
+ var m;
1820
+ if (negate && !prefix) {
1821
+ m = !e.match(pn);
1822
+ } else {
1823
+ m = e.match(pn);
1824
+ }
1825
+ if (m)
1826
+ matchedEntries.push(e);
1827
+ }
1828
+ }
1829
+ var len = matchedEntries.length;
1830
+ if (len === 0)
1831
+ return;
1832
+ if (remain.length === 1 && !this.mark && !this.stat) {
1833
+ if (!this.matches[index])
1834
+ this.matches[index] = /* @__PURE__ */ Object.create(null);
1835
+ for (var i = 0; i < len; i++) {
1836
+ var e = matchedEntries[i];
1837
+ if (prefix) {
1838
+ if (prefix.slice(-1) !== "/")
1839
+ e = prefix + "/" + e;
1840
+ else
1841
+ e = prefix + e;
1842
+ }
1843
+ if (e.charAt(0) === "/" && !this.nomount) {
1844
+ e = path.join(this.root, e);
1845
+ }
1846
+ this._emitMatch(index, e);
1847
+ }
1848
+ return;
1849
+ }
1850
+ remain.shift();
1851
+ for (var i = 0; i < len; i++) {
1852
+ var e = matchedEntries[i];
1853
+ var newPattern;
1854
+ if (prefix)
1855
+ newPattern = [prefix, e];
1856
+ else
1857
+ newPattern = [e];
1858
+ this._process(newPattern.concat(remain), index, inGlobStar);
1859
+ }
1860
+ };
1861
+ GlobSync.prototype._emitMatch = function(index, e) {
1862
+ if (isIgnored(this, e))
1863
+ return;
1864
+ var abs = this._makeAbs(e);
1865
+ if (this.mark)
1866
+ e = this._mark(e);
1867
+ if (this.absolute) {
1868
+ e = abs;
1869
+ }
1870
+ if (this.matches[index][e])
1871
+ return;
1872
+ if (this.nodir) {
1873
+ var c = this.cache[abs];
1874
+ if (c === "DIR" || Array.isArray(c))
1875
+ return;
1876
+ }
1877
+ this.matches[index][e] = true;
1878
+ if (this.stat)
1879
+ this._stat(e);
1880
+ };
1881
+ GlobSync.prototype._readdirInGlobStar = function(abs) {
1882
+ if (this.follow)
1883
+ return this._readdir(abs, false);
1884
+ var entries;
1885
+ var lstat;
1886
+ var stat;
1887
+ try {
1888
+ lstat = this.fs.lstatSync(abs);
1889
+ } catch (er) {
1890
+ if (er.code === "ENOENT") {
1891
+ return null;
1892
+ }
1893
+ }
1894
+ var isSym = lstat && lstat.isSymbolicLink();
1895
+ this.symlinks[abs] = isSym;
1896
+ if (!isSym && lstat && !lstat.isDirectory())
1897
+ this.cache[abs] = "FILE";
1898
+ else
1899
+ entries = this._readdir(abs, false);
1900
+ return entries;
1901
+ };
1902
+ GlobSync.prototype._readdir = function(abs, inGlobStar) {
1903
+ var entries;
1904
+ if (inGlobStar && !ownProp(this.symlinks, abs))
1905
+ return this._readdirInGlobStar(abs);
1906
+ if (ownProp(this.cache, abs)) {
1907
+ var c = this.cache[abs];
1908
+ if (!c || c === "FILE")
1909
+ return null;
1910
+ if (Array.isArray(c))
1911
+ return c;
1912
+ }
1913
+ try {
1914
+ return this._readdirEntries(abs, this.fs.readdirSync(abs));
1915
+ } catch (er) {
1916
+ this._readdirError(abs, er);
1917
+ return null;
1918
+ }
1919
+ };
1920
+ GlobSync.prototype._readdirEntries = function(abs, entries) {
1921
+ if (!this.mark && !this.stat) {
1922
+ for (var i = 0; i < entries.length; i++) {
1923
+ var e = entries[i];
1924
+ if (abs === "/")
1925
+ e = abs + e;
1926
+ else
1927
+ e = abs + "/" + e;
1928
+ this.cache[e] = true;
1929
+ }
1930
+ }
1931
+ this.cache[abs] = entries;
1932
+ return entries;
1933
+ };
1934
+ GlobSync.prototype._readdirError = function(f, er) {
1935
+ switch (er.code) {
1936
+ case "ENOTSUP":
1937
+ case "ENOTDIR":
1938
+ var abs = this._makeAbs(f);
1939
+ this.cache[abs] = "FILE";
1940
+ if (abs === this.cwdAbs) {
1941
+ var error = new Error(er.code + " invalid cwd " + this.cwd);
1942
+ error.path = this.cwd;
1943
+ error.code = er.code;
1944
+ throw error;
1945
+ }
1946
+ break;
1947
+ case "ENOENT":
1948
+ case "ELOOP":
1949
+ case "ENAMETOOLONG":
1950
+ case "UNKNOWN":
1951
+ this.cache[this._makeAbs(f)] = false;
1952
+ break;
1953
+ default:
1954
+ this.cache[this._makeAbs(f)] = false;
1955
+ if (this.strict)
1956
+ throw er;
1957
+ if (!this.silent)
1958
+ console.error("glob error", er);
1959
+ break;
1960
+ }
1961
+ };
1962
+ GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) {
1963
+ var entries = this._readdir(abs, inGlobStar);
1964
+ if (!entries)
1965
+ return;
1966
+ var remainWithoutGlobStar = remain.slice(1);
1967
+ var gspref = prefix ? [prefix] : [];
1968
+ var noGlobStar = gspref.concat(remainWithoutGlobStar);
1969
+ this._process(noGlobStar, index, false);
1970
+ var len = entries.length;
1971
+ var isSym = this.symlinks[abs];
1972
+ if (isSym && inGlobStar)
1973
+ return;
1974
+ for (var i = 0; i < len; i++) {
1975
+ var e = entries[i];
1976
+ if (e.charAt(0) === "." && !this.dot)
1977
+ continue;
1978
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar);
1979
+ this._process(instead, index, true);
1980
+ var below = gspref.concat(entries[i], remain);
1981
+ this._process(below, index, true);
1982
+ }
1983
+ };
1984
+ GlobSync.prototype._processSimple = function(prefix, index) {
1985
+ var exists = this._stat(prefix);
1986
+ if (!this.matches[index])
1987
+ this.matches[index] = /* @__PURE__ */ Object.create(null);
1988
+ if (!exists)
1989
+ return;
1990
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
1991
+ var trail = /[\/\\]$/.test(prefix);
1992
+ if (prefix.charAt(0) === "/") {
1993
+ prefix = path.join(this.root, prefix);
1994
+ } else {
1995
+ prefix = path.resolve(this.root, prefix);
1996
+ if (trail)
1997
+ prefix += "/";
1998
+ }
1999
+ }
2000
+ if (process.platform === "win32")
2001
+ prefix = prefix.replace(/\\/g, "/");
2002
+ this._emitMatch(index, prefix);
2003
+ };
2004
+ GlobSync.prototype._stat = function(f) {
2005
+ var abs = this._makeAbs(f);
2006
+ var needDir = f.slice(-1) === "/";
2007
+ if (f.length > this.maxLength)
2008
+ return false;
2009
+ if (!this.stat && ownProp(this.cache, abs)) {
2010
+ var c = this.cache[abs];
2011
+ if (Array.isArray(c))
2012
+ c = "DIR";
2013
+ if (!needDir || c === "DIR")
2014
+ return c;
2015
+ if (needDir && c === "FILE")
2016
+ return false;
2017
+ }
2018
+ var exists;
2019
+ var stat = this.statCache[abs];
2020
+ if (!stat) {
2021
+ var lstat;
2022
+ try {
2023
+ lstat = this.fs.lstatSync(abs);
2024
+ } catch (er) {
2025
+ if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
2026
+ this.statCache[abs] = false;
2027
+ return false;
2028
+ }
2029
+ }
2030
+ if (lstat && lstat.isSymbolicLink()) {
2031
+ try {
2032
+ stat = this.fs.statSync(abs);
2033
+ } catch (er) {
2034
+ stat = lstat;
2035
+ }
2036
+ } else {
2037
+ stat = lstat;
2038
+ }
2039
+ }
2040
+ this.statCache[abs] = stat;
2041
+ var c = true;
2042
+ if (stat)
2043
+ c = stat.isDirectory() ? "DIR" : "FILE";
2044
+ this.cache[abs] = this.cache[abs] || c;
2045
+ if (needDir && c === "FILE")
2046
+ return false;
2047
+ return c;
2048
+ };
2049
+ GlobSync.prototype._mark = function(p) {
2050
+ return common.mark(this, p);
2051
+ };
2052
+ GlobSync.prototype._makeAbs = function(f) {
2053
+ return common.makeAbs(this, f);
2054
+ };
2055
+ }
2056
+ });
2057
+
2058
+ // ../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js
2059
+ var require_wrappy = __commonJS({
2060
+ "../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports2, module2) {
2061
+ module2.exports = wrappy;
2062
+ function wrappy(fn, cb) {
2063
+ if (fn && cb)
2064
+ return wrappy(fn)(cb);
2065
+ if (typeof fn !== "function")
2066
+ throw new TypeError("need wrapper function");
2067
+ Object.keys(fn).forEach(function(k) {
2068
+ wrapper[k] = fn[k];
2069
+ });
2070
+ return wrapper;
2071
+ function wrapper() {
2072
+ var args = new Array(arguments.length);
2073
+ for (var i = 0; i < args.length; i++) {
2074
+ args[i] = arguments[i];
2075
+ }
2076
+ var ret = fn.apply(this, args);
2077
+ var cb2 = args[args.length - 1];
2078
+ if (typeof ret === "function" && ret !== cb2) {
2079
+ Object.keys(cb2).forEach(function(k) {
2080
+ ret[k] = cb2[k];
2081
+ });
2082
+ }
2083
+ return ret;
2084
+ }
2085
+ }
2086
+ }
2087
+ });
2088
+
2089
+ // ../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js
2090
+ var require_once = __commonJS({
2091
+ "../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports2, module2) {
2092
+ var wrappy = require_wrappy();
2093
+ module2.exports = wrappy(once);
2094
+ module2.exports.strict = wrappy(onceStrict);
2095
+ once.proto = once(function() {
2096
+ Object.defineProperty(Function.prototype, "once", {
2097
+ value: function() {
2098
+ return once(this);
2099
+ },
2100
+ configurable: true
2101
+ });
2102
+ Object.defineProperty(Function.prototype, "onceStrict", {
2103
+ value: function() {
2104
+ return onceStrict(this);
2105
+ },
2106
+ configurable: true
2107
+ });
2108
+ });
2109
+ function once(fn) {
2110
+ var f = function() {
2111
+ if (f.called)
2112
+ return f.value;
2113
+ f.called = true;
2114
+ return f.value = fn.apply(this, arguments);
2115
+ };
2116
+ f.called = false;
2117
+ return f;
2118
+ }
2119
+ function onceStrict(fn) {
2120
+ var f = function() {
2121
+ if (f.called)
2122
+ throw new Error(f.onceError);
2123
+ f.called = true;
2124
+ return f.value = fn.apply(this, arguments);
2125
+ };
2126
+ var name = fn.name || "Function wrapped with `once`";
2127
+ f.onceError = name + " shouldn't be called more than once";
2128
+ f.called = false;
2129
+ return f;
2130
+ }
2131
+ }
2132
+ });
2133
+
2134
+ // ../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js
2135
+ var require_inflight = __commonJS({
2136
+ "../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports2, module2) {
2137
+ var wrappy = require_wrappy();
2138
+ var reqs = /* @__PURE__ */ Object.create(null);
2139
+ var once = require_once();
2140
+ module2.exports = wrappy(inflight);
2141
+ function inflight(key, cb) {
2142
+ if (reqs[key]) {
2143
+ reqs[key].push(cb);
2144
+ return null;
2145
+ } else {
2146
+ reqs[key] = [cb];
2147
+ return makeres(key);
2148
+ }
2149
+ }
2150
+ function makeres(key) {
2151
+ return once(function RES() {
2152
+ var cbs = reqs[key];
2153
+ var len = cbs.length;
2154
+ var args = slice(arguments);
2155
+ try {
2156
+ for (var i = 0; i < len; i++) {
2157
+ cbs[i].apply(null, args);
2158
+ }
2159
+ } finally {
2160
+ if (cbs.length > len) {
2161
+ cbs.splice(0, len);
2162
+ process.nextTick(function() {
2163
+ RES.apply(null, args);
2164
+ });
2165
+ } else {
2166
+ delete reqs[key];
2167
+ }
2168
+ }
2169
+ });
2170
+ }
2171
+ function slice(args) {
2172
+ var length = args.length;
2173
+ var array = [];
2174
+ for (var i = 0; i < length; i++)
2175
+ array[i] = args[i];
2176
+ return array;
2177
+ }
2178
+ }
2179
+ });
2180
+
2181
+ // ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/glob.js
2182
+ var require_glob = __commonJS({
2183
+ "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/glob.js"(exports2, module2) {
2184
+ module2.exports = glob;
2185
+ var rp = require_fs();
2186
+ var minimatch = require_minimatch();
2187
+ var Minimatch = minimatch.Minimatch;
2188
+ var inherits = require_inherits();
2189
+ var EE = require("events").EventEmitter;
2190
+ var path = require("path");
2191
+ var assert = require("assert");
2192
+ var isAbsolute = require_path_is_absolute();
2193
+ var globSync = require_sync();
2194
+ var common = require_common();
2195
+ var setopts = common.setopts;
2196
+ var ownProp = common.ownProp;
2197
+ var inflight = require_inflight();
2198
+ var util = require("util");
2199
+ var childrenIgnored = common.childrenIgnored;
2200
+ var isIgnored = common.isIgnored;
2201
+ var once = require_once();
2202
+ function glob(pattern, options, cb) {
2203
+ if (typeof options === "function")
2204
+ cb = options, options = {};
2205
+ if (!options)
2206
+ options = {};
2207
+ if (options.sync) {
2208
+ if (cb)
2209
+ throw new TypeError("callback provided to sync glob");
2210
+ return globSync(pattern, options);
2211
+ }
2212
+ return new Glob(pattern, options, cb);
2213
+ }
2214
+ glob.sync = globSync;
2215
+ var GlobSync = glob.GlobSync = globSync.GlobSync;
2216
+ glob.glob = glob;
2217
+ function extend(origin, add) {
2218
+ if (add === null || typeof add !== "object") {
2219
+ return origin;
2220
+ }
2221
+ var keys = Object.keys(add);
2222
+ var i = keys.length;
2223
+ while (i--) {
2224
+ origin[keys[i]] = add[keys[i]];
2225
+ }
2226
+ return origin;
2227
+ }
2228
+ glob.hasMagic = function(pattern, options_) {
2229
+ var options = extend({}, options_);
2230
+ options.noprocess = true;
2231
+ var g = new Glob(pattern, options);
2232
+ var set = g.minimatch.set;
2233
+ if (!pattern)
2234
+ return false;
2235
+ if (set.length > 1)
2236
+ return true;
2237
+ for (var j = 0; j < set[0].length; j++) {
2238
+ if (typeof set[0][j] !== "string")
2239
+ return true;
2240
+ }
2241
+ return false;
2242
+ };
2243
+ glob.Glob = Glob;
2244
+ inherits(Glob, EE);
2245
+ function Glob(pattern, options, cb) {
2246
+ if (typeof options === "function") {
2247
+ cb = options;
2248
+ options = null;
2249
+ }
2250
+ if (options && options.sync) {
2251
+ if (cb)
2252
+ throw new TypeError("callback provided to sync glob");
2253
+ return new GlobSync(pattern, options);
2254
+ }
2255
+ if (!(this instanceof Glob))
2256
+ return new Glob(pattern, options, cb);
2257
+ setopts(this, pattern, options);
2258
+ this._didRealPath = false;
2259
+ var n = this.minimatch.set.length;
2260
+ this.matches = new Array(n);
2261
+ if (typeof cb === "function") {
2262
+ cb = once(cb);
2263
+ this.on("error", cb);
2264
+ this.on("end", function(matches) {
2265
+ cb(null, matches);
2266
+ });
2267
+ }
2268
+ var self = this;
2269
+ this._processing = 0;
2270
+ this._emitQueue = [];
2271
+ this._processQueue = [];
2272
+ this.paused = false;
2273
+ if (this.noprocess)
2274
+ return this;
2275
+ if (n === 0)
2276
+ return done();
2277
+ var sync = true;
2278
+ for (var i = 0; i < n; i++) {
2279
+ this._process(this.minimatch.set[i], i, false, done);
2280
+ }
2281
+ sync = false;
2282
+ function done() {
2283
+ --self._processing;
2284
+ if (self._processing <= 0) {
2285
+ if (sync) {
2286
+ process.nextTick(function() {
2287
+ self._finish();
2288
+ });
2289
+ } else {
2290
+ self._finish();
2291
+ }
2292
+ }
2293
+ }
2294
+ }
2295
+ Glob.prototype._finish = function() {
2296
+ assert(this instanceof Glob);
2297
+ if (this.aborted)
2298
+ return;
2299
+ if (this.realpath && !this._didRealpath)
2300
+ return this._realpath();
2301
+ common.finish(this);
2302
+ this.emit("end", this.found);
2303
+ };
2304
+ Glob.prototype._realpath = function() {
2305
+ if (this._didRealpath)
2306
+ return;
2307
+ this._didRealpath = true;
2308
+ var n = this.matches.length;
2309
+ if (n === 0)
2310
+ return this._finish();
2311
+ var self = this;
2312
+ for (var i = 0; i < this.matches.length; i++)
2313
+ this._realpathSet(i, next);
2314
+ function next() {
2315
+ if (--n === 0)
2316
+ self._finish();
2317
+ }
2318
+ };
2319
+ Glob.prototype._realpathSet = function(index, cb) {
2320
+ var matchset = this.matches[index];
2321
+ if (!matchset)
2322
+ return cb();
2323
+ var found = Object.keys(matchset);
2324
+ var self = this;
2325
+ var n = found.length;
2326
+ if (n === 0)
2327
+ return cb();
2328
+ var set = this.matches[index] = /* @__PURE__ */ Object.create(null);
2329
+ found.forEach(function(p, i) {
2330
+ p = self._makeAbs(p);
2331
+ rp.realpath(p, self.realpathCache, function(er, real) {
2332
+ if (!er)
2333
+ set[real] = true;
2334
+ else if (er.syscall === "stat")
2335
+ set[p] = true;
2336
+ else
2337
+ self.emit("error", er);
2338
+ if (--n === 0) {
2339
+ self.matches[index] = set;
2340
+ cb();
2341
+ }
2342
+ });
2343
+ });
2344
+ };
2345
+ Glob.prototype._mark = function(p) {
2346
+ return common.mark(this, p);
2347
+ };
2348
+ Glob.prototype._makeAbs = function(f) {
2349
+ return common.makeAbs(this, f);
2350
+ };
2351
+ Glob.prototype.abort = function() {
2352
+ this.aborted = true;
2353
+ this.emit("abort");
2354
+ };
2355
+ Glob.prototype.pause = function() {
2356
+ if (!this.paused) {
2357
+ this.paused = true;
2358
+ this.emit("pause");
2359
+ }
2360
+ };
2361
+ Glob.prototype.resume = function() {
2362
+ if (this.paused) {
2363
+ this.emit("resume");
2364
+ this.paused = false;
2365
+ if (this._emitQueue.length) {
2366
+ var eq = this._emitQueue.slice(0);
2367
+ this._emitQueue.length = 0;
2368
+ for (var i = 0; i < eq.length; i++) {
2369
+ var e = eq[i];
2370
+ this._emitMatch(e[0], e[1]);
2371
+ }
2372
+ }
2373
+ if (this._processQueue.length) {
2374
+ var pq = this._processQueue.slice(0);
2375
+ this._processQueue.length = 0;
2376
+ for (var i = 0; i < pq.length; i++) {
2377
+ var p = pq[i];
2378
+ this._processing--;
2379
+ this._process(p[0], p[1], p[2], p[3]);
2380
+ }
2381
+ }
2382
+ }
2383
+ };
2384
+ Glob.prototype._process = function(pattern, index, inGlobStar, cb) {
2385
+ assert(this instanceof Glob);
2386
+ assert(typeof cb === "function");
2387
+ if (this.aborted)
2388
+ return;
2389
+ this._processing++;
2390
+ if (this.paused) {
2391
+ this._processQueue.push([pattern, index, inGlobStar, cb]);
2392
+ return;
2393
+ }
2394
+ var n = 0;
2395
+ while (typeof pattern[n] === "string") {
2396
+ n++;
2397
+ }
2398
+ var prefix;
2399
+ switch (n) {
2400
+ case pattern.length:
2401
+ this._processSimple(pattern.join("/"), index, cb);
2402
+ return;
2403
+ case 0:
2404
+ prefix = null;
2405
+ break;
2406
+ default:
2407
+ prefix = pattern.slice(0, n).join("/");
2408
+ break;
2409
+ }
2410
+ var remain = pattern.slice(n);
2411
+ var read;
2412
+ if (prefix === null)
2413
+ read = ".";
2414
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
2415
+ if (!prefix || !isAbsolute(prefix))
2416
+ prefix = "/" + prefix;
2417
+ read = prefix;
2418
+ } else
2419
+ read = prefix;
2420
+ var abs = this._makeAbs(read);
2421
+ if (childrenIgnored(this, read))
2422
+ return cb();
2423
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR;
2424
+ if (isGlobStar)
2425
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb);
2426
+ else
2427
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb);
2428
+ };
2429
+ Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) {
2430
+ var self = this;
2431
+ this._readdir(abs, inGlobStar, function(er, entries) {
2432
+ return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
2433
+ });
2434
+ };
2435
+ Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
2436
+ if (!entries)
2437
+ return cb();
2438
+ var pn = remain[0];
2439
+ var negate = !!this.minimatch.negate;
2440
+ var rawGlob = pn._glob;
2441
+ var dotOk = this.dot || rawGlob.charAt(0) === ".";
2442
+ var matchedEntries = [];
2443
+ for (var i = 0; i < entries.length; i++) {
2444
+ var e = entries[i];
2445
+ if (e.charAt(0) !== "." || dotOk) {
2446
+ var m;
2447
+ if (negate && !prefix) {
2448
+ m = !e.match(pn);
2449
+ } else {
2450
+ m = e.match(pn);
2451
+ }
2452
+ if (m)
2453
+ matchedEntries.push(e);
2454
+ }
2455
+ }
2456
+ var len = matchedEntries.length;
2457
+ if (len === 0)
2458
+ return cb();
2459
+ if (remain.length === 1 && !this.mark && !this.stat) {
2460
+ if (!this.matches[index])
2461
+ this.matches[index] = /* @__PURE__ */ Object.create(null);
2462
+ for (var i = 0; i < len; i++) {
2463
+ var e = matchedEntries[i];
2464
+ if (prefix) {
2465
+ if (prefix !== "/")
2466
+ e = prefix + "/" + e;
2467
+ else
2468
+ e = prefix + e;
2469
+ }
2470
+ if (e.charAt(0) === "/" && !this.nomount) {
2471
+ e = path.join(this.root, e);
2472
+ }
2473
+ this._emitMatch(index, e);
2474
+ }
2475
+ return cb();
2476
+ }
2477
+ remain.shift();
2478
+ for (var i = 0; i < len; i++) {
2479
+ var e = matchedEntries[i];
2480
+ var newPattern;
2481
+ if (prefix) {
2482
+ if (prefix !== "/")
2483
+ e = prefix + "/" + e;
2484
+ else
2485
+ e = prefix + e;
2486
+ }
2487
+ this._process([e].concat(remain), index, inGlobStar, cb);
2488
+ }
2489
+ cb();
2490
+ };
2491
+ Glob.prototype._emitMatch = function(index, e) {
2492
+ if (this.aborted)
2493
+ return;
2494
+ if (isIgnored(this, e))
2495
+ return;
2496
+ if (this.paused) {
2497
+ this._emitQueue.push([index, e]);
2498
+ return;
2499
+ }
2500
+ var abs = isAbsolute(e) ? e : this._makeAbs(e);
2501
+ if (this.mark)
2502
+ e = this._mark(e);
2503
+ if (this.absolute)
2504
+ e = abs;
2505
+ if (this.matches[index][e])
2506
+ return;
2507
+ if (this.nodir) {
2508
+ var c = this.cache[abs];
2509
+ if (c === "DIR" || Array.isArray(c))
2510
+ return;
2511
+ }
2512
+ this.matches[index][e] = true;
2513
+ var st = this.statCache[abs];
2514
+ if (st)
2515
+ this.emit("stat", e, st);
2516
+ this.emit("match", e);
2517
+ };
2518
+ Glob.prototype._readdirInGlobStar = function(abs, cb) {
2519
+ if (this.aborted)
2520
+ return;
2521
+ if (this.follow)
2522
+ return this._readdir(abs, false, cb);
2523
+ var lstatkey = "lstat\0" + abs;
2524
+ var self = this;
2525
+ var lstatcb = inflight(lstatkey, lstatcb_);
2526
+ if (lstatcb)
2527
+ self.fs.lstat(abs, lstatcb);
2528
+ function lstatcb_(er, lstat) {
2529
+ if (er && er.code === "ENOENT")
2530
+ return cb();
2531
+ var isSym = lstat && lstat.isSymbolicLink();
2532
+ self.symlinks[abs] = isSym;
2533
+ if (!isSym && lstat && !lstat.isDirectory()) {
2534
+ self.cache[abs] = "FILE";
2535
+ cb();
2536
+ } else
2537
+ self._readdir(abs, false, cb);
2538
+ }
2539
+ };
2540
+ Glob.prototype._readdir = function(abs, inGlobStar, cb) {
2541
+ if (this.aborted)
2542
+ return;
2543
+ cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb);
2544
+ if (!cb)
2545
+ return;
2546
+ if (inGlobStar && !ownProp(this.symlinks, abs))
2547
+ return this._readdirInGlobStar(abs, cb);
2548
+ if (ownProp(this.cache, abs)) {
2549
+ var c = this.cache[abs];
2550
+ if (!c || c === "FILE")
2551
+ return cb();
2552
+ if (Array.isArray(c))
2553
+ return cb(null, c);
2554
+ }
2555
+ var self = this;
2556
+ self.fs.readdir(abs, readdirCb(this, abs, cb));
2557
+ };
2558
+ function readdirCb(self, abs, cb) {
2559
+ return function(er, entries) {
2560
+ if (er)
2561
+ self._readdirError(abs, er, cb);
2562
+ else
2563
+ self._readdirEntries(abs, entries, cb);
2564
+ };
2565
+ }
2566
+ Glob.prototype._readdirEntries = function(abs, entries, cb) {
2567
+ if (this.aborted)
2568
+ return;
2569
+ if (!this.mark && !this.stat) {
2570
+ for (var i = 0; i < entries.length; i++) {
2571
+ var e = entries[i];
2572
+ if (abs === "/")
2573
+ e = abs + e;
2574
+ else
2575
+ e = abs + "/" + e;
2576
+ this.cache[e] = true;
2577
+ }
2578
+ }
2579
+ this.cache[abs] = entries;
2580
+ return cb(null, entries);
2581
+ };
2582
+ Glob.prototype._readdirError = function(f, er, cb) {
2583
+ if (this.aborted)
2584
+ return;
2585
+ switch (er.code) {
2586
+ case "ENOTSUP":
2587
+ case "ENOTDIR":
2588
+ var abs = this._makeAbs(f);
2589
+ this.cache[abs] = "FILE";
2590
+ if (abs === this.cwdAbs) {
2591
+ var error = new Error(er.code + " invalid cwd " + this.cwd);
2592
+ error.path = this.cwd;
2593
+ error.code = er.code;
2594
+ this.emit("error", error);
2595
+ this.abort();
2596
+ }
2597
+ break;
2598
+ case "ENOENT":
2599
+ case "ELOOP":
2600
+ case "ENAMETOOLONG":
2601
+ case "UNKNOWN":
2602
+ this.cache[this._makeAbs(f)] = false;
2603
+ break;
2604
+ default:
2605
+ this.cache[this._makeAbs(f)] = false;
2606
+ if (this.strict) {
2607
+ this.emit("error", er);
2608
+ this.abort();
2609
+ }
2610
+ if (!this.silent)
2611
+ console.error("glob error", er);
2612
+ break;
2613
+ }
2614
+ return cb();
2615
+ };
2616
+ Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) {
2617
+ var self = this;
2618
+ this._readdir(abs, inGlobStar, function(er, entries) {
2619
+ self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
2620
+ });
2621
+ };
2622
+ Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
2623
+ if (!entries)
2624
+ return cb();
2625
+ var remainWithoutGlobStar = remain.slice(1);
2626
+ var gspref = prefix ? [prefix] : [];
2627
+ var noGlobStar = gspref.concat(remainWithoutGlobStar);
2628
+ this._process(noGlobStar, index, false, cb);
2629
+ var isSym = this.symlinks[abs];
2630
+ var len = entries.length;
2631
+ if (isSym && inGlobStar)
2632
+ return cb();
2633
+ for (var i = 0; i < len; i++) {
2634
+ var e = entries[i];
2635
+ if (e.charAt(0) === "." && !this.dot)
2636
+ continue;
2637
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar);
2638
+ this._process(instead, index, true, cb);
2639
+ var below = gspref.concat(entries[i], remain);
2640
+ this._process(below, index, true, cb);
2641
+ }
2642
+ cb();
2643
+ };
2644
+ Glob.prototype._processSimple = function(prefix, index, cb) {
2645
+ var self = this;
2646
+ this._stat(prefix, function(er, exists) {
2647
+ self._processSimple2(prefix, index, er, exists, cb);
2648
+ });
2649
+ };
2650
+ Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) {
2651
+ if (!this.matches[index])
2652
+ this.matches[index] = /* @__PURE__ */ Object.create(null);
2653
+ if (!exists)
2654
+ return cb();
2655
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
2656
+ var trail = /[\/\\]$/.test(prefix);
2657
+ if (prefix.charAt(0) === "/") {
2658
+ prefix = path.join(this.root, prefix);
2659
+ } else {
2660
+ prefix = path.resolve(this.root, prefix);
2661
+ if (trail)
2662
+ prefix += "/";
2663
+ }
2664
+ }
2665
+ if (process.platform === "win32")
2666
+ prefix = prefix.replace(/\\/g, "/");
2667
+ this._emitMatch(index, prefix);
2668
+ cb();
2669
+ };
2670
+ Glob.prototype._stat = function(f, cb) {
2671
+ var abs = this._makeAbs(f);
2672
+ var needDir = f.slice(-1) === "/";
2673
+ if (f.length > this.maxLength)
2674
+ return cb();
2675
+ if (!this.stat && ownProp(this.cache, abs)) {
2676
+ var c = this.cache[abs];
2677
+ if (Array.isArray(c))
2678
+ c = "DIR";
2679
+ if (!needDir || c === "DIR")
2680
+ return cb(null, c);
2681
+ if (needDir && c === "FILE")
2682
+ return cb();
2683
+ }
2684
+ var exists;
2685
+ var stat = this.statCache[abs];
2686
+ if (stat !== void 0) {
2687
+ if (stat === false)
2688
+ return cb(null, stat);
2689
+ else {
2690
+ var type = stat.isDirectory() ? "DIR" : "FILE";
2691
+ if (needDir && type === "FILE")
2692
+ return cb();
2693
+ else
2694
+ return cb(null, type, stat);
2695
+ }
2696
+ }
2697
+ var self = this;
2698
+ var statcb = inflight("stat\0" + abs, lstatcb_);
2699
+ if (statcb)
2700
+ self.fs.lstat(abs, statcb);
2701
+ function lstatcb_(er, lstat) {
2702
+ if (lstat && lstat.isSymbolicLink()) {
2703
+ return self.fs.stat(abs, function(er2, stat2) {
2704
+ if (er2)
2705
+ self._stat2(f, abs, null, lstat, cb);
2706
+ else
2707
+ self._stat2(f, abs, er2, stat2, cb);
2708
+ });
2709
+ } else {
2710
+ self._stat2(f, abs, er, lstat, cb);
2711
+ }
2712
+ }
2713
+ };
2714
+ Glob.prototype._stat2 = function(f, abs, er, stat, cb) {
2715
+ if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
2716
+ this.statCache[abs] = false;
2717
+ return cb();
2718
+ }
2719
+ var needDir = f.slice(-1) === "/";
2720
+ this.statCache[abs] = stat;
2721
+ if (abs.slice(-1) === "/" && stat && !stat.isDirectory())
2722
+ return cb(null, false, stat);
2723
+ var c = true;
2724
+ if (stat)
2725
+ c = stat.isDirectory() ? "DIR" : "FILE";
2726
+ this.cache[abs] = this.cache[abs] || c;
2727
+ if (needDir && c === "FILE")
2728
+ return cb();
2729
+ return cb(null, c, stat);
2730
+ };
2731
+ }
2732
+ });
2733
+
2734
+ // ../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js
385
2735
  var require_rimraf = __commonJS({
386
- "../../node_modules/.pnpm/@zkochan+rimraf@2.1.1/node_modules/@zkochan/rimraf/index.js"(exports2, module2) {
2736
+ "../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js"(exports2, module2) {
2737
+ var assert = require("assert");
2738
+ var path = require("path");
387
2739
  var fs = require("fs");
388
- var rm = fs.promises.rm ? fs.promises.rm : fs.promises.rmdir;
389
- var rmdirSync = fs.rmSync ? fs.rmSync : fs.rmdirSync;
2740
+ var glob = void 0;
2741
+ try {
2742
+ glob = require_glob();
2743
+ } catch (_err) {
2744
+ }
2745
+ var defaultGlobOpts = {
2746
+ nosort: true,
2747
+ silent: true
2748
+ };
2749
+ var timeout = 0;
2750
+ var isWindows = process.platform === "win32";
2751
+ var defaults = (options) => {
2752
+ const methods = [
2753
+ "unlink",
2754
+ "chmod",
2755
+ "stat",
2756
+ "lstat",
2757
+ "rmdir",
2758
+ "readdir"
2759
+ ];
2760
+ methods.forEach((m) => {
2761
+ options[m] = options[m] || fs[m];
2762
+ m = m + "Sync";
2763
+ options[m] = options[m] || fs[m];
2764
+ });
2765
+ options.maxBusyTries = options.maxBusyTries || 3;
2766
+ options.emfileWait = options.emfileWait || 1e3;
2767
+ if (options.glob === false) {
2768
+ options.disableGlob = true;
2769
+ }
2770
+ if (options.disableGlob !== true && glob === void 0) {
2771
+ throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");
2772
+ }
2773
+ options.disableGlob = options.disableGlob || false;
2774
+ options.glob = options.glob || defaultGlobOpts;
2775
+ };
2776
+ var rimraf = (p, options, cb) => {
2777
+ if (typeof options === "function") {
2778
+ cb = options;
2779
+ options = {};
2780
+ }
2781
+ assert(p, "rimraf: missing path");
2782
+ assert.equal(typeof p, "string", "rimraf: path should be a string");
2783
+ assert.equal(typeof cb, "function", "rimraf: callback function required");
2784
+ assert(options, "rimraf: invalid options argument provided");
2785
+ assert.equal(typeof options, "object", "rimraf: options should be object");
2786
+ defaults(options);
2787
+ let busyTries = 0;
2788
+ let errState = null;
2789
+ let n = 0;
2790
+ const next = (er) => {
2791
+ errState = errState || er;
2792
+ if (--n === 0)
2793
+ cb(errState);
2794
+ };
2795
+ const afterGlob = (er, results) => {
2796
+ if (er)
2797
+ return cb(er);
2798
+ n = results.length;
2799
+ if (n === 0)
2800
+ return cb();
2801
+ results.forEach((p2) => {
2802
+ const CB = (er2) => {
2803
+ if (er2) {
2804
+ if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) {
2805
+ busyTries++;
2806
+ return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100);
2807
+ }
2808
+ if (er2.code === "EMFILE" && timeout < options.emfileWait) {
2809
+ return setTimeout(() => rimraf_(p2, options, CB), timeout++);
2810
+ }
2811
+ if (er2.code === "ENOENT")
2812
+ er2 = null;
2813
+ }
2814
+ timeout = 0;
2815
+ next(er2);
2816
+ };
2817
+ rimraf_(p2, options, CB);
2818
+ });
2819
+ };
2820
+ if (options.disableGlob || !glob.hasMagic(p))
2821
+ return afterGlob(null, [p]);
2822
+ options.lstat(p, (er, stat) => {
2823
+ if (!er)
2824
+ return afterGlob(null, [p]);
2825
+ glob(p, options.glob, afterGlob);
2826
+ });
2827
+ };
2828
+ var rimraf_ = (p, options, cb) => {
2829
+ assert(p);
2830
+ assert(options);
2831
+ assert(typeof cb === "function");
2832
+ options.lstat(p, (er, st) => {
2833
+ if (er && er.code === "ENOENT")
2834
+ return cb(null);
2835
+ if (er && er.code === "EPERM" && isWindows)
2836
+ fixWinEPERM(p, options, er, cb);
2837
+ if (st && st.isDirectory())
2838
+ return rmdir(p, options, er, cb);
2839
+ options.unlink(p, (er2) => {
2840
+ if (er2) {
2841
+ if (er2.code === "ENOENT")
2842
+ return cb(null);
2843
+ if (er2.code === "EPERM")
2844
+ return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb);
2845
+ if (er2.code === "EISDIR")
2846
+ return rmdir(p, options, er2, cb);
2847
+ }
2848
+ return cb(er2);
2849
+ });
2850
+ });
2851
+ };
2852
+ var fixWinEPERM = (p, options, er, cb) => {
2853
+ assert(p);
2854
+ assert(options);
2855
+ assert(typeof cb === "function");
2856
+ options.chmod(p, 438, (er2) => {
2857
+ if (er2)
2858
+ cb(er2.code === "ENOENT" ? null : er);
2859
+ else
2860
+ options.stat(p, (er3, stats) => {
2861
+ if (er3)
2862
+ cb(er3.code === "ENOENT" ? null : er);
2863
+ else if (stats.isDirectory())
2864
+ rmdir(p, options, er, cb);
2865
+ else
2866
+ options.unlink(p, cb);
2867
+ });
2868
+ });
2869
+ };
2870
+ var fixWinEPERMSync = (p, options, er) => {
2871
+ assert(p);
2872
+ assert(options);
2873
+ try {
2874
+ options.chmodSync(p, 438);
2875
+ } catch (er2) {
2876
+ if (er2.code === "ENOENT")
2877
+ return;
2878
+ else
2879
+ throw er;
2880
+ }
2881
+ let stats;
2882
+ try {
2883
+ stats = options.statSync(p);
2884
+ } catch (er3) {
2885
+ if (er3.code === "ENOENT")
2886
+ return;
2887
+ else
2888
+ throw er;
2889
+ }
2890
+ if (stats.isDirectory())
2891
+ rmdirSync(p, options, er);
2892
+ else
2893
+ options.unlinkSync(p);
2894
+ };
2895
+ var rmdir = (p, options, originalEr, cb) => {
2896
+ assert(p);
2897
+ assert(options);
2898
+ assert(typeof cb === "function");
2899
+ options.rmdir(p, (er) => {
2900
+ if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
2901
+ rmkids(p, options, cb);
2902
+ else if (er && er.code === "ENOTDIR")
2903
+ cb(originalEr);
2904
+ else
2905
+ cb(er);
2906
+ });
2907
+ };
2908
+ var rmkids = (p, options, cb) => {
2909
+ assert(p);
2910
+ assert(options);
2911
+ assert(typeof cb === "function");
2912
+ options.readdir(p, (er, files) => {
2913
+ if (er)
2914
+ return cb(er);
2915
+ let n = files.length;
2916
+ if (n === 0)
2917
+ return options.rmdir(p, cb);
2918
+ let errState;
2919
+ files.forEach((f) => {
2920
+ rimraf(path.join(p, f), options, (er2) => {
2921
+ if (errState)
2922
+ return;
2923
+ if (er2)
2924
+ return cb(errState = er2);
2925
+ if (--n === 0)
2926
+ options.rmdir(p, cb);
2927
+ });
2928
+ });
2929
+ });
2930
+ };
2931
+ var rimrafSync = (p, options) => {
2932
+ options = options || {};
2933
+ defaults(options);
2934
+ assert(p, "rimraf: missing path");
2935
+ assert.equal(typeof p, "string", "rimraf: path should be a string");
2936
+ assert(options, "rimraf: missing options");
2937
+ assert.equal(typeof options, "object", "rimraf: options should be object");
2938
+ let results;
2939
+ if (options.disableGlob || !glob.hasMagic(p)) {
2940
+ results = [p];
2941
+ } else {
2942
+ try {
2943
+ options.lstatSync(p);
2944
+ results = [p];
2945
+ } catch (er) {
2946
+ results = glob.sync(p, options.glob);
2947
+ }
2948
+ }
2949
+ if (!results.length)
2950
+ return;
2951
+ for (let i = 0; i < results.length; i++) {
2952
+ const p2 = results[i];
2953
+ let st;
2954
+ try {
2955
+ st = options.lstatSync(p2);
2956
+ } catch (er) {
2957
+ if (er.code === "ENOENT")
2958
+ return;
2959
+ if (er.code === "EPERM" && isWindows)
2960
+ fixWinEPERMSync(p2, options, er);
2961
+ }
2962
+ try {
2963
+ if (st && st.isDirectory())
2964
+ rmdirSync(p2, options, null);
2965
+ else
2966
+ options.unlinkSync(p2);
2967
+ } catch (er) {
2968
+ if (er.code === "ENOENT")
2969
+ return;
2970
+ if (er.code === "EPERM")
2971
+ return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er);
2972
+ if (er.code !== "EISDIR")
2973
+ throw er;
2974
+ rmdirSync(p2, options, er);
2975
+ }
2976
+ }
2977
+ };
2978
+ var rmdirSync = (p, options, originalEr) => {
2979
+ assert(p);
2980
+ assert(options);
2981
+ try {
2982
+ options.rmdirSync(p);
2983
+ } catch (er) {
2984
+ if (er.code === "ENOENT")
2985
+ return;
2986
+ if (er.code === "ENOTDIR")
2987
+ throw originalEr;
2988
+ if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
2989
+ rmkidsSync(p, options);
2990
+ }
2991
+ };
2992
+ var rmkidsSync = (p, options) => {
2993
+ assert(p);
2994
+ assert(options);
2995
+ options.readdirSync(p).forEach((f) => rimrafSync(path.join(p, f), options));
2996
+ const retries = isWindows ? 100 : 1;
2997
+ let i = 0;
2998
+ do {
2999
+ let threw = true;
3000
+ try {
3001
+ const ret = options.rmdirSync(p, options);
3002
+ threw = false;
3003
+ return ret;
3004
+ } finally {
3005
+ if (++i < retries && threw)
3006
+ continue;
3007
+ }
3008
+ } while (true);
3009
+ };
3010
+ module2.exports = rimraf;
3011
+ rimraf.sync = rimrafSync;
3012
+ }
3013
+ });
3014
+
3015
+ // ../../node_modules/.pnpm/@zkochan+rimraf@2.1.2/node_modules/@zkochan/rimraf/index.js
3016
+ var require_rimraf2 = __commonJS({
3017
+ "../../node_modules/.pnpm/@zkochan+rimraf@2.1.2/node_modules/@zkochan/rimraf/index.js"(exports2, module2) {
3018
+ var rimraf = require_rimraf();
3019
+ var { promisify } = require("util");
3020
+ var rimrafP = promisify(rimraf);
390
3021
  module2.exports = async (p) => {
391
3022
  try {
392
- await rm(p, { recursive: true, maxRetries: 3 });
3023
+ await rimrafP(p);
393
3024
  } catch (err) {
394
3025
  if (err.code === "ENOTDIR" || err.code === "ENOENT")
395
3026
  return;
@@ -398,7 +3029,7 @@ var require_rimraf = __commonJS({
398
3029
  };
399
3030
  module2.exports.sync = (p) => {
400
3031
  try {
401
- rmdirSync(p, { recursive: true, maxRetries: 3 });
3032
+ rimraf.sync(p);
402
3033
  } catch (err) {
403
3034
  if (err.code === "ENOTDIR" || err.code === "ENOENT")
404
3035
  return;
@@ -764,7 +3395,7 @@ var require_lib3 = __commonJS({
764
3395
  "use strict";
765
3396
  Object.defineProperty(exports2, "__esModule", { value: true });
766
3397
  var fs_1 = require("fs");
767
- var rimraf = require_rimraf();
3398
+ var rimraf = require_rimraf2();
768
3399
  var canLink = require_can_link();
769
3400
  var os = require("os");
770
3401
  var path = require("path");
@@ -15124,7 +17755,7 @@ var require_libnpx = __commonJS({
15124
17755
  const prefix = path.join(cache, "_npx", process.pid.toString());
15125
17756
  const bins = process.platform === "win32" ? prefix : path.join(prefix, "bin");
15126
17757
  fs.mkdirSync(prefix, { recursive: true });
15127
- const rimraf = require_rimraf();
17758
+ const rimraf = require_rimraf2();
15128
17759
  process.on("exit", () => {
15129
17760
  try {
15130
17761
  fs.rmdirSync(prefix, {