@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.45.1",
3
+ "version": "1.45.2",
4
4
  "private": false,
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "keywords": [
package/src/base/index.js CHANGED
@@ -34308,7 +34308,7 @@ var require_jsonfile = __commonJS({
34308
34308
  return obj;
34309
34309
  }
34310
34310
  var readFile = universalify.fromPromise(_readFile);
34311
- function readFileSync(file, options = {}) {
34311
+ function readFileSync2(file, options = {}) {
34312
34312
  if (typeof options === "string") {
34313
34313
  options = { encoding: options };
34314
34314
  }
@@ -34340,7 +34340,7 @@ var require_jsonfile = __commonJS({
34340
34340
  }
34341
34341
  var jsonfile = {
34342
34342
  readFile,
34343
- readFileSync,
34343
+ readFileSync: readFileSync2,
34344
34344
  writeFile,
34345
34345
  writeFileSync
34346
34346
  };
@@ -43484,6 +43484,189 @@ module.exports = __toCommonJS(base_exports);
43484
43484
 
43485
43485
  // packages/config-tools/src/config-file/get-config-file.ts
43486
43486
  var import_cosmiconfig = __toESM(require_dist(), 1);
43487
+
43488
+ // packages/config-tools/src/utilities/logger.ts
43489
+ var chalk = __toESM(require_source(), 1);
43490
+
43491
+ // packages/config-tools/src/types.ts
43492
+ var LogLevel = {
43493
+ SILENT: 0,
43494
+ FATAL: 10,
43495
+ ERROR: 20,
43496
+ WARN: 30,
43497
+ INFO: 40,
43498
+ SUCCESS: 45,
43499
+ DEBUG: 60,
43500
+ TRACE: 70,
43501
+ ALL: 100
43502
+ };
43503
+ var LogLevelLabel = {
43504
+ SILENT: "silent",
43505
+ FATAL: "fatal",
43506
+ ERROR: "error",
43507
+ WARN: "warn",
43508
+ INFO: "info",
43509
+ DEBUG: "debug",
43510
+ TRACE: "trace",
43511
+ ALL: "all"
43512
+ };
43513
+
43514
+ // packages/config-tools/src/utilities/get-log-level.ts
43515
+ var getLogLevel = (label) => {
43516
+ switch (label) {
43517
+ case "all":
43518
+ return LogLevel.ALL;
43519
+ case "trace":
43520
+ return LogLevel.TRACE;
43521
+ case "debug":
43522
+ return LogLevel.DEBUG;
43523
+ case "info":
43524
+ return LogLevel.INFO;
43525
+ case "warn":
43526
+ return LogLevel.WARN;
43527
+ case "error":
43528
+ return LogLevel.ERROR;
43529
+ case "fatal":
43530
+ return LogLevel.FATAL;
43531
+ case "silent":
43532
+ return LogLevel.SILENT;
43533
+ default:
43534
+ return LogLevel.INFO;
43535
+ }
43536
+ };
43537
+ var getLogLevelLabel = (logLevel) => {
43538
+ if (logLevel >= LogLevel.ALL) {
43539
+ return LogLevelLabel.ALL;
43540
+ }
43541
+ if (logLevel >= LogLevel.TRACE) {
43542
+ return LogLevelLabel.TRACE;
43543
+ }
43544
+ if (logLevel >= LogLevel.DEBUG) {
43545
+ return LogLevelLabel.DEBUG;
43546
+ }
43547
+ if (logLevel >= LogLevel.INFO) {
43548
+ return LogLevelLabel.INFO;
43549
+ }
43550
+ if (logLevel >= LogLevel.WARN) {
43551
+ return LogLevelLabel.WARN;
43552
+ }
43553
+ if (logLevel >= LogLevel.ERROR) {
43554
+ return LogLevelLabel.ERROR;
43555
+ }
43556
+ if (logLevel >= LogLevel.FATAL) {
43557
+ return LogLevelLabel.FATAL;
43558
+ }
43559
+ if (logLevel <= LogLevel.SILENT) {
43560
+ return LogLevelLabel.SILENT;
43561
+ }
43562
+ return LogLevelLabel.INFO;
43563
+ };
43564
+
43565
+ // packages/config-tools/src/utilities/logger.ts
43566
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
43567
+ 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)) {
43568
+ return (_) => {
43569
+ };
43570
+ }
43571
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
43572
+ return (message) => {
43573
+ console.error(
43574
+ `
43575
+ ${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(
43576
+ config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
43577
+ )(message)}
43578
+
43579
+ `
43580
+ );
43581
+ };
43582
+ }
43583
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
43584
+ return (message) => {
43585
+ console.error(
43586
+ `
43587
+ ${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(
43588
+ config?.colors?.error ? config.colors.error : "#7d1a1a"
43589
+ )(message)}
43590
+ `
43591
+ );
43592
+ };
43593
+ }
43594
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
43595
+ return (message) => {
43596
+ console.warn(
43597
+ `
43598
+ ${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(
43599
+ config?.colors?.warning ? config.colors.warning : "#fcc419"
43600
+ )(message)}
43601
+ `
43602
+ );
43603
+ };
43604
+ }
43605
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
43606
+ return (message) => {
43607
+ console.info(
43608
+ `
43609
+ ${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(
43610
+ config?.colors?.info ? config.colors.info : "#0ea5e9"
43611
+ )(message)}
43612
+ `
43613
+ );
43614
+ };
43615
+ }
43616
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
43617
+ return (message) => {
43618
+ console.info(
43619
+ `
43620
+ ${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(
43621
+ config?.colors?.success ? config.colors.success : "#087f5b"
43622
+ )(message)}
43623
+ `
43624
+ );
43625
+ };
43626
+ }
43627
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
43628
+ return (message) => {
43629
+ console.debug(
43630
+ `
43631
+ ${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(
43632
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
43633
+ )(message)}
43634
+ `
43635
+ );
43636
+ };
43637
+ }
43638
+ return (message) => {
43639
+ console.log(
43640
+ `
43641
+ ${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(
43642
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
43643
+ )(message)}
43644
+ `
43645
+ );
43646
+ };
43647
+ };
43648
+ var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
43649
+ var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
43650
+ var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
43651
+ var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
43652
+ var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
43653
+ var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
43654
+ var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
43655
+ var getStopwatch = (name) => {
43656
+ const start = process.hrtime();
43657
+ return () => {
43658
+ const end = process.hrtime(start);
43659
+ console.info(
43660
+ chalk.dim(
43661
+ `\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
43662
+ end[0] * 1e3 + end[1] / 1e6
43663
+ )}ms to complete`
43664
+ )
43665
+ );
43666
+ };
43667
+ };
43668
+
43669
+ // packages/config-tools/src/config-file/get-config-file.ts
43487
43670
  var _static_cache = void 0;
