@storm-software/workspace-tools 1.62.12 → 1.62.13

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,15 @@
1
+ ## 1.62.13 (2024-02-27)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - **workspace-tools:** Resolve issue with tsconfig file resolution ([0254e50a](https://github.com/storm-software/storm-ops/commit/0254e50a))
7
+
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - Patrick Sullivan
12
+
1
13
  ## 1.62.12 (2024-02-27)
2
14
 
3
15
 
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.62.11-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.62.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
  > [!IMPORTANT]
package/index.js CHANGED
@@ -443885,7 +443885,7 @@ ${outro}`;
443885
443885
  await promises3.mkdir(node_path.dirname(fileName), { recursive: true });
443886
443886
  return promises3.writeFile(fileName, outputFile.type === "asset" ? outputFile.source : outputFile.code);
443887
443887
  }
443888
- function defineConfig(options8) {
443888
+ function defineConfig2(options8) {
443889
443889
  return options8;
443890
443890
  }
443891
443891
  exports2.blue = blue;
@@ -443894,7 +443894,7 @@ ${outro}`;
443894
443894
  exports2.createFilter = createFilter;
443895
443895
  exports2.cyan = cyan$1;
443896
443896
  exports2.cyan$1 = cyan;
443897
- exports2.defineConfig = defineConfig;
443897
+ exports2.defineConfig = defineConfig2;
443898
443898
  exports2.ensureArray = ensureArray$1;
443899
443899
  exports2.getAugmentedNamespace = getAugmentedNamespace;
443900
443900
  exports2.getNewArray = getNewArray;
@@ -450463,7 +450463,7 @@ var require_dist6 = __commonJS({
450463
450463
  }
450464
450464
  };
450465
450465
  };
450466
- var defineConfig = (options8) => options8;
450466
+ var defineConfig2 = (options8) => options8;
450467
450467
  var isTaskkillCmdProcessNotFoundError = (err) => {
450468
450468
  return process.platform === "win32" && "cmd" in err && "code" in err && typeof err.cmd === "string" && err.cmd.startsWith("taskkill") && err.code === 128;
450469
450469
  };
@@ -450768,7 +450768,7 @@ var require_dist6 = __commonJS({
450768
450768
  );
450769
450769
  }
450770
450770
  exports2.build = build2;
450771
- exports2.defineConfig = defineConfig;
450771
+ exports2.defineConfig = defineConfig2;
450772
450772
  }
450773
450773
  });
450774
450774
 
@@ -484040,6 +484040,7 @@ async function resolveTSConfig(id = process.cwd(), options8 = {}) {
484040
484040
  }
484041
484041
 
484042
484042
  // packages/workspace-tools/src/utils/run-tsup-build.ts
484043
+ var import_tsup = __toESM(require_dist6());
484043
484044
  var applyDefaultOptions = (options8) => {
484044
484045
  options8.entry ??= "{sourceRoot}/index.ts";
484045
484046
  options8.outputPath ??= "dist/{projectRoot}";
@@ -484074,8 +484075,7 @@ var applyDefaultOptions = (options8) => {
484074
484075
  return options8;
484075
484076
  };
484076
484077
  var runTsupBuild = async (context, config, options8) => {
484077
- const { writeInfo, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
484078
- const { build: tsup, defineConfig } = await Promise.resolve().then(() => __toESM(require_dist6()));
484078
+ const { writeInfo, writeDebug, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
484079
484079
  const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
484080
484080
  const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
484081
484081
  ret[key2] = options8.env?.[key2];
@@ -484088,6 +484088,13 @@ var runTsupBuild = async (context, config, options8) => {
484088
484088
  })
484089
484089
  );
484090
484090
  options8.plugins?.push(environmentPlugin(stormEnv));
484091
+ let tsconfig = await readTSConfig(options8.tsConfig);
484092
+ if (!tsconfig) {
484093
+ tsconfig = await readTSConfig(context.projectRoot);
484094
+ if (!tsconfig) {
484095
+ throw new Error("No tsconfig file found");
484096
+ }
484097
+ }
484091
484098
  const getConfigOptions = {
484092
484099
  ...options8,
484093
484100
  entry: {
@@ -484102,8 +484109,8 @@ var runTsupBuild = async (context, config, options8) => {
484102
484109
  __STORM_CONFIG: JSON.stringify(stormEnv),
484103
484110
  ...stormEnv
484104
484111
  },
484105
- dtsTsConfig: await getNormalizedTsConfig(
484106
- context,
484112
+ dtsTsConfig: getNormalizedTsConfig(
484113
+ tsconfig,
484107
484114
  workspaceRoot,
484108
484115
  options8.outputPath,
484109
484116
  createTypeScriptCompilationOptions(
@@ -484137,17 +484144,18 @@ ${options8.banner}
484137
484144
  };
484138
484145
  if (options8.getConfig) {
484139
484146
  writeInfo(config, "\u26A1 Running the Build process");
484147
+ writeDebug(config, JSON.stringify(getConfigOptions));
484140
484148
  const getConfigFns = [options8.getConfig];
484141
- const tsupConfig = defineConfig(
484149
+ const tsupConfig = (0, import_tsup.defineConfig)(
484142
484150
  getConfigFns.map(
484143
484151
  (getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
484144
484152
  )
484145
484153
  );
484146
484154
  if (_isFunction2(tsupConfig)) {
484147
484155
  const tsupOptions = await Promise.resolve(tsupConfig({}));
484148
- await build(tsup, tsupOptions, config);
484156
+ await build(tsupOptions, config);
484149
484157
  } else {
484150
- await build(tsup, tsupConfig, config);
484158
+ await build(tsupConfig, config);
484151
484159
  }
484152
484160
  } else {
484153
484161
  writeWarning(
@@ -484156,14 +484164,7 @@ ${options8.banner}
484156
484164
  );
484157
484165
  }
484158
484166
  };
484159
- async function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
484160
- let config = await readTSConfig(options8.tsConfig);
484161
- if (!config) {
484162
- config = await readTSConfig(context.projectRoot);
484163
- if (!config) {
484164
- throw new Error("No tsconfig file found");
484165
- }
484166
- }
484167
+ function getNormalizedTsConfig(config, workspaceRoot, outputPath, options8) {
484167
484168
  const tsConfig = (0, import_typescript.parseJsonConfigFileContent)(
484168
484169
  {
484169
484170
  ...config,
@@ -484190,10 +484191,10 @@ async function getNormalizedTsConfig(context, workspaceRoot, outputPath, options
484190
484191
  }
484191
484192
  return tsConfig;
484192
484193
  }
484193
- var build = async (tsup, options8, config) => {
484194
+ var build = async (options8, config) => {
484194
484195
  const { writeDebug } = await import("@storm-software/config-tools");
484195
484196
  if (Array.isArray(options8)) {
484196
- await Promise.all(options8.map((buildOptions) => build(tsup, buildOptions, config)));
484197
+ await Promise.all(options8.map((buildOptions) => build(buildOptions, config)));
484197
484198
  } else {
484198
484199
  let tsupOptions = options8;
484199
484200
  if (_isFunction2(tsupOptions)) {
@@ -484207,7 +484208,7 @@ ${!_isFunction2(tsupOptions) ? Object.keys(tsupOptions).map(
484207
484208
  ).join("\n") : "<function>"}
484208
484209
  `
484209
484210
  );
484210
- await tsup(tsupOptions);
484211
+ await (0, import_tsup.build)(tsupOptions);
484211
484212
  }
484212
484213
  };
484213
484214
  var _isPrimitive = (value) => {