@storm-software/cloudflare-tools 0.55.39 → 0.55.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +165 -75
  2. package/README.md +6 -6
  3. package/dist/{chunk-Y3XZCCPP.mjs → chunk-3HMZSKJD.mjs} +1 -1
  4. package/dist/{chunk-FSZS6NDT.js → chunk-3SY45SUU.js} +12 -12
  5. package/dist/{chunk-J22YL4DC.mjs → chunk-4QFFFPC5.mjs} +2 -2
  6. package/dist/{chunk-XYJVYVYX.js → chunk-5KLP7KFL.js} +484 -571
  7. package/dist/{chunk-HZON5W3G.js → chunk-FK6PN2T3.js} +42 -14
  8. package/dist/{chunk-ZBM3I5Z7.mjs → chunk-FQEGSK6L.mjs} +4 -4
  9. package/dist/{chunk-KLCTLDIH.js → chunk-H2ML72QF.js} +91 -47
  10. package/dist/{chunk-I6XBWBZN.js → chunk-HF5FM2V2.js} +3 -3
  11. package/dist/{chunk-HWRWRM5W.mjs → chunk-LEXIFHU6.mjs} +2 -2
  12. package/dist/{chunk-B6ZQTLTY.js → chunk-LZLR3HJU.js} +1 -1
  13. package/dist/{chunk-QD7ZKWKB.mjs → chunk-M4FHQYTZ.mjs} +43 -15
  14. package/dist/{chunk-MVGAJ7Q4.js → chunk-MCQ4YOON.js} +16 -16
  15. package/dist/{chunk-VAVNPHSE.mjs → chunk-MESLYSHV.mjs} +52 -8
  16. package/dist/{chunk-MBAVTLIK.mjs → chunk-RHCFLN3R.mjs} +323 -410
  17. package/dist/{chunk-5OCPVWBL.mjs → chunk-S3S7EN37.mjs} +5 -5
  18. package/dist/{chunk-PDHMNSTI.mjs → chunk-VNLZQQ5C.mjs} +2 -2
  19. package/dist/{chunk-KFNKJP2U.mjs → chunk-YYEF6TFG.mjs} +1 -1
  20. package/dist/executors.js +5 -5
  21. package/dist/executors.mjs +8 -8
  22. package/dist/generators.js +5 -5
  23. package/dist/generators.mjs +5 -5
  24. package/dist/index.js +8 -8
  25. package/dist/index.mjs +10 -10
  26. package/dist/src/executors/cloudflare-publish/executor.js +3 -3
  27. package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
  28. package/dist/src/executors/r2-upload-publish/executor.js +5 -5
  29. package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
  30. package/dist/src/executors/serve/executor.d.mts +67 -3
  31. package/dist/src/executors/serve/executor.d.ts +67 -3
  32. package/dist/src/executors/serve/executor.js +4 -4
  33. package/dist/src/executors/serve/executor.mjs +5 -5
  34. package/dist/src/generators/init/generator.js +2 -2
  35. package/dist/src/generators/init/generator.mjs +2 -2
  36. package/dist/src/generators/worker/generator.js +5 -5
  37. package/dist/src/generators/worker/generator.mjs +5 -5
  38. package/dist/src/utils/index.js +3 -3
  39. package/dist/src/utils/index.mjs +3 -3
  40. package/dist/src/utils/r2-bucket-helpers.js +3 -3
  41. package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
  42. package/dist/tsup.config.mjs +1 -1
  43. package/package.json +11 -11
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ProjectTagConstants,
3
3
  addProjectTag
4
- } from "./chunk-KFNKJP2U.mjs";
4
+ } from "./chunk-YYEF6TFG.mjs";
5
5
  import {
6
6
  getConfig
7
- } from "./chunk-VAVNPHSE.mjs";
7
+ } from "./chunk-MESLYSHV.mjs";
8
8
  import {
9
9
  StormConfigSchema,
10
10
  correctPaths,
@@ -20,12 +20,12 @@ import {
20
20
  writeSuccess,
21
21
  writeTrace,
22
22
  writeWarning
23
- } from "./chunk-QD7ZKWKB.mjs";
23
+ } from "./chunk-M4FHQYTZ.mjs";
24
24
  import {
25
25
  __dirname,
26
26
  __name,
27
27
  __require
28
- } from "./chunk-Y3XZCCPP.mjs";
28
+ } from "./chunk-3HMZSKJD.mjs";
29
29
 
30
30
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
31
31
  var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams) => {
@@ -424,11 +424,11 @@ var LARGE_BUFFER2 = 1024 * 1e6;
424
424
  import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2, writeJsonFile } from "@nx/devkit";
425
425
 
426
426
  // ../build-tools/src/config.ts
