uxonfly-mcp 0.1.1 → 0.1.2
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/build/index.js +5 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -18,6 +18,10 @@ import { fileURLToPath } from "node:url";
|
|
|
18
18
|
import { dirname, resolve } from "node:path";
|
|
19
19
|
// ─── Load the base system ────────────────────────────────────────────
|
|
20
20
|
const DEFAULT_MD_PATH = resolve(dirname(fileURLToPath(import.meta.url)), "..", "uxonfly.md");
|
|
21
|
+
// Read package version at runtime so serverInfo.version always matches
|
|
22
|
+
// package.json. Prevents drift on future version bumps.
|
|
23
|
+
const PACKAGE_JSON_PATH = resolve(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
24
|
+
const { version: PACKAGE_VERSION } = JSON.parse(readFileSync(PACKAGE_JSON_PATH, "utf8"));
|
|
21
25
|
function loadSystem() {
|
|
22
26
|
const path = process.env.UXONFLY_MD_PATH ?? DEFAULT_MD_PATH;
|
|
23
27
|
try {
|
|
@@ -64,7 +68,7 @@ const notFound = (what) => asText(`[uxonfly] not found: ${what}. Check uxonfly.m
|
|
|
64
68
|
// ─── Server ──────────────────────────────────────────────────────────
|
|
65
69
|
const server = new McpServer({
|
|
66
70
|
name: "uxonfly-mcp",
|
|
67
|
-
version:
|
|
71
|
+
version: PACKAGE_VERSION,
|
|
68
72
|
});
|
|
69
73
|
// Tool 1 — complete design system
|
|
70
74
|
server.registerTool("get_design_system", {
|