@storm-software/workspace-tools 1.46.1 → 1.48.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 +14 -0
- package/index.js +222 -216
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +195 -200
- package/src/executors/design-tokens/executor.js +192 -199
- package/src/executors/tsup/executor.js +210 -212
- package/src/executors/tsup/schema.d.ts +1 -0
- package/src/executors/tsup/schema.json +27 -6
- package/src/executors/tsup-browser/executor.js +216 -214
- package/src/executors/tsup-neutral/executor.js +213 -213
- package/src/executors/tsup-node/executor.js +213 -213
- package/src/executors/typia/executor.js +192 -199
- package/src/generators/browser-library/generator.js +192 -199
- package/src/generators/config-schema/generator.js +192 -199
- package/src/generators/neutral-library/generator.js +192 -199
- package/src/generators/node-library/generator.js +192 -199
- package/src/generators/preset/generator.js +192 -199
|
@@ -44991,9 +44991,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
44991
44991
|
}
|
|
44992
44992
|
});
|
|
44993
44993
|
|
|
44994
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
44994
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
44995
44995
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
44996
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
44996
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
44997
44997
|
"use strict";
|
|
44998
44998
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44999
44999
|
var version = "8.0.0";
|
|
@@ -46640,9 +46640,9 @@ var require_resolve_from2 = __commonJS({
|
|
|
46640
46640
|
}
|
|
46641
46641
|
});
|
|
46642
46642
|
|
|
46643
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
46643
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
46644
46644
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
46645
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
46645
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
46646
46646
|
"use strict";
|
|
46647
46647
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46648
46648
|
function _interopRequireDefault(obj) {
|
|
@@ -46920,9 +46920,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
46920
46920
|
}
|
|
46921
46921
|
});
|
|
46922
46922
|
|
|
46923
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
46923
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
46924
46924
|
var require_chunk_UIX4URMV = __commonJS({
|
|
46925
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
46925
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
46926
46926
|
"use strict";
|
|
46927
46927
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46928
46928
|
function _interopRequireWildcard(obj) {
|
|
@@ -47856,9 +47856,9 @@ var require_dist3 = __commonJS({
|
|
|
47856
47856
|
}
|
|
47857
47857
|
});
|
|
47858
47858
|
|
|
47859
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
47859
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
47860
47860
|
var require_chunk_7G76EW2R = __commonJS({
|
|
47861
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
47861
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
47862
47862
|
"use strict";
|
|
47863
47863
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47864
47864
|
function _interopRequireDefault(obj) {
|
|
@@ -101058,9 +101058,9 @@ var require_chokidar = __commonJS({
|
|
|
101058
101058
|
}
|
|
101059
101059
|
});
|
|
101060
101060
|
|
|
101061
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
101061
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/index.js
|
|
101062
101062
|
var require_dist6 = __commonJS({
|
|
101063
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
101063
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/index.js"(exports) {
|
|
101064
101064
|
"use strict";
|
|
101065
101065
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
101066
101066
|
function _interopRequireDefault(obj) {
|
|
@@ -102774,7 +102774,6 @@ var require_dist6 = __commonJS({
|
|
|
102774
102774
|
tsconfigResolvePaths: options.tsconfigResolvePaths
|
|
102775
102775
|
}),
|
|
102776
102776
|
options.tsconfigDecoratorMetadata && swcPlugin({ logger: logger3 }),
|
|
102777
|
-
nativeNodeModulesPlugin(),
|
|
102778
102777
|
postcssPlugin({
|
|
102779
102778
|
css,
|
|
102780
102779
|
inject: options.injectStyle,
|
|
@@ -102783,6 +102782,9 @@ var require_dist6 = __commonJS({
|
|
|
102783
102782
|
sveltePlugin({ css }),
|
|
102784
102783
|
...options.esbuildPlugins || []
|
|
102785
102784
|
];
|
|
102785
|
+
if (options.skipNativeModulesPlugin !== true) {
|
|
102786
|
+
esbuildPlugins.push(nativeNodeModulesPlugin());
|
|
102787
|
+
}
|
|
102786
102788
|
const banner = typeof options.banner === "function" ? options.banner({ format: format2 }) : options.banner;
|
|
102787
102789
|
const footer = typeof options.footer === "function" ? options.footer({ format: format2 }) : options.footer;
|
|
102788
102790
|
try {
|
|
@@ -103939,216 +103941,23 @@ module.exports = __toCommonJS(executor_exports);
|
|
|
103939
103941
|
|
|
103940
103942
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
103941
103943
|
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
103942
|
-
|
|
103943
|
-
// packages/config-tools/src/utilities/logger.ts
|
|
103944
|
-
var chalk = __toESM(require_source(), 1);
|
|
103945
|
-
|
|
103946
|
-
// packages/config-tools/src/types.ts
|
|
103947
|
-
var LogLevel = {
|
|
103948
|
-
SILENT: 0,
|
|
103949
|
-
FATAL: 10,
|
|
103950
|
-
ERROR: 20,
|
|
103951
|
-
WARN: 30,
|
|
103952
|
-
INFO: 40,
|
|
103953
|
-
SUCCESS: 45,
|
|
103954
|
-
DEBUG: 60,
|
|
103955
|
-
TRACE: 70,
|
|
103956
|
-
ALL: 100
|
|
103957
|
-
};
|
|
103958
|
-
var LogLevelLabel = {
|
|
103959
|
-
SILENT: "silent",
|
|
103960
|
-
FATAL: "fatal",
|
|
103961
|
-
ERROR: "error",
|
|
103962
|
-
WARN: "warn",
|
|
103963
|
-
INFO: "info",
|
|
103964
|
-
DEBUG: "debug",
|
|
103965
|
-
TRACE: "trace",
|
|
103966
|
-
ALL: "all"
|
|
103967
|
-
};
|
|
103968
|
-
|
|
103969
|
-
// packages/config-tools/src/utilities/get-log-level.ts
|
|
103970
|
-
var getLogLevel = (label) => {
|
|
103971
|
-
switch (label) {
|
|
103972
|
-
case "all":
|
|
103973
|
-
return LogLevel.ALL;
|
|
103974
|
-
case "trace":
|
|
103975
|
-
return LogLevel.TRACE;
|
|
103976
|
-
case "debug":
|
|
103977
|
-
return LogLevel.DEBUG;
|
|
103978
|
-
case "info":
|
|
103979
|
-
return LogLevel.INFO;
|
|
103980
|
-
case "warn":
|
|
103981
|
-
return LogLevel.WARN;
|
|
103982
|
-
case "error":
|
|
103983
|
-
return LogLevel.ERROR;
|
|
103984
|
-
case "fatal":
|
|
103985
|
-
return LogLevel.FATAL;
|
|
103986
|
-
case "silent":
|
|
103987
|
-
return LogLevel.SILENT;
|
|
103988
|
-
default:
|
|
103989
|
-
return LogLevel.INFO;
|
|
103990
|
-
}
|
|
103991
|
-
};
|
|
103992
|
-
var getLogLevelLabel = (logLevel) => {
|
|
103993
|
-
if (logLevel >= LogLevel.ALL) {
|
|
103994
|
-
return LogLevelLabel.ALL;
|
|
103995
|
-
}
|
|
103996
|
-
if (logLevel >= LogLevel.TRACE) {
|
|
103997
|
-
return LogLevelLabel.TRACE;
|
|
103998
|
-
}
|
|
103999
|
-
if (logLevel >= LogLevel.DEBUG) {
|
|
104000
|
-
return LogLevelLabel.DEBUG;
|
|
104001
|
-
}
|
|
104002
|
-
if (logLevel >= LogLevel.INFO) {
|
|
104003
|
-
return LogLevelLabel.INFO;
|
|
104004
|
-
}
|
|
104005
|
-
if (logLevel >= LogLevel.WARN) {
|
|
104006
|
-
return LogLevelLabel.WARN;
|
|
104007
|
-
}
|
|
104008
|
-
if (logLevel >= LogLevel.ERROR) {
|
|
104009
|
-
return LogLevelLabel.ERROR;
|
|
104010
|
-
}
|
|
104011
|
-
if (logLevel >= LogLevel.FATAL) {
|
|
104012
|
-
return LogLevelLabel.FATAL;
|
|
104013
|
-
}
|
|
104014
|
-
if (logLevel <= LogLevel.SILENT) {
|
|
104015
|
-
return LogLevelLabel.SILENT;
|
|
104016
|
-
}
|
|
104017
|
-
return LogLevelLabel.INFO;
|
|
104018
|
-
};
|
|
104019
|
-
|
|
104020
|
-
// packages/config-tools/src/utilities/logger.ts
|
|
104021
|
-
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
104022
|
-
if (typeof logLevel === "number" && (logLevel >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL)) {
|
|
104023
|
-
return (_) => {
|
|
104024
|
-
};
|
|
104025
|
-
}
|
|
104026
|
-
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
104027
|
-
return (message) => {
|
|
104028
|
-
console.error(
|
|
104029
|
-
`
|
|
104030
|
-
${chalk.bold.hex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").white(" \u{1F480} Fatal ")} ${chalk.hex(
|
|
104031
|
-
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
104032
|
-
)(message)}
|
|
104033
|
-
|
|
104034
|
-
`
|
|
104035
|
-
);
|
|
104036
|
-
};
|
|
104037
|
-
}
|
|
104038
|
-
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
104039
|
-
return (message) => {
|
|
104040
|
-
console.error(
|
|
104041
|
-
`
|
|
104042
|
-
${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u2718 Error ")} ${chalk.hex(
|
|
104043
|
-
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
104044
|
-
)(message)}
|
|
104045
|
-
`
|
|
104046
|
-
);
|
|
104047
|
-
};
|
|
104048
|
-
}
|
|
104049
|
-
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
104050
|
-
return (message) => {
|
|
104051
|
-
console.warn(
|
|
104052
|
-
`
|
|
104053
|
-
${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(">")} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" ! Warn ")} ${chalk.hex(
|
|
104054
|
-
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
104055
|
-
)(message)}
|
|
104056
|
-
`
|
|
104057
|
-
);
|
|
104058
|
-
};
|
|
104059
|
-
}
|
|
104060
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
104061
|
-
return (message) => {
|
|
104062
|
-
console.info(
|
|
104063
|
-
`
|
|
104064
|
-
${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u2139 Info ")} ${chalk.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(
|
|
104065
|
-
message
|
|
104066
|
-
)}
|
|
104067
|
-
`
|
|
104068
|
-
);
|
|
104069
|
-
};
|
|
104070
|
-
}
|
|
104071
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
104072
|
-
return (message) => {
|
|
104073
|
-
console.info(
|
|
104074
|
-
`
|
|
104075
|
-
${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(">")} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u221A Success ")} ${chalk.hex(
|
|
104076
|
-
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
104077
|
-
)(message)}
|
|
104078
|
-
`
|
|
104079
|
-
);
|
|
104080
|
-
};
|
|
104081
|
-
}
|
|
104082
|
-
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
104083
|
-
return (message) => {
|
|
104084
|
-
console.debug(
|
|
104085
|
-
`
|
|
104086
|
-
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F9EA} Debug ")} ${chalk.hex(
|
|
104087
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
104088
|
-
)(message)}
|
|
104089
|
-
`
|
|
104090
|
-
);
|
|
104091
|
-
};
|
|
104092
|
-
}
|
|
104093
|
-
return (message) => {
|
|
104094
|
-
console.log(
|
|
104095
|
-
`
|
|
104096
|
-
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F4E2} System ")} ${chalk.hex(
|
|
104097
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
104098
|
-
)(message)}
|
|
104099
|
-
`
|
|
104100
|
-
);
|
|
104101
|
-
};
|
|
104102
|
-
};
|
|
104103
|
-
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
104104
|
-
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
104105
|
-
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
104106
|
-
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
104107
|
-
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
104108
|
-
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
104109
|
-
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
104110
|
-
var getStopwatch = (name) => {
|
|
104111
|
-
const start = process.hrtime();
|
|
104112
|
-
return () => {
|
|
104113
|
-
const end = process.hrtime(start);
|
|
104114
|
-
console.info(
|
|
104115
|
-
chalk.dim(
|
|
104116
|
-
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
104117
|
-
end[0] * 1e3 + end[1] / 1e6
|
|
104118
|
-
)}ms to complete`
|
|
104119
|
-
)
|
|
104120
|
-
);
|
|
104121
|
-
};
|
|
104122
|
-
};
|
|
104123
|
-
|
|
104124
|
-
// packages/config-tools/src/config-file/get-config-file.ts
|
|
104125
103944
|
var _static_cache = void 0;
|
|
104126
|
-
var
|
|
103945
|
+
var getConfigFileByName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
|
|
104127
103946
|
var getConfigFile = async (filePath) => {
|
|
104128
103947
|
if (_static_cache) {
|
|
104129
103948
|
return _static_cache;
|
|
104130
103949
|
}
|
|
104131
|
-
let cosmiconfigResult = await
|
|
103950
|
+
let cosmiconfigResult = await getConfigFileByName("storm", filePath);
|
|
104132
103951
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104133
|
-
cosmiconfigResult = await
|
|
103952
|
+
cosmiconfigResult = await getConfigFileByName("storm-software", filePath);
|
|
104134
103953
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104135
|
-
cosmiconfigResult = await
|
|
103954
|
+
cosmiconfigResult = await getConfigFileByName("storm-stack", filePath);
|
|
104136
103955
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104137
|
-
cosmiconfigResult = await
|
|
104138
|
-
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104139
|
-
cosmiconfigResult = await getConfigFileName("acidic", filePath);
|
|
104140
|
-
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104141
|
-
cosmiconfigResult = await getConfigFileName("acid", filePath);
|
|
104142
|
-
}
|
|
104143
|
-
}
|
|
103956
|
+
cosmiconfigResult = await getConfigFileByName("storm-cloud", filePath);
|
|
104144
103957
|
}
|
|
104145
103958
|
}
|
|
104146
103959
|
}
|
|
104147
103960
|
if (!cosmiconfigResult || Object.keys(cosmiconfigResult).length === 0 || cosmiconfigResult.isEmpty || !cosmiconfigResult.filepath) {
|
|
104148
|
-
writeWarning(
|
|
104149
|
-
{ logLevel: "all" },
|
|
104150
|
-
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not.\n"
|
|
104151
|
-
);
|
|
104152
103961
|
return void 0;
|
|
104153
103962
|
}
|
|
104154
103963
|
const config = cosmiconfigResult.config ?? {};
|
|
@@ -107939,6 +107748,185 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
107939
107748
|
});
|
|
107940
107749
|
};
|
|
107941
107750
|
|
|
107751
|
+
// packages/config-tools/src/types.ts
|
|
107752
|
+
var LogLevel = {
|
|
107753
|
+
SILENT: 0,
|
|
107754
|
+
FATAL: 10,
|
|
107755
|
+
ERROR: 20,
|
|
107756
|
+
WARN: 30,
|
|
107757
|
+
INFO: 40,
|
|
107758
|
+
SUCCESS: 45,
|
|
107759
|
+
DEBUG: 60,
|
|
107760
|
+
TRACE: 70,
|
|
107761
|
+
ALL: 100
|
|
107762
|
+
};
|
|
107763
|
+
var LogLevelLabel = {
|
|
107764
|
+
SILENT: "silent",
|
|
107765
|
+
FATAL: "fatal",
|
|
107766
|
+
ERROR: "error",
|
|
107767
|
+
WARN: "warn",
|
|
107768
|
+
INFO: "info",
|
|
107769
|
+
DEBUG: "debug",
|
|
107770
|
+
TRACE: "trace",
|
|
107771
|
+
ALL: "all"
|
|
107772
|
+
};
|
|
107773
|
+
|
|
107774
|
+
// packages/config-tools/src/utilities/get-log-level.ts
|
|
107775
|
+
var getLogLevel = (label) => {
|
|
107776
|
+
switch (label) {
|
|
107777
|
+
case "all":
|
|
107778
|
+
return LogLevel.ALL;
|
|
107779
|
+
case "trace":
|
|
107780
|
+
return LogLevel.TRACE;
|
|
107781
|
+
case "debug":
|
|
107782
|
+
return LogLevel.DEBUG;
|
|
107783
|
+
case "info":
|
|
107784
|
+
return LogLevel.INFO;
|
|
107785
|
+
case "warn":
|
|
107786
|
+
return LogLevel.WARN;
|
|
107787
|
+
case "error":
|
|
107788
|
+
return LogLevel.ERROR;
|
|
107789
|
+
case "fatal":
|
|
107790
|
+
return LogLevel.FATAL;
|
|
107791
|
+
case "silent":
|
|
107792
|
+
return LogLevel.SILENT;
|
|
107793
|
+
default:
|
|
107794
|
+
return LogLevel.INFO;
|
|
107795
|
+
}
|
|
107796
|
+
};
|
|
107797
|
+
var getLogLevelLabel = (logLevel) => {
|
|
107798
|
+
if (logLevel >= LogLevel.ALL) {
|
|
107799
|
+
return LogLevelLabel.ALL;
|
|
107800
|
+
}
|
|
107801
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
107802
|
+
return LogLevelLabel.TRACE;
|
|
107803
|
+
}
|
|
107804
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
107805
|
+
return LogLevelLabel.DEBUG;
|
|
107806
|
+
}
|
|
107807
|
+
if (logLevel >= LogLevel.INFO) {
|
|
107808
|
+
return LogLevelLabel.INFO;
|
|
107809
|
+
}
|
|
107810
|
+
if (logLevel >= LogLevel.WARN) {
|
|
107811
|
+
return LogLevelLabel.WARN;
|
|
107812
|
+
}
|
|
107813
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
107814
|
+
return LogLevelLabel.ERROR;
|
|
107815
|
+
}
|
|
107816
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
107817
|
+
return LogLevelLabel.FATAL;
|
|
107818
|
+
}
|
|
107819
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
107820
|
+
return LogLevelLabel.SILENT;
|
|
107821
|
+
}
|
|
107822
|
+
return LogLevelLabel.INFO;
|
|
107823
|
+
};
|
|
107824
|
+
|
|
107825
|
+
// packages/config-tools/src/utilities/logger.ts
|
|
107826
|
+
var chalk = __toESM(require_source(), 1);
|
|
107827
|
+
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
107828
|
+
if (typeof logLevel === "number" && (logLevel >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL)) {
|
|
107829
|
+
return (_) => {
|
|
107830
|
+
};
|
|
107831
|
+
}
|
|
107832
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
107833
|
+
return (message) => {
|
|
107834
|
+
console.error(
|
|
107835
|
+
`
|
|
107836
|
+
${chalk.bold.hex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").white(" \u{1F480} Fatal ")} ${chalk.hex(
|
|
107837
|
+
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
107838
|
+
)(message)}
|
|
107839
|
+
|
|
107840
|
+
`
|
|
107841
|
+
);
|
|
107842
|
+
};
|
|
107843
|
+
}
|
|
107844
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
107845
|
+
return (message) => {
|
|
107846
|
+
console.error(
|
|
107847
|
+
`
|
|
107848
|
+
${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u2718 Error ")} ${chalk.hex(
|
|
107849
|
+
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
107850
|
+
)(message)}
|
|
107851
|
+
`
|
|
107852
|
+
);
|
|
107853
|
+
};
|
|
107854
|
+
}
|
|
107855
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
107856
|
+
return (message) => {
|
|
107857
|
+
console.warn(
|
|
107858
|
+
`
|
|
107859
|
+
${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(">")} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" \u26A0 Warn ")} ${chalk.hex(
|
|
107860
|
+
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
107861
|
+
)(message)}
|
|
107862
|
+
`
|
|
107863
|
+
);
|
|
107864
|
+
};
|
|
107865
|
+
}
|
|
107866
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
107867
|
+
return (message) => {
|
|
107868
|
+
console.info(
|
|
107869
|
+
`
|
|
107870
|
+
${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u2139 Info ")} ${chalk.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(
|
|
107871
|
+
message
|
|
107872
|
+
)}
|
|
107873
|
+
`
|
|
107874
|
+
);
|
|
107875
|
+
};
|
|
107876
|
+
}
|
|
107877
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
107878
|
+
return (message) => {
|
|
107879
|
+
console.info(
|
|
107880
|
+
`
|
|
107881
|
+
${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(">")} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u221A Success ")} ${chalk.hex(
|
|
107882
|
+
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
107883
|
+
)(message)}
|
|
107884
|
+
`
|
|
107885
|
+
);
|
|
107886
|
+
};
|
|
107887
|
+
}
|
|
107888
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
107889
|
+
return (message) => {
|
|
107890
|
+
console.debug(
|
|
107891
|
+
`
|
|
107892
|
+
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" ! Debug ")} ${chalk.hex(
|
|
107893
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
107894
|
+
)(message)}
|
|
107895
|
+
`
|
|
107896
|
+
);
|
|
107897
|
+
};
|
|
107898
|
+
}
|
|
107899
|
+
return (message) => {
|
|
107900
|
+
console.log(
|
|
107901
|
+
`
|
|
107902
|
+
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" ! System ")} ${chalk.hex(
|
|
107903
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
107904
|
+
)(message)}
|
|
107905
|
+
`
|
|
107906
|
+
);
|
|
107907
|
+
};
|
|
107908
|
+
};
|
|
107909
|
+
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
107910
|
+
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
107911
|
+
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
107912
|
+
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
107913
|
+
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
107914
|
+
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
107915
|
+
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
107916
|
+
var getStopwatch = (name) => {
|
|
107917
|
+
const start = process.hrtime();
|
|
107918
|
+
return () => {
|
|
107919
|
+
const end = process.hrtime(start);
|
|
107920
|
+
console.info(
|
|
107921
|
+
chalk.dim(
|
|
107922
|
+
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
107923
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
107924
|
+
)}ms to complete`
|
|
107925
|
+
)
|
|
107926
|
+
);
|
|
107927
|
+
};
|
|
107928
|
+
};
|
|
107929
|
+
|
|
107942
107930
|
// node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
|
|
107943
107931
|
var import_node_buffer2 = require("node:buffer");
|
|
107944
107932
|
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
@@ -109707,10 +109695,17 @@ var loadStormConfig = async (workspaceRoot) => {
|
|
|
109707
109695
|
if (!_workspaceRoot) {
|
|
109708
109696
|
_workspaceRoot = findWorkspaceRoot();
|
|
109709
109697
|
}
|
|
109698
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
109699
|
+
if (!configFile) {
|
|
109700
|
+
writeWarning(
|
|
109701
|
+
{ logLevel: "all" },
|
|
109702
|
+
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not.\n"
|
|
109703
|
+
);
|
|
109704
|
+
}
|
|
109710
109705
|
config = StormConfigSchema.parse(
|
|
109711
109706
|
await getDefaultConfig(
|
|
109712
109707
|
{
|
|
109713
|
-
...
|
|
109708
|
+
...configFile,
|
|
109714
109709
|
...getConfigEnv()
|
|
109715
109710
|
},
|
|
109716
109711
|
_workspaceRoot
|
|
@@ -116176,7 +116171,8 @@ function defaultConfig({
|
|
|
116176
116171
|
apiReport = true,
|
|
116177
116172
|
docModel = true,
|
|
116178
116173
|
tsdocMetadata = true,
|
|
116179
|
-
metafile =
|
|
116174
|
+
metafile = true,
|
|
116175
|
+
skipNativeModulesPlugin = false,
|
|
116180
116176
|
define: define2,
|
|
116181
116177
|
env,
|
|
116182
116178
|
plugins,
|
|
@@ -116224,6 +116220,7 @@ function defaultConfig({
|
|
|
116224
116220
|
tsdocMetadata,
|
|
116225
116221
|
sourcemap: debug,
|
|
116226
116222
|
clean: false,
|
|
116223
|
+
skipNativeModulesPlugin,
|
|
116227
116224
|
tsconfigDecoratorMetadata: true,
|
|
116228
116225
|
plugins,
|
|
116229
116226
|
getTransform,
|
|
@@ -116744,7 +116741,8 @@ var applyDefaultOptions = (options) => {
|
|
|
116744
116741
|
options.docModel ??= true;
|
|
116745
116742
|
options.tsdocMetadata ??= true;
|
|
116746
116743
|
options.emitOnAll ??= false;
|
|
116747
|
-
options.metafile ??=
|
|
116744
|
+
options.metafile ??= true;
|
|
116745
|
+
options.skipNativeModulesPlugin ??= false;
|
|
116748
116746
|
options.define ??= {};
|
|
116749
116747
|
options.env ??= {};
|
|
116750
116748
|
options.getConfig ??= { dist: defaultConfig };
|
|
@@ -116787,7 +116785,8 @@ var modernBrowserConfig = ({
|
|
|
116787
116785
|
banner = {},
|
|
116788
116786
|
platform = "browser",
|
|
116789
116787
|
verbose = false,
|
|
116790
|
-
metafile =
|
|
116788
|
+
metafile = true,
|
|
116789
|
+
skipNativeModulesPlugin = false,
|
|
116791
116790
|
define: define2,
|
|
116792
116791
|
env,
|
|
116793
116792
|
plugins,
|
|
@@ -116836,6 +116835,7 @@ var modernBrowserConfig = ({
|
|
|
116836
116835
|
tsdocMetadata: false,
|
|
116837
116836
|
sourcemap: debug,
|
|
116838
116837
|
clean: false,
|
|
116838
|
+
skipNativeModulesPlugin,
|
|
116839
116839
|
tsconfigDecoratorMetadata: true,
|
|
116840
116840
|
plugins,
|
|
116841
116841
|
outExtension,
|
|
@@ -116869,7 +116869,8 @@ var legacyBrowserConfig = ({
|
|
|
116869
116869
|
apiReport = true,
|
|
116870
116870
|
docModel = true,
|
|
116871
116871
|
tsdocMetadata = true,
|
|
116872
|
-
metafile =
|
|
116872
|
+
metafile = true,
|
|
116873
|
+
skipNativeModulesPlugin = false,
|
|
116873
116874
|
define: define2,
|
|
116874
116875
|
env,
|
|
116875
116876
|
plugins,
|
|
@@ -116918,6 +116919,7 @@ var legacyBrowserConfig = ({
|
|
|
116918
116919
|
tsdocMetadata,
|
|
116919
116920
|
sourcemap: debug,
|
|
116920
116921
|
clean: false,
|
|
116922
|
+
skipNativeModulesPlugin,
|
|
116921
116923
|
tsconfigDecoratorMetadata: true,
|
|
116922
116924
|
plugins,
|
|
116923
116925
|
outExtension,
|