@storm-software/cloudflare-tools 0.49.1 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-ZY7TM2TA.mjs → chunk-7KICJG4N.mjs} +4 -4
  4. package/dist/{chunk-ITLKTOIK.mjs → chunk-CYPHDXO4.mjs} +105 -136
  5. package/dist/{chunk-NPJPHEFP.js → chunk-FARER72T.js} +1 -1
  6. package/dist/{chunk-CR22PACK.mjs → chunk-FDWGGCRH.mjs} +1 -1
  7. package/dist/{chunk-YE4FHRXJ.js → chunk-FEVYI765.js} +4 -4
  8. package/dist/{chunk-WGOT27OY.js → chunk-GTCFSQI5.js} +114 -145
  9. package/dist/{chunk-W5J5EWQN.js → chunk-IF6J7SWP.js} +5 -5
  10. package/dist/{chunk-OARYMVO7.mjs → chunk-JJVEBF3V.mjs} +4 -4
  11. package/dist/{chunk-NKCR3FSU.js → chunk-RGEF6YBW.js} +4 -4
  12. package/dist/{chunk-VPT6GF3S.mjs → chunk-WWU5M5GO.mjs} +5 -5
  13. package/dist/executors.js +4 -4
  14. package/dist/executors.mjs +4 -4
  15. package/dist/generators.js +5 -5
  16. package/dist/generators.mjs +4 -4
  17. package/dist/index.js +12 -12
  18. package/dist/index.mjs +15 -15
  19. package/dist/src/executors/cloudflare-publish/executor.js +2 -2
  20. package/dist/src/executors/cloudflare-publish/executor.mjs +2 -2
  21. package/dist/src/executors/r2-upload-publish/executor.js +4 -4
  22. package/dist/src/executors/r2-upload-publish/executor.mjs +3 -3
  23. package/dist/src/executors/serve/executor.js +3 -3
  24. package/dist/src/executors/serve/executor.mjs +2 -2
  25. package/dist/src/generators/init/generator.js +2 -2
  26. package/dist/src/generators/init/generator.mjs +1 -1
  27. package/dist/src/generators/worker/generator.js +4 -4
  28. package/dist/src/generators/worker/generator.mjs +3 -3
  29. package/package.json +1 -1
@@ -4,7 +4,7 @@
4
4
  var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
5
5
 
6
6
 
7
- var _chunkYE4FHRXJjs = require('./chunk-YE4FHRXJ.js');
7
+ var _chunkFEVYI765js = require('./chunk-FEVYI765.js');
8
8
 
9
9
 
10
10
 
@@ -168,7 +168,7 @@ var withRunExecutor = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name
168
168
  - sourceRoot: ${sourceRoot}
169
169
  - projectName: ${projectName}
170
170
  `, config);
171
- config = await _chunkYE4FHRXJjs.loadStormConfig.call(void 0, workspaceRoot3);
171
+ config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3);
172
172
  }
173
173
  if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.applyDefaultOptions])) {
174
174
  _chunkRCE3CC76js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
@@ -493,23 +493,25 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
493
493
 
494
494
  // ../build-tools/src/utilities/copy-assets.ts
495
495
 
496
-
497
496
  var _js = require('@nx/js');
498
497
  var _glob = require('glob');
498
+ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
499
499
 
500
500
  // ../build-tools/src/utilities/read-nx-config.ts
501
501
 
502
+
502
503
  var readNxConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (workspaceRoot3) => {
503
504
  let rootDir = workspaceRoot3;
504
505
  if (!rootDir) {
505
- const config = await _chunkYE4FHRXJjs.loadStormConfig.call(void 0, );
506
+ const config = await _chunkFEVYI765js.loadStormConfig.call(void 0, );
506
507
  rootDir = config.workspaceRoot;
507
508
  }
508
509
  const nxJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, rootDir, "nx.json");
509
- if (!await _node.hfs.isFile(nxJsonPath)) {
510
+ if (!_fs.existsSync.call(void 0, nxJsonPath)) {
510
511
  throw new Error("Cannot find project.json configuration");
511
512
  }
512
- return _node.hfs.json(nxJsonPath);
513
+ const configContent = await _promises.readFile.call(void 0, nxJsonPath, "utf8");
514
+ return JSON.parse(configContent);
513
515
  }, "readNxConfig");
514
516
 
515
517
  // ../build-tools/src/utilities/copy-assets.ts
@@ -544,14 +546,12 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
544
546
  });
545
547
  }
546
548
  const nxJson = readNxConfig(config.workspaceRoot);
547
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
548
- exitOnError: true
549
- });
549
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
550
550
  const projectsConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
551
551
  if (!_optionalChain([projectsConfigurations, 'optionalAccess', _49 => _49.projects, 'optionalAccess', _50 => _50[projectName]])) {
552
552
  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.");
553
553
  }
554
- const buildTarget = _optionalChain([projectsConfigurations, 'access', _51 => _51.projects, 'access', _52 => _52[projectName], 'optionalAccess', _53 => _53.targets, 'optionalAccess', _54 => _54.build]);
554
+ const buildTarget = _optionalChain([projectsConfigurations, 'access', _51 => _51.projects, 'access', _52 => _52[projectName], 'access', _53 => _53.targets, 'optionalAccess', _54 => _54.build]);
555
555
  if (!buildTarget) {
556
556
  throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${_chunkRCE3CC76js.joinPaths.call(void 0, projectRoot, "project.json")}`);
