@storm-software/unbuild 0.19.3 → 0.20.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 -2
- package/bin/unbuild.js +54 -8
- package/bin/unbuild.mjs +54 -8
- package/dist/build.js +8 -8
- package/dist/build.mjs +7 -7
- package/dist/{chunk-VNTBD7JR.js → chunk-2CDKPC2J.js} +54 -8
- package/dist/{chunk-GN7XDZYZ.mjs → chunk-34DH32EF.mjs} +1 -1
- package/dist/{chunk-JRCQBO5Q.mjs → chunk-5SOSUWM3.mjs} +54 -8
- package/dist/{chunk-247QEYBU.mjs → chunk-AH7CDDC4.mjs} +1 -1
- package/dist/{chunk-WG6JMMHO.mjs → chunk-FP34RJ2B.mjs} +1 -1
- package/dist/{chunk-ADWQIHP7.mjs → chunk-I24R5RY2.mjs} +4 -4
- package/dist/{chunk-I3QGLZCZ.mjs → chunk-ITLNJJHL.mjs} +1 -1
- package/dist/{chunk-LQAGEPDN.js → chunk-JOAJEBTW.js} +2 -2
- package/dist/{chunk-EWSFZCEG.js → chunk-L73LP5QX.js} +6 -6
- package/dist/{chunk-XFITZSCF.mjs → chunk-LMAVRNZF.mjs} +3 -3
- package/dist/{chunk-LKV7UO23.js → chunk-QUQ5VOD7.js} +3 -3
- package/dist/{chunk-XVH26RA2.js → chunk-XI6ZXBUG.js} +88 -88
- package/dist/{chunk-NITHGLFO.js → chunk-YNOD6WE4.js} +2 -2
- package/dist/{chunk-IUOPY673.js → chunk-ZUXO7HQP.js} +3 -3
- package/dist/{clean-BlXMN74D.d.mts → clean-DDbna8D4.d.mts} +57 -57
- package/dist/{clean-BlXMN74D.d.ts → clean-DDbna8D4.d.ts} +57 -57
- package/dist/clean.d.mts +1 -1
- package/dist/clean.d.ts +1 -1
- package/dist/clean.js +3 -3
- package/dist/clean.mjs +2 -2
- package/dist/config.js +6 -6
- package/dist/config.mjs +5 -5
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -40,7 +40,6 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
40
40
|
|
|
41
41
|
<!-- START doctoc -->
|
|
42
42
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
43
|
-
|
|
44
43
|
## Table of Contents
|
|
45
44
|
|
|
46
45
|
- [Storm ESBuild Package](#storm-esbuild-package)
|
package/bin/unbuild.js
CHANGED
|
@@ -163,6 +163,7 @@ var StormConfigSchema = import_zod.default.object({
|
|
|
163
163
|
"fatal",
|
|
164
164
|
"error",
|
|
165
165
|
"warn",
|
|
166
|
+
"success",
|
|
166
167
|
"info",
|
|
167
168
|
"debug",
|
|
168
169
|
"trace",
|
|
@@ -198,6 +199,7 @@ var LogLevelLabel = {
|
|
|
198
199
|
FATAL: "fatal",
|
|
199
200
|
ERROR: "error",
|
|
200
201
|
WARN: "warn",
|
|
202
|
+
SUCCESS: "success",
|
|
201
203
|
INFO: "info",
|
|
202
204
|
DEBUG: "debug",
|
|
203
205
|
TRACE: "trace",
|
|
@@ -396,12 +398,17 @@ var chalkDefault = {
|
|
|
396
398
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
397
399
|
}), "bgHex"),
|
|
398
400
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
|
|
401
|
+
gray: /* @__PURE__ */ __name((message) => message, "gray"),
|
|
399
402
|
bold: {
|
|
400
403
|
hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
|
|
401
404
|
bgHex: /* @__PURE__ */ __name((_) => ({
|
|
402
405
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
403
406
|
}), "bgHex"),
|
|
404
407
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
408
|
+
},
|
|
409
|
+
dim: {
|
|
410
|
+
hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
|
|
411
|
+
gray: /* @__PURE__ */ __name((message) => message, "gray")
|
|
405
412
|
}
|
|
406
413
|
};
|
|
407
414
|
var getChalk = /* @__PURE__ */ __name(() => {
|
|
@@ -412,6 +419,38 @@ var getChalk = /* @__PURE__ */ __name(() => {
|
|
|
412
419
|
return _chalk;
|
|
413
420
|
}, "getChalk");
|
|
414
421
|
|
|
422
|
+
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
423
|
+
var import_node_process = __toESM(require("process"));
|
|
424
|
+
function isUnicodeSupported() {
|
|
425
|
+
const { env } = import_node_process.default;
|
|
426
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
427
|
+
if (import_node_process.default.platform !== "win32") {
|
|
428
|
+
return TERM !== "linux";
|
|
429
|
+
}
|
|
430
|
+
return Boolean(env.WT_SESSION) || // Windows Terminal
|
|
431
|
+
Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
432
|
+
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
433
|
+
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
434
|
+
}
|
|
435
|
+
__name(isUnicodeSupported, "isUnicodeSupported");
|
|
436
|
+
|
|
437
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
438
|
+
var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
|
|
439
|
+
var CONSOLE_ICONS = {
|
|
440
|
+
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
441
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
442
|
+
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
443
|
+
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
444
|
+
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
445
|
+
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
446
|
+
[LogLevelLabel.TRACE]: useIcon("\u2709", "\u2192")
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
// ../config-tools/src/logger/format-timestamp.ts
|
|
450
|
+
var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
|
|
451
|
+
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
452
|
+
}, "formatTimestamp");
|
|
453
|
+
|
|
415
454
|
// ../config-tools/src/logger/get-log-level.ts
|
|
416
455
|
var getLogLevel = /* @__PURE__ */ __name((label) => {
|
|
417
456
|
switch (label) {
|
|
@@ -464,7 +503,7 @@ var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
|
|
|
464
503
|
}, "getLogLevelLabel");
|
|
465
504
|
var isVerbose = /* @__PURE__ */ __name((label = LogLevelLabel.SILENT) => {
|
|
466
505
|
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
467
|
-
return logLevel
|
|
506
|
+
return logLevel >= LogLevel.DEBUG;
|
|
468
507
|
}, "isVerbose");
|
|
469
508
|
|
|
470
509
|
// ../config-tools/src/logger/console.ts
|
|
@@ -478,42 +517,49 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
|
|
|
478
517
|
}
|
|
479
518
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
480
519
|
return (message) => {
|
|
481
|
-
console.error(
|
|
520
|
+
console.error(`
|
|
521
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
|
|
482
522
|
`);
|
|
483
523
|
};
|
|
484
524
|
}
|
|
485
525
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
486
526
|
return (message) => {
|
|
487
|
-
console.error(
|
|
527
|
+
console.error(`
|
|
528
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
488
529
|
`);
|
|
489
530
|
};
|
|
490
531
|
}
|
|
491
532
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
492
533
|
return (message) => {
|
|
493
|
-
console.warn(
|
|
534
|
+
console.warn(`
|
|
535
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
494
536
|
`);
|
|
495
537
|
};
|
|
496
538
|
}
|
|
497
539
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
|
|
498
540
|
return (message) => {
|
|
499
|
-
console.info(
|
|
541
|
+
console.info(`
|
|
542
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
500
543
|
`);
|
|
501
544
|
};
|
|
502
545
|
}
|
|
503
546
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
504
547
|
return (message) => {
|
|
505
|
-
console.info(
|
|
548
|
+
console.info(`
|
|
549
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
506
550
|
`);
|
|
507
551
|
};
|
|
508
552
|
}
|
|
509
553
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
510
554
|
return (message) => {
|
|
511
|
-
console.debug(
|
|
555
|
+
console.debug(`
|
|
556
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Debug]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
512
557
|
`);
|
|
513
558
|
};
|
|
514
559
|
}
|
|
515
560
|
return (message) => {
|
|
516
|
-
console.log(
|
|
561
|
+
console.log(`
|
|
562
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
517
563
|
`);
|
|
518
564
|
};
|
|
519
565
|
}, "getLogFn");
|
package/bin/unbuild.mjs
CHANGED
|
@@ -148,6 +148,7 @@ var StormConfigSchema = z.object({
|
|
|
148
148
|
"fatal",
|
|
149
149
|
"error",
|
|
150
150
|
"warn",
|
|
151
|
+
"success",
|
|
151
152
|
"info",
|
|
152
153
|
"debug",
|
|
153
154
|
"trace",
|
|
@@ -183,6 +184,7 @@ var LogLevelLabel = {
|
|
|
183
184
|
FATAL: "fatal",
|
|
184
185
|
ERROR: "error",
|
|
185
186
|
WARN: "warn",
|
|
187
|
+
SUCCESS: "success",
|
|
186
188
|
INFO: "info",
|
|
187
189
|
DEBUG: "debug",
|
|
188
190
|
TRACE: "trace",
|
|
@@ -381,12 +383,17 @@ var chalkDefault = {
|
|
|
381
383
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
382
384
|
}), "bgHex"),
|
|
383
385
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
|
|
386
|
+
gray: /* @__PURE__ */ __name((message) => message, "gray"),
|
|
384
387
|
bold: {
|
|
385
388
|
hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
|
|
386
389
|
bgHex: /* @__PURE__ */ __name((_) => ({
|
|
387
390
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
388
391
|
}), "bgHex"),
|
|
389
392
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
393
|
+
},
|
|
394
|
+
dim: {
|
|
395
|
+
hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
|
|
396
|
+
gray: /* @__PURE__ */ __name((message) => message, "gray")
|
|
390
397
|
}
|
|
391
398
|
};
|
|
392
399
|
var getChalk = /* @__PURE__ */ __name(() => {
|
|
@@ -397,6 +404,38 @@ var getChalk = /* @__PURE__ */ __name(() => {
|
|
|
397
404
|
return _chalk;
|
|
398
405
|
}, "getChalk");
|
|
399
406
|
|
|
407
|
+
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
408
|
+
import process2 from "node:process";
|
|
409
|
+
function isUnicodeSupported() {
|
|
410
|
+
const { env } = process2;
|
|
411
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
412
|
+
if (process2.platform !== "win32") {
|
|
413
|
+
return TERM !== "linux";
|
|
414
|
+
}
|
|
415
|
+
return Boolean(env.WT_SESSION) || // Windows Terminal
|
|
416
|
+
Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
417
|
+
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
418
|
+
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
419
|
+
}
|
|
420
|
+
__name(isUnicodeSupported, "isUnicodeSupported");
|
|
421
|
+
|
|
422
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
423
|
+
var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
|
|
424
|
+
var CONSOLE_ICONS = {
|
|
425
|
+
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
426
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
427
|
+
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
428
|
+
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
429
|
+
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
430
|
+
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
431
|
+
[LogLevelLabel.TRACE]: useIcon("\u2709", "\u2192")
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
// ../config-tools/src/logger/format-timestamp.ts
|
|
435
|
+
var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
|
|
436
|
+
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
437
|
+
}, "formatTimestamp");
|
|
438
|
+
|
|
400
439
|
// ../config-tools/src/logger/get-log-level.ts
|
|
401
440
|
var getLogLevel = /* @__PURE__ */ __name((label) => {
|
|
402
441
|
switch (label) {
|
|
@@ -449,7 +488,7 @@ var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
|
|
|
449
488
|
}, "getLogLevelLabel");
|
|
450
489
|
var isVerbose = /* @__PURE__ */ __name((label = LogLevelLabel.SILENT) => {
|
|
451
490
|
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
452
|
-
return logLevel
|
|
491
|
+
return logLevel >= LogLevel.DEBUG;
|
|
453
492
|
}, "isVerbose");
|
|
454
493
|
|
|
455
494
|
// ../config-tools/src/logger/console.ts
|
|
@@ -463,42 +502,49 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
|
|
|
463
502
|
}
|
|
464
503
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
465
504
|
return (message) => {
|
|
466
|
-
console.error(
|
|
505
|
+
console.error(`
|
|
506
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
|
|
467
507
|
`);
|
|
468
508
|
};
|
|
469
509
|
}
|
|
470
510
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
471
511
|
return (message) => {
|
|
472
|
-
console.error(
|
|
512
|
+
console.error(`
|
|
513
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
473
514
|
`);
|
|
474
515
|
};
|
|
475
516
|
}
|
|
476
517
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
477
518
|
return (message) => {
|
|
478
|
-
console.warn(
|
|
519
|
+
console.warn(`
|
|
520
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
479
521
|
`);
|
|
480
522
|
};
|
|
481
523
|
}
|
|
482
524
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
|
|
483
525
|
return (message) => {
|
|
484
|
-
console.info(
|
|
526
|
+
console.info(`
|
|
527
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
485
528
|
`);
|
|
486
529
|
};
|
|
487
530
|
}
|
|
488
531
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
489
532
|
return (message) => {
|
|
490
|
-
console.info(
|
|
533
|
+
console.info(`
|
|
534
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
491
535
|
`);
|
|
492
536
|
};
|
|
493
537
|
}
|
|
494
538
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
495
539
|
return (message) => {
|
|
496
|
-
console.debug(
|
|
540
|
+
console.debug(`
|
|
541
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Debug]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
497
542
|
`);
|
|
498
543
|
};
|
|
499
544
|
}
|
|
500
545
|
return (message) => {
|
|
501
|
-
console.log(
|
|
546
|
+
console.log(`
|
|
547
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
502
548
|
`);
|
|
503
549
|
};
|
|
504
550
|
}, "getLogFn");
|
package/dist/build.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var _chunkXI6ZXBUGjs = require('./chunk-XI6ZXBUG.js');
|
|
4
|
+
require('./chunk-ZUXO7HQP.js');
|
|
5
|
+
require('./chunk-L73LP5QX.js');
|
|
6
|
+
require('./chunk-YNOD6WE4.js');
|
|
7
7
|
require('./chunk-4REDJQMU.js');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-JOAJEBTW.js');
|
|
9
|
+
require('./chunk-QUQ5VOD7.js');
|
|
10
|
+
require('./chunk-2CDKPC2J.js');
|
|
11
11
|
require('./chunk-V2LF4EEM.js');
|
|
12
12
|
require('./chunk-3GQAWCBQ.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
exports.build =
|
|
15
|
+
exports.build = _chunkXI6ZXBUGjs.build;
|
package/dist/build.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I24R5RY2.mjs";
|
|
4
|
+
import "./chunk-AH7CDDC4.mjs";
|
|
5
|
+
import "./chunk-LMAVRNZF.mjs";
|
|
6
|
+
import "./chunk-ITLNJJHL.mjs";
|
|
7
7
|
import "./chunk-TYJGNL6P.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-34DH32EF.mjs";
|
|
9
|
+
import "./chunk-FP34RJ2B.mjs";
|
|
10
|
+
import "./chunk-5SOSUWM3.mjs";
|
|
11
11
|
import "./chunk-KTRDC23G.mjs";
|
|
12
12
|
import "./chunk-LPEX4YW6.mjs";
|
|
13
13
|
export {
|
|
@@ -19,6 +19,7 @@ var LogLevelLabel = {
|
|
|
19
19
|
FATAL: "fatal",
|
|
20
20
|
ERROR: "error",
|
|
21
21
|
WARN: "warn",
|
|
22
|
+
SUCCESS: "success",
|
|
22
23
|
INFO: "info",
|
|
23
24
|
DEBUG: "debug",
|
|
24
25
|
TRACE: "trace",
|
|
@@ -95,7 +96,7 @@ var getLogLevelLabel = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (log
|
|
|
95
96
|
}, "getLogLevelLabel");
|
|
96
97
|
var isVerbose = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
|
|
97
98
|
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
98
|
-
return logLevel
|
|
99
|
+
return logLevel >= LogLevel.DEBUG;
|
|
99
100
|
}, "isVerbose");
|
|
100
101
|
|
|
101
102
|
// ../config/src/constants.ts
|
|
@@ -236,6 +237,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
236
237
|
"fatal",
|
|
237
238
|
"error",
|
|
238
239
|
"warn",
|
|
240
|
+
"success",
|
|
239
241
|
"info",
|
|
240
242
|
"debug",
|
|
241
243
|
"trace",
|
|
@@ -421,12 +423,17 @@ var chalkDefault = {
|
|
|
421
423
|
whiteBright: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
422
424
|
}), "bgHex"),
|
|
423
425
|
whiteBright: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "whiteBright"),
|
|
426
|
+
gray: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "gray"),
|
|
424
427
|
bold: {
|
|
425
428
|
hex: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
426
429
|
bgHex: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (_) => ({
|
|
427
430
|
whiteBright: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
428
431
|
}), "bgHex"),
|
|
429
432
|
whiteBright: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
433
|
+
},
|
|
434
|
+
dim: {
|
|
435
|
+
hex: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
436
|
+
gray: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "gray")
|
|
430
437
|
}
|
|
431
438
|
};
|
|
432
439
|
var getChalk = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
@@ -437,6 +444,38 @@ var getChalk = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
|
437
444
|
return _chalk;
|
|
438
445
|
}, "getChalk");
|
|
439
446
|
|
|
447
|
+
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
448
|
+
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
449
|
+
function isUnicodeSupported() {
|
|
450
|
+
const { env } = _process2.default;
|
|
451
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
452
|
+
if (_process2.default.platform !== "win32") {
|
|
453
|
+
return TERM !== "linux";
|
|
454
|
+
}
|
|
455
|
+
return Boolean(env.WT_SESSION) || // Windows Terminal
|
|
456
|
+
Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
457
|
+
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
458
|
+
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
459
|
+
}
|
|
460
|
+
_chunk3GQAWCBQjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
|
|
461
|
+
|
|
462
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
463
|
+
var useIcon = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
|
|
464
|
+
var CONSOLE_ICONS = {
|
|
465
|
+
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
466
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
467
|
+
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
468
|
+
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
469
|
+
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
470
|
+
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
471
|
+
[LogLevelLabel.TRACE]: useIcon("\u2709", "\u2192")
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
// ../config-tools/src/logger/format-timestamp.ts
|
|
475
|
+
var formatTimestamp = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (date = /* @__PURE__ */ new Date()) => {
|
|
476
|
+
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
477
|
+
}, "formatTimestamp");
|
|
478
|
+
|
|
440
479
|
// ../config-tools/src/logger/console.ts
|
|
441
480
|
var getLogFn = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}) => {
|
|
442
481
|
const _chalk = getChalk();
|
|
@@ -448,42 +487,49 @@ var getLogFn = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel =
|
|
|
448
487
|
}
|
|
449
488
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
450
489
|
return (message) => {
|
|
451
|
-
console.error(
|
|
490
|
+
console.error(`
|
|
491
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(formatLogMessage(message))}
|
|
452
492
|
`);
|
|
453
493
|
};
|
|
454
494
|
}
|
|
455
495
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
456
496
|
return (message) => {
|
|
457
|
-
console.error(
|
|
497
|
+
console.error(`
|
|
498
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(formatLogMessage(message))}
|
|
458
499
|
`);
|
|
459
500
|
};
|
|
460
501
|
}
|
|
461
502
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
462
503
|
return (message) => {
|
|
463
|
-
console.warn(
|
|
504
|
+
console.warn(`
|
|
505
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(formatLogMessage(message))}
|
|
464
506
|
`);
|
|
465
507
|
};
|
|
466
508
|
}
|
|
467
509
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
|
|
468
510
|
return (message) => {
|
|
469
|
-
console.info(
|
|
511
|
+
console.info(`
|
|
512
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(formatLogMessage(message))}
|
|
470
513
|
`);
|
|
471
514
|
};
|
|
472
515
|
}
|
|
473
516
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
474
517
|
return (message) => {
|
|
475
|
-
console.info(
|
|
518
|
+
console.info(`
|
|
519
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(formatLogMessage(message))}
|
|
476
520
|
`);
|
|
477
521
|
};
|
|
478
522
|
}
|
|
479
523
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
480
524
|
return (message) => {
|
|
481
|
-
console.debug(
|
|
525
|
+
console.debug(`
|
|
526
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Debug]`)} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(formatLogMessage(message))}
|
|
482
527
|
`);
|
|
483
528
|
};
|
|
484
529
|
}
|
|
485
530
|
return (message) => {
|
|
486
|
-
console.log(
|
|
531
|
+
console.log(`
|
|
532
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(formatLogMessage(message))}
|
|
487
533
|
`);
|
|
488
534
|
};
|
|
489
535
|
}, "getLogFn");
|
|
@@ -19,6 +19,7 @@ var LogLevelLabel = {
|
|
|
19
19
|
FATAL: "fatal",
|
|
20
20
|
ERROR: "error",
|
|
21
21
|
WARN: "warn",
|
|
22
|
+
SUCCESS: "success",
|
|
22
23
|
INFO: "info",
|
|
23
24
|
DEBUG: "debug",
|
|
24
25
|
TRACE: "trace",
|
|
@@ -95,7 +96,7 @@ var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
|
|
|
95
96
|
}, "getLogLevelLabel");
|
|
96
97
|
var isVerbose = /* @__PURE__ */ __name((label = LogLevelLabel.SILENT) => {
|
|
97
98
|
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
98
|
-
return logLevel
|
|
99
|
+
return logLevel >= LogLevel.DEBUG;
|
|
99
100
|
}, "isVerbose");
|
|
100
101
|
|
|
101
102
|
// ../config/src/constants.ts
|
|
@@ -236,6 +237,7 @@ var StormConfigSchema = z.object({
|
|
|
236
237
|
"fatal",
|
|
237
238
|
"error",
|
|
238
239
|
"warn",
|
|
240
|
+
"success",
|
|
239
241
|
"info",
|
|
240
242
|
"debug",
|
|
241
243
|
"trace",
|
|
@@ -421,12 +423,17 @@ var chalkDefault = {
|
|
|
421
423
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
422
424
|
}), "bgHex"),
|
|
423
425
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
|
|
426
|
+
gray: /* @__PURE__ */ __name((message) => message, "gray"),
|
|
424
427
|
bold: {
|
|
425
428
|
hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
|
|
426
429
|
bgHex: /* @__PURE__ */ __name((_) => ({
|
|
427
430
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
428
431
|
}), "bgHex"),
|
|
429
432
|
whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
|
|
433
|
+
},
|
|
434
|
+
dim: {
|
|
435
|
+
hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
|
|
436
|
+
gray: /* @__PURE__ */ __name((message) => message, "gray")
|
|
430
437
|
}
|
|
431
438
|
};
|
|
432
439
|
var getChalk = /* @__PURE__ */ __name(() => {
|
|
@@ -437,6 +444,38 @@ var getChalk = /* @__PURE__ */ __name(() => {
|
|
|
437
444
|
return _chalk;
|
|
438
445
|
}, "getChalk");
|
|
439
446
|
|
|
447
|
+
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
448
|
+
import process2 from "node:process";
|
|
449
|
+
function isUnicodeSupported() {
|
|
450
|
+
const { env } = process2;
|
|
451
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
452
|
+
if (process2.platform !== "win32") {
|
|
453
|
+
return TERM !== "linux";
|
|
454
|
+
}
|
|
455
|
+
return Boolean(env.WT_SESSION) || // Windows Terminal
|
|
456
|
+
Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
457
|
+
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
458
|
+
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
459
|
+
}
|
|
460
|
+
__name(isUnicodeSupported, "isUnicodeSupported");
|
|
461
|
+
|
|
462
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
463
|
+
var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
|
|
464
|
+
var CONSOLE_ICONS = {
|
|
465
|
+
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
466
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
467
|
+
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
468
|
+
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
469
|
+
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
470
|
+
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
471
|
+
[LogLevelLabel.TRACE]: useIcon("\u2709", "\u2192")
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
// ../config-tools/src/logger/format-timestamp.ts
|
|
475
|
+
var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
|
|
476
|
+
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
477
|
+
}, "formatTimestamp");
|
|
478
|
+
|
|
440
479
|
// ../config-tools/src/logger/console.ts
|
|
441
480
|
var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) => {
|
|
442
481
|
const _chalk = getChalk();
|
|
@@ -448,42 +487,49 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
|
|
|
448
487
|
}
|
|
449
488
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
450
489
|
return (message) => {
|
|
451
|
-
console.error(
|
|
490
|
+
console.error(`
|
|
491
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
|
|
452
492
|
`);
|
|
453
493
|
};
|
|
454
494
|
}
|
|
455
495
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
456
496
|
return (message) => {
|
|
457
|
-
console.error(
|
|
497
|
+
console.error(`
|
|
498
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
458
499
|
`);
|
|
459
500
|
};
|
|
460
501
|
}
|
|
461
502
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
462
503
|
return (message) => {
|
|
463
|
-
console.warn(
|
|
504
|
+
console.warn(`
|
|
505
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
464
506
|
`);
|
|
465
507
|
};
|
|
466
508
|
}
|
|
467
509
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
|
|
468
510
|
return (message) => {
|
|
469
|
-
console.info(
|
|
511
|
+
console.info(`
|
|
512
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
470
513
|
`);
|
|
471
514
|
};
|
|
472
515
|
}
|
|
473
516
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
474
517
|
return (message) => {
|
|
475
|
-
console.info(
|
|
518
|
+
console.info(`
|
|
519
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
476
520
|
`);
|
|
477
521
|
};
|
|
478
522
|
}
|
|
479
523
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
480
524
|
return (message) => {
|
|
481
|
-
console.debug(
|
|
525
|
+
console.debug(`
|
|
526
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Debug]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
482
527
|
`);
|
|
483
528
|
};
|
|
484
529
|
}
|
|
485
530
|
return (message) => {
|
|
486
|
-
console.log(
|
|
531
|
+
console.log(`
|
|
532
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
487
533
|
`);
|
|
488
534
|
};
|
|
489
535
|
}, "getLogFn");
|