@volue/wave-mcp 0.1.0-next.1 → 0.1.0-next.3

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 CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  ### VS Code
19
19
 
20
- [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=plastic&logo=visualstudiocode&logoColor=ffffff)](vscode:mcp/install?%7B%22name%22%3A%22Wave%20Design%20System%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40volue%2Fwave-mcp%40latest%22%5D%7D)
20
+ [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Wave_MCP-0098FF?style=plastic&logo=visualstudiocode&logoColor=ffffff)](https://insiders.vscode.dev/redirect/mcp/install?name=Wave%20Design%20System&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40volue%2Fwave-mcp%40latest%22%5D%7D)
21
21
 
22
22
  Use the button above or manually add to your `.vscode/mcp.json`:
23
23
 
@@ -27,7 +27,7 @@ Use the button above or manually add to your `.vscode/mcp.json`:
27
27
  "Wave Design System": {
28
28
  "type": "stdio",
29
29
  "command": "npx",
30
- "args": ["@volue/wave-mcp@latest"]
30
+ "args": ["-y", "@volue/wave-mcp@latest"]
31
31
  }
32
32
  },
33
33
  "inputs": []
@@ -1,28 +1,9 @@
1
+ import { a as isNodeType, f as fetchMarkdown, u as uniq, g as getErrorMessage } from './server-DtR5gJns.js';
1
2
  import { createRequire } from 'node:module';
2
3
  import remarkParse from 'remark-parse';
3
4
  import unified from 'unified';
4
5
  import { z } from 'zod';
5
6
 
6
- async function fetchMarkdown(url, options, errorContext) {
7
- const response = await fetch(url, options);
8
- if (!response.ok) {
9
- const context = errorContext ?? `fetch ${url}`;
10
- throw new Error(
11
- `Failed to ${context}: ${response.status} ${response.statusText}`
12
- );
13
- }
14
- return response.text();
15
- }
16
- function isNodeType(node, type) {
17
- return node.type === type;
18
- }
19
- function uniq(array) {
20
- return Array.from(new Set(array));
21
- }
22
- function getErrorMessage(error) {
23
- return error instanceof Error ? error.message : "Unknown error";
24
- }
25
-
26
7
  const markdownParser = unified().use(remarkParse);
