@storm-software/build-tools 0.135.5 → 0.136.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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-KJNY2WFO.mjs → chunk-4CEXR3WS.mjs} +1 -1
  3. package/dist/{chunk-HCFLWTVN.mjs → chunk-4QSSCZ4Z.mjs} +88 -39
  4. package/dist/{chunk-L7W4YZE4.js → chunk-6LPGL3E4.js} +2 -2
  5. package/dist/{chunk-RCQ3JZXR.mjs → chunk-AMQI4RIK.mjs} +10 -36
  6. package/dist/{chunk-QMLJ4YOF.js → chunk-BIVPMVHQ.js} +120 -71
  7. package/dist/{chunk-275E2SAD.js → chunk-DNAOERFD.js} +71 -72
  8. package/dist/{chunk-7TZNJMAB.js → chunk-DZ22WFPY.js} +8 -8
  9. package/dist/{chunk-DRXCFXBB.mjs → chunk-E6JPW774.mjs} +69 -70
  10. package/dist/{chunk-YXBRJJCU.js → chunk-FJUDK5FI.js} +5 -5
  11. package/dist/{chunk-TYWDA4EL.mjs → chunk-KJY2LZUC.mjs} +1 -1
  12. package/dist/{chunk-SZMRYRJK.mjs → chunk-QE75GUF6.mjs} +1 -1
  13. package/dist/{chunk-ASTOW4W7.mjs → chunk-ULC227WD.mjs} +1 -1
  14. package/dist/chunk-VKRZOCAB.js +67 -0
  15. package/dist/{chunk-SYSXNB3M.js → chunk-YHNGJ2PU.js} +8 -8
  16. package/dist/index.d.mts +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +9 -9
  19. package/dist/index.mjs +9 -9
  20. package/dist/plugins/analyze.js +3 -3
  21. package/dist/plugins/analyze.mjs +2 -2
  22. package/dist/plugins/index.js +4 -4
  23. package/dist/plugins/index.mjs +3 -3
  24. package/dist/plugins/ts-resolve.js +3 -3
  25. package/dist/plugins/ts-resolve.mjs +2 -2
  26. package/dist/{types-v0neDT-G.d.ts → types-Km4Ix66C.d.mts} +3 -3
  27. package/dist/{types-v0neDT-G.d.mts → types-Km4Ix66C.d.ts} +3 -3
  28. package/dist/types.d.mts +1 -1
  29. package/dist/types.d.ts +1 -1
  30. package/dist/utilities/copy-assets.d.mts +2 -2
  31. package/dist/utilities/copy-assets.d.ts +2 -2
  32. package/dist/utilities/copy-assets.js +3 -4
  33. package/dist/utilities/copy-assets.mjs +2 -3
  34. package/dist/utilities/generate-package-json.d.mts +1 -1
  35. package/dist/utilities/generate-package-json.d.ts +1 -1
  36. package/dist/utilities/generate-package-json.js +3 -3
  37. package/dist/utilities/generate-package-json.mjs +2 -2
  38. package/dist/utilities/get-entry-points.d.mts +1 -1
  39. package/dist/utilities/get-entry-points.d.ts +1 -1
  40. package/dist/utilities/get-entry-points.js +3 -3
  41. package/dist/utilities/get-entry-points.mjs +2 -2
  42. package/dist/utilities/get-env.d.mts +1 -1
  43. package/dist/utilities/get-env.d.ts +1 -1
  44. package/dist/utilities/index.d.mts +1 -1
  45. package/dist/utilities/index.d.ts +1 -1
  46. package/dist/utilities/index.js +7 -7
  47. package/dist/utilities/index.mjs +7 -7
  48. package/dist/utilities/read-nx-config.js +3 -3
  49. package/dist/utilities/read-nx-config.mjs +2 -2
  50. package/package.json +1 -1
  51. package/dist/chunk-D7IEQ7P2.js +0 -93
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.135.4-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.135.6-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -3,7 +3,7 @@ import {
3
3
  findWorkspaceRoot,
4
4
  joinPaths,
5
5
  writeDebug
6
- } from "./chunk-DRXCFXBB.mjs";
6
+ } from "./chunk-E6JPW774.mjs";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-O6YSETKJ.mjs";
@@ -4,6 +4,7 @@ import {
4
4
  STORM_DEFAULT_DOCS,
5
5
  STORM_DEFAULT_HOMEPAGE,
6
6
  STORM_DEFAULT_LICENSING,
7
+ StormConfigSchema,
7
8
  correctPaths,
8
9
  findWorkspaceRoot,
9
10
  formatLogMessage,
@@ -11,10 +12,9 @@ import {
11
12
  getLogLevel,
12
13
  getLogLevelLabel,
13
14
  joinPaths,
14
- writeSystem,
15
15
  writeTrace,
16
16
  writeWarning
17
- } from "./chunk-DRXCFXBB.mjs";
17
+ } from "./chunk-E6JPW774.mjs";
18
18
  import {
19
19
  __name
20
20
  } from "./chunk-O6YSETKJ.mjs";
