@nick-vi/type-inject-mcp 1.0.0 → 1.0.2
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 +9 -3
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", {
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nick-vi/type-inject-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server for TypeScript type lookup",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"type-inject-mcp": "dist/index.js"
|
|
8
8
|
},
|
|
9
|
-
"files": [
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/"
|
|
11
|
+
],
|
|
10
12
|
"scripts": {
|
|
11
13
|
"build": "bun build src/index.ts --outdir dist --target node --format esm --packages external",
|
|
12
14
|
"typecheck": "tsc --noEmit",
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
},
|
|
15
17
|
"dependencies": {
|
|
16
18
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
17
|
-
"@nick-vi/type-inject-core": "1.0.2",
|
|
19
|
+
"@nick-vi/type-inject-core": "^1.0.2",
|
|
18
20
|
"zod": "^4.3.5"
|
|
19
21
|
},
|
|
20
22
|
"peerDependencies": {
|
|
@@ -23,6 +25,10 @@
|
|
|
23
25
|
"devDependencies": {
|
|
24
26
|
"@types/bun": "latest"
|
|
25
27
|
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/nick-vi/type-inject"
|
|
31
|
+
},
|
|
26
32
|
"publishConfig": {
|
|
27
33
|
"access": "public"
|
|
28
34
|
}
|