@storm-software/projen 0.9.34 → 0.9.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  # Changelog for Storm Ops - Projen
4
4
 
5
+ ## [0.9.36](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.36) (2025-04-02)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **projen:** Update all references to `StormConfig` to point to
10
+ `StormWorkspaceConfig`
11
+ ([7f316214f](https://github.com/storm-software/storm-ops/commit/7f316214f))
12
+
13
+ ## [0.9.35](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.35) (2025-03-18)
14
+
15
+ ### Miscellaneous
16
+
17
+ - **monorepo:** Regenerate README markdown files
18
+ ([4a6eeab3f](https://github.com/storm-software/storm-ops/commit/4a6eeab3f))
19
+
5
20
  ## [0.9.34](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.34) (2025-03-18)
6
21
 
7
22
  ### Miscellaneous
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.9.33-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.9.34-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 -->
@@ -199,7 +199,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
199
199
  log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
200
200
  build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
201
201
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
202
- var StormConfigSchema = _zod2.default.object({
202
+ var stormWorkspaceConfigSchema = _zod2.default.object({
203
203
  $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
204
204
  extends: ExtendsSchema.optional(),
205
205
  name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
@@ -1251,7 +1251,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(vo
1251
1251
  // ../config-tools/src/create-storm-config.ts
1252
1252
  var _extension_cache = /* @__PURE__ */ new WeakMap();
1253
1253
  var _static_cache = void 0;
1254
- var createStormConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async (extensionName, schema, workspaceRoot3, skipLogs = false) => {
1254
+ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async (extensionName, schema, workspaceRoot3, skipLogs = false) => {
1255
1255
  let result;
1256
1256
  if (!_optionalChain([_static_cache, 'optionalAccess', _57 => _57.data]) || !_optionalChain([_static_cache, 'optionalAccess', _58 => _58.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
1257
1257
  let _workspaceRoot = workspaceRoot3;
@@ -1266,7 +1266,7 @@ var createStormConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, asy
1266
1266
  logLevel: "all"
1267
1267
  });
1268
1268
  }
1269
- result = await StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
1269
+ result = await stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
1270
1270
  result.workspaceRoot ??= _workspaceRoot;
1271
1271
  } else {
1272
1272
  result = _static_cache.data;
@@ -1282,7 +1282,7 @@ var createStormConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, asy
1282
1282
  data: result
1283
1283
  };
1284
1284
  return result;
1285
- }, "createStormConfig");
1285
+ }, "createStormWorkspaceConfig");
1286
1286
  var createConfigExtension = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (extensionName, schema) => {
1287
1287
  const extension_cache_key = {
1288
1288
  extensionName
@@ -1297,20 +1297,20 @@ var createConfigExtension = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0,
1297
1297
  _extension_cache.set(extension_cache_key, extension);
1298
1298
  return extension;
1299
1299
  }, "createConfigExtension");
1300
- var loadStormConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async (workspaceRoot3, skipLogs = false) => {
1301
- const config = await createStormConfig(void 0, void 0, workspaceRoot3, skipLogs);
1300
+ var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async (workspaceRoot3, skipLogs = false) => {
1301
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot3, skipLogs);
1302
1302
  setConfigEnv(config);
1303
1303
  if (!skipLogs && !config.skipConfigLogging) {
1304
1304
  writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
1305
1305
  ${formatLogMessage(config)}`, config);
1306
1306
  }
1307
1307
  return config;
1308
- }, "loadStormConfig");
1308
+ }, "loadStormWorkspaceConfig");
1309
1309
 
1310
1310
  // ../config-tools/src/get-config.ts
1311
1311
  _chunkWTMG7MTKjs.init_cjs_shims.call(void 0, );
1312
1312
  var getConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (workspaceRoot3, skipLogs = false) => {
1313
- return loadStormConfig(workspaceRoot3, skipLogs);
1313
+ return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
1314
1314
  }, "getConfig");
1315
1315
 
1316
1316
  // ../workspace-tools/src/base/base-executor.ts
@@ -1800,13 +1800,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0
1800
1800
  return ret;
1801
1801
  }, [])]);
1802
1802
  packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
1803
- if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _98 => _98.includes, 'call', _99 => _99(localPackage.name)])) {
1804
- ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
1803
+ if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _98 => _98.includes, 'call', _99 => _99(localPackage.name)]) && _optionalChain([packageJson, 'access', _100 => _100.devDependencies, 'optionalAccess', _101 => _101[localPackage.name]]) === void 0) {
1804
+ ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
1805
1805
  }
1806
1806
  return ret;
1807
1807
  }, _nullishCoalesce(packageJson.dependencies, () => ( {})));
1808
1808
  packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
1809
- if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _100 => _100.includes, 'call', _101 => _101(localPackage.name)])) {
1809
+ if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _102 => _102.includes, 'call', _103 => _103(localPackage.name)]) && _optionalChain([packageJson, 'access', _104 => _104.dependencies, 'optionalAccess', _105 => _105[localPackage.name]]) === void 0) {
1810
1810
  ret[localPackage.name] = localPackage.version || "0.0.1";
1811
1811
  }
1812
1812
  return ret;
@@ -1900,7 +1900,11 @@ var getEntryPoints = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async
1900
1900
  return ret;
1901
1901
  }, []));
1902
1902
  } else {
1903
- paths.push(entryPoint);
1903
+ const result = _chunk3DQG66DJjs.correctPaths.call(void 0, entryPoint.replaceAll(_chunk3DQG66DJjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunk3DQG66DJjs.correctPaths.call(void 0, projectRoot), ""));
1904
+ writeDebug(`Trying to add entry point ${result}"`, config);
1905
+ if (!paths.includes(result)) {
1906
+ paths.push(result);
1907
+ }
1904
1908
  }
1905
1909
  return paths;
1906
1910
  }));
@@ -2026,15 +2030,15 @@ var RendererEngine = class {
2026
2030
  if (!relativePath.startsWith("\\\\?\\")) {
2027
2031
  relativePath = relativePath.replace(/\\/g, "/");
2028
2032
  }
2029
- const meta = _optionalChain([metafile, 'optionalAccess', _102 => _102.outputs, 'access', _103 => _103[relativePath]]);
2033
+ const meta = _optionalChain([metafile, 'optionalAccess', _106 => _106.outputs, 'access', _107 => _107[relativePath]]);
2030
2034
  return {
2031
2035
  type: "chunk",
2032
2036
  path: file.path,
2033
2037
  code: file.text,
2034
- map: _optionalChain([outputFiles, 'access', _104 => _104.find, 'call', _105 => _105((f) => f.path === `${file.path}.map`), 'optionalAccess', _106 => _106.text]),
2035
- entryPoint: _optionalChain([meta, 'optionalAccess', _107 => _107.entryPoint]),
2036
- exports: _optionalChain([meta, 'optionalAccess', _108 => _108.exports]),
2037
- imports: _optionalChain([meta, 'optionalAccess', _109 => _109.imports])
2038
+ map: _optionalChain([outputFiles, 'access', _108 => _108.find, 'call', _109 => _109((f) => f.path === `${file.path}.map`), 'optionalAccess', _110 => _110.text]),
2039
+ entryPoint: _optionalChain([meta, 'optionalAccess', _111 => _111.entryPoint]),
2040
+ exports: _optionalChain([meta, 'optionalAccess', _112 => _112.exports]),
2041
+ imports: _optionalChain([meta, 'optionalAccess', _113 => _113.imports])
2038
2042
  };
2039
2043
  } else {
2040
2044
  return {
@@ -2122,7 +2126,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void
2122
2126
  name: "storm:esm-split-code-to-cjs",
2123
2127
  setup(build4) {
2124
2128
  build4.onEnd(async (result) => {
2125
- const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _110 => _110.metafile, 'optionalAccess', _111 => _111.outputs]), () => ( {})));
2129
+ const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _114 => _114.metafile, 'optionalAccess', _115 => _115.outputs]), () => ( {})));
2126
2130
  const jsFiles = outFiles.filter((f) => f.endsWith("js"));
2127
2131
  await esbuild.build({
2128
2132
  outdir: resolvedOptions.outdir,
@@ -2249,7 +2253,7 @@ ${result.errors.map((error) => error.text).join("\n")}
2249
2253
  _chunkWTMG7MTKjs.init_cjs_shims.call(void 0, );
2250
2254
 
2251
2255
  function resolvePathsConfig(options, cwd) {
2252
- if (_optionalChain([options, 'optionalAccess', _112 => _112.compilerOptions, 'optionalAccess', _113 => _113.paths])) {
2256
+ if (_optionalChain([options, 'optionalAccess', _116 => _116.compilerOptions, 'optionalAccess', _117 => _117.paths])) {
2253
2257
  const paths = Object.entries(options.compilerOptions.paths);
2254
2258
  const resolvedPaths = paths.map(([key, paths2]) => {
2255
2259
  return [
@@ -2277,7 +2281,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (o
2277
2281
  build4.onResolve({
2278
2282
  filter: packagesRegex
2279
2283
  }, (args) => {
2280
- if (_optionalChain([build4, 'access', _114 => _114.initialOptions, 'access', _115 => _115.external, 'optionalAccess', _116 => _116.includes, 'call', _117 => _117(args.path)])) {
2284
+ if (_optionalChain([build4, 'access', _118 => _118.initialOptions, 'access', _119 => _119.external, 'optionalAccess', _120 => _120.includes, 'call', _121 => _121(args.path)])) {
2281
2285
  return {
2282
2286
  path: args.path,
2283
2287
  external: true
@@ -2387,7 +2391,7 @@ var tscPlugin = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (options, r
2387
2391
  function getTypeDependencyPackageName(npmPackage) {
2388
2392
  if (npmPackage.startsWith("@")) {
2389
2393
  const [scope, name] = npmPackage.split("/");
2390
- return `@types/${_optionalChain([scope, 'optionalAccess', _118 => _118.slice, 'call', _119 => _119(1)])}__${name}`;
2394
+ return `@types/${_optionalChain([scope, 'optionalAccess', _122 => _122.slice, 'call', _123 => _123(1)])}__${name}`;
2391
2395
  }
2392
2396
  return `@types/${npmPackage}`;
2393
2397
  }
@@ -2606,7 +2610,7 @@ function pipeSync(fn, ...fns) {
2606
2610
  return (...args) => {
2607
2611
  let result = fn(...args);
2608
2612
  for (let i = 0; result !== skip && i < fns.length; ++i) {
2609
- result = _optionalChain([fns, 'access', _120 => _120[i], 'optionalCall', _121 => _121(result)]);
2613
+ result = _optionalChain([fns, 'access', _124 => _124[i], 'optionalCall', _125 => _125(result)]);
2610
2614
  }
2611
2615
  return result;
2612
2616
  };
@@ -2616,7 +2620,7 @@ function pipeAsync(fn, ...fns) {
2616
2620
  return async (...args) => {
2617
2621
  let result = await fn(...args);
2618
2622
  for (let i = 0; result !== skip && i < fns.length; ++i) {
2619
- result = await _optionalChain([fns, 'access', _122 => _122[i], 'optionalCall', _123 => _123(result)]);
2623
+ result = await _optionalChain([fns, 'access', _126 => _126[i], 'optionalCall', _127 => _127(result)]);
2620
2624
  }
2621
2625
  return result;
2622
2626
  };
@@ -2646,7 +2650,7 @@ var resolveOptions = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async
2646
2650
  const projectJson = JSON.parse(projectJsonFile);
2647
2651
  const projectName = projectJson.name;
2648
2652
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
2649
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _124 => _124.projects, 'optionalAccess', _125 => _125[projectName]])) {
2653
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _128 => _128.projects, 'optionalAccess', _129 => _129[projectName]])) {
2650
2654
  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.");
2651
2655
  }
2652
2656
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
@@ -2723,7 +2727,12 @@ var resolveOptions = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async
2723
2727
  };
2724
2728
  result.plugins = _nullishCoalesce(userOptions.plugins, () => ( getDefaultBuildPlugins(userOptions, result)));
2725
2729
  if (options.inject && Array.isArray(options.inject) && options.inject.length > 0) {
2726
- result.inject = _defu2.default.call(void 0, result.inject, options.inject);
2730
+ result.inject = options.inject.reduce((ret, inj) => {
2731
+ if (inj && typeof inj === "string" && ret.includes(inj)) {
2732
+ ret.push(inj);
2733
+ }
2734
+ return ret;
2735
+ }, result.inject);
2727
2736
  }
2728
2737
  delete result.entry;
2729
2738
  delete result.outputPath;
@@ -2816,6 +2825,10 @@ async function executeEsBuild(context2) {
2816
2825
  ...context2.options
2817
2826
  };
2818
2827
  options.outdir = _chunk3DQG66DJjs.joinPaths.call(void 0, context2.options.outdir, context2.options.distDir);
2828
+ if (!options.inject || !Array.isArray(options.inject) || options.inject.length === 0 || // eslint-disable-next-line no-constant-binary-expression, @typescript-eslint/no-explicit-any
2829
+ options.inject === {}) {
2830
+ delete options.inject;
2831
+ }
2819
2832
  delete options.env;
2820
2833
  delete options.name;
2821
2834
  delete options.assets;
@@ -2850,7 +2863,7 @@ ${formatLogMessage(options)}`, context2.options.config);
2850
2863
  }
2851
2864
  _chunkWTMG7MTKjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
2852
2865
  async function copyBuildAssets(context2) {
2853
- if (_optionalChain([context2, 'access', _126 => _126.result, 'optionalAccess', _127 => _127.errors, 'access', _128 => _128.length]) === 0) {
2866
+ if (_optionalChain([context2, 'access', _130 => _130.result, 'optionalAccess', _131 => _131.errors, 'access', _132 => _132.length]) === 0) {
2854
2867
  writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
2855
2868
  const stopwatch = getStopwatch(`${context2.options.name} asset copy`);
2856
2869
  await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
@@ -2860,7 +2873,7 @@ async function copyBuildAssets(context2) {
2860
2873
  }
2861
2874
  _chunkWTMG7MTKjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
2862
2875
  async function reportResults(context2) {
2863
- if (_optionalChain([context2, 'access', _129 => _129.result, 'optionalAccess', _130 => _130.errors, 'access', _131 => _131.length]) === 0) {
2876
+ if (_optionalChain([context2, 'access', _133 => _133.result, 'optionalAccess', _134 => _134.errors, 'access', _135 => _135.length]) === 0) {
2864
2877
  if (context2.result.warnings.length > 0) {
2865
2878
  writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
2866
2879
  }
@@ -2961,14 +2974,14 @@ var watch = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (context2, opti
2961
2974
  // ../workspace-tools/src/executors/esbuild/executor.ts
2962
2975
  async function esbuildExecutorFn(options, context2, config) {
2963
2976
  writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
2964
- if (!_optionalChain([context2, 'access', _132 => _132.projectsConfigurations, 'optionalAccess', _133 => _133.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _134 => _134.projectsConfigurations, 'access', _135 => _135.projects, 'access', _136 => _136[context2.projectName], 'optionalAccess', _137 => _137.root])) {
2977
+ if (!_optionalChain([context2, 'access', _136 => _136.projectsConfigurations, 'optionalAccess', _137 => _137.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _138 => _138.projectsConfigurations, 'access', _139 => _139.projects, 'access', _140 => _140[context2.projectName], 'optionalAccess', _141 => _141.root])) {
2965
2978
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2966
2979
  }
2967
2980
  await build3({
2968
2981
  ...options,
2969
- projectRoot: _optionalChain([context2, 'access', _138 => _138.projectsConfigurations, 'access', _139 => _139.projects, 'optionalAccess', _140 => _140[context2.projectName], 'access', _141 => _141.root]),
2982
+ projectRoot: _optionalChain([context2, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'optionalAccess', _144 => _144[context2.projectName], 'access', _145 => _145.root]),
2970
2983
  projectName: context2.projectName,
2971
- sourceRoot: _optionalChain([context2, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'optionalAccess', _144 => _144[context2.projectName], 'optionalAccess', _145 => _145.sourceRoot]),
2984
+ sourceRoot: _optionalChain([context2, 'access', _146 => _146.projectsConfigurations, 'access', _147 => _147.projects, 'optionalAccess', _148 => _148[context2.projectName], 'optionalAccess', _149 => _149.sourceRoot]),
2972
2985
  format: options.format,
2973
2986
  platform: options.format
2974
2987
  });
@@ -3014,7 +3027,7 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
3014
3027
  var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
3015
3028
  var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
3016
3029
  async function sizeLimitExecutorFn(options, context2, config) {
3017
- if (!_optionalChain([context2, 'optionalAccess', _146 => _146.projectName]) || !_optionalChain([context2, 'access', _147 => _147.projectsConfigurations, 'optionalAccess', _148 => _148.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
3030
+ if (!_optionalChain([context2, 'optionalAccess', _150 => _150.projectName]) || !_optionalChain([context2, 'access', _151 => _151.projectsConfigurations, 'optionalAccess', _152 => _152.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
3018
3031
  throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
3019
3032
  }
3020
3033
  writeInfo(`\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
@@ -3023,7 +3036,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
3023
3036
  _esbuild3.default,
3024
3037
  _esbuildwhy2.default
3025
3038
  ], {
3026
- checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _149 => _149.projectsConfigurations, 'access', _150 => _150.projects, 'access', _151 => _151[context2.projectName], 'optionalAccess', _152 => _152.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _153 => _153.projectsConfigurations, 'access', _154 => _154.projects, 'access', _155 => _155[context2.projectName], 'optionalAccess', _156 => _156.root]), () => ( "./")), "src")))
3039
+ checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _153 => _153.projectsConfigurations, 'access', _154 => _154.projects, 'access', _155 => _155[context2.projectName], 'optionalAccess', _156 => _156.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _157 => _157.projectsConfigurations, 'access', _158 => _158.projects, 'access', _159 => _159[context2.projectName], 'optionalAccess', _160 => _160.root]), () => ( "./")), "src")))
3027
3040
  }).then((result) => {
3028
3041
  writeInfo(`\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
3029
3042
  });
@@ -3084,7 +3097,7 @@ _chunkWTMG7MTKjs.init_cjs_shims.call(void 0, );
3084
3097
  var _jiti = require('jiti');
3085
3098
  async function unbuildExecutorFn(options, context2, config) {
3086
3099
  writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
3087
- if (!_optionalChain([context2, 'access', _157 => _157.projectsConfigurations, 'optionalAccess', _158 => _158.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
3100
+ if (!_optionalChain([context2, 'access', _161 => _161.projectsConfigurations, 'optionalAccess', _162 => _162.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
3088
3101
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
3089
3102
  }
3090
3103
  if (!context2.projectsConfigurations.projects[context2.projectName].root) {
@@ -3172,7 +3185,7 @@ var withRunGenerator = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (nam
3172
3185
  - workspaceRoot: ${workspaceRoot3}`, config);
3173
3186
  config = await getConfig(workspaceRoot3);
3174
3187
  }
3175
- if (_optionalChain([generatorOptions, 'optionalAccess', _159 => _159.hooks, 'optionalAccess', _160 => _160.applyDefaultOptions])) {
3188
+ if (_optionalChain([generatorOptions, 'optionalAccess', _163 => _163.hooks, 'optionalAccess', _164 => _164.applyDefaultOptions])) {
3176
3189
  writeDebug("Running the applyDefaultOptions hook...", config);
3177
3190
  options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
3178
3191
  writeDebug("Completed the applyDefaultOptions hook", config);
@@ -3183,22 +3196,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
3183
3196
  workspaceRoot: tree.root,
3184
3197
  config
3185
3198
  }, applyWorkspaceBaseTokens);
3186
- if (_optionalChain([generatorOptions, 'optionalAccess', _161 => _161.hooks, 'optionalAccess', _162 => _162.preProcess])) {
3199
+ if (_optionalChain([generatorOptions, 'optionalAccess', _165 => _165.hooks, 'optionalAccess', _166 => _166.preProcess])) {
3187
3200
  writeDebug("Running the preProcess hook...", config);
3188
3201
  await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
3189
3202
  writeDebug("Completed the preProcess hook", config);
3190
3203
  }
3191
3204
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
3192
3205
  if (result) {
3193
- if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _163 => _163.error, 'optionalAccess', _164 => _164.message]) && typeof _optionalChain([result, 'optionalAccess', _165 => _165.error, 'optionalAccess', _166 => _166.message]) === "string" && _optionalChain([result, 'optionalAccess', _167 => _167.error, 'optionalAccess', _168 => _168.name]) && typeof _optionalChain([result, 'optionalAccess', _169 => _169.error, 'optionalAccess', _170 => _170.name]) === "string") {
3206
+ if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _167 => _167.error, 'optionalAccess', _168 => _168.message]) && typeof _optionalChain([result, 'optionalAccess', _169 => _169.error, 'optionalAccess', _170 => _170.message]) === "string" && _optionalChain([result, 'optionalAccess', _171 => _171.error, 'optionalAccess', _172 => _172.name]) && typeof _optionalChain([result, 'optionalAccess', _173 => _173.error, 'optionalAccess', _174 => _174.name]) === "string") {
3194
3207
  throw new Error(`The ${name} generator failed to run`, {
3195
- cause: _optionalChain([result, 'optionalAccess', _171 => _171.error])
3208
+ cause: _optionalChain([result, 'optionalAccess', _175 => _175.error])
3196
3209
  });
3197
3210
  } else if (result.success && result.data) {
3198
3211
  return result;
3199
3212
  }
