@dannyvan/zentao-mcp 0.1.2 → 0.1.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/bin/zentao-mcp +2 -0
- package/dist/index.js +1 -1
- package/package.json +7 -2
- package/scripts/link-local-bin.mjs +15 -0
package/bin/zentao-mcp
ADDED
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ function assertAuth() {
|
|
|
36
36
|
async function serve() {
|
|
37
37
|
assertUrl();
|
|
38
38
|
assertAuth();
|
|
39
|
-
const server = new McpServer({ name: "zentao-mcp", version: "0.1.
|
|
39
|
+
const server = new McpServer({ name: "zentao-mcp", version: "0.1.3" }, { instructions: skillInstructions() });
|
|
40
40
|
const client = clientFromEnv();
|
|
41
41
|
registerReadTools(server, client);
|
|
42
42
|
registerWriteTools(server, client);
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dannyvan/zentao-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "禅道 MCP + CLI,直连 REST API v1。只做 Bug,写操作默认 dry-run。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"zentao-mcp": "
|
|
8
|
+
"zentao-mcp": "bin/zentao-mcp"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
|
+
"bin",
|
|
13
|
+
"scripts",
|
|
12
14
|
"README.md",
|
|
13
15
|
"skills"
|
|
14
16
|
],
|
|
@@ -32,6 +34,9 @@
|
|
|
32
34
|
"scripts": {
|
|
33
35
|
"build": "tsc",
|
|
34
36
|
"start": "node dist/index.js",
|
|
37
|
+
"pretest": "npm run build",
|
|
38
|
+
"test": "node test-npx.mjs",
|
|
39
|
+
"prepare": "node scripts/link-local-bin.mjs",
|
|
35
40
|
"prepublishOnly": "npm run build"
|
|
36
41
|
},
|
|
37
42
|
"engines": {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// 本仓 checkout 里,npm 11 不会把根包 bin 链到 node_modules/.bin。
|
|
2
|
+
// 装成别人的依赖时脚本位于 node_modules 下,直接退出,不碰宿主目录。
|
|
3
|
+
import { mkdirSync, rmSync, symlinkSync } from "node:fs";
|
|
4
|
+
import { dirname, join, relative, sep } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
8
|
+
if (root.split(sep).includes("node_modules")) process.exit(0);
|
|
9
|
+
|
|
10
|
+
const binDir = join(root, "node_modules", ".bin");
|
|
11
|
+
const dest = join(binDir, "zentao-mcp");
|
|
12
|
+
const src = join(root, "bin", "zentao-mcp");
|
|
13
|
+
mkdirSync(binDir, { recursive: true });
|
|
14
|
+
rmSync(dest, { force: true });
|
|
15
|
+
symlinkSync(relative(binDir, src), dest);
|