@storm-software/workspace-tools 1.224.1 → 1.225.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -3226,15 +3226,15 @@ var require_babel = __commonJS({
3226
3226
  const maps = asArray(input).map((m3) => new traceMapping.TraceMap(m3, "")), map2 = maps.pop();
3227
3227
  for (let i2 = 0; i2 < maps.length; i2++) if (maps[i2].sources.length > 1) throw new Error(`Transformation map ${i2} must have exactly one source file.
3228
3228
  Did you specify these with the most recent transformation maps first?`);
3229
- let tree = build5(map2, loader, "", 0);
3229
+ let tree = build6(map2, loader, "", 0);
3230
3230
  for (let i2 = maps.length - 1; i2 >= 0; i2--) tree = MapSource(maps[i2], [tree]);
3231
3231
  return tree;
3232
3232
  }
3233
- function build5(map2, loader, importer, importerDepth) {
3233
+ function build6(map2, loader, importer, importerDepth) {
3234
3234
  const { resolvedSources, sourcesContent, ignoreList } = map2, depth2 = importerDepth + 1;
3235
3235
  return MapSource(map2, resolvedSources.map((sourceFile, i2) => {
3236
3236
  const ctx = { importer, depth: depth2, source: sourceFile || "", content: void 0, ignore: void 0 }, sourceMap = loader(ctx.source, ctx), { source, content, ignore } = ctx;
3237
- return sourceMap ? build5(new traceMapping.TraceMap(sourceMap, source), loader, source, depth2) : OriginalSource(source, void 0 !== content ? content : sourcesContent ? sourcesContent[i2] : null, void 0 !== ignore ? ignore : !!ignoreList && ignoreList.includes(i2));
3237
+ return sourceMap ? build6(new traceMapping.TraceMap(sourceMap, source), loader, source, depth2) : OriginalSource(source, void 0 !== content ? content : sourcesContent ? sourcesContent[i2] : null, void 0 !== ignore ? ignore : !!ignoreList && ignoreList.includes(i2));
3238
3238
  }));
3239
3239
  }
3240
3240
  class SourceMap {
@@ -7257,9 +7257,9 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
7257
7257
  }
7258
7258
  Object.defineProperty(exports3, "__esModule", { value: true }), exports3.default = function(allowlist, outputType = "global") {
7259
7259
  let tree;
7260
- const build5 = { global: buildGlobal, module: buildModule, umd: buildUmd, var: buildVar }[outputType];
7261
- if (!build5) throw new Error(`Unsupported output type ${outputType}`);
7262
- tree = build5(allowlist);
7260
+ const build6 = { global: buildGlobal, module: buildModule, umd: buildUmd, var: buildVar }[outputType];
7261
+ if (!build6) throw new Error(`Unsupported output type ${outputType}`);
7262
+ tree = build6(allowlist);
7263
7263
  return (0, _generator().default)(tree).code;
7264
7264
  };
7265
7265
  const { arrayExpression, assignmentExpression, binaryExpression, blockStatement, callExpression, cloneNode, conditionalExpression, exportNamedDeclaration, exportSpecifier, expressionStatement, functionExpression, identifier, memberExpression, objectExpression, program, stringLiteral, unaryExpression, variableDeclaration, variableDeclarator } = _t(), buildUmdWrapper = (replacements) => _template().default.statement`
@@ -99291,8 +99291,8 @@ var require_RigConfig = __commonJS({
99291
99291
  throw new Error("Cannot resolve the rig package because no rig was specified for this project");
99292
99292
  }
99293
99293
  const rigPackageJsonModuleSpecifier = `${this.rigPackageName}/package.json`;
99294
- const resolveOptions3 = { basedir: this.projectFolderPath };
99295
- const resolvedRigPackageJsonPath = nodeResolve.sync(rigPackageJsonModuleSpecifier, resolveOptions3);
99294
+ const resolveOptions4 = { basedir: this.projectFolderPath };
99295
+ const resolvedRigPackageJsonPath = nodeResolve.sync(rigPackageJsonModuleSpecifier, resolveOptions4);
99296
99296
  this._resolvedRigPackageFolder = path14.dirname(resolvedRigPackageJsonPath);
99297
99297
  }
99298
99298
  if (this._resolvedProfileFolder === void 0) {
@@ -99312,8 +99312,8 @@ var require_RigConfig = __commonJS({
99312
99312
  throw new Error("Cannot resolve the rig package because no rig was specified for this project");
99313
99313
  }
99314
99314
  const rigPackageJsonModuleSpecifier = `${this.rigPackageName}/package.json`;
99315
- const resolveOptions3 = { basedir: this.projectFolderPath };
99316
- const resolvedRigPackageJsonPath = await Helpers_1.Helpers.nodeResolveAsync(rigPackageJsonModuleSpecifier, resolveOptions3);
99315
+ const resolveOptions4 = { basedir: this.projectFolderPath };
99316
+ const resolvedRigPackageJsonPath = await Helpers_1.Helpers.nodeResolveAsync(rigPackageJsonModuleSpecifier, resolveOptions4);
99317
99317
  this._resolvedRigPackageFolder = path14.dirname(resolvedRigPackageJsonPath);
99318
99318
  }
99319
99319
  if (this._resolvedProfileFolder === void 0) {
@@ -99856,11 +99856,11 @@ var require_valid = __commonJS({
99856
99856
  var require_clean = __commonJS({
99857
99857
  "node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js"(exports2, module2) {
99858
99858
  var parse8 = require_parse6();
99859
- var clean3 = (version3, options) => {
99859
+ var clean4 = (version3, options) => {
99860
99860
  const s2 = parse8(version3.trim().replace(/^[=v]+/, ""), options);
99861
99861
  return s2 ? s2.version : null;
99862
99862
  };
99863
- module2.exports = clean3;
99863
+ module2.exports = clean4;
99864
99864
  }
99865
99865
  });
99866
99866
 
@@ -101380,7 +101380,7 @@ var require_semver2 = __commonJS({
101380
101380
  var identifiers = require_identifiers();
101381
101381
  var parse8 = require_parse6();
101382
101382
  var valid = require_valid();
101383
- var clean3 = require_clean();
101383
+ var clean4 = require_clean();
101384
101384
  var inc = require_inc();
101385
101385
  var diff = require_diff();
101386
101386
  var major = require_major();
@@ -101418,7 +101418,7 @@ var require_semver2 = __commonJS({
101418
101418
  module2.exports = {
101419
101419
  parse: parse8,
101420
101420
  valid,
101421
- clean: clean3,
101421
+ clean: clean4,
101422
101422
  inc,
101423
101423
  diff,
101424
101424
  major,
@@ -153909,11 +153909,11 @@ var require_valid3 = __commonJS({
153909
153909
  var require_clean2 = __commonJS({
153910
153910
  "node_modules/.pnpm/semver@7.6.2/node_modules/semver/functions/clean.js"(exports2, module2) {
153911
153911
  var parse8 = require_parse7();
153912
- var clean3 = (version3, options) => {
153912
+ var clean4 = (version3, options) => {
153913
153913
  const s2 = parse8(version3.trim().replace(/^[=v]+/, ""), options);
153914
153914
  return s2 ? s2.version : null;
153915
153915
  };
153916
- module2.exports = clean3;
153916
+ module2.exports = clean4;
153917
153917
  }
153918
153918
  });
153919
153919
 
@@ -154222,8 +154222,8 @@ var require_coerce2 = __commonJS({
154222
154222
  const minor = match2[3] || "0";
154223
154223
  const patch = match2[4] || "0";
154224
154224
  const prerelease2 = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
154225
- const build5 = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
154226
- return parse8(`${major}.${minor}.${patch}${prerelease2}${build5}`, options);
154225
+ const build6 = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
154226
+ return parse8(`${major}.${minor}.${patch}${prerelease2}${build6}`, options);
154227
154227
  };
154228
154228
  module2.exports = coerce2;
154229
154229
  }
@@ -155207,7 +155207,7 @@ var require_semver4 = __commonJS({
155207
155207
  var identifiers = require_identifiers2();
155208
155208
  var parse8 = require_parse7();
155209
155209
  var valid = require_valid3();
155210
- var clean3 = require_clean2();
155210
+ var clean4 = require_clean2();
155211
155211
  var inc = require_inc2();
155212
155212
  var diff = require_diff2();
155213
155213
  var major = require_major2();
@@ -155245,7 +155245,7 @@ var require_semver4 = __commonJS({
155245
155245
  module2.exports = {
155246
155246
  parse: parse8,
155247
155247
  valid,
155248
- clean: clean3,
155248
+ clean: clean4,
155249
155249
  inc,
155250
155250
  diff,
155251
155251
  major,
@@ -157542,7 +157542,7 @@ var require_rollup_plugin_typescript2_cjs = __commonJS({
157542
157542
  }
157543
157543
  return str.replace(matchOperatorsRe, "\\$&");
157544
157544
  };
157545
- function build5(_styles) {
157545
+ function build6(_styles) {
157546
157546
  var builder = function builder2() {
157547
157547
  return applyStyle.apply(builder2, arguments);
157548
157548
  };
@@ -157557,7 +157557,7 @@ var require_rollup_plugin_typescript2_cjs = __commonJS({
157557
157557
  ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
157558
157558
  ret[key] = {
157559
157559
  get: function() {
157560
- return build5(this._styles.concat(key));
157560
+ return build6(this._styles.concat(key));
157561
157561
  }
157562
157562
  };
157563
157563
  });
@@ -157616,7 +157616,7 @@ var require_rollup_plugin_typescript2_cjs = __commonJS({
157616
157616
  Object.keys(styles$1).forEach(function(name2) {
157617
157617
  ret[name2] = {
157618
157618
  get: function() {
157619
- return build5([name2]);
157619
+ return build6([name2]);
157620
157620
  }
157621
157621
  };
157622
157622
  });
@@ -168986,6 +168986,7 @@ __export(index_exports, {
168986
168986
  swcHelpersVersion: () => swcHelpersVersion,
168987
168987
  swcNodeVersion: () => swcNodeVersion,
168988
168988
  tsLibVersion: () => tsLibVersion,
168989
+ tsdownExecutorFn: () => tsdownExecutorFn,
168989
168990
  tsupVersion: () => tsupVersion,
168990
168991
  typeScriptLibraryGeneratorFn: () => typeScriptLibraryGeneratorFn,
168991
168992
  typesNodeVersion: () => typesNodeVersion,
@@ -186878,7 +186879,7 @@ var readNxConfig = async (workspaceRoot3) => {
186878
186879
  };
186879
186880
 
186880
186881
  // packages/build-tools/src/utilities/copy-assets.ts
186881
- var copyAssets = async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
186882
+ var copyAssets = async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson4 = true, includeSrc = false, banner, footer) => {
186882
186883
  const pendingAssets = Array.from(assets ?? []);
186883
186884
  if (!pendingAssets?.some((asset) => asset?.glob === "*.md")) {
186884
186885
  pendingAssets.push({
@@ -186887,7 +186888,7 @@ var copyAssets = async (config, assets, outputPath, projectRoot, projectName, so
186887
186888
  output: "/"
186888
186889
  });
186889
186890
  }
186890
- if (generatePackageJson3 === false) {
186891
+ if (generatePackageJson4 === false) {
186891
186892
  pendingAssets.push({
186892
186893
  input: sourceRoot,
186893
186894
  glob: "package.json",
@@ -188608,8 +188609,8 @@ async function clean(name2 = "ESBuild", directory, config) {
188608
188609
  var esbuild = __toESM(require("esbuild"), 1);
188609
188610
  var esmSplitCodeToCjsPlugin = (options, resolvedOptions) => ({
188610
188611
  name: "storm:esm-split-code-to-cjs",
188611
- setup(build5) {
188612
- build5.onEnd(async (result) => {
188612
+ setup(build6) {
188613
+ build6.onEnd(async (result) => {
188613
188614
  const outFiles = Object.keys(result.metafile?.outputs ?? {});
188614
188615
  const jsFiles = outFiles.filter((f2) => f2.endsWith("js"));
188615
188616
  await esbuild.build({
@@ -188627,11 +188628,11 @@ var esmSplitCodeToCjsPlugin = (options, resolvedOptions) => ({
188627
188628
  // packages/esbuild/src/plugins/fix-imports.ts
188628
188629
  var fixImportsPlugin = (options, resolvedOptions) => ({
188629
188630
  name: "storm:fix-imports",
188630
- setup(build5) {
188631
- build5.onResolve({ filter: /^spdx-exceptions/ }, () => {
188631
+ setup(build6) {
188632
+ build6.onResolve({ filter: /^spdx-exceptions/ }, () => {
188632
188633
  return { path: require.resolve("spdx-exceptions") };
188633
188634
  });
188634
- build5.onResolve({ filter: /^spdx-license-ids/ }, () => {
188635
+ build6.onResolve({ filter: /^spdx-license-ids/ }, () => {
188635
188636
  return { path: require.resolve("spdx-license-ids") };
188636
188637
  });
188637
188638
  }
@@ -188642,8 +188643,8 @@ var import_node_path15 = require("node:path");
188642
188643
  var nativeNodeModulesPlugin = (options, resolvedOptions) => {
188643
188644
  return {
188644
188645
  name: "native-node-modules",
188645
- setup(build5) {
188646
- build5.onResolve({ filter: /\.node$/, namespace: "file" }, (args) => {
188646
+ setup(build6) {
188647
+ build6.onResolve({ filter: /\.node$/, namespace: "file" }, (args) => {
188647
188648
  const resolvedId = require.resolve(args.path, {
188648
188649
  paths: [args.resolveDir]
188649
188650
  });
@@ -188657,7 +188658,7 @@ var nativeNodeModulesPlugin = (options, resolvedOptions) => {
188657
188658
  path: resolvedId
188658
188659
  };
188659
188660
  });
188660
- build5.onLoad({ filter: /.*/, namespace: "node-file" }, (args) => {
188661
+ build6.onLoad({ filter: /.*/, namespace: "node-file" }, (args) => {
188661
188662
  return {
188662
188663
  contents: `
188663
188664
  import path from ${JSON.stringify(args.path)}
@@ -188667,11 +188668,11 @@ var nativeNodeModulesPlugin = (options, resolvedOptions) => {
188667
188668
  resolveDir: (0, import_node_path15.dirname)(args.path)
188668
188669
  };
188669
188670
  });
