@storm-software/workspace-tools 1.266.3 → 1.266.5

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 (83) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-BRDK3UGW.mjs → chunk-24FSFLEJ.mjs} +2 -2
  4. package/dist/{chunk-4RI5TAZ5.mjs → chunk-2BI3RJFP.mjs} +175 -12
  5. package/dist/{chunk-OENTXUOU.mjs → chunk-3FIZEIEU.mjs} +1 -1
  6. package/dist/{chunk-P3KSR3SR.mjs → chunk-56NOEAUZ.mjs} +1 -1
  7. package/dist/{chunk-GH7NKN7I.mjs → chunk-5UUINVQE.mjs} +1 -1
  8. package/dist/{chunk-4MQBPVNM.mjs → chunk-6YRWQ3TB.mjs} +1 -1
  9. package/dist/{chunk-BBQYSGHD.js → chunk-7F4BVKX3.js} +2 -2
  10. package/dist/{chunk-7NJYHKD4.js → chunk-AKADBPPT.js} +2 -2
  11. package/dist/{chunk-ZHCAJSHG.js → chunk-BAJ3JRJC.js} +20 -20
  12. package/dist/{chunk-XXFGRTIR.js → chunk-BP5OIRQR.js} +5 -5
  13. package/dist/{chunk-YEIFMXCK.mjs → chunk-CGGBNNFN.mjs} +1 -1
  14. package/dist/{chunk-KJ5COMK2.js → chunk-CSGLVAIK.js} +2 -2
  15. package/dist/{chunk-ZNX5CSRD.js → chunk-CXXOP7P6.js} +2 -2
  16. package/dist/{chunk-SIIOJLU5.mjs → chunk-EXQMY7WD.mjs} +2 -2
  17. package/dist/{chunk-Z5ADLA6I.js → chunk-GX74WTEM.js} +211 -48
  18. package/dist/{chunk-3XSWT4CQ.mjs → chunk-HAUXJ6F2.mjs} +1 -1
  19. package/dist/{chunk-ILRTPPJ4.js → chunk-HVOODRL3.js} +2 -2
  20. package/dist/{chunk-7KECHDTY.mjs → chunk-IOYD4LKE.mjs} +2 -2
  21. package/dist/{chunk-VKKE7EW4.js → chunk-JADXJLCF.js} +4 -4
  22. package/dist/{chunk-KN4FIRQI.js → chunk-JOA2AXGF.js} +15 -15
  23. package/dist/{chunk-QGEPDAWP.mjs → chunk-KE7BLB2Y.mjs} +2 -2
  24. package/dist/{chunk-QMOP57NZ.mjs → chunk-KLY4F7KE.mjs} +1 -1
  25. package/dist/{chunk-WBKZ3KUQ.mjs → chunk-LBWGCRH2.mjs} +1 -1
  26. package/dist/{chunk-ILLL3MMC.mjs → chunk-MHTKV6DY.mjs} +1 -1
  27. package/dist/{chunk-UYN4J6AU.mjs → chunk-N5N2BZHB.mjs} +12 -6
  28. package/dist/{chunk-BHPRU5VN.js → chunk-NY3AXYUD.js} +2 -2
  29. package/dist/{chunk-R2JUE5UD.js → chunk-OCJK2N3G.js} +2 -2
  30. package/dist/{chunk-METCIMBV.js → chunk-OFA5UEOD.js} +5 -5
  31. package/dist/{chunk-EM2LUZWE.js → chunk-POI2YR4E.js} +11 -11
  32. package/dist/{chunk-4ZWQHDDR.js → chunk-PYR5LR3M.js} +2 -2
  33. package/dist/{chunk-G25NYDN4.js → chunk-SN7IJGEE.js} +12 -6
  34. package/dist/{chunk-ALY3T5YO.js → chunk-TCG7CFMK.js} +2 -2
  35. package/dist/{chunk-C325OLQA.mjs → chunk-TEHJDKUJ.mjs} +1 -1
  36. package/dist/{chunk-5TLQHBOJ.mjs → chunk-UQTVXA7T.mjs} +1 -1
  37. package/dist/{chunk-ZXO3ZJZW.js → chunk-XFBY2IVQ.js} +9 -9
  38. package/dist/{chunk-XWHWMA27.mjs → chunk-ZV2PR5R3.mjs} +1 -1
  39. package/dist/executors.js +12 -12
  40. package/dist/executors.mjs +11 -11
  41. package/dist/generators.js +9 -9
  42. package/dist/generators.mjs +8 -8
  43. package/dist/index.js +19 -19
  44. package/dist/index.mjs +18 -18
  45. package/dist/src/base/base-executor.js +3 -3
  46. package/dist/src/base/base-executor.mjs +2 -2
  47. package/dist/src/base/base-generator.js +3 -3
  48. package/dist/src/base/base-generator.mjs +2 -2
  49. package/dist/src/base/index.js +4 -4
  50. package/dist/src/base/index.mjs +3 -3
  51. package/dist/src/executors/cargo-build/executor.js +4 -4
  52. package/dist/src/executors/cargo-build/executor.mjs +3 -3
  53. package/dist/src/executors/cargo-check/executor.js +4 -4
  54. package/dist/src/executors/cargo-check/executor.mjs +3 -3
  55. package/dist/src/executors/cargo-clippy/executor.js +4 -4
  56. package/dist/src/executors/cargo-clippy/executor.mjs +3 -3
  57. package/dist/src/executors/cargo-doc/executor.js +4 -4
  58. package/dist/src/executors/cargo-doc/executor.mjs +3 -3
  59. package/dist/src/executors/cargo-format/executor.js +4 -4
  60. package/dist/src/executors/cargo-format/executor.mjs +3 -3
  61. package/dist/src/executors/clean-package/executor.js +5 -5
  62. package/dist/src/executors/clean-package/executor.mjs +2 -2
  63. package/dist/src/executors/esbuild/executor.js +4 -4
  64. package/dist/src/executors/esbuild/executor.mjs +3 -3
  65. package/dist/src/executors/size-limit/executor.js +4 -4
  66. package/dist/src/executors/size-limit/executor.mjs +3 -3
  67. package/dist/src/executors/typia/executor.js +4 -4
  68. package/dist/src/executors/typia/executor.mjs +3 -3
  69. package/dist/src/executors/unbuild/executor.js +4 -4
  70. package/dist/src/executors/unbuild/executor.mjs +3 -3
  71. package/dist/src/generators/browser-library/generator.js +4 -4
  72. package/dist/src/generators/browser-library/generator.mjs +3 -3
  73. package/dist/src/generators/config-schema/generator.js +4 -4
  74. package/dist/src/generators/config-schema/generator.mjs +3 -3
  75. package/dist/src/generators/neutral-library/generator.js +4 -4
  76. package/dist/src/generators/neutral-library/generator.mjs +3 -3
  77. package/dist/src/generators/node-library/generator.js +4 -4
  78. package/dist/src/generators/node-library/generator.mjs +3 -3
  79. package/dist/src/generators/preset/generator.js +4 -4
  80. package/dist/src/generators/preset/generator.mjs +3 -3
  81. package/dist/src/generators/release-version/generator.js +3 -3
  82. package/dist/src/generators/release-version/generator.mjs +2 -2
  83. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
