@storm-software/terraform-tools 0.54.39 → 0.54.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +213 -120
  2. package/README.md +6 -6
  3. package/dist/{chunk-R7DU2APC.mjs → chunk-2BPV2XV2.mjs} +1 -1
  4. package/dist/{chunk-CGSFJIIU.js → chunk-6JNJXZFJ.js} +2 -2
  5. package/dist/{chunk-ISD3KOJH.js → chunk-7EE3ZWHR.js} +94 -21
  6. package/dist/{chunk-U4KXII2A.js → chunk-7QES4OFY.js} +3 -3
  7. package/dist/{chunk-X5SGDD4A.mjs → chunk-B73EOUKJ.mjs} +2 -2
  8. package/dist/{chunk-WWB3SZR5.mjs → chunk-CU3WSB7P.mjs} +1 -1
  9. package/dist/{chunk-3WK6TOEQ.mjs → chunk-FIYCZYZ5.mjs} +1 -1
  10. package/dist/{chunk-V74I37PF.mjs → chunk-HVYCNU5R.mjs} +323 -409
  11. package/dist/{chunk-HLHB472M.js → chunk-IJO2IHPY.js} +2 -2
  12. package/dist/{chunk-WFNWZFRJ.js → chunk-MLGQ6TX6.js} +2 -2
  13. package/dist/{chunk-M5ME7ATW.mjs → chunk-NJ3UD3AW.mjs} +94 -21
  14. package/dist/{chunk-G7Z6MEYZ.js → chunk-NYWVLPFT.js} +2 -2
  15. package/dist/{chunk-IYCLXMY5.mjs → chunk-T6WPHTRX.mjs} +1 -1
  16. package/dist/{chunk-R3BFLMXQ.mjs → chunk-TB4YXZBF.mjs} +1 -1
  17. package/dist/{chunk-KU7XQWZI.js → chunk-VO4U3XSB.js} +473 -559
  18. package/dist/executors.js +6 -6
  19. package/dist/executors.mjs +7 -7
  20. package/dist/generators.js +3 -3
  21. package/dist/generators.mjs +3 -3
  22. package/dist/index.js +8 -8
  23. package/dist/index.mjs +8 -8
  24. package/dist/src/base/base-terraform-executor.untyped.mjs +1 -1
  25. package/dist/src/base/index.js +3 -3
  26. package/dist/src/base/index.mjs +3 -3
  27. package/dist/src/base/terraform-executor.d.mts +67 -3
  28. package/dist/src/base/terraform-executor.d.ts +67 -3
  29. package/dist/src/base/terraform-executor.js +3 -3
  30. package/dist/src/base/terraform-executor.mjs +3 -3
  31. package/dist/src/executors/apply/executor.js +4 -4
  32. package/dist/src/executors/apply/executor.mjs +4 -4
  33. package/dist/src/executors/destroy/executor.js +4 -4
  34. package/dist/src/executors/destroy/executor.mjs +4 -4
  35. package/dist/src/executors/output/executor.js +4 -4
  36. package/dist/src/executors/output/executor.mjs +4 -4
  37. package/dist/src/executors/plan/executor.js +4 -4
  38. package/dist/src/executors/plan/executor.mjs +4 -4
  39. package/dist/src/generators/init/init.js +3 -3
  40. package/dist/src/generators/init/init.mjs +3 -3
  41. package/dist/tsup.config.mjs +1 -1
  42. package/package.json +5 -5
@@ -4,6 +4,7 @@ import {
4
4
  applyWorkspaceTokens,
5
5
  correctPaths,
6
6
  findWorkspaceRoot,
7
+ formatLogMessage,
7
8
  getConfig,
8
9
  getStopwatch,
9
10
  isVerbose,
@@ -17,12 +18,12 @@ import {
17
18
  writeSuccess,
18
19
  writeTrace,
19
20
  writeWarning
20
- } from "./chunk-M5ME7ATW.mjs";
21
+ } from "./chunk-NJ3UD3AW.mjs";
21
22
  import {
22
23
  __dirname,
23
24
  __name,
24
25
  __require
25
- } from "./chunk-R7DU2APC.mjs";
26
+ } from "./chunk-2BPV2XV2.mjs";
26
27
 
27
28
  // src/generators/init/init.ts
28
29
  import { formatFiles as formatFiles9 } from "@nx/devkit";
@@ -265,11 +266,11 @@ var LARGE_BUFFER = 1024 * 1e6;
265
266
  import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2, writeJsonFile } from "@nx/devkit";
266
267
 
267
268
  // ../build-tools/src/config.ts
