@storm-software/cloudflare-tools 0.55.39 → 0.55.40

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 (43) hide show
  1. package/CHANGELOG.md +165 -75
  2. package/README.md +6 -6
  3. package/dist/{chunk-Y3XZCCPP.mjs → chunk-3HMZSKJD.mjs} +1 -1
  4. package/dist/{chunk-FSZS6NDT.js → chunk-3SY45SUU.js} +12 -12
  5. package/dist/{chunk-J22YL4DC.mjs → chunk-4QFFFPC5.mjs} +2 -2
  6. package/dist/{chunk-XYJVYVYX.js → chunk-5KLP7KFL.js} +484 -571
  7. package/dist/{chunk-HZON5W3G.js → chunk-FK6PN2T3.js} +42 -14
  8. package/dist/{chunk-ZBM3I5Z7.mjs → chunk-FQEGSK6L.mjs} +4 -4
  9. package/dist/{chunk-KLCTLDIH.js → chunk-H2ML72QF.js} +91 -47
  10. package/dist/{chunk-I6XBWBZN.js → chunk-HF5FM2V2.js} +3 -3
  11. package/dist/{chunk-HWRWRM5W.mjs → chunk-LEXIFHU6.mjs} +2 -2
  12. package/dist/{chunk-B6ZQTLTY.js → chunk-LZLR3HJU.js} +1 -1
  13. package/dist/{chunk-QD7ZKWKB.mjs → chunk-M4FHQYTZ.mjs} +43 -15
  14. package/dist/{chunk-MVGAJ7Q4.js → chunk-MCQ4YOON.js} +16 -16
  15. package/dist/{chunk-VAVNPHSE.mjs → chunk-MESLYSHV.mjs} +52 -8
  16. package/dist/{chunk-MBAVTLIK.mjs → chunk-RHCFLN3R.mjs} +323 -410
  17. package/dist/{chunk-5OCPVWBL.mjs → chunk-S3S7EN37.mjs} +5 -5
  18. package/dist/{chunk-PDHMNSTI.mjs → chunk-VNLZQQ5C.mjs} +2 -2
  19. package/dist/{chunk-KFNKJP2U.mjs → chunk-YYEF6TFG.mjs} +1 -1
  20. package/dist/executors.js +5 -5
  21. package/dist/executors.mjs +8 -8
  22. package/dist/generators.js +5 -5
  23. package/dist/generators.mjs +5 -5
  24. package/dist/index.js +8 -8
  25. package/dist/index.mjs +10 -10
  26. package/dist/src/executors/cloudflare-publish/executor.js +3 -3
  27. package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
  28. package/dist/src/executors/r2-upload-publish/executor.js +5 -5
  29. package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
  30. package/dist/src/executors/serve/executor.d.mts +67 -3
  31. package/dist/src/executors/serve/executor.d.ts +67 -3
  32. package/dist/src/executors/serve/executor.js +4 -4
  33. package/dist/src/executors/serve/executor.mjs +5 -5
  34. package/dist/src/generators/init/generator.js +2 -2
  35. package/dist/src/generators/init/generator.mjs +2 -2
  36. package/dist/src/generators/worker/generator.js +5 -5
  37. package/dist/src/generators/worker/generator.mjs +5 -5
  38. package/dist/src/utils/index.js +3 -3
  39. package/dist/src/utils/index.mjs +3 -3
  40. package/dist/src/utils/r2-bucket-helpers.js +3 -3
  41. package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
  42. package/dist/tsup.config.mjs +1 -1
  43. package/package.json +11 -11
@@ -4,7 +4,7 @@
4
4
  var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
5
5
 
6
6
 
7
- var _chunkKLCTLDIHjs = require('./chunk-KLCTLDIH.js');
7
+ var _chunkH2ML72QFjs = require('./chunk-H2ML72QF.js');
8
8
 
9
9
 
10
10
 
@@ -20,7 +20,7 @@ var _chunkKLCTLDIHjs = require('./chunk-KLCTLDIH.js');
20
20
 
21
21
 
22
22
 
23
- var _chunkHZON5W3Gjs = require('./chunk-HZON5W3G.js');
23
+ var _chunkFK6PN2T3js = require('./chunk-FK6PN2T3.js');
24
24
 
25
25
 
26
26
 
@@ -53,7 +53,7 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
53
53
  }
54
54
  }
55
55
  if (result.includes("{workspaceRoot}")) {
56
- result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkHZON5W3Gjs.findWorkspaceRoot.call(void 0, ))));
56
+ result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkFK6PN2T3js.findWorkspaceRoot.call(void 0, ))));
57
57
  }
58
58
  return result;
59
59
  }, "applyWorkspaceBaseTokens");
@@ -101,35 +101,35 @@ var run = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (config, command,
101
101
  // ../workspace-tools/src/base/base-executor.ts
102
102
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
103
103
  var withRunExecutor = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name, executorFn, executorOptions = {}) => async (_options, context2) => {
104
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, name);
104
+ const stopwatch = _chunkFK6PN2T3js.getStopwatch.call(void 0, name);
105
105
  let options = _options;
106
106
  let config = {};