557
557
  }
@@ -581,42 +581,30 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
581
581
  _chunkRCE3CC76js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
582
582
  _chunkRCE3CC76js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
583
583
  ]);
584
- await Promise.allSettled(files.map(async (file) => _node.hfs.write(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
584
+ await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
585
585
 
586
- ${await _node.hfs.text(file)}
586
+ ${await _promises.readFile.call(void 0, file, "utf8")}
587
587
 
588
588
  ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
589
589
  }
590
590
  }, "copyAssets");
591
591
 
592
592
  // ../build-tools/src/utilities/generate-package-json.ts
593
-
594
593
  var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
595
594
 
595
+
596
+
596
597
  var _projectgraph = require('nx/src/project-graph/project-graph');
597
598
  var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (workspaceRoot3, projectRoot, projectName, packageJson) => {
598
- const projectGraph = await _projectgraph.createProjectGraphAsync.call(void 0, {
599
- exitOnError: true
600
- });
601
- const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
602
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _55 => _55.projects, 'optionalAccess', _56 => _56[projectName]])) {
603
- 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.");
604
- }
605
- const projectJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3, projectRoot, "project.json");
606
- if (!await _node.hfs.isFile(projectJsonPath)) {
607
- throw new Error("Cannot find project.json configuration");
608
- }
609
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _57 => _57.projects, 'optionalAccess', _58 => _58[projectName]])) {
610
- 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.");
611
- }
612
- 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);
599
+ const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, _projectgraph.readCachedProjectGraph.call(void 0, ), workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
613
600
  const localPackages = [];
614
601
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
615
602
  const projectNode = project.node;
616
603
  if (projectNode.data.root) {
617
604
  const projectPackageJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
618
- if (await _node.hfs.isFile(projectPackageJsonPath)) {
619
- const projectPackageJson = await _node.hfs.json(projectPackageJsonPath);
605
+ if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
606
+ const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
607
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
620
608
  if (projectPackageJson.private !== false) {
621
609
  localPackages.push(projectPackageJson);
622
610
  }
@@ -652,7 +640,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
652
640
  }, "addPackageDependencies");
653
641
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
654
642
  const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkRCE3CC76js.findWorkspaceRoot.call(void 0, );
655
- const workspacePackageJson = await _node.hfs.json(_chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3, "package.json"));
643
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
644
+ const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
656
645
  packageJson.type ??= "module";
657
646
  packageJson.sideEffects ??= false;
658
647
  if (includeSrc === true) {
@@ -897,15 +886,15 @@ var RendererEngine = class {
897
886
  if (!relativePath.startsWith("\\\\?\\")) {
898
887
  relativePath = relativePath.replace(/\\/g, "/");
899
888
  }
900
- const meta = _optionalChain([metafile, 'optionalAccess', _59 => _59.outputs, 'access', _60 => _60[relativePath]]);
889
+ const meta = _optionalChain([metafile, 'optionalAccess', _55 => _55.outputs, 'access', _56 => _56[relativePath]]);
901
890
  return {
902
891
  type: "chunk",
903
892
  path: file.path,
904
893
  code: file.text,
905
- map: _optionalChain([outputFiles, 'access', _61 => _61.find, 'call', _62 => _62((f) => f.path === `${file.path}.map`), 'optionalAccess', _63 => _63.text]),
906
- entryPoint: _optionalChain([meta, 'optionalAccess', _64 => _64.entryPoint]),
907
- exports: _optionalChain([meta, 'optionalAccess', _65 => _65.exports]),
908
- imports: _optionalChain([meta, 'optionalAccess', _66 => _66.imports])
894
+ map: _optionalChain([outputFiles, 'access', _57 => _57.find, 'call', _58 => _58((f) => f.path === `${file.path}.map`), 'optionalAccess', _59 => _59.text]),
895
+ entryPoint: _optionalChain([meta, 'optionalAccess', _60 => _60.entryPoint]),
896
+ exports: _optionalChain([meta, 'optionalAccess', _61 => _61.exports]),
897
+ imports: _optionalChain([meta, 'optionalAccess', _62 => _62.imports])
909
898
  };
910
899
  } else {
911
900
  return {
@@ -988,7 +977,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
988
977
  name: "storm:esm-split-code-to-cjs",
989
978
  setup(build6) {
990
979
  build6.onEnd(async (result) => {
991
- const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _67 => _67.metafile, 'optionalAccess', _68 => _68.outputs]), () => ( {})));
980
+ const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _63 => _63.metafile, 'optionalAccess', _64 => _64.outputs]), () => ( {})));
992
981
  const jsFiles = outFiles.filter((f) => f.endsWith("js"));
