@treegress.com/treegress-browser-core 1.59.0-treegress.3
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/README.md +60 -0
- package/ThirdPartyNotices.txt +3759 -0
- package/bin/install_media_pack.ps1 +5 -0
- package/bin/install_webkit_wsl.ps1 +33 -0
- package/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/browsers.json +81 -0
- package/cli.js +18 -0
- package/index.d.ts +17 -0
- package/index.js +32 -0
- package/index.mjs +28 -0
- package/lib/androidServerImpl.js +65 -0
- package/lib/browserServerImpl.js +120 -0
- package/lib/cli/client/cli.js +6 -0
- package/lib/cli/client/program.js +375 -0
- package/lib/cli/client/registry.js +171 -0
- package/lib/cli/client/session.js +282 -0
- package/lib/cli/client/socketConnection.js +108 -0
- package/lib/cli/daemon/command.js +73 -0
- package/lib/cli/daemon/commands.js +879 -0
- package/lib/cli/daemon/daemon.js +179 -0
- package/lib/cli/daemon/helpGenerator.js +173 -0
- package/lib/cli/daemon/program.js +123 -0
- package/lib/cli/driver.js +98 -0
- package/lib/cli/program.js +598 -0
- package/lib/cli/programWithTestStub.js +74 -0
- package/lib/client/android.js +361 -0
- package/lib/client/api.js +137 -0
- package/lib/client/artifact.js +79 -0
- package/lib/client/browser.js +169 -0
- package/lib/client/browserContext.js +590 -0
- package/lib/client/browserType.js +153 -0
- package/lib/client/cdpSession.js +55 -0
- package/lib/client/channelOwner.js +194 -0
- package/lib/client/clientHelper.js +64 -0
- package/lib/client/clientInstrumentation.js +55 -0
- package/lib/client/clientStackTrace.js +69 -0
- package/lib/client/clock.js +68 -0
- package/lib/client/connect.js +152 -0
- package/lib/client/connection.js +322 -0
- package/lib/client/consoleMessage.js +61 -0
- package/lib/client/coverage.js +44 -0
- package/lib/client/dialog.js +56 -0
- package/lib/client/disposable.js +76 -0
- package/lib/client/download.js +62 -0
- package/lib/client/electron.js +138 -0
- package/lib/client/elementHandle.js +284 -0
- package/lib/client/errors.js +77 -0
- package/lib/client/eventEmitter.js +327 -0
- package/lib/client/events.js +103 -0
- package/lib/client/fetch.js +368 -0
- package/lib/client/fileChooser.js +46 -0
- package/lib/client/fileUtils.js +34 -0
- package/lib/client/frame.js +409 -0
- package/lib/client/harRouter.js +99 -0
- package/lib/client/input.js +84 -0
- package/lib/client/inspector.js +48 -0
- package/lib/client/jsHandle.js +109 -0
- package/lib/client/jsonPipe.js +39 -0
- package/lib/client/localUtils.js +60 -0
- package/lib/client/locator.js +373 -0
- package/lib/client/network.js +750 -0
- package/lib/client/page.js +750 -0
- package/lib/client/pageAgent.js +64 -0
- package/lib/client/platform.js +77 -0
- package/lib/client/playwright.js +71 -0
- package/lib/client/selectors.js +55 -0
- package/lib/client/stream.js +39 -0
- package/lib/client/timeoutSettings.js +79 -0
- package/lib/client/tracing.js +124 -0
- package/lib/client/types.js +28 -0
- package/lib/client/video.js +65 -0
- package/lib/client/waiter.js +142 -0
- package/lib/client/webError.js +39 -0
- package/lib/client/worker.js +85 -0
- package/lib/client/writableStream.js +39 -0
- package/lib/devtools/appIcon.png +0 -0
- package/lib/devtools/devtoolsApp.js +275 -0
- package/lib/devtools/devtoolsController.js +289 -0
- package/lib/generated/bindingsControllerSource.js +28 -0
- package/lib/generated/clockSource.js +28 -0
- package/lib/generated/injectedScriptSource.js +28 -0
- package/lib/generated/pollingRecorderSource.js +28 -0
- package/lib/generated/storageScriptSource.js +28 -0
- package/lib/generated/utilityScriptSource.js +28 -0
- package/lib/generated/webSocketMockSource.js +336 -0
- package/lib/inProcessFactory.js +60 -0
- package/lib/inprocess.js +3 -0
- package/lib/mcp/browserFactory.js +196 -0
- package/lib/mcp/cdpRelay.js +353 -0
- package/lib/mcp/config.d.js +16 -0
- package/lib/mcp/config.js +399 -0
- package/lib/mcp/configIni.js +190 -0
- package/lib/mcp/exports.js +42 -0
- package/lib/mcp/extensionContextFactory.js +59 -0
- package/lib/mcp/index.js +62 -0
- package/lib/mcp/log.js +35 -0
- package/lib/mcp/program.js +111 -0
- package/lib/mcp/protocol.js +28 -0
- package/lib/mcp/sdk/http.js +152 -0
- package/lib/mcp/sdk/server.js +230 -0
- package/lib/mcp/sdk/tool.js +47 -0
- package/lib/mcp/watchdog.js +44 -0
- package/lib/mcpBundle.js +84 -0
- package/lib/mcpBundleImpl/index.js +147 -0
- package/lib/outofprocess.js +76 -0
- package/lib/protocol/serializers.js +197 -0
- package/lib/protocol/validator.js +3064 -0
- package/lib/protocol/validatorPrimitives.js +193 -0
- package/lib/remote/playwrightConnection.js +129 -0
- package/lib/remote/playwrightPipeServer.js +100 -0
- package/lib/remote/playwrightServer.js +339 -0
- package/lib/remote/playwrightWebSocketServer.js +73 -0
- package/lib/remote/serverTransport.js +96 -0
- package/lib/server/agent/actionRunner.js +341 -0
- package/lib/server/agent/actions.js +128 -0
- package/lib/server/agent/codegen.js +111 -0
- package/lib/server/agent/context.js +161 -0
- package/lib/server/agent/expectTools.js +156 -0
- package/lib/server/agent/pageAgent.js +204 -0
- package/lib/server/agent/performTools.js +262 -0
- package/lib/server/agent/tool.js +109 -0
- package/lib/server/android/android.js +465 -0
- package/lib/server/android/backendAdb.js +177 -0
- package/lib/server/artifact.js +127 -0
- package/lib/server/bidi/bidiBrowser.js +560 -0
- package/lib/server/bidi/bidiChromium.js +162 -0
- package/lib/server/bidi/bidiConnection.js +213 -0
- package/lib/server/bidi/bidiDeserializer.js +116 -0
- package/lib/server/bidi/bidiExecutionContext.js +267 -0
- package/lib/server/bidi/bidiFirefox.js +128 -0
- package/lib/server/bidi/bidiInput.js +146 -0
- package/lib/server/bidi/bidiNetworkManager.js +411 -0
- package/lib/server/bidi/bidiOverCdp.js +102 -0
- package/lib/server/bidi/bidiPage.js +598 -0
- package/lib/server/bidi/bidiPdf.js +106 -0
- package/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/lib/server/bidi/third_party/bidiProtocolCore.js +180 -0
- package/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/lib/server/bidi/third_party/firefoxPrefs.js +261 -0
- package/lib/server/browser.js +217 -0
- package/lib/server/browserContext.js +699 -0
- package/lib/server/browserType.js +337 -0
- package/lib/server/callLog.js +82 -0
- package/lib/server/chromium/appIcon.png +0 -0
- package/lib/server/chromium/chromium.js +399 -0
- package/lib/server/chromium/chromiumSwitches.js +104 -0
- package/lib/server/chromium/crBrowser.js +532 -0
- package/lib/server/chromium/crConnection.js +197 -0
- package/lib/server/chromium/crCoverage.js +235 -0
- package/lib/server/chromium/crDevTools.js +111 -0
- package/lib/server/chromium/crDragDrop.js +131 -0
- package/lib/server/chromium/crExecutionContext.js +146 -0
- package/lib/server/chromium/crInput.js +187 -0
- package/lib/server/chromium/crNetworkManager.js +708 -0
- package/lib/server/chromium/crPage.js +1004 -0
- package/lib/server/chromium/crPdf.js +121 -0
- package/lib/server/chromium/crProtocolHelper.js +145 -0
- package/lib/server/chromium/crServiceWorker.js +136 -0
- package/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/lib/server/chromium/protocol.d.js +16 -0
- package/lib/server/clock.js +149 -0
- package/lib/server/codegen/csharp.js +327 -0
- package/lib/server/codegen/java.js +274 -0
- package/lib/server/codegen/javascript.js +247 -0
- package/lib/server/codegen/jsonl.js +52 -0
- package/lib/server/codegen/language.js +132 -0
- package/lib/server/codegen/languages.js +68 -0
- package/lib/server/codegen/python.js +279 -0
- package/lib/server/codegen/types.js +16 -0
- package/lib/server/console.js +61 -0
- package/lib/server/cookieStore.js +206 -0
- package/lib/server/debugController.js +197 -0
- package/lib/server/debugger.js +119 -0
- package/lib/server/deviceDescriptors.js +39 -0
- package/lib/server/deviceDescriptorsSource.json +1779 -0
- package/lib/server/dialog.js +116 -0
- package/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/lib/server/dispatchers/browserContextDispatcher.js +377 -0
- package/lib/server/dispatchers/browserDispatcher.js +124 -0
- package/lib/server/dispatchers/browserTypeDispatcher.js +71 -0
- package/lib/server/dispatchers/cdpSessionDispatcher.js +47 -0
- package/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/lib/server/dispatchers/dispatcher.js +364 -0
- package/lib/server/dispatchers/disposableDispatcher.js +39 -0
- package/lib/server/dispatchers/electronDispatcher.js +90 -0
- package/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/lib/server/dispatchers/localUtilsDispatcher.js +185 -0
- package/lib/server/dispatchers/networkDispatchers.js +214 -0
- package/lib/server/dispatchers/pageAgentDispatcher.js +106 -0
- package/lib/server/dispatchers/pageDispatcher.js +441 -0
- package/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +164 -0
- package/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/lib/server/disposable.js +41 -0
- package/lib/server/dom.js +815 -0
- package/lib/server/download.js +71 -0
- package/lib/server/electron/electron.js +272 -0
- package/lib/server/electron/loader.js +30 -0
- package/lib/server/errors.js +69 -0
- package/lib/server/fetch.js +621 -0
- package/lib/server/fileChooser.js +43 -0
- package/lib/server/fileUploadUtils.js +84 -0
- package/lib/server/firefox/ffBrowser.js +415 -0
- package/lib/server/firefox/ffConnection.js +142 -0
- package/lib/server/firefox/ffExecutionContext.js +150 -0
- package/lib/server/firefox/ffInput.js +159 -0
- package/lib/server/firefox/ffNetworkManager.js +256 -0
- package/lib/server/firefox/ffPage.js +495 -0
- package/lib/server/firefox/firefox.js +114 -0
- package/lib/server/firefox/protocol.d.js +16 -0
- package/lib/server/formData.js +147 -0
- package/lib/server/frameSelectors.js +160 -0
- package/lib/server/frames.js +1476 -0
- package/lib/server/har/harRecorder.js +147 -0
- package/lib/server/har/harTracer.js +608 -0
- package/lib/server/harBackend.js +157 -0
- package/lib/server/helper.js +96 -0
- package/lib/server/index.js +58 -0
- package/lib/server/input.js +277 -0
- package/lib/server/instrumentation.js +72 -0
- package/lib/server/javascript.js +291 -0
- package/lib/server/launchApp.js +127 -0
- package/lib/server/localUtils.js +214 -0
- package/lib/server/macEditingCommands.js +143 -0
- package/lib/server/network.js +668 -0
- package/lib/server/page.js +915 -0
- package/lib/server/pipeTransport.js +89 -0
- package/lib/server/playwright.js +69 -0
- package/lib/server/progress.js +136 -0
- package/lib/server/protocolError.js +52 -0
- package/lib/server/recorder/chat.js +161 -0
- package/lib/server/recorder/recorderApp.js +367 -0
- package/lib/server/recorder/recorderRunner.js +138 -0
- package/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/lib/server/recorder/recorderUtils.js +157 -0
- package/lib/server/recorder/throttledFile.js +57 -0
- package/lib/server/recorder.js +533 -0
- package/lib/server/registry/browserFetcher.js +177 -0
- package/lib/server/registry/dependencies.js +371 -0
- package/lib/server/registry/index.js +1395 -0
- package/lib/server/registry/nativeDeps.js +1281 -0
- package/lib/server/registry/oopDownloadBrowserMain.js +127 -0
- package/lib/server/screencast.js +214 -0
- package/lib/server/screenshotter.js +333 -0
- package/lib/server/selectors.js +112 -0
- package/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/lib/server/socksInterceptor.js +95 -0
- package/lib/server/trace/recorder/snapshotter.js +147 -0
- package/lib/server/trace/recorder/snapshotterInjected.js +561 -0
- package/lib/server/trace/recorder/tracing.js +607 -0
- package/lib/server/trace/viewer/traceParser.js +72 -0
- package/lib/server/trace/viewer/traceViewer.js +244 -0
- package/lib/server/transport.js +181 -0
- package/lib/server/types.js +28 -0
- package/lib/server/usKeyboardLayout.js +145 -0
- package/lib/server/utils/ascii.js +44 -0
- package/lib/server/utils/comparators.js +139 -0
- package/lib/server/utils/crypto.js +216 -0
- package/lib/server/utils/debug.js +42 -0
- package/lib/server/utils/debugLogger.js +122 -0
- package/lib/server/utils/env.js +73 -0
- package/lib/server/utils/eventsHelper.js +39 -0
- package/lib/server/utils/expectUtils.js +123 -0
- package/lib/server/utils/fileUtils.js +191 -0
- package/lib/server/utils/happyEyeballs.js +207 -0
- package/lib/server/utils/hostPlatform.js +123 -0
- package/lib/server/utils/httpServer.js +205 -0
- package/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/lib/server/utils/image_tools/compare.js +109 -0
- package/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/lib/server/utils/image_tools/stats.js +102 -0
- package/lib/server/utils/linuxUtils.js +71 -0
- package/lib/server/utils/network.js +244 -0
- package/lib/server/utils/nodePlatform.js +154 -0
- package/lib/server/utils/pipeTransport.js +84 -0
- package/lib/server/utils/processLauncher.js +243 -0
- package/lib/server/utils/profiler.js +65 -0
- package/lib/server/utils/socksProxy.js +511 -0
- package/lib/server/utils/spawnAsync.js +41 -0
- package/lib/server/utils/task.js +51 -0
- package/lib/server/utils/userAgent.js +98 -0
- package/lib/server/utils/wsServer.js +121 -0
- package/lib/server/utils/zipFile.js +74 -0
- package/lib/server/utils/zones.js +57 -0
- package/lib/server/videoRecorder.js +133 -0
- package/lib/server/webkit/protocol.d.js +16 -0
- package/lib/server/webkit/webkit.js +108 -0
- package/lib/server/webkit/wkBrowser.js +331 -0
- package/lib/server/webkit/wkConnection.js +144 -0
- package/lib/server/webkit/wkExecutionContext.js +154 -0
- package/lib/server/webkit/wkInput.js +181 -0
- package/lib/server/webkit/wkInterceptableRequest.js +197 -0
- package/lib/server/webkit/wkPage.js +1164 -0
- package/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/lib/server/webkit/wkWorkers.js +106 -0
- package/lib/serverRegistry.js +136 -0
- package/lib/third_party/pixelmatch.js +255 -0
- package/lib/tools/browserServerBackend.js +79 -0
- package/lib/tools/common.js +63 -0
- package/lib/tools/config.js +41 -0
- package/lib/tools/console.js +65 -0
- package/lib/tools/context.js +282 -0
- package/lib/tools/cookies.js +152 -0
- package/lib/tools/customDomLocatorCompiler.js +239 -0
- package/lib/tools/customDomResolverDiagnostics.js +100 -0
- package/lib/tools/customDomSnapshotFormatter.js +658 -0
- package/lib/tools/devtools.js +42 -0
- package/lib/tools/dialogs.js +59 -0
- package/lib/tools/evaluate.js +61 -0
- package/lib/tools/exports.js +57 -0
- package/lib/tools/files.js +58 -0
- package/lib/tools/form.js +63 -0
- package/lib/tools/keyboard.js +151 -0
- package/lib/tools/logFile.js +95 -0
- package/lib/tools/mouse.js +170 -0
- package/lib/tools/navigate.js +105 -0
- package/lib/tools/network.js +112 -0
- package/lib/tools/pdf.js +48 -0
- package/lib/tools/response.js +278 -0
- package/lib/tools/route.js +140 -0
- package/lib/tools/runCode.js +76 -0
- package/lib/tools/screenshot.js +87 -0
- package/lib/tools/sessionLog.js +75 -0
- package/lib/tools/snapshot.js +209 -0
- package/lib/tools/storage.js +67 -0
- package/lib/tools/tab.js +596 -0
- package/lib/tools/tabs.js +67 -0
- package/lib/tools/tool.js +47 -0
- package/lib/tools/tools.js +94 -0
- package/lib/tools/tracing.js +75 -0
- package/lib/tools/utils.js +88 -0
- package/lib/tools/verify.js +149 -0
- package/lib/tools/video.js +89 -0
- package/lib/tools/wait.js +63 -0
- package/lib/tools/webstorage.js +223 -0
- package/lib/utils/isomorphic/aiSnapshotTypes.js +16 -0
- package/lib/utils/isomorphic/ariaSnapshot.js +455 -0
- package/lib/utils/isomorphic/assert.js +31 -0
- package/lib/utils/isomorphic/colors.js +72 -0
- package/lib/utils/isomorphic/cssParser.js +245 -0
- package/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/lib/utils/isomorphic/headers.js +53 -0
- package/lib/utils/isomorphic/imageUtils.js +141 -0
- package/lib/utils/isomorphic/locatorGenerators.js +689 -0
- package/lib/utils/isomorphic/locatorParser.js +176 -0
- package/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/lib/utils/isomorphic/lruCache.js +51 -0
- package/lib/utils/isomorphic/manualPromise.js +114 -0
- package/lib/utils/isomorphic/mimeType.js +464 -0
- package/lib/utils/isomorphic/multimap.js +80 -0
- package/lib/utils/isomorphic/protocolFormatter.js +81 -0
- package/lib/utils/isomorphic/protocolMetainfo.js +345 -0
- package/lib/utils/isomorphic/rtti.js +43 -0
- package/lib/utils/isomorphic/selectorParser.js +386 -0
- package/lib/utils/isomorphic/semaphore.js +54 -0
- package/lib/utils/isomorphic/stackTrace.js +158 -0
- package/lib/utils/isomorphic/stringUtils.js +204 -0
- package/lib/utils/isomorphic/time.js +49 -0
- package/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/lib/utils/isomorphic/trace/entries.js +16 -0
- package/lib/utils/isomorphic/trace/snapshotRenderer.js +502 -0
- package/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
- package/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
- package/lib/utils/isomorphic/trace/traceLoader.js +131 -0
- package/lib/utils/isomorphic/trace/traceModel.js +366 -0
- package/lib/utils/isomorphic/trace/traceModernizer.js +401 -0
- package/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
- package/lib/utils/isomorphic/traceUtils.js +58 -0
- package/lib/utils/isomorphic/types.js +16 -0
- package/lib/utils/isomorphic/urlMatch.js +243 -0
- package/lib/utils/isomorphic/utilityScriptSerializers.js +262 -0
- package/lib/utils/isomorphic/yaml.js +84 -0
- package/lib/utils.js +111 -0
- package/lib/utilsBundle.js +112 -0
- package/lib/utilsBundleImpl/index.js +218 -0
- package/lib/utilsBundleImpl/xdg-open +1066 -0
- package/lib/vite/devtools/assets/index-D3CVnoLM.css +1 -0
- package/lib/vite/devtools/assets/index-wqccfruE.js +50 -0
- package/lib/vite/devtools/index.html +28 -0
- package/lib/vite/htmlReport/index.html +84 -0
- package/lib/vite/recorder/assets/codeMirrorModule-4NapTJOb.js +32 -0
- package/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +1 -0
- package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/lib/vite/recorder/assets/index-BSjZa4pk.css +1 -0
- package/lib/vite/recorder/assets/index-CD9lKVjM.js +193 -0
- package/lib/vite/recorder/index.html +29 -0
- package/lib/vite/recorder/playwright-logo.svg +9 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-RgXeHFoQ.js +32 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-DP6vvJEM.js +269 -0
- package/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +1 -0
- package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/lib/vite/traceViewer/defaultSettingsView.DQ9U-ctL.css +1 -0
- package/lib/vite/traceViewer/index.BVu7tZDe.css +1 -0
- package/lib/vite/traceViewer/index.D8YUXFVt.js +2 -0
- package/lib/vite/traceViewer/index.html +43 -0
- package/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/lib/vite/traceViewer/snapshot.html +21 -0
- package/lib/vite/traceViewer/sw.bundle.js +5 -0
- package/lib/vite/traceViewer/uiMode.BIQFTUME.js +6 -0
- package/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/lib/vite/traceViewer/uiMode.html +17 -0
- package/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/lib/zipBundle.js +34 -0
- package/lib/zipBundleImpl.js +5 -0
- package/package.json +52 -0
- package/types/protocol.d.ts +24365 -0
- package/types/structs.d.ts +45 -0
- package/types/types.d.ts +23724 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var customDomLocatorCompiler_exports = {};
|
|
20
|
+
__export(customDomLocatorCompiler_exports, {
|
|
21
|
+
compileLocatorCandidatesFromPlan: () => compileLocatorCandidatesFromPlan,
|
|
22
|
+
compileLocatorFromPlan: () => compileLocatorFromPlan,
|
|
23
|
+
inspectLocatorCandidates: () => inspectLocatorCandidates
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(customDomLocatorCompiler_exports);
|
|
26
|
+
const kPriorityOrder = [
|
|
27
|
+
"getByTestId",
|
|
28
|
+
"getByRole",
|
|
29
|
+
"filtered_getByRole",
|
|
30
|
+
"chained_getByRole",
|
|
31
|
+
"getByText",
|
|
32
|
+
"filtered_getByText",
|
|
33
|
+
"chained_getByText",
|
|
34
|
+
"getByPlaceholder",
|
|
35
|
+
"getByCss",
|
|
36
|
+
"getByXpath"
|
|
37
|
+
];
|
|
38
|
+
function compileLocatorFromPlan(frame, locatorPlan) {
|
|
39
|
+
return compileLocatorCandidatesFromPlan(frame, locatorPlan)[0]?.locator;
|
|
40
|
+
}
|
|
41
|
+
function compileLocatorCandidatesFromPlan(frame, locatorPlan) {
|
|
42
|
+
const plan = readRecord(locatorPlan);
|
|
43
|
+
if (!plan)
|
|
44
|
+
return [];
|
|
45
|
+
const candidates = [];
|
|
46
|
+
const seenSelectors = /* @__PURE__ */ new Set();
|
|
47
|
+
const addCandidate = (strategy, locator) => {
|
|
48
|
+
if (!locator)
|
|
49
|
+
return;
|
|
50
|
+
if (seenSelectors.has(locator._selector))
|
|
51
|
+
return;
|
|
52
|
+
seenSelectors.add(locator._selector);
|
|
53
|
+
candidates.push({ strategy, locator });
|
|
54
|
+
};
|
|
55
|
+
for (const strategyName of kPriorityOrder) {
|
|
56
|
+
const details = readRecord(plan[strategyName]);
|
|
57
|
+
if (!details)
|
|
58
|
+
continue;
|
|
59
|
+
addCandidate(strategyName, compileByStrategy(frame, strategyName, details));
|
|
60
|
+
}
|
|
61
|
+
const priority = Array.isArray(plan.priority) ? plan.priority : [];
|
|
62
|
+
for (const candidate of priority) {
|
|
63
|
+
if (typeof candidate !== "string")
|
|
64
|
+
continue;
|
|
65
|
+
const details = readRecord(plan[candidate]);
|
|
66
|
+
if (!details)
|
|
67
|
+
continue;
|
|
68
|
+
addCandidate(candidate, compileByStrategy(frame, candidate, details));
|
|
69
|
+
}
|
|
70
|
+
return candidates;
|
|
71
|
+
}
|
|
72
|
+
async function inspectLocatorCandidates(candidates) {
|
|
73
|
+
const attempts = [];
|
|
74
|
+
let ambiguousSeen = false;
|
|
75
|
+
for (const candidate of candidates) {
|
|
76
|
+
try {
|
|
77
|
+
const count = await candidate.locator.count();
|
|
78
|
+
const status = count === 1 ? "unique" : count > 1 ? "ambiguous" : "no-match";
|
|
79
|
+
attempts.push({
|
|
80
|
+
strategy: candidate.strategy,
|
|
81
|
+
selector: candidate.locator._selector,
|
|
82
|
+
count,
|
|
83
|
+
status
|
|
84
|
+
});
|
|
85
|
+
if (count === 1)
|
|
86
|
+
return { selected: candidate, attempts, outcome: "unique" };
|
|
87
|
+
if (count > 1)
|
|
88
|
+
ambiguousSeen = true;
|
|
89
|
+
} catch (error) {
|
|
90
|
+
attempts.push({
|
|
91
|
+
strategy: candidate.strategy,
|
|
92
|
+
selector: candidate.locator._selector,
|
|
93
|
+
status: "error",
|
|
94
|
+
error: error instanceof Error ? error.message : String(error)
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
attempts,
|
|
100
|
+
outcome: ambiguousSeen ? "ambiguous" : "no-match"
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function compileByStrategy(root, strategy, details) {
|
|
104
|
+
if (strategy === "filtered_getByRole" || strategy === "filtered_getByText")
|
|
105
|
+
return compileFiltered(root, details);
|
|
106
|
+
if (strategy === "chained_getByRole" || strategy === "chained_getByText")
|
|
107
|
+
return compileChained(root, details);
|
|
108
|
+
return compileSimple(root, strategy, details);
|
|
109
|
+
}
|
|
110
|
+
function compileSimple(root, strategy, details) {
|
|
111
|
+
if (strategy === "getByTestId") {
|
|
112
|
+
const testId = readString(details.testId);
|
|
113
|
+
if (!testId)
|
|
114
|
+
return;
|
|
115
|
+
return root.getByTestId(testId);
|
|
116
|
+
}
|
|
117
|
+
if (strategy === "getByRole") {
|
|
118
|
+
const role = readString(details.role);
|
|
119
|
+
if (!role)
|
|
120
|
+
return;
|
|
121
|
+
return root.getByRole(role, roleOptionsFromDetails(details));
|
|
122
|
+
}
|
|
123
|
+
if (strategy === "getByText") {
|
|
124
|
+
const text = readString(details.text);
|
|
125
|
+
if (!text)
|
|
126
|
+
return;
|
|
127
|
+
const exact = typeof details.exact === "boolean" ? details.exact : void 0;
|
|
128
|
+
return root.getByText(text, exact === void 0 ? void 0 : { exact });
|
|
129
|
+
}
|
|
130
|
+
if (strategy === "getByPlaceholder") {
|
|
131
|
+
const placeholder = readString(details.placeholder);
|
|
132
|
+
if (!placeholder)
|
|
133
|
+
return;
|
|
134
|
+
const exact = typeof details.exact === "boolean" ? details.exact : void 0;
|
|
135
|
+
return root.getByPlaceholder(placeholder, exact === void 0 ? void 0 : { exact });
|
|
136
|
+
}
|
|
137
|
+
if (strategy === "getByCss") {
|
|
138
|
+
const css = readString(details.css);
|
|
139
|
+
if (!css)
|
|
140
|
+
return;
|
|
141
|
+
return root.locator(css);
|
|
142
|
+
}
|
|
143
|
+
if (strategy === "getByXpath") {
|
|
144
|
+
const xpath = readString(details.xpath);
|
|
145
|
+
if (!xpath)
|
|
146
|
+
return;
|
|
147
|
+
const expression = xpath.startsWith("xpath=") ? xpath : `xpath=${xpath}`;
|
|
148
|
+
return root.locator(expression);
|
|
149
|
+
}
|
|
150
|
+
if (strategy === "getByTitle") {
|
|
151
|
+
const title = readString(details.title);
|
|
152
|
+
if (!title)
|
|
153
|
+
return;
|
|
154
|
+
const exact = typeof details.exact === "boolean" ? details.exact : void 0;
|
|
155
|
+
return root.getByTitle(title, exact === void 0 ? void 0 : { exact });
|
|
156
|
+
}
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
function compileFiltered(root, details) {
|
|
160
|
+
const base = readStrategyDescriptor(details.base);
|
|
161
|
+
if (!base)
|
|
162
|
+
return;
|
|
163
|
+
const baseLocator = compileByStrategy(root, base.strategy, base.details);
|
|
164
|
+
if (!baseLocator)
|
|
165
|
+
return;
|
|
166
|
+
const filter = readStrategyDescriptor(details.filter);
|
|
167
|
+
if (!filter)
|
|
168
|
+
return baseLocator;
|
|
169
|
+
if (filter.strategy === "getByText") {
|
|
170
|
+
const filterText = readString(filter.details.text);
|
|
171
|
+
if (filterText)
|
|
172
|
+
return baseLocator.filter({ hasText: filterText });
|
|
173
|
+
}
|
|
174
|
+
const filterLocator = compileByStrategy(baseLocator, filter.strategy, filter.details);
|
|
175
|
+
if (!filterLocator)
|
|
176
|
+
return baseLocator;
|
|
177
|
+
return baseLocator.filter({ has: filterLocator });
|
|
178
|
+
}
|
|
179
|
+
function compileChained(root, details) {
|
|
180
|
+
const anchor = readStrategyDescriptor(details.anchor);
|
|
181
|
+
const target = readStrategyDescriptor(details.target);
|
|
182
|
+
if (!anchor || !target)
|
|
183
|
+
return;
|
|
184
|
+
const anchorLocator = compileByStrategy(root, anchor.strategy, anchor.details);
|
|
185
|
+
if (!anchorLocator)
|
|
186
|
+
return;
|
|
187
|
+
return compileByStrategy(anchorLocator, target.strategy, target.details);
|
|
188
|
+
}
|
|
189
|
+
function roleOptionsFromDetails(details) {
|
|
190
|
+
const options = {};
|
|
191
|
+
if (typeof details.name === "string" && details.name)
|
|
192
|
+
options.name = details.name;
|
|
193
|
+
if (typeof details.exact === "boolean")
|
|
194
|
+
options.exact = details.exact;
|
|
195
|
+
if (typeof details.checked === "boolean")
|
|
196
|
+
options.checked = details.checked;
|
|
197
|
+
if (typeof details.disabled === "boolean")
|
|
198
|
+
options.disabled = details.disabled;
|
|
199
|
+
if (typeof details.selected === "boolean")
|
|
200
|
+
options.selected = details.selected;
|
|
201
|
+
if (typeof details.expanded === "boolean")
|
|
202
|
+
options.expanded = details.expanded;
|
|
203
|
+
if (typeof details.includeHidden === "boolean")
|
|
204
|
+
options.includeHidden = details.includeHidden;
|
|
205
|
+
if (typeof details.level === "number")
|
|
206
|
+
options.level = details.level;
|
|
207
|
+
if (typeof details.pressed === "boolean")
|
|
208
|
+
options.pressed = details.pressed;
|
|
209
|
+
return options;
|
|
210
|
+
}
|
|
211
|
+
function readStrategyDescriptor(value) {
|
|
212
|
+
const record = readRecord(value);
|
|
213
|
+
if (!record)
|
|
214
|
+
return;
|
|
215
|
+
const strategy = readString(record.strategy);
|
|
216
|
+
const details = readRecord(record.details);
|
|
217
|
+
if (!strategy || !details)
|
|
218
|
+
return;
|
|
219
|
+
return { strategy, details };
|
|
220
|
+
}
|
|
221
|
+
function readRecord(value) {
|
|
222
|
+
if (!value || typeof value !== "object")
|
|
223
|
+
return;
|
|
224
|
+
return value;
|
|
225
|
+
}
|
|
226
|
+
function readString(value) {
|
|
227
|
+
if (typeof value !== "string")
|
|
228
|
+
return;
|
|
229
|
+
const trimmed = value.trim();
|
|
230
|
+
if (!trimmed)
|
|
231
|
+
return;
|
|
232
|
+
return trimmed;
|
|
233
|
+
}
|
|
234
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
235
|
+
0 && (module.exports = {
|
|
236
|
+
compileLocatorCandidatesFromPlan,
|
|
237
|
+
compileLocatorFromPlan,
|
|
238
|
+
inspectLocatorCandidates
|
|
239
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var customDomResolverDiagnostics_exports = {};
|
|
20
|
+
__export(customDomResolverDiagnostics_exports, {
|
|
21
|
+
CustomDomResolverError: () => CustomDomResolverError,
|
|
22
|
+
formatCustomDomResolverDiagnostics: () => formatCustomDomResolverDiagnostics
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(customDomResolverDiagnostics_exports);
|
|
25
|
+
class CustomDomResolverError extends Error {
|
|
26
|
+
constructor(diagnostics) {
|
|
27
|
+
super(formatCustomDomResolverDiagnostics(diagnostics));
|
|
28
|
+
this.name = "CustomDomResolverError";
|
|
29
|
+
this.diagnostics = diagnostics;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function formatCustomDomResolverDiagnostics(diagnostics) {
|
|
33
|
+
const lines = [
|
|
34
|
+
`Ref ${diagnostics.ref} not found in the current page snapshot.`,
|
|
35
|
+
"Custom DOM resolver diagnostics:",
|
|
36
|
+
`- alias: ${formatAlias(diagnostics)}`,
|
|
37
|
+
`- locator plan: ${formatLocatorPlan(diagnostics)}`,
|
|
38
|
+
`- frame: ${formatFrame(diagnostics)}`,
|
|
39
|
+
`- candidates: ${diagnostics.candidates.total}`
|
|
40
|
+
];
|
|
41
|
+
for (const attempt of diagnostics.candidates.attempts)
|
|
42
|
+
lines.push(`- candidate ${attempt.strategy}: ${formatAttempt(attempt)}`);
|
|
43
|
+
lines.push(`- outcome: ${formatOutcome(diagnostics)}`);
|
|
44
|
+
lines.push("- action: capture a fresh snapshot if the DOM or frame tree changed.");
|
|
45
|
+
return lines.join("\n");
|
|
46
|
+
}
|
|
47
|
+
function formatAlias(diagnostics) {
|
|
48
|
+
if (diagnostics.alias.status === "missing")
|
|
49
|
+
return "not found";
|
|
50
|
+
return `found (stableId=${diagnostics.alias.stableId}, framePath=${formatFramePath(diagnostics.alias.framePath)})`;
|
|
51
|
+
}
|
|
52
|
+
function formatLocatorPlan(diagnostics) {
|
|
53
|
+
if (diagnostics.locatorPlan.status === "not-checked")
|
|
54
|
+
return "not checked";
|
|
55
|
+
if (diagnostics.locatorPlan.status === "missing")
|
|
56
|
+
return diagnostics.locatorPlan.key ? `not found (key=${diagnostics.locatorPlan.key})` : "not found";
|
|
57
|
+
return diagnostics.locatorPlan.key ? `found (key=${diagnostics.locatorPlan.key})` : "found";
|
|
58
|
+
}
|
|
59
|
+
function formatFrame(diagnostics) {
|
|
60
|
+
if (diagnostics.frame.status === "not-checked")
|
|
61
|
+
return "not checked";
|
|
62
|
+
return `${diagnostics.frame.status} (framePath=${formatFramePath(diagnostics.frame.framePath)})`;
|
|
63
|
+
}
|
|
64
|
+
function formatAttempt(attempt) {
|
|
65
|
+
const parts = [`status=${attempt.status}`];
|
|
66
|
+
if (typeof attempt.count === "number")
|
|
67
|
+
parts.push(`count=${attempt.count}`);
|
|
68
|
+
parts.push(`selector=${attempt.selector}`);
|
|
69
|
+
if (attempt.error)
|
|
70
|
+
parts.push(`error=${attempt.error}`);
|
|
71
|
+
return parts.join(", ");
|
|
72
|
+
}
|
|
73
|
+
function formatOutcome(diagnostics) {
|
|
74
|
+
switch (diagnostics.outcome.status) {
|
|
75
|
+
case "resolved":
|
|
76
|
+
return diagnostics.outcome.selectedStrategy ? `resolved via ${diagnostics.outcome.selectedStrategy}` : "resolved";
|
|
77
|
+
case "alias-missing":
|
|
78
|
+
return "alias missing";
|
|
79
|
+
case "locator-plan-missing":
|
|
80
|
+
return "locator plan missing";
|
|
81
|
+
case "frame-stale":
|
|
82
|
+
return "frame stale";
|
|
83
|
+
case "no-candidates":
|
|
84
|
+
return "no locator candidates compiled from locator plan";
|
|
85
|
+
case "no-match":
|
|
86
|
+
return "no candidate matched any element";
|
|
87
|
+
case "ambiguous":
|
|
88
|
+
return "ambiguity: one or more candidates matched multiple elements and none matched uniquely";
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function formatFramePath(framePath) {
|
|
92
|
+
if (!framePath?.length)
|
|
93
|
+
return "root";
|
|
94
|
+
return framePath.join(".");
|
|
95
|
+
}
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
CustomDomResolverError,
|
|
99
|
+
formatCustomDomResolverDiagnostics
|
|
100
|
+
});
|