@solongate/proxy 0.4.2 → 0.4.4
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 +10 -2
- package/dist/init.js +10 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -539,8 +539,16 @@ function readConfig(filePath) {
|
|
|
539
539
|
throw new Error(`Unrecognized config format in ${filePath}`);
|
|
540
540
|
}
|
|
541
541
|
function isAlreadyProtected(server) {
|
|
542
|
-
const
|
|
543
|
-
|
|
542
|
+
const args = server.args ?? [];
|
|
543
|
+
if (server.command === "solongate-proxy") return true;
|
|
544
|
+
if (server.command === "@solongate/proxy") return true;
|
|
545
|
+
for (const arg of args) {
|
|
546
|
+
if (arg === "-y" || arg === "--yes") continue;
|
|
547
|
+
if (arg === "@solongate/proxy" || arg === "solongate-proxy") return true;
|
|
548
|
+
if (arg.endsWith("/proxy/dist/index.js") && arg.includes("solongate")) return true;
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
return false;
|
|
544
552
|
}
|
|
545
553
|
function wrapServer(server, policy, apiKey) {
|
|
546
554
|
return {
|
package/dist/init.js
CHANGED
|
@@ -34,8 +34,16 @@ function readConfig(filePath) {
|
|
|
34
34
|
throw new Error(`Unrecognized config format in ${filePath}`);
|
|
35
35
|
}
|
|
36
36
|
function isAlreadyProtected(server) {
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const args = server.args ?? [];
|
|
38
|
+
if (server.command === "solongate-proxy") return true;
|
|
39
|
+
if (server.command === "@solongate/proxy") return true;
|
|
40
|
+
for (const arg of args) {
|
|
41
|
+
if (arg === "-y" || arg === "--yes") continue;
|
|
42
|
+
if (arg === "@solongate/proxy" || arg === "solongate-proxy") return true;
|
|
43
|
+
if (arg.endsWith("/proxy/dist/index.js") && arg.includes("solongate")) return true;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
39
47
|
}
|
|
40
48
|
function wrapServer(server, policy, apiKey) {
|
|
41
49
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "MCP security proxy — protect any MCP server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|