2
2
 
3
- var _chunkZHCAJSHGjs = require('./chunk-ZHCAJSHG.js');
3
+ var _chunkBAJ3JRJCjs = require('./chunk-BAJ3JRJC.js');
4
4
 
5
5
 
6
6
 
@@ -13,7 +13,7 @@ var _chunkZHCAJSHGjs = require('./chunk-ZHCAJSHG.js');
13
13
 
14
14
 
15
15
 
16
- var _chunkG25NYDN4js = require('./chunk-G25NYDN4.js');
16
+ var _chunkSN7IJGEEjs = require('./chunk-SN7IJGEE.js');
17
17
 
18
18
 
19
19
  var _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
@@ -83,7 +83,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
83
83
  output: "src/"
84
84
  });
85
85
  }
86
- _chunkG25NYDN4js.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
86
+ _chunkSN7IJGEEjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
87
87
  ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
88
88
  const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
89
89
  projectDir: projectRoot,
@@ -93,7 +93,7 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
93
93
  });
94
94
  await assetHandler.processAllAssetsOnce();
95
95
  if (includeSrc === true) {
96
- _chunkG25NYDN4js.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, "src")}`, config);
96
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, "src")}`, config);
97
97
  const files = await _glob.glob.call(void 0, [
98
98
  _chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
99
99
  _chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
@@ -132,7 +132,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
132
132
  }
133
133
  }
134
134
  if (localPackages.length > 0) {
135
- _chunkG25NYDN4js.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
135
+ _chunkSN7IJGEEjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
136
136
  const projectJsonFile = await _promises.readFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
137
137
  const projectJson = JSON.parse(projectJsonFile);
138
138
  const projectName2 = projectJson.name;
@@ -166,7 +166,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
166
166
  return ret;
167
167
  }, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
168
168
  } else {
169
- _chunkG25NYDN4js.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
169
+ _chunkSN7IJGEEjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
170
170
  }
171
171
  return packageJson;
172
172
  }, "addPackageDependencies");
