@solongate/proxy 0.1.18 → 0.1.19
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 +31 -15
- package/dist/init.js +31 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58,7 +58,10 @@ function wrapServer(server, policy, proxyPath) {
|
|
|
58
58
|
server.command,
|
|
59
59
|
...server.args ?? []
|
|
60
60
|
],
|
|
61
|
-
env:
|
|
61
|
+
env: {
|
|
62
|
+
...server.env,
|
|
63
|
+
SOLONGATE_API_KEY: server.env?.SOLONGATE_API_KEY ?? "sg_live_YOUR_KEY_HERE"
|
|
64
|
+
}
|
|
62
65
|
};
|
|
63
66
|
}
|
|
64
67
|
async function prompt(question) {
|
|
@@ -161,14 +164,23 @@ SOLONGATE_API_KEY=sg_live_your_key_here
|
|
|
161
164
|
}
|
|
162
165
|
const gitignorePath = resolve2(".gitignore");
|
|
163
166
|
if (existsSync2(gitignorePath)) {
|
|
164
|
-
|
|
167
|
+
let gitignore = readFileSync2(gitignorePath, "utf-8");
|
|
168
|
+
let updated = false;
|
|
165
169
|
if (!gitignore.includes(".env")) {
|
|
166
|
-
|
|
167
|
-
|
|
170
|
+
gitignore = gitignore.trimEnd() + "\n.env\n.env.local\n";
|
|
171
|
+
updated = true;
|
|
172
|
+
}
|
|
173
|
+
if (!gitignore.includes(".mcp.json")) {
|
|
174
|
+
gitignore = gitignore.trimEnd() + "\n.mcp.json\n";
|
|
175
|
+
updated = true;
|
|
176
|
+
}
|
|
177
|
+
if (updated) {
|
|
178
|
+
writeFileSync(gitignorePath, gitignore);
|
|
179
|
+
console.error(` Updated .gitignore (added .env + .mcp.json)`);
|
|
168
180
|
}
|
|
169
181
|
} else {
|
|
170
|
-
writeFileSync(gitignorePath, ".env\n.env.local\nnode_modules/\n");
|
|
171
|
-
console.error(` Created .gitignore (with .env excluded)`);
|
|
182
|
+
writeFileSync(gitignorePath, ".env\n.env.local\n.mcp.json\nnode_modules/\n");
|
|
183
|
+
console.error(` Created .gitignore (with .env and .mcp.json excluded)`);
|
|
172
184
|
}
|
|
173
185
|
}
|
|
174
186
|
async function main() {
|
|
@@ -301,15 +313,19 @@ async function main() {
|
|
|
301
313
|
}
|
|
302
314
|
console.error(" Config updated!");
|
|
303
315
|
console.error("");
|
|
304
|
-
console.error(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510");
|
|
305
|
-
console.error(" \u2502 Your MCP servers are now protected by
|
|
306
|
-
console.error(" \u2502 SolonGate security policies.
|
|
307
|
-
console.error(" \u2502
|
|
308
|
-
console.error(" \u2502
|
|
309
|
-
console.error(" \u2502
|
|
310
|
-
console.error(" \u2502
|
|
311
|
-
console.error(" \u2502
|
|
312
|
-
console.error(" \
|
|
316
|
+
console.error(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510");
|
|
317
|
+
console.error(" \u2502 Your MCP servers are now protected by \u2502");
|
|
318
|
+
console.error(" \u2502 SolonGate security policies. \u2502");
|
|
319
|
+
console.error(" \u2502 \u2502");
|
|
320
|
+
console.error(" \u2502 Next steps: \u2502");
|
|
321
|
+
console.error(" \u2502 1. Replace sg_live_YOUR_KEY_HERE in your \u2502");
|
|
322
|
+
console.error(" \u2502 config with your real API key from \u2502");
|
|
323
|
+
console.error(" \u2502 https://solongate.com \u2502");
|
|
324
|
+
console.error(" \u2502 2. Restart your MCP client (Claude Code \u2502");
|
|
325
|
+
console.error(" \u2502 or Claude Desktop) to apply changes. \u2502");
|
|
326
|
+
console.error(" \u2502 \u2502");
|
|
327
|
+
console.error(" \u2502 To undo: solongate-init --restore \u2502");
|
|
328
|
+
console.error(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518");
|
|
313
329
|
console.error("");
|
|
314
330
|
ensureEnvFile();
|
|
315
331
|
console.error("");
|
package/dist/init.js
CHANGED
|
@@ -60,7 +60,10 @@ function wrapServer(server, policy, proxyPath) {
|
|
|
60
60
|
server.command,
|
|
61
61
|
...server.args ?? []
|
|
62
62
|
],
|
|
63
|
-
env:
|
|
63
|
+
env: {
|
|
64
|
+
...server.env,
|
|
65
|
+
SOLONGATE_API_KEY: server.env?.SOLONGATE_API_KEY ?? "sg_live_YOUR_KEY_HERE"
|
|
66
|
+
}
|
|
64
67
|
};
|
|
65
68
|
}
|
|
66
69
|
async function prompt(question) {
|
|
@@ -163,14 +166,23 @@ SOLONGATE_API_KEY=sg_live_your_key_here
|
|
|
163
166
|
}
|
|
164
167
|
const gitignorePath = resolve(".gitignore");
|
|
165
168
|
if (existsSync(gitignorePath)) {
|
|
166
|
-
|
|
169
|
+
let gitignore = readFileSync(gitignorePath, "utf-8");
|
|
170
|
+
let updated = false;
|
|
167
171
|
if (!gitignore.includes(".env")) {
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
gitignore = gitignore.trimEnd() + "\n.env\n.env.local\n";
|
|
173
|
+
updated = true;
|
|
174
|
+
}
|
|
175
|
+
if (!gitignore.includes(".mcp.json")) {
|
|
176
|
+
gitignore = gitignore.trimEnd() + "\n.mcp.json\n";
|
|
177
|
+
updated = true;
|
|
178
|
+
}
|
|
179
|
+
if (updated) {
|
|
180
|
+
writeFileSync(gitignorePath, gitignore);
|
|
181
|
+
console.error(` Updated .gitignore (added .env + .mcp.json)`);
|
|
170
182
|
}
|
|
171
183
|
} else {
|
|
172
|
-
writeFileSync(gitignorePath, ".env\n.env.local\nnode_modules/\n");
|
|
173
|
-
console.error(` Created .gitignore (with .env excluded)`);
|
|
184
|
+
writeFileSync(gitignorePath, ".env\n.env.local\n.mcp.json\nnode_modules/\n");
|
|
185
|
+
console.error(` Created .gitignore (with .env and .mcp.json excluded)`);
|
|
174
186
|
}
|
|
175
187
|
}
|
|
176
188
|
async function main() {
|
|
@@ -303,15 +315,19 @@ async function main() {
|
|
|
303
315
|
}
|
|
304
316
|
console.error(" Config updated!");
|
|
305
317
|
console.error("");
|
|
306
|
-
console.error(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510");
|
|
307
|
-
console.error(" \u2502 Your MCP servers are now protected by
|
|
308
|
-
console.error(" \u2502 SolonGate security policies.
|
|
309
|
-
console.error(" \u2502
|
|
310
|
-
console.error(" \u2502
|
|
311
|
-
console.error(" \u2502
|
|
312
|
-
console.error(" \u2502
|
|
313
|
-
console.error(" \u2502
|
|
314
|
-
console.error(" \
|
|
318
|
+
console.error(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510");
|
|
319
|
+
console.error(" \u2502 Your MCP servers are now protected by \u2502");
|
|
320
|
+
console.error(" \u2502 SolonGate security policies. \u2502");
|
|
321
|
+
console.error(" \u2502 \u2502");
|
|
322
|
+
console.error(" \u2502 Next steps: \u2502");
|
|
323
|
+
console.error(" \u2502 1. Replace sg_live_YOUR_KEY_HERE in your \u2502");
|
|
324
|
+
console.error(" \u2502 config with your real API key from \u2502");
|
|
325
|
+
console.error(" \u2502 https://solongate.com \u2502");
|
|
326
|
+
console.error(" \u2502 2. Restart your MCP client (Claude Code \u2502");
|
|
327
|
+
console.error(" \u2502 or Claude Desktop) to apply changes. \u2502");
|
|
328
|
+
console.error(" \u2502 \u2502");
|
|
329
|
+
console.error(" \u2502 To undo: solongate-init --restore \u2502");
|
|
330
|
+
console.error(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518");
|
|
315
331
|
console.error("");
|
|
316
332
|
ensureEnvFile();
|
|
317
333
|
console.error("");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "MCP security proxy \u00e2\u20ac\u201d protect any MCP server with policies, input validation, rate limiting, and audit logging. Zero code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|