@storm-software/config-tools 1.176.22 → 1.176.24
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/config.cjs +0 -1
- package/bin/config.js +0 -1
- package/dist/{chunk-EVOHJKUO.cjs → chunk-2MJFF2QM.cjs} +2 -2
- package/dist/{chunk-UHSAPVE4.js → chunk-3MKAYQRF.js} +1 -1
- package/dist/{chunk-SHD7ZUSQ.js → chunk-5OGHC7QD.js} +1 -1
- package/dist/{chunk-C5L7VSBR.js → chunk-6NBMHDNI.js} +1 -1
- package/dist/{chunk-KH5SONKW.cjs → chunk-AAV6DBHX.cjs} +2 -2
- package/dist/{chunk-LKCXHEY6.cjs → chunk-ACB64AEV.cjs} +15 -15
- package/dist/{chunk-7MBEC23I.js → chunk-CVKKSYV5.js} +1 -1
- package/dist/{chunk-YNDGTWLY.cjs → chunk-GHZFMAKY.cjs} +9 -9
- package/dist/{chunk-QLJYCKMD.cjs → chunk-J7BFGUIX.cjs} +2 -2
- package/dist/{chunk-BEFQ5B4E.js → chunk-KUXWZKYD.js} +2 -2
- package/dist/{chunk-ZNODVZNQ.cjs → chunk-MFDE3ORO.cjs} +9 -9
- package/dist/{chunk-U436743U.cjs → chunk-NOTWBXXM.cjs} +0 -1
- package/dist/{chunk-UCO4HZFN.cjs → chunk-OGHIEGOH.cjs} +4 -4
- package/dist/{chunk-YEFBKZON.js → chunk-QH3GLANP.js} +4 -4
- package/dist/{chunk-J2LN5PAX.cjs → chunk-S6WB7DH2.cjs} +6 -6
- package/dist/{chunk-2IFNLLUL.cjs → chunk-SONG2DAJ.cjs} +6 -6
- package/dist/{chunk-INZ6GCPT.cjs → chunk-SS4HVVIZ.cjs} +2 -2
- package/dist/{chunk-PTHGOJU6.js → chunk-SZXSPLS6.js} +0 -1
- package/dist/{chunk-CL6NTH3D.js → chunk-TGJMLB3M.js} +1 -1
- package/dist/{chunk-ENEFXS5D.js → chunk-TIGZFOWR.js} +1 -1
- package/dist/{chunk-5DA26BV4.js → chunk-XKVIMZJJ.js} +2 -2
- package/dist/{chunk-HYJVQZYZ.js → chunk-ZVT775K3.js} +1 -1
- package/dist/config-file/get-config-file.cjs +10 -10
- package/dist/config-file/get-config-file.js +9 -9
- package/dist/config-file/index.cjs +10 -10
- package/dist/config-file/index.js +9 -9
- package/dist/create-storm-config.cjs +11 -11
- package/dist/create-storm-config.js +10 -10
- package/dist/get-config.cjs +12 -12
- package/dist/get-config.js +11 -11
- package/dist/index.cjs +12 -12
- package/dist/index.js +11 -11
- package/dist/logger/console.cjs +4 -4
- package/dist/logger/console.js +3 -3
- package/dist/logger/create-logger.cjs +5 -5
- package/dist/logger/create-logger.js +4 -4
- package/dist/logger/index.cjs +5 -5
- package/dist/logger/index.js +4 -4
- package/dist/utilities/apply-workspace-tokens.cjs +3 -3
- package/dist/utilities/apply-workspace-tokens.js +2 -2
- package/dist/utilities/colors.cjs +4 -4
- package/dist/utilities/colors.js +3 -3
- package/dist/utilities/find-workspace-root.cjs +2 -2
- package/dist/utilities/find-workspace-root.js +1 -1
- package/dist/utilities/get-default-config.cjs +3 -3
- package/dist/utilities/get-default-config.js +2 -2
- package/dist/utilities/index.cjs +9 -9
- package/dist/utilities/index.js +8 -8
- package/dist/utilities/process-handler.cjs +5 -5
- package/dist/utilities/process-handler.js +4 -4
- package/dist/utilities/toml.cjs +6 -6
- package/dist/utilities/toml.js +5 -5
- package/package.json +3 -3
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 -->
|
package/bin/config.cjs
CHANGED
|
@@ -226,7 +226,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
226
226
|
|
|
227
227
|
// src/utilities/find-workspace-root.ts
|
|
228
228
|
var rootFiles = [
|
|
229
|
-
"storm-workspace.json",
|
|
230
229
|
"storm-workspace.json",
|
|
231
230
|
"storm-workspace.yaml",
|
|
232
231
|
"storm-workspace.yml",
|
package/bin/config.js
CHANGED
|
@@ -196,7 +196,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
196
196
|
|
|
197
197
|
// src/utilities/find-workspace-root.ts
|
|
198
198
|
var rootFiles = [
|
|
199
|
-
"storm-workspace.json",
|
|
200
199
|
"storm-workspace.json",
|
|
201
200
|
"storm-workspace.yaml",
|
|
202
201
|
"storm-workspace.yml",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkAAV6DBHXcjs = require('./chunk-AAV6DBHX.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkLOY6ICHZcjs = require('./chunk-LOY6ICHZ.cjs');
|
|
@@ -20,7 +20,7 @@ var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
|
20
20
|
|
|
21
21
|
// src/logger/console.ts
|
|
22
22
|
var getLogFn = (logLevel = _chunkIRCFHYKZcjs.LogLevel.INFO, config = {}, _chalk = _chunkLOY6ICHZcjs.getChalk.call(void 0, )) => {
|
|
23
|
-
const colors = !_optionalChain([config, 'access', _2 => _2.colors, 'optionalAccess', _3 => _3.dark]) && !_optionalChain([config, 'access', _4 => _4.colors, 'optionalAccess', _5 => _5["base"]]) && !_optionalChain([config, 'access', _6 => _6.colors, 'optionalAccess', _7 => _7["base"], 'optionalAccess', _8 => _8.dark]) ?
|
|
23
|
+
const colors = !_optionalChain([config, 'access', _2 => _2.colors, 'optionalAccess', _3 => _3.dark]) && !_optionalChain([config, 'access', _4 => _4.colors, 'optionalAccess', _5 => _5["base"]]) && !_optionalChain([config, 'access', _6 => _6.colors, 'optionalAccess', _7 => _7["base"], 'optionalAccess', _8 => _8.dark]) ? _chunkAAV6DBHXcjs.DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) ? _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"]]) : _chunkAAV6DBHXcjs.DEFAULT_COLOR_CONFIG;
|
|
24
24
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || _chunkIRCFHYKZcjs.LogLevelLabel.INFO;
|
|
25
25
|
if (logLevel > _chunk4PX5UVANcjs.getLogLevel.call(void 0, configLogLevel) || logLevel <= _chunkIRCFHYKZcjs.LogLevel.SILENT || _chunk4PX5UVANcjs.getLogLevel.call(void 0, configLogLevel) <= _chunkIRCFHYKZcjs.LogLevel.SILENT) {
|
|
26
26
|
return (_) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkNOTWBXXMcjs = require('./chunk-NOTWBXXM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkM3REM2FUcjs = require('./chunk-M3REM2FU.cjs');
|
|
@@ -48,7 +48,7 @@ async function getPackageJsonConfig(root) {
|
|
|
48
48
|
let name = void 0;
|
|
49
49
|
let namespace = void 0;
|
|
50
50
|
let repository = void 0;
|
|
51
|
-
const workspaceRoot =
|
|
51
|
+
const workspaceRoot = _chunkNOTWBXXMcjs.findWorkspaceRoot.call(void 0, root);
|
|
52
52
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
53
53
|
const file = await _promises.readFile.call(void 0,
|
|
54
54
|
_chunkM3REM2FUcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _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 _chunkSONG2DAJcjs = require('./chunk-SONG2DAJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk2MJFF2QMcjs = require('./chunk-2MJFF2QM.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkAAV6DBHXcjs = require('./chunk-AAV6DBHX.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkNOTWBXXMcjs = require('./chunk-NOTWBXXM.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunk7GRIRHUQcjs = require('./chunk-7GRIRHUQ.cjs');
|
|
@@ -31,13 +31,13 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
31
31
|
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
32
32
|
let _workspaceRoot = workspaceRoot;
|
|
33
33
|
if (!_workspaceRoot) {
|
|
34
|
-
_workspaceRoot =
|
|
34
|
+
_workspaceRoot = _chunkNOTWBXXMcjs.findWorkspaceRoot.call(void 0, );
|
|
35
35
|
}
|
|
36
36
|
const configEnv = _chunkQGASWRUNcjs.getConfigEnv.call(void 0, );
|
|
37
|
-
const configFile = await
|
|
37
|
+
const configFile = await _chunkSONG2DAJcjs.getConfigFile.call(void 0, _workspaceRoot);
|
|
38
38
|
if (!configFile) {
|
|
39
39
|
if (!skipLogs) {
|
|
40
|
-
|
|
40
|
+
_chunk2MJFF2QMcjs.writeWarning.call(void 0,
|
|
41
41
|
"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",
|
|
42
42
|
{ logLevel: "all" }
|
|
43
43
|
);
|
|
@@ -46,14 +46,14 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
46
46
|
return void 0;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const defaultConfig = await
|
|
49
|
+
const defaultConfig = await _chunkAAV6DBHXcjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
50
50
|
const configInput = _defu2.default.call(void 0,
|
|
51
51
|
configEnv,
|
|
52
52
|
configFile,
|
|
53
53
|
defaultConfig
|
|
54
54
|
);
|
|
55
55
|
try {
|
|
56
|
-
result =
|
|
56
|
+
result = _chunkAAV6DBHXcjs.applyDefaultConfig.call(void 0,
|
|
57
57
|
await _schema.stormWorkspaceConfigSchema.parseAsync(configInput)
|
|
58
58
|
);
|
|
59
59
|
result.workspaceRoot ??= _workspaceRoot;
|
|
@@ -61,7 +61,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
61
61
|
throw new Error(
|
|
62
62
|
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _3 => _3.message]) ? `: ${error.message}` : ""}
|
|
63
63
|
|
|
64
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
64
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunk2MJFF2QMcjs.formatLogMessage.call(void 0,
|
|
65
65
|
configInput
|
|
66
66
|
)}`,
|
|
67
67
|
{
|
|
@@ -106,9 +106,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
106
106
|
);
|
|
107
107
|
_chunk7GRIRHUQcjs.setConfigEnv.call(void 0, config);
|
|
108
108
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
109
|
-
|
|
109
|
+
_chunk2MJFF2QMcjs.writeTrace.call(void 0,
|
|
110
110
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
111
|
-
${
|
|
111
|
+
${_chunk2MJFF2QMcjs.formatLogMessage.call(void 0, config)}`,
|
|
112
112
|
config
|
|
113
113
|
);
|
|
114
114
|
}
|
|
@@ -128,16 +128,16 @@ var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefa
|
|
|
128
128
|
}
|
|
129
129
|
_chunk7GRIRHUQcjs.setConfigEnv.call(void 0, config);
|
|
130
130
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
131
|
-
|
|
131
|
+
_chunk2MJFF2QMcjs.writeTrace.call(void 0,
|
|
132
132
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
133
|
-
${
|
|
133
|
+
${_chunk2MJFF2QMcjs.formatLogMessage.call(void 0, config)}`,
|
|
134
134
|
config
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
137
|
return config;
|
|
138
138
|
} catch (error) {
|
|
139
139
|
if (!skipLogs) {
|
|
140
|
-
|
|
140
|
+
_chunk2MJFF2QMcjs.writeWarning.call(void 0,
|
|
141
141
|
`\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`,
|
|
142
142
|
{ logLevel: "all" }
|
|
143
143
|
);
|
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2MJFF2QMcjs = require('./chunk-2MJFF2QM.cjs');
|
|
7
7
|
|
|
8
8
|
// src/utilities/process-handler.ts
|
|
9
9
|
var exitWithError = (config) => {
|
|
10
|
-
|
|
10
|
+
_chunk2MJFF2QMcjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
|
|
11
11
|
process.exit(1);
|
|
12
12
|
};
|
|
13
13
|
var exitWithSuccess = (config) => {
|
|
14
|
-
|
|
14
|
+
_chunk2MJFF2QMcjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
|
|
15
15
|
process.exit(0);
|
|
16
16
|
};
|
|
17
17
|
var handleProcess = (config) => {
|
|
18
|
-
|
|
18
|
+
_chunk2MJFF2QMcjs.writeTrace.call(void 0,
|
|
19
19
|
`Using the following arguments to process the script: ${process.argv.join(", ")}`,
|
|
20
20
|
config
|
|
21
21
|
);
|
|
22
22
|
process.on("unhandledRejection", (error) => {
|
|
23
|
-
|
|
23
|
+
_chunk2MJFF2QMcjs.writeError.call(void 0,
|
|
24
24
|
`An Unhandled Rejection occurred while running the program: ${error}`,
|
|
25
25
|
config
|
|
26
26
|
);
|
|
27
27
|
exitWithError(config);
|
|
28
28
|
});
|
|
29
29
|
process.on("uncaughtException", (error) => {
|
|
30
|
-
|
|
30
|
+
_chunk2MJFF2QMcjs.writeError.call(void 0,
|
|
31
31
|
`An Uncaught Exception occurred while running the program: ${error.message}
|
|
32
32
|
Stacktrace: ${error.stack}`,
|
|
33
33
|
config
|
|
@@ -35,15 +35,15 @@ Stacktrace: ${error.stack}`,
|
|
|
35
35
|
exitWithError(config);
|
|
36
36
|
});
|
|
37
37
|
process.on("SIGTERM", (signal) => {
|
|
38
|
-
|
|
38
|
+
_chunk2MJFF2QMcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
39
39
|
exitWithError(config);
|
|
40
40
|
});
|
|
41
41
|
process.on("SIGINT", (signal) => {
|
|
42
|
-
|
|
42
|
+
_chunk2MJFF2QMcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
43
43
|
exitWithError(config);
|
|
44
44
|
});
|
|
45
45
|
process.on("SIGHUP", (signal) => {
|
|
46
|
-
|
|
46
|
+
_chunk2MJFF2QMcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
47
47
|
exitWithError(config);
|
|
48
48
|
});
|
|
49
49
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkNOTWBXXMcjs = require('./chunk-NOTWBXXM.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utilities/apply-workspace-tokens.ts
|
|
6
6
|
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
@@ -37,7 +37,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
37
37
|
if (result.includes("{workspaceRoot}")) {
|
|
38
38
|
result = result.replaceAll(
|
|
39
39
|
"{workspaceRoot}",
|
|
40
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => (
|
|
40
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _chunkNOTWBXXMcjs.findWorkspaceRoot.call(void 0, )))
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
return result;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadStormWorkspaceConfig,
|
|
3
3
|
tryLoadStormWorkspaceConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QH3GLANP.js";
|
|
5
5
|
import {
|
|
6
6
|
findWorkspaceRoot
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SZXSPLS6.js";
|
|
8
8
|
|
|
9
9
|
// src/get-config.ts
|
|
10
10
|
var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2MJFF2QMcjs = require('./chunk-2MJFF2QM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
@@ -9,13 +9,13 @@ var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
|
9
9
|
// src/logger/create-logger.ts
|
|
10
10
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
11
11
|
async function createLogger(config) {
|
|
12
|
-
const writeFatal =
|
|
13
|
-
const writeError =
|
|
14
|
-
const writeWarning =
|
|
15
|
-
const writeInfo =
|
|
16
|
-
const writeSuccess =
|
|
17
|
-
const writeDebug =
|
|
18
|
-
const writeTrace =
|
|
12
|
+
const writeFatal = _chunk2MJFF2QMcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.FATAL, config, _chalk2.default);
|
|
13
|
+
const writeError = _chunk2MJFF2QMcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.ERROR, config, _chalk2.default);
|
|
14
|
+
const writeWarning = _chunk2MJFF2QMcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.WARN, config, _chalk2.default);
|
|
15
|
+
const writeInfo = _chunk2MJFF2QMcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.INFO, config, _chalk2.default);
|
|
16
|
+
const writeSuccess = _chunk2MJFF2QMcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.SUCCESS, config, _chalk2.default);
|
|
17
|
+
const writeDebug = _chunk2MJFF2QMcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
|
|
18
|
+
const writeTrace = _chunk2MJFF2QMcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
|
|
19
19
|
return {
|
|
20
20
|
fatal: writeFatal,
|
|
21
21
|
error: writeError,
|
|
@@ -24,7 +24,7 @@ async function createLogger(config) {
|
|
|
24
24
|
success: writeSuccess,
|
|
25
25
|
debug: writeDebug,
|
|
26
26
|
trace: writeTrace,
|
|
27
|
-
getStopwatch:
|
|
27
|
+
getStopwatch: _chunk2MJFF2QMcjs.getStopwatch
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkAAV6DBHXcjs = require('./chunk-AAV6DBHX.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utilities/colors.ts
|
|
6
6
|
function getColorConfig(config) {
|
|
7
7
|
if (!_optionalChain([config, 'optionalAccess', _ => _.colors]) || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !_optionalChain([config, 'access', _2 => _2.colors, 'access', _3 => _3["base"], 'optionalAccess', _4 => _4["dark"]]))) {
|
|
8
|
-
return
|
|
8
|
+
return _chunkAAV6DBHXcjs.DEFAULT_COLOR_CONFIG;
|
|
9
9
|
}
|
|
10
10
|
if (config.colors["base"]) {
|
|
11
11
|
if (typeof config.colors["base"]["dark"] === "object") {
|
|
@@ -17,11 +17,11 @@ function getColorConfig(config) {
|
|
|
17
17
|
if (typeof config.colors["dark"] === "object") {
|
|
18
18
|
return config.colors["dark"];
|
|
19
19
|
}
|
|
20
|
-
return _nullishCoalesce(config.colors, () => (
|
|
20
|
+
return _nullishCoalesce(config.colors, () => ( _chunkAAV6DBHXcjs.DEFAULT_COLOR_CONFIG));
|
|
21
21
|
}
|
|
22
22
|
function getColor(key, config) {
|
|
23
23
|
const colors = getColorConfig(config);
|
|
24
|
-
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) ||
|
|
24
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || _chunkAAV6DBHXcjs.DEFAULT_COLOR_CONFIG["dark"][key] || _chunkAAV6DBHXcjs.DEFAULT_COLOR_CONFIG[key];
|
|
25
25
|
if (result) {
|
|
26
26
|
return result;
|
|
27
27
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XKVIMZJJ.js";
|
|
4
4
|
import {
|
|
5
5
|
formatLogMessage,
|
|
6
6
|
writeTrace,
|
|
7
7
|
writeWarning
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6NBMHDNI.js";
|
|
9
9
|
import {
|
|
10
10
|
applyDefaultConfig,
|
|
11
11
|
getPackageJsonConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5OGHC7QD.js";
|
|
13
13
|
import {
|
|
14
14
|
findWorkspaceRoot
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SZXSPLS6.js";
|
|
16
16
|
import {
|
|
17
17
|
setConfigEnv
|
|
18
18
|
} from "./chunk-W4C4Y3CW.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkACB64AEVcjs = require('./chunk-ACB64AEV.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkNOTWBXXMcjs = require('./chunk-NOTWBXXM.cjs');
|
|
8
8
|
|
|
9
9
|
// src/get-config.ts
|
|
10
10
|
var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
11
|
-
return
|
|
11
|
+
return _chunkACB64AEVcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
|
|
12
12
|
};
|
|
13
13
|
var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
14
14
|
let workspaceRoot = options.workspaceRoot;
|
|
15
15
|
if (!workspaceRoot) {
|
|
16
|
-
workspaceRoot =
|
|
16
|
+
workspaceRoot = _chunkNOTWBXXMcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
17
17
|
}
|
|
18
18
|
return getConfig(workspaceRoot, skipLogs);
|
|
19
19
|
};
|
|
@@ -21,9 +21,9 @@ var tryGetWorkspaceConfig = async (skipLogs = true, options = {}) => {
|
|
|
21
21
|
try {
|
|
22
22
|
let workspaceRoot = options.workspaceRoot;
|
|
23
23
|
if (!workspaceRoot) {
|
|
24
|
-
workspaceRoot =
|
|
24
|
+
workspaceRoot = _chunkNOTWBXXMcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return _chunkACB64AEVcjs.tryLoadStormWorkspaceConfig.call(void 0,
|
|
27
27
|
workspaceRoot,
|
|
28
28
|
skipLogs,
|
|
29
29
|
options.useDefault
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2MJFF2QMcjs = require('./chunk-2MJFF2QM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkNOTWBXXMcjs = require('./chunk-NOTWBXXM.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkM3REM2FUcjs = require('./chunk-M3REM2FU.cjs');
|
|
@@ -12,7 +12,7 @@ var _chunkM3REM2FUcjs = require('./chunk-M3REM2FU.cjs');
|
|
|
12
12
|
var _c12 = require('c12');
|
|
13
13
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
14
14
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
15
|
-
const workspacePath = filePath ||
|
|
15
|
+
const workspacePath = filePath || _chunkNOTWBXXMcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
16
16
|
const configs = await Promise.all([
|
|
17
17
|
_c12.loadConfig.call(void 0, {
|
|
18
18
|
cwd: workspacePath,
|
|
@@ -47,12 +47,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
47
47
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
48
48
|
};
|
|
49
49
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
50
|
-
const workspacePath = filePath ? filePath :
|
|
50
|
+
const workspacePath = filePath ? filePath : _chunkNOTWBXXMcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
51
51
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
52
52
|
let config = result.config;
|
|
53
53
|
const configFile = result.configFile;
|
|
54
54
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
55
|
-
|
|
55
|
+
_chunk2MJFF2QMcjs.writeTrace.call(void 0,
|
|
56
56
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
57
57
|
{
|
|
58
58
|
logLevel: "all"
|
|
@@ -68,7 +68,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
68
68
|
for (const result2 of results) {
|
|
69
69
|
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
70
70
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
71
|
-
|
|
71
|
+
_chunk2MJFF2QMcjs.writeTrace.call(void 0,
|
|
72
72
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
73
73
|
{
|
|
74
74
|
logLevel: "all"
|
|
@@ -1,13 +1,13 @@
|
|
|
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 _chunk2MJFF2QMcjs = require('./chunk-2MJFF2QM.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utilities/toml.ts
|
|
6
6
|
var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
|
|
7
7
|
function parseCargoTomlWithTree(tree, projectRoot, projectName) {
|
|
8
8
|
const cargoTomlString = _optionalChain([tree, 'access', _ => _.read, 'call', _2 => _2(`${projectRoot}/Cargo.toml`), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
9
9
|
if (!cargoTomlString) {
|
|
10
|
-
|
|
10
|
+
_chunk2MJFF2QMcjs.writeError.call(void 0, `Cannot find a Cargo.toml file in the ${projectName}`);
|
|
11
11
|
throw new Error();
|
|
12
12
|
}
|
|
13
13
|
return parseCargoToml(cargoTomlString);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkSONG2DAJcjs = require('../chunk-SONG2DAJ.cjs');
|
|
5
5
|
require('../chunk-3COHMHPU.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-GHZFMAKY.cjs');
|
|
7
7
|
require('../chunk-DQT6QJRQ.cjs');
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-SS4HVVIZ.cjs');
|
|
9
|
+
require('../chunk-J7BFGUIX.cjs');
|
|
10
|
+
require('../chunk-OGHIEGOH.cjs');
|
|
11
11
|
require('../chunk-JMI7BRL7.cjs');
|
|
12
12
|
require('../chunk-7PV6L7I7.cjs');
|
|
13
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
16
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-MFDE3ORO.cjs');
|
|
14
|
+
require('../chunk-2MJFF2QM.cjs');
|
|
15
|
+
require('../chunk-AAV6DBHX.cjs');
|
|
16
|
+
require('../chunk-NOTWBXXM.cjs');
|
|
17
17
|
require('../chunk-N3UX6L7X.cjs');
|
|
18
18
|
require('../chunk-LOY6ICHZ.cjs');
|
|
19
19
|
require('../chunk-WBQ4VS7E.cjs');
|
|
@@ -25,4 +25,4 @@ require('../chunk-IRCFHYKZ.cjs');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.getConfigFile =
|
|
28
|
+
exports.getConfigFile = _chunkSONG2DAJcjs.getConfigFile; exports.getConfigFileByName = _chunkSONG2DAJcjs.getConfigFileByName;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile,
|
|
3
3
|
getConfigFileByName
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XKVIMZJJ.js";
|
|
5
5
|
import "../chunk-UKGRDKIH.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-CVKKSYV5.js";
|
|
7
7
|
import "../chunk-6RVIJKY3.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TIGZFOWR.js";
|
|
9
|
+
import "../chunk-ZVT775K3.js";
|
|
10
|
+
import "../chunk-TGJMLB3M.js";
|
|
11
11
|
import "../chunk-WYQYWPLE.js";
|
|
12
12
|
import "../chunk-RRKB32OH.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-3MKAYQRF.js";
|
|
14
|
+
import "../chunk-6NBMHDNI.js";
|
|
15
|
+
import "../chunk-5OGHC7QD.js";
|
|
16
|
+
import "../chunk-SZXSPLS6.js";
|
|
17
17
|
import "../chunk-6JBGUE4A.js";
|
|
18
18
|
import "../chunk-HVVJHTFS.js";
|
|
19
19
|
import "../chunk-LM2UMGYA.js";
|