993
982
  await esbuild.build({
994
983
  outdir: resolvedOptions.outdir,
@@ -1110,7 +1099,7 @@ ${result.errors.map((error) => error.text).join("\n")}
1110
1099
  // ../esbuild/src/plugins/resolve-paths.ts
1111
1100
 
1112
1101
  function resolvePathsConfig(options, cwd) {
1113
- if (_optionalChain([options, 'optionalAccess', _69 => _69.compilerOptions, 'optionalAccess', _70 => _70.paths])) {
1102
+ if (_optionalChain([options, 'optionalAccess', _65 => _65.compilerOptions, 'optionalAccess', _66 => _66.paths])) {
1114
1103
  const paths = Object.entries(options.compilerOptions.paths);
1115
1104
  const resolvedPaths = paths.map(([key, paths2]) => {
1116
1105
  return [
@@ -1138,7 +1127,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (o
1138
1127
  build6.onResolve({
1139
1128
  filter: packagesRegex
1140
1129
  }, (args) => {
1141
- if (_optionalChain([build6, 'access', _71 => _71.initialOptions, 'access', _72 => _72.external, 'optionalAccess', _73 => _73.includes, 'call', _74 => _74(args.path)])) {
1130
+ if (_optionalChain([build6, 'access', _67 => _67.initialOptions, 'access', _68 => _68.external, 'optionalAccess', _69 => _69.includes, 'call', _70 => _70(args.path)])) {
1142
1131
  return {
1143
1132
  path: args.path,
1144
1133
  external: true
@@ -1246,7 +1235,7 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
1246
1235
  function getTypeDependencyPackageName(npmPackage) {
1247
1236
  if (npmPackage.startsWith("@")) {
1248
1237
  const [scope, name] = npmPackage.split("/");
1249
- return `@types/${_optionalChain([scope, 'optionalAccess', _75 => _75.slice, 'call', _76 => _76(1)])}__${name}`;
1238
+ return `@types/${_optionalChain([scope, 'optionalAccess', _71 => _71.slice, 'call', _72 => _72(1)])}__${name}`;
1250
1239
  }
1251
1240
  return `@types/${npmPackage}`;
1252
1241
  }
@@ -1453,7 +1442,7 @@ function pipeSync(fn, ...fns) {
1453
1442
  return (...args) => {
1454
1443
  let result = fn(...args);
1455
1444
  for (let i = 0; result !== skip && i < fns.length; ++i) {
1456
- result = _optionalChain([fns, 'access', _77 => _77[i], 'optionalCall', _78 => _78(result)]);
1445
+ result = _optionalChain([fns, 'access', _73 => _73[i], 'optionalCall', _74 => _74(result)]);
1457
1446
  }
1458
1447
  return result;
1459
1448
  };
@@ -1463,7 +1452,7 @@ function pipeAsync(fn, ...fns) {
1463
1452
  return async (...args) => {
1464
1453
  let result = await fn(...args);
1465
1454
  for (let i = 0; result !== skip && i < fns.length; ++i) {
1466
- result = await _optionalChain([fns, 'access', _79 => _79[i], 'optionalCall', _80 => _80(result)]);
1455
+ result = await _optionalChain([fns, 'access', _75 => _75[i], 'optionalCall', _76 => _76(result)]);
1467
1456
  }
1468
1457
  return result;
1469
1458
  };
@@ -1479,7 +1468,7 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1479
1468
  if (!workspaceRoot3) {
1480
1469
  throw new Error("Cannot find Nx workspace root");
1481
1470
  }
1482
- const config = await _chunkYE4FHRXJjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
1471
+ const config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3.dir);
1483
1472
  _chunkRCE3CC76js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1484
1473
  const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, "Build options resolution");
1485
1474
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
@@ -1492,7 +1481,7 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1492
1481
  const projectJson = await _node.hfs.json(projectJsonPath);
1493
1482
  const projectName = projectJson.name;
1494
1483
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1495
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _81 => _81.projects, 'optionalAccess', _82 => _82[projectName]])) {
1484
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _77 => _77.projects, 'optionalAccess', _78 => _78[projectName]])) {
1496
1485
  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.");
1497
1486
  }
1498
1487
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
@@ -1668,7 +1657,7 @@ async function executeEsBuild(context2) {
1668
1657
  }
1669
1658
  _chunkJ5SB6L2Ljs.__name.call(void 0, executeEsBuild, "executeEsBuild");
1670
1659
  async function copyBuildAssets(context2) {
1671
- if (_optionalChain([context2, 'access', _83 => _83.result, 'optionalAccess', _84 => _84.errors, 'access', _85 => _85.length]) === 0) {
1660
+ if (_optionalChain([context2, 'access', _79 => _79.result, 'optionalAccess', _80 => _80.errors, 'access', _81 => _81.length]) === 0) {
1672
1661
  _chunkRCE3CC76js.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1673
1662
  const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1674
1663
  await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
@@ -1678,7 +1667,7 @@ async function copyBuildAssets(context2) {
1678
1667
  }
1679
1668
  _chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
1680
1669
  async function reportResults(context2) {
1681
- if (_optionalChain([context2, 'access', _86 => _86.result, 'optionalAccess', _87 => _87.errors, 'access', _88 => _88.length]) === 0) {
1670
+ if (_optionalChain([context2, 'access', _82 => _82.result, 'optionalAccess', _83 => _83.errors, 'access', _84 => _84.length]) === 0) {
1682
1671
  if (context2.result.warnings.length > 0) {
1683
1672
  _chunkRCE3CC76js.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);
1684
1673
  }
@@ -1776,14 +1765,14 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
1776
1765
  // ../workspace-tools/src/executors/esbuild/executor.ts
1777
1766
  async function esbuildExecutorFn(options, context2, config) {
1778
1767
  _chunkRCE3CC76js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1779
- if (!_optionalChain([context2, 'access', _89 => _89.projectsConfigurations, 'optionalAccess', _90 => _90.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _91 => _91.projectsConfigurations, 'access', _92 => _92.projects, 'access', _93 => _93[context2.projectName], 'optionalAccess', _94 => _94.root])) {
1768
+ if (!_optionalChain([context2, 'access', _85 => _85.projectsConfigurations, 'optionalAccess', _86 => _86.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _87 => _87.projectsConfigurations, 'access', _88 => _88.projects, 'access', _89 => _89[context2.projectName], 'optionalAccess', _90 => _90.root])) {
1780
1769
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1781
1770
  }
1782
1771
  await build3({
1783
1772
  ...options,
1784
- projectRoot: _optionalChain([context2, 'access', _95 => _95.projectsConfigurations, 'access', _96 => _96.projects, 'optionalAccess', _97 => _97[context2.projectName], 'access', _98 => _98.root]),
1773
+ projectRoot: _optionalChain([context2, 'access', _91 => _91.projectsConfigurations, 'access', _92 => _92.projects, 'optionalAccess', _93 => _93[context2.projectName], 'access', _94 => _94.root]),
1785
1774
  projectName: context2.projectName,
1786
- sourceRoot: _optionalChain([context2, 'access', _99 => _99.projectsConfigurations, 'access', _100 => _100.projects, 'optionalAccess', _101 => _101[context2.projectName], 'optionalAccess', _102 => _102.sourceRoot]),
1775
+ sourceRoot: _optionalChain([context2, 'access', _95 => _95.projectsConfigurations, 'access', _96 => _96.projects, 'optionalAccess', _97 => _97[context2.projectName], 'optionalAccess', _98 => _98.sourceRoot]),
1787
1776
  format: options.format,
1788
1777
  platform: options.format
1789
1778
  });
@@ -1808,7 +1797,7 @@ var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn
1808
1797
 
1809
1798
  // ../workspace-tools/src/executors/npm-publish/executor.ts
1810
1799
 
1811
- var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
1800
+
1812
1801
 
1813
1802
  // ../workspace-tools/src/utils/pnpm-deps-update.ts
1814
1803
 
@@ -1825,7 +1814,7 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
1825
1814
  var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
1826
1815
  var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
1827
1816
  async function sizeLimitExecutorFn(options, context2, config) {
1828
- if (!_optionalChain([context2, 'optionalAccess', _103 => _103.projectName]) || !_optionalChain([context2, 'access', _104 => _104.projectsConfigurations, 'optionalAccess', _105 => _105.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
1817
+ if (!_optionalChain([context2, 'optionalAccess', _99 => _99.projectName]) || !_optionalChain([context2, 'access', _100 => _100.projectsConfigurations, 'optionalAccess', _101 => _101.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
1829
1818
  throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
1830
1819
  }
1831
1820
  _chunkRCE3CC76js.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
@@ -1834,7 +1823,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
1834
1823
  _esbuild3.default,
1835
1824
  _esbuildwhy2.default
1836
1825
  ], {
1837
- checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _106 => _106.projectsConfigurations, 'access', _107 => _107.projects, 'access', _108 => _108[context2.projectName], 'optionalAccess', _109 => _109.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _110 => _110.projectsConfigurations, 'access', _111 => _111.projects, 'access', _112 => _112[context2.projectName], 'optionalAccess', _113 => _113.root]), () => ( "./")), "src")))
1826
+ checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _102 => _102.projectsConfigurations, 'access', _103 => _103.projects, 'access', _104 => _104[context2.projectName], 'optionalAccess', _105 => _105.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _106 => _106.projectsConfigurations, 'access', _107 => _107.projects, 'access', _108 => _108[context2.projectName], 'optionalAccess', _109 => _109.root]), () => ( "./")), "src")))
1838
1827
  }).then((result) => {
1839
1828
  _chunkRCE3CC76js.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
1840
1829
  });
@@ -1898,7 +1887,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1898
1887
  if (!workspaceRoot3) {
1899
1888
  throw new Error("Cannot find Nx workspace root");
1900
1889
  }
1901
- const config = await _chunkYE4FHRXJjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
1890
+ const config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3.dir);
1902
1891
  _chunkRCE3CC76js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1903
1892
  const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, "Build options resolution");
1904
1893
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
@@ -1911,7 +1900,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1911
1900
  const projectJson = await _node.hfs.json(projectJsonPath);
1912
1901
  const projectName = projectJson.name;
1913
1902
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1914
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _114 => _114.projects, 'optionalAccess', _115 => _115[projectName]])) {
1903
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _110 => _110.projects, 'optionalAccess', _111 => _111[projectName]])) {
1915
1904
  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.");
1916
1905
  }
1917
1906
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
@@ -2091,14 +2080,14 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, build4, "build");
2091
2080
  // ../workspace-tools/src/executors/tsdown/executor.ts
