mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-07 18:27:47 +08:00
The web app will reuse the MCP server's XML engine instead of its own
copy in lib/utils.ts, so these modules now run in the browser too.
- Relative imports end in .ts, rewritten to .js by tsc
(rewriteRelativeImportExtensions); Next.js resolves them directly
- Every module uses the global DOMParser/XMLSerializer: native in the
browser, linkedom in Node via installDomPolyfill. pages.ts parsed with
linkedom but serialized with the global serializer, which throws in
the browser
- The saxes syntax check moves to xml-syntax.ts, so the browser does not
pull in linkedom; it now also rejects undeclared prefixes such as
xlink:, as the browser does
- Page decompression uses pako and atob instead of node:zlib and Buffer
- hasCells moves to pages.ts, away from the file system code
- The duplicate cell id check counts UserObject/object ids
- wrapCellsInModel drops comments and text before the first cell, which
the web app accepts today
- validateAndFixXml takes { strict: false } for diagrams with user content
- Web tests run these modules with a browser DOM (jsdom)
- saxes becomes a direct dependency of the web app
63 lines
1.6 KiB
JSON
63 lines
1.6 KiB
JSON
{
|
|
"name": "@next-ai-drawio/mcp-server",
|
|
"version": "0.6.0",
|
|
"description": "MCP server for Next AI Draw.io - AI-powered diagram generation with real-time browser preview",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"bin": {
|
|
"next-ai-drawio-mcp": "./dist/index.js"
|
|
},
|
|
"scripts": {
|
|
"build": "tsc && node scripts/copy-assets.mjs",
|
|
"check-package": "node scripts/check-package.mjs",
|
|
"dev": "tsx watch src/index.ts",
|
|
"start": "node dist/index.js",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"keywords": [
|
|
"mcp",
|
|
"drawio",
|
|
"diagram",
|
|
"ai",
|
|
"claude",
|
|
"model-context-protocol"
|
|
],
|
|
"author": "DayuanJiang",
|
|
"license": "Apache-2.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/DayuanJiang/next-ai-draw-io",
|
|
"directory": "packages/mcp-server"
|
|
},
|
|
"homepage": "https://next-ai-drawio.jiang.jp",
|
|
"bugs": {
|
|
"url": "https://github.com/DayuanJiang/next-ai-draw-io/issues"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
"linkedom": "^0.18.0",
|
|
"open": "^11.0.0",
|
|
"pako": "^2.2.0",
|
|
"saxes": "^6.0.0",
|
|
"zod": "^4.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.0.0",
|
|
"@types/pako": "^2.0.4",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5",
|
|
"vitest": "^4.1.8"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
]
|
|
}
|