@storm-software/cloudflare-tools 0.55.39 → 0.55.41

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 +172 -75
  2. package/README.md +7 -7
  3. package/dist/{chunk-ZBM3I5Z7.mjs → chunk-2GWCBDS7.mjs} +4 -4
  4. package/dist/{chunk-Y3XZCCPP.mjs → chunk-3HMZSKJD.mjs} +1 -1
  5. package/dist/{chunk-J22YL4DC.mjs → chunk-BV5FWJGL.mjs} +2 -2
  6. package/dist/{chunk-HZON5W3G.js → chunk-FK6PN2T3.js} +42 -14
  7. package/dist/{chunk-KLCTLDIH.js → chunk-H2ML72QF.js} +91 -47
  8. package/dist/{chunk-I6XBWBZN.js → chunk-HF5FM2V2.js} +3 -3
  9. package/dist/{chunk-B6ZQTLTY.js → chunk-IA5NNUZK.js} +1 -1
  10. package/dist/{chunk-FSZS6NDT.js → chunk-JF2LLENH.js} +12 -12
  11. package/dist/{chunk-HWRWRM5W.mjs → chunk-LEXIFHU6.mjs} +2 -2
  12. package/dist/{chunk-QD7ZKWKB.mjs → chunk-M4FHQYTZ.mjs} +43 -15
  13. package/dist/{chunk-MVGAJ7Q4.js → chunk-MCQ4YOON.js} +16 -16
  14. package/dist/{chunk-VAVNPHSE.mjs → chunk-MESLYSHV.mjs} +52 -8
  15. package/dist/{chunk-XYJVYVYX.js → chunk-NGA2REMH.js} +488 -570
  16. package/dist/{chunk-MBAVTLIK.mjs → chunk-PDLA5ACW.mjs} +327 -409
  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,26 @@ 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
1438
  inject: [
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
+ ]
1473
1442
  };
1474
1443
  result.plugins = userOptions.plugins ?? getDefaultBuildPlugins(userOptions, result);
1444
+ if (options.inject) {
1445
+ options.inject = defu2(result.inject, options.inject);
1446
+ }
1447
+ options.inject?.filter(Boolean);
1448
+ delete result.entry;
1449
+ delete result.outputPath;
1475
1450
  stopwatch();
1476
1451
  return result;
1477
1452
  }, "resolveOptions");
