@storm-software/build-tools 0.135.4 → 0.135.6

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 (50) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-SYSXNB3M.js → chunk-4P3AQZVE.js} +8 -8
  3. package/dist/{chunk-L7W4YZE4.js → chunk-DIPQPQCV.js} +2 -2
  4. package/dist/{chunk-QMLJ4YOF.js → chunk-F4IA5EOZ.js} +120 -71
  5. package/dist/{chunk-ASTOW4W7.mjs → chunk-GZBLAV5N.mjs} +1 -1
  6. package/dist/{chunk-D7IEQ7P2.js → chunk-H37GZ5HC.js} +13 -13
  7. package/dist/{chunk-SZMRYRJK.mjs → chunk-IOSCJN6Z.mjs} +1 -1
  8. package/dist/{chunk-TYWDA4EL.mjs → chunk-IZFBLO57.mjs} +1 -1
  9. package/dist/{chunk-275E2SAD.js → chunk-NSSZFPK3.js} +20 -16
  10. package/dist/{chunk-HCFLWTVN.mjs → chunk-OOTITTRD.mjs} +88 -39
  11. package/dist/{chunk-RCQ3JZXR.mjs → chunk-OWHNR6AR.mjs} +3 -3
  12. package/dist/{chunk-KJNY2WFO.mjs → chunk-OZZ4PV5Q.mjs} +1 -1
  13. package/dist/{chunk-DRXCFXBB.mjs → chunk-RLC4K7JE.mjs} +18 -14
  14. package/dist/{chunk-YXBRJJCU.js → chunk-SX4QCTRO.js} +5 -5
  15. package/dist/{chunk-7TZNJMAB.js → chunk-YZWFPYXZ.js} +8 -8
  16. package/dist/index.d.mts +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +8 -8
  19. package/dist/index.mjs +7 -7
  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 +1 -1
  31. package/dist/utilities/copy-assets.d.ts +1 -1
  32. package/dist/utilities/copy-assets.js +4 -4
  33. package/dist/utilities/copy-assets.mjs +3 -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 +6 -6
  47. package/dist/utilities/index.mjs +5 -5
  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
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.3-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.5-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 -->
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk275E2SADjs = require('./chunk-275E2SAD.js');
5
+ var _chunkNSSZFPK3js = require('./chunk-NSSZFPK3.js');
6
6
 
7
7
 
8
8
  var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
@@ -19,7 +19,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
19
19
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
20
20
  const projectNode = project.node;
21
21
  if (projectNode.data.root) {
22
- const projectPackageJsonPath = _chunk275E2SADjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
22
+ const projectPackageJsonPath = _chunkNSSZFPK3js.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
23
23
  if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
24
24
  const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
25
25
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
@@ -30,7 +30,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
30
30
  }
31
31
  }
32
32
  if (localPackages.length > 0) {
33
- _chunk275E2SADjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
33
+ _chunkNSSZFPK3js.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
34
34
  packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
35
35
  if (!ret[localPackage.name]) {
36
36
  ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
@@ -52,13 +52,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
52
52
  return ret;
53
53
  }, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
54
54
  } else {
55
- _chunk275E2SADjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
55
+ _chunkNSSZFPK3js.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
56
56
  }
57
57
  return packageJson;
58
58
  }, "addPackageDependencies");
59
59
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
60
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk275E2SADjs.findWorkspaceRoot.call(void 0, );
61
- const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunk275E2SADjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
60
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkNSSZFPK3js.findWorkspaceRoot.call(void 0, );
61
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkNSSZFPK3js.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
62
62
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
63
63
  packageJson.type ??= "module";
64
64
  packageJson.sideEffects ??= false;
@@ -67,7 +67,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call
67
67
  if (distSrc.startsWith("/")) {
68
68
  distSrc = distSrc.substring(1);
69
69
  }
70
- packageJson.source ??= `${_chunk275E2SADjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
70
+ packageJson.source ??= `${_chunkNSSZFPK3js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
71
71
  }
