@storm-software/unbuild 0.33.10 → 0.34.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 -1
- package/bin/unbuild.cjs +33 -1467
- package/bin/unbuild.js +34 -1464
- package/dist/build.cjs +10 -10
- package/dist/build.js +1 -1
- package/dist/{chunk-SHHAZOHN.cjs → chunk-BDHZY5E7.cjs} +2 -2
- package/dist/chunk-BGYQAVKQ.cjs +13 -0
- package/dist/{chunk-FSQI7UVH.cjs → chunk-ELBNF3ZV.cjs} +5 -5
- package/dist/chunk-FYU6QKHN.cjs +1087 -0
- package/dist/chunk-HBOCJ3VS.cjs +27 -0
- package/dist/{chunk-TXZ34CR4.cjs → chunk-I7SGCUR4.cjs} +6 -6
- package/dist/{chunk-36DXI2BP.cjs → chunk-LFUHP3V6.cjs} +37 -37
- package/dist/{chunk-ZPOKDFLY.cjs → chunk-Y3FGYCTG.cjs} +5 -5
- package/dist/chunk-ZGZI67KX.js +1087 -0
- package/dist/{chunk-7JMYS6DV.cjs → chunk-ZYPPSI2Q.cjs} +6 -6
- package/dist/clean.cjs +4 -4
- package/dist/config.cjs +8 -8
- package/dist/index.cjs +10 -10
- package/dist/index.js +1 -1
- package/dist/plugins/analyze.cjs +4 -4
- package/dist/plugins/on-error.cjs +4 -4
- package/dist/plugins/swc.cjs +3 -3
- package/dist/plugins/tsc.cjs +4 -4
- package/dist/plugins/type-definitions.cjs +3 -3
- package/dist/types.cjs +0 -1
- package/package.json +4 -6
- package/dist/chunk-AK65ISF4.cjs +0 -27
- package/dist/chunk-FGTLL4QO.js +0 -2519
- package/dist/chunk-XXT4GSHP.cjs +0 -2520
- package/dist/chunk-YDYGZTJK.cjs +0 -18
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkZYPPSI2Qcjs = require('./chunk-ZYPPSI2Q.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkBDHZY5E7cjs = require('./chunk-BDHZY5E7.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkY3FGYCTGcjs = require('./chunk-Y3FGYCTG.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkELBNF3ZVcjs = require('./chunk-ELBNF3ZV.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
16
|
+
|
|
17
|
+
// src/config.ts
|
|
18
|
+
var getDefaultBuildPlugins = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (options, resolvedOptions) => Promise.all([
|
|
19
|
+
_chunkY3FGYCTGcjs.analyzePlugin.call(void 0, options, resolvedOptions),
|
|
20
|
+
_chunkBDHZY5E7cjs.typeDefinitions.call(void 0, resolvedOptions.projectRoot),
|
|
21
|
+
_chunkZYPPSI2Qcjs.tscPlugin.call(void 0, options, resolvedOptions),
|
|
22
|
+
_chunkELBNF3ZVcjs.onErrorPlugin.call(void 0, options, resolvedOptions)
|
|
23
|
+
].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
exports.getDefaultBuildPlugins = getDefaultBuildPlugins;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkLFUHP3V6cjs = require('./chunk-LFUHP3V6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
8
8
|
|
|
9
9
|
// src/clean.ts
|
|
10
10
|
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "Unbuild", directory, config) {
|
|
12
|
-
|
|
13
|
-
const stopwatch =
|
|
12
|
+
_chunkLFUHP3V6cjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunkLFUHP3V6cjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, clean, "clean");
|
|
18
18
|
async function cleanDirectories(name = "Unbuild", directory, config) {
|
|
19
19
|
await _promises.rm.call(void 0, directory, {
|
|
20
20
|
recursive: true,
|
|
21
21
|
force: true
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
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 _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
4
4
|
|
|
5
5
|
// ../config-tools/src/types.ts
|
|
6
6
|
var LogLevel = {
|
|
@@ -28,10 +28,10 @@ var LogLevelLabel = {
|
|
|
28
28
|
|
|
29
29
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
30
30
|
var _path = require('path');
|
|
31
|
-
var removeWindowsDriveLetter = /* @__PURE__ */
|
|
31
|
+
var removeWindowsDriveLetter = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (osSpecificPath) => {
|
|
32
32
|
return osSpecificPath.replace(/^[A-Z]:/, "");
|
|
33
33
|
}, "removeWindowsDriveLetter");
|
|
34
|
-
var correctPaths = /* @__PURE__ */
|
|
34
|
+
var correctPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (path) => {
|
|
35
35
|
if (!path) {
|
|
36
36
|
return "";
|
|
37
37
|
}
|
|
@@ -43,7 +43,7 @@ var correctPaths = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (path)
|
|
|
43
43
|
}
|
|
44
44
|
return removeWindowsDriveLetter(path).split("\\").join("/");
|
|
45
45
|
}, "correctPaths");
|
|
46
|
-
var joinPaths = /* @__PURE__ */
|
|
46
|
+
var joinPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (...paths) => {
|
|
47
47
|
if (!paths || paths.length === 0) {
|
|
48
48
|
return "";
|
|
49
49
|
}
|
|
@@ -51,7 +51,7 @@ var joinPaths = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (...paths)
|
|
|
51
51
|
}, "joinPaths");
|
|
52
52
|
|
|
53
53
|
// ../config-tools/src/logger/get-log-level.ts
|
|
54
|
-
var getLogLevel = /* @__PURE__ */
|
|
54
|
+
var getLogLevel = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (label) => {
|
|
55
55
|
switch (label) {
|
|
56
56
|
case "all":
|
|
57
57
|
return LogLevel.ALL;
|
|
@@ -73,7 +73,7 @@ var getLogLevel = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (label)
|
|
|
73
73
|
return LogLevel.INFO;
|
|
74
74
|
}
|
|
75
75
|
}, "getLogLevel");
|
|
76
|
-
var getLogLevelLabel = /* @__PURE__ */
|
|
76
|
+
var getLogLevelLabel = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
|
|
77
77
|
if (logLevel >= LogLevel.ALL) {
|
|
78
78
|
return LogLevelLabel.ALL;
|
|
79
79
|
}
|
|
@@ -100,7 +100,7 @@ var getLogLevelLabel = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (lo
|
|
|
100
100
|
}
|
|
101
101
|
return LogLevelLabel.INFO;
|
|
102
102
|
}, "getLogLevelLabel");
|
|
103
|
-
var isVerbose = /* @__PURE__ */
|
|
103
|
+
var isVerbose = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
|
|
104
104
|
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
105
105
|
return logLevel >= LogLevel.DEBUG;
|
|
106
106
|
}, "isVerbose");
|
|
@@ -297,7 +297,7 @@ function findFolderUp(startPath, endFileNames) {
|
|
|
297
297
|
}
|
|
298
298
|
return void 0;
|
|
299
299
|
}
|
|
300
|
-
|
|
300
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
301
301
|
|
|
302
302
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
303
303
|
var rootFiles = [
|
|
@@ -341,7 +341,7 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
|
341
341
|
}
|
|
342
342
|
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
|
|
343
343
|
}
|
|
344
|
-
|
|
344
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
345
345
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
346
346
|
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
347
347
|
if (!result) {
|
|
@@ -351,7 +351,7 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
|
351
351
|
}
|
|
352
352
|
return result;
|
|
353
353
|
}
|
|
354
|
-
|
|
354
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
|
|
355
355
|
|
|
356
356
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
357
357
|
var DEFAULT_COLOR_CONFIG = {
|
|
@@ -382,7 +382,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
382
382
|
"negative": "#dc2626"
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
|
-
var getDefaultConfig = /* @__PURE__ */
|
|
385
|
+
var getDefaultConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (root) => {
|
|
386
386
|
let license = STORM_DEFAULT_LICENSE;
|
|
387
387
|
let homepage = STORM_DEFAULT_HOMEPAGE;
|
|
388
388
|
let name = void 0;
|
|
@@ -429,25 +429,25 @@ var getDefaultConfig = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, asy
|
|
|
429
429
|
// ../config-tools/src/logger/chalk.ts
|
|
430
430
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
431
431
|
var chalkDefault = {
|
|
432
|
-
hex: /* @__PURE__ */
|
|
433
|
-
bgHex: /* @__PURE__ */
|
|
434
|
-
whiteBright: /* @__PURE__ */
|
|
432
|
+
hex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
433
|
+
bgHex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => ({
|
|
434
|
+
whiteBright: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
435
435
|
}), "bgHex"),
|
|
436
|
-
whiteBright: /* @__PURE__ */
|
|
437
|
-
gray: /* @__PURE__ */
|
|
436
|
+
whiteBright: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "whiteBright"),
|
|
437
|
+
gray: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "gray"),
|
|
438
438
|
bold: {
|
|
439
|
-
hex: /* @__PURE__ */
|
|
440
|
-
bgHex: /* @__PURE__ */
|
|
441
|
-
whiteBright: /* @__PURE__ */
|
|
439
|
+
hex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
440
|
+
bgHex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => ({
|
|
441
|
+
whiteBright: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
442
442
|
}), "bgHex"),
|
|
443
|
-
whiteBright: /* @__PURE__ */
|
|
443
|
+
whiteBright: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "whiteBright")
|
|
444
444
|
},
|
|
445
445
|
dim: {
|
|
446
|
-
hex: /* @__PURE__ */
|
|
447
|
-
gray: /* @__PURE__ */
|
|
446
|
+
hex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => (message) => message, "hex"),
|
|
447
|
+
gray: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "gray")
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
|
-
var getChalk = /* @__PURE__ */
|
|
450
|
+
var getChalk = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
451
451
|
let _chalk = _chalk3.default;
|
|
452
452
|
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])) {
|
|
453
453
|
_chalk = chalkDefault;
|
|
@@ -468,10 +468,10 @@ function isUnicodeSupported() {
|
|
|
468
468
|
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
469
469
|
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
470
470
|
}
|
|
471
|
-
|
|
471
|
+
_chunkBGYQAVKQcjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
|
|
472
472
|
|
|
473
473
|
// ../config-tools/src/logger/console-icons.ts
|
|
474
|
-
var useIcon = /* @__PURE__ */
|
|
474
|
+
var useIcon = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
|
|
475
475
|
var CONSOLE_ICONS = {
|
|
476
476
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
477
477
|
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
@@ -484,12 +484,12 @@ var CONSOLE_ICONS = {
|
|
|
484
484
|
};
|
|
485
485
|
|
|
486
486
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
487
|
-
var formatTimestamp = /* @__PURE__ */
|
|
487
|
+
var formatTimestamp = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (date = /* @__PURE__ */ new Date()) => {
|
|
488
488
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
489
489
|
}, "formatTimestamp");
|
|
490
490
|
|
|
491
491
|
// ../config-tools/src/logger/console.ts
|
|
492
|
-
var getLogFn = /* @__PURE__ */
|
|
492
|
+
var getLogFn = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
493
493
|
const colors = !_optionalChain([config, 'access', _7 => _7.colors, 'optionalAccess', _8 => _8.dark]) && !_optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10["base"]]) && !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20["base"]]) ? _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
494
494
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
495
495
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
@@ -551,14 +551,14 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, ()
|
|
|
551
551
|
`);
|
|
552
552
|
};
|
|
553
553
|
}, "getLogFn");
|
|
554
|
-
var writeFatal = /* @__PURE__ */
|
|
555
|
-
var writeError = /* @__PURE__ */
|
|
556
|
-
var writeWarning = /* @__PURE__ */
|
|
557
|
-
var writeInfo = /* @__PURE__ */
|
|
558
|
-
var writeSuccess = /* @__PURE__ */
|
|
559
|
-
var writeDebug = /* @__PURE__ */
|
|
560
|
-
var writeTrace = /* @__PURE__ */
|
|
561
|
-
var getStopwatch = /* @__PURE__ */
|
|
554
|
+
var writeFatal = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.FATAL, config)(message), "writeFatal");
|
|
555
|
+
var writeError = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
|
|
556
|
+
var writeWarning = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.WARN, config)(message), "writeWarning");
|
|
557
|
+
var writeInfo = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
|
|
558
|
+
var writeSuccess = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
|
|
559
|
+
var writeDebug = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
|
|
560
|
+
var writeTrace = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
|
|
561
|
+
var getStopwatch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (name) => {
|
|
562
562
|
const start = process.hrtime();
|
|
563
563
|
return () => {
|
|
564
564
|
const end = process.hrtime(start);
|
|
@@ -569,7 +569,7 @@ var getStopwatch = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (name)
|
|
|
569
569
|
};
|
|
570
570
|
}, "getStopwatch");
|
|
571
571
|
var MAX_DEPTH = 4;
|
|
572
|
-
var formatLogMessage = /* @__PURE__ */
|
|
572
|
+
var formatLogMessage = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, options = {}, depth2 = 0) => {
|
|
573
573
|
if (depth2 > MAX_DEPTH) {
|
|
574
574
|
return "<max depth>";
|
|
575
575
|
}
|
|
@@ -585,7 +585,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
|
|
|
585
585
|
skip
|
|
586
586
|
}, depth2 + 1) : message[key]}`).join("\n")}` : message;
|
|
587
587
|
}, "formatLogMessage");
|
|
588
|
-
var _isFunction = /* @__PURE__ */
|
|
588
|
+
var _isFunction = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (value) => {
|
|
589
589
|
try {
|
|
590
590
|
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _23 => _23.constructor]) && _optionalChain([value, 'optionalAccess', _24 => _24.call]) && _optionalChain([value, 'optionalAccess', _25 => _25.apply]));
|
|
591
591
|
} catch (e) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLFUHP3V6cjs = require('./chunk-LFUHP3V6.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
7
7
|
|
|
8
8
|
// src/plugins/analyze.ts
|
|
9
|
-
var formatBytes = /* @__PURE__ */
|
|
9
|
+
var formatBytes = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (bytes) => {
|
|
10
10
|
if (bytes === 0) return "0 Byte";
|
|
11
11
|
const k = 1e3;
|
|
12
12
|
const dm = 3;
|
|
@@ -19,13 +19,13 @@ var formatBytes = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, (bytes)
|
|
|
19
19
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
20
20
|
return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
|
|
21
21
|
}, "formatBytes");
|
|
22
|
-
var analyzePlugin = /* @__PURE__ */
|
|
22
|
+
var analyzePlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options, resolvedOptions) => {
|
|
23
23
|
return {
|
|
24
24
|
name: "storm:analyzer",
|
|
25
25
|
renderChunk(source, chunk) {
|
|
26
26
|
const sourceBytes = formatBytes(source.length);
|
|
27
27
|
const fileName = chunk.fileName;
|
|
28
|
-
|
|
28
|
+
_chunkLFUHP3V6cjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
}, "analyzePlugin");
|