@storm-software/config-tools 1.189.7 → 1.189.9
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/bin/config.cjs +0 -3
- package/bin/config.js +0 -3
- package/dist/chunk-2YZ5KRRZ.cjs +931 -0
- package/dist/{chunk-SBJJ3URW.js → chunk-7XZ53BLB.js} +1 -1
- package/dist/{chunk-OZ6NKEEC.cjs → chunk-D7M3EBCK.cjs} +9 -9
- package/dist/{chunk-GLYIZSQP.cjs → chunk-FIJZNJOM.cjs} +2 -2
- package/dist/{chunk-RVHA3XPD.cjs → chunk-GLF62BIP.cjs} +9 -9
- package/dist/{chunk-CSO3LQWV.cjs → chunk-IOQ5VDAA.cjs} +3 -3
- package/dist/{chunk-DPDS4CSW.cjs → chunk-Q5Y5FFCH.cjs} +3 -3
- package/dist/chunk-SPHE3YEH.js +931 -0
- package/dist/{chunk-ZVA3DOGV.js → chunk-T32OBFSH.js} +1 -1
- package/dist/{chunk-OGXIFMHW.js → chunk-T4YVVO6G.js} +1 -1
- package/dist/{chunk-RSTBLBBG.js → chunk-VOEYKXJ6.js} +2 -2
- package/dist/{chunk-RKSFAUGQ.js → chunk-WH6MLTFO.js} +1 -1
- package/dist/{chunk-B3OWNYW5.cjs → chunk-Z6KNQQGD.cjs} +10 -10
- package/dist/{chunk-ZGGNJYIH.js → chunk-ZFTN72CN.js} +1 -1
- package/dist/config-file/get-config-file.cjs +6 -6
- package/dist/config-file/get-config-file.js +5 -5
- package/dist/config-file/index.cjs +6 -6
- package/dist/config-file/index.js +5 -5
- package/dist/create-storm-config.cjs +7 -7
- package/dist/create-storm-config.js +6 -6
- package/dist/get-config.cjs +8 -8
- package/dist/get-config.js +7 -7
- package/dist/index.cjs +8 -8
- package/dist/index.js +7 -7
- package/dist/logger/console.cjs +2 -2
- package/dist/logger/console.js +1 -1
- package/dist/logger/create-logger.cjs +3 -3
- package/dist/logger/create-logger.js +2 -2
- package/dist/logger/index.cjs +3 -3
- package/dist/logger/index.js +2 -2
- package/dist/utilities/index.cjs +5 -5
- package/dist/utilities/index.js +4 -4
- package/dist/utilities/process-handler.cjs +3 -3
- package/dist/utilities/process-handler.js +2 -2
- package/dist/utilities/toml.cjs +4 -4
- package/dist/utilities/toml.js +3 -3
- package/package.json +3 -3
- package/dist/chunk-4XZCLDX5.cjs +0 -192
- package/dist/chunk-QKYARTIV.js +0 -192
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2YZ5KRRZcjs = require('./chunk-2YZ5KRRZ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
@@ -9,13 +9,13 @@ var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
|
9
9
|
// src/logger/create-logger.ts
|
|
10
10
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
11
11
|
async function createLogger(config) {
|
|
12
|
-
const writeFatal =
|
|
13
|
-
const writeError =
|
|
14
|
-
const writeWarning =
|
|
15
|
-
const writeInfo =
|
|
16
|
-
const writeSuccess =
|
|
17
|
-
const writeDebug =
|
|
18
|
-
const writeTrace =
|
|
12
|
+
const writeFatal = _chunk2YZ5KRRZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.FATAL, config, _chalk2.default);
|
|
13
|
+
const writeError = _chunk2YZ5KRRZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.ERROR, config, _chalk2.default);
|
|
14
|
+
const writeWarning = _chunk2YZ5KRRZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.WARN, config, _chalk2.default);
|
|
15
|
+
const writeInfo = _chunk2YZ5KRRZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.INFO, config, _chalk2.default);
|
|
16
|
+
const writeSuccess = _chunk2YZ5KRRZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.SUCCESS, config, _chalk2.default);
|
|
17
|
+
const writeDebug = _chunk2YZ5KRRZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
|
|
18
|
+
const writeTrace = _chunk2YZ5KRRZcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.TRACE, config, _chalk2.default);
|
|
19
19
|
return {
|
|
20
20
|
fatal: writeFatal,
|
|
21
21
|
error: writeError,
|
|
@@ -24,7 +24,7 @@ async function createLogger(config) {
|
|
|
24
24
|
success: writeSuccess,
|
|
25
25
|
debug: writeDebug,
|
|
26
26
|
trace: writeTrace,
|
|
27
|
-
getStopwatch:
|
|
27
|
+
getStopwatch: _chunk2YZ5KRRZcjs.getStopwatch
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2YZ5KRRZcjs = require('./chunk-2YZ5KRRZ.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utilities/toml.ts
|
|
6
6
|
var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
|
|
7
7
|
function parseCargoTomlWithTree(tree, projectRoot, projectName) {
|
|
8
8
|
const cargoTomlString = _optionalChain([tree, 'access', _ => _.read, 'call', _2 => _2(`${projectRoot}/Cargo.toml`), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
|
|
9
9
|
if (!cargoTomlString) {
|
|
10
|
-
|
|
10
|
+
_chunk2YZ5KRRZcjs.writeError.call(void 0, `Cannot find a Cargo.toml file in the ${projectName}`);
|
|
11
11
|
throw new Error();
|
|
12
12
|
}
|
|
13
13
|
return parseCargoToml(cargoTomlString);
|
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2YZ5KRRZcjs = require('./chunk-2YZ5KRRZ.cjs');
|
|
7
7
|
|
|
8
8
|
// src/utilities/process-handler.ts
|
|
9
9
|
var exitWithError = (config) => {
|
|
10
|
-
|
|
10
|
+
_chunk2YZ5KRRZcjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
|
|
11
11
|
process.exit(1);
|
|
12
12
|
};
|
|
13
13
|
var exitWithSuccess = (config) => {
|
|
14
|
-
|
|
14
|
+
_chunk2YZ5KRRZcjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
|
|
15
15
|
process.exit(0);
|
|
16
16
|
};
|
|
17
17
|
var handleProcess = (config) => {
|
|
18
|
-
|
|
18
|
+
_chunk2YZ5KRRZcjs.writeTrace.call(void 0,
|
|
19
19
|
`Using the following arguments to process the script: ${process.argv.join(", ")}`,
|
|
20
20
|
config
|
|
21
21
|
);
|
|
22
22
|
process.on("unhandledRejection", (error) => {
|
|
23
|
-
|
|
23
|
+
_chunk2YZ5KRRZcjs.writeError.call(void 0,
|
|
24
24
|
`An Unhandled Rejection occurred while running the program: ${error}`,
|
|
25
25
|
config
|
|
26
26
|
);
|
|
27
27
|
exitWithError(config);
|
|
28
28
|
});
|
|
29
29
|
process.on("uncaughtException", (error) => {
|
|
30
|
-
|
|
30
|
+
_chunk2YZ5KRRZcjs.writeError.call(void 0,
|
|
31
31
|
`An Uncaught Exception occurred while running the program: ${error.message}
|
|
32
32
|
Stacktrace: ${error.stack}`,
|
|
33
33
|
config
|
|
@@ -35,15 +35,15 @@ Stacktrace: ${error.stack}`,
|
|
|
35
35
|
exitWithError(config);
|
|
36
36
|
});
|
|
37
37
|
process.on("SIGTERM", (signal) => {
|
|
38
|
-
|
|
38
|
+
_chunk2YZ5KRRZcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
39
39
|
exitWithError(config);
|
|
40
40
|
});
|
|
41
41
|
process.on("SIGINT", (signal) => {
|
|
42
|
-
|
|
42
|
+
_chunk2YZ5KRRZcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
43
43
|
exitWithError(config);
|
|
44
44
|
});
|
|
45
45
|
process.on("SIGHUP", (signal) => {
|
|
46
|
-
|
|
46
|
+
_chunk2YZ5KRRZcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
|
|
47
47
|
exitWithError(config);
|
|
48
48
|
});
|
|
49
49
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunk3CNCDDWZcjs = require('./chunk-3CNCDDWZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2YZ5KRRZcjs = require('./chunk-2YZ5KRRZ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
@@ -52,7 +52,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
52
52
|
let config = result.config;
|
|
53
53
|
const configFile = result.configFile;
|
|
54
54
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
55
|
-
|
|
55
|
+
_chunk2YZ5KRRZcjs.writeTrace.call(void 0,
|
|
56
56
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
57
57
|
{
|
|
58
58
|
logLevel: "all"
|
|
@@ -68,7 +68,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
68
68
|
for (const result2 of results) {
|
|
69
69
|
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
70
70
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
71
|
-
|
|
71
|
+
_chunk2YZ5KRRZcjs.writeTrace.call(void 0,
|
|
72
72
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
73
73
|
{
|
|
74
74
|
logLevel: "all"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkZ6KNQQGDcjs = require('./chunk-Z6KNQQGD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk3CNCDDWZcjs = require('./chunk-3CNCDDWZ.cjs');
|
|
8
8
|
|
|
9
9
|
// src/get-config.ts
|
|
10
10
|
function getConfig(workspaceRoot, skipLogs = false) {
|
|
11
|
-
return
|
|
11
|
+
return _chunkZ6KNQQGDcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
|
|
12
12
|
}
|
|
13
13
|
function getWorkspaceConfig(skipLogs = true, options = {}) {
|
|
14
14
|
let workspaceRoot = options.workspaceRoot;
|
|
@@ -23,7 +23,7 @@ async function tryGetWorkspaceConfig(skipLogs = true, options = {}) {
|
|
|
23
23
|
if (!workspaceRoot) {
|
|
24
24
|
workspaceRoot = _chunk3CNCDDWZcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return _chunkZ6KNQQGDcjs.tryLoadStormWorkspaceConfig.call(void 0,
|
|
27
27
|
workspaceRoot,
|
|
28
28
|
skipLogs,
|
|
29
29
|
options.useDefault
|