vitest 0.0.69 → 0.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,12 +1,11 @@
1
1
  import require$$2, { EventEmitter } from 'events';
2
- import require$$0 from 'tty';
2
+ import { s as stringWidth, a as ansiStyles, b as stripAnsi, c as sliceAnsi, d as c, F as F_POINTER, e as F_DOWN, f as F_DOWN_RIGHT, g as F_DOT, h as F_CHECK, i as F_CROSS, j as cliTruncate, k as F_RIGHT, p as printError } from './error-5a04e54b.js';
3
3
  import { performance } from 'perf_hooks';
4
4
  import path, { isAbsolute, relative, dirname, basename, resolve } from 'path';
5
- import { n as notNullish, g as getNames, s as slash, a as getTests, b as getSuites, t as toArray, h as hasFailed } from './utils-9dcc4050.js';
6
- import { existsSync, promises } from 'fs';
7
- import { SourceMapConsumer } from 'source-map';
5
+ import { g as getNames, s as slash, a as getTests, b as getSuites, t as toArray, h as hasFailed } from './utils-9dcc4050.js';
8
6
  import process$2 from 'process';
9
- import require$$0$1 from 'assert';
7
+ import require$$0 from 'assert';
8
+ import { promises } from 'fs';
10
9
  import { createServer } from 'vite';
11
10
  import { d as defaultIncludes, a as defaultExcludes, b as distDir } from './constants-d4c70610.js';
12
11
  import { MessageChannel } from 'worker_threads';
@@ -15,6 +14,8 @@ import Piscina from 'piscina';
15
14
  import fg from 'fast-glob';
16
15
  import mm from 'micromatch';
17
16
  import readline from 'readline';
17
+ import 'tty';
18
+ import 'source-map';
18
19
 