2092
2081
  async function tsdownExecutorFn(options, context2, config) {
2093
2082
  _chunkRCE3CC76js.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
2094
- if (!_optionalChain([context2, 'access', _116 => _116.projectsConfigurations, 'optionalAccess', _117 => _117.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _118 => _118.projectsConfigurations, 'access', _119 => _119.projects, 'access', _120 => _120[context2.projectName], 'optionalAccess', _121 => _121.root])) {
2083
+ if (!_optionalChain([context2, 'access', _112 => _112.projectsConfigurations, 'optionalAccess', _113 => _113.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _114 => _114.projectsConfigurations, 'access', _115 => _115.projects, 'access', _116 => _116[context2.projectName], 'optionalAccess', _117 => _117.root])) {
2095
2084
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2096
2085
  }
2097
2086
  await build4({
2098
2087
  ...options,
2099
- projectRoot: _optionalChain([context2, 'access', _122 => _122.projectsConfigurations, 'access', _123 => _123.projects, 'optionalAccess', _124 => _124[context2.projectName], 'access', _125 => _125.root]),
2088
+ projectRoot: _optionalChain([context2, 'access', _118 => _118.projectsConfigurations, 'access', _119 => _119.projects, 'optionalAccess', _120 => _120[context2.projectName], 'access', _121 => _121.root]),
2100
2089
  projectName: context2.projectName,
2101
- sourceRoot: _optionalChain([context2, 'access', _126 => _126.projectsConfigurations, 'access', _127 => _127.projects, 'optionalAccess', _128 => _128[context2.projectName], 'optionalAccess', _129 => _129.sourceRoot]),
2090
+ sourceRoot: _optionalChain([context2, 'access', _122 => _122.projectsConfigurations, 'access', _123 => _123.projects, 'optionalAccess', _124 => _124[context2.projectName], 'optionalAccess', _125 => _125.sourceRoot]),
2102
2091
  format: options.format,
2103
2092
  platform: options.platform
2104
2093
  });
@@ -2165,6 +2154,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
2165
2154
 
2166
2155
 
2167
2156
 
2157
+
2168
2158
  var _unbuild = require('unbuild');
2169
2159
 
2170
2160
  // ../unbuild/src/clean.ts
@@ -2172,7 +2162,10 @@ var _unbuild = require('unbuild');
2172
2162
  async function clean3(name = "Unbuild", directory, config) {
2173
2163
  _chunkRCE3CC76js.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
2174
2164
  const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, `${name} output clean`);
2175
- await _node.hfs.deleteAll(directory);
2165
+ await _promises.rm.call(void 0, directory, {
2166
+ recursive: true,
2167
+ force: true
2168
+ });
2176
2169
  stopwatch();
2177
2170
  }
2178
2171
  _chunkJ5SB6L2Ljs.__name.call(void 0, clean3, "clean");
@@ -2223,26 +2216,6 @@ ${error ? error.message : "Unknown build error"}
2223
2216
  }
