@storm-software/unbuild 0.57.122 → 0.57.124
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 +45 -7
- package/bin/unbuild.js +45 -7
- package/dist/build.cjs +7 -7
- package/dist/build.js +6 -6
- package/dist/{chunk-OAAS4DBV.js → chunk-3PJKF6ZP.js} +22 -5
- package/dist/{chunk-4JLDXNBJ.cjs → chunk-6PKNRTLM.cjs} +28 -7
- package/dist/{chunk-MP7F35XB.js → chunk-6VMZE64H.js} +1 -1
- package/dist/{chunk-DMPZZURO.cjs → chunk-DP7FKNIK.cjs} +61 -44
- package/dist/{chunk-QBYN6PPG.cjs → chunk-HNSD65O7.cjs} +2 -2
- package/dist/{chunk-TG5I2FBM.cjs → chunk-JEBUPO36.cjs} +3 -3
- package/dist/{chunk-SPLRBIEF.js → chunk-KY6IV76L.js} +1 -1
- package/dist/{chunk-VLD5OGAM.cjs → chunk-MESRFRXL.cjs} +3 -3
- package/dist/{chunk-EBOFHDEY.js → chunk-NO2X3EYN.js} +1 -1
- package/dist/{chunk-2XFE5FGC.cjs → chunk-O4BT7W6M.cjs} +2 -2
- package/dist/{chunk-5GMXZVPB.js → chunk-UWBAXJIB.js} +28 -7
- package/dist/{chunk-MEKNH4KG.js → chunk-XX3JA7ON.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/plugins/analyze.cjs +3 -3
- package/dist/plugins/analyze.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.js +2 -2
- package/package.json +5 -5
|
@@ -1,16 +1,16 @@
|
|
|
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 _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 _chunkJEBUPO36cjs = require('./chunk-JEBUPO36.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkO4BT7W6Mcjs = require('./chunk-O4BT7W6M.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkMESRFRXLcjs = require('./chunk-MESRFRXL.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkHNSD65O7cjs = require('./chunk-HNSD65O7.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ var _chunkQBYN6PPGcjs = require('./chunk-QBYN6PPG.cjs');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunk6PKNRTLMcjs = require('./chunk-6PKNRTLM.cjs');
|
|
29
29
|
|
|
30
30
|
// src/build.ts
|
|
31
31
|
|
|
@@ -206,7 +206,7 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
206
206
|
output: "src/"
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
|
|
209
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0,
|
|
210
210
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
211
211
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
212
212
|
config
|
|
@@ -218,9 +218,9 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
218
218
|
assets: pendingAssets
|
|
219
219
|
});
|
|
220
220
|
await assetHandler.processAllAssetsOnce();
|
|
221
|
-
|
|
221
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
222
222
|
if (includeSrc === true) {
|
|
223
|
-
|
|
223
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0,
|
|
224
224
|
`\u{1F4DD} Adding banner and writing source files: ${joinPaths(
|
|
225
225
|
outputPath,
|
|
226
226
|
"src"
|
|
@@ -399,7 +399,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
if (localPackages.length > 0) {
|
|
402
|
-
|
|
402
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0,
|
|
403
403
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
404
404
|
);
|
|
405
405
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
@@ -447,7 +447,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
447
447
|
return ret;
|
|
448
448
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
449
449
|
} else {
|
|
450
|
-
|
|
450
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
451
451
|
}
|
|
452
452
|
return packageJson;
|
|
453
453
|
};
|
|
@@ -580,6 +580,10 @@ var fatalColorSchema = z.optional(colorSchema);
|
|
|
580
580
|
schemaRegistry.add(fatalColorSchema, {
|
|
581
581
|
description: "The fatal color of the workspace"
|
|
582
582
|
});
|
|
583
|
+
var performanceColorSchema = z._default(colorSchema, "#00ff00");
|
|
584
|
+
schemaRegistry.add(performanceColorSchema, {
|
|
585
|
+
description: "The performance color of the workspace"
|
|
586
|
+
});
|
|
583
587
|
var positiveColorSchema = z._default(colorSchema, "#4ade80");
|
|
584
588
|
schemaRegistry.add(positiveColorSchema, {
|
|
585
589
|
description: "The positive number color of the workspace"
|
|
@@ -606,6 +610,7 @@ var darkColorsSchema = z.object({
|
|
|
606
610
|
warning: warningColorSchema,
|
|
607
611
|
danger: dangerColorSchema,
|
|
608
612
|
fatal: fatalColorSchema,
|
|
613
|
+
performance: performanceColorSchema,
|
|
609
614
|
positive: positiveColorSchema,
|
|
610
615
|
negative: negativeColorSchema,
|
|
611
616
|
gradient: gradientStopsSchema
|
|
@@ -624,6 +629,7 @@ var lightColorsSchema = z.object({
|
|
|
624
629
|
warning: warningColorSchema,
|
|
625
630
|
danger: dangerColorSchema,
|
|
626
631
|
fatal: fatalColorSchema,
|
|
632
|
+
performance: performanceColorSchema,
|
|
627
633
|
positive: positiveColorSchema,
|
|
628
634
|
negative: negativeColorSchema,
|
|
629
635
|
gradient: gradientStopsSchema
|
|
@@ -646,6 +652,7 @@ var singleColorsSchema = z.object({
|
|
|
646
652
|
warning: warningColorSchema,
|
|
647
653
|
danger: dangerColorSchema,
|
|
648
654
|
fatal: fatalColorSchema,
|
|
655
|
+
performance: performanceColorSchema,
|
|
649
656
|
positive: positiveColorSchema,
|
|
650
657
|
negative: negativeColorSchema,
|
|
651
658
|
gradient: gradientStopsSchema
|
|
@@ -1013,6 +1020,7 @@ var logLevelSchema = z._default(
|
|
|
1013
1020
|
"warn",
|
|
1014
1021
|
"success",
|
|
1015
1022
|
"info",
|
|
1023
|
+
"performance",
|
|
1016
1024
|
"debug",
|
|
1017
1025
|
"trace",
|
|
1018
1026
|
"all"
|
|
@@ -1092,6 +1100,7 @@ var COLOR_KEYS = [
|
|
|
1092
1100
|
"warning",
|
|
1093
1101
|
"danger",
|
|
1094
1102
|
"fatal",
|
|
1103
|
+
"performance",
|
|
1095
1104
|
"positive",
|
|
1096
1105
|
"negative"
|
|
1097
1106
|
];
|
|
@@ -1225,7 +1234,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1225
1234
|
let config = result.config;
|
|
1226
1235
|
const configFile = result.configFile;
|
|
1227
1236
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
1228
|
-
|
|
1237
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0,
|
|
1229
1238
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
1230
1239
|
{
|
|
1231
1240
|
logLevel: "all"
|
|
@@ -1241,7 +1250,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1241
1250
|
for (const result2 of results) {
|
|
1242
1251
|
if (_optionalChain([result2, 'optionalAccess', _34 => _34.config]) && _optionalChain([result2, 'optionalAccess', _35 => _35.configFile]) && Object.keys(result2.config).length > 0) {
|
|
1243
1252
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
1244
|
-
|
|
1253
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0,
|
|
1245
1254
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
1246
1255
|
{
|
|
1247
1256
|
logLevel: "all"
|
|
@@ -1357,7 +1366,7 @@ var getConfigEnv = () => {
|
|
|
1357
1366
|
},
|
|
1358
1367
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
1359
1368
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1360
|
-
) ?
|
|
1369
|
+
) ? _chunk6PKNRTLMcjs.getLogLevelLabel.call(void 0,
|
|
1361
1370
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1362
1371
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
1363
1372
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
@@ -1432,6 +1441,7 @@ var getSingleThemeColorsEnv = (prefix) => {
|
|
|
1432
1441
|
warning: process.env[`${prefix}WARNING`],
|
|
1433
1442
|
danger: process.env[`${prefix}DANGER`],
|
|
1434
1443
|
fatal: process.env[`${prefix}FATAL`],
|
|
1444
|
+
performance: process.env[`${prefix}PERFORMANCE`],
|
|
1435
1445
|
positive: process.env[`${prefix}POSITIVE`],
|
|
1436
1446
|
negative: process.env[`${prefix}NEGATIVE`],
|
|
1437
1447
|
gradient
|
|
@@ -1471,6 +1481,7 @@ var getBaseThemeColorsEnv = (prefix) => {
|
|
|
1471
1481
|
warning: process.env[`${prefix}WARNING`],
|
|
1472
1482
|
danger: process.env[`${prefix}DANGER`],
|
|
1473
1483
|
fatal: process.env[`${prefix}FATAL`],
|
|
1484
|
+
performance: process.env[`${prefix}PERFORMANCE`],
|
|
1474
1485
|
positive: process.env[`${prefix}POSITIVE`],
|
|
1475
1486
|
negative: process.env[`${prefix}NEGATIVE`],
|
|
1476
1487
|
gradient
|
|
@@ -1722,9 +1733,9 @@ var setConfigEnv = (config) => {
|
|
|
1722
1733
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1723
1734
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1724
1735
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
1725
|
-
|
|
1736
|
+
_chunk6PKNRTLMcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk6PKNRTLMcjs.LogLevel.DEBUG ? true : false
|
|
1726
1737
|
);
|
|
1727
|
-
process.env.RUST_BACKTRACE =
|
|
1738
|
+
process.env.RUST_BACKTRACE = _chunk6PKNRTLMcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk6PKNRTLMcjs.LogLevel.DEBUG ? "full" : "none";
|
|
1728
1739
|
}
|
|
1729
1740
|
if (config.skipConfigLogging !== void 0) {
|
|
1730
1741
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -1781,6 +1792,9 @@ var setSingleThemeColorsEnv = (prefix, config) => {
|
|
|
1781
1792
|
if (config.fatal) {
|
|
1782
1793
|
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1783
1794
|
}
|
|
1795
|
+
if (config.performance) {
|
|
1796
|
+
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
1797
|
+
}
|
|
1784
1798
|
if (config.positive) {
|
|
1785
1799
|
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1786
1800
|
}
|
|
@@ -1839,6 +1853,9 @@ var setBaseThemeColorsEnv = (prefix, config) => {
|
|
|
1839
1853
|
if (config.fatal) {
|
|
1840
1854
|
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1841
1855
|
}
|
|
1856
|
+
if (config.performance) {
|
|
1857
|
+
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
1858
|
+
}
|
|
1842
1859
|
if (config.positive) {
|
|
1843
1860
|
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1844
1861
|
}
|
|
@@ -1866,7 +1883,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1866
1883
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1867
1884
|
if (!configFile) {
|
|
1868
1885
|
if (!skipLogs) {
|
|
1869
|
-
|
|
1886
|
+
_chunk6PKNRTLMcjs.writeWarning.call(void 0,
|
|
1870
1887
|
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
1871
1888
|
{ logLevel: "all" }
|
|
1872
1889
|
);
|
|
@@ -1893,7 +1910,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1893
1910
|
throw new Error(
|
|
1894
1911
|
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _60 => _60.message]) ? `: ${error.message}` : ""}
|
|
1895
1912
|
|
|
1896
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
1913
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunk6PKNRTLMcjs.formatLogMessage.call(void 0,
|
|
1897
1914
|
configInput
|
|
1898
1915
|
)}`,
|
|
1899
1916
|
{
|
|
@@ -1938,9 +1955,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
1938
1955
|
);
|
|
1939
1956
|
setConfigEnv(config);
|
|
1940
1957
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1941
|
-
|
|
1958
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0,
|
|
1942
1959
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1943
|
-
${
|
|
1960
|
+
${_chunk6PKNRTLMcjs.formatLogMessage.call(void 0, config)}`,
|
|
1944
1961
|
config
|
|
1945
1962
|
);
|
|
1946
1963
|
}
|
|
@@ -1976,10 +1993,10 @@ var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
|
1976
1993
|
|
|
1977
1994
|
var _unbuild = require('unbuild');
|
|
1978
1995
|
async function resolveOptions(options, config) {
|
|
1979
|
-
|
|
1980
|
-
const stopwatch =
|
|
1996
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1997
|
+
const stopwatch = _chunk6PKNRTLMcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1981
1998
|
if (options.configPath) {
|
|
1982
|
-
const configFile = await
|
|
1999
|
+
const configFile = await _chunkHNSD65O7cjs.loadConfig.call(void 0, options.configPath);
|
|
1983
2000
|
if (configFile) {
|
|
1984
2001
|
options = _defu2.default.call(void 0, options, configFile);
|
|
1985
2002
|
}
|
|
@@ -2160,7 +2177,7 @@ async function resolveOptions(options, config) {
|
|
|
2160
2177
|
treeShaking: options.treeShaking !== false,
|
|
2161
2178
|
platform: options.platform || "neutral",
|
|
2162
2179
|
color: true,
|
|
2163
|
-
logLevel: config.logLevel ===
|
|
2180
|
+
logLevel: config.logLevel === _chunk6PKNRTLMcjs.LogLevelLabel.FATAL ? _chunk6PKNRTLMcjs.LogLevelLabel.ERROR : _chunk6PKNRTLMcjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
2164
2181
|
}
|
|
2165
2182
|
}
|
|
2166
2183
|
};
|
|
@@ -2181,7 +2198,7 @@ async function resolveOptions(options, config) {
|
|
|
2181
2198
|
if (options.rollup) {
|
|
2182
2199
|
let rollup = {};
|
|
2183
2200
|
if (typeof options.rollup === "string") {
|
|
2184
|
-
const rollupFile = await
|
|
2201
|
+
const rollupFile = await _chunkHNSD65O7cjs.loadConfig.call(void 0, options.rollup);
|
|
2185
2202
|
if (rollupFile) {
|
|
2186
2203
|
rollup = rollupFile;
|
|
2187
2204
|
}
|
|
@@ -2193,20 +2210,20 @@ async function resolveOptions(options, config) {
|
|
|
2193
2210
|
resolvedOptions.hooks = {
|
|
2194
2211
|
"rollup:options": async (ctx, opts) => {
|
|
2195
2212
|
if (options.plugins && options.plugins.length > 0) {
|
|
2196
|
-
|
|
2213
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0,
|
|
2197
2214
|
` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`,
|
|
2198
2215
|
config
|
|
2199
2216
|
);
|
|
2200
2217
|
opts.plugins = options.plugins;
|
|
2201
2218
|
} else {
|
|
2202
|
-
|
|
2219
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0,
|
|
2203
2220
|
` \u{1F9E9} No plugins found in provided build options, using default plugins`,
|
|
2204
2221
|
config
|
|
2205
2222
|
);
|
|
2206
2223
|
opts.plugins = await Promise.all([
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2224
|
+
_chunkO4BT7W6Mcjs.analyzePlugin.call(void 0, resolvedOptions),
|
|
2225
|
+
_chunkHNSD65O7cjs.tscPlugin.call(void 0, resolvedOptions),
|
|
2226
|
+
_chunkMESRFRXLcjs.onErrorPlugin.call(void 0, resolvedOptions)
|
|
2210
2227
|
]);
|
|
2211
2228
|
}
|
|
2212
2229
|
},
|
|
@@ -2261,8 +2278,8 @@ var addPackageJsonExport = (file, type = "module", sourceRoot, projectRoot) => {
|
|
|
2261
2278
|
};
|
|
2262
2279
|
async function generatePackageJson(options) {
|
|
2263
2280
|
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, joinPaths(options.projectRoot, "package.json"))) {
|
|
2264
|
-
|
|
2265
|
-
const stopwatch =
|
|
2281
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
2282
|
+
const stopwatch = _chunk6PKNRTLMcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
2266
2283
|
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
2267
2284
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2268
2285
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -2360,11 +2377,11 @@ async function generatePackageJson(options) {
|
|
|
2360
2377
|
return options;
|
|
2361
2378
|
}
|
|
2362
2379
|
async function executeUnbuild(options) {
|
|
2363
|
-
|
|
2380
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0,
|
|
2364
2381
|
` \u{1F680} Running ${options.name} (${options.projectRoot}) build`,
|
|
2365
2382
|
options.config
|
|
2366
2383
|
);
|
|
2367
|
-
const stopwatch =
|
|
2384
|
+
const stopwatch = _chunk6PKNRTLMcjs.getStopwatch.call(void 0,
|
|
2368
2385
|
`${options.name} (${options.projectRoot}) build`
|
|
2369
2386
|
);
|
|
2370
2387
|
try {
|
|
@@ -2373,9 +2390,9 @@ async function executeUnbuild(options) {
|
|
|
2373
2390
|
config: null,
|
|
2374
2391
|
rootDir: joinPaths(options.config.workspaceRoot, options.projectRoot)
|
|
2375
2392
|
};
|
|
2376
|
-
|
|
2393
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0,
|
|
2377
2394
|
`Running with unbuild configuration:
|
|
2378
|
-
${
|
|
2395
|
+
${_chunk6PKNRTLMcjs.formatLogMessage.call(void 0, { ...config, env: "<Hidden>" })}
|
|
2379
2396
|
`,
|
|
2380
2397
|
options.config
|
|
2381
2398
|
);
|
|
@@ -2386,11 +2403,11 @@ ${_chunk4JLDXNBJcjs.formatLogMessage.call(void 0, { ...config, env: "<Hidden>" }
|
|
|
2386
2403
|
return options;
|
|
2387
2404
|
}
|
|
2388
2405
|
async function copyBuildAssets(options) {
|
|
2389
|
-
|
|
2406
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0,
|
|
2390
2407
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
2391
2408
|
options.config
|
|
2392
2409
|
);
|
|
2393
|
-
const stopwatch =
|
|
2410
|
+
const stopwatch = _chunk6PKNRTLMcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
2394
2411
|
await copyAssets(
|
|
2395
2412
|
options.config,
|
|
2396
2413
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -2405,12 +2422,12 @@ async function copyBuildAssets(options) {
|
|
|
2405
2422
|
}
|
|
2406
2423
|
async function cleanOutputPath(options) {
|
|
2407
2424
|
if (options.clean !== false && options.outDir) {
|
|
2408
|
-
|
|
2425
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0,
|
|
2409
2426
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`,
|
|
2410
2427
|
options.config
|
|
2411
2428
|
);
|
|
2412
|
-
const stopwatch =
|
|
2413
|
-
await
|
|
2429
|
+
const stopwatch = _chunk6PKNRTLMcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
2430
|
+
await _chunkJEBUPO36cjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
|
|
2414
2431
|
stopwatch();
|
|
2415
2432
|
}
|
|
2416
2433
|
return options;
|
|
@@ -2425,8 +2442,8 @@ async function build(options) {
|
|
|
2425
2442
|
throw new Error("Cannot find workspace root");
|
|
2426
2443
|
}
|
|
2427
2444
|
const config = await getConfig(workspaceRoot.dir);
|
|
2428
|
-
|
|
2429
|
-
const stopwatch =
|
|
2445
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0, ` ${_chunk6PKNRTLMcjs.brandIcon.call(void 0, config)} Executing Storm Unbuild pipeline`, config);
|
|
2446
|
+
const stopwatch = _chunk6PKNRTLMcjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
2430
2447
|
try {
|
|
2431
2448
|
options.projectRoot = correctPaths(projectRoot);
|
|
2432
2449
|
const resolvedOptions = await resolveOptions(options, config);
|
|
@@ -2438,12 +2455,12 @@ async function build(options) {
|
|
|
2438
2455
|
if (options.buildOnly !== true) {
|
|
2439
2456
|
await copyBuildAssets(resolvedOptions);
|
|
2440
2457
|
}
|
|
2441
|
-
|
|
2458
|
+
_chunk6PKNRTLMcjs.writeSuccess.call(void 0,
|
|
2442
2459
|
` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`,
|
|
2443
2460
|
config
|
|
2444
2461
|
);
|
|
2445
2462
|
} catch (error) {
|
|
2446
|
-
|
|
2463
|
+
_chunk6PKNRTLMcjs.writeFatal.call(void 0,
|
|
2447
2464
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated.",
|
|
2448
2465
|
config
|
|
2449
2466
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6PKNRTLMcjs = require('./chunk-6PKNRTLM.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/tsc.ts
|
|
6
6
|
|
|
@@ -45,7 +45,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
45
45
|
declaration: true,
|
|
46
46
|
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
_chunk6PKNRTLMcjs.writeTrace.call(void 0, compilerOptions, config);
|
|
49
49
|
return compilerOptions;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk6PKNRTLMcjs = require('./chunk-6PKNRTLM.cjs');
|
|
5
5
|
|
|
6
6
|
// src/clean.ts
|
|
7
7
|
var _promises = require('fs/promises');
|
|
8
8
|
async function clean(name = "Unbuild", directory, config) {
|
|
9
|
-
|
|
10
|
-
const stopwatch =
|
|
9
|
+
_chunk6PKNRTLMcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
10
|
+
const stopwatch = _chunk6PKNRTLMcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
11
11
|
await cleanDirectories(name, directory, config);
|
|
12
12
|
stopwatch();
|
|
13
13
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6PKNRTLMcjs = require('./chunk-6PKNRTLM.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/on-error.ts
|
|
6
6
|
var onErrorPlugin = (options) => ({
|
|
7
7
|
name: "storm:on-error",
|
|
8
8
|
buildEnd(error) {
|
|
9
9
|
if (error) {
|
|
10
|
-
|
|
10
|
+
_chunk6PKNRTLMcjs.writeError.call(void 0,
|
|
11
11
|
`The following errors occurred during the build:
|
|
12
12
|
${error ? error.message : "Unknown build error"}
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
renderError(error) {
|
|
21
|
-
|
|
21
|
+
_chunk6PKNRTLMcjs.writeError.call(void 0,
|
|
22
22
|
`The following errors occurred during the build:
|
|
23
23
|
${error ? error.message : "Unknown build error"}
|
|
24
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6PKNRTLMcjs = require('./chunk-6PKNRTLM.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/analyze.ts
|
|
6
6
|
var formatBytes = (bytes) => {
|
|
@@ -17,7 +17,7 @@ var analyzePlugin = (options) => {
|
|
|
17
17
|
renderChunk(source, chunk) {
|
|
18
18
|
const sourceBytes = formatBytes(source.length);
|
|
19
19
|
const fileName = chunk.fileName;
|
|
20
|
-
|
|
20
|
+
_chunk6PKNRTLMcjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, options.config);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -6,6 +6,7 @@ var LogLevel = {
|
|
|
6
6
|
WARN: 30,
|
|
7
7
|
SUCCESS: 35,
|
|
8
8
|
INFO: 40,
|
|
9
|
+
PERFORMANCE: 50,
|
|
9
10
|
DEBUG: 60,
|
|
10
11
|
TRACE: 70,
|
|
11
12
|
ALL: 100
|
|
@@ -17,6 +18,7 @@ var LogLevelLabel = {
|
|
|
17
18
|
WARN: "warn",
|
|
18
19
|
SUCCESS: "success",
|
|
19
20
|
INFO: "info",
|
|
21
|
+
PERFORMANCE: "performance",
|
|
20
22
|
DEBUG: "debug",
|
|
21
23
|
TRACE: "trace",
|
|
22
24
|
ALL: "all"
|
|
@@ -31,6 +33,8 @@ var getLogLevel = (label) => {
|
|
|
31
33
|
return LogLevel.TRACE;
|
|
32
34
|
case "debug":
|
|
33
35
|
return LogLevel.DEBUG;
|
|
36
|
+
case "performance":
|
|
37
|
+
return LogLevel.PERFORMANCE;
|
|
34
38
|
case "info":
|
|
35
39
|
return LogLevel.INFO;
|
|
36
40
|
case "warn":
|
|
@@ -55,6 +59,9 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
55
59
|
if (logLevel >= LogLevel.DEBUG) {
|
|
56
60
|
return LogLevelLabel.DEBUG;
|
|
57
61
|
}
|
|
62
|
+
if (logLevel >= LogLevel.PERFORMANCE) {
|
|
63
|
+
return LogLevelLabel.PERFORMANCE;
|
|
64
|
+
}
|
|
58
65
|
if (logLevel >= LogLevel.INFO) {
|
|
59
66
|
return LogLevelLabel.INFO;
|
|
60
67
|
}
|
|
@@ -94,6 +101,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
94
101
|
warning: "#e3b341",
|
|
95
102
|
danger: "#D8314A",
|
|
96
103
|
fatal: "#51070f",
|
|
104
|
+
performance: "#83ff83",
|
|
97
105
|
link: "#3fa6ff",
|
|
98
106
|
positive: "#22c55e",
|
|
99
107
|
negative: "#dc2626",
|
|
@@ -111,6 +119,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
111
119
|
warning: "#f3d371",
|
|
112
120
|
danger: "#D8314A",
|
|
113
121
|
fatal: "#a40e26",
|
|
122
|
+
performance: "#00ff00",
|
|
114
123
|
link: "#3fa6ff",
|
|
115
124
|
positive: "#22c55e",
|
|
116
125
|
negative: "#dc2626",
|
|
@@ -198,6 +207,7 @@ var CONSOLE_ICONS = {
|
|
|
198
207
|
[LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
|
|
199
208
|
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
200
209
|
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
210
|
+
[LogLevelLabel.PERFORMANCE]: useIcon("\u23F1", "\u23F1"),
|
|
201
211
|
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
202
212
|
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
203
213
|
[LogLevelLabel.TRACE]: useIcon("\u2699", "T"),
|
|
@@ -278,6 +288,19 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
278
288
|
)(
|
|
279
289
|
`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
|
|
280
290
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
291
|
+
`
|
|
292
|
+
);
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
if (typeof logLevel === "number" && LogLevel.PERFORMANCE >= logLevel) {
|
|
296
|
+
return (message) => {
|
|
297
|
+
console.debug(
|
|
298
|
+
`
|
|
299
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
300
|
+
colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance
|
|
301
|
+
)(
|
|
302
|
+
`[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `
|
|
303
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
281
304
|
`
|
|
282
305
|
);
|
|
283
306
|
};
|
|
@@ -323,18 +346,16 @@ var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
|
323
346
|
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
324
347
|
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
325
348
|
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
349
|
+
var writePerformance = (message, config) => getLogFn(LogLevel.PERFORMANCE, config)(message);
|
|
326
350
|
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
327
351
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
328
352
|
var getStopwatch = (name) => {
|
|
329
353
|
const start = /* @__PURE__ */ new Date();
|
|
330
354
|
return () => {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
includeSeconds: true
|
|
336
|
-
}
|
|
337
|
-
)} to complete`
|
|
355
|
+
writePerformance(
|
|
356
|
+
`The${name ? ` ${name}` : ""} process took ${formatDistanceToNow(start, {
|
|
357
|
+
includeSeconds: true
|
|
358
|
+
})} to complete`
|
|
338
359
|
);
|
|
339
360
|
};
|
|
340
361
|
};
|
package/dist/clean.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkJEBUPO36cjs = require('./chunk-JEBUPO36.cjs');
|
|
5
|
+
require('./chunk-6PKNRTLM.cjs');
|
|
6
6
|
require('./chunk-OBGZSXTJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.clean =
|
|
10
|
+
exports.clean = _chunkJEBUPO36cjs.clean; exports.cleanDirectories = _chunkJEBUPO36cjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkDP7FKNIKcjs = require('./chunk-DP7FKNIK.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkJEBUPO36cjs = require('./chunk-JEBUPO36.cjs');
|
|
13
13
|
require('./chunk-SFZRYJZ2.cjs');
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-O4BT7W6M.cjs');
|
|
15
|
+
require('./chunk-MESRFRXL.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
require('./chunk-
|
|
19
|
+
var _chunkHNSD65O7cjs = require('./chunk-HNSD65O7.cjs');
|
|
20
|
+
require('./chunk-6PKNRTLM.cjs');
|
|
21
21
|
require('./chunk-OBGZSXTJ.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
@@ -30,4 +30,4 @@ require('./chunk-OBGZSXTJ.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
exports.build =
|
|
33
|
+
exports.build = _chunkDP7FKNIKcjs.build; exports.clean = _chunkJEBUPO36cjs.clean; exports.cleanDirectories = _chunkJEBUPO36cjs.cleanDirectories; exports.cleanOutputPath = _chunkDP7FKNIKcjs.cleanOutputPath; exports.copyBuildAssets = _chunkDP7FKNIKcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkHNSD65O7cjs.createTsCompilerOptions; exports.executeUnbuild = _chunkDP7FKNIKcjs.executeUnbuild; exports.generatePackageJson = _chunkDP7FKNIKcjs.generatePackageJson; exports.loadConfig = _chunkHNSD65O7cjs.loadConfig; exports.resolveOptions = _chunkDP7FKNIKcjs.resolveOptions;
|
package/dist/index.js
CHANGED
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3PJKF6ZP.js";
|
|
9
9
|
import {
|
|
10
10
|
clean,
|
|
11
11
|
cleanDirectories
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6VMZE64H.js";
|
|
13
13
|
import "./chunk-GGNOJ77I.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-XX3JA7ON.js";
|
|
15
|
+
import "./chunk-KY6IV76L.js";
|
|
16
16
|
import {
|
|
17
17
|
createTsCompilerOptions,
|
|
18
18
|
loadConfig
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-NO2X3EYN.js";
|
|
20
|
+
import "./chunk-UWBAXJIB.js";
|
|
21
21
|
import "./chunk-3RG5ZIWI.js";
|
|
22
22
|
export {
|
|
23
23
|
build,
|