3200
3213
  }
3201
- if (_optionalChain([generatorOptions, 'optionalAccess', _172 => _172.hooks, 'optionalAccess', _173 => _173.postProcess])) {
3214
+ if (_optionalChain([generatorOptions, 'optionalAccess', _176 => _176.hooks, 'optionalAccess', _177 => _177.postProcess])) {
3202
3215
  writeDebug("Running the postProcess hook...", config);
3203
3216
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
3204
3217
  writeDebug("Completed the postProcess hook", config);
@@ -3367,15 +3380,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
3367
3380
  _devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
3368
3381
  let repository = {
3369
3382
  type: "github",
3370
- url: _optionalChain([config, 'optionalAccess', _174 => _174.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _175 => _175.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _176 => _176.namespace]) || _optionalChain([config, 'optionalAccess', _177 => _177.name]) || "repository"}.git`
3383
+ url: _optionalChain([config, 'optionalAccess', _178 => _178.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _179 => _179.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _180 => _180.namespace]) || _optionalChain([config, 'optionalAccess', _181 => _181.name]) || "repository"}.git`
3371
3384
  };
3372
3385
  let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
3373
3386
  if (tree.exists("package.json")) {
3374
3387
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
3375
- if (_optionalChain([packageJson, 'optionalAccess', _178 => _178.repository])) {
3388
+ if (_optionalChain([packageJson, 'optionalAccess', _182 => _182.repository])) {
3376
3389
  repository = packageJson.repository;
3377
3390
  }
3378
- if (_optionalChain([packageJson, 'optionalAccess', _179 => _179.description])) {
3391
+ if (_optionalChain([packageJson, 'optionalAccess', _183 => _183.description])) {
3379
3392
  description = packageJson.description;
3380
3393
  }
3381
3394
  }
@@ -3430,9 +3443,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
3430
3443
  _devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
3431
3444
  ...json,
3432
3445
  pnpm: {
3433
- ..._optionalChain([json, 'optionalAccess', _180 => _180.pnpm]),
3446
+ ..._optionalChain([json, 'optionalAccess', _184 => _184.pnpm]),
3434
3447
  overrides: {
3435
- ..._optionalChain([json, 'optionalAccess', _181 => _181.pnpm, 'optionalAccess', _182 => _182.overrides]),
3448
+ ..._optionalChain([json, 'optionalAccess', _185 => _185.pnpm, 'optionalAccess', _186 => _186.overrides]),
3436
3449
  [_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
3437
3450
  }
3438
3451
  }
@@ -3446,10 +3459,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
3446
3459
  ]);
3447
3460
  if (tree.exists("package.json")) {
3448
3461
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
3449
- if (_optionalChain([packageJson, 'optionalAccess', _183 => _183.repository])) {
3462
+ if (_optionalChain([packageJson, 'optionalAccess', _187 => _187.repository])) {
3450
3463
  repository = packageJson.repository;
3451
3464
  }
3452
- if (_optionalChain([packageJson, 'optionalAccess', _184 => _184.description])) {
3465
+ if (_optionalChain([packageJson, 'optionalAccess', _188 => _188.description])) {
3453
3466
  description = packageJson.description;
3454
3467
  }
3455
3468
  }
@@ -3497,24 +3510,24 @@ _chunkWTMG7MTKjs.__name.call(void 0, getOutputPath, "getOutputPath");
3497
3510
  function createProjectTsConfigJson(tree, options) {
3498
3511
  const tsconfig = {
3499
3512
  extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
3500
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _185 => _185.tsconfigOptions]), () => ( {})),
3513
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _189 => _189.tsconfigOptions]), () => ( {})),
3501
3514
  compilerOptions: {
3502
3515
  ...options.rootProject ? _js.tsConfigBaseOptions : {},
3503
3516
  outDir: _chunk3DQG66DJjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
3504
3517
  noEmit: true,
3505
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _186 => _186.tsconfigOptions, 'optionalAccess', _187 => _187.compilerOptions]), () => ( {}))
3518
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _190 => _190.tsconfigOptions, 'optionalAccess', _191 => _191.compilerOptions]), () => ( {}))
3506
3519
  },