@@ -536,7 +536,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
536
536
  setup(build4) {
537
537
  build4.onEnd((result) => {
538
538
  if (result.errors.length > 0 && process.env.WATCH !== "true") {
539
- _chunkG25NYDN4js.writeError.call(void 0, `The following errors occurred during the build:
539
+ _chunkSN7IJGEEjs.writeError.call(void 0, `The following errors occurred during the build:
540
540
  ${result.errors.map((error) => error.text).join("\n")}
541
541
 
542
542
  `, resolvedOptions.config);
@@ -645,7 +645,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
645
645
  localBuild: true
646
646
  });
647
647
  if (extractorResult.succeeded === false) {
648
- _chunkG25NYDN4js.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
648
+ _chunkSN7IJGEEjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
649
649
  throw new Error("API Extractor completed with errors");
650
650
  }
651
651
  }
@@ -653,7 +653,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, bundleTypeDefinitions, "bundleTypeDefinitio
653
653
  var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
654
654
  name: "storm:tsc",
655
655
  setup(build4) {
656
- if (options.emitTypes === false) {
656
+ if (options.dts === false) {
657
657
  return;
658
658
  }
659
659
  build4.onStart(async () => {
@@ -705,7 +705,7 @@ var getDefaultBuildPlugins = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
705
705
  var DEFAULT_BUILD_OPTIONS = {
706
706
  platform: "node",
707
707
  target: "node22",
708
- format: "cjs",
708
+ format: "esm",
709
709
  external: [],
710
710
  logLevel: "error",
711
711
  tsconfig: "tsconfig.json",
@@ -833,8 +833,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
833
833
  const filteredMissingDeps = missingDependencies.filter((dep) => {
834
834
  return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
835
835
  });
836
- _chunkG25NYDN4js.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
837
- _chunkG25NYDN4js.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
836
+ _chunkSN7IJGEEjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
837
+ _chunkSN7IJGEEjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
838
838
  if (filteredMissingDeps.length > 0) {
839
839
  throw new Error(`Missing dependencies detected - please install them:
840
840
  ${JSON.stringify(filteredMissingDeps)}
@@ -854,6 +854,155 @@ var shebangRenderer = {
854
854
  }
855
855
  };
856
856
 
857
+ // ../esbuild/src/tsc.ts
858
+ var _bundlerequire = require('bundle-require');
859
+
860
+
861
+
862
+ var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
863
+ function ensureTempDeclarationDir(workspaceConfig) {
864
+ const root = workspaceConfig.directories.temp || _path.join.call(void 0, workspaceConfig.workspaceRoot, "tmp");
865
+ const dirPath = _path.join.call(void 0, root, ".tsc", "declaration");
866
+ if (_fs.existsSync.call(void 0, dirPath)) {
867
+ return dirPath;
868
+ }
869
+ _fs.mkdirSync.call(void 0, dirPath, {
870
+ recursive: true
871
+ });
872
+ const gitIgnorePath = _path.join.call(void 0, root, ".tsc", ".gitignore");
873
+ _fs.writeFileSync.call(void 0, gitIgnorePath, "**/*\n");
874
+ return dirPath;
875
+ }
876
+ _chunk3GQAWCBQjs.__name.call(void 0, ensureTempDeclarationDir, "ensureTempDeclarationDir");
877
+ function slash(path6) {
878
+ const isExtendedLengthPath = path6.startsWith("\\\\?\\");
879
+ if (isExtendedLengthPath) {
880
+ return path6;
881
+ }
882
+ return path6.replace(/\\/g, "/");
883
+ }
884
+ _chunk3GQAWCBQjs.__name.call(void 0, slash, "slash");
885
+ function toAbsolutePath(workspaceConfig, p, cwd) {
886
+ if (_path.isAbsolute.call(void 0, p)) {
887
+ return p;
888
+ }
889
+ return slash(_path.normalize.call(void 0, _path.join.call(void 0, cwd || workspaceConfig.workspaceRoot, p)));
890
+ }
891
+ _chunk3GQAWCBQjs.__name.call(void 0, toAbsolutePath, "toAbsolutePath");
892
+ var AliasPool = (_class = class AliasPool2 {constructor() { _class.prototype.__init.call(this); }
893
+ static {
894
+ _chunk3GQAWCBQjs.__name.call(void 0, this, "AliasPool");
895
+ }
896
+ __init() {this.seen = /* @__PURE__ */ new Set()}
897
+ assign(name) {
898
+ let suffix = 0;
899
+ let alias = name === "default" ? "default_alias" : name;
900
+ while (this.seen.has(alias)) {
901
+ alias = `${name}_alias_${++suffix}`;
902
+ if (suffix >= 1e3) {
903
+ throw new Error("Alias generation exceeded limit. Possible infinite loop detected.");
904
+ }
905
+ }
906
+ this.seen.add(alias);
907
+ return alias;
908
+ }
909
+ }, _class);
910
+ function getExports(workspaceConfig, program, fileMapping) {
911
+ const checker = program.getTypeChecker();
912
+ const aliasPool = new AliasPool();
913
+ const assignAlias = aliasPool.assign.bind(aliasPool);
914
+ function extractExports(sourceFileName) {
915
+ const cwd = program.getCurrentDirectory();
916
+ sourceFileName = toAbsolutePath(workspaceConfig, sourceFileName, cwd);
917
+ const sourceFile = program.getSourceFile(sourceFileName);
918
+ if (!sourceFile) {
919
+ return [];
920
+ }
921
+ const destFileName = fileMapping.get(sourceFileName);
922
+ if (!destFileName) {
923
+ return [];
924
+ }
925
+ const moduleSymbol = checker.getSymbolAtLocation(sourceFile);
926
+ if (!moduleSymbol) {
927
+ return [];
928
+ }
929
+ const exports = [];
930
+ const exportSymbols = checker.getExportsOfModule(moduleSymbol);
931
+ exportSymbols.forEach((symbol) => {
932
+ const name = symbol.getName();
933
+ exports.push({
934
+ kind: "named",
935
+ sourceFileName,
936
+ destFileName,
937
+ name,
938
+ alias: assignAlias(name),
939
+ isTypeOnly: false
940
+ });
941
+ });
942
+ return exports;
943
+ }
944
+ _chunk3GQAWCBQjs.__name.call(void 0, extractExports, "extractExports");
945
+ return program.getRootFileNames().flatMap(extractExports);
946
+ }
947
+ _chunk3GQAWCBQjs.__name.call(void 0, getExports, "getExports");
948
+ function emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles = true, customTransformers) {
949
+ const fileMapping = /* @__PURE__ */ new Map();
950
+ const writeFile2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
951
+ const sourceFile = _optionalChain([sourceFiles, 'optionalAccess', _46 => _46[0]]);
952
+ const sourceFileName = _optionalChain([sourceFile, 'optionalAccess', _47 => _47.fileName]);
953
+ if (sourceFileName && !fileName.endsWith(".map")) {
954
+ const cwd = program.getCurrentDirectory();
955
+ fileMapping.set(toAbsolutePath(workspaceConfig, sourceFileName, cwd), toAbsolutePath(workspaceConfig, fileName, cwd));
956
+ }
957
+ return host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
958
+ }, "writeFile");
959
+ const emitResult = program.emit(void 0, writeFile2, void 0, emitOnlyDtsFiles, customTransformers);
960
+ const diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
961
+ const diagnosticMessages = [];
962
+ diagnostics.forEach((diagnostic) => {
963
+ if (diagnostic.file) {
964
+ const { line, character } = _typescript2.default.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
965
+ const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
966
+ diagnosticMessages.push(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
967
+ } else {
968
+ const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
969
+ diagnosticMessages.push(message);
970
+ }
971
+ });
972
+ const diagnosticMessage = diagnosticMessages.join("\n");
973
+ if (diagnosticMessage) {
974
+ _chunkSN7IJGEEjs.writeError.call(void 0, `Failed to emit declaration files.
975
+
976
+ ${diagnosticMessage}`, workspaceConfig);
977
+ throw new Error("TypeScript compilation failed");
978
+ }
979
+ return fileMapping;
980
+ }
981
+ _chunk3GQAWCBQjs.__name.call(void 0, emitDtsFiles, "emitDtsFiles");
982
+ function emitDts(workspaceConfig, tsconfig, tsconfigRaw, emitOnlyDtsFiles = true, customTransformers) {
983
+ const rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, workspaceConfig.workspaceRoot, tsconfig);
984
+ if (!rawTsconfig) {
985
+ throw new Error(`Unable to find ${tsconfig || "tsconfig.json"} in ${workspaceConfig.workspaceRoot}`);
986
+ }
987
+ const declarationDir = ensureTempDeclarationDir(workspaceConfig);
988
+ const parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(_defu2.default.call(void 0, {
989
+ compilerOptions: {
990
+ // Enable declaration emit and disable javascript emit
991
+ noEmit: false,
992
+ declaration: true,
993
+ declarationMap: true,
994
+ declarationDir,
995
+ emitDeclarationOnly: true
996
+ }
997
+ }, _nullishCoalesce(_optionalChain([tsconfigRaw, 'optionalAccess', _48 => _48.compilerOptions]), () => ( {})), _nullishCoalesce(rawTsconfig.data, () => ( {}))), _typescript2.default.sys, tsconfig ? _path.dirname.call(void 0, tsconfig) : "./");
998
+ const options = parsedTsconfig.options;
999
+ const host = _typescript2.default.createCompilerHost(options);
1000
+ const program = _typescript2.default.createProgram(parsedTsconfig.fileNames, options, host);
1001
+ const fileMapping = emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles, customTransformers);
1002
+ return getExports(workspaceConfig, program, fileMapping);
1003
+ }
1004
+ _chunk3GQAWCBQjs.__name.call(void 0, emitDts, "emitDts");
1005
+
857
1006
  // ../esbuild/src/utilities/get-entry-points.ts
