@storm-software/git-tools 2.67.0 → 2.70.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/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/bin/git.js +21 -20
- package/bin/post-checkout.js +21 -20
- package/bin/post-commit.js +21 -20
- package/bin/post-merge.js +21 -20
- package/bin/pre-commit.js +21 -20
- package/bin/pre-install.js +21 -20
- package/bin/pre-push.js +21 -20
- package/bin/prepare.js +21 -20
- package/bin/version-warning.js +21 -20
- package/package.json +2 -2
- package/src/cli/index.js +21 -20
- package/src/commit/index.js +10 -10
- package/src/commitizen/index.js +10 -10
- package/src/index.js +21 -20
- package/src/release/index.js +10 -10
package/bin/pre-commit.js
CHANGED
|
@@ -66561,7 +66561,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
66561
66561
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
66562
66562
|
const _chalk = getChalk();
|
|
66563
66563
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
66564
|
-
const configLogLevel = config.logLevel
|
|
66564
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
66565
66565
|
if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
|
|
66566
66566
|
return (_6) => {
|
|
66567
66567
|
};
|
|
@@ -66569,9 +66569,9 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66569
66569
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
66570
66570
|
return (message) => {
|
|
66571
66571
|
console.error(
|
|
66572
|
-
`${_chalk.bold.hex(colors.
|
|
66572
|
+
`${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
|
|
66573
66573
|
" \u{1F480} Fatal "
|
|
66574
|
-
)} ${_chalk.hex(colors.
|
|
66574
|
+
)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
|
|
66575
66575
|
`
|
|
66576
66576
|
);
|
|
66577
66577
|
};
|
|
@@ -66581,7 +66581,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66581
66581
|
console.error(
|
|
66582
66582
|
`${_chalk.bold.hex(colors.danger ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.danger ?? "#f85149").whiteBright(
|
|
66583
66583
|
" \u2718 Error "
|
|
66584
|
-
)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
66584
|
+
)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
66585
66585
|
`
|
|
66586
66586
|
);
|
|
66587
66587
|
};
|
|
@@ -66591,7 +66591,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66591
66591
|
console.warn(
|
|
66592
66592
|
`${_chalk.bold.hex(colors.warning ?? "#e3b341")(">")} ${_chalk.bold.bgHex(colors.warning ?? "#e3b341").whiteBright(
|
|
66593
66593
|
" \u26A0 Warn "
|
|
66594
|
-
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
66594
|
+
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
66595
66595
|
`
|
|
66596
66596
|
);
|
|
66597
66597
|
};
|
|
@@ -66601,7 +66601,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66601
66601
|
console.info(
|
|
66602
66602
|
`${_chalk.bold.hex(colors.success ?? "#56d364")(">")} ${_chalk.bold.bgHex(colors.success ?? "#56d364").whiteBright(
|
|
66603
66603
|
" \u2713 Success "
|
|
66604
|
-
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
66604
|
+
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
66605
66605
|
`
|
|
66606
66606
|
);
|
|
66607
66607
|
};
|
|
@@ -66611,17 +66611,17 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66611
66611
|
console.info(
|
|
66612
66612
|
`${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.info ?? "#58a6ff").whiteBright(
|
|
66613
66613
|
" \u2139 Info "
|
|
66614
|
-
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
66614
|
+
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
66615
66615
|
`
|
|
66616
66616
|
);
|
|
66617
66617
|
};
|
|
66618
66618
|
}
|
|
66619
|
-
if (typeof logLevel === "number" && LogLevel.
|
|
66619
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
66620
66620
|
return (message) => {
|
|
66621
66621
|
console.debug(
|
|
66622
66622
|
`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
66623
66623
|
" \u{1F6E0} Debug "
|
|
66624
|
-
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66624
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66625
66625
|
`
|
|
66626
66626
|
);
|
|
66627
66627
|
};
|
|
@@ -66630,7 +66630,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66630
66630
|
console.log(
|
|
66631
66631
|
`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
66632
66632
|
" \u2709 System "
|
|
66633
|
-
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66633
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66634
66634
|
`
|
|
66635
66635
|
);
|
|
66636
66636
|
};
|
|
@@ -66641,6 +66641,7 @@ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message)
|
|
|
66641
66641
|
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
66642
66642
|
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
66643
66643
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
66644
|
+
var writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);
|
|
66644
66645
|
var MAX_DEPTH = 4;
|
|
66645
66646
|
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
66646
66647
|
if (depth2 > MAX_DEPTH) {
|
|
@@ -66721,8 +66722,8 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
66721
66722
|
name: fileName,
|
|
66722
66723
|
envName: fileName?.toUpperCase(),
|
|
66723
66724
|
jitiOptions: {
|
|
66724
|
-
debug:
|
|
66725
|
-
cache: process.env.
|
|
66725
|
+
debug: false,
|
|
66726
|
+
cache: process.env.STORM_SKIP_CACHE === "true" ? false : process.env.STORM_CACHE_DIRECTORY || "node_modules/.cache/storm"
|
|
66726
66727
|
},
|
|
66727
66728
|
...options
|
|
66728
66729
|
});
|
|
@@ -66733,8 +66734,8 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
66733
66734
|
name: fileName,
|
|
66734
66735
|
envName: fileName?.toUpperCase(),
|
|
66735
66736
|
jitiOptions: {
|
|
66736
|
-
debug:
|
|
66737
|
-
cache: process.env.
|
|
66737
|
+
debug: false,
|
|
66738
|
+
cache: process.env.STORM_SKIP_CACHE === "true" ? false : process.env.STORM_CACHE_DIRECTORY || "node_modules/.cache/storm"
|
|
66738
66739
|
},
|
|
66739
66740
|
configFile: fileName,
|
|
66740
66741
|
...options
|
|
@@ -66747,9 +66748,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
66747
66748
|
const result = await getConfigFileByName("storm", workspacePath);
|
|
66748
66749
|
let config = result.config;
|
|
66749
66750
|
const configFile = result.configFile;
|
|
66750
|
-
if (config && Object.keys(config).length > 0) {
|
|
66751
|
-
|
|
66752
|
-
`Found Storm configuration file "${configFile}" at "${workspacePath}"`,
|
|
66751
|
+
if (config && configFile && Object.keys(config).length > 0) {
|
|
66752
|
+
writeSystem(
|
|
66753
|
+
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
66753
66754
|
{
|
|
66754
66755
|
logLevel: "all"
|
|
66755
66756
|
}
|
|
@@ -66762,9 +66763,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
66762
66763
|
)
|
|
66763
66764
|
);
|
|
66764
66765
|
for (const result2 of results) {
|
|
66765
|
-
if (result2?.config && Object.keys(result2.config).length > 0) {
|
|
66766
|
-
|
|
66767
|
-
`Found
|
|
66766
|
+
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
66767
|
+
writeSystem(
|
|
66768
|
+
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
66768
66769
|
{
|
|
66769
66770
|
logLevel: "all"
|
|
66770
66771
|
}
|
package/bin/pre-install.js
CHANGED
|
@@ -66561,7 +66561,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
66561
66561
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
66562
66562
|
const _chalk = getChalk();
|
|
66563
66563
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
66564
|
-
const configLogLevel = config.logLevel
|
|
66564
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
66565
66565
|
if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
|
|
66566
66566
|
return (_6) => {
|
|
66567
66567
|
};
|
|
@@ -66569,9 +66569,9 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66569
66569
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
66570
66570
|
return (message) => {
|
|
66571
66571
|
console.error(
|
|
66572
|
-
`${_chalk.bold.hex(colors.
|
|
66572
|
+
`${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
|
|
66573
66573
|
" \u{1F480} Fatal "
|
|
66574
|
-
)} ${_chalk.hex(colors.
|
|
66574
|
+
)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
|
|
66575
66575
|
`
|
|
66576
66576
|
);
|
|
66577
66577
|
};
|
|
@@ -66581,7 +66581,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66581
66581
|
console.error(
|
|
66582
66582
|
`${_chalk.bold.hex(colors.danger ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.danger ?? "#f85149").whiteBright(
|
|
66583
66583
|
" \u2718 Error "
|
|
66584
|
-
)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
66584
|
+
)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
66585
66585
|
`
|
|
66586
66586
|
);
|
|
66587
66587
|
};
|
|
@@ -66591,7 +66591,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66591
66591
|
console.warn(
|
|
66592
66592
|
`${_chalk.bold.hex(colors.warning ?? "#e3b341")(">")} ${_chalk.bold.bgHex(colors.warning ?? "#e3b341").whiteBright(
|
|
66593
66593
|
" \u26A0 Warn "
|
|
66594
|
-
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
66594
|
+
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
66595
66595
|
`
|
|
66596
66596
|
);
|
|
66597
66597
|
};
|
|
@@ -66601,7 +66601,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66601
66601
|
console.info(
|
|
66602
66602
|
`${_chalk.bold.hex(colors.success ?? "#56d364")(">")} ${_chalk.bold.bgHex(colors.success ?? "#56d364").whiteBright(
|
|
66603
66603
|
" \u2713 Success "
|
|
66604
|
-
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
66604
|
+
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
66605
66605
|
`
|
|
66606
66606
|
);
|
|
66607
66607
|
};
|
|
@@ -66611,17 +66611,17 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66611
66611
|
console.info(
|
|
66612
66612
|
`${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.info ?? "#58a6ff").whiteBright(
|
|
66613
66613
|
" \u2139 Info "
|
|
66614
|
-
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
66614
|
+
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
66615
66615
|
`
|
|
66616
66616
|
);
|
|
66617
66617
|
};
|
|
66618
66618
|
}
|
|
66619
|
-
if (typeof logLevel === "number" && LogLevel.
|
|
66619
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
66620
66620
|
return (message) => {
|
|
66621
66621
|
console.debug(
|
|
66622
66622
|
`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
66623
66623
|
" \u{1F6E0} Debug "
|
|
66624
|
-
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66624
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66625
66625
|
`
|
|
66626
66626
|
);
|
|
66627
66627
|
};
|
|
@@ -66630,7 +66630,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66630
66630
|
console.log(
|
|
66631
66631
|
`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
66632
66632
|
" \u2709 System "
|
|
66633
|
-
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66633
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66634
66634
|
`
|
|
66635
66635
|
);
|
|
66636
66636
|
};
|
|
@@ -66641,6 +66641,7 @@ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message)
|
|
|
66641
66641
|
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
66642
66642
|
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
66643
66643
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
66644
|
+
var writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);
|
|
66644
66645
|
var MAX_DEPTH = 4;
|
|
66645
66646
|
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
66646
66647
|
if (depth2 > MAX_DEPTH) {
|
|
@@ -66737,8 +66738,8 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
66737
66738
|
name: fileName,
|
|
66738
66739
|
envName: fileName?.toUpperCase(),
|
|
66739
66740
|
jitiOptions: {
|
|
66740
|
-
debug:
|
|
66741
|
-
cache: process.env.
|
|
66741
|
+
debug: false,
|
|
66742
|
+
cache: process.env.STORM_SKIP_CACHE === "true" ? false : process.env.STORM_CACHE_DIRECTORY || "node_modules/.cache/storm"
|
|
66742
66743
|
},
|
|
66743
66744
|
...options
|
|
66744
66745
|
});
|
|
@@ -66749,8 +66750,8 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
66749
66750
|
name: fileName,
|
|
66750
66751
|
envName: fileName?.toUpperCase(),
|
|
66751
66752
|
jitiOptions: {
|
|
66752
|
-
debug:
|
|
66753
|
-
cache: process.env.
|
|
66753
|
+
debug: false,
|
|
66754
|
+
cache: process.env.STORM_SKIP_CACHE === "true" ? false : process.env.STORM_CACHE_DIRECTORY || "node_modules/.cache/storm"
|
|
66754
66755
|
},
|
|
66755
66756
|
configFile: fileName,
|
|
66756
66757
|
...options
|
|
@@ -66763,9 +66764,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
66763
66764
|
const result = await getConfigFileByName("storm", workspacePath);
|
|
66764
66765
|
let config = result.config;
|
|
66765
66766
|
const configFile = result.configFile;
|
|
66766
|
-
if (config && Object.keys(config).length > 0) {
|
|
66767
|
-
|
|
66768
|
-
`Found Storm configuration file "${configFile}" at "${workspacePath}"`,
|
|
66767
|
+
if (config && configFile && Object.keys(config).length > 0) {
|
|
66768
|
+
writeSystem(
|
|
66769
|
+
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
66769
66770
|
{
|
|
66770
66771
|
logLevel: "all"
|
|
66771
66772
|
}
|
|
@@ -66778,9 +66779,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
66778
66779
|
)
|
|
66779
66780
|
);
|
|
66780
66781
|
for (const result2 of results) {
|
|
66781
|
-
if (result2?.config && Object.keys(result2.config).length > 0) {
|
|
66782
|
-
|
|
66783
|
-
`Found
|
|
66782
|
+
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
66783
|
+
writeSystem(
|
|
66784
|
+
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
66784
66785
|
{
|
|
66785
66786
|
logLevel: "all"
|
|
66786
66787
|
}
|
package/bin/pre-push.js
CHANGED
|
@@ -66566,7 +66566,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
66566
66566
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
66567
66567
|
const _chalk = getChalk();
|
|
66568
66568
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
66569
|
-
const configLogLevel = config.logLevel
|
|
66569
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
66570
66570
|
if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
|
|
66571
66571
|
return (_6) => {
|
|
66572
66572
|
};
|
|
@@ -66574,9 +66574,9 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66574
66574
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
66575
66575
|
return (message) => {
|
|
66576
66576
|
console.error(
|
|
66577
|
-
`${_chalk.bold.hex(colors.
|
|
66577
|
+
`${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
|
|
66578
66578
|
" \u{1F480} Fatal "
|
|
66579
|
-
)} ${_chalk.hex(colors.
|
|
66579
|
+
)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
|
|
66580
66580
|
`
|
|
66581
66581
|
);
|
|
66582
66582
|
};
|
|
@@ -66586,7 +66586,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66586
66586
|
console.error(
|
|
66587
66587
|
`${_chalk.bold.hex(colors.danger ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.danger ?? "#f85149").whiteBright(
|
|
66588
66588
|
" \u2718 Error "
|
|
66589
|
-
)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
66589
|
+
)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
66590
66590
|
`
|
|
66591
66591
|
);
|
|
66592
66592
|
};
|
|
@@ -66596,7 +66596,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66596
66596
|
console.warn(
|
|
66597
66597
|
`${_chalk.bold.hex(colors.warning ?? "#e3b341")(">")} ${_chalk.bold.bgHex(colors.warning ?? "#e3b341").whiteBright(
|
|
66598
66598
|
" \u26A0 Warn "
|
|
66599
|
-
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
66599
|
+
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
66600
66600
|
`
|
|
66601
66601
|
);
|
|
66602
66602
|
};
|
|
@@ -66606,7 +66606,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66606
66606
|
console.info(
|
|
66607
66607
|
`${_chalk.bold.hex(colors.success ?? "#56d364")(">")} ${_chalk.bold.bgHex(colors.success ?? "#56d364").whiteBright(
|
|
66608
66608
|
" \u2713 Success "
|
|
66609
|
-
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
66609
|
+
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
66610
66610
|
`
|
|
66611
66611
|
);
|
|
66612
66612
|
};
|
|
@@ -66616,17 +66616,17 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66616
66616
|
console.info(
|
|
66617
66617
|
`${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.info ?? "#58a6ff").whiteBright(
|
|
66618
66618
|
" \u2139 Info "
|
|
66619
|
-
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
66619
|
+
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
66620
66620
|
`
|
|
66621
66621
|
);
|
|
66622
66622
|
};
|
|
66623
66623
|
}
|
|
66624
|
-
if (typeof logLevel === "number" && LogLevel.
|
|
66624
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
66625
66625
|
return (message) => {
|
|
66626
66626
|
console.debug(
|
|
66627
66627
|
`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
66628
66628
|
" \u{1F6E0} Debug "
|
|
66629
|
-
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66629
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66630
66630
|
`
|
|
66631
66631
|
);
|
|
66632
66632
|
};
|
|
@@ -66635,7 +66635,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66635
66635
|
console.log(
|
|
66636
66636
|
`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
66637
66637
|
" \u2709 System "
|
|
66638
|
-
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66638
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66639
66639
|
`
|
|
66640
66640
|
);
|
|
66641
66641
|
};
|
|
@@ -66646,6 +66646,7 @@ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message)
|
|
|
66646
66646
|
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
66647
66647
|
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
66648
66648
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
66649
|
+
var writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);
|
|
66649
66650
|
var MAX_DEPTH = 4;
|
|
66650
66651
|
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
66651
66652
|
if (depth2 > MAX_DEPTH) {
|
|
@@ -66742,8 +66743,8 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
66742
66743
|
name: fileName,
|
|
66743
66744
|
envName: fileName?.toUpperCase(),
|
|
66744
66745
|
jitiOptions: {
|
|
66745
|
-
debug:
|
|
66746
|
-
cache: process.env.
|
|
66746
|
+
debug: false,
|
|
66747
|
+
cache: process.env.STORM_SKIP_CACHE === "true" ? false : process.env.STORM_CACHE_DIRECTORY || "node_modules/.cache/storm"
|
|
66747
66748
|
},
|
|
66748
66749
|
...options
|
|
66749
66750
|
});
|
|
@@ -66754,8 +66755,8 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
66754
66755
|
name: fileName,
|
|
66755
66756
|
envName: fileName?.toUpperCase(),
|
|
66756
66757
|
jitiOptions: {
|
|
66757
|
-
debug:
|
|
66758
|
-
cache: process.env.
|
|
66758
|
+
debug: false,
|
|
66759
|
+
cache: process.env.STORM_SKIP_CACHE === "true" ? false : process.env.STORM_CACHE_DIRECTORY || "node_modules/.cache/storm"
|
|
66759
66760
|
},
|
|
66760
66761
|
configFile: fileName,
|
|
66761
66762
|
...options
|
|
@@ -66768,9 +66769,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
66768
66769
|
const result = await getConfigFileByName("storm", workspacePath);
|
|
66769
66770
|
let config = result.config;
|
|
66770
66771
|
const configFile = result.configFile;
|
|
66771
|
-
if (config && Object.keys(config).length > 0) {
|
|
66772
|
-
|
|
66773
|
-
`Found Storm configuration file "${configFile}" at "${workspacePath}"`,
|
|
66772
|
+
if (config && configFile && Object.keys(config).length > 0) {
|
|
66773
|
+
writeSystem(
|
|
66774
|
+
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
66774
66775
|
{
|
|
66775
66776
|
logLevel: "all"
|
|
66776
66777
|
}
|
|
@@ -66783,9 +66784,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
66783
66784
|
)
|
|
66784
66785
|
);
|
|
66785
66786
|
for (const result2 of results) {
|
|
66786
|
-
if (result2?.config && Object.keys(result2.config).length > 0) {
|
|
66787
|
-
|
|
66788
|
-
`Found
|
|
66787
|
+
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
66788
|
+
writeSystem(
|
|
66789
|
+
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
66789
66790
|
{
|
|
66790
66791
|
logLevel: "all"
|
|
66791
66792
|
}
|
package/bin/prepare.js
CHANGED
|
@@ -66561,7 +66561,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
66561
66561
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
66562
66562
|
const _chalk = getChalk();
|
|
66563
66563
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
66564
|
-
const configLogLevel = config.logLevel
|
|
66564
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
66565
66565
|
if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
|
|
66566
66566
|
return (_6) => {
|
|
66567
66567
|
};
|
|
@@ -66569,9 +66569,9 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66569
66569
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
66570
66570
|
return (message) => {
|
|
66571
66571
|
console.error(
|
|
66572
|
-
`${_chalk.bold.hex(colors.
|
|
66572
|
+
`${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
|
|
66573
66573
|
" \u{1F480} Fatal "
|
|
66574
|
-
)} ${_chalk.hex(colors.
|
|
66574
|
+
)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
|
|
66575
66575
|
`
|
|
66576
66576
|
);
|
|
66577
66577
|
};
|
|
@@ -66581,7 +66581,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66581
66581
|
console.error(
|
|
66582
66582
|
`${_chalk.bold.hex(colors.danger ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.danger ?? "#f85149").whiteBright(
|
|
66583
66583
|
" \u2718 Error "
|
|
66584
|
-
)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
66584
|
+
)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
|
|
66585
66585
|
`
|
|
66586
66586
|
);
|
|
66587
66587
|
};
|
|
@@ -66591,7 +66591,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66591
66591
|
console.warn(
|
|
66592
66592
|
`${_chalk.bold.hex(colors.warning ?? "#e3b341")(">")} ${_chalk.bold.bgHex(colors.warning ?? "#e3b341").whiteBright(
|
|
66593
66593
|
" \u26A0 Warn "
|
|
66594
|
-
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
66594
|
+
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
66595
66595
|
`
|
|
66596
66596
|
);
|
|
66597
66597
|
};
|
|
@@ -66601,7 +66601,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66601
66601
|
console.info(
|
|
66602
66602
|
`${_chalk.bold.hex(colors.success ?? "#56d364")(">")} ${_chalk.bold.bgHex(colors.success ?? "#56d364").whiteBright(
|
|
66603
66603
|
" \u2713 Success "
|
|
66604
|
-
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
66604
|
+
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
66605
66605
|
`
|
|
66606
66606
|
);
|
|
66607
66607
|
};
|
|
@@ -66611,17 +66611,17 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66611
66611
|
console.info(
|
|
66612
66612
|
`${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.info ?? "#58a6ff").whiteBright(
|
|
66613
66613
|
" \u2139 Info "
|
|
66614
|
-
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
66614
|
+
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
66615
66615
|
`
|
|
66616
66616
|
);
|
|
66617
66617
|
};
|
|
66618
66618
|
}
|
|
66619
|
-
if (typeof logLevel === "number" && LogLevel.
|
|
66619
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
|
|
66620
66620
|
return (message) => {
|
|
66621
66621
|
console.debug(
|
|
66622
66622
|
`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
66623
66623
|
" \u{1F6E0} Debug "
|
|
66624
|
-
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66624
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66625
66625
|
`
|
|
66626
66626
|
);
|
|
66627
66627
|
};
|
|
@@ -66630,7 +66630,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
66630
66630
|
console.log(
|
|
66631
66631
|
`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
66632
66632
|
" \u2709 System "
|
|
66633
|
-
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66633
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
66634
66634
|
`
|
|
66635
66635
|
);
|
|
66636
66636
|
};
|
|
@@ -66641,6 +66641,7 @@ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message)
|
|
|
66641
66641
|
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
66642
66642
|
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
66643
66643
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
66644
|
+
var writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);
|
|
66644
66645
|
var MAX_DEPTH = 4;
|
|
66645
66646
|
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
66646
66647
|
if (depth2 > MAX_DEPTH) {
|
|
@@ -66737,8 +66738,8 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
66737
66738
|
name: fileName,
|
|
66738
66739
|
envName: fileName?.toUpperCase(),
|
|
66739
66740
|
jitiOptions: {
|
|
66740
|
-
debug:
|
|
66741
|
-
cache: process.env.
|
|
66741
|
+
debug: false,
|
|
66742
|
+
cache: process.env.STORM_SKIP_CACHE === "true" ? false : process.env.STORM_CACHE_DIRECTORY || "node_modules/.cache/storm"
|
|
66742
66743
|
},
|
|
66743
66744
|
...options
|
|
66744
66745
|
});
|
|
@@ -66749,8 +66750,8 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
66749
66750
|
name: fileName,
|
|
66750
66751
|
envName: fileName?.toUpperCase(),
|
|
66751
66752
|
jitiOptions: {
|
|
66752
|
-
debug:
|
|
66753
|
-
cache: process.env.
|
|
66753
|
+
debug: false,
|
|
66754
|
+
cache: process.env.STORM_SKIP_CACHE === "true" ? false : process.env.STORM_CACHE_DIRECTORY || "node_modules/.cache/storm"
|
|
66754
66755
|
},
|
|
66755
66756
|
configFile: fileName,
|
|
66756
66757
|
...options
|
|
@@ -66763,9 +66764,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
66763
66764
|
const result = await getConfigFileByName("storm", workspacePath);
|
|
66764
66765
|
let config = result.config;
|
|
66765
66766
|
const configFile = result.configFile;
|
|
66766
|
-
if (config && Object.keys(config).length > 0) {
|
|
66767
|
-
|
|
66768
|
-
`Found Storm configuration file "${configFile}" at "${workspacePath}"`,
|
|
66767
|
+
if (config && configFile && Object.keys(config).length > 0) {
|
|
66768
|
+
writeSystem(
|
|
66769
|
+
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
66769
66770
|
{
|
|
66770
66771
|
logLevel: "all"
|
|
66771
66772
|
}
|
|
@@ -66778,9 +66779,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
66778
66779
|
)
|
|
66779
66780
|
);
|
|
66780
66781
|
for (const result2 of results) {
|
|
66781
|
-
if (result2?.config && Object.keys(result2.config).length > 0) {
|
|
66782
|
-
|
|
66783
|
-
`Found
|
|
66782
|
+
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
66783
|
+
writeSystem(
|
|
66784
|
+
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
66784
66785
|
{
|
|
66785
66786
|
logLevel: "all"
|
|
66786
66787
|
}
|