protect-mcp 0.4.1 → 0.4.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/cli.js +7 -1
- package/dist/cli.mjs +7 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4670,8 +4670,14 @@ Add --enforce when ready to block policy violations.
|
|
|
4670
4670
|
async function handleDemo() {
|
|
4671
4671
|
const { existsSync: existsSync5 } = await import("fs");
|
|
4672
4672
|
const { join: join4, dirname, resolve } = await import("path");
|
|
4673
|
+
const { realpathSync } = await import("fs");
|
|
4673
4674
|
const cliPath = resolve(process.argv[1] || "dist/cli.js");
|
|
4674
|
-
|
|
4675
|
+
let cliDir;
|
|
4676
|
+
try {
|
|
4677
|
+
cliDir = dirname(realpathSync(cliPath));
|
|
4678
|
+
} catch {
|
|
4679
|
+
cliDir = dirname(cliPath);
|
|
4680
|
+
}
|
|
4675
4681
|
const demoServerPath = join4(cliDir, "demo-server.js");
|
|
4676
4682
|
const configPath = join4(process.cwd(), "protect-mcp.json");
|
|
4677
4683
|
const hasConfig = existsSync5(configPath);
|
package/dist/cli.mjs
CHANGED
|
@@ -217,8 +217,14 @@ Add --enforce when ready to block policy violations.
|
|
|
217
217
|
async function handleDemo() {
|
|
218
218
|
const { existsSync } = await import("fs");
|
|
219
219
|
const { join, dirname, resolve } = await import("path");
|
|
220
|
+
const { realpathSync } = await import("fs");
|
|
220
221
|
const cliPath = resolve(process.argv[1] || "dist/cli.js");
|
|
221
|
-
|
|
222
|
+
let cliDir;
|
|
223
|
+
try {
|
|
224
|
+
cliDir = dirname(realpathSync(cliPath));
|
|
225
|
+
} catch {
|
|
226
|
+
cliDir = dirname(cliPath);
|
|
227
|
+
}
|
|
222
228
|
const demoServerPath = join(cliDir, "demo-server.js");
|
|
223
229
|
const configPath = join(process.cwd(), "protect-mcp.json");
|
|
224
230
|
const hasConfig = existsSync(configPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "protect-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"mcpName": "io.github.tomjwxf/protect-mcp",
|
|
5
5
|
"description": "Security gateway for MCP servers. Shadow-mode logs, per-tool policies, optional local Ed25519-signed receipts. Programmatic hooks for trust tiers, credential config, and external policy engines.",
|
|
6
6
|
"main": "dist/index.js",
|