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,364 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var import_child_process = require("child_process");
|
|
25
|
+
var import_fs = __toESM(require("fs"));
|
|
26
|
+
var import_os = __toESM(require("os"));
|
|
27
|
+
var import_path = __toESM(require("path"));
|
|
28
|
+
var import_registry = require("./registry");
|
|
29
|
+
var import_session = require("./session");
|
|
30
|
+
function resolveSessionName(sessionName) {
|
|
31
|
+
if (sessionName)
|
|
32
|
+
return sessionName;
|
|
33
|
+
if (process.env.PLAYWRIGHT_CLI_SESSION)
|
|
34
|
+
return process.env.PLAYWRIGHT_CLI_SESSION;
|
|
35
|
+
return "default";
|
|
36
|
+
}
|
|
37
|
+
const globalOptions = [
|
|
38
|
+
"browser",
|
|
39
|
+
"config",
|
|
40
|
+
"extension",
|
|
41
|
+
"headed",
|
|
42
|
+
"help",
|
|
43
|
+
"persistent",
|
|
44
|
+
"profile",
|
|
45
|
+
"session",
|
|
46
|
+
"version"
|
|
47
|
+
];
|
|
48
|
+
const booleanOptions = [
|
|
49
|
+
"all",
|
|
50
|
+
"help",
|
|
51
|
+
"version"
|
|
52
|
+
];
|
|
53
|
+
async function program() {
|
|
54
|
+
const clientInfo = (0, import_registry.createClientInfo)();
|
|
55
|
+
const help = require("./help.json");
|
|
56
|
+
const argv = process.argv.slice(2);
|
|
57
|
+
const boolean = [...help.booleanOptions, ...booleanOptions];
|
|
58
|
+
const args = require("minimist")(argv, { boolean, string: ["_"] });
|
|
59
|
+
for (const [key, value] of Object.entries(args)) {
|
|
60
|
+
if (key !== "_" && typeof value !== "boolean")
|
|
61
|
+
args[key] = String(value);
|
|
62
|
+
}
|
|
63
|
+
for (let index = 0; index < args._.length; index++)
|
|
64
|
+
args._[index] = String(args._[index]);
|
|
65
|
+
for (const option of boolean) {
|
|
66
|
+
if (!argv.includes(`--${option}`) && !argv.includes(`--no-${option}`))
|
|
67
|
+
delete args[option];
|
|
68
|
+
if (argv.some((arg) => arg.startsWith(`--${option}=`) || arg.startsWith(`--no-${option}=`))) {
|
|
69
|
+
console.error(`boolean option '--${option}' should not be passed with '=value', use '--${option}' or '--no-${option}' instead`);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (args.s) {
|
|
74
|
+
args.session = args.s;
|
|
75
|
+
delete args.s;
|
|
76
|
+
}
|
|
77
|
+
const commandName = args._?.[0];
|
|
78
|
+
if (args.version || args.v) {
|
|
79
|
+
console.log(clientInfo.version);
|
|
80
|
+
process.exit(0);
|
|
81
|
+
}
|
|
82
|
+
const command = commandName && help.commands[commandName];
|
|
83
|
+
if (args.help || args.h) {
|
|
84
|
+
if (command) {
|
|
85
|
+
console.log(command);
|
|
86
|
+
} else {
|
|
87
|
+
console.log("playwright-cli - run playwright mcp commands from terminal\n");
|
|
88
|
+
console.log(help.global);
|
|
89
|
+
}
|
|
90
|
+
process.exit(0);
|
|
91
|
+
}
|
|
92
|
+
if (!command) {
|
|
93
|
+
console.error(`Unknown command: ${commandName}
|
|
94
|
+
`);
|
|
95
|
+
console.log(help.global);
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
const registry = await import_registry.Registry.load();
|
|
99
|
+
const sessionName = resolveSessionName(args.session);
|
|
100
|
+
switch (commandName) {
|
|
101
|
+
case "list": {
|
|
102
|
+
await listSessions(registry, clientInfo, args.all);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
case "close-all": {
|
|
106
|
+
const entries = registry.entries(clientInfo);
|
|
107
|
+
for (const entry of entries)
|
|
108
|
+
await new import_session.Session(clientInfo, entry.config).stop(true);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
case "delete-data": {
|
|
112
|
+
const entry = registry.entry(clientInfo, sessionName);
|
|
113
|
+
if (!entry) {
|
|
114
|
+
console.log(`No user data found for browser '${sessionName}'.`);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
await new import_session.Session(clientInfo, entry.config).deleteData();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
case "kill-all": {
|
|
121
|
+
await killAllDaemons();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
case "open": {
|
|
125
|
+
const entry = registry.entry(clientInfo, sessionName);
|
|
126
|
+
if (entry)
|
|
127
|
+
await new import_session.Session(clientInfo, entry.config).stop(true);
|
|
128
|
+
const session2 = new import_session.Session(clientInfo, sessionConfigFromArgs(clientInfo, sessionName, args));
|
|
129
|
+
if (await session2.canConnect())
|
|
130
|
+
await session2.stop(true);
|
|
131
|
+
for (const globalOption of globalOptions)
|
|
132
|
+
delete args[globalOption];
|
|
133
|
+
const result = await session2.run(args);
|
|
134
|
+
console.log(result.text);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
case "close":
|
|
138
|
+
const closeEntry = registry.entry(clientInfo, sessionName);
|
|
139
|
+
const session = closeEntry ? new import_session.Session(clientInfo, closeEntry.config) : void 0;
|
|
140
|
+
if (!session || !await session.canConnect()) {
|
|
141
|
+
console.log(`Browser '${sessionName}' is not open.`);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
await session.stop();
|
|
145
|
+
return;
|
|
146
|
+
case "install":
|
|
147
|
+
await install(args);
|
|
148
|
+
return;
|
|
149
|
+
case "show": {
|
|
150
|
+
const daemonScript = import_path.default.join(__dirname, "devtoolsApp.js");
|
|
151
|
+
const child = (0, import_child_process.spawn)(process.execPath, [daemonScript], {
|
|
152
|
+
detached: true,
|
|
153
|
+
stdio: "ignore"
|
|
154
|
+
});
|
|
155
|
+
child.unref();
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
default: {
|
|
159
|
+
const defaultEntry = registry.entry(clientInfo, sessionName);
|
|
160
|
+
if (!defaultEntry) {
|
|
161
|
+
console.log(`The browser '${sessionName}' is not open, please run open first`);
|
|
162
|
+
console.log("");
|
|
163
|
+
console.log(` playwright-cli${sessionName !== "default" ? ` -s=${sessionName}` : ""} open [params]`);
|
|
164
|
+
process.exit(1);
|
|
165
|
+
}
|
|
166
|
+
for (const globalOption of globalOptions)
|
|
167
|
+
delete args[globalOption];
|
|
168
|
+
const result = await new import_session.Session(clientInfo, defaultEntry.config).run(args);
|
|
169
|
+
console.log(result.text);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
async function install(args) {
|
|
174
|
+
const cwd = process.cwd();
|
|
175
|
+
const playwrightDir = import_path.default.join(cwd, ".playwright");
|
|
176
|
+
await import_fs.default.promises.mkdir(playwrightDir, { recursive: true });
|
|
177
|
+
console.log(`\u2705 Workspace initialized at \`${cwd}\`.`);
|
|
178
|
+
if (args.skills) {
|
|
179
|
+
const skillSourceDir = import_path.default.join(__dirname, "../../skill");
|
|
180
|
+
const skillDestDir = import_path.default.join(cwd, ".claude", "skills", "playwright-cli");
|
|
181
|
+
if (!import_fs.default.existsSync(skillSourceDir)) {
|
|
182
|
+
console.error("\u274C Skills source directory not found:", skillSourceDir);
|
|
183
|
+
process.exit(1);
|
|
184
|
+
}
|
|
185
|
+
await import_fs.default.promises.cp(skillSourceDir, skillDestDir, { recursive: true });
|
|
186
|
+
console.log(`\u2705 Skills installed to \`${import_path.default.relative(cwd, skillDestDir)}\`.`);
|
|
187
|
+
}
|
|
188
|
+
if (!args.config)
|
|
189
|
+
await ensureConfiguredBrowserInstalled();
|
|
190
|
+
}
|
|
191
|
+
async function ensureConfiguredBrowserInstalled() {
|
|
192
|
+
if (import_fs.default.existsSync(defaultConfigFile())) {
|
|
193
|
+
const { registry } = await import("playwright-core/lib/server/registry/index");
|
|
194
|
+
const config = JSON.parse(await import_fs.default.promises.readFile(defaultConfigFile(), "utf-8"));
|
|
195
|
+
const browserName = config.browser?.browserName ?? "chromium";
|
|
196
|
+
const channel = config.browser?.launchOptions?.channel;
|
|
197
|
+
if (!channel || channel.startsWith("chromium")) {
|
|
198
|
+
const executable = registry.findExecutable(channel ?? browserName);
|
|
199
|
+
if (executable && !import_fs.default.existsSync(executable?.executablePath()))
|
|
200
|
+
await registry.install([executable]);
|
|
201
|
+
}
|
|
202
|
+
} else {
|
|
203
|
+
const channel = await findOrInstallDefaultBrowser();
|
|
204
|
+
if (channel !== "chrome")
|
|
205
|
+
await createDefaultConfig(channel);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
async function createDefaultConfig(channel) {
|
|
209
|
+
const config = {
|
|
210
|
+
browser: {
|
|
211
|
+
browserName: "chromium",
|
|
212
|
+
launchOptions: {
|
|
213
|
+
channel
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
await import_fs.default.promises.writeFile(defaultConfigFile(), JSON.stringify(config, null, 2));
|
|
218
|
+
console.log(`\u2705 Created default config for ${channel} at ${import_path.default.relative(process.cwd(), defaultConfigFile())}.`);
|
|
219
|
+
}
|
|
220
|
+
async function findOrInstallDefaultBrowser() {
|
|
221
|
+
const { registry } = await import("playwright-core/lib/server/registry/index");
|
|
222
|
+
const channels = ["chrome", "msedge"];
|
|
223
|
+
for (const channel of channels) {
|
|
224
|
+
const executable = registry.findExecutable(channel);
|
|
225
|
+
if (!executable?.executablePath())
|
|
226
|
+
continue;
|
|
227
|
+
console.log(`\u2705 Found ${channel}, will use it as the default browser.`);
|
|
228
|
+
return channel;
|
|
229
|
+
}
|
|
230
|
+
const chromiumExecutable = registry.findExecutable("chromium");
|
|
231
|
+
if (!import_fs.default.existsSync(chromiumExecutable?.executablePath()))
|
|
232
|
+
await registry.install([chromiumExecutable]);
|
|
233
|
+
return "chromium";
|
|
234
|
+
}
|
|
235
|
+
function daemonSocketPath(clientInfo, sessionName) {
|
|
236
|
+
const socketName = `${sessionName}.sock`;
|
|
237
|
+
if (import_os.default.platform() === "win32")
|
|
238
|
+
return `\\\\.\\pipe\\${clientInfo.workspaceDirHash}-${socketName}`;
|
|
239
|
+
const socketsDir = process.env.PLAYWRIGHT_DAEMON_SOCKETS_DIR || import_path.default.join(import_os.default.tmpdir(), "playwright-cli");
|
|
240
|
+
return import_path.default.join(socketsDir, clientInfo.workspaceDirHash, socketName);
|
|
241
|
+
}
|
|
242
|
+
function defaultConfigFile() {
|
|
243
|
+
return import_path.default.resolve(".playwright", "cli.config.json");
|
|
244
|
+
}
|
|
245
|
+
function sessionConfigFromArgs(clientInfo, sessionName, args) {
|
|
246
|
+
let config = args.config ? import_path.default.resolve(args.config) : void 0;
|
|
247
|
+
try {
|
|
248
|
+
if (!config && import_fs.default.existsSync(defaultConfigFile()))
|
|
249
|
+
config = defaultConfigFile();
|
|
250
|
+
} catch {
|
|
251
|
+
}
|
|
252
|
+
if (!args.persistent && args.profile)
|
|
253
|
+
args.persistent = true;
|
|
254
|
+
return {
|
|
255
|
+
name: sessionName,
|
|
256
|
+
version: clientInfo.version,
|
|
257
|
+
timestamp: 0,
|
|
258
|
+
socketPath: daemonSocketPath(clientInfo, sessionName),
|
|
259
|
+
cli: {
|
|
260
|
+
headed: args.headed,
|
|
261
|
+
extension: args.extension,
|
|
262
|
+
browser: args.browser,
|
|
263
|
+
persistent: args.persistent,
|
|
264
|
+
profile: args.profile,
|
|
265
|
+
config
|
|
266
|
+
},
|
|
267
|
+
userDataDirPrefix: import_path.default.resolve(clientInfo.daemonProfilesDir, `ud-${sessionName}`),
|
|
268
|
+
workspaceDir: clientInfo.workspaceDir
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
async function killAllDaemons() {
|
|
272
|
+
const platform = import_os.default.platform();
|
|
273
|
+
let killed = 0;
|
|
274
|
+
try {
|
|
275
|
+
if (platform === "win32") {
|
|
276
|
+
const result = (0, import_child_process.execSync)(
|
|
277
|
+
`powershell -NoProfile -NonInteractive -Command "Get-CimInstance Win32_Process | Where-Object { $_.CommandLine -like '*-server*' -and $_.CommandLine -like '*--daemon-session*' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue; $_.ProcessId }"`,
|
|
278
|
+
{ encoding: "utf-8" }
|
|
279
|
+
);
|
|
280
|
+
const pids = result.split("\n").map((line) => line.trim()).filter((line) => /^\d+$/.test(line));
|
|
281
|
+
for (const pid of pids)
|
|
282
|
+
console.log(`Killed daemon process ${pid}`);
|
|
283
|
+
killed = pids.length;
|
|
284
|
+
} else {
|
|
285
|
+
const result = (0, import_child_process.execSync)("ps aux", { encoding: "utf-8" });
|
|
286
|
+
const lines = result.split("\n");
|
|
287
|
+
for (const line of lines) {
|
|
288
|
+
if (line.includes("-server") && line.includes("--daemon-session")) {
|
|
289
|
+
const parts = line.trim().split(/\s+/);
|
|
290
|
+
const pid = parts[1];
|
|
291
|
+
if (pid && /^\d+$/.test(pid)) {
|
|
292
|
+
try {
|
|
293
|
+
process.kill(parseInt(pid, 10), "SIGKILL");
|
|
294
|
+
console.log(`Killed daemon process ${pid}`);
|
|
295
|
+
killed++;
|
|
296
|
+
} catch {
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
} catch (e) {
|
|
303
|
+
}
|
|
304
|
+
if (killed === 0)
|
|
305
|
+
console.log("No daemon processes found.");
|
|
306
|
+
else if (killed > 0)
|
|
307
|
+
console.log(`Killed ${killed} daemon process${killed === 1 ? "" : "es"}.`);
|
|
308
|
+
}
|
|
309
|
+
async function listSessions(registry, clientInfo, all) {
|
|
310
|
+
if (all) {
|
|
311
|
+
const entries = registry.entryMap();
|
|
312
|
+
if (entries.size === 0) {
|
|
313
|
+
console.log("No browsers found.");
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
for (const [workspace, list] of entries) {
|
|
317
|
+
if (!list.length)
|
|
318
|
+
continue;
|
|
319
|
+
console.log(`${workspace}:`);
|
|
320
|
+
await gcAndPrintSessions(list.map((entry) => new import_session.Session(clientInfo, entry.config)));
|
|
321
|
+
}
|
|
322
|
+
} else {
|
|
323
|
+
console.log("### Browsers");
|
|
324
|
+
const entries = registry.entries(clientInfo);
|
|
325
|
+
await gcAndPrintSessions(entries.map((entry) => new import_session.Session(clientInfo, entry.config)));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
async function gcAndPrintSessions(sessions) {
|
|
329
|
+
const running = [];
|
|
330
|
+
const stopped = [];
|
|
331
|
+
for (const session of sessions) {
|
|
332
|
+
const canConnect = await session.canConnect();
|
|
333
|
+
if (canConnect) {
|
|
334
|
+
running.push(session);
|
|
335
|
+
} else {
|
|
336
|
+
if (session.config.cli.persistent)
|
|
337
|
+
stopped.push(session);
|
|
338
|
+
else
|
|
339
|
+
await session.deleteSessionConfig();
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
for (const session of running)
|
|
343
|
+
console.log(await renderSessionStatus(session));
|
|
344
|
+
for (const session of stopped)
|
|
345
|
+
console.log(await renderSessionStatus(session));
|
|
346
|
+
if (running.length === 0 && stopped.length === 0)
|
|
347
|
+
console.log(" (no browsers)");
|
|
348
|
+
}
|
|
349
|
+
async function renderSessionStatus(session) {
|
|
350
|
+
const text = [];
|
|
351
|
+
const config = session.config;
|
|
352
|
+
const canConnect = await session.canConnect();
|
|
353
|
+
text.push(`- ${session.name}:`);
|
|
354
|
+
text.push(` - status: ${canConnect ? "open" : "closed"}`);
|
|
355
|
+
if (canConnect && !session.isCompatible())
|
|
356
|
+
text.push(` - version: v${config.version} [incompatible please re-open]`);
|
|
357
|
+
if (config.resolvedConfig)
|
|
358
|
+
text.push(...(0, import_session.renderResolvedConfig)(config.resolvedConfig));
|
|
359
|
+
return text.join("\n");
|
|
360
|
+
}
|
|
361
|
+
program().catch((e) => {
|
|
362
|
+
console.error(e.message);
|
|
363
|
+
process.exit(1);
|
|
364
|
+
});
|
|
@@ -0,0 +1,146 @@
|
|
|
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 registry_exports = {};
|
|
30
|
+
__export(registry_exports, {
|
|
31
|
+
Registry: () => Registry,
|
|
32
|
+
baseDaemonDir: () => baseDaemonDir,
|
|
33
|
+
createClientInfo: () => createClientInfo
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(registry_exports);
|
|
36
|
+
var import_crypto = __toESM(require("crypto"));
|
|
37
|
+
var import_fs = __toESM(require("fs"));
|
|
38
|
+
var import_os = __toESM(require("os"));
|
|
39
|
+
var import_path = __toESM(require("path"));
|
|
40
|
+
class Registry {
|
|
41
|
+
constructor(entries) {
|
|
42
|
+
this._entries = entries;
|
|
43
|
+
}
|
|
44
|
+
entry(clientInfo, sessionName) {
|
|
45
|
+
const key = clientInfo.workspaceDir || clientInfo.workspaceDirHash;
|
|
46
|
+
const entries = this._entries.get(key) || [];
|
|
47
|
+
return entries.find((entry) => entry.config.name === sessionName);
|
|
48
|
+
}
|
|
49
|
+
entries(clientInfo) {
|
|
50
|
+
const key = clientInfo.workspaceDir || clientInfo.workspaceDirHash;
|
|
51
|
+
return this._entries.get(key) || [];
|
|
52
|
+
}
|
|
53
|
+
entryMap() {
|
|
54
|
+
return this._entries;
|
|
55
|
+
}
|
|
56
|
+
static async loadSessionEntry(file) {
|
|
57
|
+
try {
|
|
58
|
+
const data = await import_fs.default.promises.readFile(file, "utf-8");
|
|
59
|
+
const config = JSON.parse(data);
|
|
60
|
+
if (!config.name)
|
|
61
|
+
config.name = import_path.default.basename(file, ".session");
|
|
62
|
+
if (!config.timestamp)
|
|
63
|
+
config.timestamp = 0;
|
|
64
|
+
return { file, config };
|
|
65
|
+
} catch {
|
|
66
|
+
return void 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
static async load() {
|
|
70
|
+
const sessions = /* @__PURE__ */ new Map();
|
|
71
|
+
const hashDirs = await import_fs.default.promises.readdir(baseDaemonDir).catch(() => []);
|
|
72
|
+
for (const workspaceDirHash of hashDirs) {
|
|
73
|
+
const hashDir = import_path.default.join(baseDaemonDir, workspaceDirHash);
|
|
74
|
+
const stat = await import_fs.default.promises.stat(hashDir);
|
|
75
|
+
if (!stat.isDirectory())
|
|
76
|
+
continue;
|
|
77
|
+
const files = await import_fs.default.promises.readdir(hashDir).catch(() => []);
|
|
78
|
+
for (const file of files) {
|
|
79
|
+
if (!file.endsWith(".session"))
|
|
80
|
+
continue;
|
|
81
|
+
const fileName = import_path.default.join(hashDir, file);
|
|
82
|
+
const entry = await Registry.loadSessionEntry(fileName);
|
|
83
|
+
if (!entry)
|
|
84
|
+
continue;
|
|
85
|
+
const key = entry.config.workspaceDir || workspaceDirHash;
|
|
86
|
+
let list = sessions.get(key);
|
|
87
|
+
if (!list) {
|
|
88
|
+
list = [];
|
|
89
|
+
sessions.set(key, list);
|
|
90
|
+
}
|
|
91
|
+
list.push(entry);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return new Registry(sessions);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const baseDaemonDir = (() => {
|
|
98
|
+
if (process.env.PLAYWRIGHT_DAEMON_SESSION_DIR)
|
|
99
|
+
return process.env.PLAYWRIGHT_DAEMON_SESSION_DIR;
|
|
100
|
+
let localCacheDir;
|
|
101
|
+
if (process.platform === "linux")
|
|
102
|
+
localCacheDir = process.env.XDG_CACHE_HOME || import_path.default.join(import_os.default.homedir(), ".cache");
|
|
103
|
+
if (process.platform === "darwin")
|
|
104
|
+
localCacheDir = import_path.default.join(import_os.default.homedir(), "Library", "Caches");
|
|
105
|
+
if (process.platform === "win32")
|
|
106
|
+
localCacheDir = process.env.LOCALAPPDATA || import_path.default.join(import_os.default.homedir(), "AppData", "Local");
|
|
107
|
+
if (!localCacheDir)
|
|
108
|
+
throw new Error("Unsupported platform: " + process.platform);
|
|
109
|
+
return import_path.default.join(localCacheDir, "ms-playwright", "daemon");
|
|
110
|
+
})();
|
|
111
|
+
function createClientInfo() {
|
|
112
|
+
const packageLocation = require.resolve("../../../package.json");
|
|
113
|
+
const packageJSON = require(packageLocation);
|
|
114
|
+
const workspaceDir = findWorkspaceDir(process.cwd());
|
|
115
|
+
const version = process.env.PLAYWRIGHT_CLI_VERSION_FOR_TEST || packageJSON.version;
|
|
116
|
+
const hash = import_crypto.default.createHash("sha1");
|
|
117
|
+
hash.update(workspaceDir || packageLocation);
|
|
118
|
+
const workspaceDirHash = hash.digest("hex").substring(0, 16);
|
|
119
|
+
return {
|
|
120
|
+
version,
|
|
121
|
+
workspaceDir,
|
|
122
|
+
workspaceDirHash,
|
|
123
|
+
daemonProfilesDir: daemonProfilesDir(workspaceDirHash)
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function findWorkspaceDir(startDir) {
|
|
127
|
+
let dir = startDir;
|
|
128
|
+
for (let i = 0; i < 10; i++) {
|
|
129
|
+
if (import_fs.default.existsSync(import_path.default.join(dir, ".playwright")))
|
|
130
|
+
return dir;
|
|
131
|
+
const parentDir = import_path.default.dirname(dir);
|
|
132
|
+
if (parentDir === dir)
|
|
133
|
+
break;
|
|
134
|
+
dir = parentDir;
|
|
135
|
+
}
|
|
136
|
+
return void 0;
|
|
137
|
+
}
|
|
138
|
+
const daemonProfilesDir = (workspaceDirHash) => {
|
|
139
|
+
return import_path.default.join(baseDaemonDir, workspaceDirHash);
|
|
140
|
+
};
|
|
141
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
142
|
+
0 && (module.exports = {
|
|
143
|
+
Registry,
|
|
144
|
+
baseDaemonDir,
|
|
145
|
+
createClientInfo
|
|
146
|
+
});
|