2224
2217
  }), "onErrorPlugin");
2225
2218
 
2226
- // ../unbuild/src/plugins/swc.ts
2227
- var swcPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => {
2228
- const { transform: transform3 } = _chunkJ5SB6L2Ljs.__require.call(void 0, "@swc/core");
2229
- return {
2230
- name: "storm:swc",
2231
- transform(code, filename) {
2232
- return transform3(code, {
2233
- filename,
2234
- jsc: {
2235
- transform: {
2236
- react: {
2237
- runtime: "automatic"
2238
- }
2239
- }
2240
- }
2241
- });
2242
- }
2243
- };
2244
- }, "swcPlugin");
2245
-
2246
2219
  // ../unbuild/src/plugins/tsc.ts
2247
2220
 
2248
2221
 
@@ -2277,9 +2250,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerO
2277
2250
 
2278
2251
  // ../unbuild/src/plugins/tsc.ts
2279
2252
  var tscPlugin2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (options, resolvedOptions) => {
2280
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
2281
- exitOnError: true
2282
- });
2253
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
2283
2254
  const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
2284
2255
  let dependencies = result.dependencies;
2285
2256
  const tsLibDependency = _compilerhelperdependency.getHelperDependency.call(void 0, _compilerhelperdependency.HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
@@ -2298,37 +2269,39 @@ var tscPlugin2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (opt
2298
2269
 
2299
2270
  // ../unbuild/src/plugins/type-definitions.ts
2300
2271
 
2301
- var typeDefinitions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
2302
- name: "storm:dts-bundle",
2303
- async generateBundle(_opts, bundle) {
2304
- for (const file of Object.values(bundle)) {
2305
- if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
2306
- continue;
2307
- }
2308
- const hasDefaultExport = file.exports.includes("default");
2309
- const entrySourceFileName = _path.relative.call(void 0, options.projectRoot, file.facadeModuleId);
2310
- const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
2311
- const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
2312
- const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
2313
- const dtsFileSource = hasDefaultExport ? `
2272
+ function typeDefinitions(projectRoot) {
2273
+ return {
2274
+ name: "storm:dts-bundle",
2275
+ async generateBundle(_opts, bundle) {
2276
+ for (const file of Object.values(bundle)) {
2277
+ if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
2278
+ continue;
2279
+ }
2280
+ const hasDefaultExport = file.exports.includes("default");
2281
+ const entrySourceFileName = _path.relative.call(void 0, projectRoot, file.facadeModuleId);
2282
+ const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
2283
+ const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
2284
+ const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
2285
+ const dtsFileSource = hasDefaultExport ? `
2314
2286
  export * from ${relativeSourceDtsName};
2315
2287
  export { default } from ${relativeSourceDtsName};
2316
2288
  ` : `export * from ${relativeSourceDtsName};
2317
2289
  `;
2318
- this.emitFile({
2319
- type: "asset",
2320
- fileName: dtsFileName,
2321
- source: dtsFileSource
2322
- });
2290
+ this.emitFile({
2291
+ type: "asset",
2292
+ fileName: dtsFileName,
2293
+ source: dtsFileSource
2294
+ });
2295
+ }
2323
2296
  }
2324
- }
2325
- }), "typeDefinitions");
2297
+ };
2298
+ }
2299
+ _chunkJ5SB6L2Ljs.__name.call(void 0, typeDefinitions, "typeDefinitions");
2326
2300
 
2327
2301
  // ../unbuild/src/config.ts
2328
2302
  var getDefaultBuildPlugins2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (options, resolvedOptions) => Promise.all([
2329
2303
  analyzePlugin(options, resolvedOptions),
2330
- swcPlugin(options, resolvedOptions),
2331
- typeDefinitions(options, resolvedOptions),
2304
+ typeDefinitions(resolvedOptions.projectRoot),
2332
2305
  tscPlugin2(options, resolvedOptions),
2333
2306
  onErrorPlugin2(options, resolvedOptions)
2334
2307
  ].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
@@ -2344,7 +2317,7 @@ async function resolveOptions3(options) {
2344
2317
  if (!workspaceRoot3) {
2345
2318
  throw new Error("Cannot find workspace root");
2346
2319
  }
2347
- const config = await _chunkYE4FHRXJjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
2320
+ const config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3.dir);
2348
2321
  _chunkRCE3CC76js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
2349
2322
  const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, "Build options resolution");
2350
2323
  if (options.configPath) {
@@ -2353,38 +2326,34 @@ async function resolveOptions3(options) {
2353
2326
  options = _defu2.default.call(void 0, options, configFile);
2354
2327
  }
2355
2328
  }
2356
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
2357
- exitOnError: true
2358
- });
2329
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
2359
2330
  const projectJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, config.workspaceRoot, projectRoot, "project.json");
2360
- if (!await _node.hfs.isFile(projectJsonPath)) {
2331
+ if (!_fs.existsSync.call(void 0, projectJsonPath)) {
2361
2332
  throw new Error("Cannot find project.json configuration");
2362
2333
  }
2363
- const projectJson = await _node.hfs.json(projectJsonPath);
2334
+ const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
2335
+ const projectJson = JSON.parse(projectJsonContent);
2364
2336
  const projectName = projectJson.name;
2365
2337
  const packageJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "package.json");
2366
- if (!await _node.hfs.isFile(packageJsonPath)) {
2338
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
2367
2339
  throw new Error("Cannot find package.json configuration");
2368
2340
  }
2369
- const packageJson = await _node.hfs.json(packageJsonPath);
2341
+ const packageJsonContent = await _promises.readFile.call(void 0, packageJsonPath, "utf8");
2342
+ const packageJson = JSON.parse(packageJsonContent);
2370
2343
  let tsconfig = options.tsconfig;
2371
2344
  if (!tsconfig) {
2372
2345
  tsconfig = _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json");
2373
2346
  }
2374
- if (!await _node.hfs.isFile(tsconfig)) {
2347
+ if (!_fs.existsSync.call(void 0, tsconfig)) {
2375
2348
  throw new Error("Cannot find tsconfig.json configuration");
2376
2349
  }
2377
2350
  let sourceRoot = projectJson.sourceRoot;
2378
2351
  if (!sourceRoot) {
2379
2352
  sourceRoot = _chunkRCE3CC76js.joinPaths.call(void 0, projectRoot, "src");
2380
2353
  }
2381
- if (!await _node.hfs.isDirectory(sourceRoot)) {
2354
+ if (!_fs.existsSync.call(void 0, sourceRoot)) {
2382
2355
  throw new Error("Cannot find sourceRoot directory");
2383
2356
  }
2384
- const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
2385
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _130 => _130.projects, 'optionalAccess', _131 => _131[projectName]])) {
2386
- 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.");
2387
- }
2388
2357
  const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
2389
2358
  let dependencies = result.dependencies;
2390
2359
  const tsLibDependency = _js.getHelperDependency.call(void 0, _js.HelperDependency.tsc, tsconfig, dependencies, projectGraph, true);
@@ -2505,21 +2474,21 @@ async function resolveOptions3(options) {
2505
2474
  }
2506
2475
  _chunkJ5SB6L2Ljs.__name.call(void 0, resolveOptions3, "resolveOptions");
2507
2476
  async function generatePackageJson3(options) {
2508
- if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkRCE3CC76js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
2477
+ if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
2509
2478
  _chunkRCE3CC76js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
2510
2479
  const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, "Write package.json file");
2511
2480
  const packageJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, options.projectRoot, "project.json");
2512
- if (!await _node.hfs.isFile(packageJsonPath)) {
2481
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
2513
2482
  throw new Error("Cannot find package.json configuration");
2514
2483
  }
2515
- let packageJson = await _node.hfs.json(_chunkRCE3CC76js.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
2516
- if (!packageJson) {
2484
+ let packageJsonContent = await _promises.readFile.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
2485
+ if (!packageJsonContent) {
2517
2486
  throw new Error("Cannot find package.json configuration file");
2518
2487
  }
2488
+ let packageJson = JSON.parse(packageJsonContent);
2519
2489
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
2520
2490
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
2521
- packageJson = await addPackageJsonExports(options.sourceRoot, packageJson);
2522
- await _devkit.writeJsonFile.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
2491
+ await _devkit.writeJsonFile.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
2523
2492
  stopwatch();
2524
2493
  }
2525
2494
  return options;
@@ -2577,14 +2546,14 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, build5, "build");
2577
2546
 
2578
2547
  async function unbuildExecutorFn(options, context2, config) {
2579
2548
  _chunkRCE3CC76js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
2580
- if (!_optionalChain([context2, 'access', _132 => _132.projectsConfigurations, 'optionalAccess', _133 => _133.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _134 => _134.projectsConfigurations, 'access', _135 => _135.projects, 'access', _136 => _136[context2.projectName], 'optionalAccess', _137 => _137.root])) {
2549
+ if (!_optionalChain([context2, 'access', _126 => _126.projectsConfigurations, 'optionalAccess', _127 => _127.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _128 => _128.projectsConfigurations, 'access', _129 => _129.projects, 'access', _130 => _130[context2.projectName], 'optionalAccess', _131 => _131.root])) {
2581
2550
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2582
2551
  }
2583
2552
  await build5(_defu.defu.call(void 0, {
2584
2553
  ...options,
2585
- projectRoot: _optionalChain([context2, 'access', _138 => _138.projectsConfigurations, 'access', _139 => _139.projects, 'optionalAccess', _140 => _140[context2.projectName], 'access', _141 => _141.root]),
2554
+ projectRoot: _optionalChain([context2, 'access', _132 => _132.projectsConfigurations, 'access', _133 => _133.projects, 'optionalAccess', _134 => _134[context2.projectName], 'access', _135 => _135.root]),
2586
2555
  projectName: context2.projectName,
2587
- sourceRoot: _optionalChain([context2, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'optionalAccess', _144 => _144[context2.projectName], 'optionalAccess', _145 => _145.sourceRoot]),
2556
+ sourceRoot: _optionalChain([context2, 'access', _136 => _136.projectsConfigurations, 'access', _137 => _137.projects, 'optionalAccess', _138 => _138[context2.projectName], 'optionalAccess', _139 => _139.sourceRoot]),
2588
2557
  platform: options.platform,
2589
2558
  name: context2.projectName
2590
2559
  }, {
@@ -2651,9 +2620,9 @@ var withRunGenerator = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (nam
2651
2620
  if (!generatorOptions.skipReadingConfig) {
2652
2621
  _chunkRCE3CC76js.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
2653
2622
  - workspaceRoot: ${workspaceRoot3}`, config);
2654
- config = await _chunkYE4FHRXJjs.loadStormConfig.call(void 0, workspaceRoot3);
2623
+ config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3);
2655
2624
  }
