@solongate/proxy 0.6.3 → 0.6.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 +7 -1
- package/dist/init.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1056,7 +1056,13 @@ function extractCommands(args) {
|
|
|
1056
1056
|
const fields = ['command', 'cmd', 'function', 'script', 'shell'];
|
|
1057
1057
|
if (typeof args === 'object' && args) {
|
|
1058
1058
|
for (const [k, v] of Object.entries(args)) {
|
|
1059
|
-
if (fields.includes(k.toLowerCase()) && typeof v === 'string')
|
|
1059
|
+
if (fields.includes(k.toLowerCase()) && typeof v === 'string') {
|
|
1060
|
+
// Split chained commands: cd /path && npm install \u2192 [cd /path, npm install]
|
|
1061
|
+
for (const part of v.split(/\\s*(?:&&|\\|\\||;|\\|)\\s*/)) {
|
|
1062
|
+
const trimmed = part.trim();
|
|
1063
|
+
if (trimmed) cmds.push(trimmed);
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1060
1066
|
}
|
|
1061
1067
|
}
|
|
1062
1068
|
return cmds;
|
package/dist/init.js
CHANGED
|
@@ -245,7 +245,13 @@ function extractCommands(args) {
|
|
|
245
245
|
const fields = ['command', 'cmd', 'function', 'script', 'shell'];
|
|
246
246
|
if (typeof args === 'object' && args) {
|
|
247
247
|
for (const [k, v] of Object.entries(args)) {
|
|
248
|
-
if (fields.includes(k.toLowerCase()) && typeof v === 'string')
|
|
248
|
+
if (fields.includes(k.toLowerCase()) && typeof v === 'string') {
|
|
249
|
+
// Split chained commands: cd /path && npm install \u2192 [cd /path, npm install]
|
|
250
|
+
for (const part of v.split(/\\s*(?:&&|\\|\\||;|\\|)\\s*/)) {
|
|
251
|
+
const trimmed = part.trim();
|
|
252
|
+
if (trimmed) cmds.push(trimmed);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
249
255
|
}
|
|
250
256
|
}
|
|
251
257
|
return cmds;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.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": {
|