@@ -1492,7 +1467,7 @@ async function generatePackageJson(context2) {
1492
1467
  packageJson = await addWorkspacePackageJsonFields(context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
1493
1468
  packageJson.exports ??= {};
1494
1469
  packageJson.exports["./package.json"] ??= "./package.json";
1495
- packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, context2.options.sourceRoot);
1470
+ packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
1496
1471
  let entryPoints = [
1497
1472
  {
1498
1473
  in: "./src/index.ts",
@@ -1510,12 +1485,15 @@ async function generatePackageJson(context2) {
1510
1485
  const split = entryPoint.out.split(".");
1511
1486
  split.pop();
1512
1487
  const entry = split.join(".").replaceAll("\\", "/");
1513
- packageJson.exports[`./${entry}`] ??= addPackageJsonExport(entry, packageJson.type, context2.options.sourceRoot);
1488
+ packageJson.exports[`./${entry}`] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/${entry}.js`;
1514
1489
  }
1515
1490
  }
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";
1491
+ if (context2.options.format === "esm") {
1492
+ packageJson.module = packageJson.type === "module" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.mjs`;
1493
+ } else {
1494
+ packageJson.main = packageJson.type === "commonjs" ? `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js` : `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.cjs`;
1495
+ }
1496
+ packageJson.types = `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.d.ts`;
1519
1497
  packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
1520
1498
  if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
1521
1499
  ret[key.replace("/index", "")] = packageJson.exports[key];
@@ -1550,11 +1528,39 @@ __name(generateContext, "generateContext");
1550
1528
  async function executeEsBuild(context2) {
1551
1529
  writeDebug(` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1552
1530
  const stopwatch = getStopwatch(`${context2.options.name} build`);
1553
- if (process.env.WATCH === "true") {
1531
+ if (process.env.STORM_WATCH) {
1554
1532
  const ctx = await esbuild2.context(context2.options);
1555
1533
  watch(ctx, context2.options);
1556
1534
  }
1557
- const result = await esbuild2.build(context2.options);
1535
+ const options = {
1536
+ ...context2.options
1537
+ };
1538
+ options.outdir = joinPaths(context2.options.outdir, context2.options.distDir);
1539
+ delete options.env;
1540
+ delete options.name;
1541
+ delete options.assets;
1542
+ delete options.mode;
1543
+ delete options.orgName;
1544
+ delete options.watch;
1545
+ delete options.clean;
1546
+ delete options.debug;
1547
+ delete options.generatePackageJson;
1548
+ delete options.emitOnAll;
1549
+ delete options.distDir;
1550
+ delete options.includeSrc;
1551
+ delete options.verbose;
1552
+ delete options.projectRoot;
1553
+ delete options.projectName;
1554
+ delete options.projectGraph;
1555
+ delete options.projectConfigurations;
1556
+ delete options.renderers;
1557
+ delete options.config;
1558
+ delete options.injectShims;
1559
+ delete options.external;
1560
+ writeTrace(`Run esbuild (${context2.options.name}) with the following options:
1561
+ ${formatLogMessage(options)}`, context2.options.config);
1562
+ const result = await esbuild2.build(options);
1563
+ await esbuild2.stop();
1558
1564
  if (result.metafile) {
1559
1565
  const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
1560
1566
  await hf.writeFile(metafilePath, JSON.stringify(result.metafile));
@@ -1636,7 +1642,7 @@ async function build3(options) {
1636
1642
  await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
1637
1643
  writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
1638
1644
  } catch (error) {
1639
- writeFatal(" \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1645
+ writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
1640
1646
  throw error;
1641
1647
  } finally {
1642
1648
  stopwatch();
@@ -1707,7 +1713,7 @@ var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn
1707
1713
 
1708
1714
  // ../workspace-tools/src/executors/npm-publish/executor.ts
1709
1715
  import { execSync as execSync4 } from "node:child_process";
1710
- import fs4 from "node:fs/promises";
1716
+ import { readFile as readFile5 } from "node:fs/promises";
1711
1717
 
1712
1718
  // ../workspace-tools/src/utils/pnpm-deps-update.ts
1713
1719
  import { existsSync as existsSync5 } from "node:fs";
@@ -1752,281 +1758,6 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
1752
1758
  }
1753
1759
  });
1754
1760
 
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
1761
  // ../workspace-tools/src/executors/typia/executor.ts
2031
1762
  import { removeSync } from "fs-extra";
2032
1763
  import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
@@ -2048,7 +1779,7 @@ async function typiaExecutorFn(options, _, config) {
2048
1779
  };
2049
1780
  }
2050
1781
  __name(typiaExecutorFn, "typiaExecutorFn");
2051
- var executor_default9 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
1782
+ var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
2052
1783
  skipReadingConfig: false,
2053
1784
  hooks: {
2054
1785
  applyDefaultOptions: /* @__PURE__ */ __name((options) => {
@@ -2064,7 +1795,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
2064
1795
  });
2065
1796
 
2066
1797
  // ../workspace-tools/src/executors/unbuild/executor.ts
2067
- import { defu as defu4 } from "defu";
1798
+ import { defu as defu3 } from "defu";
2068
1799
  import { createJiti } from "jiti";
2069
1800
  async function unbuildExecutorFn(options, context2, config) {
2070
1801
  writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
@@ -2082,7 +1813,7 @@ async function unbuildExecutorFn(options, context2, config) {
2082
1813
  interopDefault: true
2083
1814
  });
2084
1815
  const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
2085
- await stormUnbuild.build(defu4({
1816
+ await stormUnbuild.build(defu3({
2086
1817
  ...options,
2087
1818
  projectRoot: context2.projectsConfigurations.projects[context2.projectName].root,
2088
1819
  projectName: context2.projectName,
@@ -2115,7 +1846,7 @@ async function unbuildExecutorFn(options, context2, config) {
2115
1846
  };
2116
1847
  }
2117
1848
  __name(unbuildExecutorFn, "unbuildExecutorFn");
2118
- var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
1849
+ var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
2119
1850
  skipReadingConfig: false,
2120
1851
  hooks: {
2121
1852
  applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
@@ -2724,9 +2455,6 @@ async function presetGeneratorFn(tree, options) {
2724
2455
  "storm",
2725
2456
  "storm-stack",
2726
2457
  "storm-ops",
2727
- "acidic",
2728
- "acidic-engine",
2729
- "cyclone-ui",
2730
2458
  "rust",
2731
2459
  "nx",
2732
2460
  "graphql",
@@ -2767,10 +2495,10 @@ async function presetGeneratorFn(tree, options) {
2767
2495
  type: "github",
2768
2496
  url: `${options.repositoryUrl}.git`
2769
2497
  };
2770
- json.packageManager ??= "pnpm@9.15.2";
2498
+ json.packageManager ??= "pnpm@10.3.0";
2771
2499
  json.engines ??= {
2772
2500
  node: ">=20.11.0",
2773
- pnpm: ">=9.15.2"
2501
+ pnpm: ">=10.3.0"
2774
2502
  };
2775
2503
  json.prettier = "@storm-software/prettier/config.json";
2776
2504
  json.nx ??= {
@@ -2923,6 +2651,199 @@ import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies
2923
2651
  import { updateLockFile } from "@nx/js/src/generators/release-version/utils/update-lock-file";
2924
2652
 
2925
2653
  // ../git-tools/src/types.ts
2654
+ var DEFAULT_COMMIT_TYPES = {
2655
+ /* --- Bumps version when selected --- */
2656
+ chore: {
2657
+ description: "Other changes that don't modify src or test files",
2658
+ title: "Chore",
2659
+ emoji: "\u2699\uFE0F ",
2660
+ semverBump: "patch",
2661
+ changelog: {
2662
+ title: "Miscellaneous",
2663
+ hidden: false
2664
+ }
2665
+ },
2666
+ fix: {
2667
+ description: "A change that resolves an issue previously identified with the package",
2668
+ title: "Bug Fix",
2669
+ emoji: "\u{1FAB2} ",
2670
+ semverBump: "patch",
2671
+ changelog: {
2672
+ title: "Bug Fixes",
2673
+ hidden: false
2674
+ }
2675
+ },
2676
+ feat: {
2677
+ description: "A change that adds a new feature to the package",
2678
+ title: "Feature",
2679
+ emoji: "\u{1F511} ",
2680
+ semverBump: "minor",
2681
+ changelog: {
2682
+ title: "Features",
2683
+ hidden: false
2684
+ }
2685
+ },
2686
+ ci: {
2687
+ description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
2688
+ title: "Continuous Integration",
2689
+ emoji: "\u{1F9F0} ",
2690
+ semverBump: "patch",
2691
+ changelog: {
2692
+ title: "Continuous Integration",
2693
+ hidden: false
2694
+ }
2695
+ },
2696
+ refactor: {
2697
+ description: "A code change that neither fixes a bug nor adds a feature",
2698
+ title: "Code Refactoring",
2699
+ emoji: "\u{1F9EA} ",
2700
+ semverBump: "patch",
2701
+ changelog: {
2702
+ title: "Source Code Improvements",
2703
+ hidden: false
2704
+ }
2705
+ },
2706
+ style: {
2707
+ description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
2708
+ title: "Style Improvements",
2709
+ emoji: "\u{1F48E} ",
2710
+ semverBump: "patch",
2711
+ changelog: {
2712
+ title: "Style Improvements",
2713
+ hidden: false
2714
+ }
2715
+ },
2716
+ perf: {
2717
+ description: "A code change that improves performance",
2718
+ title: "Performance Improvement",
2719
+ emoji: "\u23F1\uFE0F ",
2720
+ semverBump: "patch",
2721
+ changelog: {
2722
+ title: "Performance Improvements",
2723
+ hidden: false
2724
+ }
2725
+ },
2726
+ /* --- Does not bump version when selected --- */
2727
+ docs: {
2728
+ description: "A change that only includes documentation updates",
2729
+ title: "Documentation",
2730
+ emoji: "\u{1F4DC} ",
2731
+ semverBump: "none",
2732
+ changelog: {
2733
+ title: "Documentation",
2734
+ hidden: false
2735
+ }
2736
+ },
2737
+ test: {
2738
+ description: "Adding missing tests or correcting existing tests",
2739
+ title: "Testing",
2740
+ emoji: "\u{1F6A8} ",
2741
+ semverBump: "none",
2742
+ changelog: {
2743
+ title: "Testing",
2744
+ hidden: true
2745
+ }
2746
+ },
2747
+ /* --- Not included in commitlint but included in changelog --- */
2748
+ deps: {
2749
+ description: "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
2750
+ title: "Dependencies",
2751
+ emoji: "\u{1F4E6} ",
2752
+ hidden: true,
2753
+ semverBump: "patch",
2754
+ changelog: {
2755
+ title: "Dependency Upgrades",
2756
+ hidden: false
2757
+ }
2758
+ },
2759
+ /* --- Not included in commitlint or changelog --- */
2760
+ build: {
2761
+ description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
2762
+ title: "Build",
2763
+ emoji: "\u{1F6E0} ",
2764
+ hidden: true,
2765
+ semverBump: "none",
2766
+ changelog: {
2767
+ title: "Build",
2768
+ hidden: true
2769
+ }
2770
+ },
2771
+ release: {
2772
+ description: "Publishing a commit containing a newly released version",
2773
+ title: "Publish Release",
2774
+ emoji: "\u{1F680} ",
2775
+ hidden: true,
2776
+ semverBump: "none",
2777
+ changelog: {
2778
+ title: "Publish Release",
2779
+ hidden: true
2780
+ }
2781
+ }
2782
+ };
2783
+ var DEFAULT_COMMIT_QUESTIONS = {
2784
+ type: {
2785
+ type: "select",
2786
+ title: "Commit Type",
2787
+ description: "Select the commit type that best describes your changes",
2788
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
2789
+ ret[type] = DEFAULT_COMMIT_TYPES[type];
2790
+ return ret;
2791
+ }, {}),
2792
+ defaultValue: "chore",
2793
+ maxLength: 20,
2794
+ minLength: 3
2795
+ },
2796
+ scope: {
2797
+ type: "select",
2798
+ title: "Commit Scope",
2799
+ description: "Select the monorepo project that is primarily impacted by this change",
2800
+ enum: {},
2801
+ defaultValue: "monorepo",
2802
+ maxLength: 50,
2803
+ minLength: 1
2804
+ },
2805
+ subject: {
2806
+ type: "input",
2807
+ title: "Commit Subject",
2808
+ description: "Write a short, imperative tense description of the change",
2809
+ maxLength: 150,
2810
+ minLength: 3
2811
+ },
2812
+ body: {
2813
+ type: "input",
2814
+ title: "Commit Body",
2815
+ description: "Provide a longer description of the change",
2816
+ maxLength: 600
2817
+ },
2818
+ isBreaking: {
2819
+ type: "confirm",
2820
+ title: "Breaking Changes",
2821
+ description: "Are there any breaking changes as a result of this commit?",
2822
+ defaultValue: false
2823
+ },
2824
+ breakingBody: {
2825
+ type: "input",
2826
+ title: "Breaking Changes (Details)",
2827
+ description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
2828
+ when: /* @__PURE__ */ __name((answers) => answers.isBreaking === true, "when"),
2829
+ maxLength: 600,
2830
+ minLength: 3
2831
+ },
2832
+ isIssueAffected: {
2833
+ type: "confirm",
2834
+ title: "Open Issue Affected",
2835
+ description: "Does this change impact any open issues?",
2836
+ defaultValue: false
2837
+ },
2838
+ issuesBody: {
2839
+ type: "input",
2840
+ title: "Open Issue Affected (Details)",
2841
+ description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
2842
+ when: /* @__PURE__ */ __name((answers) => answers.isIssueAffected === true, "when"),
2843
+ maxLength: 600,
2844
+ minLength: 3
2845
+ }
2846
+ };
2926
2847
  var RuleConfigSeverity;
2927
2848
  (function(RuleConfigSeverity2) {
2928
2849
  RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
@@ -2930,9 +2851,6 @@ var RuleConfigSeverity;
2930
2851
  RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
2931
2852
  })(RuleConfigSeverity || (RuleConfigSeverity = {}));
2932
2853
 
2933
- // ../git-tools/src/release/changelog-renderer.ts
2934
- import ChangelogRenderer from "nx/release/changelog-renderer/index";
2935
-
2936
2854
  // ../workspace-tools/src/generators/release-version/generator.ts
2937
2855
  import { exec as exec2, execSync as execSync5 } from "node:child_process";
2938
2856
  import { relative as relative3 } from "node:path";
@@ -3360,7 +3278,7 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
3360
3278
 
3361
3279
  // ../workspace-tools/src/utils/lock-file.ts
3362
3280
  import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
3363
- import { existsSync as existsSync7 } from "node:fs";
3281
+ import { existsSync as existsSync6 } from "node:fs";
3364
3282
  import { join as join2 } from "node:path";
3365
3283
  import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
3366
3284
  import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
@@ -3374,8 +3292,8 @@ var PNPM_LOCK_PATH = join2(workspaceRoot2, PNPM_LOCK_FILE);
3374
3292
 
3375
3293
  // ../workspace-tools/src/utils/plugin-helpers.ts
3376
3294
  import { readJsonFile as readJsonFile2 } from "@nx/devkit";
3377
- import defu5 from "defu";
3378
- import { existsSync as existsSync8 } from "node:fs";
3295
+ import defu4 from "defu";
3296
+ import { existsSync as existsSync7 } from "node:fs";
3379
3297
  import { dirname as dirname2, join as join3 } from "node:path";
3380
3298
 
3381
3299
  // ../workspace-tools/src/utils/typia-transform.ts