2656
- if (_optionalChain([generatorOptions, 'optionalAccess', _146 => _146.hooks, 'optionalAccess', _147 => _147.applyDefaultOptions])) {
2625
+ if (_optionalChain([generatorOptions, 'optionalAccess', _140 => _140.hooks, 'optionalAccess', _141 => _141.applyDefaultOptions])) {
2657
2626
  _chunkRCE3CC76js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
2658
2627
  options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
2659
2628
  _chunkRCE3CC76js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
@@ -2664,22 +2633,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
2664
2633
  workspaceRoot: tree.root,
2665
2634
  config
2666
2635
  }, applyWorkspaceBaseTokens);
2667
- if (_optionalChain([generatorOptions, 'optionalAccess', _148 => _148.hooks, 'optionalAccess', _149 => _149.preProcess])) {
2636
+ if (_optionalChain([generatorOptions, 'optionalAccess', _142 => _142.hooks, 'optionalAccess', _143 => _143.preProcess])) {
2668
2637
  _chunkRCE3CC76js.writeDebug.call(void 0, "Running the preProcess hook...", config);
2669
2638
  await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
2670
2639
  _chunkRCE3CC76js.writeDebug.call(void 0, "Completed the preProcess hook", config);
2671
2640
  }
2672
2641
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
2673
2642
  if (result) {
2674
- if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _150 => _150.error, 'optionalAccess', _151 => _151.message]) && typeof _optionalChain([result, 'optionalAccess', _152 => _152.error, 'optionalAccess', _153 => _153.message]) === "string" && _optionalChain([result, 'optionalAccess', _154 => _154.error, 'optionalAccess', _155 => _155.name]) && typeof _optionalChain([result, 'optionalAccess', _156 => _156.error, 'optionalAccess', _157 => _157.name]) === "string") {
2643
+ if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _144 => _144.error, 'optionalAccess', _145 => _145.message]) && typeof _optionalChain([result, 'optionalAccess', _146 => _146.error, 'optionalAccess', _147 => _147.message]) === "string" && _optionalChain([result, 'optionalAccess', _148 => _148.error, 'optionalAccess', _149 => _149.name]) && typeof _optionalChain([result, 'optionalAccess', _150 => _150.error, 'optionalAccess', _151 => _151.name]) === "string") {
2675
2644
  throw new Error(`The ${name} generator failed to run`, {
2676
- cause: _optionalChain([result, 'optionalAccess', _158 => _158.error])
2645
+ cause: _optionalChain([result, 'optionalAccess', _152 => _152.error])
2677
2646
  });
2678
2647
  } else if (result.success && result.data) {
2679
2648
  return result;
2680
2649
  }
