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 +1 -1
- package/patch-patchright.js +3 -1
package/package.json
CHANGED
package/patch-patchright.js
CHANGED
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
let fs = require("fs");
|
|
16
16
|
let path = require("path");
|
|
17
|
-
|
|
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";
|