107
107
  try {
108
108
  if (!_optionalChain([context2, 'access', _5 => _5.projectsConfigurations, 'optionalAccess', _6 => _6.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
109
109
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
110
110
  }
111
- const workspaceRoot3 = _chunkHZON5W3Gjs.findWorkspaceRoot.call(void 0, );
111
+ const workspaceRoot3 = _chunkFK6PN2T3js.findWorkspaceRoot.call(void 0, );
112
112
  const projectRoot = context2.projectsConfigurations.projects[context2.projectName].root || workspaceRoot3;
113
113
  const sourceRoot = context2.projectsConfigurations.projects[context2.projectName].sourceRoot || projectRoot || workspaceRoot3;
114
114
  const projectName = context2.projectName;
115
115
  config.workspaceRoot = workspaceRoot3;
116
- _chunkHZON5W3Gjs.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
116
+ _chunkFK6PN2T3js.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
117
117
  if (!executorOptions.skipReadingConfig) {
118
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
118
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
119
119
  - workspaceRoot: ${workspaceRoot3}
120
120
  - projectRoot: ${projectRoot}
121
121
  - sourceRoot: ${sourceRoot}
122
122
  - projectName: ${projectName}
123
123
  `, config);
124
- config = await _chunkKLCTLDIHjs.getConfig.call(void 0, workspaceRoot3);
124
+ config = await _chunkH2ML72QFjs.getConfig.call(void 0, workspaceRoot3);
125
125
  }
126
126
  if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
127
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
127
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
128
128
  options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
129
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
129
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
130
130
  }
131
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `Executor schema options \u2699\uFE0F
132
- ${_chunkHZON5W3Gjs.formatLogMessage.call(void 0, options)}
131
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `Executor schema options \u2699\uFE0F
132
+ ${_chunkFK6PN2T3js.formatLogMessage.call(void 0, options)}
133
133
  `, config);
134
134
  const tokenized = await applyWorkspaceTokens(options, _defu.defu.call(void 0, {
135
135
  workspaceRoot: workspaceRoot3,
@@ -138,13 +138,13 @@ ${_chunkHZON5W3Gjs.formatLogMessage.call(void 0, options)}
138
138
  projectName,
139
139
  config
140
140
  }, config, context2.projectsConfigurations.projects[context2.projectName]), applyWorkspaceProjectTokens);
141
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `Executor schema tokenized options \u2699\uFE0F
142
- ${_chunkHZON5W3Gjs.formatLogMessage.call(void 0, tokenized)}
141
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `Executor schema tokenized options \u2699\uFE0F
142
+ ${_chunkFK6PN2T3js.formatLogMessage.call(void 0, tokenized)}
143
143
  `, config);
144
144
  if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
145
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
145
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Running the preProcess hook...", config);
146
146
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
147
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
147
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Completed the preProcess hook", config);
148
148
  }
149
149
  const ret = executorFn(tokenized, context2, config);
150
150
  if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
@@ -154,26 +154,26 @@ ${_chunkHZON5W3Gjs.formatLogMessage.call(void 0, tokenized)}
154
154
  }
155
155
  const result = await Promise.resolve(ret);
156
156
  if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _12 => _12.error, 'optionalAccess', _13 => _13.message]) && typeof _optionalChain([result, 'optionalAccess', _14 => _14.error, 'optionalAccess', _15 => _15.message]) === "string" && _optionalChain([result, 'optionalAccess', _16 => _16.error, 'optionalAccess', _17 => _17.name]) && typeof _optionalChain([result, 'optionalAccess', _18 => _18.error, 'optionalAccess', _19 => _19.name]) === "string")) {
157
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `Failure determined by the ${name} executor
158
- ${_chunkHZON5W3Gjs.formatLogMessage.call(void 0, result)}`, config);
157
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `Failure determined by the ${name} executor
158
+ ${_chunkFK6PN2T3js.formatLogMessage.call(void 0, result)}`, config);
159
159
  console.error(result);
160
160
  throw new Error(`The ${name} executor failed to run`, {
161
161
  cause: _optionalChain([result, 'optionalAccess', _20 => _20.error])
162
162
  });
163
163
  }
164
164
  if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
165
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
165
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Running the postProcess hook...", config);
166
166
  await Promise.resolve(executorOptions.hooks.postProcess(config));
167
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
167
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Completed the postProcess hook", config);
168
168
  }
169
- _chunkHZON5W3Gjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
169
+ _chunkFK6PN2T3js.writeSuccess.call(void 0, `Completed running the ${name} task executor!
170
170
  `, config);
171
171
  return {
172
172
  success: true
173
173
  };
174
174
  } catch (error) {
175
- _chunkHZON5W3Gjs.writeFatal.call(void 0, "A fatal error occurred while running the executor - the process was forced to terminate", config);
176
- _chunkHZON5W3Gjs.writeError.call(void 0, `An exception was thrown in the executor's process
175
+ _chunkFK6PN2T3js.writeFatal.call(void 0, "A fatal error occurred while running the executor - the process was forced to terminate", config);
176
+ _chunkFK6PN2T3js.writeError.call(void 0, `An exception was thrown in the executor's process
177
177
  - Details: ${error.message}
178
178
  - Stacktrace: ${error.stack}`, config);
179
179
  return {
@@ -423,11 +423,11 @@ var LARGE_BUFFER2 = 1024 * 1e6;
423
423
 
424
424
 
425
425
  // ../build-tools/src/config.ts
426
- var DEFAULT_COMPILED_BANNER = `
427
- /**
426
+ var DEFAULT_COMPILED_BANNER = `/*****************************************
427
+ *
428
428
  * \u26A1 Built by Storm Software
429
- */
430
-
429
+ *
430
+ *****************************************/
431
431
  `;
432
432
  var DEFAULT_ENVIRONMENT = "production";
433
433
  var DEFAULT_TARGET = "esnext";
@@ -450,7 +450,7 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
450
450
  var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
451
451
  var _glob = require('glob');
452
452
  var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
453
- var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
453
+ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
454
454
  const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
455
455
  pendingAssets.push({
456
456
  input: projectRoot,
@@ -462,7 +462,7 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
462
462
  glob: "LICENSE",
463
463
  output: "."
464
464
  });
465
- if (generatePackageJson3 === false) {
465
+ if (generatePackageJson2 === false) {
466
466
  pendingAssets.push({
467
467
  input: projectRoot,
468
468
  glob: "package.json",
@@ -476,8 +476,8 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
476
476
  output: "src/"
477
477
  });
478
478
  }
479
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
480
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkHZON5W3Gjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
479
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
480
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkFK6PN2T3js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
481
481
  const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
482
482
  projectDir: projectRoot,
483
483
  rootDir: config.workspaceRoot,
@@ -486,12 +486,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
486
486
  });
487
487
  await assetHandler.processAllAssetsOnce();
488
488
  if (includeSrc === true) {
489
- _chunkHZON5W3Gjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkHZON5W3Gjs.joinPaths.call(void 0, outputPath, "src")}`, config);
489
+ _chunkFK6PN2T3js.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkFK6PN2T3js.joinPaths.call(void 0, outputPath, "src")}`, config);
490
490
  const files = await _glob.glob.call(void 0, [
491
- _chunkHZON5W3Gjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
492
- _chunkHZON5W3Gjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
493
- _chunkHZON5W3Gjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
494
- _chunkHZON5W3Gjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
491
+ _chunkFK6PN2T3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
492
+ _chunkFK6PN2T3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
493
+ _chunkFK6PN2T3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
494
+ _chunkFK6PN2T3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
495
495
  ]);
496
496
  await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
497
497
 
@@ -511,10 +511,10 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
511
511
  const projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
512
512
  const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
513
513
  const localPackages = [];
514
- for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
514
+ for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _29 => _29.node, 'access', _30 => _30.data, 'optionalAccess', _31 => _31.root]) !== projectRoot && _optionalChain([dep, 'access', _32 => _32.node, 'access', _33 => _33.data, 'optionalAccess', _34 => _34.root]) !== workspaceRoot3)) {
515
515
  const projectNode = project.node;
516
516
  if (projectNode.data.root) {
517
- const projectPackageJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
517
+ const projectPackageJsonPath = _chunkFK6PN2T3js.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
518
518
  if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
519
519
  const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
520
520
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
@@ -525,17 +525,17 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
525
525
  }
526
526
  }
527
527
  if (localPackages.length > 0) {
528
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
529
- const projectJsonFile = await _promises.readFile.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
528
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
529
+ const projectJsonFile = await _promises.readFile.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
530
530
  const projectJson = JSON.parse(projectJsonFile);
531
531
  const projectName2 = projectJson.name;
532
532
  const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
533
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _29 => _29.projects, 'optionalAccess', _30 => _30[projectName2]])) {
533
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _35 => _35.projects, 'optionalAccess', _36 => _36[projectName2]])) {
534
534
  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.");
535
535
  }
536
- const implicitDependencies = _optionalChain([projectConfigurations, 'access', _31 => _31.projects, 'optionalAccess', _32 => _32[projectName2], 'access', _33 => _33.implicitDependencies, 'optionalAccess', _34 => _34.reduce, 'call', _35 => _35((ret, dep) => {
537
- if (_optionalChain([projectConfigurations, 'access', _36 => _36.projects, 'optionalAccess', _37 => _37[dep]])) {
538
- const depPackageJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
536
+ const implicitDependencies = _optionalChain([projectConfigurations, 'access', _37 => _37.projects, 'optionalAccess', _38 => _38[projectName2], 'access', _39 => _39.implicitDependencies, 'optionalAccess', _40 => _40.reduce, 'call', _41 => _41((ret, dep) => {
537
+ if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
538
+ const depPackageJsonPath = _chunkFK6PN2T3js.joinPaths.call(void 0, workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
539
539
  if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
540
540
  const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
541
541
  const depPackageJson = JSON.parse(depPackageJsonContent);
@@ -547,25 +547,25 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
547
547
  return ret;
548
548
  }, [])]);
549
549
  packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
550
- if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _38 => _38.includes, 'call', _39 => _39(localPackage.name)])) {
550
+ if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _44 => _44.includes, 'call', _45 => _45(localPackage.name)])) {
551
551
  ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
552
552
  }
553
553
  return ret;
554
554
  }, _nullishCoalesce(packageJson.dependencies, () => ( {})));
555
555
  packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
556
- if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _40 => _40.includes, 'call', _41 => _41(localPackage.name)])) {
556
+ if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _46 => _46.includes, 'call', _47 => _47(localPackage.name)])) {
557
557
  ret[localPackage.name] = localPackage.version || "0.0.1";
558
558
  }
559
559
  return ret;
560
560
  }, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
561
561
  } else {
562
- _chunkHZON5W3Gjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
562
+ _chunkFK6PN2T3js.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
563
563
  }
564
564
  return packageJson;
565
565
  }, "addPackageDependencies");
566
566
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
567
- const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkHZON5W3Gjs.findWorkspaceRoot.call(void 0, );
568
- const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
567
+ const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkFK6PN2T3js.findWorkspaceRoot.call(void 0, );
568
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
569
569
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
570
570
  packageJson.type ??= "module";
571
571
  packageJson.sideEffects ??= false;
@@ -574,7 +574,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
574
574
  if (distSrc.startsWith("/")) {
575
575
  distSrc = distSrc.substring(1);
576
576
  }
577
- packageJson.source ??= `${_chunkHZON5W3Gjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
577
+ packageJson.source ??= `${_chunkFK6PN2T3js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
578
578
  }
579
579
  packageJson.files ??= [
580
580
  "dist/**/*"
@@ -605,68 +605,59 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
605
605
  ];
606
606
  }
607
607
  packageJson.repository ??= workspacePackageJson.repository;
608
- packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkHZON5W3Gjs.joinPaths.call(void 0, "packages", projectName);
608
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkFK6PN2T3js.joinPaths.call(void 0, "packages", projectName);
609
609
  return packageJson;
610
610
  }, "addWorkspacePackageJsonFields");
611
- var addPackageJsonExport = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (file, type = "module", sourceRoot) => {
612
- let entry = file.replaceAll("\\", "/");
613
- if (sourceRoot) {
614
- entry = entry.replace(sourceRoot, "");
615
- }
616
- return {
617
- import: {
618
- types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
619
- default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
620
- },
621
- require: {
622
- types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
623
- default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
624
- },
625
- default: {
626
- types: `./dist/${entry}.d.ts`,
627
- default: `./dist/${entry}.js`
628
- }
629
- };
630
- }, "addPackageJsonExport");
631
611
 
632
612
  // ../build-tools/src/utilities/get-entry-points.ts
633
613
 
634
614
  var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
635
- const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkHZON5W3Gjs.findWorkspaceRoot.call(void 0, );
615
+ const workspaceRoot3 = config.workspaceRoot || _chunkFK6PN2T3js.findWorkspaceRoot.call(void 0, );
636
616
  const entryPoints = [];
637
617
  if (entry) {
638
- if (Array.isArray(entry)) {
639
- entryPoints.push(...entry);
640
- } else if (typeof entry === "string") {
618
+ if (typeof entry === "string") {
641
619
  entryPoints.push(entry);
620
+ } else if (Array.isArray(entry)) {
621
+ entryPoints.push(...entry);
642
622
  } else {
643
623
  entryPoints.push(...Object.values(entry));
644
624
  }
645
625
  }
646
626
  if (emitOnAll) {
647
- entryPoints.push(_chunkHZON5W3Gjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
627
+ entryPoints.push(_chunkFK6PN2T3js.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
648
628
  }
649
- const results = [];
650
- for (const entryPoint in entryPoints) {
629
+ const results = await Promise.all(entryPoints.map(async (entryPoint) => {
630
+ const paths = [];
651
631
  if (entryPoint.includes("*")) {
652
632
  const files = await _glob.glob.call(void 0, entryPoint, {
653
- withFileTypes: true
633
+ withFileTypes: true,
634
+ ignore: [
635
+ "**/node_modules/**"
636
+ ]
654
637
  });
655
- results.push(...files.reduce((ret, filePath) => {
656
- const result = _chunkHZON5W3Gjs.correctPaths.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkHZON5W3Gjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkHZON5W3Gjs.correctPaths.call(void 0, projectRoot), ""));
638
+ paths.push(...files.reduce((ret, filePath) => {
639
+ const result = _chunkFK6PN2T3js.correctPaths.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkFK6PN2T3js.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkFK6PN2T3js.correctPaths.call(void 0, projectRoot), ""));
657
640
  if (result) {
658
- _chunkHZON5W3Gjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkHZON5W3Gjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
659
- if (!results.includes(result)) {
660
- results.push(result);
641
+ _chunkFK6PN2T3js.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkFK6PN2T3js.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
642
+ if (!paths.includes(result)) {
643
+ paths.push(result);
661
644
  }
662
645
  }
663
646
  return ret;
664
647
  }, []));
665
648
  } else {
666
- results.push(entryPoint);
649
+ paths.push(entryPoint);
667
650
  }
668
- }
669
- return results;
651
+ return paths;
652
+ }));
653
+ return results.filter(Boolean).reduce((ret, result) => {
654
+ result.forEach((res) => {
655
+ if (res && !ret.includes(res)) {
656
+ ret.push(res);
657
+ }
658
+ });
659
+ return ret;
660
+ }, []);
670
661
  }, "getEntryPoints");
671
662
 
672
663
  // ../build-tools/src/utilities/get-env.ts
@@ -675,7 +666,7 @@ var getEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (builder, opti
675
666
  STORM_BUILD: builder,
676
667
  STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
677
668
  STORM_NAME: options.name,
678
- STORM_ENV: options.envName || DEFAULT_ENVIRONMENT,
669
+ STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
679
670
  STORM_PLATFORM: options.platform,
680
671
  STORM_FORMAT: JSON.stringify(options.format),
681
672
  STORM_TARGET: JSON.stringify(options.target),
@@ -683,28 +674,6 @@ var getEnv = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (builder, opti
683
674
  };
684
675
  }, "getEnv");
685
676
 
686
- // ../build-tools/src/utilities/get-out-extension.ts
687
- function getOutExtension(format2, pkgType) {
688
- let jsExtension = ".js";
689
- let dtsExtension = ".d.ts";
690
- if (pkgType === "module" && format2 === "cjs") {
691
- jsExtension = ".cjs";
692
- dtsExtension = ".d.cts";
693
- }
694
- if (pkgType !== "module" && format2 === "esm") {
695
- jsExtension = ".mjs";
696
- dtsExtension = ".d.mts";
697
- }
698
- if (format2 === "iife") {
699
- jsExtension = ".global.js";
700
- }
701
- return {
702
- js: jsExtension,
703
- dts: dtsExtension
704
- };
705
- }
706
- _chunkJ5SB6L2Ljs.__name.call(void 0, getOutExtension, "getOutExtension");
707
-
708
677
  // ../build-tools/src/utilities/read-nx-config.ts
709
678
 
710
679
 
@@ -789,15 +758,15 @@ var RendererEngine = class {
789
758
  if (!relativePath.startsWith("\\\\?\\")) {
790
759
  relativePath = relativePath.replace(/\\/g, "/");
791
760
  }
792
- const meta = _optionalChain([metafile, 'optionalAccess', _42 => _42.outputs, 'access', _43 => _43[relativePath]]);
761
+ const meta = _optionalChain([metafile, 'optionalAccess', _48 => _48.outputs, 'access', _49 => _49[relativePath]]);
793
762
  return {
794
763
  type: "chunk",
795
764
  path: file.path,
796
765
  code: file.text,
797
- map: _optionalChain([outputFiles, 'access', _44 => _44.find, 'call', _45 => _45((f) => f.path === `${file.path}.map`), 'optionalAccess', _46 => _46.text]),
798
- entryPoint: _optionalChain([meta, 'optionalAccess', _47 => _47.entryPoint]),
799
- exports: _optionalChain([meta, 'optionalAccess', _48 => _48.exports]),
800
- imports: _optionalChain([meta, 'optionalAccess', _49 => _49.imports])
766
+ map: _optionalChain([outputFiles, 'access', _50 => _50.find, 'call', _51 => _51((f) => f.path === `${file.path}.map`), 'optionalAccess', _52 => _52.text]),
767
+ entryPoint: _optionalChain([meta, 'optionalAccess', _53 => _53.entryPoint]),
768
+ exports: _optionalChain([meta, 'optionalAccess', _54 => _54.exports]),
769
+ imports: _optionalChain([meta, 'optionalAccess', _55 => _55.imports])
801
770
  };
802
771
  } else {
803
772
  return {
@@ -878,9 +847,9 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, cleanDirectories, "cleanDirectories");
878
847
 
879
848
  var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
880
849
  name: "storm:esm-split-code-to-cjs",
881
- setup(build5) {
882
- build5.onEnd(async (result) => {
883
- const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _50 => _50.metafile, 'optionalAccess', _51 => _51.outputs]), () => ( {})));
850
+ setup(build4) {
851
+ build4.onEnd(async (result) => {
852
+ const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _56 => _56.metafile, 'optionalAccess', _57 => _57.outputs]), () => ( {})));
884
853
  const jsFiles = outFiles.filter((f) => f.endsWith("js"));
885
854
  await esbuild.build({
886
855
  outdir: resolvedOptions.outdir,
@@ -897,15 +866,15 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
897
866
  // ../esbuild/src/plugins/fix-imports.ts
898
867
  var fixImportsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
899
868
  name: "storm:fix-imports",
900
- setup(build5) {
901
- build5.onResolve({
869
+ setup(build4) {
870
+ build4.onResolve({
902
871
  filter: /^spdx-exceptions/
903
872
  }, () => {
904
873
  return {
905
874
  path: _chunkJ5SB6L2Ljs.__require.resolve("spdx-exceptions")
906
875
  };
907
876
  });
908
- build5.onResolve({
877
+ build4.onResolve({
909
878
  filter: /^spdx-license-ids/
910
879
  }, () => {
911
880
  return {
@@ -920,8 +889,8 @@ var fixImportsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (opt
920
889
  var nativeNodeModulesPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => {
921
890
  return {
922
891
  name: "native-node-modules",
923
- setup(build5) {
924
- build5.onResolve({
892
+ setup(build4) {
893
+ build4.onResolve({
925
894
  filter: /\.node$/,
926
895
  namespace: "file"
927
896
  }, (args) => {
@@ -940,7 +909,7 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
940
909
  path: resolvedId
941
910
  };
942
911
  });
943
- build5.onLoad({
912
+ build4.onLoad({
944
913
  filter: /.*/,
945
914
  namespace: "node-file"
946
915
  }, (args) => {
@@ -953,14 +922,14 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
953
922
  resolveDir: _path.dirname.call(void 0, args.path)
954
923
  };
955
924
  });
956
- build5.onResolve({
925
+ build4.onResolve({
957
926
  filter: /\.node$/,
958
927
  namespace: "node-file"
959
928
  }, (args) => ({
960
929
  path: args.path,
961
930
  namespace: "file"
962
931
  }));
963
- const opts = build5.initialOptions;
932
+ const opts = build4.initialOptions;
964
933
  opts.loader = opts.loader || {};
965
934
  opts.loader[".node"] = "file";
966
935
  }
@@ -986,10 +955,10 @@ var nodeProtocolPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (o
986
955
  // ../esbuild/src/plugins/on-error.ts
987
956
  var onErrorPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
988
957
  name: "storm:on-error",
989
- setup(build5) {
990
- build5.onEnd((result) => {
958
+ setup(build4) {
959
+ build4.onEnd((result) => {
991
960
  if (result.errors.length > 0 && process.env.WATCH !== "true") {
992
- _chunkHZON5W3Gjs.writeError.call(void 0, `The following errors occurred during the build:
961
+ _chunkFK6PN2T3js.writeError.call(void 0, `The following errors occurred during the build:
993
962
  ${result.errors.map((error) => error.text).join("\n")}
994
963
 
995
964
  `, resolvedOptions.config);
@@ -1002,7 +971,7 @@ ${result.errors.map((error) => error.text).join("\n")}
1002
971
  // ../esbuild/src/plugins/resolve-paths.ts
1003
972
 
1004
973
  function resolvePathsConfig(options, cwd) {
1005
- if (_optionalChain([options, 'optionalAccess', _52 => _52.compilerOptions, 'optionalAccess', _53 => _53.paths])) {
974
+ if (_optionalChain([options, 'optionalAccess', _58 => _58.compilerOptions, 'optionalAccess', _59 => _59.paths])) {
1006
975
  const paths = Object.entries(options.compilerOptions.paths);
1007
976
  const resolvedPaths = paths.map(([key, paths2]) => {
1008
977
  return [
@@ -1023,14 +992,14 @@ function resolvePathsConfig(options, cwd) {
1023
992
  _chunkJ5SB6L2Ljs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
1024
993
  var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
1025
994
  name: "storm:resolve-paths",
1026
- setup(build5) {
1027
- const parentTsConfig = build5.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
995
+ setup(build4) {
996
+ const parentTsConfig = build4.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
1028
997
  const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
1029
998
  const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
1030
- build5.onResolve({
999
+ build4.onResolve({
1031
1000
  filter: packagesRegex
1032
1001
  }, (args) => {
1033
- if (_optionalChain([build5, 'access', _54 => _54.initialOptions, 'access', _55 => _55.external, 'optionalAccess', _56 => _56.includes, 'call', _57 => _57(args.path)])) {
1002
+ if (_optionalChain([build4, 'access', _60 => _60.initialOptions, 'access', _61 => _61.external, 'optionalAccess', _62 => _62.includes, 'call', _63 => _63(args.path)])) {
1034
1003
  return {
1035
1004
  path: args.path,
1036
1005
  external: true
@@ -1048,7 +1017,7 @@ var _apiextractor = require('@microsoft/api-extractor');
1048
1017
 
1049
1018
 
1050
1019
  function bundleTypeDefinitions(filename, outfile, externals, options) {
1051
- const { dependencies, peerDependencies, devDependencies } = _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
1020
+ const { dependencies, peerDependencies, devDependencies } = _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, options.projectRoot, "package.json"));
1052
1021
  const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
1053
1022
  p,
1054
1023
  getTypeDependencyPackageName(p)
@@ -1078,18 +1047,19 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
1078
1047
  overrideTsconfig: {
1079
1048
  compilerOptions: {
1080
1049
  paths: {}
1050
+ // bug with api extract + paths
1081
1051
  }
1082
1052
  }
1083
1053
  },
1084
1054
  dtsRollup: {
1085
1055
  enabled: true,
1086
- untrimmedFilePath: _chunkHZON5W3Gjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
1056
+ untrimmedFilePath: _chunkFK6PN2T3js.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
1087
1057
  },
1088
1058
  tsdocMetadata: {
1089
1059
  enabled: false
1090
1060
  }
1091
1061
  },
1092
- packageJsonFullPath: _chunkHZON5W3Gjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
1062
+ packageJsonFullPath: _chunkFK6PN2T3js.joinPaths.call(void 0, options.projectRoot, "package.json"),
1093
1063
  configObjectFullPath: void 0
1094
1064
  });
1095
1065
  const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
@@ -1097,18 +1067,18 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
1097
1067
  localBuild: true
1098
1068
  });
1099
1069
  if (extractorResult.succeeded === false) {
1100
- _chunkHZON5W3Gjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
1070
+ _chunkFK6PN2T3js.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
1101
1071
  throw new Error("API Extractor completed with errors");
1102
1072
  }
1103
1073
  }
1104
1074
  _chunkJ5SB6L2Ljs.__name.call(void 0, bundleTypeDefinitions, "bundleTypeDefinitions");
1105
1075
  var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
1106
1076
  name: "storm:tsc",
1107
- setup(build5) {
1077
+ setup(build4) {
1108
1078
  if (options.emitTypes === false) {
1109
1079
  return;
1110
1080
  }
1111
- build5.onStart(async () => {
1081
+ build4.onStart(async () => {
1112
1082
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
1113
1083
  await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
1114
1084
  }
@@ -1116,14 +1086,14 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
1116
1086
  const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
1117
1087
  const typeOutDir = resolvedOptions.outdir;
1118
1088
  const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
1119
- const bundlePath = _chunkHZON5W3Gjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
1089
+ const bundlePath = _chunkFK6PN2T3js.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
1120
1090
  let dtsPath;
1121
- if (_fs.existsSync.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
1122
- dtsPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
1123
- } else if (_fs.existsSync.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
1124
- dtsPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
1091
+ if (_fs.existsSync.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
1092
+ dtsPath = _chunkFK6PN2T3js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
1093
+ } else if (_fs.existsSync.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
1094
+ dtsPath = _chunkFK6PN2T3js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
1125
1095
  }
1126
- const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
1096
+ const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
1127
1097
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
1128
1098
  bundleTypeDefinitions(dtsPath, bundlePath, _nullishCoalesce(resolvedOptions.external, () => ( [])), resolvedOptions);
1129
1099
  const dtsContents = await _promises2.default.readFile(`${bundlePath}.d.ts`, "utf8");
@@ -1138,16 +1108,13 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
1138
1108
  function getTypeDependencyPackageName(npmPackage) {
1139
1109
  if (npmPackage.startsWith("@")) {
1140
1110
  const [scope, name] = npmPackage.split("/");
1141
- return `@types/${_optionalChain([scope, 'optionalAccess', _58 => _58.slice, 'call', _59 => _59(1)])}__${name}`;
1111
+ return `@types/${_optionalChain([scope, 'optionalAccess', _64 => _64.slice, 'call', _65 => _65(1)])}__${name}`;
1142
1112
  }
1143
1113
  return `@types/${npmPackage}`;
1144
1114
  }
1145
1115
  _chunkJ5SB6L2Ljs.__name.call(void 0, getTypeDependencyPackageName, "getTypeDependencyPackageName");
1146
1116
 
1147
1117
  // ../esbuild/src/config.ts
1148
- var getOutputExtensionMap = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, pkgType) => {
1149
- return options.outExtension ? options.outExtension(options.format, pkgType) : getOutExtension(options.format, pkgType);
1150
- }, "getOutputExtensionMap");
1151
1118
  var getDefaultBuildPlugins = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => [
1152
1119
  nodeProtocolPlugin(options, resolvedOptions),
1153
1120
  resolvePathsPlugin(options, resolvedOptions),
@@ -1164,7 +1131,7 @@ var DEFAULT_BUILD_OPTIONS = {
1164
1131
  external: [],
1165
1132
  logLevel: "error",
1166
1133
  tsconfig: "tsconfig.json",
1167
- envName: "production",
1134
+ mode: "production",
1168
1135
  keepNames: true,
1169
1136
  metafile: true,
1170
1137
  injectShims: true,
@@ -1173,6 +1140,18 @@ var DEFAULT_BUILD_OPTIONS = {
1173
1140
  bundle: true,
1174
1141
  clean: true,
1175
1142
  debug: false,
1143
+ resolveExtensions: [
1144
+ ".tsx",
1145
+ ".ts",
1146
+ ".cts",
1147
+ ".mts",
1148
+ ".jsx",
1149
+ ".js",
1150
+ ".cjs",
1151
+ ".mjs",
1152
+ ".css",
1153
+ ".json"
1154
+ ],
1176
1155
  loader: {
1177
1156
  ".aac": "file",
1178
1157
  ".css": "file",
@@ -1231,7 +1210,7 @@ var missingIgnore = [
1231
1210
  ];
1232
1211
  var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bundle) => ({
1233
1212
  name: "storm:deps-check",
1234
- setup(build5) {
1213
+ setup(build4) {
1235
1214
  const pkgJsonPath = path6.default.join(process.cwd(), "package.json");
1236
1215
  const pkgContents = _chunkJ5SB6L2Ljs.__require.call(void 0, pkgJsonPath);
1237
1216
  const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
@@ -1243,7 +1222,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
1243
1222
  ];
1244
1223
  const collectedDependencies = /* @__PURE__ */ new Set();
1245
1224
  const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
1246
- build5.onResolve({
1225
+ build4.onResolve({
1247
1226
  filter: onlyPackages
1248
1227
  }, (args) => {
1249
1228
  if (args.importer.includes(process.cwd())) {
@@ -1259,7 +1238,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
1259
1238
  external: true
1260
1239
  };
1261
1240
  });
1262
- build5.onEnd(() => {
1241
+ build4.onEnd(() => {
1263
1242
  const unusedDependencies = [
1264
1243
  ...dependencies
1265
1244
  ].filter((dep) => {
@@ -1276,8 +1255,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
1276
1255
  const filteredMissingDeps = missingDependencies.filter((dep) => {
1277
1256
  return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
1278
1257
  });
1279
- _chunkHZON5W3Gjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
1280
- _chunkHZON5W3Gjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
1258
+ _chunkFK6PN2T3js.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
1259
+ _chunkFK6PN2T3js.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
1281
1260
  if (filteredMissingDeps.length > 0) {
1282
1261
  throw new Error(`Missing dependencies detected - please install them:
1283
1262
  ${JSON.stringify(filteredMissingDeps)}
@@ -1345,7 +1324,7 @@ function pipeSync(fn, ...fns) {
1345
1324
  return (...args) => {
1346
1325
  let result = fn(...args);
1347
1326
  for (let i = 0; result !== skip && i < fns.length; ++i) {
1348
- result = _optionalChain([fns, 'access', _60 => _60[i], 'optionalCall', _61 => _61(result)]);
1327
+ result = _optionalChain([fns, 'access', _66 => _66[i], 'optionalCall', _67 => _67(result)]);
1349
1328
  }
1350
1329
  return result;
1351
1330
  };
@@ -1355,7 +1334,7 @@ function pipeAsync(fn, ...fns) {
1355
1334
  return async (...args) => {
1356
1335
  let result = await fn(...args);
1357
1336
  for (let i = 0; result !== skip && i < fns.length; ++i) {
1358
- result = await _optionalChain([fns, 'access', _62 => _62[i], 'optionalCall', _63 => _63(result)]);
1337
+ result = await _optionalChain([fns, 'access', _68 => _68[i], 'optionalCall', _69 => _69(result)]);
1359
1338
  }
1360
1339
  return result;
1361
1340
  };
@@ -1371,13 +1350,13 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1371
1350
  if (!workspaceRoot3) {
1372
1351
  throw new Error("Cannot find Nx workspace root");
1373
1352
  }
1374
- const config = await _chunkKLCTLDIHjs.getConfig.call(void 0, workspaceRoot3.dir);
1375
- _chunkHZON5W3Gjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1376
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, "Build options resolution");
1353
+ const config = await _chunkH2ML72QFjs.getConfig.call(void 0, workspaceRoot3.dir);
1354
+ _chunkFK6PN2T3js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1355
+ const stopwatch = _chunkFK6PN2T3js.getStopwatch.call(void 0, "Build options resolution");
1377
1356
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
1378
1357
  exitOnError: true
1379
1358
  });
1380
- const projectJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
1359
+ const projectJsonPath = _chunkFK6PN2T3js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
1381
1360
  if (!_fs.existsSync.call(void 0, projectJsonPath)) {
1382
1361
  throw new Error("Cannot find project.json configuration");
1383
1362
  }
@@ -1385,19 +1364,16 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1385
1364
  const projectJson = JSON.parse(projectJsonFile);
1386
1365
  const projectName = projectJson.name;
1387
1366
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1388
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _64 => _64.projects, 'optionalAccess', _65 => _65[projectName]])) {
1367
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _70 => _70.projects, 'optionalAccess', _71 => _71[projectName]])) {
1389
1368
  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.");
1390
1369
  }
1391
1370
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
1392
1371
  options.name ??= `${projectName}-${options.format}`;
1393
1372
  options.target ??= DEFAULT_TARGET;
1394
- const packageJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
1373
+ const packageJsonPath = _chunkFK6PN2T3js.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
1395
1374
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
1396
1375
  throw new Error("Cannot find package.json configuration");
1397
1376
  }
1398
- const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
1399
- const packageJson = JSON.parse(packageJsonFile);
1400
- const outExtension = getOutputExtensionMap(options, packageJson.type);
1401
1377
  const env = getEnv("esbuild", options);
1402
1378
  const result = {
1403
1379
  ...options,
@@ -1410,26 +1386,20 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1410
1386
  "module",
1411
1387
  "main"
1412
1388
  ],
1413
- resolveExtensions: [
1414
- ".ts",
1415
- ".js",
1416
- ".node"
1417
- ],
1418
1389
  ...userOptions,
1419
- tsconfig: _chunkHZON5W3Gjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1390
+ tsconfig: _chunkFK6PN2T3js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1420
1391
  format: options.format || "cjs",
1421
- entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
1422
- "./src/index.ts"
1423
- ], userOptions.emitOnAll),
1424
- outdir: userOptions.outputPath || _chunkHZON5W3Gjs.joinPaths.call(void 0, "dist", projectRoot),
1392
+ entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), userOptions.emitOnAll === true),
1393
+ outdir: userOptions.outputPath || _chunkFK6PN2T3js.joinPaths.call(void 0, "dist", projectRoot),
1394
+ distDir: userOptions.distDir || "dist",
1425
1395
  plugins: [],
1426
1396
  name: userOptions.name || projectName,
1427
1397
  projectConfigurations,
1428
1398
  projectName,
1429
1399
  projectGraph,
1430
- sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkHZON5W3Gjs.joinPaths.call(void 0, projectRoot, "src"),
1400
+ sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkFK6PN2T3js.joinPaths.call(void 0, projectRoot, "src"),
1431
1401
  minify: userOptions.minify || !userOptions.debug,
1432
- verbose: userOptions.verbose || _chunkHZON5W3Gjs.isVerbose.call(void 0, ) || userOptions.debug === true,
1402
+ verbose: userOptions.verbose || _chunkFK6PN2T3js.isVerbose.call(void 0, ) || userOptions.debug === true,
1433
1403
  includeSrc: userOptions.includeSrc === true,
1434
1404
  metafile: userOptions.metafile !== false,
1435
1405
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -1440,7 +1410,6 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1440
1410
  bundle: userOptions.bundle !== false,
1441
1411
  keepNames: true,
1442
1412
  watch: userOptions.watch === true,
1443
- outExtension,
1444
1413
  footer: userOptions.footer,
1445
1414
  banner: {
1446
1415
  js: options.banner || DEFAULT_COMPILED_BANNER,
@@ -1457,32 +1426,34 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1457
1426
  ...options.define,
1458
1427
  ...Object.keys(env || {}).reduce((res, key) => {
1459
1428
  const value = JSON.stringify(env[key]);
1429
+ const safeKey = key.replaceAll("(", "").replaceAll(")", "");
1460
1430
  return {
1461
1431
  ...res,
1462
- [`process.env.${key}`]: value,
1463
- [`import.meta.env.${key}`]: value
1432
+ [`process.env.${safeKey}`]: value,
1433
+ [`import.meta.env.${safeKey}`]: value
1464
1434
  };
1465
1435
  }, {})
1466
1436
  },
1467
- inject: [
1468
- options.format === "cjs" && options.injectShims ? _chunkHZON5W3Gjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
1469
- options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkHZON5W3Gjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
1470
- ..._nullishCoalesce(options.inject, () => ( []))
1471
- ].filter(Boolean)
1437
+ inject: _defu2.default.call(void 0, [
1438
+ options.format === "cjs" && options.injectShims ? _chunkFK6PN2T3js.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
1439
+ options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkFK6PN2T3js.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : ""
1440
+ ], _nullishCoalesce(options.inject, () => ( []))).filter(Boolean)
1472
1441
  };
1473
1442
  result.plugins = _nullishCoalesce(userOptions.plugins, () => ( getDefaultBuildPlugins(userOptions, result)));
1443
+ delete result.entry;
1444
+ delete result.outputPath;
1474
1445
  stopwatch();
1475
1446
  return result;
1476
1447
  }, "resolveOptions");
1477
1448
  async function generatePackageJson(context2) {
1478
- if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
1479
- _chunkHZON5W3Gjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
1480
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, "Write package.json file");
1481
- const packageJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
1449
+ if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
1450
+ _chunkFK6PN2T3js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
1451
+ const stopwatch = _chunkFK6PN2T3js.getStopwatch.call(void 0, "Write package.json file");
1452
+ const packageJsonPath = _chunkFK6PN2T3js.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
1482
1453
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
1483
1454
  throw new Error("Cannot find package.json configuration");
1484
1455
  }
1485
- const packageJsonFile = await _promises2.default.readFile(_chunkHZON5W3Gjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
1456
+ const packageJsonFile = await _promises2.default.readFile(_chunkFK6PN2T3js.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
1486
1457
  let packageJson = JSON.parse(packageJsonFile);
1487
1458
  if (!packageJson) {
1488
1459
  throw new Error("Cannot find package.json configuration file");
@@ -1491,7 +1462,7 @@ async function generatePackageJson(context2) {
1491
1462
  packageJson = await addWorkspacePackageJsonFields(context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
1492
1463
  packageJson.exports ??= {};
1493
1464
  packageJson.exports["./package.json"] ??= "./package.json";
1494
- packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, context2.options.sourceRoot);
1465
+ packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
1495
1466
  let entryPoints = [
1496
1467
  {
1497
1468
  in: "./src/index.ts",
@@ -1509,19 +1480,22 @@ async function generatePackageJson(context2) {
1509
1480
  const split = entryPoint.out.split(".");
1510
1481
  split.pop();
1511
1482
  const entry = split.join(".").replaceAll("\\", "/");
1512
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, context2.options.sourceRoot);
1483
+ packageJson.exports[`./${entry}`] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/${entry}.js`;
1513
1484
  }
1514
1485
  }
1515
- packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
1516
- packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
1517
- packageJson.types = "./dist/index.d.ts";
1486
+ if (context2.options.format === "esm") {
1487
+ packageJson.module = packageJson.type === "module" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.mjs`;
1488
+ } else {
1489
+ packageJson.main = packageJson.type === "commonjs" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.cjs`;
1490
+ }
1491
+ packageJson.types = `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.d.ts`;
1518
1492
  packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
1519
1493
  if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
1520
1494
  ret[key.replace("/index", "")] = packageJson.exports[key];
1521
1495
  }
1522
1496
  return ret;
1523
1497
  }, packageJson.exports);
1524
- await _devkit.writeJsonFile.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
1498
+ await _devkit.writeJsonFile.call(void 0, _chunkFK6PN2T3js.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
1525
1499
  stopwatch();
1526
1500
  }
1527
1501
  return context2;
@@ -1547,13 +1521,40 @@ async function generateContext(getOptions) {
1547
1521
  }
1548
1522
  _chunkJ5SB6L2Ljs.__name.call(void 0, generateContext, "generateContext");
1549
1523
  async function executeEsBuild(context2) {
1550
- _chunkHZON5W3Gjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1551
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, `${context2.options.name} build`);
1552
- if (process.env.WATCH === "true") {
1524
+ _chunkFK6PN2T3js.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1525
+ const stopwatch = _chunkFK6PN2T3js.getStopwatch.call(void 0, `${context2.options.name} build`);
1526
+ if (process.env.STORM_WATCH) {
1553
1527
  const ctx = await esbuild2.context(context2.options);
1554
1528
  watch(ctx, context2.options);
1555
1529
  }
1556
- const result = await esbuild2.build(context2.options);
1530
+ const options = {
1531
+ ...context2.options
1532
+ };
1533
+ options.outdir = _chunkFK6PN2T3js.joinPaths.call(void 0, context2.options.outdir, context2.options.distDir);
1534
+ delete options.env;
1535
+ delete options.name;
1536
+ delete options.assets;
1537
+ delete options.mode;
1538
+ delete options.orgName;
1539
+ delete options.watch;
1540
+ delete options.clean;
1541
+ delete options.debug;
1542
+ delete options.generatePackageJson;
1543
+ delete options.emitOnAll;
1544
+ delete options.distDir;
1545
+ delete options.includeSrc;
1546
+ delete options.verbose;
1547
+ delete options.projectRoot;
1548
+ delete options.projectName;
1549
+ delete options.projectGraph;
1550
+ delete options.projectConfigurations;
1551
+ delete options.renderers;
1552
+ delete options.config;
1553
+ delete options.injectShims;
1554
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
1555
+ ${_chunkFK6PN2T3js.formatLogMessage.call(void 0, options)}`, context2.options.config);
1556
+ const result = await esbuild2.build(options);
1557
+ await esbuild2.stop();
1557
1558
  if (result.metafile) {
1558
1559
  const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
1559
1560
  await _promises2.default.writeFile(metafilePath, JSON.stringify(result.metafile));
@@ -1563,9 +1564,9 @@ async function executeEsBuild(context2) {
1563
1564
  }
1564
1565
  _chunkJ5SB6L2Ljs.__name.call(void 0, executeEsBuild, "executeEsBuild");
1565
1566
  async function copyBuildAssets(context2) {
1566
- if (_optionalChain([context2, 'access', _66 => _66.result, 'optionalAccess', _67 => _67.errors, 'access', _68 => _68.length]) === 0) {
1567
- _chunkHZON5W3Gjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1568
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1567
+ if (_optionalChain([context2, 'access', _72 => _72.result, 'optionalAccess', _73 => _73.errors, 'access', _74 => _74.length]) === 0) {
1568
+ _chunkFK6PN2T3js.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1569
+ const stopwatch = _chunkFK6PN2T3js.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1569
1570
  await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
1570
1571
  stopwatch();
1571
1572
  }
@@ -1573,11 +1574,11 @@ async function copyBuildAssets(context2) {
1573
1574
  }
1574
1575
  _chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
1575
1576
  async function reportResults(context2) {
1576
- if (_optionalChain([context2, 'access', _69 => _69.result, 'optionalAccess', _70 => _70.errors, 'access', _71 => _71.length]) === 0) {
1577
+ if (_optionalChain([context2, 'access', _75 => _75.result, 'optionalAccess', _76 => _76.errors, 'access', _77 => _77.length]) === 0) {
1577
1578
  if (context2.result.warnings.length > 0) {
1578
- _chunkHZON5W3Gjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
1579
+ _chunkFK6PN2T3js.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
1579
1580
  }
1580
- _chunkHZON5W3Gjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
1581
+ _chunkFK6PN2T3js.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
1581
1582
  }
1582
1583
  }
1583
1584
  _chunkJ5SB6L2Ljs.__name.call(void 0, reportResults, "reportResults");
@@ -1613,8 +1614,8 @@ async function dependencyCheck(options) {
1613
1614
  _chunkJ5SB6L2Ljs.__name.call(void 0, dependencyCheck, "dependencyCheck");
1614
1615
  async function cleanOutputPath(context2) {
1615
1616
  if (context2.options.clean !== false && context2.options.outdir) {
1616
- _chunkHZON5W3Gjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
1617
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
1617
+ _chunkFK6PN2T3js.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
1618
+ const stopwatch = _chunkFK6PN2T3js.getStopwatch.call(void 0, `${context2.options.name} output clean`);
1618
1619
  await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
1619
1620
  stopwatch();
1620
1621
  }
@@ -1622,8 +1623,8 @@ async function cleanOutputPath(context2) {
1622
1623
  }
1623
1624
  _chunkJ5SB6L2Ljs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
1624
1625
  async function build3(options) {
1625
- _chunkHZON5W3Gjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
1626
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, "ESBuild pipeline");
1626
+ _chunkFK6PN2T3js.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
1627
+ const stopwatch = _chunkFK6PN2T3js.getStopwatch.call(void 0, "ESBuild pipeline");
1627
1628
  try {
1628
1629
  const opts = Array.isArray(options) ? options : [
1629
1630
  options
@@ -1633,9 +1634,9 @@ async function build3(options) {
1633
1634
  }
1634
1635
  void transduce.async(opts, dependencyCheck);
1635
1636
  await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
1636
- _chunkHZON5W3Gjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
1637
+ _chunkFK6PN2T3js.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
1637
1638
  } catch (error) {
1638
- _chunkHZON5W3Gjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1639
+ _chunkFK6PN2T3js.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
1639
1640
  throw error;
1640
1641
  } finally {
1641
1642
  stopwatch();
@@ -1663,9 +1664,9 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
1663
1664
  return context2.rebuild();
1664
1665
  });
1665
1666
  if (rebuildResult instanceof Error) {
1666
- _chunkHZON5W3Gjs.writeError.call(void 0, rebuildResult.message);
1667
+ _chunkFK6PN2T3js.writeError.call(void 0, rebuildResult.message);
1667
1668
  }
1668
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
1669
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
1669
1670
  }, 10);
1670
1671
  changeWatcher.on("change", fastRebuild);
1671
1672
  return void 0;
@@ -1673,15 +1674,15 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
1673
1674
 
1674
1675
  // ../workspace-tools/src/executors/esbuild/executor.ts
1675
1676
  async function esbuildExecutorFn(options, context2, config) {
1676
- _chunkHZON5W3Gjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1677
- if (!_optionalChain([context2, 'access', _72 => _72.projectsConfigurations, 'optionalAccess', _73 => _73.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _74 => _74.projectsConfigurations, 'access', _75 => _75.projects, 'access', _76 => _76[context2.projectName], 'optionalAccess', _77 => _77.root])) {
1677
+ _chunkFK6PN2T3js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1678
+ if (!_optionalChain([context2, 'access', _78 => _78.projectsConfigurations, 'optionalAccess', _79 => _79.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _80 => _80.projectsConfigurations, 'access', _81 => _81.projects, 'access', _82 => _82[context2.projectName], 'optionalAccess', _83 => _83.root])) {
1678
1679
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1679
1680
  }
1680
1681
  await build3({
1681
1682
  ...options,
1682
- projectRoot: _optionalChain([context2, 'access', _78 => _78.projectsConfigurations, 'access', _79 => _79.projects, 'optionalAccess', _80 => _80[context2.projectName], 'access', _81 => _81.root]),
1683
+ projectRoot: _optionalChain([context2, 'access', _84 => _84.projectsConfigurations, 'access', _85 => _85.projects, 'optionalAccess', _86 => _86[context2.projectName], 'access', _87 => _87.root]),
1683
1684
  projectName: context2.projectName,
1684
- sourceRoot: _optionalChain([context2, 'access', _82 => _82.projectsConfigurations, 'access', _83 => _83.projects, 'optionalAccess', _84 => _84[context2.projectName], 'optionalAccess', _85 => _85.sourceRoot]),
1685
+ sourceRoot: _optionalChain([context2, 'access', _88 => _88.projectsConfigurations, 'access', _89 => _89.projects, 'optionalAccess', _90 => _90[context2.projectName], 'optionalAccess', _91 => _91.sourceRoot]),
1685
1686
  format: options.format,
1686
1687
  platform: options.format
1687
1688
  });
@@ -1724,18 +1725,18 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
1724
1725
  var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
1725
1726
  var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
1726
1727
  async function sizeLimitExecutorFn(options, context2, config) {
1727
- if (!_optionalChain([context2, 'optionalAccess', _86 => _86.projectName]) || !_optionalChain([context2, 'access', _87 => _87.projectsConfigurations, 'optionalAccess', _88 => _88.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
1728
+ if (!_optionalChain([context2, 'optionalAccess', _92 => _92.projectName]) || !_optionalChain([context2, 'access', _93 => _93.projectsConfigurations, 'optionalAccess', _94 => _94.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
1728
1729
  throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
1729
1730
  }
1730
- _chunkHZON5W3Gjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
1731
+ _chunkFK6PN2T3js.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
1731
1732
  _sizelimit2.default.call(void 0, [
1732
1733
  _file2.default,
1733
1734
  _esbuild3.default,
1734
1735
  _esbuildwhy2.default
1735
1736
  ], {
1736
- checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _89 => _89.projectsConfigurations, 'access', _90 => _90.projects, 'access', _91 => _91[context2.projectName], 'optionalAccess', _92 => _92.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _93 => _93.projectsConfigurations, 'access', _94 => _94.projects, 'access', _95 => _95[context2.projectName], 'optionalAccess', _96 => _96.root]), () => ( "./")), "src")))
1737
+ checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _95 => _95.projectsConfigurations, 'access', _96 => _96.projects, 'access', _97 => _97[context2.projectName], 'optionalAccess', _98 => _98.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _99 => _99.projectsConfigurations, 'access', _100 => _100.projects, 'access', _101 => _101[context2.projectName], 'optionalAccess', _102 => _102.root]), () => ( "./")), "src")))
1737
1738
  }).then((result) => {
1738
- _chunkHZON5W3Gjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
1739
+ _chunkFK6PN2T3js.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
1739
1740
  });
1740
1741
  return {
1741
1742
  success: true
@@ -1751,291 +1752,16 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
1751
1752
  }
1752
1753
  });
1753
1754
 
1754
- // ../tsdown/src/build.ts
1755
-
1756
-
1757
-
1758
-
1759
-
1760
- var _tsdown = require('tsdown');
1761
-
1762
- // ../tsdown/src/clean.ts
1763
-
1764
- async function cleanDirectories2(name = "TSDown", directory, config) {
1765
- await _promises.rm.call(void 0, directory, {
1766
- recursive: true,
1767
- force: true
1768
- });
1769
- }
1770
- _chunkJ5SB6L2Ljs.__name.call(void 0, cleanDirectories2, "cleanDirectories");
1771
-
1772
- // ../tsdown/src/config.ts
1773
- var DEFAULT_BUILD_OPTIONS2 = {
1774
- platform: "node",
1775
- target: "node22",
1776
- format: [
1777
- "esm",
1778
- "cjs"
1779
- ],
1780
- tsconfig: "tsconfig.json",
1781
- envName: "production",
1782
- globalName: "globalThis",
1783
- unused: {
1784
- level: "error"
1785
- },
1786
- injectShims: true,
1787
- watch: false,
1788
- bundle: true,
1789
- treeshake: true,
1790
- clean: true,
1791
- debug: false
1792
- };
1793
-
1794
- // ../tsdown/src/build.ts
1795
- var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (userOptions) => {
1796
- const projectRoot = userOptions.projectRoot;
1797
- const workspaceRoot3 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
1798
- if (!workspaceRoot3) {
1799
- throw new Error("Cannot find Nx workspace root");
1800
- }
1801
- const config = await _chunkKLCTLDIHjs.getConfig.call(void 0, workspaceRoot3.dir);
1802
- _chunkHZON5W3Gjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1803
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, "Build options resolution");
1804
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
1805
- exitOnError: true
1806
- });
1807
- const projectJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
1808
- if (!_fs.existsSync.call(void 0, projectJsonPath)) {
1809
- throw new Error("Cannot find project.json configuration");
1810
- }
1811
- const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
1812
- const projectJson = JSON.parse(projectJsonFile);
1813
- const projectName = projectJson.name;
1814
- const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1815
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _97 => _97.projects, 'optionalAccess', _98 => _98[projectName]])) {
1816
- 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.");
1817
- }
1818
- const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
1819
- options.name ??= `${projectName}-${options.format}`;
1820
- options.target ??= DEFAULT_TARGET;
1821
- const packageJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
1822
- if (!_fs.existsSync.call(void 0, packageJsonPath)) {
1823
- throw new Error("Cannot find package.json configuration");
1824
- }
1825
- const env = getEnv("tsdown", options);
1826
- const result = {
1827
- ...options,
1828
- config,
1829
- ...userOptions,
1830
- tsconfig: _chunkHZON5W3Gjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1831
- format: options.format || "cjs",
1832
- entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
1833
- "./src/index.ts"
1834
- ], userOptions.emitOnAll),
1835
- outdir: userOptions.outputPath || _chunkHZON5W3Gjs.joinPaths.call(void 0, "dist", projectRoot),
1836
- plugins: [],
1837
- name: userOptions.name || projectName,
1838
- projectConfigurations,
1839
- projectName,
1840
- projectGraph,
1841
- sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkHZON5W3Gjs.joinPaths.call(void 0, projectRoot, "src"),
1842
- minify: userOptions.minify || !userOptions.debug,
1843
- verbose: userOptions.verbose || _chunkHZON5W3Gjs.isVerbose.call(void 0, ) || userOptions.debug === true,
1844
- includeSrc: userOptions.includeSrc === true,
1845
- metafile: userOptions.metafile !== false,
1846
- generatePackageJson: userOptions.generatePackageJson !== false,
1847
- clean: userOptions.clean !== false,
1848
- emitOnAll: userOptions.emitOnAll === true,
1849
- dts: userOptions.emitTypes === true ? {
1850
- transformer: "oxc"
1851
- } : userOptions.emitTypes,
1852
- bundleDts: userOptions.emitTypes,
1853
- assets: _nullishCoalesce(userOptions.assets, () => ( [])),
1854
- shims: userOptions.injectShims !== true,
1855
- bundle: userOptions.bundle !== false,
1856
- watch: userOptions.watch === true,
1857
- define: {
1858
- STORM_FORMAT: JSON.stringify(options.format || "cjs"),
1859
- ...options.format === "cjs" && options.injectShims ? {
1860
- "import.meta.url": "importMetaUrl"
1861
- } : {},
1862
- ...Object.keys(env || {}).reduce((res, key) => {
1863
- const value = JSON.stringify(env[key]);
1864
- return {
1865
- ...res,
1866
- [`process.env.${key}`]: value,
1867
- [`import.meta.env.${key}`]: value
1868
- };
1869
- }, {}),
1870
- ...options.define
1871
- }
1872
- };
1873
- stopwatch();
1874
- return result;
1875
- }, "resolveOptions");
1876
- async function generatePackageJson2(options) {
1877
- if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
1878
- _chunkHZON5W3Gjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
1879
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, "Write package.json file");
1880
- const packageJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, options.projectRoot, "project.json");
1881
- if (!_fs.existsSync.call(void 0, packageJsonPath)) {
1882
- throw new Error("Cannot find package.json configuration");
1883
- }
1884
- const packageJsonFile = await _promises2.default.readFile(_chunkHZON5W3Gjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
1885
- if (!packageJsonFile) {
1886
- throw new Error("Cannot find package.json configuration file");
1887
- }
1888
- let packageJson = JSON.parse(packageJsonFile);
1889
- packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
1890
- packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
1891
- packageJson.exports ??= {};
1892
- packageJson.exports["./package.json"] ??= "./package.json";
1893
- packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot);
1894
- let entryPoints = [
1895
- {
1896
- in: "./src/index.ts",
1897
- out: "./src/index.ts"
1898
- }
1899
- ];
1900
- if (options.entryPoints) {
1901
- if (Array.isArray(options.entryPoints)) {
1902
- entryPoints = options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
1903
- in: entryPoint,
1904
- out: entryPoint
1905
- } : entryPoint);
1906
- }
1907
- for (const entryPoint of entryPoints) {
1908
- const split = entryPoint.out.split(".");
1909
- split.pop();
1910
- const entry = split.join(".").replaceAll("\\", "/");
1911
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
1912
- }
1913
- }
1914
- packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
1915
- packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
1916
- packageJson.types = "./dist/index.d.ts";
1917
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
1918
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
1919
- ret[key.replace("/index", "")] = packageJson.exports[key];
1920
- }
1921
- return ret;
1922
- }, packageJson.exports);
1923
- await _devkit.writeJsonFile.call(void 0, _chunkHZON5W3Gjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
1924
- stopwatch();
1925
- }
1926
- return options;
1927
- }
1928
- _chunkJ5SB6L2Ljs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
1929
- async function executeTSDown(options) {
1930
- _chunkHZON5W3Gjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
1931
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, `${options.name} build`);
1932
- await _tsdown.build.call(void 0, {
1933
- ...options,
1934
- entry: options.entryPoints,
1935
- outDir: options.outdir,
1936
- config: false
1937
- });
1938
- stopwatch();
1939
- return options;
1940
- }
1941
- _chunkJ5SB6L2Ljs.__name.call(void 0, executeTSDown, "executeTSDown");
1942
- async function copyBuildAssets2(options) {
1943
- _chunkHZON5W3Gjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
1944
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, `${options.name} asset copy`);
1945
- await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
1946
- stopwatch();
1947
- return options;
1948
- }
1949
- _chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
1950
- async function reportResults2(options) {
1951
- _chunkHZON5W3Gjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
1952
- }
1953
- _chunkJ5SB6L2Ljs.__name.call(void 0, reportResults2, "reportResults");
1954
- async function cleanOutputPath2(options) {
1955
- if (options.clean !== false && options.outdir) {
1956
- _chunkHZON5W3Gjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
1957
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, `${options.name} output clean`);
1958
- await cleanDirectories2(options.name, options.outdir, options.config);
1959
- stopwatch();
1960
- }
1961
- return options;
1962
- }
1963
- _chunkJ5SB6L2Ljs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
1964
- async function build4(options) {
1965
- _chunkHZON5W3Gjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
1966
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, "TSDown pipeline");
1967
- try {
1968
- const opts = Array.isArray(options) ? options : [
1969
- options
1970
- ];
1971
- if (opts.length === 0) {
1972
- throw new Error("No build options were provided");
1973
- }
1974
- const resolved = await Promise.all(opts.map(async (opt) => await resolveOptions2(opt)));
1975
- if (resolved.length > 0) {
1976
- await cleanOutputPath2(resolved[0]);
1977
- await generatePackageJson2(resolved[0]);
1978
- await Promise.all(resolved.map(async (opt) => {
1979
- await executeTSDown(opt);
1980
- await copyBuildAssets2(opt);
1981
- await reportResults2(opt);
1982
- }));
1983
- } else {
1984
- _chunkHZON5W3Gjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
1985
- }
1986
- _chunkHZON5W3Gjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
1987
- } catch (error) {
1988
- _chunkHZON5W3Gjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1989
- throw error;
1990
- } finally {
1991
- stopwatch();
1992
- }
1993
- }
1994
- _chunkJ5SB6L2Ljs.__name.call(void 0, build4, "build");
1995
-
1996
- // ../workspace-tools/src/executors/tsdown/executor.ts
1997
- async function tsdownExecutorFn(options, context2, config) {
1998
- _chunkHZON5W3Gjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
1999
- if (!_optionalChain([context2, 'access', _99 => _99.projectsConfigurations, 'optionalAccess', _100 => _100.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _101 => _101.projectsConfigurations, 'access', _102 => _102.projects, 'access', _103 => _103[context2.projectName], 'optionalAccess', _104 => _104.root])) {
2000
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2001
- }
2002
- await build4({
2003
- ...options,
2004
- projectRoot: _optionalChain([context2, 'access', _105 => _105.projectsConfigurations, 'access', _106 => _106.projects, 'optionalAccess', _107 => _107[context2.projectName], 'access', _108 => _108.root]),
2005
- projectName: context2.projectName,
2006
- sourceRoot: _optionalChain([context2, 'access', _109 => _109.projectsConfigurations, 'access', _110 => _110.projects, 'optionalAccess', _111 => _111[context2.projectName], 'optionalAccess', _112 => _112.sourceRoot]),
2007
- format: options.format,
2008
- platform: options.platform
2009
- });
2010
- return {
2011
- success: true
2012
- };
2013
- }
2014
- _chunkJ5SB6L2Ljs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
2015
- var executor_default8 = withRunExecutor("Storm TSDown build executor", tsdownExecutorFn, {
2016
- skipReadingConfig: false,
2017
- hooks: {
2018
- applyDefaultOptions: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (options, config) => {
2019
- options.entry ??= [
2020
- "src/index.ts"
2021
- ];
2022
- options.outputPath ??= "dist/{projectRoot}";
2023
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
2024
- return options;
2025
- }, "applyDefaultOptions")
2026
- }
2027
- });
2028
-
2029
1755
  // ../workspace-tools/src/executors/typia/executor.ts
2030
1756
  var _fsextra = require('fs-extra');
2031
1757
  var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
2032
1758
  async function typiaExecutorFn(options, _, config) {
2033
1759
  if (options.clean !== false) {
2034
- _chunkHZON5W3Gjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
1760
+ _chunkFK6PN2T3js.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
2035
1761
  _fsextra.removeSync.call(void 0, options.outputPath);
2036
1762
  }
2037
1763
  await Promise.all(options.entry.map((entry) => {
2038
- _chunkHZON5W3Gjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
1764
+ _chunkFK6PN2T3js.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
2039
1765
  return _TypiaProgrammerjs.TypiaProgrammer.build({
2040
1766
  input: entry,
2041
1767
  output: options.outputPath,
@@ -2047,7 +1773,7 @@ async function typiaExecutorFn(options, _, config) {
2047
1773
  };
2048
1774
  }
2049
1775
  _chunkJ5SB6L2Ljs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
2050
- var executor_default9 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
1776
+ var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
2051
1777
  skipReadingConfig: false,
2052
1778
  hooks: {
2053
1779
  applyDefaultOptions: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options) => {
@@ -2066,8 +1792,8 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
2066
1792
 
2067
1793
  var _jiti = require('jiti');
2068
1794
  async function unbuildExecutorFn(options, context2, config) {
2069
- _chunkHZON5W3Gjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
2070
- if (!_optionalChain([context2, 'access', _113 => _113.projectsConfigurations, 'optionalAccess', _114 => _114.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
1795
+ _chunkFK6PN2T3js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
1796
+ if (!_optionalChain([context2, 'access', _103 => _103.projectsConfigurations, 'optionalAccess', _104 => _104.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
2071
1797
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
2072
1798
  }
2073
1799
  if (!context2.projectsConfigurations.projects[context2.projectName].root) {
@@ -2077,7 +1803,7 @@ async function unbuildExecutorFn(options, context2, config) {
2077
1803
  throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
2078
1804
  }
2079
1805
  const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
2080
- fsCache: config.skipCache ? false : _chunkHZON5W3Gjs.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
1806
+ fsCache: config.skipCache ? false : _chunkFK6PN2T3js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
2081
1807
  interopDefault: true
2082
1808
  });
2083
1809
  const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
@@ -2090,7 +1816,7 @@ async function unbuildExecutorFn(options, context2, config) {
2090
1816
  }, {
2091
1817
  stubOptions: {
2092
1818
  jiti: {
2093
- fsCache: config.skipCache ? false : _chunkHZON5W3Gjs.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
1819
+ fsCache: config.skipCache ? false : _chunkFK6PN2T3js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
2094
1820
  }
2095
1821
  },
2096
1822
  rollup: {
@@ -2114,7 +1840,7 @@ async function unbuildExecutorFn(options, context2, config) {
2114
1840
  };
2115
1841
  }
2116
1842
  _chunkJ5SB6L2Ljs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
2117
- var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
1843
+ var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
2118
1844
  skipReadingConfig: false,
2119
1845
  hooks: {
2120
1846
  applyDefaultOptions: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (options, config) => {
@@ -2137,58 +1863,58 @@ var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExec
2137
1863
  var withRunGenerator = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name, generatorFn, generatorOptions = {
2138
1864
  skipReadingConfig: false
2139
1865
  }) => async (tree, _options) => {
2140
- const stopwatch = _chunkHZON5W3Gjs.getStopwatch.call(void 0, name);
1866
+ const stopwatch = _chunkFK6PN2T3js.getStopwatch.call(void 0, name);
2141
1867
  let options = _options;
2142
1868
  let config;
2143
1869
  try {
2144
- _chunkHZON5W3Gjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
1870
+ _chunkFK6PN2T3js.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
2145
1871
 
2146
1872
  `, config);
2147
- const workspaceRoot3 = _chunkHZON5W3Gjs.findWorkspaceRoot.call(void 0, );
1873
+ const workspaceRoot3 = _chunkFK6PN2T3js.findWorkspaceRoot.call(void 0, );
2148
1874
  if (!generatorOptions.skipReadingConfig) {
2149
- _chunkHZON5W3Gjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
1875
+ _chunkFK6PN2T3js.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
2150
1876
  - workspaceRoot: ${workspaceRoot3}`, config);
2151
- config = await _chunkKLCTLDIHjs.getConfig.call(void 0, workspaceRoot3);
1877
+ config = await _chunkH2ML72QFjs.getConfig.call(void 0, workspaceRoot3);
2152
1878
  }
2153
- if (_optionalChain([generatorOptions, 'optionalAccess', _115 => _115.hooks, 'optionalAccess', _116 => _116.applyDefaultOptions])) {
2154
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
1879
+ if (_optionalChain([generatorOptions, 'optionalAccess', _105 => _105.hooks, 'optionalAccess', _106 => _106.applyDefaultOptions])) {
1880
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
2155
1881
  options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
2156
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
1882
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
2157
1883
  }
2158
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
1884
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
2159
1885
  ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
2160
1886
  const tokenized = await applyWorkspaceTokens(options, {
2161
1887
  workspaceRoot: tree.root,
2162
1888
  config
2163
1889
  }, applyWorkspaceBaseTokens);
2164
- if (_optionalChain([generatorOptions, 'optionalAccess', _117 => _117.hooks, 'optionalAccess', _118 => _118.preProcess])) {
2165
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
1890
+ if (_optionalChain([generatorOptions, 'optionalAccess', _107 => _107.hooks, 'optionalAccess', _108 => _108.preProcess])) {
1891
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Running the preProcess hook...", config);
2166
1892
  await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
2167
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
1893
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Completed the preProcess hook", config);
2168
1894
  }
2169
1895
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
2170
1896
  if (result) {
2171
- if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _119 => _119.error, 'optionalAccess', _120 => _120.message]) && typeof _optionalChain([result, 'optionalAccess', _121 => _121.error, 'optionalAccess', _122 => _122.message]) === "string" && _optionalChain([result, 'optionalAccess', _123 => _123.error, 'optionalAccess', _124 => _124.name]) && typeof _optionalChain([result, 'optionalAccess', _125 => _125.error, 'optionalAccess', _126 => _126.name]) === "string") {
1897
+ if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _109 => _109.error, 'optionalAccess', _110 => _110.message]) && typeof _optionalChain([result, 'optionalAccess', _111 => _111.error, 'optionalAccess', _112 => _112.message]) === "string" && _optionalChain([result, 'optionalAccess', _113 => _113.error, 'optionalAccess', _114 => _114.name]) && typeof _optionalChain([result, 'optionalAccess', _115 => _115.error, 'optionalAccess', _116 => _116.name]) === "string") {
2172
1898
  throw new Error(`The ${name} generator failed to run`, {
2173
- cause: _optionalChain([result, 'optionalAccess', _127 => _127.error])
1899
+ cause: _optionalChain([result, 'optionalAccess', _117 => _117.error])
2174
1900
  });
2175
1901
  } else if (result.success && result.data) {
2176
1902
  return result;
2177
1903
  }
2178
1904
  }
2179
- if (_optionalChain([generatorOptions, 'optionalAccess', _128 => _128.hooks, 'optionalAccess', _129 => _129.postProcess])) {
2180
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
1905
+ if (_optionalChain([generatorOptions, 'optionalAccess', _118 => _118.hooks, 'optionalAccess', _119 => _119.postProcess])) {
1906
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Running the postProcess hook...", config);
2181
1907
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
2182
- _chunkHZON5W3Gjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
1908
+ _chunkFK6PN2T3js.writeDebug.call(void 0, "Completed the postProcess hook", config);
2183
1909
  }
2184
1910
  return () => {
2185
- _chunkHZON5W3Gjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
1911
+ _chunkFK6PN2T3js.writeSuccess.call(void 0, `Completed running the ${name} generator!
2186
1912
  `, config);
2187
1913
  };
2188
1914
  } catch (error) {
2189
1915
  return () => {
2190
- _chunkHZON5W3Gjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
2191
- _chunkHZON5W3Gjs.writeError.call(void 0, `An exception was thrown in the generator's process
1916
+ _chunkFK6PN2T3js.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
1917
+ _chunkFK6PN2T3js.writeError.call(void 0, `An exception was thrown in the generator's process
2192
1918
  - Details: ${error.message}
2193
1919
  - Stacktrace: ${error.stack}`, config);
2194
1920
  };
@@ -2234,7 +1960,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2234
1960
  const projectConfig = {
2235
1961
  root: normalized.directory,
2236
1962
  projectType: "library",
2237
- sourceRoot: _chunkHZON5W3Gjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
1963
+ sourceRoot: _chunkFK6PN2T3js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
2238
1964
  targets: {
2239
1965
  build: {
2240
1966
  executor: options.buildExecutor,
@@ -2243,11 +1969,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2243
1969
  ],
2244
1970
  options: {
2245
1971
  entry: [
2246
- _chunkHZON5W3Gjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
1972
+ _chunkFK6PN2T3js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
2247
1973
  ],
2248
1974
  outputPath: getOutputPath(normalized),
2249
- tsconfig: _chunkHZON5W3Gjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
2250
- project: _chunkHZON5W3Gjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
1975
+ tsconfig: _chunkFK6PN2T3js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
1976
+ project: _chunkFK6PN2T3js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
2251
1977
  defaultConfiguration: "production",
2252
1978
  platform: "neutral",
2253
1979
  assets: [
@@ -2286,22 +2012,22 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2286
2012
  _devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
2287
2013
  let repository = {
2288
2014
  type: "github",
2289
- url: _optionalChain([config, 'optionalAccess', _130 => _130.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _131 => _131.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _132 => _132.namespace]) || _optionalChain([config, 'optionalAccess', _133 => _133.name]) || "repository"}.git`
2015
+ url: _optionalChain([config, 'optionalAccess', _120 => _120.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _121 => _121.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _122 => _122.namespace]) || _optionalChain([config, 'optionalAccess', _123 => _123.name]) || "repository"}.git`
2290
2016
  };
2291
2017
  let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
2292
2018
  if (tree.exists("package.json")) {
2293
2019
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2294
- if (_optionalChain([packageJson, 'optionalAccess', _134 => _134.repository])) {
2020
+ if (_optionalChain([packageJson, 'optionalAccess', _124 => _124.repository])) {
2295
2021
  repository = packageJson.repository;
2296
2022
  }
2297
- if (_optionalChain([packageJson, 'optionalAccess', _135 => _135.description])) {
2023
+ if (_optionalChain([packageJson, 'optionalAccess', _125 => _125.description])) {
2298
2024
  description = packageJson.description;
2299
2025
  }
2300
2026
  }
2301
2027
  if (!normalized.importPath) {
2302
2028
  normalized.importPath = normalized.name;
2303
2029
  }
2304
- const packageJsonPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
2030
+ const packageJsonPath = _chunkFK6PN2T3js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
2305
2031
  if (tree.exists(packageJsonPath)) {
2306
2032
  _devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
2307
2033
  if (!normalized.importPath) {
@@ -2349,30 +2075,30 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2349
2075
  _devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
2350
2076
  ...json,
2351
2077
  pnpm: {
2352
- ..._optionalChain([json, 'optionalAccess', _136 => _136.pnpm]),
2078
+ ..._optionalChain([json, 'optionalAccess', _126 => _126.pnpm]),
2353
2079
  overrides: {
2354
- ..._optionalChain([json, 'optionalAccess', _137 => _137.pnpm, 'optionalAccess', _138 => _138.overrides]),
2080
+ ..._optionalChain([json, 'optionalAccess', _127 => _127.pnpm, 'optionalAccess', _128 => _128.overrides]),
2355
2081
  [_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
2356
2082
  }
2357
2083
  }
2358
2084
  }));
2359
2085
  }
2360
2086
  _js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
2361
- _chunkHZON5W3Gjs.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
2087
+ _chunkFK6PN2T3js.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
2362
2088
  ]);
2363
- _js.addTsConfigPath.call(void 0, tree, _chunkHZON5W3Gjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
2364
- _chunkHZON5W3Gjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
2089
+ _js.addTsConfigPath.call(void 0, tree, _chunkFK6PN2T3js.joinPaths.call(void 0, normalized.importPath, "/*"), [
2090
+ _chunkFK6PN2T3js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
2365
2091
  ]);
2366
2092
  if (tree.exists("package.json")) {
2367
2093
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2368
- if (_optionalChain([packageJson, 'optionalAccess', _139 => _139.repository])) {
2094
+ if (_optionalChain([packageJson, 'optionalAccess', _129 => _129.repository])) {
2369
2095
  repository = packageJson.repository;
2370
2096
  }
2371
- if (_optionalChain([packageJson, 'optionalAccess', _140 => _140.description])) {
2097
+ if (_optionalChain([packageJson, 'optionalAccess', _130 => _130.description])) {
2372
2098
  description = packageJson.description;
2373
2099
  }
2374
2100
  }
2375
- const tsconfigPath = _chunkHZON5W3Gjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
2101
+ const tsconfigPath = _chunkFK6PN2T3js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
2376
2102
  if (tree.exists(tsconfigPath)) {
2377
2103
  _devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
2378
2104
  json.composite ??= true;
@@ -2410,42 +2136,42 @@ function getOutputPath(options) {
2410
2136
  } else {
2411
2137
  parts.push(options.projectRoot);
2412
2138
  }
2413
- return _chunkHZON5W3Gjs.joinPaths.call(void 0, ...parts);
2139
+ return _chunkFK6PN2T3js.joinPaths.call(void 0, ...parts);
2414
2140
  }
2415
2141
  _chunkJ5SB6L2Ljs.__name.call(void 0, getOutputPath, "getOutputPath");
2416
2142
  function createProjectTsConfigJson(tree, options) {
2417
2143
  const tsconfig = {
2418
2144
  extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
2419
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _141 => _141.tsconfigOptions]), () => ( {})),
2145
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _131 => _131.tsconfigOptions]), () => ( {})),
2420
2146
  compilerOptions: {
2421
2147
  ...options.rootProject ? _js.tsConfigBaseOptions : {},
2422
- outDir: _chunkHZON5W3Gjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
2148
+ outDir: _chunkFK6PN2T3js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
2423
2149
  noEmit: true,
2424
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _142 => _142.tsconfigOptions, 'optionalAccess', _143 => _143.compilerOptions]), () => ( {}))
2150
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _132 => _132.tsconfigOptions, 'optionalAccess', _133 => _133.compilerOptions]), () => ( {}))
2425
2151
  },
2426
2152
  files: [
2427
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _144 => _144.tsconfigOptions, 'optionalAccess', _145 => _145.files]), () => ( []))
2153
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _134 => _134.tsconfigOptions, 'optionalAccess', _135 => _135.files]), () => ( []))
2428
2154
  ],
2429
2155
  include: [
2430
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _146 => _146.tsconfigOptions, 'optionalAccess', _147 => _147.include]), () => ( [])),
2156
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _136 => _136.tsconfigOptions, 'optionalAccess', _137 => _137.include]), () => ( [])),
2431
2157
  "src/**/*.ts",
2432
2158
  "src/**/*.js",
2433
2159
  "bin/**/*"
2434
2160
  ],
2435
2161
  exclude: [
2436
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _148 => _148.tsconfigOptions, 'optionalAccess', _149 => _149.exclude]), () => ( [])),
2162
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _138 => _138.tsconfigOptions, 'optionalAccess', _139 => _139.exclude]), () => ( [])),
2437
2163
  "jest.config.ts",
2438
2164
  "src/**/*.spec.ts",
2439
2165
  "src/**/*.test.ts"
2440
2166
  ]
2441
2167
  };
2442
- _devkit.writeJson.call(void 0, tree, _chunkHZON5W3Gjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
2168
+ _devkit.writeJson.call(void 0, tree, _chunkFK6PN2T3js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
2443
2169
  }
2444
2170
  _chunkJ5SB6L2Ljs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
2445
2171
  async function normalizeOptions(tree, options, config) {
2446
2172
  let importPath = options.importPath;
2447
- if (!importPath && _optionalChain([config, 'optionalAccess', _150 => _150.namespace])) {
2448
- importPath = `@${_optionalChain([config, 'optionalAccess', _151 => _151.namespace])}/${options.name}`;
2173
+ if (!importPath && _optionalChain([config, 'optionalAccess', _140 => _140.namespace])) {
2174
+ importPath = `@${_optionalChain([config, 'optionalAccess', _141 => _141.namespace])}/${options.name}`;
2449
2175
  }
2450
2176
  if (options.publishable) {
2451
2177
  if (!importPath) {
@@ -2499,7 +2225,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, normalizeOptions, "normalizeOptions");
2499
2225
 
2500
2226
  // ../workspace-tools/src/generators/browser-library/generator.ts
2501
2227
  async function browserLibraryGeneratorFn(tree, schema, config) {
2502
- const filesDir = _chunkHZON5W3Gjs.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
2228
+ const filesDir = _chunkFK6PN2T3js.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
2503
2229
  const tsLibraryGeneratorOptions = {
2504
2230
  buildExecutor: "@storm-software/workspace-tools:unbuild",
2505
2231
  platform: "browser",
@@ -2571,19 +2297,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
2571
2297
 
2572
2298
  var _zodtojsonschema = require('zod-to-json-schema');
2573
2299
  async function configSchemaGeneratorFn(tree, options, config) {
2574
- _chunkHZON5W3Gjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
2575
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `Determining the Storm Workspace Configuration JSON Schema...`, config);
2576
- const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkHZON5W3Gjs.StormConfigSchema, {
2300
+ _chunkFK6PN2T3js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
2301
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `Determining the Storm Workspace Configuration JSON Schema...`, config);
2302
+ const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkFK6PN2T3js.StormConfigSchema, {
2577
2303
  name: "StormWorkspaceConfiguration"
2578
2304
  });
2579
- _chunkHZON5W3Gjs.writeTrace.call(void 0, jsonSchema, config);
2580
- const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _152 => _152.workspaceRoot]), () => ( _chunkHZON5W3Gjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _153 => _153.outputFile, 'optionalAccess', _154 => _154.startsWith, 'call', _155 => _155("./")]) ? "" : "./");
2581
- _chunkHZON5W3Gjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
2305
+ _chunkFK6PN2T3js.writeTrace.call(void 0, jsonSchema, config);
2306
+ const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _142 => _142.workspaceRoot]), () => ( _chunkFK6PN2T3js.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _143 => _143.outputFile, 'optionalAccess', _144 => _144.startsWith, 'call', _145 => _145("./")]) ? "" : "./");
2307
+ _chunkFK6PN2T3js.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
2582
2308
  _devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
