schemeog-mcp 3.8.0 → 3.8.1
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/index.js +7 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* SchemeOG MCP Server v3.8.
|
|
4
|
+
* SchemeOG MCP Server v3.8.1
|
|
5
5
|
*
|
|
6
6
|
* MCP сервер для работы со схемами, проектами и тегами в SchemeOG Cloud.
|
|
7
7
|
*
|
|
@@ -37,7 +37,8 @@ import {
|
|
|
37
37
|
CallToolRequestSchema,
|
|
38
38
|
ListToolsRequestSchema,
|
|
39
39
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
40
|
-
import { readFileSync } from "fs";
|
|
40
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
41
|
+
import { dirname } from "path";
|
|
41
42
|
|
|
42
43
|
// Конфигурация
|
|
43
44
|
const API_BASE_URL = process.env.SCHEMEOG_API_URL || "https://diagrams.love";
|
|
@@ -2333,18 +2334,15 @@ export_schema_to_json(
|
|
|
2333
2334
|
|
|
2334
2335
|
// Если указан file_path — сохраняем в файл
|
|
2335
2336
|
if (file_path) {
|
|
2336
|
-
const fs = require('fs');
|
|
2337
|
-
const path = require('path');
|
|
2338
|
-
|
|
2339
2337
|
// Создаём директорию если не существует
|
|
2340
|
-
const dir =
|
|
2341
|
-
if (!
|
|
2342
|
-
|
|
2338
|
+
const dir = dirname(file_path);
|
|
2339
|
+
if (!existsSync(dir)) {
|
|
2340
|
+
mkdirSync(dir, { recursive: true });
|
|
2343
2341
|
}
|
|
2344
2342
|
|
|
2345
2343
|
// Сохраняем JSON в файл
|
|
2346
2344
|
const jsonContent = JSON.stringify(exportData, null, 2);
|
|
2347
|
-
|
|
2345
|
+
writeFileSync(file_path, jsonContent, 'utf8');
|
|
2348
2346
|
|
|
2349
2347
|
const fileSizeKB = Math.round(jsonContent.length / 1024);
|
|
2350
2348
|
|