syntax-map-mcp 0.1.6 → 0.1.7
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/CHANGELOG.md +5 -0
- package/dist/server.js +15 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.1.7 - 2026-05-07
|
|
6
|
+
|
|
7
|
+
- `release:check`가 npm 패키징 dry-run 결과의 필수 파일 포함 여부를 자동 검증하도록 했습니다.
|
|
8
|
+
- MCP 서버 metadata의 version이 `package.json` 버전과 동기화되도록 했습니다.
|
|
9
|
+
|
|
5
10
|
## 0.1.6 - 2026-05-06
|
|
6
11
|
|
|
7
12
|
- 하위 디렉터리의 `.gitignore` 패턴도 인덱싱 대상 파일 제외에 반영하도록 했습니다.
|
package/dist/server.js
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
1
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
5
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
6
|
import { registerTools } from './tools.js';
|
|
4
7
|
import { createWorkspace } from './workspace.js';
|
|
8
|
+
export async function createServerInfo() {
|
|
9
|
+
const packageJsonPath = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
|
|
10
|
+
const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf8'));
|
|
11
|
+
if (typeof packageJson.version !== 'string') {
|
|
12
|
+
throw new Error('package.json version is missing');
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
name: 'syntax-map-mcp',
|
|
16
|
+
version: packageJson.version
|
|
17
|
+
};
|
|
18
|
+
}
|
|
5
19
|
export async function createServer(options) {
|
|
6
20
|
const workspace = await createWorkspace(options.workspaceRoot);
|
|
7
|
-
const server = new McpServer(
|
|
21
|
+
const server = new McpServer(await createServerInfo(), {
|
|
8
22
|
instructions: 'Analyze JavaScript, TypeScript, and Python source files under the configured workspaceRoot only.'
|
|
9
23
|
});
|
|
10
24
|
registerTools(server, workspace);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "syntax-map-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Tree-sitter based code analysis MCP server",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "vitest run",
|
|
32
32
|
"test:watch": "vitest",
|
|
33
33
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
34
|
-
"release:check": "npm run typecheck && npm test && npm run build &&
|
|
34
|
+
"release:check": "npm run typecheck && npm test && npm run build && node scripts/check-package-files.mjs"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.29.0",
|