@vizejs/musea-mcp-server 0.82.0 → 0.84.0
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/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-DCb_Jsfy.mjs → src-BrRHhfXh.mjs} +17 -4
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as startServer, t as createMuseaServer } from "./src-
|
|
1
|
+
import { n as startServer, t as createMuseaServer } from "./src-BrRHhfXh.mjs";
|
|
2
2
|
export { createMuseaServer, createMuseaServer as default, startServer };
|
|
@@ -495,14 +495,27 @@ function tokenize(query) {
|
|
|
495
495
|
return Array.from(new Set(query.toLowerCase().split(/[\s/,_-]+/).map((term) => term.trim()).filter(Boolean)));
|
|
496
496
|
}
|
|
497
497
|
function toProjectPath(projectRoot, absolutePath) {
|
|
498
|
-
const root =
|
|
499
|
-
const resolved =
|
|
498
|
+
const root = realpathNearest(projectRoot);
|
|
499
|
+
const resolved = realpathNearest(absolutePath);
|
|
500
500
|
const relativePath = path.relative(root, resolved);
|
|
501
501
|
return isProjectPath(root, resolved) ? relativePath || "." : resolved;
|
|
502
502
|
}
|
|
503
|
+
function realpathNearest(targetPath) {
|
|
504
|
+
let current = path.resolve(targetPath);
|
|
505
|
+
const missingParts = [];
|
|
506
|
+
while (true) try {
|
|
507
|
+
const real = fs.realpathSync.native(current);
|
|
508
|
+
return missingParts.length > 0 ? path.join(real, ...missingParts.reverse()) : real;
|
|
509
|
+
} catch {
|
|
510
|
+
const parent = path.dirname(current);
|
|
511
|
+
if (parent === current) return path.resolve(targetPath);
|
|
512
|
+
missingParts.push(path.basename(current));
|
|
513
|
+
current = parent;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
503
516
|
function isProjectPath(projectRoot, candidatePath) {
|
|
504
|
-
const root =
|
|
505
|
-
const candidate =
|
|
517
|
+
const root = realpathNearest(projectRoot);
|
|
518
|
+
const candidate = realpathNearest(candidatePath);
|
|
506
519
|
const relativePath = path.relative(root, candidate);
|
|
507
520
|
return relativePath === "" || !relativePath.startsWith("..") && !path.isAbsolute(relativePath);
|
|
508
521
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/musea-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.84.0",
|
|
4
4
|
"description": "MCP server for building Vue.js design systems - component analysis, documentation, variant generation, and design tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
41
|
-
"@vizejs/native": "0.
|
|
41
|
+
"@vizejs/native": "0.84.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@tsdown/css": "0.22.0",
|