@storm-software/workspace-tools 1.16.10 → 1.16.12

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.16.10",
3
+ "version": "1.16.12",
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": [
@@ -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=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-EPAEWGCP.js
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
40023
40023
  var require_chunk_EPAEWGCP = __commonJS({
40024
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
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) {
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=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-GQ77QZBO.js
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
40485
40485
  var require_chunk_GQ77QZBO = __commonJS({
40486
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
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) {
40487
40487
  "use strict";
40488
40488
  Object.defineProperty(exports, "__esModule", { value: true });
40489
40489
  function _interopRequireDefault(obj) {
@@ -40681,12 +40681,13 @@ var require_chunk_GQ77QZBO = __commonJS({
40681
40681
  };
40682
40682
  }
40683
40683
  function ensureTempDeclarationDir(options) {
40684
- const dirPath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", "declaration");
40684
+ let projectFolder = packageJsonSearch(options.outDir, options.silent, "dts", logger2);
40685
+ const dirPath = _path2.default.join(options.workspaceRoot, projectFolder, "tmp", "declarations");
40685
40686
  if (_fs2.default.existsSync(dirPath)) {
40686
40687
  return dirPath;
40687
40688
  }
40688
40689
  _fs2.default.mkdirSync(dirPath, { recursive: true });
40689
- const gitIgnorePath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", ".gitignore");
40690
+ const gitIgnorePath = _path2.default.join(options.workspaceRoot, projectFolder, "tmp", ".gitignore");
40690
40691
  writeFileSync3(gitIgnorePath, "**/*\n");
40691
40692
  return dirPath;
40692
40693
  }
@@ -40761,9 +40762,9 @@ var require_chunk_GQ77QZBO = __commonJS({
40761
40762
  }
40762
40763
  });
40763
40764
 
40764
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-UIX4URMV.js
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
40765
40766
  var require_chunk_UIX4URMV = __commonJS({
40766
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
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) {
40767
40768
  "use strict";
40768
40769
  Object.defineProperty(exports, "__esModule", { value: true });
40769
40770
  function _interopRequireWildcard(obj) {
@@ -41697,9 +41698,9 @@ var require_dist2 = __commonJS({
41697
41698
  }
41698
41699
  });
41699
41700
 
41700
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-7G76EW2R.js
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
41701
41702
  var require_chunk_7G76EW2R = __commonJS({
41702
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
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) {
41703
41704
  "use strict";
41704
41705
  Object.defineProperty(exports, "__esModule", { value: true });
41705
41706
  function _interopRequireDefault(obj) {
@@ -95505,9 +95506,9 @@ var require_chokidar = __commonJS({
95505
95506
  }
95506
95507
  });
95507
95508
 
95508
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/index.js
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
95509
95510
  var require_dist5 = __commonJS({
95510
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/index.js"(exports) {
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) {
95511
95512
  "use strict";
95512
95513
  Object.defineProperty(exports, "__esModule", { value: true });
95513
95514
  function _interopRequireDefault(obj) {
@@ -97076,7 +97077,7 @@ var require_dist5 = __commonJS({
97076
97077
  };
97077
97078
  var generateExternal = async (external, options, logger3) => {
97078
97079
  const result = [];
97079
- const pkgJsonPath = packageJsonSearch(options.outDir, options.silent, "CLI", logger3);
97080
+ const pkgJsonPath = packageJsonSearch2(options.outDir, options.silent, "CLI", logger3);
97080
97081
  for (const item of external) {
97081
97082
  if (typeof item !== "string" || !item.endsWith("package.json")) {
97082
97083
  result.push(item);
@@ -97088,7 +97089,7 @@ var require_dist5 = __commonJS({
97088
97089
  }
97089
97090
  return result;
97090
97091
  };
97091
- var packageJsonSearch = (outDir, silent, format2, logger3) => {
97092
+ var packageJsonSearch2 = (outDir, silent, format2, logger3) => {
97092
97093
  let pkgPath = outDir ? outDir : process.cwd();
97093
97094
  !silent && logger3 && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
97094
97095
  if (pkgPath) {
@@ -97132,7 +97133,7 @@ var require_dist5 = __commonJS({
97132
97133
  buildDependencies,
97133
97134
  pluginContainer
97134
97135
  }) {
97135
- const pkgPath = packageJsonSearch(options.outDir, options.silent, format2, logger3);
97136
+ const pkgPath = packageJsonSearch2(options.outDir, options.silent, format2, logger3);
97136
97137
  logger3.info(format2, `\u26A1 Running ESBuild: ${pkgPath}`);
97137
97138
  const pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
97138
97139
  const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
@@ -97823,6 +97824,13 @@ var require_dist5 = __commonJS({
97823
97824
  };
97824
97825
  logger.info("tsc", "Build start");
97825
97826
  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");
97826
97834
  const exports2 = await emit(
97827
97835
  options,
97828
97836
  dtsOptions.compilerOptions,
@@ -97867,17 +97875,26 @@ var require_dist5 = __commonJS({
97867
97875
  throw new Error("Unknown declaration");
97868
97876
  }
97869
97877
  }
97870
- function formatDistributionExports(exports2, fromFilePath, toFilePath) {
97878
+ function formatDistributionExports(exports2, fromFilePath, toFilePath, logger3, options) {
97871
97879
  let importPath = _chunkGQ77QZBOjs.trimDtsExtension.call(
97872
97880
  void 0,
97873
97881
  _path2.default.posix.relative(
97874
- _path2.default.posix.dirname(_path2.default.posix.normalize(_chunkGQ77QZBOjs.slash.call(void 0, fromFilePath))),
97875
- _path2.default.posix.normalize(_chunkGQ77QZBOjs.slash.call(void 0, toFilePath))
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
+ ))
97876
97892
  )
97877
97893
  );
97878
97894
  if (!importPath.match(/^\.+\//)) {
97879
97895
  importPath = "./" + importPath;
97880
97896
  }
97897
+ !options.silent && logger3.info("dts", `\u26A1 Formatting Distribution Exports with Import Path: ${importPath}`);
97881
97898
  let seen = {
97882
97899
  named: /* @__PURE__ */ new Set(),
97883
97900
  module: /* @__PURE__ */ new Set()
@@ -97920,10 +97937,10 @@ var require_dist5 = __commonJS({
97920
97937
  }
97921
97938
  return "";
97922
97939
  }
97923
- var logger2 = _chunk7G76EW2Rjs.createLogger.call(void 0);
97924
- function rollupDtsFile(options, inputFilePath, outputFilePath, tsconfigFilePath) {
97925
- let projectFolder = packageJsonSearch(options.outDir, options.silent, "dts", logger2);
97926
- !options.silent && logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${projectFolder}`);
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}`);
97927
97944
  const apiReferenceProjectDir = `<projectFolder>/${_path2.default.join(
97928
97945
  "docs",
97929
97946
  "api-reports",
@@ -97935,10 +97952,10 @@ var require_dist5 = __commonJS({
97935
97952
  enabled: options.apiReport !== false,
97936
97953
  reportFileName: "api-report.md",
97937
97954
  reportFolder: apiReferenceProjectDir,
97938
- reportTempFolder: `<projectFolder>/${_path2.default.join(
97939
- "tmp",
97955
+ reportTempFolder: _path2.default.join(
97956
+ tmpDirPath,
97940
97957
  "api-reports"
97941
- ).replaceAll("\\", "/")}`
97958
+ ).replaceAll("/", "\\")
97942
97959
  },
97943
97960
  docModel: {
97944
97961
  enabled: options.docModel !== false,
@@ -97949,7 +97966,7 @@ var require_dist5 = __commonJS({
97949
97966
  },
97950
97967
  dtsRollup: {
97951
97968
  enabled: true,
97952
- untrimmedFilePath: outputFilePath
97969
+ untrimmedFilePath: `<projectFolder>/${outputFilePath.replaceAll("\\", "/")}`
97953
97970
  },
97954
97971
  tsdocMetadata: {
97955
97972
  enabled: options.tsdocMetadata !== false,
@@ -97972,13 +97989,13 @@ var require_dist5 = __commonJS({
97972
97989
  "package.json"
97973
97990
  )
97974
97991
  };
97975
- !options.silent && logger2.info("dts", `\u26A1 Current Directory: ${__dirname}`);
97976
- !options.silent && logger2.info(
97992
+ !options.silent && logger22.info("dts", `\u26A1 Current Directory: ${__dirname}`);
97993
+ !options.silent && logger22.info(
97977
97994
  "dts",
97978
97995
  "\u26A1 Running API Extractor with the following config: \n",
97979
97996
  prepareOptions
97980
97997
  );
97981
- !options.silent && logger2.info(
97998
+ !options.silent && logger22.info(
97982
97999
  "dts",
97983
98000
  "\u26A1 Using the following compiler options: \n",
97984
98001
  JSON.stringify(prepareOptions.configObject?.compiler)
@@ -97991,7 +98008,7 @@ var require_dist5 = __commonJS({
97991
98008
  }
97992
98009
  const { ExtractorConfig, Extractor } = imported;
97993
98010
  const extractorConfig = ExtractorConfig.prepare(prepareOptions);
97994
- !options.silent && logger2.info(
98011
+ !options.silent && logger22.info(
97995
98012
  "dts",
97996
98013
  "\u26A1 Invoking extractor with the following prepare options: \n",
97997
98014
  JSON.stringify(extractorConfig)
@@ -98009,16 +98026,16 @@ var require_dist5 = __commonJS({
98009
98026
  }
98010
98027
  }
98011
98028
  async function rollupDtsFiles(options, exports2, format2) {
98012
- let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
98029
+ let tempDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
98013
98030
  let outDir = options.outDir || "dist";
98014
- let pkgPath = packageJsonSearch(outDir, options.silent, "dts", logger2);
98015
- !options.silent && logger2.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
98016
- !options.silent && logger2.info("dts", `\u26A1 Exports list to use in generation: ${exports2.map((e) => JSON.stringify(e)).join("\n")}`);
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")}`);
98017
98034
  let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
98018
98035
  let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format2, pkgType: pkg.type }).dts;
98036
+ let declarationDir = _path2.default.join(tempDir, "declarations");
98019
98037
  let dtsInputFilePath = _path2.default.join(
98020
98038
  declarationDir,
98021
- options.projectRoot,
98022
98039
  "_tsup-dts-aggregation" + dtsExtension
98023
98040
  );
98024
98041
  dtsInputFilePath = dtsInputFilePath.replace(/\.d\.mts$/, ".dmts.d.ts").replace(/\.d\.cts$/, ".dcts.d.ts");
@@ -98027,9 +98044,10 @@ var require_dist5 = __commonJS({
98027
98044
  dtsInputFilePath,
98028
98045
  formatAggregationExports(exports2, declarationDir)
98029
98046
  );
98030
- let dtsOutputFilePath = _path2.default.join(outDir, "declaration" + dtsExtension);
98047
+ let dtsOutputFilePath = _path2.default.join(outDir, "declarations" + dtsExtension);
98031
98048
  rollupDtsFile(
98032
98049
  options,
98050
+ tempDir,
98033
98051
  dtsInputFilePath,
98034
98052
  dtsOutputFilePath,
98035
98053
  options.tsconfig || "tsconfig.json"
@@ -98037,15 +98055,20 @@ var require_dist5 = __commonJS({
98037
98055
  for (let [out, sourceFileName] of Object.entries(
98038
98056
  options.experimentalDts.entry
98039
98057
  )) {
98040
- sourceFileName = _chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName);
98041
- const outFileName = _path2.default.join(outDir, out + dtsExtension);
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}`);
98042
98065
  const currentExports = exports2.filter(
98043
- (declaration) => declaration.sourceFileName === sourceFileName
98066
+ (declaration) => declaration.sourceFileName.replaceAll("/", "\\") === sourceFileName.replaceAll("/", "\\")
98044
98067
  );
98045
98068
  _chunkGQ77QZBOjs.writeFileSync.call(
98046
98069
  void 0,
98047
98070
  outFileName,
98048
- formatDistributionExports(currentExports, outFileName, dtsOutputFilePath)
98071
+ formatDistributionExports(currentExports, outFileName, dtsOutputFilePath, logger22, options)
98049
98072
  );
98050
98073
  }
98051
98074
  }
@@ -98055,17 +98078,17 @@ var require_dist5 = __commonJS({
98055
98078
  const getDuration = () => {
98056
98079
  return `${Math.floor(Date.now() - start)}ms`;
98057
98080
  };
98058
- logger2.info("dts", "Build start");
98081
+ logger22.info("dts", "Build start");
98059
98082
  if (!exports2) {
98060
98083
  throw new Error("Unexpected internal error: dts exports is not define");
98061
98084
  }
98062
98085
  for (const format2 of options.format) {
98063
98086
  await rollupDtsFiles(options, exports2, format2);
98064
98087
  }
98065
- logger2.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
98088
+ logger22.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
98066
98089
  } catch (error) {
98067
98090
  _chunkUIX4URMVjs.handleError.call(void 0, error);
98068
- logger2.error("dts", "Build error");
98091
+ logger22.error("dts", "Build error");
98069
98092
  }
98070
98093
  }
98071
98094
  var cjsInterop = () => {
@@ -98132,7 +98155,7 @@ var require_dist5 = __commonJS({
98132
98155
  options.entry = entry;
98133
98156
  logger3.info("CLI", `Building entry: ${JSON.stringify(entry)}`);
98134
98157
  }
98135
- !options.silent && logger2.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
98158
+ !options.silent && logger22.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
98136
98159
  const tsconfig = _bundlerequire.loadTsConfig.call(void 0, options.workspaceRoot, options.tsconfig);
98137
98160
  if (tsconfig) {
98138
98161
  logger3.info(
@@ -105322,8 +105345,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
105322
105345
  noEmit: false,
105323
105346
  declaration: true,
105324
105347
  declarationMap: true,
105325
- emitDeclarationOnly: true,
105326
- declarationDir: (0, import_path3.join)(workspaceRoot, "tmp", ".tsup", "declaration")
105348
+ emitDeclarationOnly: true
105327
105349
  }
105328
105350
  },
105329
105351
  ts.sys,
@@ -240,9 +240,9 @@ var require_brace_expansion = __commonJS({
240
240
  }
241
241
  });
242
242
 
243
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-EPAEWGCP.js
243
+ // 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
244
244
  var require_chunk_EPAEWGCP = __commonJS({
245
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
245
+ "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) {
246
246
  "use strict";
247
247
  Object.defineProperty(exports, "__esModule", { value: true });
248
248
  var version = "8.0.0";
@@ -6549,9 +6549,9 @@ var require_resolve_from = __commonJS({
6549
6549
  }
6550
6550
  });
6551
6551
 
6552
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-GQ77QZBO.js
6552
+ // 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
6553
6553
  var require_chunk_GQ77QZBO = __commonJS({
6554
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
6554
+ "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) {
6555
6555
  "use strict";
6556
6556
  Object.defineProperty(exports, "__esModule", { value: true });
6557
6557
  function _interopRequireDefault(obj) {
@@ -6749,12 +6749,13 @@ var require_chunk_GQ77QZBO = __commonJS({
6749
6749
  };
6750
6750
  }
6751
6751
  function ensureTempDeclarationDir(options) {
6752
- const dirPath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", "declaration");
6752
+ let projectFolder = packageJsonSearch(options.outDir, options.silent, "dts", logger2);
6753
+ const dirPath = _path2.default.join(options.workspaceRoot, projectFolder, "tmp", "declarations");
6753
6754
  if (_fs2.default.existsSync(dirPath)) {
6754
6755
  return dirPath;
6755
6756
  }
6756
6757
  _fs2.default.mkdirSync(dirPath, { recursive: true });
6757
- const gitIgnorePath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", ".gitignore");
6758
+ const gitIgnorePath = _path2.default.join(options.workspaceRoot, projectFolder, "tmp", ".gitignore");
6758
6759
  writeFileSync2(gitIgnorePath, "**/*\n");
6759
6760
  return dirPath;
6760
6761
  }
@@ -6829,9 +6830,9 @@ var require_chunk_GQ77QZBO = __commonJS({
6829
6830
  }
6830
6831
  });
6831
6832
 
6832
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-UIX4URMV.js
6833
+ // 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
6833
6834
  var require_chunk_UIX4URMV = __commonJS({
6834
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
6835
+ "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) {
6835
6836
  "use strict";
6836
6837
  Object.defineProperty(exports, "__esModule", { value: true });
6837
6838
  function _interopRequireWildcard(obj) {
@@ -7765,9 +7766,9 @@ var require_dist2 = __commonJS({
7765
7766
  }
7766
7767
  });
7767
7768
 
7768
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-7G76EW2R.js
7769
+ // 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
7769
7770
  var require_chunk_7G76EW2R = __commonJS({
7770
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
7771
+ "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) {
7771
7772
  "use strict";
7772
7773
  Object.defineProperty(exports, "__esModule", { value: true });
7773
7774
  function _interopRequireDefault(obj) {
@@ -61573,9 +61574,9 @@ var require_chokidar = __commonJS({
61573
61574
  }
61574
61575
  });
61575
61576
 
61576
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/index.js
61577
+ // 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
61577
61578
  var require_dist5 = __commonJS({
61578
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=ycbj4ze4nximjalgxenbuscbmq_@microsoft+api-extractor@7.38.3_@swc+core@1._sppchyqgfxkd36p6h24jhpliga/node_modules/tsup/dist/index.js"(exports) {
61579
+ "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) {
61579
61580
  "use strict";
61580
61581
  Object.defineProperty(exports, "__esModule", { value: true });
61581
61582
  function _interopRequireDefault(obj) {
@@ -63144,7 +63145,7 @@ var require_dist5 = __commonJS({
63144
63145
  };
63145
63146
  var generateExternal = async (external, options, logger3) => {
63146
63147
  const result = [];
63147
- const pkgJsonPath = packageJsonSearch(options.outDir, options.silent, "CLI", logger3);
63148
+ const pkgJsonPath = packageJsonSearch2(options.outDir, options.silent, "CLI", logger3);
63148
63149
  for (const item of external) {
63149
63150
  if (typeof item !== "string" || !item.endsWith("package.json")) {
63150
63151
  result.push(item);
@@ -63156,7 +63157,7 @@ var require_dist5 = __commonJS({
63156
63157
  }
63157
63158
  return result;
63158
63159
  };
63159
- var packageJsonSearch = (outDir, silent, format, logger3) => {
63160
+ var packageJsonSearch2 = (outDir, silent, format, logger3) => {
63160
63161
  let pkgPath = outDir ? outDir : process.cwd();
63161
63162
  !silent && logger3 && logger3.info(format, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
63162
63163
  if (pkgPath) {
@@ -63200,7 +63201,7 @@ var require_dist5 = __commonJS({
63200
63201
  buildDependencies,
63201
63202
  pluginContainer
63202
63203
  }) {
63203
- const pkgPath = packageJsonSearch(options.outDir, options.silent, format, logger3);
63204
+ const pkgPath = packageJsonSearch2(options.outDir, options.silent, format, logger3);
63204
63205
  logger3.info(format, `\u26A1 Running ESBuild: ${pkgPath}`);
63205
63206
  const pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
63206
63207
  const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
@@ -63891,6 +63892,13 @@ var require_dist5 = __commonJS({
63891
63892
  };
63892
63893
  logger.info("tsc", "Build start");
63893
63894
  const dtsOptions = options.experimentalDts;
63895
+ if (!dtsOptions.compilerOptions) {
63896
+ dtsOptions.compilerOptions = {};
63897
+ } else if (!dtsOptions.compilerOptions.options) {
63898
+ dtsOptions.compilerOptions.options = {};
63899
+ }
63900
+ let tempDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
63901
+ dtsOptions.compilerOptions.options.declarationDir = _path2.default.join(tempDir, "declarations");
63894
63902
  const exports2 = await emit(
63895
63903
  options,
63896
63904
  dtsOptions.compilerOptions,
@@ -63935,17 +63943,26 @@ var require_dist5 = __commonJS({
63935
63943
  throw new Error("Unknown declaration");
63936
63944
  }
63937
63945
  }
63938
- function formatDistributionExports(exports2, fromFilePath, toFilePath) {
63946
+ function formatDistributionExports(exports2, fromFilePath, toFilePath, logger3, options) {
63939
63947
  let importPath = _chunkGQ77QZBOjs.trimDtsExtension.call(
63940
63948
  void 0,
63941
63949
  _path2.default.posix.relative(
63942
- _path2.default.posix.dirname(_path2.default.posix.normalize(_chunkGQ77QZBOjs.slash.call(void 0, fromFilePath))),
63943
- _path2.default.posix.normalize(_chunkGQ77QZBOjs.slash.call(void 0, toFilePath))
63950
+ _path2.default.posix.dirname(_path2.default.posix.normalize(
63951
+ _chunkGQ77QZBOjs.slash.call(
63952
+ void 0,
63953
+ _path2.default.join(options.workspaceRoot, fromFilePath)
63954
+ )
63955
+ )),
63956
+ _path2.default.posix.normalize(_chunkGQ77QZBOjs.slash.call(
63957
+ void 0,
63958
+ _path2.default.join(options.workspaceRoot, toFilePath)
63959
+ ))
63944
63960
  )
63945
63961
  );
63946
63962
  if (!importPath.match(/^\.+\//)) {
63947
63963
  importPath = "./" + importPath;
63948
63964
  }
63965
+ !options.silent && logger3.info("dts", `\u26A1 Formatting Distribution Exports with Import Path: ${importPath}`);
63949
63966
  let seen = {
63950
63967
  named: /* @__PURE__ */ new Set(),
63951
63968
  module: /* @__PURE__ */ new Set()
@@ -63988,10 +64005,10 @@ var require_dist5 = __commonJS({
63988
64005
  }
63989
64006
  return "";
63990
64007
  }
63991
- var logger2 = _chunk7G76EW2Rjs.createLogger.call(void 0);
63992
- function rollupDtsFile(options, inputFilePath, outputFilePath, tsconfigFilePath) {
63993
- let projectFolder = packageJsonSearch(options.outDir, options.silent, "dts", logger2);
63994
- !options.silent && logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${projectFolder}`);
64008
+ var logger22 = _chunk7G76EW2Rjs.createLogger.call(void 0);
64009
+ function rollupDtsFile(options, tmpDirPath, inputFilePath, outputFilePath, tsconfigFilePath) {
64010
+ let projectFolder = packageJsonSearch2(options.outDir, options.silent, "dts", logger22);
64011
+ !options.silent && logger22.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${projectFolder}`);
63995
64012
  const apiReferenceProjectDir = `<projectFolder>/${_path2.default.join(
63996
64013
  "docs",
63997
64014
  "api-reports",
@@ -64003,10 +64020,10 @@ var require_dist5 = __commonJS({
64003
64020
  enabled: options.apiReport !== false,
64004
64021
  reportFileName: "api-report.md",
64005
64022
  reportFolder: apiReferenceProjectDir,
64006
- reportTempFolder: `<projectFolder>/${_path2.default.join(
64007
- "tmp",
64023
+ reportTempFolder: _path2.default.join(
64024
+ tmpDirPath,
64008
64025
  "api-reports"
64009
- ).replaceAll("\\", "/")}`
64026
+ ).replaceAll("/", "\\")
64010
64027
  },
64011
64028
  docModel: {
64012
64029
  enabled: options.docModel !== false,
@@ -64017,7 +64034,7 @@ var require_dist5 = __commonJS({
64017
64034
  },
64018
64035
  dtsRollup: {
64019
64036
  enabled: true,
64020
- untrimmedFilePath: outputFilePath
64037
+ untrimmedFilePath: `<projectFolder>/${outputFilePath.replaceAll("\\", "/")}`
64021
64038
  },
64022
64039
  tsdocMetadata: {
64023
64040
  enabled: options.tsdocMetadata !== false,
@@ -64040,13 +64057,13 @@ var require_dist5 = __commonJS({
64040
64057
  "package.json"
64041
64058
  )
64042
64059
  };
64043
- !options.silent && logger2.info("dts", `\u26A1 Current Directory: ${__dirname}`);
64044
- !options.silent && logger2.info(
64060
+ !options.silent && logger22.info("dts", `\u26A1 Current Directory: ${__dirname}`);
64061
+ !options.silent && logger22.info(
64045
64062
  "dts",
64046
64063
  "\u26A1 Running API Extractor with the following config: \n",
64047
64064
  prepareOptions
64048
64065
  );
64049
- !options.silent && logger2.info(
64066
+ !options.silent && logger22.info(
64050
64067
  "dts",
64051
64068
  "\u26A1 Using the following compiler options: \n",
64052
64069
  JSON.stringify(prepareOptions.configObject?.compiler)
@@ -64059,7 +64076,7 @@ var require_dist5 = __commonJS({
64059
64076
  }
64060
64077
  const { ExtractorConfig, Extractor } = imported;
64061
64078
  const extractorConfig = ExtractorConfig.prepare(prepareOptions);
64062
- !options.silent && logger2.info(
64079
+ !options.silent && logger22.info(
64063
64080
  "dts",
64064
64081
  "\u26A1 Invoking extractor with the following prepare options: \n",
64065
64082
  JSON.stringify(extractorConfig)
@@ -64077,16 +64094,16 @@ var require_dist5 = __commonJS({
64077
64094
  }
64078
64095
  }
64079
64096
  async function rollupDtsFiles(options, exports2, format) {
64080
- let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
64097
+ let tempDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
64081
64098
  let outDir = options.outDir || "dist";
64082
- let pkgPath = packageJsonSearch(outDir, options.silent, "dts", logger2);
64083
- !options.silent && logger2.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
64084
- !options.silent && logger2.info("dts", `\u26A1 Exports list to use in generation: ${exports2.map((e) => JSON.stringify(e)).join("\n")}`);
64099
+ let pkgPath = packageJsonSearch2(outDir, options.silent, "dts", logger22);
64100
+ !options.silent && logger22.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
64101
+ !options.silent && logger22.info("dts", `\u26A1 Exports list to use in generation: ${exports2.map((e) => JSON.stringify(e)).join("\n")}`);
64085
64102
  let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
64086
64103
  let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format, pkgType: pkg.type }).dts;
64104
+ let declarationDir = _path2.default.join(tempDir, "declarations");
64087
64105
  let dtsInputFilePath = _path2.default.join(
64088
64106
  declarationDir,
64089
- options.projectRoot,
64090
64107
  "_tsup-dts-aggregation" + dtsExtension
64091
64108
  );
64092
64109
  dtsInputFilePath = dtsInputFilePath.replace(/\.d\.mts$/, ".dmts.d.ts").replace(/\.d\.cts$/, ".dcts.d.ts");
@@ -64095,9 +64112,10 @@ var require_dist5 = __commonJS({
64095
64112
  dtsInputFilePath,
64096
64113
  formatAggregationExports(exports2, declarationDir)
64097
64114
  );
64098
- let dtsOutputFilePath = _path2.default.join(outDir, "declaration" + dtsExtension);
64115
+ let dtsOutputFilePath = _path2.default.join(outDir, "declarations" + dtsExtension);
64099
64116
  rollupDtsFile(
64100
64117
  options,
64118
+ tempDir,
64101
64119
  dtsInputFilePath,
64102
64120
  dtsOutputFilePath,
64103
64121
  options.tsconfig || "tsconfig.json"
@@ -64105,15 +64123,20 @@ var require_dist5 = __commonJS({
64105
64123
  for (let [out, sourceFileName] of Object.entries(
64106
64124
  options.experimentalDts.entry
64107
64125
  )) {
64108
- sourceFileName = _chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName);
64109
- const outFileName = _path2.default.join(outDir, out + dtsExtension);
64126
+ sourceFileName = _chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName).replaceAll("/", "\\");
64127
+ const outFileName = _path2.default.join(
64128
+ options.workspaceRoot,
64129
+ outDir,
64130
+ out + dtsExtension
64131
+ ).replaceAll("/", "\\");
64132
+ !options.silent && logger22.info("dts", `\u26A1 Checking exports generation for file: ${outFileName}`);
64110
64133
  const currentExports = exports2.filter(
64111
- (declaration) => declaration.sourceFileName === sourceFileName
64134
+ (declaration) => declaration.sourceFileName.replaceAll("/", "\\") === sourceFileName.replaceAll("/", "\\")
64112
64135
  );
64113
64136
  _chunkGQ77QZBOjs.writeFileSync.call(
64114
64137
  void 0,
64115
64138
  outFileName,
64116
- formatDistributionExports(currentExports, outFileName, dtsOutputFilePath)
64139
+ formatDistributionExports(currentExports, outFileName, dtsOutputFilePath, logger22, options)
64117
64140
  );
64118
64141
  }
64119
64142
  }
@@ -64123,17 +64146,17 @@ var require_dist5 = __commonJS({
64123
64146
  const getDuration = () => {
64124
64147
  return `${Math.floor(Date.now() - start)}ms`;
64125
64148
  };
64126
- logger2.info("dts", "Build start");
64149
+ logger22.info("dts", "Build start");
64127
64150
  if (!exports2) {
64128
64151
  throw new Error("Unexpected internal error: dts exports is not define");
64129
64152
  }
64130
64153
  for (const format of options.format) {
64131
64154
  await rollupDtsFiles(options, exports2, format);
64132
64155
  }
64133
- logger2.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
64156
+ logger22.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
64134
64157
  } catch (error) {
64135
64158
  _chunkUIX4URMVjs.handleError.call(void 0, error);
64136
- logger2.error("dts", "Build error");
64159
+ logger22.error("dts", "Build error");
64137
64160
  }
64138
64161
  }
64139
64162
  var cjsInterop = () => {
@@ -64200,7 +64223,7 @@ var require_dist5 = __commonJS({
64200
64223
  options.entry = entry;
64201
64224
  logger3.info("CLI", `Building entry: ${JSON.stringify(entry)}`);
64202
64225
  }
64203
- !options.silent && logger2.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
64226
+ !options.silent && logger22.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
64204
64227
  const tsconfig = _bundlerequire.loadTsConfig.call(void 0, options.workspaceRoot, options.tsconfig);
64205
64228
  if (tsconfig) {
64206
64229
  logger3.info(