@storm-software/workspace-tools 1.292.26 → 1.292.28

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +1 -2
  3. package/dist/{chunk-F23XFCK3.js → chunk-2NHKQWQ5.js} +3 -3
  4. package/dist/{chunk-BC7TUSC7.mjs → chunk-332US6XA.mjs} +2 -2
  5. package/dist/{chunk-VWQYDQYV.js → chunk-5N7GGHPM.js} +3 -3
  6. package/dist/{chunk-DSC7W7VD.mjs → chunk-6JX3VJQY.mjs} +2 -2
  7. package/dist/{chunk-5C3AZXZ2.mjs → chunk-ALFDHMDV.mjs} +2 -2
  8. package/dist/{chunk-LJDV7HFT.js → chunk-D2PV33E5.js} +6 -6
  9. package/dist/{chunk-6FX2E553.mjs → chunk-HT7FNLPL.mjs} +2 -2
  10. package/dist/{chunk-3JD245PM.js → chunk-IUDAADGV.js} +3 -3
  11. package/dist/{chunk-JOWRO646.js → chunk-LXOTH243.js} +3 -3
  12. package/dist/{chunk-5Z2FOAF6.js → chunk-QEGJ4PKW.js} +3 -3
  13. package/dist/{chunk-CVK7A2Z7.mjs → chunk-QITMVWVJ.mjs} +2 -2
  14. package/dist/{chunk-IDYJQV74.mjs → chunk-WRXEPJDB.mjs} +35 -51
  15. package/dist/{chunk-YYBWK3LE.js → chunk-YDBNZTAA.js} +37 -53
  16. package/dist/{chunk-6LP3KKXE.mjs → chunk-ZTN2676G.mjs} +6 -6
  17. package/dist/executors.js +9 -9
  18. package/dist/executors.mjs +9 -9
  19. package/dist/generators.js +6 -6
  20. package/dist/generators.mjs +6 -6
  21. package/dist/index.js +15 -15
  22. package/dist/index.mjs +15 -15
  23. package/dist/src/executors/cargo-build/executor.js +3 -3
  24. package/dist/src/executors/cargo-build/executor.mjs +2 -2
  25. package/dist/src/executors/cargo-check/executor.js +3 -3
  26. package/dist/src/executors/cargo-check/executor.mjs +2 -2
  27. package/dist/src/executors/cargo-clippy/executor.js +3 -3
  28. package/dist/src/executors/cargo-clippy/executor.mjs +2 -2
  29. package/dist/src/executors/cargo-doc/executor.js +3 -3
  30. package/dist/src/executors/cargo-doc/executor.mjs +2 -2
  31. package/dist/src/executors/cargo-format/executor.js +3 -3
  32. package/dist/src/executors/cargo-format/executor.mjs +2 -2
  33. package/dist/src/plugins/rust/cargo-toml.js +3 -3
  34. package/dist/src/plugins/rust/cargo-toml.mjs +2 -2
  35. package/dist/src/plugins/rust/index.js +3 -3
  36. package/dist/src/plugins/rust/index.mjs +2 -2
  37. package/dist/src/utils/cargo.d.mts +2 -2
  38. package/dist/src/utils/cargo.d.ts +2 -2
  39. package/dist/src/utils/cargo.js +2 -2
  40. package/dist/src/utils/cargo.mjs +1 -1
  41. package/dist/src/utils/index.js +2 -2
  42. package/dist/src/utils/index.mjs +1 -1
  43. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -2,6 +2,54 @@
2
2
 
3
3
  # Changelog for Storm Ops - Workspace Tools
4
4
 
