@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 {
|
|
@@ -103948,216 +103950,23 @@ var import_tsc = __toESM(require_tsc_impl());
|
|
|
103948
103950
|
|
|
103949
103951
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
103950
103952
|
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
103951
|
-
|
|
103952
|
-
// packages/config-tools/src/utilities/logger.ts
|
|
103953
|
-
var chalk = __toESM(require_source(), 1);
|
|
103954
|
-
|
|
103955
|
-
// packages/config-tools/src/types.ts
|
|
103956
|
-
var LogLevel = {
|
|
103957
|
-
SILENT: 0,
|
|
103958
|
-
FATAL: 10,
|
|
103959
|
-
ERROR: 20,
|
|
103960
|
-
WARN: 30,
|
|
103961
|
-
INFO: 40,
|
|
103962
|
-
SUCCESS: 45,
|
|
103963
|
-
DEBUG: 60,
|
|
103964
|
-
TRACE: 70,
|
|
103965
|
-
ALL: 100
|
|
103966
|
-
};
|
|
103967
|
-
var LogLevelLabel = {
|
|
103968
|
-
SILENT: "silent",
|
|
103969
|
-
FATAL: "fatal",
|
|
103970
|
-
ERROR: "error",
|
|
103971
|
-
WARN: "warn",
|
|
103972
|
-
INFO: "info",
|
|
103973
|
-
DEBUG: "debug",
|
|
103974
|
-
TRACE: "trace",
|
|
103975
|
-
ALL: "all"
|
|
103976
|
-
};
|
|
103977
|
-
|
|
103978
|
-
// packages/config-tools/src/utilities/get-log-level.ts
|
|
103979
|
-
var getLogLevel = (label) => {
|
|
103980
|
-
switch (label) {
|
|
103981
|
-
case "all":
|
|
103982
|
-
return LogLevel.ALL;
|
|
103983
|
-
case "trace":
|
|
103984
|
-
return LogLevel.TRACE;
|
|
103985
|
-
case "debug":
|
|
103986
|
-
return LogLevel.DEBUG;
|
|
103987
|
-
case "info":
|
|
103988
|
-
return LogLevel.INFO;
|
|
103989
|
-
case "warn":
|
|
103990
|
-
return LogLevel.WARN;
|
|
103991
|
-
case "error":
|
|
103992
|
-
return LogLevel.ERROR;
|
|
103993
|
-
case "fatal":
|
|
103994
|
-
return LogLevel.FATAL;
|
|
103995
|
-
case "silent":
|
|
103996
|
-
return LogLevel.SILENT;
|
|
103997
|
-
default:
|
|
103998
|
-
return LogLevel.INFO;
|
|
103999
|
-
}
|
|
104000
|
-
};
|
|
104001
|
-
var getLogLevelLabel = (logLevel) => {
|
|
104002
|
-
if (logLevel >= LogLevel.ALL) {
|
|
104003
|
-
return LogLevelLabel.ALL;
|
|
104004
|
-
}
|
|
104005
|
-
if (logLevel >= LogLevel.TRACE) {
|
|
104006
|
-
return LogLevelLabel.TRACE;
|
|
104007
|
-
}
|
|
104008
|
-
if (logLevel >= LogLevel.DEBUG) {
|
|
104009
|
-
return LogLevelLabel.DEBUG;
|
|
104010
|
-
}
|
|
104011
|
-
if (logLevel >= LogLevel.INFO) {
|
|
104012
|
-
return LogLevelLabel.INFO;
|
|
104013
|
-
}
|
|
104014
|
-
if (logLevel >= LogLevel.WARN) {
|
|
104015
|
-
return LogLevelLabel.WARN;
|
|
104016
|
-
}
|
|
104017
|
-
if (logLevel >= LogLevel.ERROR) {
|
|
104018
|
-
return LogLevelLabel.ERROR;
|
|
104019
|
-
}
|
|
104020
|
-
if (logLevel >= LogLevel.FATAL) {
|
|
104021
|
-
return LogLevelLabel.FATAL;
|
|
104022
|
-
}
|
|
104023
|
-
if (logLevel <= LogLevel.SILENT) {
|
|
104024
|
-
return LogLevelLabel.SILENT;
|
|
104025
|
-
}
|
|
104026
|
-
return LogLevelLabel.INFO;
|
|
104027
|
-
};
|
|
104028
|
-
|
|
104029
|
-
// packages/config-tools/src/utilities/logger.ts
|
|
104030
|
-
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
104031
|
-
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)) {
|
|
104032
|
-
return (_) => {
|
|
104033
|
-
};
|
|
104034
|
-
}
|
|
104035
|
-
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
104036
|
-
return (message) => {
|
|
104037
|
-
console.error(
|
|
104038
|
-
`
|
|
104039
|
-
${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(
|
|
104040
|
-
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
104041
|
-
)(message)}
|
|
104042
|
-
|
|
104043
|
-
`
|
|
104044
|
-
);
|
|
104045
|
-
};
|
|
104046
|
-
}
|
|
104047
|
-
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
104048
|
-
return (message) => {
|
|
104049
|
-
console.error(
|
|
104050
|
-
`
|
|
104051
|
-
${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(
|
|
104052
|
-
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
104053
|
-
)(message)}
|
|
104054
|
-
`
|
|
104055
|
-
);
|
|
104056
|
-
};
|
|
104057
|
-
}
|
|
104058
|
-
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
104059
|
-
return (message) => {
|
|
104060
|
-
console.warn(
|
|
104061
|
-
`
|
|
104062
|
-
${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(">")} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" ! Warn ")} ${chalk.hex(
|
|
104063
|
-
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
104064
|
-
)(message)}
|
|
104065
|
-
`
|
|
104066
|
-
);
|
|
104067
|
-
};
|
|
104068
|
-
}
|
|
104069
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
104070
|
-
return (message) => {
|
|
104071
|
-
console.info(
|
|
104072
|
-
`
|
|
104073
|
-
${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")(
|
|
104074
|
-
message
|
|
104075
|
-
)}
|
|
104076
|
-
`
|
|
104077
|
-
);
|
|
104078
|
-
};
|
|
104079
|
-
}
|
|
104080
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
104081
|
-
return (message) => {
|
|
104082
|
-
console.info(
|
|
104083
|
-
`
|
|
104084
|
-
${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(
|
|
104085
|
-
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
104086
|
-
)(message)}
|
|
104087
|
-
`
|
|
104088
|
-
);
|
|
104089
|
-
};
|
|
104090
|
-
}
|
|
104091
|
-
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
104092
|
-
return (message) => {
|
|
104093
|
-
console.debug(
|
|
104094
|
-
`
|
|
104095
|
-
${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(
|
|
104096
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
104097
|
-
)(message)}
|
|
104098
|
-
`
|
|
104099
|
-
);
|
|
104100
|
-
};
|
|
104101
|
-
}
|
|
104102
|
-
return (message) => {
|
|
104103
|
-
console.log(
|
|
104104
|
-
`
|
|
104105
|
-
${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(
|
|
104106
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
104107
|
-
)(message)}
|
|
104108
|
-
`
|
|
104109
|
-
);
|
|
104110
|
-
};
|
|
104111
|
-
};
|
|
104112
|
-
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
104113
|
-
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
104114
|
-
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
104115
|
-
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
104116
|
-
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
104117
|
-
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
104118
|
-
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
104119
|
-
var getStopwatch = (name) => {
|
|
104120
|
-
const start = process.hrtime();
|
|
104121
|
-
return () => {
|
|
104122
|
-
const end = process.hrtime(start);
|
|
104123
|
-
console.info(
|
|
104124
|
-
chalk.dim(
|
|
104125
|
-
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
104126
|
-
end[0] * 1e3 + end[1] / 1e6
|
|
104127
|
-
)}ms to complete`
|
|
104128
|
-
)
|
|
104129
|
-
);
|
|
104130
|
-
};
|
|
104131
|
-
};
|
|
104132
|
-
|
|
104133
|
-
// packages/config-tools/src/config-file/get-config-file.ts
|
|
104134
103953
|
var _static_cache = void 0;
|
|
104135
|
-
var
|
|
103954
|
+
var getConfigFileByName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
|
|
104136
103955
|
var getConfigFile = async (filePath) => {
|
|
104137
103956
|
if (_static_cache) {
|
|
104138
103957
|
return _static_cache;
|
|
104139
103958
|
}
|
|
104140
|
-
let cosmiconfigResult = await
|
|
103959
|
+
let cosmiconfigResult = await getConfigFileByName("storm", filePath);
|
|
104141
103960
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104142
|
-
cosmiconfigResult = await
|
|
103961
|
+
cosmiconfigResult = await getConfigFileByName("storm-software", filePath);
|
|
104143
103962
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104144
|
-
cosmiconfigResult = await
|
|
103963
|
+
cosmiconfigResult = await getConfigFileByName("storm-stack", filePath);
|
|
104145
103964
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104146
|
-
cosmiconfigResult = await
|
|
104147
|
-
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104148
|
-
cosmiconfigResult = await getConfigFileName("acidic", filePath);
|
|
104149
|
-
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
104150
|
-
cosmiconfigResult = await getConfigFileName("acid", filePath);
|
|
104151
|
-
}
|
|
104152
|
-
}
|
|
103965
|
+
cosmiconfigResult = await getConfigFileByName("storm-cloud", filePath);
|
|
104153
103966
|
}
|
|
104154
103967
|
}
|
|
104155
103968
|
}
|
|
104156
103969
|
if (!cosmiconfigResult || Object.keys(cosmiconfigResult).length === 0 || cosmiconfigResult.isEmpty || !cosmiconfigResult.filepath) {
|
|
104157
|
-
writeWarning(
|
|
104158
|
-
{ logLevel: "all" },
|
|
104159
|
-
"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"
|
|
104160
|
-
);
|
|
104161
103970
|
return void 0;
|
|
104162
103971
|
}
|
|
104163
103972
|
const config = cosmiconfigResult.config ?? {};
|
|
@@ -107948,6 +107757,185 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
107948
107757
|
});
|
|
107949
107758
|
};
|
|
107950
107759
|
|
|
107760
|
+
// packages/config-tools/src/types.ts
|
|
107761
|
+
var LogLevel = {
|
|
107762
|
+
SILENT: 0,
|
|
107763
|
+
FATAL: 10,
|
|
107764
|
+
ERROR: 20,
|
|
107765
|
+
WARN: 30,
|
|
107766
|
+
INFO: 40,
|
|
107767
|
+
SUCCESS: 45,
|
|
107768
|
+
DEBUG: 60,
|
|
107769
|
+
TRACE: 70,
|
|
107770
|
+
ALL: 100
|
|
107771
|
+
};
|
|
107772
|
+
var LogLevelLabel = {
|
|
107773
|
+
SILENT: "silent",
|
|
107774
|
+
FATAL: "fatal",
|
|
107775
|
+
ERROR: "error",
|
|
107776
|
+
WARN: "warn",
|
|
107777
|
+
INFO: "info",
|
|
107778
|
+
DEBUG: "debug",
|
|
107779
|
+
TRACE: "trace",
|
|
107780
|
+
ALL: "all"
|
|
107781
|
+
};
|
|
107782
|
+
|
|
107783
|
+
// packages/config-tools/src/utilities/get-log-level.ts
|
|
107784
|
+
var getLogLevel = (label) => {
|
|
107785
|
+
switch (label) {
|
|
107786
|
+
case "all":
|
|
107787
|
+
return LogLevel.ALL;
|
|
107788
|
+
case "trace":
|
|
107789
|
+
return LogLevel.TRACE;
|
|
107790
|
+
case "debug":
|
|
107791
|
+
return LogLevel.DEBUG;
|
|
107792
|
+
case "info":
|
|
107793
|
+
return LogLevel.INFO;
|
|
107794
|
+
case "warn":
|
|
107795
|
+
return LogLevel.WARN;
|
|
107796
|
+
case "error":
|
|
107797
|
+
return LogLevel.ERROR;
|
|
107798
|
+
case "fatal":
|
|
107799
|
+
return LogLevel.FATAL;
|
|
107800
|
+
case "silent":
|
|
107801
|
+
return LogLevel.SILENT;
|
|
107802
|
+
default:
|
|
107803
|
+
return LogLevel.INFO;
|
|
107804
|
+
}
|
|
107805
|
+
};
|
|
107806
|
+
var getLogLevelLabel = (logLevel) => {
|
|
107807
|
+
if (logLevel >= LogLevel.ALL) {
|
|
107808
|
+
return LogLevelLabel.ALL;
|
|
107809
|
+
}
|
|
107810
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
107811
|
+
return LogLevelLabel.TRACE;
|
|
107812
|
+
}
|
|
107813
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
107814
|
+
return LogLevelLabel.DEBUG;
|
|
107815
|
+
}
|
|
107816
|
+
if (logLevel >= LogLevel.INFO) {
|
|
107817
|
+
return LogLevelLabel.INFO;
|
|
107818
|
+
}
|
|
107819
|
+
if (logLevel >= LogLevel.WARN) {
|
|
107820
|
+
return LogLevelLabel.WARN;
|
|
107821
|
+
}
|
|
107822
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
107823
|
+
return LogLevelLabel.ERROR;
|
|
107824
|
+
}
|
|
107825
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
107826
|
+
return LogLevelLabel.FATAL;
|
|
107827
|
+
}
|
|
107828
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
107829
|
+
return LogLevelLabel.SILENT;
|
|
107830
|
+
}
|
|
107831
|
+
return LogLevelLabel.INFO;
|
|
107832
|
+
};
|
|
107833
|
+
|
|
107834
|
+
// packages/config-tools/src/utilities/logger.ts
|
|
107835
|
+
var chalk = __toESM(require_source(), 1);
|
|
107836
|
+
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
107837
|
+
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)) {
|
|
107838
|
+
return (_) => {
|
|
107839
|
+
};
|
|
107840
|
+
}
|
|
107841
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
107842
|
+
return (message) => {
|
|
107843
|
+
console.error(
|
|
107844
|
+
`
|
|
107845
|
+
${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(
|
|
107846
|
+
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
107847
|
+
)(message)}
|
|
107848
|
+
|
|
107849
|
+
`
|
|
107850
|
+
);
|
|
107851
|
+
};
|
|
107852
|
+
}
|
|
107853
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
107854
|
+
return (message) => {
|
|
107855
|
+
console.error(
|
|
107856
|
+
`
|
|
107857
|
+
${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(
|
|
107858
|
+
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
107859
|
+
)(message)}
|
|
107860
|
+
`
|
|
107861
|
+
);
|
|
107862
|
+
};
|
|
107863
|
+
}
|
|
107864
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
107865
|
+
return (message) => {
|
|
107866
|
+
console.warn(
|
|
107867
|
+
`
|
|
107868
|
+
${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(
|
|
107869
|
+
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
107870
|
+
)(message)}
|
|
107871
|
+
`
|
|
107872
|
+
);
|
|
107873
|
+
};
|
|
107874
|
+
}
|
|
107875
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
107876
|
+
return (message) => {
|
|
107877
|
+
console.info(
|
|
107878
|
+
`
|
|
107879
|
+
${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")(
|
|
107880
|
+
message
|
|
107881
|
+
)}
|
|
107882
|
+
`
|
|
107883
|
+
);
|
|
107884
|
+
};
|
|
107885
|
+
}
|
|
107886
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
107887
|
+
return (message) => {
|
|
107888
|
+
console.info(
|
|
107889
|
+
`
|
|
107890
|
+
${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(
|
|
107891
|
+
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
107892
|
+
)(message)}
|
|
107893
|
+
`
|
|
107894
|
+
);
|
|
107895
|
+
};
|
|
107896
|
+
}
|
|
107897
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
107898
|
+
return (message) => {
|
|
107899
|
+
console.debug(
|
|
107900
|
+
`
|
|
107901
|
+
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" ! Debug ")} ${chalk.hex(
|
|
107902
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
107903
|
+
)(message)}
|
|
107904
|
+
`
|
|
107905
|
+
);
|
|
107906
|
+
};
|
|
107907
|
+
}
|
|
107908
|
+
return (message) => {
|
|
107909
|
+
console.log(
|
|
107910
|
+
`
|
|
107911
|
+
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" ! System ")} ${chalk.hex(
|
|
107912
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
107913
|
+
)(message)}
|
|
107914
|
+
`
|
|
107915
|
+
);
|
|
107916
|
+
};
|
|
107917
|
+
};
|
|
107918
|
+
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
107919
|
+
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
107920
|
+
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
107921
|
+
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
107922
|
+
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
107923
|
+
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
107924
|
+
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
107925
|
+
var getStopwatch = (name) => {
|
|
107926
|
+
const start = process.hrtime();
|
|
107927
|
+
return () => {
|
|
107928
|
+
const end = process.hrtime(start);
|
|
107929
|
+
console.info(
|
|
107930
|
+
chalk.dim(
|
|
107931
|
+
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
107932
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
107933
|
+
)}ms to complete`
|
|
107934
|
+
)
|
|
107935
|
+
);
|
|
107936
|
+
};
|
|
107937
|
+
};
|
|
107938
|
+
|
|
107951
107939
|
// node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
|
|
107952
107940
|
var import_node_buffer2 = require("node:buffer");
|
|
107953
107941
|
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
@@ -109716,10 +109704,17 @@ var loadStormConfig = async (workspaceRoot) => {
|
|
|
109716
109704
|
if (!_workspaceRoot) {
|
|
109717
109705
|
_workspaceRoot = findWorkspaceRoot();
|
|
109718
109706
|
}
|
|
109707
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
109708
|
+
if (!configFile) {
|
|
109709
|
+
writeWarning(
|
|
109710
|
+
{ logLevel: "all" },
|
|
109711
|
+
"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"
|
|
109712
|
+
);
|
|
109713
|
+
}
|
|
109719
109714
|
config = StormConfigSchema.parse(
|
|
109720
109715
|
await getDefaultConfig(
|
|
109721
109716
|
{
|
|
109722
|
-
...
|
|
109717
|
+
...configFile,
|
|
109723
109718
|
...getConfigEnv()
|
|
109724
109719
|
},
|
|
109725
109720
|
_workspaceRoot
|
|
@@ -116145,7 +116140,8 @@ function defaultConfig({
|
|
|
116145
116140
|
apiReport = true,
|
|
116146
116141
|
docModel = true,
|
|
116147
116142
|
tsdocMetadata = true,
|
|
116148
|
-
metafile =
|
|
116143
|
+
metafile = true,
|
|
116144
|
+
skipNativeModulesPlugin = false,
|
|
116149
116145
|
define: define2,
|
|
116150
116146
|
env,
|
|
116151
116147
|
plugins,
|
|
@@ -116193,6 +116189,7 @@ function defaultConfig({
|
|
|
116193
116189
|
tsdocMetadata,
|
|
116194
116190
|
sourcemap: debug,
|
|
116195
116191
|
clean: false,
|
|
116192
|
+
skipNativeModulesPlugin,
|
|
116196
116193
|
tsconfigDecoratorMetadata: true,
|
|
116197
116194
|
plugins,
|
|
116198
116195
|
getTransform,
|
|
@@ -116713,7 +116710,8 @@ var applyDefaultOptions = (options) => {
|
|
|
116713
116710
|
options.docModel ??= true;
|
|
116714
116711
|
options.tsdocMetadata ??= true;
|
|
116715
116712
|
options.emitOnAll ??= false;
|
|
116716
|
-
options.metafile ??=
|
|
116713
|
+
options.metafile ??= true;
|
|
116714
|
+
options.skipNativeModulesPlugin ??= false;
|
|
116717
116715
|
options.define ??= {};
|
|
116718
116716
|
options.env ??= {};
|
|
116719
116717
|
options.getConfig ??= { dist: defaultConfig };
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"metafile": {
|
|
75
75
|
"type": "boolean",
|
|
76
76
|
"description": "Should a meta file be created for the build package",
|
|
77
|
-
"default":
|
|
77
|
+
"default": true
|
|
78
78
|
},
|
|
79
79
|
"emitOnAll": {
|
|
80
80
|
"type": "boolean",
|
|
@@ -99,7 +99,10 @@
|
|
|
99
99
|
"format": {
|
|
100
100
|
"type": "array",
|
|
101
101
|
"description": "The output format for the generated JavaScript files. There are currently three possible values that can be configured: iife, cjs, and esm.",
|
|
102
|
-
"default": [
|
|
102
|
+
"default": [
|
|
103
|
+
"cjs",
|
|
104
|
+
"esm"
|
|
105
|
+
],
|
|
103
106
|
"items": {
|
|
104
107
|
"type": "string"
|
|
105
108
|
}
|
|
@@ -112,7 +115,12 @@
|
|
|
112
115
|
"platform": {
|
|
113
116
|
"type": "string",
|
|
114
117
|
"description": "Platform target for outputs.",
|
|
115
|
-
"enum": [
|
|
118
|
+
"enum": [
|
|
119
|
+
"browser",
|
|
120
|
+
"neutral",
|
|
121
|
+
"node",
|
|
122
|
+
"worker"
|
|
123
|
+
],
|
|
116
124
|
"default": "neutral"
|
|
117
125
|
},
|
|
118
126
|
"banner": {
|
|
@@ -130,6 +138,11 @@
|
|
|
130
138
|
"description": "Should write extra log outputs with details from the executor.",
|
|
131
139
|
"default": false
|
|
132
140
|
},
|
|
141
|
+
"skipNativeModulesPlugin": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"description": "Should we skip adding the Native Node Modules ESBuild plugin.",
|
|
144
|
+
"default": false
|
|
145
|
+
},
|
|
133
146
|
"shims": {
|
|
134
147
|
"type": "boolean",
|
|
135
148
|
"description": "Should the build process add shims for node.js modules that are not available in the browser?"
|
|
@@ -174,7 +187,11 @@
|
|
|
174
187
|
}
|
|
175
188
|
}
|
|
176
189
|
},
|
|
177
|
-
"required": [
|
|
190
|
+
"required": [
|
|
191
|
+
"tsConfig",
|
|
192
|
+
"platform",
|
|
193
|
+
"banner"
|
|
194
|
+
],
|
|
178
195
|
"definitions": {
|
|
179
196
|
"assetPattern": {
|
|
180
197
|
"oneOf": [
|
|
@@ -202,7 +219,11 @@
|
|
|
202
219
|
}
|
|
203
220
|
},
|
|
204
221
|
"additionalProperties": false,
|
|
205
|
-
"required": [
|
|
222
|
+
"required": [
|
|
223
|
+
"glob",
|
|
224
|
+
"input",
|
|
225
|
+
"output"
|
|
226
|
+
]
|
|
206
227
|
},
|
|
207
228
|
{
|
|
208
229
|
"type": "string"
|
|
@@ -210,4 +231,4 @@
|
|
|
210
231
|
]
|
|
211
232
|
}
|
|
212
233
|
}
|
|
213
|
-
}
|
|
234
|
+
}
|