@storm-software/workspace-tools 1.45.0 → 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.
@@ -9947,7 +9947,7 @@ var require_jsonfile = __commonJS({
9947
9947
  return obj;
9948
9948
  }
9949
9949
  var readFile = universalify.fromPromise(_readFile);
9950
- function readFileSync(file, options = {}) {
9950
+ function readFileSync2(file, options = {}) {
9951
9951
  if (typeof options === "string") {
9952
9952
  options = { encoding: options };
9953
9953
  }
@@ -9979,7 +9979,7 @@ var require_jsonfile = __commonJS({
9979
9979
  }
9980
9980
  var jsonfile = {
9981
9981
  readFile,
9982
- readFileSync,
9982
+ readFileSync: readFileSync2,
9983
9983
  writeFile,
9984
9984
  writeFileSync
9985
9985
  };
@@ -17210,7 +17210,7 @@ var require_TransformerError = __commonJS({
17210
17210
  TransformerError2.from = function(method) {
17211
17211
  return function(errors) {
17212
17212
  var body = errors.map(function(e) {
17213
- var subject = e.explore.object === null ? "" : join2(e.explore.object)(e.explore.property);
17213
+ var subject = e.explore.object === null ? "" : join3(e.explore.object)(e.explore.property);
17214
17214
  var type = "".concat(subject.length ? "".concat(subject, ": ") : "").concat(e.name);
17215
17215
  return "- ".concat(type, "\n").concat(e.messages.map(function(msg) {
17216
17216
  return " - ".concat(msg);
@@ -17222,7 +17222,7 @@ var require_TransformerError = __commonJS({
17222
17222
  });
17223
17223
  };
17224
17224
  };
17225
- var join2 = function(object) {
17225
+ var join3 = function(object) {
17226
17226
  return function(key) {
17227
17227
  if (key === null)
17228
17228
  return object.name;
@@ -23302,13 +23302,13 @@ var require_application_object = __commonJS({
23302
23302
  return __assign(__assign({ type: "object", properties, nullable: options.purpose === "swagger" ? nullable : void 0, required: required.length ? required : void 0, description: obj.description }, options.surplus ? { "x-typia-jsDocTags": obj.jsDocTags } : {}), options.purpose === "ajv" ? extraProps : options.surplus ? {
23303
23303
  "x-typia-additionalProperties": extraProps.additionalProperties,
23304
23304
  "x-typia-patternProperties": extraProps.patternProperties,
23305
- additionalProperties: join2(options)(components)(extraMeta)
23305
+ additionalProperties: join3(options)(components)(extraMeta)
23306
23306
  } : {});
23307
23307
  };
23308
23308
  };
23309
23309
  };
23310
23310
  };
23311
- var join2 = function(options) {
23311
+ var join3 = function(options) {
23312
23312
  return function(components) {
23313
23313
  return function(extra) {
23314
23314
  var _a;
@@ -32719,6 +32719,189 @@ module.exports = __toCommonJS(executor_exports);
32719
32719
 
32720
32720
  // packages/config-tools/src/config-file/get-config-file.ts
32721
32721
  var import_cosmiconfig = __toESM(require_dist(), 1);
32722
+
32723
+ // packages/config-tools/src/utilities/logger.ts
32724
+ var chalk = __toESM(require_source(), 1);
32725
+
32726
+ // packages/config-tools/src/types.ts
32727
+ var LogLevel = {
32728
+ SILENT: 0,
32729
+ FATAL: 10,
32730
+ ERROR: 20,
32731
+ WARN: 30,
32732
+ INFO: 40,
32733
+ SUCCESS: 45,
32734
+ DEBUG: 60,
32735
+ TRACE: 70,
32736
+ ALL: 100
32737
+ };
32738
+ var LogLevelLabel = {
32739
+ SILENT: "silent",
32740
+ FATAL: "fatal",
32741
+ ERROR: "error",
32742
+ WARN: "warn",
32743
+ INFO: "info",
32744
+ DEBUG: "debug",
32745
+ TRACE: "trace",
32746
+ ALL: "all"
32747
+ };
32748
+
32749
+ // packages/config-tools/src/utilities/get-log-level.ts
32750
+ var getLogLevel = (label) => {
32751
+ switch (label) {
32752
+ case "all":
32753
+ return LogLevel.ALL;
32754
+ case "trace":
32755
+ return LogLevel.TRACE;
32756
+ case "debug":
32757
+ return LogLevel.DEBUG;
32758
+ case "info":
32759
+ return LogLevel.INFO;
32760
+ case "warn":
32761
+ return LogLevel.WARN;
32762
+ case "error":
32763
+ return LogLevel.ERROR;
32764
+ case "fatal":
32765
+ return LogLevel.FATAL;
32766
+ case "silent":
32767
+ return LogLevel.SILENT;
32768
+ default:
32769
+ return LogLevel.INFO;
32770
+ }
32771
+ };
32772
+ var getLogLevelLabel = (logLevel) => {
32773
+ if (logLevel >= LogLevel.ALL) {
32774
+ return LogLevelLabel.ALL;
32775
+ }
32776
+ if (logLevel >= LogLevel.TRACE) {
32777
+ return LogLevelLabel.TRACE;
32778
+ }
32779
+ if (logLevel >= LogLevel.DEBUG) {
32780
+ return LogLevelLabel.DEBUG;
32781
+ }
32782
+ if (logLevel >= LogLevel.INFO) {
32783
+ return LogLevelLabel.INFO;
32784
+ }
32785
+ if (logLevel >= LogLevel.WARN) {
32786
+ return LogLevelLabel.WARN;
32787
+ }
32788
+ if (logLevel >= LogLevel.ERROR) {
32789
+ return LogLevelLabel.ERROR;
32790
+ }
32791
+ if (logLevel >= LogLevel.FATAL) {
32792
+ return LogLevelLabel.FATAL;
32793
+ }
32794
+ if (logLevel <= LogLevel.SILENT) {
32795
+ return LogLevelLabel.SILENT;
32796
+ }
32797
+ return LogLevelLabel.INFO;
32798
+ };
32799
+
32800
+ // packages/config-tools/src/utilities/logger.ts
32801
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
32802
+ 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)) {
32803
+ return (_) => {
32804
+ };
32805
+ }
32806
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
32807
+ return (message) => {
32808
+ console.error(
32809
+ `
32810
+ ${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(
32811
+ config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
32812
+ )(message)}
32813
+
32814
+ `
32815
+ );
32816
+ };
32817
+ }
32818
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
32819
+ return (message) => {
32820
+ console.error(
32821
+ `
32822
+ ${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(
32823
+ config?.colors?.error ? config.colors.error : "#7d1a1a"
32824
+ )(message)}
32825
+ `
32826
+ );
32827
+ };
32828
+ }
32829
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
32830
+ return (message) => {
32831
+ console.warn(
32832
+ `
32833
+ ${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(
32834
+ config?.colors?.warning ? config.colors.warning : "#fcc419"
32835
+ )(message)}
32836
+ `
32837
+ );
32838
+ };
32839
+ }
32840
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
32841
+ return (message) => {
32842
+ console.info(
32843
+ `
32844
+ ${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(
32845
+ config?.colors?.info ? config.colors.info : "#0ea5e9"
32846
+ )(message)}
32847
+ `
32848
+ );
32849
+ };
32850
+ }
32851
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
32852
+ return (message) => {
32853
+ console.info(
32854
+ `
32855
+ ${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(
32856
+ config?.colors?.success ? config.colors.success : "#087f5b"
32857
+ )(message)}
32858
+ `
32859
+ );
32860
+ };
32861
+ }
32862
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
32863
+ return (message) => {
32864
+ console.debug(
32865
+ `
32866
+ ${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(
32867
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
32868
+ )(message)}
32869
+ `
32870
+ );
32871
+ };
32872
+ }
32873
+ return (message) => {
32874
+ console.log(
32875
+ `
32876
+ ${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(
32877
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
32878
+ )(message)}
32879
+ `
32880
+ );
32881
+ };
32882
+ };
32883
+ var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
32884
+ var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
32885
+ var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
32886
+ var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
32887
+ var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
32888
+ var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
32889
+ var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
32890
+ var getStopwatch = (name) => {
32891
+ const start = process.hrtime();
32892
+ return () => {
32893
+ const end = process.hrtime(start);
32894
+ console.info(
32895
+ chalk.dim(
32896
+ `\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
32897
+ end[0] * 1e3 + end[1] / 1e6
32898
+ )}ms to complete`
32899
+ )
32900
+ );
32901
+ };
32902
+ };
32903
+
32904
+ // packages/config-tools/src/config-file/get-config-file.ts
32722
32905
  var _static_cache = void 0;
32723
32906
  var getConfigFileName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
32724
32907
  var getConfigFile = async (filePath) => {
@@ -32745,6 +32928,10 @@ var getConfigFile = async (filePath) => {
32745
32928
  console.warn(
32746
32929
  "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."
32747
32930
  );
32931
+ writeWarning(
32932
+ { logLevel: "error" },
32933
+ "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."
32934
+ );
32748
32935
  return void 0;
32749
32936
  }
32750
32937
  const config = cosmiconfigResult.config ?? {};
@@ -32825,6 +33012,10 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
32825
33012
  return result;
32826
33013
  }
32827
33014
 
33015
+ // packages/config-tools/src/utilities/get-default-config.ts
33016
+ var import_node_fs2 = require("node:fs");
33017
+ var import_node_path2 = require("node:path");
33018
+
32828
33019
  // node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
32829
33020
  var util;
32830
33021
  (function(util2) {
@@ -36485,183 +36676,50 @@ var DefaultStormConfig = {
36485
36676
  colors: { ...DefaultColorConfig },
36486
36677
  extensions: {}
36487
36678
  };
36488
-
36489
- // packages/config-tools/src/types.ts
36490
- var LogLevel = {
36491
- SILENT: 0,
36492
- FATAL: 10,
36493
- ERROR: 20,
36494
- WARN: 30,
36495
- INFO: 40,
36496
- SUCCESS: 45,
36497
- DEBUG: 60,
36498
- TRACE: 70,
36499
- ALL: 100
36500
- };
36501
- var LogLevelLabel = {
36502
- SILENT: "silent",
36503
- FATAL: "fatal",
36504
- ERROR: "error",
36505
- WARN: "warn",
36506
- INFO: "info",
36507
- DEBUG: "debug",
36508
- TRACE: "trace",
36509
- ALL: "all"
36510
- };
36511
-
36512
- // packages/config-tools/src/utilities/get-log-level.ts
36513
- var getLogLevel = (label) => {
36514
- switch (label) {
36515
- case "all":
36516
- return LogLevel.ALL;
36517
- case "trace":
36518
- return LogLevel.TRACE;
36519
- case "debug":
36520
- return LogLevel.DEBUG;
36521
- case "info":
36522
- return LogLevel.INFO;
36523
- case "warn":
36524
- return LogLevel.WARN;
36525
- case "error":
36526
- return LogLevel.ERROR;
36527
- case "fatal":
36528
- return LogLevel.FATAL;
36529
- case "silent":
36530
- return LogLevel.SILENT;
36531
- default:
36532
- return LogLevel.INFO;
36533
- }
36534
- };
36535
- var getLogLevelLabel = (logLevel) => {
36536
- if (logLevel >= LogLevel.ALL) {
36537
- return LogLevelLabel.ALL;
36538
- }
36539
- if (logLevel >= LogLevel.TRACE) {
36540
- return LogLevelLabel.TRACE;
36541
- }
36542
- if (logLevel >= LogLevel.DEBUG) {
36543
- return LogLevelLabel.DEBUG;
36544
- }
36545
- if (logLevel >= LogLevel.INFO) {
36546
- return LogLevelLabel.INFO;
36547
- }
36548
- if (logLevel >= LogLevel.WARN) {
36549
- return LogLevelLabel.WARN;
36550
- }
36551
- if (logLevel >= LogLevel.ERROR) {
36552
- return LogLevelLabel.ERROR;
36553
- }
36554
- if (logLevel >= LogLevel.FATAL) {
36555
- return LogLevelLabel.FATAL;
36556
- }
36557
- if (logLevel <= LogLevel.SILENT) {
36558
- return LogLevelLabel.SILENT;
36559
- }
36560
- return LogLevelLabel.INFO;
36561
- };
36562
-
36563
- // packages/config-tools/src/utilities/logger.ts
36564
- var chalk = __toESM(require_source(), 1);
36565
- var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
36566
- 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)) {
36567
- return (_) => {
36568
- };
36569
- }
36570
- if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
36571
- return (message) => {
36572
- console.error(
36573
- `
36574
- ${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(
36575
- config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
36576
- )(message)}
36577
-
36578
- `
36579
- );
36580
- };
36581
- }
36582
- if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
36583
- return (message) => {
36584
- console.error(
36585
- `
36586
- ${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(
36587
- config?.colors?.error ? config.colors.error : "#7d1a1a"
36588
- )(message)}
36589
- `
36590
- );
36591
- };
36592
- }
36593
- if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
36594
- return (message) => {
36595
- console.warn(
36596
- `
36597
- ${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(
36598
- config?.colors?.warning ? config.colors.warning : "#fcc419"
36599
- )(message)}
36600
- `
36601
- );
36602
- };
36603
- }
36604
- if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
36605
- return (message) => {
36606
- console.info(
36607
- `
36608
- ${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(
36609
- config?.colors?.info ? config.colors.info : "#0ea5e9"
36610
- )(message)}
36611
- `
36612
- );
36613
- };
36614
- }
36615
- if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
36616
- return (message) => {
36617
- console.info(
36618
- `
36619
- ${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(
36620
- config?.colors?.success ? config.colors.success : "#087f5b"
36621
- )(message)}
36622
- `
36623
- );
36624
- };
36625
- }
36626
- if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
36627
- return (message) => {
36628
- console.debug(
36629
- `
36630
- ${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(
36631
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
36632
- )(message)}
36633
- `
36634
- );
36635
- };
36679
+ var getDefaultConfig = (config = {}, root) => {
36680
+ let name = "storm-workspace";
36681
+ let namespace = "storm-software";
36682
+ let repository = "https://github.com/storm-software/storm-ops";
36683
+ let license = DefaultStormConfig.license;
36684
+ let homepage = DefaultStormConfig.homepage;
36685
+ const workspaceRoot = findWorkspaceRoot(root);
36686
+ if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
36687
+ const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
36688
+ encoding: "utf-8"
36689
+ });
36690
+ if (file) {
36691
+ const packageJson = JSON.parse(file);
36692
+ if (packageJson.name) {
36693
+ name = packageJson.name;
36694
+ }
36695
+ if (packageJson.namespace) {
36696
+ namespace = packageJson.namespace;
36697
+ }
36698
+ if (packageJson.repository?.url) {
36699
+ repository = packageJson.repository?.url;
36700
+ }
36701
+ if (packageJson.license) {
36702
+ license = packageJson.license;
36703
+ }
36704
+ if (packageJson.homepage) {
36705
+ homepage = packageJson.homepage;
36706
+ }
36707
+ }
36636
36708
  }