5
+ ## [1.292.27](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.27) (11/12/2025)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **monorepo:** Regenerate README markdown files
10
+ ([ce28ea33d](https://github.com/storm-software/storm-ops/commit/ce28ea33d))
11
+
12
+ ### Bug Fixes
13
+
14
+ - **workspace-tools:** Ensure the correct `workspaceRoot` value is used in
15
+ `cargo` commands
16
+ ([8addf0cd8](https://github.com/storm-software/storm-ops/commit/8addf0cd8))
17
+
18
+ ### Updated Dependencies
19
+
20
+ - Updated **testing-tools** to **v1.119.27**
21
+ - Updated **config-tools** to **v1.188.27**
22
+ - Updated **pnpm-tools** to **v0.6.27**
23
+ - Updated **npm-tools** to **v0.5.27**
24
+ - Updated **prettier** to **v0.57.27**
25
+ - Updated **esbuild** to **v0.53.27**
26
+ - Updated **unbuild** to **v0.57.27**
27
+ - Updated **config** to **v1.134.27**
28
+ - Updated **tsdown** to **v0.45.27**
29
+
30
+ ## [1.292.26](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.26) (11/12/2025)
31
+
32
+ ### Miscellaneous
33
+
34
+ - **workspace-tools:** Added call to `validateDependency` in `rust` Nx plugin
35
+ ([e73ceacf1](https://github.com/storm-software/storm-ops/commit/e73ceacf1))
36
+ - **monorepo:** Update workspace `Cargo.lock` file
37
+ ([cf76a171f](https://github.com/storm-software/storm-ops/commit/cf76a171f))
38
+ - **monorepo:** Regenerate README markdown files
39
+ ([a27c96498](https://github.com/storm-software/storm-ops/commit/a27c96498))
40
+
41
+ ### Updated Dependencies
42
+
43
+ - Updated **testing-tools** to **v1.119.26**
44
+ - Updated **config-tools** to **v1.188.26**
45
+ - Updated **pnpm-tools** to **v0.6.26**
46
+ - Updated **npm-tools** to **v0.5.26**
47
+ - Updated **prettier** to **v0.57.26**
48
+ - Updated **esbuild** to **v0.53.26**
49
+ - Updated **unbuild** to **v0.57.26**
50
+ - Updated **config** to **v1.134.26**
51
+ - Updated **tsdown** to **v0.45.26**
52
+
5
53
  ## [1.292.25](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.25) (11/12/2025)
6
54
 
7
55
  ### 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.292.24-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.292.25-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 -->
@@ -40,7 +40,6 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
40
40
 
41
41
  <!-- START doctoc -->
42
42
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
43
-
44
43
  ## Table of Contents
45
44
 
46
45
  - [Storm Workspace Tools](#storm-workspace-tools)
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
4
+ var _chunkD2PV33E5js = require('./chunk-D2PV33E5.js');
5
5
 
6
6
 
7
7
  var _chunkTCC635LOjs = require('./chunk-TCC635LO.js');
8
8
 
9
9
  // src/executors/cargo-build/executor.ts
10
10
  async function cargoBuildExecutor(options, context) {
11
- const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "build", options, context);
12
- return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
11
+ const command = _chunkD2PV33E5js.buildCargoCommand.call(void 0, "build", options, context);
12
+ return await _chunkD2PV33E5js.cargoCommand.call(void 0, context.root, ...command);
13
13
  }
14
14
  var executor_default = _chunkTCC635LOjs.withRunExecutor.call(void 0,
15
15
  "Cargo - Build",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-6LP3KKXE.mjs";
4
+ } from "./chunk-ZTN2676G.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-ZTFZJPOM.mjs";
@@ -9,7 +9,7 @@ import {
9
9
  // src/executors/cargo-clippy/executor.ts
10
10
  async function cargoClippyExecutor(options, context) {
11
11
  const command = buildCargoCommand("clippy", options, context);
12
- return await cargoCommand(...command);
12
+ return await cargoCommand(context.root, ...command);
13
13
  }
14
14
  var executor_default = withRunExecutor(
15
15
  "Cargo - Clippy",
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
4
+ var _chunkD2PV33E5js = require('./chunk-D2PV33E5.js');
5
5
 
6
6
 
7
7
  var _chunkTCC635LOjs = require('./chunk-TCC635LO.js');
8
8
 
9
9
  // src/executors/cargo-clippy/executor.ts
10
10
  async function cargoClippyExecutor(options, context) {
11
- const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "clippy", options, context);
12
- return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
11
+ const command = _chunkD2PV33E5js.buildCargoCommand.call(void 0, "clippy", options, context);
12
+ return await _chunkD2PV33E5js.cargoCommand.call(void 0, context.root, ...command);
13
13
  }
14
14
  var executor_default = _chunkTCC635LOjs.withRunExecutor.call(void 0,
15
15
  "Cargo - Clippy",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-6LP3KKXE.mjs";
4
+ } from "./chunk-ZTN2676G.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-ZTFZJPOM.mjs";
@@ -12,7 +12,7 @@ async function cargoDocExecutor(options, context) {
12
12
  opts["no-deps"] = opts.noDeps;
13
13
  delete opts.noDeps;
14
14
  const command = buildCargoCommand("doc", options, context);
15
- return await cargoCommand(...command);
15
+ return await cargoCommand(context.root, ...command);
16
16
  }
17
17
  var executor_default = withRunExecutor(
18
18
  "Cargo - Doc",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-6LP3KKXE.mjs";
4
+ } from "./chunk-ZTN2676G.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-ZTFZJPOM.mjs";
@@ -9,7 +9,7 @@ import {
9
9
  // src/executors/cargo-check/executor.ts
10
10
  async function cargoCheckExecutor(options, context) {
11
11
  const command = buildCargoCommand("check", options, context);
12
- return await cargoCommand(...command);
12
+ return await cargoCommand(context.root, ...command);
13
13
  }
14
14
  var executor_default = withRunExecutor(
15
15
  "Cargo - Check",
@@ -53,10 +53,10 @@ var buildCargoCommand = (baseCommand, options, context) => {
53
53
  }
54
54
  return args;
55
55
  };
56
- async function cargoCommand(...args) {
56
+ async function cargoCommand(workspaceRoot, ...args) {
57
57
  console.log(`> cargo ${args.join(" ")}`);
58
58
  args.push("--color", "always");
59
- return await Promise.resolve(runProcess("cargo", ...args));
59
+ return await Promise.resolve(runProcess(workspaceRoot, "cargo", ...args));
60
60
  }
61
61
  function cargoRunCommand(...args) {
62
62
  console.log(`> cargo ${args.join(" ")}`);
@@ -120,15 +120,15 @@ function cargoMetadata() {
120
120
  }
121
121
  return JSON.parse(output.output);
122
122
  }
123
- function isExternal(packageOrDep, workspaceRoot2) {
123
+ function isExternal(packageOrDep, workspaceRoot) {
124
124
  const isRegistry = _nullishCoalesce(_optionalChain([packageOrDep, 'access', _9 => _9.source, 'optionalAccess', _10 => _10.startsWith, 'call', _11 => _11("registry+")]), () => ( false));
125
125
  const isGit = _nullishCoalesce(_optionalChain([packageOrDep, 'access', _12 => _12.source, 'optionalAccess', _13 => _13.startsWith, 'call', _14 => _14("git+")]), () => ( false));
126
- const isOutsideWorkspace = "path" in packageOrDep && _path.relative.call(void 0, workspaceRoot2, packageOrDep.path).startsWith("..");
126
+ const isOutsideWorkspace = "path" in packageOrDep && _path.relative.call(void 0, workspaceRoot, packageOrDep.path).startsWith("..");
127
127
  return isRegistry || isGit || isOutsideWorkspace;
128
128
  }
129
- function runProcess(processCmd, ...args) {
129
+ function runProcess(workspaceRoot, processCmd, ...args) {
130
130
  const metadata = cargoMetadata();
131
- const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _15 => _15.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, _devkit.workspaceRoot, "dist")));
131
+ const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _15 => _15.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, workspaceRoot, "dist")));
132
132
  return new Promise((resolve) => {
133
133
  if (process.env.VERCEL) {
134
134
  return resolve({ success: true });
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-6LP3KKXE.mjs";
4
+ } from "./chunk-ZTN2676G.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-ZTFZJPOM.mjs";
@@ -9,7 +9,7 @@ import {
9
9
  // src/executors/cargo-format/executor.ts
10
10
  async function cargoFormatExecutor(options, context) {
11
11
  const command = buildCargoCommand("fmt", options, context);
12
- return await cargoCommand(...command);
12
+ return await cargoCommand(context.root, ...command);
13
13
  }
14
14
  var executor_default = withRunExecutor(
15
15
  "Cargo - Format",
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
4
+ var _chunkD2PV33E5js = require('./chunk-D2PV33E5.js');
5
5
 
6
6
 
7
7
  var _chunkTCC635LOjs = require('./chunk-TCC635LO.js');
8
8
 
9
9
  // src/executors/cargo-format/executor.ts
10
10
  async function cargoFormatExecutor(options, context) {
11
- const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "fmt", options, context);
12
- return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
11
+ const command = _chunkD2PV33E5js.buildCargoCommand.call(void 0, "fmt", options, context);
12
+ return await _chunkD2PV33E5js.cargoCommand.call(void 0, context.root, ...command);
13
13
  }
14
14
  var executor_default = _chunkTCC635LOjs.withRunExecutor.call(void 0,
15
15
  "Cargo - Format",
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
4
+ var _chunkD2PV33E5js = require('./chunk-D2PV33E5.js');
5
5
 
6
6
 
7
7
  var _chunkTCC635LOjs = require('./chunk-TCC635LO.js');
8
8
 
9
9
  // src/executors/cargo-check/executor.ts
10
10
  async function cargoCheckExecutor(options, context) {
11
- const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "check", options, context);
12
- return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
11
+ const command = _chunkD2PV33E5js.buildCargoCommand.call(void 0, "check", options, context);
12
+ return await _chunkD2PV33E5js.cargoCommand.call(void 0, context.root, ...command);
13
13
  }
14
14
  var executor_default = _chunkTCC635LOjs.withRunExecutor.call(void 0,
15
15
  "Cargo - Check",
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
4
+ var _chunkD2PV33E5js = require('./chunk-D2PV33E5.js');
5
5
 
6
6
 
7
7
  var _chunkTCC635LOjs = require('./chunk-TCC635LO.js');
@@ -11,8 +11,8 @@ async function cargoDocExecutor(options, context) {
11
11
  const opts = { ...options };
12
12
  opts["no-deps"] = opts.noDeps;
13
13
  delete opts.noDeps;
14
- const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "doc", options, context);
15
- return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
14
+ const command = _chunkD2PV33E5js.buildCargoCommand.call(void 0, "doc", options, context);
15
+ return await _chunkD2PV33E5js.cargoCommand.call(void 0, context.root, ...command);
16
16
  }
17
17
  var executor_default = _chunkTCC635LOjs.withRunExecutor.call(void 0,
18
18
  "Cargo - Doc",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-6LP3KKXE.mjs";
4
+ } from "./chunk-ZTN2676G.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-ZTFZJPOM.mjs";
@@ -9,7 +9,7 @@ import {
9
9
  // src/executors/cargo-build/executor.ts
10
10
  async function cargoBuildExecutor(options, context) {
11
11
  const command = buildCargoCommand("build", options, context);
12
- return await cargoCommand(...command);
12
+ return await cargoCommand(context.root, ...command);
13
13
  }
14
14
  var executor_default = withRunExecutor(
15
15
  "Cargo - Build",
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  cargoMetadata,
6
6
  isExternal
7
- } from "./chunk-6LP3KKXE.mjs";
7
+ } from "./chunk-ZTN2676G.mjs";
8
8
  import {
9
9
  ProjectTagConstants,
10
10
  addProjectTag,
@@ -16,8 +16,7 @@ import {
16
16
  createNodesFromFiles,
17
17
  joinPathFragments,
18
18
  readJsonFile,
19
- validateDependency,
20
- workspaceRoot
19
+ validateDependency
21
20
  } from "@nx/devkit";
22
21
  import defu from "defu";
23
22
  import { existsSync } from "node:fs";
@@ -297,9 +296,7 @@ var createNodesV2 = [
297
296
  const externalDepName = `cargo:${dep.name}`;
298
297
  if (!externalNodes?.[externalDepName]) {
299
298
  externalNodes[externalDepName] = {
300
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
301
299
  type: "cargo",
302
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
303
300
  name: externalDepName,
304
301
  data: {
305
302
  packageName: dep.name,
@@ -329,67 +326,54 @@ var createNodesV2 = [
329
326
  }
330
327
  ];
331
328
  var createDependencies = (options, context) => {
332
- try {
329
+ console.debug(
330
+ `[storm-software/rust]: Creating dependencies using cargo metadata.`
331
+ );
332
+ const metadata = cargoMetadata();
333
+ if (!metadata?.packages) {
333
334
  console.debug(
334
- `[storm-software/rust]: Creating dependencies using cargo metadata.`
335
+ `[storm-software/rust]: Unable to find cargo metadata. Skipping dependency creation.`
335
336
  );
336
- const metadata = cargoMetadata();
337
- if (!metadata?.packages) {
338
- console.debug(
339
- `[storm-software/rust]: Unable to find cargo metadata. Skipping dependency creation.`
340
- );
341
- return [];
342
- }
343
- const dependencies = [];
344
- for (const pkg of metadata.packages) {
345
- if (context.projects[pkg.name]) {
346
- for (const deps of pkg.dependencies) {
347
- if (!metadata.packages.find((p) => p.name === deps.name)) {
348
- console.debug(
349
- `[storm-software/rust]: Dependency ${deps.name} not found in the cargo metadata.`
350
- );
351
- continue;
352
- }
353
- if (context.projects[deps.name]) {
337
+ return [];
338
+ }
339
+ const dependencies = [];
340
+ for (const pkg of metadata.packages) {
341
+ if (context.projects[pkg.name]) {
342
+ for (const deps of pkg.dependencies) {
343
+ if (!metadata.packages.find((p) => p.name === deps.name)) {
344
+ console.debug(
345
+ `[storm-software/rust]: Dependency ${deps.name} not found in the cargo metadata.`
346
+ );
347
+ continue;
348
+ }
349
+ if (context.projects[deps.name]) {
350
+ dependencies.push(
351
+ createDependency(context, pkg, deps.name, DependencyType.static)
352
+ );
353
+ } else {
354
+ const externalDepName = `cargo:${deps.name}`;
355
+ if (externalDepName in (context.externalNodes ?? {})) {
354
356
  dependencies.push(
355
- createDependency(context, pkg, deps.name, DependencyType.static)
357
+ createDependency(
358
+ context,
359
+ pkg,
360
+ externalDepName,
361
+ DependencyType.static
362
+ )
356
363
  );
357
- } else {
358
- const externalDepName = `cargo:${deps.name}`;
359
- if (externalDepName in (context.externalNodes ?? {})) {
360
- dependencies.push(
361
- createDependency(
362
- context,
363
- pkg,
364
- externalDepName,
365
- DependencyType.static
366
- )
367
- );
368
- }
369
364
  }
370
365
  }
371
366
  }
372
367
  }
373
- return dependencies;
374
- } catch (e) {
375
- console.error(
376
- "An error occurred creating dependencies in the Storm Rust Nx plugin."
377
- );
378
- console.error(e);
379
- throw new Error(
380
- "An error occurred creating dependencies in the Storm Rust Nx plugin.",
381
- {
382
- cause: e
383
- }
384
- );
385
368
  }
369
+ return dependencies;
386
370
  };
387
371
  function createDependency(context, pkg, depName, type) {
388
372
  const dependency = {
389
373
  type,
390
374
  source: pkg.name,
391
375
  target: depName,
392
- sourceFile: pkg.manifest_path.replace(/\\/g, "/").replace(`${workspaceRoot.replace(/\\/g, "/")}/`, "")
376
+ sourceFile: pkg.manifest_path.replace(/\\/g, "/").replace(context.workspaceRoot.replace(/\\/g, "/"), "").replace(/^\//, "")
393
377
  };
394
378
  validateDependency(dependency, context);
395
379
  return dependency;
@@ -4,7 +4,7 @@ var _chunkJ6F3WHRBjs = require('./chunk-J6F3WHRB.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
7
+ var _chunkD2PV33E5js = require('./chunk-D2PV33E5.js');
8
8
 
9
9
 
10
10
 
@@ -17,7 +17,6 @@ var _chunkAX3RSZT7js = require('./chunk-AX3RSZT7.js');
17
17
 
18
18
 
19
19
 
20
-
21
20
  var _devkit = require('@nx/devkit');
22
21
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
23
22
  var _fs = require('fs');
@@ -41,7 +40,7 @@ var createNodesV2 = [
41
40
  const includeApps = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _2 => _2.includeApps]), () => ( true));
42
41
  const toolchain = _optionalChain([options2, 'optionalAccess', _3 => _3.toolchain]);
43
42
  const skipDocs = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _4 => _4.skipDocs]), () => ( false));
44
- const metadata = _chunkLJDV7HFTjs.cargoMetadata.call(void 0, );
43
+ const metadata = _chunkD2PV33E5js.cargoMetadata.call(void 0, );
45
44
  if (!metadata) {
46
45
  return {};
47
46
  }
@@ -65,7 +64,7 @@ var createNodesV2 = [
65
64
  return acc;
66
65
  }, /* @__PURE__ */ new Map());
67
66
  for (const cargoPackage of cargoPackages) {
68
- if (!_chunkLJDV7HFTjs.isExternal.call(void 0, cargoPackage, context2.workspaceRoot)) {
67
+ if (!_chunkD2PV33E5js.isExternal.call(void 0, cargoPackage, context2.workspaceRoot)) {
69
68
  const root = _chunkJ6F3WHRBjs.getRoot.call(void 0, _path.dirname.call(void 0, configFile), context2);
70
69
  const project = {
71
70
  root,
@@ -293,13 +292,11 @@ var createNodesV2 = [
293
292
  );
294
293
  }
295
294
  for (const dep of cargoPackage.dependencies) {
296
- if (_chunkLJDV7HFTjs.isExternal.call(void 0, dep, context2.workspaceRoot)) {
295
+ if (_chunkD2PV33E5js.isExternal.call(void 0, dep, context2.workspaceRoot)) {
297
296
  const externalDepName = `cargo:${dep.name}`;
298
297
  if (!_optionalChain([externalNodes, 'optionalAccess', _5 => _5[externalDepName]])) {
299
298
  externalNodes[externalDepName] = {
300
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
301
299
  type: "cargo",
302
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
303
300
  name: externalDepName,
304
301
  data: {
305
302
  packageName: dep.name,
@@ -329,67 +326,54 @@ var createNodesV2 = [
329
326
  }
330
327
  ];
331
328
  var createDependencies = (options, context) => {
332
- try {
329
+ console.debug(
330
+ `[storm-software/rust]: Creating dependencies using cargo metadata.`
331
+ );
332
+ const metadata = _chunkD2PV33E5js.cargoMetadata.call(void 0, );
333
+ if (!_optionalChain([metadata, 'optionalAccess', _9 => _9.packages])) {
333
334
  console.debug(
334
- `[storm-software/rust]: Creating dependencies using cargo metadata.`
335
+ `[storm-software/rust]: Unable to find cargo metadata. Skipping dependency creation.`
335
336
  );
336
- const metadata = _chunkLJDV7HFTjs.cargoMetadata.call(void 0, );
337
- if (!_optionalChain([metadata, 'optionalAccess', _9 => _9.packages])) {
338
- console.debug(
339
- `[storm-software/rust]: Unable to find cargo metadata. Skipping dependency creation.`
340
- );
341
- return [];
342
- }
343
- const dependencies = [];
344
- for (const pkg of metadata.packages) {
345
- if (context.projects[pkg.name]) {
346
- for (const deps of pkg.dependencies) {
347
- if (!metadata.packages.find((p) => p.name === deps.name)) {
348
- console.debug(
349
- `[storm-software/rust]: Dependency ${deps.name} not found in the cargo metadata.`
350
- );
351
- continue;
352
- }
353
- if (context.projects[deps.name]) {
337
+ return [];
338
+ }
339
+ const dependencies = [];
340
+ for (const pkg of metadata.packages) {
341
+ if (context.projects[pkg.name]) {
342
+ for (const deps of pkg.dependencies) {
343
+ if (!metadata.packages.find((p) => p.name === deps.name)) {
344
+ console.debug(
345
+ `[storm-software/rust]: Dependency ${deps.name} not found in the cargo metadata.`
346
+ );
347
+ continue;
348
+ }
349
+ if (context.projects[deps.name]) {
350
+ dependencies.push(
351
+ createDependency(context, pkg, deps.name, _projectgraph.DependencyType.static)
352
+ );
353
+ } else {
354
+ const externalDepName = `cargo:${deps.name}`;
355
+ if (externalDepName in (_nullishCoalesce(context.externalNodes, () => ( {})))) {
354
356
  dependencies.push(
355
- createDependency(context, pkg, deps.name, _projectgraph.DependencyType.static)
357
+ createDependency(
358
+ context,
359
+ pkg,
360
+ externalDepName,
361
+ _projectgraph.DependencyType.static
362
+ )
356
363
  );
357
- } else {
358
- const externalDepName = `cargo:${deps.name}`;
359
- if (externalDepName in (_nullishCoalesce(context.externalNodes, () => ( {})))) {
360
- dependencies.push(
361
- createDependency(
362
- context,
363
- pkg,
364
- externalDepName,
365
- _projectgraph.DependencyType.static
366
- )
367
- );
368
- }
369
364
  }
370
365
  }
371
366
  }
372
367
  }
373
- return dependencies;
374
- } catch (e) {
375
- console.error(
376
- "An error occurred creating dependencies in the Storm Rust Nx plugin."
377
- );
378
- console.error(e);
379
- throw new Error(
380
- "An error occurred creating dependencies in the Storm Rust Nx plugin.",
381
- {
382
- cause: e
383
- }
384
- );
385
368
  }
369
+ return dependencies;
386
370
  };
387
371
  function createDependency(context, pkg, depName, type) {
388
372
  const dependency = {
389
373
  type,
390
374
  source: pkg.name,
391
375
  target: depName,
392
- sourceFile: pkg.manifest_path.replace(/\\/g, "/").replace(`${_devkit.workspaceRoot.replace(/\\/g, "/")}/`, "")
376
+ sourceFile: pkg.manifest_path.replace(/\\/g, "/").replace(context.workspaceRoot.replace(/\\/g, "/"), "").replace(/^\//, "")
393
377
  };
394
378
  _devkit.validateDependency.call(void 0, dependency, context);
395
379
  return dependency;
@@ -1,5 +1,5 @@
1
1
  // src/utils/cargo.ts
2
- import { joinPathFragments, workspaceRoot } from "@nx/devkit";
2
+ import { joinPathFragments } from "@nx/devkit";
3
3
  import {
4
4
  execSync,
5
5
  spawn
@@ -53,10 +53,10 @@ var buildCargoCommand = (baseCommand, options, context) => {
53
53
  }
54
54
  return args;
55
55
  };
56
- async function cargoCommand(...args) {
56
+ async function cargoCommand(workspaceRoot, ...args) {
57
57
  console.log(`> cargo ${args.join(" ")}`);
58
58
  args.push("--color", "always");
59
- return await Promise.resolve(runProcess("cargo", ...args));
59
+ return await Promise.resolve(runProcess(workspaceRoot, "cargo", ...args));
60
60
  }
61
61
  function cargoRunCommand(...args) {
62
62
  console.log(`> cargo ${args.join(" ")}`);
@@ -120,13 +120,13 @@ function cargoMetadata() {
120
120
  }
121
121
  return JSON.parse(output.output);
122
122
  }
123
- function isExternal(packageOrDep, workspaceRoot2) {
123
+ function isExternal(packageOrDep, workspaceRoot) {
124
124
  const isRegistry = packageOrDep.source?.startsWith("registry+") ?? false;
125
125
  const isGit = packageOrDep.source?.startsWith("git+") ?? false;
126
- const isOutsideWorkspace = "path" in packageOrDep && relative(workspaceRoot2, packageOrDep.path).startsWith("..");
126
+ const isOutsideWorkspace = "path" in packageOrDep && relative(workspaceRoot, packageOrDep.path).startsWith("..");
127
127
  return isRegistry || isGit || isOutsideWorkspace;
128
128
  }
129
- function runProcess(processCmd, ...args) {
129
+ function runProcess(workspaceRoot, processCmd, ...args) {
130
130
  const metadata = cargoMetadata();
131
131
  const targetDir = metadata?.target_directory ?? joinPathFragments(workspaceRoot, "dist");
132
132
  return new Promise((resolve) => {