@paretools/cargo 0.2.0 → 0.5.0
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/README.md +85 -0
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/cargo-runner.d.ts.map +1 -1
- package/dist/lib/cargo-runner.js +2 -1
- package/dist/lib/cargo-runner.js.map +1 -1
- package/dist/lib/formatters.d.ts +14 -1
- package/dist/lib/formatters.d.ts.map +1 -1
- package/dist/lib/formatters.js +55 -0
- package/dist/lib/formatters.js.map +1 -1
- package/dist/lib/parsers.d.ts +29 -1
- package/dist/lib/parsers.d.ts.map +1 -1
- package/dist/lib/parsers.js +112 -0
- package/dist/lib/parsers.js.map +1 -1
- package/dist/schemas/index.d.ts +84 -143
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +40 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/tools/add.d.ts +3 -0
- package/dist/tools/add.d.ts.map +1 -0
- package/dist/tools/add.js +37 -0
- package/dist/tools/add.js.map +1 -0
- package/dist/tools/build.js +1 -1
- package/dist/tools/build.js.map +1 -1
- package/dist/tools/check.d.ts +3 -0
- package/dist/tools/check.d.ts.map +1 -0
- package/dist/tools/check.js +26 -0
- package/dist/tools/check.js.map +1 -0
- package/dist/tools/clippy.d.ts.map +1 -1
- package/dist/tools/clippy.js +1 -1
- package/dist/tools/clippy.js.map +1 -1
- package/dist/tools/doc.d.ts +3 -0
- package/dist/tools/doc.d.ts.map +1 -0
- package/dist/tools/doc.js +37 -0
- package/dist/tools/doc.js.map +1 -0
- package/dist/tools/fmt.d.ts +3 -0
- package/dist/tools/fmt.d.ts.map +1 -0
- package/dist/tools/fmt.js +30 -0
- package/dist/tools/fmt.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +12 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/remove.d.ts +3 -0
- package/dist/tools/remove.d.ts.map +1 -0
- package/dist/tools/remove.js +30 -0
- package/dist/tools/remove.js.map +1 -0
- package/dist/tools/run.d.ts +3 -0
- package/dist/tools/run.d.ts.map +1 -0
- package/dist/tools/run.js +34 -0
- package/dist/tools/run.js.map +1 -0
- package/dist/tools/test.js +1 -1
- package/dist/tools/test.js.map +1 -1
- package/package.json +30 -6
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# @paretools/cargo
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@paretools/cargo)
|
|
4
|
+
[](https://github.com/Dave-London/pare/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
**Structured, token-efficient Rust/Cargo output for AI agents.** Up to 68% fewer tokens than raw `cargo` CLI output.
|
|
7
|
+
|
|
8
|
+
Part of the [Pare](https://github.com/Dave-London/pare) suite of MCP servers.
|
|
9
|
+
|
|
10
|
+
## Tools (9)
|
|
11
|
+
|
|
12
|
+
| Tool | Description |
|
|
13
|
+
| -------- | --------------------------------------------------------------------- |
|
|
14
|
+
| `build` | Build diagnostics (file, line, code, severity, message) |
|
|
15
|
+
| `test` | Test results (name, status, pass/fail counts) |
|
|
16
|
+
| `clippy` | Lint diagnostics from clippy |
|
|
17
|
+
| `run` | Run a cargo binary with structured output (exit code, stdout, stderr) |
|
|
18
|
+
| `add` | Add dependencies to a Rust project |
|
|
19
|
+
| `remove` | Remove dependencies from a Rust project |
|
|
20
|
+
| `fmt` | Check or fix Rust formatting |
|
|
21
|
+
| `doc` | Generate documentation with warning count |
|
|
22
|
+
| `check` | Type check without full build (faster than build) |
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx -y @paretools/cargo
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Add to your MCP client config:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"pare-cargo": {
|
|
36
|
+
"command": "npx",
|
|
37
|
+
"args": ["-y", "@paretools/cargo"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Example
|
|
44
|
+
|
|
45
|
+
**`test` output:**
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"passed": 24,
|
|
50
|
+
"failed": 1,
|
|
51
|
+
"ignored": 2,
|
|
52
|
+
"total": 27,
|
|
53
|
+
"tests": [
|
|
54
|
+
{ "name": "test_parse_input", "status": "ok" },
|
|
55
|
+
{ "name": "test_edge_case", "status": "FAILED" }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## All Pare Servers (62 tools)
|
|
61
|
+
|
|
62
|
+
| Package | Tools | Wraps |
|
|
63
|
+
| -------------------------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------- |
|
|
64
|
+
| [@paretools/git](https://www.npmjs.com/package/@paretools/git) | status, log, diff, branch, show, add, commit, push, pull, checkout | git |
|
|
65
|
+
| [@paretools/test](https://www.npmjs.com/package/@paretools/test) | run, coverage | pytest, jest, vitest, mocha |
|
|
66
|
+
| [@paretools/npm](https://www.npmjs.com/package/@paretools/npm) | install, audit, outdated, list, run, test, init | npm |
|
|
67
|
+
| [@paretools/build](https://www.npmjs.com/package/@paretools/build) | tsc, build, esbuild, vite-build, webpack | tsc, esbuild, vite, webpack |
|
|
68
|
+
| [@paretools/lint](https://www.npmjs.com/package/@paretools/lint) | lint, format-check, prettier-format, biome-check, biome-format | eslint, prettier, biome |
|
|
69
|
+
| [@paretools/python](https://www.npmjs.com/package/@paretools/python) | pip-install, mypy, ruff-check, pip-audit, pytest, uv-install, uv-run, black | pip, mypy, ruff, pytest, uv, black |
|
|
70
|
+
| [@paretools/docker](https://www.npmjs.com/package/@paretools/docker) | ps, build, logs, images, run, exec, compose-up, compose-down, pull | docker, docker compose |
|
|
71
|
+
| **@paretools/cargo** | build, test, clippy, run, add, remove, fmt, doc, check | cargo |
|
|
72
|
+
| [@paretools/go](https://www.npmjs.com/package/@paretools/go) | build, test, vet, run, mod-tidy, fmt, generate | go, gofmt |
|
|
73
|
+
|
|
74
|
+
## Compatible Clients
|
|
75
|
+
|
|
76
|
+
Works with any MCP-compatible client: [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Claude Desktop](https://claude.ai/download), [Cursor](https://cursor.com), [Windsurf](https://codeium.com/windsurf), [VS Code / GitHub Copilot](https://code.visualstudio.com), [Cline](https://github.com/cline/cline), [Roo Code](https://roocode.com), [Zed](https://zed.dev), [Continue.dev](https://continue.dev), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [OpenAI Codex](https://openai.com/index/codex/)
|
|
77
|
+
|
|
78
|
+
## Links
|
|
79
|
+
|
|
80
|
+
- [Pare monorepo](https://github.com/Dave-London/pare)
|
|
81
|
+
- [MCP protocol](https://modelcontextprotocol.io)
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
[MIT](https://github.com/Dave-London/pare/blob/main/LICENSE)
|
package/dist/index.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { registerAllTools } from "./tools/index.js";
|
|
5
|
-
const server = new McpServer({
|
|
6
|
-
|
|
7
|
-
version: "0.1.0",
|
|
5
|
+
const server = new McpServer({ name: "@paretools/cargo", version: "0.2.0" }, {
|
|
6
|
+
instructions: "Structured Rust/Cargo operations (build, test, clippy, run, add, remove, fmt, doc, check). Use instead of running cargo commands via bash. Returns typed JSON with structured compiler errors, test results, lint warnings, and dependency management output.",
|
|
8
7
|
});
|
|
9
8
|
registerAllTools(server);
|
|
10
9
|
const transport = new StdioServerTransport();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,GAAG,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,EAC9C;IACE,YAAY,EACV,+PAA+P;CAClQ,CACF,CAAC;AAEF,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEzB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cargo-runner.d.ts","sourceRoot":"","sources":["../../src/lib/cargo-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAsB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"cargo-runner.d.ts","sourceRoot":"","sources":["../../src/lib/cargo-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAsB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAG5E"}
|
package/dist/lib/cargo-runner.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { run } from "@paretools/shared";
|
|
2
2
|
export async function cargo(args, cwd) {
|
|
3
|
-
|
|
3
|
+
// cargo build/test can take minutes for large projects
|
|
4
|
+
return run("cargo", args, { cwd, timeout: 300_000 });
|
|
4
5
|
}
|
|
5
6
|
//# sourceMappingURL=cargo-runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cargo-runner.js","sourceRoot":"","sources":["../../src/lib/cargo-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAkB,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,IAAc,EAAE,GAAY;IACtD,OAAO,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"cargo-runner.js","sourceRoot":"","sources":["../../src/lib/cargo-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAkB,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,IAAc,EAAE,GAAY;IACtD,uDAAuD;IACvD,OAAO,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;AACvD,CAAC"}
|
package/dist/lib/formatters.d.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import type { CargoBuildResult, CargoTestResult, CargoClippyResult } from "../schemas/index.js";
|
|
1
|
+
import type { CargoBuildResult, CargoTestResult, CargoClippyResult, CargoRunResult, CargoAddResult, CargoRemoveResult, CargoFmtResult, CargoDocResult } from "../schemas/index.js";
|
|
2
|
+
/** Formats structured cargo build results into a human-readable diagnostic summary. */
|
|
2
3
|
export declare function formatCargoBuild(data: CargoBuildResult): string;
|
|
4
|
+
/** Formats structured cargo test results into a human-readable test summary with pass/fail status. */
|
|
3
5
|
export declare function formatCargoTest(data: CargoTestResult): string;
|
|
6
|
+
/** Formats structured cargo clippy results into a human-readable lint warning summary. */
|
|
4
7
|
export declare function formatCargoClippy(data: CargoClippyResult): string;
|
|
8
|
+
/** Formats structured cargo run output into a human-readable summary. */
|
|
9
|
+
export declare function formatCargoRun(data: CargoRunResult): string;
|
|
10
|
+
/** Formats structured cargo add output into a human-readable summary. */
|
|
11
|
+
export declare function formatCargoAdd(data: CargoAddResult): string;
|
|
12
|
+
/** Formats structured cargo remove output into a human-readable summary. */
|
|
13
|
+
export declare function formatCargoRemove(data: CargoRemoveResult): string;
|
|
14
|
+
/** Formats structured cargo fmt output into a human-readable summary. */
|
|
15
|
+
export declare function formatCargoFmt(data: CargoFmtResult): string;
|
|
16
|
+
/** Formats structured cargo doc output into a human-readable summary. */
|
|
17
|
+
export declare function formatCargoDoc(data: CargoDocResult): string;
|
|
5
18
|
//# sourceMappingURL=formatters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAU/D;AAED,sGAAsG;AACtG,wBAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAS7D;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CASjE;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAM3D;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAU3D;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAUjE;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAS3D;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAI3D"}
|
package/dist/lib/formatters.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Formats structured cargo build results into a human-readable diagnostic summary. */
|
|
1
2
|
export function formatCargoBuild(data) {
|
|
2
3
|
if (data.success && data.total === 0)
|
|
3
4
|
return "cargo build: success, no diagnostics.";
|
|
@@ -9,6 +10,7 @@ export function formatCargoBuild(data) {
|
|
|
9
10
|
}
|
|
10
11
|
return lines.join("\n");
|
|
11
12
|
}
|
|
13
|
+
/** Formats structured cargo test results into a human-readable test summary with pass/fail status. */
|
|
12
14
|
export function formatCargoTest(data) {
|
|
13
15
|
const status = data.success ? "ok" : "FAILED";
|
|
14
16
|
const lines = [
|
|
@@ -19,6 +21,7 @@ export function formatCargoTest(data) {
|
|
|
19
21
|
}
|
|
20
22
|
return lines.join("\n");
|
|
21
23
|
}
|
|
24
|
+
/** Formats structured cargo clippy results into a human-readable lint warning summary. */
|
|
22
25
|
export function formatCargoClippy(data) {
|
|
23
26
|
if (data.total === 0)
|
|
24
27
|
return "clippy: no warnings.";
|
|
@@ -29,4 +32,56 @@ export function formatCargoClippy(data) {
|
|
|
29
32
|
}
|
|
30
33
|
return lines.join("\n");
|
|
31
34
|
}
|
|
35
|
+
/** Formats structured cargo run output into a human-readable summary. */
|
|
36
|
+
export function formatCargoRun(data) {
|
|
37
|
+
const status = data.success ? "success" : "failed";
|
|
38
|
+
const lines = [`cargo run: ${status} (exit code ${data.exitCode})`];
|
|
39
|
+
if (data.stdout)
|
|
40
|
+
lines.push(`stdout:\n${data.stdout}`);
|
|
41
|
+
if (data.stderr)
|
|
42
|
+
lines.push(`stderr:\n${data.stderr}`);
|
|
43
|
+
return lines.join("\n");
|
|
44
|
+
}
|
|
45
|
+
/** Formats structured cargo add output into a human-readable summary. */
|
|
46
|
+
export function formatCargoAdd(data) {
|
|
47
|
+
if (!data.success)
|
|
48
|
+
return "cargo add: failed";
|
|
49
|
+
if (data.total === 0)
|
|
50
|
+
return "cargo add: success, no packages added.";
|
|
51
|
+
const lines = [`cargo add: ${data.total} package(s) added`];
|
|
52
|
+
for (const pkg of data.added) {
|
|
53
|
+
lines.push(` ${pkg.name} v${pkg.version}`);
|
|
54
|
+
}
|
|
55
|
+
return lines.join("\n");
|
|
56
|
+
}
|
|
57
|
+
/** Formats structured cargo remove output into a human-readable summary. */
|
|
58
|
+
export function formatCargoRemove(data) {
|
|
59
|
+
if (!data.success)
|
|
60
|
+
return "cargo remove: failed";
|
|
61
|
+
if (data.total === 0)
|
|
62
|
+
return "cargo remove: success, no packages removed.";
|
|
63
|
+
const lines = [`cargo remove: ${data.total} package(s) removed`];
|
|
64
|
+
for (const name of data.removed) {
|
|
65
|
+
lines.push(` ${name}`);
|
|
66
|
+
}
|
|
67
|
+
return lines.join("\n");
|
|
68
|
+
}
|
|
69
|
+
/** Formats structured cargo fmt output into a human-readable summary. */
|
|
70
|
+
export function formatCargoFmt(data) {
|
|
71
|
+
if (data.success && data.filesChanged === 0)
|
|
72
|
+
return "cargo fmt: all files formatted.";
|
|
73
|
+
const status = data.success ? "success" : "needs formatting";
|
|
74
|
+
const lines = [`cargo fmt: ${status} (${data.filesChanged} file(s))`];
|
|
75
|
+
for (const f of data.files) {
|
|
76
|
+
lines.push(` ${f}`);
|
|
77
|
+
}
|
|
78
|
+
return lines.join("\n");
|
|
79
|
+
}
|
|
80
|
+
/** Formats structured cargo doc output into a human-readable summary. */
|
|
81
|
+
export function formatCargoDoc(data) {
|
|
82
|
+
const status = data.success ? "success" : "failed";
|
|
83
|
+
if (data.warnings === 0)
|
|
84
|
+
return `cargo doc: ${status}.`;
|
|
85
|
+
return `cargo doc: ${status} (${data.warnings} warning(s))`;
|
|
86
|
+
}
|
|
32
87
|
//# sourceMappingURL=formatters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"AAWA,uFAAuF;AACvF,MAAM,UAAU,gBAAgB,CAAC,IAAsB;IACrD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC;QAAE,OAAO,uCAAuC,CAAC;IAErF,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IACnD,MAAM,KAAK,GAAG,CAAC,gBAAgB,MAAM,KAAK,IAAI,CAAC,MAAM,YAAY,IAAI,CAAC,QAAQ,YAAY,CAAC,CAAC;IAC5F,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,QAAQ,GAAG,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,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iBAAiB,IAAI,CAAC,KAAK,qBAAqB,CAAC,CAAC;IACjE,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAChC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,cAAc,CAAC,IAAoB;IACjD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC;QAAE,OAAO,iCAAiC,CAAC;IAEtF,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAC7D,MAAM,KAAK,GAAG,CAAC,cAAc,MAAM,KAAK,IAAI,CAAC,YAAY,WAAW,CAAC,CAAC;IACtE,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,cAAc,CAAC,IAAoB;IACjD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IACnD,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO,cAAc,MAAM,GAAG,CAAC;IACxD,OAAO,cAAc,MAAM,KAAK,IAAI,CAAC,QAAQ,cAAc,CAAC;AAC9D,CAAC"}
|
package/dist/lib/parsers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CargoBuildResult, CargoTestResult, CargoClippyResult } from "../schemas/index.js";
|
|
1
|
+
import type { CargoBuildResult, CargoTestResult, CargoClippyResult, CargoRunResult, CargoAddResult, CargoRemoveResult, CargoFmtResult, CargoDocResult } from "../schemas/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Parses `cargo build --message-format=json` output.
|
|
4
4
|
* Each line is a JSON object with a "reason" field.
|
|
@@ -16,4 +16,32 @@ export declare function parseCargoTestOutput(stdout: string, exitCode: number):
|
|
|
16
16
|
* Same JSON format as cargo build.
|
|
17
17
|
*/
|
|
18
18
|
export declare function parseCargoClippyJson(stdout: string): CargoClippyResult;
|
|
19
|
+
/**
|
|
20
|
+
* Parses `cargo run` output.
|
|
21
|
+
* Returns exit code, stdout, stderr, and success flag.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseCargoRunOutput(stdout: string, stderr: string, exitCode: number): CargoRunResult;
|
|
24
|
+
/**
|
|
25
|
+
* Parses `cargo add` output.
|
|
26
|
+
* Lines like: " Adding serde v1.0.217 to dependencies"
|
|
27
|
+
* Also handles: " Adding serde v1.0.217 to dev-dependencies"
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseCargoAddOutput(stdout: string, stderr: string, exitCode: number): CargoAddResult;
|
|
30
|
+
/**
|
|
31
|
+
* Parses `cargo remove` output.
|
|
32
|
+
* Lines like: " Removing serde from dependencies"
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseCargoRemoveOutput(stdout: string, stderr: string, exitCode: number): CargoRemoveResult;
|
|
35
|
+
/**
|
|
36
|
+
* Parses `cargo fmt --check` output.
|
|
37
|
+
* In check mode, lists files with formatting differences (one path per line).
|
|
38
|
+
* In fix mode, returns empty list (files are reformatted in place).
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseCargoFmtOutput(stdout: string, stderr: string, exitCode: number, checkMode: boolean): CargoFmtResult;
|
|
41
|
+
/**
|
|
42
|
+
* Parses `cargo doc` output.
|
|
43
|
+
* Counts "warning:" or "warning[" lines from stderr,
|
|
44
|
+
* excluding the summary line "warning: N warnings emitted".
|
|
45
|
+
*/
|
|
46
|
+
export declare function parseCargoDocOutput(stderr: string, exitCode: number): CargoDocResult;
|
|
19
47
|
//# sourceMappingURL=parsers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../src/lib/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../../src/lib/parsers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,cAAc,EACf,MAAM,qBAAqB,CAAC;AAY7B;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAYtF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,eAAe,CA0BtF;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAWtE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,cAAc,CAOhB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,cAAc,CAiBhB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,iBAAiB,CAiBnB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,OAAO,GACjB,cAAc,CAyChB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc,CAcpF"}
|
package/dist/lib/parsers.js
CHANGED
|
@@ -59,6 +59,118 @@ export function parseCargoClippyJson(stdout) {
|
|
|
59
59
|
warnings,
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Parses `cargo run` output.
|
|
64
|
+
* Returns exit code, stdout, stderr, and success flag.
|
|
65
|
+
*/
|
|
66
|
+
export function parseCargoRunOutput(stdout, stderr, exitCode) {
|
|
67
|
+
return {
|
|
68
|
+
exitCode,
|
|
69
|
+
stdout,
|
|
70
|
+
stderr,
|
|
71
|
+
success: exitCode === 0,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Parses `cargo add` output.
|
|
76
|
+
* Lines like: " Adding serde v1.0.217 to dependencies"
|
|
77
|
+
* Also handles: " Adding serde v1.0.217 to dev-dependencies"
|
|
78
|
+
*/
|
|
79
|
+
export function parseCargoAddOutput(stdout, stderr, exitCode) {
|
|
80
|
+
const combined = stdout + "\n" + stderr;
|
|
81
|
+
const lines = combined.split("\n");
|
|
82
|
+
const added = [];
|
|
83
|
+
for (const line of lines) {
|
|
84
|
+
const match = line.match(/Adding\s+(\S+)\s+v(\S+)\s+to\s+/);
|
|
85
|
+
if (match) {
|
|
86
|
+
added.push({ name: match[1], version: match[2] });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
success: exitCode === 0,
|
|
91
|
+
added,
|
|
92
|
+
total: added.length,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Parses `cargo remove` output.
|
|
97
|
+
* Lines like: " Removing serde from dependencies"
|
|
98
|
+
*/
|
|
99
|
+
export function parseCargoRemoveOutput(stdout, stderr, exitCode) {
|
|
100
|
+
const combined = stdout + "\n" + stderr;
|
|
101
|
+
const lines = combined.split("\n");
|
|
102
|
+
const removed = [];
|
|
103
|
+
for (const line of lines) {
|
|
104
|
+
const match = line.match(/Removing\s+(\S+)\s+from\s+/);
|
|
105
|
+
if (match) {
|
|
106
|
+
removed.push(match[1]);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
success: exitCode === 0,
|
|
111
|
+
removed,
|
|
112
|
+
total: removed.length,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Parses `cargo fmt --check` output.
|
|
117
|
+
* In check mode, lists files with formatting differences (one path per line).
|
|
118
|
+
* In fix mode, returns empty list (files are reformatted in place).
|
|
119
|
+
*/
|
|
120
|
+
export function parseCargoFmtOutput(stdout, stderr, exitCode, checkMode) {
|
|
121
|
+
const files = [];
|
|
122
|
+
if (checkMode) {
|
|
123
|
+
// In check mode, cargo fmt --check outputs "Diff in <file>:" lines to stdout
|
|
124
|
+
// or just lists file paths. It may also output raw diff lines.
|
|
125
|
+
const combined = stdout + "\n" + stderr;
|
|
126
|
+
const lines = combined.split("\n");
|
|
127
|
+
for (const line of lines) {
|
|
128
|
+
// Match "Diff in <path> at line N:" format
|
|
129
|
+
const diffMatch = line.match(/^Diff in (.+?) at line/);
|
|
130
|
+
if (diffMatch) {
|
|
131
|
+
const file = diffMatch[1];
|
|
132
|
+
if (!files.includes(file)) {
|
|
133
|
+
files.push(file);
|
|
134
|
+
}
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
// Some versions just list the file path directly
|
|
138
|
+
const trimmed = line.trim();
|
|
139
|
+
if (trimmed &&
|
|
140
|
+
!trimmed.startsWith("+") &&
|
|
141
|
+
!trimmed.startsWith("-") &&
|
|
142
|
+
!trimmed.startsWith("@") &&
|
|
143
|
+
trimmed.endsWith(".rs")) {
|
|
144
|
+
if (!files.includes(trimmed)) {
|
|
145
|
+
files.push(trimmed);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
success: exitCode === 0,
|
|
152
|
+
filesChanged: files.length,
|
|
153
|
+
files,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Parses `cargo doc` output.
|
|
158
|
+
* Counts "warning:" or "warning[" lines from stderr,
|
|
159
|
+
* excluding the summary line "warning: N warnings emitted".
|
|
160
|
+
*/
|
|
161
|
+
export function parseCargoDocOutput(stderr, exitCode) {
|
|
162
|
+
const lines = stderr.split("\n");
|
|
163
|
+
let warnings = 0;
|
|
164
|
+
for (const line of lines) {
|
|
165
|
+
if (line.match(/\bwarning\b(\[|:)/) && !line.match(/\d+ warnings? emitted/)) {
|
|
166
|
+
warnings++;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
success: exitCode === 0,
|
|
171
|
+
warnings,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
62
174
|
function parseCompilerMessages(stdout) {
|
|
63
175
|
const lines = stdout.trim().split("\n").filter(Boolean);
|
|
64
176
|
const diagnostics = [];
|
package/dist/lib/parsers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../src/lib/parsers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../src/lib/parsers.ts"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,QAAgB;IAClE,MAAM,WAAW,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,MAAM,CAAC;IACxE,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,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