@storm-software/build-tools 0.135.6 → 0.136.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/dist/{chunk-OZZ4PV5Q.mjs → chunk-4CEXR3WS.mjs} +1 -1
- package/dist/{chunk-OOTITTRD.mjs → chunk-4QSSCZ4Z.mjs} +1 -1
- package/dist/{chunk-DIPQPQCV.js → chunk-6LPGL3E4.js} +2 -2
- package/dist/{chunk-OWHNR6AR.mjs → chunk-AMQI4RIK.mjs} +11 -37
- package/dist/{chunk-F4IA5EOZ.js → chunk-BIVPMVHQ.js} +42 -42
- package/dist/{chunk-NSSZFPK3.js → chunk-DNAOERFD.js} +52 -57
- package/dist/{chunk-YZWFPYXZ.js → chunk-DZ22WFPY.js} +8 -8
- package/dist/{chunk-RLC4K7JE.mjs → chunk-E6JPW774.mjs} +51 -56
- package/dist/{chunk-SX4QCTRO.js → chunk-FJUDK5FI.js} +5 -5
- package/dist/{chunk-IZFBLO57.mjs → chunk-KJY2LZUC.mjs} +1 -1
- package/dist/{chunk-IOSCJN6Z.mjs → chunk-QE75GUF6.mjs} +1 -1
- package/dist/{chunk-GZBLAV5N.mjs → chunk-ULC227WD.mjs} +1 -1
- package/dist/chunk-VKRZOCAB.js +67 -0
- package/dist/{chunk-4P3AQZVE.js → chunk-YHNGJ2PU.js} +8 -8
- package/dist/index.js +9 -9
- package/dist/index.mjs +9 -9
- package/dist/plugins/analyze.js +3 -3
- package/dist/plugins/analyze.mjs +2 -2
- package/dist/plugins/index.js +4 -4
- package/dist/plugins/index.mjs +3 -3
- package/dist/plugins/ts-resolve.js +3 -3
- package/dist/plugins/ts-resolve.mjs +2 -2
- package/dist/utilities/copy-assets.d.mts +1 -1
- package/dist/utilities/copy-assets.d.ts +1 -1
- package/dist/utilities/copy-assets.js +3 -4
- package/dist/utilities/copy-assets.mjs +2 -3
- package/dist/utilities/generate-package-json.js +3 -3
- package/dist/utilities/generate-package-json.mjs +2 -2
- package/dist/utilities/get-entry-points.js +3 -3
- package/dist/utilities/get-entry-points.mjs +2 -2
- package/dist/utilities/index.js +7 -7
- package/dist/utilities/index.mjs +7 -7
- package/dist/utilities/read-nx-config.js +3 -3
- package/dist/utilities/read-nx-config.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-H37GZ5HC.js +0 -93
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDNAOERFDjs = require('./chunk-DNAOERFD.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -30,7 +30,7 @@ function analyze() {
|
|
|
30
30
|
renderChunk(source, chunk) {
|
|
31
31
|
const sourceBytes = formatBytes(source.length);
|
|
32
32
|
const fileName = chunk.fileName;
|
|
33
|
-
|
|
33
|
+
_chunkDNAOERFDjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
|
-
readNxConfig
|
|
3
|
-
} from "./chunk-OOTITTRD.mjs";
|
|
4
|
-
import {
|
|
5
|
-
isVerbose,
|
|
6
2
|
joinPaths,
|
|
7
3
|
writeDebug,
|
|
8
4
|
writeTrace
|
|
9
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-E6JPW774.mjs";
|
|
10
6
|
import {
|
|
11
7
|
__name
|
|
12
8
|
} from "./chunk-O6YSETKJ.mjs";
|
|
13
9
|
|
|
14
10
|
// src/utilities/copy-assets.ts
|
|
15
|
-
import {
|
|
16
|
-
import { copyAssets as copyAssetsBase } from "@nx/js";
|
|
11
|
+
import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
|
|
17
12
|
import { glob } from "glob";
|
|
18
13
|
import { readFile, writeFile } from "node:fs/promises";
|
|
19
|
-
var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot,
|
|
14
|
+
var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
|
|
20
15
|
const pendingAssets = Array.from(assets ?? []);
|
|
21
16
|
pendingAssets.push({
|
|
22
|
-
input:
|
|
17
|
+
input: projectRoot,
|
|
23
18
|
glob: "*.md",
|
|
24
19
|
output: "."
|
|
25
20
|
});
|
|
26
21
|
pendingAssets.push({
|
|
27
|
-
input:
|
|
22
|
+
input: ".",
|
|
28
23
|
glob: "LICENSE",
|
|
29
24
|
output: "."
|
|
30
25
|
});
|
|
@@ -42,36 +37,15 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
|
|
|
42
37
|
output: "src/"
|
|
43
38
|
});
|
|
44
39
|
}
|
|
45
|
-
const nxJson = readNxConfig(config.workspaceRoot);
|
|
46
|
-
const projectGraph = readCachedProjectGraph();
|
|
47
|
-
const projectsConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
|
|
48
|
-
if (!projectsConfigurations?.projects?.[projectName]) {
|
|
49
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
50
|
-
}
|
|
51
|
-
const buildTarget = projectsConfigurations.projects[projectName].targets?.build;
|
|
52
|
-
if (!buildTarget) {
|
|
53
|
-
throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${joinPaths(projectRoot, "project.json")}`);
|
|
54
|
-
}
|
|
55
40
|
writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
|
|
56
41
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
outputPath
|
|
61
|
-
|
|
62
|
-
root: config.workspaceRoot,
|
|
63
|
-
targetName: "build",
|
|
64
|
-
target: buildTarget,
|
|
65
|
-
projectName,
|
|
66
|
-
projectGraph,
|
|
67
|
-
projectsConfigurations,
|
|
68
|
-
nxJsonConfiguration: nxJson,
|
|
69
|
-
cwd: config.workspaceRoot,
|
|
70
|
-
isVerbose: isVerbose(config.logLevel)
|
|
42
|
+
const assetHandler = new CopyAssetsHandler({
|
|
43
|
+
projectDir: projectRoot,
|
|
44
|
+
rootDir: config.workspaceRoot,
|
|
45
|
+
outputDir: outputPath,
|
|
46
|
+
assets: pendingAssets
|
|
71
47
|
});
|
|
72
|
-
|
|
73
|
-
throw new Error("The Build process failed trying to copy assets");
|
|
74
|
-
}
|
|
48
|
+
await assetHandler.processAllAssetsOnce();
|
|
75
49
|
if (includeSrc === true) {
|
|
76
50
|
writeDebug(`\u{1F4DD} Adding banner and writing source files: ${joinPaths(outputPath, "src")}`, config);
|
|
77
51
|
const files = await glob([
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkDNAOERFDjs = require('./chunk-DNAOERFD.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -23,7 +23,7 @@ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
|
23
23
|
var _c12 = require('c12');
|
|
24
24
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
25
25
|
var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
26
|
-
const workspacePath = filePath ||
|
|
26
|
+
const workspacePath = filePath || _chunkDNAOERFDjs.findWorkspaceRoot.call(void 0, filePath);
|
|
27
27
|
const configs = await Promise.all([
|
|
28
28
|
_c12.loadConfig.call(void 0, {
|
|
29
29
|
cwd: workspacePath,
|
|
@@ -32,7 +32,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
32
32
|
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
33
33
|
jitiOptions: {
|
|
34
34
|
debug: false,
|
|
35
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
35
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkDNAOERFDjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
36
36
|
},
|
|
37
37
|
...options
|
|
38
38
|
}),
|
|
@@ -43,7 +43,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
43
43
|
envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
|
|
44
44
|
jitiOptions: {
|
|
45
45
|
debug: false,
|
|
46
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
46
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkDNAOERFDjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
47
47
|
},
|
|
48
48
|
configFile: fileName,
|
|
49
49
|
...options
|
|
@@ -52,12 +52,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
52
52
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
53
53
|
}, "getConfigFileByName");
|
|
54
54
|
var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
55
|
-
const workspacePath = filePath ? filePath :
|
|
55
|
+
const workspacePath = filePath ? filePath : _chunkDNAOERFDjs.findWorkspaceRoot.call(void 0, filePath);
|
|
56
56
|
const result = await getConfigFileByName("storm", workspacePath);
|
|
57
57
|
let config = result.config;
|
|
58
58
|
const configFile = result.configFile;
|
|
59
59
|
if (config && configFile && Object.keys(config).length > 0) {
|
|
60
|
-
|
|
60
|
+
_chunkDNAOERFDjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
61
61
|
logLevel: "all"
|
|
62
62
|
});
|
|
63
63
|
}
|
|
@@ -65,7 +65,7 @@ var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (
|
|
|
65
65
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
66
66
|
for (const result2 of results) {
|
|
67
67
|
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
68
|
-
|
|
68
|
+
_chunkDNAOERFDjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
69
69
|
logLevel: "all"
|
|
70
70
|
});
|
|
71
71
|
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
@@ -112,15 +112,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
|
|
|
112
112
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
113
113
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
114
114
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
115
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
116
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
115
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
116
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
117
117
|
directories: {
|
|
118
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
119
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
120
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
121
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
122
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
123
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
118
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
119
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
120
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
121
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
122
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
123
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
124
124
|
},
|
|
125
125
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
126
126
|
env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -143,23 +143,23 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
|
|
|
143
143
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
144
144
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
145
145
|
},
|
|
146
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
146
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkDNAOERFDjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
147
147
|
};
|
|
148
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
148
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkDNAOERFDjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
149
149
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
150
150
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
151
151
|
return ret;
|
|
152
152
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
153
|
-
if (config.docs ===
|
|
154
|
-
if (config.homepage ===
|
|
155
|
-
config.docs = `${
|
|
153
|
+
if (config.docs === _chunkDNAOERFDjs.STORM_DEFAULT_DOCS) {
|
|
154
|
+
if (config.homepage === _chunkDNAOERFDjs.STORM_DEFAULT_HOMEPAGE) {
|
|
155
|
+
config.docs = `${_chunkDNAOERFDjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
156
156
|
} else {
|
|
157
157
|
config.docs = `${config.homepage}/docs`;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
if (config.licensing ===
|
|
161
|
-
if (config.homepage ===
|
|
162
|
-
config.licensing = `${
|
|
160
|
+
if (config.licensing === _chunkDNAOERFDjs.STORM_DEFAULT_LICENSING) {
|
|
161
|
+
if (config.homepage === _chunkDNAOERFDjs.STORM_DEFAULT_HOMEPAGE) {
|
|
162
|
+
config.licensing = `${_chunkDNAOERFDjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
163
163
|
} else {
|
|
164
164
|
config.licensing = `${config.homepage}/docs`;
|
|
165
165
|
}
|
|
@@ -297,31 +297,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
|
|
|
297
297
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
298
298
|
}
|
|
299
299
|
if (config.configFile) {
|
|
300
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
300
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.configFile);
|
|
301
301
|
}
|
|
302
302
|
if (config.workspaceRoot) {
|
|
303
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
304
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
305
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
303
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
304
|
+
process.env.NX_WORKSPACE_ROOT = _chunkDNAOERFDjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
305
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkDNAOERFDjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
306
306
|
}
|
|
307
307
|
if (config.directories) {
|
|
308
308
|
if (!config.skipCache && config.directories.cache) {
|
|
309
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
309
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.cache);
|
|
310
310
|
}
|
|
311
311
|
if (config.directories.data) {
|
|
312
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
312
|
+
process.env[`${prefix}DATA_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.data);
|
|
313
313
|
}
|
|
314
314
|
if (config.directories.config) {
|
|
315
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
315
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.config);
|
|
316
316
|
}
|
|
317
317
|
if (config.directories.temp) {
|
|
318
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
318
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.temp);
|
|
319
319
|
}
|
|
320
320
|
if (config.directories.log) {
|
|
321
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
321
|
+
process.env[`${prefix}LOG_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.log);
|
|
322
322
|
}
|
|
323
323
|
if (config.directories.build) {
|
|
324
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
324
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.build);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
if (config.skipCache !== void 0) {
|
|
@@ -375,8 +375,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
|
|
|
375
375
|
if (config.logLevel) {
|
|
376
376
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
377
377
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
378
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
379
|
-
process.env.RUST_BACKTRACE =
|
|
378
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkDNAOERFDjs.getLogLevel.call(void 0, config.logLevel) >= _chunkDNAOERFDjs.LogLevel.DEBUG ? true : false);
|
|
379
|
+
process.env.RUST_BACKTRACE = _chunkDNAOERFDjs.getLogLevel.call(void 0, config.logLevel) >= _chunkDNAOERFDjs.LogLevel.DEBUG ? "full" : "none";
|
|
380
380
|
}
|
|
381
381
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
382
382
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
@@ -489,17 +489,17 @@ var createStormConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, asy
|
|
|
489
489
|
if (!_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) || !_optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
490
490
|
let _workspaceRoot = workspaceRoot;
|
|
491
491
|
if (!_workspaceRoot) {
|
|
492
|
-
_workspaceRoot =
|
|
492
|
+
_workspaceRoot = _chunkDNAOERFDjs.findWorkspaceRoot.call(void 0, );
|
|
493
493
|
}
|
|
494
494
|
const configEnv = getConfigEnv();
|
|
495
|
-
const defaultConfig = await
|
|
495
|
+
const defaultConfig = await _chunkDNAOERFDjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
496
496
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
497
497
|
if (!configFile && !skipLogs) {
|
|
498
|
-
|
|
498
|
+
_chunkDNAOERFDjs.writeWarning.call(void 0, "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
|
|
499
499
|
logLevel: "all"
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
result = await
|
|
502
|
+
result = await _chunkDNAOERFDjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
503
503
|
result.workspaceRoot ??= _workspaceRoot;
|
|
504
504
|
} else {
|
|
505
505
|
result = _static_cache.data;
|
|
@@ -534,8 +534,8 @@ var loadStormConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
534
534
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
535
535
|
setConfigEnv(config);
|
|
536
536
|
if (!skipLogs) {
|
|
537
|
-
|
|
538
|
-
${
|
|
537
|
+
_chunkDNAOERFDjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
|
|
538
|
+
${_chunkDNAOERFDjs.formatLogMessage.call(void 0, config)}`, config);
|
|
539
539
|
}
|
|
540
540
|
return config;
|
|
541
541
|
}, "loadStormConfig");
|
|
@@ -554,7 +554,7 @@ var readNxConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (w
|
|
|
554
554
|
const config = await getConfig();
|
|
555
555
|
rootDir = config.workspaceRoot;
|
|
556
556
|
}
|
|
557
|
-
const nxJsonPath =
|
|
557
|
+
const nxJsonPath = _chunkDNAOERFDjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
558
558
|
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
559
559
|
throw new Error("Cannot find project.json configuration");
|
|
560
560
|
}
|
|
@@ -116,61 +116,6 @@ var LogLevelLabel = {
|
|
|
116
116
|
ALL: "all"
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
// ../config-tools/src/logger/get-log-level.ts
|
|
120
|
-
var getLogLevel = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (label) => {
|
|
121
|
-
switch (label) {
|
|
122
|
-
case "all":
|
|
123
|
-
return LogLevel.ALL;
|
|
124
|
-
case "trace":
|
|
125
|
-
return LogLevel.TRACE;
|
|
126
|
-
case "debug":
|
|
127
|
-
return LogLevel.DEBUG;
|
|
128
|
-
case "info":
|
|
129
|
-
return LogLevel.INFO;
|
|
130
|
-
case "warn":
|
|
131
|
-
return LogLevel.WARN;
|
|
132
|
-
case "error":
|
|
133
|
-
return LogLevel.ERROR;
|
|
134
|
-
case "fatal":
|
|
135
|
-
return LogLevel.FATAL;
|
|
136
|
-
case "silent":
|
|
137
|
-
return LogLevel.SILENT;
|
|
138
|
-
default:
|
|
139
|
-
return LogLevel.INFO;
|
|
140
|
-
}
|
|
141
|
-
}, "getLogLevel");
|
|
142
|
-
var getLogLevelLabel = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
|
|
143
|
-
if (logLevel >= LogLevel.ALL) {
|
|
144
|
-
return LogLevelLabel.ALL;
|
|
145
|
-
}
|
|
146
|
-
if (logLevel >= LogLevel.TRACE) {
|
|
147
|
-
return LogLevelLabel.TRACE;
|
|
148
|
-
}
|
|
149
|
-
if (logLevel >= LogLevel.DEBUG) {
|
|
150
|
-
return LogLevelLabel.DEBUG;
|
|
151
|
-
}
|
|
152
|
-
if (logLevel >= LogLevel.INFO) {
|
|
153
|
-
return LogLevelLabel.INFO;
|
|
154
|
-
}
|
|
155
|
-
if (logLevel >= LogLevel.WARN) {
|
|
156
|
-
return LogLevelLabel.WARN;
|
|
157
|
-
}
|
|
158
|
-
if (logLevel >= LogLevel.ERROR) {
|
|
159
|
-
return LogLevelLabel.ERROR;
|
|
160
|
-
}
|
|
161
|
-
if (logLevel >= LogLevel.FATAL) {
|
|
162
|
-
return LogLevelLabel.FATAL;
|
|
163
|
-
}
|
|
164
|
-
if (logLevel <= LogLevel.SILENT) {
|
|
165
|
-
return LogLevelLabel.SILENT;
|
|
166
|
-
}
|
|
167
|
-
return LogLevelLabel.INFO;
|
|
168
|
-
}, "getLogLevelLabel");
|
|
169
|
-
var isVerbose = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
|
|
170
|
-
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
171
|
-
return logLevel >= LogLevel.DEBUG;
|
|
172
|
-
}, "isVerbose");
|
|
173
|
-
|
|
174
119
|
// ../config/src/constants.ts
|
|
175
120
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
176
121
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
@@ -480,6 +425,57 @@ var formatTimestamp = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (date
|
|
|
480
425
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
481
426
|
}, "formatTimestamp");
|
|
482
427
|
|
|
428
|
+
// ../config-tools/src/logger/get-log-level.ts
|
|
429
|
+
var getLogLevel = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (label) => {
|
|
430
|
+
switch (label) {
|
|
431
|
+
case "all":
|
|
432
|
+
return LogLevel.ALL;
|
|
433
|
+
case "trace":
|
|
434
|
+
return LogLevel.TRACE;
|
|
435
|
+
case "debug":
|
|
436
|
+
return LogLevel.DEBUG;
|
|
437
|
+
case "info":
|
|
438
|
+
return LogLevel.INFO;
|
|
439
|
+
case "warn":
|
|
440
|
+
return LogLevel.WARN;
|
|
441
|
+
case "error":
|
|
442
|
+
return LogLevel.ERROR;
|
|
443
|
+
case "fatal":
|
|
444
|
+
return LogLevel.FATAL;
|
|
445
|
+
case "silent":
|
|
446
|
+
return LogLevel.SILENT;
|
|
447
|
+
default:
|
|
448
|
+
return LogLevel.INFO;
|
|
449
|
+
}
|
|
450
|
+
}, "getLogLevel");
|
|
451
|
+
var getLogLevelLabel = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
|
|
452
|
+
if (logLevel >= LogLevel.ALL) {
|
|
453
|
+
return LogLevelLabel.ALL;
|
|
454
|
+
}
|
|
455
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
456
|
+
return LogLevelLabel.TRACE;
|
|
457
|
+
}
|
|
458
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
459
|
+
return LogLevelLabel.DEBUG;
|
|
460
|
+
}
|
|
461
|
+
if (logLevel >= LogLevel.INFO) {
|
|
462
|
+
return LogLevelLabel.INFO;
|
|
463
|
+
}
|
|
464
|
+
if (logLevel >= LogLevel.WARN) {
|
|
465
|
+
return LogLevelLabel.WARN;
|
|
466
|
+
}
|
|
467
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
468
|
+
return LogLevelLabel.ERROR;
|
|
469
|
+
}
|
|
470
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
471
|
+
return LogLevelLabel.FATAL;
|
|
472
|
+
}
|
|
473
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
474
|
+
return LogLevelLabel.SILENT;
|
|
475
|
+
}
|
|
476
|
+
return LogLevelLabel.INFO;
|
|
477
|
+
}, "getLogLevelLabel");
|
|
478
|
+
|
|
483
479
|
// ../config-tools/src/logger/console.ts
|
|
484
480
|
var getLogFn = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
485
481
|
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;
|
|
@@ -590,5 +586,4 @@ var _isFunction = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (value) =
|
|
|
590
586
|
|
|
591
587
|
|
|
592
588
|
|
|
593
|
-
|
|
594
|
-
exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.StormConfigSchema = StormConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.formatLogMessage = formatLogMessage;
|
|
589
|
+
exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.StormConfigSchema = StormConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.formatLogMessage = formatLogMessage;
|
|
@@ -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 _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 _chunkDNAOERFDjs = require('./chunk-DNAOERFD.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -25,8 +25,8 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
25
25
|
return {
|
|
26
26
|
name: `storm:ts-resolve`,
|
|
27
27
|
async resolveId(source, importer) {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
_chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - resolveId source: ${source}`);
|
|
29
|
+
_chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - resolveId importer: ${importer}`);
|
|
30
30
|
if (!importer) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
@@ -37,7 +37,7 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
39
39
|
if (ignore && ignore(source, importer)) {
|
|
40
|
-
|
|
40
|
+
_chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - ignored ${source}`);
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
if (resolveOnly) {
|
|
@@ -46,12 +46,12 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
46
46
|
return v.test(source);
|
|
47
47
|
});
|
|
48
48
|
if (!shouldResolve) {
|
|
49
|
-
|
|
49
|
+
_chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - skipped by matching resolveOnly ${source}`);
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
if (_path2.default.isAbsolute(source)) {
|
|
54
|
-
|
|
54
|
+
_chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - skipped absolute path: ${source}`);
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
57
|
const basedir = importer ? await _fs2.default.promises.realpath(_path2.default.dirname(importer)) : process.cwd();
|
|
@@ -83,10 +83,10 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
if (id) {
|
|
86
|
-
|
|
86
|
+
_chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - resolved ${source} to ${id}`);
|
|
87
87
|
return id;
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
_chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - mark ${source} as external`);
|
|
90
90
|
return false;
|
|
91
91
|
}
|
|
92
92
|
};
|
|
@@ -116,61 +116,6 @@ var LogLevelLabel = {
|
|
|
116
116
|
ALL: "all"
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
// ../config-tools/src/logger/get-log-level.ts
|
|
120
|
-
var getLogLevel = /* @__PURE__ */ __name((label) => {
|
|
121
|
-
switch (label) {
|
|
122
|
-
case "all":
|
|
123
|
-
return LogLevel.ALL;
|
|
124
|
-
case "trace":
|
|
125
|
-
return LogLevel.TRACE;
|
|
126
|
-
case "debug":
|
|
127
|
-
return LogLevel.DEBUG;
|
|
128
|
-
case "info":
|
|
129
|
-
return LogLevel.INFO;
|
|
130
|
-
case "warn":
|
|
131
|
-
return LogLevel.WARN;
|
|
132
|
-
case "error":
|
|
133
|
-
return LogLevel.ERROR;
|
|
134
|
-
case "fatal":
|
|
135
|
-
return LogLevel.FATAL;
|
|
136
|
-
case "silent":
|
|
137
|
-
return LogLevel.SILENT;
|
|
138
|
-
default:
|
|
139
|
-
return LogLevel.INFO;
|
|
140
|
-
}
|
|
141
|
-
}, "getLogLevel");
|
|
142
|
-
var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
|
|
143
|
-
if (logLevel >= LogLevel.ALL) {
|
|
144
|
-
return LogLevelLabel.ALL;
|
|
145
|
-
}
|
|
146
|
-
if (logLevel >= LogLevel.TRACE) {
|
|
147
|
-
return LogLevelLabel.TRACE;
|
|
148
|
-
}
|
|
149
|
-
if (logLevel >= LogLevel.DEBUG) {
|
|
150
|
-
return LogLevelLabel.DEBUG;
|
|
151
|
-
}
|
|
152
|
-
if (logLevel >= LogLevel.INFO) {
|
|
153
|
-
return LogLevelLabel.INFO;
|
|
154
|
-
}
|
|
155
|
-
if (logLevel >= LogLevel.WARN) {
|
|
156
|
-
return LogLevelLabel.WARN;
|
|
157
|
-
}
|
|
158
|
-
if (logLevel >= LogLevel.ERROR) {
|
|
159
|
-
return LogLevelLabel.ERROR;
|
|
160
|
-
}
|
|
161
|
-
if (logLevel >= LogLevel.FATAL) {
|
|
162
|
-
return LogLevelLabel.FATAL;
|
|
163
|
-
}
|
|
164
|
-
if (logLevel <= LogLevel.SILENT) {
|
|
165
|
-
return LogLevelLabel.SILENT;
|
|
166
|
-
}
|
|
167
|
-
return LogLevelLabel.INFO;
|
|
168
|
-
}, "getLogLevelLabel");
|
|
169
|
-
var isVerbose = /* @__PURE__ */ __name((label = LogLevelLabel.SILENT) => {
|
|
170
|
-
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
171
|
-
return logLevel >= LogLevel.DEBUG;
|
|
172
|
-
}, "isVerbose");
|
|
173
|
-
|
|
174
119
|
// ../config/src/constants.ts
|
|
175
120
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
176
121
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
@@ -480,6 +425,57 @@ var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date())
|
|
|
480
425
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
481
426
|
}, "formatTimestamp");
|
|
482
427
|
|
|
428
|
+
// ../config-tools/src/logger/get-log-level.ts
|
|
429
|
+
var getLogLevel = /* @__PURE__ */ __name((label) => {
|
|
430
|
+
switch (label) {
|
|
431
|
+
case "all":
|
|
432
|
+
return LogLevel.ALL;
|
|
433
|
+
case "trace":
|
|
434
|
+
return LogLevel.TRACE;
|
|
435
|
+
case "debug":
|
|
436
|
+
return LogLevel.DEBUG;
|
|
437
|
+
case "info":
|
|
438
|
+
return LogLevel.INFO;
|
|
439
|
+
case "warn":
|
|
440
|
+
return LogLevel.WARN;
|
|
441
|
+
case "error":
|
|
442
|
+
return LogLevel.ERROR;
|
|
443
|
+
case "fatal":
|
|
444
|
+
return LogLevel.FATAL;
|
|
445
|
+
case "silent":
|
|
446
|
+
return LogLevel.SILENT;
|
|
447
|
+
default:
|
|
448
|
+
return LogLevel.INFO;
|
|
449
|
+
}
|
|
450
|
+
}, "getLogLevel");
|
|
451
|
+
var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
|
|
452
|
+
if (logLevel >= LogLevel.ALL) {
|
|
453
|
+
return LogLevelLabel.ALL;
|
|
454
|
+
}
|
|
455
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
456
|
+
return LogLevelLabel.TRACE;
|
|
457
|
+
}
|
|
458
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
459
|
+
return LogLevelLabel.DEBUG;
|
|
460
|
+
}
|
|
461
|
+
if (logLevel >= LogLevel.INFO) {
|
|
462
|
+
return LogLevelLabel.INFO;
|
|
463
|
+
}
|
|
464
|
+
if (logLevel >= LogLevel.WARN) {
|
|
465
|
+
return LogLevelLabel.WARN;
|
|
466
|
+
}
|
|
467
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
468
|
+
return LogLevelLabel.ERROR;
|
|
469
|
+
}
|
|
470
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
471
|
+
return LogLevelLabel.FATAL;
|
|
472
|
+
}
|
|
473
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
474
|
+
return LogLevelLabel.SILENT;
|
|
475
|
+
}
|
|
476
|
+
return LogLevelLabel.INFO;
|
|
477
|
+
}, "getLogLevelLabel");
|
|
478
|
+
|
|
483
479
|
// ../config-tools/src/logger/console.ts
|
|
484
480
|
var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
485
481
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
@@ -585,7 +581,6 @@ export {
|
|
|
585
581
|
getDefaultConfig,
|
|
586
582
|
getLogLevel,
|
|
587
583
|
getLogLevelLabel,
|
|
588
|
-
isVerbose,
|
|
589
584
|
writeWarning,
|
|
590
585
|
writeInfo,
|
|
591
586
|
writeDebug,
|