@storm-software/workspace-tools 1.292.25 → 1.292.27
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 +46 -0
- package/README.md +1 -2
- package/dist/{chunk-F23XFCK3.js → chunk-2NHKQWQ5.js} +3 -3
- package/dist/{chunk-BC7TUSC7.mjs → chunk-332US6XA.mjs} +2 -2
- package/dist/{chunk-VWQYDQYV.js → chunk-5N7GGHPM.js} +3 -3
- package/dist/{chunk-DSC7W7VD.mjs → chunk-6JX3VJQY.mjs} +2 -2
- package/dist/{chunk-5C3AZXZ2.mjs → chunk-ALFDHMDV.mjs} +2 -2
- package/dist/{chunk-LJDV7HFT.js → chunk-D2PV33E5.js} +6 -6
- package/dist/{chunk-6FX2E553.mjs → chunk-HT7FNLPL.mjs} +2 -2
- package/dist/{chunk-3JD245PM.js → chunk-IUDAADGV.js} +3 -3
- package/dist/{chunk-JOWRO646.js → chunk-LXOTH243.js} +3 -3
- package/dist/{chunk-5Z2FOAF6.js → chunk-QEGJ4PKW.js} +3 -3
- package/dist/{chunk-CVK7A2Z7.mjs → chunk-QITMVWVJ.mjs} +2 -2
- package/dist/{chunk-LF2APRG7.mjs → chunk-WRXEPJDB.mjs} +39 -48
- package/dist/{chunk-A6N326FN.js → chunk-YDBNZTAA.js} +41 -50
- package/dist/{chunk-6LP3KKXE.mjs → chunk-ZTN2676G.mjs} +6 -6
- package/dist/executors.js +7 -7
- package/dist/executors.mjs +6 -6
- package/dist/index.js +7 -7
- package/dist/index.mjs +6 -6
- package/dist/src/executors/cargo-build/executor.js +3 -3
- package/dist/src/executors/cargo-build/executor.mjs +2 -2
- package/dist/src/executors/cargo-check/executor.js +3 -3
- package/dist/src/executors/cargo-check/executor.mjs +2 -2
- package/dist/src/executors/cargo-clippy/executor.js +3 -3
- package/dist/src/executors/cargo-clippy/executor.mjs +2 -2
- package/dist/src/executors/cargo-doc/executor.js +3 -3
- package/dist/src/executors/cargo-doc/executor.mjs +2 -2
- package/dist/src/executors/cargo-format/executor.js +3 -3
- package/dist/src/executors/cargo-format/executor.mjs +2 -2
- package/dist/src/plugins/rust/cargo-toml.d.mts +25 -0
- package/dist/src/plugins/rust/cargo-toml.d.ts +25 -0
- package/dist/src/plugins/rust/cargo-toml.js +3 -3
- package/dist/src/plugins/rust/cargo-toml.mjs +2 -2
- package/dist/src/plugins/rust/index.js +3 -3
- package/dist/src/plugins/rust/index.mjs +2 -2
- package/dist/src/utils/cargo.d.mts +2 -2
- package/dist/src/utils/cargo.d.ts +2 -2
- package/dist/src/utils/cargo.js +2 -2
- package/dist/src/utils/cargo.mjs +1 -1
- package/dist/src/utils/index.js +2 -2
- package/dist/src/utils/index.mjs +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Workspace Tools
|
|
4
4
|
|
|
5
|
+
## [1.292.26](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.26) (11/12/2025)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **workspace-tools:** Added call to `validateDependency` in `rust` Nx plugin
|
|
10
|
+
([e73ceacf1](https://github.com/storm-software/storm-ops/commit/e73ceacf1))
|
|
11
|
+
- **monorepo:** Update workspace `Cargo.lock` file
|
|
12
|
+
([cf76a171f](https://github.com/storm-software/storm-ops/commit/cf76a171f))
|
|
13
|
+
- **monorepo:** Regenerate README markdown files
|
|
14
|
+
([a27c96498](https://github.com/storm-software/storm-ops/commit/a27c96498))
|
|
15
|
+
|
|
16
|
+
### Updated Dependencies
|
|
17
|
+
|
|
18
|
+
- Updated **testing-tools** to **v1.119.26**
|
|
19
|
+
- Updated **config-tools** to **v1.188.26**
|
|
20
|
+
- Updated **pnpm-tools** to **v0.6.26**
|
|
21
|
+
- Updated **npm-tools** to **v0.5.26**
|
|
22
|
+
- Updated **prettier** to **v0.57.26**
|
|
23
|
+
- Updated **esbuild** to **v0.53.26**
|
|
24
|
+
- Updated **unbuild** to **v0.57.26**
|
|
25
|
+
- Updated **config** to **v1.134.26**
|
|
26
|
+
- Updated **tsdown** to **v0.45.26**
|
|
27
|
+
|
|
28
|
+
## [1.292.25](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.25) (11/12/2025)
|
|
29
|
+
|
|
30
|
+
### Miscellaneous
|
|
31
|
+
|
|
32
|
+
- **workspace-tools:** Improved `rust` Nx plugin logging
|
|
33
|
+
([bd839c5a4](https://github.com/storm-software/storm-ops/commit/bd839c5a4))
|
|
34
|
+
- **monorepo:** Update workspace package dependencies
|
|
35
|
+
([2f7e4c39e](https://github.com/storm-software/storm-ops/commit/2f7e4c39e))
|
|
36
|
+
- **monorepo:** Update README markdown files
|
|
37
|
+
([b8f258457](https://github.com/storm-software/storm-ops/commit/b8f258457))
|
|
38
|
+
|
|
39
|
+
### Updated Dependencies
|
|
40
|
+
|
|
41
|
+
- Updated **testing-tools** to **v1.119.25**
|
|
42
|
+
- Updated **config-tools** to **v1.188.25**
|
|
43
|
+
- Updated **pnpm-tools** to **v0.6.25**
|
|
44
|
+
- Updated **npm-tools** to **v0.5.25**
|
|
45
|
+
- Updated **prettier** to **v0.57.25**
|
|
46
|
+
- Updated **esbuild** to **v0.53.25**
|
|
47
|
+
- Updated **unbuild** to **v0.57.25**
|
|
48
|
+
- Updated **config** to **v1.134.25**
|
|
49
|
+
- Updated **tsdown** to **v0.45.25**
|
|
50
|
+
|
|
5
51
|
## [1.292.24](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.24) (11/10/2025)
|
|
6
52
|
|
|
7
53
|
### 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
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
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
|
|
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 =
|
|
12
|
-
return await
|
|
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-
|
|
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
|
|
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 =
|
|
12
|
-
return await
|
|
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-
|
|
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-
|
|
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,
|
|
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,
|
|
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,
|
|
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-
|
|
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
|
|
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 =
|
|
12
|
-
return await
|
|
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
|
|
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 =
|
|
12
|
-
return await
|
|
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
|
|
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 =
|
|
15
|
-
return await
|
|
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-
|
|
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-
|
|
7
|
+
} from "./chunk-ZTN2676G.mjs";
|
|
8
8
|
import {
|
|
9
9
|
ProjectTagConstants,
|
|
10
10
|
addProjectTag,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
createNodesFromFiles,
|
|
17
17
|
joinPathFragments,
|
|
18
18
|
readJsonFile,
|
|
19
|
-
|
|
19
|
+
validateDependency
|
|
20
20
|
} from "@nx/devkit";
|
|
21
21
|
import defu from "defu";
|
|
22
22
|
import { existsSync } from "node:fs";
|
|
@@ -296,9 +296,7 @@ var createNodesV2 = [
|
|
|
296
296
|
const externalDepName = `cargo:${dep.name}`;
|
|
297
297
|
if (!externalNodes?.[externalDepName]) {
|
|
298
298
|
externalNodes[externalDepName] = {
|
|
299
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
300
299
|
type: "cargo",
|
|
301
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
302
300
|
name: externalDepName,
|
|
303
301
|
data: {
|
|
304
302
|
packageName: dep.name,
|
|
@@ -328,64 +326,57 @@ var createNodesV2 = [
|
|
|
328
326
|
}
|
|
329
327
|
];
|
|
330
328
|
var createDependencies = (options, context) => {
|
|
331
|
-
|
|
329
|
+
console.debug(
|
|
330
|
+
`[storm-software/rust]: Creating dependencies using cargo metadata.`
|
|
331
|
+
);
|
|
332
|
+
const metadata = cargoMetadata();
|
|
333
|
+
if (!metadata?.packages) {
|
|
332
334
|
console.debug(
|
|
333
|
-
`[storm-software/rust]:
|
|
335
|
+
`[storm-software/rust]: Unable to find cargo metadata. Skipping dependency creation.`
|
|
334
336
|
);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
)
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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 ?? {})) {
|
|
353
356
|
dependencies.push(
|
|
354
|
-
createDependency(
|
|
357
|
+
createDependency(
|
|
358
|
+
context,
|
|
359
|
+
pkg,
|
|
360
|
+
externalDepName,
|
|
361
|
+
DependencyType.static
|
|
362
|
+
)
|
|
355
363
|
);
|
|
356
|
-
} else {
|
|
357
|
-
const externalDepName = `cargo:${deps.name}`;
|
|
358
|
-
if (externalDepName in (context.externalNodes ?? {})) {
|
|
359
|
-
dependencies.push(
|
|
360
|
-
createDependency(pkg, externalDepName, DependencyType.static)
|
|
361
|
-
);
|
|
362
|
-
}
|
|
363
364
|
}
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
|
-
return dependencies;
|
|
368
|
-
} catch (e) {
|
|
369
|
-
console.error(
|
|
370
|
-
"An error occurred creating dependencies in the Storm Rust Nx plugin."
|
|
371
|
-
);
|
|
372
|
-
console.error(e);
|
|
373
|
-
throw new Error(
|
|
374
|
-
"An error occurred creating dependencies in the Storm Rust Nx plugin.",
|
|
375
|
-
{
|
|
376
|
-
cause: e
|
|
377
|
-
}
|
|
378
|
-
);
|
|
379
368
|
}
|
|
369
|
+
return dependencies;
|
|
380
370
|
};
|
|
381
|
-
function createDependency(pkg, depName, type) {
|
|
382
|
-
const
|
|
383
|
-
return {
|
|
371
|
+
function createDependency(context, pkg, depName, type) {
|
|
372
|
+
const dependency = {
|
|
384
373
|
type,
|
|
385
374
|
source: pkg.name,
|
|
386
375
|
target: depName,
|
|
387
|
-
sourceFile:
|
|
376
|
+
sourceFile: pkg.manifest_path.replace(/\\/g, "/").replace(context.workspaceRoot.replace(/\\/g, "/"), "").replace(/^\//, "")
|
|
388
377
|
};
|
|
378
|
+
validateDependency(dependency, context);
|
|
379
|
+
return dependency;
|
|
389
380
|
}
|
|
390
381
|
|
|
391
382
|
export {
|
|
@@ -4,7 +4,7 @@ var _chunkJ6F3WHRBjs = require('./chunk-J6F3WHRB.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkD2PV33E5js = require('./chunk-D2PV33E5.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -40,7 +40,7 @@ var createNodesV2 = [
|
|
|
40
40
|
const includeApps = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _2 => _2.includeApps]), () => ( true));
|
|
41
41
|
const toolchain = _optionalChain([options2, 'optionalAccess', _3 => _3.toolchain]);
|
|
42
42
|
const skipDocs = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _4 => _4.skipDocs]), () => ( false));
|
|
43
|
-
const metadata =
|
|
43
|
+
const metadata = _chunkD2PV33E5js.cargoMetadata.call(void 0, );
|
|
44
44
|
if (!metadata) {
|
|
45
45
|
return {};
|
|
46
46
|
}
|
|
@@ -64,7 +64,7 @@ var createNodesV2 = [
|
|
|
64
64
|
return acc;
|
|
65
65
|
}, /* @__PURE__ */ new Map());
|
|
66
66
|
for (const cargoPackage of cargoPackages) {
|
|
67
|
-
if (!
|
|
67
|
+
if (!_chunkD2PV33E5js.isExternal.call(void 0, cargoPackage, context2.workspaceRoot)) {
|
|
68
68
|
const root = _chunkJ6F3WHRBjs.getRoot.call(void 0, _path.dirname.call(void 0, configFile), context2);
|
|
69
69
|
const project = {
|
|
70
70
|
root,
|
|
@@ -292,13 +292,11 @@ var createNodesV2 = [
|
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
294
|
for (const dep of cargoPackage.dependencies) {
|
|
295
|
-
if (
|
|
295
|
+
if (_chunkD2PV33E5js.isExternal.call(void 0, dep, context2.workspaceRoot)) {
|
|
296
296
|
const externalDepName = `cargo:${dep.name}`;
|
|
297
297
|
if (!_optionalChain([externalNodes, 'optionalAccess', _5 => _5[externalDepName]])) {
|
|
298
298
|
externalNodes[externalDepName] = {
|
|
299
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
300
299
|
type: "cargo",
|
|
301
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
302
300
|
name: externalDepName,
|
|
303
301
|
data: {
|
|
304
302
|
packageName: dep.name,
|
|
@@ -328,64 +326,57 @@ var createNodesV2 = [
|
|
|
328
326
|
}
|
|
329
327
|
];
|
|
330
328
|
var createDependencies = (options, context) => {
|
|
331
|
-
|
|
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])) {
|
|
332
334
|
console.debug(
|
|
333
|
-
`[storm-software/rust]:
|
|
335
|
+
`[storm-software/rust]: Unable to find cargo metadata. Skipping dependency creation.`
|
|
334
336
|
);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
)
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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, () => ( {})))) {
|
|
353
356
|
dependencies.push(
|
|
354
|
-
createDependency(
|
|
357
|
+
createDependency(
|
|
358
|
+
context,
|
|
359
|
+
pkg,
|
|
360
|
+
externalDepName,
|
|
361
|
+
_projectgraph.DependencyType.static
|
|
362
|
+
)
|
|
355
363
|
);
|
|
356
|
-
} else {
|
|
357
|
-
const externalDepName = `cargo:${deps.name}`;
|
|
358
|
-
if (externalDepName in (_nullishCoalesce(context.externalNodes, () => ( {})))) {
|
|
359
|
-
dependencies.push(
|
|
360
|
-
createDependency(pkg, externalDepName, _projectgraph.DependencyType.static)
|
|
361
|
-
);
|
|
362
|
-
}
|
|
363
364
|
}
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
|
-
return dependencies;
|
|
368
|
-
} catch (e) {
|
|
369
|
-
console.error(
|
|
370
|
-
"An error occurred creating dependencies in the Storm Rust Nx plugin."
|
|
371
|
-
);
|
|
372
|
-
console.error(e);
|
|
373
|
-
throw new Error(
|
|
374
|
-
"An error occurred creating dependencies in the Storm Rust Nx plugin.",
|
|
375
|
-
{
|
|
376
|
-
cause: e
|
|
377
|
-
}
|
|
378
|
-
);
|
|
379
368
|
}
|
|
369
|
+
return dependencies;
|
|
380
370
|
};
|
|
381
|
-
function createDependency(pkg, depName, type) {
|
|
382
|
-
const
|
|
383
|
-
return {
|
|
371
|
+
function createDependency(context, pkg, depName, type) {
|
|
372
|
+
const dependency = {
|
|
384
373
|
type,
|
|
385
374
|
source: pkg.name,
|
|
386
375
|
target: depName,
|
|
387
|
-
sourceFile:
|
|
376
|
+
sourceFile: pkg.manifest_path.replace(/\\/g, "/").replace(context.workspaceRoot.replace(/\\/g, "/"), "").replace(/^\//, "")
|
|
388
377
|
};
|
|
378
|
+
_devkit.validateDependency.call(void 0, dependency, context);
|
|
379
|
+
return dependency;
|
|
389
380
|
}
|
|
390
381
|
|
|
391
382
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/utils/cargo.ts
|
|
2
|
-
import { joinPathFragments
|
|
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,
|
|
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(
|
|
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) => {
|
package/dist/executors.js
CHANGED
|
@@ -20,23 +20,23 @@ var _chunkEECJXHDAjs = require('./chunk-EECJXHDA.js');
|
|
|
20
20
|
var _chunk5C7DI3NFjs = require('./chunk-5C7DI3NF.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk5N7GGHPMjs = require('./chunk-5N7GGHPM.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkQEGJ4PKWjs = require('./chunk-QEGJ4PKW.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkIUDAADGVjs = require('./chunk-IUDAADGV.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkHD4WVBQRjs = require('./chunk-HD4WVBQR.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunk2NHKQWQ5js = require('./chunk-2NHKQWQ5.js');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
39
|
-
require('./chunk-
|
|
38
|
+
var _chunkLXOTH243js = require('./chunk-LXOTH243.js');
|
|
39
|
+
require('./chunk-D2PV33E5.js');
|
|
40
40
|
require('./chunk-ZP4B44CQ.js');
|
|
41
41
|
require('./chunk-JWFGGMYQ.js');
|
|
42
42
|
require('./chunk-AX3RSZT7.js');
|
|
@@ -59,4 +59,4 @@ require('./chunk-G2L3EEEO.js');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
exports.LARGE_BUFFER = _chunkEECJXHDAjs.LARGE_BUFFER; exports.cargoBuildExecutor =
|
|
62
|
+
exports.LARGE_BUFFER = _chunkEECJXHDAjs.LARGE_BUFFER; exports.cargoBuildExecutor = _chunk2NHKQWQ5js.cargoBuildExecutor; exports.cargoCheckExecutor = _chunkLXOTH243js.cargoCheckExecutor; exports.cargoClippyExecutor = _chunk5N7GGHPMjs.cargoClippyExecutor; exports.cargoDocExecutor = _chunkQEGJ4PKWjs.cargoDocExecutor; exports.cargoFormatExecutor = _chunkIUDAADGVjs.cargoFormatExecutor; exports.esbuildExecutorFn = _chunkMYFQ64WEjs.esbuildExecutorFn; exports.getRegistryVersion = _chunkHD4WVBQRjs.getRegistryVersion; exports.sizeLimitExecutorFn = _chunk5C7DI3NFjs.sizeLimitExecutorFn; exports.tsdownExecutorFn = _chunkADWXA4ZQjs.tsdownExecutorFn; exports.typiaExecutorFn = _chunkSVSX2DDYjs.typiaExecutorFn; exports.unbuildExecutorFn = _chunkYNZUCZH3js.unbuildExecutorFn;
|