43488
43671
  var getConfigFileName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
43489
43672
  var getConfigFile = async (filePath) => {
@@ -43510,6 +43693,10 @@ var getConfigFile = async (filePath) => {
43510
43693
  console.warn(
43511
43694
  "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."
43512
43695
  );
43696
+ writeWarning(
43697
+ { logLevel: "error" },
43698
+ "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."
43699
+ );
43513
43700
  return void 0;
43514
43701
  }
43515
43702
  const config = cosmiconfigResult.config ?? {};
@@ -43590,6 +43777,10 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
43590
43777
  return result;
43591
43778
  }
43592
43779
 
43780
+ // packages/config-tools/src/utilities/get-default-config.ts
43781
+ var import_node_fs2 = require("node:fs");
43782
+ var import_node_path2 = require("node:path");
43783
+
43593
43784
  // node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
43594
43785
  var util;
43595
43786
  (function(util2) {
@@ -47250,183 +47441,50 @@ var DefaultStormConfig = {
47250
47441
  colors: { ...DefaultColorConfig },
47251
47442
  extensions: {}
47252
47443
  };
47253
-
47254
- // packages/config-tools/src/types.ts
47255
- var LogLevel = {
47256
- SILENT: 0,
47257
- FATAL: 10,
47258
- ERROR: 20,
47259
- WARN: 30,
47260
- INFO: 40,
47261
- SUCCESS: 45,
47262
- DEBUG: 60,
47263
- TRACE: 70,
47264
- ALL: 100
47265
- };
47266
- var LogLevelLabel = {
47267
- SILENT: "silent",
47268
- FATAL: "fatal",
47269
- ERROR: "error",
47270
- WARN: "warn",
47271
- INFO: "info",
47272
- DEBUG: "debug",
47273
- TRACE: "trace",
47274
- ALL: "all"
47275
- };
47276
-
47277
- // packages/config-tools/src/utilities/get-log-level.ts
47278
- var getLogLevel = (label) => {
47279
- switch (label) {
47280
- case "all":
47281
- return LogLevel.ALL;
47282
- case "trace":
47283
- return LogLevel.TRACE;
47284
- case "debug":
47285
- return LogLevel.DEBUG;
47286
- case "info":
47287
- return LogLevel.INFO;
47288
- case "warn":
47289
- return LogLevel.WARN;
47290
- case "error":
47291
- return LogLevel.ERROR;
47292
- case "fatal":
47293
- return LogLevel.FATAL;
47294
- case "silent":
47295
- return LogLevel.SILENT;
47296
- default:
47297
- return LogLevel.INFO;
47298
- }
47299
- };
47300
- var getLogLevelLabel = (logLevel) => {
47301
- if (logLevel >= LogLevel.ALL) {
47302
- return LogLevelLabel.ALL;
47303
- }
47304
- if (logLevel >= LogLevel.TRACE) {
47305
- return LogLevelLabel.TRACE;
47306
- }
47307
- if (logLevel >= LogLevel.DEBUG) {
47308
- return LogLevelLabel.DEBUG;
47309
- }
47310
- if (logLevel >= LogLevel.INFO) {
47311
- return LogLevelLabel.INFO;
47312
- }
47313
- if (logLevel >= LogLevel.WARN) {
47314
- return LogLevelLabel.WARN;
47315
- }
47316
- if (logLevel >= LogLevel.ERROR) {
47317
- return LogLevelLabel.ERROR;
47318
- }
47319
- if (logLevel >= LogLevel.FATAL) {
47320
- return LogLevelLabel.FATAL;
47321
- }
47322
- if (logLevel <= LogLevel.SILENT) {
47323
- return LogLevelLabel.SILENT;
47324
- }
47325
- return LogLevelLabel.INFO;
47326
- };
47327
-
47328
- // packages/config-tools/src/utilities/logger.ts
47329
- var chalk = __toESM(require_source(), 1);
47330
- var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
47331
- 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)) {
47332
- return (_) => {
47333
- };
47334
- }
47335
- if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
47336
- return (message) => {
47337
- console.error(
47338
- `
47339
- ${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(
47340
- config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
47341
- )(message)}
47342
-
47343
- `
47344
- );
47345
- };
47346
- }
47347
- if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
47348
- return (message) => {
47349
- console.error(
47350
- `
47351
- ${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(
47352
- config?.colors?.error ? config.colors.error : "#7d1a1a"
47353
- )(message)}
47354
- `
47355
- );
47356
- };
47357
- }
47358
- if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
47359
- return (message) => {
47360
- console.warn(
47361
- `
47362
- ${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(
47363
- config?.colors?.warning ? config.colors.warning : "#fcc419"
47364
- )(message)}
47365
- `
47366
- );
47367
- };
47368
- }
47369
- if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
47370
- return (message) => {
47371
- console.info(
47372
- `
47373
- ${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(
47374
- config?.colors?.info ? config.colors.info : "#0ea5e9"
47375
- )(message)}
47376
- `
47377
- );
47378
- };
47379
- }
47380
- if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
47381
- return (message) => {
47382
- console.info(
47383
- `
47384
- ${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(
47385
- config?.colors?.success ? config.colors.success : "#087f5b"
47386
- )(message)}
47387
- `
47388
- );
47389
- };
47390
- }
47391
- if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
47392
- return (message) => {
47393
- console.debug(
47394
- `
47395
- ${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(
47396
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
47397
- )(message)}
47398
- `
47399
- );
47400
- };
47444
+ var getDefaultConfig = (config = {}, root) => {
47445
+ let name = "storm-workspace";
47446
+ let namespace = "storm-software";
47447
+ let repository = "https://github.com/storm-software/storm-ops";
47448
+ let license = DefaultStormConfig.license;
47449
+ let homepage = DefaultStormConfig.homepage;
47450
+ const workspaceRoot = findWorkspaceRoot(root);
47451
+ if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
47452
+ const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
47453
+ encoding: "utf-8"
47454
+ });
47455
+ if (file) {
47456
+ const packageJson = JSON.parse(file);
47457
+ if (packageJson.name) {
47458
+ name = packageJson.name;
47459
+ }
47460
+ if (packageJson.namespace) {
47461
+ namespace = packageJson.namespace;
47462
+ }
47463
+ if (packageJson.repository?.url) {
47464
+ repository = packageJson.repository?.url;
47465
+ }
47466
+ if (packageJson.license) {
47467
+ license = packageJson.license;
47468
+ }
47469
+ if (packageJson.homepage) {
47470
+ homepage = packageJson.homepage;
47471
+ }
47472
+ }
47401
47473
  }