188670
- build5.onResolve({ filter: /\.node$/, namespace: "node-file" }, (args) => ({
188671
+ build6.onResolve({ filter: /\.node$/, namespace: "node-file" }, (args) => ({
188671
188672
  path: args.path,
188672
188673
  namespace: "file"
188673
188674
  }));
188674
- const opts = build5.initialOptions;
188675
+ const opts = build6.initialOptions;
188675
188676
  opts.loader = opts.loader || {};
188676
188677
  opts.loader[".node"] = "file";
188677
188678
  }
@@ -188700,8 +188701,8 @@ var nodeProtocolPlugin = (options, resolvedOptions) => {
188700
188701
  // packages/esbuild/src/plugins/on-error.ts
188701
188702
  var onErrorPlugin = (options, resolvedOptions) => ({
188702
188703
  name: "storm:on-error",
188703
- setup(build5) {
188704
- build5.onEnd((result) => {
188704
+ setup(build6) {
188705
+ build6.onEnd((result) => {
188705
188706
  if (result.errors.length > 0 && process.env.WATCH !== "true") {
188706
188707
  writeError(
188707
188708
  `The following errors occurred during the build:
@@ -188736,10 +188737,10 @@ function resolvePathsConfig(options, cwd2) {
188736
188737
  }
188737
188738
  var resolvePathsPlugin = (options, resolvedOptions) => ({
188738
188739
  name: "storm:resolve-paths",
188739
- setup(build5) {
188740
- const parentTsConfig = build5.initialOptions.tsconfig ? require(joinPaths(
188740
+ setup(build6) {
188741
+ const parentTsConfig = build6.initialOptions.tsconfig ? require(joinPaths(
188741
188742
  resolvedOptions.config.workspaceRoot,
188742
- build5.initialOptions.tsconfig
188743
+ build6.initialOptions.tsconfig
188743
188744
  )) : require(joinPaths(resolvedOptions.config.workspaceRoot, "tsconfig.json"));
188744
188745
  const resolvedTsPaths = resolvePathsConfig(
188745
188746
  parentTsConfig,
@@ -188748,8 +188749,8 @@ var resolvePathsPlugin = (options, resolvedOptions) => ({
188748
188749
  const packagesRegex = new RegExp(
188749
188750
  `^(${Object.keys(resolvedTsPaths).join("|")})$`
188750
188751
  );
188751
- build5.onResolve({ filter: packagesRegex }, (args) => {
188752
- if (build5.initialOptions.external?.includes(args.path)) {
188752
+ build6.onResolve({ filter: packagesRegex }, (args) => {
188753
+ if (build6.initialOptions.external?.includes(args.path)) {
188753
188754
  return { path: args.path, external: true };
188754
188755
  }
188755
188756
  return { path: `${resolvedTsPaths[args.path][0]}/index.ts` };
@@ -188817,11 +188818,11 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
188817
188818
  }
188818
188819
  var tscPlugin = (options, resolvedOptions) => ({
188819
188820
  name: "storm:tsc",
188820
- setup(build5) {
188821
+ setup(build6) {
188821
188822
  if (options.emitTypes === false) {
188822
188823
  return;
188823
188824
  }
188824
- build5.onStart(async () => {
188825
+ build6.onStart(async () => {
188825
188826
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
188826
188827
  await run(
188827
188828
  resolvedOptions.config,
@@ -188974,7 +188975,7 @@ var unusedIgnore = [
188974
188975
  var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
188975
188976
  var depsCheckPlugin = (bundle) => ({
188976
188977
  name: "storm:deps-check",
188977
- setup(build5) {
188978
+ setup(build6) {
188978
188979
  const pkgJsonPath = import_node_path17.default.join(process.cwd(), "package.json");
188979
188980
  const pkgContents = require(pkgJsonPath);
188980
188981
  const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
@@ -188986,7 +188987,7 @@ var depsCheckPlugin = (bundle) => ({
188986
188987
  ];
188987
188988
  const collectedDependencies = /* @__PURE__ */ new Set();
188988
188989
  const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
188989
- build5.onResolve({ filter: onlyPackages }, (args) => {
188990
+ build6.onResolve({ filter: onlyPackages }, (args) => {
188990
188991
  if (args.importer.includes(process.cwd())) {
188991
188992
  if (args.path[0] === "@") {
188992
188993
  const [org, pkg] = args.path.split("/");
@@ -188998,7 +188999,7 @@ var depsCheckPlugin = (bundle) => ({
188998
188999
  }
188999
189000
  return { external: true };
189000
189001
  });
189001
- build5.onEnd(() => {
189002
+ build6.onEnd(() => {
189002
189003
  const unusedDependencies = [...dependencies].filter((dep) => {
189003
189004
  return !collectedDependencies.has(dep) || import_node_module3.builtinModules.includes(dep);
189004
189005
  });
@@ -190497,6 +190498,321 @@ var executor_default3 = withRunExecutor(
190497
190498
  }
190498
190499
  );
190499
190500
 
190501
+ // packages/tsdown/src/build.ts
190502
+ var import_devkit10 = require("@nx/devkit");
190503
+ var import_defu8 = __toESM(require("defu"), 1);
190504
+ var import_find_workspace_root7 = require("nx/src/utils/find-workspace-root");
190505
+ var import_tsdown = require("tsdown");
190506
+
190507
+ // packages/tsdown/src/clean.ts
190508
+ async function clean2(name2 = "ESBuild", directory, config) {
190509
+ writeDebug(` \u{1F9F9} Cleaning ${name2} output path: ${directory}`, config);
190510
+ const stopwatch = getStopwatch(`${name2} output clean`);
190511
+ await hfs.deleteAll(directory);
190512
+ stopwatch();
190513
+ }
190514
+
190515
+ // packages/tsdown/src/config.ts
190516
+ var DEFAULT_BUILD_OPTIONS2 = {
190517
+ platform: "node",
190518
+ target: "node22",
190519
+ format: ["esm", "cjs"],
190520
+ tsconfig: "tsconfig.json",
190521
+ envName: "production",
190522
+ globalName: "globalThis",
190523
+ unused: { level: "error" },
190524
+ injectShims: true,
190525
+ watch: false,
190526
+ bundle: true,
190527
+ treeshake: true,
190528
+ clean: true,
190529
+ debug: false
190530
+ };
190531
+
190532
+ // packages/tsdown/src/build.ts
190533
+ var resolveOptions2 = async (userOptions) => {
190534
+ const projectRoot = userOptions.projectRoot;
190535
+ const workspaceRoot3 = (0, import_find_workspace_root7.findWorkspaceRoot)(projectRoot);
190536
+ if (!workspaceRoot3) {
190537
+ throw new Error("Cannot find Nx workspace root");
190538
+ }
190539
+ const config = await loadStormConfig(workspaceRoot3.dir);
190540
+ writeDebug(" \u2699\uFE0F Resolving build options", config);
190541
+ const stopwatch = getStopwatch("Build options resolution");
190542
+ const projectGraph = await (0, import_devkit10.createProjectGraphAsync)({
190543
+ exitOnError: true
190544
+ });
190545
+ const projectJsonPath = joinPaths(
190546
+ workspaceRoot3.dir,
190547
+ projectRoot,
190548
+ "project.json"
190549
+ );
190550
+ if (!await hfs.isFile(projectJsonPath)) {
190551
+ throw new Error("Cannot find project.json configuration");
190552
+ }
190553
+ const projectJson = await hfs.json(projectJsonPath);
190554
+ const projectName = projectJson.name;
190555
+ const projectConfigurations = (0, import_devkit10.readProjectsConfigurationFromProjectGraph)(projectGraph);
190556
+ if (!projectConfigurations?.projects?.[projectName]) {
190557
+ throw new Error(
190558
+ "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."
190559
+ );
190560
+ }
190561
+ const options = (0, import_defu8.default)(userOptions, DEFAULT_BUILD_OPTIONS2);
190562
+ options.name ??= `${projectName}-${options.format}`;
190563
+ options.target ??= DEFAULT_TARGET;
190564
+ const packageJsonPath = joinPaths(
190565
+ workspaceRoot3.dir,
190566
+ options.projectRoot,
190567
+ "package.json"
190568
+ );
190569
+ if (!await hfs.isFile(packageJsonPath)) {
190570
+ throw new Error("Cannot find package.json configuration");
190571
+ }
190572
+ const env = getEnv2("tsdown", options);
190573
+ const result = {
190574
+ ...options,
190575
+ config,
190576
+ ...userOptions,
190577
+ tsconfig: joinPaths(
190578
+ projectRoot,
190579
+ userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"
190580
+ ),
190581
+ format: options.format || "cjs",
190582
+ entryPoints: await getEntryPoints(
190583
+ config,
190584
+ projectRoot,
190585
+ projectJson.sourceRoot,
190586
+ userOptions.entry || ["./src/index.ts"],
190587
+ userOptions.emitOnAll
190588
+ ),
190589
+ outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
190590
+ plugins: [],
190591
+ name: userOptions.name || projectName,
190592
+ projectConfigurations,
190593
+ projectName,
190594
+ projectGraph,
190595
+ sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || joinPaths(projectRoot, "src"),
190596
+ minify: userOptions.minify || !userOptions.debug,
190597
+ verbose: userOptions.verbose || isVerbose() || userOptions.debug === true,
190598
+ includeSrc: userOptions.includeSrc === true,
190599
+ metafile: userOptions.metafile !== false,
190600
+ generatePackageJson: userOptions.generatePackageJson !== false,
190601
+ clean: userOptions.clean !== false,
190602
+ emitOnAll: userOptions.emitOnAll === true,
190603
+ dts: userOptions.emitTypes === true ? { transformer: "oxc" } : userOptions.emitTypes,
190604
+ bundleDts: userOptions.emitTypes,
190605
+ assets: userOptions.assets ?? [],
190606
+ shims: userOptions.injectShims !== true,
190607
+ bundle: userOptions.bundle !== false,
190608
+ watch: userOptions.watch === true,
190609
+ define: {
190610
+ STORM_FORMAT: JSON.stringify(options.format || "cjs"),
190611
+ ...options.format === "cjs" && options.injectShims ? {
190612
+ "import.meta.url": "importMetaUrl"
190613
+ } : {},
190614
+ ...Object.keys(env || {}).reduce((res, key) => {
190615
+ const value2 = JSON.stringify(env[key]);
190616
+ return {
190617
+ ...res,
190618
+ [`process.env.${key}`]: value2,
190619
+ [`import.meta.env.${key}`]: value2
190620
+ };
190621
+ }, {}),
190622
+ ...options.define
190623
+ }
190624
+ };
190625
+ stopwatch();
190626
+ return result;
190627
+ };
190628
+ async function generatePackageJson2(options) {
190629
+ if (options.generatePackageJson !== false && await hfs.isFile(joinPaths(options.projectRoot, "package.json"))) {
190630
+ writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
190631
+ const stopwatch = getStopwatch("Write package.json file");
190632
+ const packageJsonPath = joinPaths(options.projectRoot, "project.json");
190633
+ if (!await hfs.isFile(packageJsonPath)) {
190634
+ throw new Error("Cannot find package.json configuration");
190635
+ }
190636
+ let packageJson = await hfs.json(
190637
+ joinPaths(
190638
+ options.config.workspaceRoot,
190639
+ options.projectRoot,
190640
+ "package.json"
190641
+ )
190642
+ );
190643
+ if (!packageJson) {
190644
+ throw new Error("Cannot find package.json configuration file");
190645
+ }
190646
+ packageJson = await addPackageDependencies(
190647
+ options.config.workspaceRoot,
190648
+ options.projectRoot,
190649
+ options.projectName,
190650
+ packageJson
190651
+ );
190652
+ packageJson = await addWorkspacePackageJsonFields(
190653
+ options.config,
190654
+ options.projectRoot,
190655
+ options.sourceRoot,
190656
+ options.projectName,
190657
+ false,
190658
+ packageJson
190659
+ );
190660
+ packageJson.exports ??= {};
190661
+ packageJson.exports["./package.json"] ??= "./package.json";
190662
+ packageJson.exports["."] ??= addPackageJsonExport(
190663
+ "index",
190664
+ packageJson.type,
190665
+ options.sourceRoot
190666
+ );
190667
+ let entryPoints = [{ in: "./src/index.ts", out: "./src/index.ts" }];
190668
+ if (options.entryPoints) {
190669
+ if (Array.isArray(options.entryPoints)) {
190670
+ entryPoints = options.entryPoints.map(
190671
+ (entryPoint) => typeof entryPoint === "string" ? { in: entryPoint, out: entryPoint } : entryPoint
190672
+ );
190673
+ }
190674
+ for (const entryPoint of entryPoints) {
190675
+ const split = entryPoint.out.split(".");
190676
+ split.pop();
190677
+ const entry = split.join(".").replaceAll("\\", "/");
190678
+ packageJson.exports[`./${entry}`] ??= addPackageJsonExport(
190679
+ entry,
190680
+ packageJson.type,
190681
+ options.sourceRoot
190682
+ );
190683
+ }
190684
+ }
190685
+ packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
190686
+ packageJson.module = packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
190687
+ packageJson.types = "./dist/index.d.ts";
190688
+ packageJson.exports = Object.keys(packageJson.exports).reduce(
190689
+ (ret, key) => {
190690
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
190691
+ ret[key.replace("/index", "")] = packageJson.exports[key];
190692
+ }
190693
+ return ret;
190694
+ },
190695
+ packageJson.exports
190696
+ );
190697
+ await (0, import_devkit10.writeJsonFile)(joinPaths(options.outdir, "package.json"), packageJson);
190698
+ stopwatch();
190699
+ }
190700
+ return options;
190701
+ }
190702
+ async function executeTSDown(options) {
190703
+ writeDebug(` \u{1F680} Running ${options.name} build`, options.config);
190704
+ const stopwatch = getStopwatch(`${options.name} build`);
190705
+ await (0, import_tsdown.build)({
190706
+ ...options,
190707
+ entry: options.entryPoints,
190708
+ outDir: options.outdir,
190709
+ config: false
190710
+ });
190711
+ stopwatch();
190712
+ return options;
190713
+ }
190714
+ async function copyBuildAssets2(options) {
190715
+ writeDebug(
190716
+ ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`,
190717
+ options.config
190718
+ );
190719
+ const stopwatch = getStopwatch(`${options.name} asset copy`);
190720
+ await copyAssets(
190721
+ options.config,
190722
+ options.assets ?? [],
190723
+ options.outdir,
190724
+ options.projectRoot,
190725
+ options.projectName,
190726
+ options.sourceRoot,
190727
+ true,
190728
+ false
190729
+ );
190730
+ stopwatch();
190731
+ return options;
190732
+ }
190733
+ async function reportResults2(options) {
190734
+ writeSuccess(
190735
+ ` \u{1F4E6} The ${options.name} build completed successfully`,
190736
+ options.config
190737
+ );
190738
+ }
190739
+ async function cleanOutputPath2(options) {
190740
+ if (options.clean !== false && options.outdir) {
190741
+ await clean2(options.name, options.outdir, options.config);
190742
+ }
190743
+ return options;
190744
+ }
190745
+ async function build4(options) {
190746
+ writeDebug(` \u26A1 Executing Storm TSDown pipeline`);
190747
+ const stopwatch = getStopwatch("TSDown pipeline");
190748
+ try {
190749
+ const opts = Array.isArray(options) ? options : [options];
190750
+ if (opts.length === 0) {
190751
+ throw new Error("No build options were provided");
190752
+ }
190753
+ const resolved = await Promise.all(
190754
+ opts.map(async (opt) => await resolveOptions2(opt))
190755
+ );
190756
+ if (resolved.length > 0) {
190757
+ await cleanOutputPath2(resolved[0]);
190758
+ await generatePackageJson2(resolved[0]);
190759
+ await Promise.all(
190760
+ resolved.map(async (opt) => {
190761
+ await executeTSDown(opt);
190762
+ await copyBuildAssets2(opt);
190763
+ await reportResults2(opt);
190764
+ })
190765
+ );
190766
+ } else {
190767
+ writeWarning(
190768
+ " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
190769
+ );
190770
+ }
190771
+ writeSuccess(" \u{1F3C1} TSDown pipeline build completed successfully");
190772
+ } catch (error) {
190773
+ writeFatal(
190774
+ " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated."
190775
+ );
190776
+ throw error;
190777
+ } finally {
190778
+ stopwatch();
190779
+ }
190780
+ }
190781
+
190782
+ // packages/workspace-tools/src/executors/tsdown/executor.ts
190783
+ async function tsdownExecutorFn(options, context2, config) {
190784
+ writeInfo("\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
190785
+ if (!context2.projectsConfigurations?.projects || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !context2.projectsConfigurations.projects[context2.projectName]?.root) {
190786
+ throw new Error(
190787
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
190788
+ );
190789
+ }
190790
+ await build4({
190791
+ ...options,
190792
+ projectRoot: context2.projectsConfigurations.projects?.[context2.projectName].root,
190793
+ projectName: context2.projectName,
190794
+ sourceRoot: context2.projectsConfigurations.projects?.[context2.projectName]?.sourceRoot
190795
+ });
190796
+ return {
190797
+ success: true
190798
+ };
190799
+ }
190800
+ var executor_default4 = withRunExecutor(
190801
+ "Storm TSDown build executor",
190802
+ tsdownExecutorFn,
190803
+ {
190804
+ skipReadingConfig: false,
190805
+ hooks: {
190806
+ applyDefaultOptions: async (options, config) => {
190807
+ options.entry ??= ["src/index.ts"];
190808
+ options.outputPath ??= "dist/{projectRoot}";
190809
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
190810
+ return options;
190811
+ }
190812
+ }
190813
+ }
190814
+ );
190815
+
190500
190816
  // packages/workspace-tools/src/executors/typia/executor.ts
190501
190817
  var import_fs_extra2 = __toESM(require_lib2());
190502
190818
  var import_TypiaProgrammer = __toESM(require_TypiaProgrammer());
@@ -190514,7 +190830,7 @@ async function typiaExecutorFn(options, _5, config) {
190514
190830
  success: true
190515
190831
  };
190516
190832
  }
190517
- var executor_default4 = withRunExecutor(
190833
+ var executor_default5 = withRunExecutor(
190518
190834
  "Typia runtime validation generator",
190519
190835
  typiaExecutorFn,
190520
190836
  {
@@ -190532,16 +190848,16 @@ var executor_default4 = withRunExecutor(
190532
190848
  );
190533
190849
 
190534
190850
  // packages/unbuild/src/build.ts
190535
- var import_devkit12 = require("@nx/devkit");
190851
+ var import_devkit13 = require("@nx/devkit");
190536
190852
  var import_js3 = require("@nx/js");
190537
190853
  var import_buildable_libs_utils4 = require("@nx/js/src/utils/buildable-libs-utils");
190538
- var import_defu8 = __toESM(require("defu"), 1);
190854
+ var import_defu9 = __toESM(require("defu"), 1);
190539
190855
  var import_node_path24 = require("node:path");
190540
- var import_find_workspace_root7 = require("nx/src/utils/find-workspace-root");
190856
+ var import_find_workspace_root8 = require("nx/src/utils/find-workspace-root");
190541
190857
  var import_unbuild = require("unbuild");
190542
190858
 
190543
190859
  // packages/unbuild/src/clean.ts
190544
- async function clean2(name2 = "Unbuild", directory, config) {
190860
+ async function clean3(name2 = "Unbuild", directory, config) {
190545
190861
  writeDebug(` \u{1F9F9} Cleaning ${name2} output path: ${directory}`, config);
190546
190862
  const stopwatch = getStopwatch(`${name2} output clean`);
190547
190863
  await hfs.deleteAll(directory);
@@ -190614,13 +190930,13 @@ var swcPlugin = (options, resolvedOptions) => {
190614
190930
  };
190615
190931
 
190616
190932
  // packages/unbuild/src/plugins/tsc.ts
190617
- var import_devkit11 = require("@nx/devkit");
190933
+ var import_devkit12 = require("@nx/devkit");
190618
190934
  var import_buildable_libs_utils3 = require("@nx/js/src/utils/buildable-libs-utils");
190619
190935
  var import_compiler_helper_dependency = require("@nx/js/src/utils/compiler-helper-dependency");
190620
190936
  var import_rollup_plugin_typescript2 = __toESM(require_rollup_plugin_typescript2_cjs(), 1);
190621
190937
 
190622
190938
  // packages/unbuild/src/utilities/helpers.ts
190623
- var import_devkit10 = require("@nx/devkit");
190939
+ var import_devkit11 = require("@nx/devkit");
190624
190940
  var import_buildable_libs_utils2 = require("@nx/js/src/utils/buildable-libs-utils");
190625
190941
  var import_node_path22 = require("node:path");
190626
190942
  var import_node_url8 = require("node:url");
@@ -190635,13 +190951,13 @@ async function loadConfig2(configPath) {
190635
190951
  }
190636
190952
  async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
190637
190953
  const tsConfigFile = import_typescript.default.readConfigFile(
190638
- (0, import_devkit10.joinPathFragments)(config.workspaceRoot, projectRoot, tsConfigPath),
190954
+ (0, import_devkit11.joinPathFragments)(config.workspaceRoot, projectRoot, tsConfigPath),
190639
190955
  import_typescript.default.sys.readFile
190640
190956
  );
190641
190957
  const tsConfig = import_typescript.default.parseJsonConfigFileContent(
190642
190958
  tsConfigFile.config,
190643
190959
  import_typescript.default.sys,
190644
- (0, import_node_path22.dirname)((0, import_devkit10.joinPathFragments)(config.workspaceRoot, projectRoot, tsConfigPath))
190960
+ (0, import_node_path22.dirname)((0, import_devkit11.joinPathFragments)(config.workspaceRoot, projectRoot, tsConfigPath))
190645
190961
  );
190646
190962
  const compilerOptions = {
190647
190963
  rootDir: projectRoot,
@@ -190654,7 +190970,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
190654
190970
 
190655
190971
  // packages/unbuild/src/plugins/tsc.ts
190656
190972
  var tscPlugin2 = async (options, resolvedOptions) => {
190657
- const projectGraph = await (0, import_devkit11.createProjectGraphAsync)({
190973
+ const projectGraph = await (0, import_devkit12.createProjectGraphAsync)({
190658
190974
  exitOnError: true
190659
190975
  });
190660
190976
  const result = (0, import_buildable_libs_utils3.calculateProjectBuildableDependencies)(
@@ -190740,13 +191056,13 @@ var getDefaultBuildPlugins2 = async (options, resolvedOptions) => Promise.all(
190740
191056
  );
190741
191057
 
190742
191058
  // packages/unbuild/src/build.ts
190743
- async function resolveOptions2(options) {
191059
+ async function resolveOptions3(options) {
190744
191060
  const projectRoot = options.projectRoot;
190745
191061
  if (!projectRoot) {
190746
191062
  throw new Error("Cannot find project root");
190747
191063
  }
190748
191064
  const outputPath = options.outputPath || joinPaths("dist", projectRoot);
190749
- const workspaceRoot3 = (0, import_find_workspace_root7.findWorkspaceRoot)(projectRoot);
191065
+ const workspaceRoot3 = (0, import_find_workspace_root8.findWorkspaceRoot)(projectRoot);
190750
191066
  if (!workspaceRoot3) {
190751
191067
  throw new Error("Cannot find workspace root");
190752
191068
  }
@@ -190756,10 +191072,10 @@ async function resolveOptions2(options) {
190756
191072
  if (options.configPath) {
190757
191073
  const configFile = await loadConfig2(options.configPath);
190758
191074
  if (configFile) {
190759
- options = (0, import_defu8.default)(options, configFile);
191075
+ options = (0, import_defu9.default)(options, configFile);
190760
191076
  }
190761
191077
  }
190762
- const projectGraph = await (0, import_devkit12.createProjectGraphAsync)({
191078
+ const projectGraph = await (0, import_devkit13.createProjectGraphAsync)({
190763
191079
  exitOnError: true
190764
191080
  });
190765
191081
  const projectJsonPath = joinPaths(
@@ -190795,7 +191111,7 @@ async function resolveOptions2(options) {
190795
191111
  if (!await hfs.isDirectory(sourceRoot)) {
190796
191112
  throw new Error("Cannot find sourceRoot directory");
190797
191113
  }
190798
- const projectConfigurations = (0, import_devkit12.readProjectsConfigurationFromProjectGraph)(projectGraph);
191114
+ const projectConfigurations = (0, import_devkit13.readProjectsConfigurationFromProjectGraph)(projectGraph);
190799
191115
  if (!projectConfigurations?.projects?.[projectName]) {
190800
191116
  throw new Error(
190801
191117
  "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."
@@ -190935,7 +191251,7 @@ async function resolveOptions2(options) {
190935
191251
  } else {
190936
191252
  rollup = options.rollup;
190937
191253
  }
190938
- resolvedOptions.rollup = (0, import_defu8.default)(resolvedOptions.rollup ?? {}, rollup);
191254
+ resolvedOptions.rollup = (0, import_defu9.default)(resolvedOptions.rollup ?? {}, rollup);
190939
191255
  }
190940
191256
  resolvedOptions.hooks = {
190941
191257
  "rollup:options": async (ctx, opts) => {
@@ -190945,7 +191261,7 @@ async function resolveOptions2(options) {
190945
191261
  stopwatch();
190946
191262
  return resolvedOptions;
190947
191263
  }
190948
- async function generatePackageJson2(options) {
191264
+ async function generatePackageJson3(options) {
190949
191265
  if (options.generatePackageJson !== false && await hfs.isFile(joinPaths(options.projectRoot, "package.json"))) {
190950
191266
  writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
190951
191267
  const stopwatch = getStopwatch("Write package.json file");
@@ -190978,7 +191294,7 @@ async function generatePackageJson2(options) {
190978
191294
  packageJson
190979
191295
  );
190980
191296
  packageJson = await addPackageJsonExports(options.sourceRoot, packageJson);
190981
- await (0, import_devkit12.writeJsonFile)(joinPaths(options.outDir, "package.json"), packageJson);
191297
+ await (0, import_devkit13.writeJsonFile)(joinPaths(options.outDir, "package.json"), packageJson);
190982
191298
  stopwatch();
190983
191299
  }
190984
191300
  return options;
@@ -191001,7 +191317,7 @@ async function executeUnbuild(options) {
191001
191317
  }
191002
191318
  return options;
191003
191319
  }
191004
- async function copyBuildAssets2(options) {
191320
+ async function copyBuildAssets3(options) {
191005
191321
  writeDebug(
191006
191322
  ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
191007
191323
  options.config
@@ -191020,21 +191336,21 @@ async function copyBuildAssets2(options) {
191020
191336
  stopwatch();
191021
191337
  return options;
191022
191338
  }
191023
- async function cleanOutputPath2(options) {
191339
+ async function cleanOutputPath3(options) {
191024
191340
  if (options.clean !== false && options.outDir) {
191025
- await clean2(options.name, options.outDir, options.config);
191341
+ await clean3(options.name, options.outDir, options.config);
191026
191342
  }
191027
191343
  return options;
191028
191344
  }
191029
- async function build4(options) {
191345
+ async function build5(options) {
191030
191346
  writeDebug(` \u26A1 Executing Storm Unbuild pipeline`);
191031
191347
  const stopwatch = getStopwatch("Unbuild pipeline");
191032
191348
  try {
191033
- const resolvedOptions = await resolveOptions2(options);
191034
- await cleanOutputPath2(resolvedOptions);
191035
- await generatePackageJson2(resolvedOptions);
191349
+ const resolvedOptions = await resolveOptions3(options);
191350
+ await cleanOutputPath3(resolvedOptions);
191351
+ await generatePackageJson3(resolvedOptions);
191036
191352
  await executeUnbuild(resolvedOptions);
191037
- await copyBuildAssets2(resolvedOptions);
191353
+ await copyBuildAssets3(resolvedOptions);
191038
191354
  writeSuccess(
191039
191355
  ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`,
191040
191356
  resolvedOptions.config
@@ -191057,7 +191373,7 @@ async function unbuildExecutorFn(options, context2, config) {
191057
191373
  "The Build process failed because the context is not valid. Please run this command from a workspace."
191058
191374
  );
191059
191375
  }
191060
- await build4({
191376
+ await build5({
191061
191377
  ...options,
191062
191378
  projectRoot: context2.projectsConfigurations.projects?.[context2.projectName].root,
191063
191379
  projectName: context2.projectName,
@@ -191067,7 +191383,7 @@ async function unbuildExecutorFn(options, context2, config) {
191067
191383
  success: true
191068
191384
  };
191069
191385
  }
191070
- var executor_default5 = withRunExecutor(
191386
+ var executor_default6 = withRunExecutor(
191071
191387
  "TypeScript Unbuild processing",
191072
191388
  unbuildExecutorFn,
191073
191389
  {
@@ -191084,7 +191400,7 @@ var executor_default5 = withRunExecutor(
191084
191400
  );
191085
191401
 
191086
191402
  // packages/workspace-tools/src/generators/config-schema/generator.ts
191087
- var import_devkit13 = require("@nx/devkit");
191403
+ var import_devkit14 = require("@nx/devkit");
191088
191404
 
191089
191405
  // node_modules/.pnpm/zod-to-json-schema@3.23.1_zod@3.24.1/node_modules/zod-to-json-schema/dist/esm/Options.js
191090
191406
  var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
@@ -192254,8 +192570,8 @@ async function configSchemaGeneratorFn(tree, options, config) {
192254
192570
  `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
192255
192571
  config
192256
192572
  );
192257
- (0, import_devkit13.writeJson)(tree, outputPath, jsonSchema, { spaces: 2 });
192258
- await (0, import_devkit13.formatFiles)(tree);
192573
+ (0, import_devkit14.writeJson)(tree, outputPath, jsonSchema, { spaces: 2 });
192574
+ await (0, import_devkit14.formatFiles)(tree);
192259
192575
  writeSuccess(
192260
192576
  "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
192261
192577
  config
@@ -192270,9 +192586,9 @@ var generator_default = withRunGenerator(
192270
192586
  );
192271
192587
 
192272
192588
  // packages/workspace-tools/src/generators/init/init.ts
192273
- var import_devkit14 = require("@nx/devkit");
192589
+ var import_devkit15 = require("@nx/devkit");
192274
192590
  async function initGenerator(tree, schema) {
192275
- const task = (0, import_devkit14.addDependenciesToPackageJson)(
192591
+ const task = (0, import_devkit15.addDependenciesToPackageJson)(
192276
192592
  tree,
192277
192593
  {
192278
192594
  nx: "^19.6.2",
@@ -192288,15 +192604,15 @@ async function initGenerator(tree, schema) {
192288
192604
  {}
192289
192605
  );
192290
192606
  if (!schema.skipFormat) {
192291
- await (0, import_devkit14.formatFiles)(tree);
192607
+ await (0, import_devkit15.formatFiles)(tree);
192292
192608
  }
192293
192609
  return task;
192294
192610
  }
192295
192611
 
192296
192612
  // packages/workspace-tools/src/generators/node-library/generator.ts
192297
- var import_devkit15 = require("@nx/devkit");
192613
+ var import_devkit16 = require("@nx/devkit");
192298
192614
  async function nodeLibraryGeneratorFn(tree, schema, config) {
192299
- const filesDir = (0, import_devkit15.joinPathFragments)(__dirname, "./files");
192615
+ const filesDir = (0, import_devkit16.joinPathFragments)(__dirname, "./files");
192300
192616
  const tsLibraryGeneratorOptions = {
192301
192617
  ...schema,
192302
192618
  platform: "node",
@@ -192306,10 +192622,10 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
192306
192622
  buildExecutor: "@storm-software/workspace-tools:unbuild"
192307
192623
  };
192308
192624
  const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
192309
- const { className, name: name2, propertyName } = (0, import_devkit15.names)(
192625
+ const { className, name: name2, propertyName } = (0, import_devkit16.names)(
192310
192626
  options.projectNames.projectFileName
192311
192627
  );
192312
- (0, import_devkit15.generateFiles)(tree, filesDir, options.projectRoot, {
192628
+ (0, import_devkit16.generateFiles)(tree, filesDir, options.projectRoot, {
192313
192629
  ...schema,
192314
192630
  dot: ".",
192315
192631
  className,
@@ -192321,12 +192637,12 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
192321
192637
  cliCommand: "nx",
192322
192638
  strict: void 0,
192323
192639
  tmpl: "",
192324
- offsetFromRoot: (0, import_devkit15.offsetFromRoot)(options.projectRoot),
192640
+ offsetFromRoot: (0, import_devkit16.offsetFromRoot)(options.projectRoot),
192325
192641
  buildable: options.bundler && options.bundler !== "none",
192326
192642
  hasUnitTestRunner: options.unitTestRunner !== "none"
192327
192643
  });
192328
192644
  await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
192329
- await (0, import_devkit15.formatFiles)(tree);
192645
+ await (0, import_devkit16.formatFiles)(tree);
192330
192646
  return null;
192331
192647
  }
192332
192648
  var generator_default2 = withRunGenerator(
@@ -192335,13 +192651,13 @@ var generator_default2 = withRunGenerator(
192335
192651
  );
192336
192652
 
192337
192653
  // packages/workspace-tools/src/generators/preset/generator.ts
192338
- var import_devkit16 = require("@nx/devkit");
192654
+ var import_devkit17 = require("@nx/devkit");
192339
192655
  var path13 = __toESM(require("node:path"));
192340
192656
  async function presetGeneratorFn(tree, options) {
192341
192657
  const projectRoot = ".";
192342
192658
  options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
192343
192659
  options.namespace ??= options.organization;
192344
- (0, import_devkit16.addProjectConfiguration)(tree, `@${options.namespace}/${options.name}`, {
192660
+ (0, import_devkit17.addProjectConfiguration)(tree, `@${options.namespace}/${options.name}`, {
192345
192661
  root: projectRoot,
192346
192662
  projectType: "application",
192347
192663
  targets: {
@@ -192355,7 +192671,7 @@ async function presetGeneratorFn(tree, options) {
192355
192671
  }
192356
192672
  }
192357
192673
  });
192358
- (0, import_devkit16.updateJson)(tree, "package.json", (json) => {
192674
+ (0, import_devkit17.updateJson)(tree, "package.json", (json) => {
192359
192675
  json.scripts = json.scripts || {};
192360
192676
  json.version = "0.0.0";
192361
192677
  json.triggerEmptyDevReleaseByIncrementingThisNumber = 0;
@@ -192487,12 +192803,12 @@ async function presetGeneratorFn(tree, options) {
192487
192803
  };
192488
192804
  return json;
192489
192805
  });
192490
- (0, import_devkit16.generateFiles)(tree, path13.join(__dirname, "files"), projectRoot, {
192806
+ (0, import_devkit17.generateFiles)(tree, path13.join(__dirname, "files"), projectRoot, {
192491
192807
  ...options,
192492
192808
  pnpmVersion,
192493
192809
  nodeVersion
192494
192810
  });
192495
- await (0, import_devkit16.formatFiles)(tree);
192811
+ await (0, import_devkit17.formatFiles)(tree);
192496
192812
  let dependencies = {
192497
192813
  "@ls-lint/ls-lint": "2.2.3",
192498
192814
  "@ltd/j-toml": "1.38.0",
@@ -192559,11 +192875,11 @@ async function presetGeneratorFn(tree, options) {
192559
192875
  };
192560
192876
  }
192561
192877
  await Promise.resolve(
192562
- (0, import_devkit16.addDependenciesToPackageJson)(
192878
+ (0, import_devkit17.addDependenciesToPackageJson)(
192563
192879
  tree,
192564
192880
  dependencies,
192565
192881
  {},
192566
- (0, import_devkit16.joinPathFragments)(projectRoot, "package.json")
192882
+ (0, import_devkit17.joinPathFragments)(projectRoot, "package.json")
192567
192883
  )
192568
192884
  );
192569
192885
  return null;
@@ -192574,7 +192890,7 @@ var generator_default3 = withRunGenerator(
192574
192890
  );
192575
192891
 
192576
192892
  // packages/workspace-tools/src/generators/release-version/generator.ts
192577
- var import_devkit17 = require("@nx/devkit");
192893
+ var import_devkit18 = require("@nx/devkit");
192578
192894
  var import_resolve_local_package_dependencies = require("@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies");
192579
192895
  var import_update_lock_file = require("@nx/js/src/generators/release-version/utils/update-lock-file");
192580
192896
 
@@ -192786,7 +193102,7 @@ var DEFAULT_CONVENTIONAL_COMMITS_CONFIG = {
192786
193102
  // packages/workspace-tools/src/generators/release-version/generator.ts
192787
193103
  var import_node_child_process11 = require("node:child_process");
192788
193104
  var import_node_path25 = require("node:path");
192789
- var import_config7 = require("nx/src/command-line/release/config/config");
193105
+ var import_config8 = require("nx/src/command-line/release/config/config");
192790
193106
  var import_git = require("nx/src/command-line/release/utils/git");
192791
193107
  var import_resolve_semver_specifier = require("nx/src/command-line/release/utils/resolve-semver-specifier");
192792
193108
  var import_semver = require("nx/src/command-line/release/utils/semver");
@@ -192857,11 +193173,11 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s2) => `"${s
192857
193173
  for (const project of projects) {
192858
193174
  const projectName = project.name;
192859
193175
  const packageRoot = projectNameToPackageRootMap.get(projectName);
192860
- const packageJsonPath = (0, import_devkit17.joinPathFragments)(
193176
+ const packageJsonPath = (0, import_devkit18.joinPathFragments)(
192861
193177
  packageRoot ?? "./",
192862
193178
  "package.json"
192863
193179
  );
192864
- const cargoTomlPath = (0, import_devkit17.joinPathFragments)(
193180
+ const cargoTomlPath = (0, import_devkit18.joinPathFragments)(
192865
193181
  packageRoot ?? "./",
192866
193182
  "Cargo.toml"
192867
193183
  );
@@ -192883,7 +193199,7 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
192883
193199
  let packageName;
192884
193200
  let currentVersionFromDisk;
192885
193201
  if (tree.exists(packageJsonPath)) {
192886
- const projectPackageJson = (0, import_devkit17.readJson)(tree, packageJsonPath);
193202
+ const projectPackageJson = (0, import_devkit18.readJson)(tree, packageJsonPath);
192887
193203
  log(
192888
193204
  `\u{1F50D} Reading data for package "${projectPackageJson.name}" from ${workspaceRelativePackagePath}`
192889
193205
  );
@@ -193084,7 +193400,7 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
193084
193400
  }
193085
193401
  case "prompt": {
193086
193402
  const maybeLogReleaseGroup = (log2) => {
193087
- if (options.releaseGroup.name === import_config7.IMPLICIT_DEFAULT_RELEASE_GROUP) {
193403
+ if (options.releaseGroup.name === import_config8.IMPLICIT_DEFAULT_RELEASE_GROUP) {
193088
193404
  return log2;
193089
193405
  }
193090
193406
  return `${log2} within release group "${options.releaseGroup.name}"`;
@@ -193155,8 +193471,8 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
193155
193471
  versionData[projectName].newVersion = newVersion;
193156
193472
  }
193157
193473
  if (tree.exists(packageJsonPath)) {
193158
- const projectPackageJson = (0, import_devkit17.readJson)(tree, packageJsonPath);
193159
- (0, import_devkit17.writeJson)(tree, packageJsonPath, {
193474
+ const projectPackageJson = (0, import_devkit18.readJson)(tree, packageJsonPath);
193475
+ (0, import_devkit18.writeJson)(tree, packageJsonPath, {
193160
193476
  ...projectPackageJson,
193161
193477
  version: newVersion
193162
193478
  });
@@ -193187,16 +193503,16 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
193187
193503
  Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.keys()).join(", ")}`
193188
193504
  );
193189
193505
  }
193190
- const dependentPackageJsonPath = (0, import_devkit17.joinPathFragments)(
193506
+ const dependentPackageJsonPath = (0, import_devkit18.joinPathFragments)(
193191
193507
  dependentPackageRoot,
193192
193508
  "package.json"
193193
193509
  );
193194
- const dependentCargoTomlPath = (0, import_devkit17.joinPathFragments)(
193510
+ const dependentCargoTomlPath = (0, import_devkit18.joinPathFragments)(
193195
193511
  dependentPackageRoot,
193196
193512
  "Cargo.toml"
193197
193513
  );
193198
193514
  if (tree.exists(dependentPackageJsonPath)) {
193199
- (0, import_devkit17.updateJson)(tree, dependentPackageJsonPath, (json) => {
193515
+ (0, import_devkit18.updateJson)(tree, dependentPackageJsonPath, (json) => {
193200
193516
  let versionPrefix = options.versionPrefix ?? "auto";
193201
193517
  if (versionPrefix === "auto") {
193202
193518
  versionPrefix = "";
@@ -193252,7 +193568,7 @@ Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.k
193252
193568
  };
193253
193569
  break;
193254
193570
  }
193255
- const cargoTomlToUpdate = (0, import_devkit17.joinPathFragments)(
193571
+ const cargoTomlToUpdate = (0, import_devkit18.joinPathFragments)(
193256
193572
  dependentPackageRoot,
193257
193573
  "Cargo.toml"
193258
193574
  );
@@ -193266,7 +193582,7 @@ Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.k
193266
193582
  }
193267
193583
  }
193268
193584
  }
193269
- await (0, import_devkit17.formatFiles)(tree);
193585
+ await (0, import_devkit18.formatFiles)(tree);
193270
193586
  writeSuccess(
193271
193587
  `Completed running the Storm Release Version generator!
193272
193588
  `,
@@ -193275,7 +193591,7 @@ Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.k
193275
193591
  return {
193276
193592
  data: versionData,
193277
193593
  callback: async (tree2, opts) => {
193278
- import_devkit17.output.logSingleLine("Updating Cargo.lock file");
193594
+ import_devkit18.output.logSingleLine("Updating Cargo.lock file");
193279
193595
  const cwd2 = tree2.root;
193280
193596
  const updatedFiles = await (0, import_update_lock_file.updateLockFile)(cwd2, opts) ?? [];
193281
193597
  const updatedCargoPackages = [];
@@ -193285,7 +193601,7 @@ Projects with packageRoot configured: ${Array.from(projectNameToPackageRootMap.k
193285
193601
  const project = projects.find((proj) => proj.name === projectName);
193286
193602
  if (projectVersionData.newVersion && project?.name && projectNameToPackageRootMap.get(project.name)) {
193287
193603
  const projectRoot = projectNameToPackageRootMap.get(project.name);
193288
- if (projectRoot && tree2.exists((0, import_devkit17.joinPathFragments)(projectRoot, "Cargo.toml"))) {
193604
+ if (projectRoot && tree2.exists((0, import_devkit18.joinPathFragments)(projectRoot, "Cargo.toml"))) {
193289
193605
  updatedCargoPackages.push(projectName);
193290
193606
  }
193291
193607
  }
@@ -193388,7 +193704,7 @@ function resolveLocalPackageCargoDependencies(tree, projectGraph, filteredProjec
193388
193704
  }
193389
193705
  projectNameToPackageRootMap.set(projectNode.name, packageRoot);
193390
193706
  }
193391
- const cargoTomlPath = (0, import_devkit17.joinPathFragments)(packageRoot ?? "./", "Cargo.toml");
193707
+ const cargoTomlPath = (0, import_devkit18.joinPathFragments)(packageRoot ?? "./", "Cargo.toml");
193392
193708
  if (!tree.exists(cargoTomlPath)) {
193393
193709
  continue;
193394
193710
  }
@@ -193432,7 +193748,7 @@ function resolveLocalPackageCargoDependencies(tree, projectGraph, filteredProjec
193432
193748
  }
193433
193749
 
193434
193750
  // packages/workspace-tools/src/utils/cargo.ts
193435
- var import_devkit18 = require("@nx/devkit");
193751
+ var import_devkit19 = require("@nx/devkit");
193436
193752
  var import_node_child_process12 = require("node:child_process");
193437
193753
  var import_node_path26 = require("node:path");
193438
193754
  var INVALID_CARGO_ARGS = [
@@ -193557,7 +193873,7 @@ function isExternal(packageOrDep, workspaceRoot3) {
193557
193873
  }
193558
193874
  function runProcess(processCmd, ...args) {
193559
193875
  const metadata = cargoMetadata();
193560
- const targetDir = metadata?.target_directory ?? (0, import_devkit18.joinPathFragments)(import_devkit18.workspaceRoot, "dist", "cargo");
193876
+ const targetDir = metadata?.target_directory ?? (0, import_devkit19.joinPathFragments)(import_devkit19.workspaceRoot, "dist", "cargo");
193561
193877
  return new Promise((resolve6) => {
193562
193878
  if (process.env.VERCEL) {
193563
193879
  return resolve6({ success: true });
@@ -193578,13 +193894,13 @@ function runProcess(processCmd, ...args) {
193578
193894
  }
193579
193895
 
193580
193896
  // packages/workspace-tools/src/utils/create-cli-options.ts
193581
- var import_devkit19 = require("@nx/devkit");
193897
+ var import_devkit20 = require("@nx/devkit");
193582
193898
  function createCliOptions(obj) {
193583
193899
  const args = [];
193584
193900
  for (const key in obj) {
193585
193901
  const value2 = obj[key];
193586
193902
  if (value2) {
193587
- const arg = (0, import_devkit19.names)(key).fileName;
193903
+ const arg = (0, import_devkit20.names)(key).fileName;
193588
193904
  if (Array.isArray(value2)) {
193589
193905
  args.push(
193590
193906
  `--${arg.toLowerCase()}=${value2.map((v4) => v4.trim()).join(",")}`
@@ -193714,7 +194030,7 @@ function isPostInstallProcess() {
193714
194030
  }
193715
194031
 
193716
194032
  // packages/workspace-tools/src/utils/package-helpers.ts
193717
- var import_devkit20 = require("@nx/devkit");
194033
+ var import_devkit21 = require("@nx/devkit");
193718
194034
  var import_node_fs22 = require("node:fs");
193719
194035
  var PackageManagerTypes = {
193720
194036
  PackageJson: "package.json",
@@ -193725,20 +194041,20 @@ var getPackageInfo = (project) => {
193725
194041
  project,
193726
194042
  ProjectTagConstants.Language.TAG_ID,
193727
194043
  ProjectTagConstants.Language.RUST
193728
- ) && (0, import_node_fs22.existsSync)((0, import_devkit20.joinPathFragments)(project.root, "Cargo.toml"))) {
194044
+ ) && (0, import_node_fs22.existsSync)((0, import_devkit21.joinPathFragments)(project.root, "Cargo.toml"))) {
193729
194045
  return {
193730
194046
  type: "Cargo.toml",
193731
- content: parseCargoToml((0, import_devkit20.joinPathFragments)(project.root, "Cargo.toml"))
194047
+ content: parseCargoToml((0, import_devkit21.joinPathFragments)(project.root, "Cargo.toml"))
193732
194048
  };
193733
194049
  } else if (isEqualProjectTag(
193734
194050
  project,
193735
194051
  ProjectTagConstants.Language.TAG_ID,
193736
194052
  ProjectTagConstants.Language.TYPESCRIPT
193737
- ) && (0, import_node_fs22.existsSync)((0, import_devkit20.joinPathFragments)(project.root, "package.json"))) {
194053
+ ) && (0, import_node_fs22.existsSync)((0, import_devkit21.joinPathFragments)(project.root, "package.json"))) {
193738
194054
  return {
193739
194055
  type: "package.json",
193740
- content: (0, import_devkit20.readJsonFile)(
193741
- (0, import_devkit20.joinPathFragments)(project.root, "package.json")
194056
+ content: (0, import_devkit21.readJsonFile)(
194057
+ (0, import_devkit21.joinPathFragments)(project.root, "package.json")
193742
194058
  )
193743
194059
  };
193744
194060
  }
@@ -193818,6 +194134,7 @@ var getTypiaTransform = (program, diagnostics) => (0, import_transform.default)(
193818
194134
  swcHelpersVersion,
193819
194135
  swcNodeVersion,
193820
194136
  tsLibVersion,
194137
+ tsdownExecutorFn,
193821
194138
  tsupVersion,
193822
194139
  typeScriptLibraryGeneratorFn,
193823
194140
  typesNodeVersion,