@storm-software/unbuild 0.57.79 → 0.57.81
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/bin/unbuild.cjs +34 -4
- package/bin/unbuild.js +34 -4
- package/dist/build.cjs +7 -7
- package/dist/build.js +6 -6
- package/dist/{chunk-GIDXWBVG.cjs → chunk-4JC5QN5R.cjs} +45 -44
- package/dist/{chunk-NYJJPCE6.js → chunk-BKVWUVJ4.js} +7 -6
- package/dist/{chunk-FUTTBWV2.cjs → chunk-BP56RAZ2.cjs} +3 -3
- package/dist/{chunk-LCDMIRWL.cjs → chunk-C7PT2TGO.cjs} +3 -3
- package/dist/{chunk-HR3SLYDU.js → chunk-FFUNE74Q.js} +1 -1
- package/dist/{chunk-63HWJXX3.cjs → chunk-G2KGWCMT.cjs} +2 -2
- package/dist/{chunk-2AQD7EXN.js → chunk-JDSJJPKN.js} +1 -1
- package/dist/{chunk-5NGGLRFZ.cjs → chunk-NT4VJR4U.cjs} +2 -2
- package/dist/{chunk-EBPCFOZ5.js → chunk-PUKULGMA.js} +1 -1
- package/dist/{chunk-GF7CJFNH.cjs → chunk-U25P467T.cjs} +36 -5
- package/dist/{chunk-QRFBNDKU.js → chunk-UTPDCL5O.js} +33 -2
- package/dist/{chunk-HJ3BS26C.js → chunk-XJRI5PEK.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
package/bin/unbuild.cjs
CHANGED
|
@@ -675,6 +675,35 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
675
675
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
|
+
function getColors(config) {
|
|
679
|
+
if (!config?.colors || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !config.colors["base"]?.["dark"])) {
|
|
680
|
+
return DEFAULT_COLOR_CONFIG;
|
|
681
|
+
}
|
|
682
|
+
if (config.colors["base"]) {
|
|
683
|
+
if (typeof config.colors["base"]["dark"] === "object") {
|
|
684
|
+
return config.colors["base"]["dark"];
|
|
685
|
+
} else if (config.colors["base"]["dark"] === "string") {
|
|
686
|
+
return config.colors["base"];
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
if (typeof config.colors["dark"] === "object") {
|
|
690
|
+
return config.colors["dark"];
|
|
691
|
+
}
|
|
692
|
+
return config.colors ?? DEFAULT_COLOR_CONFIG;
|
|
693
|
+
}
|
|
694
|
+
function getColor(key, config) {
|
|
695
|
+
const colors = getColors(config);
|
|
696
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
697
|
+
if (result) {
|
|
698
|
+
return result;
|
|
699
|
+
}
|
|
700
|
+
if (key === "link" || key === "debug") {
|
|
701
|
+
return getColor("info", config);
|
|
702
|
+
} else if (key === "fatal") {
|
|
703
|
+
return getColor("danger", config);
|
|
704
|
+
}
|
|
705
|
+
return getColor("brand", config);
|
|
706
|
+
}
|
|
678
707
|
|
|
679
708
|
// ../config-tools/src/logger/chalk.ts
|
|
680
709
|
var import_chalk = __toESM(require("chalk"), 1);
|
|
@@ -724,7 +753,7 @@ function isUnicodeSupported() {
|
|
|
724
753
|
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
725
754
|
var CONSOLE_ICONS = {
|
|
726
755
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
727
|
-
[LogLevelLabel.FATAL]: useIcon("\
|
|
756
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
|
|
728
757
|
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
729
758
|
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
730
759
|
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
@@ -945,6 +974,7 @@ var _isFunction = (value) => {
|
|
|
945
974
|
return false;
|
|
946
975
|
}
|
|
947
976
|
};
|
|
977
|
+
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
|
|
948
978
|
|
|
949
979
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
950
980
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
@@ -2936,7 +2966,7 @@ async function build(options) {
|
|
|
2936
2966
|
throw new Error("Cannot find workspace root");
|
|
2937
2967
|
}
|
|
2938
2968
|
const config = await getConfig(workspaceRoot.dir);
|
|
2939
|
-
writeDebug(`
|
|
2969
|
+
writeDebug(` ${brandIcon(config)} Executing Storm Unbuild pipeline`, config);
|
|
2940
2970
|
const stopwatch = getStopwatch("Unbuild pipeline");
|
|
2941
2971
|
try {
|
|
2942
2972
|
options.projectRoot = correctPaths(projectRoot);
|
|
@@ -2967,7 +2997,7 @@ async function build(options) {
|
|
|
2967
2997
|
// bin/unbuild.ts
|
|
2968
2998
|
async function createProgram(config) {
|
|
2969
2999
|
try {
|
|
2970
|
-
writeInfo(
|
|
3000
|
+
writeInfo(`${brandIcon(config)} Running Storm Unbuild pipeline`, config);
|
|
2971
3001
|
const root = findWorkspaceRootSafe();
|
|
2972
3002
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
2973
3003
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
@@ -2976,7 +3006,7 @@ async function createProgram(config) {
|
|
|
2976
3006
|
}
|
|
2977
3007
|
const program = new import_commander.Command("storm-unbuild");
|
|
2978
3008
|
program.version("1.0.0", "-v --version", "display CLI version");
|
|
2979
|
-
program.description("
|
|
3009
|
+
program.description("Run the Storm Unbuild pipeline").showHelpAfterError().showSuggestionAfterError();
|
|
2980
3010
|
program.command("build", { isDefault: true }).alias("bundle").description("Run a TypeScript build using Unbuild.").option("-n --name <value>", "The name of the project to build").option(
|
|
2981
3011
|
"-p --project-root <path>",
|
|
2982
3012
|
"The path to the root of the project to build. This path is defined relative to the workspace root."
|
package/bin/unbuild.js
CHANGED
|
@@ -653,6 +653,35 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
653
653
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
654
654
|
}
|
|
655
655
|
};
|
|
656
|
+
function getColors(config) {
|
|
657
|
+
if (!config?.colors || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !config.colors["base"]?.["dark"])) {
|
|
658
|
+
return DEFAULT_COLOR_CONFIG;
|
|
659
|
+
}
|
|
660
|
+
if (config.colors["base"]) {
|
|
661
|
+
if (typeof config.colors["base"]["dark"] === "object") {
|
|
662
|
+
return config.colors["base"]["dark"];
|
|
663
|
+
} else if (config.colors["base"]["dark"] === "string") {
|
|
664
|
+
return config.colors["base"];
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
if (typeof config.colors["dark"] === "object") {
|
|
668
|
+
return config.colors["dark"];
|
|
669
|
+
}
|
|
670
|
+
return config.colors ?? DEFAULT_COLOR_CONFIG;
|
|
671
|
+
}
|
|
672
|
+
function getColor(key, config) {
|
|
673
|
+
const colors = getColors(config);
|
|
674
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
675
|
+
if (result) {
|
|
676
|
+
return result;
|
|
677
|
+
}
|
|
678
|
+
if (key === "link" || key === "debug") {
|
|
679
|
+
return getColor("info", config);
|
|
680
|
+
} else if (key === "fatal") {
|
|
681
|
+
return getColor("danger", config);
|
|
682
|
+
}
|
|
683
|
+
return getColor("brand", config);
|
|
684
|
+
}
|
|
656
685
|
|
|
657
686
|
// ../config-tools/src/logger/chalk.ts
|
|
658
687
|
import chalk from "chalk";
|
|
@@ -702,7 +731,7 @@ function isUnicodeSupported() {
|
|
|
702
731
|
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
703
732
|
var CONSOLE_ICONS = {
|
|
704
733
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
705
|
-
[LogLevelLabel.FATAL]: useIcon("\
|
|
734
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
|
|
706
735
|
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
707
736
|
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
708
737
|
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
@@ -923,6 +952,7 @@ var _isFunction = (value) => {
|
|
|
923
952
|
return false;
|
|
924
953
|
}
|
|
925
954
|
};
|
|
955
|
+
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
|
|
926
956
|
|
|
927
957
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
928
958
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
@@ -2935,7 +2965,7 @@ async function build(options) {
|
|
|
2935
2965
|
throw new Error("Cannot find workspace root");
|
|
2936
2966
|
}
|
|
2937
2967
|
const config = await getConfig(workspaceRoot.dir);
|
|
2938
|
-
writeDebug(`
|
|
2968
|
+
writeDebug(` ${brandIcon(config)} Executing Storm Unbuild pipeline`, config);
|
|
2939
2969
|
const stopwatch = getStopwatch("Unbuild pipeline");
|
|
2940
2970
|
try {
|
|
2941
2971
|
options.projectRoot = correctPaths(projectRoot);
|
|
@@ -2966,7 +2996,7 @@ async function build(options) {
|
|
|
2966
2996
|
// bin/unbuild.ts
|
|
2967
2997
|
async function createProgram(config) {
|
|
2968
2998
|
try {
|
|
2969
|
-
writeInfo(
|
|
2999
|
+
writeInfo(`${brandIcon(config)} Running Storm Unbuild pipeline`, config);
|
|
2970
3000
|
const root = findWorkspaceRootSafe();
|
|
2971
3001
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
2972
3002
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
@@ -2975,7 +3005,7 @@ async function createProgram(config) {
|
|
|
2975
3005
|
}
|
|
2976
3006
|
const program = new Command("storm-unbuild");
|
|
2977
3007
|
program.version("1.0.0", "-v --version", "display CLI version");
|
|
2978
|
-
program.description("
|
|
3008
|
+
program.description("Run the Storm Unbuild pipeline").showHelpAfterError().showSuggestionAfterError();
|
|
2979
3009
|
program.command("build", { isDefault: true }).alias("bundle").description("Run a TypeScript build using Unbuild.").option("-n --name <value>", "The name of the project to build").option(
|
|
2980
3010
|
"-p --project-root <path>",
|
|
2981
3011
|
"The path to the root of the project to build. This path is defined relative to the workspace root."
|
package/dist/build.cjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
8
|
+
var _chunk4JC5QN5Rcjs = require('./chunk-4JC5QN5R.cjs');
|
|
9
|
+
require('./chunk-BP56RAZ2.cjs');
|
|
10
|
+
require('./chunk-G2KGWCMT.cjs');
|
|
11
|
+
require('./chunk-C7PT2TGO.cjs');
|
|
12
|
+
require('./chunk-NT4VJR4U.cjs');
|
|
13
|
+
require('./chunk-U25P467T.cjs');
|
|
14
14
|
require('./chunk-OBGZSXTJ.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -19,4 +19,4 @@ require('./chunk-OBGZSXTJ.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.build =
|
|
22
|
+
exports.build = _chunk4JC5QN5Rcjs.build; exports.cleanOutputPath = _chunk4JC5QN5Rcjs.cleanOutputPath; exports.copyBuildAssets = _chunk4JC5QN5Rcjs.copyBuildAssets; exports.executeUnbuild = _chunk4JC5QN5Rcjs.executeUnbuild; exports.generatePackageJson = _chunk4JC5QN5Rcjs.generatePackageJson; exports.resolveOptions = _chunk4JC5QN5Rcjs.resolveOptions;
|
package/dist/build.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-BKVWUVJ4.js";
|
|
9
|
+
import "./chunk-PUKULGMA.js";
|
|
10
|
+
import "./chunk-XJRI5PEK.js";
|
|
11
|
+
import "./chunk-FFUNE74Q.js";
|
|
12
|
+
import "./chunk-JDSJJPKN.js";
|
|
13
|
+
import "./chunk-UTPDCL5O.js";
|
|
14
14
|
import "./chunk-3RG5ZIWI.js";
|
|
15
15
|
export {
|
|
16
16
|
build,
|
|
@@ -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 _chunkBP56RAZ2cjs = require('./chunk-BP56RAZ2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkG2KGWCMTcjs = require('./chunk-G2KGWCMT.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkC7PT2TGOcjs = require('./chunk-C7PT2TGO.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkNT4VJR4Ucjs = require('./chunk-NT4VJR4U.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -24,7 +24,8 @@ var _chunk5NGGLRFZcjs = require('./chunk-5NGGLRFZ.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
var _chunkU25P467Tcjs = require('./chunk-U25P467T.cjs');
|
|
28
29
|
|
|
29
30
|
// src/build.ts
|
|
30
31
|
|
|
@@ -205,7 +206,7 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
205
206
|
output: "src/"
|
|
206
207
|
});
|
|
207
208
|
}
|
|
208
|
-
|
|
209
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0,
|
|
209
210
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
210
211
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
211
212
|
config
|
|
@@ -217,9 +218,9 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
217
218
|
assets: pendingAssets
|
|
218
219
|
});
|
|
219
220
|
await assetHandler.processAllAssetsOnce();
|
|
220
|
-
|
|
221
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
221
222
|
if (includeSrc === true) {
|
|
222
|
-
|
|
223
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0,
|
|
223
224
|
`\u{1F4DD} Adding banner and writing source files: ${joinPaths(
|
|
224
225
|
outputPath,
|
|
225
226
|
"src"
|
|
@@ -398,7 +399,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
398
399
|
}
|
|
399
400
|
}
|
|
400
401
|
if (localPackages.length > 0) {
|
|
401
|
-
|
|
402
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0,
|
|
402
403
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
403
404
|
);
|
|
404
405
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
@@ -446,7 +447,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
446
447
|
return ret;
|
|
447
448
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
448
449
|
} else {
|
|
449
|
-
|
|
450
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
450
451
|
}
|
|
451
452
|
return packageJson;
|
|
452
453
|
};
|
|
@@ -1224,7 +1225,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1224
1225
|
let config = result.config;
|
|
1225
1226
|
const configFile = result.configFile;
|
|
1226
1227
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
1227
|
-
|
|
1228
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0,
|
|
1228
1229
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
1229
1230
|
{
|
|
1230
1231
|
logLevel: "all"
|
|
@@ -1240,7 +1241,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1240
1241
|
for (const result2 of results) {
|
|
1241
1242
|
if (_optionalChain([result2, 'optionalAccess', _34 => _34.config]) && _optionalChain([result2, 'optionalAccess', _35 => _35.configFile]) && Object.keys(result2.config).length > 0) {
|
|
1242
1243
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
1243
|
-
|
|
1244
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0,
|
|
1244
1245
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
1245
1246
|
{
|
|
1246
1247
|
logLevel: "all"
|
|
@@ -1356,7 +1357,7 @@ var getConfigEnv = () => {
|
|
|
1356
1357
|
},
|
|
1357
1358
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
1358
1359
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1359
|
-
) ?
|
|
1360
|
+
) ? _chunkU25P467Tcjs.getLogLevelLabel.call(void 0,
|
|
1360
1361
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1361
1362
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
1362
1363
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
@@ -1721,9 +1722,9 @@ var setConfigEnv = (config) => {
|
|
|
1721
1722
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1722
1723
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1723
1724
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
1724
|
-
|
|
1725
|
+
_chunkU25P467Tcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkU25P467Tcjs.LogLevel.DEBUG ? true : false
|
|
1725
1726
|
);
|
|
1726
|
-
process.env.RUST_BACKTRACE =
|
|
1727
|
+
process.env.RUST_BACKTRACE = _chunkU25P467Tcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkU25P467Tcjs.LogLevel.DEBUG ? "full" : "none";
|
|
1727
1728
|
}
|
|
1728
1729
|
if (config.skipConfigLogging !== void 0) {
|
|
1729
1730
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -1865,7 +1866,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1865
1866
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1866
1867
|
if (!configFile) {
|
|
1867
1868
|
if (!skipLogs) {
|
|
1868
|
-
|
|
1869
|
+
_chunkU25P467Tcjs.writeWarning.call(void 0,
|
|
1869
1870
|
"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",
|
|
1870
1871
|
{ logLevel: "all" }
|
|
1871
1872
|
);
|
|
@@ -1892,7 +1893,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1892
1893
|
throw new Error(
|
|
1893
1894
|
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _60 => _60.message]) ? `: ${error.message}` : ""}
|
|
1894
1895
|
|
|
1895
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
1896
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkU25P467Tcjs.formatLogMessage.call(void 0,
|
|
1896
1897
|
configInput
|
|
1897
1898
|
)}`,
|
|
1898
1899
|
{
|
|
@@ -1937,9 +1938,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
1937
1938
|
);
|
|
1938
1939
|
setConfigEnv(config);
|
|
1939
1940
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1940
|
-
|
|
1941
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0,
|
|
1941
1942
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1942
|
-
${
|
|
1943
|
+
${_chunkU25P467Tcjs.formatLogMessage.call(void 0, config)}`,
|
|
1943
1944
|
config
|
|
1944
1945
|
);
|
|
1945
1946
|
}
|
|
@@ -1975,10 +1976,10 @@ var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
|
1975
1976
|
|
|
1976
1977
|
var _unbuild = require('unbuild');
|
|
1977
1978
|
async function resolveOptions(options, config) {
|
|
1978
|
-
|
|
1979
|
-
const stopwatch =
|
|
1979
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1980
|
+
const stopwatch = _chunkU25P467Tcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1980
1981
|
if (options.configPath) {
|
|
1981
|
-
const configFile = await
|
|
1982
|
+
const configFile = await _chunkNT4VJR4Ucjs.loadConfig.call(void 0, options.configPath);
|
|
1982
1983
|
if (configFile) {
|
|
1983
1984
|
options = _defu2.default.call(void 0, options, configFile);
|
|
1984
1985
|
}
|
|
@@ -2159,7 +2160,7 @@ async function resolveOptions(options, config) {
|
|
|
2159
2160
|
treeShaking: options.treeShaking !== false,
|
|
2160
2161
|
platform: options.platform || "neutral",
|
|
2161
2162
|
color: true,
|
|
2162
|
-
logLevel: config.logLevel ===
|
|
2163
|
+
logLevel: config.logLevel === _chunkU25P467Tcjs.LogLevelLabel.FATAL ? _chunkU25P467Tcjs.LogLevelLabel.ERROR : _chunkU25P467Tcjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
2163
2164
|
}
|
|
2164
2165
|
}
|
|
2165
2166
|
};
|
|
@@ -2180,7 +2181,7 @@ async function resolveOptions(options, config) {
|
|
|
2180
2181
|
if (options.rollup) {
|
|
2181
2182
|
let rollup = {};
|
|
2182
2183
|
if (typeof options.rollup === "string") {
|
|
2183
|
-
const rollupFile = await
|
|
2184
|
+
const rollupFile = await _chunkNT4VJR4Ucjs.loadConfig.call(void 0, options.rollup);
|
|
2184
2185
|
if (rollupFile) {
|
|
2185
2186
|
rollup = rollupFile;
|
|
2186
2187
|
}
|
|
@@ -2192,20 +2193,20 @@ async function resolveOptions(options, config) {
|
|
|
2192
2193
|
resolvedOptions.hooks = {
|
|
2193
2194
|
"rollup:options": async (ctx, opts) => {
|
|
2194
2195
|
if (options.plugins && options.plugins.length > 0) {
|
|
2195
|
-
|
|
2196
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0,
|
|
2196
2197
|
` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`,
|
|
2197
2198
|
config
|
|
2198
2199
|
);
|
|
2199
2200
|
opts.plugins = options.plugins;
|
|
2200
2201
|
} else {
|
|
2201
|
-
|
|
2202
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0,
|
|
2202
2203
|
` \u{1F9E9} No plugins found in provided build options, using default plugins`,
|
|
2203
2204
|
config
|
|
2204
2205
|
);
|
|
2205
2206
|
opts.plugins = await Promise.all([
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2207
|
+
_chunkG2KGWCMTcjs.analyzePlugin.call(void 0, resolvedOptions),
|
|
2208
|
+
_chunkNT4VJR4Ucjs.tscPlugin.call(void 0, resolvedOptions),
|
|
2209
|
+
_chunkC7PT2TGOcjs.onErrorPlugin.call(void 0, resolvedOptions)
|
|
2209
2210
|
]);
|
|
2210
2211
|
}
|
|
2211
2212
|
},
|
|
@@ -2260,8 +2261,8 @@ var addPackageJsonExport = (file, type = "module", sourceRoot, projectRoot) => {
|
|
|
2260
2261
|
};
|
|
2261
2262
|
async function generatePackageJson(options) {
|
|
2262
2263
|
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, joinPaths(options.projectRoot, "package.json"))) {
|
|
2263
|
-
|
|
2264
|
-
const stopwatch =
|
|
2264
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
2265
|
+
const stopwatch = _chunkU25P467Tcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
2265
2266
|
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
2266
2267
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2267
2268
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -2359,11 +2360,11 @@ async function generatePackageJson(options) {
|
|
|
2359
2360
|
return options;
|
|
2360
2361
|
}
|
|
2361
2362
|
async function executeUnbuild(options) {
|
|
2362
|
-
|
|
2363
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0,
|
|
2363
2364
|
` \u{1F680} Running ${options.name} (${options.projectRoot}) build`,
|
|
2364
2365
|
options.config
|
|
2365
2366
|
);
|
|
2366
|
-
const stopwatch =
|
|
2367
|
+
const stopwatch = _chunkU25P467Tcjs.getStopwatch.call(void 0,
|
|
2367
2368
|
`${options.name} (${options.projectRoot}) build`
|
|
2368
2369
|
);
|
|
2369
2370
|
try {
|
|
@@ -2372,9 +2373,9 @@ async function executeUnbuild(options) {
|
|
|
2372
2373
|
config: null,
|
|
2373
2374
|
rootDir: joinPaths(options.config.workspaceRoot, options.projectRoot)
|
|
2374
2375
|
};
|
|
2375
|
-
|
|
2376
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0,
|
|
2376
2377
|
`Running with unbuild configuration:
|
|
2377
|
-
${
|
|
2378
|
+
${_chunkU25P467Tcjs.formatLogMessage.call(void 0, { ...config, env: "<Hidden>" })}
|
|
2378
2379
|
`,
|
|
2379
2380
|
options.config
|
|
2380
2381
|
);
|
|
@@ -2385,11 +2386,11 @@ ${_chunkGF7CJFNHcjs.formatLogMessage.call(void 0, { ...config, env: "<Hidden>" }
|
|
|
2385
2386
|
return options;
|
|
2386
2387
|
}
|
|
2387
2388
|
async function copyBuildAssets(options) {
|
|
2388
|
-
|
|
2389
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0,
|
|
2389
2390
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
2390
2391
|
options.config
|
|
2391
2392
|
);
|
|
2392
|
-
const stopwatch =
|
|
2393
|
+
const stopwatch = _chunkU25P467Tcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
2393
2394
|
await copyAssets(
|
|
2394
2395
|
options.config,
|
|
2395
2396
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -2404,12 +2405,12 @@ async function copyBuildAssets(options) {
|
|
|
2404
2405
|
}
|
|
2405
2406
|
async function cleanOutputPath(options) {
|
|
2406
2407
|
if (options.clean !== false && options.outDir) {
|
|
2407
|
-
|
|
2408
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0,
|
|
2408
2409
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`,
|
|
2409
2410
|
options.config
|
|
2410
2411
|
);
|
|
2411
|
-
const stopwatch =
|
|
2412
|
-
await
|
|
2412
|
+
const stopwatch = _chunkU25P467Tcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
2413
|
+
await _chunkBP56RAZ2cjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
|
|
2413
2414
|
stopwatch();
|
|
2414
2415
|
}
|
|
2415
2416
|
return options;
|
|
@@ -2424,8 +2425,8 @@ async function build(options) {
|
|
|
2424
2425
|
throw new Error("Cannot find workspace root");
|
|
2425
2426
|
}
|
|
2426
2427
|
const config = await getConfig(workspaceRoot.dir);
|
|
2427
|
-
|
|
2428
|
-
const stopwatch =
|
|
2428
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0, ` ${_chunkU25P467Tcjs.brandIcon.call(void 0, config)} Executing Storm Unbuild pipeline`, config);
|
|
2429
|
+
const stopwatch = _chunkU25P467Tcjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
2429
2430
|
try {
|
|
2430
2431
|
options.projectRoot = correctPaths(projectRoot);
|
|
2431
2432
|
const resolvedOptions = await resolveOptions(options, config);
|
|
@@ -2437,12 +2438,12 @@ async function build(options) {
|
|
|
2437
2438
|
if (options.buildOnly !== true) {
|
|
2438
2439
|
await copyBuildAssets(resolvedOptions);
|
|
2439
2440
|
}
|
|
2440
|
-
|
|
2441
|
+
_chunkU25P467Tcjs.writeSuccess.call(void 0,
|
|
2441
2442
|
` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`,
|
|
2442
2443
|
config
|
|
2443
2444
|
);
|
|
2444
2445
|
} catch (error) {
|
|
2445
|
-
|
|
2446
|
+
_chunkU25P467Tcjs.writeFatal.call(void 0,
|
|
2446
2447
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated.",
|
|
2447
2448
|
config
|
|
2448
2449
|
);
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanDirectories
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PUKULGMA.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XJRI5PEK.js";
|
|
7
7
|
import {
|
|
8
8
|
onErrorPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FFUNE74Q.js";
|
|
10
10
|
import {
|
|
11
11
|
loadConfig,
|
|
12
12
|
tscPlugin
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JDSJJPKN.js";
|
|
14
14
|
import {
|
|
15
15
|
LogLevel,
|
|
16
16
|
LogLevelLabel,
|
|
17
|
+
brandIcon,
|
|
17
18
|
formatLogMessage,
|
|
18
19
|
getLogLevel,
|
|
19
20
|
getLogLevelLabel,
|
|
@@ -24,7 +25,7 @@ import {
|
|
|
24
25
|
writeSuccess,
|
|
25
26
|
writeTrace,
|
|
26
27
|
writeWarning
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UTPDCL5O.js";
|
|
28
29
|
|
|
29
30
|
// src/build.ts
|
|
30
31
|
import {
|
|
@@ -2424,7 +2425,7 @@ async function build(options) {
|
|
|
2424
2425
|
throw new Error("Cannot find workspace root");
|
|
2425
2426
|
}
|
|
2426
2427
|
const config = await getConfig(workspaceRoot.dir);
|
|
2427
|
-
writeDebug(`
|
|
2428
|
+
writeDebug(` ${brandIcon(config)} Executing Storm Unbuild pipeline`, config);
|
|
2428
2429
|
const stopwatch = getStopwatch("Unbuild pipeline");
|
|
2429
2430
|
try {
|
|
2430
2431
|
options.projectRoot = correctPaths(projectRoot);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkU25P467Tcjs = require('./chunk-U25P467T.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
|
+
_chunkU25P467Tcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
10
|
+
const stopwatch = _chunkU25P467Tcjs.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 _chunkU25P467Tcjs = require('./chunk-U25P467T.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
|
+
_chunkU25P467Tcjs.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
|
+
_chunkU25P467Tcjs.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 _chunkU25P467Tcjs = require('./chunk-U25P467T.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
|
+
_chunkU25P467Tcjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, options.config);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -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 _chunkU25P467Tcjs = require('./chunk-U25P467T.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
|
+
_chunkU25P467Tcjs.writeTrace.call(void 0, compilerOptions, config);
|
|
49
49
|
return compilerOptions;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -117,6 +117,35 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
117
117
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
+
function getColors(config) {
|
|
121
|
+
if (!_optionalChain([config, 'optionalAccess', _2 => _2.colors]) || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !_optionalChain([config, 'access', _3 => _3.colors, 'access', _4 => _4["base"], 'optionalAccess', _5 => _5["dark"]]))) {
|
|
122
|
+
return DEFAULT_COLOR_CONFIG;
|
|
123
|
+
}
|
|
124
|
+
if (config.colors["base"]) {
|
|
125
|
+
if (typeof config.colors["base"]["dark"] === "object") {
|
|
126
|
+
return config.colors["base"]["dark"];
|
|
127
|
+
} else if (config.colors["base"]["dark"] === "string") {
|
|
128
|
+
return config.colors["base"];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (typeof config.colors["dark"] === "object") {
|
|
132
|
+
return config.colors["dark"];
|
|
133
|
+
}
|
|
134
|
+
return _nullishCoalesce(config.colors, () => ( DEFAULT_COLOR_CONFIG));
|
|
135
|
+
}
|
|
136
|
+
function getColor(key, config) {
|
|
137
|
+
const colors = getColors(config);
|
|
138
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
139
|
+
if (result) {
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
if (key === "link" || key === "debug") {
|
|
143
|
+
return getColor("info", config);
|
|
144
|
+
} else if (key === "fatal") {
|
|
145
|
+
return getColor("danger", config);
|
|
146
|
+
}
|
|
147
|
+
return getColor("brand", config);
|
|
148
|
+
}
|
|
120
149
|
|
|
121
150
|
// ../config-tools/src/logger/chalk.ts
|
|
122
151
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
@@ -145,7 +174,7 @@ var chalkDefault = {
|
|
|
145
174
|
};
|
|
146
175
|
var getChalk = () => {
|
|
147
176
|
let _chalk = _chalk3.default;
|
|
148
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
177
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright]) || !_optionalChain([_chalk, 'optionalAccess', _11 => _11.white])) {
|
|
149
178
|
_chalk = chalkDefault;
|
|
150
179
|
}
|
|
151
180
|
return _chalk;
|
|
@@ -166,7 +195,7 @@ function isUnicodeSupported() {
|
|
|
166
195
|
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
167
196
|
var CONSOLE_ICONS = {
|
|
168
197
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
169
|
-
[LogLevelLabel.FATAL]: useIcon("\
|
|
198
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
|
|
170
199
|
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
171
200
|
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
172
201
|
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
@@ -182,7 +211,7 @@ var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
|
182
211
|
|
|
183
212
|
// ../config-tools/src/logger/console.ts
|
|
184
213
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
185
|
-
const colors = !_optionalChain([config, 'access',
|
|
214
|
+
const colors = !_optionalChain([config, 'access', _12 => _12.colors, 'optionalAccess', _13 => _13.dark]) && !_optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) && !_optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"], 'optionalAccess', _23 => _23.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _24 => _24.colors, 'optionalAccess', _25 => _25["base"]]) ? _optionalChain([config, 'access', _26 => _26.colors, 'optionalAccess', _27 => _27["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
186
215
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
187
216
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
188
217
|
return (_) => {
|
|
@@ -327,11 +356,13 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
|
327
356
|
};
|
|
328
357
|
var _isFunction = (value) => {
|
|
329
358
|
try {
|
|
330
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
359
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _28 => _28.constructor]) && _optionalChain([value, 'optionalAccess', _29 => _29.call]) && _optionalChain([value, 'optionalAccess', _30 => _30.apply]));
|
|
331
360
|
} catch (e) {
|
|
332
361
|
return false;
|
|
333
362
|
}
|
|
334
363
|
};
|
|
364
|
+
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
|
|
365
|
+
|
|
335
366
|
|
|
336
367
|
|
|
337
368
|
|
|
@@ -348,4 +379,4 @@ var _isFunction = (value) => {
|
|
|
348
379
|
|
|
349
380
|
|
|
350
381
|
|
|
351
|
-
exports.LogLevel = LogLevel; exports.LogLevelLabel = LogLevelLabel; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
|
|
382
|
+
exports.LogLevel = LogLevel; exports.LogLevelLabel = LogLevelLabel; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.brandIcon = brandIcon;
|
|
@@ -117,6 +117,35 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
117
117
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
+
function getColors(config) {
|
|
121
|
+
if (!config?.colors || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !config.colors["base"]?.["dark"])) {
|
|
122
|
+
return DEFAULT_COLOR_CONFIG;
|
|
123
|
+
}
|
|
124
|
+
if (config.colors["base"]) {
|
|
125
|
+
if (typeof config.colors["base"]["dark"] === "object") {
|
|
126
|
+
return config.colors["base"]["dark"];
|
|
127
|
+
} else if (config.colors["base"]["dark"] === "string") {
|
|
128
|
+
return config.colors["base"];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (typeof config.colors["dark"] === "object") {
|
|
132
|
+
return config.colors["dark"];
|
|
133
|
+
}
|
|
134
|
+
return config.colors ?? DEFAULT_COLOR_CONFIG;
|
|
135
|
+
}
|
|
136
|
+
function getColor(key, config) {
|
|
137
|
+
const colors = getColors(config);
|
|
138
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
139
|
+
if (result) {
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
if (key === "link" || key === "debug") {
|
|
143
|
+
return getColor("info", config);
|
|
144
|
+
} else if (key === "fatal") {
|
|
145
|
+
return getColor("danger", config);
|
|
146
|
+
}
|
|
147
|
+
return getColor("brand", config);
|
|
148
|
+
}
|
|
120
149
|
|
|
121
150
|
// ../config-tools/src/logger/chalk.ts
|
|
122
151
|
import chalk from "chalk";
|
|
@@ -166,7 +195,7 @@ function isUnicodeSupported() {
|
|
|
166
195
|
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
167
196
|
var CONSOLE_ICONS = {
|
|
168
197
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
169
|
-
[LogLevelLabel.FATAL]: useIcon("\
|
|
198
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
|
|
170
199
|
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
171
200
|
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
172
201
|
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
@@ -332,6 +361,7 @@ var _isFunction = (value) => {
|
|
|
332
361
|
return false;
|
|
333
362
|
}
|
|
334
363
|
};
|
|
364
|
+
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
|
|
335
365
|
|
|
336
366
|
export {
|
|
337
367
|
LogLevel,
|
|
@@ -347,5 +377,6 @@ export {
|
|
|
347
377
|
writeDebug,
|
|
348
378
|
writeTrace,
|
|
349
379
|
getStopwatch,
|
|
350
|
-
formatLogMessage
|
|
380
|
+
formatLogMessage,
|
|
381
|
+
brandIcon
|
|
351
382
|
};
|
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 _chunkBP56RAZ2cjs = require('./chunk-BP56RAZ2.cjs');
|
|
5
|
+
require('./chunk-U25P467T.cjs');
|
|
6
6
|
require('./chunk-OBGZSXTJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.clean =
|
|
10
|
+
exports.clean = _chunkBP56RAZ2cjs.clean; exports.cleanDirectories = _chunkBP56RAZ2cjs.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 _chunk4JC5QN5Rcjs = require('./chunk-4JC5QN5R.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkBP56RAZ2cjs = require('./chunk-BP56RAZ2.cjs');
|
|
13
13
|
require('./chunk-SFZRYJZ2.cjs');
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-G2KGWCMT.cjs');
|
|
15
|
+
require('./chunk-C7PT2TGO.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
require('./chunk-
|
|
19
|
+
var _chunkNT4VJR4Ucjs = require('./chunk-NT4VJR4U.cjs');
|
|
20
|
+
require('./chunk-U25P467T.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 = _chunk4JC5QN5Rcjs.build; exports.clean = _chunkBP56RAZ2cjs.clean; exports.cleanDirectories = _chunkBP56RAZ2cjs.cleanDirectories; exports.cleanOutputPath = _chunk4JC5QN5Rcjs.cleanOutputPath; exports.copyBuildAssets = _chunk4JC5QN5Rcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkNT4VJR4Ucjs.createTsCompilerOptions; exports.executeUnbuild = _chunk4JC5QN5Rcjs.executeUnbuild; exports.generatePackageJson = _chunk4JC5QN5Rcjs.generatePackageJson; exports.loadConfig = _chunkNT4VJR4Ucjs.loadConfig; exports.resolveOptions = _chunk4JC5QN5Rcjs.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-BKVWUVJ4.js";
|
|
9
9
|
import {
|
|
10
10
|
clean,
|
|
11
11
|
cleanDirectories
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PUKULGMA.js";
|
|
13
13
|
import "./chunk-GGNOJ77I.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-XJRI5PEK.js";
|
|
15
|
+
import "./chunk-FFUNE74Q.js";
|
|
16
16
|
import {
|
|
17
17
|
createTsCompilerOptions,
|
|
18
18
|
loadConfig
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-JDSJJPKN.js";
|
|
20
|
+
import "./chunk-UTPDCL5O.js";
|
|
21
21
|
import "./chunk-3RG5ZIWI.js";
|
|
22
22
|
export {
|
|
23
23
|
build,
|
package/dist/plugins/analyze.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkG2KGWCMTcjs = require('../chunk-G2KGWCMT.cjs');
|
|
4
|
+
require('../chunk-U25P467T.cjs');
|
|
5
5
|
require('../chunk-OBGZSXTJ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.analyzePlugin =
|
|
8
|
+
exports.analyzePlugin = _chunkG2KGWCMTcjs.analyzePlugin;
|
package/dist/plugins/analyze.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkC7PT2TGOcjs = require('../chunk-C7PT2TGO.cjs');
|
|
4
|
+
require('../chunk-U25P467T.cjs');
|
|
5
5
|
require('../chunk-OBGZSXTJ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.onErrorPlugin =
|
|
8
|
+
exports.onErrorPlugin = _chunkC7PT2TGOcjs.onErrorPlugin;
|
package/dist/plugins/on-error.js
CHANGED
package/dist/plugins/tsc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkNT4VJR4Ucjs = require('../chunk-NT4VJR4U.cjs');
|
|
4
|
+
require('../chunk-U25P467T.cjs');
|
|
5
5
|
require('../chunk-OBGZSXTJ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.tscPlugin =
|
|
8
|
+
exports.tscPlugin = _chunkNT4VJR4Ucjs.tscPlugin;
|
package/dist/plugins/tsc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/unbuild",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.81",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
"typescript": { "optional": false }
|
|
148
148
|
},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"@storm-software/build-tools": "^0.158.
|
|
151
|
-
"@storm-software/config": "^1.135.
|
|
152
|
-
"@storm-software/config-tools": "^1.
|
|
150
|
+
"@storm-software/build-tools": "^0.158.81",
|
|
151
|
+
"@storm-software/config": "^1.135.1",
|
|
152
|
+
"@storm-software/config-tools": "^1.189.0",
|
|
153
153
|
"commander": "^12.1.0",
|
|
154
154
|
"defu": "6.1.4",
|
|
155
155
|
"esbuild": "^0.25.12",
|
|
@@ -171,5 +171,5 @@
|
|
|
171
171
|
},
|
|
172
172
|
"publishConfig": { "access": "public" },
|
|
173
173
|
"sideEffects": false,
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "0305bdb839af50999ab4680248db5dd2c4994ef3"
|
|
175
175
|
}
|