@storm-software/workspace-tools 1.16.11 → 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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [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
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **workspace-tools:** Resolve issue with path separators in tsup patch ([e7dc44d](https://github.com/storm-software/storm-ops/commit/e7dc44d77f8445a495fb7164d85498d4a2cbf179))
7
+
1
8
  ## [1.16.10](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.16.9...workspace-tools-v1.16.10) (2023-11-29)
2
9
 
3
10
 
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.8-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.16.10-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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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=sm6ofhvdkyatguwc6tbkvo7xqu_@microsoft+api-extractor@7.38.3_@swc+core@1._znna3kygvsafimy6gulngvppbu/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,
@@ -97929,10 +97937,10 @@ var require_dist5 = __commonJS({
97929
97937
  }
97930
97938
  return "";
97931
97939
  }
97932
- var logger2 = _chunk7G76EW2Rjs.createLogger.call(void 0);
97933
- function rollupDtsFile(options, inputFilePath, outputFilePath, tsconfigFilePath) {
97934
- let projectFolder = packageJsonSearch(options.outDir, options.silent, "dts", logger2);
97935
- !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}`);
97936
97944
  const apiReferenceProjectDir = `<projectFolder>/${_path2.default.join(
97937
97945
  "docs",
97938
97946
  "api-reports",
@@ -97944,10 +97952,10 @@ var require_dist5 = __commonJS({
97944
97952
  enabled: options.apiReport !== false,
97945
97953
  reportFileName: "api-report.md",
97946
97954
  reportFolder: apiReferenceProjectDir,
97947
- reportTempFolder: `<projectFolder>/${_path2.default.join(
97948
- "tmp",
97955
+ reportTempFolder: _path2.default.join(
97956
+ tmpDirPath,
97949
97957
  "api-reports"
97950
- ).replaceAll("\\", "/")}`
97958
+ ).replaceAll("/", "\\")
97951
97959
  },
97952
97960
  docModel: {
97953
97961
  enabled: options.docModel !== false,
@@ -97981,13 +97989,13 @@ var require_dist5 = __commonJS({
97981
97989
  "package.json"
97982
97990
  )
97983
97991
  };
97984
- !options.silent && logger2.info("dts", `\u26A1 Current Directory: ${__dirname}`);
97985
- !options.silent && logger2.info(
97992
+ !options.silent && logger22.info("dts", `\u26A1 Current Directory: ${__dirname}`);
97993
+ !options.silent && logger22.info(
97986
97994
  "dts",
97987
97995
  "\u26A1 Running API Extractor with the following config: \n",
97988
97996
  prepareOptions
97989
97997
  );
97990
- !options.silent && logger2.info(
97998
+ !options.silent && logger22.info(
97991
97999
  "dts",
97992
98000
  "\u26A1 Using the following compiler options: \n",
97993
98001
  JSON.stringify(prepareOptions.configObject?.compiler)
@@ -98000,7 +98008,7 @@ var require_dist5 = __commonJS({
98000
98008
  }
98001
98009
  const { ExtractorConfig, Extractor } = imported;
98002
98010
  const extractorConfig = ExtractorConfig.prepare(prepareOptions);
98003
- !options.silent && logger2.info(
98011
+ !options.silent && logger22.info(
98004
98012
  "dts",
98005
98013
  "\u26A1 Invoking extractor with the following prepare options: \n",
98006
98014
  JSON.stringify(extractorConfig)
@@ -98018,16 +98026,16 @@ var require_dist5 = __commonJS({
98018
98026
  }
98019
98027
  }
98020
98028
  async function rollupDtsFiles(options, exports2, format2) {
98021
- let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
98029
+ let tempDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
98022
98030
  let outDir = options.outDir || "dist";
98023
- let pkgPath = packageJsonSearch(outDir, options.silent, "dts", logger2);
98024
- !options.silent && logger2.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
98025
- !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")}`);
98026
98034
  let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
98027
98035
  let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format2, pkgType: pkg.type }).dts;
98036
+ let declarationDir = _path2.default.join(tempDir, "declarations");
98028
98037
  let dtsInputFilePath = _path2.default.join(
98029
98038
  declarationDir,
98030
- options.projectRoot,
98031
98039
  "_tsup-dts-aggregation" + dtsExtension
98032
98040
  );
98033
98041
  dtsInputFilePath = dtsInputFilePath.replace(/\.d\.mts$/, ".dmts.d.ts").replace(/\.d\.cts$/, ".dcts.d.ts");
@@ -98039,6 +98047,7 @@ var require_dist5 = __commonJS({
98039
98047
  let dtsOutputFilePath = _path2.default.join(outDir, "declarations" + dtsExtension);
98040
98048
  rollupDtsFile(
98041
98049
  options,
98050
+ tempDir,
98042
98051
  dtsInputFilePath,
98043
98052
  dtsOutputFilePath,
98044
98053
  options.tsconfig || "tsconfig.json"
@@ -98052,14 +98061,14 @@ var require_dist5 = __commonJS({
98052
98061
  outDir,
98053
98062
  out + dtsExtension
98054
98063
  ).replaceAll("/", "\\");
98055
- !options.silent && logger2.info("dts", `\u26A1 Checking exports generation for file: ${outFileName}`);
98064
+ !options.silent && logger22.info("dts", `\u26A1 Checking exports generation for file: ${outFileName}`);
98056
98065
  const currentExports = exports2.filter(
98057
98066
  (declaration) => declaration.sourceFileName.replaceAll("/", "\\") === sourceFileName.replaceAll("/", "\\")
98058
98067
  );
98059
98068
  _chunkGQ77QZBOjs.writeFileSync.call(
98060
98069
  void 0,
98061
98070
  outFileName,
98062
- formatDistributionExports(currentExports, outFileName, dtsOutputFilePath, logger2, options)
98071
+ formatDistributionExports(currentExports, outFileName, dtsOutputFilePath, logger22, options)
98063
98072
  );
98064
98073
  }
98065
98074
  }
@@ -98069,17 +98078,17 @@ var require_dist5 = __commonJS({
98069
98078
  const getDuration = () => {
98070
98079
  return `${Math.floor(Date.now() - start)}ms`;
98071
98080
  };
98072
- logger2.info("dts", "Build start");
98081
+ logger22.info("dts", "Build start");
98073
98082
  if (!exports2) {
98074
98083
  throw new Error("Unexpected internal error: dts exports is not define");
98075
98084
  }
98076
98085
  for (const format2 of options.format) {
98077
98086
  await rollupDtsFiles(options, exports2, format2);
98078
98087
  }
98079
- logger2.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
98088
+ logger22.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
98080
98089
  } catch (error) {
98081
98090
  _chunkUIX4URMVjs.handleError.call(void 0, error);
98082
- logger2.error("dts", "Build error");
98091
+ logger22.error("dts", "Build error");
98083
98092
  }
98084
98093
  }
98085
98094
  var cjsInterop = () => {
@@ -98146,7 +98155,7 @@ var require_dist5 = __commonJS({
98146
98155
  options.entry = entry;
98147
98156
  logger3.info("CLI", `Building entry: ${JSON.stringify(entry)}`);
98148
98157
  }
98149
- !options.silent && logger2.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
98158
+ !options.silent && logger22.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
98150
98159
  const tsconfig = _bundlerequire.loadTsConfig.call(void 0, options.workspaceRoot, options.tsconfig);
98151
98160
  if (tsconfig) {
98152
98161
  logger3.info(
@@ -105378,8 +105387,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
105378
105387
  noEmit: false,
105379
105388
  declaration: true,
105380
105389
  declarationMap: true,
105381
- emitDeclarationOnly: true,
105382
- declarationDir: (0, import_path3.join)(workspaceRoot, "tmp", ".tsup", "declaration")
105390
+ emitDeclarationOnly: true
105383
105391
  }
105384
105392
  },
105385
105393
  ts.sys,