@@ -24,19 +24,19 @@ import { loadConfig } from "c12";
24
24
  import defu from "defu";
25
25
  var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
26
26
  const workspacePath = filePath || findWorkspaceRoot(filePath);
27
- let config = await loadConfig({
28
- cwd: workspacePath,
29
- packageJson: true,
30
- name: fileName,
31
- envName: fileName?.toUpperCase(),
32
- jitiOptions: {
33
- debug: false,
34
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
35
- },
36
- ...options
37
- });
38
- if (!config || Object.keys(config).length === 0) {
39
- config = await loadConfig({
27
+ const configs = await Promise.all([
28
+ loadConfig({
29
+ cwd: workspacePath,
30
+ packageJson: true,
31
+ name: fileName,
32
+ envName: fileName?.toUpperCase(),
33
+ jitiOptions: {
34
+ debug: false,
35
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
36
+ },
37
+ ...options
38
+ }),
39
+ loadConfig({
40
40
  cwd: workspacePath,
41
41
  packageJson: true,
42
42
  name: fileName,
@@ -47,9 +47,9 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
47
47
  },
48
48
  configFile: fileName,
49
49
  ...options
50
- });
51
- }
52
- return config;
50
+ })
51
+ ]);
52
+ return defu(configs[0] ?? {}, configs[1] ?? {});
53
53
  }, "getConfigFileByName");
54
54
  var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
55
55
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
@@ -57,7 +57,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
57
57
  let config = result.config;
58
58
  const configFile = result.configFile;
59
59
  if (config && configFile && Object.keys(config).length > 0) {
60
- writeSystem(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
60
+ writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
61
61
  logLevel: "all"
62
62
  });
63
63
  }
@@ -65,7 +65,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
65
65
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
66
66
  for (const result2 of results) {
67
67
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
68
- writeSystem(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
68
+ writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
69
69
  logLevel: "all"
70
70
  });
71
71
  config = defu(result2.config ?? {}, config ?? {});
@@ -83,6 +83,16 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
83
83
  import defu2 from "defu";
84
84
 
85
85
  // ../config-tools/src/env/get-env.ts
