@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,193 @@
|
|
|
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 validatorPrimitives_exports = {};
|
|
20
|
+
__export(validatorPrimitives_exports, {
|
|
21
|
+
ValidationError: () => ValidationError,
|
|
22
|
+
createMetadataValidator: () => createMetadataValidator,
|
|
23
|
+
findValidator: () => findValidator,
|
|
24
|
+
maybeFindValidator: () => maybeFindValidator,
|
|
25
|
+
scheme: () => scheme,
|
|
26
|
+
tAny: () => tAny,
|
|
27
|
+
tArray: () => tArray,
|
|
28
|
+
tBinary: () => tBinary,
|
|
29
|
+
tBoolean: () => tBoolean,
|
|
30
|
+
tChannel: () => tChannel,
|
|
31
|
+
tEnum: () => tEnum,
|
|
32
|
+
tFloat: () => tFloat,
|
|
33
|
+
tInt: () => tInt,
|
|
34
|
+
tObject: () => tObject,
|
|
35
|
+
tOptional: () => tOptional,
|
|
36
|
+
tString: () => tString,
|
|
37
|
+
tType: () => tType,
|
|
38
|
+
tUndefined: () => tUndefined
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(validatorPrimitives_exports);
|
|
41
|
+
class ValidationError extends Error {
|
|
42
|
+
}
|
|
43
|
+
const scheme = {};
|
|
44
|
+
function findValidator(type, method, kind) {
|
|
45
|
+
const validator = maybeFindValidator(type, method, kind);
|
|
46
|
+
if (!validator)
|
|
47
|
+
throw new ValidationError(`Unknown scheme for ${kind}: ${type}.${method}`);
|
|
48
|
+
return validator;
|
|
49
|
+
}
|
|
50
|
+
function maybeFindValidator(type, method, kind) {
|
|
51
|
+
const schemeName = type + (kind === "Initializer" ? "" : method[0].toUpperCase() + method.substring(1)) + kind;
|
|
52
|
+
return scheme[schemeName];
|
|
53
|
+
}
|
|
54
|
+
function createMetadataValidator() {
|
|
55
|
+
return tOptional(scheme["Metadata"]);
|
|
56
|
+
}
|
|
57
|
+
const tFloat = (arg, path, context) => {
|
|
58
|
+
if (arg instanceof Number)
|
|
59
|
+
return arg.valueOf();
|
|
60
|
+
if (typeof arg === "number")
|
|
61
|
+
return arg;
|
|
62
|
+
throw new ValidationError(`${path}: expected float, got ${typeof arg}`);
|
|
63
|
+
};
|
|
64
|
+
const tInt = (arg, path, context) => {
|
|
65
|
+
let value;
|
|
66
|
+
if (arg instanceof Number)
|
|
67
|
+
value = arg.valueOf();
|
|
68
|
+
else if (typeof arg === "number")
|
|
69
|
+
value = arg;
|
|
70
|
+
else
|
|
71
|
+
throw new ValidationError(`${path}: expected integer, got ${typeof arg}`);
|
|
72
|
+
if (!Number.isInteger(value))
|
|
73
|
+
throw new ValidationError(`${path}: expected integer, got float ${value}`);
|
|
74
|
+
return value;
|
|
75
|
+
};
|
|
76
|
+
const tBoolean = (arg, path, context) => {
|
|
77
|
+
if (arg instanceof Boolean)
|
|
78
|
+
return arg.valueOf();
|
|
79
|
+
if (typeof arg === "boolean")
|
|
80
|
+
return arg;
|
|
81
|
+
throw new ValidationError(`${path}: expected boolean, got ${typeof arg}`);
|
|
82
|
+
};
|
|
83
|
+
const tString = (arg, path, context) => {
|
|
84
|
+
if (arg instanceof String)
|
|
85
|
+
return arg.valueOf();
|
|
86
|
+
if (typeof arg === "string")
|
|
87
|
+
return arg;
|
|
88
|
+
throw new ValidationError(`${path}: expected string, got ${typeof arg}`);
|
|
89
|
+
};
|
|
90
|
+
const tBinary = (arg, path, context) => {
|
|
91
|
+
if (context.binary === "fromBase64") {
|
|
92
|
+
if (arg instanceof String)
|
|
93
|
+
return Buffer.from(arg.valueOf(), "base64");
|
|
94
|
+
if (typeof arg === "string")
|
|
95
|
+
return Buffer.from(arg, "base64");
|
|
96
|
+
throw new ValidationError(`${path}: expected base64-encoded buffer, got ${typeof arg}`);
|
|
97
|
+
}
|
|
98
|
+
if (context.binary === "toBase64") {
|
|
99
|
+
if (!(arg instanceof Buffer))
|
|
100
|
+
throw new ValidationError(`${path}: expected Buffer, got ${typeof arg}`);
|
|
101
|
+
return arg.toString("base64");
|
|
102
|
+
}
|
|
103
|
+
if (context.binary === "buffer") {
|
|
104
|
+
if (!(arg instanceof Buffer) && !(arg instanceof Object))
|
|
105
|
+
throw new ValidationError(`${path}: expected Buffer, got ${typeof arg}`);
|
|
106
|
+
return arg;
|
|
107
|
+
}
|
|
108
|
+
throw new ValidationError(`Unsupported binary behavior "${context.binary}"`);
|
|
109
|
+
};
|
|
110
|
+
const tUndefined = (arg, path, context) => {
|
|
111
|
+
if (Object.is(arg, void 0))
|
|
112
|
+
return arg;
|
|
113
|
+
throw new ValidationError(`${path}: expected undefined, got ${typeof arg}`);
|
|
114
|
+
};
|
|
115
|
+
const tAny = (arg, path, context) => {
|
|
116
|
+
return arg;
|
|
117
|
+
};
|
|
118
|
+
const tOptional = (v) => {
|
|
119
|
+
return (arg, path, context) => {
|
|
120
|
+
if (Object.is(arg, void 0))
|
|
121
|
+
return arg;
|
|
122
|
+
return v(arg, path, context);
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
const tArray = (v) => {
|
|
126
|
+
return (arg, path, context) => {
|
|
127
|
+
if (!Array.isArray(arg))
|
|
128
|
+
throw new ValidationError(`${path}: expected array, got ${typeof arg}`);
|
|
129
|
+
return arg.map((x, index) => v(x, path + "[" + index + "]", context));
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
const tObject = (s) => {
|
|
133
|
+
return (arg, path, context) => {
|
|
134
|
+
if (Object.is(arg, null))
|
|
135
|
+
throw new ValidationError(`${path}: expected object, got null`);
|
|
136
|
+
if (typeof arg !== "object")
|
|
137
|
+
throw new ValidationError(`${path}: expected object, got ${typeof arg}`);
|
|
138
|
+
const result = {};
|
|
139
|
+
for (const [key, v] of Object.entries(s)) {
|
|
140
|
+
const value = v(arg[key], path ? path + "." + key : key, context);
|
|
141
|
+
if (!Object.is(value, void 0))
|
|
142
|
+
result[key] = value;
|
|
143
|
+
}
|
|
144
|
+
if (context.isUnderTest()) {
|
|
145
|
+
for (const [key, value] of Object.entries(arg)) {
|
|
146
|
+
if (key.startsWith("__testHook"))
|
|
147
|
+
result[key] = value;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return result;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
const tEnum = (e) => {
|
|
154
|
+
return (arg, path, context) => {
|
|
155
|
+
if (!e.includes(arg))
|
|
156
|
+
throw new ValidationError(`${path}: expected one of (${e.join("|")})`);
|
|
157
|
+
return arg;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
const tChannel = (names) => {
|
|
161
|
+
return (arg, path, context) => {
|
|
162
|
+
return context.tChannelImpl(names, arg, path, context);
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
const tType = (name) => {
|
|
166
|
+
return (arg, path, context) => {
|
|
167
|
+
const v = scheme[name];
|
|
168
|
+
if (!v)
|
|
169
|
+
throw new ValidationError(path + ': unknown type "' + name + '"');
|
|
170
|
+
return v(arg, path, context);
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
174
|
+
0 && (module.exports = {
|
|
175
|
+
ValidationError,
|
|
176
|
+
createMetadataValidator,
|
|
177
|
+
findValidator,
|
|
178
|
+
maybeFindValidator,
|
|
179
|
+
scheme,
|
|
180
|
+
tAny,
|
|
181
|
+
tArray,
|
|
182
|
+
tBinary,
|
|
183
|
+
tBoolean,
|
|
184
|
+
tChannel,
|
|
185
|
+
tEnum,
|
|
186
|
+
tFloat,
|
|
187
|
+
tInt,
|
|
188
|
+
tObject,
|
|
189
|
+
tOptional,
|
|
190
|
+
tString,
|
|
191
|
+
tType,
|
|
192
|
+
tUndefined
|
|
193
|
+
});
|
|
@@ -0,0 +1,129 @@
|
|
|
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 playwrightConnection_exports = {};
|
|
20
|
+
__export(playwrightConnection_exports, {
|
|
21
|
+
PlaywrightConnection: () => PlaywrightConnection
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(playwrightConnection_exports);
|
|
24
|
+
var import_server = require("../server");
|
|
25
|
+
var import_android = require("../server/android/android");
|
|
26
|
+
var import_browser = require("../server/browser");
|
|
27
|
+
var import_debugControllerDispatcher = require("../server/dispatchers/debugControllerDispatcher");
|
|
28
|
+
var import_profiler = require("../server/utils/profiler");
|
|
29
|
+
var import_utils = require("../utils");
|
|
30
|
+
var import_debugLogger = require("../server/utils/debugLogger");
|
|
31
|
+
class PlaywrightConnection {
|
|
32
|
+
constructor(semaphore, transport, controller, playwright, initialize, id) {
|
|
33
|
+
this._cleanups = [];
|
|
34
|
+
this._disconnected = false;
|
|
35
|
+
this._transport = transport;
|
|
36
|
+
this._semaphore = semaphore;
|
|
37
|
+
this._id = id;
|
|
38
|
+
this._profileName = (/* @__PURE__ */ new Date()).toISOString();
|
|
39
|
+
const lock = this._semaphore.acquire();
|
|
40
|
+
this._dispatcherConnection = new import_server.DispatcherConnection();
|
|
41
|
+
this._dispatcherConnection.onmessage = async (message) => {
|
|
42
|
+
await lock;
|
|
43
|
+
if (!transport.isClosed()) {
|
|
44
|
+
const messageString = JSON.stringify(message);
|
|
45
|
+
if (import_debugLogger.debugLogger.isEnabled("server:channel"))
|
|
46
|
+
import_debugLogger.debugLogger.log("server:channel", `[${this._id}] ${(0, import_utils.monotonicTime)() * 1e3} SEND \u25BA ${messageString}`);
|
|
47
|
+
if (import_debugLogger.debugLogger.isEnabled("server:metadata"))
|
|
48
|
+
this.logServerMetadata(message, messageString, "SEND");
|
|
49
|
+
transport.send(messageString);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
transport.on("message", async (message) => {
|
|
53
|
+
await lock;
|
|
54
|
+
const messageString = Buffer.from(message).toString();
|
|
55
|
+
const jsonMessage = JSON.parse(messageString);
|
|
56
|
+
if (import_debugLogger.debugLogger.isEnabled("server:channel"))
|
|
57
|
+
import_debugLogger.debugLogger.log("server:channel", `[${this._id}] ${(0, import_utils.monotonicTime)() * 1e3} \u25C0 RECV ${messageString}`);
|
|
58
|
+
if (import_debugLogger.debugLogger.isEnabled("server:metadata"))
|
|
59
|
+
this.logServerMetadata(jsonMessage, messageString, "RECV");
|
|
60
|
+
this._dispatcherConnection.dispatch(jsonMessage);
|
|
61
|
+
});
|
|
62
|
+
transport.on("close", () => this._onDisconnect());
|
|
63
|
+
transport.on("error", (error) => this._onDisconnect(error));
|
|
64
|
+
if (controller) {
|
|
65
|
+
import_debugLogger.debugLogger.log("server", `[${this._id}] engaged reuse controller mode`);
|
|
66
|
+
this._root = new import_debugControllerDispatcher.DebugControllerDispatcher(this._dispatcherConnection, playwright.debugController);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this._root = new import_server.RootDispatcher(this._dispatcherConnection, async (scope, params) => {
|
|
70
|
+
await (0, import_profiler.startProfiling)();
|
|
71
|
+
const options = await initialize();
|
|
72
|
+
if (options.preLaunchedBrowser) {
|
|
73
|
+
const browser = options.preLaunchedBrowser;
|
|
74
|
+
browser.options.sdkLanguage = params.sdkLanguage;
|
|
75
|
+
browser.on(import_browser.Browser.Events.Disconnected, () => {
|
|
76
|
+
this.close({ code: 1001, reason: "Browser closed" });
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (options.preLaunchedAndroidDevice) {
|
|
80
|
+
const androidDevice = options.preLaunchedAndroidDevice;
|
|
81
|
+
androidDevice.on(import_android.AndroidDevice.Events.Close, () => {
|
|
82
|
+
this.close({ code: 1001, reason: "Android device disconnected" });
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (options.dispose)
|
|
86
|
+
this._cleanups.push(options.dispose);
|
|
87
|
+
const dispatcher = new import_server.PlaywrightDispatcher(scope, playwright, options);
|
|
88
|
+
this._cleanups.push(() => dispatcher.cleanup());
|
|
89
|
+
return dispatcher;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
async _onDisconnect(error) {
|
|
93
|
+
this._disconnected = true;
|
|
94
|
+
import_debugLogger.debugLogger.log("server", `[${this._id}] disconnected. error: ${error}`);
|
|
95
|
+
await this._root.stopPendingOperations(new Error("Disconnected")).catch(() => {
|
|
96
|
+
});
|
|
97
|
+
this._root._dispose();
|
|
98
|
+
import_debugLogger.debugLogger.log("server", `[${this._id}] starting cleanup`);
|
|
99
|
+
for (const cleanup of this._cleanups)
|
|
100
|
+
await cleanup().catch(() => {
|
|
101
|
+
});
|
|
102
|
+
await (0, import_profiler.stopProfiling)(this._profileName);
|
|
103
|
+
this._semaphore.release();
|
|
104
|
+
import_debugLogger.debugLogger.log("server", `[${this._id}] finished cleanup`);
|
|
105
|
+
}
|
|
106
|
+
logServerMetadata(message, messageString, direction) {
|
|
107
|
+
const serverLogMetadata = {
|
|
108
|
+
wallTime: Date.now(),
|
|
109
|
+
id: message.id,
|
|
110
|
+
guid: message.guid,
|
|
111
|
+
method: message.method,
|
|
112
|
+
payloadSizeInBytes: Buffer.byteLength(messageString, "utf-8")
|
|
113
|
+
};
|
|
114
|
+
import_debugLogger.debugLogger.log("server:metadata", (direction === "SEND" ? "SEND \u25BA " : "\u25C0 RECV ") + JSON.stringify(serverLogMetadata));
|
|
115
|
+
}
|
|
116
|
+
async close(reason) {
|
|
117
|
+
if (this._disconnected)
|
|
118
|
+
return;
|
|
119
|
+
import_debugLogger.debugLogger.log("server", `[${this._id}] force closing connection: ${reason?.reason || ""} (${reason?.code || 0})`);
|
|
120
|
+
try {
|
|
121
|
+
this._transport.close(reason);
|
|
122
|
+
} catch (e) {
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
127
|
+
0 && (module.exports = {
|
|
128
|
+
PlaywrightConnection
|
|
129
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
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 playwrightPipeServer_exports = {};
|
|
30
|
+
__export(playwrightPipeServer_exports, {
|
|
31
|
+
PlaywrightPipeServer: () => PlaywrightPipeServer
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(playwrightPipeServer_exports);
|
|
34
|
+
var import_net = __toESM(require("net"));
|
|
35
|
+
var import_fs = __toESM(require("fs"));
|
|
36
|
+
var import_playwrightConnection = require("./playwrightConnection");
|
|
37
|
+
var import_serverTransport = require("./serverTransport");
|
|
38
|
+
var import_debugLogger = require("../server/utils/debugLogger");
|
|
39
|
+
var import_browser = require("../server/browser");
|
|
40
|
+
var import_utils = require("../utils");
|
|
41
|
+
class PlaywrightPipeServer {
|
|
42
|
+
constructor(browser) {
|
|
43
|
+
this._connections = /* @__PURE__ */ new Set();
|
|
44
|
+
this._connectionId = 0;
|
|
45
|
+
this._browser = browser;
|
|
46
|
+
browser.on(import_browser.Browser.Events.Disconnected, () => this.close());
|
|
47
|
+
}
|
|
48
|
+
async listen(pipeName) {
|
|
49
|
+
if (!pipeName.startsWith("\\\\.\\pipe\\")) {
|
|
50
|
+
try {
|
|
51
|
+
import_fs.default.unlinkSync(pipeName);
|
|
52
|
+
} catch {
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
this._server = import_net.default.createServer((socket) => {
|
|
56
|
+
const id = String(++this._connectionId);
|
|
57
|
+
import_debugLogger.debugLogger.log("server", `[${id}] pipe client connected`);
|
|
58
|
+
const transport = new import_serverTransport.SocketServerTransport(socket);
|
|
59
|
+
const connection = new import_playwrightConnection.PlaywrightConnection(
|
|
60
|
+
new import_utils.Semaphore(1),
|
|
61
|
+
transport,
|
|
62
|
+
false,
|
|
63
|
+
this._browser.attribution.playwright,
|
|
64
|
+
() => this._initPreLaunchedBrowserMode(id),
|
|
65
|
+
id
|
|
66
|
+
);
|
|
67
|
+
this._connections.add(connection);
|
|
68
|
+
transport.on("close", () => this._connections.delete(connection));
|
|
69
|
+
});
|
|
70
|
+
(0, import_utils.decorateServer)(this._server);
|
|
71
|
+
await new Promise((resolve, reject) => {
|
|
72
|
+
this._server.listen(pipeName, () => resolve());
|
|
73
|
+
this._server.on("error", reject);
|
|
74
|
+
});
|
|
75
|
+
import_debugLogger.debugLogger.log("server", `Pipe server listening at ${pipeName}`);
|
|
76
|
+
}
|
|
77
|
+
async _initPreLaunchedBrowserMode(id) {
|
|
78
|
+
import_debugLogger.debugLogger.log("server", `[${id}] engaged pre-launched (browser) pipe mode`);
|
|
79
|
+
return {
|
|
80
|
+
preLaunchedBrowser: this._browser,
|
|
81
|
+
sharedBrowser: true,
|
|
82
|
+
denyLaunch: true
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
async close() {
|
|
86
|
+
if (!this._server)
|
|
87
|
+
return;
|
|
88
|
+
import_debugLogger.debugLogger.log("server", "closing pipe server");
|
|
89
|
+
for (const connection of this._connections)
|
|
90
|
+
await connection.close({ code: 1001, reason: "Server closing" });
|
|
91
|
+
this._connections.clear();
|
|
92
|
+
await new Promise((f) => this._server.close(() => f()));
|
|
93
|
+
this._server = void 0;
|
|
94
|
+
import_debugLogger.debugLogger.log("server", "closed pipe server");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
98
|
+
0 && (module.exports = {
|
|
99
|
+
PlaywrightPipeServer
|
|
100
|
+
});
|