@storm-software/config-tools 1.174.3 → 1.175.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunk-2W6XM5XQ.cjs +40 -0
- package/dist/chunk-BVJJK74Q.js +138 -0
- package/dist/chunk-CLCBZGN5.cjs +39 -0
- package/dist/chunk-CRWXF5UQ.js +40 -0
- package/dist/{chunk-UBEBZYFH.cjs → chunk-K24I634E.cjs} +0 -7
- package/dist/{chunk-BZLWPMXE.js → chunk-KBOEI4OA.js} +0 -7
- package/dist/chunk-QYEKN4QV.js +39 -0
- package/dist/chunk-XTF5ACDN.cjs +138 -0
- package/dist/config-file/get-config-file.cjs +3 -2
- package/dist/config-file/get-config-file.js +3 -2
- package/dist/config-file/index.cjs +3 -2
- package/dist/config-file/index.js +3 -2
- package/dist/create-storm-config.cjs +3 -2
- package/dist/create-storm-config.js +3 -2
- package/dist/get-config.cjs +3 -2
- package/dist/get-config.js +3 -2
- package/dist/index.cjs +9 -3
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -2
- package/dist/logger/create-logger.cjs +2 -2
- package/dist/logger/create-logger.d.cts +6 -0
- package/dist/logger/create-logger.d.ts +6 -0
- package/dist/logger/create-logger.js +1 -1
- package/dist/logger/index.cjs +2 -2
- package/dist/logger/index.js +1 -1
- package/dist/utilities/colors.cjs +12 -0
- package/dist/utilities/colors.d.cts +19 -0
- package/dist/utilities/colors.d.ts +19 -0
- package/dist/utilities/colors.js +12 -0
- package/dist/utilities/index.cjs +9 -3
- package/dist/utilities/index.d.cts +2 -0
- package/dist/utilities/index.d.ts +2 -0
- package/dist/utilities/index.js +8 -2
- package/dist/utilities/toml.cjs +1 -1
- package/dist/utilities/toml.js +1 -1
- package/package.json +4 -3
- /package/dist/{chunk-NAT5PWY2.cjs → chunk-3COHMHPU.cjs} +0 -0
- /package/dist/{chunk-WWUHEYYM.js → chunk-UKGRDKIH.js} +0 -0
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 -->
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkXTF5ACDNcjs = require('./chunk-XTF5ACDN.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkU436743Ucjs = require('./chunk-U436743U.cjs');
|
|
8
|
+
|
|
9
|
+
// src/get-config.ts
|
|
10
|
+
var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
11
|
+
return _chunkXTF5ACDNcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
|
|
12
|
+
};
|
|
13
|
+
var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
14
|
+
let workspaceRoot = options.workspaceRoot;
|
|
15
|
+
if (!workspaceRoot) {
|
|
16
|
+
workspaceRoot = _chunkU436743Ucjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
17
|
+
}
|
|
18
|
+
return getConfig(workspaceRoot, skipLogs);
|
|
19
|
+
};
|
|
20
|
+
var tryGetWorkspaceConfig = async (skipLogs = true, options = {}) => {
|
|
21
|
+
try {
|
|
22
|
+
let workspaceRoot = options.workspaceRoot;
|
|
23
|
+
if (!workspaceRoot) {
|
|
24
|
+
workspaceRoot = _chunkU436743Ucjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
25
|
+
}
|
|
26
|
+
return _chunkXTF5ACDNcjs.tryLoadStormWorkspaceConfig.call(void 0,
|
|
27
|
+
workspaceRoot,
|
|
28
|
+
skipLogs,
|
|
29
|
+
options.useDefault
|
|
30
|
+
);
|
|
31
|
+
} catch (e) {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig; exports.tryGetWorkspaceConfig = tryGetWorkspaceConfig;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getConfigEnv,
|
|
3
|
+
getExtensionEnv
|
|
4
|
+
} from "./chunk-BWCGUZR7.js";
|
|
5
|
+
import {
|
|
6
|
+
setConfigEnv
|
|
7
|
+
} from "./chunk-NNI6CYBY.js";
|
|
8
|
+
import {
|
|
9
|
+
getConfigFile
|
|
10
|
+
} from "./chunk-73L7WNYI.js";
|
|
11
|
+
import {
|
|
12
|
+
formatLogMessage,
|
|
13
|
+
writeTrace,
|
|
14
|
+
writeWarning
|
|
15
|
+
} from "./chunk-SMVSQFZ3.js";
|
|
16
|
+
import {
|
|
17
|
+
applyDefaultConfig,
|
|
18
|
+
getPackageJsonConfig
|
|
19
|
+
} from "./chunk-SHD7ZUSQ.js";
|
|
20
|
+
import {
|
|
21
|
+
findWorkspaceRoot
|
|
22
|
+
} from "./chunk-PTHGOJU6.js";
|
|
23
|
+
|
|
24
|
+
// src/create-storm-config.ts
|
|
25
|
+
import { stormWorkspaceConfigSchema } from "@storm-software/config/schema";
|
|
26
|
+
import defu from "defu";
|
|
27
|
+
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
28
|
+
var _static_cache = void 0;
|
|
29
|
+
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
30
|
+
let result;
|
|
31
|
+
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
32
|
+
let _workspaceRoot = workspaceRoot;
|
|
33
|
+
if (!_workspaceRoot) {
|
|
34
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
35
|
+
}
|
|
36
|
+
const configEnv = getConfigEnv();
|
|
37
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
38
|
+
if (!configFile) {
|
|
39
|
+
if (!skipLogs) {
|
|
40
|
+
writeWarning(
|
|
41
|
+
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
42
|
+
{ logLevel: "all" }
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
if (useDefault === false) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
50
|
+
result = applyDefaultConfig(
|
|
51
|
+
await stormWorkspaceConfigSchema.parseAsync(
|
|
52
|
+
defu(configEnv, configFile, defaultConfig)
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
result.workspaceRoot ??= _workspaceRoot;
|
|
56
|
+
} else {
|
|
57
|
+
result = _static_cache.data;
|
|
58
|
+
}
|
|
59
|
+
if (schema && extensionName) {
|
|
60
|
+
result.extensions = {
|
|
61
|
+
...result.extensions,
|
|
62
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
_static_cache = {
|
|
66
|
+
timestamp: Date.now(),
|
|
67
|
+
data: result
|
|
68
|
+
};
|
|
69
|
+
return result;
|
|
70
|
+
};
|
|
71
|
+
var createConfigExtension = (extensionName, schema) => {
|
|
72
|
+
const extension_cache_key = { extensionName };
|
|
73
|
+
if (_extension_cache.has(extension_cache_key)) {
|
|
74
|
+
return _extension_cache.get(extension_cache_key);
|
|
75
|
+
}
|
|
76
|
+
let extension = getExtensionEnv(extensionName);
|
|
77
|
+
if (schema) {
|
|
78
|
+
extension = schema.parse(extension);
|
|
79
|
+
}
|
|
80
|
+
_extension_cache.set(extension_cache_key, extension);
|
|
81
|
+
return extension;
|
|
82
|
+
};
|
|
83
|
+
var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
84
|
+
const config = await createStormWorkspaceConfig(
|
|
85
|
+
void 0,
|
|
86
|
+
void 0,
|
|
87
|
+
workspaceRoot,
|
|
88
|
+
skipLogs,
|
|
89
|
+
true
|
|
90
|
+
);
|
|
91
|
+
setConfigEnv(config);
|
|
92
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
93
|
+
writeTrace(
|
|
94
|
+
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
95
|
+
${formatLogMessage(config)}`,
|
|
96
|
+
config
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
return config;
|
|
100
|
+
};
|
|
101
|
+
var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefault = false) => {
|
|
102
|
+
try {
|
|
103
|
+
const config = await createStormWorkspaceConfig(
|
|
104
|
+
void 0,
|
|
105
|
+
void 0,
|
|
106
|
+
workspaceRoot,
|
|
107
|
+
skipLogs,
|
|
108
|
+
useDefault
|
|
109
|
+
);
|
|
110
|
+
if (!config) {
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
setConfigEnv(config);
|
|
114
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
115
|
+
writeTrace(
|
|
116
|
+
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
117
|
+
${formatLogMessage(config)}`,
|
|
118
|
+
config
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
return config;
|
|
122
|
+
} catch (error) {
|
|
123
|
+
if (!skipLogs) {
|
|
124
|
+
writeWarning(
|
|
125
|
+
`\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`,
|
|
126
|
+
{ logLevel: "all" }
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
return void 0;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export {
|
|
134
|
+
createStormWorkspaceConfig,
|
|
135
|
+
createConfigExtension,
|
|
136
|
+
loadStormWorkspaceConfig,
|
|
137
|
+
tryLoadStormWorkspaceConfig
|
|
138
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
|
|
3
|
+
var _chunkKH5SONKWcjs = require('./chunk-KH5SONKW.cjs');
|
|
4
|
+
|
|
5
|
+
// src/utilities/colors.ts
|
|
6
|
+
function getColorConfig(config) {
|
|
7
|
+
if (!_optionalChain([config, 'optionalAccess', _ => _.colors]) || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !_optionalChain([config, 'access', _2 => _2.colors, 'access', _3 => _3["base"], 'optionalAccess', _4 => _4["dark"]]))) {
|
|
8
|
+
return _chunkKH5SONKWcjs.DEFAULT_COLOR_CONFIG;
|
|
9
|
+
}
|
|
10
|
+
if (config.colors["base"]) {
|
|
11
|
+
if (typeof config.colors["base"]["dark"] === "object") {
|
|
12
|
+
return config.colors["base"]["dark"];
|
|
13
|
+
} else if (config.colors["base"]["dark"] === "string") {
|
|
14
|
+
return config.colors["base"];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (typeof config.colors["dark"] === "object") {
|
|
18
|
+
return config.colors["dark"];
|
|
19
|
+
}
|
|
20
|
+
return _nullishCoalesce(config.colors, () => ( _chunkKH5SONKWcjs.DEFAULT_COLOR_CONFIG));
|
|
21
|
+
}
|
|
22
|
+
function getColor(config, key) {
|
|
23
|
+
const colors = getColorConfig(config);
|
|
24
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || _chunkKH5SONKWcjs.DEFAULT_COLOR_CONFIG["dark"][key] || _chunkKH5SONKWcjs.DEFAULT_COLOR_CONFIG[key];
|
|
25
|
+
if (result) {
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
if (key === "link") {
|
|
29
|
+
return getColor(config, "info");
|
|
30
|
+
} else if (key === "fatal") {
|
|
31
|
+
return getColor(config, "danger");
|
|
32
|
+
}
|
|
33
|
+
return getColor(config, "brand");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
exports.getColorConfig = getColorConfig; exports.getColor = getColor;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loadStormWorkspaceConfig,
|
|
3
|
+
tryLoadStormWorkspaceConfig
|
|
4
|
+
} from "./chunk-BVJJK74Q.js";
|
|
5
|
+
import {
|
|
6
|
+
findWorkspaceRoot
|
|
7
|
+
} from "./chunk-PTHGOJU6.js";
|
|
8
|
+
|
|
9
|
+
// src/get-config.ts
|
|
10
|
+
var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
11
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
12
|
+
};
|
|
13
|
+
var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
14
|
+
let workspaceRoot = options.workspaceRoot;
|
|
15
|
+
if (!workspaceRoot) {
|
|
16
|
+
workspaceRoot = findWorkspaceRoot(options.cwd);
|
|
17
|
+
}
|
|
18
|
+
return getConfig(workspaceRoot, skipLogs);
|
|
19
|
+
};
|
|
20
|
+
var tryGetWorkspaceConfig = async (skipLogs = true, options = {}) => {
|
|
21
|
+
try {
|
|
22
|
+
let workspaceRoot = options.workspaceRoot;
|
|
23
|
+
if (!workspaceRoot) {
|
|
24
|
+
workspaceRoot = findWorkspaceRoot(options.cwd);
|
|
25
|
+
}
|
|
26
|
+
return tryLoadStormWorkspaceConfig(
|
|
27
|
+
workspaceRoot,
|
|
28
|
+
skipLogs,
|
|
29
|
+
options.useDefault
|
|
30
|
+
);
|
|
31
|
+
} catch {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
getConfig,
|
|
38
|
+
getWorkspaceConfig,
|
|
39
|
+
tryGetWorkspaceConfig
|
|
40
|
+
};
|
|
@@ -4,18 +4,11 @@
|
|
|
4
4
|
var _chunkXPQXNNGZcjs = require('./chunk-XPQXNNGZ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var _chunkU436743Ucjs = require('./chunk-U436743U.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
7
|
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
11
8
|
|
|
12
9
|
// src/logger/create-logger.ts
|
|
13
10
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
14
11
|
async function createLogger(config) {
|
|
15
|
-
const workspaceRoot = _chunkU436743Ucjs.findWorkspaceRoot.call(void 0, );
|
|
16
|
-
if (!workspaceRoot) {
|
|
17
|
-
throw new Error("Cannot find workspace root");
|
|
18
|
-
}
|
|
19
12
|
const writeFatal = _chunkXPQXNNGZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.FATAL, config, _chalk2.default);
|
|
20
13
|
const writeError = _chunkXPQXNNGZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.ERROR, config, _chalk2.default);
|
|
21
14
|
const writeWarning = _chunkXPQXNNGZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.WARN, config, _chalk2.default);
|
|
@@ -2,9 +2,6 @@ import {
|
|
|
2
2
|
getLogFn,
|
|
3
3
|
getStopwatch
|
|
4
4
|
} from "./chunk-SMVSQFZ3.js";
|
|
5
|
-
import {
|
|
6
|
-
findWorkspaceRoot
|
|
7
|
-
} from "./chunk-PTHGOJU6.js";
|
|
8
5
|
import {
|
|
9
6
|
LogLevel
|
|
10
7
|
} from "./chunk-POXTJ6GF.js";
|
|
@@ -12,10 +9,6 @@ import {
|
|
|
12
9
|
// src/logger/create-logger.ts
|
|
13
10
|
import chalk from "chalk";
|
|
14
11
|
async function createLogger(config) {
|
|
15
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
16
|
-
if (!workspaceRoot) {
|
|
17
|
-
throw new Error("Cannot find workspace root");
|
|
18
|
-
}
|
|
19
12
|
const writeFatal = getLogFn(LogLevel.FATAL, config, chalk);
|
|
20
13
|
const writeError = getLogFn(LogLevel.ERROR, config, chalk);
|
|
21
14
|
const writeWarning = getLogFn(LogLevel.WARN, config, chalk);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_COLOR_CONFIG
|
|
3
|
+
} from "./chunk-SHD7ZUSQ.js";
|
|
4
|
+
|
|
5
|
+
// src/utilities/colors.ts
|
|
6
|
+
function getColorConfig(config) {
|
|
7
|
+
if (!config?.colors || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !config.colors["base"]?.["dark"])) {
|
|
8
|
+
return DEFAULT_COLOR_CONFIG;
|
|
9
|
+
}
|
|
10
|
+
if (config.colors["base"]) {
|
|
11
|
+
if (typeof config.colors["base"]["dark"] === "object") {
|
|
12
|
+
return config.colors["base"]["dark"];
|
|
13
|
+
} else if (config.colors["base"]["dark"] === "string") {
|
|
14
|
+
return config.colors["base"];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (typeof config.colors["dark"] === "object") {
|
|
18
|
+
return config.colors["dark"];
|
|
19
|
+
}
|
|
20
|
+
return config.colors ?? DEFAULT_COLOR_CONFIG;
|
|
21
|
+
}
|
|
22
|
+
function getColor(config, key) {
|
|
23
|
+
const colors = getColorConfig(config);
|
|
24
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
25
|
+
if (result) {
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
if (key === "link") {
|
|
29
|
+
return getColor(config, "info");
|
|
30
|
+
} else if (key === "fatal") {
|
|
31
|
+
return getColor(config, "danger");
|
|
32
|
+
}
|
|
33
|
+
return getColor(config, "brand");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
getColorConfig,
|
|
38
|
+
getColor
|
|
39
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
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
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkCIVWRQRNcjs = require('./chunk-CIVWRQRN.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunk6YHEX4VCcjs = require('./chunk-6YHEX4VC.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkN5TOHWQYcjs = require('./chunk-N5TOHWQY.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkXPQXNNGZcjs = require('./chunk-XPQXNNGZ.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var _chunkKH5SONKWcjs = require('./chunk-KH5SONKW.cjs');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunkU436743Ucjs = require('./chunk-U436743U.cjs');
|
|
23
|
+
|
|
24
|
+
// src/create-storm-config.ts
|
|
25
|
+
var _schema = require('@storm-software/config/schema');
|
|
26
|
+
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
27
|
+
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
28
|
+
var _static_cache = void 0;
|
|
29
|
+
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
30
|
+
let result;
|
|
31
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
32
|
+
let _workspaceRoot = workspaceRoot;
|
|
33
|
+
if (!_workspaceRoot) {
|
|
34
|
+
_workspaceRoot = _chunkU436743Ucjs.findWorkspaceRoot.call(void 0, );
|
|
35
|
+
}
|
|
36
|
+
const configEnv = _chunkCIVWRQRNcjs.getConfigEnv.call(void 0, );
|
|
37
|
+
const configFile = await _chunkN5TOHWQYcjs.getConfigFile.call(void 0, _workspaceRoot);
|
|
38
|
+
if (!configFile) {
|
|
39
|
+
if (!skipLogs) {
|
|
40
|
+
_chunkXPQXNNGZcjs.writeWarning.call(void 0,
|
|
41
|
+
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
42
|
+
{ logLevel: "all" }
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
if (useDefault === false) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const defaultConfig = await _chunkKH5SONKWcjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
50
|
+
result = _chunkKH5SONKWcjs.applyDefaultConfig.call(void 0,
|
|
51
|
+
await _schema.stormWorkspaceConfigSchema.parseAsync(
|
|
52
|
+
_defu2.default.call(void 0, configEnv, configFile, defaultConfig)
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
result.workspaceRoot ??= _workspaceRoot;
|
|
56
|
+
} else {
|
|
57
|
+
result = _static_cache.data;
|
|
58
|
+
}
|
|
59
|
+
if (schema && extensionName) {
|
|
60
|
+
result.extensions = {
|
|
61
|
+
...result.extensions,
|
|
62
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
_static_cache = {
|
|
66
|
+
timestamp: Date.now(),
|
|
67
|
+
data: result
|
|
68
|
+
};
|
|
69
|
+
return result;
|
|
70
|
+
};
|
|
71
|
+
var createConfigExtension = (extensionName, schema) => {
|
|
72
|
+
const extension_cache_key = { extensionName };
|
|
73
|
+
if (_extension_cache.has(extension_cache_key)) {
|
|
74
|
+
return _extension_cache.get(extension_cache_key);
|
|
75
|
+
}
|
|
76
|
+
let extension = _chunkCIVWRQRNcjs.getExtensionEnv.call(void 0, extensionName);
|
|
77
|
+
if (schema) {
|
|
78
|
+
extension = schema.parse(extension);
|
|
79
|
+
}
|
|
80
|
+
_extension_cache.set(extension_cache_key, extension);
|
|
81
|
+
return extension;
|
|
82
|
+
};
|
|
83
|
+
var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
84
|
+
const config = await createStormWorkspaceConfig(
|
|
85
|
+
void 0,
|
|
86
|
+
void 0,
|
|
87
|
+
workspaceRoot,
|
|
88
|
+
skipLogs,
|
|
89
|
+
true
|
|
90
|
+
);
|
|
91
|
+
_chunk6YHEX4VCcjs.setConfigEnv.call(void 0, config);
|
|
92
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
93
|
+
_chunkXPQXNNGZcjs.writeTrace.call(void 0,
|
|
94
|
+
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
95
|
+
${_chunkXPQXNNGZcjs.formatLogMessage.call(void 0, config)}`,
|
|
96
|
+
config
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
return config;
|
|
100
|
+
};
|
|
101
|
+
var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefault = false) => {
|
|
102
|
+
try {
|
|
103
|
+
const config = await createStormWorkspaceConfig(
|
|
104
|
+
void 0,
|
|
105
|
+
void 0,
|
|
106
|
+
workspaceRoot,
|
|
107
|
+
skipLogs,
|
|
108
|
+
useDefault
|
|
109
|
+
);
|
|
110
|
+
if (!config) {
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
_chunk6YHEX4VCcjs.setConfigEnv.call(void 0, config);
|
|
114
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
115
|
+
_chunkXPQXNNGZcjs.writeTrace.call(void 0,
|
|
116
|
+
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
117
|
+
${_chunkXPQXNNGZcjs.formatLogMessage.call(void 0, config)}`,
|
|
118
|
+
config
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
return config;
|
|
122
|
+
} catch (error) {
|
|
123
|
+
if (!skipLogs) {
|
|
124
|
+
_chunkXPQXNNGZcjs.writeWarning.call(void 0,
|
|
125
|
+
`\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`,
|
|
126
|
+
{ logLevel: "all" }
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
return void 0;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
exports.createStormWorkspaceConfig = createStormWorkspaceConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormWorkspaceConfig = loadStormWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = tryLoadStormWorkspaceConfig;
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkN5TOHWQYcjs = require('../chunk-N5TOHWQY.cjs');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-3COHMHPU.cjs');
|
|
6
6
|
require('../chunk-BKUK5DV7.cjs');
|
|
7
7
|
require('../chunk-DQT6QJRQ.cjs');
|
|
8
8
|
require('../chunk-3FETUQ3K.cjs');
|
|
9
9
|
require('../chunk-QLJYCKMD.cjs');
|
|
10
|
+
require('../chunk-CLCBZGN5.cjs');
|
|
10
11
|
require('../chunk-JMI7BRL7.cjs');
|
|
11
12
|
require('../chunk-7PV6L7I7.cjs');
|
|
12
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-K24I634E.cjs');
|
|
13
14
|
require('../chunk-XPQXNNGZ.cjs');
|
|
14
15
|
require('../chunk-KH5SONKW.cjs');
|
|
15
16
|
require('../chunk-U436743U.cjs');
|
|
@@ -2,14 +2,15 @@ import {
|
|
|
2
2
|
getConfigFile,
|
|
3
3
|
getConfigFileByName
|
|
4
4
|
} from "../chunk-73L7WNYI.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-UKGRDKIH.js";
|
|
6
6
|
import "../chunk-JLIGJTMV.js";
|
|
7
7
|
import "../chunk-6RVIJKY3.js";
|
|
8
8
|
import "../chunk-AUCRLLQF.js";
|
|
9
9
|
import "../chunk-HYJVQZYZ.js";
|
|
10
|
+
import "../chunk-QYEKN4QV.js";
|
|
10
11
|
import "../chunk-WYQYWPLE.js";
|
|
11
12
|
import "../chunk-RRKB32OH.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-KBOEI4OA.js";
|
|
13
14
|
import "../chunk-SMVSQFZ3.js";
|
|
14
15
|
import "../chunk-SHD7ZUSQ.js";
|
|
15
16
|
import "../chunk-PTHGOJU6.js";
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
var _chunkN5TOHWQYcjs = require('../chunk-N5TOHWQY.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-3COHMHPU.cjs');
|
|
7
7
|
require('../chunk-BKUK5DV7.cjs');
|
|
8
8
|
require('../chunk-DQT6QJRQ.cjs');
|
|
9
9
|
require('../chunk-3FETUQ3K.cjs');
|
|
10
10
|
require('../chunk-QLJYCKMD.cjs');
|
|
11
|
+
require('../chunk-CLCBZGN5.cjs');
|
|
11
12
|
require('../chunk-JMI7BRL7.cjs');
|
|
12
13
|
require('../chunk-7PV6L7I7.cjs');
|
|
13
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-K24I634E.cjs');
|
|
14
15
|
require('../chunk-XPQXNNGZ.cjs');
|
|
15
16
|
require('../chunk-KH5SONKW.cjs');
|
|
16
17
|
require('../chunk-U436743U.cjs');
|
|
@@ -3,14 +3,15 @@ import {
|
|
|
3
3
|
getConfigFile,
|
|
4
4
|
getConfigFileByName
|
|
5
5
|
} from "../chunk-73L7WNYI.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-UKGRDKIH.js";
|
|
7
7
|
import "../chunk-JLIGJTMV.js";
|
|
8
8
|
import "../chunk-6RVIJKY3.js";
|
|
9
9
|
import "../chunk-AUCRLLQF.js";
|
|
10
10
|
import "../chunk-HYJVQZYZ.js";
|
|
11
|
+
import "../chunk-QYEKN4QV.js";
|
|
11
12
|
import "../chunk-WYQYWPLE.js";
|
|
12
13
|
import "../chunk-RRKB32OH.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-KBOEI4OA.js";
|
|
14
15
|
import "../chunk-SMVSQFZ3.js";
|
|
15
16
|
import "../chunk-SHD7ZUSQ.js";
|
|
16
17
|
import "../chunk-PTHGOJU6.js";
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
var _chunkKQSZHZV3cjs = require('./chunk-KQSZHZV3.cjs');
|
|
7
7
|
require('./chunk-N5TOHWQY.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-3COHMHPU.cjs');
|
|
9
9
|
require('./chunk-BKUK5DV7.cjs');
|
|
10
10
|
require('./chunk-DQT6QJRQ.cjs');
|
|
11
11
|
require('./chunk-3FETUQ3K.cjs');
|
|
12
12
|
require('./chunk-QLJYCKMD.cjs');
|
|
13
|
+
require('./chunk-CLCBZGN5.cjs');
|
|
13
14
|
require('./chunk-JMI7BRL7.cjs');
|
|
14
15
|
require('./chunk-7PV6L7I7.cjs');
|
|
15
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-K24I634E.cjs');
|
|
16
17
|
require('./chunk-XPQXNNGZ.cjs');
|
|
17
18
|
require('./chunk-KH5SONKW.cjs');
|
|
18
19
|
require('./chunk-U436743U.cjs');
|
|
@@ -5,14 +5,15 @@ import {
|
|
|
5
5
|
tryLoadStormWorkspaceConfig
|
|
6
6
|
} from "./chunk-5TKRC6SE.js";
|
|
7
7
|
import "./chunk-73L7WNYI.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-UKGRDKIH.js";
|
|
9
9
|
import "./chunk-JLIGJTMV.js";
|
|
10
10
|
import "./chunk-6RVIJKY3.js";
|
|
11
11
|
import "./chunk-AUCRLLQF.js";
|
|
12
12
|
import "./chunk-HYJVQZYZ.js";
|
|
13
|
+
import "./chunk-QYEKN4QV.js";
|
|
13
14
|
import "./chunk-WYQYWPLE.js";
|
|
14
15
|
import "./chunk-RRKB32OH.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-KBOEI4OA.js";
|
|
16
17
|
import "./chunk-SMVSQFZ3.js";
|
|
17
18
|
import "./chunk-SHD7ZUSQ.js";
|
|
18
19
|
import "./chunk-PTHGOJU6.js";
|
package/dist/get-config.cjs
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
var _chunkUEKOSCRWcjs = require('./chunk-UEKOSCRW.cjs');
|
|
6
6
|
require('./chunk-KQSZHZV3.cjs');
|
|
7
7
|
require('./chunk-N5TOHWQY.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-3COHMHPU.cjs');
|
|
9
9
|
require('./chunk-BKUK5DV7.cjs');
|
|
10
10
|
require('./chunk-DQT6QJRQ.cjs');
|
|
11
11
|
require('./chunk-3FETUQ3K.cjs');
|
|
12
12
|
require('./chunk-QLJYCKMD.cjs');
|
|
13
|
+
require('./chunk-CLCBZGN5.cjs');
|
|
13
14
|
require('./chunk-JMI7BRL7.cjs');
|
|
14
15
|
require('./chunk-7PV6L7I7.cjs');
|
|
15
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-K24I634E.cjs');
|
|
16
17
|
require('./chunk-XPQXNNGZ.cjs');
|
|
17
18
|
require('./chunk-KH5SONKW.cjs');
|
|
18
19
|
require('./chunk-U436743U.cjs');
|
package/dist/get-config.js
CHANGED
|
@@ -5,14 +5,15 @@ import {
|
|
|
5
5
|
} from "./chunk-5C6UKEJV.js";
|
|
6
6
|
import "./chunk-5TKRC6SE.js";
|
|
7
7
|
import "./chunk-73L7WNYI.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-UKGRDKIH.js";
|
|
9
9
|
import "./chunk-JLIGJTMV.js";
|
|
10
10
|
import "./chunk-6RVIJKY3.js";
|
|
11
11
|
import "./chunk-AUCRLLQF.js";
|
|
12
12
|
import "./chunk-HYJVQZYZ.js";
|
|
13
|
+
import "./chunk-QYEKN4QV.js";
|
|
13
14
|
import "./chunk-WYQYWPLE.js";
|
|
14
15
|
import "./chunk-RRKB32OH.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-KBOEI4OA.js";
|
|
16
17
|
import "./chunk-SMVSQFZ3.js";
|
|
17
18
|
import "./chunk-SHD7ZUSQ.js";
|
|
18
19
|
import "./chunk-PTHGOJU6.js";
|
package/dist/index.cjs
CHANGED
|
@@ -14,7 +14,7 @@ require('./chunk-IWD6YQKX.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
var _chunkN5TOHWQYcjs = require('./chunk-N5TOHWQY.cjs');
|
|
17
|
-
require('./chunk-
|
|
17
|
+
require('./chunk-3COHMHPU.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -40,12 +40,16 @@ var _chunkQLJYCKMDcjs = require('./chunk-QLJYCKMD.cjs');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
var _chunkCLCBZGN5cjs = require('./chunk-CLCBZGN5.cjs');
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
43
47
|
|
|
44
48
|
var _chunkJMI7BRL7cjs = require('./chunk-JMI7BRL7.cjs');
|
|
45
49
|
require('./chunk-7PV6L7I7.cjs');
|
|
46
50
|
|
|
47
51
|
|
|
48
|
-
var
|
|
52
|
+
var _chunkK24I634Ecjs = require('./chunk-K24I634E.cjs');
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
|
|
@@ -186,4 +190,6 @@ var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
|
186
190
|
|
|
187
191
|
|
|
188
192
|
|
|
189
|
-
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
exports.CONSOLE_ICONS = _chunkWBQ4VS7Ecjs.CONSOLE_ICONS; exports.DEFAULT_COLOR_CONFIG = _chunkKH5SONKWcjs.DEFAULT_COLOR_CONFIG; exports.LARGE_BUFFER = _chunkDQT6QJRQcjs.LARGE_BUFFER; exports.LogLevel = _chunkIRCFHYKZcjs.LogLevel; exports.LogLevelLabel = _chunkIRCFHYKZcjs.LogLevelLabel; exports.applyDefaultConfig = _chunkKH5SONKWcjs.applyDefaultConfig; exports.applyWorkspaceBaseTokens = _chunkQLJYCKMDcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunkQLJYCKMDcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunkQLJYCKMDcjs.applyWorkspaceTokens; exports.basename = _chunkM3REM2FUcjs.basename; exports.correctPaths = _chunkM3REM2FUcjs.correctPaths; exports.createConfigExtension = _chunkKQSZHZV3cjs.createConfigExtension; exports.createLogger = _chunkK24I634Ecjs.createLogger; exports.createStormWorkspaceConfig = _chunkKQSZHZV3cjs.createStormWorkspaceConfig; exports.dirname = _chunkM3REM2FUcjs.dirname; exports.exitWithError = _chunkBKUK5DV7cjs.exitWithError; exports.exitWithSuccess = _chunkBKUK5DV7cjs.exitWithSuccess; exports.extname = _chunkM3REM2FUcjs.extname; exports.findFileName = _chunkJMI7BRL7cjs.findFileName; exports.findFilePath = _chunkJMI7BRL7cjs.findFilePath; exports.findWorkspaceRoot = _chunkU436743Ucjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunkU436743Ucjs.findWorkspaceRootSafe; exports.format = _chunkM3REM2FUcjs.format; exports.formatLogMessage = _chunkXPQXNNGZcjs.formatLogMessage; exports.formatTimestamp = _chunkBN6MEGGYcjs.formatTimestamp; exports.getChalk = _chunkCTYIEJ7Ccjs.getChalk; exports.getColor = _chunkCLCBZGN5cjs.getColor; exports.getColorConfig = _chunkCLCBZGN5cjs.getColorConfig; exports.getConfig = _chunkUEKOSCRWcjs.getConfig; exports.getConfigEnv = _chunkCIVWRQRNcjs.getConfigEnv; exports.getConfigFile = _chunkN5TOHWQYcjs.getConfigFile; exports.getConfigFileByName = _chunkN5TOHWQYcjs.getConfigFileByName; exports.getExtensionEnv = _chunkCIVWRQRNcjs.getExtensionEnv; exports.getLogFn = _chunkXPQXNNGZcjs.getLogFn; exports.getLogLevel = _chunk4PX5UVANcjs.getLogLevel; exports.getLogLevelLabel = _chunk4PX5UVANcjs.getLogLevelLabel; exports.getPackageJsonConfig = _chunkKH5SONKWcjs.getPackageJsonConfig; exports.getStopwatch = _chunkXPQXNNGZcjs.getStopwatch; exports.getWorkspaceConfig = _chunkUEKOSCRWcjs.getWorkspaceConfig; exports.handleProcess = _chunkBKUK5DV7cjs.handleProcess; exports.isAbsolute = _chunkM3REM2FUcjs.isAbsolute; exports.isUnicodeSupported = _chunkDTGT4OI3cjs.isUnicodeSupported; exports.isVerbose = _chunk4PX5UVANcjs.isVerbose; exports.joinPaths = _chunkM3REM2FUcjs.joinPaths; exports.loadStormWorkspaceConfig = _chunkKQSZHZV3cjs.loadStormWorkspaceConfig; exports.modifyCargoNestedTable = _chunk3FETUQ3Kcjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunk3FETUQ3Kcjs.modifyCargoTable; exports.normalizeString = _chunkM3REM2FUcjs.normalizeString; exports.normalizeWindowsPath = _chunkM3REM2FUcjs.normalizeWindowsPath; exports.parse = _chunkM3REM2FUcjs.parse; exports.parseCargoToml = _chunk3FETUQ3Kcjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunk3FETUQ3Kcjs.parseCargoTomlWithTree; exports.relative = _chunkM3REM2FUcjs.relative; exports.removeExtension = _chunkJMI7BRL7cjs.removeExtension; exports.resolve = _chunkM3REM2FUcjs.resolve; exports.run = _chunkDQT6QJRQcjs.run; exports.runAsync = _chunkDQT6QJRQcjs.runAsync; exports.sep = _chunkM3REM2FUcjs.sep; exports.setConfigEnv = _chunk6YHEX4VCcjs.setConfigEnv; exports.setExtensionEnv = _chunk6YHEX4VCcjs.setExtensionEnv; exports.stringifyCargoToml = _chunk3FETUQ3Kcjs.stringifyCargoToml; exports.toNamespacedPath = _chunkM3REM2FUcjs.toNamespacedPath; exports.tryGetWorkspaceConfig = _chunkUEKOSCRWcjs.tryGetWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = _chunkKQSZHZV3cjs.tryLoadStormWorkspaceConfig; exports.writeDebug = _chunkXPQXNNGZcjs.writeDebug; exports.writeError = _chunkXPQXNNGZcjs.writeError; exports.writeFatal = _chunkXPQXNNGZcjs.writeFatal; exports.writeInfo = _chunkXPQXNNGZcjs.writeInfo; exports.writeSuccess = _chunkXPQXNNGZcjs.writeSuccess; exports.writeSystem = _chunkXPQXNNGZcjs.writeSystem; exports.writeTrace = _chunkXPQXNNGZcjs.writeTrace; exports.writeWarning = _chunkXPQXNNGZcjs.writeWarning;
|
package/dist/index.d.cts
CHANGED
|
@@ -12,6 +12,7 @@ export { getLogLevel, getLogLevelLabel, isVerbose } from './logger/get-log-level
|
|
|
12
12
|
export { isUnicodeSupported } from './logger/is-unicode-supported.cjs';
|
|
13
13
|
export { BaseTokenizerOptions, DeepPartial, LogLevel, LogLevelLabel, Logger, ProjectTokenizerOptions } from './types.cjs';
|
|
14
14
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './utilities/apply-workspace-tokens.cjs';
|
|
15
|
+
export { getColor, getColorConfig } from './utilities/colors.cjs';
|
|
15
16
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './utilities/correct-paths.cjs';
|
|
16
17
|
export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './utilities/file-path-utils.cjs';
|
|
17
18
|
export { findWorkspaceRoot, findWorkspaceRootSafe } from './utilities/find-workspace-root.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { getLogLevel, getLogLevelLabel, isVerbose } from './logger/get-log-level
|
|
|
12
12
|
export { isUnicodeSupported } from './logger/is-unicode-supported.js';
|
|
13
13
|
export { BaseTokenizerOptions, DeepPartial, LogLevel, LogLevelLabel, Logger, ProjectTokenizerOptions } from './types.js';
|
|
14
14
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './utilities/apply-workspace-tokens.js';
|
|
15
|
+
export { getColor, getColorConfig } from './utilities/colors.js';
|
|
15
16
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './utilities/correct-paths.js';
|
|
16
17
|
export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './utilities/file-path-utils.js';
|
|
17
18
|
export { findWorkspaceRoot, findWorkspaceRootSafe } from './utilities/find-workspace-root.js';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getConfigFile,
|
|
15
15
|
getConfigFileByName
|
|
16
16
|
} from "./chunk-73L7WNYI.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-UKGRDKIH.js";
|
|
18
18
|
import {
|
|
19
19
|
exitWithError,
|
|
20
20
|
exitWithSuccess,
|
|
@@ -37,6 +37,10 @@ import {
|
|
|
37
37
|
applyWorkspaceProjectTokens,
|
|
38
38
|
applyWorkspaceTokens
|
|
39
39
|
} from "./chunk-HYJVQZYZ.js";
|
|
40
|
+
import {
|
|
41
|
+
getColor,
|
|
42
|
+
getColorConfig
|
|
43
|
+
} from "./chunk-QYEKN4QV.js";
|
|
40
44
|
import {
|
|
41
45
|
findFileName,
|
|
42
46
|
findFilePath,
|
|
@@ -45,7 +49,7 @@ import {
|
|
|
45
49
|
import "./chunk-RRKB32OH.js";
|
|
46
50
|
import {
|
|
47
51
|
createLogger
|
|
48
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-KBOEI4OA.js";
|
|
49
53
|
import {
|
|
50
54
|
formatLogMessage,
|
|
51
55
|
getLogFn,
|
|
@@ -142,6 +146,8 @@ export {
|
|
|
142
146
|
formatLogMessage,
|
|
143
147
|
formatTimestamp,
|
|
144
148
|
getChalk,
|
|
149
|
+
getColor,
|
|
150
|
+
getColorConfig,
|
|
145
151
|
getConfig,
|
|
146
152
|
getConfigEnv,
|
|
147
153
|
getConfigFile,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkK24I634Ecjs = require('../chunk-K24I634E.cjs');
|
|
4
4
|
require('../chunk-XPQXNNGZ.cjs');
|
|
5
5
|
require('../chunk-KH5SONKW.cjs');
|
|
6
6
|
require('../chunk-U436743U.cjs');
|
|
@@ -14,4 +14,4 @@ require('../chunk-4PX5UVAN.cjs');
|
|
|
14
14
|
require('../chunk-IRCFHYKZ.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.createLogger =
|
|
17
|
+
exports.createLogger = _chunkK24I634Ecjs.createLogger;
|
|
@@ -2,6 +2,12 @@ import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
|
2
2
|
import { Logger } from '../types.cjs';
|
|
3
3
|
import '@storm-software/config';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Create a logger instance with the specified configuration.
|
|
7
|
+
*
|
|
8
|
+
* @param config - Optional partial configuration for the logger.
|
|
9
|
+
* @returns A promise that resolves to a Logger instance.
|
|
10
|
+
*/
|
|
5
11
|
declare function createLogger(config?: Partial<StormWorkspaceConfig>): Promise<Logger>;
|
|
6
12
|
|
|
7
13
|
export { createLogger };
|
|
@@ -2,6 +2,12 @@ import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
|
2
2
|
import { Logger } from '../types.js';
|
|
3
3
|
import '@storm-software/config';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Create a logger instance with the specified configuration.
|
|
7
|
+
*
|
|
8
|
+
* @param config - Optional partial configuration for the logger.
|
|
9
|
+
* @returns A promise that resolves to a Logger instance.
|
|
10
|
+
*/
|
|
5
11
|
declare function createLogger(config?: Partial<StormWorkspaceConfig>): Promise<Logger>;
|
|
6
12
|
|
|
7
13
|
export { createLogger };
|
package/dist/logger/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-7PV6L7I7.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkK24I634Ecjs = require('../chunk-K24I634E.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -57,4 +57,4 @@ require('../chunk-IRCFHYKZ.cjs');
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
exports.CONSOLE_ICONS = _chunkWBQ4VS7Ecjs.CONSOLE_ICONS; exports.createLogger =
|
|
60
|
+
exports.CONSOLE_ICONS = _chunkWBQ4VS7Ecjs.CONSOLE_ICONS; exports.createLogger = _chunkK24I634Ecjs.createLogger; exports.formatLogMessage = _chunkXPQXNNGZcjs.formatLogMessage; exports.formatTimestamp = _chunkBN6MEGGYcjs.formatTimestamp; exports.getChalk = _chunkCTYIEJ7Ccjs.getChalk; exports.getLogFn = _chunkXPQXNNGZcjs.getLogFn; exports.getLogLevel = _chunk4PX5UVANcjs.getLogLevel; exports.getLogLevelLabel = _chunk4PX5UVANcjs.getLogLevelLabel; exports.getStopwatch = _chunkXPQXNNGZcjs.getStopwatch; exports.isUnicodeSupported = _chunkDTGT4OI3cjs.isUnicodeSupported; exports.isVerbose = _chunk4PX5UVANcjs.isVerbose; exports.writeDebug = _chunkXPQXNNGZcjs.writeDebug; exports.writeError = _chunkXPQXNNGZcjs.writeError; exports.writeFatal = _chunkXPQXNNGZcjs.writeFatal; exports.writeInfo = _chunkXPQXNNGZcjs.writeInfo; exports.writeSuccess = _chunkXPQXNNGZcjs.writeSuccess; exports.writeSystem = _chunkXPQXNNGZcjs.writeSystem; exports.writeTrace = _chunkXPQXNNGZcjs.writeTrace; exports.writeWarning = _chunkXPQXNNGZcjs.writeWarning;
|
package/dist/logger/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkCLCBZGN5cjs = require('../chunk-CLCBZGN5.cjs');
|
|
5
|
+
require('../chunk-KH5SONKW.cjs');
|
|
6
|
+
require('../chunk-U436743U.cjs');
|
|
7
|
+
require('../chunk-N3UX6L7X.cjs');
|
|
8
|
+
require('../chunk-M3REM2FU.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.getColor = _chunkCLCBZGN5cjs.getColor; exports.getColorConfig = _chunkCLCBZGN5cjs.getColorConfig;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StormWorkspaceConfig, ColorConfig } from '@storm-software/config/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get the color configuration from the Storm workspace configuration.
|
|
5
|
+
*
|
|
6
|
+
* @param config - The Storm workspace configuration object.
|
|
7
|
+
* @returns The color configuration, or the default color configuration if not defined.
|
|
8
|
+
*/
|
|
9
|
+
declare function getColorConfig(config: Pick<StormWorkspaceConfig, "colors">): ColorConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific color from the Storm workspace configuration.
|
|
12
|
+
*
|
|
13
|
+
* @param config - The Storm workspace configuration object.
|
|
14
|
+
* @param key - The key of the color to retrieve.
|
|
15
|
+
* @returns The color value for the specified key, or a default value if not defined.
|
|
16
|
+
*/
|
|
17
|
+
declare function getColor(config: Pick<StormWorkspaceConfig, "colors">, key: "background" | "foreground" | "brand" | "help" | "success" | "info" | "warning" | "danger" | "positive" | "negative" | "alternate" | "accent" | "link" | "fatal"): string;
|
|
18
|
+
|
|
19
|
+
export { getColor, getColorConfig };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StormWorkspaceConfig, ColorConfig } from '@storm-software/config/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get the color configuration from the Storm workspace configuration.
|
|
5
|
+
*
|
|
6
|
+
* @param config - The Storm workspace configuration object.
|
|
7
|
+
* @returns The color configuration, or the default color configuration if not defined.
|
|
8
|
+
*/
|
|
9
|
+
declare function getColorConfig(config: Pick<StormWorkspaceConfig, "colors">): ColorConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific color from the Storm workspace configuration.
|
|
12
|
+
*
|
|
13
|
+
* @param config - The Storm workspace configuration object.
|
|
14
|
+
* @param key - The key of the color to retrieve.
|
|
15
|
+
* @returns The color value for the specified key, or a default value if not defined.
|
|
16
|
+
*/
|
|
17
|
+
declare function getColor(config: Pick<StormWorkspaceConfig, "colors">, key: "background" | "foreground" | "brand" | "help" | "success" | "info" | "warning" | "danger" | "positive" | "negative" | "alternate" | "accent" | "link" | "fatal"): string;
|
|
18
|
+
|
|
19
|
+
export { getColor, getColorConfig };
|
package/dist/utilities/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-3COHMHPU.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -24,10 +24,14 @@ var _chunkQLJYCKMDcjs = require('../chunk-QLJYCKMD.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
var _chunkCLCBZGN5cjs = require('../chunk-CLCBZGN5.cjs');
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
27
31
|
|
|
28
32
|
var _chunkJMI7BRL7cjs = require('../chunk-JMI7BRL7.cjs');
|
|
29
33
|
require('../chunk-7PV6L7I7.cjs');
|
|
30
|
-
require('../chunk-
|
|
34
|
+
require('../chunk-K24I634E.cjs');
|
|
31
35
|
require('../chunk-XPQXNNGZ.cjs');
|
|
32
36
|
|
|
33
37
|
|
|
@@ -98,4 +102,6 @@ require('../chunk-IRCFHYKZ.cjs');
|
|
|
98
102
|
|
|
99
103
|
|
|
100
104
|
|
|
101
|
-
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
exports.DEFAULT_COLOR_CONFIG = _chunkKH5SONKWcjs.DEFAULT_COLOR_CONFIG; exports.LARGE_BUFFER = _chunkDQT6QJRQcjs.LARGE_BUFFER; exports.applyDefaultConfig = _chunkKH5SONKWcjs.applyDefaultConfig; exports.applyWorkspaceBaseTokens = _chunkQLJYCKMDcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunkQLJYCKMDcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunkQLJYCKMDcjs.applyWorkspaceTokens; exports.basename = _chunkM3REM2FUcjs.basename; exports.correctPaths = _chunkM3REM2FUcjs.correctPaths; exports.dirname = _chunkM3REM2FUcjs.dirname; exports.exitWithError = _chunkBKUK5DV7cjs.exitWithError; exports.exitWithSuccess = _chunkBKUK5DV7cjs.exitWithSuccess; exports.extname = _chunkM3REM2FUcjs.extname; exports.findFileName = _chunkJMI7BRL7cjs.findFileName; exports.findFilePath = _chunkJMI7BRL7cjs.findFilePath; exports.findWorkspaceRoot = _chunkU436743Ucjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunkU436743Ucjs.findWorkspaceRootSafe; exports.format = _chunkM3REM2FUcjs.format; exports.getColor = _chunkCLCBZGN5cjs.getColor; exports.getColorConfig = _chunkCLCBZGN5cjs.getColorConfig; exports.getPackageJsonConfig = _chunkKH5SONKWcjs.getPackageJsonConfig; exports.handleProcess = _chunkBKUK5DV7cjs.handleProcess; exports.isAbsolute = _chunkM3REM2FUcjs.isAbsolute; exports.joinPaths = _chunkM3REM2FUcjs.joinPaths; exports.modifyCargoNestedTable = _chunk3FETUQ3Kcjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunk3FETUQ3Kcjs.modifyCargoTable; exports.normalizeString = _chunkM3REM2FUcjs.normalizeString; exports.normalizeWindowsPath = _chunkM3REM2FUcjs.normalizeWindowsPath; exports.parse = _chunkM3REM2FUcjs.parse; exports.parseCargoToml = _chunk3FETUQ3Kcjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunk3FETUQ3Kcjs.parseCargoTomlWithTree; exports.relative = _chunkM3REM2FUcjs.relative; exports.removeExtension = _chunkJMI7BRL7cjs.removeExtension; exports.resolve = _chunkM3REM2FUcjs.resolve; exports.run = _chunkDQT6QJRQcjs.run; exports.runAsync = _chunkDQT6QJRQcjs.runAsync; exports.sep = _chunkM3REM2FUcjs.sep; exports.stringifyCargoToml = _chunk3FETUQ3Kcjs.stringifyCargoToml; exports.toNamespacedPath = _chunkM3REM2FUcjs.toNamespacedPath;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './apply-workspace-tokens.cjs';
|
|
2
|
+
export { getColor, getColorConfig } from './colors.cjs';
|
|
2
3
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './correct-paths.cjs';
|
|
3
4
|
export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './file-path-utils.cjs';
|
|
4
5
|
export { findWorkspaceRoot, findWorkspaceRootSafe } from './find-workspace-root.cjs';
|
|
@@ -8,5 +9,6 @@ export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from './run.cjs';
|
|
|
8
9
|
export { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from './toml.cjs';
|
|
9
10
|
import '../types.cjs';
|
|
10
11
|
import '@storm-software/config';
|
|
12
|
+
import '@storm-software/config/types';
|
|
11
13
|
import 'node:path';
|
|
12
14
|
import 'child_process';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './apply-workspace-tokens.js';
|
|
2
|
+
export { getColor, getColorConfig } from './colors.js';
|
|
2
3
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './correct-paths.js';
|
|
3
4
|
export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './file-path-utils.js';
|
|
4
5
|
export { findWorkspaceRoot, findWorkspaceRootSafe } from './find-workspace-root.js';
|
|
@@ -8,5 +9,6 @@ export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from './run.js';
|
|
|
8
9
|
export { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from './toml.js';
|
|
9
10
|
import '../types.js';
|
|
10
11
|
import '@storm-software/config';
|
|
12
|
+
import '@storm-software/config/types';
|
|
11
13
|
import 'node:path';
|
|
12
14
|
import 'child_process';
|
package/dist/utilities/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-UKGRDKIH.js";
|
|
2
2
|
import {
|
|
3
3
|
exitWithError,
|
|
4
4
|
exitWithSuccess,
|
|
@@ -21,13 +21,17 @@ import {
|
|
|
21
21
|
applyWorkspaceProjectTokens,
|
|
22
22
|
applyWorkspaceTokens
|
|
23
23
|
} from "../chunk-HYJVQZYZ.js";
|
|
24
|
+
import {
|
|
25
|
+
getColor,
|
|
26
|
+
getColorConfig
|
|
27
|
+
} from "../chunk-QYEKN4QV.js";
|
|
24
28
|
import {
|
|
25
29
|
findFileName,
|
|
26
30
|
findFilePath,
|
|
27
31
|
removeExtension
|
|
28
32
|
} from "../chunk-WYQYWPLE.js";
|
|
29
33
|
import "../chunk-RRKB32OH.js";
|
|
30
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-KBOEI4OA.js";
|
|
31
35
|
import "../chunk-SMVSQFZ3.js";
|
|
32
36
|
import {
|
|
33
37
|
DEFAULT_COLOR_CONFIG,
|
|
@@ -79,6 +83,8 @@ export {
|
|
|
79
83
|
findWorkspaceRoot,
|
|
80
84
|
findWorkspaceRootSafe,
|
|
81
85
|
format,
|
|
86
|
+
getColor,
|
|
87
|
+
getColorConfig,
|
|
82
88
|
getPackageJsonConfig,
|
|
83
89
|
handleProcess,
|
|
84
90
|
isAbsolute,
|
package/dist/utilities/toml.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
var _chunk3FETUQ3Kcjs = require('../chunk-3FETUQ3K.cjs');
|
|
8
8
|
require('../chunk-7PV6L7I7.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-K24I634E.cjs');
|
|
10
10
|
require('../chunk-XPQXNNGZ.cjs');
|
|
11
11
|
require('../chunk-KH5SONKW.cjs');
|
|
12
12
|
require('../chunk-U436743U.cjs');
|
package/dist/utilities/toml.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.175.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing various utilities to support custom workspace configurations and environment management for Storm Software projects, including configuration file handling, environment variable management, and logging utilities.",
|
|
6
6
|
"repository": {
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
],
|
|
212
212
|
"dependencies": {
|
|
213
213
|
"@ltd/j-toml": "1.38.0",
|
|
214
|
-
"@storm-software/config": "^1.124.
|
|
214
|
+
"@storm-software/config": "^1.124.4",
|
|
215
215
|
"c12": "^2.0.0-beta.2",
|
|
216
216
|
"chalk": "^4.1.2",
|
|
217
217
|
"commander": "^12.1.0",
|
|
@@ -223,5 +223,6 @@
|
|
|
223
223
|
},
|
|
224
224
|
"devDependencies": { "@types/node": "^22.10.2", "tsup": "8.4.0" },
|
|
225
225
|
"publishConfig": { "access": "public" },
|
|
226
|
-
"sideEffects": false
|
|
226
|
+
"sideEffects": false,
|
|
227
|
+
"gitHead": "e9a128c5dc2c122d72a5611cf5cec6e227a03931"
|
|
227
228
|
}
|
|
File without changes
|
|
File without changes
|