Skip to content

Commit 5078e15

Browse files
committed
fix: zod phantom dependency
1 parent 1d9a7c7 commit 5078e15

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

core/controller-decorator/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"is-type-of": "^1.2.1",
4848
"path-to-regexp": "^1.8.0",
4949
"reflect-metadata": "^0.1.13",
50-
"undici": "^5.26.5"
50+
"undici": "^5.26.5",
51+
"zod": "^3.24.4"
5152
},
5253
"devDependencies": {
5354
"@types/mocha": "^10.0.1",

plugin/controller/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,6 @@ export default class ControllerAppBootHook {
127127
this.app.eggPrototypeLifecycleUtil.deleteLifecycle(this.controllerPrototypeHook);
128128
ControllerMetadataManager.instance.clear();
129129
HTTPControllerRegister.clean();
130+
MCPControllerRegister.clean();
130131
}
131132
}

plugin/controller/lib/impl/mcp/MCPControllerRegister.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ export class MCPControllerRegister implements ControllerRegister {
146146
}
147147
}
148148

149+
static clean() {
150+
if (this.instance) {
151+
this.instance.controllerProtos = [];
152+
}
153+
this.instance = undefined;
154+
}
155+
149156
mcpStatelessStreamServerInit() {
150157
const postRouterFunc = this.router.post;
151158
const self = this;

plugin/controller/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
"koa-compose": "^3.2.1",
6565
"path-to-regexp": "^1.8.0",
6666
"raw-body": "^2.5.2",
67-
"sdk-base": "^4.2.0"
67+
"sdk-base": "^4.2.0",
68+
"zod": "^3.24.4"
6869
},
6970
"devDependencies": {
7071
"@eggjs/module-test-util": "^3.57.4",

plugin/mcp-proxy/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
"content-type": "^1.0.5",
6060
"eventsource-parser": "^3.0.1",
6161
"raw-body": "^2.5.2",
62-
"sdk-base": "^5.0.1"
62+
"sdk-base": "^5.0.1",
63+
"zod": "^3.24.4"
6364
},
6465
"devDependencies": {
6566
"@eggjs/egg-module-common": "^3.57.4",

0 commit comments

Comments
 (0)