@storm-software/workspace-tools 1.16.12 → 1.16.14

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/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## [1.16.13](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.16.12...workspace-tools-v1.16.13) (2023-11-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **workspace-tools:** Add back the `declarationDir` value to the compilerOptions for dts build ([b02402d](https://github.com/storm-software/storm-ops/commit/b02402d6ef3c57b217771b2f086058c329c0b5af))
7
+
8
+
9
+ ### Reverts
10
+
11
+ * **workspace-tools:** Revert tsup patch back to previous version before updates to api-extractor ([c8a83f1](https://github.com/storm-software/storm-ops/commit/c8a83f1ca6739248576bf81d791d02d02a09acb4))
12
+
13
+ ## [1.16.12](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.16.11...workspace-tools-v1.16.12) (2023-11-29)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **workspace-tools:** Update tmp path on tsup patch ([2dd3551](https://github.com/storm-software/storm-ops/commit/2dd3551988d0c6ee4236123c4eeb7047f53cf666))
19
+
1
20
  ## [1.16.11](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.16.10...workspace-tools-v1.16.11) (2023-11-29)
2
21
 
3
22
 
package/README.md CHANGED
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
16
16
 
17
17
  <h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
18
18
 
19
- [![Version](https://img.shields.io/badge/version-1.16.10-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.16.12-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
20
20
  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
21
21
 
22
22
  <h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.</h3><br />
package/index.js CHANGED
@@ -40019,9 +40019,9 @@ var require_brace_expansion2 = __commonJS({
40019
40019
  }
40020
40020
  });
40021
40021
 
40022
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-EPAEWGCP.js
40022
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/chunk-EPAEWGCP.js
40023
40023
  var require_chunk_EPAEWGCP = __commonJS({
40024
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
40024
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
40025
40025
  "use strict";
40026
40026
  Object.defineProperty(exports, "__esModule", { value: true });
40027
40027
  var version = "8.0.0";
@@ -40481,9 +40481,9 @@ var require_resolve_from = __commonJS({
40481
40481
  }
40482
40482
  });
40483
40483
 
40484
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-GQ77QZBO.js
40484
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/chunk-GQ77QZBO.js
40485
40485
  var require_chunk_GQ77QZBO = __commonJS({
40486
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
40486
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
40487
40487
  "use strict";
40488
40488
  Object.defineProperty(exports, "__esModule", { value: true });
40489
40489
  function _interopRequireDefault(obj) {
@@ -40681,13 +40681,12 @@ var require_chunk_GQ77QZBO = __commonJS({
40681
40681
  };
40682
40682
  }
40683
40683
  function ensureTempDeclarationDir(options) {
40684
- let projectFolder = packageJsonSearch(options.outDir, options.silent, "dts", logger2);
40685
- const dirPath = _path2.default.join(options.workspaceRoot, projectFolder, "tmp", "declarations");
40684
+ const dirPath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", "declaration");
40686
40685
  if (_fs2.default.existsSync(dirPath)) {
40687
40686
  return dirPath;
40688
40687
  }
40689
40688
  _fs2.default.mkdirSync(dirPath, { recursive: true });
40690
- const gitIgnorePath = _path2.default.join(options.workspaceRoot, projectFolder, "tmp", ".gitignore");
40689
+ const gitIgnorePath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", ".gitignore");
40691
40690
  writeFileSync3(gitIgnorePath, "**/*\n");
40692
40691
  return dirPath;
40693
40692
  }
@@ -40762,9 +40761,9 @@ var require_chunk_GQ77QZBO = __commonJS({
40762
40761
  }
40763
40762
  });
40764
40763
 
40765
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-UIX4URMV.js
40764
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/chunk-UIX4URMV.js
40766
40765
  var require_chunk_UIX4URMV = __commonJS({
40767
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
40766
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
40768
40767
  "use strict";
40769
40768
  Object.defineProperty(exports, "__esModule", { value: true });
40770
40769
  function _interopRequireWildcard(obj) {
@@ -41698,9 +41697,9 @@ var require_dist2 = __commonJS({
41698
41697
  }
41699
41698
  });
41700
41699
 
41701
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-7G76EW2R.js
41700
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/chunk-7G76EW2R.js
41702
41701
  var require_chunk_7G76EW2R = __commonJS({
41703
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
41702
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
41704
41703
  "use strict";
41705
41704
  Object.defineProperty(exports, "__esModule", { value: true });
41706
41705
  function _interopRequireDefault(obj) {
@@ -95506,9 +95505,9 @@ var require_chokidar = __commonJS({
95506
95505
  }
95507
95506
  });
95508
95507
 
95509
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/index.js
95508
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/index.js
95510
95509
  var require_dist5 = __commonJS({
95511
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/index.js"(exports) {
95510
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=qxnf7byziqgqhnednmsidq2bie_@microsoft+api-extractor@7.38.3_@swc+core@1._mqsjacg6tchxug6yxrkojdzkhi/node_modules/tsup/dist/index.js"(exports) {
95512
95511
  "use strict";
95513
95512
  Object.defineProperty(exports, "__esModule", { value: true });
95514
95513
  function _interopRequireDefault(obj) {
@@ -97077,7 +97076,7 @@ var require_dist5 = __commonJS({
97077
97076
  };
97078
97077
  var generateExternal = async (external, options, logger3) => {
97079
97078
  const result = [];
97080
- const pkgJsonPath = packageJsonSearch2(options.outDir, options.silent, "CLI", logger3);
97079
+ const pkgJsonPath = packageJsonSearch(options.outDir, options.silent, "CLI", logger3);
97081
97080
  for (const item of external) {
97082
97081
  if (typeof item !== "string" || !item.endsWith("package.json")) {
97083
97082
  result.push(item);
@@ -97089,7 +97088,7 @@ var require_dist5 = __commonJS({
97089
97088
  }
97090
97089
  return result;
97091
97090
  };
97092
- var packageJsonSearch2 = (outDir, silent, format2, logger3) => {
97091
+ var packageJsonSearch = (outDir, silent, format2, logger3) => {
97093
97092
  let pkgPath = outDir ? outDir : process.cwd();
97094
97093
  !silent && logger3 && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
97095
97094
  if (pkgPath) {
@@ -97124,7 +97123,7 @@ var require_dist5 = __commonJS({
97124
97123
  `\u26A1 No package.json file found, using ${pkgPath} as the output directory`
97125
97124
  );
97126
97125
  }
97127
- return pkgPath.replaceAll("\\", "/");
97126
+ return pkgPath;
97128
97127
  };
97129
97128
  async function runEsbuild(options, {
97130
97129
  format: format2,
@@ -97133,7 +97132,7 @@ var require_dist5 = __commonJS({
97133
97132
  buildDependencies,
97134
97133
  pluginContainer
97135
97134
  }) {
97136
- const pkgPath = packageJsonSearch2(options.outDir, options.silent, format2, logger3);
97135
+ const pkgPath = packageJsonSearch(options.outDir, options.silent, format2, logger3);
97137
97136
  logger3.info(format2, `\u26A1 Running ESBuild: ${pkgPath}`);
97138
97137
  const pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
97139
97138
  const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
@@ -97824,13 +97823,6 @@ var require_dist5 = __commonJS({
97824
97823
  };
97825
97824
  logger.info("tsc", "Build start");
97826
97825
  const dtsOptions = options.experimentalDts;
97827
- if (!dtsOptions.compilerOptions) {
97828
- dtsOptions.compilerOptions = {};
97829
- } else if (!dtsOptions.compilerOptions.options) {
97830
- dtsOptions.compilerOptions.options = {};
97831
- }
97832
- let tempDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
97833
- dtsOptions.compilerOptions.options.declarationDir = _path2.default.join(tempDir, "declarations");
97834
97826
  const exports2 = await emit(
97835
97827
  options,
97836
97828
  dtsOptions.compilerOptions,
@@ -97875,77 +97867,19 @@ var require_dist5 = __commonJS({
97875
97867
  throw new Error("Unknown declaration");
97876
97868
  }
97877
97869
  }
97878
- function formatDistributionExports(exports2, fromFilePath, toFilePath, logger3, options) {
97879
- let importPath = _chunkGQ77QZBOjs.trimDtsExtension.call(
97880
- void 0,
97881
- _path2.default.posix.relative(
97882
- _path2.default.posix.dirname(_path2.default.posix.normalize(
97883
- _chunkGQ77QZBOjs.slash.call(
97884
- void 0,
97885
- _path2.default.join(options.workspaceRoot, fromFilePath)
97886
- )
97887
- )),
97888
- _path2.default.posix.normalize(_chunkGQ77QZBOjs.slash.call(
97889
- void 0,
97890
- _path2.default.join(options.workspaceRoot, toFilePath)
97891
- ))
97892
- )
97893
- );
97894
- if (!importPath.match(/^\.+\//)) {
97895
- importPath = "./" + importPath;
97870
+ var logger2 = _chunk7G76EW2Rjs.createLogger.call(void 0);
97871
+ function rollupDtsFile(options, inputFilePath, dtsExtension, tsconfigFilePath) {
97872
+ let pkgPath = packageJsonSearch(options.outDir, options.silent, "dts", logger2);
97873
+ if (pkgPath.endsWith("/")) {
97874
+ pkgPath = pkgPath.slice(0, -1);
97896
97875
  }
97897
- !options.silent && logger3.info("dts", `\u26A1 Formatting Distribution Exports with Import Path: ${importPath}`);
97898
- let seen = {
97899
- named: /* @__PURE__ */ new Set(),
97900
- module: /* @__PURE__ */ new Set()
97901
- };
97902
- const lines = exports2.filter((declaration) => {
97903
- if (declaration.kind === "module") {
97904
- if (seen.module.has(declaration.moduleName)) {
97905
- return false;
97906
- }
97907
- seen.module.add(declaration.moduleName);
97908
- return true;
97909
- } else if (declaration.kind === "named") {
97910
- if (seen.named.has(declaration.name)) {
97911
- return false;
97912
- }
97913
- seen.named.add(declaration.name);
97914
- return true;
97915
- } else {
97916
- return false;
97917
- }
97918
- }).map((declaration) => formatDistributionExport(declaration, importPath)).filter(_chunkGQ77QZBOjs.truthy);
97919
- if (lines.length === 0) {
97920
- lines.push("export {};");
97921
- }
97922
- return lines.join("\n") + "\n";
97923
- }
97924
- function formatDistributionExport(declaration, dest) {
97925
- if (declaration.kind === "named") {
97926
- return [
97927
- "export",
97928
- declaration.isTypeOnly ? "type" : "",
97929
- "{",
97930
- declaration.alias,
97931
- declaration.name === declaration.alias ? "" : `as ${declaration.name}`,
97932
- "} from",
97933
- `'${dest}';`
97934
- ].filter(_chunkGQ77QZBOjs.truthy).join(" ");
97935
- } else if (declaration.kind === "module") {
97936
- return `export * from '${declaration.moduleName}';`;
97937
- }
97938
- return "";
97939
- }
97940
- var logger22 = _chunk7G76EW2Rjs.createLogger.call(void 0);
97941
- function rollupDtsFile(options, tmpDirPath, inputFilePath, outputFilePath, tsconfigFilePath) {
97942
- let projectFolder = packageJsonSearch2(options.outDir, options.silent, "dts", logger22);
97943
- !options.silent && logger22.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${projectFolder}`);
97944
- const apiReferenceProjectDir = `<projectFolder>/${_path2.default.join(
97876
+ logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${pkgPath}`);
97877
+ const apiReferenceProjectDir = _path2.default.join(
97878
+ "<projectFolder>",
97945
97879
  "docs",
97946
97880
  "api-reports",
97947
97881
  options.projectRoot
97948
- ).replaceAll("\\", "/")}`;
97882
+ ).replaceAll("\\", "/");
97949
97883
  let configObject = {
97950
97884
  mainEntryPointFilePath: inputFilePath,
97951
97885
  apiReport: {
@@ -97953,9 +97887,10 @@ var require_dist5 = __commonJS({
97953
97887
  reportFileName: "api-report.md",
97954
97888
  reportFolder: apiReferenceProjectDir,
97955
97889
  reportTempFolder: _path2.default.join(
97956
- tmpDirPath,
97890
+ "<projectFolder>",
97891
+ "tmp",
97957
97892
  "api-reports"
97958
- ).replaceAll("/", "\\")
97893
+ ).replaceAll("\\", "/")
97959
97894
  },
97960
97895
  docModel: {
97961
97896
  enabled: options.docModel !== false,
@@ -97966,36 +97901,53 @@ var require_dist5 = __commonJS({
97966
97901
  },
97967
97902
  dtsRollup: {
97968
97903
  enabled: true,
97969
- untrimmedFilePath: `<projectFolder>/${outputFilePath.replaceAll("\\", "/")}`
97904
+ untrimmedFilePath: _path2.default.join(
97905
+ "<projectFolder>",
97906
+ options.outDir,
97907
+ `index${dtsExtension}`
97908
+ ).replaceAll("\\", "/"),
97909
+ betaTrimmedFilePath: _path2.default.join(
97910
+ "<projectFolder>",
97911
+ options.outDir,
97912
+ "index-beta.d.ts"
97913
+ ).replaceAll("\\", "/"),
97914
+ publicTrimmedFilePath: _path2.default.join(
97915
+ "<projectFolder>",
97916
+ options.outDir,
97917
+ "index-public.d.ts"
97918
+ ).replaceAll("\\", "/")
97970
97919
  },
97971
97920
  tsdocMetadata: {
97972
97921
  enabled: options.tsdocMetadata !== false,
97973
- tsdocMetadataFilePath: `<projectFolder>/${_path2.default.join(
97974
- projectFolder,
97922
+ tsdocMetadataFilePath: _path2.default.join(
97923
+ "<projectFolder>",
97924
+ "dist",
97925
+ options.projectRoot,
97975
97926
  "tsdoc-metadata.api.json"
97976
- ).replaceAll("\\", "/")}`
97927
+ ).replaceAll("\\", "/")
97977
97928
  },
97978
97929
  compiler: {
97979
97930
  tsconfigFilePath
97980
97931
  },
97981
- projectFolder: `./`
97932
+ projectFolder: "./"
97982
97933
  };
97983
97934
  const prepareOptions = {
97984
97935
  configObject,
97985
97936
  configObjectFullPath: void 0,
97986
97937
  packageJsonFullPath: _path2.default.join(
97987
97938
  options.workspaceRoot,
97988
- projectFolder,
97939
+ "dist",
97940
+ options.projectRoot,
97989
97941
  "package.json"
97990
- )
97942
+ ).replaceAll("\\", "/")
97991
97943
  };
97992
- !options.silent && logger22.info("dts", `\u26A1 Current Directory: ${__dirname}`);
97993
- !options.silent && logger22.info(
97944
+ !options.silent && logger2.info("dts", `\u26A1 Current Directory: ${__dirname}`);
97945
+ !options.silent && logger2.info(
97994
97946
  "dts",
97995
97947
  "\u26A1 Running API Extractor with the following config: \n",
97996
97948
  prepareOptions
97997
97949
  );
97998
- !options.silent && logger22.info(
97950
+ !options.silent && logger2.info(
97999
97951
  "dts",
98000
97952
  "\u26A1 Using the following compiler options: \n",
98001
97953
  JSON.stringify(prepareOptions.configObject?.compiler)
@@ -98008,7 +97960,7 @@ var require_dist5 = __commonJS({
98008
97960
  }
98009
97961
  const { ExtractorConfig, Extractor } = imported;
98010
97962
  const extractorConfig = ExtractorConfig.prepare(prepareOptions);
98011
- !options.silent && logger22.info(
97963
+ !options.silent && logger2.info(
98012
97964
  "dts",
98013
97965
  "\u26A1 Invoking extractor with the following prepare options: \n",
98014
97966
  JSON.stringify(extractorConfig)
@@ -98026,51 +97978,33 @@ var require_dist5 = __commonJS({
98026
97978
  }
98027
97979
  }
98028
97980
  async function rollupDtsFiles(options, exports2, format2) {
98029
- let tempDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
97981
+ let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
98030
97982
  let outDir = options.outDir || "dist";
98031
- let pkgPath = packageJsonSearch2(outDir, options.silent, "dts", logger22);
98032
- !options.silent && logger22.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
98033
- !options.silent && logger22.info("dts", `\u26A1 Exports list to use in generation: ${exports2.map((e) => JSON.stringify(e)).join("\n")}`);
97983
+ let pkgPath = packageJsonSearch(outDir, options.silent, "dts", logger2);
97984
+ !options.silent && logger2.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
97985
+ !options.silent && logger2.info("dts", `\u26A1 Exports list to use in generation: ${exports2.map((e) => JSON.stringify(e)).join("\n")}`);
98034
97986
  let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
98035
97987
  let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format2, pkgType: pkg.type }).dts;
98036
- let declarationDir = _path2.default.join(tempDir, "declarations");
98037
97988
  let dtsInputFilePath = _path2.default.join(
98038
97989
  declarationDir,
97990
+ outDir.replace(pkgPath, ""),
98039
97991
  "_tsup-dts-aggregation" + dtsExtension
98040
- );
97992
+ ).replaceAll("\\", "/");
98041
97993
  dtsInputFilePath = dtsInputFilePath.replace(/\.d\.mts$/, ".dmts.d.ts").replace(/\.d\.cts$/, ".dcts.d.ts");
98042
97994
  _chunkGQ77QZBOjs.writeFileSync.call(
98043
97995
  void 0,
98044
97996
  dtsInputFilePath,
98045
97997
  formatAggregationExports(exports2, declarationDir)
98046
97998
  );
98047
- let dtsOutputFilePath = _path2.default.join(outDir, "declarations" + dtsExtension);
98048
97999
  rollupDtsFile(
98049
98000
  options,
98050
- tempDir,
98051
- dtsInputFilePath,
98052
- dtsOutputFilePath,
98001
+ _path2.default.join(
98002
+ "<projectFolder>",
98003
+ dtsInputFilePath.replace(options.workspaceRoot, "")
98004
+ ).replaceAll("\\", "/"),
98005
+ dtsExtension,
98053
98006
  options.tsconfig || "tsconfig.json"
98054
98007
  );
98055
- for (let [out, sourceFileName] of Object.entries(
98056
- options.experimentalDts.entry
98057
- )) {
98058
- sourceFileName = _chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName).replaceAll("/", "\\");
98059
- const outFileName = _path2.default.join(
98060
- options.workspaceRoot,
98061
- outDir,
98062
- out + dtsExtension
98063
- ).replaceAll("/", "\\");
98064
- !options.silent && logger22.info("dts", `\u26A1 Checking exports generation for file: ${outFileName}`);
98065
- const currentExports = exports2.filter(
98066
- (declaration) => declaration.sourceFileName.replaceAll("/", "\\") === sourceFileName.replaceAll("/", "\\")
98067
- );
98068
- _chunkGQ77QZBOjs.writeFileSync.call(
98069
- void 0,
98070
- outFileName,
98071
- formatDistributionExports(currentExports, outFileName, dtsOutputFilePath, logger22, options)
98072
- );
98073
- }
98074
98008
  }
98075
98009
  async function runDtsRollup(options, exports2) {
98076
98010
  try {
@@ -98078,17 +98012,17 @@ var require_dist5 = __commonJS({
98078
98012
  const getDuration = () => {
98079
98013
  return `${Math.floor(Date.now() - start)}ms`;
98080
98014
  };
98081
- logger22.info("dts", "Build start");
98015
+ logger2.info("dts", "Build start");
98082
98016
  if (!exports2) {
98083
98017
  throw new Error("Unexpected internal error: dts exports is not define");
98084
98018
  }
98085
98019
  for (const format2 of options.format) {
98086
98020
  await rollupDtsFiles(options, exports2, format2);
98087
98021
  }
98088
- logger22.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
98022
+ logger2.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
98089
98023
  } catch (error) {
98090
98024
  _chunkUIX4URMVjs.handleError.call(void 0, error);
98091
- logger22.error("dts", "Build error");
98025
+ logger2.error("dts", "Build error");
98092
98026
  }
98093
98027
  }
98094
98028
  var cjsInterop = () => {
@@ -98155,7 +98089,7 @@ var require_dist5 = __commonJS({
98155
98089
  options.entry = entry;
98156
98090
  logger3.info("CLI", `Building entry: ${JSON.stringify(entry)}`);
98157
98091
  }
98158
- !options.silent && logger22.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
98092
+ !options.silent && logger2.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
98159
98093
  const tsconfig = _bundlerequire.loadTsConfig.call(void 0, options.workspaceRoot, options.tsconfig);
98160
98094
  if (tsconfig) {
98161
98095
  logger3.info(
@@ -105387,7 +105321,8 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
105387
105321
  noEmit: false,
105388
105322
  declaration: true,
105389
105323
  declarationMap: true,
105390
- emitDeclarationOnly: true
105324
+ emitDeclarationOnly: true,
105325
+ declarationDir: (0, import_path3.join)(workspaceRoot, "tmp", ".tsup", "declaration")
105391
105326
  }
105392
105327
  },
105393
105328
  ts.sys,