@storm-software/config-tools 1.148.3 → 1.149.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/config-file/get-config-file.cjs +66 -22
- package/dist/config-file/get-config-file.js +65 -21
- package/dist/config-file/index.cjs +1 -27
- package/dist/config-file/index.js +1 -27
- package/dist/create-storm-config.cjs +68 -26
- package/dist/create-storm-config.js +67 -25
- package/dist/env/get-env.cjs +152 -9
- package/dist/env/get-env.js +151 -8
- package/dist/env/index.cjs +2 -20
- package/dist/env/index.js +2 -20
- package/dist/env/set-env.cjs +259 -8
- package/dist/env/set-env.js +258 -7
- package/dist/get-config.cjs +9 -25
- package/dist/get-config.js +9 -25
- package/dist/index.cjs +7 -171
- package/dist/index.js +7 -171
- package/dist/logger/chalk.cjs +30 -4
- package/dist/logger/chalk.js +29 -3
- package/dist/logger/console-icons.cjs +15 -5
- package/dist/logger/console-icons.js +15 -5
- package/dist/logger/console.cjs +126 -38
- package/dist/logger/console.js +112 -24
- package/dist/logger/create-logger.cjs +31 -16
- package/dist/logger/create-logger.js +30 -15
- package/dist/logger/format-timestamp.cjs +5 -3
- package/dist/logger/format-timestamp.js +5 -3
- package/dist/logger/get-log-level.cjs +56 -6
- package/dist/logger/get-log-level.js +56 -6
- package/dist/logger/index.cjs +7 -62
- package/dist/logger/index.js +7 -62
- package/dist/logger/is-unicode-supported.cjs +16 -4
- package/dist/logger/is-unicode-supported.js +15 -3
- package/dist/types.cjs +24 -6
- package/dist/types.js +22 -4
- package/dist/utilities/apply-workspace-tokens.cjs +55 -9
- package/dist/utilities/apply-workspace-tokens.js +54 -8
- package/dist/utilities/correct-paths.cjs +242 -33
- package/dist/utilities/correct-paths.js +225 -16
- package/dist/utilities/file-path-utils.cjs +18 -5
- package/dist/utilities/file-path-utils.js +17 -4
- package/dist/utilities/find-up.cjs +22 -4
- package/dist/utilities/find-up.js +21 -3
- package/dist/utilities/find-workspace-root.cjs +64 -7
- package/dist/utilities/find-workspace-root.js +63 -6
- package/dist/utilities/get-default-config.cjs +79 -8
- package/dist/utilities/get-default-config.js +79 -8
- package/dist/utilities/index.cjs +7 -85
- package/dist/utilities/index.js +7 -85
- package/dist/utilities/process-handler.cjs +35 -17
- package/dist/utilities/process-handler.js +35 -17
- package/dist/utilities/run.cjs +34 -6
- package/dist/utilities/run.js +33 -5
- package/package.json +1 -1
- package/dist/chunk-23WUCNWX.js +0 -142
- package/dist/chunk-2AVLCXLT.js +0 -0
- package/dist/chunk-2IKEUEGY.cjs +0 -94
- package/dist/chunk-3NWKPYIG.cjs +0 -68
- package/dist/chunk-4DLP6LZY.cjs +0 -65
- package/dist/chunk-65SWKEHV.cjs +0 -1
- package/dist/chunk-6OM23J4N.js +0 -65
- package/dist/chunk-6T3V5XJK.js +0 -180
- package/dist/chunk-7JBLPO7O.cjs +0 -168
- package/dist/chunk-7NSHGJWY.cjs +0 -12
- package/dist/chunk-7PV6L7I7.cjs +0 -1
- package/dist/chunk-BHZFTVXN.js +0 -42
- package/dist/chunk-C4RHWKK6.cjs +0 -142
- package/dist/chunk-CCO2PASC.js +0 -168
- package/dist/chunk-DD3HX2NX.cjs +0 -1
- package/dist/chunk-DD5UX56L.cjs +0 -272
- package/dist/chunk-FDJZUZKJ.js +0 -93
- package/dist/chunk-GS25DBTT.cjs +0 -93
- package/dist/chunk-GZFXEQPB.js +0 -94
- package/dist/chunk-HESFC24Z.cjs +0 -245
- package/dist/chunk-HI33NNPB.js +0 -68
- package/dist/chunk-HKZSDZZ4.cjs +0 -19
- package/dist/chunk-HSCCBYAV.js +0 -25
- package/dist/chunk-IRCFHYKZ.cjs +0 -28
- package/dist/chunk-IUT7Y2UY.js +0 -26
- package/dist/chunk-IWD6YQKX.cjs +0 -1
- package/dist/chunk-KNLWLA7O.cjs +0 -75
- package/dist/chunk-L6UNTUC4.js +0 -0
- package/dist/chunk-MLUBD3PU.js +0 -245
- package/dist/chunk-NJVL3GF4.js +0 -0
- package/dist/chunk-OIEEXHKO.js +0 -75
- package/dist/chunk-P7Q327IR.js +0 -272
- package/dist/chunk-POXTJ6GF.js +0 -28
- package/dist/chunk-PR7RQHRE.js +0 -12
- package/dist/chunk-Q7MMWMEN.js +0 -44
- package/dist/chunk-QBS3OCHH.js +0 -22
- package/dist/chunk-RRKB32OH.js +0 -0
- package/dist/chunk-RVM5N5ZI.cjs +0 -22
- package/dist/chunk-SLGVSUEV.cjs +0 -36
- package/dist/chunk-SVQE7WVB.cjs +0 -180
- package/dist/chunk-SWX2MJHI.cjs +0 -28
- package/dist/chunk-TZO4SYUO.cjs +0 -49
- package/dist/chunk-UZ5SHCFX.js +0 -49
- package/dist/chunk-WMWOH7LS.js +0 -79
- package/dist/chunk-XAJB3BSF.cjs +0 -25
- package/dist/chunk-XDBACKKN.cjs +0 -42
- package/dist/chunk-XIVRONKM.cjs +0 -44
- package/dist/chunk-XQPQRRG3.js +0 -28
- package/dist/chunk-XVIPFWZW.cjs +0 -79
- package/dist/chunk-XY2LDOQ4.cjs +0 -26
- package/dist/chunk-ZA4IO7YJ.js +0 -36
- package/dist/chunk-ZU6V7IRV.js +0 -19
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,26 +1,70 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
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 _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
|
|
4
|
+
var _c12 = require('c12');
|
|
5
|
+
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
6
|
+
var _console = require('../logger/console');
|
|
7
|
+
var _utilities = require('../utilities');
|
|
8
|
+
var _findworkspaceroot = require('../utilities/find-workspace-root');
|
|
9
|
+
const getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
10
|
+
const workspacePath = filePath || _findworkspaceroot.findWorkspaceRoot.call(void 0, filePath);
|
|
11
|
+
const configs = await Promise.all([
|
|
12
|
+
_c12.loadConfig.call(void 0, {
|
|
13
|
+
cwd: workspacePath,
|
|
14
|
+
packageJson: true,
|
|
15
|
+
name: fileName,
|
|
16
|
+
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
17
|
+
jitiOptions: {
|
|
18
|
+
debug: false,
|
|
19
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _utilities.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
20
|
+
},
|
|
21
|
+
...options
|
|
22
|
+
}),
|
|
23
|
+
_c12.loadConfig.call(void 0, {
|
|
24
|
+
cwd: workspacePath,
|
|
25
|
+
packageJson: true,
|
|
26
|
+
name: fileName,
|
|
27
|
+
envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
|
|
28
|
+
jitiOptions: {
|
|
29
|
+
debug: false,
|
|
30
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _utilities.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
31
|
+
},
|
|
32
|
+
configFile: fileName,
|
|
33
|
+
...options
|
|
34
|
+
})
|
|
35
|
+
]);
|
|
36
|
+
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
37
|
+
}, "getConfigFileByName");
|
|
38
|
+
const getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
39
|
+
const workspacePath = filePath ? filePath : _findworkspaceroot.findWorkspaceRoot.call(void 0, filePath);
|
|
40
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
41
|
+
let config = result.config;
|
|
42
|
+
const configFile = result.configFile;
|
|
43
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
44
|
+
_console.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
45
|
+
logLevel: "all"
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
49
|
+
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
50
|
+
for (const result2 of results) {
|
|
51
|
+
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
52
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
53
|
+
_console.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
54
|
+
logLevel: "all"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (!config) {
|
|
62
|
+
return void 0;
|
|
63
|
+
}
|
|
64
|
+
config.configFile = configFile;
|
|
65
|
+
return config;
|
|
66
|
+
}, "getConfigFile");
|
|
3
67
|
|
|
4
|
-
var _chunkXVIPFWZWcjs = require('../chunk-XVIPFWZW.cjs');
|
|
5
|
-
require('../chunk-DD3HX2NX.cjs');
|
|
6
|
-
require('../chunk-TZO4SYUO.cjs');
|
|
7
|
-
require('../chunk-XDBACKKN.cjs');
|
|
8
|
-
require('../chunk-4DLP6LZY.cjs');
|
|
9
|
-
require('../chunk-XAJB3BSF.cjs');
|
|
10
|
-
require('../chunk-C4RHWKK6.cjs');
|
|
11
|
-
require('../chunk-2IKEUEGY.cjs');
|
|
12
|
-
require('../chunk-KNLWLA7O.cjs');
|
|
13
|
-
require('../chunk-SWX2MJHI.cjs');
|
|
14
|
-
require('../chunk-SLGVSUEV.cjs');
|
|
15
|
-
require('../chunk-XY2LDOQ4.cjs');
|
|
16
|
-
require('../chunk-RVM5N5ZI.cjs');
|
|
17
|
-
require('../chunk-7NSHGJWY.cjs');
|
|
18
|
-
require('../chunk-SVQE7WVB.cjs');
|
|
19
|
-
require('../chunk-HESFC24Z.cjs');
|
|
20
|
-
require('../chunk-3NWKPYIG.cjs');
|
|
21
|
-
require('../chunk-IRCFHYKZ.cjs');
|
|
22
|
-
require('../chunk-USNT2KNT.cjs');
|
|
23
68
|
|
|
24
69
|
|
|
25
|
-
|
|
26
|
-
exports.getConfigFile = _chunkXVIPFWZWcjs.getConfigFile; exports.getConfigFileByName = _chunkXVIPFWZWcjs.getConfigFileByName;
|
|
70
|
+
exports.getConfigFile = getConfigFile; exports.getConfigFileByName = getConfigFileByName;
|
|
@@ -1,25 +1,69 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "
|
|
5
|
-
import "
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
__name
|
|
3
|
+
} from "../chunk-SHUYVCID.js";
|
|
4
|
+
import { loadConfig } from "c12";
|
|
5
|
+
import defu from "defu";
|
|
6
|
+
import { writeTrace } from "../logger/console";
|
|
7
|
+
import { joinPaths } from "../utilities";
|
|
8
|
+
import { findWorkspaceRoot } from "../utilities/find-workspace-root";
|
|
9
|
+
const getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
|
|
10
|
+
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
11
|
+
const configs = await Promise.all([
|
|
12
|
+
loadConfig({
|
|
13
|
+
cwd: workspacePath,
|
|
14
|
+
packageJson: true,
|
|
15
|
+
name: fileName,
|
|
16
|
+
envName: fileName?.toUpperCase(),
|
|
17
|
+
jitiOptions: {
|
|
18
|
+
debug: false,
|
|
19
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
20
|
+
},
|
|
21
|
+
...options
|
|
22
|
+
}),
|
|
23
|
+
loadConfig({
|
|
24
|
+
cwd: workspacePath,
|
|
25
|
+
packageJson: true,
|
|
26
|
+
name: fileName,
|
|
27
|
+
envName: fileName?.toUpperCase(),
|
|
28
|
+
jitiOptions: {
|
|
29
|
+
debug: false,
|
|
30
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
31
|
+
},
|
|
32
|
+
configFile: fileName,
|
|
33
|
+
...options
|
|
34
|
+
})
|
|
35
|
+
]);
|
|
36
|
+
return defu(configs[0] ?? {}, configs[1] ?? {});
|
|
37
|
+
}, "getConfigFileByName");
|
|
38
|
+
const getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
|
|
39
|
+
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
40
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
41
|
+
let config = result.config;
|
|
42
|
+
const configFile = result.configFile;
|
|
43
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
44
|
+
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
45
|
+
logLevel: "all"
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
49
|
+
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
50
|
+
for (const result2 of results) {
|
|
51
|
+
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
52
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
53
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
54
|
+
logLevel: "all"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
config = defu(result2.config ?? {}, config ?? {});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (!config) {
|
|
62
|
+
return void 0;
|
|
63
|
+
}
|
|
64
|
+
config.configFile = configFile;
|
|
65
|
+
return config;
|
|
66
|
+
}, "getConfigFile");
|
|
23
67
|
export {
|
|
24
68
|
getConfigFile,
|
|
25
69
|
getConfigFileByName
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunkXVIPFWZWcjs = require('../chunk-XVIPFWZW.cjs');
|
|
6
|
-
require('../chunk-DD3HX2NX.cjs');
|
|
7
|
-
require('../chunk-TZO4SYUO.cjs');
|
|
8
|
-
require('../chunk-XDBACKKN.cjs');
|
|
9
|
-
require('../chunk-4DLP6LZY.cjs');
|
|
10
|
-
require('../chunk-XAJB3BSF.cjs');
|
|
11
|
-
require('../chunk-C4RHWKK6.cjs');
|
|
12
|
-
require('../chunk-2IKEUEGY.cjs');
|
|
13
|
-
require('../chunk-KNLWLA7O.cjs');
|
|
14
|
-
require('../chunk-SWX2MJHI.cjs');
|
|
15
|
-
require('../chunk-SLGVSUEV.cjs');
|
|
16
|
-
require('../chunk-XY2LDOQ4.cjs');
|
|
17
|
-
require('../chunk-RVM5N5ZI.cjs');
|
|
18
|
-
require('../chunk-7NSHGJWY.cjs');
|
|
19
|
-
require('../chunk-SVQE7WVB.cjs');
|
|
20
|
-
require('../chunk-HESFC24Z.cjs');
|
|
21
|
-
require('../chunk-3NWKPYIG.cjs');
|
|
22
|
-
require('../chunk-IRCFHYKZ.cjs');
|
|
23
|
-
require('../chunk-USNT2KNT.cjs');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
exports.getConfigFile = _chunkXVIPFWZWcjs.getConfigFile; exports.getConfigFileByName = _chunkXVIPFWZWcjs.getConfigFileByName;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }var _getconfigfile = require('./get-config-file'); _createStarExport(_getconfigfile);
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
getConfigFile,
|
|
4
|
-
getConfigFileByName
|
|
5
|
-
} from "../chunk-WMWOH7LS.js";
|
|
6
|
-
import "../chunk-NJVL3GF4.js";
|
|
7
|
-
import "../chunk-UZ5SHCFX.js";
|
|
8
|
-
import "../chunk-BHZFTVXN.js";
|
|
9
|
-
import "../chunk-6OM23J4N.js";
|
|
10
|
-
import "../chunk-HSCCBYAV.js";
|
|
11
|
-
import "../chunk-23WUCNWX.js";
|
|
12
|
-
import "../chunk-GZFXEQPB.js";
|
|
13
|
-
import "../chunk-OIEEXHKO.js";
|
|
14
|
-
import "../chunk-XQPQRRG3.js";
|
|
15
|
-
import "../chunk-ZA4IO7YJ.js";
|
|
16
|
-
import "../chunk-IUT7Y2UY.js";
|
|
17
|
-
import "../chunk-QBS3OCHH.js";
|
|
18
|
-
import "../chunk-PR7RQHRE.js";
|
|
19
|
-
import "../chunk-6T3V5XJK.js";
|
|
20
|
-
import "../chunk-MLUBD3PU.js";
|
|
21
|
-
import "../chunk-HI33NNPB.js";
|
|
22
|
-
import "../chunk-POXTJ6GF.js";
|
|
23
|
-
import "../chunk-SHUYVCID.js";
|
|
24
|
-
export {
|
|
25
|
-
getConfigFile,
|
|
26
|
-
getConfigFileByName
|
|
27
|
-
};
|
|
1
|
+
export * from "./get-config-file";
|
|
@@ -1,31 +1,73 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
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 _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
+
var _schema = require('@storm-software/config/schema');
|
|
5
|
+
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
6
|
+
var _getconfigfile = require('./config-file/get-config-file');
|
|
7
|
+
var _getenv = require('./env/get-env');
|
|
8
|
+
var _setenv = require('./env/set-env');
|
|
9
|
+
var _console = require('./logger/console');
|
|
10
|
+
var _findworkspaceroot = require('./utilities/find-workspace-root');
|
|
11
|
+
var _getdefaultconfig = require('./utilities/get-default-config');
|
|
12
|
+
const _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
13
|
+
let _static_cache = void 0;
|
|
14
|
+
const createStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
15
|
+
let result;
|
|
16
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
17
|
+
let _workspaceRoot = workspaceRoot;
|
|
18
|
+
if (!_workspaceRoot) {
|
|
19
|
+
_workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, );
|
|
20
|
+
}
|
|
21
|
+
const configEnv = _getenv.getConfigEnv.call(void 0, );
|
|
22
|
+
const defaultConfig = await _getdefaultconfig.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
23
|
+
const configFile = await _getconfigfile.getConfigFile.call(void 0, _workspaceRoot);
|
|
24
|
+
if (!configFile && !skipLogs) {
|
|
25
|
+
_console.writeWarning.call(void 0, "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", {
|
|
26
|
+
logLevel: "all"
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
result = await _schema.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
30
|
+
result.workspaceRoot ??= _workspaceRoot;
|
|
31
|
+
} else {
|
|
32
|
+
result = _static_cache.data;
|
|
33
|
+
}
|
|
34
|
+
if (schema && extensionName) {
|
|
35
|
+
result.extensions = {
|
|
36
|
+
...result.extensions,
|
|
37
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
_static_cache = {
|
|
41
|
+
timestamp: Date.now(),
|
|
42
|
+
data: result
|
|
43
|
+
};
|
|
44
|
+
return result;
|
|
45
|
+
}, "createStormConfig");
|
|
46
|
+
const createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (extensionName, schema) => {
|
|
47
|
+
const extension_cache_key = {
|
|
48
|
+
extensionName
|
|
49
|
+
};
|
|
50
|
+
if (_extension_cache.has(extension_cache_key)) {
|
|
51
|
+
return _extension_cache.get(extension_cache_key);
|
|
52
|
+
}
|
|
53
|
+
let extension = _getenv.getExtensionEnv.call(void 0, extensionName);
|
|
54
|
+
if (schema) {
|
|
55
|
+
extension = schema.parse(extension);
|
|
56
|
+
}
|
|
57
|
+
_extension_cache.set(extension_cache_key, extension);
|
|
58
|
+
return extension;
|
|
59
|
+
}, "createConfigExtension");
|
|
60
|
+
const loadStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
61
|
+
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
62
|
+
_setenv.setConfigEnv.call(void 0, config);
|
|
63
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
64
|
+
_console.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
65
|
+
${_console.formatLogMessage.call(void 0, config)}`, config);
|
|
66
|
+
}
|
|
67
|
+
return config;
|
|
68
|
+
}, "loadStormConfig");
|
|
3
69
|
|
|
4
70
|
|
|
5
|
-
var _chunkGS25DBTTcjs = require('./chunk-GS25DBTT.cjs');
|
|
6
|
-
require('./chunk-XVIPFWZW.cjs');
|
|
7
|
-
require('./chunk-DD3HX2NX.cjs');
|
|
8
|
-
require('./chunk-TZO4SYUO.cjs');
|
|
9
|
-
require('./chunk-XDBACKKN.cjs');
|
|
10
|
-
require('./chunk-4DLP6LZY.cjs');
|
|
11
|
-
require('./chunk-XAJB3BSF.cjs');
|
|
12
|
-
require('./chunk-C4RHWKK6.cjs');
|
|
13
|
-
require('./chunk-2IKEUEGY.cjs');
|
|
14
|
-
require('./chunk-KNLWLA7O.cjs');
|
|
15
|
-
require('./chunk-SWX2MJHI.cjs');
|
|
16
|
-
require('./chunk-SLGVSUEV.cjs');
|
|
17
|
-
require('./chunk-XY2LDOQ4.cjs');
|
|
18
|
-
require('./chunk-RVM5N5ZI.cjs');
|
|
19
|
-
require('./chunk-7NSHGJWY.cjs');
|
|
20
|
-
require('./chunk-DD5UX56L.cjs');
|
|
21
|
-
require('./chunk-7JBLPO7O.cjs');
|
|
22
|
-
require('./chunk-SVQE7WVB.cjs');
|
|
23
|
-
require('./chunk-HESFC24Z.cjs');
|
|
24
|
-
require('./chunk-3NWKPYIG.cjs');
|
|
25
|
-
require('./chunk-IRCFHYKZ.cjs');
|
|
26
|
-
require('./chunk-USNT2KNT.cjs');
|
|
27
71
|
|
|
28
72
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
exports.createConfigExtension = _chunkGS25DBTTcjs.createConfigExtension; exports.createStormConfig = _chunkGS25DBTTcjs.createStormConfig; exports.loadStormConfig = _chunkGS25DBTTcjs.loadStormConfig;
|
|
73
|
+
exports.createConfigExtension = createConfigExtension; exports.createStormConfig = createStormConfig; exports.loadStormConfig = loadStormConfig;
|
|
@@ -1,29 +1,71 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-SHUYVCID.js";
|
|
4
|
+
import { StormConfigSchema } from "@storm-software/config/schema";
|
|
5
|
+
import defu from "defu";
|
|
6
|
+
import { getConfigFile } from "./config-file/get-config-file";
|
|
7
|
+
import { getConfigEnv, getExtensionEnv } from "./env/get-env";
|
|
8
|
+
import { setConfigEnv } from "./env/set-env";
|
|
9
|
+
import { formatLogMessage, writeTrace, writeWarning } from "./logger/console";
|
|
10
|
+
import { findWorkspaceRoot } from "./utilities/find-workspace-root";
|
|
11
|
+
import { getDefaultConfig } from "./utilities/get-default-config";
|
|
12
|
+
const _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
13
|
+
let _static_cache = void 0;
|
|
14
|
+
const createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
15
|
+
let result;
|
|
16
|
+
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
17
|
+
let _workspaceRoot = workspaceRoot;
|
|
18
|
+
if (!_workspaceRoot) {
|
|
19
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
20
|
+
}
|
|
21
|
+
const configEnv = getConfigEnv();
|
|
22
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
23
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
24
|
+
if (!configFile && !skipLogs) {
|
|
25
|
+
writeWarning("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", {
|
|
26
|
+
logLevel: "all"
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
result = await StormConfigSchema.parseAsync(defu(configEnv, configFile, defaultConfig));
|
|
30
|
+
result.workspaceRoot ??= _workspaceRoot;
|
|
31
|
+
} else {
|
|
32
|
+
result = _static_cache.data;
|
|
33
|
+
}
|
|
34
|
+
if (schema && extensionName) {
|
|
35
|
+
result.extensions = {
|
|
36
|
+
...result.extensions,
|
|
37
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
_static_cache = {
|
|
41
|
+
timestamp: Date.now(),
|
|
42
|
+
data: result
|
|
43
|
+
};
|
|
44
|
+
return result;
|
|
45
|
+
}, "createStormConfig");
|
|
46
|
+
const createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
47
|
+
const extension_cache_key = {
|
|
48
|
+
extensionName
|
|
49
|
+
};
|
|
50
|
+
if (_extension_cache.has(extension_cache_key)) {
|
|
51
|
+
return _extension_cache.get(extension_cache_key);
|
|
52
|
+
}
|
|
53
|
+
let extension = getExtensionEnv(extensionName);
|
|
54
|
+
if (schema) {
|
|
55
|
+
extension = schema.parse(extension);
|
|
56
|
+
}
|
|
57
|
+
_extension_cache.set(extension_cache_key, extension);
|
|
58
|
+
return extension;
|
|
59
|
+
}, "createConfigExtension");
|
|
60
|
+
const loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
61
|
+
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
62
|
+
setConfigEnv(config);
|
|
63
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
64
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
65
|
+
${formatLogMessage(config)}`, config);
|
|
66
|
+
}
|
|
67
|
+
return config;
|
|
68
|
+
}, "loadStormConfig");
|
|
27
69
|
export {
|
|
28
70
|
createConfigExtension,
|
|
29
71
|
createStormConfig,
|
package/dist/env/get-env.cjs
CHANGED
|
@@ -1,13 +1,156 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
+
var _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
|
|
4
|
+
var _config = require('@storm-software/config');
|
|
5
|
+
var _getloglevel = require('../logger/get-log-level');
|
|
6
|
+
var _correctpaths = require('../utilities/correct-paths');
|
|
7
|
+
const getExtensionEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (extensionName) => {
|
|
8
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
9
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
10
|
+
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
11
|
+
if (name) {
|
|
12
|
+
ret[name] = process.env[key];
|
|
13
|
+
}
|
|
14
|
+
return ret;
|
|
15
|
+
}, {});
|
|
16
|
+
}, "getExtensionEnv");
|
|
17
|
+
const getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
18
|
+
const prefix = "STORM_";
|
|
19
|
+
let config = {
|
|
20
|
+
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
21
|
+
name: process.env[`${prefix}NAME`] || void 0,
|
|
22
|
+
namespace: process.env[`${prefix}NAMESPACE`] || void 0,
|
|
23
|
+
owner: process.env[`${prefix}OWNER`] || void 0,
|
|
24
|
+
bot: {
|
|
25
|
+
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
26
|
+
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
27
|
+
},
|
|
28
|
+
organization: process.env[`${prefix}ORGANIZATION`] || void 0,
|
|
29
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
30
|
+
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
31
|
+
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
32
|
+
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
33
|
+
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
34
|
+
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
35
|
+
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
36
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _correctpaths.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
37
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _correctpaths.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
38
|
+
directories: {
|
|
39
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _correctpaths.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
40
|
+
data: process.env[`${prefix}DATA_DIR`] ? _correctpaths.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
41
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _correctpaths.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
42
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _correctpaths.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
43
|
+
log: process.env[`${prefix}LOG_DIR`] ? _correctpaths.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
44
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _correctpaths.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
45
|
+
},
|
|
46
|
+
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
47
|
+
env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
48
|
+
// ci:
|
|
49
|
+
// process.env[`${prefix}CI`] !== undefined
|
|
50
|
+
// ? Boolean(
|
|
51
|
+
// process.env[`${prefix}CI`] ??
|
|
52
|
+
// process.env.CI ??
|
|
53
|
+
// process.env.CONTINUOUS_INTEGRATION
|
|
54
|
+
// )
|
|
55
|
+
// : undefined,
|
|
56
|
+
repository: process.env[`${prefix}REPOSITORY`] || void 0,
|
|
57
|
+
branch: process.env[`${prefix}BRANCH`] || void 0,
|
|
58
|
+
preid: process.env[`${prefix}PRE_ID`] || void 0,
|
|
59
|
+
externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
|
|
60
|
+
registry: {
|
|
61
|
+
github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
|
|
62
|
+
npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
|
|
63
|
+
cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
|
|
64
|
+
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
65
|
+
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
66
|
+
},
|
|
67
|
+
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`])) ? _getloglevel.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
68
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
69
|
+
};
|
|
70
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _config.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
71
|
+
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
72
|
+
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
73
|
+
return ret;
|
|
74
|
+
}, {}) : getThemeColorConfigEnv(prefix);
|
|
75
|
+
if (config.docs === _config.STORM_DEFAULT_DOCS) {
|
|
76
|
+
if (config.homepage === _config.STORM_DEFAULT_HOMEPAGE) {
|
|
77
|
+
config.docs = `${_config.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
78
|
+
} else {
|
|
79
|
+
config.docs = `${config.homepage}/docs`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (config.licensing === _config.STORM_DEFAULT_LICENSING) {
|
|
83
|
+
if (config.homepage === _config.STORM_DEFAULT_HOMEPAGE) {
|
|
84
|
+
config.licensing = `${_config.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
85
|
+
} else {
|
|
86
|
+
config.licensing = `${config.homepage}/docs`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
90
|
+
if (serializedConfig) {
|
|
91
|
+
const parsed = JSON.parse(serializedConfig);
|
|
92
|
+
config = {
|
|
93
|
+
...config,
|
|
94
|
+
...parsed,
|
|
95
|
+
colors: {
|
|
96
|
+
...config.colors,
|
|
97
|
+
...parsed.colors
|
|
98
|
+
},
|
|
99
|
+
extensions: {
|
|
100
|
+
...config.extensions,
|
|
101
|
+
...parsed.extensions
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return config;
|
|
106
|
+
}, "getConfigEnv");
|
|
107
|
+
const getThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (prefix, theme) => {
|
|
108
|
+
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
109
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
110
|
+
}, "getThemeColorConfigEnv");
|
|
111
|
+
const getSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (prefix) => {
|
|
112
|
+
return {
|
|
113
|
+
dark: process.env[`${prefix}DARK`],
|
|
114
|
+
light: process.env[`${prefix}LIGHT`],
|
|
115
|
+
brand: process.env[`${prefix}BRAND`],
|
|
116
|
+
alternate: process.env[`${prefix}ALTERNATE`],
|
|
117
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
118
|
+
link: process.env[`${prefix}LINK`],
|
|
119
|
+
help: process.env[`${prefix}HELP`],
|
|
120
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
121
|
+
info: process.env[`${prefix}INFO`],
|
|
122
|
+
warning: process.env[`${prefix}WARNING`],
|
|
123
|
+
danger: process.env[`${prefix}DANGER`],
|
|
124
|
+
fatal: process.env[`${prefix}FATAL`],
|
|
125
|
+
positive: process.env[`${prefix}POSITIVE`],
|
|
126
|
+
negative: process.env[`${prefix}NEGATIVE`]
|
|
127
|
+
};
|
|
128
|
+
}, "getSingleThemeColorConfigEnv");
|
|
129
|
+
const getMultiThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (prefix) => {
|
|
130
|
+
return {
|
|
131
|
+
light: getBaseThemeColorConfigEnv(`${prefix}_LIGHT_`),
|
|
132
|
+
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
133
|
+
};
|
|
134
|
+
}, "getMultiThemeColorConfigEnv");
|
|
135
|
+
const getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (prefix) => {
|
|
136
|
+
return {
|
|
137
|
+
foreground: process.env[`${prefix}FOREGROUND`],
|
|
138
|
+
background: process.env[`${prefix}BACKGROUND`],
|
|
139
|
+
brand: process.env[`${prefix}BRAND`],
|
|
140
|
+
alternate: process.env[`${prefix}ALTERNATE`],
|
|
141
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
142
|
+
link: process.env[`${prefix}LINK`],
|
|
143
|
+
help: process.env[`${prefix}HELP`],
|
|
144
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
145
|
+
info: process.env[`${prefix}INFO`],
|
|
146
|
+
warning: process.env[`${prefix}WARNING`],
|
|
147
|
+
danger: process.env[`${prefix}DANGER`],
|
|
148
|
+
fatal: process.env[`${prefix}FATAL`],
|
|
149
|
+
positive: process.env[`${prefix}POSITIVE`],
|
|
150
|
+
negative: process.env[`${prefix}NEGATIVE`]
|
|
151
|
+
};
|
|
152
|
+
}, "getBaseThemeColorConfigEnv");
|
|
3
153
|
|
|
4
|
-
var _chunk7JBLPO7Ocjs = require('../chunk-7JBLPO7O.cjs');
|
|
5
|
-
require('../chunk-SVQE7WVB.cjs');
|
|
6
|
-
require('../chunk-HESFC24Z.cjs');
|
|
7
|
-
require('../chunk-3NWKPYIG.cjs');
|
|
8
|
-
require('../chunk-IRCFHYKZ.cjs');
|
|
9
|
-
require('../chunk-USNT2KNT.cjs');
|
|
10
154
|
|
|
11
155
|
|
|
12
|
-
|
|
13
|
-
exports.getConfigEnv = _chunk7JBLPO7Ocjs.getConfigEnv; exports.getExtensionEnv = _chunk7JBLPO7Ocjs.getExtensionEnv;
|
|
156
|
+
exports.getConfigEnv = getConfigEnv; exports.getExtensionEnv = getExtensionEnv;
|