72
72
  packageJson.files ??= [
73
73
  "dist/**/*"
@@ -98,7 +98,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call
98
98
  ];
99
99
  }
100
100
  packageJson.repository ??= workspacePackageJson.repository;
101
- packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk275E2SADjs.joinPaths.call(void 0, "packages", projectName);
101
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkNSSZFPK3js.joinPaths.call(void 0, "packages", projectName);
102
102
  return packageJson;
103
103
  }, "addWorkspacePackageJsonFields");
104
104
  var addPackageJsonExport = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
@@ -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 _chunkNSSZFPK3js = require('./chunk-NSSZFPK3.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
+ _chunkNSSZFPK3js.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`);
34
34
  }
35
35
  };
36
36
  }
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- var _chunk275E2SADjs = require('./chunk-275E2SAD.js');
17
+ var _chunkNSSZFPK3js = require('./chunk-NSSZFPK3.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 || _chunkNSSZFPK3js.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 : _chunkNSSZFPK3js.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 : _chunkNSSZFPK3js.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 : _chunkNSSZFPK3js.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
+ _chunkNSSZFPK3js.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
+ _chunkNSSZFPK3js.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`] ? _chunkNSSZFPK3js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
116
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkNSSZFPK3js.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`] ? _chunkNSSZFPK3js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
119
+ data: process.env[`${prefix}DATA_DIR`] ? _chunkNSSZFPK3js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
120
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunkNSSZFPK3js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
121
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunkNSSZFPK3js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
122
+ log: process.env[`${prefix}LOG_DIR`] ? _chunkNSSZFPK3js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
123
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunkNSSZFPK3js.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`])) ? _chunkNSSZFPK3js.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_`) && _chunkNSSZFPK3js.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 === _chunkNSSZFPK3js.STORM_DEFAULT_DOCS) {
154
+ if (config.homepage === _chunkNSSZFPK3js.STORM_DEFAULT_HOMEPAGE) {
155
+ config.docs = `${_chunkNSSZFPK3js.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 === _chunkNSSZFPK3js.STORM_DEFAULT_LICENSING) {
161
+ if (config.homepage === _chunkNSSZFPK3js.STORM_DEFAULT_HOMEPAGE) {
162
+ config.licensing = `${_chunkNSSZFPK3js.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`] = _chunkNSSZFPK3js.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`] = _chunkNSSZFPK3js.correctPaths.call(void 0, config.workspaceRoot);
304
+ process.env.NX_WORKSPACE_ROOT = _chunkNSSZFPK3js.correctPaths.call(void 0, config.workspaceRoot);
305
+ process.env.NX_WORKSPACE_ROOT_PATH = _chunkNSSZFPK3js.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`] = _chunkNSSZFPK3js.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`] = _chunkNSSZFPK3js.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`] = _chunkNSSZFPK3js.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`] = _chunkNSSZFPK3js.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`] = _chunkNSSZFPK3js.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`] = _chunkNSSZFPK3js.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(_chunkNSSZFPK3js.getLogLevel.call(void 0, config.logLevel) >= _chunkNSSZFPK3js.LogLevel.DEBUG ? true : false);
379
+ process.env.RUST_BACKTRACE = _chunkNSSZFPK3js.getLogLevel.call(void 0, config.logLevel) >= _chunkNSSZFPK3js.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 = _chunkNSSZFPK3js.findWorkspaceRoot.call(void 0, );
493
+ }
494
+ const configEnv = getConfigEnv();
495
+ const defaultConfig = await _chunkNSSZFPK3js.getDefaultConfig.call(void 0, _workspaceRoot);
496
+ const configFile = await getConfigFile(_workspaceRoot);
497
+ if (!configFile && !skipLogs) {
498
+ _chunkNSSZFPK3js.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 _chunkNSSZFPK3js.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
+ _chunkNSSZFPK3js.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
538
+ ${_chunkNSSZFPK3js.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 = _chunkNSSZFPK3js.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
  }
@@ -2,7 +2,7 @@ import {
2
2
  findWorkspaceRoot,
3
3
  joinPaths,
4
4
  writeTrace
5
- } from "./chunk-DRXCFXBB.mjs";
5
+ } from "./chunk-RLC4K7JE.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-O6YSETKJ.mjs";
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkQMLJ4YOFjs = require('./chunk-QMLJ4YOF.js');
3
+ var _chunkF4IA5EOZjs = require('./chunk-F4IA5EOZ.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
- var _chunk275E2SADjs = require('./chunk-275E2SAD.js');
9
+ var _chunkNSSZFPK3js = require('./chunk-NSSZFPK3.js');
10
10
 
11
11
 
12
12
  var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
@@ -19,7 +19,7 @@ var _promises = require('fs/promises');
19
19
  var copyAssets = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
20
20
  const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
21
21
  pendingAssets.push({
22
- input: projectRoot,
22
+ input: _chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, projectRoot),
23
23
  glob: "*.md",
24
24
  output: "."
25
25
  });
@@ -42,7 +42,7 @@ var copyAssets = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (con
42
42
  output: "src/"
43
43
  });
44
44
  }
45
- const nxJson = _chunkQMLJ4YOFjs.readNxConfig.call(void 0, config.workspaceRoot);
45
+ const nxJson = _chunkF4IA5EOZjs.readNxConfig.call(void 0, config.workspaceRoot);
46
46
  const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
47
47
  const projectsConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
48
48
  if (!_optionalChain([projectsConfigurations, 'optionalAccess', _ => _.projects, 'optionalAccess', _2 => _2[projectName]])) {
@@ -50,10 +50,10 @@ var copyAssets = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (con
50
50
  }
51
51
  const buildTarget = _optionalChain([projectsConfigurations, 'access', _3 => _3.projects, 'access', _4 => _4[projectName], 'access', _5 => _5.targets, 'optionalAccess', _6 => _6.build]);
52
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 ${_chunk275E2SADjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
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 ${_chunkNSSZFPK3js.joinPaths.call(void 0, projectRoot, "project.json")}`);
54
54
  }
