@arabold/docs-mcp-server 1.16.0 → 1.16.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/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { execSync } from "node:child_process";
|
|
|
3
3
|
import fs$1, { readFileSync, existsSync } from "node:fs";
|
|
4
4
|
import "dotenv/config";
|
|
5
5
|
import { Command } from "commander";
|
|
6
|
+
import { chromium } from "playwright";
|
|
6
7
|
import * as http from "node:http";
|
|
7
8
|
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
|
|
8
9
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
@@ -13,7 +14,6 @@ import semver__default from "semver";
|
|
|
13
14
|
import * as cheerio from "cheerio";
|
|
14
15
|
import "node:vm";
|
|
15
16
|
import { VirtualConsole, JSDOM } from "jsdom";
|
|
16
|
-
import { chromium } from "playwright";
|
|
17
17
|
import { gfm } from "@joplin/turndown-plugin-gfm";
|
|
18
18
|
import TurndownService from "turndown";
|
|
19
19
|
import iconv from "iconv-lite";
|
|
@@ -42,7 +42,7 @@ import Fastify from "fastify";
|
|
|
42
42
|
import { jsxs, jsx, Fragment } from "@kitajs/html/jsx-runtime";
|
|
43
43
|
import DOMPurify from "dompurify";
|
|
44
44
|
const name = "@arabold/docs-mcp-server";
|
|
45
|
-
const version = "1.
|
|
45
|
+
const version = "1.16.0";
|
|
46
46
|
const description = "MCP server for fetching and searching documentation";
|
|
47
47
|
const type = "module";
|
|
48
48
|
const bin = { "docs-mcp-server": "dist/index.js" };
|
|
@@ -5732,8 +5732,7 @@ function ensurePlaywrightBrowsersInstalled() {
|
|
|
5732
5732
|
return;
|
|
5733
5733
|
}
|
|
5734
5734
|
try {
|
|
5735
|
-
const
|
|
5736
|
-
const chromiumPath = playwright.chromium.executablePath();
|
|
5735
|
+
const chromiumPath = chromium.executablePath();
|
|
5737
5736
|
if (!chromiumPath || !existsSync(chromiumPath)) {
|
|
5738
5737
|
throw new Error("Playwright Chromium browser not found");
|
|
5739
5738
|
}
|
|
@@ -5742,8 +5741,10 @@ function ensurePlaywrightBrowsersInstalled() {
|
|
|
5742
5741
|
"Playwright browsers not found. Installing Chromium browser for dynamic scraping (this may take a minute)..."
|
|
5743
5742
|
);
|
|
5744
5743
|
try {
|
|
5744
|
+
logger.debug("Installing Playwright Chromium browser...");
|
|
5745
5745
|
execSync("npm exec -y playwright install --no-shell --with-deps chromium", {
|
|
5746
|
-
stdio: "
|
|
5746
|
+
stdio: "ignore",
|
|
5747
|
+
// Suppress output
|
|
5747
5748
|
cwd: getProjectRoot()
|
|
5748
5749
|
});
|
|
5749
5750
|
} catch (installErr) {
|