@cotestdev/mcp_playwright 0.0.51 → 0.0.53

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.
Files changed (71) hide show
  1. package/lib/mcp/browser/browserContextFactory.js +11 -6
  2. package/lib/mcp/browser/browserServerBackend.js +2 -4
  3. package/lib/mcp/browser/config.js +71 -47
  4. package/lib/mcp/browser/context.js +65 -4
  5. package/lib/mcp/browser/logFile.js +96 -0
  6. package/lib/mcp/browser/response.js +107 -104
  7. package/lib/mcp/browser/sessionLog.js +1 -1
  8. package/lib/mcp/browser/tab.js +73 -18
  9. package/lib/mcp/browser/tools/config.js +41 -0
  10. package/lib/mcp/browser/tools/console.js +6 -2
  11. package/lib/mcp/browser/tools/cookies.js +152 -0
  12. package/lib/mcp/browser/tools/install.js +1 -0
  13. package/lib/mcp/browser/tools/network.js +25 -11
  14. package/lib/mcp/browser/tools/pdf.js +3 -4
  15. package/lib/mcp/browser/tools/route.js +140 -0
  16. package/lib/mcp/browser/tools/runCode.js +0 -2
  17. package/lib/mcp/browser/tools/screenshot.js +6 -7
  18. package/lib/mcp/browser/tools/storage.js +3 -4
  19. package/lib/mcp/browser/tools/tracing.js +10 -9
  20. package/lib/mcp/browser/tools/utils.js +0 -6
  21. package/lib/mcp/browser/tools/video.js +31 -13
  22. package/lib/mcp/browser/tools/webstorage.js +223 -0
  23. package/lib/mcp/browser/tools.js +11 -3
  24. package/lib/mcp/extension/cdpRelay.js +7 -7
  25. package/lib/mcp/extension/extensionContextFactory.js +4 -2
  26. package/lib/mcp/program.js +20 -12
  27. package/lib/mcp/terminal/cli.js +23 -2
  28. package/lib/mcp/terminal/command.js +34 -30
  29. package/lib/mcp/terminal/commands.js +329 -46
  30. package/lib/mcp/terminal/daemon.js +25 -39
  31. package/lib/mcp/terminal/helpGenerator.js +27 -7
  32. package/lib/mcp/terminal/program.js +495 -200
  33. package/lib/mcp/terminal/socketConnection.js +17 -2
  34. package/lib/mcpBundleImpl/index.js +27 -27
  35. package/package.json +2 -2
  36. package/lib/common/config.js +0 -281
  37. package/lib/common/configLoader.js +0 -344
  38. package/lib/common/esmLoaderHost.js +0 -104
  39. package/lib/common/expectBundle.js +0 -43
  40. package/lib/common/expectBundleImpl.js +0 -407
  41. package/lib/common/fixtures.js +0 -302
  42. package/lib/common/globals.js +0 -58
  43. package/lib/common/ipc.js +0 -60
  44. package/lib/common/poolBuilder.js +0 -85
  45. package/lib/common/process.js +0 -132
  46. package/lib/common/suiteUtils.js +0 -140
  47. package/lib/common/test.js +0 -322
  48. package/lib/common/testLoader.js +0 -101
  49. package/lib/common/testType.js +0 -298
  50. package/lib/common/validators.js +0 -68
  51. package/lib/mcp/browser/actions.d.js +0 -16
  52. package/lib/mcp/browser/codegen.js +0 -66
  53. package/lib/mcp/browser/processUtils.js +0 -102
  54. package/lib/mcp/browser/tools/script.js +0 -60
  55. package/lib/mcp/sdk/bundle.js +0 -75
  56. package/lib/mcp/sdk/mdb.js +0 -208
  57. package/lib/mcp/sdk/proxyBackend.js +0 -128
  58. package/lib/mcp/vscode/host.js +0 -187
  59. package/lib/mcp/vscode/main.js +0 -77
  60. package/lib/mcpBundleImpl.js +0 -41
  61. package/lib/third_party/pirates.js +0 -62
  62. package/lib/third_party/tsconfig-loader.js +0 -103
  63. package/lib/transform/babelBundle.js +0 -43
  64. package/lib/transform/babelBundleImpl.js +0 -461
  65. package/lib/transform/babelHighlightUtils.js +0 -63
  66. package/lib/transform/compilationCache.js +0 -272
  67. package/lib/transform/esmLoader.js +0 -103
  68. package/lib/transform/portTransport.js +0 -67
  69. package/lib/transform/transform.js +0 -296
  70. package/lib/utilsBundleImpl/index.js +0 -218
  71. package/lib/utilsBundleImpl.js +0 -103