36637
- return (message) => {
36638
- console.log(
36639
- `
36640
- ${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(
36641
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
36642
- )(message)}
36643
- `
36644
- );
36645
- };
36646
- };
36647
- var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
36648
- var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
36649
- var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
36650
- var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
36651
- var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
36652
- var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
36653
- var getStopwatch = (name) => {
36654
- const start = process.hrtime();
36655
- return () => {
36656
- const end = process.hrtime(start);
36657
- console.info(
36658
- chalk.dim(
36659
- `\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
36660
- end[0] * 1e3 + end[1] / 1e6
36661
- )}ms to complete`
36662
- )
36663
- );
36664
- };
36709
+ return StormConfigSchema.parse({
36710
+ ...DefaultStormConfig,
36711
+ ...config,
36712
+ colors: { ...DefaultColorConfig, ...config.colors },
36713
+ workspaceRoot,
36714
+ name,
36715
+ namespace,
36716
+ repository,
36717
+ license: license ?? DefaultStormConfig.license,
36718
+ homepage: homepage ?? DefaultStormConfig.homepage,
36719
+ extensions: {
36720
+ ...config.extensions
36721
+ }
36722
+ });
36665
36723
  };
36666
36724
 
36667
36725
  // packages/config-tools/src/env/set-env.ts
