@antonytm/mcp-sitecore-server 1.3.3 → 1.3.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/bundle.js
CHANGED
|
@@ -32865,15 +32865,21 @@ var PowerShellOutputType;
|
|
|
32865
32865
|
async function runGenericPowershellCommand(config, command, options, outputFormat) {
|
|
32866
32866
|
const client = new PowershellClient(config.powershell.serverUrl, config.powershell.username, config.powershell.password, config.powershell.domain);
|
|
32867
32867
|
let text = "";
|
|
32868
|
+
let isError = false;
|
|
32868
32869
|
switch (outputFormat) {
|
|
32869
32870
|
case PowerShellOutputType.JSON:
|
|
32870
32871
|
text = await client.executeScriptJson(command, options);
|
|
32872
|
+
const json1 = JSON.parse(text);
|
|
32873
|
+
isError = json1?.Obj?.[0]?.ErrorCategory_Message !== undefined;
|
|
32871
32874
|
break;
|
|
32872
32875
|
case PowerShellOutputType.XML:
|
|
32873
32876
|
text = await client.executeScript(command, options);
|
|
32877
|
+
isError = text.includes("Error");
|
|
32874
32878
|
break;
|
|
32875
32879
|
default:
|
|
32876
32880
|
text = await client.executeScriptJson(command, options);
|
|
32881
|
+
const json2 = JSON.parse(text);
|
|
32882
|
+
isError = json2?.Obj?.[0]?.ErrorCategory_Message !== undefined;
|
|
32877
32883
|
break;
|
|
32878
32884
|
}
|
|
32879
32885
|
return {
|
|
@@ -32883,7 +32889,7 @@ async function runGenericPowershellCommand(config, command, options, outputForma
|
|
|
32883
32889
|
text: text,
|
|
32884
32890
|
},
|
|
32885
32891
|
],
|
|
32886
|
-
isError:
|
|
32892
|
+
isError: isError,
|
|
32887
32893
|
};
|
|
32888
32894
|
}
|
|
32889
32895
|
|
|
@@ -3,15 +3,21 @@ import { PowerShellOutputType } from "../output.js";
|
|
|
3
3
|
export async function runGenericPowershellCommand(config, command, options, outputFormat) {
|
|
4
4
|
const client = new PowershellClient(config.powershell.serverUrl, config.powershell.username, config.powershell.password, config.powershell.domain);
|
|
5
5
|
let text = "";
|
|
6
|
+
let isError = false;
|
|
6
7
|
switch (outputFormat) {
|
|
7
8
|
case PowerShellOutputType.JSON:
|
|
8
9
|
text = await client.executeScriptJson(command, options);
|
|
10
|
+
const json1 = JSON.parse(text);
|
|
11
|
+
isError = json1?.Obj?.[0]?.ErrorCategory_Message !== undefined;
|
|
9
12
|
break;
|
|
10
13
|
case PowerShellOutputType.XML:
|
|
11
14
|
text = await client.executeScript(command, options);
|
|
15
|
+
isError = text.includes("Error");
|
|
12
16
|
break;
|
|
13
17
|
default:
|
|
14
18
|
text = await client.executeScriptJson(command, options);
|
|
19
|
+
const json2 = JSON.parse(text);
|
|
20
|
+
isError = json2?.Obj?.[0]?.ErrorCategory_Message !== undefined;
|
|
15
21
|
break;
|
|
16
22
|
}
|
|
17
23
|
return {
|
|
@@ -21,7 +27,7 @@ export async function runGenericPowershellCommand(config, command, options, outp
|
|
|
21
27
|
text: text,
|
|
22
28
|
},
|
|
23
29
|
],
|
|
24
|
-
isError:
|
|
30
|
+
isError: isError,
|
|
25
31
|
};
|
|
26
32
|
}
|
|
27
33
|
//# sourceMappingURL=generic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.js","sourceRoot":"","sources":["../../../../src/tools/powershell/simple/generic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,MAAc,EAAE,OAAe,EAAE,OAA4B,EAAE,YAAmC;IAChJ,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAC/B,MAAM,CAAC,UAAU,CAAC,SAAS,EAC3B,MAAM,CAAC,UAAU,CAAC,QAAQ,EAC1B,MAAM,CAAC,UAAU,CAAC,QAAQ,EAC1B,MAAM,CAAC,UAAU,CAAC,MAAM,CAC3B,CAAC;IAEF,IAAI,IAAI,GAAG,EAAE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CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/B,OAAO,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,qBAAqB,KAAK,SAAS,CAAC;YAC/D,MAAM;QACV,KAAK,oBAAoB,CAAC,GAAG;YACzB,IAAI,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACpD,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACjC,MAAM;QACV;YACI,IAAI,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/B,OAAO,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,qBAAqB,KAAK,SAAS,CAAC;YAC/D,MAAM;IACd,CAAC;IAED,OAAO;QACH,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI;aACb;SACJ;QACD,OAAO,EAAE,OAAO;KACnB,CAAA;AAEL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antonytm/mcp-sitecore-server",
|
|
3
3
|
"mcpName": "io.github.Antonytm/mcp-sitecore-server",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.4",
|
|
5
5
|
"description": "A Model Context Protocol server for Sitecore",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"start:stdio": "npm run build && cross-env TRANSPORT=stdio node dist/index.js",
|
|
26
26
|
"run": "npm run build && node dist/run.js",
|
|
27
27
|
"test": "npm run build && npm run bundle && vitest run",
|
|
28
|
-
"docker:windows:build": "docker build -t antonytm/mcp-sitecore-windows:1.3.
|
|
28
|
+
"docker:windows:build": "docker build -t antonytm/mcp-sitecore-windows:1.3.4 -t antonytm/mcp-sitecore-windows:latest --file .\\docker\\windows\\Dockerfile .",
|
|
29
29
|
"docker:windows:run": "docker run -it --rm -p 4001:3001 antonytm/mcp-sitecore-windows:latest",
|
|
30
|
-
"docker:windows:push": "docker push antonytm/mcp-sitecore-windows:1.3.
|
|
30
|
+
"docker:windows:push": "docker push antonytm/mcp-sitecore-windows:1.3.4 && docker push antonytm/mcp-sitecore-windows:latest",
|
|
31
31
|
"docker:windows": "npm run docker:windows:build && npm run docker:windows:push",
|
|
32
|
-
"docker:linux:build": "docker build -t antonytm/mcp-sitecore-linux:1.3.
|
|
32
|
+
"docker:linux:build": "docker build -t antonytm/mcp-sitecore-linux:1.3.4 -t antonytm/mcp-sitecore-linux:latest --file ./docker/linux/Dockerfile .",
|
|
33
33
|
"docker:linux:run": "docker run -it --rm -p 4001:3001 antonytm/mcp-sitecore-linux:latest",
|
|
34
|
-
"docker:linux:push": "docker push antonytm/mcp-sitecore-linux:1.3.
|
|
34
|
+
"docker:linux:push": "docker push antonytm/mcp-sitecore-linux:1.3.4 && docker push antonytm/mcp-sitecore-linux:latest",
|
|
35
35
|
"docker:linux": "npm run docker:linux:build && npm run docker:linux:push"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|