@tamagui/cli-color 1.92.1 → 1.93.1
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/cjs/index.js +55 -0
- package/dist/cjs/index.js.map +6 -0
- package/dist/cjs/index.native.js +96 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/esm/index.js +39 -0
- package/dist/esm/index.js.map +6 -0
- package/dist/esm/index.mjs +32 -0
- package/dist/esm/index.native.js +73 -0
- package/dist/esm/index.native.js.map +6 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +6 -0
- package/dist/index.native.js +96 -0
- package/dist/index.native.js.map +6 -0
- package/package.json +21 -4
- package/{index.js → src/index.ts} +6 -10
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var src_exports = {};
|
|
16
|
+
__export(src_exports, {
|
|
17
|
+
Color: () => Color,
|
|
18
|
+
colorLog: () => colorLog,
|
|
19
|
+
colorString: () => colorString
|
|
20
|
+
});
|
|
21
|
+
module.exports = __toCommonJS(src_exports);
|
|
22
|
+
const Color = {
|
|
23
|
+
Reset: "\x1B[0m",
|
|
24
|
+
Bright: "\x1B[1m",
|
|
25
|
+
Dim: "\x1B[2m",
|
|
26
|
+
Underscore: "\x1B[4m",
|
|
27
|
+
Blink: "\x1B[5m",
|
|
28
|
+
Reverse: "\x1B[7m",
|
|
29
|
+
Hidden: "\x1B[8m",
|
|
30
|
+
FgBlack: "\x1B[30m",
|
|
31
|
+
FgRed: "\x1B[31m",
|
|
32
|
+
FgGreen: "\x1B[32m",
|
|
33
|
+
FgYellow: "\x1B[33m",
|
|
34
|
+
FgBlue: "\x1B[34m",
|
|
35
|
+
FgMagenta: "\x1B[35m",
|
|
36
|
+
FgCyan: "\x1B[36m",
|
|
37
|
+
FgWhite: "\x1B[37m",
|
|
38
|
+
BgBlack: "\x1B[40m",
|
|
39
|
+
BgRed: "\x1B[41m",
|
|
40
|
+
BgGreen: "\x1B[42m",
|
|
41
|
+
BgYellow: "\x1B[43m",
|
|
42
|
+
BgBlue: "\x1B[44m",
|
|
43
|
+
BgMagenta: "\x1B[45m",
|
|
44
|
+
BgCyan: "\x1B[46m",
|
|
45
|
+
BgWhite: "\x1B[47m"
|
|
46
|
+
};
|
|
47
|
+
function colorString(color, string) {
|
|
48
|
+
return `${color}${string}${Color.Reset}`;
|
|
49
|
+
}
|
|
50
|
+
function colorLog(color, ...args) {
|
|
51
|
+
console.info(
|
|
52
|
+
...args.map((it) => typeof it == "string" ? colorString(color, it) : it)
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,QAAQ;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EAER,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AAAA,EAET,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AACX;AAEO,SAAS,YAAY,OAAe,QAAgB;AACzD,SAAO,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,KAAK;AACxC;AAEO,SAAS,SAAS,UAAkB,MAAM;AAC/C,UAAQ;AAAA,IACN,GAAG,KAAK,IAAI,CAAC,OAAQ,OAAO,MAAO,WAAW,YAAY,OAAO,EAAE,IAAI,EAAG;AAAA,EAC5E;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
__export(src_exports, {
|
|
18
|
+
Color: () => Color,
|
|
19
|
+
colorLog: () => colorLog,
|
|
20
|
+
colorString: () => colorString
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(src_exports);
|
|
23
|
+
function _array_like_to_array(arr, len) {
|
|
24
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
25
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
26
|
+
arr2[i] = arr[i];
|
|
27
|
+
return arr2;
|
|
28
|
+
}
|
|
29
|
+
function _array_without_holes(arr) {
|
|
30
|
+
if (Array.isArray(arr))
|
|
31
|
+
return _array_like_to_array(arr);
|
|
32
|
+
}
|
|
33
|
+
function _iterable_to_array(iter) {
|
|
34
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
35
|
+
return Array.from(iter);
|
|
36
|
+
}
|
|
37
|
+
function _non_iterable_spread() {
|
|
38
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
39
|
+
}
|
|
40
|
+
function _to_consumable_array(arr) {
|
|
41
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
42
|
+
}
|
|
43
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
44
|
+
if (o) {
|
|
45
|
+
if (typeof o == "string")
|
|
46
|
+
return _array_like_to_array(o, minLen);
|
|
47
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
48
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
49
|
+
return Array.from(n);
|
|
50
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
51
|
+
return _array_like_to_array(o, minLen);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
var Color = {
|
|
55
|
+
Reset: "\x1B[0m",
|
|
56
|
+
Bright: "\x1B[1m",
|
|
57
|
+
Dim: "\x1B[2m",
|
|
58
|
+
Underscore: "\x1B[4m",
|
|
59
|
+
Blink: "\x1B[5m",
|
|
60
|
+
Reverse: "\x1B[7m",
|
|
61
|
+
Hidden: "\x1B[8m",
|
|
62
|
+
FgBlack: "\x1B[30m",
|
|
63
|
+
FgRed: "\x1B[31m",
|
|
64
|
+
FgGreen: "\x1B[32m",
|
|
65
|
+
FgYellow: "\x1B[33m",
|
|
66
|
+
FgBlue: "\x1B[34m",
|
|
67
|
+
FgMagenta: "\x1B[35m",
|
|
68
|
+
FgCyan: "\x1B[36m",
|
|
69
|
+
FgWhite: "\x1B[37m",
|
|
70
|
+
BgBlack: "\x1B[40m",
|
|
71
|
+
BgRed: "\x1B[41m",
|
|
72
|
+
BgGreen: "\x1B[42m",
|
|
73
|
+
BgYellow: "\x1B[43m",
|
|
74
|
+
BgBlue: "\x1B[44m",
|
|
75
|
+
BgMagenta: "\x1B[45m",
|
|
76
|
+
BgCyan: "\x1B[46m",
|
|
77
|
+
BgWhite: "\x1B[47m"
|
|
78
|
+
};
|
|
79
|
+
function colorString(color, string) {
|
|
80
|
+
return "".concat(color).concat(string).concat(Color.Reset);
|
|
81
|
+
}
|
|
82
|
+
function colorLog(color) {
|
|
83
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)
|
|
84
|
+
args[_key - 1] = arguments[_key];
|
|
85
|
+
var _console;
|
|
86
|
+
(_console = console).info.apply(_console, _to_consumable_array(args.map(function(it) {
|
|
87
|
+
return typeof it == "string" ? colorString(color, it) : it;
|
|
88
|
+
})));
|
|
89
|
+
}
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
Color,
|
|
93
|
+
colorLog,
|
|
94
|
+
colorString
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/cli-color/src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,QAAQ;EACnBC,OAAO;EACPC,QAAQ;EACRC,KAAK;EACLC,YAAY;EACZC,OAAO;EACPC,SAAS;EACTC,QAAQ;EAERC,SAAS;EACTC,OAAO;EACPC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,SAAS;EAETC,SAAS;EACTC,OAAO;EACPC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,SAAS;AACX;AAEO,SAASC,YAAYC,OAAeC,QAAc;AACvD,SAAQ,GAAUA,OAARD,KAAAA,EAAiBzB,OAAT0B,MAAAA,EAAqB,OAAZ1B,MAAMC,KAAK;AACxC;AAEO,SAAS0B,SAASF,OAAa;AAAE,WAAA,OAAA,UAAA,QAAGG,OAAH,IAAA,MAAA,OAAA,IAAA,OAAA,IAAA,CAAA,GAAA,OAAA,GAAA,OAAA,MAAA;AAAGA,SAAH,OAAA,CAAA,IAAA,UAAA,IAAA;MACtCC;AAAAA,GAAAA,WAAAA,SAAQC,KAARD,MAAAA,UACE,qBAAGD,KAAKG,IAAI,SAACC,IAAAA;WAAQ,OAAOA,MAAO,WAAWR,YAAYC,OAAOO,EAAAA,IAAMA;;AAE3E;",
|
|
5
|
+
"names": ["Color", "Reset", "Bright", "Dim", "Underscore", "Blink", "Reverse", "Hidden", "FgBlack", "FgRed", "FgGreen", "FgYellow", "FgBlue", "FgMagenta", "FgCyan", "FgWhite", "BgBlack", "BgRed", "BgGreen", "BgYellow", "BgBlue", "BgMagenta", "BgCyan", "BgWhite", "colorString", "color", "string", "colorLog", "args", "console", "info", "map", "it"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const Color = {
|
|
2
|
+
Reset: "\x1B[0m",
|
|
3
|
+
Bright: "\x1B[1m",
|
|
4
|
+
Dim: "\x1B[2m",
|
|
5
|
+
Underscore: "\x1B[4m",
|
|
6
|
+
Blink: "\x1B[5m",
|
|
7
|
+
Reverse: "\x1B[7m",
|
|
8
|
+
Hidden: "\x1B[8m",
|
|
9
|
+
FgBlack: "\x1B[30m",
|
|
10
|
+
FgRed: "\x1B[31m",
|
|
11
|
+
FgGreen: "\x1B[32m",
|
|
12
|
+
FgYellow: "\x1B[33m",
|
|
13
|
+
FgBlue: "\x1B[34m",
|
|
14
|
+
FgMagenta: "\x1B[35m",
|
|
15
|
+
FgCyan: "\x1B[36m",
|
|
16
|
+
FgWhite: "\x1B[37m",
|
|
17
|
+
BgBlack: "\x1B[40m",
|
|
18
|
+
BgRed: "\x1B[41m",
|
|
19
|
+
BgGreen: "\x1B[42m",
|
|
20
|
+
BgYellow: "\x1B[43m",
|
|
21
|
+
BgBlue: "\x1B[44m",
|
|
22
|
+
BgMagenta: "\x1B[45m",
|
|
23
|
+
BgCyan: "\x1B[46m",
|
|
24
|
+
BgWhite: "\x1B[47m"
|
|
25
|
+
};
|
|
26
|
+
function colorString(color, string) {
|
|
27
|
+
return `${color}${string}${Color.Reset}`;
|
|
28
|
+
}
|
|
29
|
+
function colorLog(color, ...args) {
|
|
30
|
+
console.info(
|
|
31
|
+
...args.map((it) => typeof it == "string" ? colorString(color, it) : it)
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
Color,
|
|
36
|
+
colorLog,
|
|
37
|
+
colorString
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"mappings": "AAAO,MAAM,QAAQ;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EAER,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AAAA,EAET,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AACX;AAEO,SAAS,YAAY,OAAe,QAAgB;AACzD,SAAO,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,KAAK;AACxC;AAEO,SAAS,SAAS,UAAkB,MAAM;AAC/C,UAAQ;AAAA,IACN,GAAG,KAAK,IAAI,CAAC,OAAQ,OAAO,MAAO,WAAW,YAAY,OAAO,EAAE,IAAI,EAAG;AAAA,EAC5E;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const Color = {
|
|
2
|
+
Reset: "\x1B[0m",
|
|
3
|
+
Bright: "\x1B[1m",
|
|
4
|
+
Dim: "\x1B[2m",
|
|
5
|
+
Underscore: "\x1B[4m",
|
|
6
|
+
Blink: "\x1B[5m",
|
|
7
|
+
Reverse: "\x1B[7m",
|
|
8
|
+
Hidden: "\x1B[8m",
|
|
9
|
+
FgBlack: "\x1B[30m",
|
|
10
|
+
FgRed: "\x1B[31m",
|
|
11
|
+
FgGreen: "\x1B[32m",
|
|
12
|
+
FgYellow: "\x1B[33m",
|
|
13
|
+
FgBlue: "\x1B[34m",
|
|
14
|
+
FgMagenta: "\x1B[35m",
|
|
15
|
+
FgCyan: "\x1B[36m",
|
|
16
|
+
FgWhite: "\x1B[37m",
|
|
17
|
+
BgBlack: "\x1B[40m",
|
|
18
|
+
BgRed: "\x1B[41m",
|
|
19
|
+
BgGreen: "\x1B[42m",
|
|
20
|
+
BgYellow: "\x1B[43m",
|
|
21
|
+
BgBlue: "\x1B[44m",
|
|
22
|
+
BgMagenta: "\x1B[45m",
|
|
23
|
+
BgCyan: "\x1B[46m",
|
|
24
|
+
BgWhite: "\x1B[47m"
|
|
25
|
+
};
|
|
26
|
+
function colorString(color, string) {
|
|
27
|
+
return `${color}${string}${Color.Reset}`;
|
|
28
|
+
}
|
|
29
|
+
function colorLog(color, ...args) {
|
|
30
|
+
console.info(...args.map(it => typeof it == "string" ? colorString(color, it) : it));
|
|
31
|
+
}
|
|
32
|
+
export { Color, colorLog, colorString };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
3
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
4
|
+
arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_without_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr))
|
|
9
|
+
return _array_like_to_array(arr);
|
|
10
|
+
}
|
|
11
|
+
function _iterable_to_array(iter) {
|
|
12
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
13
|
+
return Array.from(iter);
|
|
14
|
+
}
|
|
15
|
+
function _non_iterable_spread() {
|
|
16
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17
|
+
}
|
|
18
|
+
function _to_consumable_array(arr) {
|
|
19
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
20
|
+
}
|
|
21
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
22
|
+
if (o) {
|
|
23
|
+
if (typeof o == "string")
|
|
24
|
+
return _array_like_to_array(o, minLen);
|
|
25
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
26
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
27
|
+
return Array.from(n);
|
|
28
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
29
|
+
return _array_like_to_array(o, minLen);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
var Color = {
|
|
33
|
+
Reset: "\x1B[0m",
|
|
34
|
+
Bright: "\x1B[1m",
|
|
35
|
+
Dim: "\x1B[2m",
|
|
36
|
+
Underscore: "\x1B[4m",
|
|
37
|
+
Blink: "\x1B[5m",
|
|
38
|
+
Reverse: "\x1B[7m",
|
|
39
|
+
Hidden: "\x1B[8m",
|
|
40
|
+
FgBlack: "\x1B[30m",
|
|
41
|
+
FgRed: "\x1B[31m",
|
|
42
|
+
FgGreen: "\x1B[32m",
|
|
43
|
+
FgYellow: "\x1B[33m",
|
|
44
|
+
FgBlue: "\x1B[34m",
|
|
45
|
+
FgMagenta: "\x1B[35m",
|
|
46
|
+
FgCyan: "\x1B[36m",
|
|
47
|
+
FgWhite: "\x1B[37m",
|
|
48
|
+
BgBlack: "\x1B[40m",
|
|
49
|
+
BgRed: "\x1B[41m",
|
|
50
|
+
BgGreen: "\x1B[42m",
|
|
51
|
+
BgYellow: "\x1B[43m",
|
|
52
|
+
BgBlue: "\x1B[44m",
|
|
53
|
+
BgMagenta: "\x1B[45m",
|
|
54
|
+
BgCyan: "\x1B[46m",
|
|
55
|
+
BgWhite: "\x1B[47m"
|
|
56
|
+
};
|
|
57
|
+
function colorString(color, string) {
|
|
58
|
+
return "".concat(color).concat(string).concat(Color.Reset);
|
|
59
|
+
}
|
|
60
|
+
function colorLog(color) {
|
|
61
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)
|
|
62
|
+
args[_key - 1] = arguments[_key];
|
|
63
|
+
var _console;
|
|
64
|
+
(_console = console).info.apply(_console, _to_consumable_array(args.map(function(it) {
|
|
65
|
+
return typeof it == "string" ? colorString(color, it) : it;
|
|
66
|
+
})));
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
Color,
|
|
70
|
+
colorLog,
|
|
71
|
+
colorString
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/cli-color/src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,QAAQ;EACnBC,OAAO;EACPC,QAAQ;EACRC,KAAK;EACLC,YAAY;EACZC,OAAO;EACPC,SAAS;EACTC,QAAQ;EAERC,SAAS;EACTC,OAAO;EACPC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,SAAS;EAETC,SAAS;EACTC,OAAO;EACPC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,SAAS;AACX;AAEO,SAASC,YAAYC,OAAeC,QAAc;AACvD,SAAQ,GAAUA,OAARD,KAAAA,EAAiBzB,OAAT0B,MAAAA,EAAqB,OAAZ1B,MAAMC,KAAK;AACxC;AAEO,SAAS0B,SAASF,OAAa;AAAE,WAAA,OAAA,UAAA,QAAGG,OAAH,IAAA,MAAA,OAAA,IAAA,OAAA,IAAA,CAAA,GAAA,OAAA,GAAA,OAAA,MAAA;AAAGA,SAAH,OAAA,CAAA,IAAA,UAAA,IAAA;MACtCC;AAAAA,GAAAA,WAAAA,SAAQC,KAARD,MAAAA,UACE,qBAAGD,KAAKG,IAAI,SAACC,IAAAA;WAAQ,OAAOA,MAAO,WAAWR,YAAYC,OAAOO,EAAAA,IAAMA;;AAE3E;",
|
|
5
|
+
"names": ["Color", "Reset", "Bright", "Dim", "Underscore", "Blink", "Reverse", "Hidden", "FgBlack", "FgRed", "FgGreen", "FgYellow", "FgBlue", "FgMagenta", "FgCyan", "FgWhite", "BgBlack", "BgRed", "BgGreen", "BgYellow", "BgBlue", "BgMagenta", "BgCyan", "BgWhite", "colorString", "color", "string", "colorLog", "args", "console", "info", "map", "it"]
|
|
6
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var src_exports = {};
|
|
16
|
+
__export(src_exports, {
|
|
17
|
+
Color: () => Color,
|
|
18
|
+
colorLog: () => colorLog,
|
|
19
|
+
colorString: () => colorString
|
|
20
|
+
});
|
|
21
|
+
module.exports = __toCommonJS(src_exports);
|
|
22
|
+
const Color = {
|
|
23
|
+
Reset: "\x1B[0m",
|
|
24
|
+
Bright: "\x1B[1m",
|
|
25
|
+
Dim: "\x1B[2m",
|
|
26
|
+
Underscore: "\x1B[4m",
|
|
27
|
+
Blink: "\x1B[5m",
|
|
28
|
+
Reverse: "\x1B[7m",
|
|
29
|
+
Hidden: "\x1B[8m",
|
|
30
|
+
FgBlack: "\x1B[30m",
|
|
31
|
+
FgRed: "\x1B[31m",
|
|
32
|
+
FgGreen: "\x1B[32m",
|
|
33
|
+
FgYellow: "\x1B[33m",
|
|
34
|
+
FgBlue: "\x1B[34m",
|
|
35
|
+
FgMagenta: "\x1B[35m",
|
|
36
|
+
FgCyan: "\x1B[36m",
|
|
37
|
+
FgWhite: "\x1B[37m",
|
|
38
|
+
BgBlack: "\x1B[40m",
|
|
39
|
+
BgRed: "\x1B[41m",
|
|
40
|
+
BgGreen: "\x1B[42m",
|
|
41
|
+
BgYellow: "\x1B[43m",
|
|
42
|
+
BgBlue: "\x1B[44m",
|
|
43
|
+
BgMagenta: "\x1B[45m",
|
|
44
|
+
BgCyan: "\x1B[46m",
|
|
45
|
+
BgWhite: "\x1B[47m"
|
|
46
|
+
};
|
|
47
|
+
function colorString(color, string) {
|
|
48
|
+
return `${color}${string}${Color.Reset}`;
|
|
49
|
+
}
|
|
50
|
+
function colorLog(color, ...args) {
|
|
51
|
+
console.info(
|
|
52
|
+
...args.map((it) => typeof it == "string" ? colorString(color, it) : it)
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,QAAQ;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EAER,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AAAA,EAET,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AACX;AAEO,SAAS,YAAY,OAAe,QAAgB;AACzD,SAAO,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,KAAK;AACxC;AAEO,SAAS,SAAS,UAAkB,MAAM;AAC/C,UAAQ;AAAA,IACN,GAAG,KAAK,IAAI,CAAC,OAAQ,OAAO,MAAO,WAAW,YAAY,OAAO,EAAE,IAAI,EAAG;AAAA,EAC5E;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
__export(src_exports, {
|
|
18
|
+
Color: () => Color,
|
|
19
|
+
colorLog: () => colorLog,
|
|
20
|
+
colorString: () => colorString
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(src_exports);
|
|
23
|
+
function _array_like_to_array(arr, len) {
|
|
24
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
25
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
26
|
+
arr2[i] = arr[i];
|
|
27
|
+
return arr2;
|
|
28
|
+
}
|
|
29
|
+
function _array_without_holes(arr) {
|
|
30
|
+
if (Array.isArray(arr))
|
|
31
|
+
return _array_like_to_array(arr);
|
|
32
|
+
}
|
|
33
|
+
function _iterable_to_array(iter) {
|
|
34
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
35
|
+
return Array.from(iter);
|
|
36
|
+
}
|
|
37
|
+
function _non_iterable_spread() {
|
|
38
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
39
|
+
}
|
|
40
|
+
function _to_consumable_array(arr) {
|
|
41
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
42
|
+
}
|
|
43
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
44
|
+
if (o) {
|
|
45
|
+
if (typeof o == "string")
|
|
46
|
+
return _array_like_to_array(o, minLen);
|
|
47
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
48
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
49
|
+
return Array.from(n);
|
|
50
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
51
|
+
return _array_like_to_array(o, minLen);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
var Color = {
|
|
55
|
+
Reset: "\x1B[0m",
|
|
56
|
+
Bright: "\x1B[1m",
|
|
57
|
+
Dim: "\x1B[2m",
|
|
58
|
+
Underscore: "\x1B[4m",
|
|
59
|
+
Blink: "\x1B[5m",
|
|
60
|
+
Reverse: "\x1B[7m",
|
|
61
|
+
Hidden: "\x1B[8m",
|
|
62
|
+
FgBlack: "\x1B[30m",
|
|
63
|
+
FgRed: "\x1B[31m",
|
|
64
|
+
FgGreen: "\x1B[32m",
|
|
65
|
+
FgYellow: "\x1B[33m",
|
|
66
|
+
FgBlue: "\x1B[34m",
|
|
67
|
+
FgMagenta: "\x1B[35m",
|
|
68
|
+
FgCyan: "\x1B[36m",
|
|
69
|
+
FgWhite: "\x1B[37m",
|
|
70
|
+
BgBlack: "\x1B[40m",
|
|
71
|
+
BgRed: "\x1B[41m",
|
|
72
|
+
BgGreen: "\x1B[42m",
|
|
73
|
+
BgYellow: "\x1B[43m",
|
|
74
|
+
BgBlue: "\x1B[44m",
|
|
75
|
+
BgMagenta: "\x1B[45m",
|
|
76
|
+
BgCyan: "\x1B[46m",
|
|
77
|
+
BgWhite: "\x1B[47m"
|
|
78
|
+
};
|
|
79
|
+
function colorString(color, string) {
|
|
80
|
+
return "".concat(color).concat(string).concat(Color.Reset);
|
|
81
|
+
}
|
|
82
|
+
function colorLog(color) {
|
|
83
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)
|
|
84
|
+
args[_key - 1] = arguments[_key];
|
|
85
|
+
var _console;
|
|
86
|
+
(_console = console).info.apply(_console, _to_consumable_array(args.map(function(it) {
|
|
87
|
+
return typeof it == "string" ? colorString(color, it) : it;
|
|
88
|
+
})));
|
|
89
|
+
}
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
Color,
|
|
93
|
+
colorLog,
|
|
94
|
+
colorString
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/Users/n8/tamagui/packages/cli-color/src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,QAAQ;EACnBC,OAAO;EACPC,QAAQ;EACRC,KAAK;EACLC,YAAY;EACZC,OAAO;EACPC,SAAS;EACTC,QAAQ;EAERC,SAAS;EACTC,OAAO;EACPC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,SAAS;EAETC,SAAS;EACTC,OAAO;EACPC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,SAAS;AACX;AAEO,SAASC,YAAYC,OAAeC,QAAc;AACvD,SAAQ,GAAUA,OAARD,KAAAA,EAAiBzB,OAAT0B,MAAAA,EAAqB,OAAZ1B,MAAMC,KAAK;AACxC;AAEO,SAAS0B,SAASF,OAAa;AAAE,WAAA,OAAA,UAAA,QAAGG,OAAH,IAAA,MAAA,OAAA,IAAA,OAAA,IAAA,CAAA,GAAA,OAAA,GAAA,OAAA,MAAA;AAAGA,SAAH,OAAA,CAAA,IAAA,UAAA,IAAA;MACtCC;AAAAA,GAAAA,WAAAA,SAAQC,KAARD,MAAAA,UACE,qBAAGD,KAAKG,IAAI,SAACC,IAAAA;WAAQ,OAAOA,MAAO,WAAWR,YAAYC,OAAOO,EAAAA,IAAMA;;AAE3E;",
|
|
5
|
+
"names": ["Color", "Reset", "Bright", "Dim", "Underscore", "Blink", "Reverse", "Hidden", "FgBlack", "FgRed", "FgGreen", "FgYellow", "FgBlue", "FgMagenta", "FgCyan", "FgWhite", "BgBlack", "BgRed", "BgGreen", "BgYellow", "BgBlue", "BgMagenta", "BgCyan", "BgWhite", "colorString", "color", "string", "colorLog", "args", "console", "info", "map", "it"]
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/cli-color",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"main": "
|
|
3
|
+
"version": "1.93.1",
|
|
4
|
+
"main": "dist/cjs",
|
|
5
|
+
"module": "dist/esm",
|
|
5
6
|
"scripts": {
|
|
6
|
-
"build": "
|
|
7
|
-
"watch": "
|
|
7
|
+
"build": "tamagui-build",
|
|
8
|
+
"watch": "tamagui-build --watch",
|
|
9
|
+
"lint": "../../node_modules/.bin/biome check src",
|
|
10
|
+
"lint:fix": "../../node_modules/.bin/biome check --apply-unsafe src",
|
|
11
|
+
"clean": "tamagui-build clean",
|
|
12
|
+
"clean:build": "tamagui-build clean:build"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": "./package.json",
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./types/index.d.ts",
|
|
18
|
+
"import": "./dist/esm/index.mjs",
|
|
19
|
+
"require": "./dist/cjs/index.js",
|
|
20
|
+
"react-native": "./dist/cjs/index.native.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@tamagui/build": "1.93.1"
|
|
8
25
|
},
|
|
9
26
|
"publishConfig": {
|
|
10
27
|
"access": "public"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const Color = {
|
|
1
|
+
export const Color = {
|
|
2
2
|
Reset: '\x1b[0m',
|
|
3
3
|
Bright: '\x1b[1m',
|
|
4
4
|
Dim: '\x1b[2m',
|
|
@@ -26,16 +26,12 @@ const Color = {
|
|
|
26
26
|
BgWhite: '\x1b[47m',
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function colorString(color, string) {
|
|
29
|
+
export function colorString(color: string, string: string) {
|
|
30
30
|
return `${color}${string}${Color.Reset}`
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function colorLog(color, ...args) {
|
|
34
|
-
console.info(
|
|
33
|
+
export function colorLog(color: string, ...args) {
|
|
34
|
+
console.info(
|
|
35
|
+
...args.map((it) => (typeof it === 'string' ? colorString(color, it) : it))
|
|
36
|
+
)
|
|
35
37
|
}
|
|
36
|
-
|
|
37
|
-
Object.assign(module.exports, {
|
|
38
|
-
Color,
|
|
39
|
-
colorString,
|
|
40
|
-
colorLog,
|
|
41
|
-
})
|