@storm-software/config-tools 1.131.1 → 1.131.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-2ZF6X76E.js +6 -0
- package/dist/{chunk-X6VIYUJR.mjs → chunk-3AK6IXNX.mjs} +1 -1
- package/dist/{chunk-N4BRCEYB.js → chunk-3VYFPF7H.js} +3 -3
- package/dist/{chunk-GIZ23UUE.js → chunk-4VE4FB6M.js} +6 -6
- package/dist/{chunk-7XY63NME.js → chunk-66U3QTIP.js} +4 -4
- package/dist/{chunk-7KVSSDMX.mjs → chunk-767IL55P.mjs} +4 -4
- package/dist/{chunk-PQNCKJAR.js → chunk-7VM5YUOE.js} +23 -23
- package/dist/{chunk-6WPG3DXV.js → chunk-ALILAYWE.js} +2 -2
- package/dist/{chunk-A7VLTBS6.mjs → chunk-AXDORQTF.mjs} +4 -4
- package/dist/{chunk-OXK45X3L.js → chunk-BULJDAQ4.js} +28 -28
- package/dist/{chunk-XLMGW4ZW.mjs → chunk-DBZZGZG5.mjs} +2 -2
- package/dist/{chunk-JDK3PXQR.js → chunk-DOG3ORLU.js} +34 -34
- package/dist/{chunk-PVPSTJNJ.mjs → chunk-DYRNFMWE.mjs} +3 -3
- package/dist/{chunk-UCUOC6LA.mjs → chunk-E6O3JBTJ.mjs} +2 -2
- package/dist/chunk-ELKEXZND.js +6 -0
- package/dist/{chunk-XXHENMLT.mjs → chunk-EX45A45Z.mjs} +1 -1
- package/dist/{chunk-6SJLAEJ3.js → chunk-FGHNPSKG.js} +8 -8
- package/dist/{chunk-RAWSXKTG.mjs → chunk-FT7EFUF5.mjs} +1 -1
- package/dist/{chunk-ZVXEYJQO.js → chunk-HLRE7U2D.js} +14 -14
- package/dist/{chunk-TTCXDK6S.mjs → chunk-JSLNEJKC.mjs} +1 -1
- package/dist/{chunk-LKZSRXS7.js → chunk-KHITV4PO.js} +27 -27
- package/dist/{chunk-VQLOUFMG.mjs → chunk-KOV36WBN.mjs} +1 -1
- package/dist/{chunk-HCF3QA4H.js → chunk-L74BZKCX.js} +26 -26
- package/dist/{chunk-5QZ7AV2J.js → chunk-M6K6ZGYY.js} +4 -4
- package/dist/{chunk-Z2EXWNIQ.mjs → chunk-MSXW2W3H.mjs} +8 -8
- package/dist/chunk-MW5LDGT2.js +70 -0
- package/dist/{chunk-TEKFJAJJ.mjs → chunk-N4RRUDEU.mjs} +3 -3
- package/dist/chunk-N7OWP2ZS.js +6 -0
- package/dist/{chunk-FW22KPOW.mjs → chunk-OBQF7X4I.mjs} +1 -1
- package/dist/{chunk-QUVGIEZZ.mjs → chunk-QDSNLYXV.mjs} +1 -1
- package/dist/{chunk-H6XXDZ7A.js → chunk-QTBTJBPX.js} +4 -4
- package/dist/{chunk-BS5OC5E6.js → chunk-RT3RKXLA.js} +35 -35
- package/dist/{chunk-N32EGEJB.js → chunk-SGYF7ZPE.js} +10 -10
- package/dist/{chunk-GOQAHXJF.mjs → chunk-STXZQNAU.mjs} +1 -1
- package/dist/{chunk-6OYLNZFT.mjs → chunk-TLYSKZX7.mjs} +4 -4
- package/dist/{chunk-XJEQHMOE.js → chunk-UMQNSY3U.js} +2 -2
- package/dist/{chunk-4IYEDNYJ.mjs → chunk-UOKAFMHT.mjs} +1 -1
- package/dist/{chunk-66ACWURQ.mjs → chunk-VNAKH3SN.mjs} +5 -5
- package/dist/{chunk-WRFJFYOU.mjs → chunk-WARKB24U.mjs} +2 -2
- package/dist/{chunk-E3IN3SQD.mjs → chunk-YBZH7UZQ.mjs} +1 -1
- package/dist/{chunk-PEHVR33I.js → chunk-YPXIYQGI.js} +7 -7
- package/dist/chunk-Z77ZGRNE.js +6 -0
- package/dist/{chunk-64RYHF5D.mjs → chunk-ZPHI6276.mjs} +2 -2
- package/dist/{chunk-WXYJGX4C.mjs → chunk-ZZVJSS4K.mjs} +1 -1
- package/dist/config-file/get-config-file.js +17 -17
- package/dist/config-file/get-config-file.mjs +16 -16
- package/dist/config-file/index.js +18 -18
- package/dist/config-file/index.mjs +17 -17
- package/dist/create-storm-config.js +25 -25
- package/dist/create-storm-config.mjs +19 -19
- package/dist/env/get-env.js +7 -7
- package/dist/env/get-env.mjs +6 -6
- package/dist/env/index.js +9 -9
- package/dist/env/index.mjs +8 -8
- package/dist/env/set-env.js +6 -6
- package/dist/env/set-env.mjs +5 -5
- package/dist/index.js +24 -24
- package/dist/index.mjs +22 -22
- package/dist/logger/chalk.js +3 -3
- package/dist/logger/chalk.mjs +2 -2
- package/dist/logger/console.js +11 -11
- package/dist/logger/console.mjs +10 -10
- package/dist/logger/get-log-level.js +4 -4
- package/dist/logger/get-log-level.mjs +3 -3
- package/dist/logger/index.js +12 -12
- package/dist/logger/index.mjs +11 -11
- package/dist/types.js +3 -3
- package/dist/types.mjs +2 -2
- package/dist/utilities/apply-workspace-tokens.js +6 -6
- package/dist/utilities/apply-workspace-tokens.mjs +5 -5
- package/dist/utilities/correct-paths.js +3 -3
- package/dist/utilities/correct-paths.mjs +2 -2
- package/dist/utilities/file-path-utils.js +3 -3
- package/dist/utilities/file-path-utils.mjs +2 -2
- package/dist/utilities/find-up.js +3 -3
- package/dist/utilities/find-up.mjs +2 -2
- package/dist/utilities/find-workspace-root.js +5 -5
- package/dist/utilities/find-workspace-root.mjs +4 -4
- package/dist/utilities/get-default-config.js +7 -7
- package/dist/utilities/get-default-config.mjs +6 -6
- package/dist/utilities/index.js +16 -16
- package/dist/utilities/index.mjs +15 -15
- package/dist/utilities/process-handler.js +12 -12
- package/dist/utilities/process-handler.mjs +11 -11
- package/dist/utilities/run.js +3 -3
- package/dist/utilities/run.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-K6TQN2LZ.js +0 -6
- package/dist/chunk-MGI2M3SX.js +0 -6
- package/dist/chunk-QHVHX67K.js +0 -6
- package/dist/chunk-SJO5XZQA.js +0 -6
- package/dist/chunk-WXOSG64C.js +0 -70
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,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkUMQNSY3Ujs = require('./chunk-UMQNSY3U.js');
|
|
5
5
|
|
|
6
6
|
// src/utilities/find-up.ts
|
|
7
|
-
|
|
7
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
8
8
|
var _fs = require('fs');
|
|
9
9
|
var _path = require('path');
|
|
10
10
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -20,7 +20,7 @@ function findFolderUp(startPath, endFileNames) {
|
|
|
20
20
|
}
|
|
21
21
|
return void 0;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
_chunkUMQNSY3Ujs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUMQNSY3Ujs = require('./chunk-UMQNSY3U.js');
|
|
4
4
|
|
|
5
5
|
// ../config/src/constants.ts
|
|
6
|
-
|
|
6
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
7
7
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
8
8
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
9
9
|
var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
|
|
10
10
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
11
11
|
|
|
12
12
|
// ../config/src/schema.ts
|
|
13
|
-
|
|
13
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
14
14
|
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
15
15
|
var DarkColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
16
16
|
var LightColorSchema = _zod2.default.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
@@ -154,7 +154,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
154
154
|
}).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");
|
|
155
155
|
|
|
156
156
|
// ../config/src/types.ts
|
|
157
|
-
|
|
157
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
158
158
|
var COLOR_KEYS = [
|
|
159
159
|
"dark",
|
|
160
160
|
"light",
|
|
@@ -174,10 +174,10 @@ var COLOR_KEYS = [
|
|
|
174
174
|
];
|
|
175
175
|
|
|
176
176
|
// ../config/src/index.ts
|
|
177
|
-
|
|
177
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
178
178
|
|
|
179
179
|
// ../config/src/define-config.ts
|
|
180
|
-
|
|
180
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
181
181
|
|
|
182
182
|
|
|
183
183
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkUMQNSY3Ujs = require('./chunk-UMQNSY3U.js');
|
|
5
5
|
|
|
6
6
|
// src/utilities/run.ts
|
|
7
|
-
|
|
7
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
8
8
|
var _child_process = require('child_process');
|
|
9
9
|
var LARGE_BUFFER = 1024 * 1e6;
|
|
10
|
-
var run = /* @__PURE__ */
|
|
10
|
+
var run = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), stdio = "inherit", env = process.env) => {
|
|
11
11
|
return _child_process.execSync.call(void 0, command, {
|
|
12
12
|
cwd,
|
|
13
13
|
env: {
|
|
@@ -22,7 +22,7 @@ var run = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (config, command,
|
|
|
22
22
|
killSignal: "SIGTERM"
|
|
23
23
|
});
|
|
24
24
|
}, "run");
|
|
25
|
-
var runAsync = /* @__PURE__ */
|
|
25
|
+
var runAsync = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), env = process.env) => {
|
|
26
26
|
return _child_process.exec.call(void 0, command, {
|
|
27
27
|
cwd,
|
|
28
28
|
env: {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeSystem
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VNAKH3SN.mjs";
|
|
4
4
|
import {
|
|
5
5
|
findWorkspaceRoot
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-N4RRUDEU.mjs";
|
|
7
7
|
import {
|
|
8
8
|
joinPaths
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-STXZQNAU.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__name,
|
|
12
12
|
init_esm_shims
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WARKB24U.mjs";
|
|
14
14
|
|
|
15
15
|
// src/config-file/get-config-file.ts
|
|
16
16
|
init_esm_shims();
|
|
@@ -1,20 +1,20 @@
|
|
|
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 _chunkMW5LDGT2js = require('./chunk-MW5LDGT2.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkQTBTJBPXjs = require('./chunk-QTBTJBPX.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkALILAYWEjs = require('./chunk-ALILAYWE.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkUMQNSY3Ujs = require('./chunk-UMQNSY3U.js');
|
|
14
14
|
|
|
15
15
|
// src/env/set-env.ts
|
|
16
|
-
|
|
17
|
-
var setExtensionEnv = /* @__PURE__ */
|
|
16
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
17
|
+
var setExtensionEnv = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (extensionName, extension) => {
|
|
18
18
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
19
19
|
if (extension[key]) {
|
|
20
20
|
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _ => _.replace, 'call', _2 => _2(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _3 => _3[0], 'optionalAccess', _4 => _4.toUpperCase, 'call', _5 => _5()]) + input.slice(1) : ""), 'access', _6 => _6.split, 'call', _7 => _7(/(?=[A-Z])|[.\-\s_]/), 'access', _8 => _8.map, 'call', _9 => _9((x) => x.toLowerCase())]), () => ( []));
|
|
@@ -33,7 +33,7 @@ var setExtensionEnv = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (exte
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}, "setExtensionEnv");
|
|
36
|
-
var setConfigEnv = /* @__PURE__ */
|
|
36
|
+
var setConfigEnv = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (config) => {
|
|
37
37
|
const prefix = "STORM_";
|
|
38
38
|
if (config.extends) {
|
|
39
39
|
process.env[`${prefix}EXTENDS`] = config.extends;
|
|
@@ -81,31 +81,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (config)
|
|
|
81
81
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
82
82
|
}
|
|
83
83
|
if (config.configFile) {
|
|
84
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
84
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.configFile);
|
|
85
85
|
}
|
|
86
86
|
if (config.workspaceRoot) {
|
|
87
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
88
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
89
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
87
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
88
|
+
process.env.NX_WORKSPACE_ROOT = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
89
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
90
90
|
}
|
|
91
91
|
if (config.directories) {
|
|
92
92
|
if (!config.skipCache && config.directories.cache) {
|
|
93
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
93
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.directories.cache);
|
|
94
94
|
}
|
|
95
95
|
if (config.directories.data) {
|
|
96
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
96
|
+
process.env[`${prefix}DATA_DIR`] = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.directories.data);
|
|
97
97
|
}
|
|
98
98
|
if (config.directories.config) {
|
|
99
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
99
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.directories.config);
|
|
100
100
|
}
|
|
101
101
|
if (config.directories.temp) {
|
|
102
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
102
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.directories.temp);
|
|
103
103
|
}
|
|
104
104
|
if (config.directories.log) {
|
|
105
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
105
|
+
process.env[`${prefix}LOG_DIR`] = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.directories.log);
|
|
106
106
|
}
|
|
107
107
|
if (config.directories.build) {
|
|
108
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
108
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkQTBTJBPXjs.correctPaths.call(void 0, config.directories.build);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
if (config.skipCache !== void 0) {
|
|
@@ -159,18 +159,18 @@ var setConfigEnv = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (config)
|
|
|
159
159
|
if (config.logLevel) {
|
|
160
160
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
161
161
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
162
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
163
|
-
process.env.RUST_BACKTRACE =
|
|
162
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkMW5LDGT2js.getLogLevel.call(void 0, config.logLevel) >= _chunkALILAYWEjs.LogLevel.DEBUG ? true : false);
|
|
163
|
+
process.env.RUST_BACKTRACE = _chunkMW5LDGT2js.getLogLevel.call(void 0, config.logLevel) >= _chunkALILAYWEjs.LogLevel.DEBUG ? "full" : "none";
|
|
164
164
|
}
|
|
165
165
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
166
166
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
167
167
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
168
168
|
}
|
|
169
169
|
}, "setConfigEnv");
|
|
170
|
-
var setThemeColorConfigEnv = /* @__PURE__ */
|
|
170
|
+
var setThemeColorConfigEnv = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (prefix, config) => {
|
|
171
171
|
return _optionalChain([config, 'optionalAccess', _19 => _19.light, 'optionalAccess', _20 => _20.brand]) || _optionalChain([config, 'optionalAccess', _21 => _21.dark, 'optionalAccess', _22 => _22.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
172
172
|
}, "setThemeColorConfigEnv");
|
|
173
|
-
var setSingleThemeColorConfigEnv = /* @__PURE__ */
|
|
173
|
+
var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (prefix, config) => {
|
|
174
174
|
if (config.dark) {
|
|
175
175
|
process.env[`${prefix}DARK`] = config.dark;
|
|
176
176
|
}
|
|
@@ -214,13 +214,13 @@ var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(
|
|
|
214
214
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
215
215
|
}
|
|
216
216
|
}, "setSingleThemeColorConfigEnv");
|
|
217
|
-
var setMultiThemeColorConfigEnv = /* @__PURE__ */
|
|
217
|
+
var setMultiThemeColorConfigEnv = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (prefix, config) => {
|
|
218
218
|
return {
|
|
219
219
|
light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
|
|
220
220
|
dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
|
|
221
221
|
};
|
|
222
222
|
}, "setMultiThemeColorConfigEnv");
|
|
223
|
-
var setBaseThemeColorConfigEnv = /* @__PURE__ */
|
|
223
|
+
var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (prefix, config) => {
|
|
224
224
|
if (config.foreground) {
|
|
225
225
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
226
226
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUMQNSY3Ujs = require('./chunk-UMQNSY3U.js');
|
|
4
4
|
|
|
5
5
|
// src/types.ts
|
|
6
|
-
|
|
6
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
7
7
|
var LogLevel = {
|
|
8
8
|
SILENT: 0,
|
|
9
9
|
FATAL: 10,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLogLevel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E6O3JBTJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
correctPaths
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-STXZQNAU.mjs";
|
|
7
7
|
import {
|
|
8
8
|
LogLevel
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KOV36WBN.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__name,
|
|
12
12
|
init_esm_shims
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WARKB24U.mjs";
|
|
14
14
|
|
|
15
15
|
// src/env/set-env.ts
|
|
16
16
|
init_esm_shims();
|
|
@@ -1,62 +1,62 @@
|
|
|
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 _chunkSGYF7ZPEjs = require('./chunk-SGYF7ZPE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMW5LDGT2js = require('./chunk-MW5LDGT2.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkALILAYWEjs = require('./chunk-ALILAYWE.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkRT3RKXLAjs = require('./chunk-RT3RKXLA.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkUMQNSY3Ujs = require('./chunk-UMQNSY3U.js');
|
|
18
18
|
|
|
19
19
|
// src/logger/console.ts
|
|
20
|
-
|
|
21
|
-
var getLogFn = /* @__PURE__ */
|
|
22
|
-
const _chalk =
|
|
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]) ?
|
|
24
|
-
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL ||
|
|
25
|
-
if (typeof logLevel === "number" && (logLevel >=
|
|
20
|
+
_chunkUMQNSY3Ujs.init_cjs_shims.call(void 0, );
|
|
21
|
+
var getLogFn = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (logLevel = _chunkALILAYWEjs.LogLevel.INFO, config = {}) => {
|
|
22
|
+
const _chalk = _chunkRT3RKXLAjs.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]) ? _chunkSGYF7ZPEjs.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"]]) : _chunkSGYF7ZPEjs.DEFAULT_COLOR_CONFIG;
|
|
24
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || _chunkALILAYWEjs.LogLevelLabel.INFO;
|
|
25
|
+
if (typeof logLevel === "number" && (logLevel >= _chunkMW5LDGT2js.getLogLevel.call(void 0, configLogLevel) || logLevel <= _chunkALILAYWEjs.LogLevel.SILENT) || typeof logLevel === "string" && _chunkMW5LDGT2js.getLogLevel.call(void 0, logLevel) >= _chunkMW5LDGT2js.getLogLevel.call(void 0, configLogLevel)) {
|
|
26
26
|
return (_) => {
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
if (typeof logLevel === "number" &&
|
|
29
|
+
if (typeof logLevel === "number" && _chunkALILAYWEjs.LogLevel.FATAL >= logLevel || typeof logLevel === "string" && _chunkALILAYWEjs.LogLevel.FATAL >= _chunkMW5LDGT2js.getLogLevel.call(void 0, logLevel)) {
|
|
30
30
|
return (message) => {
|
|
31
31
|
console.error(`${_chalk.bold.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a"))).whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(formatLogMessage(message))}
|
|
32
32
|
`);
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
if (typeof logLevel === "number" &&
|
|
35
|
+
if (typeof logLevel === "number" && _chunkALILAYWEjs.LogLevel.ERROR >= logLevel || typeof logLevel === "string" && _chunkALILAYWEjs.LogLevel.ERROR >= _chunkMW5LDGT2js.getLogLevel.call(void 0, logLevel)) {
|
|
36
36
|
return (message) => {
|
|
37
37
|
console.error(`${_chalk.bold.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.danger, () => ( "#f85149"))).whiteBright(" \u2718 Error ")} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(formatLogMessage(message))}
|
|
38
38
|
`);
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
if (typeof logLevel === "number" &&
|
|
41
|
+
if (typeof logLevel === "number" && _chunkALILAYWEjs.LogLevel.WARN >= logLevel || typeof logLevel === "string" && _chunkALILAYWEjs.LogLevel.WARN >= _chunkMW5LDGT2js.getLogLevel.call(void 0, logLevel)) {
|
|
42
42
|
return (message) => {
|
|
43
43
|
console.warn(`${_chalk.bold.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.warning, () => ( "#e3b341"))).whiteBright(" \u26A0 Warn ")} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(formatLogMessage(message))}
|
|
44
44
|
`);
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
if (typeof logLevel === "number" &&
|
|
47
|
+
if (typeof logLevel === "number" && _chunkALILAYWEjs.LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && _chunkALILAYWEjs.LogLevel.SUCCESS >= _chunkMW5LDGT2js.getLogLevel.call(void 0, logLevel)) {
|
|
48
48
|
return (message) => {
|
|
49
49
|
console.info(`${_chalk.bold.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.success, () => ( "#56d364"))).whiteBright(" \u2713 Success ")} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(formatLogMessage(message))}
|
|
50
50
|
`);
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
if (typeof logLevel === "number" &&
|
|
53
|
+
if (typeof logLevel === "number" && _chunkALILAYWEjs.LogLevel.INFO >= logLevel || typeof logLevel === "string" && _chunkALILAYWEjs.LogLevel.INFO >= _chunkMW5LDGT2js.getLogLevel.call(void 0, logLevel)) {
|
|
54
54
|
return (message) => {
|
|
55
55
|
console.info(`${_chalk.bold.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.info, () => ( "#58a6ff"))).whiteBright(" \u2139 Info ")} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(formatLogMessage(message))}
|
|
56
56
|
`);
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
if (typeof logLevel === "number" &&
|
|
59
|
+
if (typeof logLevel === "number" && _chunkALILAYWEjs.LogLevel.TRACE >= logLevel || typeof logLevel === "string" && _chunkALILAYWEjs.LogLevel.TRACE >= _chunkMW5LDGT2js.getLogLevel.call(void 0, logLevel)) {
|
|
60
60
|
return (message) => {
|
|
61
61
|
console.debug(`${_chalk.bold.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6"))).whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(formatLogMessage(message))}
|
|
62
62
|
`);
|
|
@@ -67,15 +67,15 @@ var getLogFn = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (logLevel =
|
|
|
67
67
|
`);
|
|
68
68
|
};
|
|
69
69
|
}, "getLogFn");
|
|
70
|
-
var writeFatal = /* @__PURE__ */
|
|
71
|
-
var writeError = /* @__PURE__ */
|
|
72
|
-
var writeWarning = /* @__PURE__ */
|
|
73
|
-
var writeInfo = /* @__PURE__ */
|
|
74
|
-
var writeSuccess = /* @__PURE__ */
|
|
75
|
-
var writeDebug = /* @__PURE__ */
|
|
76
|
-
var writeTrace = /* @__PURE__ */
|
|
77
|
-
var writeSystem = /* @__PURE__ */
|
|
78
|
-
var getStopwatch = /* @__PURE__ */
|
|
70
|
+
var writeFatal = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, config) => getLogFn(_chunkALILAYWEjs.LogLevel.FATAL, config)(message), "writeFatal");
|
|
71
|
+
var writeError = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, config) => getLogFn(_chunkALILAYWEjs.LogLevel.ERROR, config)(message), "writeError");
|
|
72
|
+
var writeWarning = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, config) => getLogFn(_chunkALILAYWEjs.LogLevel.WARN, config)(message), "writeWarning");
|
|
73
|
+
var writeInfo = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, config) => getLogFn(_chunkALILAYWEjs.LogLevel.INFO, config)(message), "writeInfo");
|
|
74
|
+
var writeSuccess = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, config) => getLogFn(_chunkALILAYWEjs.LogLevel.SUCCESS, config)(message), "writeSuccess");
|
|
75
|
+
var writeDebug = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, config) => getLogFn(_chunkALILAYWEjs.LogLevel.DEBUG, config)(message), "writeDebug");
|
|
76
|
+
var writeTrace = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, config) => getLogFn(_chunkALILAYWEjs.LogLevel.TRACE, config)(message), "writeTrace");
|
|
77
|
+
var writeSystem = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, config) => getLogFn(_chunkALILAYWEjs.LogLevel.ALL, config)(message), "writeSystem");
|
|
78
|
+
var getStopwatch = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (name) => {
|
|
79
79
|
const start = process.hrtime();
|
|
80
80
|
return () => {
|
|
81
81
|
const end = process.hrtime(start);
|
|
@@ -86,7 +86,7 @@ var getStopwatch = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (name) =
|
|
|
86
86
|
};
|
|
87
87
|
}, "getStopwatch");
|
|
88
88
|
var MAX_DEPTH = 4;
|
|
89
|
-
var formatLogMessage = /* @__PURE__ */
|
|
89
|
+
var formatLogMessage = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (message, options = {}, depth = 0) => {
|
|
90
90
|
if (depth > MAX_DEPTH) {
|
|
91
91
|
return "<max depth>";
|
|
92
92
|
}
|
|
@@ -102,7 +102,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
|
|
|
102
102
|
skip
|
|
103
103
|
}, depth + 1) : message[key]}`).join("\n")}` : message;
|
|
104
104
|
}, "formatLogMessage");
|
|
105
|
-
var _isFunction = /* @__PURE__ */
|
|
105
|
+
var _isFunction = /* @__PURE__ */ _chunkUMQNSY3Ujs.__name.call(void 0, (value) => {
|
|
106
106
|
try {
|
|
107
107
|
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _18 => _18.constructor]) && _optionalChain([value, 'optionalAccess', _19 => _19.call]) && _optionalChain([value, 'optionalAccess', _20 => _20.apply]));
|
|
108
108
|
} catch (e) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findWorkspaceRoot
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N4RRUDEU.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__name,
|
|
6
6
|
init_esm_shims
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WARKB24U.mjs";
|
|
8
8
|
|
|
9
9
|
// src/utilities/apply-workspace-tokens.ts
|
|
10
10
|
init_esm_shims();
|