2583
2309
  spaces: 2
2584
2310
  });
2585
2311
  await _devkit.formatFiles.call(void 0, tree);
2586
- _chunkHZON5W3Gjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
2312
+ _chunkFK6PN2T3js.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
2587
2313
  return {
2588
2314
  success: true
2589
2315
  };
@@ -2604,7 +2330,7 @@ var generator_default2 = withRunGenerator("Configuration Schema Creator", config
2604
2330
  // ../workspace-tools/src/generators/neutral-library/generator.ts
2605
2331
 
2606
2332
  async function neutralLibraryGeneratorFn(tree, schema, config) {
2607
- const filesDir = _chunkHZON5W3Gjs.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
2333
+ const filesDir = _chunkFK6PN2T3js.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
2608
2334
  const tsLibraryGeneratorOptions = {
2609
2335
  ...schema,
2610
2336
  platform: "neutral",
@@ -2647,7 +2373,7 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
2647
2373
  // ../workspace-tools/src/generators/node-library/generator.ts
2648
2374
 
2649
2375
  async function nodeLibraryGeneratorFn(tree, schema, config) {
2650
- const filesDir = _chunkHZON5W3Gjs.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
2376
+ const filesDir = _chunkFK6PN2T3js.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
2651
2377
  const tsLibraryGeneratorOptions = {
2652
2378
  platform: "node",
2653
2379
  devDependencies: {
@@ -2723,9 +2449,6 @@ async function presetGeneratorFn(tree, options) {
2723
2449
  "storm",
2724
2450
  "storm-stack",
2725
2451
  "storm-ops",
2726
- "acidic",
2727
- "acidic-engine",
2728
- "cyclone-ui",
2729
2452
  "rust",
2730
2453
  "nx",
2731
2454
  "graphql",
@@ -2766,10 +2489,10 @@ async function presetGeneratorFn(tree, options) {
2766
2489
  type: "github",
2767
2490
  url: `${options.repositoryUrl}.git`
2768
2491
  };
2769
- json.packageManager ??= "pnpm@9.15.2";
2492
+ json.packageManager ??= "pnpm@10.3.0";
2770
2493
  json.engines ??= {
2771
2494
  node: ">=20.11.0",
2772
- pnpm: ">=9.15.2"
2495
+ pnpm: ">=10.3.0"
2773
2496
  };
2774
2497
  json.prettier = "@storm-software/prettier/config.json";
2775
2498
  json.nx ??= {
@@ -2922,6 +2645,199 @@ var _resolvelocalpackagedependencies = require('@nx/js/src/generators/release-ve
2922
2645
  var _updatelockfile = require('@nx/js/src/generators/release-version/utils/update-lock-file');
2923
2646
 
2924
2647
  // ../git-tools/src/types.ts
2648
+ var DEFAULT_COMMIT_TYPES = {
2649
+ /* --- Bumps version when selected --- */
2650
+ chore: {
2651
+ description: "Other changes that don't modify src or test files",
2652
+ title: "Chore",
2653
+ emoji: "\u2699\uFE0F ",
2654
+ semverBump: "patch",
2655
+ changelog: {
2656
+ title: "Miscellaneous",
2657
+ hidden: false
2658
+ }
2659
+ },
2660
+ fix: {
2661
+ description: "A change that resolves an issue previously identified with the package",
2662
+ title: "Bug Fix",
2663
+ emoji: "\u{1FAB2} ",
2664
+ semverBump: "patch",
2665
+ changelog: {
2666
+ title: "Bug Fixes",
2667
+ hidden: false
2668
+ }
2669
+ },
2670
+ feat: {
2671
+ description: "A change that adds a new feature to the package",
2672
+ title: "Feature",
2673
+ emoji: "\u{1F511} ",
2674
+ semverBump: "minor",
2675
+ changelog: {
2676
+ title: "Features",
2677
+ hidden: false
2678
+ }
2679
+ },
2680
+ ci: {
2681
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
2682
+ title: "Continuous Integration",
2683
+ emoji: "\u{1F9F0} ",
2684
+ semverBump: "patch",
2685
+ changelog: {
2686
+ title: "Continuous Integration",
2687
+ hidden: false
2688
+ }
2689
+ },
2690
+ refactor: {
2691
+ description: "A code change that neither fixes a bug nor adds a feature",
2692
+ title: "Code Refactoring",
2693
+ emoji: "\u{1F9EA} ",
2694
+ semverBump: "patch",
2695
+ changelog: {
2696
+ title: "Source Code Improvements",
2697
+ hidden: false
2698
+ }
2699
+ },
2700
+ style: {
2701
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
2702
+ title: "Style Improvements",
2703
+ emoji: "\u{1F48E} ",
2704
+ semverBump: "patch",
2705
+ changelog: {
2706
+ title: "Style Improvements",
2707
+ hidden: false
2708
+ }
2709
+ },
2710
+ perf: {
2711
+ description: "A code change that improves performance",
2712
+ title: "Performance Improvement",
2713
+ emoji: "\u23F1\uFE0F ",
2714
+ semverBump: "patch",
2715
+ changelog: {
2716
+ title: "Performance Improvements",
2717
+ hidden: false
2718
+ }
2719
+ },
2720
+ /* --- Does not bump version when selected --- */
2721
+ docs: {
2722
+ description: "A change that only includes documentation updates",
2723
+ title: "Documentation",
2724
+ emoji: "\u{1F4DC} ",
2725
+ semverBump: "none",
2726
+ changelog: {
2727
+ title: "Documentation",
2728
+ hidden: false
2729
+ }
2730
+ },
2731
+ test: {
2732
+ description: "Adding missing tests or correcting existing tests",
2733
+ title: "Testing",
2734
+ emoji: "\u{1F6A8} ",
2735
+ semverBump: "none",
2736
+ changelog: {
2737
+ title: "Testing",
2738
+ hidden: true
2739
+ }
2740
+ },
2741
+ /* --- Not included in commitlint but included in changelog --- */
2742
+ deps: {
2743
+ description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
2744
+ title: "Dependencies",
2745
+ emoji: "\u{1F4E6} ",
2746
+ hidden: true,
2747
+ semverBump: "patch",
2748
+ changelog: {
2749
+ title: "Dependency Upgrades",
2750
+ hidden: false
2751
+ }
2752
+ },
2753
+ /* --- Not included in commitlint or changelog --- */
2754
+ build: {
2755
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
2756
+ title: "Build",
2757
+ emoji: "\u{1F6E0} ",
2758
+ hidden: true,
2759
+ semverBump: "none",
2760
+ changelog: {
2761
+ title: "Build",
2762
+ hidden: true
2763
+ }
2764
+ },
2765
+ release: {
2766
+ description: "Publishing a commit containing a newly released version",
2767
+ title: "Publish Release",
2768
+ emoji: "\u{1F680} ",
2769
+ hidden: true,
2770
+ semverBump: "none",
2771
+ changelog: {
2772
+ title: "Publish Release",
2773
+ hidden: true
2774
+ }
2775
+ }
2776
+ };
2777
+ var DEFAULT_COMMIT_QUESTIONS = {
2778
+ type: {
2779
+ type: "select",
2780
+ title: "Commit Type",
2781
+ description: "Select the commit type that best describes your changes",
2782
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
2783
+ ret[type] = DEFAULT_COMMIT_TYPES[type];
2784
+ return ret;
2785
+ }, {}),
2786
+ defaultValue: "chore",
2787
+ maxLength: 20,
2788
+ minLength: 3
2789
+ },
2790
+ scope: {
2791
+ type: "select",
2792
+ title: "Commit Scope",
2793
+ description: "Select the monorepo project that is primarily impacted by this change",
2794
+ enum: {},
2795
+ defaultValue: "monorepo",
2796
+ maxLength: 50,
2797
+ minLength: 1
2798
+ },
2799
+ subject: {
2800
+ type: "input",
2801
+ title: "Commit Subject",
2802
+ description: "Write a short, imperative tense description of the change",
2803
+ maxLength: 150,
2804
+ minLength: 3
2805
+ },
2806
+ body: {
2807
+ type: "input",
2808
+ title: "Commit Body",
2809
+ description: "Provide a longer description of the change",
2810
+ maxLength: 600
2811
+ },
2812
+ isBreaking: {
2813
+ type: "confirm",
2814
+ title: "Breaking Changes",
2815
+ description: "Are there any breaking changes as a result of this commit?",
2816
+ defaultValue: false
2817
+ },
2818
+ breakingBody: {
2819
+ type: "input",
2820
+ title: "Breaking Changes (Details)",
2821
+ description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
2822
+ when: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (answers) => answers.isBreaking === true, "when"),
2823
+ maxLength: 600,
2824
+ minLength: 3
2825
+ },
2826
+ isIssueAffected: {
2827
+ type: "confirm",
2828
+ title: "Open Issue Affected",
2829
+ description: "Does this change impact any open issues?",
2830
+ defaultValue: false
2831
+ },
2832
+ issuesBody: {
2833
+ type: "input",
2834
+ title: "Open Issue Affected (Details)",
2835
+ description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
2836
+ when: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (answers) => answers.isIssueAffected === true, "when"),
2837
+ maxLength: 600,
2838
+ minLength: 3
2839
+ }
2840
+ };
2925
2841
  var RuleConfigSeverity;
2926
2842
  (function(RuleConfigSeverity2) {
2927
2843
  RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
@@ -2929,9 +2845,6 @@ var RuleConfigSeverity;
2929
2845
  RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
2930
2846
  })(RuleConfigSeverity || (RuleConfigSeverity = {}));
2931
2847
 
2932
- // ../git-tools/src/release/changelog-renderer.ts
2933
- var _index = require('nx/release/changelog-renderer/index'); var _index2 = _interopRequireDefault(_index);
2934
-
2935
2848
  // ../workspace-tools/src/generators/release-version/generator.ts
2936
2849
 
2937
2850