@andesyte-oss/cli 0.1.1 → 0.1.2
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/dist/index.js +4 -1
- package/dist/mcp.d.ts +2 -1
- package/dist/mcp.js +2 -1
- package/dist/version.d.ts +11 -0
- package/dist/version.js +27 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -14,11 +14,14 @@ import { SUPPRESSIONS_FILE, applySuppressions, loadSuppressions, scanCode, scanD
|
|
|
14
14
|
import { rulePaths } from "@andesyte-oss/security-rules";
|
|
15
15
|
import { formatHuman, formatJson } from "./format.js";
|
|
16
16
|
import { runMcpServer } from "./mcp.js";
|
|
17
|
+
// Read from package.json rather than a hardcoded literal. A duplicated
|
|
18
|
+
// version constant silently drifts from the manifest on every release:
|
|
19
|
+
// 0.1.1 shipped with the binary still reporting 0.1.0.
|
|
20
|
+
import { VERSION } from "./version.js";
|
|
17
21
|
export const EXIT_OK = 0;
|
|
18
22
|
export const EXIT_FINDINGS = 1;
|
|
19
23
|
export const EXIT_USAGE = 2;
|
|
20
24
|
export const EXIT_UNTRUSTED = 3;
|
|
21
|
-
const VERSION = "0.1.0";
|
|
22
25
|
const USAGE = `andesyte ${VERSION} — local security checks for code and dependencies
|
|
23
26
|
|
|
24
27
|
Usage:
|
package/dist/mcp.d.ts
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { type ScanResult } from "@andesyte-oss/scanner-core";
|
|
13
13
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
14
|
+
import { VERSION as SERVER_VERSION } from "./version.js";
|
|
14
15
|
export declare const SERVER_NAME = "andesyte-code-security";
|
|
15
|
-
export
|
|
16
|
+
export { SERVER_VERSION };
|
|
16
17
|
/**
|
|
17
18
|
* Agent-facing summary. Deliberately compact: a finding list plus explicit
|
|
18
19
|
* coverage, so the model can act without re-reading a large envelope.
|
package/dist/mcp.js
CHANGED
|
@@ -14,8 +14,9 @@ import { rulePaths } from "@andesyte-oss/security-rules";
|
|
|
14
14
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
15
15
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
16
16
|
import { z } from "zod";
|
|
17
|
+
import { VERSION as SERVER_VERSION } from "./version.js";
|
|
17
18
|
export const SERVER_NAME = "andesyte-code-security";
|
|
18
|
-
export
|
|
19
|
+
export { SERVER_VERSION };
|
|
19
20
|
const scopeSchema = z
|
|
20
21
|
.enum(["changed", "staged", "paths", "repository"])
|
|
21
22
|
.default("changed")
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the package version.
|
|
3
|
+
*
|
|
4
|
+
* Read from package.json rather than duplicated as a literal. A hardcoded
|
|
5
|
+
* constant silently drifts from the manifest on every release: 0.1.1
|
|
6
|
+
* published with the binary and MCP server still reporting 0.1.0.
|
|
7
|
+
*
|
|
8
|
+
* Kept in its own module so both the CLI entrypoint and the MCP server can
|
|
9
|
+
* use it without an import cycle (index.ts imports mcp.ts).
|
|
10
|
+
*/
|
|
11
|
+
export declare const VERSION: string;
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the package version.
|
|
3
|
+
*
|
|
4
|
+
* Read from package.json rather than duplicated as a literal. A hardcoded
|
|
5
|
+
* constant silently drifts from the manifest on every release: 0.1.1
|
|
6
|
+
* published with the binary and MCP server still reporting 0.1.0.
|
|
7
|
+
*
|
|
8
|
+
* Kept in its own module so both the CLI entrypoint and the MCP server can
|
|
9
|
+
* use it without an import cycle (index.ts imports mcp.ts).
|
|
10
|
+
*/
|
|
11
|
+
import { readFileSync } from "node:fs";
|
|
12
|
+
function readVersion() {
|
|
13
|
+
try {
|
|
14
|
+
const manifest = new URL("../package.json", import.meta.url);
|
|
15
|
+
const parsed = JSON.parse(readFileSync(manifest, "utf8"));
|
|
16
|
+
if (typeof parsed === "object" &&
|
|
17
|
+
parsed !== null &&
|
|
18
|
+
typeof parsed.version === "string") {
|
|
19
|
+
return parsed.version;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// Fall through: a missing or malformed manifest must not stop a scan.
|
|
24
|
+
}
|
|
25
|
+
return "unknown";
|
|
26
|
+
}
|
|
27
|
+
export const VERSION = readVersion();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andesyte-oss/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Andesyte local security CLI and MCP server: check code and dependencies without sending source anywhere.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
40
40
|
"zod": "^3.25.76",
|
|
41
|
-
"@andesyte-oss/scanner-core": "0.1.
|
|
42
|
-
"@andesyte-oss/security-rules": "0.1.
|
|
41
|
+
"@andesyte-oss/scanner-core": "0.1.2",
|
|
42
|
+
"@andesyte-oss/security-rules": "0.1.2"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc -p tsconfig.json && chmod +x dist/index.js",
|