@leeguoo/zentao-mcp 0.3.2 → 0.3.3
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/package.json +2 -1
- package/src/index.js +6 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leeguoo/zentao-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "MCP server for ZenTao RESTful APIs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zentao",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"start": "node src/index.js",
|
|
34
|
+
"self-test": "node scripts/self-test.mjs",
|
|
34
35
|
"release": "./scripts/release.sh",
|
|
35
36
|
"release:patch": "./scripts/release.sh patch",
|
|
36
37
|
"release:minor": "./scripts/release.sh minor",
|
package/src/index.js
CHANGED
|
@@ -64,12 +64,11 @@ function extractAccounts(value) {
|
|
|
64
64
|
return value.flatMap((item) => extractAccounts(item));
|
|
65
65
|
}
|
|
66
66
|
if (typeof value === "object") {
|
|
67
|
-
|
|
68
|
-
if (value.
|
|
69
|
-
if (value.
|
|
70
|
-
if (value.
|
|
71
|
-
|
|
72
|
-
return candidates.filter(Boolean);
|
|
67
|
+
if (value.account) return extractAccounts(value.account);
|
|
68
|
+
if (value.user) return extractAccounts(value.user);
|
|
69
|
+
if (value.name) return extractAccounts(value.name);
|
|
70
|
+
if (value.realname) return extractAccounts(value.realname);
|
|
71
|
+
return [];
|
|
73
72
|
}
|
|
74
73
|
return [];
|
|
75
74
|
}
|
|
@@ -372,7 +371,7 @@ function getClient() {
|
|
|
372
371
|
const server = new Server(
|
|
373
372
|
{
|
|
374
373
|
name: "zentao-mcp",
|
|
375
|
-
version: "0.3.
|
|
374
|
+
version: "0.3.3",
|
|
376
375
|
},
|
|
377
376
|
{
|
|
378
377
|
capabilities: {
|