@storm-software/workspace-tools 1.60.23 → 1.61.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.60.23",
3
+ "version": "1.61.0",
4
4
  "private": false,
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "keywords": [
package/src/base/index.js CHANGED
@@ -215471,7 +215471,7 @@ var init_get_log_level = __esm({
215471
215471
  return LogLevel.INFO;
215472
215472
  }
215473
215473
  };
215474
- getLogLevelLabel = (logLevel) => {
215474
+ getLogLevelLabel = (logLevel = LogLevel.INFO) => {
215475
215475
  if (logLevel >= LogLevel.ALL) {
215476
215476
  return LogLevelLabel.ALL;
215477
215477
  }
@@ -215797,14 +215797,14 @@ var init_set_env = __esm({
215797
215797
  if (extension[key2]) {
215798
215798
  const result = key2?.replace(
215799
215799
  /([A-Z])+/g,
215800
- (input) => input ? input[0].toUpperCase() + input.slice(1) : ""
215800
+ (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
215801
215801
  ).split(/(?=[A-Z])|[\.\-\s_]/).map((x5) => x5.toLowerCase()) ?? [];
215802
215802
  let extensionKey;
215803
215803
  if (result.length === 0) {
215804
215804
  return;
215805
215805
  }
215806
215806
  if (result.length === 1) {
215807
- extensionKey = result[0].toUpperCase();
215807
+ extensionKey = result[0]?.toUpperCase() ?? "";
215808
215808
  } else {
215809
215809
  extensionKey = result.reduce((ret, part) => {
215810
215810
  return `${ret}_${part.toLowerCase()}`;
@@ -400845,9 +400845,13 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
400845
400845
  sourceRoot = context.sourceRoot;
400846
400846
  } else {
400847
400847
  const projectConfig = tokenizerOptions;
400848
- projectName = projectConfig.name;
400849
400848
  projectRoot = projectConfig.root;
400850
- sourceRoot = projectConfig.sourceRoot;
400849
+ if (projectConfig.name) {
400850
+ projectName = projectConfig.name;
400851
+ }
400852
+ if (projectConfig.sourceRoot) {
400853
+ sourceRoot = projectConfig.sourceRoot;
400854
+ }
400851
400855
  }
400852
400856
  if (tokenizerOptions.config) {
400853
400857
  const configKeys = Object.keys(tokenizerOptions.config);
@@ -400871,7 +400875,7 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
400871
400875
  if (result.includes("{workspaceRoot}")) {
400872
400876
  result = result.replaceAll(
400873
400877
  "{workspaceRoot}",
400874
- tokenizerOptions.workspaceRoot ?? findWorkspaceRootSafe()
400878
+ tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
400875
400879
  );
400876
400880
  }
400877
400881
  return result;
@@ -400894,7 +400898,7 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
400894
400898
  if (result.includes("{workspaceRoot}")) {
400895
400899
  result = result.replaceAll(
400896
400900
  "{workspaceRoot}",
400897
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config.workspaceRoot ?? findWorkspaceRootSafe()
400901
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
400898
400902
  );
400899
400903
  }
400900
400904
  return result;
@@ -400919,7 +400923,6 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
400919
400923
  };
400920
400924
 
400921
400925
  // packages/workspace-tools/src/base/base-executor.ts
400922
- init_src2();
400923
400926
  var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
400924
400927
  const stopwatch = getStopwatch(name);
400925
400928
  let options8 = _options;
@@ -400932,10 +400935,10 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
400932
400935
  "The Build process failed because the context is not valid. Please run this command from a workspace."
400933
400936
  );
400934
400937
  }
400935
- const workspaceRoot = findWorkspaceRootSafe();
400936
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
400937
- const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
400938
- const projectName = context.projectsConfigurations.projects[context.projectName].name;
400938
+ const workspaceRoot = findWorkspaceRoot();
400939
+ const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
400940
+ const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
400941
+ const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
400939
400942
  if (!executorOptions.skipReadingConfig) {
400940
400943
  const { loadStormConfig: loadStormConfig2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
400941
400944
  writeDebug(
@@ -401066,7 +401069,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
401066
401069
  writeTrace(
401067
401070
  config,
401068
401071
  `Generator schema options \u2699\uFE0F
401069
- ${Object.keys(options8).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
401072
+ ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
401070
401073
  );
401071
401074
  const tokenized = applyWorkspaceTokens(
401072
401075
  options8,
@@ -401258,7 +401261,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema2) {
401258
401261
  const projectConfig = {
401259
401262
  root: options8.directory,
401260
401263
  projectType: "library",
401261
- sourceRoot: (0, import_devkit2.joinPathFragments)(options8.directory, "src"),
401264
+ sourceRoot: (0, import_devkit2.joinPathFragments)(options8.directory ?? "", "src"),
401262
401265
  targets: {
401263
401266
  build: {
401264
401267
  executor: schema2.buildExecutor,
@@ -401297,7 +401300,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema2) {
401297
401300
  test: {}
401298
401301
  }
401299
401302
  };
401300
- if (schema2.platform) {
401303
+ if (schema2.platform && projectConfig?.targets?.build) {
401301
401304
  projectConfig.targets.build.options.platform = schema2.platform;
401302
401305
  }
401303
401306
  createProjectTsConfigJson(tree, options8);
@@ -401316,9 +401319,15 @@ async function typeScriptLibraryGeneratorFn(tree, schema2) {
401316
401319
  description = packageJson.description;
401317
401320
  }
401318
401321
  }
401322
+ if (!options8.importPath) {
401323
+ options8.importPath = options8.name;
401324
+ }
401319
401325
  const packageJsonPath = (0, import_devkit2.joinPathFragments)(options8.projectRoot, "package.json");
401320
401326
  if (tree.exists(packageJsonPath)) {
401321
401327
  (0, import_devkit2.updateJson)(tree, packageJsonPath, (json2) => {
401328
+ if (!options8.importPath) {
401329
+ options8.importPath = options8.name;
401330
+ }
401322
401331
  json2.name = options8.importPath;
401323
401332
  json2.version = "0.0.1";
401324
401333
  if (json2.private && (options8.publishable || options8.rootProject)) {
@@ -401357,14 +401366,14 @@ async function typeScriptLibraryGeneratorFn(tree, schema2) {
401357
401366
  }
401358
401367
  });
401359
401368
  }
401360
- if (tree.exists("package.json")) {
401369
+ if (tree.exists("package.json") && options8.importPath) {
401361
401370
  (0, import_devkit2.updateJson)(tree, "package.json", (json2) => ({
401362
401371
  ...json2,
401363
401372
  pnpm: {
401364
401373
  ...json2?.pnpm,
401365
401374
  overrides: {
401366
401375
  ...json2?.pnpm?.overrides,
401367
- [options8.importPath]: "workspace:*"
401376
+ [options8.importPath ?? ""]: "workspace:*"
401368
401377
  }
401369
401378
  }
401370
401379
  }));
@@ -401463,7 +401472,7 @@ async function addLint(tree, options8) {
401463
401472
  ruleSeverity = value[0];
401464
401473
  ruleOptions = value[1];
401465
401474
  } else {
401466
- ruleSeverity = value;
401475
+ ruleSeverity = value ?? "error";
401467
401476
  ruleOptions = {};
401468
401477
  }
401469
401478
  if (options8.bundler === "esbuild") {
@@ -171961,7 +171961,13 @@ var import_node_child_process = require("node:child_process");
171961
171961
  var LARGE_BUFFER = 1024 * 1e6;
171962
171962
  async function npmPublishExecutorFn(options8, context) {
171963
171963
  const isDryRun = process.env.NX_DRY_RUN === "true" || options8.dryRun || false;
171964
+ if (!context.projectName) {
171965
+ throw new Error("The executor requires a projectName.");
171966
+ }
171964
171967
  const projectConfig = context.projectsConfigurations?.projects?.[context.projectName];
171968
+ if (!projectConfig) {
171969
+ throw new Error(`Could not find project configuration for ${context.projectName}`);
171970
+ }
171965
171971
  const packageRoot = (0, import_devkit.joinPathFragments)(context.root, options8.packageRoot ?? projectConfig.root);
171966
171972
  const packageJsonPath = (0, import_devkit.joinPathFragments)(packageRoot, "package.json");
171967
171973
  const projectPackageJson = (0, import_devkit.readJsonFile)(packageJsonPath);
@@ -398365,7 +398365,7 @@ var init_get_log_level = __esm({
398365
398365
  return LogLevel.INFO;
398366
398366
  }
398367
398367
  };
398368
- getLogLevelLabel = (logLevel) => {
398368
+ getLogLevelLabel = (logLevel = LogLevel.INFO) => {
398369
398369
  if (logLevel >= LogLevel.ALL) {
398370
398370
  return LogLevelLabel.ALL;
398371
398371
  }
@@ -398691,14 +398691,14 @@ var init_set_env = __esm({
398691
398691
  if (extension[key2]) {
398692
398692
  const result = key2?.replace(
398693
398693
  /([A-Z])+/g,
398694
- (input) => input ? input[0].toUpperCase() + input.slice(1) : ""
398694
+ (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
398695
398695
  ).split(/(?=[A-Z])|[\.\-\s_]/).map((x5) => x5.toLowerCase()) ?? [];
398696
398696
  let extensionKey;
398697
398697
  if (result.length === 0) {
398698
398698
  return;
398699
398699
  }
398700
398700
  if (result.length === 1) {
398701
- extensionKey = result[0].toUpperCase();
398701
+ extensionKey = result[0]?.toUpperCase() ?? "";
398702
398702
  } else {
398703
398703
  extensionKey = result.reduce((ret, part) => {
398704
398704
  return `${ret}_${part.toLowerCase()}`;
@@ -462269,9 +462269,13 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
462269
462269
  sourceRoot = context.sourceRoot;
462270
462270
  } else {
462271
462271
  const projectConfig = tokenizerOptions;
462272
- projectName = projectConfig.name;
462273
462272
  projectRoot = projectConfig.root;
462274
- sourceRoot = projectConfig.sourceRoot;
462273
+ if (projectConfig.name) {
462274
+ projectName = projectConfig.name;
462275
+ }
462276
+ if (projectConfig.sourceRoot) {
462277
+ sourceRoot = projectConfig.sourceRoot;
462278
+ }
462275
462279
  }
462276
462280
  if (tokenizerOptions.config) {
462277
462281
  const configKeys = Object.keys(tokenizerOptions.config);
@@ -462295,7 +462299,7 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
462295
462299
  if (result.includes("{workspaceRoot}")) {
462296
462300
  result = result.replaceAll(
462297
462301
  "{workspaceRoot}",
462298
- tokenizerOptions.workspaceRoot ?? findWorkspaceRootSafe()
462302
+ tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
462299
462303
  );
462300
462304
  }
462301
462305
  return result;
@@ -462320,7 +462324,6 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
462320
462324
  };
462321
462325
 
462322
462326
  // packages/workspace-tools/src/base/base-executor.ts
462323
- init_src2();
462324
462327
  var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
462325
462328
  const stopwatch = getStopwatch(name);
462326
462329
  let options8 = _options;
@@ -462333,10 +462336,10 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
462333
462336
  "The Build process failed because the context is not valid. Please run this command from a workspace."
462334
462337
  );
462335
462338
  }
462336
- const workspaceRoot = findWorkspaceRootSafe();
462337
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
462338
- const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
462339
- const projectName = context.projectsConfigurations.projects[context.projectName].name;
462339
+ const workspaceRoot = findWorkspaceRoot();
462340
+ const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
462341
+ const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
462342
+ const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
462340
462343
  if (!executorOptions.skipReadingConfig) {
462341
462344
  const { loadStormConfig: loadStormConfig2 } = await Promise.resolve().then(() => (init_src2(), src_exports2));
462342
462345
  writeDebug(
@@ -462431,13 +462434,13 @@ var _isFunction = (value) => {
462431
462434
 
462432
462435
  // packages/workspace-tools/src/utils/file-path-utils.ts
462433
462436
  var removeExtension = (filePath) => {
462434
- return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
462437
+ return !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
462435
462438
  };
462436
462439
 
462437
462440
  // packages/workspace-tools/src/utils/get-project-configurations.ts
462438
462441
  var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
462439
462442
  init_src2();
462440
- var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(findWorkspaceRootSafe());
462443
+ var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(findWorkspaceRoot());
462441
462444
 
462442
462445
  // packages/workspace-tools/src/utils/get-project-deps.ts
462443
462446
  function getExtraDependencies(projectName, graph) {
@@ -462445,18 +462448,19 @@ function getExtraDependencies(projectName, graph) {
462445
462448
  recur(projectName);
462446
462449
  function recur(currProjectName) {
462447
462450
  const allDeps = graph.dependencies[currProjectName];
462448
- const externalDeps = allDeps.reduce((acc, node) => {
462449
- const found = graph.externalNodes[node.target];
462450
- if (found)
462451
+ const externalDeps = allDeps?.reduce((acc, node) => {
462452
+ const found = graph.externalNodes?.[node.target];
462453
+ if (found) {
462451
462454
  acc.push(found);
462455
+ }
462452
462456
  return acc;
462453
- }, []);
462454
- const internalDeps = allDeps.reduce((acc, node) => {
462457
+ }, []) ?? [];
462458
+ const internalDeps = allDeps?.reduce((acc, node) => {
462455
462459
  const found = graph.nodes[node.target];
462456
462460
  if (found)
462457
462461
  acc.push(found);
462458
462462
  return acc;
462459
- }, []);
462463
+ }, []) ?? [];
462460
462464
  for (const externalDep of externalDeps) {
462461
462465
  deps.set(externalDep.name, {
462462
462466
  name: externalDep.name,
@@ -462471,9 +462475,6 @@ function getExtraDependencies(projectName, graph) {
462471
462475
  return Array.from(deps.values());
462472
462476
  }
462473
462477
 
462474
- // packages/workspace-tools/src/executors/tsup/executor.ts
462475
- init_src2();
462476
-
462477
462478
  // packages/workspace-tools/src/utils/run-tsup-build.ts
462478
462479
  var import_node_path4 = require("node:path");
462479
462480
  var import_esbuild_decorators = __toESM(require_src6());
@@ -462669,17 +462670,17 @@ var applyDefaultOptions = (options8) => {
462669
462670
  return options8;
462670
462671
  };
462671
462672
  var runTsupBuild = async (context, config, options8) => {
462672
- const stormEnv = Object.keys(options8.env).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
462673
- ret[key2] = options8.env[key2];
462673
+ const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
462674
+ ret[key2] = options8.env?.[key2];
462674
462675
  return ret;
462675
462676
  }, {});
462676
- options8.plugins.push(
462677
+ options8.plugins?.push(
462677
462678
  (0, import_esbuild_decorators.esbuildDecorators)({
462678
462679
  tsconfig: options8.tsConfig,
462679
462680
  cwd: config.workspaceRoot
462680
462681
  })
462681
462682
  );
462682
- options8.plugins.push(environmentPlugin(stormEnv));
462683
+ options8.plugins?.push(environmentPlugin(stormEnv));
462683
462684
  const getConfigOptions = {
462684
462685
  ...options8,
462685
462686
  main: context.main,
@@ -462697,7 +462698,7 @@ var runTsupBuild = async (context, config, options8) => {
462697
462698
  },
462698
462699
  dtsTsConfig: getNormalizedTsConfig(
462699
462700
  context,
462700
- config.workspaceRoot,
462701
+ config.workspaceRoot ?? ".",
462701
462702
  options8.outputPath,
462702
462703
  createTypeScriptCompilationOptions(
462703
462704
  (0, import_normalize_options.normalizeOptions)(
@@ -462707,9 +462708,9 @@ var runTsupBuild = async (context, config, options8) => {
462707
462708
  main: context.main,
462708
462709
  transformers: []
462709
462710
  },
462710
- config.workspaceRoot,
462711
+ config.workspaceRoot ?? ".",
462711
462712
  context.sourceRoot,
462712
- config.workspaceRoot
462713
+ config.workspaceRoot ?? "."
462713
462714
  ),
462714
462715
  context.projectName
462715
462716
  )
@@ -462732,7 +462733,7 @@ ${options8.banner}
462732
462733
  const getConfigFns = [options8.getConfig];
462733
462734
  const tsupConfig = (0, import_tsup.defineConfig)(
462734
462735
  getConfigFns.map(
462735
- (getConfigFn) => getConfig(config.workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
462736
+ (getConfigFn) => getConfig(config.workspaceRoot ?? ".", context.projectRoot, getConfigFn, getConfigOptions)
462736
462737
  )
462737
462738
  );
462738
462739
  if (_isFunction2(tsupConfig)) {
@@ -462741,7 +462742,7 @@ ${options8.banner}
462741
462742
  } else {
462742
462743
  await build(tsupConfig, config);
462743
462744
  }
462744
- } else if (getLogLevel(config?.logLevel) >= LogLevel.WARN) {
462745
+ } else if (getLogLevel(config?.logLevel ?? "debug") >= LogLevel.WARN) {
462745
462746
  writeWarning(
462746
462747
  config,
462747
462748
  "The Build process did not run because no `getConfig` parameter was provided"
@@ -462842,9 +462843,9 @@ ${Object.keys(options8).map(
462842
462843
  "The Build process failed because the context is not valid. Please run this command from a workspace."
462843
462844
  );
462844
462845
  }
462845
- const workspaceRoot = findWorkspaceRootSafe();
462846
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
462847
- const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
462846
+ const workspaceRoot = findWorkspaceRoot();
462847
+ const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
462848
+ const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
462848
462849
  if (options8.clean !== false) {
462849
462850
  writeInfo(config, `\u{1F9F9} Cleaning output path: ${options8.outputPath}`);
462850
462851
  (0, import_fs_extra.removeSync)(options8.outputPath);
@@ -462899,7 +462900,7 @@ ${Object.keys(options8).map(
462899
462900
  const externalDependencies = options8.external.reduce(
462900
462901
  (ret, name) => {
462901
462902
  if (!packageJson?.devDependencies?.[name]) {
462902
- const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
462903
+ const externalNode = context.projectGraph?.externalNodes?.[`npm:${name}`];
462903
462904
  if (externalNode) {
462904
462905
  ret.push({
462905
462906
  name,
@@ -462912,7 +462913,7 @@ ${Object.keys(options8).map(
462912
462913
  },
462913
462914
  []
462914
462915
  );
462915
- const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
462916
+ const implicitDependencies = context.projectsConfigurations.projects[context.projectName]?.implicitDependencies;
462916
462917
  const internalDependencies = [];
462917
462918
  const projectConfigs = await Promise.resolve(getProjectConfigurations());
462918
462919
  if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
@@ -462925,7 +462926,7 @@ ${Object.keys(options8).map(
462925
462926
  const projectConfig = projectConfigs[key2];
462926
462927
  if (projectConfig?.targets?.build) {
462927
462928
  const projectPackageJson = (0, import_devkit3.readJsonFile)(projectConfig.targets?.build.options.project);
462928
- if (projectPackageJson?.name && !options8.external.includes(projectPackageJson.name)) {
462929
+ if (projectPackageJson?.name && !options8.external?.includes(projectPackageJson.name)) {
462929
462930
  ret.push(projectPackageJson.name);
462930
462931
  internalDependencies.push(projectPackageJson.name);
462931
462932
  }
@@ -462993,7 +462994,7 @@ ${externalDependencies.map((dep) => {
462993
462994
  packageJson.dependencies = void 0;
462994
462995
  for (const externalDependency of externalDependencies) {
462995
462996
  const packageConfig = externalDependency?.node?.data;
462996
- if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
462997
+ if (packageConfig?.packageName && !!(projectGraph.externalNodes?.[externalDependency.node.name]?.type === "npm")) {
462997
462998
  const { packageName, version } = packageConfig;
462998
462999
  if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
462999
463000
  packageJson.dependencies ??= {};
@@ -463041,16 +463042,16 @@ ${externalDependencies.map((dep) => {
463041
463042
  }
463042
463043
  packageJson.exports[`./${formattedEntryPoint}`] = {
463043
463044
  import: {
463044
- types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.d.ts`,
463045
- default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.js`
463045
+ types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0] ?? "./", formattedEntryPoint)}.d.ts`,
463046
+ default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0] ?? "./", formattedEntryPoint)}.js`
463046
463047
  },
463047
463048
  require: {
463048
- types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.d.cts`,
463049
- default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.cjs`
463049
+ types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0] ?? "./", formattedEntryPoint)}.d.cts`,
463050
+ default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0] ?? "./", formattedEntryPoint)}.cjs`
463050
463051
  },
463051
463052
  default: {
463052
- types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.d.ts`,
463053
- default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0], formattedEntryPoint)}.js`
463053
+ types: `./${(0, import_devkit3.joinPathFragments)(distPaths[0] ?? "./", formattedEntryPoint)}.d.ts`,
463054
+ default: `./${(0, import_devkit3.joinPathFragments)(distPaths[0] ?? "./", formattedEntryPoint)}.js`
463054
463055
  }
463055
463056
  };
463056
463057
  }
@@ -463100,10 +463101,10 @@ ${externalDependencies.map((dep) => {
463100
463101
  }
463101
463102
  if (options8.includeSrc === true) {
463102
463103
  const files = globSync([
463103
- (0, import_devkit3.joinPathFragments)(config.workspaceRoot, options8.outputPath, "src/**/*.ts"),
463104
- (0, import_devkit3.joinPathFragments)(config.workspaceRoot, options8.outputPath, "src/**/*.tsx"),
463105
- (0, import_devkit3.joinPathFragments)(config.workspaceRoot, options8.outputPath, "src/**/*.js"),
463106
- (0, import_devkit3.joinPathFragments)(config.workspaceRoot, options8.outputPath, "src/**/*.jsx")
463104
+ (0, import_devkit3.joinPathFragments)(workspaceRoot, options8.outputPath, "src/**/*.ts"),
463105
+ (0, import_devkit3.joinPathFragments)(workspaceRoot, options8.outputPath, "src/**/*.tsx"),
463106
+ (0, import_devkit3.joinPathFragments)(workspaceRoot, options8.outputPath, "src/**/*.js"),
463107
+ (0, import_devkit3.joinPathFragments)(workspaceRoot, options8.outputPath, "src/**/*.jsx")
463107
463108
  ]);
463108
463109
  await Promise.allSettled(
463109
463110
  files.map(
@@ -463123,10 +463124,11 @@ ${(0, import_node_fs3.readFileSync)(file, "utf-8")}`,
463123
463124
  {
463124
463125
  main: entryPoint,
463125
463126
  projectRoot,
463127
+ // biome-ignore lint/style/noNonNullAssertion: <explanation>
463126
463128
  projectName: context.projectName,
463127
463129
  sourceRoot
463128
463130
  },
463129
- config,
463131
+ config ?? {},
463130
463132
  options8
463131
463133
  )
463132
463134
  )