427
- var DEFAULT_COMPILED_BANNER = `
428
- /**
427
+ var DEFAULT_COMPILED_BANNER = `/*****************************************
428
+ *
429
429
  * \u26A1 Built by Storm Software
430
- */
431
-
430
+ *
431
+ *****************************************/
432
432
  `;
433
433
  var DEFAULT_ENVIRONMENT = "production";
434
434
  var DEFAULT_TARGET = "esnext";
@@ -451,7 +451,7 @@ import { relative as relative2 } from "path";
451
451
  import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
452
452
  import { glob } from "glob";
453
453
  import { readFile, writeFile } from "node:fs/promises";
454
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
454
+ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
455
455
  const pendingAssets = Array.from(assets ?? []);
456
456
  pendingAssets.push({
457
457
  input: projectRoot,
@@ -463,7 +463,7 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
463
463
  glob: "LICENSE",
464
464
  output: "."
465
465
  });
466
- if (generatePackageJson3 === false) {
466
+ if (generatePackageJson2 === false) {
467
467
  pendingAssets.push({
468
468
  input: projectRoot,
469
469
  glob: "package.json",
@@ -512,7 +512,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
512
512
  const projectGraph = readCachedProjectGraph();
513
513
  const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
514
514
  const localPackages = [];
515
- for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
515
+ for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot3)) {
516
516
  const projectNode = project.node;
517
517
  if (projectNode.data.root) {
518
518
  const projectPackageJsonPath = joinPaths(workspaceRoot3, projectNode.data.root, "package.json");
@@ -609,37 +609,17 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projec
609
609
  packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
610
610
  return packageJson;
611
611
  }, "addWorkspacePackageJsonFields");
612
- var addPackageJsonExport = /* @__PURE__ */ __name((file, type = "module", sourceRoot) => {
613
- let entry = file.replaceAll("\\", "/");
614
- if (sourceRoot) {
615
- entry = entry.replace(sourceRoot, "");
616
- }
617
- return {
618
- import: {
619
- types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
620
- default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
621
- },
622
- require: {
623
- types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
624
- default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
625
- },
626
- default: {
627
- types: `./dist/${entry}.d.ts`,
628
- default: `./dist/${entry}.js`
629
- }
630
- };
631
- }, "addPackageJsonExport");
632
612
 
633
613
  // ../build-tools/src/utilities/get-entry-points.ts
634
614
  import { glob as glob2 } from "glob";
635
615
  var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
636
- const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : findWorkspaceRoot();
616
+ const workspaceRoot3 = config.workspaceRoot || findWorkspaceRoot();
637
617
  const entryPoints = [];
638
618
  if (entry) {
639
- if (Array.isArray(entry)) {
640
- entryPoints.push(...entry);
641
- } else if (typeof entry === "string") {
619
+ if (typeof entry === "string") {
642
620
  entryPoints.push(entry);
621
+ } else if (Array.isArray(entry)) {
622
+ entryPoints.push(...entry);
643
623
  } else {
644
624
  entryPoints.push(...Object.values(entry));
645
625
  }
@@ -647,27 +627,38 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
647
627
  if (emitOnAll) {
648
628
  entryPoints.push(joinPaths(workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
649
629
  }
650
- const results = [];
651
- for (const entryPoint in entryPoints) {
630
+ const results = await Promise.all(entryPoints.map(async (entryPoint) => {
631
+ const paths = [];
652
632
  if (entryPoint.includes("*")) {
653
633
  const files = await glob2(entryPoint, {
654
- withFileTypes: true
634
+ withFileTypes: true,
635
+ ignore: [
636
+ "**/node_modules/**"
637
+ ]
655
638
  });
656
- results.push(...files.reduce((ret, filePath) => {
639
+ paths.push(...files.reduce((ret, filePath) => {
657
640
  const result = correctPaths(joinPaths(filePath.path, filePath.name).replaceAll(correctPaths(workspaceRoot3), "").replaceAll(correctPaths(projectRoot), ""));
658
641
  if (result) {
659
642
  writeDebug(`Trying to add entry point ${result} at "${joinPaths(filePath.path, filePath.name)}"`, config);
660
- if (!results.includes(result)) {
661
- results.push(result);
643
+ if (!paths.includes(result)) {
644
+ paths.push(result);
662
645
  }
663
646
  }
664
647
  return ret;
665
648
  }, []));
666
649
  } else {
667
- results.push(entryPoint);
650
+ paths.push(entryPoint);
668
651
  }
669
- }
670
- return results;
652
+ return paths;
653
+ }));
654
+ return results.filter(Boolean).reduce((ret, result) => {
655
+ result.forEach((res) => {
656
+ if (res && !ret.includes(res)) {
657
+ ret.push(res);
658
+ }
659
+ });
660
+ return ret;
661
+ }, []);
671
662
  }, "getEntryPoints");
672
663
 
673
664
  // ../build-tools/src/utilities/get-env.ts
@@ -676,7 +667,7 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
676
667
  STORM_BUILD: builder,
677
668
  STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
678
669
  STORM_NAME: options.name,
679
- STORM_ENV: options.envName || DEFAULT_ENVIRONMENT,
670
+ STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
680
671
  STORM_PLATFORM: options.platform,
681
672
  STORM_FORMAT: JSON.stringify(options.format),
682
673
  STORM_TARGET: JSON.stringify(options.target),
@@ -684,28 +675,6 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
684
675
  };
685
676
  }, "getEnv");
686
677
 
687
- // ../build-tools/src/utilities/get-out-extension.ts
688
- function getOutExtension(format2, pkgType) {
689
- let jsExtension = ".js";
690
- let dtsExtension = ".d.ts";
691
- if (pkgType === "module" && format2 === "cjs") {
692
- jsExtension = ".cjs";
693
- dtsExtension = ".d.cts";
694
- }
695
- if (pkgType !== "module" && format2 === "esm") {
696
- jsExtension = ".mjs";
697
- dtsExtension = ".d.mts";
698
- }
699
- if (format2 === "iife") {
700
- jsExtension = ".global.js";
701
- }
702
- return {
703
- js: jsExtension,
704
- dts: dtsExtension
705
- };
706
- }
707
- __name(getOutExtension, "getOutExtension");
708
-
709
678
  // ../build-tools/src/utilities/read-nx-config.ts
710
679
  import { existsSync as existsSync2 } from "node:fs";
711
680
  import { readFile as readFile3 } from "node:fs/promises";
@@ -879,8 +848,8 @@ __name(cleanDirectories, "cleanDirectories");
879
848
  import * as esbuild from "esbuild";
880
849
  var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
881
850
  name: "storm:esm-split-code-to-cjs",
882
- setup(build5) {
883
- build5.onEnd(async (result) => {
851
+ setup(build4) {
852
+ build4.onEnd(async (result) => {
884
853
  const outFiles = Object.keys(result.metafile?.outputs ?? {});
885
854
  const jsFiles = outFiles.filter((f) => f.endsWith("js"));
886
855
  await esbuild.build({
@@ -898,15 +867,15 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
898
867
  // ../esbuild/src/plugins/fix-imports.ts
899
868
  var fixImportsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
900
869
  name: "storm:fix-imports",
901
- setup(build5) {
902
- build5.onResolve({
870
+ setup(build4) {
871
+ build4.onResolve({
903
872
  filter: /^spdx-exceptions/
904
873
  }, () => {
905
874
  return {
906
875
  path: __require.resolve("spdx-exceptions")
907
876
  };
908
877
  });
909
- build5.onResolve({
878
+ build4.onResolve({
910
879
  filter: /^spdx-license-ids/
911
880
  }, () => {
912
881
  return {
@@ -921,8 +890,8 @@ import { dirname } from "node:path";
921
890
  var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
922
891
  return {
923
892
  name: "native-node-modules",
924
- setup(build5) {
925
- build5.onResolve({
893
+ setup(build4) {
894
+ build4.onResolve({
926
895
  filter: /\.node$/,
927
896
  namespace: "file"
928
897
  }, (args) => {
@@ -941,7 +910,7 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
941
910
  path: resolvedId
942
911
  };
943
912
  });
944
- build5.onLoad({
913
+ build4.onLoad({
945
914
  filter: /.*/,
946
915
  namespace: "node-file"
947
916
  }, (args) => {
@@ -954,14 +923,14 @@ var nativeNodeModulesPlugin = /* @__PURE__ */ __name((options, resolvedOptions)
954
923
  resolveDir: dirname(args.path)
955
924
  };
956
925
  });
957
- build5.onResolve({
926
+ build4.onResolve({
958
927
  filter: /\.node$/,
959
928
  namespace: "node-file"
960
929
  }, (args) => ({
961
930
  path: args.path,
962
931
  namespace: "file"
963
932
  }));
964
- const opts = build5.initialOptions;
933
+ const opts = build4.initialOptions;
965
934
  opts.loader = opts.loader || {};
966
935
  opts.loader[".node"] = "file";
967
936
  }
@@ -987,8 +956,8 @@ var nodeProtocolPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
987
956
  // ../esbuild/src/plugins/on-error.ts
988
957
  var onErrorPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
989
958
  name: "storm:on-error",
990
- setup(build5) {
991
- build5.onEnd((result) => {
959
+ setup(build4) {
960
+ build4.onEnd((result) => {
992
961
  if (result.errors.length > 0 && process.env.WATCH !== "true") {
993
962
  writeError(`The following errors occurred during the build:
