@storm-software/workspace-tools 1.35.5 → 1.36.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.
@@ -4438,12 +4438,12 @@ var require_install_packages_task = __commonJS({
4438
4438
  var child_process_1 = require("child_process");
4439
4439
  var path_1 = require("path");
4440
4440
  var nx_1 = require_nx();
4441
- var { detectPackageManager, getPackageManagerCommand, joinPathFragments: joinPathFragments3 } = (0, nx_1.requireNx)();
4441
+ var { detectPackageManager, getPackageManagerCommand, joinPathFragments: joinPathFragments2 } = (0, nx_1.requireNx)();
4442
4442
  function installPackagesTask(tree, alwaysRun = false, cwd = "", packageManager = detectPackageManager(cwd)) {
4443
- if (!tree.listChanges().find((f) => f.path === joinPathFragments3(cwd, "package.json")) && !alwaysRun) {
4443
+ if (!tree.listChanges().find((f) => f.path === joinPathFragments2(cwd, "package.json")) && !alwaysRun) {
4444
4444
  return;
4445
4445
  }
4446
- const packageJsonValue = tree.read(joinPathFragments3(cwd, "package.json"), "utf-8");
4446
+ const packageJsonValue = tree.read(joinPathFragments2(cwd, "package.json"), "utf-8");
4447
4447
  let storedPackageJsonValue = global["__packageJsonInstallCache__"];
4448
4448
  if (storedPackageJsonValue != packageJsonValue || alwaysRun) {
4449
4449
  global["__packageJsonInstallCache__"] = packageJsonValue;
@@ -34939,7 +34939,7 @@ var require_project_name_and_root_utils = __commonJS({
34939
34939
  var nx_1 = require_nx();
34940
34940
  var get_workspace_layout_1 = require_get_workspace_layout();
34941
34941
  var names_1 = require_names();
34942
- var { joinPathFragments: joinPathFragments3, normalizePath, logger, readJson, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
34942
+ var { joinPathFragments: joinPathFragments2, normalizePath, logger, readJson, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
34943
34943
  var deprecationWarning = stripIndents`
34944
34944
  In Nx 18, generating projects will no longer derive the name and root.
34945
34945
  Please provide the exact project name and root in the future.`;
@@ -35015,14 +35015,14 @@ var require_project_name_and_root_utils = __commonJS({
35015
35015
  if (directory === relativeCwd || directory.startsWith(`${relativeCwd}/`)) {
35016
35016
  asProvidedProjectDirectory = directory;
35017
35017
  } else {
35018
- asProvidedProjectDirectory = joinPathFragments3(relativeCwd, directory);
35018
+ asProvidedProjectDirectory = joinPathFragments2(relativeCwd, directory);
35019
35019
  }
35020
35020
  } else if (options.rootProject) {
35021
35021
  asProvidedProjectDirectory = ".";
35022
35022
  } else {
35023
35023
  asProvidedProjectDirectory = relativeCwd;
35024
35024
  if (!relativeCwd.endsWith(asProvidedProjectName) && !relativeCwd.endsWith(options.name)) {
35025
- asProvidedProjectDirectory = joinPathFragments3(relativeCwd, asProvidedProjectName);
35025
+ asProvidedProjectDirectory = joinPathFragments2(relativeCwd, asProvidedProjectName);
35026
35026
  }
35027
35027
  }
35028
35028
  if (asProvidedProjectName.startsWith("@")) {
@@ -35055,7 +35055,7 @@ var require_project_name_and_root_utils = __commonJS({
35055
35055
  const derivedSimpleProjectName = name;
35056
35056
  let derivedProjectDirectory = derivedProjectDirectoryWithoutLayout;
35057
35057
  if (derivedProjectDirectoryWithoutLayout !== ".") {
35058
- derivedProjectDirectory = joinPathFragments3(layoutDirectory, derivedProjectDirectory);
35058
+ derivedProjectDirectory = joinPathFragments2(layoutDirectory, derivedProjectDirectory);
35059
35059
  }
35060
35060
  let derivedImportPath;
35061
35061
  if (options.projectType === "library") {
@@ -106223,7 +106223,7 @@ __export(executor_exports, {
106223
106223
  });
106224
106224
  module.exports = __toCommonJS(executor_exports);
106225
106225
  var import_esbuild_decorators = __toESM(require_src());
106226
- var import_devkit2 = __toESM(require_devkit());
106226
+ var import_devkit = __toESM(require_devkit());
106227
106227
  var import_js = __toESM(require_src2());
106228
106228
  var import_normalize_options = __toESM(require_normalize_options());
106229
106229
  var import_tsc = __toESM(require_tsc_impl());
@@ -116676,33 +116676,8 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
116676
116676
  }
116677
116677
  };
116678
116678
 
116679
- // packages/workspace-tools/src/utils/file-path-utils.ts
116680
- var removeExtension = (filePath) => {
116681
- return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
116682
- };
116683
-
116684
- // packages/workspace-tools/src/utils/get-project-configurations.ts
116685
- var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
116686
- var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(
116687
- getWorkspaceRoot()
116688
- );
116689
-
116690
- // packages/workspace-tools/src/utils/get-project-deps.ts
116691
- function getExternalDependencies(projectName, graph) {
116692
- const allDeps = graph.dependencies[projectName];
116693
- return Array.from(
116694
- allDeps.reduce((acc, node) => {
116695
- const found = graph.externalNodes[node.target];
116696
- if (found)
116697
- acc.push(found);
116698
- return acc;
116699
- }, [])
116700
- );
116701
- }
116702
-
116703
- // packages/workspace-tools/src/executors/tsup/get-config.ts
116704
- var import_devkit = __toESM(require_devkit());
116705
- function modernConfig({
116679
+ // packages/workspace-tools/src/base/get-tsup-config.ts
116680
+ function defaultConfig({
116706
116681
  entry,
116707
116682
  outDir,
116708
116683
  projectRoot,
@@ -116725,9 +116700,8 @@ function modernConfig({
116725
116700
  generatePackageJson,
116726
116701
  dtsTsConfig
116727
116702
  }) {
116728
- let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "modern");
116729
116703
  return {
116730
- name: "modern",
116704
+ name: "default",
116731
116705
  entry,
116732
116706
  format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
116733
116707
  target: platform !== "node" ? [
@@ -116747,7 +116721,7 @@ function modernConfig({
116747
116721
  } : false,
116748
116722
  projectRoot,
116749
116723
  workspaceRoot,
116750
- outDir: outputPath,
116724
+ outDir,
116751
116725
  silent: !verbose,
116752
116726
  metafile: true,
116753
116727
  shims,
@@ -116763,7 +116737,7 @@ function modernConfig({
116763
116737
  ...dtsTsConfig,
116764
116738
  options: {
116765
116739
  ...dtsTsConfig.options,
116766
- outDir: outputPath
116740
+ outDir
116767
116741
  }
116768
116742
  }
116769
116743
  },
@@ -116784,77 +116758,6 @@ function modernConfig({
116784
116758
  outExtension
116785
116759
  };
116786
116760
  }
116787
- function legacyConfig({
116788
- entry,
116789
- outDir,
116790
- projectRoot,
116791
- workspaceRoot,
116792
- tsconfig = "tsconfig.json",
116793
- splitting,
116794
- treeshake,
116795
- debug = false,
116796
- external,
116797
- banner = {},
116798
- platform = "neutral",
116799
- verbose = false,
116800
- shims = true,
116801
- define: define2,
116802
- env,
116803
- plugins,
116804
- generatePackageJson,
116805
- dtsTsConfig
116806
- }) {
116807
- let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
116808
- return {
116809
- name: "legacy",
116810
- entry,
116811
- format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
116812
- target: platform !== "node" ? ["es2022"] : ["es2022", "node18"],
116813
- tsconfig,
116814
- splitting,
116815
- generatePackageJson,
116816
- treeshake: treeshake ? {
116817
- preset: "recommended"
116818
- } : false,
116819
- projectRoot,
116820
- workspaceRoot,
116821
- outDir: outputPath,
116822
- silent: !verbose,
116823
- metafile: true,
116824
- shims,
116825
- external,
116826
- platform,
116827
- banner,
116828
- define: define2,
116829
- env,
116830
- dts: false,
116831
- experimentalDts: {
116832
- entry,
116833
- compilerOptions: {
116834
- ...dtsTsConfig,
116835
- options: {
116836
- ...dtsTsConfig.options,
116837
- outDir: outputPath
116838
- }
116839
- }
116840
- },
116841
- /*minify: debug ? false : "terser",
116842
- terserOptions: {
116843
- compress: true,
116844
- ecma: 2020,
116845
- keep_classnames: true,
116846
- keep_fnames: true
116847
- },*/
116848
- apiReport: false,
116849
- docModel: false,
116850
- tsdocMetadata: false,
116851
- sourcemap: debug,
116852
- clean: false,
116853
- tsconfigDecoratorMetadata: true,
116854
- plugins,
116855
- outExtension
116856
- };
116857
- }
116858
116761
  function getConfig(workspaceRoot, projectRoot, getConfigFn, {
116859
116762
  outputPath,
116860
116763
  tsConfig,
@@ -116891,6 +116794,30 @@ var outExtension = ({ format: format2 }) => {
116891
116794
  };
116892
116795
  };
116893
116796
 
116797
+ // packages/workspace-tools/src/utils/file-path-utils.ts
116798
+ var removeExtension = (filePath) => {
116799
+ return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
116800
+ };
116801
+
116802
+ // packages/workspace-tools/src/utils/get-project-configurations.ts
116803
+ var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
116804
+ var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(
116805
+ getWorkspaceRoot()
116806
+ );
116807
+
116808
+ // packages/workspace-tools/src/utils/get-project-deps.ts
116809
+ function getExternalDependencies(projectName, graph) {
116810
+ const allDeps = graph.dependencies[projectName];
116811
+ return Array.from(
116812
+ allDeps.reduce((acc, node) => {
116813
+ const found = graph.externalNodes[node.target];
116814
+ if (found)
116815
+ acc.push(found);
116816
+ return acc;
116817
+ }, [])
116818
+ );
116819
+ }
116820
+
116894
116821
  // packages/workspace-tools/src/executors/tsup/executor.ts
116895
116822
  async function tsupExecutorFn(options, context) {
116896
116823
  try {
@@ -116947,8 +116874,8 @@ ${Object.keys(options).map(
116947
116874
  throw new Error("The Build process failed trying to copy assets");
116948
116875
  }
116949
116876
  const pathToPackageJson = (0, import_path4.join)(context.root, projectRoot, "package.json");
116950
- const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
116951
- const workspacePackageJson = (0, import_devkit2.readJsonFile)(
116877
+ const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
116878
+ const workspacePackageJson = (0, import_devkit.readJsonFile)(
116952
116879
  (0, import_path4.join)(workspaceRoot, "package.json")
116953
116880
  );
116954
116881
  options.external = options.external || [];
@@ -116987,7 +116914,7 @@ ${Object.keys(options).map(
116987
116914
  console.log(`\u26A1 Adding implicit dependency: ${key}`);
116988
116915
  const projectConfig = projectConfigs[key];
116989
116916
  if (projectConfig?.targets?.build) {
116990
- const projectPackageJson = (0, import_devkit2.readJsonFile)(
116917
+ const projectPackageJson = (0, import_devkit.readJsonFile)(
116991
116918
  projectConfig.targets?.build.options.project
116992
116919
  );
116993
116920
  if (projectPackageJson?.name && !options.external.includes(projectPackageJson.name)) {
@@ -117037,7 +116964,7 @@ ${externalDependencies.map((dep) => {
117037
116964
  entryPoints.push(options.entry);
117038
116965
  }
117039
116966
  if (options.emitOnAll === true) {
117040
- entryPoints.push((0, import_devkit2.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"));
116967
+ entryPoints.push((0, import_devkit.joinPathFragments)(sourceRoot, "**/*.{ts,tsx}"));
117041
116968
  }
117042
116969
  if (options.additionalEntryPoints) {
117043
116970
  entryPoints.push(...options.additionalEntryPoints);
@@ -117049,7 +116976,7 @@ ${externalDependencies.map((dep) => {
117049
116976
  if (formattedPath.toUpperCase().startsWith("C:")) {
117050
116977
  formattedPath = formattedPath.substring(2);
117051
116978
  }
117052
- let propertyKey = (0, import_devkit2.joinPathFragments)(
116979
+ let propertyKey = (0, import_devkit.joinPathFragments)(
117053
116980
  filePath.path,
117054
116981
  removeExtension(filePath.name)
117055
116982
  ).replaceAll("\\", "/").replaceAll(formattedPath, "").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
@@ -117058,19 +116985,19 @@ ${externalDependencies.map((dep) => {
117058
116985
  propertyKey = propertyKey.substring(1);
117059
116986
  }
117060
116987
  console.debug(
117061
- `Trying to add entry point ${propertyKey} at "${(0, import_devkit2.joinPathFragments)(
116988
+ `Trying to add entry point ${propertyKey} at "${(0, import_devkit.joinPathFragments)(
117062
116989
  filePath.path,
117063
116990
  filePath.name
117064
116991
  )}"`
117065
116992
  );
117066
116993
  if (!(propertyKey in ret)) {
117067
- ret[propertyKey] = (0, import_devkit2.joinPathFragments)(filePath.path, filePath.name);
116994
+ ret[propertyKey] = (0, import_devkit.joinPathFragments)(filePath.path, filePath.name);
117068
116995
  }
117069
116996
  }
117070
116997
  return ret;
117071
116998
  }, {});
117072
116999
  if (options.generatePackageJson !== false) {
117073
- const projectGraph = (0, import_devkit2.readCachedProjectGraph)();
117000
+ const projectGraph = (0, import_devkit.readCachedProjectGraph)();
117074
117001
  delete packageJson.dependencies;
117075
117002
  externalDependencies.forEach((externalDependency) => {
117076
117003
  const packageConfig = externalDependency.node.data;
@@ -117089,83 +117016,86 @@ ${externalDependencies.map((dep) => {
117089
117016
  packageJson.dependencies[packageName] = "latest";
117090
117017
  }
117091
117018
  });
117019
+ const distPaths = _isFunction(options.getConfig) ? [""] : Object.keys(options.getConfig).map((key) => `${key}/`);
117092
117020
  packageJson.type = "module";
117093
- packageJson.exports ??= {
117094
- ".": {
117095
- import: {
117096
- types: "./dist/modern/index.d.ts",
117097
- default: "./dist/modern/index.js"
117098
- },
117099
- require: {
117100
- types: "./dist/modern/index.d.cts",
117101
- default: "./dist/modern/index.cjs"
117102
- },
117103
- default: {
117104
- types: "./dist/modern/index.d.ts",
117105
- default: "./dist/modern/index.js"
117021
+ if (distPaths.length > 1) {
117022
+ packageJson.exports ??= {
117023
+ ".": {
117024
+ import: {
117025
+ types: `./${distPaths[0]}index.d.ts`,
117026
+ default: `./${distPaths[0]}index.js`
117027
+ },
117028
+ require: {
117029
+ types: `./${distPaths[0]}index.d.cts`,
117030
+ default: `./${distPaths[0]}index.cjs`
117031
+ },
117032
+ default: {
117033
+ types: `./${distPaths[0]}index.d.ts`,
117034
+ default: `./${distPaths[0]}index.js`
117035
+ },
117036
+ ...(options.additionalEntryPoints ?? []).map((entryPoint) => ({
117037
+ [removeExtension(entryPoint).replace(sourceRoot, "")]: {
117038
+ types: (0, import_path4.join)(
117039
+ `./${distPaths[0]}`,
117040
+ `${removeExtension(entryPoint.replace(sourceRoot, ""))}.d.ts`
117041
+ ),
117042
+ default: (0, import_path4.join)(
117043
+ `./${distPaths[0]}`,
117044
+ `${removeExtension(entryPoint.replace(sourceRoot, ""))}.js`
117045
+ )
117046
+ }
117047
+ }))
117106
117048
  },
117107
- ...(options.additionalEntryPoints ?? []).map((entryPoint) => ({
117108
- [removeExtension(entryPoint).replace(sourceRoot, "")]: {
117109
- types: (0, import_path4.join)(
117110
- "./dist/modern",
117111
- `${removeExtension(entryPoint.replace(sourceRoot, ""))}.d.ts`
117112
- ),
117113
- default: (0, import_path4.join)(
117114
- "./dist/modern",
117115
- `${removeExtension(entryPoint.replace(sourceRoot, ""))}.js`
117116
- )
117049
+ "./package.json": "./package.json"
117050
+ };
117051
+ packageJson.exports = Object.keys(entry).reduce(
117052
+ (ret, key) => {
117053
+ let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
117054
+ packageJsonKey = packageJsonKey.replaceAll("/index", "");
117055
+ if (!ret[packageJsonKey]) {
117056
+ ret[packageJsonKey] = {
117057
+ import: {
117058
+ types: `./${distPaths[0]}index.d.ts`,
117059
+ default: `./${distPaths[0]}${key}.js`
117060
+ },
117061
+ require: {
117062
+ types: `./${distPaths[0]}index.d.cts`,
117063
+ default: `./${distPaths[0]}${key}.cjs`
117064
+ },
117065
+ default: {
117066
+ types: `./${distPaths[0]}index.d.ts`,
117067
+ default: `./${distPaths[0]}${key}.js`
117068
+ }
117069
+ };
117117
117070
  }
117118
- }))
117119
- },
117120
- "./package.json": "./package.json"
117121
- };
117122
- packageJson.exports = Object.keys(entry).reduce(
117123
- (ret, key) => {
117124
- let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
117125
- packageJsonKey = packageJsonKey.replaceAll("/index", "");
117126
- if (!ret[packageJsonKey]) {
117127
- ret[packageJsonKey] = {
117128
- import: {
117129
- types: "./dist/modern/index.d.ts",
117130
- default: `./dist/modern/${key}.js`
117131
- },
117132
- require: {
117133
- types: "./dist/modern/index.d.cts",
117134
- default: `./dist/modern/${key}.cjs`
117135
- },
117136
- default: {
117137
- types: "./dist/modern/index.d.ts",
117138
- default: `./dist/modern/${key}.js`
117139
- }
117140
- };
117071
+ return ret;
117072
+ },
117073
+ packageJson.exports
117074
+ );
117075
+ packageJson.funding ??= workspacePackageJson.funding;
117076
+ packageJson.types ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`;
117077
+ packageJson.typings ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`;
117078
+ packageJson.typescript ??= {
117079
+ definition: `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.d.ts`
117080
+ };
117081
+ packageJson.main ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.cjs`;
117082
+ packageJson.module ??= `${distPaths.length > 1 ? distPaths[1] : distPaths[0]}index.js`;
117083
+ options.platform && options.platform !== "node" && (packageJson.browser ??= `${distPaths[0]}index.global.js`);
117084
+ if (options.includeSrc === true) {
117085
+ let distSrc = sourceRoot.replace(projectRoot, "");
117086
+ if (distSrc.startsWith("/")) {
117087
+ distSrc = distSrc.substring(1);
117141
117088
  }
117142
- return ret;
117143
- },
117144
- packageJson.exports
117145
- );
117146
- packageJson.funding ??= workspacePackageJson.funding;
117147
- packageJson.types ??= "dist/legacy/index.d.ts";
117148
- packageJson.typings ??= "dist/legacy/index.d.ts";
117149
- packageJson.typescript ??= {
117150
- definition: "dist/legacy/index.d.ts"
117151
- };
117152
- packageJson.main ??= "dist/legacy/index.cjs";
117153
- packageJson.module ??= "dist/legacy/index.js";
117154
- options.platform && options.platform !== "node" && (packageJson.browser ??= "dist/modern/index.global.js");
117155
- if (options.includeSrc === true) {
117156
- let distSrc = sourceRoot.replace(projectRoot, "");
117157
- if (distSrc.startsWith("/")) {
117158
- distSrc = distSrc.substring(1);
117159
- }
117160
- packageJson.source ??= `${(0, import_path4.join)(distSrc, "index.ts").replaceAll(
117161
- "\\",
117162
- "/"
117163
- )}`;
117164
- }
117165
- packageJson.sideEffects ??= false;
117166
- packageJson.files ??= ["dist/**/*"];
117167
- if (options.includeSrc === true && !packageJson.files.includes("src")) {
117168
- packageJson.files.push("src/**/*");
117089
+ packageJson.source ??= `${(0, import_path4.join)(distSrc, "index.ts").replaceAll(
117090
+ "\\",
117091
+ "/"
117092
+ )}`;
117093
+ }
117094
+ packageJson.sideEffects ??= false;
117095
+ packageJson.files ??= ["dist/**/*"];
117096
+ if (options.includeSrc === true && !packageJson.files.includes("src")) {
117097
+ packageJson.files.push("src/**/*");
117098
+ }
117169
117099
  }
117170
117100
  packageJson.publishConfig ??= {
117171
117101
  access: "public"
@@ -117194,10 +117124,10 @@ ${externalDependencies.map((dep) => {
117194
117124
  }
117195
117125
  if (options.includeSrc === true) {
117196
117126
  const files = globSync([
117197
- (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
117198
- (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
117199
- (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.js"),
117200
- (0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.jsx")
117127
+ (0, import_devkit.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
117128
+ (0, import_devkit.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
117129
+ (0, import_devkit.joinPathFragments)(context.root, options.outputPath, "src/**/*.js"),
117130
+ (0, import_devkit.joinPathFragments)(context.root, options.outputPath, "src/**/*.jsx")
117201
117131
  ]);
117202
117132
  await Promise.allSettled(
117203
117133
  files.map(
@@ -117269,10 +117199,12 @@ ${options.banner}
117269
117199
  outputPath: options.outputPath,
117270
117200
  entry
117271
117201
  };
117272
- const config = (0, import_tsup.defineConfig)([
117273
- getConfig(context.root, projectRoot, legacyConfig, getConfigOptions),
117274
- getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
117275
- ]);
117202
+ const getConfigFns = _isFunction(options.getConfig) ? [options.getConfig] : Object.keys(options.getConfig).map((key) => options.getConfig[key]);
117203
+ const config = (0, import_tsup.defineConfig)(
117204
+ getConfigFns.map(
117205
+ (getConfigFn) => getConfig(context.root, projectRoot, getConfigFn, getConfigOptions)
117206
+ )
117207
+ );
117276
117208
  if (typeof config === "function") {
117277
117209
  await build(await Promise.resolve(config({})));
117278
117210
  } else {
@@ -117312,7 +117244,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
117312
117244
  );
117313
117245
  tsConfig.options.pathsBasePath = workspaceRoot;
117314
117246
  if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
117315
- tsConfig.options.tsBuildInfoFile = (0, import_devkit2.joinPathFragments)(
117247
+ tsConfig.options.tsBuildInfoFile = (0, import_devkit.joinPathFragments)(
117316
117248
  outputPath,
117317
117249
  "tsconfig.tsbuildinfo"
117318
117250
  );
@@ -117359,6 +117291,7 @@ var applyDefaultOptions = (options) => {
117359
117291
  options.define ??= {};
117360
117292
  options.env ??= {};
117361
117293
  options.verbose ??= !!process.env.CI;
117294
+ options.getConfig ??= defaultConfig;
117362
117295
  return options;
117363
117296
  };
117364
117297
  var executor_default = withRunExecutor(
@@ -117371,6 +117304,13 @@ var executor_default = withRunExecutor(
117371
117304
  }
117372
117305
  }
117373
117306
  );
117307
+ var _isFunction = (value) => {
117308
+ try {
117309
+ return value instanceof Function || typeof value === "function" || !!(value && value.constructor && value?.call && value?.apply);
117310
+ } catch (e) {
117311
+ return false;
117312
+ }
117313
+ };
117374
117314
  // Annotate the CommonJS export names for ESM import in node:
117375
117315
  0 && (module.exports = {
117376
117316
  applyDefaultOptions,
@@ -38,4 +38,7 @@ export type TsupExecutorSchema = Omit<
38
38
  treeshake?: boolean;
39
39
  generatePackageJson?: boolean;
40
40
  emitOnAll?: boolean;
41
+ getConfig:
42
+ | Record<string, (params: GetConfigParams) => Options>
43
+ | ((params: GetConfigParams) => Options);
41
44
  };