stably 4.12.1 → 4.12.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/dist/index.mjs +1 -1
- package/dist/node_modules/minimist/.eslintrc +29 -0
- package/dist/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/dist/node_modules/minimist/.nycrc +14 -0
- package/dist/node_modules/minimist/CHANGELOG.md +298 -0
- package/dist/node_modules/minimist/LICENSE +18 -0
- package/dist/node_modules/minimist/README.md +121 -0
- package/dist/node_modules/minimist/example/parse.js +4 -0
- package/dist/node_modules/minimist/index.js +263 -0
- package/dist/node_modules/minimist/package.json +75 -0
- package/dist/node_modules/minimist/test/all_bool.js +34 -0
- package/dist/node_modules/minimist/test/bool.js +177 -0
- package/dist/node_modules/minimist/test/dash.js +43 -0
- package/dist/node_modules/minimist/test/default_bool.js +37 -0
- package/dist/node_modules/minimist/test/dotted.js +24 -0
- package/dist/node_modules/minimist/test/kv_short.js +32 -0
- package/dist/node_modules/minimist/test/long.js +33 -0
- package/dist/node_modules/minimist/test/num.js +38 -0
- package/dist/node_modules/minimist/test/parse.js +209 -0
- package/dist/node_modules/minimist/test/parse_modified.js +11 -0
- package/dist/node_modules/minimist/test/proto.js +64 -0
- package/dist/node_modules/minimist/test/short.js +69 -0
- package/dist/node_modules/minimist/test/stop_early.js +17 -0
- package/dist/node_modules/minimist/test/unknown.js +104 -0
- package/dist/node_modules/minimist/test/whitespace.js +10 -0
- package/dist/node_modules/playwright/LICENSE +202 -0
- package/dist/node_modules/playwright/NOTICE +5 -0
- package/dist/node_modules/playwright/README.md +170 -0
- package/dist/node_modules/playwright/ThirdPartyNotices.txt +5042 -0
- package/dist/node_modules/playwright/cli.js +19 -0
- package/dist/node_modules/playwright/index.d.ts +17 -0
- package/dist/node_modules/playwright/index.js +17 -0
- package/dist/node_modules/playwright/index.mjs +18 -0
- package/dist/node_modules/playwright/jsx-runtime.js +42 -0
- package/dist/node_modules/playwright/jsx-runtime.mjs +21 -0
- package/dist/node_modules/playwright/lib/agents/agentParser.js +89 -0
- package/dist/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
- package/dist/node_modules/playwright/lib/agents/generateAgents.js +348 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +55 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
- package/dist/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +73 -0
- package/dist/node_modules/playwright/lib/cli/client/appIcon.png +0 -0
- package/dist/node_modules/playwright/lib/cli/client/devtoolsApp.js +246 -0
- package/dist/node_modules/playwright/lib/cli/client/help.json +89 -0
- package/dist/node_modules/playwright/lib/cli/client/program.js +364 -0
- package/dist/node_modules/playwright/lib/cli/client/registry.js +146 -0
- package/dist/node_modules/playwright/lib/cli/client/session.js +309 -0
- package/dist/node_modules/playwright/lib/cli/client/socketConnection.js +99 -0
- package/dist/node_modules/playwright/lib/cli/daemon/command.js +73 -0
- package/dist/node_modules/playwright/lib/cli/daemon/commands.js +859 -0
- package/dist/node_modules/playwright/lib/cli/daemon/daemon.js +151 -0
- package/dist/node_modules/playwright/lib/cli/daemon/helpGenerator.js +173 -0
- package/dist/node_modules/playwright/lib/cli/daemon/program.js +109 -0
- package/dist/node_modules/playwright/lib/common/config.js +281 -0
- package/dist/node_modules/playwright/lib/common/configLoader.js +344 -0
- package/dist/node_modules/playwright/lib/common/esmLoaderHost.js +104 -0
- package/dist/node_modules/playwright/lib/common/expectBundle.js +28 -0
- package/dist/node_modules/playwright/lib/common/expectBundleImpl.js +407 -0
- package/dist/node_modules/playwright/lib/common/fixtures.js +302 -0
- package/dist/node_modules/playwright/lib/common/globals.js +58 -0
- package/dist/node_modules/playwright/lib/common/ipc.js +60 -0
- package/dist/node_modules/playwright/lib/common/poolBuilder.js +85 -0
- package/dist/node_modules/playwright/lib/common/process.js +132 -0
- package/dist/node_modules/playwright/lib/common/suiteUtils.js +140 -0
- package/dist/node_modules/playwright/lib/common/test.js +330 -0
- package/dist/node_modules/playwright/lib/common/testLoader.js +101 -0
- package/dist/node_modules/playwright/lib/common/testType.js +298 -0
- package/dist/node_modules/playwright/lib/common/validators.js +68 -0
- package/dist/node_modules/playwright/lib/fsWatcher.js +67 -0
- package/dist/node_modules/playwright/lib/index.js +726 -0
- package/dist/node_modules/playwright/lib/internalsForTest.js +42 -0
- package/dist/node_modules/playwright/lib/isomorphic/events.js +77 -0
- package/dist/node_modules/playwright/lib/isomorphic/folders.js +30 -0
- package/dist/node_modules/playwright/lib/isomorphic/stringInternPool.js +69 -0
- package/dist/node_modules/playwright/lib/isomorphic/teleReceiver.js +539 -0
- package/dist/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +157 -0
- package/dist/node_modules/playwright/lib/isomorphic/testServerConnection.js +225 -0
- package/dist/node_modules/playwright/lib/isomorphic/testServerInterface.js +16 -0
- package/dist/node_modules/playwright/lib/isomorphic/testTree.js +329 -0
- package/dist/node_modules/playwright/lib/isomorphic/types.d.js +16 -0
- package/dist/node_modules/playwright/lib/loader/loaderMain.js +59 -0
- package/dist/node_modules/playwright/lib/matchers/expect.js +311 -0
- package/dist/node_modules/playwright/lib/matchers/matcherHint.js +44 -0
- package/dist/node_modules/playwright/lib/matchers/matchers.js +395 -0
- package/dist/node_modules/playwright/lib/matchers/toBeTruthy.js +75 -0
- package/dist/node_modules/playwright/lib/matchers/toEqual.js +100 -0
- package/dist/node_modules/playwright/lib/matchers/toHaveURL.js +101 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +159 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchSnapshot.js +342 -0
- package/dist/node_modules/playwright/lib/matchers/toMatchText.js +99 -0
- package/dist/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +332 -0
- package/dist/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +85 -0
- package/dist/node_modules/playwright/lib/mcp/browser/config.js +467 -0
- package/dist/node_modules/playwright/lib/mcp/browser/configIni.js +190 -0
- package/dist/node_modules/playwright/lib/mcp/browser/context.js +302 -0
- package/dist/node_modules/playwright/lib/mcp/browser/logFile.js +96 -0
- package/dist/node_modules/playwright/lib/mcp/browser/response.js +270 -0
- package/dist/node_modules/playwright/lib/mcp/browser/sessionLog.js +75 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tab.js +421 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/common.js +63 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/config.js +41 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/console.js +65 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/cookies.js +152 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/devtools.js +42 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +59 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +61 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/files.js +58 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/form.js +63 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/install.js +73 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +151 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/mouse.js +159 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/navigate.js +105 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/network.js +92 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/pdf.js +48 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/route.js +140 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/runCode.js +76 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +86 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +207 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/storage.js +67 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tabs.js +67 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tool.js +47 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/tracing.js +75 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/utils.js +88 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/verify.js +143 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/video.js +89 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/wait.js +63 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools/webstorage.js +223 -0
- package/dist/node_modules/playwright/lib/mcp/browser/tools.js +96 -0
- package/dist/node_modules/playwright/lib/mcp/browser/watchdog.js +44 -0
- package/dist/node_modules/playwright/lib/mcp/config.d.js +16 -0
- package/dist/node_modules/playwright/lib/mcp/extension/cdpRelay.js +354 -0
- package/dist/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +77 -0
- package/dist/node_modules/playwright/lib/mcp/extension/protocol.js +28 -0
- package/dist/node_modules/playwright/lib/mcp/index.js +61 -0
- package/dist/node_modules/playwright/lib/mcp/log.js +35 -0
- package/dist/node_modules/playwright/lib/mcp/program.js +76 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/exports.js +28 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/http.js +152 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +71 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/server.js +223 -0
- package/dist/node_modules/playwright/lib/mcp/sdk/tool.js +47 -0
- package/dist/node_modules/playwright/lib/mcp/test/browserBackend.js +98 -0
- package/dist/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/dist/node_modules/playwright/lib/mcp/test/plannerTools.js +145 -0
- package/dist/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/dist/node_modules/playwright/lib/mcp/test/streams.js +44 -0
- package/dist/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
- package/dist/node_modules/playwright/lib/mcp/test/testContext.js +285 -0
- package/dist/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/dist/node_modules/playwright/lib/mcp/test/testTools.js +108 -0
- package/dist/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +198 -0
- package/dist/node_modules/playwright/lib/plugins/index.js +28 -0
- package/dist/node_modules/playwright/lib/plugins/webServerPlugin.js +237 -0
- package/dist/node_modules/playwright/lib/program.js +425 -0
- package/dist/node_modules/playwright/lib/reporters/base.js +634 -0
- package/dist/node_modules/playwright/lib/reporters/blob.js +138 -0
- package/dist/node_modules/playwright/lib/reporters/dot.js +99 -0
- package/dist/node_modules/playwright/lib/reporters/empty.js +32 -0
- package/dist/node_modules/playwright/lib/reporters/github.js +128 -0
- package/dist/node_modules/playwright/lib/reporters/html.js +644 -0
- package/dist/node_modules/playwright/lib/reporters/internalReporter.js +138 -0
- package/dist/node_modules/playwright/lib/reporters/json.js +254 -0
- package/dist/node_modules/playwright/lib/reporters/junit.js +232 -0
- package/dist/node_modules/playwright/lib/reporters/line.js +131 -0
- package/dist/node_modules/playwright/lib/reporters/list.js +253 -0
- package/dist/node_modules/playwright/lib/reporters/listModeReporter.js +69 -0
- package/dist/node_modules/playwright/lib/reporters/markdown.js +144 -0
- package/dist/node_modules/playwright/lib/reporters/merge.js +579 -0
- package/dist/node_modules/playwright/lib/reporters/multiplexer.js +116 -0
- package/dist/node_modules/playwright/lib/reporters/reporterV2.js +102 -0
- package/dist/node_modules/playwright/lib/reporters/teleEmitter.js +319 -0
- package/dist/node_modules/playwright/lib/reporters/versions/blobV1.js +16 -0
- package/dist/node_modules/playwright/lib/runner/dispatcher.js +530 -0
- package/dist/node_modules/playwright/lib/runner/failureTracker.js +72 -0
- package/dist/node_modules/playwright/lib/runner/lastRun.js +77 -0
- package/dist/node_modules/playwright/lib/runner/loadUtils.js +334 -0
- package/dist/node_modules/playwright/lib/runner/loaderHost.js +89 -0
- package/dist/node_modules/playwright/lib/runner/processHost.js +180 -0
- package/dist/node_modules/playwright/lib/runner/projectUtils.js +241 -0
- package/dist/node_modules/playwright/lib/runner/rebase.js +189 -0
- package/dist/node_modules/playwright/lib/runner/reporters.js +143 -0
- package/dist/node_modules/playwright/lib/runner/sigIntWatcher.js +96 -0
- package/dist/node_modules/playwright/lib/runner/storage.js +91 -0
- package/dist/node_modules/playwright/lib/runner/taskRunner.js +127 -0
- package/dist/node_modules/playwright/lib/runner/tasks.js +410 -0
- package/dist/node_modules/playwright/lib/runner/testGroups.js +125 -0
- package/dist/node_modules/playwright/lib/runner/testRunner.js +398 -0
- package/dist/node_modules/playwright/lib/runner/testServer.js +269 -0
- package/dist/node_modules/playwright/lib/runner/uiModeReporter.js +30 -0
- package/dist/node_modules/playwright/lib/runner/vcs.js +72 -0
- package/dist/node_modules/playwright/lib/runner/watchMode.js +396 -0
- package/dist/node_modules/playwright/lib/runner/workerHost.js +104 -0
- package/dist/node_modules/playwright/lib/skill/SKILL.md +278 -0
- package/dist/node_modules/playwright/lib/skill/references/request-mocking.md +87 -0
- package/dist/node_modules/playwright/lib/skill/references/running-code.md +232 -0
- package/dist/node_modules/playwright/lib/skill/references/session-management.md +169 -0
- package/dist/node_modules/playwright/lib/skill/references/storage-state.md +275 -0
- package/dist/node_modules/playwright/lib/skill/references/test-generation.md +88 -0
- package/dist/node_modules/playwright/lib/skill/references/tracing.md +139 -0
- package/dist/node_modules/playwright/lib/skill/references/video-recording.md +43 -0
- package/dist/node_modules/playwright/lib/third_party/pirates.js +62 -0
- package/dist/node_modules/playwright/lib/third_party/tsconfig-loader.js +103 -0
- package/dist/node_modules/playwright/lib/transform/babelBundle.js +46 -0
- package/dist/node_modules/playwright/lib/transform/babelBundleImpl.js +461 -0
- package/dist/node_modules/playwright/lib/transform/compilationCache.js +274 -0
- package/dist/node_modules/playwright/lib/transform/esmLoader.js +103 -0
- package/dist/node_modules/playwright/lib/transform/md.js +221 -0
- package/dist/node_modules/playwright/lib/transform/portTransport.js +67 -0
- package/dist/node_modules/playwright/lib/transform/transform.js +303 -0
- package/dist/node_modules/playwright/lib/util.js +400 -0
- package/dist/node_modules/playwright/lib/utilsBundle.js +50 -0
- package/dist/node_modules/playwright/lib/utilsBundleImpl.js +103 -0
- package/dist/node_modules/playwright/lib/worker/fixtureRunner.js +262 -0
- package/dist/node_modules/playwright/lib/worker/testInfo.js +536 -0
- package/dist/node_modules/playwright/lib/worker/testTracing.js +345 -0
- package/dist/node_modules/playwright/lib/worker/timeoutManager.js +174 -0
- package/dist/node_modules/playwright/lib/worker/util.js +31 -0
- package/dist/node_modules/playwright/lib/worker/workerMain.js +532 -0
- package/dist/node_modules/playwright/node_modules/.bin/playwright-core +21 -0
- package/dist/node_modules/playwright/package.json +73 -0
- package/dist/node_modules/playwright/test.d.ts +18 -0
- package/dist/node_modules/playwright/test.js +24 -0
- package/dist/node_modules/playwright/test.mjs +34 -0
- package/dist/node_modules/playwright/types/test.d.ts +10326 -0
- package/dist/node_modules/playwright/types/testReporter.d.ts +822 -0
- package/dist/node_modules/playwright-core/LICENSE +202 -0
- package/dist/node_modules/playwright-core/NOTICE +5 -0
- package/dist/node_modules/playwright-core/README.md +3 -0
- package/dist/node_modules/playwright-core/ThirdPartyNotices.txt +4095 -0
- package/dist/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/dist/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/dist/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/dist/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/dist/node_modules/playwright-core/browsers.json +81 -0
- package/dist/node_modules/playwright-core/cli.js +18 -0
- package/dist/node_modules/playwright-core/index.d.ts +17 -0
- package/dist/node_modules/playwright-core/index.js +32 -0
- package/dist/node_modules/playwright-core/index.mjs +28 -0
- package/dist/node_modules/playwright-core/lib/androidServerImpl.js +65 -0
- package/dist/node_modules/playwright-core/lib/browserServerImpl.js +120 -0
- package/dist/node_modules/playwright-core/lib/cli/driver.js +97 -0
- package/dist/node_modules/playwright-core/lib/cli/program.js +589 -0
- package/dist/node_modules/playwright-core/lib/cli/programWithTestStub.js +74 -0
- package/dist/node_modules/playwright-core/lib/client/android.js +361 -0
- package/dist/node_modules/playwright-core/lib/client/api.js +137 -0
- package/dist/node_modules/playwright-core/lib/client/artifact.js +79 -0
- package/dist/node_modules/playwright-core/lib/client/browser.js +161 -0
- package/dist/node_modules/playwright-core/lib/client/browserContext.js +589 -0
- package/dist/node_modules/playwright-core/lib/client/browserType.js +195 -0
- package/dist/node_modules/playwright-core/lib/client/cdpSession.js +51 -0
- package/dist/node_modules/playwright-core/lib/client/channelOwner.js +194 -0
- package/dist/node_modules/playwright-core/lib/client/clientHelper.js +64 -0
- package/dist/node_modules/playwright-core/lib/client/clientInstrumentation.js +55 -0
- package/dist/node_modules/playwright-core/lib/client/clientStackTrace.js +69 -0
- package/dist/node_modules/playwright-core/lib/client/clock.js +68 -0
- package/dist/node_modules/playwright-core/lib/client/connection.js +318 -0
- package/dist/node_modules/playwright-core/lib/client/consoleMessage.js +61 -0
- package/dist/node_modules/playwright-core/lib/client/coverage.js +44 -0
- package/dist/node_modules/playwright-core/lib/client/dialog.js +56 -0
- package/dist/node_modules/playwright-core/lib/client/download.js +62 -0
- package/dist/node_modules/playwright-core/lib/client/electron.js +138 -0
- package/dist/node_modules/playwright-core/lib/client/elementHandle.js +284 -0
- package/dist/node_modules/playwright-core/lib/client/errors.js +77 -0
- package/dist/node_modules/playwright-core/lib/client/eventEmitter.js +314 -0
- package/dist/node_modules/playwright-core/lib/client/events.js +103 -0
- package/dist/node_modules/playwright-core/lib/client/fetch.js +368 -0
- package/dist/node_modules/playwright-core/lib/client/fileChooser.js +46 -0
- package/dist/node_modules/playwright-core/lib/client/fileUtils.js +34 -0
- package/dist/node_modules/playwright-core/lib/client/frame.js +409 -0
- package/dist/node_modules/playwright-core/lib/client/harRouter.js +99 -0
- package/dist/node_modules/playwright-core/lib/client/input.js +84 -0
- package/dist/node_modules/playwright-core/lib/client/jsHandle.js +109 -0
- package/dist/node_modules/playwright-core/lib/client/jsonPipe.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/localUtils.js +60 -0
- package/dist/node_modules/playwright-core/lib/client/locator.js +369 -0
- package/dist/node_modules/playwright-core/lib/client/network.js +747 -0
- package/dist/node_modules/playwright-core/lib/client/page.js +741 -0
- package/dist/node_modules/playwright-core/lib/client/pageAgent.js +64 -0
- package/dist/node_modules/playwright-core/lib/client/platform.js +77 -0
- package/dist/node_modules/playwright-core/lib/client/playwright.js +71 -0
- package/dist/node_modules/playwright-core/lib/client/selectors.js +55 -0
- package/dist/node_modules/playwright-core/lib/client/stream.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/timeoutSettings.js +79 -0
- package/dist/node_modules/playwright-core/lib/client/tracing.js +119 -0
- package/dist/node_modules/playwright-core/lib/client/types.js +28 -0
- package/dist/node_modules/playwright-core/lib/client/video.js +63 -0
- package/dist/node_modules/playwright-core/lib/client/waiter.js +142 -0
- package/dist/node_modules/playwright-core/lib/client/webError.js +39 -0
- package/dist/node_modules/playwright-core/lib/client/webSocket.js +93 -0
- package/dist/node_modules/playwright-core/lib/client/worker.js +85 -0
- package/dist/node_modules/playwright-core/lib/client/writableStream.js +39 -0
- package/dist/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/clockSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/injectedScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/storageScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/utilityScriptSource.js +28 -0
- package/dist/node_modules/playwright-core/lib/generated/webSocketMockSource.js +336 -0
- package/dist/node_modules/playwright-core/lib/inProcessFactory.js +60 -0
- package/dist/node_modules/playwright-core/lib/inprocess.js +3 -0
- package/dist/node_modules/playwright-core/lib/mcpBundle.js +84 -0
- package/dist/node_modules/playwright-core/lib/mcpBundleImpl/index.js +147 -0
- package/dist/node_modules/playwright-core/lib/outofprocess.js +76 -0
- package/dist/node_modules/playwright-core/lib/protocol/serializers.js +197 -0
- package/dist/node_modules/playwright-core/lib/protocol/validator.js +3017 -0
- package/dist/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +193 -0
- package/dist/node_modules/playwright-core/lib/remote/playwrightConnection.js +129 -0
- package/dist/node_modules/playwright-core/lib/remote/playwrightServer.js +334 -0
- package/dist/node_modules/playwright-core/lib/server/agent/actionRunner.js +341 -0
- package/dist/node_modules/playwright-core/lib/server/agent/actions.js +128 -0
- package/dist/node_modules/playwright-core/lib/server/agent/codegen.js +111 -0
- package/dist/node_modules/playwright-core/lib/server/agent/context.js +161 -0
- package/dist/node_modules/playwright-core/lib/server/agent/expectTools.js +156 -0
- package/dist/node_modules/playwright-core/lib/server/agent/pageAgent.js +204 -0
- package/dist/node_modules/playwright-core/lib/server/agent/performTools.js +262 -0
- package/dist/node_modules/playwright-core/lib/server/agent/tool.js +109 -0
- package/dist/node_modules/playwright-core/lib/server/android/android.js +465 -0
- package/dist/node_modules/playwright-core/lib/server/android/backendAdb.js +177 -0
- package/dist/node_modules/playwright-core/lib/server/artifact.js +127 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +549 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +164 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +213 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js +116 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +267 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +128 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiInput.js +146 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +410 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +102 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiPage.js +598 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +106 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +180 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/dist/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +261 -0
- package/dist/node_modules/playwright-core/lib/server/browser.js +143 -0
- package/dist/node_modules/playwright-core/lib/server/browserContext.js +712 -0
- package/dist/node_modules/playwright-core/lib/server/browserType.js +332 -0
- package/dist/node_modules/playwright-core/lib/server/callLog.js +82 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/chromium.js +403 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +104 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crBrowser.js +523 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crConnection.js +197 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crCoverage.js +235 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crDevTools.js +111 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +131 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +146 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crInput.js +187 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +707 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crPage.js +1004 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crPdf.js +121 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +145 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +136 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/dist/node_modules/playwright-core/lib/server/chromium/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/clock.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/csharp.js +327 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/java.js +274 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/javascript.js +247 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/jsonl.js +52 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/language.js +132 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/languages.js +68 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/python.js +279 -0
- package/dist/node_modules/playwright-core/lib/server/codegen/types.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/console.js +61 -0
- package/dist/node_modules/playwright-core/lib/server/cookieStore.js +206 -0
- package/dist/node_modules/playwright-core/lib/server/debugController.js +191 -0
- package/dist/node_modules/playwright-core/lib/server/debugger.js +119 -0
- package/dist/node_modules/playwright-core/lib/server/deviceDescriptors.js +39 -0
- package/dist/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +1779 -0
- package/dist/node_modules/playwright-core/lib/server/devtoolsController.js +365 -0
- package/dist/node_modules/playwright-core/lib/server/dialog.js +116 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +383 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +71 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +364 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +90 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +211 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/pageAgentDispatcher.js +106 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +410 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +164 -0
- package/dist/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/dist/node_modules/playwright-core/lib/server/dom.js +815 -0
- package/dist/node_modules/playwright-core/lib/server/download.js +70 -0
- package/dist/node_modules/playwright-core/lib/server/electron/electron.js +272 -0
- package/dist/node_modules/playwright-core/lib/server/electron/loader.js +30 -0
- package/dist/node_modules/playwright-core/lib/server/errors.js +69 -0
- package/dist/node_modules/playwright-core/lib/server/fetch.js +621 -0
- package/dist/node_modules/playwright-core/lib/server/fileChooser.js +43 -0
- package/dist/node_modules/playwright-core/lib/server/fileUploadUtils.js +84 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +415 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffConnection.js +142 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +150 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffInput.js +159 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +256 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/ffPage.js +495 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/firefox.js +114 -0
- package/dist/node_modules/playwright-core/lib/server/firefox/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/formData.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/frameSelectors.js +160 -0
- package/dist/node_modules/playwright-core/lib/server/frames.js +1476 -0
- package/dist/node_modules/playwright-core/lib/server/har/harRecorder.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/har/harTracer.js +607 -0
- package/dist/node_modules/playwright-core/lib/server/harBackend.js +157 -0
- package/dist/node_modules/playwright-core/lib/server/helper.js +96 -0
- package/dist/node_modules/playwright-core/lib/server/index.js +56 -0
- package/dist/node_modules/playwright-core/lib/server/input.js +277 -0
- package/dist/node_modules/playwright-core/lib/server/instrumentation.js +72 -0
- package/dist/node_modules/playwright-core/lib/server/javascript.js +291 -0
- package/dist/node_modules/playwright-core/lib/server/launchApp.js +128 -0
- package/dist/node_modules/playwright-core/lib/server/localUtils.js +214 -0
- package/dist/node_modules/playwright-core/lib/server/macEditingCommands.js +143 -0
- package/dist/node_modules/playwright-core/lib/server/network.js +667 -0
- package/dist/node_modules/playwright-core/lib/server/page.js +839 -0
- package/dist/node_modules/playwright-core/lib/server/pipeTransport.js +89 -0
- package/dist/node_modules/playwright-core/lib/server/playwright.js +69 -0
- package/dist/node_modules/playwright-core/lib/server/progress.js +136 -0
- package/dist/node_modules/playwright-core/lib/server/protocolError.js +52 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/chat.js +161 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderApp.js +366 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +138 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +157 -0
- package/dist/node_modules/playwright-core/lib/server/recorder/throttledFile.js +57 -0
- package/dist/node_modules/playwright-core/lib/server/recorder.js +527 -0
- package/dist/node_modules/playwright-core/lib/server/registry/browserFetcher.js +177 -0
- package/dist/node_modules/playwright-core/lib/server/registry/dependencies.js +371 -0
- package/dist/node_modules/playwright-core/lib/server/registry/index.js +1391 -0
- package/dist/node_modules/playwright-core/lib/server/registry/nativeDeps.js +1281 -0
- package/dist/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +127 -0
- package/dist/node_modules/playwright-core/lib/server/screencast.js +204 -0
- package/dist/node_modules/playwright-core/lib/server/screenshotter.js +333 -0
- package/dist/node_modules/playwright-core/lib/server/selectors.js +112 -0
- package/dist/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/dist/node_modules/playwright-core/lib/server/socksInterceptor.js +95 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +147 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +561 -0
- package/dist/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +604 -0
- package/dist/node_modules/playwright-core/lib/server/trace/viewer/traceParser.js +72 -0
- package/dist/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +245 -0
- package/dist/node_modules/playwright-core/lib/server/transport.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/types.js +28 -0
- package/dist/node_modules/playwright-core/lib/server/usKeyboardLayout.js +145 -0
- package/dist/node_modules/playwright-core/lib/server/utils/ascii.js +44 -0
- package/dist/node_modules/playwright-core/lib/server/utils/comparators.js +139 -0
- package/dist/node_modules/playwright-core/lib/server/utils/crypto.js +216 -0
- package/dist/node_modules/playwright-core/lib/server/utils/debug.js +42 -0
- package/dist/node_modules/playwright-core/lib/server/utils/debugLogger.js +122 -0
- package/dist/node_modules/playwright-core/lib/server/utils/env.js +73 -0
- package/dist/node_modules/playwright-core/lib/server/utils/eventsHelper.js +39 -0
- package/dist/node_modules/playwright-core/lib/server/utils/expectUtils.js +123 -0
- package/dist/node_modules/playwright-core/lib/server/utils/fileUtils.js +191 -0
- package/dist/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +207 -0
- package/dist/node_modules/playwright-core/lib/server/utils/hostPlatform.js +138 -0
- package/dist/node_modules/playwright-core/lib/server/utils/httpServer.js +205 -0
- package/dist/node_modules/playwright-core/lib/server/utils/imageUtils.js +141 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +109 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/dist/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +102 -0
- package/dist/node_modules/playwright-core/lib/server/utils/linuxUtils.js +71 -0
- package/dist/node_modules/playwright-core/lib/server/utils/network.js +242 -0
- package/dist/node_modules/playwright-core/lib/server/utils/nodePlatform.js +154 -0
- package/dist/node_modules/playwright-core/lib/server/utils/pipeTransport.js +84 -0
- package/dist/node_modules/playwright-core/lib/server/utils/processLauncher.js +242 -0
- package/dist/node_modules/playwright-core/lib/server/utils/profiler.js +65 -0
- package/dist/node_modules/playwright-core/lib/server/utils/socksProxy.js +511 -0
- package/dist/node_modules/playwright-core/lib/server/utils/spawnAsync.js +41 -0
- package/dist/node_modules/playwright-core/lib/server/utils/task.js +51 -0
- package/dist/node_modules/playwright-core/lib/server/utils/userAgent.js +98 -0
- package/dist/node_modules/playwright-core/lib/server/utils/wsServer.js +121 -0
- package/dist/node_modules/playwright-core/lib/server/utils/zipFile.js +74 -0
- package/dist/node_modules/playwright-core/lib/server/utils/zones.js +57 -0
- package/dist/node_modules/playwright-core/lib/server/videoRecorder.js +133 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/protocol.d.js +16 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/webkit.js +108 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +331 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkConnection.js +144 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +154 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkInput.js +181 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +197 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkPage.js +1163 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/dist/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +106 -0
- package/dist/node_modules/playwright-core/lib/third_party/pixelmatch.js +255 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +455 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/assert.js +31 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/colors.js +72 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +245 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/headers.js +53 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +176 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/lruCache.js +51 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +114 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +459 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +80 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +338 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +43 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +386 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +54 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +158 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +204 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/time.js +49 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +502 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +131 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js +365 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +400 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +58 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/types.js +16 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +243 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +262 -0
- package/dist/node_modules/playwright-core/lib/utils/isomorphic/yaml.js +84 -0
- package/dist/node_modules/playwright-core/lib/utils.js +111 -0
- package/dist/node_modules/playwright-core/lib/utilsBundle.js +112 -0
- package/dist/node_modules/playwright-core/lib/utilsBundleImpl/index.js +220 -0
- package/dist/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +1066 -0
- package/dist/node_modules/playwright-core/lib/vite/devtools/assets/index-BlUdtOgD.js +50 -0
- package/dist/node_modules/playwright-core/lib/vite/devtools/assets/index-CcsbAkl3.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/devtools/index.html +28 -0
- package/dist/node_modules/playwright-core/lib/vite/htmlReport/index.html +84 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DadYNm1I.js +32 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/index-BSjZa4pk.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/assets/index-BhTWtUlo.js +193 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/dist/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-DgOX2t83.js +32 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-Dlnhdtv5.js +266 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.Cqh7ej8a.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.BVu7tZDe.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.DQVmDDrI.js +2 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/index.html +43 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +21 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +5 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.D_PBkkZn.js +5 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +17 -0
- package/dist/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/dist/node_modules/playwright-core/lib/zipBundle.js +34 -0
- package/dist/node_modules/playwright-core/lib/zipBundleImpl.js +5 -0
- package/dist/node_modules/playwright-core/package.json +43 -0
- package/dist/node_modules/playwright-core/types/protocol.d.ts +24365 -0
- package/dist/node_modules/playwright-core/types/structs.d.ts +45 -0
- package/dist/node_modules/playwright-core/types/types.d.ts +23332 -0
- package/dist/playwright-cli.js +7 -1
- package/dist/stably-plugin-cli/skills/ai-to-programmatic-migration/SKILL.md +95 -0
- package/dist/stably-plugin-cli/skills/browser-interaction-guide/SKILL.md +67 -1
- package/dist/stably-plugin-cli/skills/bulk-test-handling/SKILL.md +4 -0
- package/dist/stably-plugin-cli/skills/debugging-test-failures/SKILL.md +73 -8
- package/dist/stably-plugin-cli/skills/playwright-cli/SKILL.md +32 -0
- package/dist/stably-plugin-cli/skills/stably-cli/SKILL.md +34 -16
- package/package.json +2 -2
|
@@ -0,0 +1,302 @@
|
|
|
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 context_exports = {};
|
|
30
|
+
__export(context_exports, {
|
|
31
|
+
Context: () => Context
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(context_exports);
|
|
34
|
+
var import_os = __toESM(require("os"));
|
|
35
|
+
var import_utilsBundle = require("playwright-core/lib/utilsBundle");
|
|
36
|
+
var import_utils = require("playwright-core/lib/utils");
|
|
37
|
+
var import_playwright_core = require("playwright-core");
|
|
38
|
+
var import_url = require("url");
|
|
39
|
+
var import_log = require("../log");
|
|
40
|
+
var import_tab = require("./tab");
|
|
41
|
+
var import_config = require("./config");
|
|
42
|
+
const testDebug = (0, import_utilsBundle.debug)("pw:mcp:test");
|
|
43
|
+
class Context {
|
|
44
|
+
constructor(options) {
|
|
45
|
+
this._tabs = [];
|
|
46
|
+
this._routes = [];
|
|
47
|
+
this._abortController = new AbortController();
|
|
48
|
+
this.config = options.config;
|
|
49
|
+
this.sessionLog = options.sessionLog;
|
|
50
|
+
this.options = options;
|
|
51
|
+
this._browserContextFactory = options.browserContextFactory;
|
|
52
|
+
this._clientInfo = options.clientInfo;
|
|
53
|
+
testDebug("create context");
|
|
54
|
+
Context._allContexts.add(this);
|
|
55
|
+
}
|
|
56
|
+
static {
|
|
57
|
+
this._allContexts = /* @__PURE__ */ new Set();
|
|
58
|
+
}
|
|
59
|
+
static async disposeAll() {
|
|
60
|
+
await Promise.all([...Context._allContexts].map((context) => context.dispose()));
|
|
61
|
+
}
|
|
62
|
+
tabs() {
|
|
63
|
+
return this._tabs;
|
|
64
|
+
}
|
|
65
|
+
currentTab() {
|
|
66
|
+
return this._currentTab;
|
|
67
|
+
}
|
|
68
|
+
currentTabOrDie() {
|
|
69
|
+
if (!this._currentTab)
|
|
70
|
+
throw new Error("No open pages available.");
|
|
71
|
+
return this._currentTab;
|
|
72
|
+
}
|
|
73
|
+
async newTab() {
|
|
74
|
+
const { browserContext } = await this._ensureBrowserContext();
|
|
75
|
+
const page = await browserContext.newPage();
|
|
76
|
+
this._currentTab = this._tabs.find((t) => t.page === page);
|
|
77
|
+
return this._currentTab;
|
|
78
|
+
}
|
|
79
|
+
async selectTab(index) {
|
|
80
|
+
const tab = this._tabs[index];
|
|
81
|
+
if (!tab)
|
|
82
|
+
throw new Error(`Tab ${index} not found`);
|
|
83
|
+
await tab.page.bringToFront();
|
|
84
|
+
this._currentTab = tab;
|
|
85
|
+
return tab;
|
|
86
|
+
}
|
|
87
|
+
async ensureTab() {
|
|
88
|
+
const { browserContext } = await this._ensureBrowserContext();
|
|
89
|
+
if (!this._currentTab)
|
|
90
|
+
await browserContext.newPage();
|
|
91
|
+
return this._currentTab;
|
|
92
|
+
}
|
|
93
|
+
async closeTab(index) {
|
|
94
|
+
const tab = index === void 0 ? this._currentTab : this._tabs[index];
|
|
95
|
+
if (!tab)
|
|
96
|
+
throw new Error(`Tab ${index} not found`);
|
|
97
|
+
const url = tab.page.url();
|
|
98
|
+
await tab.page.close();
|
|
99
|
+
return url;
|
|
100
|
+
}
|
|
101
|
+
async workspaceFile(fileName, perCallWorkspaceDir) {
|
|
102
|
+
return await (0, import_config.workspaceFile)(this.config, this._clientInfo, fileName, perCallWorkspaceDir);
|
|
103
|
+
}
|
|
104
|
+
async outputFile(template, options) {
|
|
105
|
+
const baseName = template.suggestedFilename || `${template.prefix}-${(template.date ?? /* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}${template.ext ? "." + template.ext : ""}`;
|
|
106
|
+
return await (0, import_config.outputFile)(this.config, this._clientInfo, baseName, options);
|
|
107
|
+
}
|
|
108
|
+
async startVideoRecording(params) {
|
|
109
|
+
if (this._video)
|
|
110
|
+
throw new Error("Video recording has already been started.");
|
|
111
|
+
const listener = (page) => {
|
|
112
|
+
this._video?.allVideos.add(page.video());
|
|
113
|
+
page.video().start(params).catch(() => {
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
this._video = { allVideos: /* @__PURE__ */ new Set(), listener };
|
|
117
|
+
const browserContext = await this.ensureBrowserContext();
|
|
118
|
+
browserContext.pages().forEach(listener);
|
|
119
|
+
browserContext.on("page", listener);
|
|
120
|
+
}
|
|
121
|
+
async stopVideoRecording() {
|
|
122
|
+
if (!this._video)
|
|
123
|
+
throw new Error("Video recording has not been started.");
|
|
124
|
+
const video = this._video;
|
|
125
|
+
if (this._browserContextPromise) {
|
|
126
|
+
const { browserContext } = await this._browserContextPromise;
|
|
127
|
+
browserContext.off("page", video.listener);
|
|
128
|
+
for (const page of browserContext.pages())
|
|
129
|
+
await page.video().stop().catch(() => {
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
this._video = void 0;
|
|
133
|
+
return video.allVideos;
|
|
134
|
+
}
|
|
135
|
+
_onPageCreated(page) {
|
|
136
|
+
const tab = new import_tab.Tab(this, page, (tab2) => this._onPageClosed(tab2));
|
|
137
|
+
this._tabs.push(tab);
|
|
138
|
+
if (!this._currentTab)
|
|
139
|
+
this._currentTab = tab;
|
|
140
|
+
}
|
|
141
|
+
_onPageClosed(tab) {
|
|
142
|
+
const index = this._tabs.indexOf(tab);
|
|
143
|
+
if (index === -1)
|
|
144
|
+
return;
|
|
145
|
+
this._tabs.splice(index, 1);
|
|
146
|
+
if (this._currentTab === tab)
|
|
147
|
+
this._currentTab = this._tabs[Math.min(index, this._tabs.length - 1)];
|
|
148
|
+
if (!this._tabs.length)
|
|
149
|
+
void this.closeBrowserContext();
|
|
150
|
+
}
|
|
151
|
+
async closeBrowserContext() {
|
|
152
|
+
if (!this._closeBrowserContextPromise)
|
|
153
|
+
this._closeBrowserContextPromise = this._closeBrowserContextImpl().catch(import_log.logUnhandledError);
|
|
154
|
+
await this._closeBrowserContextPromise;
|
|
155
|
+
this._closeBrowserContextPromise = void 0;
|
|
156
|
+
}
|
|
157
|
+
routes() {
|
|
158
|
+
return this._routes;
|
|
159
|
+
}
|
|
160
|
+
async addRoute(entry) {
|
|
161
|
+
const { browserContext } = await this._ensureBrowserContext();
|
|
162
|
+
await browserContext.route(entry.pattern, entry.handler);
|
|
163
|
+
this._routes.push(entry);
|
|
164
|
+
}
|
|
165
|
+
async removeRoute(pattern) {
|
|
166
|
+
if (!this._browserContextPromise)
|
|
167
|
+
return 0;
|
|
168
|
+
const { browserContext } = await this._browserContextPromise;
|
|
169
|
+
let removed = 0;
|
|
170
|
+
if (pattern) {
|
|
171
|
+
const toRemove = this._routes.filter((r) => r.pattern === pattern);
|
|
172
|
+
for (const route of toRemove)
|
|
173
|
+
await browserContext.unroute(route.pattern, route.handler);
|
|
174
|
+
this._routes = this._routes.filter((r) => r.pattern !== pattern);
|
|
175
|
+
removed = toRemove.length;
|
|
176
|
+
} else {
|
|
177
|
+
for (const route of this._routes)
|
|
178
|
+
await browserContext.unroute(route.pattern, route.handler);
|
|
179
|
+
removed = this._routes.length;
|
|
180
|
+
this._routes = [];
|
|
181
|
+
}
|
|
182
|
+
return removed;
|
|
183
|
+
}
|
|
184
|
+
isRunningTool() {
|
|
185
|
+
return this._runningToolName !== void 0;
|
|
186
|
+
}
|
|
187
|
+
setRunningTool(name) {
|
|
188
|
+
this._runningToolName = name;
|
|
189
|
+
}
|
|
190
|
+
async _closeBrowserContextImpl() {
|
|
191
|
+
if (!this._browserContextPromise)
|
|
192
|
+
return;
|
|
193
|
+
testDebug("close context");
|
|
194
|
+
const promise = this._browserContextPromise;
|
|
195
|
+
this._browserContextPromise = void 0;
|
|
196
|
+
await promise.then(async ({ browserContext, close }) => {
|
|
197
|
+
if (this.config.saveTrace)
|
|
198
|
+
await browserContext.tracing.stop();
|
|
199
|
+
await close();
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
async dispose() {
|
|
203
|
+
this._abortController.abort("MCP context disposed");
|
|
204
|
+
await this.closeBrowserContext();
|
|
205
|
+
Context._allContexts.delete(this);
|
|
206
|
+
}
|
|
207
|
+
async _setupRequestInterception(context) {
|
|
208
|
+
if (this.config.network?.allowedOrigins?.length) {
|
|
209
|
+
await context.route("**", (route) => route.abort("blockedbyclient"));
|
|
210
|
+
for (const origin of this.config.network.allowedOrigins)
|
|
211
|
+
await context.route(originOrHostGlob(origin), (route) => route.continue());
|
|
212
|
+
}
|
|
213
|
+
if (this.config.network?.blockedOrigins?.length) {
|
|
214
|
+
for (const origin of this.config.network.blockedOrigins)
|
|
215
|
+
await context.route(originOrHostGlob(origin), (route) => route.abort("blockedbyclient"));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async ensureBrowserContext() {
|
|
219
|
+
const { browserContext } = await this._ensureBrowserContext();
|
|
220
|
+
return browserContext;
|
|
221
|
+
}
|
|
222
|
+
_ensureBrowserContext() {
|
|
223
|
+
if (this._browserContextPromise)
|
|
224
|
+
return this._browserContextPromise;
|
|
225
|
+
this._browserContextPromise = this._setupBrowserContext();
|
|
226
|
+
this._browserContextPromise.catch(() => {
|
|
227
|
+
this._browserContextPromise = void 0;
|
|
228
|
+
});
|
|
229
|
+
return this._browserContextPromise;
|
|
230
|
+
}
|
|
231
|
+
async _setupBrowserContext() {
|
|
232
|
+
if (this._closeBrowserContextPromise)
|
|
233
|
+
throw new Error("Another browser context is being closed.");
|
|
234
|
+
if (this.config.testIdAttribute)
|
|
235
|
+
import_playwright_core.selectors.setTestIdAttribute(this.config.testIdAttribute);
|
|
236
|
+
const result = await this._browserContextFactory.createContext(this._clientInfo, this._abortController.signal, { toolName: this._runningToolName });
|
|
237
|
+
const { browserContext } = result;
|
|
238
|
+
if (!this.config.allowUnrestrictedFileAccess) {
|
|
239
|
+
browserContext._setAllowedProtocols(["http:", "https:", "about:", "data:"]);
|
|
240
|
+
browserContext._setAllowedDirectories(allRootPaths(this._clientInfo));
|
|
241
|
+
}
|
|
242
|
+
await this._setupRequestInterception(browserContext);
|
|
243
|
+
for (const page of browserContext.pages())
|
|
244
|
+
this._onPageCreated(page);
|
|
245
|
+
browserContext.on("page", (page) => this._onPageCreated(page));
|
|
246
|
+
if (this.config.saveTrace) {
|
|
247
|
+
await browserContext.tracing.start({
|
|
248
|
+
name: "trace-" + Date.now(),
|
|
249
|
+
screenshots: true,
|
|
250
|
+
snapshots: true,
|
|
251
|
+
_live: true
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return result;
|
|
255
|
+
}
|
|
256
|
+
lookupSecret(secretName) {
|
|
257
|
+
if (!this.config.secrets?.[secretName])
|
|
258
|
+
return { value: secretName, code: (0, import_utils.escapeWithQuotes)(secretName, "'") };
|
|
259
|
+
return {
|
|
260
|
+
value: this.config.secrets[secretName],
|
|
261
|
+
code: `process.env['${secretName}']`
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
firstRootPath() {
|
|
265
|
+
return allRootPaths(this._clientInfo)[0];
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function allRootPaths(clientInfo) {
|
|
269
|
+
const paths = [];
|
|
270
|
+
for (const root of clientInfo.roots) {
|
|
271
|
+
const url = new URL(root.uri);
|
|
272
|
+
let rootPath;
|
|
273
|
+
try {
|
|
274
|
+
rootPath = (0, import_url.fileURLToPath)(url);
|
|
275
|
+
} catch (e) {
|
|
276
|
+
if (e.code === "ERR_INVALID_FILE_URL_PATH" && import_os.default.platform() === "win32")
|
|
277
|
+
rootPath = decodeURIComponent(url.pathname);
|
|
278
|
+
}
|
|
279
|
+
if (!rootPath)
|
|
280
|
+
continue;
|
|
281
|
+
paths.push(rootPath);
|
|
282
|
+
}
|
|
283
|
+
if (paths.length === 0)
|
|
284
|
+
paths.push(process.cwd());
|
|
285
|
+
return paths;
|
|
286
|
+
}
|
|
287
|
+
function originOrHostGlob(originOrHost) {
|
|
288
|
+
const wildcardPortMatch = originOrHost.match(/^(https?:\/\/[^/:]+):\*$/);
|
|
289
|
+
if (wildcardPortMatch)
|
|
290
|
+
return `${wildcardPortMatch[1]}:*/**`;
|
|
291
|
+
try {
|
|
292
|
+
const url = new URL(originOrHost);
|
|
293
|
+
if (url.origin !== "null")
|
|
294
|
+
return `${url.origin}/**`;
|
|
295
|
+
} catch {
|
|
296
|
+
}
|
|
297
|
+
return `*://${originOrHost}/**`;
|
|
298
|
+
}
|
|
299
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
300
|
+
0 && (module.exports = {
|
|
301
|
+
Context
|
|
302
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
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 logFile_exports = {};
|
|
30
|
+
__export(logFile_exports, {
|
|
31
|
+
LogFile: () => LogFile
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(logFile_exports);
|
|
34
|
+
var import_fs = __toESM(require("fs"));
|
|
35
|
+
var import_path = __toESM(require("path"));
|
|
36
|
+
var import_log = require("../log");
|
|
37
|
+
class LogFile {
|
|
38
|
+
constructor(context, startTime, filePrefix, title) {
|
|
39
|
+
this._stopped = false;
|
|
40
|
+
this._line = 0;
|
|
41
|
+
this._entries = 0;
|
|
42
|
+
this._lastLine = 0;
|
|
43
|
+
this._lastEntries = 0;
|
|
44
|
+
this._writeChain = Promise.resolve();
|
|
45
|
+
this._context = context;
|
|
46
|
+
this._startTime = startTime;
|
|
47
|
+
this._filePrefix = filePrefix;
|
|
48
|
+
this._title = title;
|
|
49
|
+
}
|
|
50
|
+
appendLine(wallTime, text) {
|
|
51
|
+
this._writeChain = this._writeChain.then(() => this._write(wallTime, text)).catch(import_log.logUnhandledError);
|
|
52
|
+
}
|
|
53
|
+
stop() {
|
|
54
|
+
this._stopped = true;
|
|
55
|
+
}
|
|
56
|
+
async take(relativeTo) {
|
|
57
|
+
const logChunk = await this._take();
|
|
58
|
+
if (!logChunk)
|
|
59
|
+
return void 0;
|
|
60
|
+
const logFilePath = relativeTo ? import_path.default.relative(relativeTo, logChunk.file) : logChunk.file;
|
|
61
|
+
const lineRange = logChunk.fromLine === logChunk.toLine ? `#L${logChunk.fromLine}` : `#L${logChunk.fromLine}-L${logChunk.toLine}`;
|
|
62
|
+
return `${logFilePath}${lineRange}`;
|
|
63
|
+
}
|
|
64
|
+
async _take() {
|
|
65
|
+
await this._writeChain;
|
|
66
|
+
if (!this._file || this._entries === this._lastEntries)
|
|
67
|
+
return void 0;
|
|
68
|
+
const chunk = {
|
|
69
|
+
type: this._title.toLowerCase(),
|
|
70
|
+
file: this._file,
|
|
71
|
+
fromLine: this._lastLine + 1,
|
|
72
|
+
toLine: this._line,
|
|
73
|
+
entryCount: this._entries - this._lastEntries
|
|
74
|
+
};
|
|
75
|
+
this._lastLine = this._line;
|
|
76
|
+
this._lastEntries = this._entries;
|
|
77
|
+
return chunk;
|
|
78
|
+
}
|
|
79
|
+
async _write(wallTime, text) {
|
|
80
|
+
if (this._stopped)
|
|
81
|
+
return;
|
|
82
|
+
this._file ??= await this._context.outputFile({ prefix: this._filePrefix, ext: "log", date: new Date(this._startTime) }, { origin: "code" });
|
|
83
|
+
const relativeTime = Math.round(wallTime - this._startTime);
|
|
84
|
+
const renderedText = await text();
|
|
85
|
+
const logLine = `[${String(relativeTime).padStart(8, " ")}ms] ${renderedText}
|
|
86
|
+
`;
|
|
87
|
+
await import_fs.default.promises.appendFile(this._file, logLine);
|
|
88
|
+
const lineCount = logLine.split("\n").length - 1;
|
|
89
|
+
this._line += lineCount;
|
|
90
|
+
this._entries++;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
+
0 && (module.exports = {
|
|
95
|
+
LogFile
|
|
96
|
+
});
|
|
@@ -0,0 +1,270 @@
|
|
|
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 response_exports = {};
|
|
30
|
+
__export(response_exports, {
|
|
31
|
+
Response: () => Response,
|
|
32
|
+
parseResponse: () => parseResponse,
|
|
33
|
+
renderTabMarkdown: () => renderTabMarkdown,
|
|
34
|
+
renderTabsMarkdown: () => renderTabsMarkdown,
|
|
35
|
+
requestDebug: () => requestDebug
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(response_exports);
|
|
38
|
+
var import_fs = __toESM(require("fs"));
|
|
39
|
+
var import_path = __toESM(require("path"));
|
|
40
|
+
var import_utilsBundle = require("playwright-core/lib/utilsBundle");
|
|
41
|
+
var import_tab = require("./tab");
|
|
42
|
+
var import_screenshot = require("./tools/screenshot");
|
|
43
|
+
const requestDebug = (0, import_utilsBundle.debug)("pw:mcp:request");
|
|
44
|
+
class Response {
|
|
45
|
+
constructor(context, toolName, toolArgs, relativeTo) {
|
|
46
|
+
this._results = [];
|
|
47
|
+
this._errors = [];
|
|
48
|
+
this._code = [];
|
|
49
|
+
this._includeSnapshot = "none";
|
|
50
|
+
this._imageResults = [];
|
|
51
|
+
this._context = context;
|
|
52
|
+
this.toolName = toolName;
|
|
53
|
+
this.toolArgs = toolArgs;
|
|
54
|
+
this._clientWorkspace = relativeTo ?? context.firstRootPath();
|
|
55
|
+
}
|
|
56
|
+
_computRelativeTo(fileName) {
|
|
57
|
+
if (this._clientWorkspace)
|
|
58
|
+
return import_path.default.relative(this._clientWorkspace, fileName);
|
|
59
|
+
return fileName;
|
|
60
|
+
}
|
|
61
|
+
async resolveClientFile(template, title) {
|
|
62
|
+
let fileName;
|
|
63
|
+
if (template.suggestedFilename)
|
|
64
|
+
fileName = await this._context.workspaceFile(template.suggestedFilename, this._clientWorkspace);
|
|
65
|
+
else
|
|
66
|
+
fileName = await this._context.outputFile(template, { origin: "llm" });
|
|
67
|
+
const relativeName = this._computRelativeTo(fileName);
|
|
68
|
+
const printableLink = `- [${title}](${relativeName})`;
|
|
69
|
+
return { fileName, relativeName, printableLink };
|
|
70
|
+
}
|
|
71
|
+
addTextResult(text) {
|
|
72
|
+
this._results.push(text);
|
|
73
|
+
}
|
|
74
|
+
async addResult(title, data, file) {
|
|
75
|
+
if (this._context.config.outputMode === "file" || file.suggestedFilename || typeof data !== "string") {
|
|
76
|
+
const resolvedFile = await this.resolveClientFile(file, title);
|
|
77
|
+
await this.addFileResult(resolvedFile, data);
|
|
78
|
+
} else {
|
|
79
|
+
this.addTextResult(data);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async addFileResult(resolvedFile, data) {
|
|
83
|
+
if (typeof data === "string")
|
|
84
|
+
await import_fs.default.promises.writeFile(resolvedFile.fileName, data, "utf-8");
|
|
85
|
+
else if (data)
|
|
86
|
+
await import_fs.default.promises.writeFile(resolvedFile.fileName, data);
|
|
87
|
+
this.addTextResult(resolvedFile.printableLink);
|
|
88
|
+
}
|
|
89
|
+
addFileLink(title, fileName) {
|
|
90
|
+
const relativeName = this._computRelativeTo(fileName);
|
|
91
|
+
this.addTextResult(`- [${title}](${relativeName})`);
|
|
92
|
+
}
|
|
93
|
+
async registerImageResult(data, imageType) {
|
|
94
|
+
this._imageResults.push({ data, imageType });
|
|
95
|
+
}
|
|
96
|
+
addError(error) {
|
|
97
|
+
this._errors.push(error);
|
|
98
|
+
}
|
|
99
|
+
addCode(code) {
|
|
100
|
+
this._code.push(code);
|
|
101
|
+
}
|
|
102
|
+
setIncludeSnapshot() {
|
|
103
|
+
this._includeSnapshot = this._context.config.snapshot.mode;
|
|
104
|
+
}
|
|
105
|
+
setIncludeFullSnapshot(includeSnapshotFileName) {
|
|
106
|
+
this._includeSnapshot = "full";
|
|
107
|
+
this._includeSnapshotFileName = includeSnapshotFileName;
|
|
108
|
+
}
|
|
109
|
+
async serialize() {
|
|
110
|
+
const redactText = (text2) => {
|
|
111
|
+
for (const [secretName, secretValue] of Object.entries(this._context.config.secrets ?? {}))
|
|
112
|
+
text2 = text2.replaceAll(secretValue, `<secret>${secretName}</secret>`);
|
|
113
|
+
return text2;
|
|
114
|
+
};
|
|
115
|
+
const sections = await this._build();
|
|
116
|
+
const text = [];
|
|
117
|
+
for (const section of sections) {
|
|
118
|
+
if (!section.content.length)
|
|
119
|
+
continue;
|
|
120
|
+
text.push(`### ${section.title}`);
|
|
121
|
+
if (section.codeframe)
|
|
122
|
+
text.push(`\`\`\`${section.codeframe}`);
|
|
123
|
+
text.push(...section.content);
|
|
124
|
+
if (section.codeframe)
|
|
125
|
+
text.push("```");
|
|
126
|
+
}
|
|
127
|
+
const content = [
|
|
128
|
+
{
|
|
129
|
+
type: "text",
|
|
130
|
+
text: redactText(text.join("\n"))
|
|
131
|
+
}
|
|
132
|
+
];
|
|
133
|
+
if (this._context.config.imageResponses !== "omit") {
|
|
134
|
+
for (const imageResult of this._imageResults) {
|
|
135
|
+
const scaledData = (0, import_screenshot.scaleImageToFitMessage)(imageResult.data, imageResult.imageType);
|
|
136
|
+
content.push({ type: "image", data: scaledData.toString("base64"), mimeType: imageResult.imageType === "png" ? "image/png" : "image/jpeg" });
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return {
|
|
140
|
+
content,
|
|
141
|
+
...sections.some((section) => section.isError) ? { isError: true } : {}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
async _build() {
|
|
145
|
+
const sections = [];
|
|
146
|
+
const addSection = (title, content, codeframe) => {
|
|
147
|
+
const section = { title, content, isError: title === "Error", codeframe };
|
|
148
|
+
sections.push(section);
|
|
149
|
+
return content;
|
|
150
|
+
};
|
|
151
|
+
if (this._errors.length)
|
|
152
|
+
addSection("Error", this._errors);
|
|
153
|
+
if (this._results.length)
|
|
154
|
+
addSection("Result", this._results);
|
|
155
|
+
if (this._context.config.codegen !== "none" && this._code.length)
|
|
156
|
+
addSection("Ran Playwright code", this._code, "js");
|
|
157
|
+
const tabSnapshot = this._context.currentTab() ? await this._context.currentTabOrDie().captureSnapshot(this._clientWorkspace) : void 0;
|
|
158
|
+
const tabHeaders = await Promise.all(this._context.tabs().map((tab) => tab.headerSnapshot()));
|
|
159
|
+
if (this._includeSnapshot !== "none" || tabHeaders.some((header) => header.changed)) {
|
|
160
|
+
if (tabHeaders.length !== 1)
|
|
161
|
+
addSection("Open tabs", renderTabsMarkdown(tabHeaders));
|
|
162
|
+
addSection("Page", renderTabMarkdown(tabHeaders[0]));
|
|
163
|
+
}
|
|
164
|
+
if (tabSnapshot?.modalStates.length)
|
|
165
|
+
addSection("Modal state", (0, import_tab.renderModalStates)(this._context.config, tabSnapshot.modalStates));
|
|
166
|
+
if (tabSnapshot && this._includeSnapshot !== "none") {
|
|
167
|
+
const snapshot = this._includeSnapshot === "full" ? tabSnapshot.ariaSnapshot : tabSnapshot.ariaSnapshotDiff ?? tabSnapshot.ariaSnapshot;
|
|
168
|
+
if (this._context.config.outputMode === "file" || this._includeSnapshotFileName) {
|
|
169
|
+
const resolvedFile = await this.resolveClientFile({ prefix: "page", ext: "yml", suggestedFilename: this._includeSnapshotFileName }, "Snapshot");
|
|
170
|
+
await import_fs.default.promises.writeFile(resolvedFile.fileName, snapshot, "utf-8");
|
|
171
|
+
addSection("Snapshot", [resolvedFile.printableLink]);
|
|
172
|
+
} else {
|
|
173
|
+
addSection("Snapshot", [snapshot], "yaml");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const text = [];
|
|
177
|
+
if (tabSnapshot?.consoleLink)
|
|
178
|
+
text.push(`- New console entries: ${tabSnapshot.consoleLink}`);
|
|
179
|
+
if (tabSnapshot?.events.filter((event) => event.type !== "request").length) {
|
|
180
|
+
for (const event of tabSnapshot.events) {
|
|
181
|
+
if (event.type === "console" && this._context.config.outputMode !== "file") {
|
|
182
|
+
if ((0, import_tab.shouldIncludeMessage)(this._context.config.console.level, event.message.type))
|
|
183
|
+
text.push(`- ${trimMiddle(event.message.toString(), 100)}`);
|
|
184
|
+
} else if (event.type === "download-start") {
|
|
185
|
+
text.push(`- Downloading file ${event.download.download.suggestedFilename()} ...`);
|
|
186
|
+
} else if (event.type === "download-finish") {
|
|
187
|
+
text.push(`- Downloaded file ${event.download.download.suggestedFilename()} to "${this._computRelativeTo(event.download.outputFile)}"`);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (text.length)
|
|
192
|
+
addSection("Events", text);
|
|
193
|
+
return sections;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function renderTabMarkdown(tab) {
|
|
197
|
+
const lines = [`- Page URL: ${tab.url}`];
|
|
198
|
+
if (tab.title)
|
|
199
|
+
lines.push(`- Page Title: ${tab.title}`);
|
|
200
|
+
if (tab.console.errors || tab.console.warnings)
|
|
201
|
+
lines.push(`- Console: ${tab.console.errors} errors, ${tab.console.warnings} warnings`);
|
|
202
|
+
return lines;
|
|
203
|
+
}
|
|
204
|
+
function renderTabsMarkdown(tabs) {
|
|
205
|
+
if (!tabs.length)
|
|
206
|
+
return ["No open tabs. Navigate to a URL to create one."];
|
|
207
|
+
const lines = [];
|
|
208
|
+
for (let i = 0; i < tabs.length; i++) {
|
|
209
|
+
const tab = tabs[i];
|
|
210
|
+
const current = tab.current ? " (current)" : "";
|
|
211
|
+
lines.push(`- ${i}:${current} [${tab.title}](${tab.url})`);
|
|
212
|
+
}
|
|
213
|
+
return lines;
|
|
214
|
+
}
|
|
215
|
+
function trimMiddle(text, maxLength) {
|
|
216
|
+
if (text.length <= maxLength)
|
|
217
|
+
return text;
|
|
218
|
+
return text.slice(0, Math.floor(maxLength / 2)) + "..." + text.slice(-3 - Math.floor(maxLength / 2));
|
|
219
|
+
}
|
|
220
|
+
function parseSections(text) {
|
|
221
|
+
const sections = /* @__PURE__ */ new Map();
|
|
222
|
+
const sectionHeaders = text.split(/^### /m).slice(1);
|
|
223
|
+
for (const section of sectionHeaders) {
|
|
224
|
+
const firstNewlineIndex = section.indexOf("\n");
|
|
225
|
+
if (firstNewlineIndex === -1)
|
|
226
|
+
continue;
|
|
227
|
+
const sectionName = section.substring(0, firstNewlineIndex);
|
|
228
|
+
const sectionContent = section.substring(firstNewlineIndex + 1).trim();
|
|
229
|
+
sections.set(sectionName, sectionContent);
|
|
230
|
+
}
|
|
231
|
+
return sections;
|
|
232
|
+
}
|
|
233
|
+
function parseResponse(response) {
|
|
234
|
+
if (response.content?.[0].type !== "text")
|
|
235
|
+
return void 0;
|
|
236
|
+
const text = response.content[0].text;
|
|
237
|
+
const sections = parseSections(text);
|
|
238
|
+
const error = sections.get("Error");
|
|
239
|
+
const result = sections.get("Result");
|
|
240
|
+
const code = sections.get("Ran Playwright code");
|
|
241
|
+
const tabs = sections.get("Open tabs");
|
|
242
|
+
const page = sections.get("Page");
|
|
243
|
+
const snapshot = sections.get("Snapshot");
|
|
244
|
+
const events = sections.get("Events");
|
|
245
|
+
const modalState = sections.get("Modal state");
|
|
246
|
+
const codeNoFrame = code?.replace(/^```js\n/, "").replace(/\n```$/, "");
|
|
247
|
+
const isError = response.isError;
|
|
248
|
+
const attachments = response.content.length > 1 ? response.content.slice(1) : void 0;
|
|
249
|
+
return {
|
|
250
|
+
result,
|
|
251
|
+
error,
|
|
252
|
+
code: codeNoFrame,
|
|
253
|
+
tabs,
|
|
254
|
+
page,
|
|
255
|
+
snapshot,
|
|
256
|
+
events,
|
|
257
|
+
modalState,
|
|
258
|
+
isError,
|
|
259
|
+
attachments,
|
|
260
|
+
text
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
264
|
+
0 && (module.exports = {
|
|
265
|
+
Response,
|
|
266
|
+
parseResponse,
|
|
267
|
+
renderTabMarkdown,
|
|
268
|
+
renderTabsMarkdown,
|
|
269
|
+
requestDebug
|
|
270
|
+
});
|