3507
3520
  files: [
3508
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _188 => _188.tsconfigOptions, 'optionalAccess', _189 => _189.files]), () => ( []))
3521
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _192 => _192.tsconfigOptions, 'optionalAccess', _193 => _193.files]), () => ( []))
3509
3522
  ],
3510
3523
  include: [
3511
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _190 => _190.tsconfigOptions, 'optionalAccess', _191 => _191.include]), () => ( [])),
3524
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _194 => _194.tsconfigOptions, 'optionalAccess', _195 => _195.include]), () => ( [])),
3512
3525
  "src/**/*.ts",
3513
3526
  "src/**/*.js",
3514
3527
  "bin/**/*"
3515
3528
  ],
3516
3529
  exclude: [
3517
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _192 => _192.tsconfigOptions, 'optionalAccess', _193 => _193.exclude]), () => ( [])),
3530
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _196 => _196.tsconfigOptions, 'optionalAccess', _197 => _197.exclude]), () => ( [])),
3518
3531
  "jest.config.ts",
3519
3532
  "src/**/*.spec.ts",
3520
3533
  "src/**/*.test.ts"
@@ -3525,8 +3538,8 @@ function createProjectTsConfigJson(tree, options) {
3525
3538
  _chunkWTMG7MTKjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
3526
3539
  async function normalizeOptions(tree, options, config) {
3527
3540
  let importPath = options.importPath;
3528
- if (!importPath && _optionalChain([config, 'optionalAccess', _194 => _194.namespace])) {
3529
- importPath = `@${_optionalChain([config, 'optionalAccess', _195 => _195.namespace])}/${options.name}`;
3541
+ if (!importPath && _optionalChain([config, 'optionalAccess', _198 => _198.namespace])) {
3542
+ importPath = `@${_optionalChain([config, 'optionalAccess', _199 => _199.namespace])}/${options.name}`;
3530
3543
  }
3531
3544
  if (options.publishable) {
3532
3545
  if (!importPath) {
@@ -3655,11 +3668,11 @@ var _zodtojsonschema = require('zod-to-json-schema');
3655
3668
  async function configSchemaGeneratorFn(tree, options, config) {
3656
3669
  writeInfo("\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
3657
3670
  writeTrace(`Determining the Storm Workspace Configuration JSON Schema...`, config);
3658
- const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, StormConfigSchema, {
3671
+ const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, stormWorkspaceConfigSchema, {
3659
3672
  name: "StormWorkspaceConfiguration"
3660
3673
  });
3661
3674
  writeTrace(jsonSchema, config);
3662
- const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _196 => _196.workspaceRoot]), () => ( findWorkspaceRoot())), _optionalChain([options, 'access', _197 => _197.outputFile, 'optionalAccess', _198 => _198.startsWith, 'call', _199 => _199("./")]) ? "" : "./");
3675
+ const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _200 => _200.workspaceRoot]), () => ( findWorkspaceRoot())), _optionalChain([options, 'access', _201 => _201.outputFile, 'optionalAccess', _202 => _202.startsWith, 'call', _203 => _203("./")]) ? "" : "./");
3663
3676
  writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
