@zohodesk/testinglibrary 3.2.11 → 3.2.13
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/build/common/searchFake/steps/searchFake.spec.js +2 -2
- package/npm-shrinkwrap.json +265 -253
- package/package.json +3 -3
- package/playwright-mcp-test/node_modules/.package-lock.json +54 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/LICENSE +202 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/README.md +907 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/cli.js +24 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/config.d.ts +174 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/index.d.ts +23 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/index.js +19 -0
- package/playwright-mcp-test/node_modules/@playwright/mcp/package.json +52 -0
- package/playwright-mcp-test/node_modules/playwright/LICENSE +202 -0
- package/playwright-mcp-test/node_modules/playwright/NOTICE +5 -0
- package/playwright-mcp-test/node_modules/playwright/README.md +168 -0
- package/playwright-mcp-test/node_modules/playwright/ThirdPartyNotices.txt +6277 -0
- package/playwright-mcp-test/node_modules/playwright/cli.js +19 -0
- package/playwright-mcp-test/node_modules/playwright/index.d.ts +17 -0
- package/playwright-mcp-test/node_modules/playwright/index.js +17 -0
- package/playwright-mcp-test/node_modules/playwright/index.mjs +18 -0
- package/playwright-mcp-test/node_modules/playwright/jsx-runtime.js +42 -0
- package/playwright-mcp-test/node_modules/playwright/jsx-runtime.mjs +21 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/generateAgents.js +368 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/generator.agent.md +101 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/healer.agent.md +77 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/planner.agent.md +138 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-coverage.prompt.md +31 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-generate.prompt.md +8 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-heal.prompt.md +6 -0
- package/playwright-mcp-test/node_modules/playwright/lib/agents/test-plan.prompt.md +9 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/config.js +280 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/configLoader.js +344 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/esmLoaderHost.js +102 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/expectBundle.js +52 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/expectBundleImpl.js +389 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/fixtures.js +302 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/globals.js +58 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/ipc.js +60 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/poolBuilder.js +85 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/process.js +104 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/suiteUtils.js +140 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/test.js +321 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/testLoader.js +101 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/testType.js +298 -0
- package/playwright-mcp-test/node_modules/playwright/lib/common/validators.js +68 -0
- package/playwright-mcp-test/node_modules/playwright/lib/fsWatcher.js +67 -0
- package/playwright-mcp-test/node_modules/playwright/lib/index.js +682 -0
- package/playwright-mcp-test/node_modules/playwright/lib/internalsForTest.js +42 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/events.js +77 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/folders.js +30 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/stringInternPool.js +69 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/teleReceiver.js +508 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +137 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testServerConnection.js +211 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testServerInterface.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/testTree.js +334 -0
- package/playwright-mcp-test/node_modules/playwright/lib/isomorphic/types.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/loader/loaderMain.js +59 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/expect.js +325 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/matcherHint.js +87 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/matchers.js +366 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toBeTruthy.js +73 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toEqual.js +99 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toHaveURL.js +102 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchSnapshot.js +341 -0
- package/playwright-mcp-test/node_modules/playwright/lib/matchers/toMatchText.js +99 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/actions.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +296 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +76 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/codegen.js +66 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/config.js +385 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/context.js +287 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/response.js +228 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/sessionLog.js +160 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tab.js +280 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/common.js +63 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/console.js +44 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +60 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +69 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/files.js +58 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/form.js +73 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/install.js +69 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +84 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/mouse.js +107 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/navigate.js +62 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/network.js +54 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/pdf.js +59 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +106 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +181 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tabs.js +67 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tool.js +49 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/tracing.js +74 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/utils.js +89 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/verify.js +153 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools/wait.js +63 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/tools.js +80 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/browser/watchdog.js +44 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/config.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/cdpRelay.js +351 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +75 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/extension/protocol.js +28 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/index.js +61 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/log.js +35 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/program.js +96 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/bundle.js +81 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/exports.js +32 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/http.js +187 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/mdb.js +206 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/proxyBackend.js +128 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/server.js +189 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/sdk/tool.js +51 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/browserBackend.js +98 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/plannerTools.js +46 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/streams.js +39 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testBackend.js +97 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testContext.js +176 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcp/test/testTools.js +115 -0
- package/playwright-mcp-test/node_modules/playwright/lib/mcpBundleImpl.js +41 -0
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/index.js +28 -0
- package/playwright-mcp-test/node_modules/playwright/lib/plugins/webServerPlugin.js +209 -0
- package/playwright-mcp-test/node_modules/playwright/lib/program.js +411 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/base.js +609 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/blob.js +135 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/dot.js +82 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/empty.js +32 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/github.js +128 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/html.js +623 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/internalReporter.js +130 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/json.js +254 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/junit.js +232 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/line.js +113 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/list.js +235 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/listModeReporter.js +69 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/markdown.js +144 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/merge.js +541 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/multiplexer.js +104 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/reporterV2.js +102 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/teleEmitter.js +298 -0
- package/playwright-mcp-test/node_modules/playwright/lib/reporters/versions/blobV1.js +16 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/dispatcher.js +491 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/failureTracker.js +72 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/lastRun.js +77 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/loadUtils.js +334 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/loaderHost.js +89 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/processHost.js +161 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/projectUtils.js +241 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/rebase.js +189 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/reporters.js +139 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/sigIntWatcher.js +96 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/taskRunner.js +127 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/tasks.js +410 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testGroups.js +117 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testRunner.js +390 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/testServer.js +264 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/uiModeReporter.js +30 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/vcs.js +72 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/watchMode.js +395 -0
- package/playwright-mcp-test/node_modules/playwright/lib/runner/workerHost.js +95 -0
- package/playwright-mcp-test/node_modules/playwright/lib/third_party/pirates.js +62 -0
- package/playwright-mcp-test/node_modules/playwright/lib/third_party/tsconfig-loader.js +103 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/babelBundle.js +43 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/babelBundleImpl.js +461 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/compilationCache.js +272 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/esmLoader.js +104 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/portTransport.js +67 -0
- package/playwright-mcp-test/node_modules/playwright/lib/transform/transform.js +293 -0
- package/playwright-mcp-test/node_modules/playwright/lib/util.js +403 -0
- package/playwright-mcp-test/node_modules/playwright/lib/utilsBundle.js +43 -0
- package/playwright-mcp-test/node_modules/playwright/lib/utilsBundleImpl.js +100 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/fixtureRunner.js +258 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/testInfo.js +514 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/testTracing.js +344 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/timeoutManager.js +174 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/util.js +31 -0
- package/playwright-mcp-test/node_modules/playwright/lib/worker/workerMain.js +520 -0
- package/playwright-mcp-test/node_modules/playwright/package.json +72 -0
- package/playwright-mcp-test/node_modules/playwright/test.d.ts +18 -0
- package/playwright-mcp-test/node_modules/playwright/test.js +24 -0
- package/playwright-mcp-test/node_modules/playwright/test.mjs +33 -0
- package/playwright-mcp-test/node_modules/playwright/types/test.d.ts +10185 -0
- package/playwright-mcp-test/node_modules/playwright/types/testReporter.d.ts +821 -0
- package/playwright-mcp-test/node_modules/playwright-core/LICENSE +202 -0
- package/playwright-mcp-test/node_modules/playwright-core/NOTICE +5 -0
- package/playwright-mcp-test/node_modules/playwright-core/README.md +3 -0
- package/playwright-mcp-test/node_modules/playwright-core/ThirdPartyNotices.txt +1161 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +35 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/playwright-mcp-test/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/playwright-mcp-test/node_modules/playwright-core/browsers.json +80 -0
- package/playwright-mcp-test/node_modules/playwright-core/cli.js +18 -0
- package/playwright-mcp-test/node_modules/playwright-core/index.d.ts +17 -0
- package/playwright-mcp-test/node_modules/playwright-core/index.js +32 -0
- package/playwright-mcp-test/node_modules/playwright-core/index.mjs +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/androidServerImpl.js +65 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/browserServerImpl.js +120 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/driver.js +97 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/program.js +634 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/cli/programWithTestStub.js +74 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/accessibility.js +49 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/android.js +361 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/api.js +137 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/artifact.js +79 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browser.js +163 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browserContext.js +529 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/browserType.js +184 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/cdpSession.js +51 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/channelOwner.js +194 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientHelper.js +64 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientInstrumentation.js +55 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clientStackTrace.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/clock.js +68 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/connection.js +314 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/consoleMessage.js +54 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/coverage.js +44 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/dialog.js +56 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/download.js +62 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/electron.js +138 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/elementHandle.js +281 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/errors.js +77 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/eventEmitter.js +314 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/events.js +99 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fetch.js +369 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fileChooser.js +46 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/fileUtils.js +34 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/frame.js +408 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/harRouter.js +87 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/input.js +84 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/jsHandle.js +109 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/jsonPipe.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/localUtils.js +60 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/locator.js +369 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/network.js +747 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/page.js +721 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/platform.js +74 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/playwright.js +71 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/selectors.js +55 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/stream.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/timeoutSettings.js +79 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/tracing.js +117 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/types.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/video.js +59 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/waiter.js +142 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/webError.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/webSocket.js +93 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/worker.js +63 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/client/writableStream.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/clockSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/injectedScriptSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/storageScriptSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/utilityScriptSource.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/generated/webSocketMockSource.js +336 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/inProcessFactory.js +60 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/inprocess.js +3 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/outofprocess.js +76 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/serializers.js +192 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/validator.js +2912 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +193 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/remote/playwrightConnection.js +129 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/remote/playwrightServer.js +335 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/accessibility.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/android/android.js +465 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/android/backendAdb.js +177 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/artifact.js +127 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +490 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +153 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +212 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +221 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +130 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiInput.js +146 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +383 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +102 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiPage.js +554 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +106 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiDeserializer.js +98 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +179 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browser.js +149 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browserContext.js +695 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/browserType.js +328 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/callLog.js +82 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/chromium.js +402 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +95 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crAccessibility.js +263 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crBrowser.js +502 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crConnection.js +202 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crCoverage.js +235 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crDevTools.js +113 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +131 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +146 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crInput.js +187 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +666 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crPage.js +1069 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crPdf.js +121 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +145 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +123 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/protocol.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/chromium/videoRecorder.js +113 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/clock.js +149 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/csharp.js +327 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/java.js +274 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/javascript.js +270 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/jsonl.js +52 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/language.js +132 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/languages.js +68 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/python.js +279 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/codegen/types.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/console.js +53 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/cookieStore.js +206 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/debugController.js +191 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/debugger.js +119 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/deviceDescriptors.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +1779 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dialog.js +116 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +364 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +371 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +89 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +213 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +401 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/dom.js +806 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/download.js +70 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/electron/electron.js +270 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/electron/loader.js +29 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/errors.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fetch.js +621 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fileChooser.js +43 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/fileUploadUtils.js +84 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffAccessibility.js +238 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +428 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffConnection.js +147 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +150 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffInput.js +159 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +256 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/ffPage.js +503 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/firefox.js +116 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/firefox/protocol.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/formData.js +147 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/frameSelectors.js +154 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/frames.js +1455 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/har/harRecorder.js +147 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/har/harTracer.js +607 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/harBackend.js +157 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/helper.js +96 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/index.js +58 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/input.js +273 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/instrumentation.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/javascript.js +291 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/launchApp.js +128 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/localUtils.js +214 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/macEditingCommands.js +143 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/network.js +629 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/page.js +867 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/pipeTransport.js +89 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/playwright.js +69 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/progress.js +112 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/protocolError.js +52 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/chat.js +161 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderApp.js +387 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +138 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +157 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder/throttledFile.js +57 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/recorder.js +499 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/browserFetcher.js +175 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/dependencies.js +371 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/index.js +1361 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/nativeDeps.js +1280 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +124 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/screenshotter.js +333 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/selectors.js +112 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/socksInterceptor.js +95 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +147 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +541 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +602 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/test/inMemorySnapshotter.js +87 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +230 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/transport.js +181 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/types.js +28 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/usKeyboardLayout.js +145 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/ascii.js +44 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/comparators.js +139 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/crypto.js +216 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/debug.js +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/debugLogger.js +122 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/env.js +73 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/eventsHelper.js +39 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/expectUtils.js +38 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/fileUtils.js +191 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +207 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/hostPlatform.js +123 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/httpServer.js +218 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/imageUtils.js +146 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +109 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +102 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/linuxUtils.js +71 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/network.js +233 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/nodePlatform.js +148 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/pipeTransport.js +84 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/processLauncher.js +241 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/profiler.js +65 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/socksProxy.js +511 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/spawnAsync.js +41 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/task.js +51 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/userAgent.js +98 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/wsServer.js +121 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/zipFile.js +74 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/utils/zones.js +57 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/protocol.d.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/webkit.js +119 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkAccessibility.js +237 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +339 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkConnection.js +149 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +154 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkInput.js +181 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +169 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkPage.js +1134 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +104 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wsl/webkit-wsl-transport-client.js +74 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/server/webkit/wsl/webkit-wsl-transport-server.js +113 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/third_party/pixelmatch.js +255 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +392 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/assert.js +31 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/colors.js +72 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +245 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/headers.js +53 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +176 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +114 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +459 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +80 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +321 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +43 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +386 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +54 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +158 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +155 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/time.js +49 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +58 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/types.js +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +179 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utils.js +109 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundle.js +112 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundleImpl/index.js +218 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +1066 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/htmlReport/index.html +84 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DX585GyR.js +25 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/index-DjadjNw5.js +193 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/assets/index-Ri0uHF7I.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-Cw-6jrKz.js +25 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-BZIhX7gh.js +266 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BEjzWGz-.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.Dk_obRs3.js +2 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.I8N9v4jT.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/index.html +43 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +21 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +3 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Bai-qGIw.js +5 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +17 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/zipBundle.js +34 -0
- package/playwright-mcp-test/node_modules/playwright-core/lib/zipBundleImpl.js +5 -0
- package/playwright-mcp-test/node_modules/playwright-core/package.json +42 -0
- package/playwright-mcp-test/node_modules/playwright-core/types/protocol.d.ts +23130 -0
- package/playwright-mcp-test/node_modules/playwright-core/types/structs.d.ts +45 -0
- package/playwright-mcp-test/node_modules/playwright-core/types/types.d.ts +22872 -0
- package/playwright-mcp-test/package-lock.json +76 -0
|
@@ -0,0 +1,81 @@
|
|
|
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 bundle_exports = {};
|
|
30
|
+
__export(bundle_exports, {
|
|
31
|
+
CallToolRequestSchema: () => CallToolRequestSchema,
|
|
32
|
+
Client: () => Client,
|
|
33
|
+
ListRootsRequestSchema: () => ListRootsRequestSchema,
|
|
34
|
+
ListToolsRequestSchema: () => ListToolsRequestSchema,
|
|
35
|
+
PingRequestSchema: () => PingRequestSchema,
|
|
36
|
+
ProgressNotificationSchema: () => ProgressNotificationSchema,
|
|
37
|
+
SSEClientTransport: () => SSEClientTransport,
|
|
38
|
+
SSEServerTransport: () => SSEServerTransport,
|
|
39
|
+
Server: () => Server,
|
|
40
|
+
StdioClientTransport: () => StdioClientTransport,
|
|
41
|
+
StdioServerTransport: () => StdioServerTransport,
|
|
42
|
+
StreamableHTTPClientTransport: () => StreamableHTTPClientTransport,
|
|
43
|
+
StreamableHTTPServerTransport: () => StreamableHTTPServerTransport,
|
|
44
|
+
z: () => z,
|
|
45
|
+
zodToJsonSchema: () => zodToJsonSchema
|
|
46
|
+
});
|
|
47
|
+
module.exports = __toCommonJS(bundle_exports);
|
|
48
|
+
var bundle = __toESM(require("../../mcpBundleImpl"));
|
|
49
|
+
const zodToJsonSchema = bundle.zodToJsonSchema;
|
|
50
|
+
const Client = bundle.Client;
|
|
51
|
+
const Server = bundle.Server;
|
|
52
|
+
const SSEClientTransport = bundle.SSEClientTransport;
|
|
53
|
+
const SSEServerTransport = bundle.SSEServerTransport;
|
|
54
|
+
const StdioClientTransport = bundle.StdioClientTransport;
|
|
55
|
+
const StdioServerTransport = bundle.StdioServerTransport;
|
|
56
|
+
const StreamableHTTPServerTransport = bundle.StreamableHTTPServerTransport;
|
|
57
|
+
const StreamableHTTPClientTransport = bundle.StreamableHTTPClientTransport;
|
|
58
|
+
const CallToolRequestSchema = bundle.CallToolRequestSchema;
|
|
59
|
+
const ListRootsRequestSchema = bundle.ListRootsRequestSchema;
|
|
60
|
+
const ProgressNotificationSchema = bundle.ProgressNotificationSchema;
|
|
61
|
+
const ListToolsRequestSchema = bundle.ListToolsRequestSchema;
|
|
62
|
+
const PingRequestSchema = bundle.PingRequestSchema;
|
|
63
|
+
const z = bundle.z;
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
CallToolRequestSchema,
|
|
67
|
+
Client,
|
|
68
|
+
ListRootsRequestSchema,
|
|
69
|
+
ListToolsRequestSchema,
|
|
70
|
+
PingRequestSchema,
|
|
71
|
+
ProgressNotificationSchema,
|
|
72
|
+
SSEClientTransport,
|
|
73
|
+
SSEServerTransport,
|
|
74
|
+
Server,
|
|
75
|
+
StdioClientTransport,
|
|
76
|
+
StdioServerTransport,
|
|
77
|
+
StreamableHTTPClientTransport,
|
|
78
|
+
StreamableHTTPServerTransport,
|
|
79
|
+
z,
|
|
80
|
+
zodToJsonSchema
|
|
81
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var exports_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(exports_exports);
|
|
18
|
+
__reExport(exports_exports, require("./inProcessTransport"), module.exports);
|
|
19
|
+
__reExport(exports_exports, require("./proxyBackend"), module.exports);
|
|
20
|
+
__reExport(exports_exports, require("./server"), module.exports);
|
|
21
|
+
__reExport(exports_exports, require("./tool"), module.exports);
|
|
22
|
+
__reExport(exports_exports, require("./http"), module.exports);
|
|
23
|
+
__reExport(exports_exports, require("./mdb"), module.exports);
|
|
24
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
+
0 && (module.exports = {
|
|
26
|
+
...require("./inProcessTransport"),
|
|
27
|
+
...require("./proxyBackend"),
|
|
28
|
+
...require("./server"),
|
|
29
|
+
...require("./tool"),
|
|
30
|
+
...require("./http"),
|
|
31
|
+
...require("./mdb")
|
|
32
|
+
});
|
|
@@ -0,0 +1,187 @@
|
|
|
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 http_exports = {};
|
|
30
|
+
__export(http_exports, {
|
|
31
|
+
httpAddressToString: () => httpAddressToString,
|
|
32
|
+
installHttpTransport: () => installHttpTransport,
|
|
33
|
+
startHttpServer: () => startHttpServer
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(http_exports);
|
|
36
|
+
var import_assert = __toESM(require("assert"));
|
|
37
|
+
var import_http = __toESM(require("http"));
|
|
38
|
+
var import_crypto = __toESM(require("crypto"));
|
|
39
|
+
var import_utilsBundle = require("playwright-core/lib/utilsBundle");
|
|
40
|
+
var mcpBundle = __toESM(require("./bundle"));
|
|
41
|
+
var mcpServer = __toESM(require("./server"));
|
|
42
|
+
const testDebug = (0, import_utilsBundle.debug)("pw:mcp:test");
|
|
43
|
+
async function startHttpServer(config, abortSignal) {
|
|
44
|
+
const { host, port } = config;
|
|
45
|
+
const httpServer = import_http.default.createServer();
|
|
46
|
+
decorateServer(httpServer);
|
|
47
|
+
await new Promise((resolve, reject) => {
|
|
48
|
+
httpServer.on("error", reject);
|
|
49
|
+
abortSignal?.addEventListener("abort", () => {
|
|
50
|
+
httpServer.close();
|
|
51
|
+
reject(new Error("Aborted"));
|
|
52
|
+
});
|
|
53
|
+
httpServer.listen(port, host, () => {
|
|
54
|
+
resolve();
|
|
55
|
+
httpServer.removeListener("error", reject);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
return httpServer;
|
|
59
|
+
}
|
|
60
|
+
function httpAddressToString(address) {
|
|
61
|
+
(0, import_assert.default)(address, "Could not bind server socket");
|
|
62
|
+
if (typeof address === "string")
|
|
63
|
+
return address;
|
|
64
|
+
const resolvedPort = address.port;
|
|
65
|
+
let resolvedHost = address.family === "IPv4" ? address.address : `[${address.address}]`;
|
|
66
|
+
if (resolvedHost === "0.0.0.0" || resolvedHost === "[::]")
|
|
67
|
+
resolvedHost = "localhost";
|
|
68
|
+
return `http://${resolvedHost}:${resolvedPort}`;
|
|
69
|
+
}
|
|
70
|
+
async function installHttpTransport(httpServer, serverBackendFactory, unguessableUrl, allowedHosts) {
|
|
71
|
+
const url = httpAddressToString(httpServer.address());
|
|
72
|
+
const host = new URL(url).host;
|
|
73
|
+
allowedHosts = (allowedHosts || [host]).map((h) => h.toLowerCase());
|
|
74
|
+
const allowAnyHost = allowedHosts.includes("*");
|
|
75
|
+
const pathPrefix = unguessableUrl ? `/${import_crypto.default.randomUUID()}` : "";
|
|
76
|
+
const sseSessions = /* @__PURE__ */ new Map();
|
|
77
|
+
const streamableSessions = /* @__PURE__ */ new Map();
|
|
78
|
+
httpServer.on("request", async (req, res) => {
|
|
79
|
+
if (!allowAnyHost) {
|
|
80
|
+
const host2 = req.headers.host?.toLowerCase();
|
|
81
|
+
if (!host2) {
|
|
82
|
+
res.statusCode = 400;
|
|
83
|
+
return res.end("Missing host");
|
|
84
|
+
}
|
|
85
|
+
if (!allowedHosts.includes(host2)) {
|
|
86
|
+
res.statusCode = 403;
|
|
87
|
+
return res.end("Access is only allowed at " + allowedHosts.join(", "));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (!req.url?.startsWith(pathPrefix)) {
|
|
91
|
+
res.statusCode = 404;
|
|
92
|
+
return res.end("Not found");
|
|
93
|
+
}
|
|
94
|
+
const path = req.url?.slice(pathPrefix.length);
|
|
95
|
+
const url2 = new URL(`http://localhost${path}`);
|
|
96
|
+
if (url2.pathname === "/killkillkill" && req.method === "GET") {
|
|
97
|
+
res.statusCode = 200;
|
|
98
|
+
res.end("Killing process");
|
|
99
|
+
process.emit("SIGINT");
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (url2.pathname.startsWith("/sse"))
|
|
103
|
+
await handleSSE(serverBackendFactory, req, res, url2, sseSessions);
|
|
104
|
+
else
|
|
105
|
+
await handleStreamable(serverBackendFactory, req, res, streamableSessions);
|
|
106
|
+
});
|
|
107
|
+
return `${url}${pathPrefix}`;
|
|
108
|
+
}
|
|
109
|
+
async function handleSSE(serverBackendFactory, req, res, url, sessions) {
|
|
110
|
+
if (req.method === "POST") {
|
|
111
|
+
const sessionId = url.searchParams.get("sessionId");
|
|
112
|
+
if (!sessionId) {
|
|
113
|
+
res.statusCode = 400;
|
|
114
|
+
return res.end("Missing sessionId");
|
|
115
|
+
}
|
|
116
|
+
const transport = sessions.get(sessionId);
|
|
117
|
+
if (!transport) {
|
|
118
|
+
res.statusCode = 404;
|
|
119
|
+
return res.end("Session not found");
|
|
120
|
+
}
|
|
121
|
+
return await transport.handlePostMessage(req, res);
|
|
122
|
+
} else if (req.method === "GET") {
|
|
123
|
+
const transport = new mcpBundle.SSEServerTransport("/sse", res);
|
|
124
|
+
sessions.set(transport.sessionId, transport);
|
|
125
|
+
testDebug(`create SSE session: ${transport.sessionId}`);
|
|
126
|
+
await mcpServer.connect(serverBackendFactory, transport, false);
|
|
127
|
+
res.on("close", () => {
|
|
128
|
+
testDebug(`delete SSE session: ${transport.sessionId}`);
|
|
129
|
+
sessions.delete(transport.sessionId);
|
|
130
|
+
});
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
res.statusCode = 405;
|
|
134
|
+
res.end("Method not allowed");
|
|
135
|
+
}
|
|
136
|
+
async function handleStreamable(serverBackendFactory, req, res, sessions) {
|
|
137
|
+
const sessionId = req.headers["mcp-session-id"];
|
|
138
|
+
if (sessionId) {
|
|
139
|
+
const transport = sessions.get(sessionId);
|
|
140
|
+
if (!transport) {
|
|
141
|
+
res.statusCode = 404;
|
|
142
|
+
res.end("Session not found");
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
return await transport.handleRequest(req, res);
|
|
146
|
+
}
|
|
147
|
+
if (req.method === "POST") {
|
|
148
|
+
const transport = new mcpBundle.StreamableHTTPServerTransport({
|
|
149
|
+
sessionIdGenerator: () => import_crypto.default.randomUUID(),
|
|
150
|
+
onsessioninitialized: async (sessionId2) => {
|
|
151
|
+
testDebug(`create http session: ${transport.sessionId}`);
|
|
152
|
+
await mcpServer.connect(serverBackendFactory, transport, true);
|
|
153
|
+
sessions.set(sessionId2, transport);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
transport.onclose = () => {
|
|
157
|
+
if (!transport.sessionId)
|
|
158
|
+
return;
|
|
159
|
+
sessions.delete(transport.sessionId);
|
|
160
|
+
testDebug(`delete http session: ${transport.sessionId}`);
|
|
161
|
+
};
|
|
162
|
+
await transport.handleRequest(req, res);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
res.statusCode = 400;
|
|
166
|
+
res.end("Invalid request");
|
|
167
|
+
}
|
|
168
|
+
function decorateServer(server) {
|
|
169
|
+
const sockets = /* @__PURE__ */ new Set();
|
|
170
|
+
server.on("connection", (socket) => {
|
|
171
|
+
sockets.add(socket);
|
|
172
|
+
socket.once("close", () => sockets.delete(socket));
|
|
173
|
+
});
|
|
174
|
+
const close = server.close;
|
|
175
|
+
server.close = (callback) => {
|
|
176
|
+
for (const socket of sockets)
|
|
177
|
+
socket.destroy();
|
|
178
|
+
sockets.clear();
|
|
179
|
+
return close.call(server, callback);
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
183
|
+
0 && (module.exports = {
|
|
184
|
+
httpAddressToString,
|
|
185
|
+
installHttpTransport,
|
|
186
|
+
startHttpServer
|
|
187
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
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 inProcessTransport_exports = {};
|
|
20
|
+
__export(inProcessTransport_exports, {
|
|
21
|
+
InProcessTransport: () => InProcessTransport
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(inProcessTransport_exports);
|
|
24
|
+
class InProcessTransport {
|
|
25
|
+
constructor(server) {
|
|
26
|
+
this._connected = false;
|
|
27
|
+
this._server = server;
|
|
28
|
+
this._serverTransport = new InProcessServerTransport(this);
|
|
29
|
+
}
|
|
30
|
+
async start() {
|
|
31
|
+
if (this._connected)
|
|
32
|
+
throw new Error("InprocessTransport already started!");
|
|
33
|
+
await this._server.connect(this._serverTransport);
|
|
34
|
+
this._connected = true;
|
|
35
|
+
}
|
|
36
|
+
async send(message, options) {
|
|
37
|
+
if (!this._connected)
|
|
38
|
+
throw new Error("Transport not connected");
|
|
39
|
+
this._serverTransport._receiveFromClient(message);
|
|
40
|
+
}
|
|
41
|
+
async close() {
|
|
42
|
+
if (this._connected) {
|
|
43
|
+
this._connected = false;
|
|
44
|
+
this.onclose?.();
|
|
45
|
+
this._serverTransport.onclose?.();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
_receiveFromServer(message, extra) {
|
|
49
|
+
this.onmessage?.(message, extra);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
class InProcessServerTransport {
|
|
53
|
+
constructor(clientTransport) {
|
|
54
|
+
this._clientTransport = clientTransport;
|
|
55
|
+
}
|
|
56
|
+
async start() {
|
|
57
|
+
}
|
|
58
|
+
async send(message, options) {
|
|
59
|
+
this._clientTransport._receiveFromServer(message);
|
|
60
|
+
}
|
|
61
|
+
async close() {
|
|
62
|
+
this.onclose?.();
|
|
63
|
+
}
|
|
64
|
+
_receiveFromClient(message) {
|
|
65
|
+
this.onmessage?.(message);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
InProcessTransport
|
|
71
|
+
});
|
|
@@ -0,0 +1,206 @@
|
|
|
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 mdb_exports = {};
|
|
30
|
+
__export(mdb_exports, {
|
|
31
|
+
MDBBackend: () => MDBBackend,
|
|
32
|
+
runMainBackend: () => runMainBackend,
|
|
33
|
+
runOnPauseBackendLoop: () => runOnPauseBackendLoop
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(mdb_exports);
|
|
36
|
+
var import_utilsBundle = require("playwright-core/lib/utilsBundle");
|
|
37
|
+
var import_utils = require("playwright-core/lib/utils");
|
|
38
|
+
var import_tool = require("./tool");
|
|
39
|
+
var mcpBundle = __toESM(require("./bundle"));
|
|
40
|
+
var mcpServer = __toESM(require("./server"));
|
|
41
|
+
var mcpHttp = __toESM(require("./http"));
|
|
42
|
+
const mdbDebug = (0, import_utilsBundle.debug)("pw:mcp:mdb");
|
|
43
|
+
const errorsDebug = (0, import_utilsBundle.debug)("pw:mcp:errors");
|
|
44
|
+
const z = mcpBundle.z;
|
|
45
|
+
class MDBBackend {
|
|
46
|
+
constructor(mainBackend) {
|
|
47
|
+
this._progress = [];
|
|
48
|
+
this._mainBackend = mainBackend;
|
|
49
|
+
this._progressCallback = (params) => {
|
|
50
|
+
if (params.message)
|
|
51
|
+
this._progress.push({ type: "text", text: params.message });
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
async initialize(server, clientInfo) {
|
|
55
|
+
if (!this._clientInfo) {
|
|
56
|
+
this._clientInfo = clientInfo;
|
|
57
|
+
await this._mainBackend.initialize?.(server, clientInfo);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async listTools() {
|
|
61
|
+
return await this._mainBackend.listTools();
|
|
62
|
+
}
|
|
63
|
+
async callTool(name, args) {
|
|
64
|
+
if (name === pushToolsSchema.name) {
|
|
65
|
+
await this._createOnPauseClient(pushToolsSchema.inputSchema.parse(args || {}));
|
|
66
|
+
return { content: [{ type: "text", text: "Tools pushed" }] };
|
|
67
|
+
}
|
|
68
|
+
if (this._onPauseClient?.tools.find((tool) => tool.name === name)) {
|
|
69
|
+
const result2 = await this._onPauseClient.client.callTool({
|
|
70
|
+
name,
|
|
71
|
+
arguments: args
|
|
72
|
+
});
|
|
73
|
+
await this._mainBackend.afterCallTool?.(name, args, result2);
|
|
74
|
+
return result2;
|
|
75
|
+
}
|
|
76
|
+
await this._onPauseClient?.transport.terminateSession().catch(errorsDebug);
|
|
77
|
+
await this._onPauseClient?.client.close().catch(errorsDebug);
|
|
78
|
+
this._onPauseClient = void 0;
|
|
79
|
+
const resultPromise = new import_utils.ManualPromise();
|
|
80
|
+
const interruptPromise = new import_utils.ManualPromise();
|
|
81
|
+
this._interruptPromise = interruptPromise;
|
|
82
|
+
this._mainBackend.callTool(name, args, this._progressCallback).then((result2) => {
|
|
83
|
+
resultPromise.resolve(result2);
|
|
84
|
+
}).catch((e) => {
|
|
85
|
+
resultPromise.resolve({ content: [{ type: "text", text: String(e) }], isError: true });
|
|
86
|
+
});
|
|
87
|
+
const result = await Promise.race([interruptPromise, resultPromise]);
|
|
88
|
+
if (interruptPromise.isDone())
|
|
89
|
+
mdbDebug("client call intercepted", result);
|
|
90
|
+
else
|
|
91
|
+
mdbDebug("client call result", result);
|
|
92
|
+
result.content.unshift(...this._progress);
|
|
93
|
+
this._progress.length = 0;
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
async _createOnPauseClient(params) {
|
|
97
|
+
if (this._onPauseClient)
|
|
98
|
+
await this._onPauseClient.client.close().catch(errorsDebug);
|
|
99
|
+
this._onPauseClient = await this._createClient(params.mcpUrl);
|
|
100
|
+
this._interruptPromise?.resolve({
|
|
101
|
+
content: [{
|
|
102
|
+
type: "text",
|
|
103
|
+
text: params.introMessage || ""
|
|
104
|
+
}]
|
|
105
|
+
});
|
|
106
|
+
this._interruptPromise = void 0;
|
|
107
|
+
}
|
|
108
|
+
async _createClient(url) {
|
|
109
|
+
const client = new mcpBundle.Client({ name: "Interrupting client", version: "0.0.0" }, { capabilities: { roots: {} } });
|
|
110
|
+
client.setRequestHandler(mcpBundle.ListRootsRequestSchema, () => ({ roots: this._clientInfo?.roots || [] }));
|
|
111
|
+
client.setRequestHandler(mcpBundle.PingRequestSchema, () => ({}));
|
|
112
|
+
client.setNotificationHandler(mcpBundle.ProgressNotificationSchema, (notification) => {
|
|
113
|
+
if (notification.method === "notifications/progress") {
|
|
114
|
+
const { message } = notification.params;
|
|
115
|
+
if (message)
|
|
116
|
+
this._progress.push({ type: "text", text: message });
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const transport = new mcpBundle.StreamableHTTPClientTransport(new URL(url));
|
|
120
|
+
await client.connect(transport);
|
|
121
|
+
const { tools } = await client.listTools();
|
|
122
|
+
return { client, tools, transport };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const pushToolsSchema = (0, import_tool.defineToolSchema)({
|
|
126
|
+
name: "mdb_push_tools",
|
|
127
|
+
title: "Push MCP tools to the tools stack",
|
|
128
|
+
description: "Push MCP tools to the tools stack",
|
|
129
|
+
inputSchema: z.object({
|
|
130
|
+
mcpUrl: z.string(),
|
|
131
|
+
introMessage: z.string().optional()
|
|
132
|
+
}),
|
|
133
|
+
type: "readOnly"
|
|
134
|
+
});
|
|
135
|
+
async function runMainBackend(backendFactory, options) {
|
|
136
|
+
const mdbBackend = new MDBBackend(backendFactory.create());
|
|
137
|
+
const factory = {
|
|
138
|
+
...backendFactory,
|
|
139
|
+
create: () => mdbBackend
|
|
140
|
+
};
|
|
141
|
+
const url = await startAsHttp(factory, { port: options?.port || 0 });
|
|
142
|
+
process.env.PLAYWRIGHT_DEBUGGER_MCP = url;
|
|
143
|
+
if (options?.port !== void 0)
|
|
144
|
+
return url;
|
|
145
|
+
await mcpServer.connect(factory, new mcpBundle.StdioServerTransport(), false);
|
|
146
|
+
}
|
|
147
|
+
async function runOnPauseBackendLoop(backend, introMessage) {
|
|
148
|
+
const wrappedBackend = new ServerBackendWithCloseListener(backend);
|
|
149
|
+
const factory = {
|
|
150
|
+
name: "on-pause-backend",
|
|
151
|
+
nameInConfig: "on-pause-backend",
|
|
152
|
+
version: "0.0.0",
|
|
153
|
+
create: () => wrappedBackend
|
|
154
|
+
};
|
|
155
|
+
const httpServer = await mcpHttp.startHttpServer({ port: 0 });
|
|
156
|
+
const url = await mcpHttp.installHttpTransport(httpServer, factory, true);
|
|
157
|
+
const client = new mcpBundle.Client({ name: "Pushing client", version: "0.0.0" });
|
|
158
|
+
client.setRequestHandler(mcpBundle.PingRequestSchema, () => ({}));
|
|
159
|
+
const transport = new mcpBundle.StreamableHTTPClientTransport(new URL(process.env.PLAYWRIGHT_DEBUGGER_MCP));
|
|
160
|
+
await client.connect(transport);
|
|
161
|
+
const pushToolsResult = await client.callTool({
|
|
162
|
+
name: pushToolsSchema.name,
|
|
163
|
+
arguments: {
|
|
164
|
+
mcpUrl: url,
|
|
165
|
+
introMessage
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
if (pushToolsResult.isError)
|
|
169
|
+
errorsDebug("Failed to push tools", pushToolsResult.content);
|
|
170
|
+
await transport.terminateSession();
|
|
171
|
+
await client.close();
|
|
172
|
+
await wrappedBackend.waitForClosed();
|
|
173
|
+
httpServer.close();
|
|
174
|
+
}
|
|
175
|
+
async function startAsHttp(backendFactory, options) {
|
|
176
|
+
const httpServer = await mcpHttp.startHttpServer(options);
|
|
177
|
+
return await mcpHttp.installHttpTransport(httpServer, backendFactory, true);
|
|
178
|
+
}
|
|
179
|
+
class ServerBackendWithCloseListener {
|
|
180
|
+
constructor(backend) {
|
|
181
|
+
this._serverClosedPromise = new import_utils.ManualPromise();
|
|
182
|
+
this._backend = backend;
|
|
183
|
+
}
|
|
184
|
+
async initialize(server, clientInfo) {
|
|
185
|
+
await this._backend.initialize?.(server, clientInfo);
|
|
186
|
+
}
|
|
187
|
+
async listTools() {
|
|
188
|
+
return this._backend.listTools();
|
|
189
|
+
}
|
|
190
|
+
async callTool(name, args, progress) {
|
|
191
|
+
return this._backend.callTool(name, args, progress);
|
|
192
|
+
}
|
|
193
|
+
serverClosed(server) {
|
|
194
|
+
this._backend.serverClosed?.(server);
|
|
195
|
+
this._serverClosedPromise.resolve();
|
|
196
|
+
}
|
|
197
|
+
async waitForClosed() {
|
|
198
|
+
await this._serverClosedPromise;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
202
|
+
0 && (module.exports = {
|
|
203
|
+
MDBBackend,
|
|
204
|
+
runMainBackend,
|
|
205
|
+
runOnPauseBackendLoop
|
|
206
|
+
});
|