19
20
  function toArr(any) {
20
21
  return any == null ? [] : Array.isArray(any) ? any : [any];
@@ -631,1416 +632,7 @@ const cac = (name = "") => new CAC(name);
631
632
 
632
633
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
633
634
 
634
- var picocolors = {exports: {}};
635
-
636
- let tty = require$$0;
637
-
638
- let isColorSupported =
639
- !("NO_COLOR" in process.env || process.argv.includes("--no-color")) &&
640
- ("FORCE_COLOR" in process.env ||
641
- process.argv.includes("--color") ||
642
- process.platform === "win32" ||
643
- (tty.isatty(1) && process.env.TERM !== "dumb") ||
644
- "CI" in process.env);
645
-
646
- let formatter =
647
- (open, close, replace = open) =>
648
- input => {
649
- let string = "" + input;
650
- let index = string.indexOf(close, open.length);
651
- return ~index
652
- ? open + replaceClose(string, close, replace, index) + close
653
- : open + string + close
654
- };
655
-
656
- let replaceClose = (string, close, replace, index) => {
657
- let start = string.substring(0, index) + replace;
658
- let end = string.substring(index + close.length);
659
- let nextIndex = end.indexOf(close);
660
- return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end
661
- };
662
-
663
- let createColors = (enabled = isColorSupported) => ({
664
- isColorSupported: enabled,
665
- reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String,
666
- bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
667
- dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
668
- italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
669
- underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
670
- inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
671
- hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
672
- strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
673
- black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
674
- red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
675
- green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
676
- yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
677
- blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
678
- magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
679
- cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
680
- white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
681
- gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
682
- bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
683
- bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
684
- bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
685
- bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
686
- bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
687
- bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
688
- bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
689
- bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String,
690
- });
691
-
692
- picocolors.exports = createColors();
693
- picocolors.exports.createColors = createColors;
694
-
695
- var c = picocolors.exports;
696
-
697
- var version = "0.0.69";
698
-
699
- function Diff() {}
700
- Diff.prototype = {
701
- diff: function diff(oldString, newString) {
702
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
703
- var callback = options.callback;
704
-
705
- if (typeof options === 'function') {
706
- callback = options;
707
- options = {};
708
- }
709
-
710
- this.options = options;
711
- var self = this;
712
-
713
- function done(value) {
714
- if (callback) {
715
- setTimeout(function () {
716
- callback(undefined, value);
717
- }, 0);
718
- return true;
719
- } else {
720
- return value;
721
- }
722
- } // Allow subclasses to massage the input prior to running
723
-
724
-
725
- oldString = this.castInput(oldString);
726
- newString = this.castInput(newString);
727
- oldString = this.removeEmpty(this.tokenize(oldString));
728
- newString = this.removeEmpty(this.tokenize(newString));
729
- var newLen = newString.length,
730
- oldLen = oldString.length;
731
- var editLength = 1;
732
- var maxEditLength = newLen + oldLen;
733
- var bestPath = [{
734
- newPos: -1,
735
- components: []
736
- }]; // Seed editLength = 0, i.e. the content starts with the same values
737
-
738
- var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
739
-
740
- if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
741
- // Identity per the equality and tokenizer
742
- return done([{
743
- value: this.join(newString),
744
- count: newString.length
745
- }]);
746
- } // Main worker method. checks all permutations of a given edit length for acceptance.
747
-
748
-
749
- function execEditLength() {
750
- for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
751
- var basePath = void 0;
752
-
753
- var addPath = bestPath[diagonalPath - 1],
754
- removePath = bestPath[diagonalPath + 1],
755
- _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
756
-
757
- if (addPath) {
758
- // No one else is going to attempt to use this value, clear it
759
- bestPath[diagonalPath - 1] = undefined;
760
- }
761
-
762
- var canAdd = addPath && addPath.newPos + 1 < newLen,
763
- canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
764
-
765
- if (!canAdd && !canRemove) {
766
- // If this path is a terminal then prune
767
- bestPath[diagonalPath] = undefined;
768
- continue;
769
- } // Select the diagonal that we want to branch from. We select the prior
770
- // path whose position in the new string is the farthest from the origin
771
- // and does not pass the bounds of the diff graph
772
-
773
-
774
- if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
775
- basePath = clonePath(removePath);
776
- self.pushComponent(basePath.components, undefined, true);
777
- } else {
778
- basePath = addPath; // No need to clone, we've pulled it from the list
779
-
780
- basePath.newPos++;
781
- self.pushComponent(basePath.components, true, undefined);
782
- }
783
-
784
- _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
785
-
786
- if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
787
- return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
788
- } else {
789
- // Otherwise track this path as a potential candidate and continue.
790
- bestPath[diagonalPath] = basePath;
791
- }
792
- }
793
-
794
- editLength++;
795
- } // Performs the length of edit iteration. Is a bit fugly as this has to support the
796
- // sync and async mode which is never fun. Loops over execEditLength until a value
797
- // is produced.
798
-
799
-
800
- if (callback) {
801
- (function exec() {
802
- setTimeout(function () {
803
- // This should not happen, but we want to be safe.
804
-
805
- /* istanbul ignore next */
806
- if (editLength > maxEditLength) {
807
- return callback();
808
- }
809
-
810
- if (!execEditLength()) {
811
- exec();
812
- }
813
- }, 0);
814
- })();
815
- } else {
816
- while (editLength <= maxEditLength) {
817
- var ret = execEditLength();
818
-
819
- if (ret) {
820
- return ret;
821
- }
822
- }
823
- }
824
- },
825
- pushComponent: function pushComponent(components, added, removed) {
826
- var last = components[components.length - 1];
827
-
828
- if (last && last.added === added && last.removed === removed) {
829
- // We need to clone here as the component clone operation is just
830
- // as shallow array clone
831
- components[components.length - 1] = {
832
- count: last.count + 1,
833
- added: added,
834
- removed: removed
835
- };
836
- } else {
837
- components.push({
838
- count: 1,
839
- added: added,
840
- removed: removed
841
- });
842
- }
843
- },
844
- extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
845
- var newLen = newString.length,
846
- oldLen = oldString.length,
847
- newPos = basePath.newPos,
848
- oldPos = newPos - diagonalPath,
849
- commonCount = 0;
850
-
851
- while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
852
- newPos++;
853
- oldPos++;
854
- commonCount++;
855
- }
856
-
857
- if (commonCount) {
858
- basePath.components.push({
859
- count: commonCount
860
- });
861
- }
862
-
863
- basePath.newPos = newPos;
864
- return oldPos;
865
- },
866
- equals: function equals(left, right) {
867
- if (this.options.comparator) {
868
- return this.options.comparator(left, right);
869
- } else {
870
- return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
871
- }
872
- },
873
- removeEmpty: function removeEmpty(array) {
874
- var ret = [];
875
-
876
- for (var i = 0; i < array.length; i++) {
877
- if (array[i]) {
878
- ret.push(array[i]);
879
- }
880
- }
881
-
882
- return ret;
883
- },
884
- castInput: function castInput(value) {
885
- return value;
886
- },
887
- tokenize: function tokenize(value) {
888
- return value.split('');
889
- },
890
- join: function join(chars) {
891
- return chars.join('');
892
- }
893
- };
894
-
895
- function buildValues(diff, components, newString, oldString, useLongestToken) {
896
- var componentPos = 0,
897
- componentLen = components.length,
898
- newPos = 0,
899
- oldPos = 0;
900
-
901
- for (; componentPos < componentLen; componentPos++) {
902
- var component = components[componentPos];
903
-
904
- if (!component.removed) {
905
- if (!component.added && useLongestToken) {
906
- var value = newString.slice(newPos, newPos + component.count);
907
- value = value.map(function (value, i) {
908
- var oldValue = oldString[oldPos + i];
909
- return oldValue.length > value.length ? oldValue : value;
910
- });
911
- component.value = diff.join(value);
912
- } else {
913
- component.value = diff.join(newString.slice(newPos, newPos + component.count));
914
- }
915
-
916
- newPos += component.count; // Common case
917
-
918
- if (!component.added) {
919
- oldPos += component.count;
920
- }
921
- } else {
922
- component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
923
- oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
924
- // The diffing algorithm is tied to add then remove output and this is the simplest
925
- // route to get the desired output with minimal overhead.
926
-
927
- if (componentPos && components[componentPos - 1].added) {
928
- var tmp = components[componentPos - 1];
929
- components[componentPos - 1] = components[componentPos];
930
- components[componentPos] = tmp;
931
- }
932
- }
933
- } // Special case handle for when one terminal is ignored (i.e. whitespace).
934
- // For this case we merge the terminal into the prior string and drop the change.
935
- // This is only available for string mode.
936
-
937
-
938
- var lastComponent = components[componentLen - 1];
939
-
940
- if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
941
- components[componentLen - 2].value += lastComponent.value;
942
- components.pop();
943
- }
944
-
945
- return components;
946
- }
947
-
948
- function clonePath(path) {
949
- return {
950
- newPos: path.newPos,
951
- components: path.components.slice(0)
952
- };
953
- }
954
-
955
- //
956
- // Ranges and exceptions:
957
- // Latin-1 Supplement, 0080–00FF
958
- // - U+00D7 × Multiplication sign
959
- // - U+00F7 ÷ Division sign
960
- // Latin Extended-A, 0100–017F
961
- // Latin Extended-B, 0180–024F
962
- // IPA Extensions, 0250–02AF
963
- // Spacing Modifier Letters, 02B0–02FF
964
- // - U+02C7 ˇ &#711; Caron
965
- // - U+02D8 ˘ &#728; Breve
966
- // - U+02D9 ˙ &#729; Dot Above
967
- // - U+02DA ˚ &#730; Ring Above
968
- // - U+02DB ˛ &#731; Ogonek
969
- // - U+02DC ˜ &#732; Small Tilde
970
- // - U+02DD ˝ &#733; Double Acute Accent
971
- // Latin Extended Additional, 1E00–1EFF
972
-
973
- var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
974
- var reWhitespace = /\S/;
975
- var wordDiff = new Diff();
976
-
977
- wordDiff.equals = function (left, right) {
978
- if (this.options.ignoreCase) {
979
- left = left.toLowerCase();
980
- right = right.toLowerCase();
981
- }
982
-
983
- return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
984
- };
985
-
986
- wordDiff.tokenize = function (value) {
987
- // All whitespace symbols except newline group into one token, each newline - in separate token
988
- var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
989
-
990
- for (var i = 0; i < tokens.length - 1; i++) {
991
- // If we have an empty string in the next field and we have only word chars before and after, merge
992
- if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
993
- tokens[i] += tokens[i + 2];
994
- tokens.splice(i + 1, 2);
995
- i--;
996
- }
997
- }
998
-
999
- return tokens;
1000
- };
1001
-
1002
- var lineDiff = new Diff();
1003
-
1004
- lineDiff.tokenize = function (value) {
1005
- var retLines = [],
1006
- linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
1007
-
1008
- if (!linesAndNewlines[linesAndNewlines.length - 1]) {
1009
- linesAndNewlines.pop();
1010
- } // Merge the content and line separators into single tokens
1011
-
1012
-
1013
- for (var i = 0; i < linesAndNewlines.length; i++) {
1014
- var line = linesAndNewlines[i];
1015
-
1016
- if (i % 2 && !this.options.newlineIsToken) {
1017
- retLines[retLines.length - 1] += line;
1018
- } else {
1019
- if (this.options.ignoreWhitespace) {
1020
- line = line.trim();
1021
- }
1022
-
1023
- retLines.push(line);
1024
- }
1025
- }
1026
-
1027
- return retLines;
1028
- };
1029
-
1030
- function diffLines(oldStr, newStr, callback) {
1031
- return lineDiff.diff(oldStr, newStr, callback);
1032
- }
1033
-
1034
- var sentenceDiff = new Diff();
1035
-
1036
- sentenceDiff.tokenize = function (value) {
1037
- return value.split(/(\S.+?[.!?])(?=\s+|$)/);
1038
- };
1039
-
1040
- var cssDiff = new Diff();
1041
-
1042
- cssDiff.tokenize = function (value) {
1043
- return value.split(/([{}:;,]|\s+)/);
1044
- };
1045
-
1046
- function _typeof(obj) {
1047
- "@babel/helpers - typeof";
1048
-
1049
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1050
- _typeof = function (obj) {
1051
- return typeof obj;
1052
- };
1053
- } else {
1054
- _typeof = function (obj) {
1055
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1056
- };
1057
- }
1058
-
1059
- return _typeof(obj);
1060
- }
1061
-
1062
- function _toConsumableArray(arr) {
1063
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1064
- }
1065
-
1066
- function _arrayWithoutHoles(arr) {
1067
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1068
- }
1069
-
1070
- function _iterableToArray(iter) {
1071
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
1072
- }
1073
-
1074
- function _unsupportedIterableToArray(o, minLen) {
1075
- if (!o) return;
1076
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1077
- var n = Object.prototype.toString.call(o).slice(8, -1);
1078
- if (n === "Object" && o.constructor) n = o.constructor.name;
1079
- if (n === "Map" || n === "Set") return Array.from(o);
1080
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1081
- }
1082
-
1083
- function _arrayLikeToArray(arr, len) {
1084
- if (len == null || len > arr.length) len = arr.length;
1085
-
1086
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1087
-
1088
- return arr2;
1089
- }
1090
-
1091
- function _nonIterableSpread() {
1092
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1093
- }
1094
-
1095
- var objectPrototypeToString = Object.prototype.toString;
1096
- var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
1097
- // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
1098
-
1099
- jsonDiff.useLongestToken = true;
1100
- jsonDiff.tokenize = lineDiff.tokenize;
1101
-
1102
- jsonDiff.castInput = function (value) {
1103
- var _this$options = this.options,
1104
- undefinedReplacement = _this$options.undefinedReplacement,
1105
- _this$options$stringi = _this$options.stringifyReplacer,
1106
- stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
1107
- return typeof v === 'undefined' ? undefinedReplacement : v;
1108
- } : _this$options$stringi;
1109
- return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
1110
- };
1111
-
1112
- jsonDiff.equals = function (left, right) {
1113
- return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
1114
- };
1115
- // object that is already on the "stack" of items being processed. Accepts an optional replacer
1116
-
1117
- function canonicalize(obj, stack, replacementStack, replacer, key) {
1118
- stack = stack || [];
1119
- replacementStack = replacementStack || [];
1120
-
1121
- if (replacer) {
1122
- obj = replacer(key, obj);
1123
- }
1124
-
1125
- var i;
1126
-
1127
- for (i = 0; i < stack.length; i += 1) {
1128
- if (stack[i] === obj) {
1129
- return replacementStack[i];
1130
- }
1131
- }
1132
-
1133
- var canonicalizedObj;
1134
-
1135
- if ('[object Array]' === objectPrototypeToString.call(obj)) {
1136
- stack.push(obj);
1137
- canonicalizedObj = new Array(obj.length);
1138
- replacementStack.push(canonicalizedObj);
1139
-
1140
- for (i = 0; i < obj.length; i += 1) {
1141
- canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
1142
- }
1143
-
1144
- stack.pop();
1145
- replacementStack.pop();
1146
- return canonicalizedObj;
1147
- }
1148
-
1149
- if (obj && obj.toJSON) {
1150
- obj = obj.toJSON();
1151
- }
1152
-
1153
- if (_typeof(obj) === 'object' && obj !== null) {
1154
- stack.push(obj);
1155
- canonicalizedObj = {};
1156
- replacementStack.push(canonicalizedObj);
1157
-
1158
- var sortedKeys = [],
1159
- _key;
1160
-
1161
- for (_key in obj) {
1162
- /* istanbul ignore else */
1163
- if (obj.hasOwnProperty(_key)) {
1164
- sortedKeys.push(_key);
1165
- }
1166
- }
1167
-
1168
- sortedKeys.sort();
1169
-
1170
- for (i = 0; i < sortedKeys.length; i += 1) {
1171
- _key = sortedKeys[i];
1172
- canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
1173
- }
1174
-
1175
- stack.pop();
1176
- replacementStack.pop();
1177
- } else {
1178
- canonicalizedObj = obj;
1179
- }
1180
-
1181
- return canonicalizedObj;
1182
- }
1183
-
1184
- var arrayDiff = new Diff();
1185
-
1186
- arrayDiff.tokenize = function (value) {
1187
- return value.slice();
1188
- };
1189
-
1190
- arrayDiff.join = arrayDiff.removeEmpty = function (value) {
1191
- return value;
1192
- };
1193
-
1194
- function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
1195
- if (!options) {
1196
- options = {};
1197
- }
1198
-
1199
- if (typeof options.context === 'undefined') {
1200
- options.context = 4;
1201
- }
1202
-
1203
- var diff = diffLines(oldStr, newStr, options);
1204
- diff.push({
1205
- value: '',
1206
- lines: []
1207
- }); // Append an empty value to make cleanup easier
1208
-
1209
- function contextLines(lines) {
1210
- return lines.map(function (entry) {
1211
- return ' ' + entry;
1212
- });
1213
- }
1214
-
1215
- var hunks = [];
1216
- var oldRangeStart = 0,
1217
- newRangeStart = 0,
1218
- curRange = [],
1219
- oldLine = 1,
1220
- newLine = 1;
1221
-
1222
- var _loop = function _loop(i) {
1223
- var current = diff[i],
1224
- lines = current.lines || current.value.replace(/\n$/, '').split('\n');
1225
- current.lines = lines;
1226
-
1227
- if (current.added || current.removed) {
1228
- var _curRange;
1229
-
1230
- // If we have previous context, start with that
1231
- if (!oldRangeStart) {
1232
- var prev = diff[i - 1];
1233
- oldRangeStart = oldLine;
1234
- newRangeStart = newLine;
1235
-
1236
- if (prev) {
1237
- curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
1238
- oldRangeStart -= curRange.length;
1239
- newRangeStart -= curRange.length;
1240
- }
1241
- } // Output our changes
1242
-
1243
-
1244
- (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {
1245
- return (current.added ? '+' : '-') + entry;
1246
- }))); // Track the updated file position
1247
-
1248
-
1249
- if (current.added) {
1250
- newLine += lines.length;
1251
- } else {
1252
- oldLine += lines.length;
1253
- }
1254
- } else {
1255
- // Identical context lines. Track line changes
1256
- if (oldRangeStart) {
1257
- // Close out any changes that have been output (or join overlapping)
1258
- if (lines.length <= options.context * 2 && i < diff.length - 2) {
1259
- var _curRange2;
1260
-
1261
- // Overlapping
1262
- (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
1263
- } else {
1264
- var _curRange3;
1265
-
1266
- // end the range and output
1267
- var contextSize = Math.min(lines.length, options.context);
1268
-
1269
- (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
1270
-
1271
- var hunk = {
1272
- oldStart: oldRangeStart,
1273
- oldLines: oldLine - oldRangeStart + contextSize,
1274
- newStart: newRangeStart,
1275
- newLines: newLine - newRangeStart + contextSize,
1276
- lines: curRange
1277
- };
1278
-
1279
- if (i >= diff.length - 2 && lines.length <= options.context) {
1280
- // EOF is inside this hunk
1281
- var oldEOFNewline = /\n$/.test(oldStr);
1282
- var newEOFNewline = /\n$/.test(newStr);
1283
- var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
1284
-
1285
- if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
1286
- // special case: old has no eol and no trailing context; no-nl can end up before adds
1287
- // however, if the old file is empty, do not output the no-nl line
1288
- curRange.splice(hunk.oldLines, 0, '\');
1289
- }
1290
-
1291
- if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
1292
- curRange.push('\');
1293
- }
1294
- }
1295
-
1296
- hunks.push(hunk);
1297
- oldRangeStart = 0;
1298
- newRangeStart = 0;
1299
- curRange = [];
1300
- }
1301
- }
1302
-
1303
- oldLine += lines.length;
1304
- newLine += lines.length;
1305
- }
1306
- };
1307
-
1308
- for (var i = 0; i < diff.length; i++) {
1309
- _loop(i);
1310
- }
1311
-
1312
- return {
1313
- oldFileName: oldFileName,
1314
- newFileName: newFileName,
1315
- oldHeader: oldHeader,
1316
- newHeader: newHeader,
1317
- hunks: hunks
1318
- };
1319
- }
1320
- function formatPatch(diff) {
1321
- var ret = [];
1322
-
1323
- if (diff.oldFileName == diff.newFileName) {
1324
- ret.push('Index: ' + diff.oldFileName);
1325
- }
1326
-
1327
- ret.push('===================================================================');
1328
- ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
1329
- ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
1330
-
1331
- for (var i = 0; i < diff.hunks.length; i++) {
1332
- var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,
1333
- // the first number is one lower than one would expect.
1334
- // https://www.artima.com/weblogs/viewpost.jsp?thread=164293
1335
-
1336
- if (hunk.oldLines === 0) {
1337
- hunk.oldStart -= 1;
1338
- }
1339
-
1340
- if (hunk.newLines === 0) {
1341
- hunk.newStart -= 1;
1342
- }
1343
-
1344
- ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
1345
- ret.push.apply(ret, hunk.lines);
1346
- }
1347
-
1348
- return ret.join('\n') + '\n';
1349
- }
1350
- function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
1351
- return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
1352
- }
1353
- function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
1354
- return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
1355
- }
1356
-
1357
- /* eslint-disable yoda */
1358
-
1359
- function isFullwidthCodePoint(codePoint) {
1360
- if (!Number.isInteger(codePoint)) {
1361
- return false;
1362
- }
1363
-
1364
- // Code points are derived from:
1365
- // https://unicode.org/Public/UNIDATA/EastAsianWidth.txt
1366
- return codePoint >= 0x1100 && (
1367
- codePoint <= 0x115F || // Hangul Jamo
1368
- codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
1369
- codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
1370
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
1371
- (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
1372
- // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
1373
- (0x3250 <= codePoint && codePoint <= 0x4DBF) ||
1374
- // CJK Unified Ideographs .. Yi Radicals
1375
- (0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
1376
- // Hangul Jamo Extended-A
1377
- (0xA960 <= codePoint && codePoint <= 0xA97C) ||
1378
- // Hangul Syllables
1379
- (0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
1380
- // CJK Compatibility Ideographs
1381
- (0xF900 <= codePoint && codePoint <= 0xFAFF) ||
1382
- // Vertical Forms
1383
- (0xFE10 <= codePoint && codePoint <= 0xFE19) ||
1384
- // CJK Compatibility Forms .. Small Form Variants
1385
- (0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
1386
- // Halfwidth and Fullwidth Forms
1387
- (0xFF01 <= codePoint && codePoint <= 0xFF60) ||
1388
- (0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
1389
- // Kana Supplement
1390
- (0x1B000 <= codePoint && codePoint <= 0x1B001) ||
1391
- // Enclosed Ideographic Supplement
1392
- (0x1F200 <= codePoint && codePoint <= 0x1F251) ||
1393
- // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
1394
- (0x20000 <= codePoint && codePoint <= 0x3FFFD)
1395
- );
1396
- }
1397
-
1398
- const ANSI_BACKGROUND_OFFSET = 10;
1399
-
1400
- const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
1401
-
1402
- const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
1403
-
1404
- const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
1405
-
1406
- function assembleStyles() {
1407
- const codes = new Map();
1408
- const styles = {
1409
- modifier: {
1410
- reset: [0, 0],
1411
- // 21 isn't widely supported and 22 does the same thing
1412
- bold: [1, 22],
1413
- dim: [2, 22],
1414
- italic: [3, 23],
1415
- underline: [4, 24],
1416
- overline: [53, 55],
1417
- inverse: [7, 27],
1418
- hidden: [8, 28],
1419
- strikethrough: [9, 29]
1420
- },
1421
- color: {
1422
- black: [30, 39],
1423
- red: [31, 39],
1424
- green: [32, 39],
1425
- yellow: [33, 39],
1426
- blue: [34, 39],
1427
- magenta: [35, 39],
1428
- cyan: [36, 39],
1429
- white: [37, 39],
1430
-
1431
- // Bright color
1432
- blackBright: [90, 39],
1433
- redBright: [91, 39],
1434
- greenBright: [92, 39],
1435
- yellowBright: [93, 39],
1436
- blueBright: [94, 39],
1437
- magentaBright: [95, 39],
1438
- cyanBright: [96, 39],
1439
- whiteBright: [97, 39]
1440
- },
1441
- bgColor: {
1442
- bgBlack: [40, 49],
1443
- bgRed: [41, 49],
1444
- bgGreen: [42, 49],
1445
- bgYellow: [43, 49],
1446
- bgBlue: [44, 49],
1447
- bgMagenta: [45, 49],
1448
- bgCyan: [46, 49],
1449
- bgWhite: [47, 49],
1450
-
1451
- // Bright color
1452
- bgBlackBright: [100, 49],
1453
- bgRedBright: [101, 49],
1454
- bgGreenBright: [102, 49],
1455
- bgYellowBright: [103, 49],
1456
- bgBlueBright: [104, 49],
1457
- bgMagentaBright: [105, 49],
1458
- bgCyanBright: [106, 49],
1459
- bgWhiteBright: [107, 49]
1460
- }
1461
- };
1462
-
1463
- // Alias bright black as gray (and grey)
1464
- styles.color.gray = styles.color.blackBright;
1465
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1466
- styles.color.grey = styles.color.blackBright;
1467
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1468
-
1469
- for (const [groupName, group] of Object.entries(styles)) {
1470
- for (const [styleName, style] of Object.entries(group)) {
1471
- styles[styleName] = {
1472
- open: `\u001B[${style[0]}m`,
1473
- close: `\u001B[${style[1]}m`
1474
- };
1475
-
1476
- group[styleName] = styles[styleName];
1477
-
1478
- codes.set(style[0], style[1]);
1479
- }
1480
-
1481
- Object.defineProperty(styles, groupName, {
1482
- value: group,
1483
- enumerable: false
1484
- });
1485
- }
1486
-
1487
- Object.defineProperty(styles, 'codes', {
1488
- value: codes,
1489
- enumerable: false
1490
- });
1491
-
1492
- styles.color.close = '\u001B[39m';
1493
- styles.bgColor.close = '\u001B[49m';
1494
-
1495
- styles.color.ansi = wrapAnsi16();
1496
- styles.color.ansi256 = wrapAnsi256();
1497
- styles.color.ansi16m = wrapAnsi16m();
1498
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
1499
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
1500
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
1501
-
1502
- // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
1503
- Object.defineProperties(styles, {
1504
- rgbToAnsi256: {
1505
- value: (red, green, blue) => {
1506
- // We use the extended greyscale palette here, with the exception of
1507
- // black and white. normal palette only has 4 greyscale shades.
1508
- if (red === green && green === blue) {
1509
- if (red < 8) {
1510
- return 16;
1511
- }
1512
-
1513
- if (red > 248) {
1514
- return 231;
1515
- }
1516
-
1517
- return Math.round(((red - 8) / 247) * 24) + 232;
1518
- }
1519
-
1520
- return 16 +
1521
- (36 * Math.round(red / 255 * 5)) +
1522
- (6 * Math.round(green / 255 * 5)) +
1523
- Math.round(blue / 255 * 5);
1524
- },
1525
- enumerable: false
1526
- },
1527
- hexToRgb: {
1528
- value: hex => {
1529
- const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
1530
- if (!matches) {
1531
- return [0, 0, 0];
1532
- }
1533
-
1534
- let {colorString} = matches.groups;
1535
-
1536
- if (colorString.length === 3) {
1537
- colorString = colorString.split('').map(character => character + character).join('');
1538
- }
1539
-
1540
- const integer = Number.parseInt(colorString, 16);
1541
-
1542
- return [
1543
- (integer >> 16) & 0xFF,
1544
- (integer >> 8) & 0xFF,
1545
- integer & 0xFF
1546
- ];
1547
- },
1548
- enumerable: false
1549
- },
1550
- hexToAnsi256: {
1551
- value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
1552
- enumerable: false
1553
- },
1554
- ansi256ToAnsi: {
1555
- value: code => {
1556
- if (code < 8) {
1557
- return 30 + code;
1558
- }
1559
-
1560
- if (code < 16) {
1561
- return 90 + (code - 8);
1562
- }
1563
-
1564
- let red;
1565
- let green;
1566
- let blue;
1567
-
1568
- if (code >= 232) {
1569
- red = (((code - 232) * 10) + 8) / 255;
1570
- green = red;
1571
- blue = red;
1572
- } else {
1573
- code -= 16;
1574
-
1575
- const remainder = code % 36;
1576
-
1577
- red = Math.floor(code / 36) / 5;
1578
- green = Math.floor(remainder / 6) / 5;
1579
- blue = (remainder % 6) / 5;
1580
- }
1581
-
1582
- const value = Math.max(red, green, blue) * 2;
1583
-
1584
- if (value === 0) {
1585
- return 30;
1586
- }
1587
-
1588
- let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
1589
-
1590
- if (value === 2) {
1591
- result += 60;
1592
- }
1593
-
1594
- return result;
1595
- },
1596
- enumerable: false
1597
- },
1598
- rgbToAnsi: {
1599
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
1600
- enumerable: false
1601
- },
1602
- hexToAnsi: {
1603
- value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
1604
- enumerable: false
1605
- }
1606
- });
1607
-
1608
- return styles;
1609
- }
1610
-
1611
- const ansiStyles = assembleStyles();
1612
-
1613
- const astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/;
1614
-
1615
- const ESCAPES$1 = [
1616
- '\u001B',
1617
- '\u009B'
1618
- ];
1619
-
1620
- const wrapAnsi$1 = code => `${ESCAPES$1[0]}[${code}m`;
1621
-
1622
- const checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
1623
- let output = [];
1624
- ansiCodes = [...ansiCodes];
1625
-
1626
- for (let ansiCode of ansiCodes) {
1627
- const ansiCodeOrigin = ansiCode;
1628
- if (ansiCode.includes(';')) {
1629
- ansiCode = ansiCode.split(';')[0][0] + '0';
1630
- }
1631
-
1632
- const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10));
1633
- if (item) {
1634
- const indexEscape = ansiCodes.indexOf(item.toString());
1635
- if (indexEscape === -1) {
1636
- output.push(wrapAnsi$1(isEscapes ? item : ansiCodeOrigin));
1637
- } else {
1638
- ansiCodes.splice(indexEscape, 1);
1639
- }
1640
- } else if (isEscapes) {
1641
- output.push(wrapAnsi$1(0));
1642
- break;
1643
- } else {
1644
- output.push(wrapAnsi$1(ansiCodeOrigin));
1645
- }
1646
- }
1647
-
1648
- if (isEscapes) {
1649
- output = output.filter((element, index) => output.indexOf(element) === index);
1650
-
1651
- if (endAnsiCode !== undefined) {
1652
- const fistEscapeCode = wrapAnsi$1(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10)));
1653
- // TODO: Remove the use of `.reduce` here.
1654
- // eslint-disable-next-line unicorn/no-array-reduce
1655
- output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
1656
- }
1657
- }
1658
-
1659
- return output.join('');
1660
- };
1661
-
1662
- function sliceAnsi(string, begin, end) {
1663
- const characters = [...string];
1664
- const ansiCodes = [];
1665
-
1666
- let stringEnd = typeof end === 'number' ? end : characters.length;
1667
- let isInsideEscape = false;
1668
- let ansiCode;
1669
- let visible = 0;
1670
- let output = '';
1671
-
1672
- for (const [index, character] of characters.entries()) {
1673
- let leftEscape = false;
1674
-
1675
- if (ESCAPES$1.includes(character)) {
1676
- const code = /\d[^m]*/.exec(string.slice(index, index + 18));
1677
- ansiCode = code && code.length > 0 ? code[0] : undefined;
1678
-
1679
- if (visible < stringEnd) {
1680
- isInsideEscape = true;
1681
-
1682
- if (ansiCode !== undefined) {
1683
- ansiCodes.push(ansiCode);
1684
- }
1685
- }
1686
- } else if (isInsideEscape && character === 'm') {
1687
- isInsideEscape = false;
1688
- leftEscape = true;
1689
- }
1690
-
1691
- if (!isInsideEscape && !leftEscape) {
1692
- visible++;
1693
- }
1694
-
1695
- if (!astralRegex.test(character) && isFullwidthCodePoint(character.codePointAt())) {
1696
- visible++;
1697
-
1698
- if (typeof end !== 'number') {
1699
- stringEnd++;
1700
- }
1701
- }
1702
-
1703
- if (visible > begin && visible <= stringEnd) {
1704
- output += character;
1705
- } else if (visible === begin && !isInsideEscape && ansiCode !== undefined) {
1706
- output = checkAnsi(ansiCodes);
1707
- } else if (visible >= stringEnd) {
1708
- output += checkAnsi(ansiCodes, true, ansiCode);
1709
- break;
1710
- }
1711
- }
1712
-
1713
- return output;
1714
- }
1715
-
1716
- function ansiRegex({onlyFirst = false} = {}) {
1717
- const pattern = [
1718
- '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
1719
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
1720
- ].join('|');
1721
-
1722
- return new RegExp(pattern, onlyFirst ? undefined : 'g');
1723
- }
1724
-
1725
- function stripAnsi(string) {
1726
- if (typeof string !== 'string') {
1727
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
1728
- }
1729
-
1730
- return string.replace(ansiRegex(), '');
1731
- }
1732
-
1733
- var emojiRegex = function () {
1734
- // https://mths.be/emoji
1735
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDC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F84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\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\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
1736
- };
1737
-
1738
- function stringWidth(string) {
1739
- if (typeof string !== 'string' || string.length === 0) {
1740
- return 0;
1741
- }
1742
-
1743
- string = stripAnsi(string);
1744
-
1745
- if (string.length === 0) {
1746
- return 0;
1747
- }
1748
-
1749
- string = string.replace(emojiRegex(), ' ');
1750
-
1751
- let width = 0;
1752
-
1753
- for (let index = 0; index < string.length; index++) {
1754
- const codePoint = string.codePointAt(index);
1755
-
1756
- // Ignore control characters
1757
- if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {
1758
- continue;
1759
- }
1760
-
1761
- // Ignore combining characters
1762
- if (codePoint >= 0x300 && codePoint <= 0x36F) {
1763
- continue;
1764
- }
1765
-
1766
- // Surrogates
1767
- if (codePoint > 0xFFFF) {
1768
- index++;
1769
- }
1770
-
1771
- width += isFullwidthCodePoint(codePoint) ? 2 : 1;
1772
- }
1773
-
1774
- return width;
1775
- }
1776
-
1777
- function getIndexOfNearestSpace(string, wantedIndex, shouldSearchRight) {
1778
- if (string.charAt(wantedIndex) === ' ') {
1779
- return wantedIndex;
1780
- }
1781
-
1782
- for (let index = 1; index <= 3; index++) {
1783
- if (shouldSearchRight) {
1784
- if (string.charAt(wantedIndex + index) === ' ') {
1785
- return wantedIndex + index;
1786
- }
1787
- } else if (string.charAt(wantedIndex - index) === ' ') {
1788
- return wantedIndex - index;
1789
- }
1790
- }
1791
-
1792
- return wantedIndex;
1793
- }
1794
-
1795
- function cliTruncate(text, columns, options) {
1796
- options = {
1797
- position: 'end',
1798
- preferTruncationOnSpace: false,
1799
- truncationCharacter: '…',
1800
- ...options,
1801
- };
1802
-
1803
- const {position, space, preferTruncationOnSpace} = options;
1804
- let {truncationCharacter} = options;
1805
-
1806
- if (typeof text !== 'string') {
1807
- throw new TypeError(`Expected \`input\` to be a string, got ${typeof text}`);
1808
- }
1809
-
1810
- if (typeof columns !== 'number') {
1811
- throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`);
1812
- }
1813
-
1814
- if (columns < 1) {
1815
- return '';
1816
- }
1817
-
1818
- if (columns === 1) {
1819
- return truncationCharacter;
1820
- }
1821
-
1822
- const length = stringWidth(text);
1823
-
1824
- if (length <= columns) {
1825
- return text;
1826
- }
1827
-
1828
- if (position === 'start') {
1829
- if (preferTruncationOnSpace) {
1830
- const nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, true);
1831
- return truncationCharacter + sliceAnsi(text, nearestSpace, length).trim();
1832
- }
1833
-
1834
- if (space === true) {
1835
- truncationCharacter += ' ';
1836
- }
1837
-
1838
- return truncationCharacter + sliceAnsi(text, length - columns + stringWidth(truncationCharacter), length);
1839
- }
1840
-
1841
- if (position === 'middle') {
1842
- if (space === true) {
1843
- truncationCharacter = ` ${truncationCharacter} `;
1844
- }
1845
-
1846
- const half = Math.floor(columns / 2);
1847
-
1848
- if (preferTruncationOnSpace) {
1849
- const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half);
1850
- const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
1851
- return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();
1852
- }
1853
-
1854
- return (
1855
- sliceAnsi(text, 0, half)
1856
- + truncationCharacter
1857
- + sliceAnsi(text, length - (columns - half) + stringWidth(truncationCharacter), length)
1858
- );
1859
- }
1860
-
1861
- if (position === 'end') {
1862
- if (preferTruncationOnSpace) {
1863
- const nearestSpace = getIndexOfNearestSpace(text, columns - 1);
1864
- return sliceAnsi(text, 0, nearestSpace) + truncationCharacter;
1865
- }
1866
-
1867
- if (space === true) {
1868
- truncationCharacter = ` ${truncationCharacter}`;
1869
- }
1870
-
1871
- return sliceAnsi(text, 0, columns - stringWidth(truncationCharacter)) + truncationCharacter;
1872
- }
1873
-
1874
- throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
1875
- }
1876
-
1877
- const F_RIGHT = "\u2192";
1878
- const F_DOWN = "\u2193";
1879
- const F_UP = "\u2191";
1880
- const F_DOWN_RIGHT = "\u21B3";
1881
- const F_POINTER = "\u276F";
1882
- const F_DOT = "\xB7";
1883
- const F_CHECK = "\u221A";
1884
- const F_CROSS = "\xD7";
1885
-
1886
- async function printError(error) {
1887
- const { server } = process.__vitest__;
1888
- let e = error;
1889
- if (typeof error === "string") {
1890
- e = {
1891
- message: error.split(/\n/g)[0],
1892
- stack: error
1893
- };
1894
- }
1895
- let codeFramePrinted = false;
1896
- const stacks = parseStack(e.stack || e.stackStr || "");
1897
- const nearest = stacks.find((stack) => server.moduleGraph.getModuleById(stack.file));
1898
- if (nearest) {
1899
- const mod = server.moduleGraph.getModuleById(nearest.file);
1900
- const transformResult = mod == null ? void 0 : mod.ssrTransformResult;
1901
- const pos = await getOriginalPos(transformResult == null ? void 0 : transformResult.map, nearest);
1902
- if (pos && existsSync(nearest.file)) {
1903
- const sourceCode = await promises.readFile(nearest.file, "utf-8");
1904
- displayErrorMessage(e);
1905
- displayFilePath(nearest.file, pos);
1906
- displayCodeFrame(sourceCode, pos);
1907
- codeFramePrinted = true;
1908
- }
1909
- }
1910
- if (!codeFramePrinted)
1911
- console.error(e);
1912
- if (e.showDiff)
1913
- displayDiff(e.actual, e.expected);
1914
- }
1915
- function displayDiff(actual, expected) {
1916
- console.error(c.gray(generateDiff(stringify(actual), stringify(expected))));
1917
- }
1918
- function displayErrorMessage(error) {
1919
- const errorName = error.name || error.nameStr || "Unknown Error";
1920
- console.error(c.red(`${c.bold(errorName)}: ${error.message}`));
1921
- }
1922
- function displayFilePath(filePath, pos) {
1923
- console.log(c.gray(`${filePath}:${pos.line}:${pos.column}`));
1924
- }
1925
- function displayCodeFrame(sourceCode, pos) {
1926
- console.log(c.yellow(generateCodeFrame(sourceCode, pos)));
1927
- }
1928
- function getOriginalPos(map, { line, column }) {
1929
- return new Promise((resolve) => {
1930
- if (!map)
1931
- return resolve(null);
1932
- SourceMapConsumer.with(map, null, (consumer) => {
1933
- const pos = consumer.originalPositionFor({ line, column });
1934
- if (pos.line != null && pos.column != null)
1935
- resolve(pos);
1936
- else
1937
- resolve(null);
1938
- });
1939
- });
1940
- }
1941
- const splitRE = /\r?\n/;
1942
- function posToNumber(source, pos) {
1943
- if (typeof pos === "number")
1944
- return pos;
1945
- const lines = source.split(splitRE);
1946
- const { line, column } = pos;
1947
- let start = 0;
1948
- for (let i = 0; i < line - 1; i++)
1949
- start += lines[i].length + 1;
1950
- return start + column;
1951
- }
1952
- function generateCodeFrame(source, start = 0, end, range = 2) {
1953
- start = posToNumber(source, start);
1954
- end = end || start;
1955
- const lines = source.split(splitRE);
1956
- let count = 0;
1957
- const res = [];
1958
- function lineNo(no = "") {
1959
- return c.gray(`${String(no).padStart(3, " ")}| `);
1960
- }
1961
- for (let i = 0; i < lines.length; i++) {
1962
- count += lines[i].length + 1;
1963
- if (count >= start) {
1964
- for (let j = i - range; j <= i + range || end > count; j++) {
1965
- if (j < 0 || j >= lines.length)
1966
- continue;
1967
- const lineLength = lines[j].length;
1968
- if (lineLength > 200)
1969
- return "";
1970
- res.push(lineNo(j + 1) + cliTruncate(lines[j], process.stdout.columns - 5));
1971
- if (j === i) {
1972
- const pad = start - (count - lineLength);
1973
- const length = Math.max(1, end > count ? lineLength - pad : end - start);
1974
- res.push(lineNo() + " ".repeat(pad) + F_UP.repeat(length));
1975
- } else if (j > i) {
1976
- if (end > count) {
1977
- const length = Math.max(1, Math.min(end - count, lineLength));
1978
- res.push(lineNo() + F_UP.repeat(length));
1979
- }
1980
- count += lineLength + 1;
1981
- }
1982
- }
1983
- break;
1984
- }
1985
- }
1986
- return res.join("\n");
1987
- }
1988
- function stringify(obj) {
1989
- return String(obj);
1990
- }
1991
- const stackFnCallRE = /at (.*) \((.+):(\d+):(\d+)\)$/;
1992
- const stackBarePathRE = /at ()(.+):(\d+):(\d+)$/;
1993
- function parseStack(stack) {
1994
- const lines = stack.split("\n");
1995
- const stackFrames = lines.map((raw) => {
1996
- const line = raw.trim();
1997
- const match = line.match(stackFnCallRE) || line.match(stackBarePathRE);
1998
- if (!match)
1999
- return null;
2000
- let file = match[2];
2001
- if (file.startsWith("file://"))
2002
- file = file.slice(7);
2003
- return {
2004
- method: match[1],
2005
- file: match[2],
2006
- line: parseInt(match[3]),
2007
- column: parseInt(match[4])
2008
- };
2009
- });
2010
- return stackFrames.filter(notNullish);
2011
- }
2012
- function generateDiff(actual, expected) {
2013
- const diffSize = 2048;
2014
- if (actual.length > diffSize)
2015
- actual = `${actual.substring(0, diffSize)} ... Lines skipped`;
2016
- if (expected.length > diffSize)
2017
- expected = `${expected.substring(0, diffSize)} ... Lines skipped`;
2018
- return unifiedDiff(actual, expected);
2019
- }
2020
- function unifiedDiff(actual, expected) {
2021
- const indent = " ";
2022
- function cleanUp(line) {
2023
- if (line[0] === "+")
2024
- return indent + c.green(`${line[0]}${line.slice(1)}`);
2025
- if (line[0] === "-")
2026
- return indent + c.red(`${line[0]}${line.slice(1)}`);
2027
- if (line.match(/@@/))
2028
- return "--";
2029
- if (line.match(/\\ No newline/))
2030
- return null;
2031
- return indent + line;
2032
- }
2033
- const msg = createPatch("string", actual, expected);
2034
- const lines = msg.split("\n").splice(5);
2035
- return `
2036
- ${indent}${c.red("- actual")}
2037
- ${indent}${c.green("+ expected")}
2038
-
2039
- ${lines.map(cleanUp).filter(notBlank).join("\n")}`;
2040
- }
2041
- function notBlank(line) {
2042
- return typeof line !== "undefined" && line !== null;
2043
- }
635
+ var version = "0.0.73";
2044
636
 
2045
637
  const ESC = '\u001B[';
2046
638
  const OSC = '\u001B]';
@@ -2342,7 +934,7 @@ const processOk = function (process) {
2342
934
  if (!processOk(process$1)) {
2343
935
  signalExit$1.exports = function () {};
2344
936
  } else {
2345
- var assert = require$$0$1;
937
+ var assert = require$$0;
2346
938
  var signals = signals$1.exports;
2347
939
  var isWin = /^win/i.test(process$1.platform);
2348
940
 
@@ -2849,7 +1441,7 @@ function createLogUpdate(stream, {showCursor = false} = {}) {
2849
1441
  return render;
2850
1442
  }
2851
1443
 
2852
- createLogUpdate(process$2.stdout);
1444
+ const logUpdate = createLogUpdate(process$2.stdout);
2853
1445
 
2854
1446
  createLogUpdate(process$2.stderr);
2855
1447
 
@@ -2981,9 +1573,8 @@ function renderTree(tasks, level = 0) {
2981
1573
  const createRenderer = (_tasks) => {
2982
1574
  let tasks = _tasks;
2983
1575
  let timer;
2984
- const log = createLogUpdate(process.stdout);
2985
1576
  function update() {
2986
- log(renderTree(tasks));
1577
+ logUpdate(renderTree(tasks));
2987
1578
  }
2988
1579
  return {
2989
1580
  start() {
@@ -3002,9 +1593,12 @@ const createRenderer = (_tasks) => {
3002
1593
  clearInterval(timer);
3003
1594
  timer = void 0;
3004
1595
  }
3005
- log.clear();
1596
+ logUpdate.clear();
3006
1597
  console.log(renderTree(tasks));
3007
1598
  return this;
1599
+ },
1600
+ clear() {
1601
+ logUpdate.clear();
3008
1602
  }
3009
1603
  };
3010
1604
  };
@@ -3140,6 +1734,14 @@ ${c.bold(c.inverse(c.green(" PASS ")))}${c.green(" Waiting for file changes...")
3140
1734
  this.renderer = void 0;
3141
1735
  await new Promise((resolve) => setTimeout(resolve, 100));
3142
1736
  }
1737
+ onUserConsoleLog(log) {
1738
+ var _a;
1739
+ (_a = this.renderer) == null ? void 0 : _a.clear();
1740
+ const task = log.taskId ? this.ctx.state.idMap[log.taskId] : void 0;
1741
+ console.log(c.gray(`${log.type} | ${task ? c.dim(getFullName(task)) : "unknown test"}`));
1742
+ process[log.type].write(`${log.content}
1743
+ `);
1744
+ }
3143
1745
  }
3144
1746
 
3145
1747
  class SnapshotManager {
@@ -3580,7 +2182,8 @@ function createFakePool(ctx) {
3580
2182
  }
3581
2183
  function createWorkerPool(ctx) {
3582
2184
  const options = {
3583
- filename: workerPath
2185
+ filename: workerPath,
2186
+ useAtomics: false
3584
2187
  };
3585
2188
  if (ctx.config.maxThreads != null)
3586
2189
  options.maxThreads = ctx.config.maxThreads;
@@ -3611,7 +2214,7 @@ function createChannel(ctx) {
3611
2214
  const port = channel.port2;
3612
2215
  const workerPort = channel.port1;
3613
2216
  port.on("message", async ({ id, method, args = [] }) => {
3614
- var _a, _b, _c, _d;
2217
+ var _a, _b, _c, _d, _e, _f;
3615
2218
  async function send(fn) {
3616
2219
  try {
3617
2220
  port.postMessage({ id, result: await fn() });
@@ -3632,6 +2235,9 @@ function createChannel(ctx) {
3632
2235
  ctx.state.updateTasks([args[0]]);
3633
2236
  (_d = (_c = ctx.reporter).onTaskUpdate) == null ? void 0 : _d.call(_c, args[0]);
3634
2237
  return;
2238
+ case "log":
2239
+ (_f = (_e = ctx.reporter).onUserConsoleLog) == null ? void 0 : _f.call(_e, args[0]);
2240
+ return;
3635
2241
  }
3636
2242
  console.error("Unhandled message", method, args);
3637
2243
  });
@@ -3831,7 +2437,7 @@ cli.command("dev [...filters]").action(dev);
3831
2437
  cli.command("[...filters]").action(dev);
3832
2438
  cli.parse();
3833
2439
  async function dev(cliFilters, argv) {
3834
- argv.watch = !process.env.CI;
2440
+ argv.watch = !process.env.CI && !process.env.NODE_V8_COVERAGE;
3835
2441
  await run(cliFilters, argv);
3836
2442
  }
3837
2443
  async function run(cliFilters, argv) {