@@ -1,104 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var esmLoaderHost_exports = {};
30
- __export(esmLoaderHost_exports, {
31
- configureESMLoader: () => configureESMLoader,
32
- configureESMLoaderTransformConfig: () => configureESMLoaderTransformConfig,
33
- incorporateCompilationCache: () => incorporateCompilationCache,
34
- registerESMLoader: () => registerESMLoader,
35
- startCollectingFileDeps: () => startCollectingFileDeps,
36
- stopCollectingFileDeps: () => stopCollectingFileDeps
37
- });
38
- module.exports = __toCommonJS(esmLoaderHost_exports);
39
- var import_url = __toESM(require("url"));
40
- var import_compilationCache = require("../transform/compilationCache");
41
- var import_portTransport = require("../transform/portTransport");
42
- var import_transform = require("../transform/transform");
43
- let loaderChannel;
44
- function registerESMLoader() {
45
- if (process.env.PW_DISABLE_TS_ESM)
46
- return true;
47
- if ("Bun" in globalThis)
48
- return true;
49
- if (loaderChannel)
50
- return true;
51
- const register = require("node:module").register;
52
- if (!register)
53
- return false;
54
- const { port1, port2 } = new MessageChannel();
55
- register(import_url.default.pathToFileURL(require.resolve("../transform/esmLoader")), {
56
- data: { port: port2 },
57
- transferList: [port2]
58
- });
59
- loaderChannel = createPortTransport(port1);
60
- return true;
61
- }
62
- function createPortTransport(port) {
63
- return new import_portTransport.PortTransport(port, async (method, params) => {
64
- if (method === "pushToCompilationCache")
65
- (0, import_compilationCache.addToCompilationCache)(params.cache);
66
- });
67
- }
68
- async function startCollectingFileDeps() {
69
- if (!loaderChannel)
70
- return;
71
- await loaderChannel.send("startCollectingFileDeps", {});
72
- }
73
- async function stopCollectingFileDeps(file) {
74
- if (!loaderChannel)
75
- return;
76
- await loaderChannel.send("stopCollectingFileDeps", { file });
77
- }
78
- async function incorporateCompilationCache() {
79
- if (!loaderChannel)
80
- return;
81
- const result = await loaderChannel.send("getCompilationCache", {});
82
- (0, import_compilationCache.addToCompilationCache)(result.cache);
83
- }
84
- async function configureESMLoader() {
85
- if (!loaderChannel)
86
- return;
87
- await loaderChannel.send("setSingleTSConfig", { tsconfig: (0, import_transform.singleTSConfig)() });
88
- await loaderChannel.send("addToCompilationCache", { cache: (0, import_compilationCache.serializeCompilationCache)() });
89
- }
90
- async function configureESMLoaderTransformConfig() {
91
- if (!loaderChannel)
92
- return;
93
- await loaderChannel.send("setSingleTSConfig", { tsconfig: (0, import_transform.singleTSConfig)() });
94
- await loaderChannel.send("setTransformConfig", { config: (0, import_transform.transformConfig)() });
95
- }
96
- // Annotate the CommonJS export names for ESM import in node:
97
- 0 && (module.exports = {
98
- configureESMLoader,
99
- configureESMLoaderTransformConfig,
100
- incorporateCompilationCache,
101
- registerESMLoader,
102
- startCollectingFileDeps,
103
- stopCollectingFileDeps
104
- });
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var expectBundle_exports = {};
20
- __export(expectBundle_exports, {
21
- DIM_COLOR: () => DIM_COLOR,
22
- EXPECTED_COLOR: () => EXPECTED_COLOR,
23
- INVERTED_COLOR: () => INVERTED_COLOR,
24
- RECEIVED_COLOR: () => RECEIVED_COLOR,
25
- expect: () => expect,
26
- printReceived: () => printReceived
27
- });
28
- module.exports = __toCommonJS(expectBundle_exports);
29
- const expect = require("./expectBundleImpl").expect;
30
- const EXPECTED_COLOR = require("./expectBundleImpl").EXPECTED_COLOR;
31
- const INVERTED_COLOR = require("./expectBundleImpl").INVERTED_COLOR;
32
- const RECEIVED_COLOR = require("./expectBundleImpl").RECEIVED_COLOR;
33
- const DIM_COLOR = require("./expectBundleImpl").DIM_COLOR;
34
- const printReceived = require("./expectBundleImpl").printReceived;
35
- // Annotate the CommonJS export names for ESM import in node:
36
- 0 && (module.exports = {
37
- DIM_COLOR,
38
- EXPECTED_COLOR,
39
- INVERTED_COLOR,
40
- RECEIVED_COLOR,
41
- expect,
42
- printReceived
43
- });