2681
2650
  }
2682
- if (_optionalChain([generatorOptions, 'optionalAccess', _159 => _159.hooks, 'optionalAccess', _160 => _160.postProcess])) {
2651
+ if (_optionalChain([generatorOptions, 'optionalAccess', _153 => _153.hooks, 'optionalAccess', _154 => _154.postProcess])) {
2683
2652
  _chunkRCE3CC76js.writeDebug.call(void 0, "Running the postProcess hook...", config);
2684
2653
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
2685
2654
  _chunkRCE3CC76js.writeDebug.call(void 0, "Completed the postProcess hook", config);
@@ -2789,15 +2758,15 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2789
2758
  _devkit.addProjectConfiguration.call(void 0, tree, options.name, projectConfig);
2790
2759
  let repository = {
2791
2760
  type: "github",
2792
- url: _optionalChain([config, 'optionalAccess', _161 => _161.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _162 => _162.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _163 => _163.namespace]) || _optionalChain([config, 'optionalAccess', _164 => _164.name]) || "repository"}.git`
2761
+ url: _optionalChain([config, 'optionalAccess', _155 => _155.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _156 => _156.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _157 => _157.namespace]) || _optionalChain([config, 'optionalAccess', _158 => _158.name]) || "repository"}.git`
2793
2762
  };
2794
2763
  let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
2795
2764
  if (tree.exists("package.json")) {
2796
2765
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2797
- if (_optionalChain([packageJson, 'optionalAccess', _165 => _165.repository])) {
2766
+ if (_optionalChain([packageJson, 'optionalAccess', _159 => _159.repository])) {
2798
2767
  repository = packageJson.repository;
2799
2768
  }
2800
- if (_optionalChain([packageJson, 'optionalAccess', _166 => _166.description])) {
2769
+ if (_optionalChain([packageJson, 'optionalAccess', _160 => _160.description])) {
2801
2770
  description = packageJson.description;
2802
2771
  }
2803
2772
  }
@@ -2852,9 +2821,9 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2852
2821
  _devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
2853
2822
  ...json,
2854
2823
  pnpm: {
2855
- ..._optionalChain([json, 'optionalAccess', _167 => _167.pnpm]),
2824
+ ..._optionalChain([json, 'optionalAccess', _161 => _161.pnpm]),
2856
2825
  overrides: {
2857
- ..._optionalChain([json, 'optionalAccess', _168 => _168.pnpm, 'optionalAccess', _169 => _169.overrides]),
2826
+ ..._optionalChain([json, 'optionalAccess', _162 => _162.pnpm, 'optionalAccess', _163 => _163.overrides]),
2858
2827
  [_nullishCoalesce(options.importPath, () => ( ""))]: "workspace:*"
2859
2828
  }
2860
2829
  }
@@ -2868,10 +2837,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2868
2837
  ]);
2869
2838
  if (tree.exists("package.json")) {
2870
2839
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2871
- if (_optionalChain([packageJson, 'optionalAccess', _170 => _170.repository])) {
2840
+ if (_optionalChain([packageJson, 'optionalAccess', _164 => _164.repository])) {
2872
2841
  repository = packageJson.repository;
2873
2842
  }
2874
- if (_optionalChain([packageJson, 'optionalAccess', _171 => _171.description])) {
2843
+ if (_optionalChain([packageJson, 'optionalAccess', _165 => _165.description])) {
2875
2844
  description = packageJson.description;
2876
2845
  }
2877
2846
  }
@@ -2919,24 +2888,24 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, getOutputPath, "getOutputPath");
2919
2888
  function createProjectTsConfigJson(tree, options) {
2920
2889
  const tsconfig = {
2921
2890
  extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
2922
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _172 => _172.tsconfigOptions]), () => ( {})),
2891
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _166 => _166.tsconfigOptions]), () => ( {})),
2923
2892
  compilerOptions: {
2924
2893
  ...options.rootProject ? _js.tsConfigBaseOptions : {},
2925
2894
  outDir: _chunkRCE3CC76js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
2926
2895
  noEmit: true,
2927
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _173 => _173.tsconfigOptions, 'optionalAccess', _174 => _174.compilerOptions]), () => ( {}))
2896
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _167 => _167.tsconfigOptions, 'optionalAccess', _168 => _168.compilerOptions]), () => ( {}))
2928
2897
  },
