@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
|
@@ -44212,216 +44212,23 @@ var import_devkit2 = __toESM(require_devkit());
|
|
|
44212
44212
|
|
|
44213
44213
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
44214
44214
|
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
44215
|
-
|
|
44216
|
-
// packages/config-tools/src/utilities/logger.ts
|
|
44217
|
-
var chalk = __toESM(require_source(), 1);
|
|
44218
|
-
|
|
44219
|
-
// packages/config-tools/src/types.ts
|
|
44220
|
-
var LogLevel = {
|
|
44221
|
-
SILENT: 0,
|
|
44222
|
-
FATAL: 10,
|
|
44223
|
-
ERROR: 20,
|
|
44224
|
-
WARN: 30,
|
|
44225
|
-
INFO: 40,
|
|
44226
|
-
SUCCESS: 45,
|
|
44227
|
-
DEBUG: 60,
|
|
44228
|
-
TRACE: 70,
|
|
44229
|
-
ALL: 100
|
|
44230
|
-
};
|
|
44231
|
-
var LogLevelLabel = {
|
|
44232
|
-
SILENT: "silent",
|
|
44233
|
-
FATAL: "fatal",
|
|
44234
|
-
ERROR: "error",
|
|
44235
|
-
WARN: "warn",
|
|
44236
|
-
INFO: "info",
|
|
44237
|
-
DEBUG: "debug",
|
|
44238
|
-
TRACE: "trace",
|
|
44239
|
-
ALL: "all"
|
|
44240
|
-
};
|
|
44241
|
-
|
|
44242
|
-
// packages/config-tools/src/utilities/get-log-level.ts
|
|
44243
|
-
var getLogLevel = (label) => {
|
|
44244
|
-
switch (label) {
|
|
44245
|
-
case "all":
|
|
44246
|
-
return LogLevel.ALL;
|
|
44247
|
-
case "trace":
|
|
44248
|
-
return LogLevel.TRACE;
|
|
44249
|
-
case "debug":
|
|
44250
|
-
return LogLevel.DEBUG;
|
|
44251
|
-
case "info":
|
|
44252
|
-
return LogLevel.INFO;
|
|
44253
|
-
case "warn":
|
|
44254
|
-
return LogLevel.WARN;
|
|
44255
|
-
case "error":
|
|
44256
|
-
return LogLevel.ERROR;
|
|
44257
|
-
case "fatal":
|
|
44258
|
-
return LogLevel.FATAL;
|
|
44259
|
-
case "silent":
|
|
44260
|
-
return LogLevel.SILENT;
|
|
44261
|
-
default:
|
|
44262
|
-
return LogLevel.INFO;
|
|
44263
|
-
}
|
|
44264
|
-
};
|
|
44265
|
-
var getLogLevelLabel = (logLevel) => {
|
|
44266
|
-
if (logLevel >= LogLevel.ALL) {
|
|
44267
|
-
return LogLevelLabel.ALL;
|
|
44268
|
-
}
|
|
44269
|
-
if (logLevel >= LogLevel.TRACE) {
|
|
44270
|
-
return LogLevelLabel.TRACE;
|
|
44271
|
-
}
|
|
44272
|
-
if (logLevel >= LogLevel.DEBUG) {
|
|
44273
|
-
return LogLevelLabel.DEBUG;
|
|
44274
|
-
}
|
|
44275
|
-
if (logLevel >= LogLevel.INFO) {
|
|
44276
|
-
return LogLevelLabel.INFO;
|
|
44277
|
-
}
|
|
44278
|
-
if (logLevel >= LogLevel.WARN) {
|
|
44279
|
-
return LogLevelLabel.WARN;
|
|
44280
|
-
}
|
|
44281
|
-
if (logLevel >= LogLevel.ERROR) {
|
|
44282
|
-
return LogLevelLabel.ERROR;
|
|
44283
|
-
}
|
|
44284
|
-
if (logLevel >= LogLevel.FATAL) {
|
|
44285
|
-
return LogLevelLabel.FATAL;
|
|
44286
|
-
}
|
|
44287
|
-
if (logLevel <= LogLevel.SILENT) {
|
|
44288
|
-
return LogLevelLabel.SILENT;
|
|
44289
|
-
}
|
|
44290
|
-
return LogLevelLabel.INFO;
|
|
44291
|
-
};
|
|
44292
|
-
|
|
44293
|
-
// packages/config-tools/src/utilities/logger.ts
|
|
44294
|
-
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
44295
|
-
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)) {
|
|
44296
|
-
return (_) => {
|
|
44297
|
-
};
|
|
44298
|
-
}
|
|
44299
|
-
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
44300
|
-
return (message) => {
|
|
44301
|
-
console.error(
|
|
44302
|
-
`
|
|
44303
|
-
${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(
|
|
44304
|
-
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
44305
|
-
)(message)}
|
|
44306
|
-
|
|
44307
|
-
`
|
|
44308
|
-
);
|
|
44309
|
-
};
|
|
44310
|
-
}
|
|
44311
|
-
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
44312
|
-
return (message) => {
|
|
44313
|
-
console.error(
|
|
44314
|
-
`
|
|
44315
|
-
${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(
|
|
44316
|
-
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
44317
|
-
)(message)}
|
|
44318
|
-
`
|
|
44319
|
-
);
|
|
44320
|
-
};
|
|
44321
|
-
}
|
|
44322
|
-
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
44323
|
-
return (message) => {
|
|
44324
|
-
console.warn(
|
|
44325
|
-
`
|
|
44326
|
-
${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(">")} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" ! Warn ")} ${chalk.hex(
|
|
44327
|
-
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
44328
|
-
)(message)}
|
|
44329
|
-
`
|
|
44330
|
-
);
|
|
44331
|
-
};
|
|
44332
|
-
}
|
|
44333
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
44334
|
-
return (message) => {
|
|
44335
|
-
console.info(
|
|
44336
|
-
`
|
|
44337
|
-
${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")(
|
|
44338
|
-
message
|
|
44339
|
-
)}
|
|
44340
|
-
`
|
|
44341
|
-
);
|
|
44342
|
-
};
|
|
44343
|
-
}
|
|
44344
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
44345
|
-
return (message) => {
|
|
44346
|
-
console.info(
|
|
44347
|
-
`
|
|
44348
|
-
${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(
|
|
44349
|
-
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
44350
|
-
)(message)}
|
|
44351
|
-
`
|
|
44352
|
-
);
|
|
44353
|
-
};
|
|
44354
|
-
}
|
|
44355
|
-
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
44356
|
-
return (message) => {
|
|
44357
|
-
console.debug(
|
|
44358
|
-
`
|
|
44359
|
-
${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(
|
|
44360
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
44361
|
-
)(message)}
|
|
44362
|
-
`
|
|
44363
|
-
);
|
|
44364
|
-
};
|
|
44365
|
-
}
|
|
44366
|
-
return (message) => {
|
|
44367
|
-
console.log(
|
|
44368
|
-
`
|
|
44369
|
-
${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(
|
|
44370
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
44371
|
-
)(message)}
|
|
44372
|
-
`
|
|
44373
|
-
);
|
|
44374
|
-
};
|
|
44375
|
-
};
|
|
44376
|
-
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
44377
|
-
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
44378
|
-
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
44379
|
-
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
44380
|
-
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
44381
|
-
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
44382
|
-
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
44383
|
-
var getStopwatch = (name) => {
|
|
44384
|
-
const start = process.hrtime();
|
|
44385
|
-
return () => {
|
|
44386
|
-
const end = process.hrtime(start);
|
|
44387
|
-
console.info(
|
|
44388
|
-
chalk.dim(
|
|
44389
|
-
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
44390
|
-
end[0] * 1e3 + end[1] / 1e6
|
|
44391
|
-
)}ms to complete`
|
|
44392
|
-
)
|
|
44393
|
-
);
|
|
44394
|
-
};
|
|
44395
|
-
};
|
|
44396
|
-
|
|
44397
|
-
// packages/config-tools/src/config-file/get-config-file.ts
|
|
44398
44215
|
var _static_cache = void 0;
|
|
44399
|
-
var
|
|
44216
|
+
var getConfigFileByName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
|
|
44400
44217
|
var getConfigFile = async (filePath) => {
|
|
44401
44218
|
if (_static_cache) {
|
|
44402
44219
|
return _static_cache;
|
|
44403
44220
|
}
|
|
44404
|
-
let cosmiconfigResult = await
|
|
44221
|
+
let cosmiconfigResult = await getConfigFileByName("storm", filePath);
|
|
44405
44222
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
44406
|
-
cosmiconfigResult = await
|
|
44223
|
+
cosmiconfigResult = await getConfigFileByName("storm-software", filePath);
|
|
44407
44224
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
44408
|
-
cosmiconfigResult = await
|
|
44225
|
+
cosmiconfigResult = await getConfigFileByName("storm-stack", filePath);
|
|
44409
44226
|
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
44410
|
-
cosmiconfigResult = await
|
|
44411
|
-
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
44412
|
-
cosmiconfigResult = await getConfigFileName("acidic", filePath);
|
|
44413
|
-
if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
|
|
44414
|
-
cosmiconfigResult = await getConfigFileName("acid", filePath);
|
|
44415
|
-
}
|
|
44416
|
-
}
|
|
44227
|
+
cosmiconfigResult = await getConfigFileByName("storm-cloud", filePath);
|
|
44417
44228
|
}
|
|
44418
44229
|
}
|
|
44419
44230
|
}
|
|
44420
44231
|
if (!cosmiconfigResult || Object.keys(cosmiconfigResult).length === 0 || cosmiconfigResult.isEmpty || !cosmiconfigResult.filepath) {
|
|
44421
|
-
writeWarning(
|
|
44422
|
-
{ logLevel: "all" },
|
|
44423
|
-
"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"
|
|
44424
|
-
);
|
|
44425
44232
|
return void 0;
|
|
44426
44233
|
}
|
|
44427
44234
|
const config = cosmiconfigResult.config ?? {};
|
|
@@ -48212,6 +48019,185 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
48212
48019
|
});
|
|
48213
48020
|
};
|
|
48214
48021
|
|
|
48022
|
+
// packages/config-tools/src/types.ts
|
|
48023
|
+
var LogLevel = {
|
|
48024
|
+
SILENT: 0,
|
|
48025
|
+
FATAL: 10,
|
|
48026
|
+
ERROR: 20,
|
|
48027
|
+
WARN: 30,
|
|
48028
|
+
INFO: 40,
|
|
48029
|
+
SUCCESS: 45,
|
|
48030
|
+
DEBUG: 60,
|
|
48031
|
+
TRACE: 70,
|
|
48032
|
+
ALL: 100
|
|
48033
|
+
};
|
|
48034
|
+
var LogLevelLabel = {
|
|
48035
|
+
SILENT: "silent",
|
|
48036
|
+
FATAL: "fatal",
|
|
48037
|
+
ERROR: "error",
|
|
48038
|
+
WARN: "warn",
|
|
48039
|
+
INFO: "info",
|
|
48040
|
+
DEBUG: "debug",
|
|
48041
|
+
TRACE: "trace",
|
|
48042
|
+
ALL: "all"
|
|
48043
|
+
};
|
|
48044
|
+
|
|
48045
|
+
// packages/config-tools/src/utilities/get-log-level.ts
|
|
48046
|
+
var getLogLevel = (label) => {
|
|
48047
|
+
switch (label) {
|
|
48048
|
+
case "all":
|
|
48049
|
+
return LogLevel.ALL;
|
|
48050
|
+
case "trace":
|
|
48051
|
+
return LogLevel.TRACE;
|
|
48052
|
+
case "debug":
|
|
48053
|
+
return LogLevel.DEBUG;
|
|
48054
|
+
case "info":
|
|
48055
|
+
return LogLevel.INFO;
|
|
48056
|
+
case "warn":
|
|
48057
|
+
return LogLevel.WARN;
|
|
48058
|
+
case "error":
|
|
48059
|
+
return LogLevel.ERROR;
|
|
48060
|
+
case "fatal":
|
|
48061
|
+
return LogLevel.FATAL;
|
|
48062
|
+
case "silent":
|
|
48063
|
+
return LogLevel.SILENT;
|
|
48064
|
+
default:
|
|
48065
|
+
return LogLevel.INFO;
|
|
48066
|
+
}
|
|
48067
|
+
};
|
|
48068
|
+
var getLogLevelLabel = (logLevel) => {
|
|
48069
|
+
if (logLevel >= LogLevel.ALL) {
|
|
48070
|
+
return LogLevelLabel.ALL;
|
|
48071
|
+
}
|
|
48072
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
48073
|
+
return LogLevelLabel.TRACE;
|
|
48074
|
+
}
|
|
48075
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
48076
|
+
return LogLevelLabel.DEBUG;
|
|
48077
|
+
}
|
|
48078
|
+
if (logLevel >= LogLevel.INFO) {
|
|
48079
|
+
return LogLevelLabel.INFO;
|
|
48080
|
+
}
|
|
48081
|
+
if (logLevel >= LogLevel.WARN) {
|
|
48082
|
+
return LogLevelLabel.WARN;
|
|
48083
|
+
}
|
|
48084
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
48085
|
+
return LogLevelLabel.ERROR;
|
|
48086
|
+
}
|
|
48087
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
48088
|
+
return LogLevelLabel.FATAL;
|
|
48089
|
+
}
|
|
48090
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
48091
|
+
return LogLevelLabel.SILENT;
|
|
48092
|
+
}
|
|
48093
|
+
return LogLevelLabel.INFO;
|
|
48094
|
+
};
|
|
48095
|
+
|
|
48096
|
+
// packages/config-tools/src/utilities/logger.ts
|
|
48097
|
+
var chalk = __toESM(require_source(), 1);
|
|
48098
|
+
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
48099
|
+
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)) {
|
|
48100
|
+
return (_) => {
|
|
48101
|
+
};
|
|
48102
|
+
}
|
|
48103
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
48104
|
+
return (message) => {
|
|
48105
|
+
console.error(
|
|
48106
|
+
`
|
|
48107
|
+
${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(
|
|
48108
|
+
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
48109
|
+
)(message)}
|
|
48110
|
+
|
|
48111
|
+
`
|
|
48112
|
+
);
|
|
48113
|
+
};
|
|
48114
|
+
}
|
|
48115
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
48116
|
+
return (message) => {
|
|
48117
|
+
console.error(
|
|
48118
|
+
`
|
|
48119
|
+
${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(
|
|
48120
|
+
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
48121
|
+
)(message)}
|
|
48122
|
+
`
|
|
48123
|
+
);
|
|
48124
|
+
};
|
|
48125
|
+
}
|
|
48126
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
48127
|
+
return (message) => {
|
|
48128
|
+
console.warn(
|
|
48129
|
+
`
|
|
48130
|
+
${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(
|
|
48131
|
+
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
48132
|
+
)(message)}
|
|
48133
|
+
`
|
|
48134
|
+
);
|
|
48135
|
+
};
|
|
48136
|
+
}
|
|
48137
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
48138
|
+
return (message) => {
|
|
48139
|
+
console.info(
|
|
48140
|
+
`
|
|
48141
|
+
${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")(
|
|
48142
|
+
message
|
|
48143
|
+
)}
|
|
48144
|
+
`
|
|
48145
|
+
);
|
|
48146
|
+
};
|
|
48147
|
+
}
|
|
48148
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
48149
|
+
return (message) => {
|
|
48150
|
+
console.info(
|
|
48151
|
+
`
|
|
48152
|
+
${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(
|
|
48153
|
+
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
48154
|
+
)(message)}
|
|
48155
|
+
`
|
|
48156
|
+
);
|
|
48157
|
+
};
|
|
48158
|
+
}
|
|
48159
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
48160
|
+
return (message) => {
|
|
48161
|
+
console.debug(
|
|
48162
|
+
`
|
|
48163
|
+
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" ! Debug ")} ${chalk.hex(
|
|
48164
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
48165
|
+
)(message)}
|
|
48166
|
+
`
|
|
48167
|
+
);
|
|
48168
|
+
};
|
|
48169
|
+
}
|
|
48170
|
+
return (message) => {
|
|
48171
|
+
console.log(
|
|
48172
|
+
`
|
|
48173
|
+
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" ! System ")} ${chalk.hex(
|
|
48174
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
48175
|
+
)(message)}
|
|
48176
|
+
`
|
|
48177
|
+
);
|
|
48178
|
+
};
|
|
48179
|
+
};
|
|
48180
|
+
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
48181
|
+
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
48182
|
+
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
48183
|
+
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
48184
|
+
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
48185
|
+
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
48186
|
+
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
48187
|
+
var getStopwatch = (name) => {
|
|
48188
|
+
const start = process.hrtime();
|
|
48189
|
+
return () => {
|
|
48190
|
+
const end = process.hrtime(start);
|
|
48191
|
+
console.info(
|
|
48192
|
+
chalk.dim(
|
|
48193
|
+
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
48194
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
48195
|
+
)}ms to complete`
|
|
48196
|
+
)
|
|
48197
|
+
);
|
|
48198
|
+
};
|
|
48199
|
+
};
|
|
48200
|
+
|
|
48215
48201
|
// node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
|
|
48216
48202
|
var import_node_buffer2 = require("node:buffer");
|
|
48217
48203
|
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
@@ -49980,10 +49966,17 @@ var loadStormConfig = async (workspaceRoot) => {
|
|
|
49980
49966
|
if (!_workspaceRoot) {
|
|
49981
49967
|
_workspaceRoot = findWorkspaceRoot();
|
|
49982
49968
|
}
|
|
49969
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
49970
|
+
if (!configFile) {
|
|
49971
|
+
writeWarning(
|
|
49972
|
+
{ logLevel: "all" },
|
|
49973
|
+
"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"
|
|
49974
|
+
);
|
|
49975
|
+
}
|
|
49983
49976
|
config = StormConfigSchema.parse(
|
|
49984
49977
|
await getDefaultConfig(
|
|
49985
49978
|
{
|
|
49986
|
-
...
|
|
49979
|
+
...configFile,
|
|
49987
49980
|
...getConfigEnv()
|
|
49988
49981
|
},
|
|
49989
49982
|
_workspaceRoot
|