47402
- return (message) => {
47403
- console.log(
47404
- `
47405
- ${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(
47406
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
47407
- )(message)}
47408
- `
47409
- );
47410
- };
47411
- };
47412
- var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
47413
- var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
47414
- var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
47415
- var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
47416
- var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
47417
- var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
47418
- var getStopwatch = (name) => {
47419
- const start = process.hrtime();
47420
- return () => {
47421
- const end = process.hrtime(start);
47422
- console.info(
47423
- chalk.dim(
47424
- `\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
47425
- end[0] * 1e3 + end[1] / 1e6
47426
- )}ms to complete`
47427
- )
47428
- );
47429
- };
47474
+ return StormConfigSchema.parse({
47475
+ ...DefaultStormConfig,
47476
+ ...config,
47477
+ colors: { ...DefaultColorConfig, ...config.colors },
47478
+ workspaceRoot,
47479
+ name,
47480
+ namespace,
47481
+ repository,
47482
+ license: license ?? DefaultStormConfig.license,
47483
+ homepage: homepage ?? DefaultStormConfig.homepage,
47484
+ extensions: {
47485
+ ...config.extensions
47486
+ }
47487
+ });
47430
47488
  };
47431
47489
 
47432
47490
  // packages/config-tools/src/env/set-env.ts