3664
3677
  _devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
3665
3678
  spaces: 2
@@ -200,7 +200,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
200
200
  log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
201
201
  build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
202
202
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
203
- var StormConfigSchema = z.object({
203
+ var stormWorkspaceConfigSchema = z.object({
204
204
  $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
205
205
  extends: ExtendsSchema.optional(),
206
206
  name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
@@ -1252,7 +1252,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1252
1252
  // ../config-tools/src/create-storm-config.ts
1253
1253
  var _extension_cache = /* @__PURE__ */ new WeakMap();
1254
1254
  var _static_cache = void 0;
1255
- var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot3, skipLogs = false) => {
1255
+ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot3, skipLogs = false) => {
1256
1256
  let result;
1257
1257
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
1258
1258
  let _workspaceRoot = workspaceRoot3;
@@ -1267,7 +1267,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
1267
1267
  logLevel: "all"
1268
1268
  });
1269
1269
  }
1270
- result = await StormConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
1270
+ result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
1271
1271
  result.workspaceRoot ??= _workspaceRoot;
1272
1272
  } else {
1273
1273
  result = _static_cache.data;
@@ -1283,7 +1283,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
1283
1283
  data: result
1284
1284
  };
1285
1285
  return result;
1286
- }, "createStormConfig");
1286
+ }, "createStormWorkspaceConfig");
1287
1287
  var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1288
