mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
switch to node api for generate-mcp for cf builds
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { Tool, Resource } from "jsonv-ts/mcp";
|
||||
import { rimraf } from "rimraf";
|
||||
import { writeFile, readFile } from "node:fs/promises";
|
||||
|
||||
const config = {
|
||||
mcpConfig: "./mcp.json",
|
||||
@@ -9,9 +10,9 @@ const config = {
|
||||
async function generate() {
|
||||
console.info("Generating MCP documentation...");
|
||||
await cleanup();
|
||||
const mcpConfig = await Bun.file(config.mcpConfig).json();
|
||||
const mcpConfig = JSON.parse(await readFile(config.mcpConfig, "utf-8"));
|
||||
const document = await generateDocument(mcpConfig);
|
||||
await Bun.write(config.outFile, document);
|
||||
await writeFile(config.outFile, document, "utf-8");
|
||||
console.info("MCP documentation generated.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user