858
1007
 
859
1008
  var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
@@ -904,7 +1053,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
904
1053
  paths.push(...files.reduce((ret, filePath) => {
905
1054
  const result = _chunkJTAXCQX6js.correctPaths.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkJTAXCQX6js.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkJTAXCQX6js.correctPaths.call(void 0, projectRoot), ""));
906
1055
  if (result) {
907
- _chunkG25NYDN4js.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkJTAXCQX6js.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
1056
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkJTAXCQX6js.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
908
1057
  if (!paths.some((p) => p.in === result)) {
909
1058
  paths.push({
910
1059
  in: result,
@@ -915,7 +1064,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
915
1064
  return ret;
916
1065
  }, []));
917
1066
  } else {
918
- _chunkG25NYDN4js.writeDebug.call(void 0, `Adding ESBuild entry point
1067
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, `Adding ESBuild entry point
919
1068
  - Input: ${entryPoint.in}
920
1069
  - Output: ${entryPoint.out}`, config);
921
1070
  if (!paths.some((p) => p.out === entryPoint.out)) {
@@ -982,7 +1131,7 @@ function pipeSync(fn, ...fns) {
982
1131
  return (...args) => {
983
1132
  let result = fn(...args);
984
1133
  for (let i = 0; result !== skip && i < fns.length; ++i) {
985
- result = _optionalChain([fns, 'access', _46 => _46[i], 'optionalCall', _47 => _47(result)]);
1134
+ result = _optionalChain([fns, 'access', _49 => _49[i], 'optionalCall', _50 => _50(result)]);
986
1135
  }
987
1136
  return result;
988
1137
  };
@@ -992,7 +1141,7 @@ function pipeAsync(fn, ...fns) {
992
1141
  return async (...args) => {
993
1142
  let result = await fn(...args);
994
1143
  for (let i = 0; result !== skip && i < fns.length; ++i) {
995
- result = await _optionalChain([fns, 'access', _48 => _48[i], 'optionalCall', _49 => _49(result)]);
1144
+ result = await _optionalChain([fns, 'access', _51 => _51[i], 'optionalCall', _52 => _52(result)]);
996
1145
  }
997
1146
  return result;
998
1147
  };
@@ -1008,9 +1157,9 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1008
1157
  if (!workspaceRoot) {
1009
1158
  throw new Error("Cannot find Nx workspace root");
1010
1159
  }
1011
- const config = await _chunkG25NYDN4js.getConfig.call(void 0, workspaceRoot.dir);
1012
- _chunkG25NYDN4js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1013
- const stopwatch = _chunkG25NYDN4js.getStopwatch.call(void 0, "Build options resolution");
1160
+ const config = await _chunkSN7IJGEEjs.getConfig.call(void 0, workspaceRoot.dir);
1161
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1162
+ const stopwatch = _chunkSN7IJGEEjs.getStopwatch.call(void 0, "Build options resolution");
1014
1163
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
1015
1164
  exitOnError: true
1016
1165
  });
@@ -1022,7 +1171,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1022
1171
  const projectJson = JSON.parse(projectJsonFile);
1023
1172
  const projectName = projectJson.name;
1024
1173
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1025
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _50 => _50.projects, 'optionalAccess', _51 => _51[projectName]])) {
1174
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _53 => _53.projects, 'optionalAccess', _54 => _54[projectName]])) {
1026
1175
  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.");
1027
1176
  }
1028
1177
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
@@ -1057,7 +1206,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1057
1206
  projectGraph,
1058
1207
  sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, "src"),
1059
1208
  minify: userOptions.minify || !userOptions.debug,
1060
- verbose: userOptions.verbose || _chunkG25NYDN4js.isVerbose.call(void 0, ) || userOptions.debug === true,
1209
+ verbose: userOptions.verbose || _chunkSN7IJGEEjs.isVerbose.call(void 0, ) || userOptions.debug === true,
1061
1210
  includeSrc: userOptions.includeSrc === true,
1062
1211
  metafile: userOptions.metafile !== false,
1063
1212
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -1112,8 +1261,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1112
1261
  }, "resolveOptions");
1113
1262
  async function generatePackageJson(context2) {
1114
1263
  if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
1115
- _chunkG25NYDN4js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
1116
- const stopwatch = _chunkG25NYDN4js.getStopwatch.call(void 0, "Write package.json file");
1264
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
1265
+ const stopwatch = _chunkSN7IJGEEjs.getStopwatch.call(void 0, "Write package.json file");
1117
1266
  const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
1118
1267
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
1119
1268
  throw new Error("Cannot find package.json configuration");
@@ -1172,8 +1321,8 @@ async function generateContext(getOptions) {
1172
1321
  }
1173
1322
  _chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
1174
1323
  async function executeEsBuild(context2) {
1175
- _chunkG25NYDN4js.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1176
- const stopwatch = _chunkG25NYDN4js.getStopwatch.call(void 0, `${context2.options.name} build`);
1324
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1325
+ const stopwatch = _chunkSN7IJGEEjs.getStopwatch.call(void 0, `${context2.options.name} build`);
1177
1326
  if (process.env.STORM_WATCH) {
1178
1327
  const ctx = await esbuild2.context(context2.options);
1179
1328
  watch(ctx, context2.options);
@@ -1186,6 +1335,7 @@ async function executeEsBuild(context2) {
1186
1335
  options.inject === {}) {
1187
1336
  delete options.inject;
1188
1337
  }
1338
+ delete options.dts;
1189
1339
  delete options.env;
1190
1340
  delete options.name;
1191
1341
  delete options.assets;
@@ -1206,8 +1356,8 @@ async function executeEsBuild(context2) {
1206
1356
  delete options.config;
1207
1357
  delete options.injectShims;
1208
1358
  delete options.external;
1209
- _chunkG25NYDN4js.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
1210
- ${_chunkG25NYDN4js.formatLogMessage.call(void 0, {
1359
+ _chunkSN7IJGEEjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
1360
+ ${_chunkSN7IJGEEjs.formatLogMessage.call(void 0, {
1211
1361
  ...options,
1212
1362
  define: "<Hidden>"
1213
1363
  })}`, context2.options.config);
@@ -1221,10 +1371,20 @@ ${_chunkG25NYDN4js.formatLogMessage.call(void 0, {
1221
1371
  return context2;
1222
1372
  }
1223
1373
  _chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
1374
+ async function executeTypescript(context2) {
1375
+ if (_optionalChain([context2, 'access', _55 => _55.result, 'optionalAccess', _56 => _56.errors, 'access', _57 => _57.length]) === 0 && context2.options.dts) {
1376
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, ` \u{1F4CB} Running TypeScript Compiler for ${context2.options.name}`, context2.options.config);
1377
+ const stopwatch = _chunkSN7IJGEEjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1378
+ await emitDts(context2.options.config, context2.options.tsconfig, context2.options.tsconfigRaw, true);
1379
+ stopwatch();
1380
+ }
1381
+ return context2;
1382
+ }
1383
+ _chunk3GQAWCBQjs.__name.call(void 0, executeTypescript, "executeTypescript");
1224
1384
  async function copyBuildAssets(context2) {
1225
- if (_optionalChain([context2, 'access', _52 => _52.result, 'optionalAccess', _53 => _53.errors, 'access', _54 => _54.length]) === 0) {
1226
- _chunkG25NYDN4js.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1227
- const stopwatch = _chunkG25NYDN4js.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1385
+ if (_optionalChain([context2, 'access', _58 => _58.result, 'optionalAccess', _59 => _59.errors, 'access', _60 => _60.length]) === 0) {
1386
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1387
+ const stopwatch = _chunkSN7IJGEEjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1228
1388
  await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
1229
1389
  stopwatch();
1230
1390
  }
@@ -1232,11 +1392,14 @@ async function copyBuildAssets(context2) {
1232
1392
  }
1233
1393
  _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
1234
1394
  async function reportResults(context2) {
1235
- if (_optionalChain([context2, 'access', _55 => _55.result, 'optionalAccess', _56 => _56.errors, 'access', _57 => _57.length]) === 0) {
1395
+ if (_optionalChain([context2, 'access', _61 => _61.result, 'optionalAccess', _62 => _62.errors, 'access', _63 => _63.length]) === 0) {
1236
1396
  if (context2.result.warnings.length > 0) {
1237
- _chunkG25NYDN4js.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);
1397
+ _chunkSN7IJGEEjs.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);
1238
1398
  }
1239
- _chunkG25NYDN4js.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
1399
+ _chunkSN7IJGEEjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
1400
+ } else if (_optionalChain([context2, 'access', _64 => _64.result, 'optionalAccess', _65 => _65.errors]) && _optionalChain([context2, 'access', _66 => _66.result, 'optionalAccess', _67 => _67.errors, 'access', _68 => _68.length]) > 0) {
1401
+ _chunkSN7IJGEEjs.writeError.call(void 0, ` \u274C The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`, context2.options.config);
1402
+ throw new Error(`The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`);
1240
1403
  }
1241
1404
  }
1242
1405
  _chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
@@ -1272,8 +1435,8 @@ async function dependencyCheck(options) {
1272
1435
  _chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
1273
1436
  async function cleanOutputPath(context2) {
1274
1437
  if (context2.options.clean !== false && context2.options.outdir) {
1275
- _chunkG25NYDN4js.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
1276
- const stopwatch = _chunkG25NYDN4js.getStopwatch.call(void 0, `${context2.options.name} output clean`);
1438
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
1439
+ const stopwatch = _chunkSN7IJGEEjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
1277
1440
  await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
1278
1441
  stopwatch();
1279
1442
  }
@@ -1281,8 +1444,8 @@ async function cleanOutputPath(context2) {
1281
1444
  }
1282
1445
  _chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
1283
1446
  async function build3(options) {
1284
- _chunkG25NYDN4js.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
1285
- const stopwatch = _chunkG25NYDN4js.getStopwatch.call(void 0, "ESBuild pipeline");
1447
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
1448
+ const stopwatch = _chunkSN7IJGEEjs.getStopwatch.call(void 0, "ESBuild pipeline");
1286
1449
  try {
1287
1450
  const opts = Array.isArray(options) ? options : [
1288
1451
  options
@@ -1291,10 +1454,10 @@ async function build3(options) {
1291
1454
  throw new Error("No build options were provided");
1292
1455
  }
1293
1456
  void transduce.async(opts, dependencyCheck);
1294
- await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
1295
- _chunkG25NYDN4js.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
1457
+ await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeTypescript, executeEsBuild, copyBuildAssets, reportResults));
1458
+ _chunkSN7IJGEEjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
1296
1459
  } catch (error) {
1297
- _chunkG25NYDN4js.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
1460
+ _chunkSN7IJGEEjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
1298
1461
  throw error;
1299
1462
  } finally {
1300
1463
  stopwatch();
@@ -1322,9 +1485,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
1322
1485
  return context2.rebuild();
1323
1486
  });
1324
1487
  if (rebuildResult instanceof Error) {
1325
- _chunkG25NYDN4js.writeError.call(void 0, rebuildResult.message);
1488
+ _chunkSN7IJGEEjs.writeError.call(void 0, rebuildResult.message);
1326
1489
  }
1327
- _chunkG25NYDN4js.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
1490
+ _chunkSN7IJGEEjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
1328
1491
  }, 10);
1329
1492
  changeWatcher.on("change", fastRebuild);
1330
1493
  return void 0;
@@ -1332,15 +1495,15 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
1332
1495
 
1333
1496
  // src/executors/esbuild/executor.ts
1334
1497
  async function esbuildExecutorFn(options, context2, config) {
1335
- _chunkG25NYDN4js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1336
- if (!_optionalChain([context2, 'access', _58 => _58.projectsConfigurations, 'optionalAccess', _59 => _59.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _60 => _60.projectsConfigurations, 'access', _61 => _61.projects, 'access', _62 => _62[context2.projectName], 'optionalAccess', _63 => _63.root])) {
1498
+ _chunkSN7IJGEEjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1499
+ if (!_optionalChain([context2, 'access', _69 => _69.projectsConfigurations, 'optionalAccess', _70 => _70.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _71 => _71.projectsConfigurations, 'access', _72 => _72.projects, 'access', _73 => _73[context2.projectName], 'optionalAccess', _74 => _74.root])) {
1337
1500
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1338
1501
  }
1339
1502
  await build3({
1340
1503
  ...options,
1341
- projectRoot: _optionalChain([context2, 'access', _64 => _64.projectsConfigurations, 'access', _65 => _65.projects, 'optionalAccess', _66 => _66[context2.projectName], 'access', _67 => _67.root]),
1504
+ projectRoot: _optionalChain([context2, 'access', _75 => _75.projectsConfigurations, 'access', _76 => _76.projects, 'optionalAccess', _77 => _77[context2.projectName], 'access', _78 => _78.root]),
1342
1505
  projectName: context2.projectName,
1343
- sourceRoot: _optionalChain([context2, 'access', _68 => _68.projectsConfigurations, 'access', _69 => _69.projects, 'optionalAccess', _70 => _70[context2.projectName], 'optionalAccess', _71 => _71.sourceRoot]),
1506
+ sourceRoot: _optionalChain([context2, 'access', _79 => _79.projectsConfigurations, 'access', _80 => _80.projects, 'optionalAccess', _81 => _81[context2.projectName], 'optionalAccess', _82 => _82.sourceRoot]),
1344
1507
  format: options.format,
1345
1508
  platform: options.format
1346
1509
  });
@@ -1349,7 +1512,7 @@ async function esbuildExecutorFn(options, context2, config) {
1349
1512
  };
1350
1513
  }
1351
1514
  _chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
1352
- var executor_default = _chunkZHCAJSHGjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
1515
+ var executor_default = _chunkBAJ3JRJCjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
1353
1516
  skipReadingConfig: false,
1354
1517
  hooks: {
1355
1518
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-KEPMD5HG.mjs";
5
5
  import {
6
6
  withRunExecutor
7
- } from "./chunk-XWHWMA27.mjs";
7
+ } from "./chunk-ZV2PR5R3.mjs";
8
8
  import {
9
9
  __name
10
10
  } from "./chunk-Y4D6KHJP.mjs";
@@ -4,7 +4,7 @@
4
4
  var _chunkHI4G4OOGjs = require('./chunk-HI4G4OOG.js');
5
5
 
6
6
 
7
- var _chunkKN4FIRQIjs = require('./chunk-KN4FIRQI.js');
7
+ var _chunkJOA2AXGFjs = require('./chunk-JOA2AXGF.js');
8
8
 
9
9
 
10
10
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
@@ -229,7 +229,7 @@ async function presetGeneratorFn(tree, options) {
229
229
  return null;
230
230
  }
231
231
  _chunk3GQAWCBQjs.__name.call(void 0, presetGeneratorFn, "presetGeneratorFn");
232
- var generator_default = _chunkKN4FIRQIjs.withRunGenerator.call(void 0, "Storm Workspace Preset Generator", presetGeneratorFn);
232
+ var generator_default = _chunkJOA2AXGFjs.withRunGenerator.call(void 0, "Storm Workspace Preset Generator", presetGeneratorFn);
233
233
 
234
234
 
235
235
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "./chunk-XWHWMA27.mjs";
3
+ } from "./chunk-ZV2PR5R3.mjs";
4
4
  import {
5
5
  writeInfo
6
- } from "./chunk-UYN4J6AU.mjs";
6
+ } from "./chunk-N5N2BZHB.mjs";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-Y4D6KHJP.mjs";
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkZHCAJSHGjs = require('./chunk-ZHCAJSHG.js');
3
+ var _chunkBAJ3JRJCjs = require('./chunk-BAJ3JRJC.js');
4
4
 
5
5
 
6
- var _chunkG25NYDN4js = require('./chunk-G25NYDN4.js');
6
+ var _chunkSN7IJGEEjs = require('./chunk-SN7IJGEE.js');
7
7
 
8
8
 
9
9
  var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
@@ -15,7 +15,7 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
15
15
  var _defu = require('defu');
16
16
  var _jiti = require('jiti');
17
17
  async function unbuildExecutorFn(options, context, config) {
18
- _chunkG25NYDN4js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
18
+ _chunkSN7IJGEEjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
19
19
  if (!_optionalChain([context, 'access', _ => _.projectsConfigurations, 'optionalAccess', _2 => _2.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
20
20
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
21
21
  }
@@ -63,7 +63,7 @@ async function unbuildExecutorFn(options, context, config) {
63
63
  };
64
64
  }
65
65
  _chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
66
- var executor_default = _chunkZHCAJSHGjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
66
+ var executor_default = _chunkBAJ3JRJCjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
67
67
  skipReadingConfig: false,
68
68
  hooks: {
69
69
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
@@ -11,7 +11,7 @@ var _chunkUALZJZUKjs = require('./chunk-UALZJZUK.js');
11
11
 
12
12
 
13
13
 
14
- var _chunkG25NYDN4js = require('./chunk-G25NYDN4.js');
14
+ var _chunkSN7IJGEEjs = require('./chunk-SN7IJGEE.js');
15
15
 
16
16
 
17
17
  var _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
@@ -23,34 +23,34 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
23
23
  var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
24
24
  skipReadingConfig: false
25
25
  }) => async (tree, _options) => {
26
- const stopwatch = _chunkG25NYDN4js.getStopwatch.call(void 0, name);
26
+ const stopwatch = _chunkSN7IJGEEjs.getStopwatch.call(void 0, name);
27
27
  let options = _options;
28
28
  let config;
29
29
  try {
30
- _chunkG25NYDN4js.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
30
+ _chunkSN7IJGEEjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
31
31
 
32
32
  `, config);
33
33
  const workspaceRoot = _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, );
34
34
  if (!generatorOptions.skipReadingConfig) {
35
- _chunkG25NYDN4js.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
35
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
36
36
  - workspaceRoot: ${workspaceRoot}`, config);
37
- config = await _chunkG25NYDN4js.getConfig.call(void 0, workspaceRoot);
37
+ config = await _chunkSN7IJGEEjs.getConfig.call(void 0, workspaceRoot);
38
38
  }
39
39
  if (_optionalChain([generatorOptions, 'optionalAccess', _ => _.hooks, 'optionalAccess', _2 => _2.applyDefaultOptions])) {
40
- _chunkG25NYDN4js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
40
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
41
41
  options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
42
- _chunkG25NYDN4js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
42
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
43
43
  }
44
- _chunkG25NYDN4js.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
44
+ _chunkSN7IJGEEjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
45
45
  ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
46
46
  const tokenized = await _chunkUALZJZUKjs.applyWorkspaceTokens.call(void 0, options, {
47
47
  workspaceRoot: tree.root,
48
48
  config
49
49
  }, _chunkUALZJZUKjs.applyWorkspaceBaseTokens);
50
50
  if (_optionalChain([generatorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.preProcess])) {
51
- _chunkG25NYDN4js.writeDebug.call(void 0, "Running the preProcess hook...", config);
51
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
52
52
  await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
53
- _chunkG25NYDN4js.writeDebug.call(void 0, "Completed the preProcess hook", config);
53
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
54
54
  }
55
55
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
56
56
  if (result) {
@@ -63,18 +63,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
63
63
  }
64
64
  }
65
65
  if (_optionalChain([generatorOptions, 'optionalAccess', _14 => _14.hooks, 'optionalAccess', _15 => _15.postProcess])) {
66
- _chunkG25NYDN4js.writeDebug.call(void 0, "Running the postProcess hook...", config);
66
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
67
67
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
68
- _chunkG25NYDN4js.writeDebug.call(void 0, "Completed the postProcess hook", config);
68
+ _chunkSN7IJGEEjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
69
69
  }
70
70
  return () => {
71
- _chunkG25NYDN4js.writeSuccess.call(void 0, `Completed running the ${name} generator!
71
+ _chunkSN7IJGEEjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
72
72
  `, config);
73
73
  };
74
74
  } catch (error) {
75
75
  return () => {
76
- _chunkG25NYDN4js.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
77
- _chunkG25NYDN4js.writeError.call(void 0, `An exception was thrown in the generator's process
76
+ _chunkSN7IJGEEjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
77
+ _chunkSN7IJGEEjs.writeError.call(void 0, `An exception was thrown in the generator's process
78
78
  - Details: ${error.message}
79
79
  - Stacktrace: ${error.stack}`, config);
80
80
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "./chunk-XWHWMA27.mjs";
3
+ } from "./chunk-ZV2PR5R3.mjs";
4
4
  import {
5
5
  writeInfo
6
- } from "./chunk-UYN4J6AU.mjs";
6
+ } from "./chunk-N5N2BZHB.mjs";
7
7
  import {
8
8
  joinPaths
9
9
  } from "./chunk-XB3SJ7YU.mjs";