@storm-software/config-tools 1.190.14 → 1.190.15
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/package.json +3 -3
- package/dist/chunk-EB63U2GG.cjs +0 -40
- package/dist/chunk-M7RUDRDH.js +0 -40
- package/dist/chunk-OLW3Y2DA.cjs +0 -165
- package/dist/chunk-UZBUUPX4.js +0 -165
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.190.
|
|
3
|
+
"version": "1.190.15",
|
|
4
4
|
"private": false,
|
|
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
|
"keywords": [
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
"files": ["dist/**/*"],
|
|
213
213
|
"dependencies": {
|
|
214
214
|
"@ltd/j-toml": "1.38.0",
|
|
215
|
-
"@storm-software/config": "^1.137.
|
|
215
|
+
"@storm-software/config": "^1.137.47",
|
|
216
216
|
"c12": "^2.0.4",
|
|
217
217
|
"chalk": "^4.1.2",
|
|
218
218
|
"commander": "^12.1.0",
|
|
@@ -230,5 +230,5 @@
|
|
|
230
230
|
"peerDependencies": { "zod": "^3.25.0 || ^4.0.0" },
|
|
231
231
|
"peerDependenciesMeta": { "zod": { "optional": false } },
|
|
232
232
|
"publishConfig": { "access": "public" },
|
|
233
|
-
"gitHead": "
|
|
233
|
+
"gitHead": "756f2efc9602033fcc0355d7943682581488379b"
|
|
234
234
|
}
|
package/dist/chunk-EB63U2GG.cjs
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkOLW3Y2DAcjs = require('./chunk-OLW3Y2DA.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunk3CNCDDWZcjs = require('./chunk-3CNCDDWZ.cjs');
|
|
8
|
-
|
|
9
|
-
// src/get-config.ts
|
|
10
|
-
function getConfig(workspaceRoot, skipLogs = false) {
|
|
11
|
-
return _chunkOLW3Y2DAcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
|
|
12
|
-
}
|
|
13
|
-
function getWorkspaceConfig(skipLogs = true, options = {}) {
|
|
14
|
-
let workspaceRoot = options.workspaceRoot;
|
|
15
|
-
if (!workspaceRoot) {
|
|
16
|
-
workspaceRoot = _chunk3CNCDDWZcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
17
|
-
}
|
|
18
|
-
return getConfig(workspaceRoot, skipLogs);
|
|
19
|
-
}
|
|
20
|
-
async function tryGetWorkspaceConfig(skipLogs = true, options = {}) {
|
|
21
|
-
try {
|
|
22
|
-
let workspaceRoot = options.workspaceRoot;
|
|
23
|
-
if (!workspaceRoot) {
|
|
24
|
-
workspaceRoot = _chunk3CNCDDWZcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
25
|
-
}
|
|
26
|
-
return _chunkOLW3Y2DAcjs.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;
|
package/dist/chunk-M7RUDRDH.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
loadStormWorkspaceConfig,
|
|
3
|
-
tryLoadStormWorkspaceConfig
|
|
4
|
-
} from "./chunk-UZBUUPX4.js";
|
|
5
|
-
import {
|
|
6
|
-
findWorkspaceRoot
|
|
7
|
-
} from "./chunk-LF3SAK2O.js";
|
|
8
|
-
|
|
9
|
-
// src/get-config.ts
|
|
10
|
-
function getConfig(workspaceRoot, skipLogs = false) {
|
|
11
|
-
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
12
|
-
}
|
|
13
|
-
function 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
|
-
async function tryGetWorkspaceConfig(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
|
-
};
|
package/dist/chunk-OLW3Y2DA.cjs
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
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 _chunkNHILCONIcjs = require('./chunk-NHILCONI.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunkB2CQPVVLcjs = require('./chunk-B2CQPVVL.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunkDFWIRJGHcjs = require('./chunk-DFWIRJGH.cjs');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _chunkCFXT4ZAWcjs = require('./chunk-CFXT4ZAW.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _chunk3CNCDDWZcjs = require('./chunk-3CNCDDWZ.cjs');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _chunkAZJQFL6Wcjs = require('./chunk-AZJQFL6W.cjs');
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
26
|
-
|
|
27
|
-
// src/create-storm-config.ts
|
|
28
|
-
var _schema = require('@storm-software/config/schema');
|
|
29
|
-
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
30
|
-
var _fs = require('fs');
|
|
31
|
-
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
32
|
-
var _static_cache = void 0;
|
|
33
|
-
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
34
|
-
let result;
|
|
35
|
-
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
36
|
-
let _workspaceRoot = workspaceRoot;
|
|
37
|
-
if (!_workspaceRoot) {
|
|
38
|
-
_workspaceRoot = _chunk3CNCDDWZcjs.findWorkspaceRoot.call(void 0, );
|
|
39
|
-
}
|
|
40
|
-
const configEnv = _chunkNHILCONIcjs.getConfigEnv.call(void 0, );
|
|
41
|
-
const configFile = await _chunkDFWIRJGHcjs.getConfigFile.call(void 0, _workspaceRoot);
|
|
42
|
-
if (!configFile) {
|
|
43
|
-
if (!skipLogs) {
|
|
44
|
-
_chunkAZJQFL6Wcjs.writeWarning.call(void 0,
|
|
45
|
-
"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",
|
|
46
|
-
{ logLevel: "all" }
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
if (useDefault === false) {
|
|
50
|
-
return void 0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const defaultConfig = await _chunkCFXT4ZAWcjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
54
|
-
const configInput = _defu2.default.call(void 0,
|
|
55
|
-
configEnv,
|
|
56
|
-
configFile,
|
|
57
|
-
defaultConfig
|
|
58
|
-
);
|
|
59
|
-
if (!configInput.variant) {
|
|
60
|
-
configInput.variant = _fs.existsSync.call(void 0, _chunkBDATZ3UBcjs.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunkBDATZ3UBcjs.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunkBDATZ3UBcjs.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunkBDATZ3UBcjs.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
const parseResult = await Promise.resolve(
|
|
64
|
-
_schema.workspaceConfigSchema._zod.parse(
|
|
65
|
-
{ value: configInput, issues: [] },
|
|
66
|
-
{ async: true }
|
|
67
|
-
)
|
|
68
|
-
);
|
|
69
|
-
result = _chunkCFXT4ZAWcjs.applyDefaultConfig.call(void 0, parseResult.value);
|
|
70
|
-
result.workspaceRoot ??= _workspaceRoot;
|
|
71
|
-
} catch (error) {
|
|
72
|
-
throw new Error(
|
|
73
|
-
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _3 => _3.message]) ? `: ${error.message}` : ""}
|
|
74
|
-
|
|
75
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkAZJQFL6Wcjs.formatLogMessage.call(void 0,
|
|
76
|
-
configInput
|
|
77
|
-
)}`,
|
|
78
|
-
{
|
|
79
|
-
cause: error
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
} else {
|
|
84
|
-
result = _static_cache.data;
|
|
85
|
-
}
|
|
86
|
-
if (schema && extensionName) {
|
|
87
|
-
result.extensions = {
|
|
88
|
-
...result.extensions,
|
|
89
|
-
[extensionName]: createConfigExtension(extensionName, schema)
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
_static_cache = {
|
|
93
|
-
timestamp: Date.now(),
|
|
94
|
-
data: result
|
|
95
|
-
};
|
|
96
|
-
return result;
|
|
97
|
-
};
|
|
98
|
-
var createConfigExtension = (extensionName, schema) => {
|
|
99
|
-
const extension_cache_key = { extensionName };
|
|
100
|
-
if (_extension_cache.has(extension_cache_key)) {
|
|
101
|
-
return _extension_cache.get(extension_cache_key);
|
|
102
|
-
}
|
|
103
|
-
let extension = _chunkNHILCONIcjs.getExtensionEnv.call(void 0, extensionName);
|
|
104
|
-
if (schema) {
|
|
105
|
-
extension = schema.parse(extension);
|
|
106
|
-
}
|
|
107
|
-
_extension_cache.set(extension_cache_key, extension);
|
|
108
|
-
return extension;
|
|
109
|
-
};
|
|
110
|
-
var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
111
|
-
const config = await createStormWorkspaceConfig(
|
|
112
|
-
void 0,
|
|
113
|
-
void 0,
|
|
114
|
-
workspaceRoot,
|
|
115
|
-
skipLogs,
|
|
116
|
-
true
|
|
117
|
-
);
|
|
118
|
-
_chunkB2CQPVVLcjs.setConfigEnv.call(void 0, config);
|
|
119
|
-
if (!skipLogs && !config.skipConfigLogging) {
|
|
120
|
-
_chunkAZJQFL6Wcjs.writeTrace.call(void 0,
|
|
121
|
-
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
122
|
-
${_chunkAZJQFL6Wcjs.formatLogMessage.call(void 0, config)}`,
|
|
123
|
-
config
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
return config;
|
|
127
|
-
};
|
|
128
|
-
var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefault = false) => {
|
|
129
|
-
try {
|
|
130
|
-
const config = await createStormWorkspaceConfig(
|
|
131
|
-
void 0,
|
|
132
|
-
void 0,
|
|
133
|
-
workspaceRoot,
|
|
134
|
-
skipLogs,
|
|
135
|
-
useDefault
|
|
136
|
-
);
|
|
137
|
-
if (!config) {
|
|
138
|
-
return void 0;
|
|
139
|
-
}
|
|
140
|
-
_chunkB2CQPVVLcjs.setConfigEnv.call(void 0, config);
|
|
141
|
-
if (!skipLogs && !config.skipConfigLogging) {
|
|
142
|
-
_chunkAZJQFL6Wcjs.writeTrace.call(void 0,
|
|
143
|
-
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
144
|
-
${_chunkAZJQFL6Wcjs.formatLogMessage.call(void 0, config)}`,
|
|
145
|
-
config
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
return config;
|
|
149
|
-
} catch (error) {
|
|
150
|
-
if (!skipLogs) {
|
|
151
|
-
_chunkAZJQFL6Wcjs.writeWarning.call(void 0,
|
|
152
|
-
`\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`,
|
|
153
|
-
{ logLevel: "all" }
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
return void 0;
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
exports.createStormWorkspaceConfig = createStormWorkspaceConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormWorkspaceConfig = loadStormWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = tryLoadStormWorkspaceConfig;
|
package/dist/chunk-UZBUUPX4.js
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getConfigEnv,
|
|
3
|
-
getExtensionEnv
|
|
4
|
-
} from "./chunk-A5JXMY6X.js";
|
|
5
|
-
import {
|
|
6
|
-
setConfigEnv
|
|
7
|
-
} from "./chunk-SDSQ2HHF.js";
|
|
8
|
-
import {
|
|
9
|
-
getConfigFile
|
|
10
|
-
} from "./chunk-FXQGOFJI.js";
|
|
11
|
-
import {
|
|
12
|
-
applyDefaultConfig,
|
|
13
|
-
getPackageJsonConfig
|
|
14
|
-
} from "./chunk-RGET2UQV.js";
|
|
15
|
-
import {
|
|
16
|
-
findWorkspaceRoot
|
|
17
|
-
} from "./chunk-LF3SAK2O.js";
|
|
18
|
-
import {
|
|
19
|
-
formatLogMessage,
|
|
20
|
-
writeTrace,
|
|
21
|
-
writeWarning
|
|
22
|
-
} from "./chunk-4UFIHIMZ.js";
|
|
23
|
-
import {
|
|
24
|
-
joinPaths
|
|
25
|
-
} from "./chunk-V3GMJ4TX.js";
|
|
26
|
-
|
|
27
|
-
// src/create-storm-config.ts
|
|
28
|
-
import { workspaceConfigSchema } from "@storm-software/config/schema";
|
|
29
|
-
import defu from "defu";
|
|
30
|
-
import { existsSync } from "node:fs";
|
|
31
|
-
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
32
|
-
var _static_cache = void 0;
|
|
33
|
-
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
34
|
-
let result;
|
|
35
|
-
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
36
|
-
let _workspaceRoot = workspaceRoot;
|
|
37
|
-
if (!_workspaceRoot) {
|
|
38
|
-
_workspaceRoot = findWorkspaceRoot();
|
|
39
|
-
}
|
|
40
|
-
const configEnv = getConfigEnv();
|
|
41
|
-
const configFile = await getConfigFile(_workspaceRoot);
|
|
42
|
-
if (!configFile) {
|
|
43
|
-
if (!skipLogs) {
|
|
44
|
-
writeWarning(
|
|
45
|
-
"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",
|
|
46
|
-
{ logLevel: "all" }
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
if (useDefault === false) {
|
|
50
|
-
return void 0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
54
|
-
const configInput = defu(
|
|
55
|
-
configEnv,
|
|
56
|
-
configFile,
|
|
57
|
-
defaultConfig
|
|
58
|
-
);
|
|
59
|
-
if (!configInput.variant) {
|
|
60
|
-
configInput.variant = existsSync(joinPaths(_workspaceRoot, "nx.json")) || existsSync(joinPaths(_workspaceRoot, ".nx")) || existsSync(joinPaths(_workspaceRoot, "lerna.json")) || existsSync(joinPaths(_workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
const parseResult = await Promise.resolve(
|
|
64
|
-
workspaceConfigSchema._zod.parse(
|
|
65
|
-
{ value: configInput, issues: [] },
|
|
66
|
-
{ async: true }
|
|
67
|
-
)
|
|
68
|
-
);
|
|
69
|
-
result = applyDefaultConfig(parseResult.value);
|
|
70
|
-
result.workspaceRoot ??= _workspaceRoot;
|
|
71
|
-
} catch (error) {
|
|
72
|
-
throw new Error(
|
|
73
|
-
`Failed to parse Storm Workspace configuration${error?.message ? `: ${error.message}` : ""}
|
|
74
|
-
|
|
75
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage(
|
|
76
|
-
configInput
|
|
77
|
-
)}`,
|
|
78
|
-
{
|
|
79
|
-
cause: error
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
} else {
|
|
84
|
-
result = _static_cache.data;
|
|
85
|
-
}
|
|
86
|
-
if (schema && extensionName) {
|
|
87
|
-
result.extensions = {
|
|
88
|
-
...result.extensions,
|
|
89
|
-
[extensionName]: createConfigExtension(extensionName, schema)
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
_static_cache = {
|
|
93
|
-
timestamp: Date.now(),
|
|
94
|
-
data: result
|
|
95
|
-
};
|
|
96
|
-
return result;
|
|
97
|
-
};
|
|
98
|
-
var createConfigExtension = (extensionName, schema) => {
|
|
99
|
-
const extension_cache_key = { extensionName };
|
|
100
|
-
if (_extension_cache.has(extension_cache_key)) {
|
|
101
|
-
return _extension_cache.get(extension_cache_key);
|
|
102
|
-
}
|
|
103
|
-
let extension = getExtensionEnv(extensionName);
|
|
104
|
-
if (schema) {
|
|
105
|
-
extension = schema.parse(extension);
|
|
106
|
-
}
|
|
107
|
-
_extension_cache.set(extension_cache_key, extension);
|
|
108
|
-
return extension;
|
|
109
|
-
};
|
|
110
|
-
var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
111
|
-
const config = await createStormWorkspaceConfig(
|
|
112
|
-
void 0,
|
|
113
|
-
void 0,
|
|
114
|
-
workspaceRoot,
|
|
115
|
-
skipLogs,
|
|
116
|
-
true
|
|
117
|
-
);
|
|
118
|
-
setConfigEnv(config);
|
|
119
|
-
if (!skipLogs && !config.skipConfigLogging) {
|
|
120
|
-
writeTrace(
|
|
121
|
-
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
122
|
-
${formatLogMessage(config)}`,
|
|
123
|
-
config
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
return config;
|
|
127
|
-
};
|
|
128
|
-
var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefault = false) => {
|
|
129
|
-
try {
|
|
130
|
-
const config = await createStormWorkspaceConfig(
|
|
131
|
-
void 0,
|
|
132
|
-
void 0,
|
|
133
|
-
workspaceRoot,
|
|
134
|
-
skipLogs,
|
|
135
|
-
useDefault
|
|
136
|
-
);
|
|
137
|
-
if (!config) {
|
|
138
|
-
return void 0;
|
|
139
|
-
}
|
|
140
|
-
setConfigEnv(config);
|
|
141
|
-
if (!skipLogs && !config.skipConfigLogging) {
|
|
142
|
-
writeTrace(
|
|
143
|
-
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
144
|
-
${formatLogMessage(config)}`,
|
|
145
|
-
config
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
return config;
|
|
149
|
-
} catch (error) {
|
|
150
|
-
if (!skipLogs) {
|
|
151
|
-
writeWarning(
|
|
152
|
-
`\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`,
|
|
153
|
-
{ logLevel: "all" }
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
return void 0;
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export {
|
|
161
|
-
createStormWorkspaceConfig,
|
|
162
|
-
createConfigExtension,
|
|
163
|
-
loadStormWorkspaceConfig,
|
|
164
|
-
tryLoadStormWorkspaceConfig
|
|
165
|
-
};
|