268
- var DEFAULT_COMPILED_BANNER = `
269
- /**
269
+ var DEFAULT_COMPILED_BANNER = `/*****************************************
270
+ *
270
271
  * \u26A1 Built by Storm Software
271
- */
272
-
272
+ *
273
+ *****************************************/
273
274
  `;
274
275
  var DEFAULT_ENVIRONMENT = "production";
275
276
  var DEFAULT_TARGET = "esnext";
@@ -292,7 +293,7 @@ import { relative as relative2 } from "path";
292
293
  import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
293
294
  import { glob } from "glob";
294
295
  import { readFile, writeFile } from "node:fs/promises";
295
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
296
+ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
296
297
  const pendingAssets = Array.from(assets ?? []);
297
298
  pendingAssets.push({
298
299
  input: projectRoot,
@@ -304,7 +305,7 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
304
305
  glob: "LICENSE",
305
306
  output: "."
306
307
  });
307
- if (generatePackageJson3 === false) {
308
+ if (generatePackageJson2 === false) {
308
309
  pendingAssets.push({
309
310
  input: projectRoot,
310
311
  glob: "package.json",
@@ -353,7 +354,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
353
354
  const projectGraph = readCachedProjectGraph();
354
355
  const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
355
356
  const localPackages = [];
356
- for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
357
+ for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot3)) {
357
358
  const projectNode = project.node;
358
359
  if (projectNode.data.root) {
359
360
  const projectPackageJsonPath = joinPaths(workspaceRoot3, projectNode.data.root, "package.json");
@@ -450,37 +451,17 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projec
450
451
  packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
451
452
  return packageJson;
452
453
  }, "addWorkspacePackageJsonFields");
453
- var addPackageJsonExport = /* @__PURE__ */ __name((file, type = "module", sourceRoot) => {
454
- let entry = file.replaceAll("\\", "/");
455
- if (sourceRoot) {
456
- entry = entry.replace(sourceRoot, "");
457
- }
458
- return {
459
- import: {
460
- types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
461
- default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
462
- },
463
- require: {
464
- types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
465
- default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
466
- },
467
- default: {
468
- types: `./dist/${entry}.d.ts`,
469
- default: `./dist/${entry}.js`
470
- }
471
- };
472
- }, "addPackageJsonExport");
473
454
 
474
455
  // ../build-tools/src/utilities/get-entry-points.ts
475
456
  import { glob as glob2 } from "glob";
476
457
  var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
477
- const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : findWorkspaceRoot();
458
+ const workspaceRoot3 = config.workspaceRoot || findWorkspaceRoot();
478
459
  const entryPoints = [];
479
460
  if (entry) {
480
- if (Array.isArray(entry)) {
481
- entryPoints.push(...entry);
482
- } else if (typeof entry === "string") {
461
+ if (typeof entry === "string") {
483
462
  entryPoints.push(entry);
463
+ } else if (Array.isArray(entry)) {
464
+ entryPoints.push(...entry);
484
465
  } else {
485
466
  entryPoints.push(...Object.values(entry));
486
467
  }
@@ -488,27 +469,38 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
488
469
  if (emitOnAll) {
489
470
  entryPoints.push(joinPaths(workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
490
471
  }
491
- const results = [];
492
- for (const entryPoint in entryPoints) {
472
+ const results = await Promise.all(entryPoints.map(async (entryPoint) => {
473
+ const paths = [];
493
474
  if (entryPoint.includes("*")) {
494
475
  const files = await glob2(entryPoint, {
495
- withFileTypes: true
476
+ withFileTypes: true,
477
+ ignore: [
478
+ "**/node_modules/**"
479
+ ]
496
480
  });
497
- results.push(...files.reduce((ret, filePath) => {
481
+ paths.push(...files.reduce((ret, filePath) => {
498
482
  const result = correctPaths(joinPaths(filePath.path, filePath.name).replaceAll(correctPaths(workspaceRoot3), "").replaceAll(correctPaths(projectRoot), ""));
499
483
  if (result) {
500
484
  writeDebug(`Trying to add entry point ${result} at "${joinPaths(filePath.path, filePath.name)}"`, config);
501
- if (!results.includes(result)) {
502
- results.push(result);
485
+ if (!paths.includes(result)) {
486
+ paths.push(result);
503
487
  }
504
488
  }
505
489
  return ret;
506
490
  }, []));
507
491
  } else {
508
- results.push(entryPoint);
492
+ paths.push(entryPoint);
509
493
  }
510
- }
511
- return results;
494
+ return paths;
495
+ }));
496
+ return results.filter(Boolean).reduce((ret, result) => {
497
+ result.forEach((res) => {
498
+ if (res && !ret.includes(res)) {
499
+ ret.push(res);
500
+ }
501
+ });
502
+ return ret;
503
+ }, []);
512
504
  }, "getEntryPoints");
513
505
 
514
506
  // ../build-tools/src/utilities/get-env.ts
@@ -517,7 +509,7 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
517
509
  STORM_BUILD: builder,
518
510
  STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
519
511
  STORM_NAME: options.name,
520
- STORM_ENV: options.envName || DEFAULT_ENVIRONMENT,
512
+ STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
521
513
  STORM_PLATFORM: options.platform,
522
514
  STORM_FORMAT: JSON.stringify(options.format),
523
515
  STORM_TARGET: JSON.stringify(options.target),
@@ -525,28 +517,6 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
525
517
  };
526
518
  }, "getEnv");
527
519
 
528
- // ../build-tools/src/utilities/get-out-extension.ts
529
- function getOutExtension(format2, pkgType) {
530
- let jsExtension = ".js";
531
- let dtsExtension = ".d.ts";
532
- if (pkgType === "module" && format2 === "cjs") {
533
- jsExtension = ".cjs";
534
- dtsExtension = ".d.cts";
535
- }
536
- if (pkgType !== "module" && format2 === "esm") {
537
- jsExtension = ".mjs";
538
- dtsExtension = ".d.mts";
539
- }
540
- if (format2 === "iife") {
541
- jsExtension = ".global.js";
542
- }
543
- return {
544
- js: jsExtension,
545
- dts: dtsExtension
546
- };
547
- }
548
- __name(getOutExtension, "getOutExtension");
549
-
550
520
  // ../build-tools/src/utilities/read-nx-config.ts
551
521
  import { existsSync as existsSync2 } from "node:fs";
552
522
  import { readFile as readFile3 } from "node:fs/promises";
@@ -720,8 +690,8 @@ __name(cleanDirectories, "cleanDirectories");
720
690
  import * as esbuild from "esbuild";
721
691
  var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
722
692
  name: "storm:esm-split-code-to-cjs",
723
- setup(build5) {
724
- build5.onEnd(async (result) => {
693
+ setup(build4) {
694
+ build4.onEnd(async (result) => {
725
695
  const outFiles = Object.keys(result.metafile?.outputs ?? {});
726
696
  const jsFiles = outFiles.filter((f) => f.endsWith("js"));
727
697
  await esbuild.build({
@@ -739,15 +709,15 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
739
709
  // ../esbuild/src/plugins/fix-imports.ts
740
710
  var fixImportsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
741
711
  name: "storm:fix-imports",
742
- setup(build5) {
743
- build5.onResolve({
712
+ setup(build4) {
713
+ build4.onResolve({
744
714
  filter: /^spdx-exceptions/
745
715
  }, () => {
746
716
  return {
747
717
  path: __require.resolve("spdx-exceptions")
748
718
  };
749
719
  });
750
- build5.onResolve({
720
+ build4.onResolve({
751
721
  filter: /^spdx-license-ids/
752
722
  }, () => {
753
723
  return {
@@ -762,8 +732,8 @@ import { dirname } from "node:path";
762
732
  var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
763
733
  return {
764
734
  name: "native-node-modules",
765
- setup(build5) {
766
- build5.onResolve({
735
+ setup(build4) {
736
+ build4.onResolve({
767
737
  filter: /\.node$/,
768
738
  namespace: "file"
769
739
  }, (args) => {
@@ -782,7 +752,7 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
782
752
  path: resolvedId
783
753
  };
784
754
  });
785
- build5.onLoad({
755
+ build4.onLoad({
786
756
  filter: /.*/,
787
757
  namespace: "node-file"
788
758
  }, (args) => {
@@ -795,14 +765,14 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
795
765
  resolveDir: dirname(args.path)
796
766
  };
797
767
  });
798
- build5.onResolve({
768
+ build4.onResolve({
799
769
  filter: /\.node$/,
800
770
  namespace: "node-file"
801
771
  }, (args) => ({
802
772
  path: args.path,
803
773
  namespace: "file"
804
774
  }));
805
- const opts = build5.initialOptions;
775
+ const opts = build4.initialOptions;
806
776
  opts.loader = opts.loader || {};
807
777
  opts.loader[".node"] = "file";
808
778
  }
@@ -828,8 +798,8 @@ var nodeProtocolPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
828
798
  // ../esbuild/src/plugins/on-error.ts
829
799
  var onErrorPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
830
800
  name: "storm:on-error",
831
- setup(build5) {
832
- build5.onEnd((result) => {
801
+ setup(build4) {
802
+ build4.onEnd((result) => {
833
803
  if (result.errors.length > 0 && process.env.WATCH !== "true") {
834
804
  writeError(`The following errors occurred during the build:
835
805
  ${result.errors.map((error) => error.text).join("\n")}
@@ -865,14 +835,14 @@ function resolvePathsConfig(options, cwd) {
865
835
  __name(resolvePathsConfig, "resolvePathsConfig");
866
836
  var resolvePathsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
867
837
  name: "storm:resolve-paths",
868
- setup(build5) {
869
- const parentTsConfig = build5.initialOptions.tsconfig ? __require(joinPaths(resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : __require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
838
+ setup(build4) {
839
+ const parentTsConfig = build4.initialOptions.tsconfig ? __require(joinPaths(resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : __require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
870
840
  const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
871
841
  const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
872
- build5.onResolve({
842
+ build4.onResolve({
873
843
  filter: packagesRegex
874
844
  }, (args) => {
875
- if (build5.initialOptions.external?.includes(args.path)) {
845
+ if (build4.initialOptions.external?.includes(args.path)) {
876
846
  return {
877
847
  path: args.path,
878
848
  external: true
@@ -920,6 +890,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
920
890
  overrideTsconfig: {
921
891
  compilerOptions: {
922
892
  paths: {}
893
+ // bug with api extract + paths
923
894
  }
924
895
  }
925
896
  },
@@ -946,11 +917,11 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
946
917
  __name(bundleTypeDefinitions, "bundleTypeDefinitions");
947
918
  var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
948
919
  name: "storm:tsc",
949
- setup(build5) {
920
+ setup(build4) {
950
921
  if (options.emitTypes === false) {
951
922
  return;
952
923
  }
953
- build5.onStart(async () => {
924
+ build4.onStart(async () => {
954
925
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
955
926
  await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
956
927
  }
@@ -965,7 +936,7 @@ var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
965
936
  } else if (existsSync3(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
966
937
  dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
967
938
  }
968
- const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
939
+ const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
969
940
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
970
941
  bundleTypeDefinitions(dtsPath, bundlePath, resolvedOptions.external ?? [], resolvedOptions);
971
942
  const dtsContents = await fs3.readFile(`${bundlePath}.d.ts`, "utf8");
@@ -987,9 +958,6 @@ function getTypeDependencyPackageName(npmPackage) {
987
958
  __name(getTypeDependencyPackageName, "getTypeDependencyPackageName");
988
959
 
989
960
  // ../esbuild/src/config.ts
990
- var getOutputExtensionMap = /* @__PURE__ */ __name((options, pkgType) => {
991
- return options.outExtension ? options.outExtension(options.format, pkgType) : getOutExtension(options.format, pkgType);
992
- }, "getOutputExtensionMap");
993
961
  var getDefaultBuildPlugins = /* @__PURE__ */ __name((options, resolvedOptions) => [
994
962
  nodeProtocolPlugin(options, resolvedOptions),
995
963
  resolvePathsPlugin(options, resolvedOptions),
@@ -1006,7 +974,7 @@ var DEFAULT_BUILD_OPTIONS = {
1006
974
  external: [],
1007
975
  logLevel: "error",
1008
976
  tsconfig: "tsconfig.json",
1009
- envName: "production",
977
+ mode: "production",
1010
978
  keepNames: true,
1011
979
  metafile: true,
1012
980
  injectShims: true,
@@ -1015,6 +983,18 @@ var DEFAULT_BUILD_OPTIONS = {
1015
983
  bundle: true,
1016
984
  clean: true,
1017
985
  debug: false,
986
+ resolveExtensions: [
987
+ ".tsx",
988
+ ".ts",
989
+ ".cts",
990
+ ".mts",
991
+ ".jsx",
992
+ ".js",
993
+ ".cjs",
994
+ ".mjs",
995
+ ".css",
996
+ ".json"
997
+ ],
1018
998
  loader: {
1019
999
  ".aac": "file",
1020
1000
  ".css": "file",
@@ -1073,7 +1053,7 @@ var missingIgnore = [
1073
1053
  ];
1074
1054
  var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
1075
1055
  name: "storm:deps-check",
1076
- setup(build5) {
1056
+ setup(build4) {
1077
1057
  const pkgJsonPath = path5.join(process.cwd(), "package.json");
1078
1058
  const pkgContents = __require(pkgJsonPath);
1079
1059
  const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
@@ -1085,7 +1065,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
1085
1065
  ];
1086
1066
  const collectedDependencies = /* @__PURE__ */ new Set();
1087
1067
  const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
1088
- build5.onResolve({
1068
+ build4.onResolve({
1089
1069
  filter: onlyPackages
1090
1070
  }, (args) => {
1091
1071
  if (args.importer.includes(process.cwd())) {
@@ -1101,7 +1081,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
1101
1081
  external: true
1102
1082
  };
1103
1083
  });
1104
- build5.onEnd(() => {
1084
+ build4.onEnd(() => {
1105
1085
  const unusedDependencies = [
1106
1086
  ...dependencies
1107
1087
  ].filter((dep) => {
@@ -1237,9 +1217,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1237
1217
  if (!existsSync4(packageJsonPath)) {
1238
1218
  throw new Error("Cannot find package.json configuration");
1239
1219
  }
1240
- const packageJsonFile = await hf.readFile(packageJsonPath, "utf8");
1241
- const packageJson = JSON.parse(packageJsonFile);
1242
- const outExtension = getOutputExtensionMap(options, packageJson.type);
1243
1220
  const env = getEnv("esbuild", options);
1244
1221
  const result = {
1245
1222
  ...options,
@@ -1252,18 +1229,12 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1252
1229
  "module",
1253
1230
  "main"
1254
1231
  ],
1255
- resolveExtensions: [
1256
- ".ts",
1257
- ".js",
1258
- ".node"
1259
- ],
1260
1232
  ...userOptions,
1261
1233
  tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1262
1234
  format: options.format || "cjs",
1263
- entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
1264
- "./src/index.ts"
1265
- ], userOptions.emitOnAll),
1235
+ entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts", userOptions.emitOnAll === true),
1266
1236
  outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
1237
+ distDir: userOptions.distDir || "dist",
1267
1238
  plugins: [],
1268
1239
  name: userOptions.name || projectName,
1269
1240
  projectConfigurations,
@@ -1282,7 +1253,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1282
1253
  bundle: userOptions.bundle !== false,
1283
1254
  keepNames: true,
1284
1255
  watch: userOptions.watch === true,
1285
- outExtension,
1286
1256
  footer: userOptions.footer,
1287
1257
  banner: {
1288
1258
  js: options.banner || DEFAULT_COMPILED_BANNER,
@@ -1299,20 +1269,22 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1299
1269
  ...options.define,
1300
1270
  ...Object.keys(env || {}).reduce((res, key) => {
1301
1271
  const value = JSON.stringify(env[key]);
1272
+ const safeKey = key.replaceAll("(", "").replaceAll(")", "");
1302
1273
  return {
1303
1274
  ...res,
1304
- [`process.env.${key}`]: value,
1305
- [`import.meta.env.${key}`]: value
1275
+ [`process.env.${safeKey}`]: value,
1276
+ [`import.meta.env.${safeKey}`]: value
1306
1277
  };
1307
1278
  }, {})
1308
1279
  },
1309
- inject: [
1280
+ inject: defu([
1310
1281
  options.format === "cjs" && options.injectShims ? joinPaths(__dirname, "../assets/cjs_shims.js") : "",
1311
- options.format === "esm" && options.injectShims && options.platform === "node" ? joinPaths(__dirname, "../assets/esm_shims.js") : "",
1312
- ...options.inject ?? []
1313
- ].filter(Boolean)
1282
+ options.format === "esm" && options.injectShims && options.platform === "node" ? joinPaths(__dirname, "../assets/esm_shims.js") : ""
1283
+ ], options.inject ?? []).filter(Boolean)
1314
1284
  };
1315
1285
  result.plugins = userOptions.plugins ?? getDefaultBuildPlugins(userOptions, result);
1286
+ delete result.entry;
1287
+ delete result.outputPath;
1316
1288
  stopwatch();
1317
1289
  return result;
1318
1290
  }, "resolveOptions");
@@ -1333,7 +1305,7 @@ async function generatePackageJson(context2) {
1333
1305
  packageJson = await addWorkspacePackageJsonFields(context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
1334
1306
  packageJson.exports ??= {};
1335
1307
  packageJson.exports["./package.json"] ??= "./package.json";
1336
- packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, context2.options.sourceRoot);
1308
+ packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
1337
1309
  let entryPoints = [
1338
1310
  {
1339
1311
  in: "./src/index.ts",
@@ -1351,12 +1323,15 @@ async function generatePackageJson(context2) {
1351
1323
  const split = entryPoint.out.split(".");
1352
1324
  split.pop();
1353
1325
  const entry = split.join(".").replaceAll("\\", "/");
1354
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, context2.options.sourceRoot);
1326
+ packageJson.exports[`./${entry}`] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/${entry}.js`;
1355
1327
  }
1356
1328
  }
1357
- packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
1358
- packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
1359
- packageJson.types = "./dist/index.d.ts";
1329
+ if (context2.options.format === "esm") {
1330
+ packageJson.module = packageJson.type === "module" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.mjs`;
1331
+ } else {
1332
+ packageJson.main = packageJson.type === "commonjs" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.cjs`;
1333
+ }
1334
+ packageJson.types = `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.d.ts`;
1360
1335
  packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
1361
1336
  if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
1362
1337
  ret[key.replace("/index", "")] = packageJson.exports[key];
@@ -1391,11 +1366,38 @@ __name(generateContext, "generateContext");
1391
1366
  async function executeEsBuild(context2) {
1392
1367
  writeDebug(` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1393
1368
  const stopwatch = getStopwatch(`${context2.options.name} build`);
1394
- if (process.env.WATCH === "true") {
1369
+ if (process.env.STORM_WATCH) {
1395
1370
  const ctx = await esbuild2.context(context2.options);
1396
1371
  watch(ctx, context2.options);
1397
1372
  }
1398
- const result = await esbuild2.build(context2.options);
1373
+ const options = {
1374
+ ...context2.options
1375
+ };
1376
+ options.outdir = joinPaths(context2.options.outdir, context2.options.distDir);
1377
+ delete options.env;
1378
+ delete options.name;
1379
+ delete options.assets;
1380
+ delete options.mode;
1381
+ delete options.orgName;
1382
+ delete options.watch;
1383
+ delete options.clean;
1384
+ delete options.debug;
1385
+ delete options.generatePackageJson;
1386
+ delete options.emitOnAll;
1387
+ delete options.distDir;
1388
+ delete options.includeSrc;
1389
+ delete options.verbose;
1390
+ delete options.projectRoot;
1391
+ delete options.projectName;
1392
+ delete options.projectGraph;
1393
+ delete options.projectConfigurations;
1394
+ delete options.renderers;
1395
+ delete options.config;
1396
+ delete options.injectShims;
1397
+ writeTrace(`Run esbuild (${context2.options.name}) with the following options:
1398
+ ${formatLogMessage(options)}`, context2.options.config);
1399
+ const result = await esbuild2.build(options);
1400
+ await esbuild2.stop();
1399
1401
  if (result.metafile) {
1400
1402
  const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
1401
1403
  await hf.writeFile(metafilePath, JSON.stringify(result.metafile));
@@ -1477,7 +1479,7 @@ async function build3(options) {
1477
1479
  await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
1478
1480
  writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
1479
1481
  } catch (error) {
1480
- writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1482
+ writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
1481
1483
  throw error;
1482
1484
  } finally {
1483
1485
  stopwatch();
@@ -1548,7 +1550,7 @@ var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn
1548
1550
 
1549
1551
  // ../workspace-tools/src/executors/npm-publish/executor.ts
1550
1552
  import { execSync as execSync3 } from "node:child_process";
1551
- import fs4 from "node:fs/promises";
1553
+ import { readFile as readFile5 } from "node:fs/promises";
1552
1554
 
1553
1555
  // ../workspace-tools/src/utils/pnpm-deps-update.ts
1554
1556
  import { existsSync as existsSync5 } from "node:fs";
@@ -1593,281 +1595,6 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
1593
1595
  }
1594
1596
  });
1595
1597
 
1596
- // ../tsdown/src/build.ts
1597
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3, writeJsonFile as writeJsonFile2 } from "@nx/devkit";
1598
- import defu2 from "defu";
1599
- import { existsSync as existsSync6 } from "node:fs";
1600
- import hf2 from "node:fs/promises";
1601
- import { findWorkspaceRoot as findWorkspaceRoot3 } from "nx/src/utils/find-workspace-root";
1602
- import { build as tsdown } from "tsdown";
1603
-
1604
- // ../tsdown/src/clean.ts
1605
- import { rm as rm2 } from "node:fs/promises";
1606
- async function cleanDirectories2(name = "TSDown", directory, config) {
1607
- await rm2(directory, {
1608
- recursive: true,
1609
- force: true
1610
- });
1611
- }
1612
- __name(cleanDirectories2, "cleanDirectories");
1613
-
1614
- // ../tsdown/src/config.ts
1615
- var DEFAULT_BUILD_OPTIONS2 = {
1616
- platform: "node",
1617
- target: "node22",
1618
- format: [
1619
- "esm",
1620
- "cjs"
1621
- ],
1622
- tsconfig: "tsconfig.json",
1623
- envName: "production",
1624
- globalName: "globalThis",
1625
- unused: {
1626
- level: "error"
1627
- },
1628
- injectShims: true,
1629
- watch: false,
1630
- bundle: true,
1631
- treeshake: true,
1632
- clean: true,
1633
- debug: false
1634
- };
1635
-
1636
- // ../tsdown/src/build.ts
1637
- var resolveOptions2 = /* @__PURE__ */ __name(async (userOptions) => {
1638
- const projectRoot = userOptions.projectRoot;
1639
- const workspaceRoot3 = findWorkspaceRoot3(projectRoot);
1640
- if (!workspaceRoot3) {
1641
- throw new Error("Cannot find Nx workspace root");
1642
- }
1643
- const config = await getConfig(workspaceRoot3.dir);
1644
- writeDebug(" \u2699\uFE0F Resolving build options", config);
1645
- const stopwatch = getStopwatch("Build options resolution");
1646
- const projectGraph = await createProjectGraphAsync2({
1647
- exitOnError: true
1648
- });
1649
- const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
1650
- if (!existsSync6(projectJsonPath)) {
1651
- throw new Error("Cannot find project.json configuration");
1652
- }
1653
- const projectJsonFile = await hf2.readFile(projectJsonPath, "utf8");
1654
- const projectJson = JSON.parse(projectJsonFile);
1655
- const projectName = projectJson.name;
1656
- const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
1657
- if (!projectConfigurations?.projects?.[projectName]) {
1658
- 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.");
1659
- }
1660
- const options = defu2(userOptions, DEFAULT_BUILD_OPTIONS2);
1661
- options.name ??= `${projectName}-${options.format}`;
1662
- options.target ??= DEFAULT_TARGET;
1663
- const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
1664
- if (!existsSync6(packageJsonPath)) {
1665
- throw new Error("Cannot find package.json configuration");
1666
- }
1667
- const env = getEnv("tsdown", options);
1668
- const result = {
1669
- ...options,
1670
- config,
1671
- ...userOptions,
1672
- tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1673
- format: options.format || "cjs",
1674
- entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
1675
- "./src/index.ts"
1676
- ], userOptions.emitOnAll),
1677
- outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
1678
- plugins: [],
1679
- name: userOptions.name || projectName,
1680
- projectConfigurations,
1681
- projectName,
1682
- projectGraph,
1683
- sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || joinPaths(projectRoot, "src"),
1684
- minify: userOptions.minify || !userOptions.debug,
1685
- verbose: userOptions.verbose || isVerbose() || userOptions.debug === true,
1686
- includeSrc: userOptions.includeSrc === true,
1687
- metafile: userOptions.metafile !== false,
1688
- generatePackageJson: userOptions.generatePackageJson !== false,
1689
- clean: userOptions.clean !== false,
1690
- emitOnAll: userOptions.emitOnAll === true,
1691
- dts: userOptions.emitTypes === true ? {
1692
- transformer: "oxc"
1693
- } : userOptions.emitTypes,
1694
- bundleDts: userOptions.emitTypes,
1695
- assets: userOptions.assets ?? [],
1696
- shims: userOptions.injectShims !== true,
1697
- bundle: userOptions.bundle !== false,
1698
- watch: userOptions.watch === true,
1699
- define: {
1700
- STORM_FORMAT: JSON.stringify(options.format || "cjs"),
1701
- ...options.format === "cjs" && options.injectShims ? {
1702
- "import.meta.url": "importMetaUrl"
1703
- } : {},
1704
- ...Object.keys(env || {}).reduce((res, key) => {
1705
- const value = JSON.stringify(env[key]);
1706
- return {
1707
- ...res,
1708
- [`process.env.${key}`]: value,
1709
- [`import.meta.env.${key}`]: value
1710
- };
1711
- }, {}),
1712
- ...options.define
1713
- }
1714
- };
1715
- stopwatch();
1716
- return result;
1717
- }, "resolveOptions");
1718
- async function generatePackageJson2(options) {
1719
- if (options.generatePackageJson !== false && existsSync6(joinPaths(options.projectRoot, "package.json"))) {
1720
- writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
1721
- const stopwatch = getStopwatch("Write package.json file");
1722
- const packageJsonPath = joinPaths(options.projectRoot, "project.json");
1723
- if (!existsSync6(packageJsonPath)) {
1724
- throw new Error("Cannot find package.json configuration");
1725
- }
1726
- const packageJsonFile = await hf2.readFile(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
1727
- if (!packageJsonFile) {
1728
- throw new Error("Cannot find package.json configuration file");
1729
- }
1730
- let packageJson = JSON.parse(packageJsonFile);
1731
- packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
1732
- packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
1733
- packageJson.exports ??= {};
1734
- packageJson.exports["./package.json"] ??= "./package.json";
1735
- packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot);
1736
- let entryPoints = [
1737
- {
1738
- in: "./src/index.ts",
1739
- out: "./src/index.ts"
1740
- }
1741
- ];
1742
- if (options.entryPoints) {
1743
- if (Array.isArray(options.entryPoints)) {
1744
- entryPoints = options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
1745
- in: entryPoint,
1746
- out: entryPoint
1747
- } : entryPoint);
1748
- }
1749
- for (const entryPoint of entryPoints) {
1750
- const split = entryPoint.out.split(".");
1751
- split.pop();
1752
- const entry = split.join(".").replaceAll("\\", "/");
1753
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
1754
- }
1755
- }
1756
- packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
1757
- packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
1758
- packageJson.types = "./dist/index.d.ts";
1759
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
1760
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
1761
- ret[key.replace("/index", "")] = packageJson.exports[key];
1762
- }
1763
- return ret;
1764
- }, packageJson.exports);
1765
- await writeJsonFile2(joinPaths(options.outdir, "package.json"), packageJson);
1766
- stopwatch();
1767
- }
1768
- return options;
1769
- }
1770
- __name(generatePackageJson2, "generatePackageJson");
1771
- async function executeTSDown(options) {
1772
- writeDebug(` \u{1F680} Running ${options.name} build`, options.config);
1773
- const stopwatch = getStopwatch(`${options.name} build`);
1774
- await tsdown({
1775
- ...options,
1776
- entry: options.entryPoints,
1777
- outDir: options.outdir,
1778
- config: false
1779
- });
1780
- stopwatch();
1781
- return options;
1782
- }
1783
- __name(executeTSDown, "executeTSDown");
1784
- async function copyBuildAssets2(options) {
1785
- writeDebug(` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
1786
- const stopwatch = getStopwatch(`${options.name} asset copy`);
1787
- await copyAssets(options.config, options.assets ?? [], options.outdir, options.projectRoot, options.sourceRoot, true, false);
1788
- stopwatch();
1789
- return options;
1790
- }
1791
- __name(copyBuildAssets2, "copyBuildAssets");
1792
- async function reportResults2(options) {
1793
- writeSuccess(` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
1794
- }
1795
- __name(reportResults2, "reportResults");
1796
- async function cleanOutputPath2(options) {
1797
- if (options.clean !== false && options.outdir) {
1798
- writeDebug(` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
1799
- const stopwatch = getStopwatch(`${options.name} output clean`);
1800
- await cleanDirectories2(options.name, options.outdir, options.config);
1801
- stopwatch();
1802
- }
1803
- return options;
1804
- }
1805
- __name(cleanOutputPath2, "cleanOutputPath");
1806
- async function build4(options) {
1807
- writeDebug(` \u26A1 Executing Storm TSDown pipeline`);
1808
- const stopwatch = getStopwatch("TSDown pipeline");
1809
- try {
1810
- const opts = Array.isArray(options) ? options : [
1811
- options
1812
- ];
1813
- if (opts.length === 0) {
1814
- throw new Error("No build options were provided");
1815
- }
1816
- const resolved = await Promise.all(opts.map(async (opt) => await resolveOptions2(opt)));
1817
- if (resolved.length > 0) {
1818
- await cleanOutputPath2(resolved[0]);
1819
- await generatePackageJson2(resolved[0]);
1820
- await Promise.all(resolved.map(async (opt) => {
1821
- await executeTSDown(opt);
1822
- await copyBuildAssets2(opt);
1823
- await reportResults2(opt);
1824
- }));
1825
- } else {
1826
- writeWarning(" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
1827
- }
1828
- writeSuccess(" \u{1F3C1} TSDown pipeline build completed successfully");
1829
- } catch (error) {
1830
- writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1831
- throw error;
1832
- } finally {
1833
- stopwatch();
1834
- }
1835
- }
1836
- __name(build4, "build");
1837
-
1838
- // ../workspace-tools/src/executors/tsdown/executor.ts
1839
- async function tsdownExecutorFn(options, context2, config) {
1840
- writeInfo("\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
1841
- if (!context2.projectsConfigurations?.projects || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !context2.projectsConfigurations.projects[context2.projectName]?.root) {
1842
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1843
- }
1844
- await build4({
1845
- ...options,
1846
- projectRoot: context2.projectsConfigurations.projects?.[context2.projectName].root,
1847
- projectName: context2.projectName,
1848
- sourceRoot: context2.projectsConfigurations.projects?.[context2.projectName]?.sourceRoot,
1849
- format: options.format,
1850
- platform: options.platform
1851
- });
1852
- return {
1853
- success: true
1854
- };
1855
- }
1856
- __name(tsdownExecutorFn, "tsdownExecutorFn");
1857
- var executor_default8 = withRunExecutor("Storm TSDown build executor", tsdownExecutorFn, {
1858
- skipReadingConfig: false,
1859
- hooks: {
1860
- applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
1861
- options.entry ??= [
1862
- "src/index.ts"
1863
- ];
1864
- options.outputPath ??= "dist/{projectRoot}";
1865
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
1866
- return options;
1867
- }, "applyDefaultOptions")
1868
- }
1869
- });
1870
-
1871
1598
  // ../workspace-tools/src/executors/typia/executor.ts
1872
1599
  import { removeSync } from "fs-extra";
1873
1600
  import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
@@ -1889,7 +1616,7 @@ async function typiaExecutorFn(options, _, config) {
1889
1616
  };
1890
1617
  }
1891
1618
  __name(typiaExecutorFn, "typiaExecutorFn");
1892
- var executor_default9 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
1619
+ var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
1893
1620
  skipReadingConfig: false,
1894
1621
  hooks: {
1895
1622
  applyDefaultOptions: /* @__PURE__ */ __name((options) => {
@@ -1905,7 +1632,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
1905
1632
  });
1906
1633
 
1907
1634
  // ../workspace-tools/src/executors/unbuild/executor.ts
1908
- import { defu as defu3 } from "defu";
1635
+ import { defu as defu2 } from "defu";
1909
1636
  import { createJiti } from "jiti";
1910
1637
  async function unbuildExecutorFn(options, context2, config) {
1911
1638
  writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
@@ -1923,7 +1650,7 @@ async function unbuildExecutorFn(options, context2, config) {
1923
1650
  interopDefault: true
1924
1651
  });
1925
1652
  const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
1926
- await stormUnbuild.build(defu3({
1653
+ await stormUnbuild.build(defu2({
1927
1654
  ...options,
1928
1655
  projectRoot: context2.projectsConfigurations.projects[context2.projectName].root,
1929
1656
  projectName: context2.projectName,
@@ -1956,7 +1683,7 @@ async function unbuildExecutorFn(options, context2, config) {
1956
1683
  };
1957
1684
  }
1958
1685
  __name(unbuildExecutorFn, "unbuildExecutorFn");
1959
- var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
1686
+ var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
1960
1687
  skipReadingConfig: false,
1961
1688
  hooks: {
1962
1689
  applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
@@ -2639,9 +2366,6 @@ async function presetGeneratorFn(tree, options) {
2639
2366
  "storm",
2640
2367
  "storm-stack",
2641
2368
  "storm-ops",
2642
- "acidic",
2643
- "acidic-engine",
2644
- "cyclone-ui",
2645
2369
  "rust",
2646
2370
  "nx",
2647
2371
  "graphql",
@@ -2682,10 +2406,10 @@ async function presetGeneratorFn(tree, options) {
2682
2406
  type: "github",
2683
2407
  url: `${options.repositoryUrl}.git`
2684
2408
  };
2685
- json.packageManager ??= "pnpm@9.15.2";
2409
+ json.packageManager ??= "pnpm@10.3.0";
2686
2410
  json.engines ??= {
2687
2411
  node: ">=20.11.0",
2688
- pnpm: ">=9.15.2"
2412
+ pnpm: ">=10.3.0"
2689
2413
  };
2690
2414
  json.prettier = "@storm-software/prettier/config.json";
2691
2415
  json.nx ??= {
@@ -2838,6 +2562,199 @@ import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies
2838
2562
  import { updateLockFile } from "@nx/js/src/generators/release-version/utils/update-lock-file";
2839
2563
 
2840
2564
  // ../git-tools/src/types.ts
2565
+ var DEFAULT_COMMIT_TYPES = {
2566
+ /* --- Bumps version when selected --- */
2567
+ chore: {
2568
+ description: "Other changes that don't modify src or test files",
2569
+ title: "Chore",
2570
+ emoji: "\u2699\uFE0F ",
2571
+ semverBump: "patch",
2572
+ changelog: {
2573
+ title: "Miscellaneous",
2574
+ hidden: false
2575
+ }
2576
+ },
2577
+ fix: {
2578
+ description: "A change that resolves an issue previously identified with the package",
2579
+ title: "Bug Fix",
2580
+ emoji: "\u{1FAB2} ",
2581
+ semverBump: "patch",
2582
+ changelog: {
2583
+ title: "Bug Fixes",
2584
+ hidden: false
2585
+ }
2586
+ },
2587
+ feat: {
2588
+ description: "A change that adds a new feature to the package",
2589
+ title: "Feature",
2590
+ emoji: "\u{1F511} ",
2591
+ semverBump: "minor",
2592
+ changelog: {
2593
+ title: "Features",
2594
+ hidden: false
2595
+ }
2596
+ },
2597
+ ci: {
2598
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
2599
+ title: "Continuous Integration",
2600
+ emoji: "\u{1F9F0} ",
2601
+ semverBump: "patch",
2602
+ changelog: {
2603
+ title: "Continuous Integration",
2604
+ hidden: false
2605
+ }
2606
+ },
2607
+ refactor: {
2608
+ description: "A code change that neither fixes a bug nor adds a feature",
2609
+ title: "Code Refactoring",
2610
+ emoji: "\u{1F9EA} ",
2611
+ semverBump: "patch",
2612
+ changelog: {
2613
+ title: "Source Code Improvements",
2614
+ hidden: false
2615
+ }
2616
+ },
2617
+ style: {
2618
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
2619
+ title: "Style Improvements",
2620
+ emoji: "\u{1F48E} ",
2621
+ semverBump: "patch",
2622
+ changelog: {
2623
+ title: "Style Improvements",
2624
+ hidden: false
2625
+ }
2626
+ },
2627
+ perf: {
2628
+ description: "A code change that improves performance",
2629
+ title: "Performance Improvement",
2630
+ emoji: "\u23F1\uFE0F ",
2631
+ semverBump: "patch",
2632
+ changelog: {
2633
+ title: "Performance Improvements",
2634
+ hidden: false
2635
+ }
2636
+ },
2637
+ /* --- Does not bump version when selected --- */
2638
+ docs: {
2639
+ description: "A change that only includes documentation updates",
2640
+ title: "Documentation",
2641
+ emoji: "\u{1F4DC} ",
2642
+ semverBump: "none",
2643
+ changelog: {
2644
+ title: "Documentation",
2645
+ hidden: false
2646
+ }
2647
+ },
2648
+ test: {
2649
+ description: "Adding missing tests or correcting existing tests",
2650
+ title: "Testing",
2651
+ emoji: "\u{1F6A8} ",
2652
+ semverBump: "none",
2653
+ changelog: {
2654
+ title: "Testing",
2655
+ hidden: true
2656
+ }
2657
+ },
2658
+ /* --- Not included in commitlint but included in changelog --- */
2659
+ deps: {
2660
+ description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
2661
+ title: "Dependencies",
2662
+ emoji: "\u{1F4E6} ",
2663
+ hidden: true,
2664
+ semverBump: "patch",
2665
+ changelog: {
2666
+ title: "Dependency Upgrades",
2667
+ hidden: false
2668
+ }
2669
+ },
2670
+ /* --- Not included in commitlint or changelog --- */
2671
+ build: {
2672
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
2673
+ title: "Build",
2674
+ emoji: "\u{1F6E0} ",
2675
+ hidden: true,
2676
+ semverBump: "none",
2677
+ changelog: {
2678
+ title: "Build",
2679
+ hidden: true
2680
+ }
2681
+ },
2682
+ release: {
2683
+ description: "Publishing a commit containing a newly released version",
2684
+ title: "Publish Release",
2685
+ emoji: "\u{1F680} ",
2686
+ hidden: true,
2687
+ semverBump: "none",
2688
+ changelog: {
2689
+ title: "Publish Release",
2690
+ hidden: true
2691
+ }
2692
+ }
2693
+ };
2694
+ var DEFAULT_COMMIT_QUESTIONS = {
2695
+ type: {
2696
+ type: "select",
2697
+ title: "Commit Type",
2698
+ description: "Select the commit type that best describes your changes",
2699
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
2700
+ ret[type] = DEFAULT_COMMIT_TYPES[type];
2701
+ return ret;
2702
+ }, {}),
2703
+ defaultValue: "chore",
2704
+ maxLength: 20,
2705
+ minLength: 3
2706
+ },
2707
+ scope: {
2708
+ type: "select",
2709
+ title: "Commit Scope",
2710
+ description: "Select the monorepo project that is primarily impacted by this change",
2711
+ enum: {},
2712
+ defaultValue: "monorepo",
2713
+ maxLength: 50,
2714
+ minLength: 1
2715
+ },
2716
+ subject: {
2717
+ type: "input",
2718
+ title: "Commit Subject",
2719
+ description: "Write a short, imperative tense description of the change",
2720
+ maxLength: 150,
2721
+ minLength: 3
2722
+ },
2723
+ body: {
2724
+ type: "input",
2725
+ title: "Commit Body",
2726
+ description: "Provide a longer description of the change",
2727
+ maxLength: 600
2728
+ },
2729
+ isBreaking: {
2730
+ type: "confirm",
2731
+ title: "Breaking Changes",
2732
+ description: "Are there any breaking changes as a result of this commit?",
2733
+ defaultValue: false
2734
+ },
2735
+ breakingBody: {
2736
+ type: "input",
2737
+ title: "Breaking Changes (Details)",
2738
+ description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
2739
+ when: /* @__PURE__ */ __name((answers) => answers.isBreaking === true, "when"),
2740
+ maxLength: 600,
2741
+ minLength: 3
2742
+ },
2743
+ isIssueAffected: {
2744
+ type: "confirm",
2745
+ title: "Open Issue Affected",
2746
+ description: "Does this change impact any open issues?",
2747
+ defaultValue: false
2748
+ },
2749
+ issuesBody: {
2750
+ type: "input",
2751
+ title: "Open Issue Affected (Details)",
2752
+ description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
2753
+ when: /* @__PURE__ */ __name((answers) => answers.isIssueAffected === true, "when"),
2754
+ maxLength: 600,
2755
+ minLength: 3
2756
+ }
2757
+ };
2841
2758
  var RuleConfigSeverity;
2842
2759
  (function(RuleConfigSeverity2) {
2843
2760
  RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
@@ -2845,9 +2762,6 @@ var RuleConfigSeverity;
2845
2762
  RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
2846
2763
  })(RuleConfigSeverity || (RuleConfigSeverity = {}));
2847
2764
 
2848
- // ../git-tools/src/release/changelog-renderer.ts
2849
- import ChangelogRenderer from "nx/release/changelog-renderer/index";
2850
-
2851
2765
  // ../workspace-tools/src/generators/release-version/generator.ts
2852
2766
  import { exec, execSync as execSync4 } from "node:child_process";
2853
2767
  import { relative as relative3 } from "node:path";
@@ -3278,7 +3192,7 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
3278
3192
 
3279
3193
  // ../workspace-tools/src/utils/lock-file.ts
3280
3194
  import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
3281
- import { existsSync as existsSync7 } from "node:fs";
3195
+ import { existsSync as existsSync6 } from "node:fs";
3282
3196
  import { join as join2 } from "node:path";
3283
3197
  import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
3284
3198
  import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
@@ -3292,12 +3206,12 @@ var PNPM_LOCK_PATH = join2(workspaceRoot2, PNPM_LOCK_FILE);
3292
3206
 
3293
3207
  // ../workspace-tools/src/utils/package-helpers.ts
3294
3208
  import { joinPathFragments as joinPathFragments6, readJsonFile as readJsonFile2 } from "@nx/devkit";
3295
- import { existsSync as existsSync8 } from "node:fs";
3209
+ import { existsSync as existsSync7 } from "node:fs";
3296
3210
 
3297
3211
  // ../workspace-tools/src/utils/plugin-helpers.ts
3298
3212
  import { readJsonFile as readJsonFile3 } from "@nx/devkit";
3299
- import defu4 from "defu";
3300
- import { existsSync as existsSync9 } from "node:fs";
3213
+ import defu3 from "defu";
3214
+ import { existsSync as existsSync8 } from "node:fs";
3301
3215
  import { dirname as dirname2, join as join3 } from "node:path";
3302
3216
 
3303
3217
  // ../workspace-tools/src/utils/typia-transform.ts