@@ -26,8 +26,8 @@ export type TsupExecutorSchema = Omit<
26
26
  debug?: boolean;
27
27
  banner?: string;
28
28
  verbose?: boolean;
29
- define?: Record<string, string>;
30
- env?: Record<string, string>;
29
+ define?: Record<string, string | undefined | null>;
30
+ env?: Record<string, string | undefined | null>;
31
31
  apiReport?: boolean;
32
32
  docModel?: boolean;
33
33
  tsdocMetadata?: boolean;
@@ -23,9 +23,9 @@
23
23
  "type": "string",
24
24
  "description": "The path to the `tsconfig.json` file.",
25
25
  "x-completion-type": "file",
26
- "x-completion-glob": "tsconfig.*.json",
26
+ "x-completion-glob": "tsconfig*.json",
27
27
  "x-priority": "important",
28
- "default": "tsconfig.json"
28
+ "default": "{projectRoot}/tsconfig.json"
29
29
  },
30
30
  "additionalEntryPoints": {
31
31
  "type": "array",
@@ -99,10 +99,7 @@
99
99
  "format": {
100
100
  "type": "array",
101
101
  "description": "The output format for the generated JavaScript files. There are currently three possible values that can be configured: iife, cjs, and esm.",
102
- "default": [
103
- "cjs",
104
- "esm"
105
- ],
102
+ "default": ["cjs", "esm"],
106
103
  "items": {
107
104
  "type": "string"
108
105
  }
@@ -115,12 +112,7 @@
115
112
  "platform": {
116
113
  "type": "string",
117
114
  "description": "Platform target for outputs.",
118
- "enum": [
119
- "browser",
120
- "neutral",
121
- "node",
122
- "worker"
123
- ],
115
+ "enum": ["browser", "neutral", "node", "worker"],
124
116
  "default": "neutral"
125
117
  },
126
118
  "banner": {
@@ -192,11 +184,7 @@
192
184
  }
193
185
  }
194
186
  },
195
- "required": [
196
- "tsConfig",
197
- "platform",
198
- "banner"
199
- ],
187
+ "required": ["tsConfig", "platform", "banner"],
200
188
  "definitions": {
201
189
  "assetPattern": {
202
190
  "oneOf": [
@@ -224,11 +212,7 @@
224
212
  }
225
213
  },
226
214
  "additionalProperties": false,
227
- "required": [
228
- "glob",
229
- "input",
230
- "output"
231
- ]
215
+ "required": ["glob", "input", "output"]
232
216
  },
233
217
  {
234
218
  "type": "string"
@@ -236,4 +220,4 @@
236
220
  ]
237
221
  }
238
222
  }
239
- }
223
+ }