@storm-software/workspace-tools 1.243.2 → 1.243.3

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,9 @@
1
+ ## 1.243.3 (2025-01-28)
2
+
3
+ ### Miscellaneous
4
+
5
+ - **monorepo:** Regenerate README markdown files ([f3649091](https://github.com/storm-software/storm-ops/commit/f3649091))
6
+
1
7
  ## 1.243.2 (2025-01-28)
2
8
 
3
9
  ### Miscellaneous
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-1.243.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![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 Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&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)
24
+ [![Version](https://img.shields.io/badge/version-1.243.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![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 Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&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)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -402,19 +402,23 @@
402
402
  "executor": "nx:run-commands",
403
403
  "dependsOn": ["^clean"]
404
404
  },
405
+ "build-untyped": {
406
+ "cache": true,
407
+ "dependsOn": ["^build"]
408
+ },
405
409
  "build-base": {
406
410
  "cache": true,
407
- "dependsOn": ["clean", "^build"]
411
+ "dependsOn": ["clean", "build-untyped", "^build"]
408
412
  },
409
413
  "build-local": {
410
414
  "cache": true,
411
415
  "inputs": ["default", "^production"],
412
- "dependsOn": ["build-base", "^build"]
416
+ "dependsOn": ["build-base", "build-untyped", "^build"]
413
417
  },
414
418
  "build": {
415
419
  "cache": true,
416
420
  "inputs": ["default", "^production"],
417
- "dependsOn": ["build-base", "^build"]
421
+ "dependsOn": ["build-base", "build-untyped", "^build"]
418
422
  },
419
423
  "rebuild": {
420
424
  "cache": false,
@@ -28,21 +28,22 @@ import {
28
28
  } from "./chunk-XUV4U54K.mjs";
29
29
 
30
30
  // ../tsdown/src/build.ts
31
- import { hfs as hfs2 } from "@humanfs/node";
32
31
  import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph, writeJsonFile } from "@nx/devkit";
33
32
  import defu from "defu";
33
+ import { existsSync } from "node:fs";
34
+ import hf from "node:fs/promises";
34
35
  import { findWorkspaceRoot } from "nx/src/utils/find-workspace-root";
35
36
  import { build as tsdown } from "tsdown";
36
37
 
37
38
  // ../tsdown/src/clean.ts
38
- import { hfs } from "@humanfs/node";
39
- async function clean(name = "ESBuild", directory, config) {
40
- writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
41
- const stopwatch = getStopwatch(`${name} output clean`);
42
- await hfs.deleteAll(directory);
43
- stopwatch();
39
+ import { rm } from "node:fs/promises";
40
+ async function cleanDirectories(name = "TSDown", directory, config) {
41
+ await rm(directory, {
42
+ recursive: true,
43
+ force: true
44
+ });
44
45
  }
45
- __name(clean, "clean");
46
+ __name(cleanDirectories, "cleanDirectories");
46
47
 
47
48
  // ../tsdown/src/config.ts
48
49
  var DEFAULT_BUILD_OPTIONS = {
@@ -80,10 +81,11 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
80
81
  exitOnError: true
81
82
  });
82
83
  const projectJsonPath = joinPaths(workspaceRoot.dir, projectRoot, "project.json");
83
- if (!await hfs2.isFile(projectJsonPath)) {
84
+ if (!existsSync(projectJsonPath)) {
84
85
  throw new Error("Cannot find project.json configuration");
85
86
  }
86
- const projectJson = await hfs2.json(projectJsonPath);
87
+ const projectJsonFile = await hf.readFile(projectJsonPath, "utf8");
88
+ const projectJson = JSON.parse(projectJsonFile);
87
89
  const projectName = projectJson.name;
88
90
  const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
89
91
  if (!projectConfigurations?.projects?.[projectName]) {
@@ -93,7 +95,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
93
95
  options.name ??= `${projectName}-${options.format}`;
94
96
  options.target ??= DEFAULT_TARGET;
95
97
  const packageJsonPath = joinPaths(workspaceRoot.dir, options.projectRoot, "package.json");
96
- if (!await hfs2.isFile(packageJsonPath)) {
98
+ if (!existsSync(packageJsonPath)) {
97
99
  throw new Error("Cannot find package.json configuration");
98
100
  }
99
101
  const env = getEnv("tsdown", options);
@@ -148,17 +150,18 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
148
150
  return result;
149
151
  }, "resolveOptions");
150
152
  async function generatePackageJson(options) {
151
- if (options.generatePackageJson !== false && await hfs2.isFile(joinPaths(options.projectRoot, "package.json"))) {
153
+ if (options.generatePackageJson !== false && existsSync(joinPaths(options.projectRoot, "package.json"))) {
152
154
  writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
153
155
  const stopwatch = getStopwatch("Write package.json file");
154
156
  const packageJsonPath = joinPaths(options.projectRoot, "project.json");
155
- if (!await hfs2.isFile(packageJsonPath)) {
157
+ if (!existsSync(packageJsonPath)) {
156
158
  throw new Error("Cannot find package.json configuration");
157
159
  }
158
- let packageJson = await hfs2.json(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"));
159
- if (!packageJson) {
160
+ const packageJsonFile = await hf.readFile(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
161
+ if (!packageJsonFile) {
160
162
  throw new Error("Cannot find package.json configuration file");
161
163
  }
164
+ let packageJson = JSON.parse(packageJsonFile);
162
165
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
163
166
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
164
167
  packageJson.exports ??= {};
@@ -226,7 +229,10 @@ async function reportResults(options) {
226
229
  __name(reportResults, "reportResults");
227
230
  async function cleanOutputPath(options) {
228
231
  if (options.clean !== false && options.outdir) {
229
- await clean(options.name, options.outdir, options.config);
232
+ writeDebug(` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
233
+ const stopwatch = getStopwatch(`${options.name} output clean`);
234
+ await cleanDirectories(options.name, options.outdir, options.config);
235
+ stopwatch();
230
236
  }
231
237
  return options;
232
238
  }
@@ -28,21 +28,22 @@ var _chunkBUXJSVJGjs = require('./chunk-BUXJSVJG.js');
28
28
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
29
29
 
30
30
  // ../tsdown/src/build.ts
31
- var _node = require('@humanfs/node');
32
31
  var _devkit = require('@nx/devkit');
33
32
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
33
+ var _fs = require('fs');
34
+ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
34
35
  var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
35
36
  var _tsdown = require('tsdown');
36
37
 
37
38
  // ../tsdown/src/clean.ts
38
39
 
39
- async function clean(name = "ESBuild", directory, config) {
40
- _chunkB6PUPX6Ojs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
41
- const stopwatch = _chunkB6PUPX6Ojs.getStopwatch.call(void 0, `${name} output clean`);
42
- await _node.hfs.deleteAll(directory);
43
- stopwatch();
40
+ async function cleanDirectories(name = "TSDown", directory, config) {
41
+ await _promises.rm.call(void 0, directory, {
42
+ recursive: true,
43
+ force: true
44
+ });
44
45
  }
45
- _chunk3GQAWCBQjs.__name.call(void 0, clean, "clean");
46
+ _chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
46
47
 
47
48
  // ../tsdown/src/config.ts
48
49
  var DEFAULT_BUILD_OPTIONS = {
@@ -80,10 +81,11 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
80
81
  exitOnError: true
81
82
  });
82
83
  const projectJsonPath = _chunkBUXJSVJGjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
83
- if (!await _node.hfs.isFile(projectJsonPath)) {
84
+ if (!_fs.existsSync.call(void 0, projectJsonPath)) {
84
85
  throw new Error("Cannot find project.json configuration");
85
86
  }
86
- const projectJson = await _node.hfs.json(projectJsonPath);
87
+ const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
88
+ const projectJson = JSON.parse(projectJsonFile);
87
89
  const projectName = projectJson.name;
88
90
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
89
91
  if (!_optionalChain([projectConfigurations, 'optionalAccess', _ => _.projects, 'optionalAccess', _2 => _2[projectName]])) {
@@ -93,7 +95,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
93
95
  options.name ??= `${projectName}-${options.format}`;
94
96
  options.target ??= _chunkRSILHGEUjs.DEFAULT_TARGET;
95
97
  const packageJsonPath = _chunkBUXJSVJGjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
96
- if (!await _node.hfs.isFile(packageJsonPath)) {
98
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
97
99
  throw new Error("Cannot find package.json configuration");
98
100
  }
99
101
  const env = _chunkRSILHGEUjs.getEnv.call(void 0, "tsdown", options);
@@ -148,17 +150,18 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
148
150
  return result;
149
151
  }, "resolveOptions");
150
152
  async function generatePackageJson(options) {
151
- if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkBUXJSVJGjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
153
+ if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkBUXJSVJGjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
152
154
  _chunkB6PUPX6Ojs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
153
155
  const stopwatch = _chunkB6PUPX6Ojs.getStopwatch.call(void 0, "Write package.json file");
154
156
  const packageJsonPath = _chunkBUXJSVJGjs.joinPaths.call(void 0, options.projectRoot, "project.json");
155
- if (!await _node.hfs.isFile(packageJsonPath)) {
157
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
156
158
  throw new Error("Cannot find package.json configuration");
157
159
  }
158
- let packageJson = await _node.hfs.json(_chunkBUXJSVJGjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
159
- if (!packageJson) {
160
+ const packageJsonFile = await _promises2.default.readFile(_chunkBUXJSVJGjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
161
+ if (!packageJsonFile) {
160
162
  throw new Error("Cannot find package.json configuration file");
161
163
  }
164
+ let packageJson = JSON.parse(packageJsonFile);
162
165
  packageJson = await _chunkRSILHGEUjs.addPackageDependencies.call(void 0, options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
163
166
  packageJson = await _chunkRSILHGEUjs.addWorkspacePackageJsonFields.call(void 0, options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
164
167
  packageJson.exports ??= {};
@@ -226,7 +229,10 @@ async function reportResults(options) {
226
229
  _chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
227
230
  async function cleanOutputPath(options) {
228
231
  if (options.clean !== false && options.outdir) {
229
- await clean(options.name, options.outdir, options.config);
232
+ _chunkB6PUPX6Ojs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
233
+ const stopwatch = _chunkB6PUPX6Ojs.getStopwatch.call(void 0, `${options.name} output clean`);
234
+ await cleanDirectories(options.name, options.outdir, options.config);
235
+ stopwatch();
230
236
  }
231
237
  return options;
232
238
  }
@@ -33,7 +33,6 @@ var _chunkBUXJSVJGjs = require('./chunk-BUXJSVJG.js');
33
33
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
34
34
 
35
35
  // ../esbuild/src/build.ts
36
- var _node = require('@humanfs/node');
37
36
  var _devkit = require('@nx/devkit');
38
37
 
39
38
  // ../config-tools/src/utilities/run.ts
@@ -62,6 +61,8 @@ var _estoolkit = require('es-toolkit');
62
61
  var _compat = require('es-toolkit/compat');
63
62
  var _esbuild = require('esbuild'); var esbuild2 = _interopRequireWildcard(_esbuild); var esbuild = _interopRequireWildcard(_esbuild);
64
63
  var _globby = require('globby');
64
+ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
65
+ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
65
66
  var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
66
67
 
67
68
  // ../esbuild/src/base/renderer-engine.ts
@@ -69,7 +70,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
69
70
  var _sourcemap = require('source-map');
70
71
 
71
72
  // ../esbuild/src/utilities/output-file.ts
72
- var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
73
+
73
74
 
74
75
  var outputFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (filepath, data, options) => {
75
76
  await _fs2.default.promises.mkdir(_path2.default.dirname(filepath), {
@@ -207,13 +208,13 @@ var RendererEngine = class {
207
208
 
208
209
  // ../esbuild/src/clean.ts
209
210
 
210
- async function clean(name = "ESBuild", directory, config) {
211
- _chunkB6PUPX6Ojs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
212
- const stopwatch = _chunkB6PUPX6Ojs.getStopwatch.call(void 0, `${name} output clean`);
213
- await _node.hfs.deleteAll(directory);
214
- stopwatch();
211
+ async function cleanDirectories(name = "ESBuild", directory, config) {
212
+ await _promises.rm.call(void 0, directory, {
213
+ recursive: true,
214
+ force: true
215
+ });
215
216
  }
216
- _chunk3GQAWCBQjs.__name.call(void 0, clean, "clean");
217
+ _chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
217
218
 
218
219
  // ../esbuild/src/plugins/esm-split-code-to-cjs.ts
219
220
 
@@ -385,8 +386,9 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
385
386
  }), "resolvePathsPlugin");
386
387
 
387
388
  // ../esbuild/src/plugins/tsc.ts
388
-
389
389
  var _apiextractor = require('@microsoft/api-extractor');
390
+
391
+
390
392
  function bundleTypeDefinitions(filename, outfile, externals, options) {
391
393
  const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkBUXJSVJGjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
392
394
  const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
@@ -459,18 +461,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
459
461
  const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
460
462
  const bundlePath = _chunkBUXJSVJGjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
461
463
  let dtsPath;
462
- if (await _node.hfs.isFile(_chunkBUXJSVJGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
464
+ if (_fs.existsSync.call(void 0, _chunkBUXJSVJGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
463
465
  dtsPath = _chunkBUXJSVJGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
464
- } else if (await _node.hfs.isFile(_chunkBUXJSVJGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
466
+ } else if (_fs.existsSync.call(void 0, _chunkBUXJSVJGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
465
467
  dtsPath = _chunkBUXJSVJGjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
466
468
  }
467
469
  const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
468
470
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
469
471
  bundleTypeDefinitions(dtsPath, bundlePath, _nullishCoalesce(resolvedOptions.external, () => ( [])), resolvedOptions);
470
- const dtsContents = await _node.hfs.text(`${bundlePath}.d.ts`);
471
- await _node.hfs.write(`${bundlePath}.${ext}`, dtsContents);
472
+ const dtsContents = await _promises2.default.readFile(`${bundlePath}.d.ts`, "utf8");
473
+ await _promises2.default.writeFile(`${bundlePath}.${ext}`, dtsContents);
472
474
  } else {
473
- await _node.hfs.write(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
475
+ await _promises2.default.writeFile(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
474
476
  }
475
477
  }
476
478
  });
@@ -719,10 +721,11 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
719
721
  exitOnError: true
720
722
  });
721
723
  const projectJsonPath = _chunkBUXJSVJGjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
722
- if (!await _node.hfs.isFile(projectJsonPath)) {
724
+ if (!_fs.existsSync.call(void 0, projectJsonPath)) {
723
725
  throw new Error("Cannot find project.json configuration");
724
726
  }
725
- const projectJson = await _node.hfs.json(projectJsonPath);
727
+ const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
728
+ const projectJson = JSON.parse(projectJsonFile);
726
729
  const projectName = projectJson.name;
727
730
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
728
731
  if (!_optionalChain([projectConfigurations, 'optionalAccess', _24 => _24.projects, 'optionalAccess', _25 => _25[projectName]])) {
@@ -732,10 +735,11 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
732
735
  options.name ??= `${projectName}-${options.format}`;
733
736
  options.target ??= _chunkRSILHGEUjs.DEFAULT_TARGET;
734
737
  const packageJsonPath = _chunkBUXJSVJGjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
735
- if (!await _node.hfs.isFile(packageJsonPath)) {
738
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
736
739
  throw new Error("Cannot find package.json configuration");
737
740
  }
738
- const packageJson = await _node.hfs.json(packageJsonPath);
741
+ const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
742
+ const packageJson = JSON.parse(packageJsonFile);
739
743
  const outExtension = getOutputExtensionMap(options, packageJson.type);
740
744
  const env = _chunkRSILHGEUjs.getEnv.call(void 0, "esbuild", options);
741
745
  const result = {
@@ -814,14 +818,15 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
814
818
  return result;
815
819
  }, "resolveOptions");
816
820
  async function generatePackageJson(context2) {
817
- if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkBUXJSVJGjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
821
+ if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkBUXJSVJGjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
818
822
  _chunkB6PUPX6Ojs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
819
823
  const stopwatch = _chunkB6PUPX6Ojs.getStopwatch.call(void 0, "Write package.json file");
820
824
  const packageJsonPath = _chunkBUXJSVJGjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
821
- if (!await _node.hfs.isFile(packageJsonPath)) {
825
+ if (!_fs.existsSync.call(void 0, packageJsonPath)) {
822
826
  throw new Error("Cannot find package.json configuration");
823
827
  }
824
- let packageJson = await _node.hfs.json(_chunkBUXJSVJGjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
828
+ const packageJsonFile = await _promises2.default.readFile(_chunkBUXJSVJGjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
829
+ let packageJson = JSON.parse(packageJsonFile);
825
830
  if (!packageJson) {
826
831
  throw new Error("Cannot find package.json configuration file");
827
832
  }
@@ -894,7 +899,7 @@ async function executeEsBuild(context2) {
894
899
  const result = await esbuild2.build(context2.options);
895
900
  if (result.metafile) {
896
901
  const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
897
- await _node.hfs.write(metafilePath, JSON.stringify(result.metafile));
902
+ await _promises2.default.writeFile(metafilePath, JSON.stringify(result.metafile));
898
903
  }
899
904
  stopwatch();
900
905
  return context2;
@@ -951,7 +956,10 @@ async function dependencyCheck(options) {
951
956
  _chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
952
957
  async function cleanOutputPath(context2) {
953
958
  if (context2.options.clean !== false && context2.options.outdir) {
954
- await clean(context2.options.name, context2.options.outdir, context2.options.config);
959
+ _chunkB6PUPX6Ojs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
960
+ const stopwatch = _chunkB6PUPX6Ojs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
961
+ await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
962
+ stopwatch();
955
963
  }
956
964
  return context2;
957
965
  }
@@ -34,7 +34,6 @@ import {
34
34
  } from "./chunk-XUV4U54K.mjs";
35
35
 
36
36
  // ../esbuild/src/build.ts
37
- import { hfs as hfs3 } from "@humanfs/node";
38
37
  import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph, writeJsonFile } from "@nx/devkit";
39
38
 
40
39
  // ../config-tools/src/utilities/run.ts
@@ -63,6 +62,8 @@ import { debounce, flatten } from "es-toolkit";
63
62
  import { map } from "es-toolkit/compat";
64
63
  import * as esbuild2 from "esbuild";
65
64
  import { globbySync } from "globby";
65
+ import { existsSync as existsSync2 } from "node:fs";
66
+ import hf from "node:fs/promises";
66
67
  import { findWorkspaceRoot } from "nx/src/utils/find-workspace-root";
67
68
 
68
69
  // ../esbuild/src/base/renderer-engine.ts
@@ -207,14 +208,14 @@ var RendererEngine = class {
207
208
  };
208
209
 
209
210
  // ../esbuild/src/clean.ts
210
- import { hfs } from "@humanfs/node";
211
- async function clean(name = "ESBuild", directory, config) {
212
- writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
213
- const stopwatch = getStopwatch(`${name} output clean`);
214
- await hfs.deleteAll(directory);
215
- stopwatch();
211
+ import { rm } from "node:fs/promises";
212
+ async function cleanDirectories(name = "ESBuild", directory, config) {
213
+ await rm(directory, {
214
+ recursive: true,
215
+ force: true
216
+ });
216
217
  }
217
- __name(clean, "clean");
218
+ __name(cleanDirectories, "cleanDirectories");
218
219
 
219
220
  // ../esbuild/src/plugins/esm-split-code-to-cjs.ts
220
221
  import * as esbuild from "esbuild";
@@ -386,8 +387,9 @@ var resolvePathsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
386
387
  }), "resolvePathsPlugin");
387
388
 
388
389
  // ../esbuild/src/plugins/tsc.ts
389
- import { hfs as hfs2 } from "@humanfs/node";
390
390
  import { Extractor, ExtractorConfig } from "@microsoft/api-extractor";
391
+ import { existsSync } from "node:fs";
392
+ import fs2 from "node:fs/promises";
391
393
  function bundleTypeDefinitions(filename, outfile, externals, options) {
392
394
  const { dependencies, peerDependencies, devDependencies } = __require(joinPaths(options.projectRoot, "package.json"));
393
395
  const dependenciesKeys = Object.keys(dependencies ?? {}).flatMap((p) => [
@@ -460,18 +462,18 @@ var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
460
462
  const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
461
463
  const bundlePath = joinPaths(resolvedOptions.outdir, entryPoint);
462
464
  let dtsPath;
463
- if (await hfs2.isFile(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
465
+ if (existsSync(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
464
466
  dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
465
- } else if (await hfs2.isFile(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
467
+ } else if (existsSync(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
466
468
  dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
467
469
  }
468
470
  const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
469
471
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
470
472
  bundleTypeDefinitions(dtsPath, bundlePath, resolvedOptions.external ?? [], resolvedOptions);
471
- const dtsContents = await hfs2.text(`${bundlePath}.d.ts`);
472
- await hfs2.write(`${bundlePath}.${ext}`, dtsContents);
473
+ const dtsContents = await fs2.readFile(`${bundlePath}.d.ts`, "utf8");
474
+ await fs2.writeFile(`${bundlePath}.${ext}`, dtsContents);
473
475
  } else {
474
- await hfs2.write(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
476
+ await fs2.writeFile(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
475
477
  }
476
478
  }
477
479
  });
@@ -720,10 +722,11 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
720
722
  exitOnError: true
721
723
  });
722
724
  const projectJsonPath = joinPaths(workspaceRoot.dir, projectRoot, "project.json");
723
- if (!await hfs3.isFile(projectJsonPath)) {
725
+ if (!existsSync2(projectJsonPath)) {
724
726
  throw new Error("Cannot find project.json configuration");
725
727
  }
726
- const projectJson = await hfs3.json(projectJsonPath);
728
+ const projectJsonFile = await hf.readFile(projectJsonPath, "utf8");
729
+ const projectJson = JSON.parse(projectJsonFile);
727
730
  const projectName = projectJson.name;
728
731
  const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
729
732
  if (!projectConfigurations?.projects?.[projectName]) {
@@ -733,10 +736,11 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
733
736
  options.name ??= `${projectName}-${options.format}`;
734
737
  options.target ??= DEFAULT_TARGET;
735
738
  const packageJsonPath = joinPaths(workspaceRoot.dir, options.projectRoot, "package.json");
736
- if (!await hfs3.isFile(packageJsonPath)) {
739
+ if (!existsSync2(packageJsonPath)) {
737
740
  throw new Error("Cannot find package.json configuration");
738
741
  }
739
- const packageJson = await hfs3.json(packageJsonPath);
742
+ const packageJsonFile = await hf.readFile(packageJsonPath, "utf8");
743
+ const packageJson = JSON.parse(packageJsonFile);
740
744
  const outExtension = getOutputExtensionMap(options, packageJson.type);
741
745
  const env = getEnv("esbuild", options);
742
746
  const result = {
@@ -815,14 +819,15 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
815
819
  return result;
816
820
  }, "resolveOptions");
817
821
  async function generatePackageJson(context2) {
818
- if (context2.options.generatePackageJson !== false && await hfs3.isFile(joinPaths(context2.options.projectRoot, "package.json"))) {
822
+ if (context2.options.generatePackageJson !== false && existsSync2(joinPaths(context2.options.projectRoot, "package.json"))) {
819
823
  writeDebug(" \u270D\uFE0F Writing package.json file", context2.options.config);
820
824
  const stopwatch = getStopwatch("Write package.json file");
821
825
  const packageJsonPath = joinPaths(context2.options.projectRoot, "project.json");
822
- if (!await hfs3.isFile(packageJsonPath)) {
826
+ if (!existsSync2(packageJsonPath)) {
823
827
  throw new Error("Cannot find package.json configuration");
824
828
  }
825
- let packageJson = await hfs3.json(joinPaths(context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
829
+ const packageJsonFile = await hf.readFile(joinPaths(context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
830
+ let packageJson = JSON.parse(packageJsonFile);
826
831
  if (!packageJson) {
827
832
  throw new Error("Cannot find package.json configuration file");
828
833
  }
@@ -895,7 +900,7 @@ async function executeEsBuild(context2) {
895
900
  const result = await esbuild2.build(context2.options);
896
901
  if (result.metafile) {
897
902
  const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
898
- await hfs3.write(metafilePath, JSON.stringify(result.metafile));
903
+ await hf.writeFile(metafilePath, JSON.stringify(result.metafile));
899
904
  }
900
905
  stopwatch();
901
906
  return context2;
@@ -952,7 +957,10 @@ async function dependencyCheck(options) {
952
957
  __name(dependencyCheck, "dependencyCheck");
953
958
  async function cleanOutputPath(context2) {
954
959
  if (context2.options.clean !== false && context2.options.outdir) {
955
- await clean(context2.options.name, context2.options.outdir, context2.options.config);
960
+ writeDebug(` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
961
+ const stopwatch = getStopwatch(`${context2.options.name} output clean`);
962
+ await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
963
+ stopwatch();
956
964
  }
957
965
  return context2;
958
966
  }
package/dist/executors.js CHANGED
@@ -10,7 +10,7 @@ var _chunkMMMTLP2Wjs = require('./chunk-MMMTLP2W.js');
10
10
  var _chunkGYGIXXALjs = require('./chunk-GYGIXXAL.js');
11
11
 
12
12
 
13
- var _chunkJARU6ZVHjs = require('./chunk-JARU6ZVH.js');
13
+ var _chunkFZUZUTKXjs = require('./chunk-FZUZUTKX.js');
14
14
 
15
15
 
16
16
  var _chunkIF2GIONQjs = require('./chunk-IF2GIONQ.js');
@@ -22,7 +22,7 @@ var _chunkQSLN7UYGjs = require('./chunk-QSLN7UYG.js');
22
22
  var _chunkGGGO542Mjs = require('./chunk-GGGO542M.js');
23
23
 
24
24
 
25
- var _chunkL5FYEAAPjs = require('./chunk-L5FYEAAP.js');
25
+ var _chunkGDE7VBWWjs = require('./chunk-GDE7VBWW.js');
26
26
  require('./chunk-RSILHGEU.js');
27
27
 
28
28
 
@@ -58,4 +58,4 @@ require('./chunk-3GQAWCBQ.js');
58
58
 
59
59
 
60
60
 
61
- exports.LARGE_BUFFER = _chunkMMMTLP2Wjs.LARGE_BUFFER; exports.cargoBuildExecutor = _chunkYSYBVJGRjs.cargoBuildExecutor; exports.cargoCheckExecutor = _chunkHONSACRTjs.cargoCheckExecutor; exports.cargoClippyExecutor = _chunkYWKUJJ34js.cargoClippyExecutor; exports.cargoDocExecutor = _chunkK7QVZAWDjs.cargoDocExecutor; exports.cargoFormatExecutor = _chunkQSLN7UYGjs.cargoFormatExecutor; exports.esbuildExecutorFn = _chunkL5FYEAAPjs.esbuildExecutorFn; exports.getRegistryVersion = _chunkGGGO542Mjs.getRegistryVersion; exports.sizeLimitExecutorFn = _chunkGYGIXXALjs.sizeLimitExecutorFn; exports.tsdownExecutorFn = _chunkJARU6ZVHjs.tsdownExecutorFn; exports.typiaExecutorFn = _chunkIF2GIONQjs.typiaExecutorFn; exports.unbuildExecutorFn = _chunk7GKIVRFHjs.unbuildExecutorFn;
61
+ exports.LARGE_BUFFER = _chunkMMMTLP2Wjs.LARGE_BUFFER; exports.cargoBuildExecutor = _chunkYSYBVJGRjs.cargoBuildExecutor; exports.cargoCheckExecutor = _chunkHONSACRTjs.cargoCheckExecutor; exports.cargoClippyExecutor = _chunkYWKUJJ34js.cargoClippyExecutor; exports.cargoDocExecutor = _chunkK7QVZAWDjs.cargoDocExecutor; exports.cargoFormatExecutor = _chunkQSLN7UYGjs.cargoFormatExecutor; exports.esbuildExecutorFn = _chunkGDE7VBWWjs.esbuildExecutorFn; exports.getRegistryVersion = _chunkGGGO542Mjs.getRegistryVersion; exports.sizeLimitExecutorFn = _chunkGYGIXXALjs.sizeLimitExecutorFn; exports.tsdownExecutorFn = _chunkFZUZUTKXjs.tsdownExecutorFn; exports.typiaExecutorFn = _chunkIF2GIONQjs.typiaExecutorFn; exports.unbuildExecutorFn = _chunk7GKIVRFHjs.unbuildExecutorFn;
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-LYUV4LMB.mjs";
11
11
  import {
12
12
  tsdownExecutorFn
13
- } from "./chunk-4BEERAL7.mjs";
13
+ } from "./chunk-6627ZZQF.mjs";
14
14
  import {
15
15
  typiaExecutorFn
16
16
  } from "./chunk-CFRPLVEU.mjs";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-6ZQ3QYXH.mjs";
23
23
  import {
24
24
  esbuildExecutorFn
25
- } from "./chunk-GMC262MH.mjs";
25
+ } from "./chunk-SBCLCF4E.mjs";
26
26
  import "./chunk-EUCOXCI2.mjs";
27
27
  import {
28
28
  cargoBuildExecutor
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ var _chunkMMMTLP2Wjs = require('./chunk-MMMTLP2W.js');
57
57
  var _chunkGYGIXXALjs = require('./chunk-GYGIXXAL.js');
58
58
 
59
59
 
60
- var _chunkJARU6ZVHjs = require('./chunk-JARU6ZVH.js');
60
+ var _chunkFZUZUTKXjs = require('./chunk-FZUZUTKX.js');
61
61
 
62
62
 
63
63
  var _chunkIF2GIONQjs = require('./chunk-IF2GIONQ.js');
@@ -69,7 +69,7 @@ var _chunkQSLN7UYGjs = require('./chunk-QSLN7UYG.js');
69
69
  var _chunkGGGO542Mjs = require('./chunk-GGGO542M.js');
70
70
 
71
71
 
72
- var _chunkL5FYEAAPjs = require('./chunk-L5FYEAAP.js');
72
+ var _chunkGDE7VBWWjs = require('./chunk-GDE7VBWW.js');
73
73
  require('./chunk-RSILHGEU.js');
74
74
 
75
75
 
@@ -287,4 +287,4 @@ require('./chunk-3GQAWCBQ.js');
287
287
 
288
288
 
289
289
 
290
- exports.INVALID_CARGO_ARGS = _chunkULBTYC2Bjs.INVALID_CARGO_ARGS; exports.LARGE_BUFFER = _chunkMMMTLP2Wjs.LARGE_BUFFER; exports.LOCK_FILES = _chunkPK2SUBWIjs.LOCK_FILES; exports.NPM_LOCK_FILE = _chunkPK2SUBWIjs.NPM_LOCK_FILE; exports.NPM_LOCK_PATH = _chunkPK2SUBWIjs.NPM_LOCK_PATH; exports.PNPM_LOCK_FILE = _chunkPK2SUBWIjs.PNPM_LOCK_FILE; exports.PNPM_LOCK_PATH = _chunkPK2SUBWIjs.PNPM_LOCK_PATH; exports.PackageManagerTypes = _chunk7AXFMX2Tjs.PackageManagerTypes; exports.ProjectTagConstants = _chunk7YRW5HNXjs.ProjectTagConstants; exports.ProjectTagDistStyleValue = _chunk4NOLUAQNjs.ProjectTagDistStyleValue; exports.ProjectTagLanguageValue = _chunk4NOLUAQNjs.ProjectTagLanguageValue; exports.ProjectTagPlatformValue = _chunk4NOLUAQNjs.ProjectTagPlatformValue; exports.ProjectTagRegistryValue = _chunk4NOLUAQNjs.ProjectTagRegistryValue; exports.ProjectTagTypeValue = _chunk4NOLUAQNjs.ProjectTagTypeValue; exports.ProjectTagVariant = _chunk4NOLUAQNjs.ProjectTagVariant; exports.YARN_LOCK_FILE = _chunkPK2SUBWIjs.YARN_LOCK_FILE; exports.YARN_LOCK_PATH = _chunkPK2SUBWIjs.YARN_LOCK_PATH; exports.addPluginProjectTag = _chunk7YRW5HNXjs.addPluginProjectTag; exports.addProjectTag = _chunk7YRW5HNXjs.addProjectTag; exports.applyWorkspaceExecutorTokens = _chunkRFO5NMSBjs.applyWorkspaceExecutorTokens; exports.baseExecutorSchema = _chunkI734UVDTjs.base_executor_untyped_default; exports.baseGeneratorSchema = _chunk7CJRMBX3js.base_generator_untyped_default; exports.browserLibraryGeneratorFn = _chunkC3YSVZWOjs.browserLibraryGeneratorFn; exports.buildCargoCommand = _chunkULBTYC2Bjs.buildCargoCommand; exports.cargoBaseExecutorSchema = _chunk6QO3KMZAjs.cargo_base_executor_untyped_default; exports.cargoBuildExecutor = _chunkYSYBVJGRjs.cargoBuildExecutor; exports.cargoCheckExecutor = _chunkHONSACRTjs.cargoCheckExecutor; exports.cargoClippyExecutor = _chunkYWKUJJ34js.cargoClippyExecutor; exports.cargoCommand = _chunkULBTYC2Bjs.cargoCommand; exports.cargoCommandSync = _chunkULBTYC2Bjs.cargoCommandSync; exports.cargoDocExecutor = _chunkK7QVZAWDjs.cargoDocExecutor; exports.cargoFormatExecutor = _chunkQSLN7UYGjs.cargoFormatExecutor; exports.cargoMetadata = _chunkULBTYC2Bjs.cargoMetadata; exports.cargoRunCommand = _chunkULBTYC2Bjs.cargoRunCommand; exports.childProcess = _chunkULBTYC2Bjs.childProcess; exports.configSchemaGeneratorFn = _chunk2HD75CLDjs.configSchemaGeneratorFn; exports.createCliOptions = _chunkDHGZTMNDjs.createCliOptions; exports.createProjectTsConfigJson = _chunkRAVLTWJVjs.createProjectTsConfigJson; exports.esbuildExecutorFn = _chunkL5FYEAAPjs.esbuildExecutorFn; exports.eslintVersion = _chunkHI4G4OOGjs.eslintVersion; exports.formatProjectTag = _chunk7YRW5HNXjs.formatProjectTag; exports.getLockFileDependencies = _chunkPK2SUBWIjs.getLockFileDependencies; exports.getLockFileName = _chunkPK2SUBWIjs.getLockFileName; exports.getLockFileNodes = _chunkPK2SUBWIjs.getLockFileNodes; exports.getOutputPath = _chunkRAVLTWJVjs.getOutputPath; exports.getPackageInfo = _chunk7AXFMX2Tjs.getPackageInfo; exports.getProjectConfigFromProjectJsonPath = _chunkUF6KFXG5js.getProjectConfigFromProjectJsonPath; exports.getProjectConfigFromProjectRoot = _chunkUF6KFXG5js.getProjectConfigFromProjectRoot; exports.getProjectConfiguration = _chunk5DAZ2WTIjs.getProjectConfiguration; exports.getProjectConfigurations = _chunk5DAZ2WTIjs.getProjectConfigurations; exports.getProjectPlatform = _chunkUF6KFXG5js.getProjectPlatform; exports.getProjectRoot = _chunkUF6KFXG5js.getProjectRoot; exports.getProjectTag = _chunk7YRW5HNXjs.getProjectTag; exports.getRegistryVersion = _chunkGGGO542Mjs.getRegistryVersion; exports.getTypiaTransform = _chunkXITP2BX2js.getTypiaTransform; exports.hasProjectTag = _chunk7YRW5HNXjs.hasProjectTag; exports.initGenerator = _chunk3IZ3O4OKjs.initGenerator; exports.isEqualProjectTag = _chunk7YRW5HNXjs.isEqualProjectTag; exports.isExternal = _chunkULBTYC2Bjs.isExternal; exports.lintStagedVersion = _chunkHI4G4OOGjs.lintStagedVersion; exports.lockFileExists = _chunkPK2SUBWIjs.lockFileExists; exports.modifyCargoNestedTable = _chunkZMFVKBRMjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunkZMFVKBRMjs.modifyCargoTable; exports.neutralLibraryGeneratorFn = _chunkPCPEJBLOjs.neutralLibraryGeneratorFn; exports.nodeLibraryGeneratorFn = _chunk6ZRK5I4Njs.nodeLibraryGeneratorFn; exports.nodeVersion = _chunkHI4G4OOGjs.nodeVersion; exports.normalizeOptions = _chunkRAVLTWJVjs.normalizeOptions; exports.nxVersion = _chunkHI4G4OOGjs.nxVersion; exports.parseCargoToml = _chunkZMFVKBRMjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunkZMFVKBRMjs.parseCargoTomlWithTree; exports.pnpmCatalogUpdate = _chunk2GRVQNW3js.pnpmCatalogUpdate; exports.pnpmVersion = _chunkHI4G4OOGjs.pnpmVersion; exports.presetGeneratorFn = _chunkD2ECVPJFjs.presetGeneratorFn; exports.prettierPackageJsonVersion = _chunkHI4G4OOGjs.prettierPackageJsonVersion; exports.prettierPrismaVersion = _chunkHI4G4OOGjs.prettierPrismaVersion; exports.prettierVersion = _chunkHI4G4OOGjs.prettierVersion; exports.releaseVersionGeneratorFn = _chunkRRWRVA7Fjs.releaseVersionGeneratorFn; exports.runProcess = _chunkULBTYC2Bjs.runProcess; exports.semanticReleaseVersion = _chunkHI4G4OOGjs.semanticReleaseVersion; exports.setDefaultProjectTags = _chunk7YRW5HNXjs.setDefaultProjectTags; exports.sizeLimitExecutorFn = _chunkGYGIXXALjs.sizeLimitExecutorFn; exports.stringifyCargoToml = _chunkZMFVKBRMjs.stringifyCargoToml; exports.swcCliVersion = _chunkHI4G4OOGjs.swcCliVersion; exports.swcCoreVersion = _chunkHI4G4OOGjs.swcCoreVersion; exports.swcHelpersVersion = _chunkHI4G4OOGjs.swcHelpersVersion; exports.swcNodeVersion = _chunkHI4G4OOGjs.swcNodeVersion; exports.tsLibVersion = _chunkHI4G4OOGjs.tsLibVersion; exports.tsdownExecutorFn = _chunkJARU6ZVHjs.tsdownExecutorFn; exports.tsupVersion = _chunkHI4G4OOGjs.tsupVersion; exports.typeScriptLibraryGeneratorFn = _chunkRAVLTWJVjs.typeScriptLibraryGeneratorFn; exports.typesNodeVersion = _chunkHI4G4OOGjs.typesNodeVersion; exports.typescriptBuildExecutorSchema = _chunkIWCQL3AQjs.typescript_build_executor_untyped_default; exports.typescriptLibraryGeneratorSchema = _chunk7O34DHUGjs.typescript_library_generator_untyped_default; exports.typescriptVersion = _chunkHI4G4OOGjs.typescriptVersion; exports.typiaExecutorFn = _chunkIF2GIONQjs.typiaExecutorFn; exports.unbuildExecutorFn = _chunk7GKIVRFHjs.unbuildExecutorFn; exports.verdaccioVersion = _chunkHI4G4OOGjs.verdaccioVersion; exports.withRunExecutor = _chunkIBHLVELVjs.withRunExecutor; exports.withRunGenerator = _chunkKLHTXAIUjs.withRunGenerator;
290
+ exports.INVALID_CARGO_ARGS = _chunkULBTYC2Bjs.INVALID_CARGO_ARGS; exports.LARGE_BUFFER = _chunkMMMTLP2Wjs.LARGE_BUFFER; exports.LOCK_FILES = _chunkPK2SUBWIjs.LOCK_FILES; exports.NPM_LOCK_FILE = _chunkPK2SUBWIjs.NPM_LOCK_FILE; exports.NPM_LOCK_PATH = _chunkPK2SUBWIjs.NPM_LOCK_PATH; exports.PNPM_LOCK_FILE = _chunkPK2SUBWIjs.PNPM_LOCK_FILE; exports.PNPM_LOCK_PATH = _chunkPK2SUBWIjs.PNPM_LOCK_PATH; exports.PackageManagerTypes = _chunk7AXFMX2Tjs.PackageManagerTypes; exports.ProjectTagConstants = _chunk7YRW5HNXjs.ProjectTagConstants; exports.ProjectTagDistStyleValue = _chunk4NOLUAQNjs.ProjectTagDistStyleValue; exports.ProjectTagLanguageValue = _chunk4NOLUAQNjs.ProjectTagLanguageValue; exports.ProjectTagPlatformValue = _chunk4NOLUAQNjs.ProjectTagPlatformValue; exports.ProjectTagRegistryValue = _chunk4NOLUAQNjs.ProjectTagRegistryValue; exports.ProjectTagTypeValue = _chunk4NOLUAQNjs.ProjectTagTypeValue; exports.ProjectTagVariant = _chunk4NOLUAQNjs.ProjectTagVariant; exports.YARN_LOCK_FILE = _chunkPK2SUBWIjs.YARN_LOCK_FILE; exports.YARN_LOCK_PATH = _chunkPK2SUBWIjs.YARN_LOCK_PATH; exports.addPluginProjectTag = _chunk7YRW5HNXjs.addPluginProjectTag; exports.addProjectTag = _chunk7YRW5HNXjs.addProjectTag; exports.applyWorkspaceExecutorTokens = _chunkRFO5NMSBjs.applyWorkspaceExecutorTokens; exports.baseExecutorSchema = _chunkI734UVDTjs.base_executor_untyped_default; exports.baseGeneratorSchema = _chunk7CJRMBX3js.base_generator_untyped_default; exports.browserLibraryGeneratorFn = _chunkC3YSVZWOjs.browserLibraryGeneratorFn; exports.buildCargoCommand = _chunkULBTYC2Bjs.buildCargoCommand; exports.cargoBaseExecutorSchema = _chunk6QO3KMZAjs.cargo_base_executor_untyped_default; exports.cargoBuildExecutor = _chunkYSYBVJGRjs.cargoBuildExecutor; exports.cargoCheckExecutor = _chunkHONSACRTjs.cargoCheckExecutor; exports.cargoClippyExecutor = _chunkYWKUJJ34js.cargoClippyExecutor; exports.cargoCommand = _chunkULBTYC2Bjs.cargoCommand; exports.cargoCommandSync = _chunkULBTYC2Bjs.cargoCommandSync; exports.cargoDocExecutor = _chunkK7QVZAWDjs.cargoDocExecutor; exports.cargoFormatExecutor = _chunkQSLN7UYGjs.cargoFormatExecutor; exports.cargoMetadata = _chunkULBTYC2Bjs.cargoMetadata; exports.cargoRunCommand = _chunkULBTYC2Bjs.cargoRunCommand; exports.childProcess = _chunkULBTYC2Bjs.childProcess; exports.configSchemaGeneratorFn = _chunk2HD75CLDjs.configSchemaGeneratorFn; exports.createCliOptions = _chunkDHGZTMNDjs.createCliOptions; exports.createProjectTsConfigJson = _chunkRAVLTWJVjs.createProjectTsConfigJson; exports.esbuildExecutorFn = _chunkGDE7VBWWjs.esbuildExecutorFn; exports.eslintVersion = _chunkHI4G4OOGjs.eslintVersion; exports.formatProjectTag = _chunk7YRW5HNXjs.formatProjectTag; exports.getLockFileDependencies = _chunkPK2SUBWIjs.getLockFileDependencies; exports.getLockFileName = _chunkPK2SUBWIjs.getLockFileName; exports.getLockFileNodes = _chunkPK2SUBWIjs.getLockFileNodes; exports.getOutputPath = _chunkRAVLTWJVjs.getOutputPath; exports.getPackageInfo = _chunk7AXFMX2Tjs.getPackageInfo; exports.getProjectConfigFromProjectJsonPath = _chunkUF6KFXG5js.getProjectConfigFromProjectJsonPath; exports.getProjectConfigFromProjectRoot = _chunkUF6KFXG5js.getProjectConfigFromProjectRoot; exports.getProjectConfiguration = _chunk5DAZ2WTIjs.getProjectConfiguration; exports.getProjectConfigurations = _chunk5DAZ2WTIjs.getProjectConfigurations; exports.getProjectPlatform = _chunkUF6KFXG5js.getProjectPlatform; exports.getProjectRoot = _chunkUF6KFXG5js.getProjectRoot; exports.getProjectTag = _chunk7YRW5HNXjs.getProjectTag; exports.getRegistryVersion = _chunkGGGO542Mjs.getRegistryVersion; exports.getTypiaTransform = _chunkXITP2BX2js.getTypiaTransform; exports.hasProjectTag = _chunk7YRW5HNXjs.hasProjectTag; exports.initGenerator = _chunk3IZ3O4OKjs.initGenerator; exports.isEqualProjectTag = _chunk7YRW5HNXjs.isEqualProjectTag; exports.isExternal = _chunkULBTYC2Bjs.isExternal; exports.lintStagedVersion = _chunkHI4G4OOGjs.lintStagedVersion; exports.lockFileExists = _chunkPK2SUBWIjs.lockFileExists; exports.modifyCargoNestedTable = _chunkZMFVKBRMjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunkZMFVKBRMjs.modifyCargoTable; exports.neutralLibraryGeneratorFn = _chunkPCPEJBLOjs.neutralLibraryGeneratorFn; exports.nodeLibraryGeneratorFn = _chunk6ZRK5I4Njs.nodeLibraryGeneratorFn; exports.nodeVersion = _chunkHI4G4OOGjs.nodeVersion; exports.normalizeOptions = _chunkRAVLTWJVjs.normalizeOptions; exports.nxVersion = _chunkHI4G4OOGjs.nxVersion; exports.parseCargoToml = _chunkZMFVKBRMjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunkZMFVKBRMjs.parseCargoTomlWithTree; exports.pnpmCatalogUpdate = _chunk2GRVQNW3js.pnpmCatalogUpdate; exports.pnpmVersion = _chunkHI4G4OOGjs.pnpmVersion; exports.presetGeneratorFn = _chunkD2ECVPJFjs.presetGeneratorFn; exports.prettierPackageJsonVersion = _chunkHI4G4OOGjs.prettierPackageJsonVersion; exports.prettierPrismaVersion = _chunkHI4G4OOGjs.prettierPrismaVersion; exports.prettierVersion = _chunkHI4G4OOGjs.prettierVersion; exports.releaseVersionGeneratorFn = _chunkRRWRVA7Fjs.releaseVersionGeneratorFn; exports.runProcess = _chunkULBTYC2Bjs.runProcess; exports.semanticReleaseVersion = _chunkHI4G4OOGjs.semanticReleaseVersion; exports.setDefaultProjectTags = _chunk7YRW5HNXjs.setDefaultProjectTags; exports.sizeLimitExecutorFn = _chunkGYGIXXALjs.sizeLimitExecutorFn; exports.stringifyCargoToml = _chunkZMFVKBRMjs.stringifyCargoToml; exports.swcCliVersion = _chunkHI4G4OOGjs.swcCliVersion; exports.swcCoreVersion = _chunkHI4G4OOGjs.swcCoreVersion; exports.swcHelpersVersion = _chunkHI4G4OOGjs.swcHelpersVersion; exports.swcNodeVersion = _chunkHI4G4OOGjs.swcNodeVersion; exports.tsLibVersion = _chunkHI4G4OOGjs.tsLibVersion; exports.tsdownExecutorFn = _chunkFZUZUTKXjs.tsdownExecutorFn; exports.tsupVersion = _chunkHI4G4OOGjs.tsupVersion; exports.typeScriptLibraryGeneratorFn = _chunkRAVLTWJVjs.typeScriptLibraryGeneratorFn; exports.typesNodeVersion = _chunkHI4G4OOGjs.typesNodeVersion; exports.typescriptBuildExecutorSchema = _chunkIWCQL3AQjs.typescript_build_executor_untyped_default; exports.typescriptLibraryGeneratorSchema = _chunk7O34DHUGjs.typescript_library_generator_untyped_default; exports.typescriptVersion = _chunkHI4G4OOGjs.typescriptVersion; exports.typiaExecutorFn = _chunkIF2GIONQjs.typiaExecutorFn; exports.unbuildExecutorFn = _chunk7GKIVRFHjs.unbuildExecutorFn; exports.verdaccioVersion = _chunkHI4G4OOGjs.verdaccioVersion; exports.withRunExecutor = _chunkIBHLVELVjs.withRunExecutor; exports.withRunGenerator = _chunkKLHTXAIUjs.withRunGenerator;
package/dist/index.mjs CHANGED
@@ -57,7 +57,7 @@ import {
57
57
  } from "./chunk-LYUV4LMB.mjs";
58
58
  import {
59
59
  tsdownExecutorFn
60
- } from "./chunk-4BEERAL7.mjs";
60
+ } from "./chunk-6627ZZQF.mjs";
61
61
  import {
62
62
  typiaExecutorFn
63
63
  } from "./chunk-CFRPLVEU.mjs";
@@ -69,7 +69,7 @@ import {
69
69
  } from "./chunk-6ZQ3QYXH.mjs";
70
70
  import {
71
71
  esbuildExecutorFn
72
- } from "./chunk-GMC262MH.mjs";
72
+ } from "./chunk-SBCLCF4E.mjs";
73
73
  import "./chunk-EUCOXCI2.mjs";
74
74
  import {
75
75
  cargoBuildExecutor
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkL5FYEAAPjs = require('../../../chunk-L5FYEAAP.js');
4
+ var _chunkGDE7VBWWjs = require('../../../chunk-GDE7VBWW.js');
5
5
  require('../../../chunk-RSILHGEU.js');
6
6
  require('../../../chunk-IBHLVELV.js');
7
7
  require('../../../chunk-6QSFQS3X.js');
@@ -12,4 +12,4 @@ require('../../../chunk-3GQAWCBQ.js');
12
12
 
13
13
 
14
14
 
15
- exports.default = _chunkL5FYEAAPjs.executor_default; exports.esbuildExecutorFn = _chunkL5FYEAAPjs.esbuildExecutorFn;
15
+ exports.default = _chunkGDE7VBWWjs.executor_default; exports.esbuildExecutorFn = _chunkGDE7VBWWjs.esbuildExecutorFn;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  esbuildExecutorFn,
3
3
  executor_default
4
- } from "../../../chunk-GMC262MH.mjs";
4
+ } from "../../../chunk-SBCLCF4E.mjs";
5
5
  import "../../../chunk-EUCOXCI2.mjs";
6
6
  import "../../../chunk-GJ6DN3BR.mjs";
7
7
  import "../../../chunk-K62HB3IT.mjs";
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkJARU6ZVHjs = require('../../../chunk-JARU6ZVH.js');
4
+ var _chunkFZUZUTKXjs = require('../../../chunk-FZUZUTKX.js');
5
5
  require('../../../chunk-RSILHGEU.js');
6
6
  require('../../../chunk-IBHLVELV.js');
7
7
  require('../../../chunk-6QSFQS3X.js');
@@ -12,4 +12,4 @@ require('../../../chunk-3GQAWCBQ.js');
12
12
 
13
13
 
14
14
 
15
- exports.default = _chunkJARU6ZVHjs.executor_default; exports.tsdownExecutorFn = _chunkJARU6ZVHjs.tsdownExecutorFn;
15
+ exports.default = _chunkFZUZUTKXjs.executor_default; exports.tsdownExecutorFn = _chunkFZUZUTKXjs.tsdownExecutorFn;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executor_default,
3
3
  tsdownExecutorFn
4
- } from "../../../chunk-4BEERAL7.mjs";
4
+ } from "../../../chunk-6627ZZQF.mjs";
5
5
  import "../../../chunk-EUCOXCI2.mjs";
6
6
  import "../../../chunk-GJ6DN3BR.mjs";
7
7
  import "../../../chunk-K62HB3IT.mjs";
@@ -0,0 +1,12 @@
1
+ // Generated by @storm-software/untyped
2
+ // Do not edit this file directly
3
+
4
+ interface TypeSchema {
5
+ /** @default ["**\/*untyped.ts",null] */
6
+ createNodesV2?: Array<string|Function>,
7
+
8
+ /** @default "storm-software/typescript/tsup" */
9
+ name?: string,
10
+ }
11
+
12
+ export type { TypeSchema };
@@ -0,0 +1,12 @@
1
+ // Generated by @storm-software/untyped
2
+ // Do not edit this file directly
3
+
4
+ interface TypeSchema {
5
+ /** @default ["**\/*untyped.ts",null] */
6
+ createNodesV2?: Array<string|Function>,
7
+
8
+ /** @default "storm-software/typescript/tsup" */
9
+ name?: string,
10
+ }
11
+
12
+ export type { TypeSchema };
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ import "../../../chunk-XUV4U54K.mjs";
@@ -0,0 +1,12 @@
1
+
2
+ // Generated by @storm-software/untyped
3
+ // Do not edit this file directly
4
+
5
+ export interface TypeSchema {
6
+ /** @default ["**\/*untyped.ts",null] */
7
+ createNodesV2?: Array<string|Function>,
8
+
9
+ /** @default "storm-software/typescript/tsup" */
10
+ name?: string,
11
+ }
12
+
@@ -0,0 +1,32 @@
1
+ {
2
+ "id": "#",
3
+ "properties": {
4
+ "createNodesV2": {
5
+ "type": "array",
6
+ "id": "#createNodesV2",
7
+ "default": [
8
+ "**/*untyped.ts",
9
+ null
10
+ ],
11
+ "items": {
12
+ "type": [
13
+ "string",
14
+ "function"
15
+ ]
16
+ }
17
+ },
18
+ "name": {
19
+ "type": "string",
20
+ "id": "#name",
21
+ "default": "storm-software/typescript/tsup"
22
+ }
23
+ },
24
+ "type": "object",
25
+ "default": {
26
+ "createNodesV2": [
27
+ "**/*untyped.ts",
28
+ null
29
+ ],
30
+ "name": "storm-software/typescript/tsup"
31
+ }
32
+ }
@@ -0,0 +1,16 @@
1
+
2
+ <!-- Generated by @storm-software/untyped -->
3
+ <!-- Do not edit this file directly -->
4
+
5
+ #
6
+
7
+ ## `createNodesV2`
8
+ - **Type**: `array`
9
+ - **Default**: `["**/*untyped.ts",null]`
10
+
11
+
12
+ ## `name`
13
+ - **Type**: `string`
14
+ - **Default**: `"storm-software/typescript/tsup"`
15
+
16
+
@@ -0,0 +1,8 @@
1
+ import { CreateNodesV2 } from '@nx/devkit';
2
+
3
+ declare const name = "storm-software/typescript/tsup";
4
+ interface TsupPluginOptions {
5
+ }
6
+ declare const createNodesV2: CreateNodesV2<TsupPluginOptions>;
7
+
8
+ export { type TsupPluginOptions, createNodesV2, name };
@@ -0,0 +1,8 @@
1
+ import { CreateNodesV2 } from '@nx/devkit';
2
+
3
+ declare const name = "storm-software/typescript/tsup";
4
+ interface TsupPluginOptions {
5
+ }
6
+ declare const createNodesV2: CreateNodesV2<TsupPluginOptions>;
7
+
8
+ export { type TsupPluginOptions, createNodesV2, name };
@@ -0,0 +1,132 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+ var _chunk7YRW5HNXjs = require('../../../chunk-7YRW5HNX.js');
5
+
6
+
7
+ var _chunk3GQAWCBQjs = require('../../../chunk-3GQAWCBQ.js');
8
+
9
+ // src/plugins/typescript/untyped.ts
10
+ var _devkit = require('@nx/devkit');
11
+ var _fs = require('fs');
12
+ var _path = require('path');
13
+ var _nxjsonjs = require('nx/src/config/nx-json.js');
14
+ var _packagejson = require('nx/src/utils/package-json');
15
+ var name = "storm-software/typescript/tsup";
16
+ var createNodesV2 = [
17
+ "**/*untyped.ts",
18
+ async (configFiles, options, context) => {
19
+ return await _devkit.createNodesFromFiles.call(void 0, (configFile, options2, context2) => {
20
+ try {
21
+ console.log(`Processing untyped schema file: ${configFile}`);
22
+ const projectRoot = createProjectRoot(configFile, context2.workspaceRoot);
23
+ if (!projectRoot) {
24
+ console.error("No project.json found in parent directories of Untyped schema file: ", configFile);
25
+ return {};
26
+ }
27
+ const packageJson = _devkit.readJsonFile.call(void 0, _path.join.call(void 0, projectRoot, "package.json"));
28
+ if (!packageJson) {
29
+ console.error(`No package.json found in project root: ${projectRoot}`);
30
+ return {};
31
+ }
32
+ if (!_optionalChain([packageJson, 'access', _ => _.devDependencies, 'optionalAccess', _2 => _2.untyped]) && !_optionalChain([packageJson, 'access', _3 => _3.dependencies, 'optionalAccess', _4 => _4.untyped])) {
33
+ console.warn(`No "untyped" dependency or devDependency found in package.json: ${configFile}
34
+ Please add it to your dependencies by running "pnpm add untyped -D --filter="${packageJson.name}"`);
35
+ }
36
+ const project = createProjectFromPackageJsonNextToProjectJson(_path.join.call(void 0, projectRoot, "project.json"), packageJson);
37
+ const nxJson = _nxjsonjs.readNxJson.call(void 0, context2.workspaceRoot);
38
+ const targets = _packagejson.readTargetsFromPackageJson.call(void 0, packageJson, nxJson);
39
+ let relativeRoot = projectRoot.replaceAll("\\", "/").replace(context2.workspaceRoot.replaceAll("\\", "/"), "");
40
+ if (relativeRoot.startsWith("/")) {
41
+ relativeRoot = relativeRoot.slice(1);
42
+ }
43
+ let relativeConfig = configFile.replaceAll(relativeRoot, "");
44
+ while (relativeConfig.startsWith(".")) {
45
+ relativeConfig = relativeConfig.slice(1);
46
+ }
47
+ while (relativeConfig.startsWith("/")) {
48
+ relativeConfig = relativeConfig.slice(1);
49
+ }
50
+ targets["build-untyped"] ??= {
51
+ cache: true,
52
+ executor: "nx:run-commands",
53
+ dependsOn: [
54
+ "clean",
55
+ "^build"
56
+ ],
57
+ inputs: [
58
+ "{projectRoot}/src/**/untyped.ts",
59
+ "{projectRoot}/src/**/*.untyped.ts"
60
+ ],
61
+ outputs: [
62
+ "{projectRoot}/src/**/schema.d.ts",
63
+ "{projectRoot}/src/**/*.schema.d.ts",
64
+ "{projectRoot}/src/**/schema.md",
65
+ "{projectRoot}/src/**/*.schema.md",
66
+ "{projectRoot}/src/**/schema.json",
67
+ "{projectRoot}/src/**/*.schema.json"
68
+ ],
69
+ options: {
70
+ commands: [
71
+ `storm-untyped generate --entry="${projectRoot}/**/{untyped.ts,*.untyped.ts}" `
72
+ ]
73
+ }
74
+ };
75
+ _chunk7YRW5HNXjs.addProjectTag.call(void 0, project, _chunk7YRW5HNXjs.ProjectTagConstants.Plugin.TAG_ID, name);
76
+ const result = _optionalChain([project, 'optionalAccess', _5 => _5.name]) ? {
77
+ projects: {
78
+ [project.name]: {
79
+ ...project,
80
+ root: relativeRoot,
81
+ targets
82
+ }
83
+ }
84
+ } : {};
85
+ console.log(`Writing Results for ${_nullishCoalesce(_optionalChain([project, 'optionalAccess', _6 => _6.name]), () => ( "missing name"))}`);
86
+ console.log(result);
87
+ return result;
88
+ } catch (e) {
89
+ console.error(e);
90
+ return {};
91
+ }
92
+ }, configFiles, options, context);
93
+ }
94
+ ];
95
+ function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, packageJson) {
96
+ const { nx, name: name2 } = packageJson;
97
+ const root = _path.dirname.call(void 0, projectJsonPath);
98
+ const projectJson = _devkit.readJsonFile.call(void 0, projectJsonPath);
99
+ return {
100
+ targets: {},
101
+ tags: [],
102
+ name: name2,
103
+ ...nx,
104
+ ...projectJson,
105
+ root
106
+ };
107
+ }
108
+ _chunk3GQAWCBQjs.__name.call(void 0, createProjectFromPackageJsonNextToProjectJson, "createProjectFromPackageJsonNextToProjectJson");
109
+ function createProjectRoot(configPath, workspaceRoot) {
110
+ try {
111
+ let root = _path.dirname.call(void 0, configPath);
112
+ while (root && root !== "/" && root !== workspaceRoot && !_fs.existsSync.call(void 0, _path.join.call(void 0, root, "project.json"))) {
113
+ root = _path.join.call(void 0, root, "..");
114
+ }
115
+ if (!_fs.existsSync.call(void 0, _path.join.call(void 0, root, "project.json"))) {
116
+ return null;
117
+ }
118
+ const projectRoot = _path.join.call(void 0, workspaceRoot, root);
119
+ if (!_fs.existsSync.call(void 0, _path.join.call(void 0, projectRoot, "package.json")) && !_fs.existsSync.call(void 0, _path.join.call(void 0, projectRoot, "project.json"))) {
120
+ return null;
121
+ }
122
+ return projectRoot;
123
+ } catch (e) {
124
+ console.error(e);
125
+ return null;
126
+ }
127
+ }
128
+ _chunk3GQAWCBQjs.__name.call(void 0, createProjectRoot, "createProjectRoot");
129
+
130
+
131
+
132
+ exports.createNodesV2 = createNodesV2; exports.name = name;
@@ -0,0 +1,132 @@
1
+ import {
2
+ ProjectTagConstants,
3
+ addProjectTag
4
+ } from "../../../chunk-66TYTM73.mjs";
5
+ import {
6
+ __name
7
+ } from "../../../chunk-XUV4U54K.mjs";
8
+
9
+ // src/plugins/typescript/untyped.ts
10
+ import { createNodesFromFiles, readJsonFile } from "@nx/devkit";
11
+ import { existsSync } from "node:fs";
12
+ import { dirname, join } from "node:path";
13
+ import { readNxJson } from "nx/src/config/nx-json.js";
14
+ import { readTargetsFromPackageJson } from "nx/src/utils/package-json";
15
+ var name = "storm-software/typescript/tsup";
16
+ var createNodesV2 = [
17
+ "**/*untyped.ts",
18
+ async (configFiles, options, context) => {
19
+ return await createNodesFromFiles((configFile, options2, context2) => {
20
+ try {
21
+ console.log(`Processing untyped schema file: ${configFile}`);
22
+ const projectRoot = createProjectRoot(configFile, context2.workspaceRoot);
23
+ if (!projectRoot) {
24
+ console.error("No project.json found in parent directories of Untyped schema file: ", configFile);
25
+ return {};
26
+ }
27
+ const packageJson = readJsonFile(join(projectRoot, "package.json"));
28
+ if (!packageJson) {
29
+ console.error(`No package.json found in project root: ${projectRoot}`);
30
+ return {};
31
+ }
32
+ if (!packageJson.devDependencies?.untyped && !packageJson.dependencies?.untyped) {
33
+ console.warn(`No "untyped" dependency or devDependency found in package.json: ${configFile}
34
+ Please add it to your dependencies by running "pnpm add untyped -D --filter="${packageJson.name}"`);
35
+ }
36
+ const project = createProjectFromPackageJsonNextToProjectJson(join(projectRoot, "project.json"), packageJson);
37
+ const nxJson = readNxJson(context2.workspaceRoot);
38
+ const targets = readTargetsFromPackageJson(packageJson, nxJson);
39
+ let relativeRoot = projectRoot.replaceAll("\\", "/").replace(context2.workspaceRoot.replaceAll("\\", "/"), "");
40
+ if (relativeRoot.startsWith("/")) {
41
+ relativeRoot = relativeRoot.slice(1);
42
+ }
43
+ let relativeConfig = configFile.replaceAll(relativeRoot, "");
44
+ while (relativeConfig.startsWith(".")) {
45
+ relativeConfig = relativeConfig.slice(1);
46
+ }
47
+ while (relativeConfig.startsWith("/")) {
48
+ relativeConfig = relativeConfig.slice(1);
49
+ }
50
+ targets["build-untyped"] ??= {
51
+ cache: true,
52
+ executor: "nx:run-commands",
53
+ dependsOn: [
54
+ "clean",
55
+ "^build"
56
+ ],
57
+ inputs: [
58
+ "{projectRoot}/src/**/untyped.ts",
59
+ "{projectRoot}/src/**/*.untyped.ts"
60
+ ],
61
+ outputs: [
62
+ "{projectRoot}/src/**/schema.d.ts",
63
+ "{projectRoot}/src/**/*.schema.d.ts",
64
+ "{projectRoot}/src/**/schema.md",
65
+ "{projectRoot}/src/**/*.schema.md",
66
+ "{projectRoot}/src/**/schema.json",
67
+ "{projectRoot}/src/**/*.schema.json"
68
+ ],
69
+ options: {
70
+ commands: [
71
+ `storm-untyped generate --entry="${projectRoot}/**/{untyped.ts,*.untyped.ts}" `
72
+ ]
73
+ }
74
+ };
75
+ addProjectTag(project, ProjectTagConstants.Plugin.TAG_ID, name);
76
+ const result = project?.name ? {
77
+ projects: {
78
+ [project.name]: {
79
+ ...project,
80
+ root: relativeRoot,
81
+ targets
82
+ }
83
+ }
84
+ } : {};
85
+ console.log(`Writing Results for ${project?.name ?? "missing name"}`);
86
+ console.log(result);
87
+ return result;
88
+ } catch (e) {
89
+ console.error(e);
90
+ return {};
91
+ }
92
+ }, configFiles, options, context);
93
+ }
94
+ ];
95
+ function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, packageJson) {
96
+ const { nx, name: name2 } = packageJson;
97
+ const root = dirname(projectJsonPath);
98
+ const projectJson = readJsonFile(projectJsonPath);
99
+ return {
100
+ targets: {},
101
+ tags: [],
102
+ name: name2,
103
+ ...nx,
104
+ ...projectJson,
105
+ root
106
+ };
107
+ }
108
+ __name(createProjectFromPackageJsonNextToProjectJson, "createProjectFromPackageJsonNextToProjectJson");
109
+ function createProjectRoot(configPath, workspaceRoot) {
110
+ try {
111
+ let root = dirname(configPath);
112
+ while (root && root !== "/" && root !== workspaceRoot && !existsSync(join(root, "project.json"))) {
113
+ root = join(root, "..");
114
+ }
115
+ if (!existsSync(join(root, "project.json"))) {
116
+ return null;
117
+ }
118
+ const projectRoot = join(workspaceRoot, root);
119
+ if (!existsSync(join(projectRoot, "package.json")) && !existsSync(join(projectRoot, "project.json"))) {
120
+ return null;
121
+ }
122
+ return projectRoot;
123
+ } catch (e) {
124
+ console.error(e);
125
+ return null;
126
+ }
127
+ }
128
+ __name(createProjectRoot, "createProjectRoot");
129
+ export {
130
+ createNodesV2,
131
+ name
132
+ };
@@ -0,0 +1,16 @@
1
+
2
+ <!-- Generated by @storm-software/untyped -->
3
+ <!-- Do not edit this file directly -->
4
+
5
+ #
6
+
7
+ ## `createNodesV2`
8
+ - **Type**: `array`
9
+ - **Default**: `["**/*untyped.ts",null]`
10
+
11
+
12
+ ## `name`
13
+ - **Type**: `string`
14
+ - **Default**: `"storm-software/typescript/tsup"`
15
+
16
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.243.2",
3
+ "version": "1.243.3",
4
4
  "description": "Tools for managing a Storm workspace, including various Nx generators and executors for common development tasks.",
5
5
  "repository": {
6
6
  "type": "github",
@@ -151,7 +151,8 @@
151
151
  "./plugins/rust": "./dist/src/plugins/rust/index.js",
152
152
  "./plugins/typescript": "./dist/src/plugins/typescript/index.js",
153
153
  "./plugins/typescript/tsup": "./dist/src/plugins/typescript/tsup.js",
154
- "./plugins/typescript/tsdown": "./dist/src/plugins/typescript/tsdown.js"
154
+ "./plugins/typescript/tsdown": "./dist/src/plugins/typescript/tsdown.js",
155
+ "./plugins/typescript/untyped": "./dist/src/plugins/typescript/untyped.js"
155
156
  },
156
157
  "typings": "dist/index.d.ts",
157
158
  "keywords": [