@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
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
depsCheckPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UK6WDL5V.js";
|
|
4
4
|
import {
|
|
5
5
|
copyBuildAssets
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KX7KPO7S.js";
|
|
7
7
|
import {
|
|
8
8
|
cleanDirectories
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NMZ7BF3X.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RM2PYDML.js";
|
|
13
13
|
import {
|
|
14
14
|
generatePackageJson
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ADBXIH6V.js";
|
|
16
16
|
import {
|
|
17
17
|
executeTsup
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3FBWVPJW.js";
|
|
19
19
|
import {
|
|
20
20
|
getStopwatch,
|
|
21
21
|
writeDebug,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
writeFatal,
|
|
24
24
|
writeSuccess,
|
|
25
25
|
writeWarning
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-BQT3OVTI.js";
|
|
27
27
|
import {
|
|
28
28
|
init_esm_shims
|
|
29
29
|
} from "./chunk-RJEZSH2W.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_BUILD_OPTIONS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3GCNEVK7.js";
|
|
4
4
|
import {
|
|
5
5
|
getEnv,
|
|
6
6
|
getWorkspaceConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R7KP6WNL.js";
|
|
8
|
+
import {
|
|
9
|
+
joinPaths
|
|
10
|
+
} from "./chunk-6RS6PUM7.js";
|
|
8
11
|
import {
|
|
9
12
|
formatLogMessage,
|
|
10
13
|
getStopwatch,
|
|
11
14
|
writeDebug
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
joinPaths
|
|
15
|
-
} from "./chunk-6RS6PUM7.js";
|
|
15
|
+
} from "./chunk-BQT3OVTI.js";
|
|
16
16
|
import {
|
|
17
17
|
init_esm_shims
|
|
18
18
|
} from "./chunk-RJEZSH2W.js";
|
|
@@ -0,0 +1,325 @@
|
|
|
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(); } } 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
|
+
|
|
3
|
+
var _chunkDRSI5NMScjs = require('./chunk-DRSI5NMS.cjs');
|
|
4
|
+
|
|
5
|
+
// ../config-tools/src/logger/console.ts
|
|
6
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
7
|
+
|
|
8
|
+
// ../config-tools/src/types.ts
|
|
9
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
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
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
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
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
72
|
+
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
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 = _chalk3.default;
|
|
98
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.white])) {
|
|
99
|
+
_chalk = chalkDefault;
|
|
100
|
+
}
|
|
101
|
+
return _chalk;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
105
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
106
|
+
|
|
107
|
+
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
108
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
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
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
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
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
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 = !_optionalChain([config, 'access', _8 => _8.colors, 'optionalAccess', _9 => _9.dark]) && !_optionalChain([config, 'access', _10 => _10.colors, 'optionalAccess', _11 => _11["base"]]) && !_optionalChain([config, 'access', _12 => _12.colors, 'optionalAccess', _13 => _13["base"], 'optionalAccess', _14 => _14.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _17 => _17.colors, 'optionalAccess', _18 => _18["base"], 'optionalAccess', _19 => _19.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"]]) ? _optionalChain([config, 'access', _22 => _22.colors, 'optionalAccess', _23 => _23["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(_nullishCoalesce(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(_nullishCoalesce(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(_nullishCoalesce(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(_nullishCoalesce(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(_nullishCoalesce(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(_nullishCoalesce(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(_nullishCoalesce(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(_nullishCoalesce(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 = _nullishCoalesce(options.prefix, () => ( "-"));
|
|
294
|
+
const skip = _nullishCoalesce(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" || !!(_optionalChain([value, 'optionalAccess', _24 => _24.constructor]) && _optionalChain([value, 'optionalAccess', _25 => _25.call]) && _optionalChain([value, 'optionalAccess', _26 => _26.apply]));
|
|
308
|
+
} catch (e) {
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
exports.LogLevel = LogLevel; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard2(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce2(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain2(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; } var _class2;
|
|
2
2
|
|
|
3
|
+
var _chunkM37UEA6Vcjs = require('./chunk-M37UEA6V.cjs');
|
|
3
4
|
|
|
4
|
-
var _chunk4PYGUUI5cjs = require('./chunk-4PYGUUI5.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkSOB2SZPDcjs = require('./chunk-SOB2SZPD.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -2668,11 +2668,11 @@ module.exports = exports.default;
|
|
|
2668
2668
|
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
2669
2669
|
var import_tsup = _chunkDRSI5NMScjs.__toESM.call(void 0, require_dist(), 1);
|
|
2670
2670
|
async function executeTsup(context) {
|
|
2671
|
-
|
|
2671
|
+
_chunkSOB2SZPDcjs.writeDebug.call(void 0,
|
|
2672
2672
|
` \u{1F680} Running ${context.options.name} build`,
|
|
2673
2673
|
context.workspaceConfig
|
|
2674
2674
|
);
|
|
2675
|
-
const stopwatch =
|
|
2675
|
+
const stopwatch = _chunkSOB2SZPDcjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
2676
2676
|
await (0, import_tsup.build)({
|
|
2677
2677
|
...context.options,
|
|
2678
2678
|
outDir: context.options.distDir ? _chunkM37UEA6Vcjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkGA67YJGQcjs = require('./chunk-GA67YJGQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkM37UEA6Vcjs = require('./chunk-M37UEA6V.cjs');
|
|
7
8
|
|
|
8
|
-
var _chunk4PYGUUI5cjs = require('./chunk-4PYGUUI5.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkSOB2SZPDcjs = require('./chunk-SOB2SZPD.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkDRSI5NMScjs = require('./chunk-DRSI5NMS.cjs');
|
|
@@ -20,8 +20,8 @@ var _fs = require('fs');
|
|
|
20
20
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
21
21
|
async function generatePackageJson(context) {
|
|
22
22
|
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkM37UEA6Vcjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
23
|
-
|
|
24
|
-
const stopwatch =
|
|
23
|
+
_chunkSOB2SZPDcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
24
|
+
const stopwatch = _chunkSOB2SZPDcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
25
25
|
const packageJsonPath = _chunkM37UEA6Vcjs.joinPaths.call(void 0,
|
|
26
26
|
context.options.projectRoot,
|
|
27
27
|
"project.json"
|
|
@@ -41,13 +41,13 @@ async function generatePackageJson(context) {
|
|
|
41
41
|
if (!packageJson) {
|
|
42
42
|
throw new Error("Cannot find package.json configuration file");
|
|
43
43
|
}
|
|
44
|
-
packageJson = await
|
|
44
|
+
packageJson = await _chunkGA67YJGQcjs.addPackageDependencies.call(void 0,
|
|
45
45
|
context.workspaceConfig.workspaceRoot,
|
|
46
46
|
context.options.projectRoot,
|
|
47
47
|
context.projectName,
|
|
48
48
|
packageJson
|
|
49
49
|
);
|
|
50
|
-
packageJson = await
|
|
50
|
+
packageJson = await _chunkGA67YJGQcjs.addWorkspacePackageJsonFields.call(void 0,
|
|
51
51
|
context.workspaceConfig,
|
|
52
52
|
context.options.projectRoot,
|
|
53
53
|
context.sourceRoot,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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 _chunkFJYBNKEXcjs = require('./chunk-FJYBNKEX.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkA6NQIRGScjs = require('./chunk-A6NQIRGS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkLBZ4HJFBcjs = require('./chunk-LBZ4HJFB.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkXUAZ6AMAcjs = require('./chunk-XUAZ6AMA.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkVMZTU5MHcjs = require('./chunk-VMZTU5MH.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkULU7VZRKcjs = require('./chunk-ULU7VZRK.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -23,7 +23,7 @@ var _chunkLAH6PYTDcjs = require('./chunk-LAH6PYTD.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkSOB2SZPDcjs = require('./chunk-SOB2SZPD.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkDRSI5NMScjs = require('./chunk-DRSI5NMS.cjs');
|
|
@@ -35,17 +35,17 @@ var _globby = require('globby');
|
|
|
35
35
|
async function reportResults(context) {
|
|
36
36
|
if (_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) === 0) {
|
|
37
37
|
if (context.result.warnings.length > 0) {
|
|
38
|
-
|
|
38
|
+
_chunkSOB2SZPDcjs.writeWarning.call(void 0,
|
|
39
39
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
40
40
|
context.workspaceConfig
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
_chunkSOB2SZPDcjs.writeSuccess.call(void 0,
|
|
44
44
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
45
45
|
context.workspaceConfig
|
|
46
46
|
);
|
|
47
47
|
} else if (_optionalChain([context, 'access', _4 => _4.result, 'optionalAccess', _5 => _5.errors]) && _optionalChain([context, 'access', _6 => _6.result, 'optionalAccess', _7 => _7.errors, 'access', _8 => _8.length]) > 0) {
|
|
48
|
-
|
|
48
|
+
_chunkSOB2SZPDcjs.writeError.call(void 0,
|
|
49
49
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
50
50
|
context.workspaceConfig
|
|
51
51
|
);
|
|
@@ -74,7 +74,7 @@ async function dependencyCheck(options) {
|
|
|
74
74
|
write: false,
|
|
75
75
|
// no need to write for analysis
|
|
76
76
|
outdir: "out",
|
|
77
|
-
plugins: [
|
|
77
|
+
plugins: [_chunkFJYBNKEXcjs.depsCheckPlugin.call(void 0, options.bundle)]
|
|
78
78
|
});
|
|
79
79
|
await buildPromise.catch(() => {
|
|
80
80
|
});
|
|
@@ -82,36 +82,36 @@ async function dependencyCheck(options) {
|
|
|
82
82
|
}
|
|
83
83
|
async function cleanOutputPath(context) {
|
|
84
84
|
if (context.clean !== false && context.outputPath) {
|
|
85
|
-
|
|
85
|
+
_chunkSOB2SZPDcjs.writeDebug.call(void 0,
|
|
86
86
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
87
87
|
context.workspaceConfig
|
|
88
88
|
);
|
|
89
|
-
const stopwatch =
|
|
90
|
-
await
|
|
89
|
+
const stopwatch = _chunkSOB2SZPDcjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
90
|
+
await _chunkLBZ4HJFBcjs.cleanDirectories.call(void 0, context.outputPath);
|
|
91
91
|
stopwatch();
|
|
92
92
|
}
|
|
93
93
|
return context;
|
|
94
94
|
}
|
|
95
95
|
async function build2(options) {
|
|
96
|
-
|
|
97
|
-
const stopwatch =
|
|
96
|
+
_chunkSOB2SZPDcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
97
|
+
const stopwatch = _chunkSOB2SZPDcjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
98
98
|
try {
|
|
99
99
|
const opts = Array.isArray(options) ? options : [options];
|
|
100
100
|
if (opts.length === 0) {
|
|
101
101
|
throw new Error("No build options were provided");
|
|
102
102
|
}
|
|
103
|
-
const context = await
|
|
103
|
+
const context = await _chunkXUAZ6AMAcjs.resolveContext.call(void 0, options);
|
|
104
104
|
await cleanOutputPath(context);
|
|
105
105
|
await Promise.all([
|
|
106
106
|
dependencyCheck(context.options),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
_chunkVMZTU5MHcjs.generatePackageJson.call(void 0, context),
|
|
108
|
+
_chunkA6NQIRGScjs.copyBuildAssets.call(void 0, context),
|
|
109
|
+
_chunkULU7VZRKcjs.executeTsup.call(void 0, context)
|
|
110
110
|
]);
|
|
111
111
|
await reportResults(context);
|
|
112
|
-
|
|
112
|
+
_chunkSOB2SZPDcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
113
113
|
} catch (error) {
|
|
114
|
-
|
|
114
|
+
_chunkSOB2SZPDcjs.writeFatal.call(void 0,
|
|
115
115
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
116
116
|
);
|
|
117
117
|
throw error;
|
|
@@ -1,18 +1,18 @@
|
|
|
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(); } } 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 _chunkO5JRHLWQcjs = require('./chunk-O5JRHLWQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkGA67YJGQcjs = require('./chunk-GA67YJGQ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
var _chunkM37UEA6Vcjs = require('./chunk-M37UEA6V.cjs');
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
var _chunk4PYGUUI5cjs = require('./chunk-4PYGUUI5.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkSOB2SZPDcjs = require('./chunk-SOB2SZPD.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkDRSI5NMScjs = require('./chunk-DRSI5NMS.cjs');
|
|
@@ -33,11 +33,11 @@ async function resolveContext(userOptions) {
|
|
|
33
33
|
if (!workspaceRoot) {
|
|
34
34
|
throw new Error("Cannot find Nx workspace root");
|
|
35
35
|
}
|
|
36
|
-
const workspaceConfig = await
|
|
36
|
+
const workspaceConfig = await _chunkGA67YJGQcjs.getWorkspaceConfig.call(void 0, true, {
|
|
37
37
|
workspaceRoot: workspaceRoot.dir
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
const stopwatch =
|
|
39
|
+
_chunkSOB2SZPDcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
40
|
+
const stopwatch = _chunkSOB2SZPDcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
41
41
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
42
42
|
exitOnError: true
|
|
43
43
|
});
|
|
@@ -58,7 +58,7 @@ async function resolveContext(userOptions) {
|
|
|
58
58
|
"The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
61
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkO5JRHLWQcjs.DEFAULT_BUILD_OPTIONS);
|
|
62
62
|
options.name ??= projectName;
|
|
63
63
|
const packageJsonPath = _chunkM37UEA6Vcjs.joinPaths.call(void 0,
|
|
64
64
|
workspaceRoot.dir,
|
|
@@ -68,7 +68,7 @@ async function resolveContext(userOptions) {
|
|
|
68
68
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
69
69
|
throw new Error("Cannot find package.json configuration");
|
|
70
70
|
}
|
|
71
|
-
const env =
|
|
71
|
+
const env = _chunkGA67YJGQcjs.getEnv.call(void 0, "esbuild", options);
|
|
72
72
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
73
73
|
const resolvedOptions = {
|
|
74
74
|
...options,
|
|
@@ -107,10 +107,10 @@ async function resolveContext(userOptions) {
|
|
|
107
107
|
};
|
|
108
108
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
109
109
|
if (context.options.verbose) {
|
|
110
|
-
|
|
110
|
+
_chunkSOB2SZPDcjs.writeDebug.call(void 0,
|
|
111
111
|
` \u2699\uFE0F Build options resolved:
|
|
112
112
|
|
|
113
|
-
${
|
|
113
|
+
${_chunkSOB2SZPDcjs.formatLogMessage.call(void 0, context.options)}`,
|
|
114
114
|
workspaceConfig
|
|
115
115
|
);
|
|
116
116
|
}
|
package/dist/clean.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-M37UEA6V.cjs');
|
|
4
|
+
var _chunkLBZ4HJFBcjs = require('./chunk-LBZ4HJFB.cjs');
|
|
5
|
+
require('./chunk-SOB2SZPD.cjs');
|
|
7
6
|
require('./chunk-DRSI5NMS.cjs');
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
|
|
11
|
-
exports.clean =
|
|
10
|
+
exports.clean = _chunkLBZ4HJFBcjs.clean; exports.cleanDirectories = _chunkLBZ4HJFBcjs.cleanDirectories;
|