rubycrawl 0.1.2 → 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/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,747 +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 network_exports = {};
|
|
20
|
-
__export(network_exports, {
|
|
21
|
-
RawHeaders: () => RawHeaders,
|
|
22
|
-
Request: () => Request,
|
|
23
|
-
Response: () => Response,
|
|
24
|
-
Route: () => Route,
|
|
25
|
-
RouteHandler: () => RouteHandler,
|
|
26
|
-
WebSocket: () => WebSocket,
|
|
27
|
-
WebSocketRoute: () => WebSocketRoute,
|
|
28
|
-
WebSocketRouteHandler: () => WebSocketRouteHandler,
|
|
29
|
-
validateHeaders: () => validateHeaders
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(network_exports);
|
|
32
|
-
var import_channelOwner = require("./channelOwner");
|
|
33
|
-
var import_errors = require("./errors");
|
|
34
|
-
var import_events = require("./events");
|
|
35
|
-
var import_fetch = require("./fetch");
|
|
36
|
-
var import_frame = require("./frame");
|
|
37
|
-
var import_waiter = require("./waiter");
|
|
38
|
-
var import_worker = require("./worker");
|
|
39
|
-
var import_assert = require("../utils/isomorphic/assert");
|
|
40
|
-
var import_headers = require("../utils/isomorphic/headers");
|
|
41
|
-
var import_urlMatch = require("../utils/isomorphic/urlMatch");
|
|
42
|
-
var import_manualPromise = require("../utils/isomorphic/manualPromise");
|
|
43
|
-
var import_multimap = require("../utils/isomorphic/multimap");
|
|
44
|
-
var import_rtti = require("../utils/isomorphic/rtti");
|
|
45
|
-
var import_stackTrace = require("../utils/isomorphic/stackTrace");
|
|
46
|
-
var import_mimeType = require("../utils/isomorphic/mimeType");
|
|
47
|
-
class Request extends import_channelOwner.ChannelOwner {
|
|
48
|
-
constructor(parent, type, guid, initializer) {
|
|
49
|
-
super(parent, type, guid, initializer);
|
|
50
|
-
this._redirectedFrom = null;
|
|
51
|
-
this._redirectedTo = null;
|
|
52
|
-
this._failureText = null;
|
|
53
|
-
this._fallbackOverrides = {};
|
|
54
|
-
this._hasResponse = false;
|
|
55
|
-
this._redirectedFrom = Request.fromNullable(initializer.redirectedFrom);
|
|
56
|
-
if (this._redirectedFrom)
|
|
57
|
-
this._redirectedFrom._redirectedTo = this;
|
|
58
|
-
this._provisionalHeaders = new RawHeaders(initializer.headers);
|
|
59
|
-
this._timing = {
|
|
60
|
-
startTime: 0,
|
|
61
|
-
domainLookupStart: -1,
|
|
62
|
-
domainLookupEnd: -1,
|
|
63
|
-
connectStart: -1,
|
|
64
|
-
secureConnectionStart: -1,
|
|
65
|
-
connectEnd: -1,
|
|
66
|
-
requestStart: -1,
|
|
67
|
-
responseStart: -1,
|
|
68
|
-
responseEnd: -1
|
|
69
|
-
};
|
|
70
|
-
this._hasResponse = this._initializer.hasResponse;
|
|
71
|
-
this._channel.on("response", () => this._hasResponse = true);
|
|
72
|
-
}
|
|
73
|
-
static from(request) {
|
|
74
|
-
return request._object;
|
|
75
|
-
}
|
|
76
|
-
static fromNullable(request) {
|
|
77
|
-
return request ? Request.from(request) : null;
|
|
78
|
-
}
|
|
79
|
-
url() {
|
|
80
|
-
return this._fallbackOverrides.url || this._initializer.url;
|
|
81
|
-
}
|
|
82
|
-
resourceType() {
|
|
83
|
-
return this._initializer.resourceType;
|
|
84
|
-
}
|
|
85
|
-
method() {
|
|
86
|
-
return this._fallbackOverrides.method || this._initializer.method;
|
|
87
|
-
}
|
|
88
|
-
postData() {
|
|
89
|
-
return (this._fallbackOverrides.postDataBuffer || this._initializer.postData)?.toString("utf-8") || null;
|
|
90
|
-
}
|
|
91
|
-
postDataBuffer() {
|
|
92
|
-
return this._fallbackOverrides.postDataBuffer || this._initializer.postData || null;
|
|
93
|
-
}
|
|
94
|
-
postDataJSON() {
|
|
95
|
-
const postData = this.postData();
|
|
96
|
-
if (!postData)
|
|
97
|
-
return null;
|
|
98
|
-
const contentType = this.headers()["content-type"];
|
|
99
|
-
if (contentType?.includes("application/x-www-form-urlencoded")) {
|
|
100
|
-
const entries = {};
|
|
101
|
-
const parsed = new URLSearchParams(postData);
|
|
102
|
-
for (const [k, v] of parsed.entries())
|
|
103
|
-
entries[k] = v;
|
|
104
|
-
return entries;
|
|
105
|
-
}
|
|
106
|
-
try {
|
|
107
|
-
return JSON.parse(postData);
|
|
108
|
-
} catch (e) {
|
|
109
|
-
throw new Error("POST data is not a valid JSON object: " + postData);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* @deprecated
|
|
114
|
-
*/
|
|
115
|
-
headers() {
|
|
116
|
-
if (this._fallbackOverrides.headers)
|
|
117
|
-
return RawHeaders._fromHeadersObjectLossy(this._fallbackOverrides.headers).headers();
|
|
118
|
-
return this._provisionalHeaders.headers();
|
|
119
|
-
}
|
|
120
|
-
async _actualHeaders() {
|
|
121
|
-
if (this._fallbackOverrides.headers)
|
|
122
|
-
return RawHeaders._fromHeadersObjectLossy(this._fallbackOverrides.headers);
|
|
123
|
-
if (!this._actualHeadersPromise) {
|
|
124
|
-
this._actualHeadersPromise = this._wrapApiCall(async () => {
|
|
125
|
-
return new RawHeaders((await this._channel.rawRequestHeaders()).headers);
|
|
126
|
-
}, { internal: true });
|
|
127
|
-
}
|
|
128
|
-
return await this._actualHeadersPromise;
|
|
129
|
-
}
|
|
130
|
-
async allHeaders() {
|
|
131
|
-
return (await this._actualHeaders()).headers();
|
|
132
|
-
}
|
|
133
|
-
async headersArray() {
|
|
134
|
-
return (await this._actualHeaders()).headersArray();
|
|
135
|
-
}
|
|
136
|
-
async headerValue(name) {
|
|
137
|
-
return (await this._actualHeaders()).get(name);
|
|
138
|
-
}
|
|
139
|
-
async response() {
|
|
140
|
-
return Response.fromNullable((await this._channel.response()).response);
|
|
141
|
-
}
|
|
142
|
-
async _internalResponse() {
|
|
143
|
-
return Response.fromNullable((await this._channel.response()).response);
|
|
144
|
-
}
|
|
145
|
-
frame() {
|
|
146
|
-
if (!this._initializer.frame) {
|
|
147
|
-
(0, import_assert.assert)(this.serviceWorker());
|
|
148
|
-
throw new Error("Service Worker requests do not have an associated frame.");
|
|
149
|
-
}
|
|
150
|
-
const frame = import_frame.Frame.from(this._initializer.frame);
|
|
151
|
-
if (!frame._page) {
|
|
152
|
-
throw new Error([
|
|
153
|
-
"Frame for this navigation request is not available, because the request",
|
|
154
|
-
"was issued before the frame is created. You can check whether the request",
|
|
155
|
-
"is a navigation request by calling isNavigationRequest() method."
|
|
156
|
-
].join("\n"));
|
|
157
|
-
}
|
|
158
|
-
return frame;
|
|
159
|
-
}
|
|
160
|
-
_safePage() {
|
|
161
|
-
return import_frame.Frame.fromNullable(this._initializer.frame)?._page || null;
|
|
162
|
-
}
|
|
163
|
-
serviceWorker() {
|
|
164
|
-
return this._initializer.serviceWorker ? import_worker.Worker.from(this._initializer.serviceWorker) : null;
|
|
165
|
-
}
|
|
166
|
-
isNavigationRequest() {
|
|
167
|
-
return this._initializer.isNavigationRequest;
|
|
168
|
-
}
|
|
169
|
-
redirectedFrom() {
|
|
170
|
-
return this._redirectedFrom;
|
|
171
|
-
}
|
|
172
|
-
redirectedTo() {
|
|
173
|
-
return this._redirectedTo;
|
|
174
|
-
}
|
|
175
|
-
failure() {
|
|
176
|
-
if (this._failureText === null)
|
|
177
|
-
return null;
|
|
178
|
-
return {
|
|
179
|
-
errorText: this._failureText
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
timing() {
|
|
183
|
-
return this._timing;
|
|
184
|
-
}
|
|
185
|
-
async sizes() {
|
|
186
|
-
const response = await this.response();
|
|
187
|
-
if (!response)
|
|
188
|
-
throw new Error("Unable to fetch sizes for failed request");
|
|
189
|
-
return (await response._channel.sizes()).sizes;
|
|
190
|
-
}
|
|
191
|
-
_setResponseEndTiming(responseEndTiming) {
|
|
192
|
-
this._timing.responseEnd = responseEndTiming;
|
|
193
|
-
if (this._timing.responseStart === -1)
|
|
194
|
-
this._timing.responseStart = responseEndTiming;
|
|
195
|
-
}
|
|
196
|
-
_finalRequest() {
|
|
197
|
-
return this._redirectedTo ? this._redirectedTo._finalRequest() : this;
|
|
198
|
-
}
|
|
199
|
-
_applyFallbackOverrides(overrides) {
|
|
200
|
-
if (overrides.url)
|
|
201
|
-
this._fallbackOverrides.url = overrides.url;
|
|
202
|
-
if (overrides.method)
|
|
203
|
-
this._fallbackOverrides.method = overrides.method;
|
|
204
|
-
if (overrides.headers)
|
|
205
|
-
this._fallbackOverrides.headers = overrides.headers;
|
|
206
|
-
if ((0, import_rtti.isString)(overrides.postData))
|
|
207
|
-
this._fallbackOverrides.postDataBuffer = Buffer.from(overrides.postData, "utf-8");
|
|
208
|
-
else if (overrides.postData instanceof Buffer)
|
|
209
|
-
this._fallbackOverrides.postDataBuffer = overrides.postData;
|
|
210
|
-
else if (overrides.postData)
|
|
211
|
-
this._fallbackOverrides.postDataBuffer = Buffer.from(JSON.stringify(overrides.postData), "utf-8");
|
|
212
|
-
}
|
|
213
|
-
_fallbackOverridesForContinue() {
|
|
214
|
-
return this._fallbackOverrides;
|
|
215
|
-
}
|
|
216
|
-
_targetClosedScope() {
|
|
217
|
-
return this.serviceWorker()?._closedScope || this._safePage()?._closedOrCrashedScope || new import_manualPromise.LongStandingScope();
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
class Route extends import_channelOwner.ChannelOwner {
|
|
221
|
-
constructor(parent, type, guid, initializer) {
|
|
222
|
-
super(parent, type, guid, initializer);
|
|
223
|
-
this._handlingPromise = null;
|
|
224
|
-
this._didThrow = false;
|
|
225
|
-
}
|
|
226
|
-
static from(route) {
|
|
227
|
-
return route._object;
|
|
228
|
-
}
|
|
229
|
-
request() {
|
|
230
|
-
return Request.from(this._initializer.request);
|
|
231
|
-
}
|
|
232
|
-
async _raceWithTargetClose(promise) {
|
|
233
|
-
return await this.request()._targetClosedScope().safeRace(promise);
|
|
234
|
-
}
|
|
235
|
-
async _startHandling() {
|
|
236
|
-
this._handlingPromise = new import_manualPromise.ManualPromise();
|
|
237
|
-
return await this._handlingPromise;
|
|
238
|
-
}
|
|
239
|
-
async fallback(options = {}) {
|
|
240
|
-
this._checkNotHandled();
|
|
241
|
-
this.request()._applyFallbackOverrides(options);
|
|
242
|
-
this._reportHandled(false);
|
|
243
|
-
}
|
|
244
|
-
async abort(errorCode) {
|
|
245
|
-
await this._handleRoute(async () => {
|
|
246
|
-
await this._raceWithTargetClose(this._channel.abort({ errorCode }));
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
async _redirectNavigationRequest(url) {
|
|
250
|
-
await this._handleRoute(async () => {
|
|
251
|
-
await this._raceWithTargetClose(this._channel.redirectNavigationRequest({ url }));
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
async fetch(options = {}) {
|
|
255
|
-
return await this._wrapApiCall(async () => {
|
|
256
|
-
return await this._context.request._innerFetch({ request: this.request(), data: options.postData, ...options });
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
async fulfill(options = {}) {
|
|
260
|
-
await this._handleRoute(async () => {
|
|
261
|
-
await this._innerFulfill(options);
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
async _handleRoute(callback) {
|
|
265
|
-
this._checkNotHandled();
|
|
266
|
-
try {
|
|
267
|
-
await callback();
|
|
268
|
-
this._reportHandled(true);
|
|
269
|
-
} catch (e) {
|
|
270
|
-
this._didThrow = true;
|
|
271
|
-
throw e;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
async _innerFulfill(options = {}) {
|
|
275
|
-
let fetchResponseUid;
|
|
276
|
-
let { status: statusOption, headers: headersOption, body } = options;
|
|
277
|
-
if (options.json !== void 0) {
|
|
278
|
-
(0, import_assert.assert)(options.body === void 0, "Can specify either body or json parameters");
|
|
279
|
-
body = JSON.stringify(options.json);
|
|
280
|
-
}
|
|
281
|
-
if (options.response instanceof import_fetch.APIResponse) {
|
|
282
|
-
statusOption ??= options.response.status();
|
|
283
|
-
headersOption ??= options.response.headers();
|
|
284
|
-
if (body === void 0 && options.path === void 0) {
|
|
285
|
-
if (options.response._request._connection === this._connection)
|
|
286
|
-
fetchResponseUid = options.response._fetchUid();
|
|
287
|
-
else
|
|
288
|
-
body = await options.response.body();
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
let isBase64 = false;
|
|
292
|
-
let length = 0;
|
|
293
|
-
if (options.path) {
|
|
294
|
-
const buffer = await this._platform.fs().promises.readFile(options.path);
|
|
295
|
-
body = buffer.toString("base64");
|
|
296
|
-
isBase64 = true;
|
|
297
|
-
length = buffer.length;
|
|
298
|
-
} else if ((0, import_rtti.isString)(body)) {
|
|
299
|
-
isBase64 = false;
|
|
300
|
-
length = Buffer.byteLength(body);
|
|
301
|
-
} else if (body) {
|
|
302
|
-
length = body.length;
|
|
303
|
-
body = body.toString("base64");
|
|
304
|
-
isBase64 = true;
|
|
305
|
-
}
|
|
306
|
-
const headers = {};
|
|
307
|
-
for (const header of Object.keys(headersOption || {}))
|
|
308
|
-
headers[header.toLowerCase()] = String(headersOption[header]);
|
|
309
|
-
if (options.contentType)
|
|
310
|
-
headers["content-type"] = String(options.contentType);
|
|
311
|
-
else if (options.json)
|
|
312
|
-
headers["content-type"] = "application/json";
|
|
313
|
-
else if (options.path)
|
|
314
|
-
headers["content-type"] = (0, import_mimeType.getMimeTypeForPath)(options.path) || "application/octet-stream";
|
|
315
|
-
if (length && !("content-length" in headers))
|
|
316
|
-
headers["content-length"] = String(length);
|
|
317
|
-
await this._raceWithTargetClose(this._channel.fulfill({
|
|
318
|
-
status: statusOption || 200,
|
|
319
|
-
headers: (0, import_headers.headersObjectToArray)(headers),
|
|
320
|
-
body,
|
|
321
|
-
isBase64,
|
|
322
|
-
fetchResponseUid
|
|
323
|
-
}));
|
|
324
|
-
}
|
|
325
|
-
async continue(options = {}) {
|
|
326
|
-
await this._handleRoute(async () => {
|
|
327
|
-
this.request()._applyFallbackOverrides(options);
|
|
328
|
-
await this._innerContinue(
|
|
329
|
-
false
|
|
330
|
-
/* isFallback */
|
|
331
|
-
);
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
_checkNotHandled() {
|
|
335
|
-
if (!this._handlingPromise)
|
|
336
|
-
throw new Error("Route is already handled!");
|
|
337
|
-
}
|
|
338
|
-
_reportHandled(done) {
|
|
339
|
-
const chain = this._handlingPromise;
|
|
340
|
-
this._handlingPromise = null;
|
|
341
|
-
chain.resolve(done);
|
|
342
|
-
}
|
|
343
|
-
async _innerContinue(isFallback) {
|
|
344
|
-
const options = this.request()._fallbackOverridesForContinue();
|
|
345
|
-
return await this._raceWithTargetClose(this._channel.continue({
|
|
346
|
-
url: options.url,
|
|
347
|
-
method: options.method,
|
|
348
|
-
headers: options.headers ? (0, import_headers.headersObjectToArray)(options.headers) : void 0,
|
|
349
|
-
postData: options.postDataBuffer,
|
|
350
|
-
isFallback
|
|
351
|
-
}));
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
class WebSocketRoute extends import_channelOwner.ChannelOwner {
|
|
355
|
-
constructor(parent, type, guid, initializer) {
|
|
356
|
-
super(parent, type, guid, initializer);
|
|
357
|
-
this._connected = false;
|
|
358
|
-
this._server = {
|
|
359
|
-
onMessage: (handler) => {
|
|
360
|
-
this._onServerMessage = handler;
|
|
361
|
-
},
|
|
362
|
-
onClose: (handler) => {
|
|
363
|
-
this._onServerClose = handler;
|
|
364
|
-
},
|
|
365
|
-
connectToServer: () => {
|
|
366
|
-
throw new Error(`connectToServer must be called on the page-side WebSocketRoute`);
|
|
367
|
-
},
|
|
368
|
-
url: () => {
|
|
369
|
-
return this._initializer.url;
|
|
370
|
-
},
|
|
371
|
-
close: async (options = {}) => {
|
|
372
|
-
await this._channel.closeServer({ ...options, wasClean: true }).catch(() => {
|
|
373
|
-
});
|
|
374
|
-
},
|
|
375
|
-
send: (message) => {
|
|
376
|
-
if ((0, import_rtti.isString)(message))
|
|
377
|
-
this._channel.sendToServer({ message, isBase64: false }).catch(() => {
|
|
378
|
-
});
|
|
379
|
-
else
|
|
380
|
-
this._channel.sendToServer({ message: message.toString("base64"), isBase64: true }).catch(() => {
|
|
381
|
-
});
|
|
382
|
-
},
|
|
383
|
-
async [Symbol.asyncDispose]() {
|
|
384
|
-
await this.close();
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
this._channel.on("messageFromPage", ({ message, isBase64 }) => {
|
|
388
|
-
if (this._onPageMessage)
|
|
389
|
-
this._onPageMessage(isBase64 ? Buffer.from(message, "base64") : message);
|
|
390
|
-
else if (this._connected)
|
|
391
|
-
this._channel.sendToServer({ message, isBase64 }).catch(() => {
|
|
392
|
-
});
|
|
393
|
-
});
|
|
394
|
-
this._channel.on("messageFromServer", ({ message, isBase64 }) => {
|
|
395
|
-
if (this._onServerMessage)
|
|
396
|
-
this._onServerMessage(isBase64 ? Buffer.from(message, "base64") : message);
|
|
397
|
-
else
|
|
398
|
-
this._channel.sendToPage({ message, isBase64 }).catch(() => {
|
|
399
|
-
});
|
|
400
|
-
});
|
|
401
|
-
this._channel.on("closePage", ({ code, reason, wasClean }) => {
|
|
402
|
-
if (this._onPageClose)
|
|
403
|
-
this._onPageClose(code, reason);
|
|
404
|
-
else
|
|
405
|
-
this._channel.closeServer({ code, reason, wasClean }).catch(() => {
|
|
406
|
-
});
|
|
407
|
-
});
|
|
408
|
-
this._channel.on("closeServer", ({ code, reason, wasClean }) => {
|
|
409
|
-
if (this._onServerClose)
|
|
410
|
-
this._onServerClose(code, reason);
|
|
411
|
-
else
|
|
412
|
-
this._channel.closePage({ code, reason, wasClean }).catch(() => {
|
|
413
|
-
});
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
static from(route) {
|
|
417
|
-
return route._object;
|
|
418
|
-
}
|
|
419
|
-
url() {
|
|
420
|
-
return this._initializer.url;
|
|
421
|
-
}
|
|
422
|
-
async close(options = {}) {
|
|
423
|
-
await this._channel.closePage({ ...options, wasClean: true }).catch(() => {
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
connectToServer() {
|
|
427
|
-
if (this._connected)
|
|
428
|
-
throw new Error("Already connected to the server");
|
|
429
|
-
this._connected = true;
|
|
430
|
-
this._channel.connect().catch(() => {
|
|
431
|
-
});
|
|
432
|
-
return this._server;
|
|
433
|
-
}
|
|
434
|
-
send(message) {
|
|
435
|
-
if ((0, import_rtti.isString)(message))
|
|
436
|
-
this._channel.sendToPage({ message, isBase64: false }).catch(() => {
|
|
437
|
-
});
|
|
438
|
-
else
|
|
439
|
-
this._channel.sendToPage({ message: message.toString("base64"), isBase64: true }).catch(() => {
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
onMessage(handler) {
|
|
443
|
-
this._onPageMessage = handler;
|
|
444
|
-
}
|
|
445
|
-
onClose(handler) {
|
|
446
|
-
this._onPageClose = handler;
|
|
447
|
-
}
|
|
448
|
-
async [Symbol.asyncDispose]() {
|
|
449
|
-
await this.close();
|
|
450
|
-
}
|
|
451
|
-
async _afterHandle() {
|
|
452
|
-
if (this._connected)
|
|
453
|
-
return;
|
|
454
|
-
await this._channel.ensureOpened().catch(() => {
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
class WebSocketRouteHandler {
|
|
459
|
-
constructor(baseURL, url, handler) {
|
|
460
|
-
this._baseURL = baseURL;
|
|
461
|
-
this.url = url;
|
|
462
|
-
this.handler = handler;
|
|
463
|
-
}
|
|
464
|
-
static prepareInterceptionPatterns(handlers) {
|
|
465
|
-
const patterns = [];
|
|
466
|
-
let all = false;
|
|
467
|
-
for (const handler of handlers) {
|
|
468
|
-
if ((0, import_rtti.isString)(handler.url))
|
|
469
|
-
patterns.push({ glob: handler.url });
|
|
470
|
-
else if ((0, import_rtti.isRegExp)(handler.url))
|
|
471
|
-
patterns.push({ regexSource: handler.url.source, regexFlags: handler.url.flags });
|
|
472
|
-
else
|
|
473
|
-
all = true;
|
|
474
|
-
}
|
|
475
|
-
if (all)
|
|
476
|
-
return [{ glob: "**/*" }];
|
|
477
|
-
return patterns;
|
|
478
|
-
}
|
|
479
|
-
matches(wsURL) {
|
|
480
|
-
return (0, import_urlMatch.urlMatches)(this._baseURL, wsURL, this.url, true);
|
|
481
|
-
}
|
|
482
|
-
async handle(webSocketRoute) {
|
|
483
|
-
const handler = this.handler;
|
|
484
|
-
await handler(webSocketRoute);
|
|
485
|
-
await webSocketRoute._afterHandle();
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
class Response extends import_channelOwner.ChannelOwner {
|
|
489
|
-
constructor(parent, type, guid, initializer) {
|
|
490
|
-
super(parent, type, guid, initializer);
|
|
491
|
-
this._finishedPromise = new import_manualPromise.ManualPromise();
|
|
492
|
-
this._provisionalHeaders = new RawHeaders(initializer.headers);
|
|
493
|
-
this._request = Request.from(this._initializer.request);
|
|
494
|
-
Object.assign(this._request._timing, this._initializer.timing);
|
|
495
|
-
}
|
|
496
|
-
static from(response) {
|
|
497
|
-
return response._object;
|
|
498
|
-
}
|
|
499
|
-
static fromNullable(response) {
|
|
500
|
-
return response ? Response.from(response) : null;
|
|
501
|
-
}
|
|
502
|
-
url() {
|
|
503
|
-
return this._initializer.url;
|
|
504
|
-
}
|
|
505
|
-
ok() {
|
|
506
|
-
return this._initializer.status === 0 || this._initializer.status >= 200 && this._initializer.status <= 299;
|
|
507
|
-
}
|
|
508
|
-
status() {
|
|
509
|
-
return this._initializer.status;
|
|
510
|
-
}
|
|
511
|
-
statusText() {
|
|
512
|
-
return this._initializer.statusText;
|
|
513
|
-
}
|
|
514
|
-
fromServiceWorker() {
|
|
515
|
-
return this._initializer.fromServiceWorker;
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* @deprecated
|
|
519
|
-
*/
|
|
520
|
-
headers() {
|
|
521
|
-
return this._provisionalHeaders.headers();
|
|
522
|
-
}
|
|
523
|
-
async _actualHeaders() {
|
|
524
|
-
if (!this._actualHeadersPromise) {
|
|
525
|
-
this._actualHeadersPromise = (async () => {
|
|
526
|
-
return new RawHeaders((await this._channel.rawResponseHeaders()).headers);
|
|
527
|
-
})();
|
|
528
|
-
}
|
|
529
|
-
return await this._actualHeadersPromise;
|
|
530
|
-
}
|
|
531
|
-
async allHeaders() {
|
|
532
|
-
return (await this._actualHeaders()).headers();
|
|
533
|
-
}
|
|
534
|
-
async headersArray() {
|
|
535
|
-
return (await this._actualHeaders()).headersArray().slice();
|
|
536
|
-
}
|
|
537
|
-
async headerValue(name) {
|
|
538
|
-
return (await this._actualHeaders()).get(name);
|
|
539
|
-
}
|
|
540
|
-
async headerValues(name) {
|
|
541
|
-
return (await this._actualHeaders()).getAll(name);
|
|
542
|
-
}
|
|
543
|
-
async finished() {
|
|
544
|
-
return await this.request()._targetClosedScope().race(this._finishedPromise);
|
|
545
|
-
}
|
|
546
|
-
async body() {
|
|
547
|
-
return (await this._channel.body()).binary;
|
|
548
|
-
}
|
|
549
|
-
async text() {
|
|
550
|
-
const content = await this.body();
|
|
551
|
-
return content.toString("utf8");
|
|
552
|
-
}
|
|
553
|
-
async json() {
|
|
554
|
-
const content = await this.text();
|
|
555
|
-
return JSON.parse(content);
|
|
556
|
-
}
|
|
557
|
-
request() {
|
|
558
|
-
return this._request;
|
|
559
|
-
}
|
|
560
|
-
frame() {
|
|
561
|
-
return this._request.frame();
|
|
562
|
-
}
|
|
563
|
-
async serverAddr() {
|
|
564
|
-
return (await this._channel.serverAddr()).value || null;
|
|
565
|
-
}
|
|
566
|
-
async securityDetails() {
|
|
567
|
-
return (await this._channel.securityDetails()).value || null;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
class WebSocket extends import_channelOwner.ChannelOwner {
|
|
571
|
-
static from(webSocket) {
|
|
572
|
-
return webSocket._object;
|
|
573
|
-
}
|
|
574
|
-
constructor(parent, type, guid, initializer) {
|
|
575
|
-
super(parent, type, guid, initializer);
|
|
576
|
-
this._isClosed = false;
|
|
577
|
-
this._page = parent;
|
|
578
|
-
this._channel.on("frameSent", (event) => {
|
|
579
|
-
if (event.opcode === 1)
|
|
580
|
-
this.emit(import_events.Events.WebSocket.FrameSent, { payload: event.data });
|
|
581
|
-
else if (event.opcode === 2)
|
|
582
|
-
this.emit(import_events.Events.WebSocket.FrameSent, { payload: Buffer.from(event.data, "base64") });
|
|
583
|
-
});
|
|
584
|
-
this._channel.on("frameReceived", (event) => {
|
|
585
|
-
if (event.opcode === 1)
|
|
586
|
-
this.emit(import_events.Events.WebSocket.FrameReceived, { payload: event.data });
|
|
587
|
-
else if (event.opcode === 2)
|
|
588
|
-
this.emit(import_events.Events.WebSocket.FrameReceived, { payload: Buffer.from(event.data, "base64") });
|
|
589
|
-
});
|
|
590
|
-
this._channel.on("socketError", ({ error }) => this.emit(import_events.Events.WebSocket.Error, error));
|
|
591
|
-
this._channel.on("close", () => {
|
|
592
|
-
this._isClosed = true;
|
|
593
|
-
this.emit(import_events.Events.WebSocket.Close, this);
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
url() {
|
|
597
|
-
return this._initializer.url;
|
|
598
|
-
}
|
|
599
|
-
isClosed() {
|
|
600
|
-
return this._isClosed;
|
|
601
|
-
}
|
|
602
|
-
async waitForEvent(event, optionsOrPredicate = {}) {
|
|
603
|
-
return await this._wrapApiCall(async () => {
|
|
604
|
-
const timeout = this._page._timeoutSettings.timeout(typeof optionsOrPredicate === "function" ? {} : optionsOrPredicate);
|
|
605
|
-
const predicate = typeof optionsOrPredicate === "function" ? optionsOrPredicate : optionsOrPredicate.predicate;
|
|
606
|
-
const waiter = import_waiter.Waiter.createForEvent(this, event);
|
|
607
|
-
waiter.rejectOnTimeout(timeout, `Timeout ${timeout}ms exceeded while waiting for event "${event}"`);
|
|
608
|
-
if (event !== import_events.Events.WebSocket.Error)
|
|
609
|
-
waiter.rejectOnEvent(this, import_events.Events.WebSocket.Error, new Error("Socket error"));
|
|
610
|
-
if (event !== import_events.Events.WebSocket.Close)
|
|
611
|
-
waiter.rejectOnEvent(this, import_events.Events.WebSocket.Close, new Error("Socket closed"));
|
|
612
|
-
waiter.rejectOnEvent(this._page, import_events.Events.Page.Close, () => this._page._closeErrorWithReason());
|
|
613
|
-
const result = await waiter.waitForEvent(this, event, predicate);
|
|
614
|
-
waiter.dispose();
|
|
615
|
-
return result;
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
function validateHeaders(headers) {
|
|
620
|
-
for (const key of Object.keys(headers)) {
|
|
621
|
-
const value = headers[key];
|
|
622
|
-
if (!Object.is(value, void 0) && !(0, import_rtti.isString)(value))
|
|
623
|
-
throw new Error(`Expected value of header "${key}" to be String, but "${typeof value}" is found.`);
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
class RouteHandler {
|
|
627
|
-
constructor(platform, baseURL, url, handler, times = Number.MAX_SAFE_INTEGER) {
|
|
628
|
-
this.handledCount = 0;
|
|
629
|
-
this._ignoreException = false;
|
|
630
|
-
this._activeInvocations = /* @__PURE__ */ new Set();
|
|
631
|
-
this._baseURL = baseURL;
|
|
632
|
-
this._times = times;
|
|
633
|
-
this.url = url;
|
|
634
|
-
this.handler = handler;
|
|
635
|
-
this._savedZone = platform.zones.current().pop();
|
|
636
|
-
}
|
|
637
|
-
static prepareInterceptionPatterns(handlers) {
|
|
638
|
-
const patterns = [];
|
|
639
|
-
let all = false;
|
|
640
|
-
for (const handler of handlers) {
|
|
641
|
-
if ((0, import_rtti.isString)(handler.url))
|
|
642
|
-
patterns.push({ glob: handler.url });
|
|
643
|
-
else if ((0, import_rtti.isRegExp)(handler.url))
|
|
644
|
-
patterns.push({ regexSource: handler.url.source, regexFlags: handler.url.flags });
|
|
645
|
-
else
|
|
646
|
-
all = true;
|
|
647
|
-
}
|
|
648
|
-
if (all)
|
|
649
|
-
return [{ glob: "**/*" }];
|
|
650
|
-
return patterns;
|
|
651
|
-
}
|
|
652
|
-
matches(requestURL) {
|
|
653
|
-
return (0, import_urlMatch.urlMatches)(this._baseURL, requestURL, this.url);
|
|
654
|
-
}
|
|
655
|
-
async handle(route) {
|
|
656
|
-
return await this._savedZone.run(async () => this._handleImpl(route));
|
|
657
|
-
}
|
|
658
|
-
async _handleImpl(route) {
|
|
659
|
-
const handlerInvocation = { complete: new import_manualPromise.ManualPromise(), route };
|
|
660
|
-
this._activeInvocations.add(handlerInvocation);
|
|
661
|
-
try {
|
|
662
|
-
return await this._handleInternal(route);
|
|
663
|
-
} catch (e) {
|
|
664
|
-
if (this._ignoreException)
|
|
665
|
-
return false;
|
|
666
|
-
if ((0, import_errors.isTargetClosedError)(e)) {
|
|
667
|
-
(0, import_stackTrace.rewriteErrorMessage)(e, `"${e.message}" while running route callback.
|
|
668
|
-
Consider awaiting \`await page.unrouteAll({ behavior: 'ignoreErrors' })\`
|
|
669
|
-
before the end of the test to ignore remaining routes in flight.`);
|
|
670
|
-
}
|
|
671
|
-
throw e;
|
|
672
|
-
} finally {
|
|
673
|
-
handlerInvocation.complete.resolve();
|
|
674
|
-
this._activeInvocations.delete(handlerInvocation);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
async stop(behavior) {
|
|
678
|
-
if (behavior === "ignoreErrors") {
|
|
679
|
-
this._ignoreException = true;
|
|
680
|
-
} else {
|
|
681
|
-
const promises = [];
|
|
682
|
-
for (const activation of this._activeInvocations) {
|
|
683
|
-
if (!activation.route._didThrow)
|
|
684
|
-
promises.push(activation.complete);
|
|
685
|
-
}
|
|
686
|
-
await Promise.all(promises);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
async _handleInternal(route) {
|
|
690
|
-
++this.handledCount;
|
|
691
|
-
const handledPromise = route._startHandling();
|
|
692
|
-
const handler = this.handler;
|
|
693
|
-
const [handled] = await Promise.all([
|
|
694
|
-
handledPromise,
|
|
695
|
-
handler(route, route.request())
|
|
696
|
-
]);
|
|
697
|
-
return handled;
|
|
698
|
-
}
|
|
699
|
-
willExpire() {
|
|
700
|
-
return this.handledCount + 1 >= this._times;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
class RawHeaders {
|
|
704
|
-
constructor(headers) {
|
|
705
|
-
this._headersMap = new import_multimap.MultiMap();
|
|
706
|
-
this._headersArray = headers;
|
|
707
|
-
for (const header of headers)
|
|
708
|
-
this._headersMap.set(header.name.toLowerCase(), header.value);
|
|
709
|
-
}
|
|
710
|
-
static _fromHeadersObjectLossy(headers) {
|
|
711
|
-
const headersArray = Object.entries(headers).map(([name, value]) => ({
|
|
712
|
-
name,
|
|
713
|
-
value
|
|
714
|
-
})).filter((header) => header.value !== void 0);
|
|
715
|
-
return new RawHeaders(headersArray);
|
|
716
|
-
}
|
|
717
|
-
get(name) {
|
|
718
|
-
const values = this.getAll(name);
|
|
719
|
-
if (!values || !values.length)
|
|
720
|
-
return null;
|
|
721
|
-
return values.join(name.toLowerCase() === "set-cookie" ? "\n" : ", ");
|
|
722
|
-
}
|
|
723
|
-
getAll(name) {
|
|
724
|
-
return [...this._headersMap.get(name.toLowerCase())];
|
|
725
|
-
}
|
|
726
|
-
headers() {
|
|
727
|
-
const result = {};
|
|
728
|
-
for (const name of this._headersMap.keys())
|
|
729
|
-
result[name] = this.get(name);
|
|
730
|
-
return result;
|
|
731
|
-
}
|
|
732
|
-
headersArray() {
|
|
733
|
-
return this._headersArray;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
737
|
-
0 && (module.exports = {
|
|
738
|
-
RawHeaders,
|
|
739
|
-
Request,
|
|
740
|
-
Response,
|
|
741
|
-
Route,
|
|
742
|
-
RouteHandler,
|
|
743
|
-
WebSocket,
|
|
744
|
-
WebSocketRoute,
|
|
745
|
-
WebSocketRouteHandler,
|
|
746
|
-
validateHeaders
|
|
747
|
-
});
|