@mojir/lits 2.1.30 → 2.1.31
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/cli/src/colorizer.d.ts +36 -36
- package/dist/cli/cli.js +111 -111
- package/dist/cli/src/colorizer.d.ts +36 -36
- package/package.json +1 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
export type Colorizer = ReturnType<typeof createColorizer>;
|
|
2
|
-
export declare
|
|
3
|
-
Reset
|
|
4
|
-
Bright
|
|
5
|
-
ResetBright
|
|
6
|
-
Dim
|
|
7
|
-
ResetDim
|
|
8
|
-
Italic
|
|
9
|
-
ResetItalic
|
|
10
|
-
Underscore
|
|
11
|
-
ResetUnderscore
|
|
12
|
-
Blink
|
|
13
|
-
ResetBlink
|
|
14
|
-
Reverse
|
|
15
|
-
ResetReverse
|
|
16
|
-
Hidden
|
|
17
|
-
ResetHidden
|
|
18
|
-
FgBlack
|
|
19
|
-
FgRed
|
|
20
|
-
FgGreen
|
|
21
|
-
FgYellow
|
|
22
|
-
FgBlue
|
|
23
|
-
FgMagenta
|
|
24
|
-
FgCyan
|
|
25
|
-
FgWhite
|
|
26
|
-
FgGray
|
|
27
|
-
BgBlack
|
|
28
|
-
BgRed
|
|
29
|
-
BgGreen
|
|
30
|
-
BgYellow
|
|
31
|
-
BgBlue
|
|
32
|
-
BgMagenta
|
|
33
|
-
BgCyan
|
|
34
|
-
BgWhite
|
|
35
|
-
BgGray
|
|
36
|
-
}
|
|
2
|
+
export declare const Colors: {
|
|
3
|
+
readonly Reset: "" | "\u001B[0m";
|
|
4
|
+
readonly Bright: "" | "\u001B[1m";
|
|
5
|
+
readonly ResetBright: "" | "\u001B[21m";
|
|
6
|
+
readonly Dim: "" | "\u001B[2m";
|
|
7
|
+
readonly ResetDim: "" | "\u001B[22m";
|
|
8
|
+
readonly Italic: "" | "\u001B[3m";
|
|
9
|
+
readonly ResetItalic: "" | "\u001B[23m";
|
|
10
|
+
readonly Underscore: "" | "\u001B[4m";
|
|
11
|
+
readonly ResetUnderscore: "" | "\u001B[24m";
|
|
12
|
+
readonly Blink: "" | "\u001B[5m";
|
|
13
|
+
readonly ResetBlink: "" | "\u001B[25m";
|
|
14
|
+
readonly Reverse: "" | "\u001B[7m";
|
|
15
|
+
readonly ResetReverse: "" | "\u001B[27m";
|
|
16
|
+
readonly Hidden: "" | "\u001B[8m";
|
|
17
|
+
readonly ResetHidden: "" | "\u001B[28m";
|
|
18
|
+
readonly FgBlack: "" | "\u001B[30m";
|
|
19
|
+
readonly FgRed: "" | "\u001B[31m";
|
|
20
|
+
readonly FgGreen: "" | "\u001B[32m";
|
|
21
|
+
readonly FgYellow: "" | "\u001B[33m";
|
|
22
|
+
readonly FgBlue: "" | "\u001B[34m";
|
|
23
|
+
readonly FgMagenta: "" | "\u001B[35m";
|
|
24
|
+
readonly FgCyan: "" | "\u001B[36m";
|
|
25
|
+
readonly FgWhite: "" | "\u001B[37m";
|
|
26
|
+
readonly FgGray: "" | "\u001B[90m";
|
|
27
|
+
readonly BgBlack: "" | "\u001B[40m";
|
|
28
|
+
readonly BgRed: "" | "\u001B[41m";
|
|
29
|
+
readonly BgGreen: "" | "\u001B[42m";
|
|
30
|
+
readonly BgYellow: "" | "\u001B[43m";
|
|
31
|
+
readonly BgBlue: "" | "\u001B[44m";
|
|
32
|
+
readonly BgMagenta: "" | "\u001B[45m";
|
|
33
|
+
readonly BgCyan: "" | "\u001B[46m";
|
|
34
|
+
readonly BgWhite: "" | "\u001B[47m";
|
|
35
|
+
readonly BgGray: "" | "\u001B[100m";
|
|
36
|
+
};
|
|
37
37
|
type Formatter = (text: string) => string;
|
|
38
|
-
declare function createFormatter(enableColors: boolean, colors:
|
|
38
|
+
declare function createFormatter(enableColors: boolean, colors: typeof Colors[keyof typeof Colors][], formatters: Formatter[]): {
|
|
39
39
|
(text: string): string;
|
|
40
40
|
black: ReturnType<typeof createFormatter>;
|
|
41
41
|
red: ReturnType<typeof createFormatter>;
|
package/dist/cli/cli.js
CHANGED
|
@@ -92,7 +92,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
92
92
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
var version = "2.1.
|
|
95
|
+
var version = "2.1.31";
|
|
96
96
|
|
|
97
97
|
function getCodeMarker(sourceCodeInfo) {
|
|
98
98
|
if (!sourceCodeInfo.position || !sourceCodeInfo.code)
|
|
@@ -32938,42 +32938,42 @@ function findAllOccurrences(input, pattern) {
|
|
|
32938
32938
|
var polishSymbolCharacterClass = '[\\w@%^?=!$<>+*/:&\|~-]';
|
|
32939
32939
|
var polishSymbolFirstCharacterClass = '[a-zA-Z_@%^?=!$<>+*/&\|~-]';
|
|
32940
32940
|
|
|
32941
|
-
var
|
|
32942
|
-
|
|
32943
|
-
|
|
32944
|
-
|
|
32945
|
-
|
|
32946
|
-
|
|
32947
|
-
|
|
32948
|
-
|
|
32949
|
-
|
|
32950
|
-
|
|
32951
|
-
|
|
32952
|
-
|
|
32953
|
-
|
|
32954
|
-
|
|
32955
|
-
|
|
32956
|
-
|
|
32957
|
-
|
|
32958
|
-
|
|
32959
|
-
|
|
32960
|
-
|
|
32961
|
-
|
|
32962
|
-
|
|
32963
|
-
|
|
32964
|
-
|
|
32965
|
-
|
|
32966
|
-
|
|
32967
|
-
|
|
32968
|
-
|
|
32969
|
-
|
|
32970
|
-
|
|
32971
|
-
|
|
32972
|
-
|
|
32973
|
-
|
|
32974
|
-
|
|
32975
|
-
|
|
32976
|
-
}
|
|
32941
|
+
var useColor$1 = !process.env.NO_COLOR;
|
|
32942
|
+
var Colors = {
|
|
32943
|
+
Reset: useColor$1 ? '\x1B[0m' : '',
|
|
32944
|
+
Bright: useColor$1 ? '\x1B[1m' : '',
|
|
32945
|
+
ResetBright: useColor$1 ? '\x1B[21m' : '',
|
|
32946
|
+
Dim: useColor$1 ? '\x1B[2m' : '',
|
|
32947
|
+
ResetDim: useColor$1 ? '\x1B[22m' : '',
|
|
32948
|
+
Italic: useColor$1 ? '\x1B[3m' : '',
|
|
32949
|
+
ResetItalic: useColor$1 ? '\x1B[23m' : '',
|
|
32950
|
+
Underscore: useColor$1 ? '\x1B[4m' : '',
|
|
32951
|
+
ResetUnderscore: useColor$1 ? '\x1B[24m' : '',
|
|
32952
|
+
Blink: useColor$1 ? '\x1B[5m' : '',
|
|
32953
|
+
ResetBlink: useColor$1 ? '\x1B[25m' : '',
|
|
32954
|
+
Reverse: useColor$1 ? '\x1B[7m' : '',
|
|
32955
|
+
ResetReverse: useColor$1 ? '\x1B[27m' : '',
|
|
32956
|
+
Hidden: useColor$1 ? '\x1B[8m' : '',
|
|
32957
|
+
ResetHidden: useColor$1 ? '\x1B[28m' : '',
|
|
32958
|
+
FgBlack: useColor$1 ? '\x1B[30m' : '',
|
|
32959
|
+
FgRed: useColor$1 ? '\x1B[31m' : '',
|
|
32960
|
+
FgGreen: useColor$1 ? '\x1B[32m' : '',
|
|
32961
|
+
FgYellow: useColor$1 ? '\x1B[33m' : '',
|
|
32962
|
+
FgBlue: useColor$1 ? '\x1B[34m' : '',
|
|
32963
|
+
FgMagenta: useColor$1 ? '\x1B[35m' : '',
|
|
32964
|
+
FgCyan: useColor$1 ? '\x1B[36m' : '',
|
|
32965
|
+
FgWhite: useColor$1 ? '\x1B[37m' : '',
|
|
32966
|
+
FgGray: useColor$1 ? '\x1B[90m' : '',
|
|
32967
|
+
BgBlack: useColor$1 ? '\x1B[40m' : '',
|
|
32968
|
+
BgRed: useColor$1 ? '\x1B[41m' : '',
|
|
32969
|
+
BgGreen: useColor$1 ? '\x1B[42m' : '',
|
|
32970
|
+
BgYellow: useColor$1 ? '\x1B[43m' : '',
|
|
32971
|
+
BgBlue: useColor$1 ? '\x1B[44m' : '',
|
|
32972
|
+
BgMagenta: useColor$1 ? '\x1B[45m' : '',
|
|
32973
|
+
BgCyan: useColor$1 ? '\x1B[46m' : '',
|
|
32974
|
+
BgWhite: useColor$1 ? '\x1B[47m' : '',
|
|
32975
|
+
BgGray: useColor$1 ? '\x1B[100m' : '',
|
|
32976
|
+
};
|
|
32977
32977
|
function createLeftPad(length, char) {
|
|
32978
32978
|
if (char === void 0) { char = ' '; }
|
|
32979
32979
|
return function (text) {
|
|
@@ -33003,86 +33003,86 @@ function createFormatter$1(enableColors, colors, formatters) {
|
|
|
33003
33003
|
finally { if (e_1) throw e_1.error; }
|
|
33004
33004
|
}
|
|
33005
33005
|
return enableColors
|
|
33006
|
-
? colors.join('') + text +
|
|
33006
|
+
? colors.join('') + text + Colors.Reset
|
|
33007
33007
|
: text;
|
|
33008
33008
|
};
|
|
33009
33009
|
Object.defineProperty(fn, 'black', {
|
|
33010
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33010
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgBlack], false), formatters); },
|
|
33011
33011
|
});
|
|
33012
33012
|
Object.defineProperty(fn, 'red', {
|
|
33013
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33013
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgRed], false), formatters); },
|
|
33014
33014
|
});
|
|
33015
33015
|
Object.defineProperty(fn, 'green', {
|
|
33016
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33016
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgGreen], false), formatters); },
|
|
33017
33017
|
});
|
|
33018
33018
|
Object.defineProperty(fn, 'yellow', {
|
|
33019
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33019
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgYellow], false), formatters); },
|
|
33020
33020
|
});
|
|
33021
33021
|
Object.defineProperty(fn, 'blue', {
|
|
33022
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33022
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgBlue], false), formatters); },
|
|
33023
33023
|
});
|
|
33024
33024
|
Object.defineProperty(fn, 'magenta', {
|
|
33025
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33025
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgMagenta], false), formatters); },
|
|
33026
33026
|
});
|
|
33027
33027
|
Object.defineProperty(fn, 'cyan', {
|
|
33028
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33028
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgCyan], false), formatters); },
|
|
33029
33029
|
});
|
|
33030
33030
|
Object.defineProperty(fn, 'white', {
|
|
33031
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33031
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgWhite], false), formatters); },
|
|
33032
33032
|
});
|
|
33033
33033
|
Object.defineProperty(fn, 'gray', {
|
|
33034
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33034
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.FgGray], false), formatters); },
|
|
33035
33035
|
});
|
|
33036
33036
|
Object.defineProperty(fn, 'bgBlack', {
|
|
33037
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33037
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgBlack], false), formatters); },
|
|
33038
33038
|
});
|
|
33039
33039
|
Object.defineProperty(fn, 'bgRed', {
|
|
33040
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33040
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgRed], false), formatters); },
|
|
33041
33041
|
});
|
|
33042
33042
|
Object.defineProperty(fn, 'bgGreen', {
|
|
33043
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33043
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgGreen], false), formatters); },
|
|
33044
33044
|
});
|
|
33045
33045
|
Object.defineProperty(fn, 'bgYellow', {
|
|
33046
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33046
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgYellow], false), formatters); },
|
|
33047
33047
|
});
|
|
33048
33048
|
Object.defineProperty(fn, 'bgBlue', {
|
|
33049
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33049
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgBlue], false), formatters); },
|
|
33050
33050
|
});
|
|
33051
33051
|
Object.defineProperty(fn, 'bgMagenta', {
|
|
33052
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33052
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgMagenta], false), formatters); },
|
|
33053
33053
|
});
|
|
33054
33054
|
Object.defineProperty(fn, 'bgCyan', {
|
|
33055
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33055
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgCyan], false), formatters); },
|
|
33056
33056
|
});
|
|
33057
33057
|
Object.defineProperty(fn, 'bgWhite', {
|
|
33058
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33058
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgWhite], false), formatters); },
|
|
33059
33059
|
});
|
|
33060
33060
|
Object.defineProperty(fn, 'bgGray', {
|
|
33061
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33061
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.BgGray], false), formatters); },
|
|
33062
33062
|
});
|
|
33063
33063
|
Object.defineProperty(fn, 'reset', {
|
|
33064
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33064
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.Reset], false), formatters); },
|
|
33065
33065
|
});
|
|
33066
33066
|
Object.defineProperty(fn, 'bright', {
|
|
33067
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33067
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.Bright], false), formatters); },
|
|
33068
33068
|
});
|
|
33069
33069
|
Object.defineProperty(fn, 'dim', {
|
|
33070
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33070
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.Dim], false), formatters); },
|
|
33071
33071
|
});
|
|
33072
33072
|
Object.defineProperty(fn, 'italic', {
|
|
33073
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33073
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.Dim], false), formatters); },
|
|
33074
33074
|
});
|
|
33075
33075
|
Object.defineProperty(fn, 'underscore', {
|
|
33076
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33076
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.Underscore], false), formatters); },
|
|
33077
33077
|
});
|
|
33078
33078
|
Object.defineProperty(fn, 'blink', {
|
|
33079
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33079
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.Blink], false), formatters); },
|
|
33080
33080
|
});
|
|
33081
33081
|
Object.defineProperty(fn, 'reverse', {
|
|
33082
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33082
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.Reverse], false), formatters); },
|
|
33083
33083
|
});
|
|
33084
33084
|
Object.defineProperty(fn, 'hidden', {
|
|
33085
|
-
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [
|
|
33085
|
+
get: function () { return createFormatter$1(enableColors, __spreadArray(__spreadArray([], __read(colors), false), [Colors.Hidden], false), formatters); },
|
|
33086
33086
|
});
|
|
33087
33087
|
fn.leftPad = function (length, char) { return createFormatter$1(enableColors, colors, [createLeftPad(length, char)]); };
|
|
33088
33088
|
fn.rightPad = function (length, char) { return createFormatter$1(enableColors, colors, [createRightPad(length, char)]); };
|
|
@@ -33091,32 +33091,32 @@ function createFormatter$1(enableColors, colors, formatters) {
|
|
|
33091
33091
|
function createColorizer(enableColors) {
|
|
33092
33092
|
if (enableColors === void 0) { enableColors = true; }
|
|
33093
33093
|
return {
|
|
33094
|
-
black: createFormatter$1(enableColors, [
|
|
33095
|
-
red: createFormatter$1(enableColors, [
|
|
33096
|
-
green: createFormatter$1(enableColors, [
|
|
33097
|
-
yellow: createFormatter$1(enableColors, [
|
|
33098
|
-
blue: createFormatter$1(enableColors, [
|
|
33099
|
-
magenta: createFormatter$1(enableColors, [
|
|
33100
|
-
cyan: createFormatter$1(enableColors, [
|
|
33101
|
-
white: createFormatter$1(enableColors, [
|
|
33102
|
-
gray: createFormatter$1(enableColors, [
|
|
33103
|
-
bgBlack: createFormatter$1(enableColors, [
|
|
33104
|
-
bgRed: createFormatter$1(enableColors, [
|
|
33105
|
-
bgGreen: createFormatter$1(enableColors, [
|
|
33106
|
-
bgYellow: createFormatter$1(enableColors, [
|
|
33107
|
-
bgBlue: createFormatter$1(enableColors, [
|
|
33108
|
-
bgMagenta: createFormatter$1(enableColors, [
|
|
33109
|
-
bgCyan: createFormatter$1(enableColors, [
|
|
33110
|
-
bgWhite: createFormatter$1(enableColors, [
|
|
33111
|
-
bgGray: createFormatter$1(enableColors, [
|
|
33112
|
-
reset: createFormatter$1(enableColors, [
|
|
33113
|
-
bright: createFormatter$1(enableColors, [
|
|
33114
|
-
dim: createFormatter$1(enableColors, [
|
|
33115
|
-
italic: createFormatter$1(enableColors, [
|
|
33116
|
-
underscore: createFormatter$1(enableColors, [
|
|
33117
|
-
blink: createFormatter$1(enableColors, [
|
|
33118
|
-
reverse: createFormatter$1(enableColors, [
|
|
33119
|
-
hidden: createFormatter$1(enableColors, [
|
|
33094
|
+
black: createFormatter$1(enableColors, [Colors.FgBlack], []),
|
|
33095
|
+
red: createFormatter$1(enableColors, [Colors.FgRed], []),
|
|
33096
|
+
green: createFormatter$1(enableColors, [Colors.FgGreen], []),
|
|
33097
|
+
yellow: createFormatter$1(enableColors, [Colors.FgYellow], []),
|
|
33098
|
+
blue: createFormatter$1(enableColors, [Colors.FgBlue], []),
|
|
33099
|
+
magenta: createFormatter$1(enableColors, [Colors.FgMagenta], []),
|
|
33100
|
+
cyan: createFormatter$1(enableColors, [Colors.FgCyan], []),
|
|
33101
|
+
white: createFormatter$1(enableColors, [Colors.FgWhite], []),
|
|
33102
|
+
gray: createFormatter$1(enableColors, [Colors.FgGray], []),
|
|
33103
|
+
bgBlack: createFormatter$1(enableColors, [Colors.BgBlack], []),
|
|
33104
|
+
bgRed: createFormatter$1(enableColors, [Colors.BgRed], []),
|
|
33105
|
+
bgGreen: createFormatter$1(enableColors, [Colors.BgGreen], []),
|
|
33106
|
+
bgYellow: createFormatter$1(enableColors, [Colors.BgYellow], []),
|
|
33107
|
+
bgBlue: createFormatter$1(enableColors, [Colors.BgBlue], []),
|
|
33108
|
+
bgMagenta: createFormatter$1(enableColors, [Colors.BgMagenta], []),
|
|
33109
|
+
bgCyan: createFormatter$1(enableColors, [Colors.BgCyan], []),
|
|
33110
|
+
bgWhite: createFormatter$1(enableColors, [Colors.BgWhite], []),
|
|
33111
|
+
bgGray: createFormatter$1(enableColors, [Colors.BgGray], []),
|
|
33112
|
+
reset: createFormatter$1(enableColors, [Colors.Reset], []),
|
|
33113
|
+
bright: createFormatter$1(enableColors, [Colors.Bright], []),
|
|
33114
|
+
dim: createFormatter$1(enableColors, [Colors.Dim], []),
|
|
33115
|
+
italic: createFormatter$1(enableColors, [Colors.Italic], []),
|
|
33116
|
+
underscore: createFormatter$1(enableColors, [Colors.Underscore], []),
|
|
33117
|
+
blink: createFormatter$1(enableColors, [Colors.Blink], []),
|
|
33118
|
+
reverse: createFormatter$1(enableColors, [Colors.Reverse], []),
|
|
33119
|
+
hidden: createFormatter$1(enableColors, [Colors.Hidden], []),
|
|
33120
33120
|
leftPad: function (length, char) { return createFormatter$1(enableColors, [], [createLeftPad(length, char)]); },
|
|
33121
33121
|
rightPad: function (length, char) { return createFormatter$1(enableColors, [], [createRightPad(length, char)]); },
|
|
33122
33122
|
};
|
|
@@ -33230,8 +33230,8 @@ var getNumberRule = function (fmt) { return function (text, index) {
|
|
|
33230
33230
|
var operatorRule = createRule({
|
|
33231
33231
|
name: 'string',
|
|
33232
33232
|
startPattern: /^[<>\-+/*=?.,():]+/,
|
|
33233
|
-
startTag: "".concat(
|
|
33234
|
-
endTag:
|
|
33233
|
+
startTag: "".concat(Colors.Bright).concat(Colors.FgWhite),
|
|
33234
|
+
endTag: Colors.Reset,
|
|
33235
33235
|
keepPatterns: true,
|
|
33236
33236
|
formatPatterns: true,
|
|
33237
33237
|
stopRecursion: true,
|
|
@@ -33240,8 +33240,8 @@ var stringRule = createRule({
|
|
|
33240
33240
|
name: 'string',
|
|
33241
33241
|
startPattern: /^"/,
|
|
33242
33242
|
endPattern: /^"/,
|
|
33243
|
-
startTag:
|
|
33244
|
-
endTag:
|
|
33243
|
+
startTag: Colors.FgRed,
|
|
33244
|
+
endTag: Colors.Reset,
|
|
33245
33245
|
keepPatterns: true,
|
|
33246
33246
|
formatPatterns: true,
|
|
33247
33247
|
stopRecursion: true,
|
|
@@ -33249,8 +33249,8 @@ var stringRule = createRule({
|
|
|
33249
33249
|
var shortcutStringRule = createRule({
|
|
33250
33250
|
name: 'string',
|
|
33251
33251
|
startPattern: new RegExp("^:".concat(polishSymbolCharacterClass, "+")),
|
|
33252
|
-
startTag:
|
|
33253
|
-
endTag:
|
|
33252
|
+
startTag: Colors.FgRed,
|
|
33253
|
+
endTag: Colors.Reset,
|
|
33254
33254
|
keepPatterns: true,
|
|
33255
33255
|
formatPatterns: true,
|
|
33256
33256
|
stopRecursion: true,
|
|
@@ -33259,8 +33259,8 @@ var functionNameRule = createRule({
|
|
|
33259
33259
|
name: 'functionName',
|
|
33260
33260
|
startPattern: new RegExp("^\\((?=".concat(polishSymbolCharacterClass, "+)")),
|
|
33261
33261
|
endPattern: /^[) \n]/,
|
|
33262
|
-
startTag:
|
|
33263
|
-
endTag:
|
|
33262
|
+
startTag: Colors.FgBlue,
|
|
33263
|
+
endTag: Colors.Reset,
|
|
33264
33264
|
keepPatterns: true,
|
|
33265
33265
|
formatPatterns: false,
|
|
33266
33266
|
stopRecursion: true,
|
|
@@ -33268,8 +33268,8 @@ var functionNameRule = createRule({
|
|
|
33268
33268
|
var nameRule = createRule({
|
|
33269
33269
|
name: 'functionName',
|
|
33270
33270
|
startPattern: new RegExp("^".concat(polishSymbolCharacterClass, "+")),
|
|
33271
|
-
startTag: "".concat(
|
|
33272
|
-
endTag:
|
|
33271
|
+
startTag: "".concat(Colors.Bright).concat(Colors.FgBlue),
|
|
33272
|
+
endTag: Colors.Reset,
|
|
33273
33273
|
keepPatterns: true,
|
|
33274
33274
|
formatPatterns: true,
|
|
33275
33275
|
stopRecursion: true,
|
|
@@ -33277,8 +33277,8 @@ var nameRule = createRule({
|
|
|
33277
33277
|
var commentRule = createRule({
|
|
33278
33278
|
name: 'comment',
|
|
33279
33279
|
startPattern: /^;.*/,
|
|
33280
|
-
startTag: "".concat(
|
|
33281
|
-
endTag:
|
|
33280
|
+
startTag: "".concat(Colors.FgGray).concat(Colors.Italic),
|
|
33281
|
+
endTag: Colors.Reset,
|
|
33282
33282
|
keepPatterns: true,
|
|
33283
33283
|
formatPatterns: true,
|
|
33284
33284
|
stopRecursion: true,
|
|
@@ -33286,8 +33286,8 @@ var commentRule = createRule({
|
|
|
33286
33286
|
var litsKeywordRule = createRule({
|
|
33287
33287
|
name: 'functionName',
|
|
33288
33288
|
startPattern: /^(null|true|false)\b/,
|
|
33289
|
-
startTag: "".concat(
|
|
33290
|
-
endTag:
|
|
33289
|
+
startTag: "".concat(Colors.Bright).concat(Colors.FgGray),
|
|
33290
|
+
endTag: Colors.Reset,
|
|
33291
33291
|
keepPatterns: true,
|
|
33292
33292
|
formatPatterns: true,
|
|
33293
33293
|
stopRecursion: true,
|
|
@@ -33295,8 +33295,8 @@ var litsKeywordRule = createRule({
|
|
|
33295
33295
|
var inlineCodeKeywordRule = createRule({
|
|
33296
33296
|
name: 'inlineCodeKeywordRule',
|
|
33297
33297
|
startPattern: /^(null|true|false|falsy|truthy)\b/,
|
|
33298
|
-
startTag: "".concat(
|
|
33299
|
-
endTag:
|
|
33298
|
+
startTag: "".concat(Colors.Bright).concat(Colors.FgGray),
|
|
33299
|
+
endTag: Colors.Reset,
|
|
33300
33300
|
keepPatterns: true,
|
|
33301
33301
|
formatPatterns: true,
|
|
33302
33302
|
stopRecursion: true,
|
|
@@ -33363,15 +33363,15 @@ var italicRule = createRule({
|
|
|
33363
33363
|
name: 'italic',
|
|
33364
33364
|
startPattern: /^\*\*\*/,
|
|
33365
33365
|
endPattern: /^\*\*\*/,
|
|
33366
|
-
startTag:
|
|
33367
|
-
endTag:
|
|
33366
|
+
startTag: Colors.Italic,
|
|
33367
|
+
endTag: Colors.Reset,
|
|
33368
33368
|
});
|
|
33369
33369
|
var boldRule = createRule({
|
|
33370
33370
|
name: 'bold',
|
|
33371
33371
|
startPattern: /^\*\*/,
|
|
33372
33372
|
endPattern: /^\*\*/,
|
|
33373
|
-
startTag:
|
|
33374
|
-
endTag:
|
|
33373
|
+
startTag: Colors.Bright,
|
|
33374
|
+
endTag: Colors.Reset,
|
|
33375
33375
|
});
|
|
33376
33376
|
function getMdRules(fmt) {
|
|
33377
33377
|
return [
|
|
@@ -33796,7 +33796,7 @@ function runREPL() {
|
|
|
33796
33796
|
rl.close();
|
|
33797
33797
|
break;
|
|
33798
33798
|
default:
|
|
33799
|
-
printErrorMessage("Unrecognized command ".concat(
|
|
33799
|
+
printErrorMessage("Unrecognized command ".concat(Colors.Italic).concat(line).concat(Colors.ResetItalic, ", try ").concat(Colors.Italic, "`help").concat(Colors.ResetItalic));
|
|
33800
33800
|
}
|
|
33801
33801
|
}
|
|
33802
33802
|
else if (line) {
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
export type Colorizer = ReturnType<typeof createColorizer>;
|
|
2
|
-
export declare
|
|
3
|
-
Reset
|
|
4
|
-
Bright
|
|
5
|
-
ResetBright
|
|
6
|
-
Dim
|
|
7
|
-
ResetDim
|
|
8
|
-
Italic
|
|
9
|
-
ResetItalic
|
|
10
|
-
Underscore
|
|
11
|
-
ResetUnderscore
|
|
12
|
-
Blink
|
|
13
|
-
ResetBlink
|
|
14
|
-
Reverse
|
|
15
|
-
ResetReverse
|
|
16
|
-
Hidden
|
|
17
|
-
ResetHidden
|
|
18
|
-
FgBlack
|
|
19
|
-
FgRed
|
|
20
|
-
FgGreen
|
|
21
|
-
FgYellow
|
|
22
|
-
FgBlue
|
|
23
|
-
FgMagenta
|
|
24
|
-
FgCyan
|
|
25
|
-
FgWhite
|
|
26
|
-
FgGray
|
|
27
|
-
BgBlack
|
|
28
|
-
BgRed
|
|
29
|
-
BgGreen
|
|
30
|
-
BgYellow
|
|
31
|
-
BgBlue
|
|
32
|
-
BgMagenta
|
|
33
|
-
BgCyan
|
|
34
|
-
BgWhite
|
|
35
|
-
BgGray
|
|
36
|
-
}
|
|
2
|
+
export declare const Colors: {
|
|
3
|
+
readonly Reset: "" | "\u001B[0m";
|
|
4
|
+
readonly Bright: "" | "\u001B[1m";
|
|
5
|
+
readonly ResetBright: "" | "\u001B[21m";
|
|
6
|
+
readonly Dim: "" | "\u001B[2m";
|
|
7
|
+
readonly ResetDim: "" | "\u001B[22m";
|
|
8
|
+
readonly Italic: "" | "\u001B[3m";
|
|
9
|
+
readonly ResetItalic: "" | "\u001B[23m";
|
|
10
|
+
readonly Underscore: "" | "\u001B[4m";
|
|
11
|
+
readonly ResetUnderscore: "" | "\u001B[24m";
|
|
12
|
+
readonly Blink: "" | "\u001B[5m";
|
|
13
|
+
readonly ResetBlink: "" | "\u001B[25m";
|
|
14
|
+
readonly Reverse: "" | "\u001B[7m";
|
|
15
|
+
readonly ResetReverse: "" | "\u001B[27m";
|
|
16
|
+
readonly Hidden: "" | "\u001B[8m";
|
|
17
|
+
readonly ResetHidden: "" | "\u001B[28m";
|
|
18
|
+
readonly FgBlack: "" | "\u001B[30m";
|
|
19
|
+
readonly FgRed: "" | "\u001B[31m";
|
|
20
|
+
readonly FgGreen: "" | "\u001B[32m";
|
|
21
|
+
readonly FgYellow: "" | "\u001B[33m";
|
|
22
|
+
readonly FgBlue: "" | "\u001B[34m";
|
|
23
|
+
readonly FgMagenta: "" | "\u001B[35m";
|
|
24
|
+
readonly FgCyan: "" | "\u001B[36m";
|
|
25
|
+
readonly FgWhite: "" | "\u001B[37m";
|
|
26
|
+
readonly FgGray: "" | "\u001B[90m";
|
|
27
|
+
readonly BgBlack: "" | "\u001B[40m";
|
|
28
|
+
readonly BgRed: "" | "\u001B[41m";
|
|
29
|
+
readonly BgGreen: "" | "\u001B[42m";
|
|
30
|
+
readonly BgYellow: "" | "\u001B[43m";
|
|
31
|
+
readonly BgBlue: "" | "\u001B[44m";
|
|
32
|
+
readonly BgMagenta: "" | "\u001B[45m";
|
|
33
|
+
readonly BgCyan: "" | "\u001B[46m";
|
|
34
|
+
readonly BgWhite: "" | "\u001B[47m";
|
|
35
|
+
readonly BgGray: "" | "\u001B[100m";
|
|
36
|
+
};
|
|
37
37
|
type Formatter = (text: string) => string;
|
|
38
|
-
declare function createFormatter(enableColors: boolean, colors:
|
|
38
|
+
declare function createFormatter(enableColors: boolean, colors: typeof Colors[keyof typeof Colors][], formatters: Formatter[]): {
|
|
39
39
|
(text: string): string;
|
|
40
40
|
black: ReturnType<typeof createFormatter>;
|
|
41
41
|
red: ReturnType<typeof createFormatter>;
|