1288
  const extension_cache_key = {
1289
1289
  extensionName
@@ -1298,20 +1298,20 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1298
1298
  _extension_cache.set(extension_cache_key, extension);
1299
1299
  return extension;
1300
1300
  }, "createConfigExtension");
1301
- var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot3, skipLogs = false) => {
1302
- const config = await createStormConfig(void 0, void 0, workspaceRoot3, skipLogs);
1301
+ var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot3, skipLogs = false) => {
1302
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot3, skipLogs);
1303
1303
  setConfigEnv(config);
1304
1304
  if (!skipLogs && !config.skipConfigLogging) {
1305
1305
  writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
1306
1306
  ${formatLogMessage(config)}`, config);
1307
1307
  }
1308
1308
  return config;
1309
- }, "loadStormConfig");
1309
+ }, "loadStormWorkspaceConfig");
1310
1310
 
1311
1311
  // ../config-tools/src/get-config.ts
1312
1312
  init_esm_shims();
1313
1313
  var getConfig = /* @__PURE__ */ __name((workspaceRoot3, skipLogs = false) => {
1314
- return loadStormConfig(workspaceRoot3, skipLogs);
1314
+ return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
1315
1315
  }, "getConfig");
1316
1316
 
1317
1317
  // ../workspace-tools/src/base/base-executor.ts
@@ -1801,13 +1801,13 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
1801
1801
  return ret;
1802
1802
  }, []);
1803
1803
  packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
1804
- if (!ret[localPackage.name] && !implicitDependencies?.includes(localPackage.name)) {
1805
- ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
1804
+ if (!ret[localPackage.name] && !implicitDependencies?.includes(localPackage.name) && packageJson.devDependencies?.[localPackage.name] === void 0) {
1805
+ ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
1806
1806
  }
1807
1807
  return ret;
1808
1808
  }, packageJson.dependencies ?? {});
1809
1809
  packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
1810
- if (!ret[localPackage.name] && implicitDependencies?.includes(localPackage.name)) {
1810
+ if (!ret[localPackage.name] && implicitDependencies?.includes(localPackage.name) && packageJson.dependencies?.[localPackage.name] === void 0) {
1811
1811
  ret[localPackage.name] = localPackage.version || "0.0.1";
1812
1812
  }
1813
1813
  return ret;
@@ -1901,7 +1901,11 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
1901
1901
  return ret;
1902
1902
  }, []));
1903
1903
  } else {
1904
- paths.push(entryPoint);
1904
+ const result = correctPaths(entryPoint.replaceAll(correctPaths(workspaceRoot3), "").replaceAll(correctPaths(projectRoot), ""));
1905
+ writeDebug(`Trying to add entry point ${result}"`, config);
1906
+ if (!paths.includes(result)) {
1907
+ paths.push(result);
1908
+ }
1905
1909
  }