994
963
  ${result.errors.map((error) => error.text).join("\n")}
@@ -1024,14 +993,14 @@ function resolvePathsConfig(options, cwd) {
1024
993
  __name(resolvePathsConfig, "resolvePathsConfig");
1025
994
  var resolvePathsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
1026
995
  name: "storm:resolve-paths",
1027
- setup(build5) {
1028
- const parentTsConfig = build5.initialOptions.tsconfig ? __require(joinPaths(resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : __require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
996
+ setup(build4) {
997
+ const parentTsConfig = build4.initialOptions.tsconfig ? __require(joinPaths(resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : __require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
1029
998
  const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
1030
999
  const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
1031
- build5.onResolve({
1000
+ build4.onResolve({
1032
1001
  filter: packagesRegex
1033
1002
  }, (args) => {
1034
- if (build5.initialOptions.external?.includes(args.path)) {
1003
+ if (build4.initialOptions.external?.includes(args.path)) {
1035
1004
  return {
1036
1005
  path: args.path,
1037
1006
  external: true
@@ -1079,6 +1048,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
1079
1048
  overrideTsconfig: {
1080
1049
  compilerOptions: {
1081
1050
  paths: {}
1051
+ // bug with api extract + paths
1082
1052
  }
1083
1053
  }
1084
1054
  },
@@ -1105,11 +1075,11 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
1105
1075
  __name(bundleTypeDefinitions, "bundleTypeDefinitions");
1106
1076
  var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
1107
1077
  name: "storm:tsc",
1108
- setup(build5) {
1078
+ setup(build4) {
1109
1079
  if (options.emitTypes === false) {
1110
1080
  return;
1111
1081
  }
1112
- build5.onStart(async () => {
1082
+ build4.onStart(async () => {
1113
1083
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
1114
1084
  await run(resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
1115
1085
  }
@@ -1124,7 +1094,7 @@ var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
1124
1094
  } else if (existsSync3(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
1125
1095
  dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
1126
1096
  }
1127
- const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
1097
+ const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
1128
1098
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
1129
1099
  bundleTypeDefinitions(dtsPath, bundlePath, resolvedOptions.external ?? [], resolvedOptions);
1130
1100
  const dtsContents = await fs3.readFile(`${bundlePath}.d.ts`, "utf8");
@@ -1146,9 +1116,6 @@ function getTypeDependencyPackageName(npmPackage) {
1146
1116
  __name(getTypeDependencyPackageName, "getTypeDependencyPackageName");
1147
1117
 
1148
1118
  // ../esbuild/src/config.ts
1149
- var getOutputExtensionMap = /* @__PURE__ */ __name((options, pkgType) => {
1150
- return options.outExtension ? options.outExtension(options.format, pkgType) : getOutExtension(options.format, pkgType);
1151
- }, "getOutputExtensionMap");
1152
1119
  var getDefaultBuildPlugins = /* @__PURE__ */ __name((options, resolvedOptions) => [
1153
1120
  nodeProtocolPlugin(options, resolvedOptions),
1154
1121
  resolvePathsPlugin(options, resolvedOptions),
@@ -1165,7 +1132,7 @@ var DEFAULT_BUILD_OPTIONS = {
1165
1132
  external: [],
1166
1133
  logLevel: "error",
1167
1134
  tsconfig: "tsconfig.json",
1168
- envName: "production",
1135
+ mode: "production",
1169
1136
  keepNames: true,
1170
1137
  metafile: true,
1171
1138
  injectShims: true,
@@ -1174,6 +1141,18 @@ var DEFAULT_BUILD_OPTIONS = {
1174
1141
  bundle: true,
1175
1142
  clean: true,
1176
1143
  debug: false,
1144
+ resolveExtensions: [
1145
+ ".tsx",
1146
+ ".ts",
1147
+ ".cts",
1148
+ ".mts",
1149
+ ".jsx",
1150
+ ".js",
1151
+ ".cjs",
1152
+ ".mjs",
1153
+ ".css",
1154
+ ".json"
1155
+ ],
1177
1156
  loader: {
1178
1157
  ".aac": "file",
1179
1158
  ".css": "file",
@@ -1232,7 +1211,7 @@ var missingIgnore = [
1232
1211
  ];
1233
1212
  var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
1234
1213
  name: "storm:deps-check",
1235
- setup(build5) {
1214
+ setup(build4) {
1236
1215
  const pkgJsonPath = path5.join(process.cwd(), "package.json");
1237
1216
  const pkgContents = __require(pkgJsonPath);
1238
1217
  const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
@@ -1244,7 +1223,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
1244
1223
  ];
1245
1224
  const collectedDependencies = /* @__PURE__ */ new Set();
1246
1225
  const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
1247
- build5.onResolve({
1226
+ build4.onResolve({
1248
1227
  filter: onlyPackages
1249
1228
  }, (args) => {
1250
1229
  if (args.importer.includes(process.cwd())) {
@@ -1260,7 +1239,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
1260
1239
  external: true
1261
1240
  };
1262
1241
  });
1263
- build5.onEnd(() => {
1242
+ build4.onEnd(() => {
1264
1243
  const unusedDependencies = [
1265
1244
  ...dependencies
1266
1245
  ].filter((dep) => {
@@ -1396,9 +1375,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1396
1375
  if (!existsSync4(packageJsonPath)) {
1397
1376
  throw new Error("Cannot find package.json configuration");
1398
1377
  }
1399
- const packageJsonFile = await hf.readFile(packageJsonPath, "utf8");
1400
- const packageJson = JSON.parse(packageJsonFile);
1401
- const outExtension = getOutputExtensionMap(options, packageJson.type);
1402
1378
  const env = getEnv("esbuild", options);
1403
1379
  const result = {
1404
1380
  ...options,
@@ -1411,18 +1387,12 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1411
1387
  "module",
1412
1388
  "main"
1413
1389
  ],
1414
- resolveExtensions: [
1415
- ".ts",
1416
- ".js",
1417
- ".node"
1418
- ],
1419
1390
  ...userOptions,
1420
1391
  tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1421
1392
  format: options.format || "cjs",
1422
- entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
1423
- "./src/index.ts"
1424
- ], userOptions.emitOnAll),
1393
+ entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts", userOptions.emitOnAll === true),
1425
1394
  outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
1395
+ distDir: userOptions.distDir || "dist",
1426
1396
  plugins: [],
1427
1397
  name: userOptions.name || projectName,
1428
1398
  projectConfigurations,
@@ -1441,7 +1411,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1441
1411
  bundle: userOptions.bundle !== false,
1442
1412
  keepNames: true,
1443
1413
  watch: userOptions.watch === true,
1444
- outExtension,
1445
1414
  footer: userOptions.footer,
1446
1415
  banner: {
1447
1416
  js: options.banner || DEFAULT_COMPILED_BANNER,
@@ -1458,20 +1427,22 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1458
1427
  ...options.define,
1459
1428
  ...Object.keys(env || {}).reduce((res, key) => {
1460
1429
  const value = JSON.stringify(env[key]);
1430
+ const safeKey = key.replaceAll("(", "").replaceAll(")", "");
1461
1431
  return {
1462
1432
  ...res,
1463
- [`process.env.${key}`]: value,
1464
- [`import.meta.env.${key}`]: value
1433
+ [`process.env.${safeKey}`]: value,
1434
+ [`import.meta.env.${safeKey}`]: value
1465
1435
  };
1466
1436
  }, {})
1467
1437
  },
1468
- inject: [
1438
+ inject: defu2([
1469
1439
  options.format === "cjs" && options.injectShims ? joinPaths(__dirname, "../assets/cjs_shims.js") : "",
1470
- options.format === "esm" && options.injectShims && options.platform === "node" ? joinPaths(__dirname, "../assets/esm_shims.js") : "",
1471
- ...options.inject ?? []
1472
- ].filter(Boolean)
1440
+ options.format === "esm" && options.injectShims && options.platform === "node" ? joinPaths(__dirname, "../assets/esm_shims.js") : ""
1441
+ ], options.inject ?? []).filter(Boolean)
1473
1442
  };
1474
1443
  result.plugins = userOptions.plugins ?? getDefaultBuildPlugins(userOptions, result);
1444
+ delete result.entry;
1445
+ delete result.outputPath;
1475
1446
  stopwatch();
1476
1447
  return result;
1477
1448
  }, "resolveOptions");
@@ -1492,7 +1463,7 @@ async function generatePackageJson(context2) {
1492
1463
  packageJson = await addWorkspacePackageJsonFields(context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
1493
1464
  packageJson.exports ??= {};
1494
1465
  packageJson.exports["./package.json"] ??= "./package.json";
1495
- packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, context2.options.sourceRoot);
1466
+ packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
1496
1467
  let entryPoints = [
1497
1468
  {
1498
1469
  in: "./src/index.ts",
@@ -1510,12 +1481,15 @@ async function generatePackageJson(context2) {
1510
1481
  const split = entryPoint.out.split(".");
1511
1482
  split.pop();
1512
1483
  const entry = split.join(".").replaceAll("\\", "/");
1513
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, context2.options.sourceRoot);
1484
+ packageJson.exports[`./${entry}`] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/${entry}.js`;
1514
1485
  }
1515
1486
  }
1516
- packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
1517
- packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
1518
- packageJson.types = "./dist/index.d.ts";
1487
+ if (context2.options.format === "esm") {
1488
+ packageJson.module = packageJson.type === "module" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.mjs`;
1489
+ } else {
1490
+ packageJson.main = packageJson.type === "commonjs" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.cjs`;
1491
+ }
1492
+ packageJson.types = `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.d.ts`;
1519
1493
  packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
1520
1494
  if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
1521
1495
  ret[key.replace("/index", "")] = packageJson.exports[key];
@@ -1550,11 +1524,38 @@ __name(generateContext, "generateContext");
1550
1524
  async function executeEsBuild(context2) {
1551
1525
  writeDebug(` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1552
1526
  const stopwatch = getStopwatch(`${context2.options.name} build`);
1553
- if (process.env.WATCH === "true") {
1527
+ if (process.env.STORM_WATCH) {
1554
1528
  const ctx = await esbuild2.context(context2.options);
1555
1529
  watch(ctx, context2.options);
1556
1530
  }
1557
- const result = await esbuild2.build(context2.options);
1531
+ const options = {
1532
+ ...context2.options
1533
+ };
1534
+ options.outdir = joinPaths(context2.options.outdir, context2.options.distDir);
1535
+ delete options.env;
1536
+ delete options.name;
1537
+ delete options.assets;
1538
+ delete options.mode;
1539
+ delete options.orgName;
1540
+ delete options.watch;
1541
+ delete options.clean;
1542
+ delete options.debug;
1543
+ delete options.generatePackageJson;
1544
+ delete options.emitOnAll;
1545
+ delete options.distDir;
1546
+ delete options.includeSrc;
1547
+ delete options.verbose;
1548
+ delete options.projectRoot;
1549
+ delete options.projectName;
1550
+ delete options.projectGraph;
1551
+ delete options.projectConfigurations;
1552
+ delete options.renderers;
1553
+ delete options.config;
1554
+ delete options.injectShims;
1555
+ writeTrace(`Run esbuild (${context2.options.name}) with the following options:
1556
+ ${formatLogMessage(options)}`, context2.options.config);
1557
+ const result = await esbuild2.build(options);
1558
+ await esbuild2.stop();
1558
1559
  if (result.metafile) {
1559
1560
  const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
1560
1561
  await hf.writeFile(metafilePath, JSON.stringify(result.metafile));
@@ -1636,7 +1637,7 @@ async function build3(options) {
1636
1637
  await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
1637
1638
  writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
1638
1639
  } catch (error) {
1639
- writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1640
+ writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
1640
1641
  throw error;
1641
1642
  } finally {
1642
1643
  stopwatch();
@@ -1707,7 +1708,7 @@ var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn
1707
1708
 
1708
1709
  // ../workspace-tools/src/executors/npm-publish/executor.ts
1709
1710
  import { execSync as execSync4 } from "node:child_process";
1710
- import fs4 from "node:fs/promises";
1711
+ import { readFile as readFile5 } from "node:fs/promises";
1711
1712
 
1712
1713
  // ../workspace-tools/src/utils/pnpm-deps-update.ts
1713
1714
  import { existsSync as existsSync5 } from "node:fs";
@@ -1752,281 +1753,6 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
1752
1753
  }
1753
1754
  });
1754
1755
 
1755
- // ../tsdown/src/build.ts
1756
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3, writeJsonFile as writeJsonFile2 } from "@nx/devkit";
1757
- import defu3 from "defu";
1758
- import { existsSync as existsSync6 } from "node:fs";
1759
- import hf2 from "node:fs/promises";
1760
- import { findWorkspaceRoot as findWorkspaceRoot3 } from "nx/src/utils/find-workspace-root";
1761
- import { build as tsdown } from "tsdown";
1762
-
1763
- // ../tsdown/src/clean.ts
1764
- import { rm as rm2 } from "node:fs/promises";
1765
- async function cleanDirectories2(name = "TSDown", directory, config) {
1766
- await rm2(directory, {
1767
- recursive: true,
1768
- force: true
1769
- });
1770
- }
1771
- __name(cleanDirectories2, "cleanDirectories");
1772
-
1773
- // ../tsdown/src/config.ts
1774
- var DEFAULT_BUILD_OPTIONS2 = {
1775
- platform: "node",
1776
- target: "node22",
1777
- format: [
1778
- "esm",
1779
- "cjs"
1780
- ],
1781
- tsconfig: "tsconfig.json",
1782
- envName: "production",
1783
- globalName: "globalThis",
1784
- unused: {
1785
- level: "error"
1786
- },
1787
- injectShims: true,
1788
- watch: false,
1789
- bundle: true,
1790
- treeshake: true,
1791
- clean: true,
1792
- debug: false
1793
- };
1794
-
1795
- // ../tsdown/src/build.ts
1796
- var resolveOptions2 = /* @__PURE__ */ __name(async (userOptions) => {
1797
- const projectRoot = userOptions.projectRoot;
1798
- const workspaceRoot3 = findWorkspaceRoot3(projectRoot);
1799
- if (!workspaceRoot3) {
1800
- throw new Error("Cannot find Nx workspace root");
1801
- }
1802
- const config = await getConfig(workspaceRoot3.dir);
1803
- writeDebug(" \u2699\uFE0F Resolving build options", config);
1804
- const stopwatch = getStopwatch("Build options resolution");
1805
- const projectGraph = await createProjectGraphAsync2({
1806
- exitOnError: true
1807
- });
1808
- const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
1809
- if (!existsSync6(projectJsonPath)) {
1810
- throw new Error("Cannot find project.json configuration");
1811
- }
1812
- const projectJsonFile = await hf2.readFile(projectJsonPath, "utf8");
1813
- const projectJson = JSON.parse(projectJsonFile);
1814
- const projectName = projectJson.name;
1815
- const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
1816
- if (!projectConfigurations?.projects?.[projectName]) {
1817
- 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.");
1818
- }
1819
- const options = defu3(userOptions, DEFAULT_BUILD_OPTIONS2);
1820
- options.name ??= `${projectName}-${options.format}`;
1821
- options.target ??= DEFAULT_TARGET;
1822
- const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
1823
- if (!existsSync6(packageJsonPath)) {
1824
- throw new Error("Cannot find package.json configuration");
1825
- }
1826
- const env = getEnv("tsdown", options);
1827
- const result = {
1828
- ...options,
1829
- config,
1830
- ...userOptions,
1831
- tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1832
- format: options.format || "cjs",
1833
- entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
1834
- "./src/index.ts"
1835
- ], userOptions.emitOnAll),
1836
- outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
1837
- plugins: [],
1838
- name: userOptions.name || projectName,
1839
- projectConfigurations,
1840
- projectName,
1841
- projectGraph,
1842
- sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || joinPaths(projectRoot, "src"),
1843
- minify: userOptions.minify || !userOptions.debug,
1844
- verbose: userOptions.verbose || isVerbose() || userOptions.debug === true,
1845
- includeSrc: userOptions.includeSrc === true,
1846
- metafile: userOptions.metafile !== false,
1847
- generatePackageJson: userOptions.generatePackageJson !== false,
1848
- clean: userOptions.clean !== false,
1849
- emitOnAll: userOptions.emitOnAll === true,
1850
- dts: userOptions.emitTypes === true ? {
1851
- transformer: "oxc"
1852
- } : userOptions.emitTypes,
1853
- bundleDts: userOptions.emitTypes,
1854
- assets: userOptions.assets ?? [],
1855
- shims: userOptions.injectShims !== true,
1856
- bundle: userOptions.bundle !== false,
1857
- watch: userOptions.watch === true,
1858
- define: {
1859
- STORM_FORMAT: JSON.stringify(options.format || "cjs"),
1860
- ...options.format === "cjs" && options.injectShims ? {
1861
- "import.meta.url": "importMetaUrl"
1862
- } : {},
1863
- ...Object.keys(env || {}).reduce((res, key) => {
1864
- const value = JSON.stringify(env[key]);
1865
- return {
1866
- ...res,
1867
- [`process.env.${key}`]: value,
1868
- [`import.meta.env.${key}`]: value
1869
- };
1870
- }, {}),
1871
- ...options.define
1872
- }
1873
- };
1874
- stopwatch();
1875
- return result;
1876
- }, "resolveOptions");
1877
- async function generatePackageJson2(options) {
1878
- if (options.generatePackageJson !== false && existsSync6(joinPaths(options.projectRoot, "package.json"))) {
1879
- writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
1880
- const stopwatch = getStopwatch("Write package.json file");
1881
- const packageJsonPath = joinPaths(options.projectRoot, "project.json");
1882
- if (!existsSync6(packageJsonPath)) {
1883
- throw new Error("Cannot find package.json configuration");
1884
- }
1885
- const packageJsonFile = await hf2.readFile(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
1886
- if (!packageJsonFile) {
1887
- throw new Error("Cannot find package.json configuration file");
1888
- }
1889
- let packageJson = JSON.parse(packageJsonFile);
1890
- packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
1891
- packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
1892
- packageJson.exports ??= {};
1893
- packageJson.exports["./package.json"] ??= "./package.json";
1894
- packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot);
1895
- let entryPoints = [
1896
- {
1897
- in: "./src/index.ts",
1898
- out: "./src/index.ts"
1899
- }
1900
- ];
1901
- if (options.entryPoints) {
1902
- if (Array.isArray(options.entryPoints)) {
1903
- entryPoints = options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
1904
- in: entryPoint,
1905
- out: entryPoint
1906
- } : entryPoint);
1907
- }
1908
- for (const entryPoint of entryPoints) {
1909
- const split = entryPoint.out.split(".");
1910
- split.pop();
1911
- const entry = split.join(".").replaceAll("\\", "/");
1912
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, options.sourceRoot);
1913
- }
1914
- }
1915
- packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
1916
- packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
1917
- packageJson.types = "./dist/index.d.ts";
1918
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
1919
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
1920
- ret[key.replace("/index", "")] = packageJson.exports[key];
1921
- }
1922
- return ret;
1923
- }, packageJson.exports);
1924
- await writeJsonFile2(joinPaths(options.outdir, "package.json"), packageJson);
1925
- stopwatch();
1926
- }
1927
- return options;
1928
- }
1929
- __name(generatePackageJson2, "generatePackageJson");
1930
- async function executeTSDown(options) {
1931
- writeDebug(` \u{1F680} Running ${options.name} build`, options.config);
1932
- const stopwatch = getStopwatch(`${options.name} build`);
1933
- await tsdown({
1934
- ...options,
1935
- entry: options.entryPoints,
1936
- outDir: options.outdir,
1937
- config: false
1938
- });
1939
- stopwatch();
1940
- return options;
1941
- }
1942
- __name(executeTSDown, "executeTSDown");
1943
- async function copyBuildAssets2(options) {
1944
- writeDebug(` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
1945
- const stopwatch = getStopwatch(`${options.name} asset copy`);
1946
- await copyAssets(options.config, options.assets ?? [], options.outdir, options.projectRoot, options.sourceRoot, true, false);
1947
- stopwatch();
1948
- return options;
1949
- }
1950
- __name(copyBuildAssets2, "copyBuildAssets");
1951
- async function reportResults2(options) {
1952
- writeSuccess(` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
1953
- }
1954
- __name(reportResults2, "reportResults");
1955
- async function cleanOutputPath2(options) {
1956
- if (options.clean !== false && options.outdir) {
1957
- writeDebug(` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
1958
- const stopwatch = getStopwatch(`${options.name} output clean`);
1959
- await cleanDirectories2(options.name, options.outdir, options.config);
1960
- stopwatch();
1961
- }
1962
- return options;
1963
- }
1964
- __name(cleanOutputPath2, "cleanOutputPath");
1965
- async function build4(options) {
1966
- writeDebug(` \u26A1 Executing Storm TSDown pipeline`);
1967
- const stopwatch = getStopwatch("TSDown pipeline");
1968
- try {
1969
- const opts = Array.isArray(options) ? options : [
1970
- options
1971
- ];
1972
- if (opts.length === 0) {
1973
- throw new Error("No build options were provided");
1974
- }
1975
- const resolved = await Promise.all(opts.map(async (opt) => await resolveOptions2(opt)));
1976
- if (resolved.length > 0) {
1977
- await cleanOutputPath2(resolved[0]);
1978
- await generatePackageJson2(resolved[0]);
1979
- await Promise.all(resolved.map(async (opt) => {
1980
- await executeTSDown(opt);
1981
- await copyBuildAssets2(opt);
1982
- await reportResults2(opt);
1983
- }));
1984
- } else {
1985
- writeWarning(" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
1986
- }
1987
- writeSuccess(" \u{1F3C1} TSDown pipeline build completed successfully");
1988
- } catch (error) {
1989
- writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1990
- throw error;
1991
- } finally {
1992
- stopwatch();
1993
- }
1994
- }
1995
- __name(build4, "build");
1996
-
1997
- // ../workspace-tools/src/executors/tsdown/executor.ts
1998
- async function tsdownExecutorFn(options, context2, config) {
1999
- writeInfo("\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
2000
- if (!context2.projectsConfigurations?.projects || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !context2.projectsConfigurations.projects[context2.projectName]?.root) {
2001
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2002
- }
2003
- await build4({
2004
- ...options,
2005
- projectRoot: context2.projectsConfigurations.projects?.[context2.projectName].root,
2006
- projectName: context2.projectName,
2007
- sourceRoot: context2.projectsConfigurations.projects?.[context2.projectName]?.sourceRoot,
2008
- format: options.format,
2009
- platform: options.platform
2010
- });
2011
- return {
2012
- success: true
2013
- };
2014
- }
2015
- __name(tsdownExecutorFn, "tsdownExecutorFn");
2016
- var executor_default8 = withRunExecutor("Storm TSDown build executor", tsdownExecutorFn, {
2017
- skipReadingConfig: false,
2018
- hooks: {
2019
- applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
2020
- options.entry ??= [
2021
- "src/index.ts"
2022
- ];
2023
- options.outputPath ??= "dist/{projectRoot}";
2024
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
2025
- return options;
2026
- }, "applyDefaultOptions")
2027
- }
2028
- });
2029
-
2030
1756
  // ../workspace-tools/src/executors/typia/executor.ts
2031
1757
  import { removeSync } from "fs-extra";
2032
1758
  import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
@@ -2048,7 +1774,7 @@ async function typiaExecutorFn(options, _, config) {
2048
1774
  };
2049
1775
  }
2050
1776
  __name(typiaExecutorFn, "typiaExecutorFn");
2051
- var executor_default9 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
1777
+ var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
2052
1778
  skipReadingConfig: false,
2053
1779
  hooks: {
2054
1780
  applyDefaultOptions: /* @__PURE__ */ __name((options) => {
@@ -2064,7 +1790,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
2064
1790
  });
2065
1791
 
2066
1792
  // ../workspace-tools/src/executors/unbuild/executor.ts
2067
- import { defu as defu4 } from "defu";
1793
+ import { defu as defu3 } from "defu";
2068
1794
  import { createJiti } from "jiti";
2069
1795
  async function unbuildExecutorFn(options, context2, config) {
2070
1796
  writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
@@ -2082,7 +1808,7 @@ async function unbuildExecutorFn(options, context2, config) {
2082
1808
  interopDefault: true
2083
1809
  });
2084
1810
  const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
2085
- await stormUnbuild.build(defu4({
1811
+ await stormUnbuild.build(defu3({
2086
1812
  ...options,
2087
1813
  projectRoot: context2.projectsConfigurations.projects[context2.projectName].root,
2088
1814
  projectName: context2.projectName,
@@ -2115,7 +1841,7 @@ async function unbuildExecutorFn(options, context2, config) {
2115
1841
  };
2116
1842
  }
2117
1843
  __name(unbuildExecutorFn, "unbuildExecutorFn");
2118
- var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
1844
+ var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
2119
1845
  skipReadingConfig: false,
2120
1846
  hooks: {
2121
1847
  applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
@@ -2724,9 +2450,6 @@ async function presetGeneratorFn(tree, options) {
2724
2450
  "storm",
2725
2451
  "storm-stack",
2726
2452
  "storm-ops",
2727
- "acidic",
2728
- "acidic-engine",
2729
- "cyclone-ui",
2730
2453
  "rust",
2731
2454
  "nx",
2732
2455
  "graphql",
@@ -2767,10 +2490,10 @@ async function presetGeneratorFn(tree, options) {
2767
2490
  type: "github",
2768
2491
  url: `${options.repositoryUrl}.git`
2769
2492
  };
2770
- json.packageManager ??= "pnpm@9.15.2";
2493
+ json.packageManager ??= "pnpm@10.3.0";
2771
2494
  json.engines ??= {
2772
2495
  node: ">=20.11.0",
2773
- pnpm: ">=9.15.2"
2496
+ pnpm: ">=10.3.0"
2774
2497
  };
2775
2498
  json.prettier = "@storm-software/prettier/config.json";
2776
2499
  json.nx ??= {
@@ -2923,6 +2646,199 @@ import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies
2923
2646
  import { updateLockFile } from "@nx/js/src/generators/release-version/utils/update-lock-file";
2924
2647
 
2925
2648
  // ../git-tools/src/types.ts
2649
+ var DEFAULT_COMMIT_TYPES = {
2650
+ /* --- Bumps version when selected --- */
2651
+ chore: {
2652
+ description: "Other changes that don't modify src or test files",
2653
+ title: "Chore",
2654
+ emoji: "\u2699\uFE0F ",
2655
+ semverBump: "patch",
2656
+ changelog: {
2657
+ title: "Miscellaneous",
2658
+ hidden: false
2659
+ }
2660
+ },
2661
+ fix: {
2662
+ description: "A change that resolves an issue previously identified with the package",
2663
+ title: "Bug Fix",
2664
+ emoji: "\u{1FAB2} ",
2665
+ semverBump: "patch",
2666
+ changelog: {
2667
+ title: "Bug Fixes",
2668
+ hidden: false
2669
+ }
2670
+ },
2671
+ feat: {
2672
+ description: "A change that adds a new feature to the package",
2673
+ title: "Feature",
2674
+ emoji: "\u{1F511} ",
2675
+ semverBump: "minor",
2676
+ changelog: {
2677
+ title: "Features",
2678
+ hidden: false
2679
+ }
2680
+ },
2681
+ ci: {
2682
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
2683
+ title: "Continuous Integration",
2684
+ emoji: "\u{1F9F0} ",
2685
+ semverBump: "patch",
2686
+ changelog: {
2687
+ title: "Continuous Integration",
2688
+ hidden: false
2689
+ }
2690
+ },
2691
+ refactor: {
2692
+ description: "A code change that neither fixes a bug nor adds a feature",
2693
+ title: "Code Refactoring",
2694
+ emoji: "\u{1F9EA} ",
2695
+ semverBump: "patch",
2696
+ changelog: {
2697
+ title: "Source Code Improvements",
2698
+ hidden: false
2699
+ }
2700
+ },
2701
+ style: {
2702
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
2703
+ title: "Style Improvements",
2704
+ emoji: "\u{1F48E} ",
2705
+ semverBump: "patch",
2706
+ changelog: {
2707
+ title: "Style Improvements",
2708
+ hidden: false
2709
+ }
2710
+ },
2711
+ perf: {
2712
+ description: "A code change that improves performance",
2713
+ title: "Performance Improvement",
2714
+ emoji: "\u23F1\uFE0F ",
2715
+ semverBump: "patch",
2716
+ changelog: {
2717
+ title: "Performance Improvements",
2718
+ hidden: false
2719
+ }
2720
+ },
2721
+ /* --- Does not bump version when selected --- */
2722
+ docs: {
2723
+ description: "A change that only includes documentation updates",
2724
+ title: "Documentation",
2725
+ emoji: "\u{1F4DC} ",
2726
+ semverBump: "none",
2727
+ changelog: {
2728
+ title: "Documentation",
2729
+ hidden: false
2730
+ }
2731
+ },
2732
+ test: {
2733
+ description: "Adding missing tests or correcting existing tests",
2734
+ title: "Testing",
2735
+ emoji: "\u{1F6A8} ",
2736
+ semverBump: "none",
2737
+ changelog: {
2738
+ title: "Testing",
2739
+ hidden: true
2740
+ }
2741
+ },
2742
+ /* --- Not included in commitlint but included in changelog --- */
2743
+ deps: {
2744
+ description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
2745
+ title: "Dependencies",
2746
+ emoji: "\u{1F4E6} ",
2747
+ hidden: true,
2748
+ semverBump: "patch",
2749
+ changelog: {
2750
+ title: "Dependency Upgrades",
2751
+ hidden: false
2752
+ }
2753
+ },
2754
+ /* --- Not included in commitlint or changelog --- */
2755
+ build: {
2756
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
2757
+ title: "Build",
2758
+ emoji: "\u{1F6E0} ",
2759
+ hidden: true,
2760
+ semverBump: "none",
2761
+ changelog: {
2762
+ title: "Build",
2763
+ hidden: true
2764
+ }
2765
+ },
2766
+ release: {
2767
+ description: "Publishing a commit containing a newly released version",
2768
+ title: "Publish Release",
2769
+ emoji: "\u{1F680} ",
2770
+ hidden: true,
2771
+ semverBump: "none",
2772
+ changelog: {
2773
+ title: "Publish Release",
2774
+ hidden: true
2775
+ }
2776
+ }
2777
+ };
2778
+ var DEFAULT_COMMIT_QUESTIONS = {
2779
+ type: {
2780
+ type: "select",
2781
+ title: "Commit Type",
2782
+ description: "Select the commit type that best describes your changes",
2783
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
2784
+ ret[type] = DEFAULT_COMMIT_TYPES[type];
2785
+ return ret;
2786
+ }, {}),
2787
+ defaultValue: "chore",
2788
+ maxLength: 20,
2789
+ minLength: 3
2790
+ },
2791
+ scope: {
2792
+ type: "select",
2793
+ title: "Commit Scope",
2794
+ description: "Select the monorepo project that is primarily impacted by this change",
2795
+ enum: {},
2796
+ defaultValue: "monorepo",
2797
+ maxLength: 50,
2798
+ minLength: 1
2799
+ },
2800
+ subject: {
2801
+ type: "input",
2802
+ title: "Commit Subject",
2803
+ description: "Write a short, imperative tense description of the change",
2804
+ maxLength: 150,
2805
+ minLength: 3
2806
+ },
2807
+ body: {
2808
+ type: "input",
2809
+ title: "Commit Body",
2810
+ description: "Provide a longer description of the change",
2811
+ maxLength: 600
2812
+ },
2813
+ isBreaking: {
2814
+ type: "confirm",
2815
+ title: "Breaking Changes",
2816
+ description: "Are there any breaking changes as a result of this commit?",
2817
+ defaultValue: false
2818
+ },
2819
+ breakingBody: {
2820
+ type: "input",
2821
+ title: "Breaking Changes (Details)",
2822
+ description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
2823
+ when: /* @__PURE__ */ __name((answers) => answers.isBreaking === true, "when"),
2824
+ maxLength: 600,
2825
+ minLength: 3
2826
+ },
2827
+ isIssueAffected: {
2828
+ type: "confirm",
2829
+ title: "Open Issue Affected",
2830
+ description: "Does this change impact any open issues?",
2831
+ defaultValue: false
2832
+ },
2833
+ issuesBody: {
2834
+ type: "input",
2835
+ title: "Open Issue Affected (Details)",
2836
+ description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
2837
+ when: /* @__PURE__ */ __name((answers) => answers.isIssueAffected === true, "when"),
2838
+ maxLength: 600,
2839
+ minLength: 3
2840
+ }
2841
+ };
2926
2842
  var RuleConfigSeverity;
2927
2843
  (function(RuleConfigSeverity2) {
2928
2844
  RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
@@ -2930,9 +2846,6 @@ var RuleConfigSeverity;
2930
2846
  RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
2931
2847
  })(RuleConfigSeverity || (RuleConfigSeverity = {}));
2932
2848
 
2933
- // ../git-tools/src/release/changelog-renderer.ts
2934
- import ChangelogRenderer from "nx/release/changelog-renderer/index";
2935
-
2936
2849
  // ../workspace-tools/src/generators/release-version/generator.ts
2937
2850
  import { exec as exec2, execSync as execSync5 } from "node:child_process";
2938
2851
  import { relative as relative3 } from "node:path";
@@ -3360,7 +3273,7 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
3360
3273
 
3361
3274
  // ../workspace-tools/src/utils/lock-file.ts
3362
3275
  import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
3363
- import { existsSync as existsSync7 } from "node:fs";
3276
+ import { existsSync as existsSync6 } from "node:fs";
3364
3277
  import { join as join2 } from "node:path";
3365
3278
  import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
3366
3279
  import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
@@ -3374,8 +3287,8 @@ var PNPM_LOCK_PATH = join2(workspaceRoot2, PNPM_LOCK_FILE);
3374
3287
 
3375
3288
  // ../workspace-tools/src/utils/plugin-helpers.ts
3376
3289
  import { readJsonFile as readJsonFile2 } from "@nx/devkit";
3377
- import defu5 from "defu";
3378
- import { existsSync as existsSync8 } from "node:fs";
3290
+ import defu4 from "defu";
3291
+ import { existsSync as existsSync7 } from "node:fs";
3379
3292
  import { dirname as dirname2, join as join3 } from "node:path";
3380
3293
 
3381
3294
  // ../workspace-tools/src/utils/typia-transform.ts