@storm-software/esbuild 0.45.48 → 0.45.55
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 -1
- package/dist/assets.cjs +4 -4
- package/dist/assets.js +3 -3
- package/dist/build.cjs +11 -11
- package/dist/build.js +10 -10
- package/dist/{chunk-XT7RUW5O.js → chunk-3FBWVPJW.js} +4 -4
- package/dist/{chunk-3W7YORKS.js → chunk-3GCNEVK7.js} +1 -1
- package/dist/{chunk-OQIHAJKM.cjs → chunk-A6NQIRGS.cjs} +5 -5
- package/dist/{chunk-IICFSC7H.js → chunk-ADBXIH6V.js} +5 -5
- package/dist/chunk-BQT3OVTI.js +325 -0
- package/dist/{chunk-PX7DC45G.cjs → chunk-FJYBNKEX.cjs} +3 -3
- package/dist/{chunk-HVYEXIBG.cjs → chunk-GA67YJGQ.cjs} +585 -55
- package/dist/{chunk-GSMUB44K.js → chunk-KX7KPO7S.js} +2 -2
- package/dist/{chunk-ANVMKD2B.cjs → chunk-LBZ4HJFB.cjs} +3 -3
- package/dist/{chunk-TOHPM7SD.js → chunk-NMZ7BF3X.js} +1 -1
- package/dist/{chunk-CUDPQHBO.cjs → chunk-O5JRHLWQ.cjs} +3 -3
- package/dist/{chunk-UWWLDIJW.js → chunk-R7KP6WNL.js} +551 -21
- package/dist/{chunk-4PCPRDCN.js → chunk-RKF72MBJ.js} +7 -7
- package/dist/{chunk-5KDTAKBV.js → chunk-RM2PYDML.js} +6 -6
- package/dist/chunk-SOB2SZPD.cjs +325 -0
- package/dist/{chunk-YMMROUG3.js → chunk-UK6WDL5V.js} +1 -1
- package/dist/{chunk-LAH6PYTD.cjs → chunk-ULU7VZRK.cjs} +4 -4
- package/dist/{chunk-XC2LNBUH.cjs → chunk-VMZTU5MH.cjs} +7 -7
- package/dist/{chunk-OUSMQA4F.cjs → chunk-XFVVEEPC.cjs} +22 -22
- package/dist/{chunk-VWTTBHHC.cjs → chunk-XUAZ6AMA.cjs} +11 -11
- package/dist/clean.cjs +3 -4
- package/dist/clean.js +2 -3
- package/dist/config.cjs +4 -4
- package/dist/config.js +3 -3
- package/dist/context.cjs +5 -5
- package/dist/context.js +4 -4
- package/dist/index.cjs +11 -11
- package/dist/index.js +10 -10
- package/dist/package-json.cjs +4 -4
- package/dist/package-json.js +3 -3
- package/dist/plugins/deps-check.cjs +3 -4
- package/dist/plugins/deps-check.js +2 -3
- package/dist/tsup.cjs +3 -3
- package/dist/tsup.js +2 -2
- package/dist/watch.cjs +3 -4
- package/dist/watch.js +1 -2
- package/package.json +5 -5
- package/dist/chunk-4PYGUUI5.cjs +0 -786
- package/dist/chunk-R2UH2X62.js +0 -786
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 -->
|
package/dist/assets.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-4PYGUUI5.cjs');
|
|
3
|
+
var _chunkA6NQIRGScjs = require('./chunk-A6NQIRGS.cjs');
|
|
4
|
+
require('./chunk-GA67YJGQ.cjs');
|
|
6
5
|
require('./chunk-M37UEA6V.cjs');
|
|
6
|
+
require('./chunk-SOB2SZPD.cjs');
|
|
7
7
|
require('./chunk-DRSI5NMS.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.copyBuildAssets =
|
|
10
|
+
exports.copyBuildAssets = _chunkA6NQIRGScjs.copyBuildAssets;
|
package/dist/assets.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copyBuildAssets
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-R2UH2X62.js";
|
|
3
|
+
} from "./chunk-KX7KPO7S.js";
|
|
4
|
+
import "./chunk-R7KP6WNL.js";
|
|
6
5
|
import "./chunk-6RS6PUM7.js";
|
|
6
|
+
import "./chunk-BQT3OVTI.js";
|
|
7
7
|
import "./chunk-RJEZSH2W.js";
|
|
8
8
|
export {
|
|
9
9
|
copyBuildAssets
|
package/dist/build.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-4PYGUUI5.cjs');
|
|
3
|
+
var _chunkXFVVEEPCcjs = require('./chunk-XFVVEEPC.cjs');
|
|
4
|
+
require('./chunk-FJYBNKEX.cjs');
|
|
5
|
+
require('./chunk-A6NQIRGS.cjs');
|
|
6
|
+
require('./chunk-LBZ4HJFB.cjs');
|
|
7
|
+
require('./chunk-XUAZ6AMA.cjs');
|
|
8
|
+
require('./chunk-O5JRHLWQ.cjs');
|
|
9
|
+
require('./chunk-VMZTU5MH.cjs');
|
|
10
|
+
require('./chunk-GA67YJGQ.cjs');
|
|
11
|
+
require('./chunk-ULU7VZRK.cjs');
|
|
13
12
|
require('./chunk-M37UEA6V.cjs');
|
|
13
|
+
require('./chunk-SOB2SZPD.cjs');
|
|
14
14
|
require('./chunk-DRSI5NMS.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.build =
|
|
17
|
+
exports.build = _chunkXFVVEEPCcjs.build;
|
package/dist/build.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-R2UH2X62.js";
|
|
3
|
+
} from "./chunk-RKF72MBJ.js";
|
|
4
|
+
import "./chunk-UK6WDL5V.js";
|
|
5
|
+
import "./chunk-KX7KPO7S.js";
|
|
6
|
+
import "./chunk-NMZ7BF3X.js";
|
|
7
|
+
import "./chunk-RM2PYDML.js";
|
|
8
|
+
import "./chunk-3GCNEVK7.js";
|
|
9
|
+
import "./chunk-ADBXIH6V.js";
|
|
10
|
+
import "./chunk-R7KP6WNL.js";
|
|
11
|
+
import "./chunk-3FBWVPJW.js";
|
|
13
12
|
import "./chunk-6RS6PUM7.js";
|
|
13
|
+
import "./chunk-BQT3OVTI.js";
|
|
14
14
|
import "./chunk-RJEZSH2W.js";
|
|
15
15
|
export {
|
|
16
16
|
build
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGA67YJGQcjs = require('./chunk-GA67YJGQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkSOB2SZPDcjs = require('./chunk-SOB2SZPD.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkDRSI5NMScjs = require('./chunk-DRSI5NMS.cjs');
|
|
@@ -13,12 +13,12 @@ var _chunkDRSI5NMScjs = require('./chunk-DRSI5NMS.cjs');
|
|
|
13
13
|
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
14
14
|
async function copyBuildAssets(context) {
|
|
15
15
|
if (!_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) && _optionalChain([context, 'access', _4 => _4.options, 'access', _5 => _5.assets, 'optionalAccess', _6 => _6.length])) {
|
|
16
|
-
|
|
16
|
+
_chunkSOB2SZPDcjs.writeDebug.call(void 0,
|
|
17
17
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
18
18
|
context.workspaceConfig
|
|
19
19
|
);
|
|
20
|
-
const stopwatch =
|
|
21
|
-
await
|
|
20
|
+
const stopwatch = _chunkSOB2SZPDcjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
21
|
+
await _chunkGA67YJGQcjs.copyAssets.call(void 0,
|
|
22
22
|
context.workspaceConfig,
|
|
23
23
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
24
24
|
context.outputPath,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addPackageDependencies,
|
|
3
3
|
addWorkspacePackageJsonFields
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
getStopwatch,
|
|
7
|
-
writeDebug
|
|
8
|
-
} from "./chunk-R2UH2X62.js";
|
|
4
|
+
} from "./chunk-R7KP6WNL.js";
|
|
9
5
|
import {
|
|
10
6
|
joinPaths
|
|
11
7
|
} from "./chunk-6RS6PUM7.js";
|
|
8
|
+
import {
|
|
9
|
+
getStopwatch,
|
|
10
|
+
writeDebug
|
|
11
|
+
} from "./chunk-BQT3OVTI.js";
|
|
12
12
|
import {
|
|
13
13
|
init_esm_shims
|
|
14
14
|
} from "./chunk-RJEZSH2W.js";
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_esm_shims
|
|
3
|
+
} from "./chunk-RJEZSH2W.js";
|
|
4
|
+
|
|
5
|
+
// ../config-tools/src/logger/console.ts
|
|
6
|
+
init_esm_shims();
|
|
7
|
+
|
|
8
|
+
// ../config-tools/src/types.ts
|
|
9
|
+
init_esm_shims();
|
|
10
|
+
var LogLevel = {
|
|
11
|
+
SILENT: 0,
|
|
12
|
+
FATAL: 10,
|
|
13
|
+
ERROR: 20,
|
|
14
|
+
WARN: 30,
|
|
15
|
+
SUCCESS: 35,
|
|
16
|
+
INFO: 40,
|
|
17
|
+
DEBUG: 60,
|
|
18
|
+
TRACE: 70,
|
|
19
|
+
ALL: 100
|
|
20
|
+
};
|
|
21
|
+
var LogLevelLabel = {
|
|
22
|
+
SILENT: "silent",
|
|
23
|
+
FATAL: "fatal",
|
|
24
|
+
ERROR: "error",
|
|
25
|
+
WARN: "warn",
|
|
26
|
+
SUCCESS: "success",
|
|
27
|
+
INFO: "info",
|
|
28
|
+
DEBUG: "debug",
|
|
29
|
+
TRACE: "trace",
|
|
30
|
+
ALL: "all"
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// ../config-tools/src/utilities/colors.ts
|
|
34
|
+
init_esm_shims();
|
|
35
|
+
var DEFAULT_COLOR_CONFIG = {
|
|
36
|
+
light: {
|
|
37
|
+
background: "#fafafa",
|
|
38
|
+
foreground: "#1d1e22",
|
|
39
|
+
brand: "#1fb2a6",
|
|
40
|
+
alternate: "#db2777",
|
|
41
|
+
help: "#5C4EE5",
|
|
42
|
+
success: "#087f5b",
|
|
43
|
+
info: "#0550ae",
|
|
44
|
+
warning: "#e3b341",
|
|
45
|
+
danger: "#D8314A",
|
|
46
|
+
fatal: "#51070f",
|
|
47
|
+
link: "#3fa6ff",
|
|
48
|
+
positive: "#22c55e",
|
|
49
|
+
negative: "#dc2626",
|
|
50
|
+
gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
|
|
51
|
+
},
|
|
52
|
+
dark: {
|
|
53
|
+
background: "#1d1e22",
|
|
54
|
+
foreground: "#cbd5e1",
|
|
55
|
+
brand: "#2dd4bf",
|
|
56
|
+
alternate: "#db2777",
|
|
57
|
+
help: "#818cf8",
|
|
58
|
+
success: "#10b981",
|
|
59
|
+
info: "#58a6ff",
|
|
60
|
+
warning: "#f3d371",
|
|
61
|
+
danger: "#D8314A",
|
|
62
|
+
fatal: "#a40e26",
|
|
63
|
+
link: "#3fa6ff",
|
|
64
|
+
positive: "#22c55e",
|
|
65
|
+
negative: "#dc2626",
|
|
66
|
+
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// ../config-tools/src/logger/chalk.ts
|
|
71
|
+
init_esm_shims();
|
|
72
|
+
import chalk from "chalk";
|
|
73
|
+
var chalkDefault = {
|
|
74
|
+
hex: (_) => (message) => message,
|
|
75
|
+
bgHex: (_) => ({
|
|
76
|
+
whiteBright: (message) => message,
|
|
77
|
+
white: (message) => message
|
|
78
|
+
}),
|
|
79
|
+
white: (message) => message,
|
|
80
|
+
whiteBright: (message) => message,
|
|
81
|
+
gray: (message) => message,
|
|
82
|
+
bold: {
|
|
83
|
+
hex: (_) => (message) => message,
|
|
84
|
+
bgHex: (_) => ({
|
|
85
|
+
whiteBright: (message) => message,
|
|
86
|
+
white: (message) => message
|
|
87
|
+
}),
|
|
88
|
+
whiteBright: (message) => message,
|
|
89
|
+
white: (message) => message
|
|
90
|
+
},
|
|
91
|
+
dim: {
|
|
92
|
+
hex: (_) => (message) => message,
|
|
93
|
+
gray: (message) => message
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
var getChalk = () => {
|
|
97
|
+
let _chalk = chalk;
|
|
98
|
+
if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
|
|
99
|
+
_chalk = chalkDefault;
|
|
100
|
+
}
|
|
101
|
+
return _chalk;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
105
|
+
init_esm_shims();
|
|
106
|
+
|
|
107
|
+
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
108
|
+
init_esm_shims();
|
|
109
|
+
function isUnicodeSupported() {
|
|
110
|
+
if (process.platform !== "win32") {
|
|
111
|
+
return process.env.TERM !== "linux";
|
|
112
|
+
}
|
|
113
|
+
return Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
114
|
+
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
115
|
+
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
116
|
+
process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
120
|
+
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
121
|
+
var CONSOLE_ICONS = {
|
|
122
|
+
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
123
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
124
|
+
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
125
|
+
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
126
|
+
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
127
|
+
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
128
|
+
[LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
|
|
129
|
+
[LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// ../config-tools/src/logger/format-timestamp.ts
|
|
133
|
+
init_esm_shims();
|
|
134
|
+
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
135
|
+
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// ../config-tools/src/logger/get-log-level.ts
|
|
139
|
+
init_esm_shims();
|
|
140
|
+
var getLogLevel = (label) => {
|
|
141
|
+
switch (label) {
|
|
142
|
+
case "all":
|
|
143
|
+
return LogLevel.ALL;
|
|
144
|
+
case "trace":
|
|
145
|
+
return LogLevel.TRACE;
|
|
146
|
+
case "debug":
|
|
147
|
+
return LogLevel.DEBUG;
|
|
148
|
+
case "info":
|
|
149
|
+
return LogLevel.INFO;
|
|
150
|
+
case "warn":
|
|
151
|
+
return LogLevel.WARN;
|
|
152
|
+
case "error":
|
|
153
|
+
return LogLevel.ERROR;
|
|
154
|
+
case "fatal":
|
|
155
|
+
return LogLevel.FATAL;
|
|
156
|
+
case "silent":
|
|
157
|
+
return LogLevel.SILENT;
|
|
158
|
+
default:
|
|
159
|
+
return LogLevel.INFO;
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
163
|
+
if (logLevel >= LogLevel.ALL) {
|
|
164
|
+
return LogLevelLabel.ALL;
|
|
165
|
+
}
|
|
166
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
167
|
+
return LogLevelLabel.TRACE;
|
|
168
|
+
}
|
|
169
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
170
|
+
return LogLevelLabel.DEBUG;
|
|
171
|
+
}
|
|
172
|
+
if (logLevel >= LogLevel.INFO) {
|
|
173
|
+
return LogLevelLabel.INFO;
|
|
174
|
+
}
|
|
175
|
+
if (logLevel >= LogLevel.WARN) {
|
|
176
|
+
return LogLevelLabel.WARN;
|
|
177
|
+
}
|
|
178
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
179
|
+
return LogLevelLabel.ERROR;
|
|
180
|
+
}
|
|
181
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
182
|
+
return LogLevelLabel.FATAL;
|
|
183
|
+
}
|
|
184
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
185
|
+
return LogLevelLabel.SILENT;
|
|
186
|
+
}
|
|
187
|
+
return LogLevelLabel.INFO;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// ../config-tools/src/logger/console.ts
|
|
191
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
192
|
+
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
193
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
194
|
+
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
195
|
+
return (_) => {
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
199
|
+
return (message) => {
|
|
200
|
+
console.error(
|
|
201
|
+
`
|
|
202
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
203
|
+
`
|
|
204
|
+
);
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
208
|
+
return (message) => {
|
|
209
|
+
console.error(
|
|
210
|
+
`
|
|
211
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
212
|
+
`
|
|
213
|
+
);
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
217
|
+
return (message) => {
|
|
218
|
+
console.warn(
|
|
219
|
+
`
|
|
220
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
221
|
+
`
|
|
222
|
+
);
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
226
|
+
return (message) => {
|
|
227
|
+
console.info(
|
|
228
|
+
`
|
|
229
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
230
|
+
`
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
235
|
+
return (message) => {
|
|
236
|
+
console.info(
|
|
237
|
+
`
|
|
238
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
239
|
+
`
|
|
240
|
+
);
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
244
|
+
return (message) => {
|
|
245
|
+
console.debug(
|
|
246
|
+
`
|
|
247
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
248
|
+
`
|
|
249
|
+
);
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
253
|
+
return (message) => {
|
|
254
|
+
console.debug(
|
|
255
|
+
`
|
|
256
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
257
|
+
`
|
|
258
|
+
);
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
return (message) => {
|
|
262
|
+
console.log(
|
|
263
|
+
`
|
|
264
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
265
|
+
`
|
|
266
|
+
);
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
|
|
270
|
+
var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
271
|
+
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
272
|
+
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
273
|
+
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
274
|
+
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
275
|
+
var getStopwatch = (name) => {
|
|
276
|
+
const start = process.hrtime();
|
|
277
|
+
return () => {
|
|
278
|
+
const end = process.hrtime(start);
|
|
279
|
+
console.info(
|
|
280
|
+
`
|
|
281
|
+
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
282
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
283
|
+
)}ms to complete
|
|
284
|
+
`
|
|
285
|
+
);
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
var MAX_DEPTH = 4;
|
|
289
|
+
var formatLogMessage = (message, options = {}, depth = 0) => {
|
|
290
|
+
if (depth > MAX_DEPTH) {
|
|
291
|
+
return "<max depth>";
|
|
292
|
+
}
|
|
293
|
+
const prefix = options.prefix ?? "-";
|
|
294
|
+
const skip = options.skip ?? [];
|
|
295
|
+
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
296
|
+
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
297
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
298
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
|
|
299
|
+
message[key],
|
|
300
|
+
{ prefix: `${prefix}-`, skip },
|
|
301
|
+
depth + 1
|
|
302
|
+
) : message[key]}`
|
|
303
|
+
).join("\n")}` : message;
|
|
304
|
+
};
|
|
305
|
+
var _isFunction = (value) => {
|
|
306
|
+
try {
|
|
307
|
+
return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
|
|
308
|
+
} catch {
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export {
|
|
314
|
+
LogLevel,
|
|
315
|
+
getLogLevel,
|
|
316
|
+
getLogLevelLabel,
|
|
317
|
+
writeFatal,
|
|
318
|
+
writeError,
|
|
319
|
+
writeWarning,
|
|
320
|
+
writeSuccess,
|
|
321
|
+
writeDebug,
|
|
322
|
+
writeTrace,
|
|
323
|
+
getStopwatch,
|
|
324
|
+
formatLogMessage
|
|
325
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkSOB2SZPDcjs = require('./chunk-SOB2SZPD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -75,10 +75,10 @@ var depsCheckPlugin = (bundle) => ({
|
|
|
75
75
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
76
76
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
77
77
|
});
|
|
78
|
-
|
|
78
|
+
_chunkSOB2SZPDcjs.writeWarning.call(void 0,
|
|
79
79
|
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
80
80
|
);
|
|
81
|
-
|
|
81
|
+
_chunkSOB2SZPDcjs.writeError.call(void 0,
|
|
82
82
|
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
83
83
|
);
|
|
84
84
|
if (filteredMissingDeps.length > 0) {
|