55
- _chunk275E2SADjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
56
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk275E2SADjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
55
+ _chunkNSSZFPK3js.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
56
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkNSSZFPK3js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
57
57
  const result = await _js.copyAssets.call(void 0, {
58
58
  assets: pendingAssets,
59
59
  watch: false,
@@ -67,18 +67,18 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
67
67
  projectsConfigurations,
68
68
  nxJsonConfiguration: nxJson,
69
69
  cwd: config.workspaceRoot,
70
- isVerbose: _chunk275E2SADjs.isVerbose.call(void 0, config.logLevel)
70
+ isVerbose: _chunkNSSZFPK3js.isVerbose.call(void 0, config.logLevel)
71
71
  });
72
72
  if (!result.success) {
73
73
  throw new Error("The Build process failed trying to copy assets");
74
74
  }
75
75
  if (includeSrc === true) {
76
- _chunk275E2SADjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunk275E2SADjs.joinPaths.call(void 0, outputPath, "src")}`, config);
76
+ _chunkNSSZFPK3js.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkNSSZFPK3js.joinPaths.call(void 0, outputPath, "src")}`, config);
77
77
  const files = await _glob.glob.call(void 0, [
78
- _chunk275E2SADjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
79
- _chunk275E2SADjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
80
- _chunk275E2SADjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
81
- _chunk275E2SADjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
78
+ _chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
79
+ _chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
80
+ _chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
81
+ _chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
82
82
  ]);
83
83
  await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
84
84
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeDebug
3
- } from "./chunk-DRXCFXBB.mjs";
3
+ } from "./chunk-RLC4K7JE.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-O6YSETKJ.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeInfo
3
- } from "./chunk-DRXCFXBB.mjs";
3
+ } from "./chunk-RLC4K7JE.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-O6YSETKJ.mjs";