@@ -47616,39 +47674,21 @@ var getConfigEnv = () => {
47616
47674
 
47617
47675
  // packages/config-tools/src/create-storm-config.ts
47618
47676
  var loadStormConfig = async (workspaceRoot) => {
47677
+ let config = {};
47619
47678
  let _workspaceRoot = workspaceRoot;
47620
47679
  if (!_workspaceRoot) {
47621
47680
  _workspaceRoot = findWorkspaceRoot();
47622
47681
  }
47623
- const configFile = await getConfigFile(_workspaceRoot);
47624
- const configEnv = getConfigEnv();
47625
- for (const key of Object.keys(configEnv)) {
47626
- if (configEnv[key] !== void 0 && configEnv[key] !== null) {
47627
- if (key === "colors") {
47628
- configFile.colors = {
47629
- primary: process.env.STORM_COLOR_PRIMARY ?? configFile.colors?.primary,
47630
- background: process.env.STORM_COLOR_BACKGROUND ?? configFile.colors?.background,
47631
- success: process.env.STORM_COLOR_SUCCESS ?? configFile.colors?.success,
47632
- info: process.env.STORM_COLOR_INFO ?? configFile.colors?.info,
47633
- warning: process.env.STORM_COLOR_WARNING ?? configFile.colors?.warning,
47634
- error: process.env.STORM_COLOR_ERROR ?? configFile.colors?.error,
47635
- fatal: process.env.STORM_COLOR_FATAL ?? configFile.colors?.fatal
47636
- };
47637
- } else {
47638
- configFile[key] = configEnv[key];
47639
- }
47640
- }
47641
- }
47642
- const config = StormConfigSchema.parse(configFile);
47682
+ config = StormConfigSchema.parse(
47683
+ await getDefaultConfig(
47684
+ {
47685
+ ...await getConfigFile(_workspaceRoot),
47686
+ ...getConfigEnv()
47687
+ },
47688
+ _workspaceRoot
47689
+ )
47690
+ );
47643
47691
  setConfigEnv(config);
47644
- console.debug("\r\n\r\n");
47645
- console.debug(`Loaded Storm config from ${config.configFile}`);
47646
- for (const key of Object.keys(configFile)) {
47647
- console.debug(`
47648
- ----- ${key} ----- `);
47649
- console.debug(configFile[key]);
47650
- }
47651
- console.debug("\r\n\r\n");
47652
47692
  return config;
47653
47693
  };
47654
47694