@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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as startServer } from "./src-DCb_Jsfy.mjs";
2
+ import { n as startServer } from "./src-BrRHhfXh.mjs";
3
3
  //#region src/cli.ts
4
4
  /**
5
5
  * Musea MCP Server CLI.
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as startServer, t as createMuseaServer } from "./src-DCb_Jsfy.mjs";
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 = path.resolve(projectRoot);
499
- const resolved = path.resolve(absolutePath);
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 = path.resolve(projectRoot);
505
- const candidate = path.resolve(candidatePath);
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.82.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.82.0"
41
+ "@vizejs/native": "0.84.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@tsdown/css": "0.22.0",