@mgsoftwarebv/mg-dashboard-mcp 3.6.0 → 3.6.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 +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1833,15 +1833,16 @@ function buildPosixCommand(command, args2) {
|
|
|
1833
1833
|
}
|
|
1834
1834
|
function buildPowerShellEncodedCommand(command, args2) {
|
|
1835
1835
|
const psSingleQuote = (s) => "'" + s.replace(/'/g, "''") + "'";
|
|
1836
|
-
let
|
|
1836
|
+
let body;
|
|
1837
1837
|
if (args2.length === 0) {
|
|
1838
|
-
|
|
1838
|
+
body = command;
|
|
1839
1839
|
} else {
|
|
1840
|
-
|
|
1840
|
+
body = `& ${psSingleQuote(command)} ${args2.map(psSingleQuote).join(" ")}`;
|
|
1841
1841
|
}
|
|
1842
|
+
const psExpr = `$ProgressPreference='SilentlyContinue'; ${body}`;
|
|
1842
1843
|
const utf16 = Buffer.from(psExpr, "utf16le");
|
|
1843
1844
|
const b64 = utf16.toString("base64");
|
|
1844
|
-
return `powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand ${b64}`;
|
|
1845
|
+
return `powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand ${b64}`;
|
|
1845
1846
|
}
|
|
1846
1847
|
var SSH_PROXY_SERVER_ID = "03659d55-e194-400d-b82a-bf6457371ded";
|
|
1847
1848
|
var _proxyConnCache = null;
|
|
@@ -3057,9 +3058,10 @@ ${result.stderr}`);
|
|
|
3057
3058
|
const composeOnly = a.composeOnly === true;
|
|
3058
3059
|
const filterArg = composeOnly ? ' --filter "label=com.docker.compose.project"' : "";
|
|
3059
3060
|
const fmtArg = format === "json" ? ` --format '{{json .}}'` : (
|
|
3060
|
-
// Add the compose project as the last column. Docker
|
|
3061
|
-
//
|
|
3062
|
-
|
|
3061
|
+
// Add the compose project as the last column. Docker exposes
|
|
3062
|
+
// labels through the `.Label "key"` method (Labels itself is a
|
|
3063
|
+
// string slice "k=v,k=v" in docker ps, not a map — `index` fails).
|
|
3064
|
+
` --format 'table {{.Names}} {{.Image}} {{.Status}} {{.Ports}} {{.Label "com.docker.compose.project"}}'`
|
|
3063
3065
|
);
|
|
3064
3066
|
const cmd = `docker ps -a${filterArg}${fmtArg}`;
|
|
3065
3067
|
const { conn, proxy } = await getServerConnection(String(a.serverId));
|