rechrome 1.35.0 → 1.36.0
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 +74 -0
- package/extension/lib/background.mjs +28 -1
- package/extension/lib/ui/connect.js +29 -19
- package/listeners.js +17 -1
- package/listeners.ts +7 -2
- package/package.json +5 -3
- package/rechrome.js +64 -16
- package/rechrome.ts +64 -16
- package/scoped-upload.js +165 -0
- package/scoped-upload.ts +140 -0
- package/serve.js +30 -2
- package/serve.ts +30 -2
- package/vendor/playwright-cli/node_modules/playwright-core/lib/coreBundle.js +360 -256
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/help.json +9 -4
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/program.js +6 -1
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/session.js +10 -12
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/extension.js +8 -5
- package/vendor/playwright-cli/node_modules/playwright-core/lib/androidServerImpl.js +0 -65
- package/vendor/playwright-cli/node_modules/playwright-core/lib/browserServerImpl.js +0 -120
- package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/driver.js +0 -98
- package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/program.js +0 -597
- package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/programWithTestStub.js +0 -74
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/android.js +0 -361
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/api.js +0 -137
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/artifact.js +0 -79
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browser.js +0 -169
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browserContext.js +0 -583
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browserType.js +0 -153
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/cdpSession.js +0 -55
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/channelOwner.js +0 -194
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientHelper.js +0 -64
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientInstrumentation.js +0 -55
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientStackTrace.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clock.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/connect.js +0 -143
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/connection.js +0 -322
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/consoleMessage.js +0 -61
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/coverage.js +0 -44
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/debugger.js +0 -57
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/dialog.js +0 -56
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/disposable.js +0 -76
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/download.js +0 -62
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/electron.js +0 -138
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/elementHandle.js +0 -281
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/errors.js +0 -77
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/eventEmitter.js +0 -314
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/events.js +0 -103
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fetch.js +0 -367
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fileChooser.js +0 -46
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fileUtils.js +0 -34
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/frame.js +0 -404
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/harRouter.js +0 -99
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/input.js +0 -84
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/jsHandle.js +0 -105
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/jsonPipe.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/localUtils.js +0 -60
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/locator.js +0 -367
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/network.js +0 -750
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/page.js +0 -729
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/platform.js +0 -77
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/playwright.js +0 -71
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/screencast.js +0 -48
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/selectors.js +0 -57
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/stream.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/timeoutSettings.js +0 -79
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/tracing.js +0 -126
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/types.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/video.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/waiter.js +0 -142
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/webError.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/worker.js +0 -85
- package/vendor/playwright-cli/node_modules/playwright-core/lib/client/writableStream.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/clockSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/injectedScriptSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/storageScriptSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/utilityScriptSource.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/webSocketMockSource.js +0 -336
- package/vendor/playwright-cli/node_modules/playwright-core/lib/inProcessFactory.js +0 -60
- package/vendor/playwright-cli/node_modules/playwright-core/lib/inprocess.js +0 -3
- package/vendor/playwright-cli/node_modules/playwright-core/lib/mcpBundle.js +0 -81
- package/vendor/playwright-cli/node_modules/playwright-core/lib/mcpBundleImpl/index.js +0 -91
- package/vendor/playwright-cli/node_modules/playwright-core/lib/outofprocess.js +0 -76
- package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/serializers.js +0 -197
- package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/validator.js +0 -3034
- package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +0 -193
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightConnection.js +0 -131
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightPipeServer.js +0 -100
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightServer.js +0 -339
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightWebSocketServer.js +0 -73
- package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/serverTransport.js +0 -96
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/android/android.js +0 -465
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/android/backendAdb.js +0 -177
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/artifact.js +0 -127
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +0 -571
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +0 -162
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +0 -213
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js +0 -116
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +0 -267
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +0 -128
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiInput.js +0 -146
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +0 -411
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +0 -102
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiPage.js +0 -599
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +0 -106
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +0 -24
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +0 -180
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +0 -42
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +0 -148
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +0 -261
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browser.js +0 -223
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browserContext.js +0 -703
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browserType.js +0 -338
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/callLog.js +0 -82
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/chromium.js +0 -399
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +0 -104
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crBrowser.js +0 -532
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crConnection.js +0 -197
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crCoverage.js +0 -235
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crDevTools.js +0 -111
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +0 -131
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +0 -146
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crInput.js +0 -187
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +0 -708
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crPage.js +0 -1004
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crPdf.js +0 -121
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +0 -145
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +0 -137
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +0 -162
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/protocol.d.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/clock.js +0 -149
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/csharp.js +0 -327
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/java.js +0 -274
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/javascript.js +0 -247
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/jsonl.js +0 -52
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/language.js +0 -132
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/languages.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/python.js +0 -279
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/types.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/console.js +0 -61
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/cookieStore.js +0 -206
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/debugController.js +0 -197
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/debugger.js +0 -120
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/deviceDescriptors.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dialog.js +0 -116
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +0 -325
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +0 -118
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +0 -381
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +0 -124
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +0 -71
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +0 -47
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +0 -78
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/debuggerDispatcher.js +0 -80
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +0 -47
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +0 -364
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/disposableDispatcher.js +0 -39
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +0 -90
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +0 -181
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +0 -227
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +0 -85
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +0 -185
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +0 -214
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +0 -434
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +0 -108
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +0 -67
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -164
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +0 -79
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/disposable.js +0 -41
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dom.js +0 -823
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/download.js +0 -71
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/electron/electron.js +0 -272
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/electron/loader.js +0 -115
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/errors.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fetch.js +0 -621
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fileChooser.js +0 -43
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fileUploadUtils.js +0 -84
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +0 -415
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffConnection.js +0 -142
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +0 -150
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffInput.js +0 -175
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +0 -256
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffPage.js +0 -495
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/firefox.js +0 -114
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/protocol.d.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/formData.js +0 -147
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/frameSelectors.js +0 -160
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/frames.js +0 -1495
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/har/harRecorder.js +0 -147
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/har/harTracer.js +0 -608
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/harBackend.js +0 -157
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/helper.js +0 -96
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/index.js +0 -58
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/input.js +0 -277
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/instrumentation.js +0 -72
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/javascript.js +0 -291
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/launchApp.js +0 -127
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/localUtils.js +0 -214
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/macEditingCommands.js +0 -143
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/network.js +0 -668
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/page.js +0 -884
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/pipeTransport.js +0 -89
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/playwright.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/progress.js +0 -136
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/protocolError.js +0 -52
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/chat.js +0 -161
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderApp.js +0 -367
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +0 -138
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +0 -83
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +0 -157
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/throttledFile.js +0 -57
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder.js +0 -540
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/browserFetcher.js +0 -177
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/dependencies.js +0 -371
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/index.js +0 -1395
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/nativeDeps.js +0 -1281
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +0 -127
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/screencast.js +0 -216
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/screenshotter.js +0 -333
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/selectors.js +0 -112
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +0 -383
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/socksInterceptor.js +0 -95
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +0 -147
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +0 -561
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +0 -607
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +0 -244
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/transport.js +0 -181
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/types.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/usKeyboardLayout.js +0 -152
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/ascii.js +0 -44
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/comparators.js +0 -139
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/crypto.js +0 -216
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/debug.js +0 -42
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/debugLogger.js +0 -122
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/disposable.js +0 -32
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/env.js +0 -73
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/eventsHelper.js +0 -41
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/expectUtils.js +0 -123
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/fileUtils.js +0 -191
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +0 -207
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/hostPlatform.js +0 -123
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/httpServer.js +0 -205
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +0 -89
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +0 -109
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +0 -78
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +0 -102
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/linuxUtils.js +0 -71
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/network.js +0 -244
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/nodePlatform.js +0 -154
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/pipeTransport.js +0 -84
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/processLauncher.js +0 -243
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/profiler.js +0 -65
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/socksProxy.js +0 -511
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/spawnAsync.js +0 -41
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/task.js +0 -51
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/userAgent.js +0 -98
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/wsServer.js +0 -121
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/zipFile.js +0 -74
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/zones.js +0 -57
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/videoRecorder.js +0 -133
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/protocol.d.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/webkit.js +0 -108
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +0 -331
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkConnection.js +0 -144
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +0 -154
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkInput.js +0 -181
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +0 -197
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkPage.js +0 -1164
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +0 -83
- package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +0 -106
- package/vendor/playwright-cli/node_modules/playwright-core/lib/third_party/pixelmatch.js +0 -255
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/browserBackend.js +0 -79
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/common.js +0 -63
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/config.js +0 -41
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/console.js +0 -66
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/context.js +0 -290
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/cookies.js +0 -152
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/devtools.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/dialogs.js +0 -59
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/evaluate.js +0 -64
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/files.js +0 -60
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/form.js +0 -64
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/keyboard.js +0 -155
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/logFile.js +0 -95
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/mouse.js +0 -168
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/navigate.js +0 -106
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/network.js +0 -135
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/pdf.js +0 -48
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/response.js +0 -302
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/route.js +0 -140
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/runCode.js +0 -76
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/screenshot.js +0 -88
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/sessionLog.js +0 -74
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/snapshot.js +0 -208
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/storage.js +0 -67
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tab.js +0 -445
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tabs.js +0 -67
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tool.js +0 -47
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tools.js +0 -102
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tracing.js +0 -75
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/utils.js +0 -83
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/verify.js +0 -151
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/video.js +0 -89
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/wait.js +0 -63
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/webstorage.js +0 -223
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/command.js +0 -73
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/commands.js +0 -933
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/daemon.js +0 -178
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/helpGenerator.js +0 -173
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/program.js +0 -118
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/dashboard/dashboardApp.js +0 -286
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/dashboard/dashboardController.js +0 -296
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/exports.js +0 -60
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/browserFactory.js +0 -233
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/cdpRelay.js +0 -356
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/cli-stub.js +0 -7
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/config.d.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/config.js +0 -401
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/configIni.js +0 -189
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/extensionContextFactory.js +0 -59
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/index.js +0 -62
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/log.js +0 -35
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/program.js +0 -107
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/protocol.js +0 -28
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/watchdog.js +0 -44
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/installSkill.js +0 -48
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceActions.js +0 -142
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceAttachments.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceCli.js +0 -80
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceConsole.js +0 -97
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceErrors.js +0 -55
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceOpen.js +0 -69
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceParser.js +0 -96
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceRequests.js +0 -158
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceScreenshot.js +0 -68
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceSnapshot.js +0 -149
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceUtils.js +0 -135
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/connect.js +0 -32
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/http.js +0 -152
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/server.js +0 -230
- package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/tool.js +0 -47
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +0 -455
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/assert.js +0 -31
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/colors.js +0 -72
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +0 -245
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +0 -1051
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/formatUtils.js +0 -64
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/headers.js +0 -53
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/imageUtils.js +0 -141
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +0 -689
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +0 -176
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +0 -81
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/lruCache.js +0 -51
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +0 -114
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +0 -464
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +0 -80
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +0 -81
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +0 -342
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +0 -43
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +0 -386
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +0 -54
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +0 -158
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +0 -204
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/time.js +0 -49
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +0 -66
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +0 -502
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +0 -120
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +0 -89
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +0 -131
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js +0 -366
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +0 -401
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceUtils.js +0 -58
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/types.js +0 -16
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +0 -243
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +0 -262
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/yaml.js +0 -84
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utils.js +0 -113
- package/vendor/playwright-cli/node_modules/playwright-core/lib/utilsBundleImpl/index.js +0 -218
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BtGnd8kr.js +0 -32
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-CnvO0fko.js +0 -32
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-BkMbME_o.js +0 -262
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CN3cwLGD.js +0 -262
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.B4dS75f0.css +0 -1
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.DcQiWcKS.css +0 -1
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/index.B2ffe31o.js +0 -2
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/index.Df3uWWXm.js +0 -2
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.BZQ54Kgt.css +0 -1
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CmAqMvmy.js +0 -6
- package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.u9Eas4CP.js +0 -6
- package/vendor/playwright-cli/node_modules/playwright-core/lib/zipBundle.js +0 -34
- package/vendor/playwright-cli/node_modules/playwright-core/lib/zipBundleImpl.js +0 -5
|
@@ -1,401 +0,0 @@
|
|
|
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 config_exports = {};
|
|
30
|
-
__export(config_exports, {
|
|
31
|
-
commaSeparatedList: () => commaSeparatedList,
|
|
32
|
-
configFromCLIOptions: () => configFromCLIOptions,
|
|
33
|
-
configFromEnv: () => configFromEnv,
|
|
34
|
-
defaultConfig: () => defaultConfig,
|
|
35
|
-
dotenvFileLoader: () => dotenvFileLoader,
|
|
36
|
-
enumParser: () => enumParser,
|
|
37
|
-
headerParser: () => headerParser,
|
|
38
|
-
loadConfig: () => loadConfig,
|
|
39
|
-
mergeConfig: () => mergeConfig,
|
|
40
|
-
numberParser: () => numberParser,
|
|
41
|
-
resolutionParser: () => resolutionParser,
|
|
42
|
-
resolveCLIConfig: () => resolveCLIConfig,
|
|
43
|
-
resolveConfig: () => resolveConfig,
|
|
44
|
-
semicolonSeparatedList: () => semicolonSeparatedList,
|
|
45
|
-
validateConfig: () => validateConfig
|
|
46
|
-
});
|
|
47
|
-
module.exports = __toCommonJS(config_exports);
|
|
48
|
-
var import_fs = __toESM(require("fs"));
|
|
49
|
-
var import_os = __toESM(require("os"));
|
|
50
|
-
var import__ = require("../../..");
|
|
51
|
-
var import_utilsBundle = require("../../utilsBundle");
|
|
52
|
-
var import_configIni = require("./configIni");
|
|
53
|
-
async function fileExistsAsync(resolved) {
|
|
54
|
-
try {
|
|
55
|
-
return (await import_fs.default.promises.stat(resolved)).isFile();
|
|
56
|
-
} catch {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
const defaultConfig = {
|
|
61
|
-
browser: {
|
|
62
|
-
browserName: "chromium",
|
|
63
|
-
launchOptions: {
|
|
64
|
-
channel: "chrome",
|
|
65
|
-
headless: import_os.default.platform() === "linux" && !process.env.DISPLAY
|
|
66
|
-
},
|
|
67
|
-
contextOptions: {
|
|
68
|
-
viewport: null
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
server: {},
|
|
72
|
-
timeouts: {
|
|
73
|
-
action: 5e3,
|
|
74
|
-
navigation: 6e4,
|
|
75
|
-
expect: 5e3
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
async function resolveConfig(config) {
|
|
79
|
-
return mergeConfig(defaultConfig, config);
|
|
80
|
-
}
|
|
81
|
-
async function resolveCLIConfig(cliOptions) {
|
|
82
|
-
const envOverrides = configFromEnv();
|
|
83
|
-
const cliOverrides = configFromCLIOptions(cliOptions);
|
|
84
|
-
const configFile = cliOverrides.configFile ?? envOverrides.configFile;
|
|
85
|
-
const configInFile = await loadConfig(configFile);
|
|
86
|
-
let result = defaultConfig;
|
|
87
|
-
result = mergeConfig(result, configInFile);
|
|
88
|
-
result = mergeConfig(result, envOverrides);
|
|
89
|
-
result = mergeConfig(result, cliOverrides);
|
|
90
|
-
result.configFile = configFile;
|
|
91
|
-
await validateConfig(result);
|
|
92
|
-
return result;
|
|
93
|
-
}
|
|
94
|
-
async function validateConfig(config) {
|
|
95
|
-
if (config.browser.browserName === "chromium" && config.browser.launchOptions.chromiumSandbox === void 0) {
|
|
96
|
-
if (process.platform === "linux")
|
|
97
|
-
config.browser.launchOptions.chromiumSandbox = config.browser.launchOptions.channel !== "chromium" && config.browser.launchOptions.channel !== "chrome-for-testing";
|
|
98
|
-
else
|
|
99
|
-
config.browser.launchOptions.chromiumSandbox = true;
|
|
100
|
-
}
|
|
101
|
-
if (config.browser.isolated && config.browser.userDataDir)
|
|
102
|
-
throw new Error("Browser userDataDir is not supported in isolated mode.");
|
|
103
|
-
if (config.browser.initScript) {
|
|
104
|
-
for (const script of config.browser.initScript) {
|
|
105
|
-
if (!await fileExistsAsync(script))
|
|
106
|
-
throw new Error(`Init script file does not exist: ${script}`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (config.browser.initPage) {
|
|
110
|
-
for (const page of config.browser.initPage) {
|
|
111
|
-
if (!await fileExistsAsync(page))
|
|
112
|
-
throw new Error(`Init page file does not exist: ${page}`);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function configFromCLIOptions(cliOptions) {
|
|
117
|
-
let browserName;
|
|
118
|
-
let channel;
|
|
119
|
-
switch (cliOptions.browser) {
|
|
120
|
-
case "chrome":
|
|
121
|
-
case "chrome-beta":
|
|
122
|
-
case "chrome-canary":
|
|
123
|
-
case "chrome-dev":
|
|
124
|
-
case "msedge":
|
|
125
|
-
case "msedge-beta":
|
|
126
|
-
case "msedge-canary":
|
|
127
|
-
case "msedge-dev":
|
|
128
|
-
browserName = "chromium";
|
|
129
|
-
channel = cliOptions.browser;
|
|
130
|
-
break;
|
|
131
|
-
case "chromium":
|
|
132
|
-
browserName = "chromium";
|
|
133
|
-
channel = "chrome-for-testing";
|
|
134
|
-
break;
|
|
135
|
-
case "firefox":
|
|
136
|
-
browserName = "firefox";
|
|
137
|
-
break;
|
|
138
|
-
case "webkit":
|
|
139
|
-
browserName = "webkit";
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
const launchOptions = {
|
|
143
|
-
channel,
|
|
144
|
-
executablePath: cliOptions.executablePath,
|
|
145
|
-
headless: cliOptions.headless
|
|
146
|
-
};
|
|
147
|
-
if (cliOptions.sandbox !== void 0)
|
|
148
|
-
launchOptions.chromiumSandbox = cliOptions.sandbox;
|
|
149
|
-
if (cliOptions.proxyServer) {
|
|
150
|
-
launchOptions.proxy = {
|
|
151
|
-
server: cliOptions.proxyServer
|
|
152
|
-
};
|
|
153
|
-
if (cliOptions.proxyBypass)
|
|
154
|
-
launchOptions.proxy.bypass = cliOptions.proxyBypass;
|
|
155
|
-
}
|
|
156
|
-
if (cliOptions.device && cliOptions.cdpEndpoint)
|
|
157
|
-
throw new Error("Device emulation is not supported with cdpEndpoint.");
|
|
158
|
-
const contextOptions = cliOptions.device ? import__.devices[cliOptions.device] : {};
|
|
159
|
-
if (cliOptions.storageState)
|
|
160
|
-
contextOptions.storageState = cliOptions.storageState;
|
|
161
|
-
if (cliOptions.userAgent)
|
|
162
|
-
contextOptions.userAgent = cliOptions.userAgent;
|
|
163
|
-
if (cliOptions.viewportSize)
|
|
164
|
-
contextOptions.viewport = cliOptions.viewportSize;
|
|
165
|
-
if (cliOptions.ignoreHttpsErrors)
|
|
166
|
-
contextOptions.ignoreHTTPSErrors = true;
|
|
167
|
-
if (cliOptions.blockServiceWorkers)
|
|
168
|
-
contextOptions.serviceWorkers = "block";
|
|
169
|
-
if (cliOptions.grantPermissions)
|
|
170
|
-
contextOptions.permissions = cliOptions.grantPermissions;
|
|
171
|
-
const config = {
|
|
172
|
-
browser: {
|
|
173
|
-
browserName,
|
|
174
|
-
isolated: cliOptions.isolated,
|
|
175
|
-
userDataDir: cliOptions.userDataDir,
|
|
176
|
-
launchOptions,
|
|
177
|
-
contextOptions,
|
|
178
|
-
cdpEndpoint: cliOptions.cdpEndpoint,
|
|
179
|
-
cdpHeaders: cliOptions.cdpHeader,
|
|
180
|
-
cdpTimeout: cliOptions.cdpTimeout,
|
|
181
|
-
initPage: cliOptions.initPage,
|
|
182
|
-
initScript: cliOptions.initScript
|
|
183
|
-
},
|
|
184
|
-
extension: cliOptions.extension,
|
|
185
|
-
server: {
|
|
186
|
-
port: cliOptions.port,
|
|
187
|
-
host: cliOptions.host,
|
|
188
|
-
allowedHosts: cliOptions.allowedHosts
|
|
189
|
-
},
|
|
190
|
-
capabilities: cliOptions.caps,
|
|
191
|
-
console: {
|
|
192
|
-
level: cliOptions.consoleLevel
|
|
193
|
-
},
|
|
194
|
-
network: {
|
|
195
|
-
allowedOrigins: cliOptions.allowedOrigins,
|
|
196
|
-
blockedOrigins: cliOptions.blockedOrigins
|
|
197
|
-
},
|
|
198
|
-
allowUnrestrictedFileAccess: cliOptions.allowUnrestrictedFileAccess,
|
|
199
|
-
codegen: cliOptions.codegen,
|
|
200
|
-
saveSession: cliOptions.saveSession,
|
|
201
|
-
secrets: cliOptions.secrets,
|
|
202
|
-
sharedBrowserContext: cliOptions.sharedBrowserContext,
|
|
203
|
-
snapshot: cliOptions.snapshotMode ? { mode: cliOptions.snapshotMode } : void 0,
|
|
204
|
-
outputDir: cliOptions.outputDir,
|
|
205
|
-
imageResponses: cliOptions.imageResponses,
|
|
206
|
-
testIdAttribute: cliOptions.testIdAttribute,
|
|
207
|
-
timeouts: {
|
|
208
|
-
action: cliOptions.timeoutAction,
|
|
209
|
-
navigation: cliOptions.timeoutNavigation
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
return { ...config, configFile: cliOptions.config };
|
|
213
|
-
}
|
|
214
|
-
function configFromEnv() {
|
|
215
|
-
const options = {};
|
|
216
|
-
options.allowedHosts = commaSeparatedList(process.env.PLAYWRIGHT_MCP_ALLOWED_HOSTS);
|
|
217
|
-
options.allowedOrigins = semicolonSeparatedList(process.env.PLAYWRIGHT_MCP_ALLOWED_ORIGINS);
|
|
218
|
-
options.allowUnrestrictedFileAccess = envToBoolean(process.env.PLAYWRIGHT_MCP_ALLOW_UNRESTRICTED_FILE_ACCESS);
|
|
219
|
-
options.blockedOrigins = semicolonSeparatedList(process.env.PLAYWRIGHT_MCP_BLOCKED_ORIGINS);
|
|
220
|
-
options.blockServiceWorkers = envToBoolean(process.env.PLAYWRIGHT_MCP_BLOCK_SERVICE_WORKERS);
|
|
221
|
-
options.browser = envToString(process.env.PLAYWRIGHT_MCP_BROWSER);
|
|
222
|
-
options.caps = commaSeparatedList(process.env.PLAYWRIGHT_MCP_CAPS);
|
|
223
|
-
options.cdpEndpoint = envToString(process.env.PLAYWRIGHT_MCP_CDP_ENDPOINT);
|
|
224
|
-
options.cdpHeader = headerParser(process.env.PLAYWRIGHT_MCP_CDP_HEADERS, {});
|
|
225
|
-
options.cdpTimeout = numberParser(process.env.PLAYWRIGHT_MCP_CDP_TIMEOUT);
|
|
226
|
-
options.config = envToString(process.env.PLAYWRIGHT_MCP_CONFIG);
|
|
227
|
-
if (process.env.PLAYWRIGHT_MCP_CONSOLE_LEVEL)
|
|
228
|
-
options.consoleLevel = enumParser("--console-level", ["error", "warning", "info", "debug"], process.env.PLAYWRIGHT_MCP_CONSOLE_LEVEL);
|
|
229
|
-
options.device = envToString(process.env.PLAYWRIGHT_MCP_DEVICE);
|
|
230
|
-
options.executablePath = envToString(process.env.PLAYWRIGHT_MCP_EXECUTABLE_PATH);
|
|
231
|
-
options.extension = envToBoolean(process.env.PLAYWRIGHT_MCP_EXTENSION);
|
|
232
|
-
options.grantPermissions = commaSeparatedList(process.env.PLAYWRIGHT_MCP_GRANT_PERMISSIONS);
|
|
233
|
-
options.headless = envToBoolean(process.env.PLAYWRIGHT_MCP_HEADLESS);
|
|
234
|
-
options.host = envToString(process.env.PLAYWRIGHT_MCP_HOST);
|
|
235
|
-
options.ignoreHttpsErrors = envToBoolean(process.env.PLAYWRIGHT_MCP_IGNORE_HTTPS_ERRORS);
|
|
236
|
-
const initPage = envToString(process.env.PLAYWRIGHT_MCP_INIT_PAGE);
|
|
237
|
-
if (initPage)
|
|
238
|
-
options.initPage = [initPage];
|
|
239
|
-
const initScript = envToString(process.env.PLAYWRIGHT_MCP_INIT_SCRIPT);
|
|
240
|
-
if (initScript)
|
|
241
|
-
options.initScript = [initScript];
|
|
242
|
-
options.isolated = envToBoolean(process.env.PLAYWRIGHT_MCP_ISOLATED);
|
|
243
|
-
if (process.env.PLAYWRIGHT_MCP_IMAGE_RESPONSES)
|
|
244
|
-
options.imageResponses = enumParser("--image-responses", ["allow", "omit"], process.env.PLAYWRIGHT_MCP_IMAGE_RESPONSES);
|
|
245
|
-
options.sandbox = envToBoolean(process.env.PLAYWRIGHT_MCP_SANDBOX);
|
|
246
|
-
options.outputDir = envToString(process.env.PLAYWRIGHT_MCP_OUTPUT_DIR);
|
|
247
|
-
options.port = numberParser(process.env.PLAYWRIGHT_MCP_PORT);
|
|
248
|
-
options.proxyBypass = envToString(process.env.PLAYWRIGHT_MCP_PROXY_BYPASS);
|
|
249
|
-
options.proxyServer = envToString(process.env.PLAYWRIGHT_MCP_PROXY_SERVER);
|
|
250
|
-
options.secrets = dotenvFileLoader(process.env.PLAYWRIGHT_MCP_SECRETS_FILE);
|
|
251
|
-
options.storageState = envToString(process.env.PLAYWRIGHT_MCP_STORAGE_STATE);
|
|
252
|
-
options.testIdAttribute = envToString(process.env.PLAYWRIGHT_MCP_TEST_ID_ATTRIBUTE);
|
|
253
|
-
options.timeoutAction = numberParser(process.env.PLAYWRIGHT_MCP_TIMEOUT_ACTION);
|
|
254
|
-
options.timeoutNavigation = numberParser(process.env.PLAYWRIGHT_MCP_TIMEOUT_NAVIGATION);
|
|
255
|
-
options.userAgent = envToString(process.env.PLAYWRIGHT_MCP_USER_AGENT);
|
|
256
|
-
options.userDataDir = envToString(process.env.PLAYWRIGHT_MCP_USER_DATA_DIR);
|
|
257
|
-
options.viewportSize = resolutionParser("--viewport-size", process.env.PLAYWRIGHT_MCP_VIEWPORT_SIZE);
|
|
258
|
-
return configFromCLIOptions(options);
|
|
259
|
-
}
|
|
260
|
-
async function loadConfig(configFile) {
|
|
261
|
-
if (!configFile)
|
|
262
|
-
return {};
|
|
263
|
-
if (configFile.endsWith(".ini"))
|
|
264
|
-
return (0, import_configIni.configFromIniFile)(configFile);
|
|
265
|
-
try {
|
|
266
|
-
const data = await import_fs.default.promises.readFile(configFile, "utf8");
|
|
267
|
-
return JSON.parse(data.charCodeAt(0) === 65279 ? data.slice(1) : data);
|
|
268
|
-
} catch {
|
|
269
|
-
return (0, import_configIni.configFromIniFile)(configFile);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
function pickDefined(obj) {
|
|
273
|
-
return Object.fromEntries(
|
|
274
|
-
Object.entries(obj ?? {}).filter(([_, v]) => v !== void 0)
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
function mergeConfig(base, overrides) {
|
|
278
|
-
const browser = {
|
|
279
|
-
...pickDefined(base.browser),
|
|
280
|
-
...pickDefined(overrides.browser),
|
|
281
|
-
browserName: overrides.browser?.browserName ?? base.browser?.browserName ?? "chromium",
|
|
282
|
-
isolated: overrides.browser?.isolated ?? base.browser?.isolated,
|
|
283
|
-
launchOptions: {
|
|
284
|
-
...pickDefined(base.browser?.launchOptions),
|
|
285
|
-
...pickDefined(overrides.browser?.launchOptions),
|
|
286
|
-
// Assistant mode is not a part of the public API.
|
|
287
|
-
...{ assistantMode: true }
|
|
288
|
-
},
|
|
289
|
-
contextOptions: {
|
|
290
|
-
...pickDefined(base.browser?.contextOptions),
|
|
291
|
-
...pickDefined(overrides.browser?.contextOptions)
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
if (browser.browserName !== "chromium" && browser.launchOptions)
|
|
295
|
-
delete browser.launchOptions.channel;
|
|
296
|
-
return {
|
|
297
|
-
...pickDefined(base),
|
|
298
|
-
...pickDefined(overrides),
|
|
299
|
-
browser,
|
|
300
|
-
console: {
|
|
301
|
-
...pickDefined(base.console),
|
|
302
|
-
...pickDefined(overrides.console)
|
|
303
|
-
},
|
|
304
|
-
network: {
|
|
305
|
-
...pickDefined(base.network),
|
|
306
|
-
...pickDefined(overrides.network)
|
|
307
|
-
},
|
|
308
|
-
server: {
|
|
309
|
-
...pickDefined(base.server),
|
|
310
|
-
...pickDefined(overrides.server)
|
|
311
|
-
},
|
|
312
|
-
snapshot: {
|
|
313
|
-
...pickDefined(base.snapshot),
|
|
314
|
-
...pickDefined(overrides.snapshot)
|
|
315
|
-
},
|
|
316
|
-
timeouts: {
|
|
317
|
-
...pickDefined(base.timeouts),
|
|
318
|
-
...pickDefined(overrides.timeouts)
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
function semicolonSeparatedList(value) {
|
|
323
|
-
if (!value)
|
|
324
|
-
return void 0;
|
|
325
|
-
return value.split(";").map((v) => v.trim());
|
|
326
|
-
}
|
|
327
|
-
function commaSeparatedList(value) {
|
|
328
|
-
if (!value)
|
|
329
|
-
return void 0;
|
|
330
|
-
return value.split(",").map((v) => v.trim());
|
|
331
|
-
}
|
|
332
|
-
function dotenvFileLoader(value) {
|
|
333
|
-
if (!value)
|
|
334
|
-
return void 0;
|
|
335
|
-
return import_utilsBundle.dotenv.parse(import_fs.default.readFileSync(value, "utf8"));
|
|
336
|
-
}
|
|
337
|
-
function numberParser(value) {
|
|
338
|
-
if (!value)
|
|
339
|
-
return void 0;
|
|
340
|
-
return +value;
|
|
341
|
-
}
|
|
342
|
-
function resolutionParser(name, value) {
|
|
343
|
-
if (!value)
|
|
344
|
-
return void 0;
|
|
345
|
-
if (value.includes("x")) {
|
|
346
|
-
const [width, height] = value.split("x").map((v) => +v);
|
|
347
|
-
if (isNaN(width) || isNaN(height) || width <= 0 || height <= 0)
|
|
348
|
-
throw new Error(`Invalid resolution format: use ${name}="800x600"`);
|
|
349
|
-
return { width, height };
|
|
350
|
-
}
|
|
351
|
-
if (value.includes(",")) {
|
|
352
|
-
const [width, height] = value.split(",").map((v) => +v);
|
|
353
|
-
if (isNaN(width) || isNaN(height) || width <= 0 || height <= 0)
|
|
354
|
-
throw new Error(`Invalid resolution format: use ${name}="800x600"`);
|
|
355
|
-
return { width, height };
|
|
356
|
-
}
|
|
357
|
-
throw new Error(`Invalid resolution format: use ${name}="800x600"`);
|
|
358
|
-
}
|
|
359
|
-
function headerParser(arg, previous) {
|
|
360
|
-
if (!arg)
|
|
361
|
-
return previous || {};
|
|
362
|
-
const result = previous || {};
|
|
363
|
-
const colonIndex = arg.indexOf(":");
|
|
364
|
-
const name = colonIndex === -1 ? arg.trim() : arg.substring(0, colonIndex).trim();
|
|
365
|
-
const value = colonIndex === -1 ? "" : arg.substring(colonIndex + 1).trim();
|
|
366
|
-
result[name] = value;
|
|
367
|
-
return result;
|
|
368
|
-
}
|
|
369
|
-
function enumParser(name, options, value) {
|
|
370
|
-
if (!options.includes(value))
|
|
371
|
-
throw new Error(`Invalid ${name}: ${value}. Valid values are: ${options.join(", ")}`);
|
|
372
|
-
return value;
|
|
373
|
-
}
|
|
374
|
-
function envToBoolean(value) {
|
|
375
|
-
if (value === "true" || value === "1")
|
|
376
|
-
return true;
|
|
377
|
-
if (value === "false" || value === "0")
|
|
378
|
-
return false;
|
|
379
|
-
return void 0;
|
|
380
|
-
}
|
|
381
|
-
function envToString(value) {
|
|
382
|
-
return value ? value.trim() : void 0;
|
|
383
|
-
}
|
|
384
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
385
|
-
0 && (module.exports = {
|
|
386
|
-
commaSeparatedList,
|
|
387
|
-
configFromCLIOptions,
|
|
388
|
-
configFromEnv,
|
|
389
|
-
defaultConfig,
|
|
390
|
-
dotenvFileLoader,
|
|
391
|
-
enumParser,
|
|
392
|
-
headerParser,
|
|
393
|
-
loadConfig,
|
|
394
|
-
mergeConfig,
|
|
395
|
-
numberParser,
|
|
396
|
-
resolutionParser,
|
|
397
|
-
resolveCLIConfig,
|
|
398
|
-
resolveConfig,
|
|
399
|
-
semicolonSeparatedList,
|
|
400
|
-
validateConfig
|
|
401
|
-
});
|
|
@@ -1,189 +0,0 @@
|
|
|
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 configIni_exports = {};
|
|
30
|
-
__export(configIni_exports, {
|
|
31
|
-
configFromIniFile: () => configFromIniFile,
|
|
32
|
-
configsFromIniFile: () => configsFromIniFile
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(configIni_exports);
|
|
35
|
-
var import_fs = __toESM(require("fs"));
|
|
36
|
-
var import_utilsBundle = require("../../utilsBundle");
|
|
37
|
-
function configFromIniFile(filePath) {
|
|
38
|
-
const content = import_fs.default.readFileSync(filePath, "utf8");
|
|
39
|
-
const parsed = import_utilsBundle.ini.parse(content);
|
|
40
|
-
return iniEntriesToConfig(parsed);
|
|
41
|
-
}
|
|
42
|
-
function configsFromIniFile(filePath) {
|
|
43
|
-
const content = import_fs.default.readFileSync(filePath, "utf8");
|
|
44
|
-
const parsed = import_utilsBundle.ini.parse(content);
|
|
45
|
-
const result = /* @__PURE__ */ new Map();
|
|
46
|
-
for (const [sectionName, sectionData] of Object.entries(parsed)) {
|
|
47
|
-
if (typeof sectionData !== "object" || sectionData === null)
|
|
48
|
-
continue;
|
|
49
|
-
result.set(sectionName, iniEntriesToConfig(sectionData));
|
|
50
|
-
}
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
function iniEntriesToConfig(entries) {
|
|
54
|
-
const config = {};
|
|
55
|
-
for (const [targetPath, rawValue] of Object.entries(entries)) {
|
|
56
|
-
const type = longhandTypes[targetPath];
|
|
57
|
-
const value = type ? coerceToType(rawValue, type) : coerceIniValue(rawValue);
|
|
58
|
-
setNestedValue(config, targetPath, value);
|
|
59
|
-
}
|
|
60
|
-
return config;
|
|
61
|
-
}
|
|
62
|
-
function coerceToType(value, type) {
|
|
63
|
-
switch (type) {
|
|
64
|
-
case "string":
|
|
65
|
-
return String(value);
|
|
66
|
-
case "number":
|
|
67
|
-
return Number(value);
|
|
68
|
-
case "boolean":
|
|
69
|
-
if (typeof value === "boolean")
|
|
70
|
-
return value;
|
|
71
|
-
return value === "true" || value === "1";
|
|
72
|
-
case "string[]":
|
|
73
|
-
if (Array.isArray(value))
|
|
74
|
-
return value.map(String);
|
|
75
|
-
return [String(value)];
|
|
76
|
-
case "size": {
|
|
77
|
-
if (typeof value === "string" && value.includes("x")) {
|
|
78
|
-
const [w, h] = value.split("x").map(Number);
|
|
79
|
-
if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0)
|
|
80
|
-
return { width: w, height: h };
|
|
81
|
-
}
|
|
82
|
-
return void 0;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function coerceIniValue(value) {
|
|
87
|
-
if (typeof value !== "string")
|
|
88
|
-
return value;
|
|
89
|
-
const trimmed = value.trim();
|
|
90
|
-
if (trimmed === "")
|
|
91
|
-
return trimmed;
|
|
92
|
-
const num = Number(trimmed);
|
|
93
|
-
if (!isNaN(num))
|
|
94
|
-
return num;
|
|
95
|
-
return value;
|
|
96
|
-
}
|
|
97
|
-
function setNestedValue(obj, dotPath, value) {
|
|
98
|
-
const parts = dotPath.split(".");
|
|
99
|
-
let current = obj;
|
|
100
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
101
|
-
const part = parts[i];
|
|
102
|
-
if (!(part in current) || typeof current[part] !== "object" || current[part] === null)
|
|
103
|
-
current[part] = {};
|
|
104
|
-
current = current[part];
|
|
105
|
-
}
|
|
106
|
-
current[parts[parts.length - 1]] = value;
|
|
107
|
-
}
|
|
108
|
-
const longhandTypes = {
|
|
109
|
-
// browser direct
|
|
110
|
-
"browser.browserName": "string",
|
|
111
|
-
"browser.isolated": "boolean",
|
|
112
|
-
"browser.userDataDir": "string",
|
|
113
|
-
"browser.cdpEndpoint": "string",
|
|
114
|
-
"browser.cdpTimeout": "number",
|
|
115
|
-
"browser.remoteEndpoint": "string",
|
|
116
|
-
"browser.initPage": "string[]",
|
|
117
|
-
"browser.initScript": "string[]",
|
|
118
|
-
// browser.launchOptions
|
|
119
|
-
"browser.launchOptions.channel": "string",
|
|
120
|
-
"browser.launchOptions.headless": "boolean",
|
|
121
|
-
"browser.launchOptions.executablePath": "string",
|
|
122
|
-
"browser.launchOptions.chromiumSandbox": "boolean",
|
|
123
|
-
"browser.launchOptions.args": "string[]",
|
|
124
|
-
"browser.launchOptions.downloadsPath": "string",
|
|
125
|
-
"browser.launchOptions.handleSIGHUP": "boolean",
|
|
126
|
-
"browser.launchOptions.handleSIGINT": "boolean",
|
|
127
|
-
"browser.launchOptions.handleSIGTERM": "boolean",
|
|
128
|
-
"browser.launchOptions.slowMo": "number",
|
|
129
|
-
"browser.launchOptions.timeout": "number",
|
|
130
|
-
"browser.launchOptions.tracesDir": "string",
|
|
131
|
-
"browser.launchOptions.proxy.server": "string",
|
|
132
|
-
"browser.launchOptions.proxy.bypass": "string",
|
|
133
|
-
"browser.launchOptions.proxy.username": "string",
|
|
134
|
-
"browser.launchOptions.proxy.password": "string",
|
|
135
|
-
// browser.contextOptions
|
|
136
|
-
"browser.contextOptions.acceptDownloads": "boolean",
|
|
137
|
-
"browser.contextOptions.baseURL": "string",
|
|
138
|
-
"browser.contextOptions.bypassCSP": "boolean",
|
|
139
|
-
"browser.contextOptions.colorScheme": "string",
|
|
140
|
-
"browser.contextOptions.contrast": "string",
|
|
141
|
-
"browser.contextOptions.deviceScaleFactor": "number",
|
|
142
|
-
"browser.contextOptions.forcedColors": "string",
|
|
143
|
-
"browser.contextOptions.hasTouch": "boolean",
|
|
144
|
-
"browser.contextOptions.ignoreHTTPSErrors": "boolean",
|
|
145
|
-
"browser.contextOptions.isMobile": "boolean",
|
|
146
|
-
"browser.contextOptions.javaScriptEnabled": "boolean",
|
|
147
|
-
"browser.contextOptions.locale": "string",
|
|
148
|
-
"browser.contextOptions.offline": "boolean",
|
|
149
|
-
"browser.contextOptions.permissions": "string[]",
|
|
150
|
-
"browser.contextOptions.reducedMotion": "string",
|
|
151
|
-
"browser.contextOptions.screen": "size",
|
|
152
|
-
"browser.contextOptions.serviceWorkers": "string",
|
|
153
|
-
"browser.contextOptions.storageState": "string",
|
|
154
|
-
"browser.contextOptions.strictSelectors": "boolean",
|
|
155
|
-
"browser.contextOptions.timezoneId": "string",
|
|
156
|
-
"browser.contextOptions.userAgent": "string",
|
|
157
|
-
"browser.contextOptions.viewport": "size",
|
|
158
|
-
// top-level
|
|
159
|
-
"extension": "boolean",
|
|
160
|
-
"capabilities": "string[]",
|
|
161
|
-
"saveSession": "boolean",
|
|
162
|
-
"saveTrace": "boolean",
|
|
163
|
-
"saveVideo": "size",
|
|
164
|
-
"sharedBrowserContext": "boolean",
|
|
165
|
-
"outputDir": "string",
|
|
166
|
-
"imageResponses": "string",
|
|
167
|
-
"allowUnrestrictedFileAccess": "boolean",
|
|
168
|
-
"codegen": "string",
|
|
169
|
-
"testIdAttribute": "string",
|
|
170
|
-
// server
|
|
171
|
-
"server.port": "number",
|
|
172
|
-
"server.host": "string",
|
|
173
|
-
"server.allowedHosts": "string[]",
|
|
174
|
-
// console
|
|
175
|
-
"console.level": "string",
|
|
176
|
-
// network
|
|
177
|
-
"network.allowedOrigins": "string[]",
|
|
178
|
-
"network.blockedOrigins": "string[]",
|
|
179
|
-
// timeouts
|
|
180
|
-
"timeouts.action": "number",
|
|
181
|
-
"timeouts.navigation": "number",
|
|
182
|
-
// snapshot
|
|
183
|
-
"snapshot.mode": "string"
|
|
184
|
-
};
|
|
185
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
186
|
-
0 && (module.exports = {
|
|
187
|
-
configFromIniFile,
|
|
188
|
-
configsFromIniFile
|
|
189
|
-
});
|
package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/extensionContextFactory.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
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 extensionContextFactory_exports = {};
|
|
30
|
-
__export(extensionContextFactory_exports, {
|
|
31
|
-
createExtensionBrowser: () => createExtensionBrowser
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(extensionContextFactory_exports);
|
|
34
|
-
var playwright = __toESM(require("../../.."));
|
|
35
|
-
var import_utilsBundle = require("../../utilsBundle");
|
|
36
|
-
var import_network = require("../../server/utils/network");
|
|
37
|
-
var import_cdpRelay = require("./cdpRelay");
|
|
38
|
-
const debugLogger = (0, import_utilsBundle.debug)("pw:mcp:relay");
|
|
39
|
-
async function createExtensionBrowser(config, clientInfo) {
|
|
40
|
-
const httpServer = (0, import_network.createHttpServer)();
|
|
41
|
-
await (0, import_network.startHttpServer)(httpServer, {});
|
|
42
|
-
const relay = new import_cdpRelay.CDPRelayServer(
|
|
43
|
-
httpServer,
|
|
44
|
-
config.browser.launchOptions.channel || "chrome",
|
|
45
|
-
config.browser.userDataDir,
|
|
46
|
-
config.browser.launchOptions.executablePath
|
|
47
|
-
);
|
|
48
|
-
debugLogger(`CDP relay server started, extension endpoint: ${relay.extensionEndpoint()}.`);
|
|
49
|
-
await relay.ensureExtensionConnectionForMCPContext(
|
|
50
|
-
clientInfo,
|
|
51
|
-
/* forceNewTab */
|
|
52
|
-
false
|
|
53
|
-
);
|
|
54
|
-
return await playwright.chromium.connectOverCDP(relay.cdpEndpoint(), { isLocal: true });
|
|
55
|
-
}
|
|
56
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
-
0 && (module.exports = {
|
|
58
|
-
createExtensionBrowser
|
|
59
|
-
});
|