@storm-software/config-tools 1.148.2 → 1.148.4
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/config-file/get-config-file.cjs +66 -22
- package/dist/config-file/get-config-file.js +65 -21
- package/dist/config-file/index.cjs +1 -27
- package/dist/config-file/index.js +1 -27
- package/dist/create-storm-config.cjs +68 -26
- package/dist/create-storm-config.js +67 -25
- package/dist/env/get-env.cjs +152 -9
- package/dist/env/get-env.js +151 -8
- package/dist/env/index.cjs +2 -20
- package/dist/env/index.js +2 -20
- package/dist/env/set-env.cjs +259 -8
- package/dist/env/set-env.js +258 -7
- package/dist/get-config.cjs +9 -25
- package/dist/get-config.js +9 -25
- package/dist/index.cjs +7 -171
- package/dist/index.js +7 -171
- package/dist/logger/chalk.cjs +30 -4
- package/dist/logger/chalk.js +29 -3
- package/dist/logger/console-icons.cjs +15 -5
- package/dist/logger/console-icons.js +15 -5
- package/dist/logger/console.cjs +126 -38
- package/dist/logger/console.js +112 -24
- package/dist/logger/create-logger.cjs +31 -16
- package/dist/logger/create-logger.js +30 -15
- package/dist/logger/format-timestamp.cjs +5 -3
- package/dist/logger/format-timestamp.js +5 -3
- package/dist/logger/get-log-level.cjs +56 -6
- package/dist/logger/get-log-level.js +56 -6
- package/dist/logger/index.cjs +7 -62
- package/dist/logger/index.js +7 -62
- package/dist/logger/is-unicode-supported.cjs +16 -4
- package/dist/logger/is-unicode-supported.js +15 -3
- package/dist/types.cjs +24 -6
- package/dist/types.js +22 -4
- package/dist/utilities/apply-workspace-tokens.cjs +55 -9
- package/dist/utilities/apply-workspace-tokens.js +54 -8
- package/dist/utilities/correct-paths.cjs +242 -33
- package/dist/utilities/correct-paths.js +225 -16
- package/dist/utilities/file-path-utils.cjs +18 -5
- package/dist/utilities/file-path-utils.js +17 -4
- package/dist/utilities/find-up.cjs +22 -4
- package/dist/utilities/find-up.js +21 -3
- package/dist/utilities/find-workspace-root.cjs +64 -7
- package/dist/utilities/find-workspace-root.js +63 -6
- package/dist/utilities/get-default-config.cjs +79 -8
- package/dist/utilities/get-default-config.js +79 -8
- package/dist/utilities/index.cjs +7 -85
- package/dist/utilities/index.js +7 -85
- package/dist/utilities/process-handler.cjs +35 -17
- package/dist/utilities/process-handler.js +35 -17
- package/dist/utilities/run.cjs +34 -6
- package/dist/utilities/run.js +33 -5
- package/package.json +1 -1
- package/dist/chunk-2AVLCXLT.js +0 -0
- package/dist/chunk-2IKEUEGY.cjs +0 -94
- package/dist/chunk-2ZXJS2DW.js +0 -49
- package/dist/chunk-3557WSPY.js +0 -168
- package/dist/chunk-3NWKPYIG.cjs +0 -68
- package/dist/chunk-4DLP6LZY.cjs +0 -65
- package/dist/chunk-65SWKEHV.cjs +0 -1
- package/dist/chunk-6OM23J4N.js +0 -65
- package/dist/chunk-6T3V5XJK.js +0 -180
- package/dist/chunk-7CYF3NP3.cjs +0 -19
- package/dist/chunk-7NSHGJWY.cjs +0 -12
- package/dist/chunk-7PV6L7I7.cjs +0 -1
- package/dist/chunk-B7WWBK5Z.cjs +0 -93
- package/dist/chunk-BHZFTVXN.js +0 -42
- package/dist/chunk-C3W5DCMU.js +0 -19
- package/dist/chunk-DD3HX2NX.cjs +0 -1
- package/dist/chunk-GKI43HTL.cjs +0 -44
- package/dist/chunk-GZFXEQPB.js +0 -94
- package/dist/chunk-HESFC24Z.cjs +0 -245
- package/dist/chunk-HI33NNPB.js +0 -68
- package/dist/chunk-HSCCBYAV.js +0 -25
- package/dist/chunk-IRCFHYKZ.cjs +0 -28
- package/dist/chunk-IUT7Y2UY.js +0 -26
- package/dist/chunk-IWD6YQKX.cjs +0 -1
- package/dist/chunk-J2TOMCZU.cjs +0 -168
- package/dist/chunk-JHJGK3T7.js +0 -272
- package/dist/chunk-KNLWLA7O.cjs +0 -75
- package/dist/chunk-L6UNTUC4.js +0 -0
- package/dist/chunk-LOSUA6RB.js +0 -79
- package/dist/chunk-M7ASNATT.js +0 -142
- package/dist/chunk-MLUBD3PU.js +0 -245
- package/dist/chunk-NJVL3GF4.js +0 -0
- package/dist/chunk-OIEEXHKO.js +0 -75
- package/dist/chunk-POXTJ6GF.js +0 -28
- package/dist/chunk-PR7RQHRE.js +0 -12
- package/dist/chunk-QBS3OCHH.js +0 -22
- package/dist/chunk-QNYJXMP3.cjs +0 -79
- package/dist/chunk-RRKB32OH.js +0 -0
- package/dist/chunk-RVM5N5ZI.cjs +0 -22
- package/dist/chunk-SLGVSUEV.cjs +0 -36
- package/dist/chunk-SVQE7WVB.cjs +0 -180
- package/dist/chunk-SWX2MJHI.cjs +0 -28
- package/dist/chunk-TCTVN2ED.js +0 -44
- package/dist/chunk-U34AT42J.cjs +0 -49
- package/dist/chunk-ULZULP7Q.cjs +0 -142
- package/dist/chunk-XAJB3BSF.cjs +0 -25
- package/dist/chunk-XDBACKKN.cjs +0 -42
- package/dist/chunk-XQPQRRG3.js +0 -28
- package/dist/chunk-XY2LDOQ4.cjs +0 -26
- package/dist/chunk-XZ2SIQVM.js +0 -93
- package/dist/chunk-YBGTC6FM.cjs +0 -272
- package/dist/chunk-ZA4IO7YJ.js +0 -36
|
@@ -1,10 +1,60 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
__name
|
|
3
|
+
} from "../chunk-SHUYVCID.js";
|
|
4
|
+
import { LogLevel, LogLevelLabel } from "../types";
|
|
5
|
+
const getLogLevel = /* @__PURE__ */ __name((label) => {
|
|
6
|
+
switch (label) {
|
|
7
|
+
case "all":
|
|
8
|
+
return LogLevel.ALL;
|
|
9
|
+
case "trace":
|
|
10
|
+
return LogLevel.TRACE;
|
|
11
|
+
case "debug":
|
|
12
|
+
return LogLevel.DEBUG;
|
|
13
|
+
case "info":
|
|
14
|
+
return LogLevel.INFO;
|
|
15
|
+
case "warn":
|
|
16
|
+
return LogLevel.WARN;
|
|
17
|
+
case "error":
|
|
18
|
+
return LogLevel.ERROR;
|
|
19
|
+
case "fatal":
|
|
20
|
+
return LogLevel.FATAL;
|
|
21
|
+
case "silent":
|
|
22
|
+
return LogLevel.SILENT;
|
|
23
|
+
default:
|
|
24
|
+
return LogLevel.INFO;
|
|
25
|
+
}
|
|
26
|
+
}, "getLogLevel");
|
|
27
|
+
const getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
|
|
28
|
+
if (logLevel >= LogLevel.ALL) {
|
|
29
|
+
return LogLevelLabel.ALL;
|
|
30
|
+
}
|
|
31
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
32
|
+
return LogLevelLabel.TRACE;
|
|
33
|
+
}
|
|
34
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
35
|
+
return LogLevelLabel.DEBUG;
|
|
36
|
+
}
|
|
37
|
+
if (logLevel >= LogLevel.INFO) {
|
|
38
|
+
return LogLevelLabel.INFO;
|
|
39
|
+
}
|
|
40
|
+
if (logLevel >= LogLevel.WARN) {
|
|
41
|
+
return LogLevelLabel.WARN;
|
|
42
|
+
}
|
|
43
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
44
|
+
return LogLevelLabel.ERROR;
|
|
45
|
+
}
|
|
46
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
47
|
+
return LogLevelLabel.FATAL;
|
|
48
|
+
}
|
|
49
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
50
|
+
return LogLevelLabel.SILENT;
|
|
51
|
+
}
|
|
52
|
+
return LogLevelLabel.INFO;
|
|
53
|
+
}, "getLogLevelLabel");
|
|
54
|
+
const isVerbose = /* @__PURE__ */ __name((label = LogLevelLabel.SILENT) => {
|
|
55
|
+
const logLevel = typeof label === "string" ? getLogLevel(label) : label;
|
|
56
|
+
return logLevel >= LogLevel.DEBUG;
|
|
57
|
+
}, "isVerbose");
|
|
8
58
|
export {
|
|
9
59
|
getLogLevel,
|
|
10
60
|
getLogLevelLabel,
|
package/dist/logger/index.cjs
CHANGED
|
@@ -1,62 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _chunkULZULP7Qcjs = require('../chunk-ULZULP7Q.cjs');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _chunkSLGVSUEVcjs = require('../chunk-SLGVSUEV.cjs');
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var _chunkXY2LDOQ4cjs = require('../chunk-XY2LDOQ4.cjs');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _chunkRVM5N5ZIcjs = require('../chunk-RVM5N5ZI.cjs');
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _chunk7NSHGJWYcjs = require('../chunk-7NSHGJWY.cjs');
|
|
30
|
-
require('../chunk-2IKEUEGY.cjs');
|
|
31
|
-
require('../chunk-KNLWLA7O.cjs');
|
|
32
|
-
require('../chunk-SWX2MJHI.cjs');
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var _chunk3NWKPYIGcjs = require('../chunk-3NWKPYIG.cjs');
|
|
38
|
-
require('../chunk-SVQE7WVB.cjs');
|
|
39
|
-
require('../chunk-HESFC24Z.cjs');
|
|
40
|
-
require('../chunk-IRCFHYKZ.cjs');
|
|
41
|
-
require('../chunk-USNT2KNT.cjs');
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
exports.CONSOLE_ICONS = _chunkXY2LDOQ4cjs.CONSOLE_ICONS; exports.createLogger = _chunkGKI43HTLcjs.createLogger; exports.formatLogMessage = _chunkULZULP7Qcjs.formatLogMessage; exports.formatTimestamp = _chunk7NSHGJWYcjs.formatTimestamp; exports.getChalk = _chunkSLGVSUEVcjs.getChalk; exports.getLogFn = _chunkULZULP7Qcjs.getLogFn; exports.getLogLevel = _chunk3NWKPYIGcjs.getLogLevel; exports.getLogLevelLabel = _chunk3NWKPYIGcjs.getLogLevelLabel; exports.getStopwatch = _chunkULZULP7Qcjs.getStopwatch; exports.isUnicodeSupported = _chunkRVM5N5ZIcjs.isUnicodeSupported; exports.isVerbose = _chunk3NWKPYIGcjs.isVerbose; exports.writeDebug = _chunkULZULP7Qcjs.writeDebug; exports.writeError = _chunkULZULP7Qcjs.writeError; exports.writeFatal = _chunkULZULP7Qcjs.writeFatal; exports.writeInfo = _chunkULZULP7Qcjs.writeInfo; exports.writeSuccess = _chunkULZULP7Qcjs.writeSuccess; exports.writeSystem = _chunkULZULP7Qcjs.writeSystem; exports.writeTrace = _chunkULZULP7Qcjs.writeTrace; exports.writeWarning = _chunkULZULP7Qcjs.writeWarning;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }var _chalk = require('./chalk'); _createStarExport(_chalk);
|
|
2
|
+
var _console = require('./console'); _createStarExport(_console);
|
|
3
|
+
var _consoleicons = require('./console-icons'); _createStarExport(_consoleicons);
|
|
4
|
+
var _createlogger = require('./create-logger'); _createStarExport(_createlogger);
|
|
5
|
+
var _formattimestamp = require('./format-timestamp'); _createStarExport(_formattimestamp);
|
|
6
|
+
var _getloglevel = require('./get-log-level'); _createStarExport(_getloglevel);
|
|
7
|
+
var _isunicodesupported = require('./is-unicode-supported'); _createStarExport(_isunicodesupported);
|
package/dist/logger/index.js
CHANGED
|
@@ -1,62 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
getStopwatch,
|
|
9
|
-
writeDebug,
|
|
10
|
-
writeError,
|
|
11
|
-
writeFatal,
|
|
12
|
-
writeInfo,
|
|
13
|
-
writeSuccess,
|
|
14
|
-
writeSystem,
|
|
15
|
-
writeTrace,
|
|
16
|
-
writeWarning
|
|
17
|
-
} from "../chunk-M7ASNATT.js";
|
|
18
|
-
import {
|
|
19
|
-
getChalk
|
|
20
|
-
} from "../chunk-ZA4IO7YJ.js";
|
|
21
|
-
import {
|
|
22
|
-
CONSOLE_ICONS
|
|
23
|
-
} from "../chunk-IUT7Y2UY.js";
|
|
24
|
-
import {
|
|
25
|
-
isUnicodeSupported
|
|
26
|
-
} from "../chunk-QBS3OCHH.js";
|
|
27
|
-
import {
|
|
28
|
-
formatTimestamp
|
|
29
|
-
} from "../chunk-PR7RQHRE.js";
|
|
30
|
-
import "../chunk-GZFXEQPB.js";
|
|
31
|
-
import "../chunk-OIEEXHKO.js";
|
|
32
|
-
import "../chunk-XQPQRRG3.js";
|
|
33
|
-
import {
|
|
34
|
-
getLogLevel,
|
|
35
|
-
getLogLevelLabel,
|
|
36
|
-
isVerbose
|
|
37
|
-
} from "../chunk-HI33NNPB.js";
|
|
38
|
-
import "../chunk-6T3V5XJK.js";
|
|
39
|
-
import "../chunk-MLUBD3PU.js";
|
|
40
|
-
import "../chunk-POXTJ6GF.js";
|
|
41
|
-
import "../chunk-SHUYVCID.js";
|
|
42
|
-
export {
|
|
43
|
-
CONSOLE_ICONS,
|
|
44
|
-
createLogger,
|
|
45
|
-
formatLogMessage,
|
|
46
|
-
formatTimestamp,
|
|
47
|
-
getChalk,
|
|
48
|
-
getLogFn,
|
|
49
|
-
getLogLevel,
|
|
50
|
-
getLogLevelLabel,
|
|
51
|
-
getStopwatch,
|
|
52
|
-
isUnicodeSupported,
|
|
53
|
-
isVerbose,
|
|
54
|
-
writeDebug,
|
|
55
|
-
writeError,
|
|
56
|
-
writeFatal,
|
|
57
|
-
writeInfo,
|
|
58
|
-
writeSuccess,
|
|
59
|
-
writeSystem,
|
|
60
|
-
writeTrace,
|
|
61
|
-
writeWarning
|
|
62
|
-
};
|
|
1
|
+
export * from "./chalk";
|
|
2
|
+
export * from "./console";
|
|
3
|
+
export * from "./console-icons";
|
|
4
|
+
export * from "./create-logger";
|
|
5
|
+
export * from "./format-timestamp";
|
|
6
|
+
export * from "./get-log-level";
|
|
7
|
+
export * from "./is-unicode-supported";
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('
|
|
3
|
+
var _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
|
|
4
|
+
var _nodeprocess = require('node:process'); var _nodeprocess2 = _interopRequireDefault(_nodeprocess);
|
|
5
|
+
function isUnicodeSupported() {
|
|
6
|
+
const { env } = _nodeprocess2.default;
|
|
7
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
8
|
+
if (_nodeprocess2.default.platform !== "win32") {
|
|
9
|
+
return TERM !== "linux";
|
|
10
|
+
}
|
|
11
|
+
return Boolean(env.WT_SESSION) || // Windows Terminal
|
|
12
|
+
Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
13
|
+
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
14
|
+
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
15
|
+
}
|
|
16
|
+
_chunkUSNT2KNTcjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
|
|
5
17
|
|
|
6
18
|
|
|
7
|
-
exports.isUnicodeSupported =
|
|
19
|
+
exports.isUnicodeSupported = isUnicodeSupported;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "
|
|
2
|
+
__name
|
|
3
|
+
} from "../chunk-SHUYVCID.js";
|
|
4
|
+
import process from "node:process";
|
|
5
|
+
function isUnicodeSupported() {
|
|
6
|
+
const { env } = process;
|
|
7
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
8
|
+
if (process.platform !== "win32") {
|
|
9
|
+
return TERM !== "linux";
|
|
10
|
+
}
|
|
11
|
+
return Boolean(env.WT_SESSION) || // Windows Terminal
|
|
12
|
+
Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
13
|
+
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
14
|
+
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
15
|
+
}
|
|
16
|
+
__name(isUnicodeSupported, "isUnicodeSupported");
|
|
5
17
|
export {
|
|
6
18
|
isUnicodeSupported
|
|
7
19
|
};
|
package/dist/types.cjs
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-USNT2KNT.cjs');
|
|
2
|
+
const LogLevel = {
|
|
3
|
+
SILENT: 0,
|
|
4
|
+
FATAL: 10,
|
|
5
|
+
ERROR: 20,
|
|
6
|
+
WARN: 30,
|
|
7
|
+
SUCCESS: 35,
|
|
8
|
+
INFO: 40,
|
|
9
|
+
DEBUG: 60,
|
|
10
|
+
TRACE: 70,
|
|
11
|
+
ALL: 100
|
|
12
|
+
};
|
|
13
|
+
const LogLevelLabel = {
|
|
14
|
+
SILENT: "silent",
|
|
15
|
+
FATAL: "fatal",
|
|
16
|
+
ERROR: "error",
|
|
17
|
+
WARN: "warn",
|
|
18
|
+
SUCCESS: "success",
|
|
19
|
+
INFO: "info",
|
|
20
|
+
DEBUG: "debug",
|
|
21
|
+
TRACE: "trace",
|
|
22
|
+
ALL: "all"
|
|
23
|
+
};
|
|
2
24
|
|
|
3
25
|
|
|
4
|
-
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
5
|
-
require('./chunk-USNT2KNT.cjs');
|
|
6
26
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.LogLevel = _chunkIRCFHYKZcjs.LogLevel; exports.LogLevelLabel = _chunkIRCFHYKZcjs.LogLevelLabel;
|
|
27
|
+
exports.LogLevel = LogLevel; exports.LogLevelLabel = LogLevelLabel;
|
package/dist/types.js
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
LogLevel,
|
|
3
|
-
LogLevelLabel
|
|
4
|
-
} from "./chunk-POXTJ6GF.js";
|
|
5
1
|
import "./chunk-SHUYVCID.js";
|
|
2
|
+
const LogLevel = {
|
|
3
|
+
SILENT: 0,
|
|
4
|
+
FATAL: 10,
|
|
5
|
+
ERROR: 20,
|
|
6
|
+
WARN: 30,
|
|
7
|
+
SUCCESS: 35,
|
|
8
|
+
INFO: 40,
|
|
9
|
+
DEBUG: 60,
|
|
10
|
+
TRACE: 70,
|
|
11
|
+
ALL: 100
|
|
12
|
+
};
|
|
13
|
+
const LogLevelLabel = {
|
|
14
|
+
SILENT: "silent",
|
|
15
|
+
FATAL: "fatal",
|
|
16
|
+
ERROR: "error",
|
|
17
|
+
WARN: "warn",
|
|
18
|
+
SUCCESS: "success",
|
|
19
|
+
INFO: "info",
|
|
20
|
+
DEBUG: "debug",
|
|
21
|
+
TRACE: "trace",
|
|
22
|
+
ALL: "all"
|
|
23
|
+
};
|
|
6
24
|
export {
|
|
7
25
|
LogLevel,
|
|
8
26
|
LogLevelLabel
|
|
@@ -1,14 +1,60 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
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 _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
|
|
4
|
+
var _findworkspaceroot = require('./find-workspace-root');
|
|
5
|
+
const applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (option, tokenParams) => {
|
|
6
|
+
let result = option;
|
|
7
|
+
if (!result) {
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
if (tokenParams) {
|
|
11
|
+
const optionKeys = Object.keys(tokenParams);
|
|
12
|
+
if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
|
|
13
|
+
for (const optionKey of optionKeys) {
|
|
14
|
+
if (result.includes(`{${optionKey}}`)) {
|
|
15
|
+
result = result.replaceAll(`{${optionKey}}`, _optionalChain([tokenParams, 'optionalAccess', _ => _[optionKey]]) || "");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (tokenParams.config) {
|
|
21
|
+
const configKeys = Object.keys(tokenParams.config);
|
|
22
|
+
if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
|
|
23
|
+
for (const configKey of configKeys) {
|
|
24
|
+
if (result.includes(`{${configKey}}`)) {
|
|
25
|
+
result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (result.includes("{workspaceRoot}")) {
|
|
31
|
+
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _findworkspaceroot.findWorkspaceRoot.call(void 0, ))));
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}, "applyWorkspaceBaseTokens");
|
|
35
|
+
const applyWorkspaceProjectTokens = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (option, tokenParams) => {
|
|
36
|
+
return applyWorkspaceBaseTokens(option, tokenParams);
|
|
37
|
+
}, "applyWorkspaceProjectTokens");
|
|
38
|
+
const applyWorkspaceTokens = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (options, tokenParams, tokenizerFn) => {
|
|
39
|
+
if (!options) {
|
|
40
|
+
return {};
|
|
41
|
+
}
|
|
42
|
+
const result = {};
|
|
43
|
+
for (const option of Object.keys(options)) {
|
|
44
|
+
if (typeof options[option] === "string") {
|
|
45
|
+
result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
|
|
46
|
+
} else if (Array.isArray(options[option])) {
|
|
47
|
+
result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
|
|
48
|
+
} else if (typeof options[option] === "object") {
|
|
49
|
+
result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
|
|
50
|
+
} else {
|
|
51
|
+
result[option] = options[option];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
}, "applyWorkspaceTokens");
|
|
3
56
|
|
|
4
57
|
|
|
5
|
-
var _chunk4DLP6LZYcjs = require('../chunk-4DLP6LZY.cjs');
|
|
6
|
-
require('../chunk-KNLWLA7O.cjs');
|
|
7
|
-
require('../chunk-SWX2MJHI.cjs');
|
|
8
|
-
require('../chunk-HESFC24Z.cjs');
|
|
9
|
-
require('../chunk-USNT2KNT.cjs');
|
|
10
58
|
|
|
11
59
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
exports.applyWorkspaceBaseTokens = _chunk4DLP6LZYcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunk4DLP6LZYcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunk4DLP6LZYcjs.applyWorkspaceTokens;
|
|
60
|
+
exports.applyWorkspaceBaseTokens = applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = applyWorkspaceTokens;
|
|
@@ -1,12 +1,58 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
__name
|
|
3
|
+
} from "../chunk-SHUYVCID.js";
|
|
4
|
+
import { findWorkspaceRoot } from "./find-workspace-root";
|
|
5
|
+
const applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams) => {
|
|
6
|
+
let result = option;
|
|
7
|
+
if (!result) {
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
if (tokenParams) {
|
|
11
|
+
const optionKeys = Object.keys(tokenParams);
|
|
12
|
+
if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
|
|
13
|
+
for (const optionKey of optionKeys) {
|
|
14
|
+
if (result.includes(`{${optionKey}}`)) {
|
|
15
|
+
result = result.replaceAll(`{${optionKey}}`, tokenParams?.[optionKey] || "");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (tokenParams.config) {
|
|
21
|
+
const configKeys = Object.keys(tokenParams.config);
|
|
22
|
+
if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
|
|
23
|
+
for (const configKey of configKeys) {
|
|
24
|
+
if (result.includes(`{${configKey}}`)) {
|
|
25
|
+
result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (result.includes("{workspaceRoot}")) {
|
|
31
|
+
result = result.replaceAll("{workspaceRoot}", tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot());
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}, "applyWorkspaceBaseTokens");
|
|
35
|
+
const applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenParams) => {
|
|
36
|
+
return applyWorkspaceBaseTokens(option, tokenParams);
|
|
37
|
+
}, "applyWorkspaceProjectTokens");
|
|
38
|
+
const applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, tokenParams, tokenizerFn) => {
|
|
39
|
+
if (!options) {
|
|
40
|
+
return {};
|
|
41
|
+
}
|
|
42
|
+
const result = {};
|
|
43
|
+
for (const option of Object.keys(options)) {
|
|
44
|
+
if (typeof options[option] === "string") {
|
|
45
|
+
result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
|
|
46
|
+
} else if (Array.isArray(options[option])) {
|
|
47
|
+
result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
|
|
48
|
+
} else if (typeof options[option] === "object") {
|
|
49
|
+
result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
|
|
50
|
+
} else {
|
|
51
|
+
result[option] = options[option];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
}, "applyWorkspaceTokens");
|
|
10
56
|
export {
|
|
11
57
|
applyWorkspaceBaseTokens,
|
|
12
58
|
applyWorkspaceProjectTokens,
|