2929
2898
  files: [
2930
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _175 => _175.tsconfigOptions, 'optionalAccess', _176 => _176.files]), () => ( []))
2899
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _169 => _169.tsconfigOptions, 'optionalAccess', _170 => _170.files]), () => ( []))
2931
2900
  ],
2932
2901
  include: [
2933
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _177 => _177.tsconfigOptions, 'optionalAccess', _178 => _178.include]), () => ( [])),
2902
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _171 => _171.tsconfigOptions, 'optionalAccess', _172 => _172.include]), () => ( [])),
2934
2903
  "src/**/*.ts",
2935
2904
  "src/**/*.js",
2936
2905
  "bin/**/*"
2937
2906
  ],
2938
2907
  exclude: [
2939
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _179 => _179.tsconfigOptions, 'optionalAccess', _180 => _180.exclude]), () => ( [])),
2908
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _173 => _173.tsconfigOptions, 'optionalAccess', _174 => _174.exclude]), () => ( [])),
2940
2909
  "jest.config.ts",
2941
2910
  "src/**/*.spec.ts",
2942
2911
  "src/**/*.test.ts"
@@ -3074,7 +3043,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
3074
3043
  name: "StormWorkspaceConfiguration"
3075
3044
  });
3076
3045
  _chunkRCE3CC76js.writeTrace.call(void 0, jsonSchema, config);
3077
- const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _181 => _181.workspaceRoot]), () => ( _chunkRCE3CC76js.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _182 => _182.outputFile, 'optionalAccess', _183 => _183.startsWith, 'call', _184 => _184("./")]) ? "" : "./");
3046
+ const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _175 => _175.workspaceRoot]), () => ( _chunkRCE3CC76js.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _176 => _176.outputFile, 'optionalAccess', _177 => _177.startsWith, 'call', _178 => _178("./")]) ? "" : "./");
3078
3047
  _chunkRCE3CC76js.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
3079
3048
  _devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
3080
3049
  spaces: 2