1906
1910
  return paths;
1907
1911
  }));
@@ -2724,7 +2728,12 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
2724
2728
  };
2725
2729
  result.plugins = userOptions.plugins ?? getDefaultBuildPlugins(userOptions, result);
2726
2730
  if (options.inject && Array.isArray(options.inject) && options.inject.length > 0) {
2727
- result.inject = defu4(result.inject, options.inject);
2731
+ result.inject = options.inject.reduce((ret, inj) => {
2732
+ if (inj && typeof inj === "string" && ret.includes(inj)) {
2733
+ ret.push(inj);
2734
+ }
2735
+ return ret;
2736
+ }, result.inject);
2728
2737
  }
2729
2738
  delete result.entry;
2730
2739
  delete result.outputPath;
@@ -2817,6 +2826,10 @@ async function executeEsBuild(context2) {
2817
2826
  ...context2.options
2818
2827
  };
2819
2828
  options.outdir = joinPaths(context2.options.outdir, context2.options.distDir);
2829
+ if (!options.inject || !Array.isArray(options.inject) || options.inject.length === 0 || // eslint-disable-next-line no-constant-binary-expression, @typescript-eslint/no-explicit-any
2830
+ options.inject === {}) {
2831
+ delete options.inject;
2832
+ }
2820
2833
  delete options.env;
2821
2834
  delete options.name;
2822
2835
  delete options.assets;
