@storm-software/config-tools 1.190.21 → 1.190.22
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/dist/config-file/get-config-file.cjs +9 -9
- package/dist/config-file/get-config-file.js +8 -8
- package/dist/config-file/index.cjs +9 -9
- package/dist/config-file/index.js +8 -8
- package/dist/create-storm-config.cjs +12 -12
- package/dist/create-storm-config.js +11 -11
- package/dist/get-config.cjs +13 -13
- package/dist/get-config.js +12 -12
- package/dist/index.cjs +23 -23
- package/dist/index.js +25 -25
- package/dist/logger/console.cjs +4 -4
- package/dist/logger/console.js +3 -3
- package/dist/logger/create-logger.cjs +5 -5
- package/dist/logger/create-logger.js +4 -4
- package/dist/logger/index.cjs +8 -8
- package/dist/logger/index.js +10 -10
- package/dist/utilities/index.cjs +8 -8
- package/dist/utilities/index.js +7 -7
- package/dist/utilities/process-handler.cjs +5 -5
- package/dist/utilities/process-handler.js +4 -4
- package/dist/utilities/toml.cjs +6 -6
- package/dist/utilities/toml.js +5 -5
- package/package.json +3 -3
- package/dist/chunk-5OYYSFK5.cjs +0 -40
- package/dist/chunk-7YIRETM2.cjs +0 -165
- package/dist/chunk-BUB7FBXA.js +0 -55
- package/dist/chunk-CBM6ZRFO.js +0 -35
- package/dist/chunk-DPHVF4QR.cjs +0 -35
- package/dist/chunk-DW5363CG.js +0 -165
- package/dist/chunk-FOAMXVC2.cjs +0 -47
- package/dist/chunk-JLLNUKG7.cjs +0 -55
- package/dist/chunk-KKF5NXBI.js +0 -40
- package/dist/chunk-NT26TB4H.js +0 -92
- package/dist/chunk-O76J367J.js +0 -947
- package/dist/chunk-SN6BVPYU.cjs +0 -92
- package/dist/chunk-T35FQNUH.cjs +0 -947
- package/dist/chunk-TAD4S6KA.js +0 -47
package/dist/chunk-SN6BVPYU.cjs
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
-
|
|
3
|
-
var _chunk3CNCDDWZcjs = require('./chunk-3CNCDDWZ.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkT35FQNUHcjs = require('./chunk-T35FQNUH.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
10
|
-
|
|
11
|
-
// src/config-file/get-config-file.ts
|
|
12
|
-
var _c12 = require('c12');
|
|
13
|
-
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
14
|
-
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
15
|
-
const workspacePath = filePath || _chunk3CNCDDWZcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
16
|
-
const configs = await Promise.all([
|
|
17
|
-
_c12.loadConfig.call(void 0, {
|
|
18
|
-
cwd: workspacePath,
|
|
19
|
-
packageJson: true,
|
|
20
|
-
name: fileName,
|
|
21
|
-
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
22
|
-
jitiOptions: {
|
|
23
|
-
debug: false,
|
|
24
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkBDATZ3UBcjs.joinPaths.call(void 0,
|
|
25
|
-
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
26
|
-
"jiti"
|
|
27
|
-
)
|
|
28
|
-
},
|
|
29
|
-
...options
|
|
30
|
-
}),
|
|
31
|
-
_c12.loadConfig.call(void 0, {
|
|
32
|
-
cwd: workspacePath,
|
|
33
|
-
packageJson: true,
|
|
34
|
-
name: fileName,
|
|
35
|
-
envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
|
|
36
|
-
jitiOptions: {
|
|
37
|
-
debug: false,
|
|
38
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkBDATZ3UBcjs.joinPaths.call(void 0,
|
|
39
|
-
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
40
|
-
"jiti"
|
|
41
|
-
)
|
|
42
|
-
},
|
|
43
|
-
configFile: fileName,
|
|
44
|
-
...options
|
|
45
|
-
})
|
|
46
|
-
]);
|
|
47
|
-
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
48
|
-
};
|
|
49
|
-
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
50
|
-
const workspacePath = filePath ? filePath : _chunk3CNCDDWZcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
51
|
-
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
52
|
-
let config = result.config;
|
|
53
|
-
const configFile = result.configFile;
|
|
54
|
-
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
55
|
-
_chunkT35FQNUHcjs.writeTrace.call(void 0,
|
|
56
|
-
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
57
|
-
{
|
|
58
|
-
logLevel: "all"
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
63
|
-
const results = await Promise.all(
|
|
64
|
-
additionalFileNames.map(
|
|
65
|
-
(fileName) => getConfigFileByName(fileName, workspacePath)
|
|
66
|
-
)
|
|
67
|
-
);
|
|
68
|
-
for (const result2 of results) {
|
|
69
|
-
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
70
|
-
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
71
|
-
_chunkT35FQNUHcjs.writeTrace.call(void 0,
|
|
72
|
-
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
73
|
-
{
|
|
74
|
-
logLevel: "all"
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (!config || Object.keys(config).length === 0) {
|
|
83
|
-
return void 0;
|
|
84
|
-
}
|
|
85
|
-
config.configFile = configFile;
|
|
86
|
-
return config;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
exports.getConfigFileByName = getConfigFileByName; exports.getConfigFile = getConfigFile;
|