@nick-vi/type-inject-mcp 1.0.0 → 1.0.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 +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,6 +8,11 @@ import {
|
|
|
8
8
|
TypeLookup,
|
|
9
9
|
defaultConfig
|
|
10
10
|
} from "@nick-vi/type-inject-core";
|
|
11
|
+
import { readFileSync } from "node:fs";
|
|
12
|
+
import { dirname, join } from "node:path";
|
|
13
|
+
import { fileURLToPath } from "node:url";
|
|
14
|
+
var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
var pkg = JSON.parse(readFileSync(join(__dirname2, "../package.json"), "utf-8"));
|
|
11
16
|
var cwd = process.cwd();
|
|
12
17
|
var typeLookup = null;
|
|
13
18
|
function getTypeLookup() {
|
|
@@ -17,8 +22,8 @@ function getTypeLookup() {
|
|
|
17
22
|
return typeLookup;
|
|
18
23
|
}
|
|
19
24
|
var server = new McpServer({
|
|
20
|
-
name:
|
|
21
|
-
version:
|
|
25
|
+
name: pkg.name,
|
|
26
|
+
version: pkg.version
|
|
22
27
|
});
|
|
23
28
|
var kindEnum = z.enum(["function", "type", "interface", "enum", "class", "const"]);
|
|
24
29
|
server.registerTool("lookup_type", {
|