27
8
  const SECTION_TYPE_MAP = {
28
9
  Components: "component",
package/dist/index.js CHANGED
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/env node
2
- export { s as server } from './server-Ctp51ema.js';
2
+ import { i as isEntryFile } from './server-DtR5gJns.js';
3
+ export { s as server } from './server-DtR5gJns.js';
4
+ import 'node:fs';
5
+ import 'node:url';
3
6
  import '@modelcontextprotocol/sdk/server/mcp.js';
4
7
 
5
- if (import.meta.url === `file:///${process.argv[1].replace(/\\/g, "/")}`) {
8
+ if (isEntryFile(import.meta.url)) {
6
9
  const args = process.argv.slice(2);
7
10
  const transport = args[0] || "stdio";
8
11
  async function run() {
@@ -0,0 +1,45 @@
1
+ import { realpathSync } from 'node:fs';
2
+ import { pathToFileURL } from 'node:url';
3
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
+
5
+ async function fetchMarkdown(url, options, errorContext) {
6
+ const response = await fetch(url, options);
7
+ if (!response.ok) {
8
+ const context = errorContext ?? `fetch ${url}`;
9
+ throw new Error(
10
+ `Failed to ${context}: ${response.status} ${response.statusText}`
11
+ );
12
+ }
13
+ return response.text();
14
+ }
15
+ function isNodeType(node, type) {
16
+ return node.type === type;
17
+ }
18
+ function uniq(array) {
19
+ return Array.from(new Set(array));
20
+ }
21
+ function getErrorMessage(error) {
22
+ return error instanceof Error ? error.message : "Unknown error";
23
+ }
24
+ function isEntryFile(url) {
25
+ if (!process.argv[1]) return false;
26
+ const realPath = realpathSync(process.argv[1]);
27
+ const realPathURL = pathToFileURL(realPath);
28
+ return url === realPathURL.href;
29
+ }
30
+
31
+ var version = "0.1.0-next.3";
32
+ var packageJson = {
33
+ version: version};
34
+
35
+ const server = new McpServer({
36
+ name: "Wave Design System",
37
+ version: packageJson.version,
38
+ capabilities: {
39
+ prompts: {},
40
+ resources: {},
41
+ tools: {}
42
+ }
43
+ });
44
+
45
+ export { isNodeType as a, fetchMarkdown as f, getErrorMessage as g, isEntryFile as i, packageJson as p, server as s, uniq as u };
@@ -4,8 +4,10 @@ import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js';
4
4
  import cors from 'cors';
5
5
  import express from 'express';
6
6
  import { randomUUID } from 'node:crypto';
7
- import { s as server, p as packageJson } from '../server-Ctp51ema.js';
8
- import { i as initializeTools } from '../index-Dax7yaAA.js';
7
+ import { s as server, p as packageJson, i as isEntryFile } from '../server-DtR5gJns.js';
8
+ import { i as initializeTools } from '../index-EJr2aPNi.js';
9
+ import 'node:fs';
10
+ import 'node:url';
9
11
  import '@modelcontextprotocol/sdk/server/mcp.js';
10
12
  import 'node:module';
11
13
  import 'remark-parse';
@@ -81,7 +83,7 @@ app.get("/health", (_req, res) => {
81
83
  const host = process.env.HOST ?? "localhost";
82
84
  const port = process.env.PORT ? Number(process.env.PORT) : 3e3;
83
85
  let runningServer = null;
84
- if (process.argv.includes("--auto-run") || import.meta.url === `file:///${process.argv[1].replace(/\\/g, "/")}`) {
86
+ if (process.argv.includes("--auto-run") || isEntryFile(import.meta.url)) {
85
87
  runningServer = app.listen(port, host, (error) => {
86
88
  if (error) {
87
89
  console.error("\u274C Failed to start server:", error);
@@ -1,7 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
- import { s as server } from '../server-Ctp51ema.js';
4
- import { i as initializeTools } from '../index-Dax7yaAA.js';
3
+ import { s as server } from '../server-DtR5gJns.js';
4
+ import { i as initializeTools } from '../index-EJr2aPNi.js';
5
+ import 'node:fs';
6
+ import 'node:url';
5
7
  import '@modelcontextprotocol/sdk/server/mcp.js';
6
8
  import 'node:module';
7
9
  import 'remark-parse';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volue/wave-mcp",
3
- "version": "0.1.0-next.1",
3
+ "version": "0.1.0-next.3",
4
4
  "description": "An MCP server that connects AI tools to the Wave Design System",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -59,14 +59,14 @@
59
59
  "@volue/design-icons": "^1.9.4-next.2",
60
60
  "cors": "2.8.5",
61
61
  "express": "5.1.0",
62
- "mdast-util-to-string": "2.0.0",
63
62
  "remark-parse": "8.0.3",
64
63
  "unified": "9.2.2",
64
+ "xtend": "4.0.2",
65
65
  "zod": "3.25.76"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/mdast": "3.0.3",
69
- "@types/node": "22.17.1",
69
+ "@types/node": "22.18.1",
70
70
  "@volue/eslint-config": "1.3.11",
71
71
  "eslint": "9.32.0",
72
72
  "npm-run-all2": "8.0.4",
@@ -1,17 +0,0 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
-
3
- var version = "0.1.0-next.1";
4
- var packageJson = {
5
- version: version};
6
-
7
- const server = new McpServer({
8
- name: "Wave Design System",
9
- version: packageJson.version,
10
- capabilities: {
11
- prompts: {},
12
- resources: {},
13
- tools: {}
14
- }
15
- });
16
-
17
- export { packageJson as p, server as s };