@cotestdev/mcp_playwright 0.0.34 → 0.0.35

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.
@@ -23,7 +23,7 @@ __export(testType_exports, {
23
23
  rootTestType: () => rootTestType
24
24
  });
25
25
  module.exports = __toCommonJS(testType_exports);
26
- var import_playwright_core = require("playwright-core");
26
+ var import_playwright_core = require("../mcpBundleImpl");
27
27
  var import_utils = require("playwright-core/lib/utils");
28
28
  var import_globals = require("./globals");
29
29
  var import_test = require("./test");
@@ -178,8 +178,10 @@ class Context {
178
178
  const result = await this._browserContextFactory.createContext(this._clientInfo, this._abortController.signal, this._runningToolName);
179
179
  const { browserContext } = result;
180
180
  if (!this.config.allowUnrestrictedFileAccess) {
181
- browserContext._setAllowedProtocols(["http:", "https:", "about:", "data:"]);
182
- browserContext._setAllowedDirectories(allRootPaths(this._clientInfo));
181
+ if (typeof browserContext._setAllowedProtocols === "function")
182
+ browserContext._setAllowedProtocols(["http:", "https:", "about:", "data:"]);
183
+ if (typeof browserContext._setAllowedDirectories === "function")
184
+ browserContext._setAllowedDirectories(allRootPaths(this._clientInfo));
183
185
  }
184
186
  await this._setupRequestInterception(browserContext);
185
187
  if (this.sessionLog)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cotestdev/mcp_playwright",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "Playwright MCP (Model Context Protocol) tools for browser automation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -25,7 +25,8 @@
25
25
  "author": "",
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "playwright": "^1.40.0"
28
+ "playwright": "^1.40.0",
29
+ "playwright-core": "^1.40.0"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@types/node": "^20.0.0",