immosquare-cleaner 0.1.38 → 0.1.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/immosquare-cleaner/version.rb +1 -1
  3. data/node_modules/@eslint/config-array/LICENSE +201 -0
  4. data/node_modules/@eslint/config-array/README.md +340 -0
  5. data/node_modules/@eslint/config-array/dist/cjs/index.cjs +1260 -0
  6. data/node_modules/@eslint/config-array/dist/cjs/index.d.cts +146 -0
  7. data/node_modules/@eslint/config-array/dist/cjs/types.ts +24 -0
  8. data/node_modules/@eslint/config-array/dist/esm/index.d.ts +146 -0
  9. data/node_modules/@eslint/config-array/dist/esm/index.js +1258 -0
  10. data/node_modules/@eslint/config-array/dist/esm/types.d.ts +19 -0
  11. data/node_modules/@eslint/config-array/dist/esm/types.ts +24 -0
  12. data/node_modules/@eslint/config-array/node_modules/minimatch/LICENSE +15 -0
  13. data/node_modules/@eslint/config-array/node_modules/minimatch/README.md +230 -0
  14. data/node_modules/@eslint/config-array/node_modules/minimatch/minimatch.js +947 -0
  15. data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/LICENSE +21 -0
  16. data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/README.md +129 -0
  17. data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/index.js +201 -0
  18. data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/package.json +47 -0
  19. data/node_modules/@eslint/config-array/node_modules/minimatch/package.json +33 -0
  20. data/node_modules/@eslint/config-array/package.json +60 -0
  21. data/node_modules/@eslint/js/package.json +1 -1
  22. data/node_modules/@eslint/object-schema/LICENSE +201 -0
  23. data/node_modules/@eslint/object-schema/README.md +224 -0
  24. data/node_modules/@eslint/object-schema/dist/cjs/index.cjs +455 -0
  25. data/node_modules/@eslint/object-schema/dist/cjs/index.d.cts +123 -0
  26. data/node_modules/@eslint/object-schema/dist/cjs/types.ts +55 -0
  27. data/node_modules/@eslint/object-schema/dist/esm/index.d.ts +123 -0
  28. data/node_modules/@eslint/object-schema/dist/esm/index.js +452 -0
  29. data/node_modules/@eslint/object-schema/dist/esm/types.d.ts +40 -0
  30. data/node_modules/@eslint/object-schema/dist/esm/types.ts +55 -0
  31. data/node_modules/@eslint/object-schema/package.json +56 -0
  32. data/node_modules/eslint/lib/cli.js +2 -2
  33. data/node_modules/eslint/lib/config/flat-config-array.js +1 -1
  34. data/node_modules/eslint/lib/eslint/eslint-helpers.js +7 -7
  35. data/node_modules/eslint/lib/eslint/eslint.js +1 -10
  36. data/node_modules/eslint/lib/rule-tester/rule-tester.js +1 -1
  37. data/node_modules/eslint/lib/rules/func-style.js +4 -4
  38. data/node_modules/eslint/lib/rules/no-constructor-return.js +1 -1
  39. data/node_modules/eslint/lib/rules/no-loop-func.js +161 -129
  40. data/node_modules/eslint/package.json +3 -3
  41. data/node_modules/prettier/LICENSE +56 -535
  42. data/node_modules/prettier/bin/prettier.cjs +4 -8
  43. data/node_modules/prettier/doc.js +20 -29
  44. data/node_modules/prettier/doc.mjs +20 -29
  45. data/node_modules/prettier/index.cjs +1 -1
  46. data/node_modules/prettier/index.d.ts +4 -2
  47. data/node_modules/prettier/index.mjs +3109 -4509
  48. data/node_modules/prettier/internal/cli.mjs +339 -3544
  49. data/node_modules/prettier/package.json +1 -1
  50. data/node_modules/prettier/plugins/acorn.js +11 -11
  51. data/node_modules/prettier/plugins/acorn.mjs +11 -11
  52. data/node_modules/prettier/plugins/angular.js +1 -1
  53. data/node_modules/prettier/plugins/angular.mjs +1 -1
  54. data/node_modules/prettier/plugins/babel.js +11 -11
  55. data/node_modules/prettier/plugins/babel.mjs +11 -11
  56. data/node_modules/prettier/plugins/estree.js +28 -28
  57. data/node_modules/prettier/plugins/estree.mjs +28 -28
  58. data/node_modules/prettier/plugins/flow.js +16 -17
  59. data/node_modules/prettier/plugins/flow.mjs +16 -17
  60. data/node_modules/prettier/plugins/glimmer.js +22 -22
  61. data/node_modules/prettier/plugins/glimmer.mjs +22 -22
  62. data/node_modules/prettier/plugins/graphql.js +4 -4
  63. data/node_modules/prettier/plugins/graphql.mjs +4 -4
  64. data/node_modules/prettier/plugins/html.js +15 -15
  65. data/node_modules/prettier/plugins/html.mjs +15 -15
  66. data/node_modules/prettier/plugins/markdown.js +42 -42
  67. data/node_modules/prettier/plugins/markdown.mjs +42 -42
  68. data/node_modules/prettier/plugins/meriyah.js +5 -5
  69. data/node_modules/prettier/plugins/meriyah.mjs +5 -5
  70. data/node_modules/prettier/plugins/postcss.js +26 -26
  71. data/node_modules/prettier/plugins/postcss.mjs +26 -26
  72. data/node_modules/prettier/plugins/typescript.js +20 -20
  73. data/node_modules/prettier/plugins/typescript.mjs +20 -20
  74. data/node_modules/prettier/plugins/yaml.js +32 -32
  75. data/node_modules/prettier/plugins/yaml.mjs +32 -32
  76. data/node_modules/prettier/standalone.js +26 -26
  77. data/node_modules/prettier/standalone.mjs +26 -26
  78. data/package.json +3 -3
  79. metadata +30 -2
@@ -11,11 +11,13 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
11
  var __getOwnPropNames = Object.getOwnPropertyNames;
12
12
  var __getProtoOf = Object.getPrototypeOf;
13
13
  var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __typeError = (msg) => {
15
+ throw TypeError(msg);
16
+ };
14
17
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
15
18
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
16
19
  }) : x)(function(x) {
17
- if (typeof require !== "undefined")
18
- return require.apply(this, arguments);
20
+ if (typeof require !== "undefined") return require.apply(this, arguments);
19
21
  throw Error('Dynamic require of "' + x + '" is not supported');
20
22
  });
21
23
  var __commonJS = (cb, mod) => function __require2() {
@@ -37,32 +39,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
39
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
40
  mod
39
41
  ));
40
- var __accessCheck = (obj, member, msg) => {
41
- if (!member.has(obj))
42
- throw TypeError("Cannot " + msg);
43
- };
44
- var __privateGet = (obj, member, getter) => {
45
- __accessCheck(obj, member, "read from private field");
46
- return getter ? getter.call(obj) : member.get(obj);
47
- };
48
- var __privateAdd = (obj, member, value) => {
49
- if (member.has(obj))
50
- throw TypeError("Cannot add the same private member more than once");
51
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
52
- };
53
- var __privateSet = (obj, member, value, setter) => {
54
- __accessCheck(obj, member, "write to private field");
55
- setter ? setter.call(obj, value) : member.set(obj, value);
56
- return value;
57
- };
42
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
43
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
44
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
45
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
58
46
 
59
47
  // node_modules/dashify/index.js
60
48
  var require_dashify = __commonJS({
61
49
  "node_modules/dashify/index.js"(exports, module) {
62
50
  "use strict";
63
51
  module.exports = (str, options) => {
64
- if (typeof str !== "string")
65
- throw new TypeError("expected a string");
52
+ if (typeof str !== "string") throw new TypeError("expected a string");
66
53
  return str.trim().replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\W/g, (m) => /[À-ž]/.test(m) ? m : "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, (m) => options && options.condense ? "-" : m).toLowerCase();
67
54
  };
68
55
  }
@@ -295,10 +282,8 @@ var require_fast_json_stable_stringify = __commonJS({
295
282
  "node_modules/fast-json-stable-stringify/index.js"(exports, module) {
296
283
  "use strict";
297
284
  module.exports = function(data, opts) {
298
- if (!opts)
299
- opts = {};
300
- if (typeof opts === "function")
301
- opts = { cmp: opts };
285
+ if (!opts) opts = {};
286
+ if (typeof opts === "function") opts = { cmp: opts };
302
287
  var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false;
303
288
  var cmp = opts.cmp && /* @__PURE__ */ function(f) {
304
289
  return function(node) {
@@ -314,27 +299,21 @@ var require_fast_json_stable_stringify = __commonJS({
314
299
  if (node && node.toJSON && typeof node.toJSON === "function") {
315
300
  node = node.toJSON();
316
301
  }
317
- if (node === void 0)
318
- return;
319
- if (typeof node == "number")
320
- return isFinite(node) ? "" + node : "null";
321
- if (typeof node !== "object")
322
- return JSON.stringify(node);
302
+ if (node === void 0) return;
303
+ if (typeof node == "number") return isFinite(node) ? "" + node : "null";
304
+ if (typeof node !== "object") return JSON.stringify(node);
323
305
  var i, out;
324
306
  if (Array.isArray(node)) {
325
307
  out = "[";
326
308
  for (i = 0; i < node.length; i++) {
327
- if (i)
328
- out += ",";
309
+ if (i) out += ",";
329
310
  out += stringify4(node[i]) || "null";
330
311
  }
331
312
  return out + "]";
332
313
  }
333
- if (node === null)
334
- return "null";
314
+ if (node === null) return "null";
335
315
  if (seen.indexOf(node) !== -1) {
336
- if (cycles)
337
- return JSON.stringify("__cycle__");
316
+ if (cycles) return JSON.stringify("__cycle__");
338
317
  throw new TypeError("Converting circular structure to JSON");
339
318
  }
340
319
  var seenIndex = seen.push(node) - 1;
@@ -343,10 +322,8 @@ var require_fast_json_stable_stringify = __commonJS({
343
322
  for (i = 0; i < keys.length; i++) {
344
323
  var key = keys[i];
345
324
  var value = stringify4(node[key]);
346
- if (!value)
347
- continue;
348
- if (out)
349
- out += ",";
325
+ if (!value) continue;
326
+ if (out) out += ",";
350
327
  out += JSON.stringify(key) + ":" + value;
351
328
  }
352
329
  seen.splice(seenIndex, 1);
@@ -356,512 +333,6 @@ var require_fast_json_stable_stringify = __commonJS({
356
333
  }
357
334
  });
358
335
 
359
- // node_modules/diff/lib/diff/base.js
360
- var require_base = __commonJS({
361
- "node_modules/diff/lib/diff/base.js"(exports) {
362
- "use strict";
363
- Object.defineProperty(exports, "__esModule", {
364
- value: true
365
- });
366
- exports["default"] = Diff;
367
- function Diff() {
368
- }
369
- Diff.prototype = {
370
- /*istanbul ignore start*/
371
- /*istanbul ignore end*/
372
- diff: function diff2(oldString, newString) {
373
- var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
374
- var callback = options.callback;
375
- if (typeof options === "function") {
376
- callback = options;
377
- options = {};
378
- }
379
- this.options = options;
380
- var self = this;
381
- function done(value) {
382
- if (callback) {
383
- setTimeout(function() {
384
- callback(void 0, value);
385
- }, 0);
386
- return true;
387
- } else {
388
- return value;
389
- }
390
- }
391
- oldString = this.castInput(oldString);
392
- newString = this.castInput(newString);
393
- oldString = this.removeEmpty(this.tokenize(oldString));
394
- newString = this.removeEmpty(this.tokenize(newString));
395
- var newLen = newString.length, oldLen = oldString.length;
396
- var editLength = 1;
397
- var maxEditLength = newLen + oldLen;
398
- if (options.maxEditLength) {
399
- maxEditLength = Math.min(maxEditLength, options.maxEditLength);
400
- }
401
- var bestPath = [{
402
- newPos: -1,
403
- components: []
404
- }];
405
- var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
406
- if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
407
- return done([{
408
- value: this.join(newString),
409
- count: newString.length
410
- }]);
411
- }
412
- function execEditLength() {
413
- for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
414
- var basePath = (
415
- /*istanbul ignore start*/
416
- void 0
417
- );
418
- var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
419
- if (addPath) {
420
- bestPath[diagonalPath - 1] = void 0;
421
- }
422
- var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
423
- if (!canAdd && !canRemove) {
424
- bestPath[diagonalPath] = void 0;
425
- continue;
426
- }
427
- if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
428
- basePath = clonePath(removePath);
429
- self.pushComponent(basePath.components, void 0, true);
430
- } else {
431
- basePath = addPath;
432
- basePath.newPos++;
433
- self.pushComponent(basePath.components, true, void 0);
434
- }
435
- _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
436
- if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
437
- return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
438
- } else {
439
- bestPath[diagonalPath] = basePath;
440
- }
441
- }
442
- editLength++;
443
- }
444
- if (callback) {
445
- (function exec() {
446
- setTimeout(function() {
447
- if (editLength > maxEditLength) {
448
- return callback();
449
- }
450
- if (!execEditLength()) {
451
- exec();
452
- }
453
- }, 0);
454
- })();
455
- } else {
456
- while (editLength <= maxEditLength) {
457
- var ret = execEditLength();
458
- if (ret) {
459
- return ret;
460
- }
461
- }
462
- }
463
- },
464
- /*istanbul ignore start*/
465
- /*istanbul ignore end*/
466
- pushComponent: function pushComponent(components, added, removed) {
467
- var last = components[components.length - 1];
468
- if (last && last.added === added && last.removed === removed) {
469
- components[components.length - 1] = {
470
- count: last.count + 1,
471
- added,
472
- removed
473
- };
474
- } else {
475
- components.push({
476
- count: 1,
477
- added,
478
- removed
479
- });
480
- }
481
- },
482
- /*istanbul ignore start*/
483
- /*istanbul ignore end*/
484
- extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
485
- var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0;
486
- while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
487
- newPos++;
488
- oldPos++;
489
- commonCount++;
490
- }
491
- if (commonCount) {
492
- basePath.components.push({
493
- count: commonCount
494
- });
495
- }
496
- basePath.newPos = newPos;
497
- return oldPos;
498
- },
499
- /*istanbul ignore start*/
500
- /*istanbul ignore end*/
501
- equals: function equals(left, right) {
502
- if (this.options.comparator) {
503
- return this.options.comparator(left, right);
504
- } else {
505
- return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
506
- }
507
- },
508
- /*istanbul ignore start*/
509
- /*istanbul ignore end*/
510
- removeEmpty: function removeEmpty(array2) {
511
- var ret = [];
512
- for (var i = 0; i < array2.length; i++) {
513
- if (array2[i]) {
514
- ret.push(array2[i]);
515
- }
516
- }
517
- return ret;
518
- },
519
- /*istanbul ignore start*/
520
- /*istanbul ignore end*/
521
- castInput: function castInput(value) {
522
- return value;
523
- },
524
- /*istanbul ignore start*/
525
- /*istanbul ignore end*/
526
- tokenize: function tokenize(value) {
527
- return value.split("");
528
- },
529
- /*istanbul ignore start*/
530
- /*istanbul ignore end*/
531
- join: function join(chars) {
532
- return chars.join("");
533
- }
534
- };
535
- function buildValues(diff2, components, newString, oldString, useLongestToken) {
536
- var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0;
537
- for (; componentPos < componentLen; componentPos++) {
538
- var component = components[componentPos];
539
- if (!component.removed) {
540
- if (!component.added && useLongestToken) {
541
- var value = newString.slice(newPos, newPos + component.count);
542
- value = value.map(function(value2, i) {
543
- var oldValue = oldString[oldPos + i];
544
- return oldValue.length > value2.length ? oldValue : value2;
545
- });
546
- component.value = diff2.join(value);
547
- } else {
548
- component.value = diff2.join(newString.slice(newPos, newPos + component.count));
549
- }
550
- newPos += component.count;
551
- if (!component.added) {
552
- oldPos += component.count;
553
- }
554
- } else {
555
- component.value = diff2.join(oldString.slice(oldPos, oldPos + component.count));
556
- oldPos += component.count;
557
- if (componentPos && components[componentPos - 1].added) {
558
- var tmp = components[componentPos - 1];
559
- components[componentPos - 1] = components[componentPos];
560
- components[componentPos] = tmp;
561
- }
562
- }
563
- }
564
- var lastComponent = components[componentLen - 1];
565
- if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff2.equals("", lastComponent.value)) {
566
- components[componentLen - 2].value += lastComponent.value;
567
- components.pop();
568
- }
569
- return components;
570
- }
571
- function clonePath(path10) {
572
- return {
573
- newPos: path10.newPos,
574
- components: path10.components.slice(0)
575
- };
576
- }
577
- }
578
- });
579
-
580
- // node_modules/diff/lib/util/params.js
581
- var require_params = __commonJS({
582
- "node_modules/diff/lib/util/params.js"(exports) {
583
- "use strict";
584
- Object.defineProperty(exports, "__esModule", {
585
- value: true
586
- });
587
- exports.generateOptions = generateOptions;
588
- function generateOptions(options, defaults) {
589
- if (typeof options === "function") {
590
- defaults.callback = options;
591
- } else if (options) {
592
- for (var name in options) {
593
- if (options.hasOwnProperty(name)) {
594
- defaults[name] = options[name];
595
- }
596
- }
597
- }
598
- return defaults;
599
- }
600
- }
601
- });
602
-
603
- // node_modules/diff/lib/diff/line.js
604
- var require_line = __commonJS({
605
- "node_modules/diff/lib/diff/line.js"(exports) {
606
- "use strict";
607
- Object.defineProperty(exports, "__esModule", {
608
- value: true
609
- });
610
- exports.diffLines = diffLines;
611
- exports.diffTrimmedLines = diffTrimmedLines;
612
- exports.lineDiff = void 0;
613
- var _base = _interopRequireDefault(require_base());
614
- var _params = require_params();
615
- function _interopRequireDefault(obj) {
616
- return obj && obj.__esModule ? obj : { "default": obj };
617
- }
618
- var lineDiff = new /*istanbul ignore start*/
619
- _base[
620
- /*istanbul ignore start*/
621
- "default"
622
- /*istanbul ignore end*/
623
- ]();
624
- exports.lineDiff = lineDiff;
625
- lineDiff.tokenize = function(value) {
626
- var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
627
- if (!linesAndNewlines[linesAndNewlines.length - 1]) {
628
- linesAndNewlines.pop();
629
- }
630
- for (var i = 0; i < linesAndNewlines.length; i++) {
631
- var line = linesAndNewlines[i];
632
- if (i % 2 && !this.options.newlineIsToken) {
633
- retLines[retLines.length - 1] += line;
634
- } else {
635
- if (this.options.ignoreWhitespace) {
636
- line = line.trim();
637
- }
638
- retLines.push(line);
639
- }
640
- }
641
- return retLines;
642
- };
643
- function diffLines(oldStr, newStr, callback) {
644
- return lineDiff.diff(oldStr, newStr, callback);
645
- }
646
- function diffTrimmedLines(oldStr, newStr, callback) {
647
- var options = (
648
- /*istanbul ignore start*/
649
- (0, /*istanbul ignore end*/
650
- /*istanbul ignore start*/
651
- _params.generateOptions)(callback, {
652
- ignoreWhitespace: true
653
- })
654
- );
655
- return lineDiff.diff(oldStr, newStr, options);
656
- }
657
- }
658
- });
659
-
660
- // node_modules/diff/lib/patch/create.js
661
- var require_create = __commonJS({
662
- "node_modules/diff/lib/patch/create.js"(exports) {
663
- "use strict";
664
- Object.defineProperty(exports, "__esModule", {
665
- value: true
666
- });
667
- exports.structuredPatch = structuredPatch;
668
- exports.formatPatch = formatPatch;
669
- exports.createTwoFilesPatch = createTwoFilesPatch2;
670
- exports.createPatch = createPatch;
671
- var _line = require_line();
672
- function _toConsumableArray(arr) {
673
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
674
- }
675
- function _nonIterableSpread() {
676
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
677
- }
678
- function _unsupportedIterableToArray(o, minLen) {
679
- if (!o)
680
- return;
681
- if (typeof o === "string")
682
- return _arrayLikeToArray(o, minLen);
683
- var n = Object.prototype.toString.call(o).slice(8, -1);
684
- if (n === "Object" && o.constructor)
685
- n = o.constructor.name;
686
- if (n === "Map" || n === "Set")
687
- return Array.from(o);
688
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
689
- return _arrayLikeToArray(o, minLen);
690
- }
691
- function _iterableToArray(iter) {
692
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter))
693
- return Array.from(iter);
694
- }
695
- function _arrayWithoutHoles(arr) {
696
- if (Array.isArray(arr))
697
- return _arrayLikeToArray(arr);
698
- }
699
- function _arrayLikeToArray(arr, len) {
700
- if (len == null || len > arr.length)
701
- len = arr.length;
702
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
703
- arr2[i] = arr[i];
704
- }
705
- return arr2;
706
- }
707
- function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
708
- if (!options) {
709
- options = {};
710
- }
711
- if (typeof options.context === "undefined") {
712
- options.context = 4;
713
- }
714
- var diff2 = (
715
- /*istanbul ignore start*/
716
- (0, /*istanbul ignore end*/
717
- /*istanbul ignore start*/
718
- _line.diffLines)(oldStr, newStr, options)
719
- );
720
- if (!diff2) {
721
- return;
722
- }
723
- diff2.push({
724
- value: "",
725
- lines: []
726
- });
727
- function contextLines(lines) {
728
- return lines.map(function(entry) {
729
- return " " + entry;
730
- });
731
- }
732
- var hunks = [];
733
- var oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
734
- var _loop = function _loop2(i2) {
735
- var current = diff2[i2], lines = current.lines || current.value.replace(/\n$/, "").split("\n");
736
- current.lines = lines;
737
- if (current.added || current.removed) {
738
- var _curRange;
739
- if (!oldRangeStart) {
740
- var prev = diff2[i2 - 1];
741
- oldRangeStart = oldLine;
742
- newRangeStart = newLine;
743
- if (prev) {
744
- curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
745
- oldRangeStart -= curRange.length;
746
- newRangeStart -= curRange.length;
747
- }
748
- }
749
- (_curRange = /*istanbul ignore end*/
750
- curRange).push.apply(
751
- /*istanbul ignore start*/
752
- _curRange,
753
- /*istanbul ignore start*/
754
- _toConsumableArray(
755
- /*istanbul ignore end*/
756
- lines.map(function(entry) {
757
- return (current.added ? "+" : "-") + entry;
758
- })
759
- )
760
- );
761
- if (current.added) {
762
- newLine += lines.length;
763
- } else {
764
- oldLine += lines.length;
765
- }
766
- } else {
767
- if (oldRangeStart) {
768
- if (lines.length <= options.context * 2 && i2 < diff2.length - 2) {
769
- var _curRange2;
770
- (_curRange2 = /*istanbul ignore end*/
771
- curRange).push.apply(
772
- /*istanbul ignore start*/
773
- _curRange2,
774
- /*istanbul ignore start*/
775
- _toConsumableArray(
776
- /*istanbul ignore end*/
777
- contextLines(lines)
778
- )
779
- );
780
- } else {
781
- var _curRange3;
782
- var contextSize = Math.min(lines.length, options.context);
783
- (_curRange3 = /*istanbul ignore end*/
784
- curRange).push.apply(
785
- /*istanbul ignore start*/
786
- _curRange3,
787
- /*istanbul ignore start*/
788
- _toConsumableArray(
789
- /*istanbul ignore end*/
790
- contextLines(lines.slice(0, contextSize))
791
- )
792
- );
793
- var hunk = {
794
- oldStart: oldRangeStart,
795
- oldLines: oldLine - oldRangeStart + contextSize,
796
- newStart: newRangeStart,
797
- newLines: newLine - newRangeStart + contextSize,
798
- lines: curRange
799
- };
800
- if (i2 >= diff2.length - 2 && lines.length <= options.context) {
801
- var oldEOFNewline = /\n$/.test(oldStr);
802
- var newEOFNewline = /\n$/.test(newStr);
803
- var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
804
- if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
805
- curRange.splice(hunk.oldLines, 0, "\");
806
- }
807
- if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
808
- curRange.push("\");
809
- }
810
- }
811
- hunks.push(hunk);
812
- oldRangeStart = 0;
813
- newRangeStart = 0;
814
- curRange = [];
815
- }
816
- }
817
- oldLine += lines.length;
818
- newLine += lines.length;
819
- }
820
- };
821
- for (var i = 0; i < diff2.length; i++) {
822
- _loop(
823
- /*istanbul ignore end*/
824
- i
825
- );
826
- }
827
- return {
828
- oldFileName,
829
- newFileName,
830
- oldHeader,
831
- newHeader,
832
- hunks
833
- };
834
- }
835
- function formatPatch(diff2) {
836
- var ret = [];
837
- if (diff2.oldFileName == diff2.newFileName) {
838
- ret.push("Index: " + diff2.oldFileName);
839
- }
840
- ret.push("===================================================================");
841
- ret.push("--- " + diff2.oldFileName + (typeof diff2.oldHeader === "undefined" ? "" : " " + diff2.oldHeader));
842
- ret.push("+++ " + diff2.newFileName + (typeof diff2.newHeader === "undefined" ? "" : " " + diff2.newHeader));
843
- for (var i = 0; i < diff2.hunks.length; i++) {
844
- var hunk = diff2.hunks[i];
845
- if (hunk.oldLines === 0) {
846
- hunk.oldStart -= 1;
847
- }
848
- if (hunk.newLines === 0) {
849
- hunk.newStart -= 1;
850
- }
851
- ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@");
852
- ret.push.apply(ret, hunk.lines);
853
- }
854
- return ret.join("\n") + "\n";
855
- }
856
- function createTwoFilesPatch2(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
857
- return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
858
- }
859
- function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
860
- return createTwoFilesPatch2(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
861
- }
862
- }
863
- });
864
-
865
336
  // node_modules/common-path-prefix/index.js