86
+ var getExtensionEnv = /* @__PURE__ */ __name((extensionName) => {
87
+ const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
88
+ return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
89
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
90
+ if (name) {
91
+ ret[name] = process.env[key];
92
+ }
93
+ return ret;
94
+ }, {});
95
+ }, "getExtensionEnv");
86
96
  var getConfigEnv = /* @__PURE__ */ __name(() => {
87
97
  const prefix = "STORM_";
88
98
  let config = {
@@ -242,7 +252,7 @@ var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
242
252
  var setConfigEnv = /* @__PURE__ */ __name((config) => {
243
253
  const prefix = "STORM_";
244
254
  if (config.extends) {
245
- process.env[`${prefix}EXTENDS`] = config.extends;
255
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
246
256
  }
247
257
  if (config.name) {
248
258
  process.env[`${prefix}NAME`] = config.name;
@@ -472,37 +482,76 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
472
482
  }, "setBaseThemeColorConfigEnv");
473
483
 
474
484
  // ../config-tools/src/create-storm-config.ts
485
+ var _extension_cache = /* @__PURE__ */ new WeakMap();
475
486
  var _static_cache = void 0;
476
- var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
477
- let config = {};
478
- if (_static_cache?.data && _static_cache?.timestamp && _static_cache.timestamp >= Date.now() + 3e4) {
479
- writeTrace(`Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
480
- return _static_cache.data;
481
- }
482
- let _workspaceRoot = workspaceRoot;
483
- if (!_workspaceRoot) {
484
- _workspaceRoot = findWorkspaceRoot();
485
- }
486
- const configFile = await getConfigFile(_workspaceRoot);
487
- if (!configFile) {
488
- writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
489
- logLevel: "all"
490
- });
487
+ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
488
+ let result;
489
+ if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
490
+ let _workspaceRoot = workspaceRoot;
491
+ if (!_workspaceRoot) {
492
+ _workspaceRoot = findWorkspaceRoot();
493
+ }
494
+ const configEnv = getConfigEnv();
495
+ const defaultConfig = await getDefaultConfig(_workspaceRoot);
496
+ const configFile = await getConfigFile(_workspaceRoot);
497
+ if (!configFile && !skipLogs) {
498
+ writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
499
+ logLevel: "all"
500
+ });
501
+ }
502
+ result = await StormConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
503
+ result.workspaceRoot ??= _workspaceRoot;
504
+ } else {
505
+ result = _static_cache.data;
491
506
  }
492
- config = defu2(getConfigEnv(), configFile, getDefaultConfig(_workspaceRoot));
507
+ if (schema && extensionName) {
508
+ result.extensions = {
509
+ ...result.extensions,
510
+ [extensionName]: createConfigExtension(extensionName, schema)
511
+ };
512
+ }
513
+ _static_cache = {
514
+ timestamp: Date.now(),
515
+ data: result
516
+ };
517
+ return result;
518
+ }, "createStormConfig");
519
+ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
520
+ const extension_cache_key = {
521
+ extensionName
522
+ };
523
+ if (_extension_cache.has(extension_cache_key)) {
524
+ return _extension_cache.get(extension_cache_key);
525
+ }
526
+ let extension = getExtensionEnv(extensionName);
527
+ if (schema) {
528
+ extension = schema.parse(extension);
529
+ }
530
+ _extension_cache.set(extension_cache_key, extension);
531
+ return extension;
532
+ }, "createConfigExtension");
533
+ var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
534
+ const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
493
535
  setConfigEnv(config);
494
- writeTrace(`\u2699\uFE0F Using Storm configuration:
536
+ if (!skipLogs) {
537
+ writeTrace(`\u2699\uFE0F Using Storm configuration:
495
538
  ${formatLogMessage(config)}`, config);
539
+ }
496
540
  return config;
497
541
  }, "loadStormConfig");
498
542
 
543
+ // ../config-tools/src/get-config.ts
544
+ var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
545
+ return loadStormConfig(workspaceRoot, skipLogs);
546
+ }, "getConfig");
547
+
499
548
  // src/utilities/read-nx-config.ts
500
549
  import { existsSync } from "node:fs";
501
550
  import { readFile } from "node:fs/promises";
502
551
  var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
503
552
  let rootDir = workspaceRoot;
504
553
  if (!rootDir) {
505
- const config = await loadStormConfig();
554
+ const config = await getConfig();
506
555
  rootDir = config.workspaceRoot;
507
556
  }
508
557
  const nxJsonPath = joinPaths(rootDir, "nx.json");
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk275E2SADjs = require('./chunk-275E2SAD.js');
3
+ var _chunkDNAOERFDjs = require('./chunk-DNAOERFD.js');
4
4
 
5
5
 
6
6
  var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
@@ -30,7 +30,7 @@ function analyze() {
30
30
  renderChunk(source, chunk) {
31
31
  const sourceBytes = formatBytes(source.length);
32
32
  const fileName = chunk.fileName;
33
- _chunk275E2SADjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`);
33
+ _chunkDNAOERFDjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`);
34
34
  }
35
35
  };
36
36
  }
@@ -1,22 +1,17 @@
1
1
  import {
2
- readNxConfig
3
- } from "./chunk-HCFLWTVN.mjs";
4
- import {
5
- isVerbose,
6
2
  joinPaths,
7
3
  writeDebug,
8
4
  writeTrace
9
- } from "./chunk-DRXCFXBB.mjs";
5
+ } from "./chunk-E6JPW774.mjs";
10
6
  import {
11
7
  __name
12
8
  } from "./chunk-O6YSETKJ.mjs";
13
9
 
14
10
  // src/utilities/copy-assets.ts
15
- import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
16
- import { copyAssets as copyAssetsBase } from "@nx/js";
11
+ import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
17
12
  import { glob } from "glob";
