@storm-software/config-tools 1.141.0 → 1.141.2
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-QFFE43XX.js → chunk-4KDJS5UI.js} +1 -1
- package/dist/{chunk-ZTZZCREC.js → chunk-4RQGNE37.js} +7 -7
- package/dist/{chunk-OUCH3V6I.js → chunk-6UWJE5DT.js} +1 -1
- package/dist/{chunk-33KQH7AG.cjs → chunk-A2QPNGB4.cjs} +3 -3
- package/dist/{chunk-7WTZOK4C.js → chunk-BKH4GCLO.js} +12 -12
- package/dist/{chunk-AYFJUXPQ.cjs → chunk-D7SRJTRQ.cjs} +6 -6
- package/dist/{chunk-NXU3WOTN.cjs → chunk-MXIXJOXF.cjs} +9 -9
- package/dist/{chunk-HKXAGPSU.js → chunk-TPVIVOXV.js} +14 -14
- package/dist/{chunk-7D6G5VFV.cjs → chunk-VSOK2CST.cjs} +17 -17
- package/dist/{chunk-BRNITTW2.js → chunk-X457FIXK.js} +1 -1
- package/dist/{chunk-7YFSGHD4.cjs → chunk-ZBZHPMLE.cjs} +9 -9
- package/dist/{chunk-VSGLIY6F.cjs → chunk-ZYPYO5WA.cjs} +14 -14
- 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 +13 -13
- package/dist/create-storm-config.js +12 -12
- package/dist/env/get-env.cjs +3 -3
- package/dist/env/get-env.js +2 -2
- package/dist/env/index.cjs +5 -5
- package/dist/env/index.js +6 -6
- package/dist/env/set-env.cjs +3 -3
- package/dist/env/set-env.js +2 -2
- package/dist/index.cjs +29 -29
- package/dist/index.js +33 -33
- package/dist/logger/console.cjs +7 -7
- package/dist/logger/console.js +6 -6
- package/dist/logger/create-logger.cjs +8 -8
- package/dist/logger/create-logger.js +7 -7
- package/dist/logger/index.cjs +13 -13
- package/dist/logger/index.js +13 -13
- package/dist/utilities/apply-workspace-tokens.cjs +2 -2
- package/dist/utilities/apply-workspace-tokens.d.cts +3 -3
- package/dist/utilities/apply-workspace-tokens.d.ts +3 -3
- package/dist/utilities/apply-workspace-tokens.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 +13 -13
- package/dist/utilities/index.js +14 -14
- package/dist/utilities/process-handler.cjs +8 -8
- package/dist/utilities/process-handler.js +7 -7
- package/package.json +1 -1
- package/dist/{chunk-CKF4T6TS.js → chunk-E6R4LOUF.js} +3 -3
- package/dist/{chunk-LPEQIZL5.cjs → chunk-EG6MZ74D.cjs} +2 -2
- package/dist/{chunk-J7MAX6NH.js → chunk-EGAP6KEW.js} +3 -3
- package/dist/{chunk-CQQH5B2F.cjs → chunk-GNNKAT6C.cjs} +2 -2
- package/dist/{chunk-JGWQWWYP.cjs → chunk-GTJILL6U.cjs} +2 -2
- package/dist/{chunk-MXDUBQ6U.js → chunk-RFXZQQFC.js} +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 -->
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_COLOR_CONFIG
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
formatTimestamp
|
|
6
|
-
} from "./chunk-WTEHBMCM.js";
|
|
7
|
-
import {
|
|
8
|
-
getLogLevel
|
|
9
|
-
} from "./chunk-LQFUWYSF.js";
|
|
3
|
+
} from "./chunk-EGAP6KEW.js";
|
|
10
4
|
import {
|
|
11
5
|
getChalk
|
|
12
6
|
} from "./chunk-GYCLBSTB.js";
|
|
13
7
|
import {
|
|
14
8
|
CONSOLE_ICONS
|
|
15
9
|
} from "./chunk-N3ELM5YV.js";
|
|
10
|
+
import {
|
|
11
|
+
formatTimestamp
|
|
12
|
+
} from "./chunk-WTEHBMCM.js";
|
|
13
|
+
import {
|
|
14
|
+
getLogLevel
|
|
15
|
+
} from "./chunk-LQFUWYSF.js";
|
|
16
16
|
import {
|
|
17
17
|
LogLevel,
|
|
18
18
|
LogLevelLabel
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
var _chunkUIA5EFWJcjs = require('./chunk-UIA5EFWJ.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkD7SRJTRQcjs = require('./chunk-D7SRJTRQ.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkMUKNCWDCcjs = require('./chunk-MUKNCWDC.cjs');
|
|
@@ -1708,7 +1708,7 @@ var getConfigFile = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, async
|
|
|
1708
1708
|
let config = result.config;
|
|
1709
1709
|
const configFile = result.configFile;
|
|
1710
1710
|
if (config && configFile && Object.keys(config).length > 0) {
|
|
1711
|
-
|
|
1711
|
+
_chunkD7SRJTRQcjs.writeSystem.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
1712
1712
|
logLevel: "all"
|
|
1713
1713
|
});
|
|
1714
1714
|
}
|
|
@@ -1716,7 +1716,7 @@ var getConfigFile = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, async
|
|
|
1716
1716
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
1717
1717
|
for (const result2 of results) {
|
|
1718
1718
|
if (_optionalChain([result2, 'optionalAccess', _13 => _13.config]) && _optionalChain([result2, 'optionalAccess', _14 => _14.configFile]) && Object.keys(result2.config).length > 0) {
|
|
1719
|
-
|
|
1719
|
+
_chunkD7SRJTRQcjs.writeSystem.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
1720
1720
|
logLevel: "all"
|
|
1721
1721
|
});
|
|
1722
1722
|
config = _chunkUIA5EFWJcjs.defu.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
setConfigEnv
|
|
3
|
-
} from "./chunk-CKF4T6TS.js";
|
|
4
|
-
import {
|
|
5
|
-
getConfigEnv,
|
|
6
|
-
getExtensionEnv
|
|
7
|
-
} from "./chunk-MXDUBQ6U.js";
|
|
8
1
|
import {
|
|
9
2
|
getConfigFile
|
|
10
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6UWJE5DT.js";
|
|
11
4
|
import {
|
|
12
5
|
defu
|
|
13
6
|
} from "./chunk-OL4KMEX5.js";
|
|
@@ -15,16 +8,23 @@ import {
|
|
|
15
8
|
formatLogMessage,
|
|
16
9
|
writeTrace,
|
|
17
10
|
writeWarning
|
|
18
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4RQGNE37.js";
|
|
19
12
|
import {
|
|
20
13
|
getDefaultConfig
|
|
21
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EGAP6KEW.js";
|
|
15
|
+
import {
|
|
16
|
+
findWorkspaceRoot
|
|
17
|
+
} from "./chunk-BDW32BZK.js";
|
|
18
|
+
import {
|
|
19
|
+
getConfigEnv,
|
|
20
|
+
getExtensionEnv
|
|
21
|
+
} from "./chunk-RFXZQQFC.js";
|
|
22
22
|
import {
|
|
23
23
|
StormConfigSchema
|
|
24
24
|
} from "./chunk-2CJNMJST.js";
|
|
25
25
|
import {
|
|
26
|
-
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
setConfigEnv
|
|
27
|
+
} from "./chunk-E6R4LOUF.js";
|
|
28
28
|
import {
|
|
29
29
|
__name,
|
|
30
30
|
init_esm_shims
|
|
@@ -1,18 +1,18 @@
|
|
|
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 _chunkGNNKAT6Ccjs = require('./chunk-GNNKAT6C.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk3ALZEFKMcjs = require('./chunk-3ALZEFKM.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkG5KDHCJJcjs = require('./chunk-G5KDHCJJ.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkGWLF37REcjs = require('./chunk-GWLF37RE.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunk2AAM5DJOcjs = require('./chunk-2AAM5DJO.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -25,7 +25,7 @@ var _chunkDFJNOFN2cjs = require('./chunk-DFJNOFN2.cjs');
|
|
|
25
25
|
// src/logger/console.ts
|
|
26
26
|
_chunkDFJNOFN2cjs.init_cjs_shims.call(void 0, );
|
|
27
27
|
var getLogFn = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (logLevel = _chunkO4SGVAEBcjs.LogLevel.INFO, config = {}, _chalk = _chunk3ALZEFKMcjs.getChalk.call(void 0, )) => {
|
|
28
|
-
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]) ?
|
|
28
|
+
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]) ? _chunkGNNKAT6Ccjs.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"]]) : _chunkGNNKAT6Ccjs.DEFAULT_COLOR_CONFIG;
|
|
29
29
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || _chunkO4SGVAEBcjs.LogLevelLabel.INFO;
|
|
30
30
|
if (logLevel > _chunk2AAM5DJOcjs.getLogLevel.call(void 0, configLogLevel) || logLevel <= _chunkO4SGVAEBcjs.LogLevel.SILENT || _chunk2AAM5DJOcjs.getLogLevel.call(void 0, configLogLevel) <= _chunkO4SGVAEBcjs.LogLevel.SILENT) {
|
|
31
31
|
return (_) => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkD7SRJTRQcjs = require('./chunk-D7SRJTRQ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -12,34 +12,34 @@ var _chunkDFJNOFN2cjs = require('./chunk-DFJNOFN2.cjs');
|
|
|
12
12
|
// src/utilities/process-handler.ts
|
|
13
13
|
_chunkDFJNOFN2cjs.init_cjs_shims.call(void 0, );
|
|
14
14
|
var exitWithError = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (config) => {
|
|
15
|
-
|
|
15
|
+
_chunkD7SRJTRQcjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
|
|
16
16
|
process.exit(1);
|
|
17
17
|
}, "exitWithError");
|
|
18
18
|
var exitWithSuccess = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (config) => {
|
|
19
|
-
|
|
19
|
+
_chunkD7SRJTRQcjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
|
|
20
20
|
process.exit(0);
|
|
21
21
|
}, "exitWithSuccess");
|
|
22
22
|
var handleProcess = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (config) => {
|
|
23
|
-
|
|
23
|
+
_chunkD7SRJTRQcjs.writeTrace.call(void 0, `Using the following arguments to process the script: ${process.argv.join(", ")}`, config);
|
|
24
24
|
process.on("unhandledRejection", (error) => {
|
|
25
|
-
|
|
25
|
+
_chunkD7SRJTRQcjs.writeError.call(void 0, `An Unhandled Rejection occurred while running the program: ${error}`, config);
|
|
26
26
|
exitWithError(config);
|
|
27
27
|
});
|
|
28
28
|
process.on("uncaughtException", (error) => {
|
|
29
|
-
|
|
29
|
+
_chunkD7SRJTRQcjs.writeError.call(void 0, `An Uncaught Exception occurred while running the program: ${error.message}
|
|
30
30
|
Stacktrace: ${error.stack}`, config);
|
|
31
31
|
exitWithError(config);
|
|
32
32
|
});
|
|
33
33
|
process.on("SIGTERM", (signal) => {
|
|
34
|
-
|
|
34
|
+
_chunkD7SRJTRQcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
35
35
|
exitWithError(config);
|
|
36
36
|
});
|
|
37
37
|
process.on("SIGINT", (signal) => {
|
|
38
|
-
|
|
38
|
+
_chunkD7SRJTRQcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
39
39
|
exitWithError(config);
|
|
40
40
|
});
|
|
41
41
|
process.on("SIGHUP", (signal) => {
|
|
42
|
-
|
|
42
|
+
_chunkD7SRJTRQcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
43
43
|
exitWithError(config);
|
|
44
44
|
});
|
|
45
45
|
}, "handleProcess");
|
|
@@ -8,51 +8,51 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// src/utilities/apply-workspace-tokens.ts
|
|
10
10
|
init_esm_shims();
|
|
11
|
-
var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option,
|
|
11
|
+
var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams) => {
|
|
12
12
|
let result = option;
|
|
13
13
|
if (!result) {
|
|
14
14
|
return result;
|
|
15
15
|
}
|
|
16
|
-
if (
|
|
17
|
-
const optionKeys = Object.keys(
|
|
16
|
+
if (tokenParams) {
|
|
17
|
+
const optionKeys = Object.keys(tokenParams);
|
|
18
18
|
if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
|
|
19
19
|
for (const optionKey of optionKeys) {
|
|
20
20
|
if (result.includes(`{${optionKey}}`)) {
|
|
21
|
-
result = result.replaceAll(`{${optionKey}}`,
|
|
21
|
+
result = result.replaceAll(`{${optionKey}}`, tokenParams?.[optionKey] || "");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
if (
|
|
27
|
-
const configKeys = Object.keys(
|
|
26
|
+
if (tokenParams.config) {
|
|
27
|
+
const configKeys = Object.keys(tokenParams.config);
|
|
28
28
|
if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
|
|
29
29
|
for (const configKey of configKeys) {
|
|
30
30
|
if (result.includes(`{${configKey}}`)) {
|
|
31
|
-
result = result.replaceAll(`{${configKey}}`,
|
|
31
|
+
result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
if (result.includes("{workspaceRoot}")) {
|
|
37
|
-
result = result.replaceAll("{workspaceRoot}",
|
|
37
|
+
result = result.replaceAll("{workspaceRoot}", tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot());
|
|
38
38
|
}
|
|
39
39
|
return result;
|
|
40
40
|
}, "applyWorkspaceBaseTokens");
|
|
41
|
-
var applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option,
|
|
42
|
-
return applyWorkspaceBaseTokens(option,
|
|
41
|
+
var applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenParams) => {
|
|
42
|
+
return applyWorkspaceBaseTokens(option, tokenParams);
|
|
43
43
|
}, "applyWorkspaceProjectTokens");
|
|
44
|
-
var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options,
|
|
44
|
+
var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, tokenParams, tokenizerFn) => {
|
|
45
45
|
if (!options) {
|
|
46
46
|
return {};
|
|
47
47
|
}
|
|
48
48
|
const result = {};
|
|
49
49
|
for (const option of Object.keys(options)) {
|
|
50
50
|
if (typeof options[option] === "string") {
|
|
51
|
-
result[option] = await Promise.resolve(tokenizerFn(options[option],
|
|
51
|
+
result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
|
|
52
52
|
} else if (Array.isArray(options[option])) {
|
|
53
|
-
result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item,
|
|
53
|
+
result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
|
|
54
54
|
} else if (typeof options[option] === "object") {
|
|
55
|
-
result[option] = await applyWorkspaceTokens(options[option],
|
|
55
|
+
result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
|
|
56
56
|
} else {
|
|
57
57
|
result[option] = options[option];
|
|
58
58
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
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 _chunkA2QPNGB4cjs = require('./chunk-A2QPNGB4.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunkUIA5EFWJcjs = require('./chunk-UIA5EFWJ.cjs');
|
|
6
7
|
|
|
7
|
-
var _chunkLPEQIZL5cjs = require('./chunk-LPEQIZL5.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var _chunk33KQH7AGcjs = require('./chunk-33KQH7AG.cjs');
|
|
11
10
|
|
|
11
|
+
var _chunkD7SRJTRQcjs = require('./chunk-D7SRJTRQ.cjs');
|
|
12
12
|
|
|
13
|
-
var _chunkUIA5EFWJcjs = require('./chunk-UIA5EFWJ.cjs');
|
|
14
13
|
|
|
14
|
+
var _chunkGNNKAT6Ccjs = require('./chunk-GNNKAT6C.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
var _chunkMUKNCWDCcjs = require('./chunk-MUKNCWDC.cjs');
|
|
17
18
|
|
|
18
|
-
var _chunkAYFJUXPQcjs = require('./chunk-AYFJUXPQ.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkEG6MZ74Dcjs = require('./chunk-EG6MZ74D.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunk56YHC4NMcjs = require('./chunk-56YHC4NM.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkGTJILL6Ucjs = require('./chunk-GTJILL6U.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -40,8 +40,8 @@ var createConfig = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (worksp
|
|
|
40
40
|
var createStormConfig = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (extensionName, schema, workspaceRoot) => {
|
|
41
41
|
let result;
|
|
42
42
|
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 3e4) {
|
|
43
|
-
const config =
|
|
44
|
-
const defaultConfig =
|
|
43
|
+
const config = _chunkEG6MZ74Dcjs.getConfigEnv.call(void 0, );
|
|
44
|
+
const defaultConfig = _chunkGNNKAT6Ccjs.getDefaultConfig.call(void 0, workspaceRoot);
|
|
45
45
|
result = _chunk56YHC4NMcjs.StormConfigSchema.parse(_chunkUIA5EFWJcjs.defu.call(void 0, config, defaultConfig));
|
|
46
46
|
result.workspaceRoot ??= defaultConfig.workspaceRoot || _chunkMUKNCWDCcjs.findWorkspaceRoot.call(void 0, workspaceRoot);
|
|
47
47
|
} else {
|
|
@@ -66,7 +66,7 @@ var createConfigExtension = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0
|
|
|
66
66
|
if (_extension_cache.has(extension_cache_key)) {
|
|
67
67
|
return _extension_cache.get(extension_cache_key);
|
|
68
68
|
}
|
|
69
|
-
let extension =
|
|
69
|
+
let extension = _chunkEG6MZ74Dcjs.getExtensionEnv.call(void 0, extensionName);
|
|
70
70
|
if (schema) {
|
|
71
71
|
extension = schema.parse(extension);
|
|
72
72
|
}
|
|
@@ -76,23 +76,23 @@ var createConfigExtension = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0
|
|
|
76
76
|
var loadStormConfig = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, async (workspaceRoot) => {
|
|
77
77
|
let config = {};
|
|
78
78
|
if (_optionalChain([_static_cache, 'optionalAccess', _3 => _3.data]) && _optionalChain([_static_cache, 'optionalAccess', _4 => _4.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
|
|
79
|
-
|
|
79
|
+
_chunkD7SRJTRQcjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
|
|
80
80
|
return _static_cache.data;
|
|
81
81
|
}
|
|
82
82
|
let _workspaceRoot = workspaceRoot;
|
|
83
83
|
if (!_workspaceRoot) {
|
|
84
84
|
_workspaceRoot = _chunkMUKNCWDCcjs.findWorkspaceRoot.call(void 0, );
|
|
85
85
|
}
|
|
86
|
-
const configFile = await
|
|
86
|
+
const configFile = await _chunkA2QPNGB4cjs.getConfigFile.call(void 0, _workspaceRoot);
|
|
87
87
|
if (!configFile) {
|
|
88
|
-
|
|
88
|
+
_chunkD7SRJTRQcjs.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", {
|
|
89
89
|
logLevel: "all"
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
config = _chunkUIA5EFWJcjs.defu.call(void 0,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
${
|
|
92
|
+
config = _chunkUIA5EFWJcjs.defu.call(void 0, _chunkEG6MZ74Dcjs.getConfigEnv.call(void 0, ), configFile, _chunkGNNKAT6Ccjs.getDefaultConfig.call(void 0, _workspaceRoot));
|
|
93
|
+
_chunkGTJILL6Ucjs.setConfigEnv.call(void 0, config);
|
|
94
|
+
_chunkD7SRJTRQcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
|
|
95
|
+
${_chunkD7SRJTRQcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
96
96
|
return config;
|
|
97
97
|
}, "loadStormConfig");
|
|
98
98
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkD7SRJTRQcjs = require('./chunk-D7SRJTRQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkMUKNCWDCcjs = require('./chunk-MUKNCWDC.cjs');
|
|
@@ -25,13 +25,13 @@ async function createLogger(config) {
|
|
|
25
25
|
if (!workspaceRoot) {
|
|
26
26
|
throw new Error("Cannot find workspace root");
|
|
27
27
|
}
|
|
28
|
-
const writeFatal =
|
|
29
|
-
const writeError =
|
|
30
|
-
const writeWarning =
|
|
31
|
-
const writeInfo =
|
|
32
|
-
const writeSuccess =
|
|
33
|
-
const writeDebug =
|
|
34
|
-
const writeTrace =
|
|
28
|
+
const writeFatal = _chunkD7SRJTRQcjs.getLogFn.call(void 0, _chunkO4SGVAEBcjs.LogLevel.FATAL, config, import_chalk.default);
|
|
29
|
+
const writeError = _chunkD7SRJTRQcjs.getLogFn.call(void 0, _chunkO4SGVAEBcjs.LogLevel.ERROR, config, import_chalk.default);
|
|
30
|
+
const writeWarning = _chunkD7SRJTRQcjs.getLogFn.call(void 0, _chunkO4SGVAEBcjs.LogLevel.WARN, config, import_chalk.default);
|
|
31
|
+
const writeInfo = _chunkD7SRJTRQcjs.getLogFn.call(void 0, _chunkO4SGVAEBcjs.LogLevel.INFO, config, import_chalk.default);
|
|
32
|
+
const writeSuccess = _chunkD7SRJTRQcjs.getLogFn.call(void 0, _chunkO4SGVAEBcjs.LogLevel.SUCCESS, config, import_chalk.default);
|
|
33
|
+
const writeDebug = _chunkD7SRJTRQcjs.getLogFn.call(void 0, _chunkO4SGVAEBcjs.LogLevel.DEBUG, config, import_chalk.default);
|
|
34
|
+
const writeTrace = _chunkD7SRJTRQcjs.getLogFn.call(void 0, _chunkO4SGVAEBcjs.LogLevel.DEBUG, config, import_chalk.default);
|
|
35
35
|
return {
|
|
36
36
|
fatal: writeFatal,
|
|
37
37
|
error: writeError,
|
|
@@ -40,7 +40,7 @@ async function createLogger(config) {
|
|
|
40
40
|
success: writeSuccess,
|
|
41
41
|
debug: writeDebug,
|
|
42
42
|
trace: writeTrace,
|
|
43
|
-
getStopwatch:
|
|
43
|
+
getStopwatch: _chunkD7SRJTRQcjs.getStopwatch
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
_chunkDFJNOFN2cjs.__name.call(void 0, createLogger, "createLogger");
|
|
@@ -8,51 +8,51 @@ var _chunkDFJNOFN2cjs = require('./chunk-DFJNOFN2.cjs');
|
|
|
8
8
|
|
|
9
9
|
// src/utilities/apply-workspace-tokens.ts
|
|
10
10
|
_chunkDFJNOFN2cjs.init_cjs_shims.call(void 0, );
|
|
11
|
-
var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, async (option,
|
|
11
|
+
var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, async (option, tokenParams) => {
|
|
12
12
|
let result = option;
|
|
13
13
|
if (!result) {
|
|
14
14
|
return result;
|
|
15
15
|
}
|
|
16
|
-
if (
|
|
17
|
-
const optionKeys = Object.keys(
|
|
16
|
+
if (tokenParams) {
|
|
17
|
+
const optionKeys = Object.keys(tokenParams);
|
|
18
18
|
if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
|
|
19
19
|
for (const optionKey of optionKeys) {
|
|
20
20
|
if (result.includes(`{${optionKey}}`)) {
|
|
21
|
-
result = result.replaceAll(`{${optionKey}}`,
|
|
21
|
+
result = result.replaceAll(`{${optionKey}}`, _optionalChain([tokenParams, 'optionalAccess', _ => _[optionKey]]) || "");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
if (
|
|
27
|
-
const configKeys = Object.keys(
|
|
26
|
+
if (tokenParams.config) {
|
|
27
|
+
const configKeys = Object.keys(tokenParams.config);
|
|
28
28
|
if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
|
|
29
29
|
for (const configKey of configKeys) {
|
|
30
30
|
if (result.includes(`{${configKey}}`)) {
|
|
31
|
-
result = result.replaceAll(`{${configKey}}`,
|
|
31
|
+
result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
if (result.includes("{workspaceRoot}")) {
|
|
37
|
-
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(
|
|
37
|
+
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _chunkMUKNCWDCcjs.findWorkspaceRoot.call(void 0, ))));
|
|
38
38
|
}
|
|
39
39
|
return result;
|
|
40
40
|
}, "applyWorkspaceBaseTokens");
|
|
41
|
-
var applyWorkspaceProjectTokens = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (option,
|
|
42
|
-
return applyWorkspaceBaseTokens(option,
|
|
41
|
+
var applyWorkspaceProjectTokens = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, (option, tokenParams) => {
|
|
42
|
+
return applyWorkspaceBaseTokens(option, tokenParams);
|
|
43
43
|
}, "applyWorkspaceProjectTokens");
|
|
44
|
-
var applyWorkspaceTokens = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, async (options,
|
|
44
|
+
var applyWorkspaceTokens = /* @__PURE__ */ _chunkDFJNOFN2cjs.__name.call(void 0, async (options, tokenParams, tokenizerFn) => {
|
|
45
45
|
if (!options) {
|
|
46
46
|
return {};
|
|
47
47
|
}
|
|
48
48
|
const result = {};
|
|
49
49
|
for (const option of Object.keys(options)) {
|
|
50
50
|
if (typeof options[option] === "string") {
|
|
51
|
-
result[option] = await Promise.resolve(tokenizerFn(options[option],
|
|
51
|
+
result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
|
|
52
52
|
} else if (Array.isArray(options[option])) {
|
|
53
|
-
result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item,
|
|
53
|
+
result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
|
|
54
54
|
} else if (typeof options[option] === "object") {
|
|
55
|
-
result[option] = await applyWorkspaceTokens(options[option],
|
|
55
|
+
result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
|
|
56
56
|
} else {
|
|
57
57
|
result[option] = options[option];
|
|
58
58
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkA2QPNGB4cjs = require('../chunk-A2QPNGB4.cjs');
|
|
5
5
|
require('../chunk-UIA5EFWJ.cjs');
|
|
6
6
|
require('../chunk-DBERGKMJ.cjs');
|
|
7
7
|
require('../chunk-VPMAS2N2.cjs');
|
|
@@ -9,24 +9,24 @@ require('../chunk-KRV5ZLBN.cjs');
|
|
|
9
9
|
require('../chunk-6E5A2ZAH.cjs');
|
|
10
10
|
require('../chunk-PKJKHCLN.cjs');
|
|
11
11
|
require('../chunk-SKMG52TD.cjs');
|
|
12
|
-
require('../chunk-NXU3WOTN.cjs');
|
|
13
12
|
require('../chunk-6O7E2ODJ.cjs');
|
|
14
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-ZYPYO5WA.cjs');
|
|
15
14
|
require('../chunk-JPL6SA45.cjs');
|
|
16
|
-
require('../chunk-
|
|
17
|
-
require('../chunk-
|
|
18
|
-
require('../chunk-
|
|
19
|
-
require('../chunk-GWLF37RE.cjs');
|
|
20
|
-
require('../chunk-2AAM5DJO.cjs');
|
|
15
|
+
require('../chunk-MXIXJOXF.cjs');
|
|
16
|
+
require('../chunk-D7SRJTRQ.cjs');
|
|
17
|
+
require('../chunk-GNNKAT6C.cjs');
|
|
21
18
|
require('../chunk-MUKNCWDC.cjs');
|
|
22
19
|
require('../chunk-4AYNBMPP.cjs');
|
|
23
|
-
require('../chunk-NXXPCLO3.cjs');
|
|
24
20
|
require('../chunk-3ALZEFKM.cjs');
|
|
25
21
|
require('../chunk-G5KDHCJJ.cjs');
|
|
22
|
+
require('../chunk-GWLF37RE.cjs');
|
|
26
23
|
require('../chunk-FBGCL5ZA.cjs');
|
|
24
|
+
require('../chunk-56YHC4NM.cjs');
|
|
25
|
+
require('../chunk-NXXPCLO3.cjs');
|
|
26
|
+
require('../chunk-2AAM5DJO.cjs');
|
|
27
27
|
require('../chunk-O4SGVAEB.cjs');
|
|
28
28
|
require('../chunk-DFJNOFN2.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
exports.getConfigFile =
|
|
32
|
+
exports.getConfigFile = _chunkA2QPNGB4cjs.getConfigFile; exports.getConfigFileByName = _chunkA2QPNGB4cjs.getConfigFileByName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile,
|
|
3
3
|
getConfigFileByName
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-6UWJE5DT.js";
|
|
5
5
|
import "../chunk-OL4KMEX5.js";
|
|
6
6
|
import "../chunk-ZY35TVMB.js";
|
|
7
7
|
import "../chunk-NO5ZHAIA.js";
|
|
@@ -9,21 +9,21 @@ import "../chunk-XQXUMNEU.js";
|
|
|
9
9
|
import "../chunk-BVYQ2BKK.js";
|
|
10
10
|
import "../chunk-5EL2OHUB.js";
|
|
11
11
|
import "../chunk-C47MHGNY.js";
|
|
12
|
-
import "../chunk-BRNITTW2.js";
|
|
13
12
|
import "../chunk-TRG5FOW5.js";
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-TPVIVOXV.js";
|
|
15
14
|
import "../chunk-JMTLS4UN.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-WTEHBMCM.js";
|
|
20
|
-
import "../chunk-LQFUWYSF.js";
|
|
15
|
+
import "../chunk-X457FIXK.js";
|
|
16
|
+
import "../chunk-4RQGNE37.js";
|
|
17
|
+
import "../chunk-EGAP6KEW.js";
|
|
21
18
|
import "../chunk-BDW32BZK.js";
|
|
22
19
|
import "../chunk-HBVGMJMF.js";
|
|
23
|
-
import "../chunk-NLLVE3DA.js";
|
|
24
20
|
import "../chunk-GYCLBSTB.js";
|
|
25
21
|
import "../chunk-N3ELM5YV.js";
|
|
22
|
+
import "../chunk-WTEHBMCM.js";
|
|
26
23
|
import "../chunk-46O7IOH6.js";
|
|
24
|
+
import "../chunk-2CJNMJST.js";
|
|
25
|
+
import "../chunk-NLLVE3DA.js";
|
|
26
|
+
import "../chunk-LQFUWYSF.js";
|
|
27
27
|
import "../chunk-PEPDFP2O.js";
|
|
28
28
|
import "../chunk-BFNZYC5O.js";
|
|
29
29
|
export {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkA2QPNGB4cjs = require('../chunk-A2QPNGB4.cjs');
|
|
6
6
|
require('../chunk-UIA5EFWJ.cjs');
|
|
7
7
|
require('../chunk-DBERGKMJ.cjs');
|
|
8
8
|
require('../chunk-VPMAS2N2.cjs');
|
|
@@ -10,24 +10,24 @@ require('../chunk-KRV5ZLBN.cjs');
|
|
|
10
10
|
require('../chunk-6E5A2ZAH.cjs');
|
|
11
11
|
require('../chunk-PKJKHCLN.cjs');
|
|
12
12
|
require('../chunk-SKMG52TD.cjs');
|
|
13
|
-
require('../chunk-NXU3WOTN.cjs');
|
|
14
13
|
require('../chunk-6O7E2ODJ.cjs');
|
|
15
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-ZYPYO5WA.cjs');
|
|
16
15
|
require('../chunk-JPL6SA45.cjs');
|
|
17
|
-
require('../chunk-
|
|
18
|
-
require('../chunk-
|
|
19
|
-
require('../chunk-
|
|
20
|
-
require('../chunk-GWLF37RE.cjs');
|
|
21
|
-
require('../chunk-2AAM5DJO.cjs');
|
|
16
|
+
require('../chunk-MXIXJOXF.cjs');
|
|
17
|
+
require('../chunk-D7SRJTRQ.cjs');
|
|
18
|
+
require('../chunk-GNNKAT6C.cjs');
|
|
22
19
|
require('../chunk-MUKNCWDC.cjs');
|
|
23
20
|
require('../chunk-4AYNBMPP.cjs');
|
|
24
|
-
require('../chunk-NXXPCLO3.cjs');
|
|
25
21
|
require('../chunk-3ALZEFKM.cjs');
|
|
26
22
|
require('../chunk-G5KDHCJJ.cjs');
|
|
23
|
+
require('../chunk-GWLF37RE.cjs');
|
|
27
24
|
require('../chunk-FBGCL5ZA.cjs');
|
|
25
|
+
require('../chunk-56YHC4NM.cjs');
|
|
26
|
+
require('../chunk-NXXPCLO3.cjs');
|
|
27
|
+
require('../chunk-2AAM5DJO.cjs');
|
|
28
28
|
require('../chunk-O4SGVAEB.cjs');
|
|
29
29
|
require('../chunk-DFJNOFN2.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
exports.getConfigFile =
|
|
33
|
+
exports.getConfigFile = _chunkA2QPNGB4cjs.getConfigFile; exports.getConfigFileByName = _chunkA2QPNGB4cjs.getConfigFileByName;
|