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,75 +0,0 @@
|
|
|
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 tracing_exports = {};
|
|
20
|
-
__export(tracing_exports, {
|
|
21
|
-
default: () => tracing_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(tracing_exports);
|
|
24
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
25
|
-
var import_tool = require("./tool");
|
|
26
|
-
const tracingStart = (0, import_tool.defineTool)({
|
|
27
|
-
capability: "devtools",
|
|
28
|
-
schema: {
|
|
29
|
-
name: "browser_start_tracing",
|
|
30
|
-
title: "Start tracing",
|
|
31
|
-
description: "Start trace recording",
|
|
32
|
-
inputSchema: import_mcpBundle.z.object({}),
|
|
33
|
-
type: "readOnly"
|
|
34
|
-
},
|
|
35
|
-
handle: async (context, params, response) => {
|
|
36
|
-
const browserContext = await context.ensureBrowserContext();
|
|
37
|
-
const tracesDir = await context.outputFile({ prefix: "", suggestedFilename: `traces`, ext: "" }, { origin: "code" });
|
|
38
|
-
const name = "trace-" + Date.now();
|
|
39
|
-
await browserContext.tracing.start({
|
|
40
|
-
name,
|
|
41
|
-
screenshots: true,
|
|
42
|
-
snapshots: true,
|
|
43
|
-
live: true
|
|
44
|
-
});
|
|
45
|
-
response.addTextResult(`Trace recording started`);
|
|
46
|
-
response.addFileLink("Action log", `${tracesDir}/${name}.trace`);
|
|
47
|
-
response.addFileLink("Network log", `${tracesDir}/${name}.network`);
|
|
48
|
-
response.addFileLink("Resources", `${tracesDir}/resources`);
|
|
49
|
-
browserContext.tracing[traceLegendSymbol] = { tracesDir, name };
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const tracingStop = (0, import_tool.defineTool)({
|
|
53
|
-
capability: "devtools",
|
|
54
|
-
schema: {
|
|
55
|
-
name: "browser_stop_tracing",
|
|
56
|
-
title: "Stop tracing",
|
|
57
|
-
description: "Stop trace recording",
|
|
58
|
-
inputSchema: import_mcpBundle.z.object({}),
|
|
59
|
-
type: "readOnly"
|
|
60
|
-
},
|
|
61
|
-
handle: async (context, params, response) => {
|
|
62
|
-
const browserContext = await context.ensureBrowserContext();
|
|
63
|
-
await browserContext.tracing.stop();
|
|
64
|
-
const traceLegend = browserContext.tracing[traceLegendSymbol];
|
|
65
|
-
response.addTextResult(`Trace recording stopped.`);
|
|
66
|
-
response.addFileLink("Trace", `${traceLegend.tracesDir}/${traceLegend.name}.trace`);
|
|
67
|
-
response.addFileLink("Network log", `${traceLegend.tracesDir}/${traceLegend.name}.network`);
|
|
68
|
-
response.addFileLink("Resources", `${traceLegend.tracesDir}/resources`);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
var tracing_default = [
|
|
72
|
-
tracingStart,
|
|
73
|
-
tracingStop
|
|
74
|
-
];
|
|
75
|
-
const traceLegendSymbol = Symbol("tracesDir");
|
|
@@ -1,83 +0,0 @@
|
|
|
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 utils_exports = {};
|
|
20
|
-
__export(utils_exports, {
|
|
21
|
-
eventWaiter: () => eventWaiter,
|
|
22
|
-
waitForCompletion: () => waitForCompletion
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(utils_exports);
|
|
25
|
-
async function waitForCompletion(tab, callback) {
|
|
26
|
-
const requests = [];
|
|
27
|
-
const requestListener = (request) => requests.push(request);
|
|
28
|
-
const disposeListeners = () => {
|
|
29
|
-
tab.page.off("request", requestListener);
|
|
30
|
-
};
|
|
31
|
-
tab.page.on("request", requestListener);
|
|
32
|
-
let result;
|
|
33
|
-
try {
|
|
34
|
-
result = await callback();
|
|
35
|
-
await tab.waitForTimeout(500);
|
|
36
|
-
} finally {
|
|
37
|
-
disposeListeners();
|
|
38
|
-
}
|
|
39
|
-
const requestedNavigation = requests.some((request) => request.isNavigationRequest());
|
|
40
|
-
if (requestedNavigation) {
|
|
41
|
-
await tab.page.mainFrame().waitForLoadState("load", { timeout: 1e4 }).catch(() => {
|
|
42
|
-
});
|
|
43
|
-
return result;
|
|
44
|
-
}
|
|
45
|
-
const promises = [];
|
|
46
|
-
for (const request of requests) {
|
|
47
|
-
if (["document", "stylesheet", "script", "xhr", "fetch"].includes(request.resourceType()))
|
|
48
|
-
promises.push(request.response().then((r) => r?.finished()).catch(() => {
|
|
49
|
-
}));
|
|
50
|
-
else
|
|
51
|
-
promises.push(request.response().catch(() => {
|
|
52
|
-
}));
|
|
53
|
-
}
|
|
54
|
-
const timeout = new Promise((resolve) => setTimeout(resolve, 5e3));
|
|
55
|
-
await Promise.race([Promise.all(promises), timeout]);
|
|
56
|
-
if (requests.length)
|
|
57
|
-
await tab.waitForTimeout(500);
|
|
58
|
-
return result;
|
|
59
|
-
}
|
|
60
|
-
function eventWaiter(page, event, timeout) {
|
|
61
|
-
const disposables = [];
|
|
62
|
-
const eventPromise = new Promise((resolve, reject) => {
|
|
63
|
-
page.on(event, resolve);
|
|
64
|
-
disposables.push(() => page.off(event, resolve));
|
|
65
|
-
});
|
|
66
|
-
let abort;
|
|
67
|
-
const abortPromise = new Promise((resolve, reject) => {
|
|
68
|
-
abort = () => resolve(void 0);
|
|
69
|
-
});
|
|
70
|
-
const timeoutPromise = new Promise((f) => {
|
|
71
|
-
const timeoutId = setTimeout(() => f(void 0), timeout);
|
|
72
|
-
disposables.push(() => clearTimeout(timeoutId));
|
|
73
|
-
});
|
|
74
|
-
return {
|
|
75
|
-
promise: Promise.race([eventPromise, abortPromise, timeoutPromise]).finally(() => disposables.forEach((dispose) => dispose())),
|
|
76
|
-
abort
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
-
0 && (module.exports = {
|
|
81
|
-
eventWaiter,
|
|
82
|
-
waitForCompletion
|
|
83
|
-
});
|
|
@@ -1,151 +0,0 @@
|
|
|
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 verify_exports = {};
|
|
20
|
-
__export(verify_exports, {
|
|
21
|
-
default: () => verify_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(verify_exports);
|
|
24
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
25
|
-
var import_stringUtils = require("../../utils/isomorphic/stringUtils");
|
|
26
|
-
var import_tool = require("./tool");
|
|
27
|
-
const verifyElement = (0, import_tool.defineTabTool)({
|
|
28
|
-
capability: "testing",
|
|
29
|
-
schema: {
|
|
30
|
-
name: "browser_verify_element_visible",
|
|
31
|
-
title: "Verify element visible",
|
|
32
|
-
description: "Verify element is visible on the page",
|
|
33
|
-
inputSchema: import_mcpBundle.z.object({
|
|
34
|
-
role: import_mcpBundle.z.string().describe('ROLE of the element. Can be found in the snapshot like this: `- {ROLE} "Accessible Name":`'),
|
|
35
|
-
accessibleName: import_mcpBundle.z.string().describe('ACCESSIBLE_NAME of the element. Can be found in the snapshot like this: `- role "{ACCESSIBLE_NAME}"`')
|
|
36
|
-
}),
|
|
37
|
-
type: "assertion"
|
|
38
|
-
},
|
|
39
|
-
handle: async (tab, params, response) => {
|
|
40
|
-
for (const frame of tab.page.frames()) {
|
|
41
|
-
const locator = frame.getByRole(params.role, { name: params.accessibleName });
|
|
42
|
-
if (await locator.count() > 0) {
|
|
43
|
-
const resolved = await locator.normalize();
|
|
44
|
-
response.addCode(`await expect(page.${resolved}).toBeVisible();`);
|
|
45
|
-
response.addTextResult("Done");
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
response.addError(`Element with role "${params.role}" and accessible name "${params.accessibleName}" not found`);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const verifyText = (0, import_tool.defineTabTool)({
|
|
53
|
-
capability: "testing",
|
|
54
|
-
schema: {
|
|
55
|
-
name: "browser_verify_text_visible",
|
|
56
|
-
title: "Verify text visible",
|
|
57
|
-
description: `Verify text is visible on the page. Prefer ${verifyElement.schema.name} if possible.`,
|
|
58
|
-
inputSchema: import_mcpBundle.z.object({
|
|
59
|
-
text: import_mcpBundle.z.string().describe('TEXT to verify. Can be found in the snapshot like this: `- role "Accessible Name": {TEXT}` or like this: `- text: {TEXT}`')
|
|
60
|
-
}),
|
|
61
|
-
type: "assertion"
|
|
62
|
-
},
|
|
63
|
-
handle: async (tab, params, response) => {
|
|
64
|
-
for (const frame of tab.page.frames()) {
|
|
65
|
-
const locator = frame.getByText(params.text).filter({ visible: true });
|
|
66
|
-
if (await locator.count() > 0) {
|
|
67
|
-
const resolved = await locator.normalize();
|
|
68
|
-
response.addCode(`await expect(page.${resolved}).toBeVisible();`);
|
|
69
|
-
response.addTextResult("Done");
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
response.addError("Text not found");
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const verifyList = (0, import_tool.defineTabTool)({
|
|
77
|
-
capability: "testing",
|
|
78
|
-
schema: {
|
|
79
|
-
name: "browser_verify_list_visible",
|
|
80
|
-
title: "Verify list visible",
|
|
81
|
-
description: "Verify list is visible on the page",
|
|
82
|
-
inputSchema: import_mcpBundle.z.object({
|
|
83
|
-
element: import_mcpBundle.z.string().describe("Human-readable list description"),
|
|
84
|
-
ref: import_mcpBundle.z.string().describe("Exact target element reference that points to the list"),
|
|
85
|
-
selector: import_mcpBundle.z.string().optional().describe('CSS or role selector for the target list, when "ref" is not available.'),
|
|
86
|
-
items: import_mcpBundle.z.array(import_mcpBundle.z.string()).describe("Items to verify")
|
|
87
|
-
}),
|
|
88
|
-
type: "assertion"
|
|
89
|
-
},
|
|
90
|
-
handle: async (tab, params, response) => {
|
|
91
|
-
const { locator } = await tab.refLocator({ ref: params.ref, selector: params.selector, element: params.element });
|
|
92
|
-
const itemTexts = [];
|
|
93
|
-
for (const item of params.items) {
|
|
94
|
-
const itemLocator = locator.getByText(item);
|
|
95
|
-
if (await itemLocator.count() === 0) {
|
|
96
|
-
response.addError(`Item "${item}" not found`);
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
itemTexts.push(await itemLocator.textContent(tab.expectTimeoutOptions));
|
|
100
|
-
}
|
|
101
|
-
const ariaSnapshot = `\`
|
|
102
|
-
- list:
|
|
103
|
-
${itemTexts.map((t) => ` - listitem: ${(0, import_stringUtils.escapeWithQuotes)(t, '"')}`).join("\n")}
|
|
104
|
-
\``;
|
|
105
|
-
response.addCode(`await expect(page.locator('body')).toMatchAriaSnapshot(${ariaSnapshot});`);
|
|
106
|
-
response.addTextResult("Done");
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
const verifyValue = (0, import_tool.defineTabTool)({
|
|
110
|
-
capability: "testing",
|
|
111
|
-
schema: {
|
|
112
|
-
name: "browser_verify_value",
|
|
113
|
-
title: "Verify value",
|
|
114
|
-
description: "Verify element value",
|
|
115
|
-
inputSchema: import_mcpBundle.z.object({
|
|
116
|
-
type: import_mcpBundle.z.enum(["textbox", "checkbox", "radio", "combobox", "slider"]).describe("Type of the element"),
|
|
117
|
-
element: import_mcpBundle.z.string().describe("Human-readable element description"),
|
|
118
|
-
ref: import_mcpBundle.z.string().describe("Exact target element reference from the page snapshot"),
|
|
119
|
-
selector: import_mcpBundle.z.string().optional().describe('CSS or role selector for the target element, when "ref" is not available'),
|
|
120
|
-
value: import_mcpBundle.z.string().describe('Value to verify. For checkbox, use "true" or "false".')
|
|
121
|
-
}),
|
|
122
|
-
type: "assertion"
|
|
123
|
-
},
|
|
124
|
-
handle: async (tab, params, response) => {
|
|
125
|
-
const { locator, resolved } = await tab.refLocator({ ref: params.ref, selector: params.selector, element: params.element });
|
|
126
|
-
const locatorSource = `page.${resolved}`;
|
|
127
|
-
if (params.type === "textbox" || params.type === "slider" || params.type === "combobox") {
|
|
128
|
-
const value = await locator.inputValue(tab.expectTimeoutOptions);
|
|
129
|
-
if (value !== params.value) {
|
|
130
|
-
response.addError(`Expected value "${params.value}", but got "${value}"`);
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
response.addCode(`await expect(${locatorSource}).toHaveValue(${(0, import_stringUtils.escapeWithQuotes)(params.value)});`);
|
|
134
|
-
} else if (params.type === "checkbox" || params.type === "radio") {
|
|
135
|
-
const value = await locator.isChecked(tab.expectTimeoutOptions);
|
|
136
|
-
if (value !== (params.value === "true")) {
|
|
137
|
-
response.addError(`Expected value "${params.value}", but got "${value}"`);
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
const matcher = value ? "toBeChecked" : "not.toBeChecked";
|
|
141
|
-
response.addCode(`await expect(${locatorSource}).${matcher}();`);
|
|
142
|
-
}
|
|
143
|
-
response.addTextResult("Done");
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
var verify_default = [
|
|
147
|
-
verifyElement,
|
|
148
|
-
verifyText,
|
|
149
|
-
verifyList,
|
|
150
|
-
verifyValue
|
|
151
|
-
];
|
|
@@ -1,89 +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 video_exports = {};
|
|
30
|
-
__export(video_exports, {
|
|
31
|
-
default: () => video_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(video_exports);
|
|
34
|
-
var import_path = __toESM(require("path"));
|
|
35
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
36
|
-
var import_tool = require("./tool");
|
|
37
|
-
const startVideo = (0, import_tool.defineTool)({
|
|
38
|
-
capability: "devtools",
|
|
39
|
-
schema: {
|
|
40
|
-
name: "browser_start_video",
|
|
41
|
-
title: "Start video",
|
|
42
|
-
description: "Start video recording",
|
|
43
|
-
inputSchema: import_mcpBundle.z.object({
|
|
44
|
-
size: import_mcpBundle.z.object({
|
|
45
|
-
width: import_mcpBundle.z.number().describe("Video width"),
|
|
46
|
-
height: import_mcpBundle.z.number().describe("Video height")
|
|
47
|
-
}).optional().describe("Video size")
|
|
48
|
-
}),
|
|
49
|
-
type: "readOnly"
|
|
50
|
-
},
|
|
51
|
-
handle: async (context, params, response) => {
|
|
52
|
-
await context.startVideoRecording({ size: params.size });
|
|
53
|
-
response.addTextResult("Video recording started.");
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const stopVideo = (0, import_tool.defineTool)({
|
|
57
|
-
capability: "devtools",
|
|
58
|
-
schema: {
|
|
59
|
-
name: "browser_stop_video",
|
|
60
|
-
title: "Stop video",
|
|
61
|
-
description: "Stop video recording",
|
|
62
|
-
inputSchema: import_mcpBundle.z.object({
|
|
63
|
-
filename: import_mcpBundle.z.string().optional().describe("Filename to save the video")
|
|
64
|
-
}),
|
|
65
|
-
type: "readOnly"
|
|
66
|
-
},
|
|
67
|
-
handle: async (context, params, response) => {
|
|
68
|
-
const videos = await context.stopVideoRecording();
|
|
69
|
-
if (!videos.length) {
|
|
70
|
-
response.addTextResult("No videos were recorded.");
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
for (const [index, video] of videos.entries()) {
|
|
74
|
-
const suffix = index ? `-${index}` : "";
|
|
75
|
-
let suggestedFilename = params.filename;
|
|
76
|
-
if (suggestedFilename && suffix) {
|
|
77
|
-
const ext = import_path.default.extname(suggestedFilename);
|
|
78
|
-
suggestedFilename = import_path.default.basename(suggestedFilename, ext) + suffix + ext;
|
|
79
|
-
}
|
|
80
|
-
const resolvedFile = await response.resolveClientFile({ prefix: "video" + suffix, ext: "webm", suggestedFilename }, "Video");
|
|
81
|
-
await video.saveAs(resolvedFile.fileName);
|
|
82
|
-
await response.addFileResult(resolvedFile, null);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
var video_default = [
|
|
87
|
-
startVideo,
|
|
88
|
-
stopVideo
|
|
89
|
-
];
|
|
@@ -1,63 +0,0 @@
|
|
|
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 wait_exports = {};
|
|
20
|
-
__export(wait_exports, {
|
|
21
|
-
default: () => wait_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(wait_exports);
|
|
24
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
25
|
-
var import_tool = require("./tool");
|
|
26
|
-
const wait = (0, import_tool.defineTool)({
|
|
27
|
-
capability: "core",
|
|
28
|
-
schema: {
|
|
29
|
-
name: "browser_wait_for",
|
|
30
|
-
title: "Wait for",
|
|
31
|
-
description: "Wait for text to appear or disappear or a specified time to pass",
|
|
32
|
-
inputSchema: import_mcpBundle.z.object({
|
|
33
|
-
time: import_mcpBundle.z.number().optional().describe("The time to wait in seconds"),
|
|
34
|
-
text: import_mcpBundle.z.string().optional().describe("The text to wait for"),
|
|
35
|
-
textGone: import_mcpBundle.z.string().optional().describe("The text to wait for to disappear")
|
|
36
|
-
}),
|
|
37
|
-
type: "assertion"
|
|
38
|
-
},
|
|
39
|
-
handle: async (context, params, response) => {
|
|
40
|
-
if (!params.text && !params.textGone && !params.time)
|
|
41
|
-
throw new Error("Either time, text or textGone must be provided");
|
|
42
|
-
if (params.time) {
|
|
43
|
-
response.addCode(`await new Promise(f => setTimeout(f, ${params.time} * 1000));`);
|
|
44
|
-
await new Promise((f) => setTimeout(f, Math.min(3e4, params.time * 1e3)));
|
|
45
|
-
}
|
|
46
|
-
const tab = context.currentTabOrDie();
|
|
47
|
-
const locator = params.text ? tab.page.getByText(params.text).first() : void 0;
|
|
48
|
-
const goneLocator = params.textGone ? tab.page.getByText(params.textGone).first() : void 0;
|
|
49
|
-
if (goneLocator) {
|
|
50
|
-
response.addCode(`await page.getByText(${JSON.stringify(params.textGone)}).first().waitFor({ state: 'hidden' });`);
|
|
51
|
-
await goneLocator.waitFor({ state: "hidden" });
|
|
52
|
-
}
|
|
53
|
-
if (locator) {
|
|
54
|
-
response.addCode(`await page.getByText(${JSON.stringify(params.text)}).first().waitFor({ state: 'visible' });`);
|
|
55
|
-
await locator.waitFor({ state: "visible" });
|
|
56
|
-
}
|
|
57
|
-
response.addTextResult(`Waited for ${params.text || params.textGone || params.time}`);
|
|
58
|
-
response.setIncludeSnapshot();
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
var wait_default = [
|
|
62
|
-
wait
|
|
63
|
-
];
|
|
@@ -1,223 +0,0 @@
|
|
|
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 webstorage_exports = {};
|
|
20
|
-
__export(webstorage_exports, {
|
|
21
|
-
default: () => webstorage_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(webstorage_exports);
|
|
24
|
-
var import_mcpBundle = require("../../mcpBundle");
|
|
25
|
-
var import_tool = require("./tool");
|
|
26
|
-
const localStorageList = (0, import_tool.defineTabTool)({
|
|
27
|
-
capability: "storage",
|
|
28
|
-
schema: {
|
|
29
|
-
name: "browser_localstorage_list",
|
|
30
|
-
title: "List localStorage",
|
|
31
|
-
description: "List all localStorage key-value pairs",
|
|
32
|
-
inputSchema: import_mcpBundle.z.object({}),
|
|
33
|
-
type: "readOnly"
|
|
34
|
-
},
|
|
35
|
-
handle: async (tab, params, response) => {
|
|
36
|
-
const items = await tab.page.evaluate(() => {
|
|
37
|
-
const result = [];
|
|
38
|
-
for (let i = 0; i < localStorage.length; i++) {
|
|
39
|
-
const key = localStorage.key(i);
|
|
40
|
-
if (key !== null)
|
|
41
|
-
result.push({ key, value: localStorage.getItem(key) || "" });
|
|
42
|
-
}
|
|
43
|
-
return result;
|
|
44
|
-
});
|
|
45
|
-
if (items.length === 0)
|
|
46
|
-
response.addTextResult("No localStorage items found");
|
|
47
|
-
else
|
|
48
|
-
response.addTextResult(items.map((item) => `${item.key}=${item.value}`).join("\n"));
|
|
49
|
-
response.addCode(`await page.evaluate(() => ({ ...localStorage }));`);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const localStorageGet = (0, import_tool.defineTabTool)({
|
|
53
|
-
capability: "storage",
|
|
54
|
-
schema: {
|
|
55
|
-
name: "browser_localstorage_get",
|
|
56
|
-
title: "Get localStorage item",
|
|
57
|
-
description: "Get a localStorage item by key",
|
|
58
|
-
inputSchema: import_mcpBundle.z.object({
|
|
59
|
-
key: import_mcpBundle.z.string().describe("Key to get")
|
|
60
|
-
}),
|
|
61
|
-
type: "readOnly"
|
|
62
|
-
},
|
|
63
|
-
handle: async (tab, params, response) => {
|
|
64
|
-
const value = await tab.page.evaluate((key) => localStorage.getItem(key), params.key);
|
|
65
|
-
if (value === null)
|
|
66
|
-
response.addTextResult(`localStorage key '${params.key}' not found`);
|
|
67
|
-
else
|
|
68
|
-
response.addTextResult(`${params.key}=${value}`);
|
|
69
|
-
response.addCode(`await page.evaluate(() => localStorage.getItem('${params.key}'));`);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
const localStorageSet = (0, import_tool.defineTabTool)({
|
|
73
|
-
capability: "storage",
|
|
74
|
-
schema: {
|
|
75
|
-
name: "browser_localstorage_set",
|
|
76
|
-
title: "Set localStorage item",
|
|
77
|
-
description: "Set a localStorage item",
|
|
78
|
-
inputSchema: import_mcpBundle.z.object({
|
|
79
|
-
key: import_mcpBundle.z.string().describe("Key to set"),
|
|
80
|
-
value: import_mcpBundle.z.string().describe("Value to set")
|
|
81
|
-
}),
|
|
82
|
-
type: "action"
|
|
83
|
-
},
|
|
84
|
-
handle: async (tab, params, response) => {
|
|
85
|
-
await tab.page.evaluate(({ key, value }) => localStorage.setItem(key, value), params);
|
|
86
|
-
response.addCode(`await page.evaluate(() => localStorage.setItem('${params.key}', '${params.value}'));`);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
const localStorageDelete = (0, import_tool.defineTabTool)({
|
|
90
|
-
capability: "storage",
|
|
91
|
-
schema: {
|
|
92
|
-
name: "browser_localstorage_delete",
|
|
93
|
-
title: "Delete localStorage item",
|
|
94
|
-
description: "Delete a localStorage item",
|
|
95
|
-
inputSchema: import_mcpBundle.z.object({
|
|
96
|
-
key: import_mcpBundle.z.string().describe("Key to delete")
|
|
97
|
-
}),
|
|
98
|
-
type: "action"
|
|
99
|
-
},
|
|
100
|
-
handle: async (tab, params, response) => {
|
|
101
|
-
await tab.page.evaluate((key) => localStorage.removeItem(key), params.key);
|
|
102
|
-
response.addCode(`await page.evaluate(() => localStorage.removeItem('${params.key}'));`);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
const localStorageClear = (0, import_tool.defineTabTool)({
|
|
106
|
-
capability: "storage",
|
|
107
|
-
schema: {
|
|
108
|
-
name: "browser_localstorage_clear",
|
|
109
|
-
title: "Clear localStorage",
|
|
110
|
-
description: "Clear all localStorage",
|
|
111
|
-
inputSchema: import_mcpBundle.z.object({}),
|
|
112
|
-
type: "action"
|
|
113
|
-
},
|
|
114
|
-
handle: async (tab, params, response) => {
|
|
115
|
-
await tab.page.evaluate(() => localStorage.clear());
|
|
116
|
-
response.addCode(`await page.evaluate(() => localStorage.clear());`);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
const sessionStorageList = (0, import_tool.defineTabTool)({
|
|
120
|
-
capability: "storage",
|
|
121
|
-
schema: {
|
|
122
|
-
name: "browser_sessionstorage_list",
|
|
123
|
-
title: "List sessionStorage",
|
|
124
|
-
description: "List all sessionStorage key-value pairs",
|
|
125
|
-
inputSchema: import_mcpBundle.z.object({}),
|
|
126
|
-
type: "readOnly"
|
|
127
|
-
},
|
|
128
|
-
handle: async (tab, params, response) => {
|
|
129
|
-
const items = await tab.page.evaluate(() => {
|
|
130
|
-
const result = [];
|
|
131
|
-
for (let i = 0; i < sessionStorage.length; i++) {
|
|
132
|
-
const key = sessionStorage.key(i);
|
|
133
|
-
if (key !== null)
|
|
134
|
-
result.push({ key, value: sessionStorage.getItem(key) || "" });
|
|
135
|
-
}
|
|
136
|
-
return result;
|
|
137
|
-
});
|
|
138
|
-
if (items.length === 0)
|
|
139
|
-
response.addTextResult("No sessionStorage items found");
|
|
140
|
-
else
|
|
141
|
-
response.addTextResult(items.map((item) => `${item.key}=${item.value}`).join("\n"));
|
|
142
|
-
response.addCode(`await page.evaluate(() => ({ ...sessionStorage }));`);
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
const sessionStorageGet = (0, import_tool.defineTabTool)({
|
|
146
|
-
capability: "storage",
|
|
147
|
-
schema: {
|
|
148
|
-
name: "browser_sessionstorage_get",
|
|
149
|
-
title: "Get sessionStorage item",
|
|
150
|
-
description: "Get a sessionStorage item by key",
|
|
151
|
-
inputSchema: import_mcpBundle.z.object({
|
|
152
|
-
key: import_mcpBundle.z.string().describe("Key to get")
|
|
153
|
-
}),
|
|
154
|
-
type: "readOnly"
|
|
155
|
-
},
|
|
156
|
-
handle: async (tab, params, response) => {
|
|
157
|
-
const value = await tab.page.evaluate((key) => sessionStorage.getItem(key), params.key);
|
|
158
|
-
if (value === null)
|
|
159
|
-
response.addTextResult(`sessionStorage key '${params.key}' not found`);
|
|
160
|
-
else
|
|
161
|
-
response.addTextResult(`${params.key}=${value}`);
|
|
162
|
-
response.addCode(`await page.evaluate(() => sessionStorage.getItem('${params.key}'));`);
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
const sessionStorageSet = (0, import_tool.defineTabTool)({
|
|
166
|
-
capability: "storage",
|
|
167
|
-
schema: {
|
|
168
|
-
name: "browser_sessionstorage_set",
|
|
169
|
-
title: "Set sessionStorage item",
|
|
170
|
-
description: "Set a sessionStorage item",
|
|
171
|
-
inputSchema: import_mcpBundle.z.object({
|
|
172
|
-
key: import_mcpBundle.z.string().describe("Key to set"),
|
|
173
|
-
value: import_mcpBundle.z.string().describe("Value to set")
|
|
174
|
-
}),
|
|
175
|
-
type: "action"
|
|
176
|
-
},
|
|
177
|
-
handle: async (tab, params, response) => {
|
|
178
|
-
await tab.page.evaluate(({ key, value }) => sessionStorage.setItem(key, value), params);
|
|
179
|
-
response.addCode(`await page.evaluate(() => sessionStorage.setItem('${params.key}', '${params.value}'));`);
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
const sessionStorageDelete = (0, import_tool.defineTabTool)({
|
|
183
|
-
capability: "storage",
|
|
184
|
-
schema: {
|
|
185
|
-
name: "browser_sessionstorage_delete",
|
|
186
|
-
title: "Delete sessionStorage item",
|
|
187
|
-
description: "Delete a sessionStorage item",
|
|
188
|
-
inputSchema: import_mcpBundle.z.object({
|
|
189
|
-
key: import_mcpBundle.z.string().describe("Key to delete")
|
|
190
|
-
}),
|
|
191
|
-
type: "action"
|
|
192
|
-
},
|
|
193
|
-
handle: async (tab, params, response) => {
|
|
194
|
-
await tab.page.evaluate((key) => sessionStorage.removeItem(key), params.key);
|
|
195
|
-
response.addCode(`await page.evaluate(() => sessionStorage.removeItem('${params.key}'));`);
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
const sessionStorageClear = (0, import_tool.defineTabTool)({
|
|
199
|
-
capability: "storage",
|
|
200
|
-
schema: {
|
|
201
|
-
name: "browser_sessionstorage_clear",
|
|
202
|
-
title: "Clear sessionStorage",
|
|
203
|
-
description: "Clear all sessionStorage",
|
|
204
|
-
inputSchema: import_mcpBundle.z.object({}),
|
|
205
|
-
type: "action"
|
|
206
|
-
},
|
|
207
|
-
handle: async (tab, params, response) => {
|
|
208
|
-
await tab.page.evaluate(() => sessionStorage.clear());
|
|
209
|
-
response.addCode(`await page.evaluate(() => sessionStorage.clear());`);
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
var webstorage_default = [
|
|
213
|
-
localStorageList,
|
|
214
|
-
localStorageGet,
|
|
215
|
-
localStorageSet,
|
|
216
|
-
localStorageDelete,
|
|
217
|
-
localStorageClear,
|
|
218
|
-
sessionStorageList,
|
|
219
|
-
sessionStorageGet,
|
|
220
|
-
sessionStorageSet,
|
|
221
|
-
sessionStorageDelete,
|
|
222
|
-
sessionStorageClear
|
|
223
|
-
];
|