@@ -3656,7 +3669,7 @@ import { zodToJsonSchema } from "zod-to-json-schema";
3656
3669
  async function configSchemaGeneratorFn(tree, options, config) {
3657
3670
  writeInfo("\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
3658
3671
  writeTrace(`Determining the Storm Workspace Configuration JSON Schema...`, config);
3659
- const jsonSchema = zodToJsonSchema(StormConfigSchema, {
3672
+ const jsonSchema = zodToJsonSchema(stormWorkspaceConfigSchema, {
3660
3673
  name: "StormWorkspaceConfiguration"
3661
3674
  });
3662
3675
  writeTrace(jsonSchema, config);
@@ -1,3 +1,3 @@
1
- export { I as InitGeneratorSchema, i as initGeneratorFn } from './index-Dx_XVEzo.mjs';
1
+ export { I as InitGeneratorSchema, i as initGeneratorFn } from './index-7riJfK5Q.mjs';
2
2
  import '@nx/devkit';
3
3
  import 'zod';
@@ -1,3 +1,3 @@
1
- export { I as InitGeneratorSchema, i as initGeneratorFn } from './index-Dx_XVEzo.js';
1
+ export { I as InitGeneratorSchema, i as initGeneratorFn } from './index-7riJfK5Q.js';
2
2
  import '@nx/devkit';
3
3
  import 'zod';
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-3Y6AMHJ5.js');
2
2
 
3
3
 
4
- var _chunkXPDENHN2js = require('./chunk-XPDENHN2.js');
4
+ var _chunkIHAOUZIDjs = require('./chunk-IHAOUZID.js');
5
5
  require('./chunk-3DQG66DJ.js');
6
6
  require('./chunk-WTMG7MTK.js');
7
7
 
8
8
 
9
- exports.initGeneratorFn = _chunkXPDENHN2js.initGeneratorFn;
9
+ exports.initGeneratorFn = _chunkIHAOUZIDjs.initGeneratorFn;
@@ -1,7 +1,7 @@
1
1
  import "./chunk-M432POFH.mjs";
2
2
  import {
3
3
  initGeneratorFn
4
- } from "./chunk-XURR3E6P.mjs";
4
+ } from "./chunk-QHXRKXW6.mjs";
5
5
  import "./chunk-TTG4YCRZ.mjs";
6
6
  import "./chunk-MC42JFGZ.mjs";
7
7
  export {
@@ -4,7 +4,7 @@ import z from 'zod';
4
4
  /**
5
5
  * Storm Workspace config values used during various dev-ops processes. It represents the config of the entire monorepo.
6
6
  */
7
- declare const StormConfigSchema: z.ZodObject<{
7
+ declare const stormWorkspaceConfigSchema: z.ZodObject<{
8
8
  $schema: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodDefault<z.ZodString>>>>;
9
9
  extends: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
10
10
  name: z.ZodOptional<z.ZodString>;
@@ -1243,12 +1243,28 @@ declare const StormConfigSchema: z.ZodObject<{
1243
1243
  extensions?: Record<string, any> | undefined;
1244
1244
  }>;
1245
1245
 
1246
- type TStormConfig = z.infer<typeof StormConfigSchema>;
1247
- type StormConfig<TExtensionName extends keyof TStormConfig["extensions"] = keyof TStormConfig["extensions"], TExtensionConfig extends TStormConfig["extensions"][TExtensionName] = TStormConfig["extensions"][TExtensionName]> = TStormConfig & {
1248
- extensions: (TStormConfig["extensions"] & {
1246
+ type TStormWorkspaceConfig = z.infer<typeof stormWorkspaceConfigSchema>;
1247
+ /**
1248
+ * The Storm workspace's configuration object
1249
+ *
1250
+ * @remarks
1251
+ * This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
1252
+ *
1253
+ * @deprecated
1254
+ * This type is deprecated and will be removed in the next major version. Use `StormWorkspaceConfig` instead.
1255
+ */
1256
+ type StormConfig<TExtensionName extends keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"], TExtensionConfig extends TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]> = TStormWorkspaceConfig & {
1257
+ extensions: (TStormWorkspaceConfig["extensions"] & {
1249
1258
  [extensionName in TExtensionName]: TExtensionConfig;
1250
1259
  }) | NonNullable<Record<string, any>>;
1251
1260
  };
1261
+ /**
1262
+ * The Storm workspace's configuration object
1263
+ *
1264
+ * @remarks
1265
+ * This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
1266
+ */
1267
+ type StormWorkspaceConfig<TExtensionName extends keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"], TExtensionConfig extends TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]> = StormConfig<TExtensionName, TExtensionConfig>;
1252
1268
 
1253
1269
  interface BaseGeneratorResult extends Record<string, any> {
1254
1270
  error?: Error;
@@ -1277,7 +1293,7 @@ interface InitGeneratorSchema {
1277
1293
  skipFormat?: boolean,
1278
1294
  }
1279
1295
 
1280
- declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config: StormConfig): Promise<GeneratorCallback>;
1296
+ declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config: StormWorkspaceConfig): Promise<GeneratorCallback>;
1281
1297
  declare const _default: (tree: Tree, _options: InitGeneratorSchema) => Promise<GeneratorCallback | BaseGeneratorResult>;
1282
1298
 
1283
1299
  export { type InitGeneratorSchema as I, _default as _, initGeneratorFn as i };
@@ -4,7 +4,7 @@ import z from 'zod';
4
4
  /**
5
5
  * Storm Workspace config values used during various dev-ops processes. It represents the config of the entire monorepo.
6
6
  */
7
- declare const StormConfigSchema: z.ZodObject<{
7
+ declare const stormWorkspaceConfigSchema: z.ZodObject<{
8
8
  $schema: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodDefault<z.ZodString>>>>;
9
9
  extends: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
10
10
  name: z.ZodOptional<z.ZodString>;
@@ -1243,12 +1243,28 @@ declare const StormConfigSchema: z.ZodObject<{
1243
1243
  extensions?: Record<string, any> | undefined;
1244
1244
  }>;
1245
1245
 
1246
- type TStormConfig = z.infer<typeof StormConfigSchema>;
1247
- type StormConfig<TExtensionName extends keyof TStormConfig["extensions"] = keyof TStormConfig["extensions"], TExtensionConfig extends TStormConfig["extensions"][TExtensionName] = TStormConfig["extensions"][TExtensionName]> = TStormConfig & {
1248
- extensions: (TStormConfig["extensions"] & {
1246
+ type TStormWorkspaceConfig = z.infer<typeof stormWorkspaceConfigSchema>;
1247
+ /**
1248
+ * The Storm workspace's configuration object
1249
+ *
1250
+ * @remarks
1251
+ * This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
1252
+ *
1253
+ * @deprecated
1254
+ * This type is deprecated and will be removed in the next major version. Use `StormWorkspaceConfig` instead.
1255
+ */
1256
+ type StormConfig<TExtensionName extends keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"], TExtensionConfig extends TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]> = TStormWorkspaceConfig & {
1257
+ extensions: (TStormWorkspaceConfig["extensions"] & {
1249
1258
  [extensionName in TExtensionName]: TExtensionConfig;
1250
1259
  }) | NonNullable<Record<string, any>>;
1251
1260
  };
1261
+ /**
1262
+ * The Storm workspace's configuration object
1263
+ *
1264
+ * @remarks
1265
+ * This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
1266
+ */
1267
+ type StormWorkspaceConfig<TExtensionName extends keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"], TExtensionConfig extends TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]> = StormConfig<TExtensionName, TExtensionConfig>;
1252
1268
 
1253
1269
  interface BaseGeneratorResult extends Record<string, any> {
1254
1270
  error?: Error;
@@ -1277,7 +1293,7 @@ interface InitGeneratorSchema {
1277
1293
  skipFormat?: boolean,
1278
1294
  }
1279
1295
 
1280
- declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config: StormConfig): Promise<GeneratorCallback>;
1296
+ declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config: StormWorkspaceConfig): Promise<GeneratorCallback>;
1281
1297
  declare const _default: (tree: Tree, _options: InitGeneratorSchema) => Promise<GeneratorCallback | BaseGeneratorResult>;
1282
1298
 
1283
1299
  export { type InitGeneratorSchema as I, _default as _, initGeneratorFn as i };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- export { I as InitGeneratorSchema, i as initGeneratorFn } from './index-Dx_XVEzo.mjs';
1
+ export { I as InitGeneratorSchema, i as initGeneratorFn } from './index-7riJfK5Q.mjs';
2
2
  import '@nx/devkit';
3
3
  import 'zod';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { I as InitGeneratorSchema, i as initGeneratorFn } from './index-Dx_XVEzo.js';
1
+ export { I as InitGeneratorSchema, i as initGeneratorFn } from './index-7riJfK5Q.js';
2
2
  import '@nx/devkit';
3
3
  import 'zod';
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  var _chunkZ2UXMCUYjs = require('./chunk-Z2UXMCUY.js');
5
5
 
6
6
 
7
- var _chunkXPDENHN2js = require('./chunk-XPDENHN2.js');
7
+ var _chunkIHAOUZIDjs = require('./chunk-IHAOUZID.js');
8
8
  require('./chunk-3DQG66DJ.js');
9
9
 
10
10
 
@@ -16,10 +16,10 @@ var _chunkWTMG7MTKjs = require('./chunk-WTMG7MTK.js');
16
16
  // index.ts
17
17
  var index_exports = {};
18
18
  _chunkWTMG7MTKjs.__export.call(void 0, index_exports, {
19
- initGeneratorFn: () => _chunkXPDENHN2js.initGeneratorFn
19
+ initGeneratorFn: () => _chunkIHAOUZIDjs.initGeneratorFn
20
20
  });
21
21
  _chunkWTMG7MTKjs.init_cjs_shims.call(void 0, );
22
22
  _chunkWTMG7MTKjs.__reExport.call(void 0, index_exports, _chunkWTMG7MTKjs.__toESM.call(void 0, _chunkZ2UXMCUYjs.require_components.call(void 0, )));
23
23
 
24
24
 
25
- exports.initGeneratorFn = _chunkXPDENHN2js.initGeneratorFn;
25
+ exports.initGeneratorFn = _chunkIHAOUZIDjs.initGeneratorFn;
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-WXKORI6N.mjs";
5
5
  import {
6
6
  initGeneratorFn
7
- } from "./chunk-XURR3E6P.mjs";
7
+ } from "./chunk-QHXRKXW6.mjs";
8
8
  import "./chunk-TTG4YCRZ.mjs";
9
9
  import {
10
10
  __export,
@@ -669,23 +669,23 @@ var StormNxWorkspace = (_class = class extends _nxworkspace.NxWorkspace {
669
669
 
670
670
  constructor(project) {
671
671
  super(project);_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);_class.prototype.__init11.call(this);_class.prototype.__init12.call(this);;
672
- let stormConfig;
672
+ let StormWorkspaceConfig;
673
673
  if (project.root.outdir) {
674
- const stormConfigJson = _fs.readFileSync.call(void 0, _chunk3DQG66DJjs.joinPaths.call(void 0, project.root.outdir, "storm-workspace.json"), "utf8");
675
- stormConfig = JSON.parse(stormConfigJson);
674
+ const StormWorkspaceConfigJson = _fs.readFileSync.call(void 0, _chunk3DQG66DJjs.joinPaths.call(void 0, project.root.outdir, "storm-workspace.json"), "utf8");
675
+ StormWorkspaceConfig = JSON.parse(StormWorkspaceConfigJson);
676
676
  }
677
- if (_optionalChain([stormConfig, 'optionalAccess', _ => _.namespace])) {
678
- this.npmScope = _optionalChain([stormConfig, 'optionalAccess', _2 => _2.namespace]);
677
+ if (_optionalChain([StormWorkspaceConfig, 'optionalAccess', _ => _.namespace])) {
678
+ this.npmScope = _optionalChain([StormWorkspaceConfig, 'optionalAccess', _2 => _2.namespace]);
679
679
  }
680
- if (_optionalChain([stormConfig, 'optionalAccess', _3 => _3.branch])) {
681
- this.defaultBase = _optionalChain([stormConfig, 'optionalAccess', _4 => _4.branch]);
680
+ if (_optionalChain([StormWorkspaceConfig, 'optionalAccess', _3 => _3.branch])) {
681
+ this.defaultBase = _optionalChain([StormWorkspaceConfig, 'optionalAccess', _4 => _4.branch]);
682
682
  this.affected = {
683
- defaultBase: _optionalChain([stormConfig, 'optionalAccess', _5 => _5.branch])
683
+ defaultBase: _optionalChain([StormWorkspaceConfig, 'optionalAccess', _5 => _5.branch])
684
684
  };
685
685
  }
686
- if (_optionalChain([stormConfig, 'optionalAccess', _6 => _6.packageManager])) {
686
+ if (_optionalChain([StormWorkspaceConfig, 'optionalAccess', _6 => _6.packageManager])) {
687
687
  this.cli = {
688
- packageManager: _optionalChain([stormConfig, 'optionalAccess', _7 => _7.packageManager])
688
+ packageManager: _optionalChain([StormWorkspaceConfig, 'optionalAccess', _7 => _7.packageManager])
689
689
  };
690
690
  }
691
691
  this.nxJson = new (0, _projen.JsonFile)(project, "nx.json", {
@@ -669,23 +669,23 @@ var StormNxWorkspace = class extends NxWorkspace {
669
669
  cli;
670
670
  constructor(project) {
671
671
  super(project);
672
- let stormConfig;
672
+ let StormWorkspaceConfig;
673
673
  if (project.root.outdir) {
674
- const stormConfigJson = readFileSync(joinPaths(project.root.outdir, "storm-workspace.json"), "utf8");
675
- stormConfig = JSON.parse(stormConfigJson);
674
+ const StormWorkspaceConfigJson = readFileSync(joinPaths(project.root.outdir, "storm-workspace.json"), "utf8");
675
+ StormWorkspaceConfig = JSON.parse(StormWorkspaceConfigJson);
676
676
  }
677
- if (stormConfig?.namespace) {
678
- this.npmScope = stormConfig?.namespace;
677
+ if (StormWorkspaceConfig?.namespace) {
678
+ this.npmScope = StormWorkspaceConfig?.namespace;
679
679
  }
680
- if (stormConfig?.branch) {
681
- this.defaultBase = stormConfig?.branch;
680
+ if (StormWorkspaceConfig?.branch) {
681
+ this.defaultBase = StormWorkspaceConfig?.branch;
682
682
  this.affected = {
683
- defaultBase: stormConfig?.branch
683
+ defaultBase: StormWorkspaceConfig?.branch
684
684
  };
685
685
  }
686
- if (stormConfig?.packageManager) {
686
+ if (StormWorkspaceConfig?.packageManager) {
687
687
  this.cli = {
688
- packageManager: stormConfig?.packageManager
688
+ packageManager: StormWorkspaceConfig?.packageManager
689
689
  };
690
690
  }
691
691
  this.nxJson = new JsonFile(project, "nx.json", {
@@ -1,3 +1,3 @@
1
1
  import '@nx/devkit';
2
- export { _ as default, i as initGeneratorFn } from '../../../index-Dx_XVEzo.mjs';
2
+ export { _ as default, i as initGeneratorFn } from '../../../index-7riJfK5Q.mjs';
3
3
  import 'zod';
@@ -1,3 +1,3 @@
1
1
  import '@nx/devkit';
2
- export { _ as default, i as initGeneratorFn } from '../../../index-Dx_XVEzo.js';
2
+ export { _ as default, i as initGeneratorFn } from '../../../index-7riJfK5Q.js';
3
3
  import 'zod';
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkXPDENHN2js = require('../../../chunk-XPDENHN2.js');
4
+ var _chunkIHAOUZIDjs = require('../../../chunk-IHAOUZID.js');
5
5
  require('../../../chunk-3DQG66DJ.js');
6
6
  require('../../../chunk-WTMG7MTK.js');
7
7
 
8
8
 
9
9
 
10
- exports.default = _chunkXPDENHN2js.generator_default; exports.initGeneratorFn = _chunkXPDENHN2js.initGeneratorFn;
10
+ exports.default = _chunkIHAOUZIDjs.generator_default; exports.initGeneratorFn = _chunkIHAOUZIDjs.initGeneratorFn;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generator_default,
3
3
  initGeneratorFn
4
- } from "../../../chunk-XURR3E6P.mjs";
4
+ } from "../../../chunk-QHXRKXW6.mjs";
5
5
  import "../../../chunk-TTG4YCRZ.mjs";
6
6
  import "../../../chunk-MC42JFGZ.mjs";
7
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/projen",
3
- "version": "0.9.34",
3
+ "version": "0.9.36",
4
4
  "type": "commonjs",
5
5
  "description": "Tools for managing Projen configuration automation within a Nx workspace.",
6
6
  "repository": {