18
13
  import { readFile, writeFile } from "node:fs/promises";
19
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
14
+ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
20
15
  const pendingAssets = Array.from(assets ?? []);
21
16
  pendingAssets.push({
22
17
  input: projectRoot,
@@ -24,7 +19,7 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
24
19
  output: "."
25
20
  });
26
21
  pendingAssets.push({
27
- input: config.workspaceRoot,
22
+ input: ".",
28
23
  glob: "LICENSE",
29
24
  output: "."
30
25
  });
@@ -42,36 +37,15 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
42
37
  output: "src/"
43
38
  });
44
39
  }
45
- const nxJson = readNxConfig(config.workspaceRoot);
46
- const projectGraph = readCachedProjectGraph();
47
- const projectsConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
48
- if (!projectsConfigurations?.projects?.[projectName]) {
49
- throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
50
- }
51
- const buildTarget = projectsConfigurations.projects[projectName].targets?.build;
52
- if (!buildTarget) {
53
- throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${joinPaths(projectRoot, "project.json")}`);
54
- }
55
40
  writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
56
41
  ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
57
- const result = await copyAssetsBase({
58
- assets: pendingAssets,
59
- watch: false,
60
- outputPath
61
- }, {
62
- root: config.workspaceRoot,
63
- targetName: "build",
64
- target: buildTarget,
65
- projectName,
66
- projectGraph,
67
- projectsConfigurations,
68
- nxJsonConfiguration: nxJson,
69
- cwd: config.workspaceRoot,
70
- isVerbose: isVerbose(config.logLevel)
42
+ const assetHandler = new CopyAssetsHandler({
43
+ projectDir: projectRoot,
44
+ rootDir: config.workspaceRoot,
45
+ outputDir: outputPath,
46
+ assets: pendingAssets
71
47
  });
72
- if (!result.success) {
73
- throw new Error("The Build process failed trying to copy assets");
74
- }
48
+ await assetHandler.processAllAssetsOnce();
75
49
  if (includeSrc === true) {
76
50
  writeDebug(`\u{1F4DD} Adding banner and writing source files: ${joinPaths(outputPath, "src")}`, config);
77
51
  const files = await glob([
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- var _chunk275E2SADjs = require('./chunk-275E2SAD.js');
17
+ var _chunkDNAOERFDjs = require('./chunk-DNAOERFD.js');
18
18
 
19
19
 
20
20
  var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
@@ -23,41 +23,41 @@ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
23
23
  var _c12 = require('c12');
24
24
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
25
25
  var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
26
- const workspacePath = filePath || _chunk275E2SADjs.findWorkspaceRoot.call(void 0, filePath);
27
- let config = await _c12.loadConfig.call(void 0, {
28
- cwd: workspacePath,
29
- packageJson: true,
30
- name: fileName,
31
- envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
32
- jitiOptions: {
33
- debug: false,
34
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk275E2SADjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
35
- },
36
- ...options
37
- });
38
- if (!config || Object.keys(config).length === 0) {
39
- config = await _c12.loadConfig.call(void 0, {
26
+ const workspacePath = filePath || _chunkDNAOERFDjs.findWorkspaceRoot.call(void 0, filePath);
27
+ const configs = await Promise.all([
28
+ _c12.loadConfig.call(void 0, {
29
+ cwd: workspacePath,
30
+ packageJson: true,
31
+ name: fileName,
32
+ envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
33
+ jitiOptions: {
34
+ debug: false,
35
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkDNAOERFDjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
36
+ },
37
+ ...options
38
+ }),
39
+ _c12.loadConfig.call(void 0, {
40
40
  cwd: workspacePath,
41
41
  packageJson: true,
42
42
  name: fileName,
43
43
  envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
44
44
  jitiOptions: {
45
45
  debug: false,
46
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk275E2SADjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
46
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkDNAOERFDjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
47
47
  },
48
48
  configFile: fileName,
49
49
  ...options
50
- });
51
- }
52
- return config;
50
+ })
51
+ ]);
52
+ return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
53
53
  }, "getConfigFileByName");
54
54
  var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
55
- const workspacePath = filePath ? filePath : _chunk275E2SADjs.findWorkspaceRoot.call(void 0, filePath);
55
+ const workspacePath = filePath ? filePath : _chunkDNAOERFDjs.findWorkspaceRoot.call(void 0, filePath);
56
56
  const result = await getConfigFileByName("storm", workspacePath);
57
57
  let config = result.config;
58
58
  const configFile = result.configFile;
59
59
  if (config && configFile && Object.keys(config).length > 0) {
60
- _chunk275E2SADjs.writeSystem.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
60
+ _chunkDNAOERFDjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
61
61
  logLevel: "all"
62
62
  });
63
63
  }
@@ -65,7 +65,7 @@ var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (
65
65
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
66
66
  for (const result2 of results) {
67
67
  if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
68
- _chunk275E2SADjs.writeSystem.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
68
+ _chunkDNAOERFDjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
69
69
  logLevel: "all"
70
70
  });
71
71
  config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
@@ -83,6 +83,16 @@ var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (
83
83
 
84
84
 
85
85
  // ../config-tools/src/env/get-env.ts
86
+ var getExtensionEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (extensionName) => {
87
+ const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
88
+ return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
89
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
90
+ if (name) {
91
+ ret[name] = process.env[key];
92
+ }
93
+ return ret;
94
+ }, {});
95
+ }, "getExtensionEnv");
86
96
  var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
87
97
  const prefix = "STORM_";
88
98
  let config = {
@@ -102,15 +112,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
102
112
  licensing: process.env[`${prefix}LICENSING`] || void 0,
103
113
  timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
104
114
  locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
105
- configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunk275E2SADjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
106
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk275E2SADjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
115
+ configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
116
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
107
117
  directories: {
108
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunk275E2SADjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
109
- data: process.env[`${prefix}DATA_DIR`] ? _chunk275E2SADjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
110
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunk275E2SADjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
111
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunk275E2SADjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
112
- log: process.env[`${prefix}LOG_DIR`] ? _chunk275E2SADjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
113
- build: process.env[`${prefix}BUILD_DIR`] ? _chunk275E2SADjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
118
+ cache: process.env[`${prefix}CACHE_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
119
+ data: process.env[`${prefix}DATA_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
120
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
121
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
122
+ log: process.env[`${prefix}LOG_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
123
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunkDNAOERFDjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
114
124
  },
115
125
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
116
126
  env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
@@ -133,23 +143,23 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
133
143
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
134
144
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
135
145
  },
