jsc-typescript-ast-mcp 1.1.7 → 1.1.8
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/README.md +1 -1
- package/dist/main.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/main.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import path from 'path';
|
|
1
2
|
import { getComponentTree } from './ts-morph/componentTree.js';
|
|
2
|
-
const
|
|
3
|
+
const rootDir = __dirname === 'dist'
|
|
4
|
+
? path.resolve(__dirname, '../../')
|
|
5
|
+
: __dirname === 'code'
|
|
6
|
+
? path.resolve(__dirname, '../')
|
|
7
|
+
: __dirname;
|
|
8
|
+
const testApp = getComponentTree(path.resolve(rootDir, 'sample-app/src/App.tsx'), 5, 'my-data-id');
|
|
3
9
|
console.log(JSON.stringify(testApp, null, 2));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsc-typescript-ast-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"mcpName": "io.github.jscoobyced/jsc-typescript-ast-mcp",
|
|
5
5
|
"description": "A Model Context Protocol (MCP) server that provides an abstract syntax tree (AST) representation of TypeScript code using the ts-morph library. It allows clients to analyze and manipulate TypeScript code structures, making it easier for AI models to understand and work with TypeScript projects. You can create a JSON representation of your React components, and use it for various purposes such as documentation, code analysis, or even generating new code based on existing components.",
|
|
6
6
|
"main": "dist/index.js",
|