rubycrawl 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubycrawl/helpers.rb +1 -1
- data/lib/rubycrawl/markdown_converter.rb +33 -6
- data/lib/rubycrawl/result.rb +10 -2
- data/lib/rubycrawl/site_crawler.rb +7 -2
- data/lib/rubycrawl/version.rb +1 -1
- data/rubycrawl.gemspec +1 -1
- metadata +1 -571
- data/bin/console +0 -9
- data/bin/setup +0 -4
- data/node/.gitignore +0 -2
- data/node/.npmrc +0 -1
- data/node/README.md +0 -19
- data/node/node_modules/.bin/playwright +0 -1
- data/node/node_modules/.bin/playwright-core +0 -1
- data/node/node_modules/.package-lock.json +0 -65
- data/node/node_modules/dotenv/CHANGELOG.md +0 -520
- data/node/node_modules/dotenv/LICENSE +0 -23
- data/node/node_modules/dotenv/README-es.md +0 -411
- data/node/node_modules/dotenv/README.md +0 -645
- data/node/node_modules/dotenv/SECURITY.md +0 -1
- data/node/node_modules/dotenv/config.d.ts +0 -1
- data/node/node_modules/dotenv/config.js +0 -9
- data/node/node_modules/dotenv/lib/cli-options.js +0 -17
- data/node/node_modules/dotenv/lib/env-options.js +0 -28
- data/node/node_modules/dotenv/lib/main.d.ts +0 -162
- data/node/node_modules/dotenv/lib/main.js +0 -386
- data/node/node_modules/dotenv/package.json +0 -62
- data/node/node_modules/playwright/LICENSE +0 -202
- data/node/node_modules/playwright/NOTICE +0 -5
- data/node/node_modules/playwright/README.md +0 -168
- data/node/node_modules/playwright/ThirdPartyNotices.txt +0 -5042
- data/node/node_modules/playwright/cli.js +0 -19
- data/node/node_modules/playwright/index.d.ts +0 -17
- data/node/node_modules/playwright/index.js +0 -17
- data/node/node_modules/playwright/index.mjs +0 -18
- data/node/node_modules/playwright/jsx-runtime.js +0 -42
- data/node/node_modules/playwright/jsx-runtime.mjs +0 -21
- data/node/node_modules/playwright/lib/agents/agentParser.js +0 -89
- data/node/node_modules/playwright/lib/agents/copilot-setup-steps.yml +0 -34
- data/node/node_modules/playwright/lib/agents/generateAgents.js +0 -348
- data/node/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +0 -31
- data/node/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +0 -8
- data/node/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +0 -88
- data/node/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +0 -6
- data/node/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +0 -55
- data/node/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +0 -9
- data/node/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +0 -73
- data/node/node_modules/playwright/lib/common/config.js +0 -282
- data/node/node_modules/playwright/lib/common/configLoader.js +0 -344
- data/node/node_modules/playwright/lib/common/esmLoaderHost.js +0 -104
- data/node/node_modules/playwright/lib/common/expectBundle.js +0 -28
- data/node/node_modules/playwright/lib/common/expectBundleImpl.js +0 -407
- data/node/node_modules/playwright/lib/common/fixtures.js +0 -302
- data/node/node_modules/playwright/lib/common/globals.js +0 -58
- data/node/node_modules/playwright/lib/common/ipc.js +0 -60
- data/node/node_modules/playwright/lib/common/poolBuilder.js +0 -85
- data/node/node_modules/playwright/lib/common/process.js +0 -132
- data/node/node_modules/playwright/lib/common/suiteUtils.js +0 -140
- data/node/node_modules/playwright/lib/common/test.js +0 -321
- data/node/node_modules/playwright/lib/common/testLoader.js +0 -101
- data/node/node_modules/playwright/lib/common/testType.js +0 -298
- data/node/node_modules/playwright/lib/common/validators.js +0 -68
- data/node/node_modules/playwright/lib/fsWatcher.js +0 -67
- data/node/node_modules/playwright/lib/index.js +0 -726
- data/node/node_modules/playwright/lib/internalsForTest.js +0 -42
- data/node/node_modules/playwright/lib/isomorphic/events.js +0 -77
- data/node/node_modules/playwright/lib/isomorphic/folders.js +0 -30
- data/node/node_modules/playwright/lib/isomorphic/stringInternPool.js +0 -69
- data/node/node_modules/playwright/lib/isomorphic/teleReceiver.js +0 -521
- data/node/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +0 -157
- data/node/node_modules/playwright/lib/isomorphic/testServerConnection.js +0 -225
- data/node/node_modules/playwright/lib/isomorphic/testServerInterface.js +0 -16
- data/node/node_modules/playwright/lib/isomorphic/testTree.js +0 -329
- data/node/node_modules/playwright/lib/isomorphic/types.d.js +0 -16
- data/node/node_modules/playwright/lib/loader/loaderMain.js +0 -59
- data/node/node_modules/playwright/lib/matchers/expect.js +0 -311
- data/node/node_modules/playwright/lib/matchers/matcherHint.js +0 -44
- data/node/node_modules/playwright/lib/matchers/matchers.js +0 -383
- data/node/node_modules/playwright/lib/matchers/toBeTruthy.js +0 -75
- data/node/node_modules/playwright/lib/matchers/toEqual.js +0 -100
- data/node/node_modules/playwright/lib/matchers/toHaveURL.js +0 -101
- data/node/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +0 -159
- data/node/node_modules/playwright/lib/matchers/toMatchSnapshot.js +0 -342
- data/node/node_modules/playwright/lib/matchers/toMatchText.js +0 -99
- data/node/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +0 -329
- data/node/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +0 -84
- data/node/node_modules/playwright/lib/mcp/browser/config.js +0 -421
- data/node/node_modules/playwright/lib/mcp/browser/context.js +0 -244
- data/node/node_modules/playwright/lib/mcp/browser/response.js +0 -278
- data/node/node_modules/playwright/lib/mcp/browser/sessionLog.js +0 -75
- data/node/node_modules/playwright/lib/mcp/browser/tab.js +0 -343
- data/node/node_modules/playwright/lib/mcp/browser/tools/common.js +0 -65
- data/node/node_modules/playwright/lib/mcp/browser/tools/console.js +0 -46
- data/node/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +0 -60
- data/node/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +0 -61
- data/node/node_modules/playwright/lib/mcp/browser/tools/files.js +0 -58
- data/node/node_modules/playwright/lib/mcp/browser/tools/form.js +0 -63
- data/node/node_modules/playwright/lib/mcp/browser/tools/install.js +0 -72
- data/node/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +0 -107
- data/node/node_modules/playwright/lib/mcp/browser/tools/mouse.js +0 -107
- data/node/node_modules/playwright/lib/mcp/browser/tools/navigate.js +0 -71
- data/node/node_modules/playwright/lib/mcp/browser/tools/network.js +0 -63
- data/node/node_modules/playwright/lib/mcp/browser/tools/open.js +0 -57
- data/node/node_modules/playwright/lib/mcp/browser/tools/pdf.js +0 -49
- data/node/node_modules/playwright/lib/mcp/browser/tools/runCode.js +0 -78
- data/node/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +0 -93
- data/node/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +0 -173
- data/node/node_modules/playwright/lib/mcp/browser/tools/tabs.js +0 -67
- data/node/node_modules/playwright/lib/mcp/browser/tools/tool.js +0 -47
- data/node/node_modules/playwright/lib/mcp/browser/tools/tracing.js +0 -74
- data/node/node_modules/playwright/lib/mcp/browser/tools/utils.js +0 -94
- data/node/node_modules/playwright/lib/mcp/browser/tools/verify.js +0 -143
- data/node/node_modules/playwright/lib/mcp/browser/tools/wait.js +0 -63
- data/node/node_modules/playwright/lib/mcp/browser/tools.js +0 -84
- data/node/node_modules/playwright/lib/mcp/browser/watchdog.js +0 -44
- data/node/node_modules/playwright/lib/mcp/config.d.js +0 -16
- data/node/node_modules/playwright/lib/mcp/extension/cdpRelay.js +0 -351
- data/node/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +0 -76
- data/node/node_modules/playwright/lib/mcp/extension/protocol.js +0 -28
- data/node/node_modules/playwright/lib/mcp/index.js +0 -61
- data/node/node_modules/playwright/lib/mcp/log.js +0 -35
- data/node/node_modules/playwright/lib/mcp/program.js +0 -111
- data/node/node_modules/playwright/lib/mcp/sdk/exports.js +0 -28
- data/node/node_modules/playwright/lib/mcp/sdk/http.js +0 -152
- data/node/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +0 -71
- data/node/node_modules/playwright/lib/mcp/sdk/server.js +0 -223
- data/node/node_modules/playwright/lib/mcp/sdk/tool.js +0 -47
- data/node/node_modules/playwright/lib/mcp/terminal/cli.js +0 -296
- data/node/node_modules/playwright/lib/mcp/terminal/command.js +0 -56
- data/node/node_modules/playwright/lib/mcp/terminal/commands.js +0 -333
- data/node/node_modules/playwright/lib/mcp/terminal/daemon.js +0 -129
- data/node/node_modules/playwright/lib/mcp/terminal/help.json +0 -32
- data/node/node_modules/playwright/lib/mcp/terminal/helpGenerator.js +0 -88
- data/node/node_modules/playwright/lib/mcp/terminal/socketConnection.js +0 -80
- data/node/node_modules/playwright/lib/mcp/test/browserBackend.js +0 -98
- data/node/node_modules/playwright/lib/mcp/test/generatorTools.js +0 -122
- data/node/node_modules/playwright/lib/mcp/test/plannerTools.js +0 -145
- data/node/node_modules/playwright/lib/mcp/test/seed.js +0 -82
- data/node/node_modules/playwright/lib/mcp/test/streams.js +0 -44
- data/node/node_modules/playwright/lib/mcp/test/testBackend.js +0 -99
- data/node/node_modules/playwright/lib/mcp/test/testContext.js +0 -285
- data/node/node_modules/playwright/lib/mcp/test/testTool.js +0 -30
- data/node/node_modules/playwright/lib/mcp/test/testTools.js +0 -108
- data/node/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +0 -198
- data/node/node_modules/playwright/lib/plugins/index.js +0 -28
- data/node/node_modules/playwright/lib/plugins/webServerPlugin.js +0 -237
- data/node/node_modules/playwright/lib/program.js +0 -417
- data/node/node_modules/playwright/lib/reporters/base.js +0 -634
- data/node/node_modules/playwright/lib/reporters/blob.js +0 -138
- data/node/node_modules/playwright/lib/reporters/dot.js +0 -99
- data/node/node_modules/playwright/lib/reporters/empty.js +0 -32
- data/node/node_modules/playwright/lib/reporters/github.js +0 -128
- data/node/node_modules/playwright/lib/reporters/html.js +0 -633
- data/node/node_modules/playwright/lib/reporters/internalReporter.js +0 -138
- data/node/node_modules/playwright/lib/reporters/json.js +0 -254
- data/node/node_modules/playwright/lib/reporters/junit.js +0 -232
- data/node/node_modules/playwright/lib/reporters/line.js +0 -131
- data/node/node_modules/playwright/lib/reporters/list.js +0 -253
- data/node/node_modules/playwright/lib/reporters/listModeReporter.js +0 -69
- data/node/node_modules/playwright/lib/reporters/markdown.js +0 -144
- data/node/node_modules/playwright/lib/reporters/merge.js +0 -558
- data/node/node_modules/playwright/lib/reporters/multiplexer.js +0 -112
- data/node/node_modules/playwright/lib/reporters/reporterV2.js +0 -102
- data/node/node_modules/playwright/lib/reporters/teleEmitter.js +0 -317
- data/node/node_modules/playwright/lib/reporters/versions/blobV1.js +0 -16
- data/node/node_modules/playwright/lib/runner/dispatcher.js +0 -530
- data/node/node_modules/playwright/lib/runner/failureTracker.js +0 -72
- data/node/node_modules/playwright/lib/runner/lastRun.js +0 -77
- data/node/node_modules/playwright/lib/runner/loadUtils.js +0 -334
- data/node/node_modules/playwright/lib/runner/loaderHost.js +0 -89
- data/node/node_modules/playwright/lib/runner/processHost.js +0 -180
- data/node/node_modules/playwright/lib/runner/projectUtils.js +0 -241
- data/node/node_modules/playwright/lib/runner/rebase.js +0 -189
- data/node/node_modules/playwright/lib/runner/reporters.js +0 -138
- data/node/node_modules/playwright/lib/runner/sigIntWatcher.js +0 -96
- data/node/node_modules/playwright/lib/runner/storage.js +0 -91
- data/node/node_modules/playwright/lib/runner/taskRunner.js +0 -127
- data/node/node_modules/playwright/lib/runner/tasks.js +0 -410
- data/node/node_modules/playwright/lib/runner/testGroups.js +0 -125
- data/node/node_modules/playwright/lib/runner/testRunner.js +0 -398
- data/node/node_modules/playwright/lib/runner/testServer.js +0 -269
- data/node/node_modules/playwright/lib/runner/uiModeReporter.js +0 -30
- data/node/node_modules/playwright/lib/runner/vcs.js +0 -72
- data/node/node_modules/playwright/lib/runner/watchMode.js +0 -396
- data/node/node_modules/playwright/lib/runner/workerHost.js +0 -104
- data/node/node_modules/playwright/lib/third_party/pirates.js +0 -62
- data/node/node_modules/playwright/lib/third_party/tsconfig-loader.js +0 -103
- data/node/node_modules/playwright/lib/transform/babelBundle.js +0 -46
- data/node/node_modules/playwright/lib/transform/babelBundleImpl.js +0 -461
- data/node/node_modules/playwright/lib/transform/compilationCache.js +0 -274
- data/node/node_modules/playwright/lib/transform/esmLoader.js +0 -103
- data/node/node_modules/playwright/lib/transform/md.js +0 -221
- data/node/node_modules/playwright/lib/transform/portTransport.js +0 -67
- data/node/node_modules/playwright/lib/transform/transform.js +0 -303
- data/node/node_modules/playwright/lib/util.js +0 -400
- data/node/node_modules/playwright/lib/utilsBundle.js +0 -50
- data/node/node_modules/playwright/lib/utilsBundleImpl.js +0 -103
- data/node/node_modules/playwright/lib/worker/fixtureRunner.js +0 -262
- data/node/node_modules/playwright/lib/worker/testInfo.js +0 -536
- data/node/node_modules/playwright/lib/worker/testTracing.js +0 -345
- data/node/node_modules/playwright/lib/worker/timeoutManager.js +0 -174
- data/node/node_modules/playwright/lib/worker/util.js +0 -31
- data/node/node_modules/playwright/lib/worker/workerMain.js +0 -530
- data/node/node_modules/playwright/package.json +0 -72
- data/node/node_modules/playwright/test.d.ts +0 -18
- data/node/node_modules/playwright/test.js +0 -24
- data/node/node_modules/playwright/test.mjs +0 -34
- data/node/node_modules/playwright/types/test.d.ts +0 -10251
- data/node/node_modules/playwright/types/testReporter.d.ts +0 -822
- data/node/node_modules/playwright-core/LICENSE +0 -202
- data/node/node_modules/playwright-core/NOTICE +0 -5
- data/node/node_modules/playwright-core/README.md +0 -3
- data/node/node_modules/playwright-core/ThirdPartyNotices.txt +0 -4076
- data/node/node_modules/playwright-core/bin/install_media_pack.ps1 +0 -5
- data/node/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +0 -33
- data/node/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +0 -42
- data/node/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +0 -13
- data/node/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +0 -24
- data/node/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +0 -42
- data/node/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +0 -12
- data/node/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +0 -24
- data/node/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +0 -48
- data/node/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +0 -11
- data/node/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +0 -23
- data/node/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +0 -48
- data/node/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +0 -11
- data/node/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +0 -23
- data/node/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +0 -48
- data/node/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +0 -11
- data/node/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +0 -24
- data/node/node_modules/playwright-core/browsers.json +0 -79
- data/node/node_modules/playwright-core/cli.js +0 -18
- data/node/node_modules/playwright-core/index.d.ts +0 -17
- data/node/node_modules/playwright-core/index.js +0 -32
- data/node/node_modules/playwright-core/index.mjs +0 -28
- data/node/node_modules/playwright-core/lib/androidServerImpl.js +0 -65
- data/node/node_modules/playwright-core/lib/browserServerImpl.js +0 -120
- data/node/node_modules/playwright-core/lib/cli/driver.js +0 -97
- data/node/node_modules/playwright-core/lib/cli/program.js +0 -589
- data/node/node_modules/playwright-core/lib/cli/programWithTestStub.js +0 -74
- data/node/node_modules/playwright-core/lib/client/android.js +0 -361
- data/node/node_modules/playwright-core/lib/client/api.js +0 -137
- data/node/node_modules/playwright-core/lib/client/artifact.js +0 -79
- data/node/node_modules/playwright-core/lib/client/browser.js +0 -161
- data/node/node_modules/playwright-core/lib/client/browserContext.js +0 -582
- data/node/node_modules/playwright-core/lib/client/browserType.js +0 -185
- data/node/node_modules/playwright-core/lib/client/cdpSession.js +0 -51
- data/node/node_modules/playwright-core/lib/client/channelOwner.js +0 -194
- data/node/node_modules/playwright-core/lib/client/clientHelper.js +0 -64
- data/node/node_modules/playwright-core/lib/client/clientInstrumentation.js +0 -55
- data/node/node_modules/playwright-core/lib/client/clientStackTrace.js +0 -69
- data/node/node_modules/playwright-core/lib/client/clock.js +0 -68
- data/node/node_modules/playwright-core/lib/client/connection.js +0 -318
- data/node/node_modules/playwright-core/lib/client/consoleMessage.js +0 -58
- data/node/node_modules/playwright-core/lib/client/coverage.js +0 -44
- data/node/node_modules/playwright-core/lib/client/dialog.js +0 -56
- data/node/node_modules/playwright-core/lib/client/download.js +0 -62
- data/node/node_modules/playwright-core/lib/client/electron.js +0 -138
- data/node/node_modules/playwright-core/lib/client/elementHandle.js +0 -284
- data/node/node_modules/playwright-core/lib/client/errors.js +0 -77
- data/node/node_modules/playwright-core/lib/client/eventEmitter.js +0 -314
- data/node/node_modules/playwright-core/lib/client/events.js +0 -103
- data/node/node_modules/playwright-core/lib/client/fetch.js +0 -368
- data/node/node_modules/playwright-core/lib/client/fileChooser.js +0 -46
- data/node/node_modules/playwright-core/lib/client/fileUtils.js +0 -34
- data/node/node_modules/playwright-core/lib/client/frame.js +0 -409
- data/node/node_modules/playwright-core/lib/client/harRouter.js +0 -87
- data/node/node_modules/playwright-core/lib/client/input.js +0 -84
- data/node/node_modules/playwright-core/lib/client/jsHandle.js +0 -109
- data/node/node_modules/playwright-core/lib/client/jsonPipe.js +0 -39
- data/node/node_modules/playwright-core/lib/client/localUtils.js +0 -60
- data/node/node_modules/playwright-core/lib/client/locator.js +0 -369
- data/node/node_modules/playwright-core/lib/client/network.js +0 -747
- data/node/node_modules/playwright-core/lib/client/page.js +0 -745
- data/node/node_modules/playwright-core/lib/client/pageAgent.js +0 -64
- data/node/node_modules/playwright-core/lib/client/platform.js +0 -77
- data/node/node_modules/playwright-core/lib/client/playwright.js +0 -71
- data/node/node_modules/playwright-core/lib/client/selectors.js +0 -55
- data/node/node_modules/playwright-core/lib/client/stream.js +0 -39
- data/node/node_modules/playwright-core/lib/client/timeoutSettings.js +0 -79
- data/node/node_modules/playwright-core/lib/client/tracing.js +0 -119
- data/node/node_modules/playwright-core/lib/client/types.js +0 -28
- data/node/node_modules/playwright-core/lib/client/video.js +0 -59
- data/node/node_modules/playwright-core/lib/client/waiter.js +0 -142
- data/node/node_modules/playwright-core/lib/client/webError.js +0 -39
- data/node/node_modules/playwright-core/lib/client/webSocket.js +0 -93
- data/node/node_modules/playwright-core/lib/client/worker.js +0 -85
- data/node/node_modules/playwright-core/lib/client/writableStream.js +0 -39
- data/node/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +0 -28
- data/node/node_modules/playwright-core/lib/generated/clockSource.js +0 -28
- data/node/node_modules/playwright-core/lib/generated/injectedScriptSource.js +0 -28
- data/node/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +0 -28
- data/node/node_modules/playwright-core/lib/generated/storageScriptSource.js +0 -28
- data/node/node_modules/playwright-core/lib/generated/utilityScriptSource.js +0 -28
- data/node/node_modules/playwright-core/lib/generated/webSocketMockSource.js +0 -336
- data/node/node_modules/playwright-core/lib/inProcessFactory.js +0 -60
- data/node/node_modules/playwright-core/lib/inprocess.js +0 -3
- data/node/node_modules/playwright-core/lib/mcpBundle.js +0 -84
- data/node/node_modules/playwright-core/lib/mcpBundleImpl/index.js +0 -147
- data/node/node_modules/playwright-core/lib/outofprocess.js +0 -76
- data/node/node_modules/playwright-core/lib/protocol/serializers.js +0 -197
- data/node/node_modules/playwright-core/lib/protocol/validator.js +0 -2969
- data/node/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +0 -193
- data/node/node_modules/playwright-core/lib/remote/playwrightConnection.js +0 -129
- data/node/node_modules/playwright-core/lib/remote/playwrightServer.js +0 -334
- data/node/node_modules/playwright-core/lib/server/agent/actionRunner.js +0 -335
- data/node/node_modules/playwright-core/lib/server/agent/actions.js +0 -128
- data/node/node_modules/playwright-core/lib/server/agent/codegen.js +0 -111
- data/node/node_modules/playwright-core/lib/server/agent/context.js +0 -150
- data/node/node_modules/playwright-core/lib/server/agent/expectTools.js +0 -156
- data/node/node_modules/playwright-core/lib/server/agent/pageAgent.js +0 -204
- data/node/node_modules/playwright-core/lib/server/agent/performTools.js +0 -262
- data/node/node_modules/playwright-core/lib/server/agent/tool.js +0 -109
- data/node/node_modules/playwright-core/lib/server/android/android.js +0 -465
- data/node/node_modules/playwright-core/lib/server/android/backendAdb.js +0 -177
- data/node/node_modules/playwright-core/lib/server/artifact.js +0 -127
- data/node/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +0 -549
- data/node/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +0 -148
- data/node/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +0 -213
- data/node/node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js +0 -116
- data/node/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +0 -267
- data/node/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +0 -128
- data/node/node_modules/playwright-core/lib/server/bidi/bidiInput.js +0 -146
- data/node/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +0 -383
- data/node/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +0 -102
- data/node/node_modules/playwright-core/lib/server/bidi/bidiPage.js +0 -583
- data/node/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +0 -106
- data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
- data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
- data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +0 -24
- data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +0 -180
- data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +0 -42
- data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +0 -148
- data/node/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +0 -259
- data/node/node_modules/playwright-core/lib/server/browser.js +0 -149
- data/node/node_modules/playwright-core/lib/server/browserContext.js +0 -702
- data/node/node_modules/playwright-core/lib/server/browserType.js +0 -336
- data/node/node_modules/playwright-core/lib/server/callLog.js +0 -82
- data/node/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- data/node/node_modules/playwright-core/lib/server/chromium/chromium.js +0 -395
- data/node/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +0 -104
- data/node/node_modules/playwright-core/lib/server/chromium/crBrowser.js +0 -511
- data/node/node_modules/playwright-core/lib/server/chromium/crConnection.js +0 -197
- data/node/node_modules/playwright-core/lib/server/chromium/crCoverage.js +0 -235
- data/node/node_modules/playwright-core/lib/server/chromium/crDevTools.js +0 -111
- data/node/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +0 -131
- data/node/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +0 -146
- data/node/node_modules/playwright-core/lib/server/chromium/crInput.js +0 -187
- data/node/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +0 -707
- data/node/node_modules/playwright-core/lib/server/chromium/crPage.js +0 -1001
- data/node/node_modules/playwright-core/lib/server/chromium/crPdf.js +0 -121
- data/node/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +0 -145
- data/node/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +0 -136
- data/node/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +0 -162
- data/node/node_modules/playwright-core/lib/server/chromium/protocol.d.js +0 -16
- data/node/node_modules/playwright-core/lib/server/clock.js +0 -149
- data/node/node_modules/playwright-core/lib/server/codegen/csharp.js +0 -327
- data/node/node_modules/playwright-core/lib/server/codegen/java.js +0 -274
- data/node/node_modules/playwright-core/lib/server/codegen/javascript.js +0 -247
- data/node/node_modules/playwright-core/lib/server/codegen/jsonl.js +0 -52
- data/node/node_modules/playwright-core/lib/server/codegen/language.js +0 -132
- data/node/node_modules/playwright-core/lib/server/codegen/languages.js +0 -68
- data/node/node_modules/playwright-core/lib/server/codegen/python.js +0 -279
- data/node/node_modules/playwright-core/lib/server/codegen/types.js +0 -16
- data/node/node_modules/playwright-core/lib/server/console.js +0 -57
- data/node/node_modules/playwright-core/lib/server/cookieStore.js +0 -206
- data/node/node_modules/playwright-core/lib/server/debugController.js +0 -191
- data/node/node_modules/playwright-core/lib/server/debugger.js +0 -119
- data/node/node_modules/playwright-core/lib/server/deviceDescriptors.js +0 -39
- data/node/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +0 -1779
- data/node/node_modules/playwright-core/lib/server/dialog.js +0 -116
- data/node/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +0 -325
- data/node/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +0 -118
- data/node/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +0 -384
- data/node/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +0 -118
- data/node/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +0 -64
- data/node/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +0 -44
- data/node/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +0 -78
- data/node/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +0 -47
- data/node/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +0 -364
- data/node/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +0 -89
- data/node/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +0 -181
- data/node/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +0 -227
- data/node/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +0 -85
- data/node/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
- data/node/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +0 -149
- data/node/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +0 -213
- data/node/node_modules/playwright-core/lib/server/dispatchers/pageAgentDispatcher.js +0 -96
- data/node/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +0 -393
- data/node/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +0 -108
- data/node/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +0 -67
- data/node/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +0 -68
- data/node/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -165
- data/node/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +0 -79
- data/node/node_modules/playwright-core/lib/server/dom.js +0 -815
- data/node/node_modules/playwright-core/lib/server/download.js +0 -70
- data/node/node_modules/playwright-core/lib/server/electron/electron.js +0 -273
- data/node/node_modules/playwright-core/lib/server/electron/loader.js +0 -29
- data/node/node_modules/playwright-core/lib/server/errors.js +0 -69
- data/node/node_modules/playwright-core/lib/server/fetch.js +0 -621
- data/node/node_modules/playwright-core/lib/server/fileChooser.js +0 -43
- data/node/node_modules/playwright-core/lib/server/fileUploadUtils.js +0 -84
- data/node/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +0 -418
- data/node/node_modules/playwright-core/lib/server/firefox/ffConnection.js +0 -142
- data/node/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +0 -150
- data/node/node_modules/playwright-core/lib/server/firefox/ffInput.js +0 -159
- data/node/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +0 -256
- data/node/node_modules/playwright-core/lib/server/firefox/ffPage.js +0 -497
- data/node/node_modules/playwright-core/lib/server/firefox/firefox.js +0 -114
- data/node/node_modules/playwright-core/lib/server/firefox/protocol.d.js +0 -16
- data/node/node_modules/playwright-core/lib/server/formData.js +0 -147
- data/node/node_modules/playwright-core/lib/server/frameSelectors.js +0 -160
- data/node/node_modules/playwright-core/lib/server/frames.js +0 -1471
- data/node/node_modules/playwright-core/lib/server/har/harRecorder.js +0 -147
- data/node/node_modules/playwright-core/lib/server/har/harTracer.js +0 -607
- data/node/node_modules/playwright-core/lib/server/harBackend.js +0 -157
- data/node/node_modules/playwright-core/lib/server/helper.js +0 -96
- data/node/node_modules/playwright-core/lib/server/index.js +0 -58
- data/node/node_modules/playwright-core/lib/server/input.js +0 -277
- data/node/node_modules/playwright-core/lib/server/instrumentation.js +0 -72
- data/node/node_modules/playwright-core/lib/server/javascript.js +0 -291
- data/node/node_modules/playwright-core/lib/server/launchApp.js +0 -128
- data/node/node_modules/playwright-core/lib/server/localUtils.js +0 -214
- data/node/node_modules/playwright-core/lib/server/macEditingCommands.js +0 -143
- data/node/node_modules/playwright-core/lib/server/network.js +0 -667
- data/node/node_modules/playwright-core/lib/server/page.js +0 -830
- data/node/node_modules/playwright-core/lib/server/pipeTransport.js +0 -89
- data/node/node_modules/playwright-core/lib/server/playwright.js +0 -69
- data/node/node_modules/playwright-core/lib/server/progress.js +0 -132
- data/node/node_modules/playwright-core/lib/server/protocolError.js +0 -52
- data/node/node_modules/playwright-core/lib/server/recorder/chat.js +0 -161
- data/node/node_modules/playwright-core/lib/server/recorder/recorderApp.js +0 -366
- data/node/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +0 -138
- data/node/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +0 -83
- data/node/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +0 -157
- data/node/node_modules/playwright-core/lib/server/recorder/throttledFile.js +0 -57
- data/node/node_modules/playwright-core/lib/server/recorder.js +0 -499
- data/node/node_modules/playwright-core/lib/server/registry/browserFetcher.js +0 -177
- data/node/node_modules/playwright-core/lib/server/registry/dependencies.js +0 -371
- data/node/node_modules/playwright-core/lib/server/registry/index.js +0 -1422
- data/node/node_modules/playwright-core/lib/server/registry/nativeDeps.js +0 -1280
- data/node/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +0 -127
- data/node/node_modules/playwright-core/lib/server/screencast.js +0 -190
- data/node/node_modules/playwright-core/lib/server/screenshotter.js +0 -333
- data/node/node_modules/playwright-core/lib/server/selectors.js +0 -112
- data/node/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +0 -383
- data/node/node_modules/playwright-core/lib/server/socksInterceptor.js +0 -95
- data/node/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +0 -147
- data/node/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +0 -561
- data/node/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +0 -604
- data/node/node_modules/playwright-core/lib/server/trace/viewer/traceParser.js +0 -72
- data/node/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +0 -245
- data/node/node_modules/playwright-core/lib/server/transport.js +0 -181
- data/node/node_modules/playwright-core/lib/server/types.js +0 -28
- data/node/node_modules/playwright-core/lib/server/usKeyboardLayout.js +0 -145
- data/node/node_modules/playwright-core/lib/server/utils/ascii.js +0 -44
- data/node/node_modules/playwright-core/lib/server/utils/comparators.js +0 -139
- data/node/node_modules/playwright-core/lib/server/utils/crypto.js +0 -216
- data/node/node_modules/playwright-core/lib/server/utils/debug.js +0 -42
- data/node/node_modules/playwright-core/lib/server/utils/debugLogger.js +0 -122
- data/node/node_modules/playwright-core/lib/server/utils/env.js +0 -73
- data/node/node_modules/playwright-core/lib/server/utils/eventsHelper.js +0 -39
- data/node/node_modules/playwright-core/lib/server/utils/expectUtils.js +0 -123
- data/node/node_modules/playwright-core/lib/server/utils/fileUtils.js +0 -191
- data/node/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +0 -207
- data/node/node_modules/playwright-core/lib/server/utils/hostPlatform.js +0 -123
- data/node/node_modules/playwright-core/lib/server/utils/httpServer.js +0 -203
- data/node/node_modules/playwright-core/lib/server/utils/imageUtils.js +0 -141
- data/node/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +0 -89
- data/node/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +0 -109
- data/node/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +0 -78
- data/node/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +0 -102
- data/node/node_modules/playwright-core/lib/server/utils/linuxUtils.js +0 -71
- data/node/node_modules/playwright-core/lib/server/utils/network.js +0 -242
- data/node/node_modules/playwright-core/lib/server/utils/nodePlatform.js +0 -154
- data/node/node_modules/playwright-core/lib/server/utils/pipeTransport.js +0 -84
- data/node/node_modules/playwright-core/lib/server/utils/processLauncher.js +0 -241
- data/node/node_modules/playwright-core/lib/server/utils/profiler.js +0 -65
- data/node/node_modules/playwright-core/lib/server/utils/socksProxy.js +0 -511
- data/node/node_modules/playwright-core/lib/server/utils/spawnAsync.js +0 -41
- data/node/node_modules/playwright-core/lib/server/utils/task.js +0 -51
- data/node/node_modules/playwright-core/lib/server/utils/userAgent.js +0 -98
- data/node/node_modules/playwright-core/lib/server/utils/wsServer.js +0 -121
- data/node/node_modules/playwright-core/lib/server/utils/zipFile.js +0 -74
- data/node/node_modules/playwright-core/lib/server/utils/zones.js +0 -57
- data/node/node_modules/playwright-core/lib/server/videoRecorder.js +0 -124
- data/node/node_modules/playwright-core/lib/server/webkit/protocol.d.js +0 -16
- data/node/node_modules/playwright-core/lib/server/webkit/webkit.js +0 -108
- data/node/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +0 -335
- data/node/node_modules/playwright-core/lib/server/webkit/wkConnection.js +0 -144
- data/node/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +0 -154
- data/node/node_modules/playwright-core/lib/server/webkit/wkInput.js +0 -181
- data/node/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +0 -197
- data/node/node_modules/playwright-core/lib/server/webkit/wkPage.js +0 -1158
- data/node/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +0 -83
- data/node/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +0 -105
- data/node/node_modules/playwright-core/lib/third_party/pixelmatch.js +0 -255
- data/node/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +0 -455
- data/node/node_modules/playwright-core/lib/utils/isomorphic/assert.js +0 -31
- data/node/node_modules/playwright-core/lib/utils/isomorphic/colors.js +0 -72
- data/node/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +0 -245
- data/node/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +0 -1051
- data/node/node_modules/playwright-core/lib/utils/isomorphic/headers.js +0 -53
- data/node/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +0 -689
- data/node/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +0 -176
- data/node/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +0 -81
- data/node/node_modules/playwright-core/lib/utils/isomorphic/lruCache.js +0 -51
- data/node/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +0 -114
- data/node/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +0 -459
- data/node/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +0 -80
- data/node/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +0 -81
- data/node/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +0 -330
- data/node/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +0 -43
- data/node/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +0 -386
- data/node/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +0 -54
- data/node/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +0 -158
- data/node/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +0 -204
- data/node/node_modules/playwright-core/lib/utils/isomorphic/time.js +0 -49
- data/node/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +0 -66
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js +0 -16
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +0 -499
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +0 -120
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +0 -89
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +0 -131
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js +0 -365
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +0 -400
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +0 -16
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +0 -16
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +0 -16
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +0 -16
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +0 -16
- data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +0 -16
- data/node/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +0 -58
- data/node/node_modules/playwright-core/lib/utils/isomorphic/types.js +0 -16
- data/node/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +0 -190
- data/node/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +0 -251
- data/node/node_modules/playwright-core/lib/utils/isomorphic/yaml.js +0 -84
- data/node/node_modules/playwright-core/lib/utils.js +0 -111
- data/node/node_modules/playwright-core/lib/utilsBundle.js +0 -109
- data/node/node_modules/playwright-core/lib/utilsBundleImpl/index.js +0 -218
- data/node/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +0 -1066
- data/node/node_modules/playwright-core/lib/vite/htmlReport/index.html +0 -84
- data/node/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +0 -1
- data/node/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DadYNm1I.js +0 -32
- data/node/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- data/node/node_modules/playwright-core/lib/vite/recorder/assets/index-BSjZa4pk.css +0 -1
- data/node/node_modules/playwright-core/lib/vite/recorder/assets/index-BhTWtUlo.js +0 -193
- data/node/node_modules/playwright-core/lib/vite/recorder/index.html +0 -29
- data/node/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +0 -9
- data/node/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-a5XoALAZ.js +0 -32
- data/node/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CJSZINFr.js +0 -266
- data/node/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +0 -9
- data/node/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +0 -1
- data/node/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- data/node/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.7ch9cixO.css +0 -1
- data/node/node_modules/playwright-core/lib/vite/traceViewer/index.BVu7tZDe.css +0 -1
- data/node/node_modules/playwright-core/lib/vite/traceViewer/index.Bk2uYQRV.js +0 -2
- data/node/node_modules/playwright-core/lib/vite/traceViewer/index.html +0 -43
- data/node/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +0 -16
- data/node/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +0 -9
- data/node/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +0 -21
- data/node/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +0 -5
- data/node/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +0 -1
- data/node/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CQJ9SCIQ.js +0 -5
- data/node/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +0 -17
- data/node/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +0 -32
- data/node/node_modules/playwright-core/lib/zipBundle.js +0 -34
- data/node/node_modules/playwright-core/lib/zipBundleImpl.js +0 -5
- data/node/node_modules/playwright-core/package.json +0 -43
- data/node/node_modules/playwright-core/types/protocol.d.ts +0 -23824
- data/node/node_modules/playwright-core/types/structs.d.ts +0 -45
- data/node/node_modules/playwright-core/types/types.d.ts +0 -22843
- data/node/package-lock.json +0 -72
- data/node/package.json +0 -14
- data/node/src/index.js +0 -215
- data/spec/rubycrawl_spec.rb +0 -51
- data/spec/spec_helper.rb +0 -11
|
@@ -1,84 +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 fileUploadUtils_exports = {};
|
|
30
|
-
__export(fileUploadUtils_exports, {
|
|
31
|
-
fileUploadSizeLimit: () => fileUploadSizeLimit,
|
|
32
|
-
prepareFilesForUpload: () => prepareFilesForUpload
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(fileUploadUtils_exports);
|
|
35
|
-
var import_fs = __toESM(require("fs"));
|
|
36
|
-
var import_path = __toESM(require("path"));
|
|
37
|
-
var import_assert = require("../utils/isomorphic/assert");
|
|
38
|
-
var import_utilsBundle = require("../utilsBundle");
|
|
39
|
-
const fileUploadSizeLimit = 50 * 1024 * 1024;
|
|
40
|
-
async function filesExceedUploadLimit(files) {
|
|
41
|
-
const sizes = await Promise.all(files.map(async (file) => (await import_fs.default.promises.stat(file)).size));
|
|
42
|
-
return sizes.reduce((total, size) => total + size, 0) >= fileUploadSizeLimit;
|
|
43
|
-
}
|
|
44
|
-
async function prepareFilesForUpload(frame, params) {
|
|
45
|
-
const { payloads, streams, directoryStream } = params;
|
|
46
|
-
let { localPaths, localDirectory } = params;
|
|
47
|
-
if ([payloads, localPaths, localDirectory, streams, directoryStream].filter(Boolean).length !== 1)
|
|
48
|
-
throw new Error("Exactly one of payloads, localPaths and streams must be provided");
|
|
49
|
-
if (streams)
|
|
50
|
-
localPaths = streams.map((c) => c.path());
|
|
51
|
-
if (directoryStream)
|
|
52
|
-
localDirectory = directoryStream.path();
|
|
53
|
-
if (localPaths) {
|
|
54
|
-
for (const p of localPaths)
|
|
55
|
-
(0, import_assert.assert)(import_path.default.isAbsolute(p) && import_path.default.resolve(p) === p, "Paths provided to localPaths must be absolute and fully resolved.");
|
|
56
|
-
}
|
|
57
|
-
let fileBuffers = payloads;
|
|
58
|
-
if (!frame._page.browserContext._browser._isCollocatedWithServer) {
|
|
59
|
-
if (localPaths) {
|
|
60
|
-
if (await filesExceedUploadLimit(localPaths))
|
|
61
|
-
throw new Error("Cannot transfer files larger than 50Mb to a browser not co-located with the server");
|
|
62
|
-
fileBuffers = await Promise.all(localPaths.map(async (item) => {
|
|
63
|
-
return {
|
|
64
|
-
name: import_path.default.basename(item),
|
|
65
|
-
buffer: await import_fs.default.promises.readFile(item),
|
|
66
|
-
lastModifiedMs: (await import_fs.default.promises.stat(item)).mtimeMs
|
|
67
|
-
};
|
|
68
|
-
}));
|
|
69
|
-
localPaths = void 0;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
const filePayloads = fileBuffers?.map((payload) => ({
|
|
73
|
-
name: payload.name,
|
|
74
|
-
mimeType: payload.mimeType || import_utilsBundle.mime.getType(payload.name) || "application/octet-stream",
|
|
75
|
-
buffer: payload.buffer.toString("base64"),
|
|
76
|
-
lastModifiedMs: payload.lastModifiedMs
|
|
77
|
-
}));
|
|
78
|
-
return { localPaths, localDirectory, filePayloads };
|
|
79
|
-
}
|
|
80
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
81
|
-
0 && (module.exports = {
|
|
82
|
-
fileUploadSizeLimit,
|
|
83
|
-
prepareFilesForUpload
|
|
84
|
-
});
|
|
@@ -1,418 +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 ffBrowser_exports = {};
|
|
30
|
-
__export(ffBrowser_exports, {
|
|
31
|
-
FFBrowser: () => FFBrowser,
|
|
32
|
-
FFBrowserContext: () => FFBrowserContext
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(ffBrowser_exports);
|
|
35
|
-
var import_utils = require("../../utils");
|
|
36
|
-
var import_browser = require("../browser");
|
|
37
|
-
var import_browserContext = require("../browserContext");
|
|
38
|
-
var import_errors = require("../errors");
|
|
39
|
-
var network = __toESM(require("../network"));
|
|
40
|
-
var import_ffConnection = require("./ffConnection");
|
|
41
|
-
var import_ffPage = require("./ffPage");
|
|
42
|
-
var import_page = require("../page");
|
|
43
|
-
class FFBrowser extends import_browser.Browser {
|
|
44
|
-
constructor(parent, connection, options) {
|
|
45
|
-
super(parent, options);
|
|
46
|
-
this._version = "";
|
|
47
|
-
this._userAgent = "";
|
|
48
|
-
this._connection = connection;
|
|
49
|
-
this.session = connection.rootSession;
|
|
50
|
-
this._ffPages = /* @__PURE__ */ new Map();
|
|
51
|
-
this._contexts = /* @__PURE__ */ new Map();
|
|
52
|
-
this._connection.on(import_ffConnection.ConnectionEvents.Disconnected, () => this._onDisconnect());
|
|
53
|
-
this.session.on("Browser.attachedToTarget", this._onAttachedToTarget.bind(this));
|
|
54
|
-
this.session.on("Browser.detachedFromTarget", this._onDetachedFromTarget.bind(this));
|
|
55
|
-
this.session.on("Browser.downloadCreated", this._onDownloadCreated.bind(this));
|
|
56
|
-
this.session.on("Browser.downloadFinished", this._onDownloadFinished.bind(this));
|
|
57
|
-
}
|
|
58
|
-
static async connect(parent, transport, options) {
|
|
59
|
-
const connection = new import_ffConnection.FFConnection(transport, options.protocolLogger, options.browserLogsCollector);
|
|
60
|
-
const browser = new FFBrowser(parent, connection, options);
|
|
61
|
-
if (options.__testHookOnConnectToBrowser)
|
|
62
|
-
await options.__testHookOnConnectToBrowser();
|
|
63
|
-
let firefoxUserPrefs = options.originalLaunchOptions.firefoxUserPrefs ?? {};
|
|
64
|
-
if (Object.keys(kBandaidFirefoxUserPrefs).length)
|
|
65
|
-
firefoxUserPrefs = { ...kBandaidFirefoxUserPrefs, ...firefoxUserPrefs };
|
|
66
|
-
const promises = [
|
|
67
|
-
browser.session.send("Browser.enable", {
|
|
68
|
-
attachToDefaultContext: !!options.persistent,
|
|
69
|
-
userPrefs: Object.entries(firefoxUserPrefs).map(([name, value]) => ({ name, value }))
|
|
70
|
-
}),
|
|
71
|
-
browser._initVersion()
|
|
72
|
-
];
|
|
73
|
-
if (options.persistent) {
|
|
74
|
-
browser._defaultContext = new FFBrowserContext(browser, void 0, options.persistent);
|
|
75
|
-
promises.push(browser._defaultContext._initialize());
|
|
76
|
-
}
|
|
77
|
-
const proxy = options.originalLaunchOptions.proxyOverride || options.proxy;
|
|
78
|
-
if (proxy)
|
|
79
|
-
promises.push(browser.session.send("Browser.setBrowserProxy", toJugglerProxyOptions(proxy)));
|
|
80
|
-
await Promise.all(promises);
|
|
81
|
-
return browser;
|
|
82
|
-
}
|
|
83
|
-
async _initVersion() {
|
|
84
|
-
const result = await this.session.send("Browser.getInfo");
|
|
85
|
-
this._version = result.version.substring(result.version.indexOf("/") + 1);
|
|
86
|
-
this._userAgent = result.userAgent;
|
|
87
|
-
}
|
|
88
|
-
isConnected() {
|
|
89
|
-
return !this._connection._closed;
|
|
90
|
-
}
|
|
91
|
-
async doCreateNewContext(options) {
|
|
92
|
-
if (options.isMobile)
|
|
93
|
-
throw new Error("options.isMobile is not supported in Firefox");
|
|
94
|
-
const { browserContextId } = await this.session.send("Browser.createBrowserContext", { removeOnDetach: true });
|
|
95
|
-
const context = new FFBrowserContext(this, browserContextId, options);
|
|
96
|
-
await context._initialize();
|
|
97
|
-
this._contexts.set(browserContextId, context);
|
|
98
|
-
return context;
|
|
99
|
-
}
|
|
100
|
-
contexts() {
|
|
101
|
-
return Array.from(this._contexts.values());
|
|
102
|
-
}
|
|
103
|
-
version() {
|
|
104
|
-
return this._version;
|
|
105
|
-
}
|
|
106
|
-
userAgent() {
|
|
107
|
-
return this._userAgent;
|
|
108
|
-
}
|
|
109
|
-
_onDetachedFromTarget(payload) {
|
|
110
|
-
const ffPage = this._ffPages.get(payload.targetId);
|
|
111
|
-
this._ffPages.delete(payload.targetId);
|
|
112
|
-
ffPage.didClose();
|
|
113
|
-
}
|
|
114
|
-
_onAttachedToTarget(payload) {
|
|
115
|
-
const { targetId, browserContextId, openerId, type } = payload.targetInfo;
|
|
116
|
-
(0, import_utils.assert)(type === "page");
|
|
117
|
-
const context = browserContextId ? this._contexts.get(browserContextId) : this._defaultContext;
|
|
118
|
-
(0, import_utils.assert)(context, `Unknown context id:${browserContextId}, _defaultContext: ${this._defaultContext}`);
|
|
119
|
-
const session = this._connection.createSession(payload.sessionId);
|
|
120
|
-
const opener = openerId ? this._ffPages.get(openerId) : null;
|
|
121
|
-
const ffPage = new import_ffPage.FFPage(session, context, opener);
|
|
122
|
-
this._ffPages.set(targetId, ffPage);
|
|
123
|
-
}
|
|
124
|
-
_onDownloadCreated(payload) {
|
|
125
|
-
const ffPage = this._ffPages.get(payload.pageTargetId);
|
|
126
|
-
if (!ffPage)
|
|
127
|
-
return;
|
|
128
|
-
ffPage._page.frameManager.frameAbortedNavigation(payload.frameId, "Download is starting");
|
|
129
|
-
let originPage = ffPage._page.initializedOrUndefined();
|
|
130
|
-
if (!originPage) {
|
|
131
|
-
ffPage._markAsError(new Error("Starting new page download"));
|
|
132
|
-
if (ffPage._opener)
|
|
133
|
-
originPage = ffPage._opener._page.initializedOrUndefined();
|
|
134
|
-
}
|
|
135
|
-
if (!originPage)
|
|
136
|
-
return;
|
|
137
|
-
this._downloadCreated(originPage, payload.uuid, payload.url, payload.suggestedFileName);
|
|
138
|
-
}
|
|
139
|
-
_onDownloadFinished(payload) {
|
|
140
|
-
const error = payload.canceled ? "canceled" : payload.error;
|
|
141
|
-
this._downloadFinished(payload.uuid, error);
|
|
142
|
-
}
|
|
143
|
-
_onDisconnect() {
|
|
144
|
-
for (const video of this._idToVideo.values())
|
|
145
|
-
video.artifact.reportFinished(new import_errors.TargetClosedError(this.closeReason()));
|
|
146
|
-
this._idToVideo.clear();
|
|
147
|
-
for (const ffPage of this._ffPages.values())
|
|
148
|
-
ffPage.didClose();
|
|
149
|
-
this._ffPages.clear();
|
|
150
|
-
this._didClose();
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
class FFBrowserContext extends import_browserContext.BrowserContext {
|
|
154
|
-
constructor(browser, browserContextId, options) {
|
|
155
|
-
super(browser, options, browserContextId);
|
|
156
|
-
}
|
|
157
|
-
async _initialize() {
|
|
158
|
-
(0, import_utils.assert)(!this._ffPages().length);
|
|
159
|
-
const browserContextId = this._browserContextId;
|
|
160
|
-
const promises = [
|
|
161
|
-
super._initialize(),
|
|
162
|
-
this._updateInitScripts()
|
|
163
|
-
];
|
|
164
|
-
if (this._options.acceptDownloads !== "internal-browser-default") {
|
|
165
|
-
promises.push(this._browser.session.send("Browser.setDownloadOptions", {
|
|
166
|
-
browserContextId,
|
|
167
|
-
downloadOptions: {
|
|
168
|
-
behavior: this._options.acceptDownloads === "accept" ? "saveToDisk" : "cancel",
|
|
169
|
-
downloadsDir: this._browser.options.downloadsPath
|
|
170
|
-
}
|
|
171
|
-
}));
|
|
172
|
-
}
|
|
173
|
-
promises.push(this.doUpdateDefaultViewport());
|
|
174
|
-
if (this._options.hasTouch)
|
|
175
|
-
promises.push(this._browser.session.send("Browser.setTouchOverride", { browserContextId, hasTouch: true }));
|
|
176
|
-
if (this._options.userAgent)
|
|
177
|
-
promises.push(this._browser.session.send("Browser.setUserAgentOverride", { browserContextId, userAgent: this._options.userAgent }));
|
|
178
|
-
if (this._options.bypassCSP)
|
|
179
|
-
promises.push(this._browser.session.send("Browser.setBypassCSP", { browserContextId, bypassCSP: true }));
|
|
180
|
-
if (this._options.ignoreHTTPSErrors || this._options.internalIgnoreHTTPSErrors)
|
|
181
|
-
promises.push(this._browser.session.send("Browser.setIgnoreHTTPSErrors", { browserContextId, ignoreHTTPSErrors: true }));
|
|
182
|
-
if (this._options.javaScriptEnabled === false)
|
|
183
|
-
promises.push(this._browser.session.send("Browser.setJavaScriptDisabled", { browserContextId, javaScriptDisabled: true }));
|
|
184
|
-
if (this._options.locale)
|
|
185
|
-
promises.push(this._browser.session.send("Browser.setLocaleOverride", { browserContextId, locale: this._options.locale }));
|
|
186
|
-
if (this._options.timezoneId)
|
|
187
|
-
promises.push(this._browser.session.send("Browser.setTimezoneOverride", { browserContextId, timezoneId: this._options.timezoneId }));
|
|
188
|
-
if (this._options.extraHTTPHeaders || this._options.locale)
|
|
189
|
-
promises.push(this.doUpdateExtraHTTPHeaders());
|
|
190
|
-
if (this._options.httpCredentials)
|
|
191
|
-
promises.push(this.setHTTPCredentials(this._options.httpCredentials));
|
|
192
|
-
if (this._options.geolocation)
|
|
193
|
-
promises.push(this.setGeolocation(this._options.geolocation));
|
|
194
|
-
if (this._options.offline)
|
|
195
|
-
promises.push(this.doUpdateOffline());
|
|
196
|
-
promises.push(this.doUpdateDefaultEmulatedMedia());
|
|
197
|
-
if (this._options.recordVideo) {
|
|
198
|
-
promises.push(this._browser.session.send("Browser.setScreencastOptions", {
|
|
199
|
-
// validateBrowserContextOptions ensures correct video size.
|
|
200
|
-
options: {
|
|
201
|
-
...this._options.recordVideo.size,
|
|
202
|
-
quality: 90
|
|
203
|
-
},
|
|
204
|
-
browserContextId: this._browserContextId
|
|
205
|
-
}));
|
|
206
|
-
}
|
|
207
|
-
const proxy = this._options.proxyOverride || this._options.proxy;
|
|
208
|
-
if (proxy) {
|
|
209
|
-
promises.push(this._browser.session.send("Browser.setContextProxy", {
|
|
210
|
-
browserContextId: this._browserContextId,
|
|
211
|
-
...toJugglerProxyOptions(proxy)
|
|
212
|
-
}));
|
|
213
|
-
}
|
|
214
|
-
await Promise.all(promises);
|
|
215
|
-
}
|
|
216
|
-
_ffPages() {
|
|
217
|
-
return Array.from(this._browser._ffPages.values()).filter((ffPage) => ffPage._browserContext === this);
|
|
218
|
-
}
|
|
219
|
-
possiblyUninitializedPages() {
|
|
220
|
-
return this._ffPages().map((ffPage) => ffPage._page);
|
|
221
|
-
}
|
|
222
|
-
async doCreateNewPage() {
|
|
223
|
-
const { targetId } = await this._browser.session.send("Browser.newPage", {
|
|
224
|
-
browserContextId: this._browserContextId
|
|
225
|
-
}).catch((e) => {
|
|
226
|
-
if (e.message.includes("Failed to override timezone"))
|
|
227
|
-
throw new Error(`Invalid timezone ID: ${this._options.timezoneId}`);
|
|
228
|
-
throw e;
|
|
229
|
-
});
|
|
230
|
-
return this._browser._ffPages.get(targetId)._page;
|
|
231
|
-
}
|
|
232
|
-
async doGetCookies(urls) {
|
|
233
|
-
const { cookies } = await this._browser.session.send("Browser.getCookies", { browserContextId: this._browserContextId });
|
|
234
|
-
return network.filterCookies(cookies.map((c) => {
|
|
235
|
-
const { name, value, domain, path, expires, httpOnly, secure, sameSite } = c;
|
|
236
|
-
return {
|
|
237
|
-
name,
|
|
238
|
-
value,
|
|
239
|
-
domain,
|
|
240
|
-
path,
|
|
241
|
-
expires,
|
|
242
|
-
httpOnly,
|
|
243
|
-
secure,
|
|
244
|
-
sameSite
|
|
245
|
-
};
|
|
246
|
-
}), urls);
|
|
247
|
-
}
|
|
248
|
-
async addCookies(cookies) {
|
|
249
|
-
const cc = network.rewriteCookies(cookies).map((c) => {
|
|
250
|
-
const { name, value, url, domain, path, expires, httpOnly, secure, sameSite } = c;
|
|
251
|
-
return {
|
|
252
|
-
name,
|
|
253
|
-
value,
|
|
254
|
-
url,
|
|
255
|
-
domain,
|
|
256
|
-
path,
|
|
257
|
-
expires: expires === -1 ? void 0 : expires,
|
|
258
|
-
httpOnly,
|
|
259
|
-
secure,
|
|
260
|
-
sameSite
|
|
261
|
-
};
|
|
262
|
-
});
|
|
263
|
-
await this._browser.session.send("Browser.setCookies", { browserContextId: this._browserContextId, cookies: cc });
|
|
264
|
-
}
|
|
265
|
-
async doClearCookies() {
|
|
266
|
-
await this._browser.session.send("Browser.clearCookies", { browserContextId: this._browserContextId });
|
|
267
|
-
}
|
|
268
|
-
async doGrantPermissions(origin, permissions) {
|
|
269
|
-
const webPermissionToProtocol = /* @__PURE__ */ new Map([
|
|
270
|
-
["geolocation", "geo"],
|
|
271
|
-
["persistent-storage", "persistent-storage"],
|
|
272
|
-
["push", "push"],
|
|
273
|
-
["notifications", "desktop-notification"]
|
|
274
|
-
]);
|
|
275
|
-
const filtered = permissions.map((permission) => {
|
|
276
|
-
const protocolPermission = webPermissionToProtocol.get(permission);
|
|
277
|
-
if (!protocolPermission)
|
|
278
|
-
throw new Error("Unknown permission: " + permission);
|
|
279
|
-
return protocolPermission;
|
|
280
|
-
});
|
|
281
|
-
await this._browser.session.send("Browser.grantPermissions", { origin, browserContextId: this._browserContextId, permissions: filtered });
|
|
282
|
-
}
|
|
283
|
-
async doClearPermissions() {
|
|
284
|
-
await this._browser.session.send("Browser.resetPermissions", { browserContextId: this._browserContextId });
|
|
285
|
-
}
|
|
286
|
-
async setGeolocation(geolocation) {
|
|
287
|
-
(0, import_browserContext.verifyGeolocation)(geolocation);
|
|
288
|
-
this._options.geolocation = geolocation;
|
|
289
|
-
await this._browser.session.send("Browser.setGeolocationOverride", { browserContextId: this._browserContextId, geolocation: geolocation || null });
|
|
290
|
-
}
|
|
291
|
-
async doUpdateExtraHTTPHeaders() {
|
|
292
|
-
let allHeaders = this._options.extraHTTPHeaders || [];
|
|
293
|
-
if (this._options.locale)
|
|
294
|
-
allHeaders = network.mergeHeaders([allHeaders, network.singleHeader("Accept-Language", this._options.locale)]);
|
|
295
|
-
await this._browser.session.send("Browser.setExtraHTTPHeaders", { browserContextId: this._browserContextId, headers: allHeaders });
|
|
296
|
-
}
|
|
297
|
-
async setUserAgent(userAgent) {
|
|
298
|
-
await this._browser.session.send("Browser.setUserAgentOverride", { browserContextId: this._browserContextId, userAgent: userAgent || null });
|
|
299
|
-
}
|
|
300
|
-
async doUpdateOffline() {
|
|
301
|
-
await this._browser.session.send("Browser.setOnlineOverride", { browserContextId: this._browserContextId, override: this._options.offline ? "offline" : "online" });
|
|
302
|
-
}
|
|
303
|
-
async doSetHTTPCredentials(httpCredentials) {
|
|
304
|
-
this._options.httpCredentials = httpCredentials;
|
|
305
|
-
let credentials = null;
|
|
306
|
-
if (httpCredentials) {
|
|
307
|
-
const { username, password, origin } = httpCredentials;
|
|
308
|
-
credentials = { username, password, origin };
|
|
309
|
-
}
|
|
310
|
-
await this._browser.session.send("Browser.setHTTPCredentials", { browserContextId: this._browserContextId, credentials });
|
|
311
|
-
}
|
|
312
|
-
async doAddInitScript(initScript) {
|
|
313
|
-
await this._updateInitScripts();
|
|
314
|
-
}
|
|
315
|
-
async doRemoveInitScripts(initScripts) {
|
|
316
|
-
await this._updateInitScripts();
|
|
317
|
-
}
|
|
318
|
-
async _updateInitScripts() {
|
|
319
|
-
const bindingScripts = [...this._pageBindings.values()].map((binding) => binding.initScript.source);
|
|
320
|
-
if (this.bindingsInitScript)
|
|
321
|
-
bindingScripts.unshift(this.bindingsInitScript.source);
|
|
322
|
-
const initScripts = this.initScripts.map((script) => script.source);
|
|
323
|
-
await this._browser.session.send("Browser.setInitScripts", { browserContextId: this._browserContextId, scripts: [...bindingScripts, ...initScripts].map((script) => ({ script })) });
|
|
324
|
-
}
|
|
325
|
-
async doUpdateRequestInterception() {
|
|
326
|
-
await Promise.all([
|
|
327
|
-
this._browser.session.send("Browser.setRequestInterception", { browserContextId: this._browserContextId, enabled: this.requestInterceptors.length > 0 }),
|
|
328
|
-
this._browser.session.send("Browser.setCacheDisabled", { browserContextId: this._browserContextId, cacheDisabled: this.requestInterceptors.length > 0 })
|
|
329
|
-
]);
|
|
330
|
-
}
|
|
331
|
-
async doUpdateDefaultViewport() {
|
|
332
|
-
if (!this._options.viewport)
|
|
333
|
-
return;
|
|
334
|
-
const viewport = {
|
|
335
|
-
viewportSize: { width: this._options.viewport.width, height: this._options.viewport.height },
|
|
336
|
-
deviceScaleFactor: this._options.deviceScaleFactor || 1
|
|
337
|
-
};
|
|
338
|
-
await this._browser.session.send("Browser.setDefaultViewport", { browserContextId: this._browserContextId, viewport });
|
|
339
|
-
}
|
|
340
|
-
async doUpdateDefaultEmulatedMedia() {
|
|
341
|
-
if (this._options.colorScheme !== "no-override") {
|
|
342
|
-
await this._browser.session.send("Browser.setColorScheme", {
|
|
343
|
-
browserContextId: this._browserContextId,
|
|
344
|
-
colorScheme: this._options.colorScheme !== void 0 ? this._options.colorScheme : "light"
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
if (this._options.reducedMotion !== "no-override") {
|
|
348
|
-
await this._browser.session.send("Browser.setReducedMotion", {
|
|
349
|
-
browserContextId: this._browserContextId,
|
|
350
|
-
reducedMotion: this._options.reducedMotion !== void 0 ? this._options.reducedMotion : "no-preference"
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
if (this._options.forcedColors !== "no-override") {
|
|
354
|
-
await this._browser.session.send("Browser.setForcedColors", {
|
|
355
|
-
browserContextId: this._browserContextId,
|
|
356
|
-
forcedColors: this._options.forcedColors !== void 0 ? this._options.forcedColors : "none"
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
if (this._options.contrast !== "no-override") {
|
|
360
|
-
await this._browser.session.send("Browser.setContrast", {
|
|
361
|
-
browserContextId: this._browserContextId,
|
|
362
|
-
contrast: this._options.contrast !== void 0 ? this._options.contrast : "no-preference"
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
async doExposePlaywrightBinding() {
|
|
367
|
-
this._browser.session.send("Browser.addBinding", { browserContextId: this._browserContextId, name: import_page.PageBinding.kBindingName, script: "" });
|
|
368
|
-
}
|
|
369
|
-
onClosePersistent() {
|
|
370
|
-
}
|
|
371
|
-
async clearCache() {
|
|
372
|
-
await this._browser.session.send("Browser.clearCache");
|
|
373
|
-
}
|
|
374
|
-
async doClose(reason) {
|
|
375
|
-
if (!this._browserContextId) {
|
|
376
|
-
if (this._options.recordVideo)
|
|
377
|
-
await Promise.all(this._ffPages().map((ffPage) => ffPage._page.screencast.stopVideoRecording()));
|
|
378
|
-
await this._browser.close({ reason });
|
|
379
|
-
} else {
|
|
380
|
-
await this._browser.session.send("Browser.removeBrowserContext", { browserContextId: this._browserContextId });
|
|
381
|
-
this._browser._contexts.delete(this._browserContextId);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
async cancelDownload(uuid) {
|
|
385
|
-
await this._browser.session.send("Browser.cancelDownload", { uuid });
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
function toJugglerProxyOptions(proxy) {
|
|
389
|
-
const proxyServer = new URL(proxy.server);
|
|
390
|
-
let port = parseInt(proxyServer.port, 10);
|
|
391
|
-
let type = "http";
|
|
392
|
-
if (proxyServer.protocol === "socks5:")
|
|
393
|
-
type = "socks";
|
|
394
|
-
else if (proxyServer.protocol === "socks4:")
|
|
395
|
-
type = "socks4";
|
|
396
|
-
else if (proxyServer.protocol === "https:")
|
|
397
|
-
type = "https";
|
|
398
|
-
if (proxyServer.port === "") {
|
|
399
|
-
if (proxyServer.protocol === "http:")
|
|
400
|
-
port = 80;
|
|
401
|
-
else if (proxyServer.protocol === "https:")
|
|
402
|
-
port = 443;
|
|
403
|
-
}
|
|
404
|
-
return {
|
|
405
|
-
type,
|
|
406
|
-
bypass: proxy.bypass ? proxy.bypass.split(",").map((domain) => domain.trim()) : [],
|
|
407
|
-
host: proxyServer.hostname,
|
|
408
|
-
port,
|
|
409
|
-
username: proxy.username,
|
|
410
|
-
password: proxy.password
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
const kBandaidFirefoxUserPrefs = {};
|
|
414
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
415
|
-
0 && (module.exports = {
|
|
416
|
-
FFBrowser,
|
|
417
|
-
FFBrowserContext
|
|
418
|
-
});
|
|
@@ -1,142 +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 ffConnection_exports = {};
|
|
20
|
-
__export(ffConnection_exports, {
|
|
21
|
-
ConnectionEvents: () => ConnectionEvents,
|
|
22
|
-
FFConnection: () => FFConnection,
|
|
23
|
-
FFSession: () => FFSession,
|
|
24
|
-
kBrowserCloseMessageId: () => kBrowserCloseMessageId
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(ffConnection_exports);
|
|
27
|
-
var import_events = require("events");
|
|
28
|
-
var import_debugLogger = require("../utils/debugLogger");
|
|
29
|
-
var import_helper = require("../helper");
|
|
30
|
-
var import_protocolError = require("../protocolError");
|
|
31
|
-
const ConnectionEvents = {
|
|
32
|
-
Disconnected: Symbol("Disconnected")
|
|
33
|
-
};
|
|
34
|
-
const kBrowserCloseMessageId = -9999;
|
|
35
|
-
class FFConnection extends import_events.EventEmitter {
|
|
36
|
-
constructor(transport, protocolLogger, browserLogsCollector) {
|
|
37
|
-
super();
|
|
38
|
-
this.setMaxListeners(0);
|
|
39
|
-
this._transport = transport;
|
|
40
|
-
this._protocolLogger = protocolLogger;
|
|
41
|
-
this._browserLogsCollector = browserLogsCollector;
|
|
42
|
-
this._lastId = 0;
|
|
43
|
-
this._sessions = /* @__PURE__ */ new Map();
|
|
44
|
-
this._closed = false;
|
|
45
|
-
this.rootSession = new FFSession(this, "", (message) => this._rawSend(message));
|
|
46
|
-
this._sessions.set("", this.rootSession);
|
|
47
|
-
this._transport.onmessage = this._onMessage.bind(this);
|
|
48
|
-
this._transport.onclose = this._onClose.bind(this);
|
|
49
|
-
}
|
|
50
|
-
nextMessageId() {
|
|
51
|
-
return ++this._lastId;
|
|
52
|
-
}
|
|
53
|
-
_rawSend(message) {
|
|
54
|
-
this._protocolLogger("send", message);
|
|
55
|
-
this._transport.send(message);
|
|
56
|
-
}
|
|
57
|
-
async _onMessage(message) {
|
|
58
|
-
this._protocolLogger("receive", message);
|
|
59
|
-
if (message.id === kBrowserCloseMessageId)
|
|
60
|
-
return;
|
|
61
|
-
const session = this._sessions.get(message.sessionId || "");
|
|
62
|
-
if (session)
|
|
63
|
-
session.dispatchMessage(message);
|
|
64
|
-
}
|
|
65
|
-
_onClose(reason) {
|
|
66
|
-
this._closed = true;
|
|
67
|
-
this._transport.onmessage = void 0;
|
|
68
|
-
this._transport.onclose = void 0;
|
|
69
|
-
this._browserDisconnectedLogs = import_helper.helper.formatBrowserLogs(this._browserLogsCollector.recentLogs(), reason);
|
|
70
|
-
this.rootSession.dispose();
|
|
71
|
-
Promise.resolve().then(() => this.emit(ConnectionEvents.Disconnected));
|
|
72
|
-
}
|
|
73
|
-
close() {
|
|
74
|
-
if (!this._closed)
|
|
75
|
-
this._transport.close();
|
|
76
|
-
}
|
|
77
|
-
createSession(sessionId) {
|
|
78
|
-
const session = new FFSession(this, sessionId, (message) => this._rawSend({ ...message, sessionId }));
|
|
79
|
-
this._sessions.set(sessionId, session);
|
|
80
|
-
return session;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
class FFSession extends import_events.EventEmitter {
|
|
84
|
-
constructor(connection, sessionId, rawSend) {
|
|
85
|
-
super();
|
|
86
|
-
this._disposed = false;
|
|
87
|
-
this._crashed = false;
|
|
88
|
-
this.setMaxListeners(0);
|
|
89
|
-
this._callbacks = /* @__PURE__ */ new Map();
|
|
90
|
-
this._connection = connection;
|
|
91
|
-
this._sessionId = sessionId;
|
|
92
|
-
this._rawSend = rawSend;
|
|
93
|
-
}
|
|
94
|
-
markAsCrashed() {
|
|
95
|
-
this._crashed = true;
|
|
96
|
-
}
|
|
97
|
-
async send(method, params) {
|
|
98
|
-
if (this._crashed || this._disposed || this._connection._closed || this._connection._browserDisconnectedLogs)
|
|
99
|
-
throw new import_protocolError.ProtocolError(this._crashed ? "crashed" : "closed", void 0, this._connection._browserDisconnectedLogs);
|
|
100
|
-
const id = this._connection.nextMessageId();
|
|
101
|
-
this._rawSend({ method, params, id });
|
|
102
|
-
return new Promise((resolve, reject) => {
|
|
103
|
-
this._callbacks.set(id, { resolve, reject, error: new import_protocolError.ProtocolError("error", method) });
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
sendMayFail(method, params) {
|
|
107
|
-
return this.send(method, params).catch((error) => import_debugLogger.debugLogger.log("error", error));
|
|
108
|
-
}
|
|
109
|
-
dispatchMessage(object) {
|
|
110
|
-
if (object.id) {
|
|
111
|
-
const callback = this._callbacks.get(object.id);
|
|
112
|
-
if (callback) {
|
|
113
|
-
this._callbacks.delete(object.id);
|
|
114
|
-
if (object.error) {
|
|
115
|
-
callback.error.setMessage(object.error.message);
|
|
116
|
-
callback.reject(callback.error);
|
|
117
|
-
} else {
|
|
118
|
-
callback.resolve(object.result);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
} else {
|
|
122
|
-
Promise.resolve().then(() => this.emit(object.method, object.params));
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
dispose() {
|
|
126
|
-
this._disposed = true;
|
|
127
|
-
this._connection._sessions.delete(this._sessionId);
|
|
128
|
-
for (const callback of this._callbacks.values()) {
|
|
129
|
-
callback.error.type = this._crashed ? "crashed" : "closed";
|
|
130
|
-
callback.error.logs = this._connection._browserDisconnectedLogs;
|
|
131
|
-
callback.reject(callback.error);
|
|
132
|
-
}
|
|
133
|
-
this._callbacks.clear();
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
-
0 && (module.exports = {
|
|
138
|
-
ConnectionEvents,
|
|
139
|
-
FFConnection,
|
|
140
|
-
FFSession,
|
|
141
|
-
kBrowserCloseMessageId
|
|
142
|
-
});
|