@storm-software/workspace-tools 1.45.1 → 1.45.2
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 +7 -0
- package/index.js +286 -247
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +246 -206
- package/src/executors/design-tokens/executor.js +259 -219
- package/src/executors/tsup/executor.js +261 -222
- package/src/executors/tsup-browser/executor.js +261 -222
- package/src/executors/tsup-neutral/executor.js +261 -222
- package/src/executors/tsup-node/executor.js +261 -222
- package/src/executors/typia/executor.js +250 -210
- package/src/generators/browser-library/generator.js +246 -206
- package/src/generators/config-schema/generator.js +244 -204
- package/src/generators/neutral-library/generator.js +246 -206
- package/src/generators/node-library/generator.js +246 -206
- package/src/generators/preset/generator.js +244 -204
|
@@ -29754,7 +29754,7 @@ var require_jsonfile = __commonJS({
|
|
|
29754
29754
|
return obj;
|
|
29755
29755
|
}
|
|
29756
29756
|
var readFile = universalify.fromPromise(_readFile);
|
|
29757
|
-
function
|
|
29757
|
+
function readFileSync3(file, options = {}) {
|
|
29758
29758
|
if (typeof options === "string") {
|
|
29759
29759
|
options = { encoding: options };
|
|
29760
29760
|
}
|
|
@@ -29786,7 +29786,7 @@ var require_jsonfile = __commonJS({
|
|
|
29786
29786
|
}
|
|
29787
29787
|
var jsonfile = {
|
|
29788
29788
|
readFile,
|
|
29789
|
-
readFileSync:
|
|
29789
|
+
readFileSync: readFileSync3,
|
|
29790
29790
|
writeFile: writeFile2,
|
|
29791
29791
|
writeFileSync: writeFileSync2
|
|
29792
29792
|
};
|
|
@@ -46989,7 +46989,7 @@ var require_lib6 = __commonJS({
|
|
|
46989
46989
|
function _interopRequireDefault(obj) {
|
|
46990
46990
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
46991
46991
|
}
|
|
46992
|
-
var
|
|
46992
|
+
var readFileSync3 = (fp) => {
|
|
46993
46993
|
return _fs.default.readFileSync(fp, "utf8");
|
|
46994
46994
|
};
|
|
46995
46995
|
var pathExists = (fp) => new Promise((resolve) => {
|
|
@@ -47113,7 +47113,7 @@ var require_lib6 = __commonJS({
|
|
|
47113
47113
|
if (this.packageJsonCache.has(filepath2)) {
|
|
47114
47114
|
return this.packageJsonCache.get(filepath2)[options.packageKey];
|
|
47115
47115
|
}
|
|
47116
|
-
const data2 = this.options.parseJSON(
|
|
47116
|
+
const data2 = this.options.parseJSON(readFileSync3(filepath2));
|
|
47117
47117
|
return data2;
|
|
47118
47118
|
}
|
|
47119
47119
|
};
|
|
@@ -47147,7 +47147,7 @@ var require_lib6 = __commonJS({
|
|
|
47147
47147
|
if (this.packageJsonCache.has(filepath2)) {
|
|
47148
47148
|
return this.packageJsonCache.get(filepath2)[options.packageKey];
|
|
47149
47149
|
}
|
|
47150
|
-
const data2 = this.options.parseJSON(
|
|
47150
|
+
const data2 = this.options.parseJSON(readFileSync3(filepath2));
|
|
47151
47151
|
return data2;
|
|
47152
47152
|
}
|
|
47153
47153
|
};
|
|
@@ -73213,7 +73213,7 @@ var require_util5 = __commonJS({
|
|
|
73213
73213
|
var normalize2 = createSafeHandler((url) => {
|
|
73214
73214
|
});
|
|
73215
73215
|
exports.normalize = normalize2;
|
|
73216
|
-
function
|
|
73216
|
+
function join3(aRoot, aPath) {
|
|
73217
73217
|
const pathType = getURLType(aPath);
|
|
73218
73218
|
const rootType = getURLType(aRoot);
|
|
73219
73219
|
aRoot = ensureDirectory(aRoot);
|
|
@@ -73239,7 +73239,7 @@ var require_util5 = __commonJS({
|
|
|
73239
73239
|
const newPath = withBase(aPath, withBase(aRoot, base));
|
|
73240
73240
|
return computeRelativeURL(base, newPath);
|
|
73241
73241
|
}
|
|
73242
|
-
exports.join =
|
|
73242
|
+
exports.join = join3;
|
|
73243
73243
|
function relative(rootURL, targetURL) {
|
|
73244
73244
|
const result = relativeIfPossible(rootURL, targetURL);
|
|
73245
73245
|
return typeof result === "string" ? result : normalize2(targetURL);
|
|
@@ -73269,9 +73269,9 @@ var require_util5 = __commonJS({
|
|
|
73269
73269
|
}
|
|
73270
73270
|
let url = normalize2(sourceURL || "");
|
|
73271
73271
|
if (sourceRoot)
|
|
73272
|
-
url =
|
|
73272
|
+
url = join3(sourceRoot, url);
|
|
73273
73273
|
if (sourceMapURL)
|
|
73274
|
-
url =
|
|
73274
|
+
url = join3(trimFilename(sourceMapURL), url);
|
|
73275
73275
|
return url;
|
|
73276
73276
|
}
|
|
73277
73277
|
exports.computeSourceURL = computeSourceURL;
|
|
@@ -75036,8 +75036,8 @@ var require_source_map = __commonJS({
|
|
|
75036
75036
|
// node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js
|
|
75037
75037
|
var require_native = __commonJS({
|
|
75038
75038
|
"node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js"(exports, module2) {
|
|
75039
|
-
var { existsSync:
|
|
75040
|
-
var { join:
|
|
75039
|
+
var { existsSync: existsSync3 } = require("node:fs");
|
|
75040
|
+
var { join: join3 } = require("node:path");
|
|
75041
75041
|
var { platform, arch, report } = require("node:process");
|
|
75042
75042
|
var isMusl = () => !report.getReport().header.glibcVersionRuntime;
|
|
75043
75043
|
var bindingsByPlatformAndArch = {
|
|
@@ -75087,7 +75087,7 @@ If this is important to you, please consider supporting Rollup to make a native
|
|
|
75087
75087
|
return imported.base;
|
|
75088
75088
|
}
|
|
75089
75089
|
var localName = `./rollup.${packageBase}.node`;
|
|
75090
|
-
var { parse, parseAsync, xxhashBase64Url } =
|
|
75090
|
+
var { parse, parseAsync, xxhashBase64Url } = existsSync3(join3(__dirname, localName)) ? require(localName) : require(`@rollup/rollup-${packageBase}`);
|
|
75091
75091
|
module2.exports.parse = parse;
|
|
75092
75092
|
module2.exports.parseAsync = parseAsync;
|
|
75093
75093
|
module2.exports.xxhashBase64Url = xxhashBase64Url;
|
|
@@ -104307,6 +104307,189 @@ module.exports = __toCommonJS(executor_exports);
|
|
|
104307
104307
|
|
|
104308
104308
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
104309
104309
|
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
104310
|
+
|
|
104311
|
+
// packages/config-tools/src/utilities/logger.ts
|
|
104312
|
+
var chalk = __toESM(require_source(), 1);
|
|
104313
|
+
|
|
104314
|
+
// packages/config-tools/src/types.ts
|
|
104315
|
+
var LogLevel = {
|
|
104316
|
+
SILENT: 0,
|
|
104317
|
+
FATAL: 10,
|
|
104318
|
+
ERROR: 20,
|
|
104319
|
+
WARN: 30,
|
|
104320
|
+
INFO: 40,
|
|
104321
|
+
SUCCESS: 45,
|
|
104322
|
+
DEBUG: 60,
|
|
104323
|
+
TRACE: 70,
|
|
104324
|
+
ALL: 100
|
|
104325
|
+
};
|
|
104326
|
+
var LogLevelLabel = {
|
|
104327
|
+
SILENT: "silent",
|
|
104328
|
+
FATAL: "fatal",
|
|
104329
|
+
ERROR: "error",
|
|
104330
|
+
WARN: "warn",
|
|
104331
|
+
INFO: "info",
|
|
104332
|
+
DEBUG: "debug",
|
|
104333
|
+
TRACE: "trace",
|
|
104334
|
+
ALL: "all"
|
|
104335
|
+
};
|
|
104336
|
+
|
|
104337
|
+
// packages/config-tools/src/utilities/get-log-level.ts
|
|
104338
|
+
var getLogLevel = (label) => {
|
|
104339
|
+
switch (label) {
|
|
104340
|
+
case "all":
|
|
104341
|
+
return LogLevel.ALL;
|
|
104342
|
+
case "trace":
|
|
104343
|
+
return LogLevel.TRACE;
|
|
104344
|
+
case "debug":
|
|
104345
|
+
return LogLevel.DEBUG;
|
|
104346
|
+
case "info":
|
|
104347
|
+
return LogLevel.INFO;
|
|
104348
|
+
case "warn":
|
|
104349
|
+
return LogLevel.WARN;
|
|
104350
|
+
case "error":
|
|
104351
|
+
return LogLevel.ERROR;
|
|
104352
|
+
case "fatal":
|
|
104353
|
+
return LogLevel.FATAL;
|
|
104354
|
+
case "silent":
|
|
104355
|
+
return LogLevel.SILENT;
|
|
104356
|
+
default:
|
|
104357
|
+
return LogLevel.INFO;
|
|
104358
|
+
}
|
|
104359
|
+
};
|
|
104360
|
+
var getLogLevelLabel = (logLevel) => {
|
|
104361
|
+
if (logLevel >= LogLevel.ALL) {
|
|
104362
|
+
return LogLevelLabel.ALL;
|
|
104363
|
+
}
|
|
104364
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
104365
|
+
return LogLevelLabel.TRACE;
|
|
104366
|
+
}
|
|
104367
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
104368
|
+
return LogLevelLabel.DEBUG;
|
|
104369
|
+
}
|
|
104370
|
+
if (logLevel >= LogLevel.INFO) {
|
|
104371
|
+
return LogLevelLabel.INFO;
|
|
104372
|
+
}
|
|
104373
|
+
if (logLevel >= LogLevel.WARN) {
|
|
104374
|
+
return LogLevelLabel.WARN;
|
|
104375
|
+
}
|
|
104376
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
104377
|
+
return LogLevelLabel.ERROR;
|
|
104378
|
+
}
|
|
104379
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
104380
|
+
return LogLevelLabel.FATAL;
|
|
104381
|
+
}
|
|
104382
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
104383
|
+
return LogLevelLabel.SILENT;
|
|
104384
|
+
}
|
|
104385
|
+
return LogLevelLabel.INFO;
|
|
104386
|
+
};
|
|
104387
|
+
|
|
104388
|
+
// packages/config-tools/src/utilities/logger.ts
|
|
104389
|
+
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
104390
|
+
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)) {
|
|
104391
|
+
return (_) => {
|
|
104392
|
+
};
|
|
104393
|
+
}
|
|
104394
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
104395
|
+
return (message) => {
|
|
104396
|
+
console.error(
|
|
104397
|
+
`
|
|
104398
|
+
${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(
|
|
104399
|
+
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
104400
|
+
)(message)}
|
|
104401
|
+
|
|
104402
|
+
`
|
|
104403
|
+
);
|
|
104404
|
+
};
|
|
104405
|
+
}
|
|
104406
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
104407
|
+
return (message) => {
|
|
104408
|
+
console.error(
|
|
104409
|
+
`
|
|
104410
|
+
${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u{1F6D1} Error ")} ${chalk.hex(
|
|
104411
|
+
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
104412
|
+
)(message)}
|
|
104413
|
+
`
|
|
104414
|
+
);
|
|
104415
|
+
};
|
|
104416
|
+
}
|
|
104417
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
104418
|
+
return (message) => {
|
|
104419
|
+
console.warn(
|
|
104420
|
+
`
|
|
104421
|
+
${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(">")} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" \u26A0\uFE0F Warn ")} ${chalk.hex(
|
|
104422
|
+
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
104423
|
+
)(message)}
|
|
104424
|
+
`
|
|
104425
|
+
);
|
|
104426
|
+
};
|
|
104427
|
+
}
|
|
104428
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
104429
|
+
return (message) => {
|
|
104430
|
+
console.info(
|
|
104431
|
+
`
|
|
104432
|
+
${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u{1F4EC} Info ")} ${chalk.hex(
|
|
104433
|
+
config?.colors?.info ? config.colors.info : "#0ea5e9"
|
|
104434
|
+
)(message)}
|
|
104435
|
+
`
|
|
104436
|
+
);
|
|
104437
|
+
};
|
|
104438
|
+
}
|
|
104439
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
104440
|
+
return (message) => {
|
|
104441
|
+
console.info(
|
|
104442
|
+
`
|
|
104443
|
+
${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(">")} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u{1F389} Success ")} ${chalk.hex(
|
|
104444
|
+
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
104445
|
+
)(message)}
|
|
104446
|
+
`
|
|
104447
|
+
);
|
|
104448
|
+
};
|
|
104449
|
+
}
|
|
104450
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
104451
|
+
return (message) => {
|
|
104452
|
+
console.debug(
|
|
104453
|
+
`
|
|
104454
|
+
${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(
|
|
104455
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
104456
|
+
)(message)}
|
|
104457
|
+
`
|
|
104458
|
+
);
|
|
104459
|
+
};
|
|
104460
|
+
}
|
|
104461
|
+
return (message) => {
|
|
104462
|
+
console.log(
|
|
104463
|
+
`
|
|
104464
|
+
${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(
|
|
104465
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
104466
|
+
)(message)}
|
|
104467
|
+
`
|
|
104468
|
+
);
|
|
104469
|
+
};
|
|
104470
|
+
};
|
|
104471
|
+
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
104472
|
+
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
104473
|
+
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
104474
|
+
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
104475
|
+
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
104476
|
+
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
104477
|
+
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
104478
|
+
var getStopwatch = (name) => {
|
|
104479
|
+
const start = process.hrtime();
|
|
104480
|
+
return () => {
|
|
104481
|
+
const end = process.hrtime(start);
|
|
104482
|
+
console.info(
|
|
104483
|
+
chalk.dim(
|
|
104484
|
+
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
104485
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
104486
|
+
)}ms to complete`
|
|
104487
|
+
)
|
|
104488
|
+
);
|
|
104489
|
+
};
|
|
104490
|
+
};
|
|
104491
|
+
|
|
104492
|
+
// packages/config-tools/src/config-file/get-config-file.ts
|
|
104310
104493
|
var _static_cache = void 0;
|
|
104311
104494
|
var getConfigFileName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
|
|
104312
104495
|
var getConfigFile = async (filePath) => {
|
|
@@ -104333,6 +104516,10 @@ var getConfigFile = async (filePath) => {
|
|
|
104333
104516
|
console.warn(
|
|
104334
104517
|
"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."
|
|
104335
104518
|
);
|
|
104519
|
+
writeWarning(
|
|
104520
|
+
{ logLevel: "error" },
|
|
104521
|
+
"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."
|
|
104522
|
+
);
|
|
104336
104523
|
return void 0;
|
|
104337
104524
|
}
|
|
104338
104525
|
const config = cosmiconfigResult.config ?? {};
|
|
@@ -104413,6 +104600,10 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
104413
104600
|
return result;
|
|
104414
104601
|
}
|
|
104415
104602
|
|
|
104603
|
+
// packages/config-tools/src/utilities/get-default-config.ts
|
|
104604
|
+
var import_node_fs2 = require("node:fs");
|
|
104605
|
+
var import_node_path2 = require("node:path");
|
|
104606
|
+
|
|
104416
104607
|
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
|
104417
104608
|
var util;
|
|
104418
104609
|
(function(util2) {
|
|
@@ -108073,184 +108264,50 @@ var DefaultStormConfig = {
|
|
|
108073
108264
|
colors: { ...DefaultColorConfig },
|
|
108074
108265
|
extensions: {}
|
|
108075
108266
|
};
|
|
108076
|
-
|
|
108077
|
-
|
|
108078
|
-
|
|
108079
|
-
|
|
108080
|
-
|
|
108081
|
-
|
|
108082
|
-
|
|
108083
|
-
|
|
108084
|
-
|
|
108085
|
-
|
|
108086
|
-
|
|
108087
|
-
|
|
108088
|
-
|
|
108089
|
-
|
|
108090
|
-
|
|
108091
|
-
|
|
108092
|
-
|
|
108093
|
-
|
|
108094
|
-
|
|
108095
|
-
|
|
108096
|
-
|
|
108097
|
-
|
|
108098
|
-
|
|
108099
|
-
|
|
108100
|
-
|
|
108101
|
-
|
|
108102
|
-
|
|
108103
|
-
|
|
108104
|
-
|
|
108105
|
-
case "trace":
|
|
108106
|
-
return LogLevel.TRACE;
|
|
108107
|
-
case "debug":
|
|
108108
|
-
return LogLevel.DEBUG;
|
|
108109
|
-
case "info":
|
|
108110
|
-
return LogLevel.INFO;
|
|
108111
|
-
case "warn":
|
|
108112
|
-
return LogLevel.WARN;
|
|
108113
|
-
case "error":
|
|
108114
|
-
return LogLevel.ERROR;
|
|
108115
|
-
case "fatal":
|
|
108116
|
-
return LogLevel.FATAL;
|
|
108117
|
-
case "silent":
|
|
108118
|
-
return LogLevel.SILENT;
|
|
108119
|
-
default:
|
|
108120
|
-
return LogLevel.INFO;
|
|
108121
|
-
}
|
|
108122
|
-
};
|
|
108123
|
-
var getLogLevelLabel = (logLevel) => {
|
|
108124
|
-
if (logLevel >= LogLevel.ALL) {
|
|
108125
|
-
return LogLevelLabel.ALL;
|
|
108126
|
-
}
|
|
108127
|
-
if (logLevel >= LogLevel.TRACE) {
|
|
108128
|
-
return LogLevelLabel.TRACE;
|
|
108129
|
-
}
|
|
108130
|
-
if (logLevel >= LogLevel.DEBUG) {
|
|
108131
|
-
return LogLevelLabel.DEBUG;
|
|
108132
|
-
}
|
|
108133
|
-
if (logLevel >= LogLevel.INFO) {
|
|
108134
|
-
return LogLevelLabel.INFO;
|
|
108135
|
-
}
|
|
108136
|
-
if (logLevel >= LogLevel.WARN) {
|
|
108137
|
-
return LogLevelLabel.WARN;
|
|
108138
|
-
}
|
|
108139
|
-
if (logLevel >= LogLevel.ERROR) {
|
|
108140
|
-
return LogLevelLabel.ERROR;
|
|
108141
|
-
}
|
|
108142
|
-
if (logLevel >= LogLevel.FATAL) {
|
|
108143
|
-
return LogLevelLabel.FATAL;
|
|
108144
|
-
}
|
|
108145
|
-
if (logLevel <= LogLevel.SILENT) {
|
|
108146
|
-
return LogLevelLabel.SILENT;
|
|
108147
|
-
}
|
|
108148
|
-
return LogLevelLabel.INFO;
|
|
108149
|
-
};
|
|
108150
|
-
|
|
108151
|
-
// packages/config-tools/src/utilities/logger.ts
|
|
108152
|
-
var chalk = __toESM(require_source(), 1);
|
|
108153
|
-
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
108154
|
-
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)) {
|
|
108155
|
-
return (_) => {
|
|
108156
|
-
};
|
|
108157
|
-
}
|
|
108158
|
-
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
108159
|
-
return (message) => {
|
|
108160
|
-
console.error(
|
|
108161
|
-
`
|
|
108162
|
-
${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(
|
|
108163
|
-
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
108164
|
-
)(message)}
|
|
108165
|
-
|
|
108166
|
-
`
|
|
108167
|
-
);
|
|
108168
|
-
};
|
|
108169
|
-
}
|
|
108170
|
-
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
108171
|
-
return (message) => {
|
|
108172
|
-
console.error(
|
|
108173
|
-
`
|
|
108174
|
-
${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u{1F6D1} Error ")} ${chalk.hex(
|
|
108175
|
-
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
108176
|
-
)(message)}
|
|
108177
|
-
`
|
|
108178
|
-
);
|
|
108179
|
-
};
|
|
108180
|
-
}
|
|
108181
|
-
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
108182
|
-
return (message) => {
|
|
108183
|
-
console.warn(
|
|
108184
|
-
`
|
|
108185
|
-
${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(">")} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" \u26A0\uFE0F Warn ")} ${chalk.hex(
|
|
108186
|
-
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
108187
|
-
)(message)}
|
|
108188
|
-
`
|
|
108189
|
-
);
|
|
108190
|
-
};
|
|
108191
|
-
}
|
|
108192
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
108193
|
-
return (message) => {
|
|
108194
|
-
console.info(
|
|
108195
|
-
`
|
|
108196
|
-
${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u{1F4EC} Info ")} ${chalk.hex(
|
|
108197
|
-
config?.colors?.info ? config.colors.info : "#0ea5e9"
|
|
108198
|
-
)(message)}
|
|
108199
|
-
`
|
|
108200
|
-
);
|
|
108201
|
-
};
|
|
108202
|
-
}
|
|
108203
|
-
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
108204
|
-
return (message) => {
|
|
108205
|
-
console.info(
|
|
108206
|
-
`
|
|
108207
|
-
${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(">")} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u{1F389} Success ")} ${chalk.hex(
|
|
108208
|
-
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
108209
|
-
)(message)}
|
|
108210
|
-
`
|
|
108211
|
-
);
|
|
108212
|
-
};
|
|
108213
|
-
}
|
|
108214
|
-
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
108215
|
-
return (message) => {
|
|
108216
|
-
console.debug(
|
|
108217
|
-
`
|
|
108218
|
-
${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(
|
|
108219
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
108220
|
-
)(message)}
|
|
108221
|
-
`
|
|
108222
|
-
);
|
|
108223
|
-
};
|
|
108267
|
+
var getDefaultConfig = (config = {}, root) => {
|
|
108268
|
+
let name = "storm-workspace";
|
|
108269
|
+
let namespace = "storm-software";
|
|
108270
|
+
let repository = "https://github.com/storm-software/storm-ops";
|
|
108271
|
+
let license = DefaultStormConfig.license;
|
|
108272
|
+
let homepage = DefaultStormConfig.homepage;
|
|
108273
|
+
const workspaceRoot = findWorkspaceRoot(root);
|
|
108274
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
|
|
108275
|
+
const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
|
|
108276
|
+
encoding: "utf-8"
|
|
108277
|
+
});
|
|
108278
|
+
if (file) {
|
|
108279
|
+
const packageJson = JSON.parse(file);
|
|
108280
|
+
if (packageJson.name) {
|
|
108281
|
+
name = packageJson.name;
|
|
108282
|
+
}
|
|
108283
|
+
if (packageJson.namespace) {
|
|
108284
|
+
namespace = packageJson.namespace;
|
|
108285
|
+
}
|
|
108286
|
+
if (packageJson.repository?.url) {
|
|
108287
|
+
repository = packageJson.repository?.url;
|
|
108288
|
+
}
|
|
108289
|
+
if (packageJson.license) {
|
|
108290
|
+
license = packageJson.license;
|
|
108291
|
+
}
|
|
108292
|
+
if (packageJson.homepage) {
|
|
108293
|
+
homepage = packageJson.homepage;
|
|
108294
|
+
}
|
|
108295
|
+
}
|
|
108224
108296
|
}
|
|
108225
|
-
return (
|
|
108226
|
-
|
|
108227
|
-
|
|
108228
|
-
|
|
108229
|
-
|
|
108230
|
-
|
|
108231
|
-
|
|
108232
|
-
|
|
108233
|
-
|
|
108234
|
-
|
|
108235
|
-
|
|
108236
|
-
|
|
108237
|
-
|
|
108238
|
-
|
|
108239
|
-
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
108240
|
-
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
108241
|
-
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
108242
|
-
var getStopwatch = (name) => {
|
|
108243
|
-
const start = process.hrtime();
|
|
108244
|
-
return () => {
|
|
108245
|
-
const end = process.hrtime(start);
|
|
108246
|
-
console.info(
|
|
108247
|
-
chalk.dim(
|
|
108248
|
-
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
108249
|
-
end[0] * 1e3 + end[1] / 1e6
|
|
108250
|
-
)}ms to complete`
|
|
108251
|
-
)
|
|
108252
|
-
);
|
|
108253
|
-
};
|
|
108297
|
+
return StormConfigSchema.parse({
|
|
108298
|
+
...DefaultStormConfig,
|
|
108299
|
+
...config,
|
|
108300
|
+
colors: { ...DefaultColorConfig, ...config.colors },
|
|
108301
|
+
workspaceRoot,
|
|
108302
|
+
name,
|
|
108303
|
+
namespace,
|
|
108304
|
+
repository,
|
|
108305
|
+
license: license ?? DefaultStormConfig.license,
|
|
108306
|
+
homepage: homepage ?? DefaultStormConfig.homepage,
|
|
108307
|
+
extensions: {
|
|
108308
|
+
...config.extensions
|
|
108309
|
+
}
|
|
108310
|
+
});
|
|
108254
108311
|
};
|
|
108255
108312
|
|
|
108256
108313
|
// packages/config-tools/src/env/set-env.ts
|
|
@@ -108440,39 +108497,21 @@ var getConfigEnv = () => {
|
|
|
108440
108497
|
|
|
108441
108498
|
// packages/config-tools/src/create-storm-config.ts
|
|
108442
108499
|
var loadStormConfig = async (workspaceRoot) => {
|
|
108500
|
+
let config = {};
|
|
108443
108501
|
let _workspaceRoot = workspaceRoot;
|
|
108444
108502
|
if (!_workspaceRoot) {
|
|
108445
108503
|
_workspaceRoot = findWorkspaceRoot();
|
|
108446
108504
|
}
|
|
108447
|
-
|
|
108448
|
-
|
|
108449
|
-
|
|
108450
|
-
|
|
108451
|
-
|
|
108452
|
-
|
|
108453
|
-
|
|
108454
|
-
|
|
108455
|
-
|
|
108456
|
-
info: process.env.STORM_COLOR_INFO ?? configFile.colors?.info,
|
|
108457
|
-
warning: process.env.STORM_COLOR_WARNING ?? configFile.colors?.warning,
|
|
108458
|
-
error: process.env.STORM_COLOR_ERROR ?? configFile.colors?.error,
|
|
108459
|
-
fatal: process.env.STORM_COLOR_FATAL ?? configFile.colors?.fatal
|
|
108460
|
-
};
|
|
108461
|
-
} else {
|
|
108462
|
-
configFile[key] = configEnv[key];
|
|
108463
|
-
}
|
|
108464
|
-
}
|
|
108465
|
-
}
|
|
108466
|
-
const config = StormConfigSchema.parse(configFile);
|
|
108505
|
+
config = StormConfigSchema.parse(
|
|
108506
|
+
await getDefaultConfig(
|
|
108507
|
+
{
|
|
108508
|
+
...await getConfigFile(_workspaceRoot),
|
|
108509
|
+
...getConfigEnv()
|
|
108510
|
+
},
|
|
108511
|
+
_workspaceRoot
|
|
108512
|
+
)
|
|
108513
|
+
);
|
|
108467
108514
|
setConfigEnv(config);
|
|
108468
|
-
console.debug("\r\n\r\n");
|
|
108469
|
-
console.debug(`Loaded Storm config from ${config.configFile}`);
|
|
108470
|
-
for (const key of Object.keys(configFile)) {
|
|
108471
|
-
console.debug(`
|
|
108472
|
-
----- ${key} ----- `);
|
|
108473
|
-
console.debug(configFile[key]);
|
|
108474
|
-
}
|
|
108475
|
-
console.debug("\r\n\r\n");
|
|
108476
108515
|
return config;
|
|
108477
108516
|
};
|
|
108478
108517
|
|
|
@@ -108689,9 +108728,9 @@ ${commentStart} ----------------------------------------------------------------
|
|
|
108689
108728
|
};
|
|
108690
108729
|
|
|
108691
108730
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
108692
|
-
var
|
|
108731
|
+
var import_node_fs3 = require("node:fs");
|
|
108693
108732
|
var import_promises2 = require("node:fs/promises");
|
|
108694
|
-
var
|
|
108733
|
+
var import_node_path3 = require("node:path");
|
|
108695
108734
|
var import_esbuild_decorators = __toESM(require_src());
|
|
108696
108735
|
var import_devkit2 = __toESM(require_devkit());
|
|
108697
108736
|
var import_js = __toESM(require_src2());
|
|
@@ -115337,7 +115376,7 @@ ${externalDependencies.map((dep) => {
|
|
|
115337
115376
|
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_devkit2.joinPathFragments)("packages", context.projectName);
|
|
115338
115377
|
const packageJsonPath = (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "package.json");
|
|
115339
115378
|
writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
115340
|
-
(0,
|
|
115379
|
+
(0, import_node_fs3.writeFileSync)(
|
|
115341
115380
|
packageJsonPath,
|
|
115342
115381
|
await (0, import_prettier.format)(JSON.stringify(packageJson), {
|
|
115343
115382
|
...prettierOptions,
|
|
@@ -115361,7 +115400,7 @@ ${externalDependencies.map((dep) => {
|
|
|
115361
115400
|
await (0, import_prettier.format)(
|
|
115362
115401
|
`${options.banner ? options.banner.startsWith("//") ? options.banner : `// ${options.banner}` : ""}
|
|
115363
115402
|
|
|
115364
|
-
${(0,
|
|
115403
|
+
${(0, import_node_fs3.readFileSync)(file, "utf-8")}`,
|
|
115365
115404
|
{
|
|
115366
115405
|
...prettierOptions,
|
|
115367
115406
|
parser: "typescript"
|
|
@@ -115470,7 +115509,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
|
115470
115509
|
}
|
|
115471
115510
|
},
|
|
115472
115511
|
ts.sys,
|
|
115473
|
-
(0,
|
|
115512
|
+
(0, import_node_path3.dirname)(options.tsConfig)
|
|
115474
115513
|
);
|
|
115475
115514
|
tsConfig.options.pathsBasePath = workspaceRoot;
|
|
115476
115515
|
if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
|