866
337
  var require_common_path_prefix = __commonJS({
867
338
  "node_modules/common-path-prefix/index.js"(exports, module) {
@@ -870,15 +341,13 @@ var require_common_path_prefix = __commonJS({
870
341
  var determineSeparator = (paths) => {
871
342
  for (const path10 of paths) {
872
343
  const match = /(\/|\\)/.exec(path10);
873
- if (match !== null)
874
- return match[0];
344
+ if (match !== null) return match[0];
875
345
  }
876
346
  return DEFAULT_SEPARATOR;
877
347
  };
878
348
  module.exports = function commonPathPrefix2(paths, sep = determineSeparator(paths)) {
879
349
  const [first = "", ...remaining] = paths;
880
- if (first === "" || remaining.length === 0)
881
- return "";
350
+ if (first === "" || remaining.length === 0) return "";
882
351
  const parts = first.split(sep);
883
352
  let endOfPrefix = parts.length;
884
353
  for (const path10 of remaining) {
@@ -888,8 +357,7 @@ var require_common_path_prefix = __commonJS({
888
357
  endOfPrefix = i;
889
358
  }
890
359
  }
891
- if (endOfPrefix === 0)
892
- return "";
360
+ if (endOfPrefix === 0) return "";
893
361
  }
894
362
  const prefix = parts.slice(0, endOfPrefix).join(sep);
895
363
  return prefix.endsWith(sep) ? prefix : prefix + sep;
@@ -901,8 +369,7 @@ var require_common_path_prefix = __commonJS({
901
369
  var require_json_buffer = __commonJS({
902
370
  "node_modules/json-buffer/index.js"(exports) {
903
371
  exports.stringify = function stringify4(o) {
904
- if ("undefined" == typeof o)
905
- return o;
372
+ if ("undefined" == typeof o) return o;
906
373
  if (o && Buffer.isBuffer(o))
907
374
  return JSON.stringify(":base64:" + o.toString("base64"));
908
375
  if (o && o.toJSON)
@@ -1219,8 +686,7 @@ var require_cjs = __commonJS({
1219
686
  const after = $.call(this, key, value2);
1220
687
  switch (typeof after) {
1221
688
  case object:
1222
- if (after === null)
1223
- return after;
689
+ if (after === null) return after;
1224
690
  case primitive:
1225
691
  return known.get(after) || set(known, input, after);
1226
692
  }
@@ -1228,2762 +694,101 @@ var require_cjs = __commonJS({
1228
694
  }
1229
695
  };
1230
696
  exports.stringify = stringify4;
1231
- var toJSON = (any) => $parse(stringify4(any));
697
+ var toJSON = (value) => $parse(stringify4(value));
1232
698
  exports.toJSON = toJSON;
1233
- var fromJSON = (any) => parse($stringify(any));
699
+ var fromJSON = (value) => parse($stringify(value));
1234
700
  exports.fromJSON = fromJSON;
1235
701
  }
1236
702
  });
1237
703
 
1238
- // node_modules/flat-cache/src/utils.js
704
+ // node_modules/file-entry-cache/node_modules/flat-cache/src/utils.js
1239
705
  var require_utils = __commonJS({
1240
- "node_modules/flat-cache/src/utils.js"(exports, module) {
706
+ "node_modules/file-entry-cache/node_modules/flat-cache/src/utils.js"(exports, module) {
1241
707
  var fs6 = __require("fs");
1242
708
  var path10 = __require("path");
1243
709
  var flatted = require_cjs();
1244
- module.exports = {
1245
- tryParse: function(filePath, defaultValue) {
1246
- var result;
1247
- try {
1248
- result = this.readJSON(filePath);
1249
- } catch (ex) {
1250
- result = defaultValue;
1251
- }
1252
- return result;
1253
- },
1254
- /**
1255
- * Read json file synchronously using flatted
1256
- *
1257
- * @method readJSON
1258
- * @param {String} filePath Json filepath
1259
- * @returns {*} parse result
1260
- */
1261
- readJSON: function(filePath) {
1262
- return flatted.parse(
1263
- fs6.readFileSync(filePath, {
1264
- encoding: "utf8"
1265
- })
1266
- );
1267
- },
1268
- /**
1269
- * Write json file synchronously using circular-json
1270
- *
1271
- * @method writeJSON
1272
- * @param {String} filePath Json filepath
1273
- * @param {*} data Object to serialize
1274
- */
1275
- writeJSON: function(filePath, data) {
1276
- fs6.mkdirSync(path10.dirname(filePath), {
1277
- recursive: true
1278
- });
1279
- fs6.writeFileSync(filePath, flatted.stringify(data));
1280
- }
1281
- };
1282
- }
1283
- });
1284
-
1285
- // node_modules/fs.realpath/old.js
1286
- var require_old = __commonJS({
1287
- "node_modules/fs.realpath/old.js"(exports) {
1288
- var pathModule = __require("path");
1289
- var isWindows = process.platform === "win32";
1290
- var fs6 = __require("fs");
1291
- var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
1292
- function rethrow() {
1293
- var callback;
1294
- if (DEBUG) {
1295
- var backtrace = new Error();
1296
- callback = debugCallback;
1297
- } else
1298
- callback = missingCallback;
1299
- return callback;
1300
- function debugCallback(err) {
1301
- if (err) {
1302
- backtrace.message = err.message;
1303
- err = backtrace;
1304
- missingCallback(err);
1305
- }
1306
- }
1307
- function missingCallback(err) {
1308
- if (err) {
1309
- if (process.throwDeprecation)
1310
- throw err;
1311
- else if (!process.noDeprecation) {
1312
- var msg = "fs: missing callback " + (err.stack || err.message);
1313
- if (process.traceDeprecation)
1314
- console.trace(msg);
1315
- else
1316
- console.error(msg);
1317
- }
1318
- }
710
+ function tryParse(filePath, defaultValue) {
711
+ let result;
712
+ try {
713
+ result = readJSON(filePath);
714
+ } catch {
715
+ result = defaultValue;
1319
716
  }
717
+ return result;
1320
718
  }
1321
- function maybeCallback(cb) {
1322
- return typeof cb === "function" ? cb : rethrow();
1323
- }
1324
- var normalize = pathModule.normalize;
1325
- if (isWindows) {
1326
- nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
1327
- } else {
1328
- nextPartRe = /(.*?)(?:[\/]+|$)/g;
719
+ function readJSON(filePath) {
720
+ return flatted.parse(
721
+ fs6.readFileSync(filePath, {
722
+ encoding: "utf8"
723
+ })
724
+ );
1329
725
  }
1330
- var nextPartRe;
1331
- if (isWindows) {
1332
- splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
1333
- } else {
1334
- splitRootRe = /^[\/]*/;
726
+ function writeJSON(filePath, data) {
727
+ fs6.mkdirSync(path10.dirname(filePath), {
728
+ recursive: true
729
+ });
730
+ fs6.writeFileSync(filePath, flatted.stringify(data));
1335
731
  }
1336
- var splitRootRe;
1337
- exports.realpathSync = function realpathSync(p, cache) {
1338
- p = pathModule.resolve(p);
1339
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
1340
- return cache[p];
1341
- }
1342
- var original = p, seenLinks = {}, knownHard = {};
1343
- var pos;
1344
- var current;
1345
- var base;
1346
- var previous;
1347
- start();
1348
- function start() {
1349
- var m = splitRootRe.exec(p);
1350
- pos = m[0].length;
1351
- current = m[0];
1352
- base = m[0];
1353
- previous = "";
1354
- if (isWindows && !knownHard[base]) {
1355
- fs6.lstatSync(base);
1356
- knownHard[base] = true;
1357
- }
1358
- }
1359
- while (pos < p.length) {
1360
- nextPartRe.lastIndex = pos;
1361
- var result = nextPartRe.exec(p);
1362
- previous = current;
1363
- current += result[0];
1364
- base = previous + result[1];
1365
- pos = nextPartRe.lastIndex;
1366
- if (knownHard[base] || cache && cache[base] === base) {
1367
- continue;
1368
- }
1369
- var resolvedLink;
1370
- if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
1371
- resolvedLink = cache[base];
1372
- } else {
1373
- var stat = fs6.lstatSync(base);
1374
- if (!stat.isSymbolicLink()) {
1375
- knownHard[base] = true;
1376
- if (cache)
1377
- cache[base] = base;
1378
- continue;
1379
- }
1380
- var linkTarget = null;
1381
- if (!isWindows) {
1382
- var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
1383
- if (seenLinks.hasOwnProperty(id)) {
1384
- linkTarget = seenLinks[id];
1385
- }
1386
- }
1387
- if (linkTarget === null) {
1388
- fs6.statSync(base);
1389
- linkTarget = fs6.readlinkSync(base);
1390
- }
1391
- resolvedLink = pathModule.resolve(previous, linkTarget);
1392
- if (cache)
1393
- cache[base] = resolvedLink;
1394
- if (!isWindows)
1395
- seenLinks[id] = linkTarget;
1396
- }
1397
- p = pathModule.resolve(resolvedLink, p.slice(pos));
1398
- start();
1399
- }
1400
- if (cache)
1401
- cache[original] = p;
1402
- return p;
1403
- };
1404
- exports.realpath = function realpath(p, cache, cb) {
1405
- if (typeof cb !== "function") {
1406
- cb = maybeCallback(cache);
1407
- cache = null;
1408
- }
1409
- p = pathModule.resolve(p);
1410
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
1411
- return process.nextTick(cb.bind(null, null, cache[p]));
1412
- }
1413
- var original = p, seenLinks = {}, knownHard = {};
1414
- var pos;
1415
- var current;
1416
- var base;
1417
- var previous;
1418
- start();
1419
- function start() {
1420
- var m = splitRootRe.exec(p);
1421
- pos = m[0].length;
1422
- current = m[0];
1423
- base = m[0];
1424
- previous = "";
1425
- if (isWindows && !knownHard[base]) {
1426
- fs6.lstat(base, function(err) {
1427
- if (err)
1428
- return cb(err);
1429
- knownHard[base] = true;
1430
- LOOP();
1431
- });
1432
- } else {
1433
- process.nextTick(LOOP);
1434
- }
1435
- }
1436
- function LOOP() {
1437
- if (pos >= p.length) {
1438
- if (cache)
1439
- cache[original] = p;
1440
- return cb(null, p);
1441
- }
1442
- nextPartRe.lastIndex = pos;
1443
- var result = nextPartRe.exec(p);
1444
- previous = current;
1445
- current += result[0];
1446
- base = previous + result[1];
1447
- pos = nextPartRe.lastIndex;
1448
- if (knownHard[base] || cache && cache[base] === base) {
1449
- return process.nextTick(LOOP);
1450
- }
1451
- if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
1452
- return gotResolvedLink(cache[base]);
1453
- }
1454
- return fs6.lstat(base, gotStat);
1455
- }
1456
- function gotStat(err, stat) {
1457
- if (err)
1458
- return cb(err);
1459
- if (!stat.isSymbolicLink()) {
1460
- knownHard[base] = true;
1461
- if (cache)
1462
- cache[base] = base;
1463
- return process.nextTick(LOOP);
1464
- }
1465
- if (!isWindows) {
1466
- var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
1467
- if (seenLinks.hasOwnProperty(id)) {
1468
- return gotTarget(null, seenLinks[id], base);
1469
- }
1470
- }
1471
- fs6.stat(base, function(err2) {
1472
- if (err2)
1473
- return cb(err2);
1474
- fs6.readlink(base, function(err3, target) {
1475
- if (!isWindows)
1476
- seenLinks[id] = target;
1477
- gotTarget(err3, target);
1478
- });
1479
- });
1480
- }
1481
- function gotTarget(err, target, base2) {
1482
- if (err)
1483
- return cb(err);
1484
- var resolvedLink = pathModule.resolve(previous, target);
1485
- if (cache)
1486
- cache[base2] = resolvedLink;
1487
- gotResolvedLink(resolvedLink);
1488
- }
1489
- function gotResolvedLink(resolvedLink) {
1490
- p = pathModule.resolve(resolvedLink, p.slice(pos));
1491
- start();
1492
- }
1493
- };
732
+ module.exports = { tryParse, readJSON, writeJSON };
1494
733
  }
1495
734
  });
1496
735
 
1497
- // node_modules/fs.realpath/index.js
1498
- var require_fs = __commonJS({
1499
- "node_modules/fs.realpath/index.js"(exports, module) {
1500
- module.exports = realpath;
1501
- realpath.realpath = realpath;
1502
- realpath.sync = realpathSync;
1503
- realpath.realpathSync = realpathSync;
1504
- realpath.monkeypatch = monkeypatch;
1505
- realpath.unmonkeypatch = unmonkeypatch;
736
+ // node_modules/file-entry-cache/node_modules/flat-cache/src/del.js
737
+ var require_del = __commonJS({
738
+ "node_modules/file-entry-cache/node_modules/flat-cache/src/del.js"(exports, module) {
1506
739
  var fs6 = __require("fs");
1507
- var origRealpath = fs6.realpath;
1508
- var origRealpathSync = fs6.realpathSync;
1509
- var version2 = process.version;
1510
- var ok = /^v[0-5]\./.test(version2);
1511
- var old = require_old();
1512
- function newError(er) {
1513
- return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
1514
- }
1515
- function realpath(p, cache, cb) {
1516
- if (ok) {
1517
- return origRealpath(p, cache, cb);
1518
- }
1519
- if (typeof cache === "function") {
1520
- cb = cache;
1521
- cache = null;
1522
- }
1523
- origRealpath(p, cache, function(er, result) {
1524
- if (newError(er)) {
1525
- old.realpath(p, cache, cb);
1526
- } else {
1527
- cb(er, result);
1528
- }
1529
- });
1530
- }
1531
- function realpathSync(p, cache) {
1532
- if (ok) {
1533
- return origRealpathSync(p, cache);
740
+ var path10 = __require("path");
741
+ function del(targetPath) {
742
+ if (!fs6.existsSync(targetPath)) {
743
+ return false;
1534
744
  }
1535
745
  try {
1536
- return origRealpathSync(p, cache);
1537
- } catch (er) {
1538
- if (newError(er)) {
1539
- return old.realpathSync(p, cache);
1540
- } else {
1541
- throw er;
1542
- }
1543
- }
1544
- }
1545
- function monkeypatch() {
1546
- fs6.realpath = realpath;
1547
- fs6.realpathSync = realpathSync;
1548
- }
1549
- function unmonkeypatch() {
1550
- fs6.realpath = origRealpath;
1551
- fs6.realpathSync = origRealpathSync;
1552
- }
1553
- }
1554
- });
1555
-
1556
- // node_modules/concat-map/index.js
1557
- var require_concat_map = __commonJS({
1558
- "node_modules/concat-map/index.js"(exports, module) {
1559
- module.exports = function(xs, fn) {
1560
- var res = [];
1561
- for (var i = 0; i < xs.length; i++) {
1562
- var x = fn(xs[i], i);
1563
- if (isArray(x))
1564
- res.push.apply(res, x);
1565
- else
1566
- res.push(x);
1567
- }
1568
- return res;
1569
- };
1570
- var isArray = Array.isArray || function(xs) {
1571
- return Object.prototype.toString.call(xs) === "[object Array]";
1572
- };
1573
- }
1574
- });
1575
-
1576
- // node_modules/balanced-match/index.js
1577
- var require_balanced_match = __commonJS({
1578
- "node_modules/balanced-match/index.js"(exports, module) {
1579
- "use strict";
1580
- module.exports = balanced;
1581
- function balanced(a, b, str) {
1582
- if (a instanceof RegExp)
1583
- a = maybeMatch(a, str);
1584
- if (b instanceof RegExp)
1585
- b = maybeMatch(b, str);
1586
- var r = range(a, b, str);
1587
- return r && {
1588
- start: r[0],
1589
- end: r[1],
1590
- pre: str.slice(0, r[0]),
1591
- body: str.slice(r[0] + a.length, r[1]),
1592
- post: str.slice(r[1] + b.length)
1593
- };
1594
- }
1595
- function maybeMatch(reg, str) {
1596
- var m = str.match(reg);
1597
- return m ? m[0] : null;
1598
- }
1599
- balanced.range = range;
1600
- function range(a, b, str) {
1601
- var begs, beg, left, right, result;
1602
- var ai = str.indexOf(a);
1603
- var bi = str.indexOf(b, ai + 1);
1604
- var i = ai;
1605
- if (ai >= 0 && bi > 0) {
1606
- if (a === b) {
1607
- return [ai, bi];
1608
- }
1609
- begs = [];
1610
- left = str.length;
1611
- while (i >= 0 && !result) {
1612
- if (i == ai) {
1613
- begs.push(i);
1614
- ai = str.indexOf(a, i + 1);
1615
- } else if (begs.length == 1) {
1616
- result = [begs.pop(), bi];
1617
- } else {
1618
- beg = begs.pop();
1619
- if (beg < left) {
1620
- left = beg;
1621
- right = bi;
746
+ if (fs6.statSync(targetPath).isDirectory()) {
747
+ for (const file of fs6.readdirSync(targetPath)) {
748
+ const currentPath = path10.join(targetPath, file);
749
+ if (fs6.statSync(currentPath).isFile()) {
750
+ fs6.unlinkSync(currentPath);
1622
751
  }
1623
- bi = str.indexOf(b, i + 1);
1624
752
  }
1625
- i = ai < bi && ai >= 0 ? ai : bi;
1626
- }
1627
- if (begs.length) {
1628
- result = [left, right];
753
+ fs6.rmdirSync(targetPath);
754
+ } else {
755
+ fs6.unlinkSync(targetPath);
1629
756
  }
757
+ return true;
758
+ } catch (error) {
759
+ console.error(`Error while deleting ${targetPath}: ${error.message}`);
1630
760
  }
1631
- return result;
1632
761
  }
762
+ module.exports = { del };
1633
763
  }
1634
764
  });
1635
765
 
1636
- // node_modules/brace-expansion/index.js
1637
- var require_brace_expansion = __commonJS({
1638
- "node_modules/brace-expansion/index.js"(exports, module) {
1639
- var concatMap = require_concat_map();
1640
- var balanced = require_balanced_match();
1641
- module.exports = expandTop;
1642
- var escSlash = "\0SLASH" + Math.random() + "\0";
1643
- var escOpen = "\0OPEN" + Math.random() + "\0";
1644
- var escClose = "\0CLOSE" + Math.random() + "\0";
1645
- var escComma = "\0COMMA" + Math.random() + "\0";
1646
- var escPeriod = "\0PERIOD" + Math.random() + "\0";
1647
- function numeric(str) {
1648
- return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
1649
- }
1650
- function escapeBraces(str) {
1651
- return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
1652
- }
1653
- function unescapeBraces(str) {
1654
- return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
1655
- }
1656
- function parseCommaParts(str) {
1657
- if (!str)
1658
- return [""];
1659
- var parts = [];
1660
- var m = balanced("{", "}", str);
1661
- if (!m)
1662
- return str.split(",");
1663
- var pre = m.pre;
1664
- var body = m.body;
1665
- var post = m.post;
1666
- var p = pre.split(",");
1667
- p[p.length - 1] += "{" + body + "}";
1668
- var postParts = parseCommaParts(post);
1669
- if (post.length) {
1670
- p[p.length - 1] += postParts.shift();
1671
- p.push.apply(p, postParts);
1672
- }
1673
- parts.push.apply(parts, p);
1674
- return parts;
1675
- }
1676
- function expandTop(str) {
1677
- if (!str)
1678
- return [];
1679
- if (str.substr(0, 2) === "{}") {
1680
- str = "\\{\\}" + str.substr(2);
1681
- }
1682
- return expand(escapeBraces(str), true).map(unescapeBraces);
1683
- }
1684
- function embrace(str) {
1685
- return "{" + str + "}";
1686
- }
1687
- function isPadded(el) {
1688
- return /^-?0\d/.test(el);
1689
- }
1690
- function lte(i, y) {
1691
- return i <= y;
1692
- }
1693
- function gte(i, y) {
1694
- return i >= y;
1695
- }
1696
- function expand(str, isTop) {
1697
- var expansions = [];
1698
- var m = balanced("{", "}", str);
1699
- if (!m || /\$$/.test(m.pre))
1700
- return [str];
1701
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
1702
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
1703
- var isSequence = isNumericSequence || isAlphaSequence;
1704
- var isOptions = m.body.indexOf(",") >= 0;
1705
- if (!isSequence && !isOptions) {
1706
- if (m.post.match(/,.*\}/)) {
1707
- str = m.pre + "{" + m.body + escClose + m.post;
1708
- return expand(str);
1709
- }
1710
- return [str];
1711
- }
1712
- var n;
1713
- if (isSequence) {
1714
- n = m.body.split(/\.\./);
1715
- } else {
1716
- n = parseCommaParts(m.body);
1717
- if (n.length === 1) {
1718
- n = expand(n[0], false).map(embrace);
1719
- if (n.length === 1) {
1720
- var post = m.post.length ? expand(m.post, false) : [""];
1721
- return post.map(function(p) {
1722
- return m.pre + n[0] + p;
1723
- });
1724
- }
1725
- }
1726
- }
1727
- var pre = m.pre;
1728
- var post = m.post.length ? expand(m.post, false) : [""];
1729
- var N;
1730
- if (isSequence) {
1731
- var x = numeric(n[0]);
1732
- var y = numeric(n[1]);
1733
- var width = Math.max(n[0].length, n[1].length);
1734
- var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
1735
- var test = lte;
1736
- var reverse = y < x;
1737
- if (reverse) {
1738
- incr *= -1;
1739
- test = gte;
1740
- }
1741
- var pad = n.some(isPadded);
1742
- N = [];
1743
- for (var i = x; test(i, y); i += incr) {
1744
- var c;
1745
- if (isAlphaSequence) {
1746
- c = String.fromCharCode(i);
1747
- if (c === "\\")
1748
- c = "";
1749
- } else {
1750
- c = String(i);
1751
- if (pad) {
1752
- var need = width - c.length;
1753
- if (need > 0) {
1754
- var z = new Array(need + 1).join("0");
1755
- if (i < 0)
1756
- c = "-" + z + c.slice(1);
1757
- else
1758
- c = z + c;
1759
- }
1760
- }
1761
- }
1762
- N.push(c);
1763
- }
1764
- } else {
1765
- N = concatMap(n, function(el) {
1766
- return expand(el, false);
1767
- });
1768
- }
1769
- for (var j = 0; j < N.length; j++) {
1770
- for (var k = 0; k < post.length; k++) {
1771
- var expansion = pre + N[j] + post[k];
1772
- if (!isTop || isSequence || expansion)
1773
- expansions.push(expansion);
1774
- }
1775
- }
1776
- return expansions;
1777
- }
1778
- }
1779
- });
1780
-
1781
- // node_modules/minimatch/minimatch.js
1782
- var require_minimatch = __commonJS({
1783
- "node_modules/minimatch/minimatch.js"(exports, module) {
1784
- module.exports = minimatch;
1785
- minimatch.Minimatch = Minimatch;
1786
- var path10 = function() {
1787
- try {
1788
- return __require("path");
1789
- } catch (e) {
1790
- }
1791
- }() || {
1792
- sep: "/"
1793
- };
1794
- minimatch.sep = path10.sep;
1795
- var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
1796
- var expand = require_brace_expansion();
1797
- var plTypes = {
1798
- "!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
1799
- "?": { open: "(?:", close: ")?" },
1800
- "+": { open: "(?:", close: ")+" },
1801
- "*": { open: "(?:", close: ")*" },
1802
- "@": { open: "(?:", close: ")" }
1803
- };
1804
- var qmark = "[^/]";
1805
- var star = qmark + "*?";
1806
- var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
1807
- var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
1808
- var reSpecials = charSet("().*{}+?[]^$\\!");
1809
- function charSet(s) {
1810
- return s.split("").reduce(function(set, c) {
1811
- set[c] = true;
1812
- return set;
1813
- }, {});
1814
- }
1815
- var slashSplit = /\/+/;
1816
- minimatch.filter = filter;
1817
- function filter(pattern, options) {
1818
- options = options || {};
1819
- return function(p, i, list) {
1820
- return minimatch(p, pattern, options);
1821
- };
1822
- }
1823
- function ext(a, b) {
1824
- b = b || {};
1825
- var t = {};
1826
- Object.keys(a).forEach(function(k) {
1827
- t[k] = a[k];
1828
- });
1829
- Object.keys(b).forEach(function(k) {
1830
- t[k] = b[k];
1831
- });
1832
- return t;
1833
- }
1834
- minimatch.defaults = function(def) {
1835
- if (!def || typeof def !== "object" || !Object.keys(def).length) {
1836
- return minimatch;
1837
- }
1838
- var orig = minimatch;
1839
- var m = function minimatch2(p, pattern, options) {
1840
- return orig(p, pattern, ext(def, options));
1841
- };
1842
- m.Minimatch = function Minimatch2(pattern, options) {
1843
- return new orig.Minimatch(pattern, ext(def, options));
1844
- };
1845
- m.Minimatch.defaults = function defaults(options) {
1846
- return orig.defaults(ext(def, options)).Minimatch;
1847
- };
1848
- m.filter = function filter2(pattern, options) {
1849
- return orig.filter(pattern, ext(def, options));
1850
- };
1851
- m.defaults = function defaults(options) {
1852
- return orig.defaults(ext(def, options));
1853
- };
1854
- m.makeRe = function makeRe2(pattern, options) {
1855
- return orig.makeRe(pattern, ext(def, options));
1856
- };
1857
- m.braceExpand = function braceExpand2(pattern, options) {
1858
- return orig.braceExpand(pattern, ext(def, options));
1859
- };
1860
- m.match = function(list, pattern, options) {
1861
- return orig.match(list, pattern, ext(def, options));
1862
- };
1863
- return m;
1864
- };
1865
- Minimatch.defaults = function(def) {
1866
- return minimatch.defaults(def).Minimatch;
1867
- };
1868
- function minimatch(p, pattern, options) {
1869
- assertValidPattern(pattern);
1870
- if (!options)
1871
- options = {};
1872
- if (!options.nocomment && pattern.charAt(0) === "#") {
1873
- return false;
1874
- }
1875
- return new Minimatch(pattern, options).match(p);
1876
- }
1877
- function Minimatch(pattern, options) {
1878
- if (!(this instanceof Minimatch)) {
1879
- return new Minimatch(pattern, options);
1880
- }
1881
- assertValidPattern(pattern);
1882
- if (!options)
1883
- options = {};
1884
- pattern = pattern.trim();
1885
- if (!options.allowWindowsEscape && path10.sep !== "/") {
1886
- pattern = pattern.split(path10.sep).join("/");
1887
- }
1888
- this.options = options;
1889
- this.set = [];
1890
- this.pattern = pattern;
1891
- this.regexp = null;
1892
- this.negate = false;
1893
- this.comment = false;
1894
- this.empty = false;
1895
- this.partial = !!options.partial;
1896
- this.make();
1897
- }
1898
- Minimatch.prototype.debug = function() {
1899
- };
1900
- Minimatch.prototype.make = make;
1901
- function make() {
1902
- var pattern = this.pattern;
1903
- var options = this.options;
1904
- if (!options.nocomment && pattern.charAt(0) === "#") {
1905
- this.comment = true;
1906
- return;
1907
- }
1908
- if (!pattern) {
1909
- this.empty = true;
1910
- return;
1911
- }
1912
- this.parseNegate();
1913
- var set = this.globSet = this.braceExpand();
1914
- if (options.debug)
1915
- this.debug = function debug() {
1916
- console.error.apply(console, arguments);
1917
- };
1918
- this.debug(this.pattern, set);
1919
- set = this.globParts = set.map(function(s) {
1920
- return s.split(slashSplit);
1921
- });
1922
- this.debug(this.pattern, set);
1923
- set = set.map(function(s, si, set2) {
1924
- return s.map(this.parse, this);
1925
- }, this);
1926
- this.debug(this.pattern, set);
1927
- set = set.filter(function(s) {
1928
- return s.indexOf(false) === -1;
1929
- });
1930
- this.debug(this.pattern, set);
1931
- this.set = set;
1932
- }
1933
- Minimatch.prototype.parseNegate = parseNegate;
1934
- function parseNegate() {
1935
- var pattern = this.pattern;
1936
- var negate = false;
1937
- var options = this.options;
1938
- var negateOffset = 0;
1939
- if (options.nonegate)
1940
- return;
1941
- for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) {
1942
- negate = !negate;
1943
- negateOffset++;
1944
- }
1945
- if (negateOffset)
1946
- this.pattern = pattern.substr(negateOffset);
1947
- this.negate = negate;
1948
- }
1949
- minimatch.braceExpand = function(pattern, options) {
1950
- return braceExpand(pattern, options);
1951
- };
1952
- Minimatch.prototype.braceExpand = braceExpand;
1953
- function braceExpand(pattern, options) {
1954
- if (!options) {
1955
- if (this instanceof Minimatch) {
1956
- options = this.options;
1957
- } else {
1958
- options = {};
1959
- }
1960
- }
1961
- pattern = typeof pattern === "undefined" ? this.pattern : pattern;
1962
- assertValidPattern(pattern);
1963
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
1964
- return [pattern];
1965
- }
1966
- return expand(pattern);
1967
- }
1968
- var MAX_PATTERN_LENGTH = 1024 * 64;
1969
- var assertValidPattern = function(pattern) {
1970
- if (typeof pattern !== "string") {
1971
- throw new TypeError("invalid pattern");
1972
- }
1973
- if (pattern.length > MAX_PATTERN_LENGTH) {
1974
- throw new TypeError("pattern is too long");
1975
- }
1976
- };
1977
- Minimatch.prototype.parse = parse;
1978
- var SUBPARSE = {};
1979
- function parse(pattern, isSub) {
1980
- assertValidPattern(pattern);
1981
- var options = this.options;
1982
- if (pattern === "**") {
1983
- if (!options.noglobstar)
1984
- return GLOBSTAR;
1985
- else
1986
- pattern = "*";
1987
- }
1988
- if (pattern === "")
1989
- return "";
1990
- var re = "";
1991
- var hasMagic = !!options.nocase;
1992
- var escaping = false;
1993
- var patternListStack = [];
1994
- var negativeLists = [];
1995
- var stateChar;
1996
- var inClass = false;
1997
- var reClassStart = -1;
1998
- var classStart = -1;
1999
- var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
2000
- var self = this;
2001
- function clearStateChar() {
2002
- if (stateChar) {
2003
- switch (stateChar) {
2004
- case "*":
2005
- re += star;
2006
- hasMagic = true;
2007
- break;
2008
- case "?":
2009
- re += qmark;
2010
- hasMagic = true;
2011
- break;
2012
- default:
2013
- re += "\\" + stateChar;
2014
- break;
2015
- }
2016
- self.debug("clearStateChar %j %j", stateChar, re);
2017
- stateChar = false;
2018
- }
2019
- }
2020
- for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
2021
- this.debug("%s %s %s %j", pattern, i, re, c);
2022
- if (escaping && reSpecials[c]) {
2023
- re += "\\" + c;
2024
- escaping = false;
2025
- continue;
2026
- }
2027
- switch (c) {
2028
- case "/": {
2029
- return false;
2030
- }
2031
- case "\\":
2032
- clearStateChar();
2033
- escaping = true;
2034
- continue;
2035
- case "?":
2036
- case "*":
2037
- case "+":
2038
- case "@":
2039
- case "!":
2040
- this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c);
2041
- if (inClass) {
2042
- this.debug(" in class");
2043
- if (c === "!" && i === classStart + 1)
2044
- c = "^";
2045
- re += c;
2046
- continue;
2047
- }
2048
- self.debug("call clearStateChar %j", stateChar);
2049
- clearStateChar();
2050
- stateChar = c;
2051
- if (options.noext)
2052
- clearStateChar();
2053
- continue;
2054
- case "(":
2055
- if (inClass) {
2056
- re += "(";
2057
- continue;
2058
- }
2059
- if (!stateChar) {
2060
- re += "\\(";
2061
- continue;
2062
- }
2063
- patternListStack.push({
2064
- type: stateChar,
2065
- start: i - 1,
2066
- reStart: re.length,
2067
- open: plTypes[stateChar].open,
2068
- close: plTypes[stateChar].close
2069
- });
2070
- re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
2071
- this.debug("plType %j %j", stateChar, re);
2072
- stateChar = false;
2073
- continue;
2074
- case ")":
2075
- if (inClass || !patternListStack.length) {
2076
- re += "\\)";
2077
- continue;
2078
- }
2079
- clearStateChar();
2080
- hasMagic = true;
2081
- var pl = patternListStack.pop();
2082
- re += pl.close;
2083
- if (pl.type === "!") {
2084
- negativeLists.push(pl);
2085
- }
2086
- pl.reEnd = re.length;
2087
- continue;
2088
- case "|":
2089
- if (inClass || !patternListStack.length || escaping) {
2090
- re += "\\|";
2091
- escaping = false;
2092
- continue;
2093
- }
2094
- clearStateChar();
2095
- re += "|";
2096
- continue;
2097
- case "[":
2098
- clearStateChar();
2099
- if (inClass) {
2100
- re += "\\" + c;
2101
- continue;
2102
- }
2103
- inClass = true;
2104
- classStart = i;
2105
- reClassStart = re.length;
2106
- re += c;
2107
- continue;
2108
- case "]":
2109
- if (i === classStart + 1 || !inClass) {
2110
- re += "\\" + c;
2111
- escaping = false;
2112
- continue;
2113
- }
2114
- var cs = pattern.substring(classStart + 1, i);
2115
- try {
2116
- RegExp("[" + cs + "]");
2117
- } catch (er) {
2118
- var sp = this.parse(cs, SUBPARSE);
2119
- re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
2120
- hasMagic = hasMagic || sp[1];
2121
- inClass = false;
2122
- continue;
2123
- }
2124
- hasMagic = true;
2125
- inClass = false;
2126
- re += c;
2127
- continue;
2128
- default:
2129
- clearStateChar();
2130
- if (escaping) {
2131
- escaping = false;
2132
- } else if (reSpecials[c] && !(c === "^" && inClass)) {
2133
- re += "\\";
2134
- }
2135
- re += c;
2136
- }
2137
- }
2138
- if (inClass) {
2139
- cs = pattern.substr(classStart + 1);
2140
- sp = this.parse(cs, SUBPARSE);
2141
- re = re.substr(0, reClassStart) + "\\[" + sp[0];
2142
- hasMagic = hasMagic || sp[1];
2143
- }
2144
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
2145
- var tail = re.slice(pl.reStart + pl.open.length);
2146
- this.debug("setting tail", re, pl);
2147
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) {
2148
- if (!$2) {
2149
- $2 = "\\";
2150
- }
2151
- return $1 + $1 + $2 + "|";
2152
- });
2153
- this.debug("tail=%j\n %s", tail, tail, pl, re);
2154
- var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
2155
- hasMagic = true;
2156
- re = re.slice(0, pl.reStart) + t + "\\(" + tail;
2157
- }
2158
- clearStateChar();
2159
- if (escaping) {
2160
- re += "\\\\";
2161
- }
2162
- var addPatternStart = false;
2163
- switch (re.charAt(0)) {
2164
- case "[":
2165
- case ".":
2166
- case "(":
2167
- addPatternStart = true;
2168
- }
2169
- for (var n = negativeLists.length - 1; n > -1; n--) {
2170
- var nl = negativeLists[n];
2171
- var nlBefore = re.slice(0, nl.reStart);
2172
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
2173
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
2174
- var nlAfter = re.slice(nl.reEnd);
2175
- nlLast += nlAfter;
2176
- var openParensBefore = nlBefore.split("(").length - 1;
2177
- var cleanAfter = nlAfter;
2178
- for (i = 0; i < openParensBefore; i++) {
2179
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
2180
- }
2181
- nlAfter = cleanAfter;
2182
- var dollar = "";
2183
- if (nlAfter === "" && isSub !== SUBPARSE) {
2184
- dollar = "$";
2185
- }
2186
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
2187
- re = newRe;
2188
- }
2189
- if (re !== "" && hasMagic) {
2190
- re = "(?=.)" + re;
2191
- }
2192
- if (addPatternStart) {
2193
- re = patternStart + re;
2194
- }
2195
- if (isSub === SUBPARSE) {
2196
- return [re, hasMagic];
2197
- }
2198
- if (!hasMagic) {
2199
- return globUnescape(pattern);
2200
- }
2201
- var flags = options.nocase ? "i" : "";
2202
- try {
2203
- var regExp = new RegExp("^" + re + "$", flags);
2204
- } catch (er) {
2205
- return new RegExp("$.");
2206
- }
2207
- regExp._glob = pattern;
2208
- regExp._src = re;
2209
- return regExp;
2210
- }
2211
- minimatch.makeRe = function(pattern, options) {
2212
- return new Minimatch(pattern, options || {}).makeRe();
2213
- };
2214
- Minimatch.prototype.makeRe = makeRe;
2215
- function makeRe() {
2216
- if (this.regexp || this.regexp === false)
2217
- return this.regexp;
2218
- var set = this.set;
2219
- if (!set.length) {
2220
- this.regexp = false;
2221
- return this.regexp;
2222
- }
2223
- var options = this.options;
2224
- var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
2225
- var flags = options.nocase ? "i" : "";
2226
- var re = set.map(function(pattern) {
2227
- return pattern.map(function(p) {
2228
- return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src;
2229
- }).join("\\/");
2230
- }).join("|");
2231
- re = "^(?:" + re + ")$";
2232
- if (this.negate)
2233
- re = "^(?!" + re + ").*$";
2234
- try {
2235
- this.regexp = new RegExp(re, flags);
2236
- } catch (ex) {
2237
- this.regexp = false;
2238
- }
2239
- return this.regexp;
2240
- }
2241
- minimatch.match = function(list, pattern, options) {
2242
- options = options || {};
2243
- var mm = new Minimatch(pattern, options);
2244
- list = list.filter(function(f) {
2245
- return mm.match(f);
2246
- });
2247
- if (mm.options.nonull && !list.length) {
2248
- list.push(pattern);
2249
- }
2250
- return list;
2251
- };
2252
- Minimatch.prototype.match = function match(f, partial) {
2253
- if (typeof partial === "undefined")
2254
- partial = this.partial;
2255
- this.debug("match", f, this.pattern);
2256
- if (this.comment)
2257
- return false;
2258
- if (this.empty)
2259
- return f === "";
2260
- if (f === "/" && partial)
2261
- return true;
2262
- var options = this.options;
2263
- if (path10.sep !== "/") {
2264
- f = f.split(path10.sep).join("/");
2265
- }
2266
- f = f.split(slashSplit);
2267
- this.debug(this.pattern, "split", f);
2268
- var set = this.set;
2269
- this.debug(this.pattern, "set", set);
2270
- var filename;
2271
- var i;
2272
- for (i = f.length - 1; i >= 0; i--) {
2273
- filename = f[i];
2274
- if (filename)
2275
- break;
2276
- }
2277
- for (i = 0; i < set.length; i++) {
2278
- var pattern = set[i];
2279
- var file = f;
2280
- if (options.matchBase && pattern.length === 1) {
2281
- file = [filename];
2282
- }
2283
- var hit = this.matchOne(file, pattern, partial);
2284
- if (hit) {
2285
- if (options.flipNegate)
2286
- return true;
2287
- return !this.negate;
2288
- }
2289
- }
2290
- if (options.flipNegate)
2291
- return false;
2292
- return this.negate;
2293
- };
2294
- Minimatch.prototype.matchOne = function(file, pattern, partial) {
2295
- var options = this.options;
2296
- this.debug(
2297
- "matchOne",
2298
- { "this": this, file, pattern }
2299
- );
2300
- this.debug("matchOne", file.length, pattern.length);
2301
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
2302
- this.debug("matchOne loop");
2303
- var p = pattern[pi];
2304
- var f = file[fi];
2305
- this.debug(pattern, p, f);
2306
- if (p === false)
2307
- return false;
2308
- if (p === GLOBSTAR) {
2309
- this.debug("GLOBSTAR", [pattern, p, f]);
2310
- var fr = fi;
2311
- var pr = pi + 1;
2312
- if (pr === pl) {
2313
- this.debug("** at the end");
2314
- for (; fi < fl; fi++) {
2315
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
2316
- return false;
2317
- }
2318
- return true;
2319
- }
2320
- while (fr < fl) {
2321
- var swallowee = file[fr];
2322
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
2323
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
2324
- this.debug("globstar found match!", fr, fl, swallowee);
2325
- return true;
2326
- } else {
2327
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
2328
- this.debug("dot detected!", file, fr, pattern, pr);
2329
- break;
2330
- }
2331
- this.debug("globstar swallow a segment, and continue");
2332
- fr++;
2333
- }
2334
- }
2335
- if (partial) {
2336
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
2337
- if (fr === fl)
2338
- return true;
2339
- }
2340
- return false;
2341
- }
2342
- var hit;
2343
- if (typeof p === "string") {
2344
- hit = f === p;
2345
- this.debug("string match", p, f, hit);
2346
- } else {
2347
- hit = f.match(p);
2348
- this.debug("pattern match", p, f, hit);
2349
- }
2350
- if (!hit)
2351
- return false;
2352
- }
2353
- if (fi === fl && pi === pl) {
2354
- return true;
2355
- } else if (fi === fl) {
2356
- return partial;
2357
- } else if (pi === pl) {
2358
- return fi === fl - 1 && file[fi] === "";
2359
- }
2360
- throw new Error("wtf?");
2361
- };
2362
- function globUnescape(s) {
2363
- return s.replace(/\\(.)/g, "$1");
2364
- }
2365
- function regExpEscape(s) {
2366
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
2367
- }
2368
- }
2369
- });
2370
-
2371
- // node_modules/inherits/inherits_browser.js
2372
- var require_inherits_browser = __commonJS({
2373
- "node_modules/inherits/inherits_browser.js"(exports, module) {
2374
- if (typeof Object.create === "function") {
2375
- module.exports = function inherits(ctor, superCtor) {
2376
- if (superCtor) {
2377
- ctor.super_ = superCtor;
2378
- ctor.prototype = Object.create(superCtor.prototype, {
2379
- constructor: {
2380
- value: ctor,
2381
- enumerable: false,
2382
- writable: true,
2383
- configurable: true
2384
- }
2385
- });
2386
- }
2387
- };
2388
- } else {
2389
- module.exports = function inherits(ctor, superCtor) {
2390
- if (superCtor) {
2391
- ctor.super_ = superCtor;
2392
- var TempCtor = function() {
2393
- };
2394
- TempCtor.prototype = superCtor.prototype;
2395
- ctor.prototype = new TempCtor();
2396
- ctor.prototype.constructor = ctor;
2397
- }
2398
- };
2399
- }
2400
- }
2401
- });
2402
-
2403
- // node_modules/inherits/inherits.js
2404
- var require_inherits = __commonJS({
2405
- "node_modules/inherits/inherits.js"(exports, module) {
2406
- try {
2407
- util = __require("util");
2408
- if (typeof util.inherits !== "function")
2409
- throw "";
2410
- module.exports = util.inherits;
2411
- } catch (e) {
2412
- module.exports = require_inherits_browser();
2413
- }
2414
- var util;
2415
- }
2416
- });
2417
-
2418
- // node_modules/path-is-absolute/index.js
2419
- var require_path_is_absolute = __commonJS({
2420
- "node_modules/path-is-absolute/index.js"(exports, module) {
2421
- "use strict";
2422
- function posix(path10) {
2423
- return path10.charAt(0) === "/";
2424
- }
2425
- function win32(path10) {
2426
- var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
2427
- var result = splitDeviceRe.exec(path10);
2428
- var device = result[1] || "";
2429
- var isUnc = Boolean(device && device.charAt(1) !== ":");
2430
- return Boolean(result[2] || isUnc);
2431
- }
2432
- module.exports = process.platform === "win32" ? win32 : posix;
2433
- module.exports.posix = posix;
2434
- module.exports.win32 = win32;
2435
- }
2436
- });
2437
-
2438
- // node_modules/glob/common.js
2439
- var require_common = __commonJS({
2440
- "node_modules/glob/common.js"(exports) {
2441
- exports.setopts = setopts;
2442
- exports.ownProp = ownProp;
2443
- exports.makeAbs = makeAbs;
2444
- exports.finish = finish;
2445
- exports.mark = mark;
2446
- exports.isIgnored = isIgnored;
2447
- exports.childrenIgnored = childrenIgnored;
2448
- function ownProp(obj, field) {
2449
- return Object.prototype.hasOwnProperty.call(obj, field);
2450
- }
2451
- var fs6 = __require("fs");
2452
- var path10 = __require("path");
2453
- var minimatch = require_minimatch();
2454
- var isAbsolute = require_path_is_absolute();
2455
- var Minimatch = minimatch.Minimatch;
2456
- function alphasort(a, b) {
2457
- return a.localeCompare(b, "en");
2458
- }
2459
- function setupIgnores(self, options) {
2460
- self.ignore = options.ignore || [];
2461
- if (!Array.isArray(self.ignore))
2462
- self.ignore = [self.ignore];
2463
- if (self.ignore.length) {
2464
- self.ignore = self.ignore.map(ignoreMap);
2465
- }
2466
- }
2467
- function ignoreMap(pattern) {
2468
- var gmatcher = null;
2469
- if (pattern.slice(-3) === "/**") {
2470
- var gpattern = pattern.replace(/(\/\*\*)+$/, "");
2471
- gmatcher = new Minimatch(gpattern, { dot: true });
2472
- }
2473
- return {
2474
- matcher: new Minimatch(pattern, { dot: true }),
2475
- gmatcher
2476
- };
2477
- }
2478
- function setopts(self, pattern, options) {
2479
- if (!options)
2480
- options = {};
2481
- if (options.matchBase && -1 === pattern.indexOf("/")) {
2482
- if (options.noglobstar) {
2483
- throw new Error("base matching requires globstar");
2484
- }
2485
- pattern = "**/" + pattern;
2486
- }
2487
- self.silent = !!options.silent;
2488
- self.pattern = pattern;
2489
- self.strict = options.strict !== false;
2490
- self.realpath = !!options.realpath;
2491
- self.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null);
2492
- self.follow = !!options.follow;
2493
- self.dot = !!options.dot;
2494
- self.mark = !!options.mark;
2495
- self.nodir = !!options.nodir;
2496
- if (self.nodir)
2497
- self.mark = true;
2498
- self.sync = !!options.sync;
2499
- self.nounique = !!options.nounique;
2500
- self.nonull = !!options.nonull;
2501
- self.nosort = !!options.nosort;
2502
- self.nocase = !!options.nocase;
2503
- self.stat = !!options.stat;
2504
- self.noprocess = !!options.noprocess;
2505
- self.absolute = !!options.absolute;
2506
- self.fs = options.fs || fs6;
2507
- self.maxLength = options.maxLength || Infinity;
2508
- self.cache = options.cache || /* @__PURE__ */ Object.create(null);
2509
- self.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
2510
- self.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null);
2511
- setupIgnores(self, options);
2512
- self.changedCwd = false;
2513
- var cwd2 = process.cwd();
2514
- if (!ownProp(options, "cwd"))
2515
- self.cwd = cwd2;
2516
- else {
2517
- self.cwd = path10.resolve(options.cwd);
2518
- self.changedCwd = self.cwd !== cwd2;
2519
- }
2520
- self.root = options.root || path10.resolve(self.cwd, "/");
2521
- self.root = path10.resolve(self.root);
2522
- if (process.platform === "win32")
2523
- self.root = self.root.replace(/\\/g, "/");
2524
- self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
2525
- if (process.platform === "win32")
2526
- self.cwdAbs = self.cwdAbs.replace(/\\/g, "/");
2527
- self.nomount = !!options.nomount;
2528
- options.nonegate = true;
2529
- options.nocomment = true;
2530
- options.allowWindowsEscape = false;
2531
- self.minimatch = new Minimatch(pattern, options);
2532
- self.options = self.minimatch.options;
2533
- }
2534
- function finish(self) {
2535
- var nou = self.nounique;
2536
- var all = nou ? [] : /* @__PURE__ */ Object.create(null);
2537
- for (var i = 0, l = self.matches.length; i < l; i++) {
2538
- var matches = self.matches[i];
2539
- if (!matches || Object.keys(matches).length === 0) {
2540
- if (self.nonull) {
2541
- var literal = self.minimatch.globSet[i];
2542
- if (nou)
2543
- all.push(literal);
2544
- else
2545
- all[literal] = true;
2546
- }
2547
- } else {
2548
- var m = Object.keys(matches);
2549
- if (nou)
2550
- all.push.apply(all, m);
2551
- else
2552
- m.forEach(function(m2) {
2553
- all[m2] = true;
2554
- });
2555
- }
2556
- }
2557
- if (!nou)
2558
- all = Object.keys(all);
2559
- if (!self.nosort)
2560
- all = all.sort(alphasort);
2561
- if (self.mark) {
2562
- for (var i = 0; i < all.length; i++) {
2563
- all[i] = self._mark(all[i]);
2564
- }
2565
- if (self.nodir) {
2566
- all = all.filter(function(e) {
2567
- var notDir = !/\/$/.test(e);
2568
- var c = self.cache[e] || self.cache[makeAbs(self, e)];
2569
- if (notDir && c)
2570
- notDir = c !== "DIR" && !Array.isArray(c);
2571
- return notDir;
2572
- });
2573
- }
2574
- }
2575
- if (self.ignore.length)
2576
- all = all.filter(function(m2) {
2577
- return !isIgnored(self, m2);
2578
- });
2579
- self.found = all;
2580
- }
2581
- function mark(self, p) {
2582
- var abs = makeAbs(self, p);
2583
- var c = self.cache[abs];
2584
- var m = p;
2585
- if (c) {
2586
- var isDir = c === "DIR" || Array.isArray(c);
2587
- var slash = p.slice(-1) === "/";
2588
- if (isDir && !slash)
2589
- m += "/";
2590
- else if (!isDir && slash)
2591
- m = m.slice(0, -1);
2592
- if (m !== p) {
2593
- var mabs = makeAbs(self, m);
2594
- self.statCache[mabs] = self.statCache[abs];
2595
- self.cache[mabs] = self.cache[abs];
2596
- }
2597
- }
2598
- return m;
2599
- }
2600
- function makeAbs(self, f) {
2601
- var abs = f;
2602
- if (f.charAt(0) === "/") {
2603
- abs = path10.join(self.root, f);
2604
- } else if (isAbsolute(f) || f === "") {
2605
- abs = f;
2606
- } else if (self.changedCwd) {
2607
- abs = path10.resolve(self.cwd, f);
2608
- } else {
2609
- abs = path10.resolve(f);
2610
- }
2611
- if (process.platform === "win32")
2612
- abs = abs.replace(/\\/g, "/");
2613
- return abs;
2614
- }
2615
- function isIgnored(self, path11) {
2616
- if (!self.ignore.length)
2617
- return false;
2618
- return self.ignore.some(function(item) {
2619
- return item.matcher.match(path11) || !!(item.gmatcher && item.gmatcher.match(path11));
2620
- });
2621
- }
2622
- function childrenIgnored(self, path11) {
2623
- if (!self.ignore.length)
2624
- return false;
2625
- return self.ignore.some(function(item) {
2626
- return !!(item.gmatcher && item.gmatcher.match(path11));
2627
- });
2628
- }
2629
- }
2630
- });
2631
-
2632
- // node_modules/glob/sync.js
2633
- var require_sync = __commonJS({
2634
- "node_modules/glob/sync.js"(exports, module) {
2635
- module.exports = globSync;
2636
- globSync.GlobSync = GlobSync;
2637
- var rp = require_fs();
2638
- var minimatch = require_minimatch();
2639
- var Minimatch = minimatch.Minimatch;
2640
- var Glob = require_glob().Glob;
2641
- var util = __require("util");
2642
- var path10 = __require("path");
2643
- var assert = __require("assert");
2644
- var isAbsolute = require_path_is_absolute();
2645
- var common = require_common();
2646
- var setopts = common.setopts;
2647
- var ownProp = common.ownProp;
2648
- var childrenIgnored = common.childrenIgnored;
2649
- var isIgnored = common.isIgnored;
2650
- function globSync(pattern, options) {
2651
- if (typeof options === "function" || arguments.length === 3)
2652
- throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
2653
- return new GlobSync(pattern, options).found;
2654
- }
2655
- function GlobSync(pattern, options) {
2656
- if (!pattern)
2657
- throw new Error("must provide pattern");
2658
- if (typeof options === "function" || arguments.length === 3)
2659
- throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
2660
- if (!(this instanceof GlobSync))
2661
- return new GlobSync(pattern, options);
2662
- setopts(this, pattern, options);
2663
- if (this.noprocess)
2664
- return this;
2665
- var n = this.minimatch.set.length;
2666
- this.matches = new Array(n);
2667
- for (var i = 0; i < n; i++) {
2668
- this._process(this.minimatch.set[i], i, false);
2669
- }
2670
- this._finish();
2671
- }
2672
- GlobSync.prototype._finish = function() {
2673
- assert.ok(this instanceof GlobSync);
2674
- if (this.realpath) {
2675
- var self = this;
2676
- this.matches.forEach(function(matchset, index) {
2677
- var set = self.matches[index] = /* @__PURE__ */ Object.create(null);
2678
- for (var p in matchset) {
2679
- try {
2680
- p = self._makeAbs(p);
2681
- var real = rp.realpathSync(p, self.realpathCache);
2682
- set[real] = true;
2683
- } catch (er) {
2684
- if (er.syscall === "stat")
2685
- set[self._makeAbs(p)] = true;
2686
- else
2687
- throw er;
2688
- }
2689
- }
2690
- });
2691
- }
2692
- common.finish(this);
2693
- };
2694
- GlobSync.prototype._process = function(pattern, index, inGlobStar) {
2695
- assert.ok(this instanceof GlobSync);
2696
- var n = 0;
2697
- while (typeof pattern[n] === "string") {
2698
- n++;
2699
- }
2700
- var prefix;
2701
- switch (n) {
2702
- case pattern.length:
2703
- this._processSimple(pattern.join("/"), index);
2704
- return;
2705
- case 0:
2706
- prefix = null;
2707
- break;
2708
- default:
2709
- prefix = pattern.slice(0, n).join("/");
2710
- break;
2711
- }
2712
- var remain = pattern.slice(n);
2713
- var read;
2714
- if (prefix === null)
2715
- read = ".";
2716
- else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) {
2717
- return typeof p === "string" ? p : "[*]";
2718
- }).join("/"))) {
2719
- if (!prefix || !isAbsolute(prefix))
2720
- prefix = "/" + prefix;
2721
- read = prefix;
2722
- } else
2723
- read = prefix;
2724
- var abs = this._makeAbs(read);
2725
- if (childrenIgnored(this, read))
2726
- return;
2727
- var isGlobStar = remain[0] === minimatch.GLOBSTAR;
2728
- if (isGlobStar)
2729
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar);
2730
- else
2731
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar);
2732
- };
2733
- GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) {
2734
- var entries = this._readdir(abs, inGlobStar);
2735
- if (!entries)
2736
- return;
2737
- var pn = remain[0];
2738
- var negate = !!this.minimatch.negate;
2739
- var rawGlob = pn._glob;
2740
- var dotOk = this.dot || rawGlob.charAt(0) === ".";
2741
- var matchedEntries = [];
2742
- for (var i = 0; i < entries.length; i++) {
2743
- var e = entries[i];
2744
- if (e.charAt(0) !== "." || dotOk) {
2745
- var m;
2746
- if (negate && !prefix) {
2747
- m = !e.match(pn);
2748
- } else {
2749
- m = e.match(pn);
2750
- }
2751
- if (m)
2752
- matchedEntries.push(e);
2753
- }
2754
- }
2755
- var len = matchedEntries.length;
2756
- if (len === 0)
2757
- return;
2758
- if (remain.length === 1 && !this.mark && !this.stat) {
2759
- if (!this.matches[index])
2760
- this.matches[index] = /* @__PURE__ */ Object.create(null);
2761
- for (var i = 0; i < len; i++) {
2762
- var e = matchedEntries[i];
2763
- if (prefix) {
2764
- if (prefix.slice(-1) !== "/")
2765
- e = prefix + "/" + e;
2766
- else
2767
- e = prefix + e;
2768
- }
2769
- if (e.charAt(0) === "/" && !this.nomount) {
2770
- e = path10.join(this.root, e);
2771
- }
2772
- this._emitMatch(index, e);
2773
- }
2774
- return;
2775
- }
2776
- remain.shift();
2777
- for (var i = 0; i < len; i++) {
2778
- var e = matchedEntries[i];
2779
- var newPattern;
2780
- if (prefix)
2781
- newPattern = [prefix, e];
2782
- else
2783
- newPattern = [e];
2784
- this._process(newPattern.concat(remain), index, inGlobStar);
2785
- }
2786
- };
2787
- GlobSync.prototype._emitMatch = function(index, e) {
2788
- if (isIgnored(this, e))
2789
- return;
2790
- var abs = this._makeAbs(e);
2791
- if (this.mark)
2792
- e = this._mark(e);
2793
- if (this.absolute) {
2794
- e = abs;
2795
- }
2796
- if (this.matches[index][e])
2797
- return;
2798
- if (this.nodir) {
2799
- var c = this.cache[abs];
2800
- if (c === "DIR" || Array.isArray(c))
2801
- return;
2802
- }
2803
- this.matches[index][e] = true;
2804
- if (this.stat)
2805
- this._stat(e);
2806
- };
2807
- GlobSync.prototype._readdirInGlobStar = function(abs) {
2808
- if (this.follow)
2809
- return this._readdir(abs, false);
2810
- var entries;
2811
- var lstat;
2812
- var stat;
2813
- try {
2814
- lstat = this.fs.lstatSync(abs);
2815
- } catch (er) {
2816
- if (er.code === "ENOENT") {
2817
- return null;
2818
- }
2819
- }
2820
- var isSym = lstat && lstat.isSymbolicLink();
2821
- this.symlinks[abs] = isSym;
2822
- if (!isSym && lstat && !lstat.isDirectory())
2823
- this.cache[abs] = "FILE";
2824
- else
2825
- entries = this._readdir(abs, false);
2826
- return entries;
2827
- };
2828
- GlobSync.prototype._readdir = function(abs, inGlobStar) {
2829
- var entries;
2830
- if (inGlobStar && !ownProp(this.symlinks, abs))
2831
- return this._readdirInGlobStar(abs);
2832
- if (ownProp(this.cache, abs)) {
2833
- var c = this.cache[abs];
2834
- if (!c || c === "FILE")
2835
- return null;
2836
- if (Array.isArray(c))
2837
- return c;
2838
- }
2839
- try {
2840
- return this._readdirEntries(abs, this.fs.readdirSync(abs));
2841
- } catch (er) {
2842
- this._readdirError(abs, er);
2843
- return null;
2844
- }
2845
- };
2846
- GlobSync.prototype._readdirEntries = function(abs, entries) {
2847
- if (!this.mark && !this.stat) {
2848
- for (var i = 0; i < entries.length; i++) {
2849
- var e = entries[i];
2850
- if (abs === "/")
2851
- e = abs + e;
2852
- else
2853
- e = abs + "/" + e;
2854
- this.cache[e] = true;
2855
- }
2856
- }
2857
- this.cache[abs] = entries;
2858
- return entries;
2859
- };
2860
- GlobSync.prototype._readdirError = function(f, er) {
2861
- switch (er.code) {
2862
- case "ENOTSUP":
2863
- case "ENOTDIR":
2864
- var abs = this._makeAbs(f);
2865
- this.cache[abs] = "FILE";
2866
- if (abs === this.cwdAbs) {
2867
- var error = new Error(er.code + " invalid cwd " + this.cwd);
2868
- error.path = this.cwd;
2869
- error.code = er.code;
2870
- throw error;
2871
- }
2872
- break;
2873
- case "ENOENT":
2874
- case "ELOOP":
2875
- case "ENAMETOOLONG":
2876
- case "UNKNOWN":
2877
- this.cache[this._makeAbs(f)] = false;
2878
- break;
2879
- default:
2880
- this.cache[this._makeAbs(f)] = false;
2881
- if (this.strict)
2882
- throw er;
2883
- if (!this.silent)
2884
- console.error("glob error", er);
2885
- break;
2886
- }
2887
- };
2888
- GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) {
2889
- var entries = this._readdir(abs, inGlobStar);
2890
- if (!entries)
2891
- return;
2892
- var remainWithoutGlobStar = remain.slice(1);
2893
- var gspref = prefix ? [prefix] : [];
2894
- var noGlobStar = gspref.concat(remainWithoutGlobStar);
2895
- this._process(noGlobStar, index, false);
2896
- var len = entries.length;
2897
- var isSym = this.symlinks[abs];
2898
- if (isSym && inGlobStar)
2899
- return;
2900
- for (var i = 0; i < len; i++) {
2901
- var e = entries[i];
2902
- if (e.charAt(0) === "." && !this.dot)
2903
- continue;
2904
- var instead = gspref.concat(entries[i], remainWithoutGlobStar);
2905
- this._process(instead, index, true);
2906
- var below = gspref.concat(entries[i], remain);
2907
- this._process(below, index, true);
2908
- }
2909
- };
2910
- GlobSync.prototype._processSimple = function(prefix, index) {
2911
- var exists = this._stat(prefix);
2912
- if (!this.matches[index])
2913
- this.matches[index] = /* @__PURE__ */ Object.create(null);
2914
- if (!exists)
2915
- return;
2916
- if (prefix && isAbsolute(prefix) && !this.nomount) {
2917
- var trail = /[\/\\]$/.test(prefix);
2918
- if (prefix.charAt(0) === "/") {
2919
- prefix = path10.join(this.root, prefix);
2920
- } else {
2921
- prefix = path10.resolve(this.root, prefix);
2922
- if (trail)
2923
- prefix += "/";
2924
- }
2925
- }
2926
- if (process.platform === "win32")
2927
- prefix = prefix.replace(/\\/g, "/");
2928
- this._emitMatch(index, prefix);
2929
- };
2930
- GlobSync.prototype._stat = function(f) {
2931
- var abs = this._makeAbs(f);
2932
- var needDir = f.slice(-1) === "/";
2933
- if (f.length > this.maxLength)
2934
- return false;
2935
- if (!this.stat && ownProp(this.cache, abs)) {
2936
- var c = this.cache[abs];
2937
- if (Array.isArray(c))
2938
- c = "DIR";
2939
- if (!needDir || c === "DIR")
2940
- return c;
2941
- if (needDir && c === "FILE")
2942
- return false;
2943
- }
2944
- var exists;
2945
- var stat = this.statCache[abs];
2946
- if (!stat) {
2947
- var lstat;
2948
- try {
2949
- lstat = this.fs.lstatSync(abs);
2950
- } catch (er) {
2951
- if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
2952
- this.statCache[abs] = false;
2953
- return false;
2954
- }
2955
- }
2956
- if (lstat && lstat.isSymbolicLink()) {
2957
- try {
2958
- stat = this.fs.statSync(abs);
2959
- } catch (er) {
2960
- stat = lstat;
2961
- }
2962
- } else {
2963
- stat = lstat;
2964
- }
2965
- }
2966
- this.statCache[abs] = stat;
2967
- var c = true;
2968
- if (stat)
2969
- c = stat.isDirectory() ? "DIR" : "FILE";
2970
- this.cache[abs] = this.cache[abs] || c;
2971
- if (needDir && c === "FILE")
2972
- return false;
2973
- return c;
2974
- };
2975
- GlobSync.prototype._mark = function(p) {
2976
- return common.mark(this, p);
2977
- };
2978
- GlobSync.prototype._makeAbs = function(f) {
2979
- return common.makeAbs(this, f);
2980
- };
2981
- }
2982
- });
2983
-
2984
- // node_modules/wrappy/wrappy.js
2985
- var require_wrappy = __commonJS({
2986
- "node_modules/wrappy/wrappy.js"(exports, module) {
2987
- module.exports = wrappy;
2988
- function wrappy(fn, cb) {
2989
- if (fn && cb)
2990
- return wrappy(fn)(cb);
2991
- if (typeof fn !== "function")
2992
- throw new TypeError("need wrapper function");
2993
- Object.keys(fn).forEach(function(k) {
2994
- wrapper[k] = fn[k];
2995
- });
2996
- return wrapper;
2997
- function wrapper() {
2998
- var args = new Array(arguments.length);
2999
- for (var i = 0; i < args.length; i++) {
3000
- args[i] = arguments[i];
3001
- }
3002
- var ret = fn.apply(this, args);
3003
- var cb2 = args[args.length - 1];
3004
- if (typeof ret === "function" && ret !== cb2) {
3005
- Object.keys(cb2).forEach(function(k) {
3006
- ret[k] = cb2[k];
3007
- });
3008
- }
3009
- return ret;
3010
- }
3011
- }
3012
- }
3013
- });
3014
-
3015
- // node_modules/once/once.js
3016
- var require_once = __commonJS({
3017
- "node_modules/once/once.js"(exports, module) {
3018
- var wrappy = require_wrappy();
3019
- module.exports = wrappy(once);
3020
- module.exports.strict = wrappy(onceStrict);
3021
- once.proto = once(function() {
3022
- Object.defineProperty(Function.prototype, "once", {
3023
- value: function() {
3024
- return once(this);
3025
- },
3026
- configurable: true
3027
- });
3028
- Object.defineProperty(Function.prototype, "onceStrict", {
3029
- value: function() {
3030
- return onceStrict(this);
3031
- },
3032
- configurable: true
3033
- });
3034
- });
3035
- function once(fn) {
3036
- var f = function() {
3037
- if (f.called)
3038
- return f.value;
3039
- f.called = true;
3040
- return f.value = fn.apply(this, arguments);
3041
- };
3042
- f.called = false;
3043
- return f;
3044
- }
3045
- function onceStrict(fn) {
3046
- var f = function() {
3047
- if (f.called)
3048
- throw new Error(f.onceError);
3049
- f.called = true;
3050
- return f.value = fn.apply(this, arguments);
3051
- };
3052
- var name = fn.name || "Function wrapped with `once`";
3053
- f.onceError = name + " shouldn't be called more than once";
3054
- f.called = false;
3055
- return f;
3056
- }
3057
- }
3058
- });
3059
-
3060
- // node_modules/inflight/inflight.js
3061
- var require_inflight = __commonJS({
3062
- "node_modules/inflight/inflight.js"(exports, module) {
3063
- var wrappy = require_wrappy();
3064
- var reqs = /* @__PURE__ */ Object.create(null);
3065
- var once = require_once();
3066
- module.exports = wrappy(inflight);
3067
- function inflight(key, cb) {
3068
- if (reqs[key]) {
3069
- reqs[key].push(cb);
3070
- return null;
3071
- } else {
3072
- reqs[key] = [cb];
3073
- return makeres(key);
3074
- }
3075
- }
3076
- function makeres(key) {
3077
- return once(function RES() {
3078
- var cbs = reqs[key];
3079
- var len = cbs.length;
3080
- var args = slice(arguments);
3081
- try {
3082
- for (var i = 0; i < len; i++) {
3083
- cbs[i].apply(null, args);
3084
- }
3085
- } finally {
3086
- if (cbs.length > len) {
3087
- cbs.splice(0, len);
3088
- process.nextTick(function() {
3089
- RES.apply(null, args);
3090
- });
3091
- } else {
3092
- delete reqs[key];
3093
- }
3094
- }
3095
- });
3096
- }
3097
- function slice(args) {
3098
- var length = args.length;
3099
- var array2 = [];
3100
- for (var i = 0; i < length; i++)
3101
- array2[i] = args[i];
3102
- return array2;
3103
- }
3104
- }
3105
- });
3106
-
3107
- // node_modules/glob/glob.js
3108
- var require_glob = __commonJS({
3109
- "node_modules/glob/glob.js"(exports, module) {
3110
- module.exports = glob;
3111
- var rp = require_fs();
3112
- var minimatch = require_minimatch();
3113
- var Minimatch = minimatch.Minimatch;
3114
- var inherits = require_inherits();
3115
- var EE = __require("events").EventEmitter;
3116
- var path10 = __require("path");
3117
- var assert = __require("assert");
3118
- var isAbsolute = require_path_is_absolute();
3119
- var globSync = require_sync();
3120
- var common = require_common();
3121
- var setopts = common.setopts;
3122
- var ownProp = common.ownProp;
3123
- var inflight = require_inflight();
3124
- var util = __require("util");
3125
- var childrenIgnored = common.childrenIgnored;
3126
- var isIgnored = common.isIgnored;
3127
- var once = require_once();
3128
- function glob(pattern, options, cb) {
3129
- if (typeof options === "function")
3130
- cb = options, options = {};
3131
- if (!options)
3132
- options = {};
3133
- if (options.sync) {
3134
- if (cb)
3135
- throw new TypeError("callback provided to sync glob");
3136
- return globSync(pattern, options);
3137
- }
3138
- return new Glob(pattern, options, cb);
3139
- }
3140
- glob.sync = globSync;
3141
- var GlobSync = glob.GlobSync = globSync.GlobSync;
3142
- glob.glob = glob;
3143
- function extend(origin, add) {
3144
- if (add === null || typeof add !== "object") {
3145
- return origin;
3146
- }
3147
- var keys = Object.keys(add);
3148
- var i = keys.length;
3149
- while (i--) {
3150
- origin[keys[i]] = add[keys[i]];
3151
- }
3152
- return origin;
3153
- }
3154
- glob.hasMagic = function(pattern, options_) {
3155
- var options = extend({}, options_);
3156
- options.noprocess = true;
3157
- var g = new Glob(pattern, options);
3158
- var set = g.minimatch.set;
3159
- if (!pattern)
3160
- return false;
3161
- if (set.length > 1)
3162
- return true;
3163
- for (var j = 0; j < set[0].length; j++) {
3164
- if (typeof set[0][j] !== "string")
3165
- return true;
3166
- }
3167
- return false;
3168
- };
3169
- glob.Glob = Glob;
3170
- inherits(Glob, EE);
3171
- function Glob(pattern, options, cb) {
3172
- if (typeof options === "function") {
3173
- cb = options;
3174
- options = null;
3175
- }
3176
- if (options && options.sync) {
3177
- if (cb)
3178
- throw new TypeError("callback provided to sync glob");
3179
- return new GlobSync(pattern, options);
3180
- }
3181
- if (!(this instanceof Glob))
3182
- return new Glob(pattern, options, cb);
3183
- setopts(this, pattern, options);
3184
- this._didRealPath = false;
3185
- var n = this.minimatch.set.length;
3186
- this.matches = new Array(n);
3187
- if (typeof cb === "function") {
3188
- cb = once(cb);
3189
- this.on("error", cb);
3190
- this.on("end", function(matches) {
3191
- cb(null, matches);
3192
- });
3193
- }
3194
- var self = this;
3195
- this._processing = 0;
3196
- this._emitQueue = [];
3197
- this._processQueue = [];
3198
- this.paused = false;
3199
- if (this.noprocess)
3200
- return this;
3201
- if (n === 0)
3202
- return done();
3203
- var sync = true;
3204
- for (var i = 0; i < n; i++) {
3205
- this._process(this.minimatch.set[i], i, false, done);
3206
- }
3207
- sync = false;
3208
- function done() {
3209
- --self._processing;
3210
- if (self._processing <= 0) {
3211
- if (sync) {
3212
- process.nextTick(function() {
3213
- self._finish();
3214
- });
3215
- } else {
3216
- self._finish();
3217
- }
3218
- }
3219
- }
3220
- }
3221
- Glob.prototype._finish = function() {
3222
- assert(this instanceof Glob);
3223
- if (this.aborted)
3224
- return;
3225
- if (this.realpath && !this._didRealpath)
3226
- return this._realpath();
3227
- common.finish(this);
3228
- this.emit("end", this.found);
3229
- };
3230
- Glob.prototype._realpath = function() {
3231
- if (this._didRealpath)
3232
- return;
3233
- this._didRealpath = true;
3234
- var n = this.matches.length;
3235
- if (n === 0)
3236
- return this._finish();
3237
- var self = this;
3238
- for (var i = 0; i < this.matches.length; i++)
3239
- this._realpathSet(i, next);
3240
- function next() {
3241
- if (--n === 0)
3242
- self._finish();
3243
- }
3244
- };
3245
- Glob.prototype._realpathSet = function(index, cb) {
3246
- var matchset = this.matches[index];
3247
- if (!matchset)
3248
- return cb();
3249
- var found = Object.keys(matchset);
3250
- var self = this;
3251
- var n = found.length;
3252
- if (n === 0)
3253
- return cb();
3254
- var set = this.matches[index] = /* @__PURE__ */ Object.create(null);
3255
- found.forEach(function(p, i) {
3256
- p = self._makeAbs(p);
3257
- rp.realpath(p, self.realpathCache, function(er, real) {
3258
- if (!er)
3259
- set[real] = true;
3260
- else if (er.syscall === "stat")
3261
- set[p] = true;
3262
- else
3263
- self.emit("error", er);
3264
- if (--n === 0) {
3265
- self.matches[index] = set;
3266
- cb();
3267
- }
3268
- });
3269
- });
3270
- };
3271
- Glob.prototype._mark = function(p) {
3272
- return common.mark(this, p);
3273
- };
3274
- Glob.prototype._makeAbs = function(f) {
3275
- return common.makeAbs(this, f);
3276
- };
3277
- Glob.prototype.abort = function() {
3278
- this.aborted = true;
3279
- this.emit("abort");
3280
- };
3281
- Glob.prototype.pause = function() {
3282
- if (!this.paused) {
3283
- this.paused = true;
3284
- this.emit("pause");
3285
- }
3286
- };
3287
- Glob.prototype.resume = function() {
3288
- if (this.paused) {
3289
- this.emit("resume");
3290
- this.paused = false;
3291
- if (this._emitQueue.length) {
3292
- var eq = this._emitQueue.slice(0);
3293
- this._emitQueue.length = 0;
3294
- for (var i = 0; i < eq.length; i++) {
3295
- var e = eq[i];
3296
- this._emitMatch(e[0], e[1]);
3297
- }
3298
- }
3299
- if (this._processQueue.length) {
3300
- var pq = this._processQueue.slice(0);
3301
- this._processQueue.length = 0;
3302
- for (var i = 0; i < pq.length; i++) {
3303
- var p = pq[i];
3304
- this._processing--;
3305
- this._process(p[0], p[1], p[2], p[3]);
3306
- }
3307
- }
3308
- }
3309
- };
3310
- Glob.prototype._process = function(pattern, index, inGlobStar, cb) {
3311
- assert(this instanceof Glob);
3312
- assert(typeof cb === "function");
3313
- if (this.aborted)
3314
- return;
3315
- this._processing++;
3316
- if (this.paused) {
3317
- this._processQueue.push([pattern, index, inGlobStar, cb]);
3318
- return;
3319
- }
3320
- var n = 0;
3321
- while (typeof pattern[n] === "string") {
3322
- n++;
3323
- }
3324
- var prefix;
3325
- switch (n) {
3326
- case pattern.length:
3327
- this._processSimple(pattern.join("/"), index, cb);
3328
- return;
3329
- case 0:
3330
- prefix = null;
3331
- break;
3332
- default:
3333
- prefix = pattern.slice(0, n).join("/");
3334
- break;
3335
- }
3336
- var remain = pattern.slice(n);
3337
- var read;
3338
- if (prefix === null)
3339
- read = ".";
3340
- else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) {
3341
- return typeof p === "string" ? p : "[*]";
3342
- }).join("/"))) {
3343
- if (!prefix || !isAbsolute(prefix))
3344
- prefix = "/" + prefix;
3345
- read = prefix;
3346
- } else
3347
- read = prefix;
3348
- var abs = this._makeAbs(read);
3349
- if (childrenIgnored(this, read))
3350
- return cb();
3351
- var isGlobStar = remain[0] === minimatch.GLOBSTAR;
3352
- if (isGlobStar)
3353
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb);
3354
- else
3355
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb);
3356
- };
3357
- Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) {
3358
- var self = this;
3359
- this._readdir(abs, inGlobStar, function(er, entries) {
3360
- return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
3361
- });
3362
- };
3363
- Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
3364
- if (!entries)
3365
- return cb();
3366
- var pn = remain[0];
3367
- var negate = !!this.minimatch.negate;
3368
- var rawGlob = pn._glob;
3369
- var dotOk = this.dot || rawGlob.charAt(0) === ".";
3370
- var matchedEntries = [];
3371
- for (var i = 0; i < entries.length; i++) {
3372
- var e = entries[i];
3373
- if (e.charAt(0) !== "." || dotOk) {
3374
- var m;
3375
- if (negate && !prefix) {
3376
- m = !e.match(pn);
3377
- } else {
3378
- m = e.match(pn);
3379
- }
3380
- if (m)
3381
- matchedEntries.push(e);
3382
- }
3383
- }
3384
- var len = matchedEntries.length;
3385
- if (len === 0)
3386
- return cb();
3387
- if (remain.length === 1 && !this.mark && !this.stat) {
3388
- if (!this.matches[index])
3389
- this.matches[index] = /* @__PURE__ */ Object.create(null);
3390
- for (var i = 0; i < len; i++) {
3391
- var e = matchedEntries[i];
3392
- if (prefix) {
3393
- if (prefix !== "/")
3394
- e = prefix + "/" + e;
3395
- else
3396
- e = prefix + e;
3397
- }
3398
- if (e.charAt(0) === "/" && !this.nomount) {
3399
- e = path10.join(this.root, e);
3400
- }
3401
- this._emitMatch(index, e);
3402
- }
3403
- return cb();
3404
- }
3405
- remain.shift();
3406
- for (var i = 0; i < len; i++) {
3407
- var e = matchedEntries[i];
3408
- var newPattern;
3409
- if (prefix) {
3410
- if (prefix !== "/")
3411
- e = prefix + "/" + e;
3412
- else
3413
- e = prefix + e;
3414
- }
3415
- this._process([e].concat(remain), index, inGlobStar, cb);
3416
- }
3417
- cb();
3418
- };
3419
- Glob.prototype._emitMatch = function(index, e) {
3420
- if (this.aborted)
3421
- return;
3422
- if (isIgnored(this, e))
3423
- return;
3424
- if (this.paused) {
3425
- this._emitQueue.push([index, e]);
3426
- return;
3427
- }
3428
- var abs = isAbsolute(e) ? e : this._makeAbs(e);
3429
- if (this.mark)
3430
- e = this._mark(e);
3431
- if (this.absolute)
3432
- e = abs;
3433
- if (this.matches[index][e])
3434
- return;
3435
- if (this.nodir) {
3436
- var c = this.cache[abs];
3437
- if (c === "DIR" || Array.isArray(c))
3438
- return;
3439
- }
3440
- this.matches[index][e] = true;
3441
- var st = this.statCache[abs];
3442
- if (st)
3443
- this.emit("stat", e, st);
3444
- this.emit("match", e);
3445
- };
3446
- Glob.prototype._readdirInGlobStar = function(abs, cb) {
3447
- if (this.aborted)
3448
- return;
3449
- if (this.follow)
3450
- return this._readdir(abs, false, cb);
3451
- var lstatkey = "lstat\0" + abs;
3452
- var self = this;
3453
- var lstatcb = inflight(lstatkey, lstatcb_);
3454
- if (lstatcb)
3455
- self.fs.lstat(abs, lstatcb);
3456
- function lstatcb_(er, lstat) {
3457
- if (er && er.code === "ENOENT")
3458
- return cb();
3459
- var isSym = lstat && lstat.isSymbolicLink();
3460
- self.symlinks[abs] = isSym;
3461
- if (!isSym && lstat && !lstat.isDirectory()) {
3462
- self.cache[abs] = "FILE";
3463
- cb();
3464
- } else
3465
- self._readdir(abs, false, cb);
3466
- }
3467
- };
3468
- Glob.prototype._readdir = function(abs, inGlobStar, cb) {
3469
- if (this.aborted)
3470
- return;
3471
- cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb);
3472
- if (!cb)
3473
- return;
3474
- if (inGlobStar && !ownProp(this.symlinks, abs))
3475
- return this._readdirInGlobStar(abs, cb);
3476
- if (ownProp(this.cache, abs)) {
3477
- var c = this.cache[abs];
3478
- if (!c || c === "FILE")
3479
- return cb();
3480
- if (Array.isArray(c))
3481
- return cb(null, c);
3482
- }
3483
- var self = this;
3484
- self.fs.readdir(abs, readdirCb(this, abs, cb));
3485
- };
3486
- function readdirCb(self, abs, cb) {
3487
- return function(er, entries) {
3488
- if (er)
3489
- self._readdirError(abs, er, cb);
3490
- else
3491
- self._readdirEntries(abs, entries, cb);
3492
- };
3493
- }
3494
- Glob.prototype._readdirEntries = function(abs, entries, cb) {
3495
- if (this.aborted)
3496
- return;
3497
- if (!this.mark && !this.stat) {
3498
- for (var i = 0; i < entries.length; i++) {
3499
- var e = entries[i];
3500
- if (abs === "/")
3501
- e = abs + e;
3502
- else
3503
- e = abs + "/" + e;
3504
- this.cache[e] = true;
3505
- }
3506
- }
3507
- this.cache[abs] = entries;
3508
- return cb(null, entries);
3509
- };
3510
- Glob.prototype._readdirError = function(f, er, cb) {
3511
- if (this.aborted)
3512
- return;
3513
- switch (er.code) {
3514
- case "ENOTSUP":
3515
- case "ENOTDIR":
3516
- var abs = this._makeAbs(f);
3517
- this.cache[abs] = "FILE";
3518
- if (abs === this.cwdAbs) {
3519
- var error = new Error(er.code + " invalid cwd " + this.cwd);
3520
- error.path = this.cwd;
3521
- error.code = er.code;
3522
- this.emit("error", error);
3523
- this.abort();
3524
- }
3525
- break;
3526
- case "ENOENT":
3527
- case "ELOOP":
3528
- case "ENAMETOOLONG":
3529
- case "UNKNOWN":
3530
- this.cache[this._makeAbs(f)] = false;
3531
- break;
3532
- default:
3533
- this.cache[this._makeAbs(f)] = false;
3534
- if (this.strict) {
3535
- this.emit("error", er);
3536
- this.abort();
3537
- }
3538
- if (!this.silent)
3539
- console.error("glob error", er);
3540
- break;
3541
- }
3542
- return cb();
3543
- };
3544
- Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) {
3545
- var self = this;
3546
- this._readdir(abs, inGlobStar, function(er, entries) {
3547
- self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
3548
- });
3549
- };
3550
- Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
3551
- if (!entries)
3552
- return cb();
3553
- var remainWithoutGlobStar = remain.slice(1);
3554
- var gspref = prefix ? [prefix] : [];
3555
- var noGlobStar = gspref.concat(remainWithoutGlobStar);
3556
- this._process(noGlobStar, index, false, cb);
3557
- var isSym = this.symlinks[abs];
3558
- var len = entries.length;
3559
- if (isSym && inGlobStar)
3560
- return cb();
3561
- for (var i = 0; i < len; i++) {
3562
- var e = entries[i];
3563
- if (e.charAt(0) === "." && !this.dot)
3564
- continue;
3565
- var instead = gspref.concat(entries[i], remainWithoutGlobStar);
3566
- this._process(instead, index, true, cb);
3567
- var below = gspref.concat(entries[i], remain);
3568
- this._process(below, index, true, cb);
3569
- }
3570
- cb();
3571
- };
3572
- Glob.prototype._processSimple = function(prefix, index, cb) {
3573
- var self = this;
3574
- this._stat(prefix, function(er, exists) {
3575
- self._processSimple2(prefix, index, er, exists, cb);
3576
- });
3577
- };
3578
- Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) {
3579
- if (!this.matches[index])
3580
- this.matches[index] = /* @__PURE__ */ Object.create(null);
3581
- if (!exists)
3582
- return cb();
3583
- if (prefix && isAbsolute(prefix) && !this.nomount) {
3584
- var trail = /[\/\\]$/.test(prefix);
3585
- if (prefix.charAt(0) === "/") {
3586
- prefix = path10.join(this.root, prefix);
3587
- } else {
3588
- prefix = path10.resolve(this.root, prefix);
3589
- if (trail)
3590
- prefix += "/";
3591
- }
3592
- }
3593
- if (process.platform === "win32")
3594
- prefix = prefix.replace(/\\/g, "/");
3595
- this._emitMatch(index, prefix);
3596
- cb();
3597
- };
3598
- Glob.prototype._stat = function(f, cb) {
3599
- var abs = this._makeAbs(f);
3600
- var needDir = f.slice(-1) === "/";
3601
- if (f.length > this.maxLength)
3602
- return cb();
3603
- if (!this.stat && ownProp(this.cache, abs)) {
3604
- var c = this.cache[abs];
3605
- if (Array.isArray(c))
3606
- c = "DIR";
3607
- if (!needDir || c === "DIR")
3608
- return cb(null, c);
3609
- if (needDir && c === "FILE")
3610
- return cb();
3611
- }
3612
- var exists;
3613
- var stat = this.statCache[abs];
3614
- if (stat !== void 0) {
3615
- if (stat === false)
3616
- return cb(null, stat);
3617
- else {
3618
- var type = stat.isDirectory() ? "DIR" : "FILE";
3619
- if (needDir && type === "FILE")
3620
- return cb();
3621
- else
3622
- return cb(null, type, stat);
3623
- }
3624
- }
3625
- var self = this;
3626
- var statcb = inflight("stat\0" + abs, lstatcb_);
3627
- if (statcb)
3628
- self.fs.lstat(abs, statcb);
3629
- function lstatcb_(er, lstat) {
3630
- if (lstat && lstat.isSymbolicLink()) {
3631
- return self.fs.stat(abs, function(er2, stat2) {
3632
- if (er2)
3633
- self._stat2(f, abs, null, lstat, cb);
3634
- else
3635
- self._stat2(f, abs, er2, stat2, cb);
3636
- });
3637
- } else {
3638
- self._stat2(f, abs, er, lstat, cb);
3639
- }
3640
- }
3641
- };
3642
- Glob.prototype._stat2 = function(f, abs, er, stat, cb) {
3643
- if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
3644
- this.statCache[abs] = false;
3645
- return cb();
3646
- }
3647
- var needDir = f.slice(-1) === "/";
3648
- this.statCache[abs] = stat;
3649
- if (abs.slice(-1) === "/" && stat && !stat.isDirectory())
3650
- return cb(null, false, stat);
3651
- var c = true;
3652
- if (stat)
3653
- c = stat.isDirectory() ? "DIR" : "FILE";
3654
- this.cache[abs] = this.cache[abs] || c;
3655
- if (needDir && c === "FILE")
3656
- return cb();
3657
- return cb(null, c, stat);
3658
- };
3659
- }
3660
- });
3661
-
3662
- // node_modules/flat-cache/node_modules/rimraf/rimraf.js
3663
- var require_rimraf = __commonJS({
3664
- "node_modules/flat-cache/node_modules/rimraf/rimraf.js"(exports, module) {
3665
- var assert = __require("assert");
3666
- var path10 = __require("path");
3667
- var fs6 = __require("fs");
3668
- var glob = void 0;
3669
- try {
3670
- glob = require_glob();
3671
- } catch (_err) {
3672
- }
3673
- var defaultGlobOpts = {
3674
- nosort: true,
3675
- silent: true
3676
- };
3677
- var timeout = 0;
3678
- var isWindows = process.platform === "win32";
3679
- var defaults = (options) => {
3680
- const methods = [
3681
- "unlink",
3682
- "chmod",
3683
- "stat",
3684
- "lstat",
3685
- "rmdir",
3686
- "readdir"
3687
- ];
3688
- methods.forEach((m) => {
3689
- options[m] = options[m] || fs6[m];
3690
- m = m + "Sync";
3691
- options[m] = options[m] || fs6[m];
3692
- });
3693
- options.maxBusyTries = options.maxBusyTries || 3;
3694
- options.emfileWait = options.emfileWait || 1e3;
3695
- if (options.glob === false) {
3696
- options.disableGlob = true;
3697
- }
3698
- if (options.disableGlob !== true && glob === void 0) {
3699
- throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");
3700
- }
3701
- options.disableGlob = options.disableGlob || false;
3702
- options.glob = options.glob || defaultGlobOpts;
3703
- };
3704
- var rimraf = (p, options, cb) => {
3705
- if (typeof options === "function") {
3706
- cb = options;
3707
- options = {};
3708
- }
3709
- assert(p, "rimraf: missing path");
3710
- assert.equal(typeof p, "string", "rimraf: path should be a string");
3711
- assert.equal(typeof cb, "function", "rimraf: callback function required");
3712
- assert(options, "rimraf: invalid options argument provided");
3713
- assert.equal(typeof options, "object", "rimraf: options should be object");
3714
- defaults(options);
3715
- let busyTries = 0;
3716
- let errState = null;
3717
- let n = 0;
3718
- const next = (er) => {
3719
- errState = errState || er;
3720
- if (--n === 0)
3721
- cb(errState);
3722
- };
3723
- const afterGlob = (er, results) => {
3724
- if (er)
3725
- return cb(er);
3726
- n = results.length;
3727
- if (n === 0)
3728
- return cb();
3729
- results.forEach((p2) => {
3730
- const CB = (er2) => {
3731
- if (er2) {
3732
- if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) {
3733
- busyTries++;
3734
- return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100);
3735
- }
3736
- if (er2.code === "EMFILE" && timeout < options.emfileWait) {
3737
- return setTimeout(() => rimraf_(p2, options, CB), timeout++);
3738
- }
3739
- if (er2.code === "ENOENT")
3740
- er2 = null;
3741
- }
3742
- timeout = 0;
3743
- next(er2);
3744
- };
3745
- rimraf_(p2, options, CB);
3746
- });
3747
- };
3748
- if (options.disableGlob || !glob.hasMagic(p))
3749
- return afterGlob(null, [p]);
3750
- options.lstat(p, (er, stat) => {
3751
- if (!er)
3752
- return afterGlob(null, [p]);
3753
- glob(p, options.glob, afterGlob);
3754
- });
3755
- };
3756
- var rimraf_ = (p, options, cb) => {
3757
- assert(p);
3758
- assert(options);
3759
- assert(typeof cb === "function");
3760
- options.lstat(p, (er, st) => {
3761
- if (er && er.code === "ENOENT")
3762
- return cb(null);
3763
- if (er && er.code === "EPERM" && isWindows)
3764
- fixWinEPERM(p, options, er, cb);
3765
- if (st && st.isDirectory())
3766
- return rmdir(p, options, er, cb);
3767
- options.unlink(p, (er2) => {
3768
- if (er2) {
3769
- if (er2.code === "ENOENT")
3770
- return cb(null);
3771
- if (er2.code === "EPERM")
3772
- return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb);
3773
- if (er2.code === "EISDIR")
3774
- return rmdir(p, options, er2, cb);
3775
- }
3776
- return cb(er2);
3777
- });
3778
- });
3779
- };
3780
- var fixWinEPERM = (p, options, er, cb) => {
3781
- assert(p);
3782
- assert(options);
3783
- assert(typeof cb === "function");
3784
- options.chmod(p, 438, (er2) => {
3785
- if (er2)
3786
- cb(er2.code === "ENOENT" ? null : er);
3787
- else
3788
- options.stat(p, (er3, stats) => {
3789
- if (er3)
3790
- cb(er3.code === "ENOENT" ? null : er);
3791
- else if (stats.isDirectory())
3792
- rmdir(p, options, er, cb);
3793
- else
3794
- options.unlink(p, cb);
3795
- });
3796
- });
3797
- };
3798
- var fixWinEPERMSync = (p, options, er) => {
3799
- assert(p);
3800
- assert(options);
3801
- try {
3802
- options.chmodSync(p, 438);
3803
- } catch (er2) {
3804
- if (er2.code === "ENOENT")
3805
- return;
3806
- else
3807
- throw er;
3808
- }
3809
- let stats;
3810
- try {
3811
- stats = options.statSync(p);
3812
- } catch (er3) {
3813
- if (er3.code === "ENOENT")
3814
- return;
3815
- else
3816
- throw er;
3817
- }
3818
- if (stats.isDirectory())
3819
- rmdirSync(p, options, er);
3820
- else
3821
- options.unlinkSync(p);
3822
- };
3823
- var rmdir = (p, options, originalEr, cb) => {
3824
- assert(p);
3825
- assert(options);
3826
- assert(typeof cb === "function");
3827
- options.rmdir(p, (er) => {
3828
- if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
3829
- rmkids(p, options, cb);
3830
- else if (er && er.code === "ENOTDIR")
3831
- cb(originalEr);
3832
- else
3833
- cb(er);
3834
- });
3835
- };
3836
- var rmkids = (p, options, cb) => {
3837
- assert(p);
3838
- assert(options);
3839
- assert(typeof cb === "function");
3840
- options.readdir(p, (er, files) => {
3841
- if (er)
3842
- return cb(er);
3843
- let n = files.length;
3844
- if (n === 0)
3845
- return options.rmdir(p, cb);
3846
- let errState;
3847
- files.forEach((f) => {
3848
- rimraf(path10.join(p, f), options, (er2) => {
3849
- if (errState)
3850
- return;
3851
- if (er2)
3852
- return cb(errState = er2);
3853
- if (--n === 0)
3854
- options.rmdir(p, cb);
3855
- });
3856
- });
3857
- });
3858
- };
3859
- var rimrafSync = (p, options) => {
3860
- options = options || {};
3861
- defaults(options);
3862
- assert(p, "rimraf: missing path");
3863
- assert.equal(typeof p, "string", "rimraf: path should be a string");
3864
- assert(options, "rimraf: missing options");
3865
- assert.equal(typeof options, "object", "rimraf: options should be object");
3866
- let results;
3867
- if (options.disableGlob || !glob.hasMagic(p)) {
3868
- results = [p];
3869
- } else {
3870
- try {
3871
- options.lstatSync(p);
3872
- results = [p];
3873
- } catch (er) {
3874
- results = glob.sync(p, options.glob);
3875
- }
3876
- }
3877
- if (!results.length)
3878
- return;
3879
- for (let i = 0; i < results.length; i++) {
3880
- const p2 = results[i];
3881
- let st;
3882
- try {
3883
- st = options.lstatSync(p2);
3884
- } catch (er) {
3885
- if (er.code === "ENOENT")
3886
- return;
3887
- if (er.code === "EPERM" && isWindows)
3888
- fixWinEPERMSync(p2, options, er);
3889
- }
3890
- try {
3891
- if (st && st.isDirectory())
3892
- rmdirSync(p2, options, null);
3893
- else
3894
- options.unlinkSync(p2);
3895
- } catch (er) {
3896
- if (er.code === "ENOENT")
3897
- return;
3898
- if (er.code === "EPERM")
3899
- return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er);
3900
- if (er.code !== "EISDIR")
3901
- throw er;
3902
- rmdirSync(p2, options, er);
3903
- }
3904
- }
3905
- };
3906
- var rmdirSync = (p, options, originalEr) => {
3907
- assert(p);
3908
- assert(options);
3909
- try {
3910
- options.rmdirSync(p);
3911
- } catch (er) {
3912
- if (er.code === "ENOENT")
3913
- return;
3914
- if (er.code === "ENOTDIR")
3915
- throw originalEr;
3916
- if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
3917
- rmkidsSync(p, options);
3918
- }
3919
- };
3920
- var rmkidsSync = (p, options) => {
3921
- assert(p);
3922
- assert(options);
3923
- options.readdirSync(p).forEach((f) => rimrafSync(path10.join(p, f), options));
3924
- const retries = isWindows ? 100 : 1;
3925
- let i = 0;
3926
- do {
3927
- let threw = true;
3928
- try {
3929
- const ret = options.rmdirSync(p, options);
3930
- threw = false;
3931
- return ret;
3932
- } finally {
3933
- if (++i < retries && threw)
3934
- continue;
3935
- }
3936
- } while (true);
3937
- };
3938
- module.exports = rimraf;
3939
- rimraf.sync = rimrafSync;
3940
- }
3941
- });
3942
-
3943
- // node_modules/flat-cache/src/del.js
3944
- var require_del = __commonJS({
3945
- "node_modules/flat-cache/src/del.js"(exports, module) {
3946
- var rimraf = require_rimraf().sync;
3947
- var fs6 = __require("fs");
3948
- module.exports = function del(file) {
3949
- if (fs6.existsSync(file)) {
3950
- rimraf(file, {
3951
- glob: false
3952
- });
3953
- return true;
3954
- }
3955
- return false;
3956
- };
3957
- }
3958
- });
3959
-
3960
- // node_modules/flat-cache/src/cache.js
3961
- var require_cache = __commonJS({
3962
- "node_modules/flat-cache/src/cache.js"(exports, module) {
3963
- var path10 = __require("path");
3964
- var fs6 = __require("fs");
3965
- var Keyv = require_src();
3966
- var utils = require_utils();
3967
- var del = require_del();
3968
- var writeJSON = utils.writeJSON;
3969
- var cache = {
3970
- /**
3971
- * Load a cache identified by the given Id. If the element does not exists, then initialize an empty
3972
- * cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted
3973
- * then the cache module directory `./cache` will be used instead
3974
- *
3975
- * @method load
3976
- * @param docId {String} the id of the cache, would also be used as the name of the file cache
3977
- * @param [cacheDir] {String} directory for the cache entry
3978
- */
3979
- load: function(docId, cacheDir) {
3980
- var me = this;
3981
- me.keyv = new Keyv();
3982
- me.__visited = {};
3983
- me.__persisted = {};
3984
- me._pathToFile = cacheDir ? path10.resolve(cacheDir, docId) : path10.resolve(__dirname, "../.cache/", docId);
3985
- if (fs6.existsSync(me._pathToFile)) {
3986
- me._persisted = utils.tryParse(me._pathToFile, {});
766
+ // node_modules/file-entry-cache/node_modules/flat-cache/src/cache.js
767
+ var require_cache = __commonJS({
768
+ "node_modules/file-entry-cache/node_modules/flat-cache/src/cache.js"(exports, module) {
769
+ var path10 = __require("path");
770
+ var fs6 = __require("fs");
771
+ var Keyv = require_src();
772
+ var { writeJSON, tryParse } = require_utils();
773
+ var { del } = require_del();
774
+ var cache = {
775
+ /**
776
+ * Load a cache identified by the given Id. If the element does not exists, then initialize an empty
777
+ * cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted
778
+ * then the cache module directory `./cache` will be used instead
779
+ *
780
+ * @method load
781
+ * @param docId {String} the id of the cache, would also be used as the name of the file cache
782
+ * @param [cacheDir] {String} directory for the cache entry
783
+ */
784
+ load(documentId, cacheDir) {
785
+ const me = this;
786
+ me.keyv = new Keyv();
787
+ me.__visited = {};
788
+ me.__persisted = {};
789
+ me._pathToFile = cacheDir ? path10.resolve(cacheDir, documentId) : path10.resolve(__dirname, "../.cache/", documentId);
790
+ if (fs6.existsSync(me._pathToFile)) {
791
+ me._persisted = tryParse(me._pathToFile, {});
3987
792
  }
3988
793
  },
3989
794
  get _persisted() {
@@ -3991,110 +796,108 @@ var require_cache = __commonJS({
3991
796
  },
3992
797
  set _persisted(value) {
3993
798
  this.__persisted = value;
3994
- this.keyv.set("persisted", value);
3995
799
  },
3996
800
  get _visited() {
3997
801
  return this.__visited;
3998
802
  },
3999
803
  set _visited(value) {
4000
804
  this.__visited = value;
4001
- this.keyv.set("visited", value);
4002
805
  },
4003
806
  /**
4004
- * Load the cache from the provided file
4005
- * @method loadFile
4006
- * @param {String} pathToFile the path to the file containing the info for the cache
4007
- */
4008
- loadFile: function(pathToFile) {
4009
- var me = this;
4010
- var dir = path10.dirname(pathToFile);
4011
- var fName = path10.basename(pathToFile);
807
+ * Load the cache from the provided file
808
+ * @method loadFile
809
+ * @param {String} pathToFile the path to the file containing the info for the cache
810
+ */
811
+ loadFile(pathToFile) {
812
+ const me = this;
813
+ const dir = path10.dirname(pathToFile);
814
+ const fName = path10.basename(pathToFile);
4012
815
  me.load(fName, dir);
4013
816
  },
4014
817
  /**
4015
- * Returns the entire persisted object
4016
- * @method all
4017
- * @returns {*}
4018
- */
4019
- all: function() {
818
+ * Returns the entire persisted object
819
+ * @method all
820
+ * @returns {*}
821
+ */
822
+ all() {
4020
823
  return this._persisted;
4021
824
  },
4022
- keys: function() {
825
+ keys() {
4023
826
  return Object.keys(this._persisted);
4024
827
  },
4025
828
  /**
4026
- * sets a key to a given value
4027
- * @method setKey
4028
- * @param key {string} the key to set
4029
- * @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify
4030
- */
4031
- setKey: function(key, value) {
829
+ * Sets a key to a given value
830
+ * @method setKey
831
+ * @param key {string} the key to set
832
+ * @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify
833
+ */
834
+ setKey(key, value) {
4032
835
  this._visited[key] = true;
4033
836
  this._persisted[key] = value;
4034
837
  },
4035
838
  /**
4036
- * remove a given key from the cache
4037
- * @method removeKey
4038
- * @param key {String} the key to remove from the object
4039
- */
4040
- removeKey: function(key) {
839
+ * Remove a given key from the cache
840
+ * @method removeKey
841
+ * @param key {String} the key to remove from the object
842
+ */
843
+ removeKey(key) {
4041
844
  delete this._visited[key];
4042
845
  delete this._persisted[key];
4043
846
  },
4044
847
  /**
4045
- * Return the value of the provided key
4046
- * @method getKey
4047
- * @param key {String} the name of the key to retrieve
4048
- * @returns {*} the value from the key
4049
- */
4050
- getKey: function(key) {
848
+ * Return the value of the provided key
849
+ * @method getKey
850
+ * @param key {String} the name of the key to retrieve
851
+ * @returns {*} the value from the key
852
+ */
853
+ getKey(key) {
4051
854
  this._visited[key] = true;
4052
855
  return this._persisted[key];
4053
856
  },
4054
857
  /**
4055
- * Remove keys that were not accessed/set since the
4056
- * last time the `prune` method was called.
4057
- * @method _prune
4058
- * @private
4059
- */
4060
- _prune: function() {
4061
- var me = this;
4062
- var obj = {};
4063
- var keys = Object.keys(me._visited);
858
+ * Remove keys that were not accessed/set since the
859
+ * last time the `prune` method was called.
860
+ * @method _prune
861
+ * @private
862
+ */
863
+ _prune() {
864
+ const me = this;
865
+ const object = {};
866
+ const keys = Object.keys(me._visited);
4064
867
  if (keys.length === 0) {
4065
868
  return;
4066
869
  }
4067
- keys.forEach(function(key) {
4068
- obj[key] = me._persisted[key];
4069
- });
870
+ for (const key of keys) {
871
+ object[key] = me._persisted[key];
872
+ }
4070
873
  me._visited = {};
4071
- me._persisted = obj;
874
+ me._persisted = object;
4072
875
  },
4073
876
  /**
4074
- * Save the state of the cache identified by the docId to disk
4075
- * as a JSON structure
4076
- * @param [noPrune=false] {Boolean} whether to remove from cache the non visited files
4077
- * @method save
4078
- */
4079
- save: function(noPrune) {
4080
- var me = this;
877
+ * Save the state of the cache identified by the docId to disk
878
+ * as a JSON structure
879
+ * @param [noPrune=false] {Boolean} whether to remove from cache the non visited files
880
+ * @method save
881
+ */
882
+ save(noPrune) {
883
+ const me = this;
4081
884
  !noPrune && me._prune();
4082
885
  writeJSON(me._pathToFile, me._persisted);
4083
886
  },
4084
887
  /**
4085
- * remove the file where the cache is persisted
4086
- * @method removeCacheFile
4087
- * @return {Boolean} true or false if the file was successfully deleted
4088
- */
4089
- removeCacheFile: function() {
888
+ * Remove the file where the cache is persisted
889
+ * @method removeCacheFile
890
+ * @return {Boolean} true or false if the file was successfully deleted
891
+ */
892
+ removeCacheFile() {
4090
893
  return del(this._pathToFile);
4091
894
  },
4092
895
  /**
4093
- * Destroy the file cache and cache content.
4094
- * @method destroy
4095
- */
4096
- destroy: function() {
4097
- var me = this;
896
+ * Destroy the file cache and cache content.
897
+ * @method destroy
898
+ */
899
+ destroy() {
900
+ const me = this;
4098
901
  me._visited = {};
4099
902
  me._persisted = {};
4100
903
  me.removeCacheFile();
@@ -4102,54 +905,54 @@ var require_cache = __commonJS({
4102
905
  };
4103
906
  module.exports = {
4104
907
  /**
4105
- * Alias for create. Should be considered depreacted. Will be removed in next releases
4106
- *
4107
- * @method load
4108
- * @param docId {String} the id of the cache, would also be used as the name of the file cache
4109
- * @param [cacheDir] {String} directory for the cache entry
4110
- * @returns {cache} cache instance
4111
- */
4112
- load: function(docId, cacheDir) {
4113
- return this.create(docId, cacheDir);
908
+ * Alias for create. Should be considered depreacted. Will be removed in next releases
909
+ *
910
+ * @method load
911
+ * @param docId {String} the id of the cache, would also be used as the name of the file cache
912
+ * @param [cacheDir] {String} directory for the cache entry
913
+ * @returns {cache} cache instance
914
+ */
915
+ load(documentId, cacheDir) {
916
+ return this.create(documentId, cacheDir);
4114
917
  },
4115
918
  /**
4116
- * Load a cache identified by the given Id. If the element does not exists, then initialize an empty
4117
- * cache storage.
4118
- *
4119
- * @method create
4120
- * @param docId {String} the id of the cache, would also be used as the name of the file cache
4121
- * @param [cacheDir] {String} directory for the cache entry
4122
- * @returns {cache} cache instance
4123
- */
4124
- create: function(docId, cacheDir) {
4125
- var obj = Object.create(cache);
4126
- obj.load(docId, cacheDir);
4127
- return obj;
919
+ * Load a cache identified by the given Id. If the element does not exists, then initialize an empty
920
+ * cache storage.
921
+ *
922
+ * @method create
923
+ * @param docId {String} the id of the cache, would also be used as the name of the file cache
924
+ * @param [cacheDir] {String} directory for the cache entry
925
+ * @returns {cache} cache instance
926
+ */
927
+ create(documentId, cacheDir) {
928
+ const object = Object.create(cache);
929
+ object.load(documentId, cacheDir);
930
+ return object;
4128
931
  },
4129
- createFromFile: function(filePath) {
4130
- var obj = Object.create(cache);
4131
- obj.loadFile(filePath);
4132
- return obj;
932
+ createFromFile(filePath) {
933
+ const object = Object.create(cache);
934
+ object.loadFile(filePath);
935
+ return object;
4133
936
  },
4134
937
  /**
4135
- * Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly
4136
- *
4137
- * @method clearCache
4138
- * @param docId {String} the id of the cache, would also be used as the name of the file cache
4139
- * @param cacheDir {String} the directory where the cache file was written
4140
- * @returns {Boolean} true if the cache folder was deleted. False otherwise
4141
- */
4142
- clearCacheById: function(docId, cacheDir) {
4143
- var filePath = cacheDir ? path10.resolve(cacheDir, docId) : path10.resolve(__dirname, "../.cache/", docId);
938
+ * Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly
939
+ *
940
+ * @method clearCache
941
+ * @param docId {String} the id of the cache, would also be used as the name of the file cache
942
+ * @param cacheDir {String} the directory where the cache file was written
943
+ * @returns {Boolean} true if the cache folder was deleted. False otherwise
944
+ */
945
+ clearCacheById(documentId, cacheDir) {
946
+ const filePath = cacheDir ? path10.resolve(cacheDir, documentId) : path10.resolve(__dirname, "../.cache/", documentId);
4144
947
  return del(filePath);
4145
948
  },
4146
949
  /**
4147
- * Remove all cache stored in the cache directory
4148
- * @method clearAll
4149
- * @returns {Boolean} true if the cache folder was deleted. False otherwise
4150
- */
4151
- clearAll: function(cacheDir) {
4152
- var filePath = cacheDir ? path10.resolve(cacheDir) : path10.resolve(__dirname, "../.cache/");
950
+ * Remove all cache stored in the cache directory
951
+ * @method clearAll
952
+ * @returns {Boolean} true if the cache folder was deleted. False otherwise
953
+ */
954
+ clearAll(cacheDir) {
955
+ const filePath = cacheDir ? path10.resolve(cacheDir) : path10.resolve(__dirname, "../.cache/");
4153
956
  return del(filePath);
4154
957
  }
4155
958
  };
@@ -4160,135 +963,139 @@ var require_cache = __commonJS({
4160
963
  var require_cache2 = __commonJS({
4161
964
  "node_modules/file-entry-cache/cache.js"(exports, module) {
4162
965
  var path10 = __require("path");
966
+ var process5 = __require("process");
4163
967
  var crypto = __require("crypto");
4164
968
  module.exports = {
4165
- createFromFile: function(filePath, useChecksum) {
4166
- var fname = path10.basename(filePath);
4167
- var dir = path10.dirname(filePath);
969
+ createFromFile(filePath, useChecksum) {
970
+ const fname = path10.basename(filePath);
971
+ const dir = path10.dirname(filePath);
4168
972
  return this.create(fname, dir, useChecksum);
4169
973
  },
4170
- create: function(cacheId, _path, useChecksum) {
4171
- var fs6 = __require("fs");
4172
- var flatCache = require_cache();
4173
- var cache = flatCache.load(cacheId, _path);
4174
- var normalizedEntries = {};
4175
- var removeNotFoundFiles = function removeNotFoundFiles2() {
974
+ create(cacheId, _path, useChecksum) {
975
+ const fs6 = __require("fs");
976
+ const flatCache = require_cache();
977
+ const cache = flatCache.load(cacheId, _path);
978
+ let normalizedEntries = {};
979
+ const removeNotFoundFiles = function removeNotFoundFiles2() {
4176
980
  const cachedEntries = cache.keys();
4177
- cachedEntries.forEach(function remover(fPath) {
981
+ for (const fPath of cachedEntries) {
4178
982
  try {
4179
983
  fs6.statSync(fPath);
4180
- } catch (err) {
4181
- if (err.code === "ENOENT") {
984
+ } catch (error) {
985
+ if (error.code === "ENOENT") {
4182
986
  cache.removeKey(fPath);
4183
987
  }
4184
988
  }
4185
- });
989
+ }
4186
990
  };
4187
991
  removeNotFoundFiles();
4188
992
  return {
4189
993
  /**
4190
- * the flat cache storage used to persist the metadata of the `files
4191
- * @type {Object}
4192
- */
994
+ * The flat cache storage used to persist the metadata of the `files
995
+ * @type {Object}
996
+ */
4193
997
  cache,
4194
998
  /**
4195
- * Given a buffer, calculate md5 hash of its content.
4196
- * @method getHash
4197
- * @param {Buffer} buffer buffer to calculate hash on
4198
- * @return {String} content hash digest
4199
- */
4200
- getHash: function(buffer) {
999
+ * Given a buffer, calculate md5 hash of its content.
1000
+ * @method getHash
1001
+ * @param {Buffer} buffer buffer to calculate hash on
1002
+ * @return {String} content hash digest
1003
+ */
1004
+ getHash(buffer) {
4201
1005
  return crypto.createHash("md5").update(buffer).digest("hex");
4202
1006
  },
4203
1007
  /**
4204
- * Return whether or not a file has changed since last time reconcile was called.
4205
- * @method hasFileChanged
4206
- * @param {String} file the filepath to check
4207
- * @return {Boolean} wheter or not the file has changed
4208
- */
4209
- hasFileChanged: function(file) {
1008
+ * Return whether or not a file has changed since last time reconcile was called.
1009
+ * @method hasFileChanged
1010
+ * @param {String} file the filepath to check
1011
+ * @return {Boolean} wheter or not the file has changed
1012
+ */
1013
+ hasFileChanged(file) {
4210
1014
  return this.getFileDescriptor(file).changed;
4211
1015
  },
4212
1016
  /**
4213
- * given an array of file paths it return and object with three arrays:
4214
- * - changedFiles: Files that changed since previous run
4215
- * - notChangedFiles: Files that haven't change
4216
- * - notFoundFiles: Files that were not found, probably deleted
4217
- *
4218
- * @param {Array} files the files to analyze and compare to the previous seen files
4219
- * @return {[type]} [description]
4220
- */
4221
- analyzeFiles: function(files) {
4222
- var me = this;
4223
- files = files || [];
4224
- var res = {
1017
+ * Given an array of file paths it return and object with three arrays:
1018
+ * - changedFiles: Files that changed since previous run
1019
+ * - notChangedFiles: Files that haven't change
1020
+ * - notFoundFiles: Files that were not found, probably deleted
1021
+ *
1022
+ * @param {Array} files the files to analyze and compare to the previous seen files
1023
+ * @return {[type]} [description]
1024
+ */
1025
+ analyzeFiles(files) {
1026
+ const me = this;
1027
+ files || (files = []);
1028
+ const res = {
4225
1029
  changedFiles: [],
4226
1030
  notFoundFiles: [],
4227
1031
  notChangedFiles: []
4228
1032
  };
4229
- me.normalizeEntries(files).forEach(function(entry) {
1033
+ for (const entry of me.normalizeEntries(files)) {
4230
1034
  if (entry.changed) {
4231
1035
  res.changedFiles.push(entry.key);
4232
- return;
1036
+ continue;
4233
1037
  }
4234
1038
  if (entry.notFound) {
4235
1039
  res.notFoundFiles.push(entry.key);
4236
- return;
1040
+ continue;
4237
1041
  }
4238
1042
  res.notChangedFiles.push(entry.key);
4239
- });
1043
+ }
4240
1044
  return res;
4241
1045
  },
4242
- getFileDescriptor: function(file) {
4243
- var fstat;
1046
+ getFileDescriptor(file) {
1047
+ let fstat;
4244
1048
  try {
1049
+ if (!path10.isAbsolute(file)) {
1050
+ file = path10.resolve(process5.cwd(), file);
1051
+ }
4245
1052
  fstat = fs6.statSync(file);
4246
- } catch (ex) {
1053
+ } catch (error) {
4247
1054
  this.removeEntry(file);
4248
- return { key: file, notFound: true, err: ex };
1055
+ return { key: file, notFound: true, err: error };
4249
1056
  }
4250
1057
  if (useChecksum) {
4251
1058
  return this._getFileDescriptorUsingChecksum(file);
4252
1059
  }
4253
1060
  return this._getFileDescriptorUsingMtimeAndSize(file, fstat);
4254
1061
  },
4255
- _getFileDescriptorUsingMtimeAndSize: function(file, fstat) {
4256
- var meta = cache.getKey(file);
4257
- var cacheExists = !!meta;
4258
- var cSize = fstat.size;
4259
- var cTime = fstat.mtime.getTime();
4260
- var isDifferentDate;
4261
- var isDifferentSize;
4262
- if (!meta) {
4263
- meta = { size: cSize, mtime: cTime };
4264
- } else {
1062
+ _getFileDescriptorUsingMtimeAndSize(file, fstat) {
1063
+ let meta = cache.getKey(file);
1064
+ const cacheExists = Boolean(meta);
1065
+ const cSize = fstat.size;
1066
+ const cTime = fstat.mtime.getTime();
1067
+ let isDifferentDate;
1068
+ let isDifferentSize;
1069
+ if (meta) {
4265
1070
  isDifferentDate = cTime !== meta.mtime;
4266
1071
  isDifferentSize = cSize !== meta.size;
1072
+ } else {
1073
+ meta = { size: cSize, mtime: cTime };
4267
1074
  }
4268
- var nEntry = normalizedEntries[file] = {
1075
+ const nEntry = normalizedEntries[file] = {
4269
1076
  key: file,
4270
1077
  changed: !cacheExists || isDifferentDate || isDifferentSize,
4271
1078
  meta
4272
1079
  };
4273
1080
  return nEntry;
4274
1081
  },
4275
- _getFileDescriptorUsingChecksum: function(file) {
4276
- var meta = cache.getKey(file);
4277
- var cacheExists = !!meta;
4278
- var contentBuffer;
1082
+ _getFileDescriptorUsingChecksum(file) {
1083
+ let meta = cache.getKey(file);
1084
+ const cacheExists = Boolean(meta);
1085
+ let contentBuffer;
4279
1086
  try {
4280
1087
  contentBuffer = fs6.readFileSync(file);
4281
- } catch (ex) {
1088
+ } catch {
4282
1089
  contentBuffer = "";
4283
1090
  }
4284
- var isDifferent = true;
4285
- var hash = this.getHash(contentBuffer);
4286
- if (!meta) {
4287
- meta = { hash };
4288
- } else {
1091
+ let isDifferent = true;
1092
+ const hash = this.getHash(contentBuffer);
1093
+ if (meta) {
4289
1094
  isDifferent = hash !== meta.hash;
1095
+ } else {
1096
+ meta = { hash };
4290
1097
  }
4291
- var nEntry = normalizedEntries[file] = {
1098
+ const nEntry = normalizedEntries[file] = {
4292
1099
  key: file,
4293
1100
  changed: !cacheExists || isDifferent,
4294
1101
  meta
@@ -4296,72 +1103,69 @@ var require_cache2 = __commonJS({
4296
1103
  return nEntry;
4297
1104
  },
4298
1105
  /**
4299
- * Return the list o the files that changed compared
4300
- * against the ones stored in the cache
4301
- *
4302
- * @method getUpdated
4303
- * @param files {Array} the array of files to compare against the ones in the cache
4304
- * @returns {Array}
4305
- */
4306
- getUpdatedFiles: function(files) {
4307
- var me = this;
4308
- files = files || [];
4309
- return me.normalizeEntries(files).filter(function(entry) {
4310
- return entry.changed;
4311
- }).map(function(entry) {
4312
- return entry.key;
4313
- });
1106
+ * Return the list o the files that changed compared
1107
+ * against the ones stored in the cache
1108
+ *
1109
+ * @method getUpdated
1110
+ * @param files {Array} the array of files to compare against the ones in the cache
1111
+ * @returns {Array}
1112
+ */
1113
+ getUpdatedFiles(files) {
1114
+ const me = this;
1115
+ files || (files = []);
1116
+ return me.normalizeEntries(files).filter((entry) => entry.changed).map((entry) => entry.key);
4314
1117
  },
4315
1118
  /**
4316
- * return the list of files
4317
- * @method normalizeEntries
4318
- * @param files
4319
- * @returns {*}
4320
- */
4321
- normalizeEntries: function(files) {
4322
- files = files || [];
4323
- var me = this;
4324
- var nEntries = files.map(function(file) {
4325
- return me.getFileDescriptor(file);
4326
- });
1119
+ * Return the list of files
1120
+ * @method normalizeEntries
1121
+ * @param files
1122
+ * @returns {*}
1123
+ */
1124
+ normalizeEntries(files) {
1125
+ files || (files = []);
1126
+ const me = this;
1127
+ const nEntries = files.map((file) => me.getFileDescriptor(file));
4327
1128
  return nEntries;
4328
1129
  },
4329
1130
  /**
4330
- * Remove an entry from the file-entry-cache. Useful to force the file to still be considered
4331
- * modified the next time the process is run
4332
- *
4333
- * @method removeEntry
4334
- * @param entryName
4335
- */
4336
- removeEntry: function(entryName) {
1131
+ * Remove an entry from the file-entry-cache. Useful to force the file to still be considered
1132
+ * modified the next time the process is run
1133
+ *
1134
+ * @method removeEntry
1135
+ * @param entryName
1136
+ */
1137
+ removeEntry(entryName) {
1138
+ if (!path10.isAbsolute(entryName)) {
1139
+ entryName = path10.resolve(process5.cwd(), entryName);
1140
+ }
4337
1141
  delete normalizedEntries[entryName];
4338
1142
  cache.removeKey(entryName);
4339
1143
  },
4340
1144
  /**
4341
- * Delete the cache file from the disk
4342
- * @method deleteCacheFile
4343
- */
4344
- deleteCacheFile: function() {
1145
+ * Delete the cache file from the disk
1146
+ * @method deleteCacheFile
1147
+ */
1148
+ deleteCacheFile() {
4345
1149
  cache.removeCacheFile();
4346
1150
  },
4347
1151
  /**
4348
- * remove the cache from the file and clear the memory cache
4349
- */
4350
- destroy: function() {
1152
+ * Remove the cache from the file and clear the memory cache
1153
+ */
1154
+ destroy() {
4351
1155
  normalizedEntries = {};
4352
1156
  cache.destroy();
4353
1157
  },
4354
- _getMetaForFileUsingCheckSum: function(cacheEntry) {
4355
- var contentBuffer = fs6.readFileSync(cacheEntry.key);
4356
- var hash = this.getHash(contentBuffer);
4357
- var meta = Object.assign(cacheEntry.meta, { hash });
1158
+ _getMetaForFileUsingCheckSum(cacheEntry) {
1159
+ const contentBuffer = fs6.readFileSync(cacheEntry.key);
1160
+ const hash = this.getHash(contentBuffer);
1161
+ const meta = Object.assign(cacheEntry.meta, { hash });
4358
1162
  delete meta.size;
4359
1163
  delete meta.mtime;
4360
1164
  return meta;
4361
1165
  },
4362
- _getMetaForFileUsingMtimeAndSize: function(cacheEntry) {
4363
- var stat = fs6.statSync(cacheEntry.key);
4364
- var meta = Object.assign(cacheEntry.meta, {
1166
+ _getMetaForFileUsingMtimeAndSize(cacheEntry) {
1167
+ const stat = fs6.statSync(cacheEntry.key);
1168
+ const meta = Object.assign(cacheEntry.meta, {
4365
1169
  size: stat.size,
4366
1170
  mtime: stat.mtime.getTime()
4367
1171
  });
@@ -4369,29 +1173,29 @@ var require_cache2 = __commonJS({
4369
1173
  return meta;
4370
1174
  },
4371
1175
  /**
4372
- * Sync the files and persist them to the cache
4373
- * @method reconcile
4374
- */
4375
- reconcile: function(noPrune) {
1176
+ * Sync the files and persist them to the cache
1177
+ * @method reconcile
1178
+ */
1179
+ reconcile(noPrune) {
4376
1180
  removeNotFoundFiles();
4377
- noPrune = typeof noPrune === "undefined" ? true : noPrune;
4378
- var entries = normalizedEntries;
4379
- var keys = Object.keys(entries);
1181
+ noPrune = noPrune === void 0 ? true : noPrune;
1182
+ const entries = normalizedEntries;
1183
+ const keys = Object.keys(entries);
4380
1184
  if (keys.length === 0) {
4381
1185
  return;
4382
1186
  }
4383
- var me = this;
4384
- keys.forEach(function(entryName) {
4385
- var cacheEntry = entries[entryName];
1187
+ const me = this;
1188
+ for (const entryName of keys) {
1189
+ const cacheEntry = entries[entryName];
4386
1190
  try {
4387
- var meta = useChecksum ? me._getMetaForFileUsingCheckSum(cacheEntry) : me._getMetaForFileUsingMtimeAndSize(cacheEntry);
1191
+ const meta = useChecksum ? me._getMetaForFileUsingCheckSum(cacheEntry) : me._getMetaForFileUsingMtimeAndSize(cacheEntry);
4388
1192
  cache.setKey(entryName, meta);
4389
- } catch (err) {
4390
- if (err.code !== "ENOENT") {
4391
- throw err;
1193
+ } catch (error) {
1194
+ if (error.code !== "ENOENT") {
1195
+ throw error;
4392
1196
  }
4393
1197
  }
4394
- });
1198
+ }
4395
1199
  cache.save(noPrune);
4396
1200
  }
4397
1201
  };
@@ -4562,26 +1366,19 @@ var require_wcwidth = __commonJS({
4562
1366
  let min = 0;
4563
1367
  let max = combining.length - 1;
4564
1368
  let mid;
4565
- if (ucs < combining[0][0] || ucs > combining[max][1])
4566
- return false;
1369
+ if (ucs < combining[0][0] || ucs > combining[max][1]) return false;
4567
1370
  while (max >= min) {
4568
1371
  mid = Math.floor((min + max) / 2);
4569
- if (ucs > combining[mid][1])
4570
- min = mid + 1;
4571
- else if (ucs < combining[mid][0])
4572
- max = mid - 1;
4573
- else
4574
- return true;
1372
+ if (ucs > combining[mid][1]) min = mid + 1;
1373
+ else if (ucs < combining[mid][0]) max = mid - 1;
1374
+ else return true;
4575
1375
  }
4576
1376
  return false;
4577
1377
  }
4578
1378
  function wcwidth2(ucs, opts) {
4579
- if (ucs === 0)
4580
- return opts.nul;
4581
- if (ucs < 32 || ucs >= 127 && ucs < 160)
4582
- return opts.control;
4583
- if (bisearch(ucs))
4584
- return 0;
1379
+ if (ucs === 0) return opts.nul;
1380
+ if (ucs < 32 || ucs >= 127 && ucs < 160) return opts.control;
1381
+ if (bisearch(ucs)) return 0;
4585
1382
  return 1 + (ucs >= 4352 && (ucs <= 4447 || // Hangul Jamo init. consonants
4586
1383
  ucs == 9001 || ucs == 9002 || ucs >= 11904 && ucs <= 42191 && ucs != 12351 || // CJK ... Yi
4587
1384
  ucs >= 44032 && ucs <= 55203 || // Hangul Syllables
@@ -4596,8 +1393,7 @@ var require_wcwidth = __commonJS({
4596
1393
  let l;
4597
1394
  let s = 0;
4598
1395
  let n;
4599
- if (typeof str !== "string")
4600
- return wcwidth2(str, opts);
1396
+ if (typeof str !== "string") return wcwidth2(str, opts);
4601
1397
  for (let i = 0; i < str.length; i++) {
4602
1398
  h = str.charCodeAt(i);
4603
1399
  if (h >= 55296 && h <= 56319) {
@@ -4609,8 +1405,7 @@ var require_wcwidth = __commonJS({
4609
1405
  }
4610
1406
  }
4611
1407
  n = wcwidth2(h, opts);
4612
- if (n < 0)
4613
- return -1;
1408
+ if (n < 0) return -1;
4614
1409
  s += n;
4615
1410
  }
4616
1411
  return s;
@@ -4825,6 +1620,7 @@ var {
4825
1620
  normalizeOptionSettings,
4826
1621
  vnopts,
4827
1622
  fastGlob,
1623
+ createTwoFilesPatch,
4828
1624
  mockable
4829
1625
  } = sharedWithCli;
4830
1626
 
@@ -5850,7 +2646,6 @@ var find_config_path_default = logResolvedConfigPathOrDie;
5850
2646
  // src/cli/format.js
5851
2647
  import fs5 from "fs/promises";
5852
2648
  import path9 from "path";
5853
- var import_diff = __toESM(require_create(), 1);
5854
2649
  import * as prettier from "../index.mjs";
5855
2650
 
5856
2651
  // src/cli/expand-patterns.js
@@ -6222,7 +3017,7 @@ var FormatResultsCache = class {
6222
3017
  * @param {string} cacheStrategy
6223
3018
  */
6224
3019
  constructor(cacheFileLocation, cacheStrategy) {
6225
- __privateAdd(this, _fileEntryCache, void 0);
3020
+ __privateAdd(this, _fileEntryCache);
6226
3021
  const useChecksum = cacheStrategy === "content";
6227
3022
  __privateSet(this, _fileEntryCache, import_file_entry_cache.default.create(
6228
3023
  /* cacheId */
@@ -6385,7 +3180,7 @@ var get_options_for_file_default = getOptionsForFile;
6385
3180
  // src/cli/format.js
6386
3181
  var { getStdin, writeFormattedFile } = mockable;
6387
3182
  function diff(a, b) {
6388
- return (0, import_diff.createTwoFilesPatch)("", "", a, b, "", "", { context: 2 });
3183
+ return createTwoFilesPatch("", "", a, b, "", "", { context: 2 });
6389
3184
  }
6390
3185
  var DebugError = class extends Error {
6391
3186
  name = "DebugError";
@@ -6745,7 +3540,7 @@ ${error2.message}`
6745
3540
  } else {
6746
3541
  const files = numberOfUnformattedFilesFound === 1 ? "the above file" : `${numberOfUnformattedFilesFound} files`;
6747
3542
  context.logger.warn(
6748
- context.argv.write ? `Code style issues fixed in ${files}.` : `Code style issues found in ${files}. Run Prettier to fix.`
3543
+ context.argv.write ? `Code style issues fixed in ${files}.` : `Code style issues found in ${files}. Run Prettier with --write to fix.`
6749
3544
  );
6750
3545
  }
6751
3546
  }