136
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunk275E2SADjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
146
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkDNAOERFDjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
137
147
  };
138
- const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunk275E2SADjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
148
+ const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkDNAOERFDjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
139
149
  config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
140
150
  ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
141
151
  return ret;
142
152
  }, {}) : getThemeColorConfigEnv(prefix);
143
- if (config.docs === _chunk275E2SADjs.STORM_DEFAULT_DOCS) {
144
- if (config.homepage === _chunk275E2SADjs.STORM_DEFAULT_HOMEPAGE) {
145
- config.docs = `${_chunk275E2SADjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
153
+ if (config.docs === _chunkDNAOERFDjs.STORM_DEFAULT_DOCS) {
154
+ if (config.homepage === _chunkDNAOERFDjs.STORM_DEFAULT_HOMEPAGE) {
155
+ config.docs = `${_chunkDNAOERFDjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
146
156
  } else {
147
157
  config.docs = `${config.homepage}/docs`;
148
158
  }
149
159
  }
150
- if (config.licensing === _chunk275E2SADjs.STORM_DEFAULT_LICENSING) {
151
- if (config.homepage === _chunk275E2SADjs.STORM_DEFAULT_HOMEPAGE) {
152
- config.licensing = `${_chunk275E2SADjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
160
+ if (config.licensing === _chunkDNAOERFDjs.STORM_DEFAULT_LICENSING) {
161
+ if (config.homepage === _chunkDNAOERFDjs.STORM_DEFAULT_HOMEPAGE) {
162
+ config.licensing = `${_chunkDNAOERFDjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
153
163
  } else {
154
164
  config.licensing = `${config.homepage}/docs`;
155
165
  }
@@ -242,7 +252,7 @@ var setExtensionEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (exte
242
252
  var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config) => {
243
253
  const prefix = "STORM_";
244
254
  if (config.extends) {
245
- process.env[`${prefix}EXTENDS`] = config.extends;
255
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
246
256
  }
247
257
  if (config.name) {
248
258
  process.env[`${prefix}NAME`] = config.name;
@@ -287,31 +297,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
287
297
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
288
298
  }
289
299
  if (config.configFile) {
290
- process.env[`${prefix}CONFIG_FILE`] = _chunk275E2SADjs.correctPaths.call(void 0, config.configFile);
300
+ process.env[`${prefix}CONFIG_FILE`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.configFile);
291
301
  }
292
302
  if (config.workspaceRoot) {
293
- process.env[`${prefix}WORKSPACE_ROOT`] = _chunk275E2SADjs.correctPaths.call(void 0, config.workspaceRoot);
294
- process.env.NX_WORKSPACE_ROOT = _chunk275E2SADjs.correctPaths.call(void 0, config.workspaceRoot);
295
- process.env.NX_WORKSPACE_ROOT_PATH = _chunk275E2SADjs.correctPaths.call(void 0, config.workspaceRoot);
303
+ process.env[`${prefix}WORKSPACE_ROOT`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.workspaceRoot);
304
+ process.env.NX_WORKSPACE_ROOT = _chunkDNAOERFDjs.correctPaths.call(void 0, config.workspaceRoot);
305
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunkDNAOERFDjs.correctPaths.call(void 0, config.workspaceRoot);
296
306
  }
297
307
  if (config.directories) {
298
308
  if (!config.skipCache && config.directories.cache) {
299
- process.env[`${prefix}CACHE_DIR`] = _chunk275E2SADjs.correctPaths.call(void 0, config.directories.cache);
309
+ process.env[`${prefix}CACHE_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.cache);
300
310
  }
301
311
  if (config.directories.data) {
302
- process.env[`${prefix}DATA_DIR`] = _chunk275E2SADjs.correctPaths.call(void 0, config.directories.data);
312
+ process.env[`${prefix}DATA_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.data);
303
313
  }
304
314
  if (config.directories.config) {
305
- process.env[`${prefix}CONFIG_DIR`] = _chunk275E2SADjs.correctPaths.call(void 0, config.directories.config);
315
+ process.env[`${prefix}CONFIG_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.config);
306
316
  }
307
317
  if (config.directories.temp) {
308
- process.env[`${prefix}TEMP_DIR`] = _chunk275E2SADjs.correctPaths.call(void 0, config.directories.temp);
318
+ process.env[`${prefix}TEMP_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.temp);
309
319
  }
310
320
  if (config.directories.log) {
311
- process.env[`${prefix}LOG_DIR`] = _chunk275E2SADjs.correctPaths.call(void 0, config.directories.log);
321
+ process.env[`${prefix}LOG_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.log);
312
322
  }
313
323
  if (config.directories.build) {
314
- process.env[`${prefix}BUILD_DIR`] = _chunk275E2SADjs.correctPaths.call(void 0, config.directories.build);
324
+ process.env[`${prefix}BUILD_DIR`] = _chunkDNAOERFDjs.correctPaths.call(void 0, config.directories.build);
315
325
  }
316
326
  }
317
327
  if (config.skipCache !== void 0) {
@@ -365,8 +375,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
365
375
  if (config.logLevel) {
366
376
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
367
377
  process.env.LOG_LEVEL = String(config.logLevel);
368
- process.env.NX_VERBOSE_LOGGING = String(_chunk275E2SADjs.getLogLevel.call(void 0, config.logLevel) >= _chunk275E2SADjs.LogLevel.DEBUG ? true : false);
369
- process.env.RUST_BACKTRACE = _chunk275E2SADjs.getLogLevel.call(void 0, config.logLevel) >= _chunk275E2SADjs.LogLevel.DEBUG ? "full" : "none";
378
+ process.env.NX_VERBOSE_LOGGING = String(_chunkDNAOERFDjs.getLogLevel.call(void 0, config.logLevel) >= _chunkDNAOERFDjs.LogLevel.DEBUG ? true : false);
379
+ process.env.RUST_BACKTRACE = _chunkDNAOERFDjs.getLogLevel.call(void 0, config.logLevel) >= _chunkDNAOERFDjs.LogLevel.DEBUG ? "full" : "none";
370
380
  }
371
381
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
372
382
  for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
@@ -472,40 +482,79 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(vo
472
482
  }, "setBaseThemeColorConfigEnv");
473
483
 
474
484
  // ../config-tools/src/create-storm-config.ts
485
+ var _extension_cache = /* @__PURE__ */ new WeakMap();
475
486
  var _static_cache = void 0;
476
- var loadStormConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (workspaceRoot) => {
477
- let config = {};
478
- if (_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) && _optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
479
- _chunk275E2SADjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
480
- return _static_cache.data;
481
- }
482
- let _workspaceRoot = workspaceRoot;
483
- if (!_workspaceRoot) {
484
- _workspaceRoot = _chunk275E2SADjs.findWorkspaceRoot.call(void 0, );
485
- }
486
- const configFile = await getConfigFile(_workspaceRoot);
487
- if (!configFile) {
488
- _chunk275E2SADjs.writeWarning.call(void 0, "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
489
- logLevel: "all"
490
- });
487
+ var createStormConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
488
+ let result;
489
+ if (!_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) || !_optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
490
+ let _workspaceRoot = workspaceRoot;
491
+ if (!_workspaceRoot) {
492
+ _workspaceRoot = _chunkDNAOERFDjs.findWorkspaceRoot.call(void 0, );
493
+ }
494
+ const configEnv = getConfigEnv();
495
+ const defaultConfig = await _chunkDNAOERFDjs.getDefaultConfig.call(void 0, _workspaceRoot);
496
+ const configFile = await getConfigFile(_workspaceRoot);
497
+ if (!configFile && !skipLogs) {
498
+ _chunkDNAOERFDjs.writeWarning.call(void 0, "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
499
+ logLevel: "all"
500
+ });
501
+ }
502
+ result = await _chunkDNAOERFDjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
503
+ result.workspaceRoot ??= _workspaceRoot;
504
+ } else {
505
+ result = _static_cache.data;
491
506
  }
492
- config = _defu2.default.call(void 0, getConfigEnv(), configFile, _chunk275E2SADjs.getDefaultConfig.call(void 0, _workspaceRoot));
507
+ if (schema && extensionName) {
508
+ result.extensions = {
509
+ ...result.extensions,
510
+ [extensionName]: createConfigExtension(extensionName, schema)
511
+ };
512
+ }
513
+ _static_cache = {
514
+ timestamp: Date.now(),
515
+ data: result
516
+ };
517
+ return result;
518
+ }, "createStormConfig");
519
+ var createConfigExtension = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (extensionName, schema) => {
520
+ const extension_cache_key = {
521
+ extensionName
522
+ };
523
+ if (_extension_cache.has(extension_cache_key)) {
524
+ return _extension_cache.get(extension_cache_key);
525
+ }
526
+ let extension = getExtensionEnv(extensionName);
527
+ if (schema) {
528
+ extension = schema.parse(extension);
529
+ }
530
+ _extension_cache.set(extension_cache_key, extension);
531
+ return extension;
532
+ }, "createConfigExtension");
533
+ var loadStormConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
534
+ const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
493
535
  setConfigEnv(config);
494
- _chunk275E2SADjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
495
- ${_chunk275E2SADjs.formatLogMessage.call(void 0, config)}`, config);
536
+ if (!skipLogs) {
537
+ _chunkDNAOERFDjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
538
+ ${_chunkDNAOERFDjs.formatLogMessage.call(void 0, config)}`, config);
539
+ }
496
540
  return config;
497
541
  }, "loadStormConfig");
498
542
 
543
+ // ../config-tools/src/get-config.ts
544
+ var getConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
545
+ return loadStormConfig(workspaceRoot, skipLogs);
546
+ }, "getConfig");
547
+
499
548
  // src/utilities/read-nx-config.ts
500
549
  var _fs = require('fs');
501
550
  var _promises = require('fs/promises');
502
551
  var readNxConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (workspaceRoot) => {
503
552
  let rootDir = workspaceRoot;
504
553
  if (!rootDir) {
505
- const config = await loadStormConfig();
554
+ const config = await getConfig();
506
555
  rootDir = config.workspaceRoot;
507
556
  }
508
- const nxJsonPath = _chunk275E2SADjs.joinPaths.call(void 0, rootDir, "nx.json");
557
+ const nxJsonPath = _chunkDNAOERFDjs.joinPaths.call(void 0, rootDir, "nx.json");
509
558
  if (!_fs.existsSync.call(void 0, nxJsonPath)) {
510
559
  throw new Error("Cannot find project.json configuration");
511
560
  }