@@ -36851,39 +36909,21 @@ var getConfigEnv = () => {
36851
36909
 
36852
36910
  // packages/config-tools/src/create-storm-config.ts
36853
36911
  var loadStormConfig = async (workspaceRoot) => {
36912
+ let config = {};
36854
36913
  let _workspaceRoot = workspaceRoot;
36855
36914
  if (!_workspaceRoot) {
36856
36915
  _workspaceRoot = findWorkspaceRoot();
36857
36916
  }
36858
- const configFile = await getConfigFile(_workspaceRoot);
36859
- const configEnv = getConfigEnv();
36860
- for (const key of Object.keys(configEnv)) {
36861
- if (configEnv[key] !== void 0 && configEnv[key] !== null) {
36862
- if (key === "colors") {
36863
- configFile.colors = {
36864
- primary: process.env.STORM_COLOR_PRIMARY ?? configFile.colors?.primary,
36865
- background: process.env.STORM_COLOR_BACKGROUND ?? configFile.colors?.background,
36866
- success: process.env.STORM_COLOR_SUCCESS ?? configFile.colors?.success,
36867
- info: process.env.STORM_COLOR_INFO ?? configFile.colors?.info,
36868
- warning: process.env.STORM_COLOR_WARNING ?? configFile.colors?.warning,
36869
- error: process.env.STORM_COLOR_ERROR ?? configFile.colors?.error,
36870
- fatal: process.env.STORM_COLOR_FATAL ?? configFile.colors?.fatal
36871
- };
36872
- } else {
36873
- configFile[key] = configEnv[key];
36874
- }
36875
- }
36876
- }
36877
- const config = StormConfigSchema.parse(configFile);
36917
+ config = StormConfigSchema.parse(
36918
+ await getDefaultConfig(
36919
+ {
36920
+ ...await getConfigFile(_workspaceRoot),
36921
+ ...getConfigEnv()
36922
+ },
36923
+ _workspaceRoot
36924
+ )
36925
+ );
36878
36926
  setConfigEnv(config);
36879
- console.debug("\r\n\r\n");
36880
- console.debug(`Loaded Storm config from ${config.configFile}`);
36881
- for (const key of Object.keys(configFile)) {
36882
- console.debug(`
36883
- ----- ${key} ----- `);
36884
- console.debug(configFile[key]);
36885
- }
36886
- console.debug("\r\n\r\n");
36887
36927
  return config;
36888
36928
  };
36889
36929