earthling-ui 1.0.0-alpha.0
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/README.md +1 -0
- package/dist/index.cjs +803 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# cli
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,803 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// node_modules/colors/lib/styles.js
|
|
28
|
+
var require_styles = __commonJS({
|
|
29
|
+
"node_modules/colors/lib/styles.js"(exports, module2) {
|
|
30
|
+
var styles = {};
|
|
31
|
+
module2["exports"] = styles;
|
|
32
|
+
var codes = {
|
|
33
|
+
reset: [0, 0],
|
|
34
|
+
bold: [1, 22],
|
|
35
|
+
dim: [2, 22],
|
|
36
|
+
italic: [3, 23],
|
|
37
|
+
underline: [4, 24],
|
|
38
|
+
inverse: [7, 27],
|
|
39
|
+
hidden: [8, 28],
|
|
40
|
+
strikethrough: [9, 29],
|
|
41
|
+
black: [30, 39],
|
|
42
|
+
red: [31, 39],
|
|
43
|
+
green: [32, 39],
|
|
44
|
+
yellow: [33, 39],
|
|
45
|
+
blue: [34, 39],
|
|
46
|
+
magenta: [35, 39],
|
|
47
|
+
cyan: [36, 39],
|
|
48
|
+
white: [37, 39],
|
|
49
|
+
gray: [90, 39],
|
|
50
|
+
grey: [90, 39],
|
|
51
|
+
brightRed: [91, 39],
|
|
52
|
+
brightGreen: [92, 39],
|
|
53
|
+
brightYellow: [93, 39],
|
|
54
|
+
brightBlue: [94, 39],
|
|
55
|
+
brightMagenta: [95, 39],
|
|
56
|
+
brightCyan: [96, 39],
|
|
57
|
+
brightWhite: [97, 39],
|
|
58
|
+
bgBlack: [40, 49],
|
|
59
|
+
bgRed: [41, 49],
|
|
60
|
+
bgGreen: [42, 49],
|
|
61
|
+
bgYellow: [43, 49],
|
|
62
|
+
bgBlue: [44, 49],
|
|
63
|
+
bgMagenta: [45, 49],
|
|
64
|
+
bgCyan: [46, 49],
|
|
65
|
+
bgWhite: [47, 49],
|
|
66
|
+
bgGray: [100, 49],
|
|
67
|
+
bgGrey: [100, 49],
|
|
68
|
+
bgBrightRed: [101, 49],
|
|
69
|
+
bgBrightGreen: [102, 49],
|
|
70
|
+
bgBrightYellow: [103, 49],
|
|
71
|
+
bgBrightBlue: [104, 49],
|
|
72
|
+
bgBrightMagenta: [105, 49],
|
|
73
|
+
bgBrightCyan: [106, 49],
|
|
74
|
+
bgBrightWhite: [107, 49],
|
|
75
|
+
// legacy styles for colors pre v1.0.0
|
|
76
|
+
blackBG: [40, 49],
|
|
77
|
+
redBG: [41, 49],
|
|
78
|
+
greenBG: [42, 49],
|
|
79
|
+
yellowBG: [43, 49],
|
|
80
|
+
blueBG: [44, 49],
|
|
81
|
+
magentaBG: [45, 49],
|
|
82
|
+
cyanBG: [46, 49],
|
|
83
|
+
whiteBG: [47, 49]
|
|
84
|
+
};
|
|
85
|
+
Object.keys(codes).forEach(function(key) {
|
|
86
|
+
var val = codes[key];
|
|
87
|
+
var style = styles[key] = [];
|
|
88
|
+
style.open = "\x1B[" + val[0] + "m";
|
|
89
|
+
style.close = "\x1B[" + val[1] + "m";
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// node_modules/colors/lib/system/has-flag.js
|
|
95
|
+
var require_has_flag = __commonJS({
|
|
96
|
+
"node_modules/colors/lib/system/has-flag.js"(exports, module2) {
|
|
97
|
+
"use strict";
|
|
98
|
+
module2.exports = function(flag, argv) {
|
|
99
|
+
argv = argv || process.argv;
|
|
100
|
+
var terminatorPos = argv.indexOf("--");
|
|
101
|
+
var prefix = /^-{1,2}/.test(flag) ? "" : "--";
|
|
102
|
+
var pos = argv.indexOf(prefix + flag);
|
|
103
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// node_modules/colors/lib/system/supports-colors.js
|
|
109
|
+
var require_supports_colors = __commonJS({
|
|
110
|
+
"node_modules/colors/lib/system/supports-colors.js"(exports, module2) {
|
|
111
|
+
"use strict";
|
|
112
|
+
var os = require("os");
|
|
113
|
+
var hasFlag = require_has_flag();
|
|
114
|
+
var env = process.env;
|
|
115
|
+
var forceColor = void 0;
|
|
116
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
117
|
+
forceColor = false;
|
|
118
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
119
|
+
forceColor = true;
|
|
120
|
+
}
|
|
121
|
+
if ("FORCE_COLOR" in env) {
|
|
122
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
123
|
+
}
|
|
124
|
+
function translateLevel(level) {
|
|
125
|
+
if (level === 0) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
level,
|
|
130
|
+
hasBasic: true,
|
|
131
|
+
has256: level >= 2,
|
|
132
|
+
has16m: level >= 3
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function supportsColor(stream) {
|
|
136
|
+
if (forceColor === false) {
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
139
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
140
|
+
return 3;
|
|
141
|
+
}
|
|
142
|
+
if (hasFlag("color=256")) {
|
|
143
|
+
return 2;
|
|
144
|
+
}
|
|
145
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
var min = forceColor ? 1 : 0;
|
|
149
|
+
if (process.platform === "win32") {
|
|
150
|
+
var osRelease = os.release().split(".");
|
|
151
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
152
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
153
|
+
}
|
|
154
|
+
return 1;
|
|
155
|
+
}
|
|
156
|
+
if ("CI" in env) {
|
|
157
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign) {
|
|
158
|
+
return sign in env;
|
|
159
|
+
}) || env.CI_NAME === "codeship") {
|
|
160
|
+
return 1;
|
|
161
|
+
}
|
|
162
|
+
return min;
|
|
163
|
+
}
|
|
164
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
165
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
166
|
+
}
|
|
167
|
+
if ("TERM_PROGRAM" in env) {
|
|
168
|
+
var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
169
|
+
switch (env.TERM_PROGRAM) {
|
|
170
|
+
case "iTerm.app":
|
|
171
|
+
return version >= 3 ? 3 : 2;
|
|
172
|
+
case "Hyper":
|
|
173
|
+
return 3;
|
|
174
|
+
case "Apple_Terminal":
|
|
175
|
+
return 2;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
179
|
+
return 2;
|
|
180
|
+
}
|
|
181
|
+
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
182
|
+
return 1;
|
|
183
|
+
}
|
|
184
|
+
if ("COLORTERM" in env) {
|
|
185
|
+
return 1;
|
|
186
|
+
}
|
|
187
|
+
if (env.TERM === "dumb") {
|
|
188
|
+
return min;
|
|
189
|
+
}
|
|
190
|
+
return min;
|
|
191
|
+
}
|
|
192
|
+
function getSupportLevel(stream) {
|
|
193
|
+
var level = supportsColor(stream);
|
|
194
|
+
return translateLevel(level);
|
|
195
|
+
}
|
|
196
|
+
module2.exports = {
|
|
197
|
+
supportsColor: getSupportLevel,
|
|
198
|
+
stdout: getSupportLevel(process.stdout),
|
|
199
|
+
stderr: getSupportLevel(process.stderr)
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// node_modules/colors/lib/custom/trap.js
|
|
205
|
+
var require_trap = __commonJS({
|
|
206
|
+
"node_modules/colors/lib/custom/trap.js"(exports, module2) {
|
|
207
|
+
module2["exports"] = function runTheTrap(text, options) {
|
|
208
|
+
var result = "";
|
|
209
|
+
text = text || "Run the trap, drop the bass";
|
|
210
|
+
text = text.split("");
|
|
211
|
+
var trap = {
|
|
212
|
+
a: ["@", "\u0104", "\u023A", "\u0245", "\u0394", "\u039B", "\u0414"],
|
|
213
|
+
b: ["\xDF", "\u0181", "\u0243", "\u026E", "\u03B2", "\u0E3F"],
|
|
214
|
+
c: ["\xA9", "\u023B", "\u03FE"],
|
|
215
|
+
d: ["\xD0", "\u018A", "\u0500", "\u0501", "\u0502", "\u0503"],
|
|
216
|
+
e: [
|
|
217
|
+
"\xCB",
|
|
218
|
+
"\u0115",
|
|
219
|
+
"\u018E",
|
|
220
|
+
"\u0258",
|
|
221
|
+
"\u03A3",
|
|
222
|
+
"\u03BE",
|
|
223
|
+
"\u04BC",
|
|
224
|
+
"\u0A6C"
|
|
225
|
+
],
|
|
226
|
+
f: ["\u04FA"],
|
|
227
|
+
g: ["\u0262"],
|
|
228
|
+
h: ["\u0126", "\u0195", "\u04A2", "\u04BA", "\u04C7", "\u050A"],
|
|
229
|
+
i: ["\u0F0F"],
|
|
230
|
+
j: ["\u0134"],
|
|
231
|
+
k: ["\u0138", "\u04A0", "\u04C3", "\u051E"],
|
|
232
|
+
l: ["\u0139"],
|
|
233
|
+
m: ["\u028D", "\u04CD", "\u04CE", "\u0520", "\u0521", "\u0D69"],
|
|
234
|
+
n: ["\xD1", "\u014B", "\u019D", "\u0376", "\u03A0", "\u048A"],
|
|
235
|
+
o: [
|
|
236
|
+
"\xD8",
|
|
237
|
+
"\xF5",
|
|
238
|
+
"\xF8",
|
|
239
|
+
"\u01FE",
|
|
240
|
+
"\u0298",
|
|
241
|
+
"\u047A",
|
|
242
|
+
"\u05DD",
|
|
243
|
+
"\u06DD",
|
|
244
|
+
"\u0E4F"
|
|
245
|
+
],
|
|
246
|
+
p: ["\u01F7", "\u048E"],
|
|
247
|
+
q: ["\u09CD"],
|
|
248
|
+
r: ["\xAE", "\u01A6", "\u0210", "\u024C", "\u0280", "\u042F"],
|
|
249
|
+
s: ["\xA7", "\u03DE", "\u03DF", "\u03E8"],
|
|
250
|
+
t: ["\u0141", "\u0166", "\u0373"],
|
|
251
|
+
u: ["\u01B1", "\u054D"],
|
|
252
|
+
v: ["\u05D8"],
|
|
253
|
+
w: ["\u0428", "\u0460", "\u047C", "\u0D70"],
|
|
254
|
+
x: ["\u04B2", "\u04FE", "\u04FC", "\u04FD"],
|
|
255
|
+
y: ["\xA5", "\u04B0", "\u04CB"],
|
|
256
|
+
z: ["\u01B5", "\u0240"]
|
|
257
|
+
};
|
|
258
|
+
text.forEach(function(c) {
|
|
259
|
+
c = c.toLowerCase();
|
|
260
|
+
var chars = trap[c] || [" "];
|
|
261
|
+
var rand = Math.floor(Math.random() * chars.length);
|
|
262
|
+
if (typeof trap[c] !== "undefined") {
|
|
263
|
+
result += trap[c][rand];
|
|
264
|
+
} else {
|
|
265
|
+
result += c;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
return result;
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
// node_modules/colors/lib/custom/zalgo.js
|
|
274
|
+
var require_zalgo = __commonJS({
|
|
275
|
+
"node_modules/colors/lib/custom/zalgo.js"(exports, module2) {
|
|
276
|
+
module2["exports"] = function zalgo(text, options) {
|
|
277
|
+
text = text || " he is here ";
|
|
278
|
+
var soul = {
|
|
279
|
+
"up": [
|
|
280
|
+
"\u030D",
|
|
281
|
+
"\u030E",
|
|
282
|
+
"\u0304",
|
|
283
|
+
"\u0305",
|
|
284
|
+
"\u033F",
|
|
285
|
+
"\u0311",
|
|
286
|
+
"\u0306",
|
|
287
|
+
"\u0310",
|
|
288
|
+
"\u0352",
|
|
289
|
+
"\u0357",
|
|
290
|
+
"\u0351",
|
|
291
|
+
"\u0307",
|
|
292
|
+
"\u0308",
|
|
293
|
+
"\u030A",
|
|
294
|
+
"\u0342",
|
|
295
|
+
"\u0313",
|
|
296
|
+
"\u0308",
|
|
297
|
+
"\u034A",
|
|
298
|
+
"\u034B",
|
|
299
|
+
"\u034C",
|
|
300
|
+
"\u0303",
|
|
301
|
+
"\u0302",
|
|
302
|
+
"\u030C",
|
|
303
|
+
"\u0350",
|
|
304
|
+
"\u0300",
|
|
305
|
+
"\u0301",
|
|
306
|
+
"\u030B",
|
|
307
|
+
"\u030F",
|
|
308
|
+
"\u0312",
|
|
309
|
+
"\u0313",
|
|
310
|
+
"\u0314",
|
|
311
|
+
"\u033D",
|
|
312
|
+
"\u0309",
|
|
313
|
+
"\u0363",
|
|
314
|
+
"\u0364",
|
|
315
|
+
"\u0365",
|
|
316
|
+
"\u0366",
|
|
317
|
+
"\u0367",
|
|
318
|
+
"\u0368",
|
|
319
|
+
"\u0369",
|
|
320
|
+
"\u036A",
|
|
321
|
+
"\u036B",
|
|
322
|
+
"\u036C",
|
|
323
|
+
"\u036D",
|
|
324
|
+
"\u036E",
|
|
325
|
+
"\u036F",
|
|
326
|
+
"\u033E",
|
|
327
|
+
"\u035B",
|
|
328
|
+
"\u0346",
|
|
329
|
+
"\u031A"
|
|
330
|
+
],
|
|
331
|
+
"down": [
|
|
332
|
+
"\u0316",
|
|
333
|
+
"\u0317",
|
|
334
|
+
"\u0318",
|
|
335
|
+
"\u0319",
|
|
336
|
+
"\u031C",
|
|
337
|
+
"\u031D",
|
|
338
|
+
"\u031E",
|
|
339
|
+
"\u031F",
|
|
340
|
+
"\u0320",
|
|
341
|
+
"\u0324",
|
|
342
|
+
"\u0325",
|
|
343
|
+
"\u0326",
|
|
344
|
+
"\u0329",
|
|
345
|
+
"\u032A",
|
|
346
|
+
"\u032B",
|
|
347
|
+
"\u032C",
|
|
348
|
+
"\u032D",
|
|
349
|
+
"\u032E",
|
|
350
|
+
"\u032F",
|
|
351
|
+
"\u0330",
|
|
352
|
+
"\u0331",
|
|
353
|
+
"\u0332",
|
|
354
|
+
"\u0333",
|
|
355
|
+
"\u0339",
|
|
356
|
+
"\u033A",
|
|
357
|
+
"\u033B",
|
|
358
|
+
"\u033C",
|
|
359
|
+
"\u0345",
|
|
360
|
+
"\u0347",
|
|
361
|
+
"\u0348",
|
|
362
|
+
"\u0349",
|
|
363
|
+
"\u034D",
|
|
364
|
+
"\u034E",
|
|
365
|
+
"\u0353",
|
|
366
|
+
"\u0354",
|
|
367
|
+
"\u0355",
|
|
368
|
+
"\u0356",
|
|
369
|
+
"\u0359",
|
|
370
|
+
"\u035A",
|
|
371
|
+
"\u0323"
|
|
372
|
+
],
|
|
373
|
+
"mid": [
|
|
374
|
+
"\u0315",
|
|
375
|
+
"\u031B",
|
|
376
|
+
"\u0300",
|
|
377
|
+
"\u0301",
|
|
378
|
+
"\u0358",
|
|
379
|
+
"\u0321",
|
|
380
|
+
"\u0322",
|
|
381
|
+
"\u0327",
|
|
382
|
+
"\u0328",
|
|
383
|
+
"\u0334",
|
|
384
|
+
"\u0335",
|
|
385
|
+
"\u0336",
|
|
386
|
+
"\u035C",
|
|
387
|
+
"\u035D",
|
|
388
|
+
"\u035E",
|
|
389
|
+
"\u035F",
|
|
390
|
+
"\u0360",
|
|
391
|
+
"\u0362",
|
|
392
|
+
"\u0338",
|
|
393
|
+
"\u0337",
|
|
394
|
+
"\u0361",
|
|
395
|
+
" \u0489"
|
|
396
|
+
]
|
|
397
|
+
};
|
|
398
|
+
var all = [].concat(soul.up, soul.down, soul.mid);
|
|
399
|
+
function randomNumber(range) {
|
|
400
|
+
var r = Math.floor(Math.random() * range);
|
|
401
|
+
return r;
|
|
402
|
+
}
|
|
403
|
+
function isChar(character) {
|
|
404
|
+
var bool = false;
|
|
405
|
+
all.filter(function(i) {
|
|
406
|
+
bool = i === character;
|
|
407
|
+
});
|
|
408
|
+
return bool;
|
|
409
|
+
}
|
|
410
|
+
function heComes(text2, options2) {
|
|
411
|
+
var result = "";
|
|
412
|
+
var counts;
|
|
413
|
+
var l;
|
|
414
|
+
options2 = options2 || {};
|
|
415
|
+
options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true;
|
|
416
|
+
options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
|
|
417
|
+
options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
|
|
418
|
+
options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
|
|
419
|
+
text2 = text2.split("");
|
|
420
|
+
for (l in text2) {
|
|
421
|
+
if (isChar(l)) {
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
result = result + text2[l];
|
|
425
|
+
counts = { "up": 0, "down": 0, "mid": 0 };
|
|
426
|
+
switch (options2.size) {
|
|
427
|
+
case "mini":
|
|
428
|
+
counts.up = randomNumber(8);
|
|
429
|
+
counts.mid = randomNumber(2);
|
|
430
|
+
counts.down = randomNumber(8);
|
|
431
|
+
break;
|
|
432
|
+
case "maxi":
|
|
433
|
+
counts.up = randomNumber(16) + 3;
|
|
434
|
+
counts.mid = randomNumber(4) + 1;
|
|
435
|
+
counts.down = randomNumber(64) + 3;
|
|
436
|
+
break;
|
|
437
|
+
default:
|
|
438
|
+
counts.up = randomNumber(8) + 1;
|
|
439
|
+
counts.mid = randomNumber(6) / 2;
|
|
440
|
+
counts.down = randomNumber(8) + 1;
|
|
441
|
+
break;
|
|
442
|
+
}
|
|
443
|
+
var arr = ["up", "mid", "down"];
|
|
444
|
+
for (var d in arr) {
|
|
445
|
+
var index = arr[d];
|
|
446
|
+
for (var i = 0; i <= counts[index]; i++) {
|
|
447
|
+
if (options2[index]) {
|
|
448
|
+
result = result + soul[index][randomNumber(soul[index].length)];
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
return result;
|
|
454
|
+
}
|
|
455
|
+
return heComes(text, options);
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
// node_modules/colors/lib/maps/america.js
|
|
461
|
+
var require_america = __commonJS({
|
|
462
|
+
"node_modules/colors/lib/maps/america.js"(exports, module2) {
|
|
463
|
+
module2["exports"] = function(colors) {
|
|
464
|
+
return function(letter, i, exploded) {
|
|
465
|
+
if (letter === " ")
|
|
466
|
+
return letter;
|
|
467
|
+
switch (i % 3) {
|
|
468
|
+
case 0:
|
|
469
|
+
return colors.red(letter);
|
|
470
|
+
case 1:
|
|
471
|
+
return colors.white(letter);
|
|
472
|
+
case 2:
|
|
473
|
+
return colors.blue(letter);
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
// node_modules/colors/lib/maps/zebra.js
|
|
481
|
+
var require_zebra = __commonJS({
|
|
482
|
+
"node_modules/colors/lib/maps/zebra.js"(exports, module2) {
|
|
483
|
+
module2["exports"] = function(colors) {
|
|
484
|
+
return function(letter, i, exploded) {
|
|
485
|
+
return i % 2 === 0 ? letter : colors.inverse(letter);
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
// node_modules/colors/lib/maps/rainbow.js
|
|
492
|
+
var require_rainbow = __commonJS({
|
|
493
|
+
"node_modules/colors/lib/maps/rainbow.js"(exports, module2) {
|
|
494
|
+
module2["exports"] = function(colors) {
|
|
495
|
+
var rainbowColors = ["red", "yellow", "green", "blue", "magenta"];
|
|
496
|
+
return function(letter, i, exploded) {
|
|
497
|
+
if (letter === " ") {
|
|
498
|
+
return letter;
|
|
499
|
+
} else {
|
|
500
|
+
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
// node_modules/colors/lib/maps/random.js
|
|
508
|
+
var require_random = __commonJS({
|
|
509
|
+
"node_modules/colors/lib/maps/random.js"(exports, module2) {
|
|
510
|
+
module2["exports"] = function(colors) {
|
|
511
|
+
var available = [
|
|
512
|
+
"underline",
|
|
513
|
+
"inverse",
|
|
514
|
+
"grey",
|
|
515
|
+
"yellow",
|
|
516
|
+
"red",
|
|
517
|
+
"green",
|
|
518
|
+
"blue",
|
|
519
|
+
"white",
|
|
520
|
+
"cyan",
|
|
521
|
+
"magenta",
|
|
522
|
+
"brightYellow",
|
|
523
|
+
"brightRed",
|
|
524
|
+
"brightGreen",
|
|
525
|
+
"brightBlue",
|
|
526
|
+
"brightWhite",
|
|
527
|
+
"brightCyan",
|
|
528
|
+
"brightMagenta"
|
|
529
|
+
];
|
|
530
|
+
return function(letter, i, exploded) {
|
|
531
|
+
return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// node_modules/colors/lib/colors.js
|
|
538
|
+
var require_colors = __commonJS({
|
|
539
|
+
"node_modules/colors/lib/colors.js"(exports, module2) {
|
|
540
|
+
var colors = {};
|
|
541
|
+
module2["exports"] = colors;
|
|
542
|
+
colors.themes = {};
|
|
543
|
+
var util = require("util");
|
|
544
|
+
var ansiStyles = colors.styles = require_styles();
|
|
545
|
+
var defineProps = Object.defineProperties;
|
|
546
|
+
var newLineRegex = new RegExp(/[\r\n]+/g);
|
|
547
|
+
colors.supportsColor = require_supports_colors().supportsColor;
|
|
548
|
+
if (typeof colors.enabled === "undefined") {
|
|
549
|
+
colors.enabled = colors.supportsColor() !== false;
|
|
550
|
+
}
|
|
551
|
+
colors.enable = function() {
|
|
552
|
+
colors.enabled = true;
|
|
553
|
+
};
|
|
554
|
+
colors.disable = function() {
|
|
555
|
+
colors.enabled = false;
|
|
556
|
+
};
|
|
557
|
+
colors.stripColors = colors.strip = function(str) {
|
|
558
|
+
return ("" + str).replace(/\x1B\[\d+m/g, "");
|
|
559
|
+
};
|
|
560
|
+
var stylize = colors.stylize = function stylize2(str, style) {
|
|
561
|
+
if (!colors.enabled) {
|
|
562
|
+
return str + "";
|
|
563
|
+
}
|
|
564
|
+
var styleMap = ansiStyles[style];
|
|
565
|
+
if (!styleMap && style in colors) {
|
|
566
|
+
return colors[style](str);
|
|
567
|
+
}
|
|
568
|
+
return styleMap.open + str + styleMap.close;
|
|
569
|
+
};
|
|
570
|
+
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
571
|
+
var escapeStringRegexp = function(str) {
|
|
572
|
+
if (typeof str !== "string") {
|
|
573
|
+
throw new TypeError("Expected a string");
|
|
574
|
+
}
|
|
575
|
+
return str.replace(matchOperatorsRe, "\\$&");
|
|
576
|
+
};
|
|
577
|
+
function build(_styles) {
|
|
578
|
+
var builder = function builder2() {
|
|
579
|
+
return applyStyle.apply(builder2, arguments);
|
|
580
|
+
};
|
|
581
|
+
builder._styles = _styles;
|
|
582
|
+
builder.__proto__ = proto;
|
|
583
|
+
return builder;
|
|
584
|
+
}
|
|
585
|
+
var styles = function() {
|
|
586
|
+
var ret = {};
|
|
587
|
+
ansiStyles.grey = ansiStyles.gray;
|
|
588
|
+
Object.keys(ansiStyles).forEach(function(key) {
|
|
589
|
+
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
|
590
|
+
ret[key] = {
|
|
591
|
+
get: function() {
|
|
592
|
+
return build(this._styles.concat(key));
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
});
|
|
596
|
+
return ret;
|
|
597
|
+
}();
|
|
598
|
+
var proto = defineProps(function colors2() {
|
|
599
|
+
}, styles);
|
|
600
|
+
function applyStyle() {
|
|
601
|
+
var args = Array.prototype.slice.call(arguments);
|
|
602
|
+
var str = args.map(function(arg) {
|
|
603
|
+
if (arg != null && arg.constructor === String) {
|
|
604
|
+
return arg;
|
|
605
|
+
} else {
|
|
606
|
+
return util.inspect(arg);
|
|
607
|
+
}
|
|
608
|
+
}).join(" ");
|
|
609
|
+
if (!colors.enabled || !str) {
|
|
610
|
+
return str;
|
|
611
|
+
}
|
|
612
|
+
var newLinesPresent = str.indexOf("\n") != -1;
|
|
613
|
+
var nestedStyles = this._styles;
|
|
614
|
+
var i = nestedStyles.length;
|
|
615
|
+
while (i--) {
|
|
616
|
+
var code = ansiStyles[nestedStyles[i]];
|
|
617
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
618
|
+
if (newLinesPresent) {
|
|
619
|
+
str = str.replace(newLineRegex, function(match) {
|
|
620
|
+
return code.close + match + code.open;
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
return str;
|
|
625
|
+
}
|
|
626
|
+
colors.setTheme = function(theme) {
|
|
627
|
+
if (typeof theme === "string") {
|
|
628
|
+
console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
for (var style in theme) {
|
|
632
|
+
(function(style2) {
|
|
633
|
+
colors[style2] = function(str) {
|
|
634
|
+
if (typeof theme[style2] === "object") {
|
|
635
|
+
var out = str;
|
|
636
|
+
for (var i in theme[style2]) {
|
|
637
|
+
out = colors[theme[style2][i]](out);
|
|
638
|
+
}
|
|
639
|
+
return out;
|
|
640
|
+
}
|
|
641
|
+
return colors[theme[style2]](str);
|
|
642
|
+
};
|
|
643
|
+
})(style);
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
function init() {
|
|
647
|
+
var ret = {};
|
|
648
|
+
Object.keys(styles).forEach(function(name) {
|
|
649
|
+
ret[name] = {
|
|
650
|
+
get: function() {
|
|
651
|
+
return build([name]);
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
});
|
|
655
|
+
return ret;
|
|
656
|
+
}
|
|
657
|
+
var sequencer = function sequencer2(map2, str) {
|
|
658
|
+
var exploded = str.split("");
|
|
659
|
+
exploded = exploded.map(map2);
|
|
660
|
+
return exploded.join("");
|
|
661
|
+
};
|
|
662
|
+
colors.trap = require_trap();
|
|
663
|
+
colors.zalgo = require_zalgo();
|
|
664
|
+
colors.maps = {};
|
|
665
|
+
colors.maps.america = require_america()(colors);
|
|
666
|
+
colors.maps.zebra = require_zebra()(colors);
|
|
667
|
+
colors.maps.rainbow = require_rainbow()(colors);
|
|
668
|
+
colors.maps.random = require_random()(colors);
|
|
669
|
+
for (map in colors.maps) {
|
|
670
|
+
(function(map2) {
|
|
671
|
+
colors[map2] = function(str) {
|
|
672
|
+
return sequencer(colors.maps[map2], str);
|
|
673
|
+
};
|
|
674
|
+
})(map);
|
|
675
|
+
}
|
|
676
|
+
var map;
|
|
677
|
+
defineProps(colors, init());
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
|
|
681
|
+
// node_modules/colors/lib/extendStringPrototype.js
|
|
682
|
+
var require_extendStringPrototype = __commonJS({
|
|
683
|
+
"node_modules/colors/lib/extendStringPrototype.js"(exports, module2) {
|
|
684
|
+
var colors = require_colors();
|
|
685
|
+
module2["exports"] = function() {
|
|
686
|
+
var addProperty = function(color, func) {
|
|
687
|
+
String.prototype.__defineGetter__(color, func);
|
|
688
|
+
};
|
|
689
|
+
addProperty("strip", function() {
|
|
690
|
+
return colors.strip(this);
|
|
691
|
+
});
|
|
692
|
+
addProperty("stripColors", function() {
|
|
693
|
+
return colors.strip(this);
|
|
694
|
+
});
|
|
695
|
+
addProperty("trap", function() {
|
|
696
|
+
return colors.trap(this);
|
|
697
|
+
});
|
|
698
|
+
addProperty("zalgo", function() {
|
|
699
|
+
return colors.zalgo(this);
|
|
700
|
+
});
|
|
701
|
+
addProperty("zebra", function() {
|
|
702
|
+
return colors.zebra(this);
|
|
703
|
+
});
|
|
704
|
+
addProperty("rainbow", function() {
|
|
705
|
+
return colors.rainbow(this);
|
|
706
|
+
});
|
|
707
|
+
addProperty("random", function() {
|
|
708
|
+
return colors.random(this);
|
|
709
|
+
});
|
|
710
|
+
addProperty("america", function() {
|
|
711
|
+
return colors.america(this);
|
|
712
|
+
});
|
|
713
|
+
var x = Object.keys(colors.styles);
|
|
714
|
+
x.forEach(function(style) {
|
|
715
|
+
addProperty(style, function() {
|
|
716
|
+
return colors.stylize(this, style);
|
|
717
|
+
});
|
|
718
|
+
});
|
|
719
|
+
function applyTheme(theme) {
|
|
720
|
+
var stringPrototypeBlacklist = [
|
|
721
|
+
"__defineGetter__",
|
|
722
|
+
"__defineSetter__",
|
|
723
|
+
"__lookupGetter__",
|
|
724
|
+
"__lookupSetter__",
|
|
725
|
+
"charAt",
|
|
726
|
+
"constructor",
|
|
727
|
+
"hasOwnProperty",
|
|
728
|
+
"isPrototypeOf",
|
|
729
|
+
"propertyIsEnumerable",
|
|
730
|
+
"toLocaleString",
|
|
731
|
+
"toString",
|
|
732
|
+
"valueOf",
|
|
733
|
+
"charCodeAt",
|
|
734
|
+
"indexOf",
|
|
735
|
+
"lastIndexOf",
|
|
736
|
+
"length",
|
|
737
|
+
"localeCompare",
|
|
738
|
+
"match",
|
|
739
|
+
"repeat",
|
|
740
|
+
"replace",
|
|
741
|
+
"search",
|
|
742
|
+
"slice",
|
|
743
|
+
"split",
|
|
744
|
+
"substring",
|
|
745
|
+
"toLocaleLowerCase",
|
|
746
|
+
"toLocaleUpperCase",
|
|
747
|
+
"toLowerCase",
|
|
748
|
+
"toUpperCase",
|
|
749
|
+
"trim",
|
|
750
|
+
"trimLeft",
|
|
751
|
+
"trimRight"
|
|
752
|
+
];
|
|
753
|
+
Object.keys(theme).forEach(function(prop) {
|
|
754
|
+
if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
|
|
755
|
+
console.log("warn: ".red + ("String.prototype" + prop).magenta + " is probably something you don't want to override. Ignoring style name");
|
|
756
|
+
} else {
|
|
757
|
+
if (typeof theme[prop] === "string") {
|
|
758
|
+
colors[prop] = colors[theme[prop]];
|
|
759
|
+
addProperty(prop, function() {
|
|
760
|
+
return colors[prop](this);
|
|
761
|
+
});
|
|
762
|
+
} else {
|
|
763
|
+
var themePropApplicator = function(str) {
|
|
764
|
+
var ret = str || this;
|
|
765
|
+
for (var t = 0; t < theme[prop].length; t++) {
|
|
766
|
+
ret = colors[theme[prop][t]](ret);
|
|
767
|
+
}
|
|
768
|
+
return ret;
|
|
769
|
+
};
|
|
770
|
+
addProperty(prop, themePropApplicator);
|
|
771
|
+
colors[prop] = function(str) {
|
|
772
|
+
return themePropApplicator(str);
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
colors.setTheme = function(theme) {
|
|
779
|
+
if (typeof theme === "string") {
|
|
780
|
+
console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");
|
|
781
|
+
return;
|
|
782
|
+
} else {
|
|
783
|
+
applyTheme(theme);
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
// node_modules/colors/lib/index.js
|
|
791
|
+
var require_lib = __commonJS({
|
|
792
|
+
"node_modules/colors/lib/index.js"(exports, module2) {
|
|
793
|
+
var colors = require_colors();
|
|
794
|
+
module2["exports"] = colors;
|
|
795
|
+
require_extendStringPrototype()();
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
|
|
799
|
+
// src/index.ts
|
|
800
|
+
var import_colors = __toESM(require_lib(), 1);
|
|
801
|
+
(async () => {
|
|
802
|
+
console.log((0, import_colors.blue)(`Hello from cli`));
|
|
803
|
+
})();
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "earthling-ui",
|
|
3
|
+
"version": "1.0.0-alpha.0",
|
|
4
|
+
"bugs": {
|
|
5
|
+
"url": "https://github.com/sFrady20/earthling-ui/issues"
|
|
6
|
+
},
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/sFrady20/earthling-ui",
|
|
10
|
+
"directory": "packages/cli"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Steven Frady",
|
|
15
|
+
"email": "sFrady20@gmail.com",
|
|
16
|
+
"url": "https://stevenfrady.com"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "dist/index.cjs",
|
|
20
|
+
"bin": "dist/index.cjs",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsup src/index.ts --format cjs"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"prettier": "^3.1.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@earthling-ui/config": "workspace:^",
|
|
33
|
+
"@types/node": "^20.10.0",
|
|
34
|
+
"colors": "^1.4.0",
|
|
35
|
+
"tsup": "^8.0.1",
|
|
36
|
+
"typescript": "^5.3.3"
|
|
37
|
+
},
|
|
38
|
+
"packageManager": "yarn@3.6.0"
|
|
39
|
+
}
|