ringo-patchright-mcp 1.0.1 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ringo-patchright-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Patchright-based MCP server for browser automation",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -14,7 +14,9 @@
14
14
 
15
15
  let fs = require("fs");
16
16
  let path = require("path");
17
- const pkgPath = path.resolve("node_modules/patchright/package.json");
17
+
18
+ // 使用 require.resolve 动态定位 patchright 安装路径,兼容 npm 扁平化依赖结构
19
+ const pkgPath = require.resolve("patchright/package.json");
18
20
  const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
19
21
 
20
22
  pkg.exports["./lib/mcp/browser/tools/tool"] = "./lib/mcp/browser/tools/tool.js";