@yawlabs/mcp-compliance 0.13.5 → 0.14.1
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 +12 -5
- package/dist/mcp/server.js +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -700,7 +700,7 @@ function hasRegressions(summary) {
|
|
|
700
700
|
|
|
701
701
|
// src/mcp/server.ts
|
|
702
702
|
import { existsSync as existsSync2, readFileSync as readFileSync2, realpathSync } from "fs";
|
|
703
|
-
import { dirname, join as join2, resolve as resolve2 } from "path";
|
|
703
|
+
import { basename, dirname, join as join2, resolve as resolve2 } from "path";
|
|
704
704
|
import { fileURLToPath } from "url";
|
|
705
705
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
706
706
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -4678,7 +4678,11 @@ function isInvokedDirectly() {
|
|
|
4678
4678
|
const argv1 = process.argv[1];
|
|
4679
4679
|
if (!argv1) return false;
|
|
4680
4680
|
try {
|
|
4681
|
-
|
|
4681
|
+
const selfPath = realpathSync(fileURLToPath(import.meta.url));
|
|
4682
|
+
if (realpathSync(argv1) !== selfPath) return false;
|
|
4683
|
+
const file = basename(selfPath);
|
|
4684
|
+
const parent = basename(dirname(selfPath));
|
|
4685
|
+
return parent === "mcp" && (file === "server.js" || file === "server.ts");
|
|
4682
4686
|
} catch {
|
|
4683
4687
|
return false;
|
|
4684
4688
|
}
|
|
@@ -5922,7 +5926,10 @@ program.command("mcp").description("Start the MCP compliance server (stdio trans
|
|
|
5922
5926
|
await startServer();
|
|
5923
5927
|
});
|
|
5924
5928
|
if (process.argv.length <= 2) {
|
|
5925
|
-
|
|
5926
|
-
|
|
5929
|
+
startServer().catch((err) => {
|
|
5930
|
+
console.error(err);
|
|
5931
|
+
process.exit(1);
|
|
5932
|
+
});
|
|
5933
|
+
} else {
|
|
5934
|
+
program.parse();
|
|
5927
5935
|
}
|
|
5928
|
-
program.parse();
|
package/dist/mcp/server.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/mcp/server.ts
|
|
8
8
|
import { existsSync, readFileSync, realpathSync } from "fs";
|
|
9
|
-
import { dirname, join, resolve } from "path";
|
|
9
|
+
import { basename, dirname, join, resolve } from "path";
|
|
10
10
|
import { fileURLToPath } from "url";
|
|
11
11
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
12
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -215,7 +215,11 @@ function isInvokedDirectly() {
|
|
|
215
215
|
const argv1 = process.argv[1];
|
|
216
216
|
if (!argv1) return false;
|
|
217
217
|
try {
|
|
218
|
-
|
|
218
|
+
const selfPath = realpathSync(fileURLToPath(import.meta.url));
|
|
219
|
+
if (realpathSync(argv1) !== selfPath) return false;
|
|
220
|
+
const file = basename(selfPath);
|
|
221
|
+
const parent = basename(dirname(selfPath));
|
|
222
|
+
return parent === "mcp" && (file === "server.js" || file === "server.ts");
|
|
219
223
|
} catch {
|
|
220
224
|
return false;
|
|
221
225
|
}
|
package/package.json
CHANGED